Just started playing with jdk9 - and kind-of stuck right at the beginning:
This issue sometimes due to having a different version of java in the machine. I solved this issue to update the .ini file with the correct version. Below configuration is working for me.
Since a lot of Q&A's have been marked duplicate of this and the already suggested solutions are nevertheless hacky.
Update as of 11 October,2017 - You shall upgrade to the latest eclipse package Eclipse Oxygen.1a (4.7.1a) which is marked as released and supports Java 9.
I am running Java(TM) SE Runtime Environment (build 9-ea+158) and eclipse Version: Neon.2 Release (4.6.2) - Build id: 20161208-0600
Somehow the solutions with -Djdk.launcher.addmods=
and -addmods
using values java.se.ee
or java.annotations.common
did not work.
Below is the solution that worked for me:
--add-modules=java.se.ee
Source: https://issues.jboss.org/browse/JBIDE-22417?focusedCommentId=13310535&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13310535
Your eclipse.ini
is wrong for specifying the JVM. First of all, the -vm
option needs to be near the end, right before any -vmargs
line. Second, you don't specify the location of the bin
folder, rather the java executable (or dll). See the eclipse.ini wiki page for details (and pay careful attention to the details written there).
By the way, where did you get the info to write eclipse.ini
the way you did? I'd like to know the source in hopes of correcting that misinformation.
Adding this in eclipse.ini worked for me
--add-modules=java.se.ee
-XX:+IgnoreUnrecognizedVMOptions
I had got the same error. org.eclipse.e4.core.di.InjectionException: java.lang.NoClassDefFoundError: javax/annotation/PostConstruct
Resolved it by uninstalling all different versions of java and installed just 1.8.0_231.
Worked finally.
Java 8 installation link - https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
Scala IDE for Eclipse:- version - 4.7.0 http://scala-ide.org/download/sdk.html