Assigning the default JRE for the workbench
The default JRE is used for compiling and launching Java
programs in all projects unless you specifically override the default JRE.
The default JRE is the installed JRE to which JRE_LIB, JRE_SRC and JRE_SRCROOT
are bound. A project is not compiled against the default JRE if the JRE_LIB
variable has been removed from its build path. A program is not launched
with the default JRE if a custom runtime JRE has been set for its project.
Here is how you can change the default JRE:
- From the workbench's menu bar, select Window >
Preferences.
- Expand the Java category in the left pane and select
Installed JREs.
- Check the box on the line for the JRE that you want to
assign as the default JRE in your workbench. If the JRE you want to assign
as the default does not appear in the list, you must add
it.
- Click OK.
Note: The JRE_LIB, JRE_SRC and JRE_SRCROOT system variables are
automatically updated when you change the default JRE. This may cause a
build to occur if you have auto build enabled (Window > Preferences
> Workbench > Perform build automatically on resource modification).
Java development tools (JDT)
Adding a new JRE definition
Choosing a JRE for launching a
project
Working with build paths
Working with JREs
Installed JREs preference page