Bug 241118 - Don't remove "Installed JREs" entries!
Summary: Don't remove "Installed JREs" entries!
Status: NEW
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 3.4   Edit
Hardware: PC Windows XP
: P3 enhancement with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: JDT-Debug-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-07-16 12:54 EDT by unrealname CLA
Modified: 2013-08-23 05:39 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description unrealname CLA 2008-07-16 12:54:06 EDT
When Eclipse starts up, it obvously removes (currently) invalid entries from the "installed JREs".
And it adds and selects the current standard JRE.

Ob first sight this seems to be the a logical course of action.
This is not the case in all circumstances...

I have my workbench installed on a removable drive and work with this on different machines. They have the same Eclipse version
installed but different JREs. Both JREs are version 1.6 but installed in different drives/folders. Additionally the standard JRE on the second machines is a parallel JRE 1.5 installation.

What happens is this:
I work on PC1 with JRE 1.6 in folder f1. 
I switch to the other PC2. Eclipse does not find the JRE 1.6 in the folder f1 and removes the entry. It installs the standard JRE 1.5 and selects it.

I manually have to add the JRE 1.6 in folder f2 and select it.
When I switch back to PC1 Eclipse deletes the entry for JRE 1.6 in folder f2 and installes the one in folder f1.
And so on.... I switch back and forth on a daily basis so this gets a little annoying.

My suggestion:
When Eclipse starts up, don't remove invalid entries. If the currently selected JRE does not exist, look for the standard JRE in the environment. Add it to the "installed JREs" if it's not there and select it.
Comment 1 T. Orf CLA 2012-10-24 08:32:29 EDT
I don't need two computers to be annoyed by the auto-delete feature :-)

For a single JDK installation directory, i usually have five or so entries under "Installed JREs": without arguments, client VM, client VM with some standard arguments, server VM, ...
Having to recreate them just because the directory is now called e.g. jdk-1.6.0_37 instead of jdk-1.6.0_36 is bad. As when changing a library's source attachment, both editing the invalid path and browsing for the new location should be possible.

Using variables configured in "Run/Debug - String Substitution" makes adding JREs with arguments much more comfortable, but this is still a PITA.
Comment 2 T. Orf CLA 2013-08-23 05:39:11 EDT
After switching to Eclipse 4.3.0, the variables (string substitution) workaround has become even less comfortable. It seems I can no longer put multiple arguments in one variable. For example, a variable with this value no longer works:
-ea -Dfile.encoding=ISO-8859-1 -Dnet.sf.ehcache.skipUpdateCheck=true