Bug 24233 - Installed JRE detection doesnt work correctly
Summary: Installed JRE detection doesnt work correctly
Status: CLOSED WONTFIX
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 2.0.1   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-Debug-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 35659 (view as bug list)
Depends on:
Blocks:
 
Reported: 2002-09-30 13:58 EDT by Raj Mandayam CLA
Modified: 2007-06-06 13:44 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 Raj Mandayam CLA 2002-09-30 13:58:12 EDT
I have three JRE's

JRE1: D:\jdk1.3\jre
JRE2: D:\jdk1.3.1\jre
JRE3: D:\jdk1.4\jre

I launched eclipse, with JRE1.
Opened Workbench-Preferences-Installed JRE's
and noticed JRE1 as the "Detected VM", I also added JRE3 (jdk1.4).

Then I worked with that image for quite some time.

Finally one day I decided to use JRE2, so I launched eclipse with JRE2

Deleted all the projects in the workspace.

Then I launched Workbench-preferences-Installed JRE,

I still saw JRE1 as the "Detected VM", whereas I had launched eclipse with JRE2.

This behavior is incorrect because (when it says "Detected VM" it should detect 
it as the JRE I launched the eclipse in).

Infact if I delete that erroneous entry (JRE1 "Detected VM" )and hit OK. Then 
reopen the preferences,
JRE2 has been added under the covers as the "Detected VM"

Moreover because of this behavior I cannot edit JRE_LIB & other variables (that 
are reserved) which are populated with entries pointing to JRE1, (atleast that 
is what the message in the preference page says )
Comment 1 Philipe Mulet CLA 2002-10-02 05:41:56 EDT
This issue should be resolved in latest integration build (20021001). We were 
indeed always reusing the same value for JRE_LIB, bypassing the mechanism for 
rebinding it on startup.

Closing, please reopen if the issue is still there with this build or better.
Comment 2 Philipe Mulet CLA 2002-10-02 05:42:06 EDT

*** This bug has been marked as a duplicate of 24001 ***
Comment 3 Raj Mandayam CLA 2003-03-25 13:46:29 EST
*** Bug 35659 has been marked as a duplicate of this bug. ***
Comment 4 DJ Houghton CLA 2003-03-25 14:22:09 EST
If you feel that this is still a problem in the latest builds (based on your 
comments in your dup bug report) then you should re-open this bug for 
investigation.
Comment 5 Raj Mandayam CLA 2003-04-21 00:00:05 EDT
Hi As per comments earlier, this defect has not been fixed even in eclipse 2.1
BUILD : Eclipse 2.1

I have two jdk's d:\java13 & d:\java14
When I launch eclipse I launch it as a Java application i.e
java -verify -cp startup.jar org.eclipse.core.launcher.Main -application
org.eclipse.ui.workbench ...

I launched eclipse with d:\java13\jre\bin\java
then i created my workspace & closed it later.

Then next time i launched it with d:\java14\jre\bin\java when  I noticed that
under installed JRE's it still showed d:\java13....

However if i close eclipse and delete d:\java13 and launch eclipse again with
d:\java14. I see the installed JRE corrected to d:\java14.

So is this a defect or a feature where it continues to use an older JRE inspite
of launching with a new JRE.
Comment 6 Philipe Mulet CLA 2004-05-10 06:30:58 EDT
To investigate during testing stage
Comment 7 Philipe Mulet CLA 2004-05-12 09:27:09 EDT
Behavior still occurs in latest 3.0 builds. I suspect that once a JRE got 
defined, and is still present, it will be reused unless explicitly changed by 
user. This explains why restarting on different JRE is not changing the 
default JRE for free, as long as old one exists.

Note that the detected JRE is by no mean the one which should be the default 
one. However, one could argue that the VM detection should still occur, and 
when starting Eclipse on a different JRE, this new JRE should be added to the 
installed JREs list for free, so that user can switch to it easily.

Anyway, moving to JDT/Debug for further consideration (they own the offending 
behaviour).
Comment 8 Darin Wright CLA 2004-05-12 09:39:43 EDT
The JRE detection is only performed once on startup to help the user - i.e. 
provide a default setting for the JRE. We do not re-detect the JRE after that 
point, as that would change build paths causing re-builds, etc. If the JRE 
goes missing, a quick fix appears to help the user search for alternate JREs. 
This is the intended behavior. Just because the user changes the VM they run 
Eclipse on, we *cannot* infer that they want to change the default JRE that is 
used to build projects in the workspace.
Comment 9 Raj Mandayam CLA 2007-06-06 13:44:09 EDT
closed