blob: ee1d317a081f86f0bf59e76aa559d70f378e1c0b [file] [log] [blame]
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2005. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="Content-Style-Type" content="text/css">
<meta name="GENERATOR" content="Mozilla/4.75 [en] (Windows NT 5.0; U) [Netscape]">
<title>
Assigning the default JRE for the workbench
</title>
<link rel="stylesheet" href="../book.css" charset="ISO-8859-1" type="text/css">
<script language="JavaScript" src="PLUGINS_ROOT/org.eclipse.help/livehelp.js"> </script>
</head>
<body>
<h1>
Assigning the default JRE for the workbench
</h1>
<p>
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.
</p>
<p>
Here is how you can change the default JRE:
</p>
<ol>
<li>
Open the
<a class="command-link" href='javascript:executeCommand("org.eclipse.ui.window.preferences(preferencePageId=org.eclipse.jdt.debug.ui.preferences.VMPreferencePage)")'>
<img src="PLUGINS_ROOT/org.eclipse.help/command_link.png">
<strong>Java &gt; Installed JREs</strong></a> preference page.
</li>
<li>
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 <a href="tasks-121.htm">add it</a>.
</li>
<li>
Click <strong>OK</strong>.
</li>
</ol>
<strong>Note</strong>: 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
(<strong>Project &gt; Build Automatically</strong> or in the
<a class="command-link" href='javascript:executeCommand("org.eclipse.ui.window.preferences(preferencePageId=org.eclipse.ui.preferencePages.Workspace)")'>
<img src="PLUGINS_ROOT/org.eclipse.help/command_link.png">
<strong>General &gt; Workspace</strong></a> preference page).
<p>
<img src="../images/ngrelc.png" alt="Related concepts" border="0" >
</p>
<p>
<a href="../concepts/concepts-1.htm">Java development tools (JDT)</a>
</p>
<p>
<img src="../images/ngrelt.png" alt="Related tasks" border="0" >
</p>
<p>
<a href="tasks-121.htm">Adding a new JRE definition</a><br>
<a href="tasks-124.htm">Choosing a JRE for launching a project</a><br>
<a href="tasks-110.htm">Working with build paths</a><br>
<a href="tasks-JREs.htm">Working with JREs</a>
</p>
<p>
<img src="../images/ngrelr.png" alt="Related reference" border="0" ><br>
<a href="../reference/ref-19.htm">Installed JREs preference page</a>
</p>
</body>
</html>