Bug 494481 - [1.9]Java9 JRE reports "Target is not a JDK root. System library was not found"
Summary: [1.9]Java9 JRE reports "Target is not a JDK root. System library was not found"
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 4.6   Edit
Hardware: PC Linux
: P3 normal with 2 votes (vote)
Target Milestone: ---   Edit
Assignee: JDT-Debug-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-05-24 15:53 EDT by rektide CLA
Modified: 2018-01-09 23:19 EST (History)
7 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description rektide CLA 2016-05-24 15:53:45 EDT
Hello. I've tried using both Eclipse Neon RC2[1] and Eclipse Mars.2 + the 4.5-P update site for Java 9 support[2], and neither is willing to use either my distro's Java9 (9b116) nor the most recent available from Oracle's site (9b119). In all cases, from Preferences->Java->Installed JREs->Add, I pick the target JDK as JRE home, and get this error condition in the "JRE Definition" window:

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

I'd really like to start working with Java 9, & hope this can get resolved. Thanks. I did a quick look at Eclipse running under strace last night and didn't see any obvious files it was looking for. I dno't know what the "system library" that can't be found is, but it didn't- to my novice eyes- seem to be a file inside the JDK directory.

[1] http://marketplace.eclipse.org/content/java-9-support-beta-neon
[2] https://www.eclipse.org/community/eclipse_newsletter/2015/june/article4.php
Comment 1 Jay Arthanareeswaran CLA 2016-05-24 23:01:58 EDT
We are aware of this issue and it's been noted elsewhere that the JDK/JRE are still changing in ways that breaks Eclipse and other tools. 

We will look at it soon after Neon is shipped.
Comment 2 Alpana Samanta CLA 2017-04-17 00:33:02 EDT
Hello,

I am using eclipse 4.6.3 (Neon3 version).
I have installed JDK 1.9 from the path: https://jdk9.java.net/  and followed all instructions as mentioned in the link: https://marketplace.eclipse.org/content/java-9-support-beta-oxygen

But while selecting the jdk path in the JRE field. It shows the error: Target is not a JDK Root. Java executable was not found.

Could you please inform whether this bug is resolved or suggest ways to resolve this bug?

Please reply at the earliest as it is causing a hindrance to our development activity.

Thanks & Regards,
Alpana
Comment 3 Sarika Sinha CLA 2017-04-17 00:43:19 EDT
(In reply to Alpana Samanta from comment #2)
Which version of Java 9 are you using ?
Comment 4 Alpana Samanta CLA 2017-04-17 01:48:38 EDT
I am using Java9 (64-bit). Version is 9.0.0.0
Comment 5 Jay Arthanareeswaran CLA 2017-04-17 04:20:44 EDT
(In reply to Alpana Samanta from comment #4)
> I am using Java9 (64-bit). Version is 9.0.0.0

Can you also tell us which build you used? Running "Java -version" should give you the build ID too.
Comment 6 Alpana Samanta CLA 2017-04-17 05:13:40 EDT
Hi Jay,

The version and build ID are as follows:
java version "9-ea"
Java(TM) SE Runtime Environment (build 9-ea+164)
Java HotSpot(TM) 64-Bit Server VM (build 9-ea+164, mixed mode)

Thanks,
Alpana
Comment 7 Sourav Pal CLA 2017-04-19 15:42:25 EDT
Hi,

I am using Eclipse Mars.1 Release(4.5.1)and tried using java 9 (Version : 9-ea).I am also getting the following error while adding java 9 to Installed JREs : 
"Target is not a JDK root. System library was not found."

Regards,
Sourav
Comment 8 Sarika Sinha CLA 2017-04-20 04:20:59 EDT
I tried with Oxygen and Java 9 164 build it works fine.

The latest Beta Java 9 patches are only available for 4.7 (Oxygen).
Comment 9 Alpana Samanta CLA 2017-04-24 06:26:40 EDT
Hi Sarika,

Could you please provide a link to the document which you followed regarding any change in ini file of eclipse or any other change that you have made?
I followed the instruction given in:
 https://marketplace.eclipse.org/content/java-9-support-beta-oxygen

And I am trying to follow all these steps in Eclipse Oxygen, but still the error remains same.
Waiting for your reply.

Regards,
Alpana
Comment 10 Sarika Sinha CLA 2017-04-24 07:16:43 EDT
If you are not restricted to use market place, you can also try Y build which comes with Java 9 changes.
http://download.eclipse.org/eclipse/downloads/drops4/Y20170420-1000/
Comment 11 Alpana Samanta CLA 2017-05-26 01:27:25 EDT
Hi Sarika,

Thank you for the solution.
It worked now.

Thanks,
Alpana
Comment 12 Holger Voormann CLA 2017-07-22 07:06:51 EDT
Fixed (according to comment 11)
Comment 13 Richard Bradley CLA 2017-10-18 13:08:52 EDT
Agreed, this appears fixed to me.  I had the exact same scenario.  Don't know what a y build is but I downloaded eclipse Oxygen version 1a to replace version 1 and this allowed me to use my java 9 where version 1 did not.
Comment 14 Terri Furness CLA 2018-01-09 06:04:14 EST
Downloaded Eclipse and tried to access your fix for error :
 Target is not a JDK root. System library was not found.
when adding JRE

http://download.eclipse.org/eclipse/downloads/drops4/Y20170420-1000/
Comment 15 Sarika Sinha CLA 2018-01-09 23:19:17 EST
There is no Y build anymore, you can try with the I builds like - http://download.eclipse.org/eclipse/downloads/drops4/I20180108-2000/