3

Is it possible to use Java 9 as an Installed JRE in eclipse on OS X (El Capitan 10.11.6)? I've installed both the Java 9 (EA build 165) JRE and JDK from the JDK Early Access Release page and I get the following error in eclipse Neon.3 (4.6.3) when I attempt to add Java 9:

Target is not a JDK root. System library was not found.

enter image description here I found this eclipse bug, but it's almost a year old at this point. Surely this has been fixed by now?

I did try installing the Java 9 Beta Support Plugin (also kinda old at this point), and that doesn't seem to work either.

(Note that I am asking about Eclipse Neon (4.6), not Eclipse Oxygen (4.7) as mentioned on this stackoverflow article).

I appreciate the help!

2Aguy
  • 3,955
  • 5
  • 22
  • 28
  • 1
    Did you try Eclipse Oxygen? If it does not work, then you should wait until August 2017 when Java 9 is released. So far you can use IDEA or NetBeans. – ZhekaKozlov Apr 17 '17 at 00:48
  • No, I didn't try Eclipse Oxygen. I prefer to use Spring STS. Thanks for the info on using IDEA. – 2Aguy Apr 17 '17 at 01:25
  • 1
    Possible duplicate of [Target is not a JDK root. System library was not found. Eclipse Oxygen 4.7 + Java9 error](http://stackoverflow.com/questions/41029647/target-is-not-a-jdk-root-system-library-was-not-found-eclipse-oxygen-4-7-jav) – hpopiolkiewicz Apr 17 '17 at 14:57
  • 1
    STS plugins can probably be installed into Oxygen... – Adam Apr 17 '17 at 15:15
  • 1
    I was using Eclipse Neon with this Java 9 beta plug-in, it was working older releases of Java 9 like EA build 108. Then i upgraded the JVM, I was able to run eclipse with new version, but was not longer recognized - same error as in your case. Eclipse Oxygen works fine with new versions of Java 9, the plug-in is ok. – Anton Krosnev Apr 28 '17 at 08:23
  • I was able to run it with Eclipse Oxygen and the "Java 9 support plug-in". Full info can be found here https://javatutorial.net/install-java-9-eclipse – filip_j Sep 08 '17 at 16:35

1 Answers1

0

"Target is not a JDK root. System library was not found." The solution that worked for me with same problem in Win7 with Oxygen and jre9 was to update Eclipse.

  1. Menu: Help:"Check for updates" and update.
  2. Restart Eclipse.

Before i solved the problem i've changed my Eclipse.ini in Eclipse root dir to

-vm
C:\Program Files\Java\jdk-9.X.X\bin\javaw.exe
-vmargs
-Dosgi.requiredJavaVersion=1.8
--add-modules=ALL-SYSTEM
-Xms40m
-Xmx1024m

After this line

--launcher.appendVmargs

It did'nt help before i updated and i'm not sure if this is needed to so i recomend all who have the same problem to first update Eclipse and test. If it still is not working change the ini arrording to mine.

Lord Metal
  • 31
  • 1
  • 5