Bug 241278 - It should be possible to configure JDT to use specific JRE library even when opening new workspace.
Summary: It should be possible to configure JDT to use specific JRE library even when ...
Status: ASSIGNED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 3.4   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: JDT-Debug-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-07-17 11:59 EDT by Krzysztof Daniel CLA
Modified: 2012-07-05 03:49 EDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Krzysztof Daniel CLA 2008-07-17 11:59:04 EDT
In other words - default JRE library setting should be persistent across workspaces on one machine.
Comment 1 Dani Megert CLA 2008-07-17 12:07:50 EDT
Please provide more details. Note that if you start the (new) workspaces with the same VM they will get the same VM.
Comment 2 Zina Mostafia CLA 2008-09-29 15:59:02 EDT
When user create a new workspace, the default JAVA 
environment is 1.5 . Is there a  possibility to change the default JAVA version for all workspaces that will be created in the future. So we don't have to do it manualy with the risk of forgetting to do this ?            

workaround exists:

1. So, first of all go to the Window->Preferenes->JRE's, select the JRE  
that should be default, close preferences dialog and export all          
preferences.                                                             
                                                                  
                                                                         
2. point to the exported preferences from the plugin_customization.ini .                                                                          
5. Restart eclipse with different workspace and check if correct JRE's are   
set up. Please note that this mechanism works only on new worskapce      
creation or launching the workspace with -clean option.                        

request is: to have the abiliti to change the default JRE for all new workspaces created
Comment 3 Krzysztof Daniel CLA 2009-06-15 09:40:56 EDT
Dani, will you be interested in this feature if we provide patches?

It would be nice if we could save the JRE preferences at instance level, so the new workspace would be started always with the same JRE set.

What do you think?
Comment 4 Dani Megert CLA 2009-06-15 09:58:09 EDT
>When user create a new workspace, the default JAVA 
>environment is 1.5 .
This is not true. The default is computed from the VM you use when the workspace is created and the JRE imported/installed.

>It would be nice if we could save the JRE preferences at instance level, so the
You probably meant 'configuration' level (instance is the workspace). Also, do you need this per eclipse installation or rather per machine/user?

I suspect that adding this at the UI level would make things more complicated than needed. What I could imagine is a new command line parameter which allows to specify the JRE and hence overriding the default mechanism. On the other hand, creating a new workspace is not a task you do often and if you do create a new workspace then you normally also want to import all the other preferences.

To be honest, I don't see the value in this. Darin, what's your take on this?
Comment 5 Darin Wright CLA 2009-06-15 10:08:33 EDT
At startup, the default JRE is the JRE the SDK is running on. You can import or configure preferences to change this. A command line argument to change this would be possible (i.e. new feature work), but I also question the value since preference import can be used for this.

If this is something that needs to be done at a product level, I would suggest using the org.eclipse.jdt.launching.JavaRuntime APIs to set a default JRE programmatically.
Comment 6 Krzysztof Daniel CLA 2009-06-15 11:16:17 EDT
Could you then close the bug (as component owner)?

The change is needed per user/machine.
Comment 7 Darin Wright CLA 2009-06-15 11:25:10 EDT
Marking as won't fix.
Comment 8 Dani Megert CLA 2012-07-05 03:46:44 EDT
We should support that one can specify the VMs via pluginCustomization file i.e. export from a current workspace, tweak the .epf file and then use the value(s) in the customization file.
Comment 9 Dani Megert CLA 2012-07-05 03:49:25 EDT
A workaround is to write a simple plug-in and contribute the VMs via the following extension point:
http://help.eclipse.org/juno/topic/org.eclipse.jdt.doc.isv/reference/extension-points/org_eclipse_jdt_launching_vmInstalls.html