Bug 334376 - Allow to specify a default runtime JRE for a workspace
Summary: Allow to specify a default runtime JRE for a workspace
Status: REOPENED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 3.7   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: JDT-Debug-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-14 08:20 EST by Deepak Azad CLA
Modified: 2011-05-02 11:24 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 Deepak Azad CLA 2011-01-14 08:20:37 EST
This default JRE could then be used for all newly created launch configs, e.g. when you invoke a test from the Java editor or Outline view.

PDE already supports this in the Target Platform Environment. We could add something similar to Java > Debug, but with an additional option "<Use project JRE>".
Comment 1 Curtis Windatt CLA 2011-01-14 10:12:21 EST
You can already select a default JRE on the JRE page.  When creating a new launch configuration, the jre is based on the project execution environment, however for many projects the workspace default JRE will be chosen for this.

The PDE option you describe actually just uses the existing workspace JRE setting to work.

I'm closing this as WORKSFORME.  If I have missed something about your issue, please reopen with more information.
Comment 2 Deepak Azad CLA 2011-01-14 10:25:59 EST
(In reply to comment #1)
> You can already select a default JRE on the JRE page.  When creating a new
> launch configuration, the jre is based on the project execution environment,
Right, I want to be able to specify a particular JRE for all the new launch configs and ignore the project execution environment. 

For example, I prefer to use JRE 1.6 for debugging but when I launch a test from the editor the jre in the launch config is based on project execution env which could be 1.4 or 1.5. I would just like to use 1.6 all the time :)

> however for many projects the workspace default JRE will be chosen for this.
In which cases is the workspace default JRE used ?
Comment 3 Curtis Windatt CLA 2011-01-14 10:50:37 EST
When you create a new project, one of the options is to use a specific JRE (or the default) instead of an execution environment.  Naturally, the launch configuration uses the information in the project to determine what to use.

Note that you can change which JRE is associated with an execution environment on the execution environment preference page.  If you always want to use you 1.6 jre, changing the settings there should be enough.

If you want more custom behaviour (use 1.6 jre when testing, EE when running a java application, etc.), I don't see JDT debug putting in that complex of an option.  It sounds very similar to the launch configuration template enhancement that was tried in 3.6 (and removed because it never worked 100%).
Comment 4 Deepak Azad CLA 2011-01-14 12:30:28 EST
(In reply to comment #3)
> It sounds very similar to the launch configuration template
> enhancement that was tried in 3.6 (and removed because it never worked 100%).
I guess you mean Bug 41353. Template support would indeed help.