Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 482268 - [1.9] Problems while using multiple versions of JRE 9
Summary: [1.9] Problems while using multiple versions of JRE 9
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 4.6   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: BETA J9   Edit
Assignee: Jay Arthanareeswaran CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 457413
  Show dependency tree
 
Reported: 2015-11-16 06:11 EST by Noopur Gupta CLA
Modified: 2016-01-19 02:01 EST (History)
4 users (show)

See Also:


Attachments
Screenshot of Open Type error dialog (26.28 KB, image/png)
2015-11-16 06:11 EST, Noopur Gupta CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Noopur Gupta CLA 2015-11-16 06:11:40 EST
Created attachment 257962 [details]
Screenshot of Open Type error dialog

Steps:

- Launch Eclipse BETA_JAVA9 workspace as runtime using the Jigsaw build jdk-9-pwa6490-20151112_01.
- In runtime workspace, add two different versions of JDK9 in Installed JREs.
- Create two Java projects using these two different 1.9 JREs.
- Invoke Open Type dialog and type "String".

=> We see two results for type String.java in the dialog, one for each of the JRE 9 versions.

Issues:
- The package name of the entry is shown as "java.base|java.lang" => the module name somehow makes it to the package name.
- Click on one entry in the dialog and see the JRE path changes for the other entry as well.
- Double-click on any entry to open the type String, we get an error dialog (see attached screenshot) and after that the Open Type dialog gets closed and the type is not opened.
Comment 1 Jay Arthanareeswaran CLA 2015-11-16 09:49:56 EST
(In reply to Noopur Gupta from comment #0)
> Created attachment 257962 [details]
> Screenshot of Open Type error dialog

This may have to do with the code that was moved as part of bug 478042 and subsequent incorrect merge. Can you confirm you were using HEAD of jdt.core and not the feature patch?
Comment 2 Noopur Gupta CLA 2015-11-16 12:48:59 EST
(In reply to Jay Arthanareeswaran from comment #1)
> Can you confirm you were using HEAD of jdt.core
> and not the feature patch?

Yes, I was using HEAD of jdt.core from BETA_JAVA9 branch.
Comment 3 Jay Arthanareeswaran CLA 2015-11-16 23:44:21 EST
> Issues:
> - The package name of the entry is shown as "java.base|java.lang" => the
> module name somehow makes it to the package name.
> - Double-click on any entry to open the type String, we get an error dialog
> (see attached screenshot) and after that the Open Type dialog gets closed
> and the type is not opened.

These two were because of the code moved out. Fixed here:

http://git.eclipse.org/c/jdt/eclipse.jdt.core.git/commit/?h=BETA_JAVA9&id=4cda78546cf6e80dc403ba77620ebfff7f3a38c7

Manoj, I think we should add some tests that test search with a proper JRE 9. All our search tests run with the minimal JLS classes for performance of tests sake.

> - Click on one entry in the dialog and see the JRE path changes for the
> other entry as well.

This needs to be fixed. But we might have to wait until jrt-fs starts supporting multiple installations of JRE 9.
Comment 4 Manoj N Palat CLA 2016-01-18 02:32:13 EST
(In reply to Jay Arthanareeswaran from comment #3)
> Manoj, I think we should add some tests that test search with a proper JRE
> 9. All our search tests run with the minimal JLS classes for performance of
> tests sake.
will be done via children of bug 478361
Comment 5 Jay Arthanareeswaran CLA 2016-01-19 02:01:24 EST
I have fixed the remaining issues with multiple JRE 9 with the following commit:

http://git.eclipse.org/c/jdt/eclipse.jdt.core.git/commit/?h=BETA_JAVA9&id=e2511e103fee396c9ab7514f46c3914a90ea3708

This can be considered done.