Bug 566894 - Java 11 issue with the "Installed JREs" preference page
Summary: Java 11 issue with the "Installed JREs" preference page
Status: NEW
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 4.16   Edit
Hardware: PC Windows 10
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-Debug-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2020-09-11 06:43 EDT by Massimo Rabbi CLA
Modified: 2022-09-08 20:27 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Massimo Rabbi CLA 2020-09-11 06:43:00 EDT
I had an issue with Java 11 and the automatic adding of the provided JDK among the "Installed JREs" preference page.

I found out that the problem is verified in both Eclipse 4.14 and 4.16 in Windows. 
It appears that the directive -vm <VM_PATH> is working fine to start the Eclipse installation, but the JDK is not automatically added. 
When trying to access the "Installed JREs" page you see the error message "Installed JRE location no longer exists. JRE will be removed.".
The issue seems STRICTLY related to the "folder name". If you name the folder as "jre" vs "myjdk" in the first case you verify the error, in the second case not.

I verified the problem when first working on the transition of our product from Java 8 to Java 11. In our case we were bundling an Oracle JRE 8 having the -vm information in the <product>.ini file pointing to a "jre" folder inside a feature.
I decided to try into a simple Eclipse installation Java for developers 4.14 (same as our platform).
Modifying the eclipse.ini or providing the -vm flag via command line to eclipsec has the same effect. No "Installed JREs" available.

Using the other solution of providing a "jre" folder directly inside the root Eclipse installation directory is fine.
It works either putting the physical "jre" folder or even creating a symbolic link (mklink /D jre <location_of_jdk>).

I tried to look in the bug tracker for similar issues but I could not find something already open. 
The only bug that might be similar or somehow related is this one: https://bugs.eclipse.org/bugs/show_bug.cgi?id=543078

Is this a know problem? or some sort of regression related to the naming convention?
Seems quite odd in my opinion.

By the way problem seems the same on both Windows / Linux (tested also here in a Linux Mint 19.2). 
In Mac OS X it seems working fine maybe (??) also because of the different application (folders) structure.

Best regards,
Massimo.
Comment 1 Eclipse Genie CLA 2022-09-08 20:27:04 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.