# 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:

1. From the workbench's menu bar, select Window > Preferences.
2. Expand the Java category in the left pane and select Installed JREs.
3. 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.
4. 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 (Project > Build Automatically or Window > Preferences > General > Workspace > Build automatically).

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