Scala IDE is not compatible with Java SE 9 and higher versions. You might need to downgrade or install Java SE 8 in order to fix the issue.
Lets go through each step how you can fix it.
Step 1. Check what version of Java you have installed on your machine.
Run this command in your terminal: /usr/libexec/java_home --verbose
As you can see I have three different versions of java running on my machine.
Step 2: Install Java SE 8 (jdk1.8) if you don't find it in your list. Refer this blog for java installation steps.
Step 3: Now open your .bashrc file (run command: vi ~/.bashrc) and copy-paste below line in your bashrc file.
export JAVA_HOME=$(/usr/libexec/java_home -v 1.8)
Step 4: Save the file (:wq!) and reload your profile (source ~/.bashrc)
Step 5: Now you need to define eclipse.ini arguments in order to use Java 1.8 version.
On a Mac OS X system, you can find eclipse.ini by right-clicking (or Ctrl+click) on the Scala IDE executable in Finder, choose Show Package Contents, and then locate eclipse.ini in the Eclipse folder under Contents.
The path is often /Applications/Scala IDE.app/Contents/Eclipse/eclipse.ini
Step 6: Open it with text editor and copy-paste below line in eclipse.ini file. Change the version (if needed) according to your java version. Mine is 1.8.0_171.
Step 7: Save the file and exit.
Step 8: Run the Scala IDE application now and it should run:
If you are still facing problem, please mention it in the comments section below. Thank you!
Learn Apache Spark in 7 days, start today!
1. Apache Spark and Scala Installation
2. Getting Familiar with Scala IDE
3. Spark data structure basics
4. Spark Shell
5. Reading data files in Spark
6. Writing data files in Spark
7. Spark streaming