How to change default JRE for all Eclipse workspaces?
I have one JRE in
C:\Program Files (x86)\Java\jre6 and that was the only one at the time I installed Eclipse. I have subsequently installed a complete JDK in
C:\home\SFTWR\jdk1.6.0_21 and changed my
JAVA_HOME environment variable to that. However, every time I start a new Eclipse workspace, it only picks up the old JRE and I have to manually remove it and add the new one.
How do I bind my Eclipse install to the new JDK so that every new workspace points to that only? I checked
eclipse.ini but there was no reference there to which JRE to go to.
I went into
Prefs->Java->Installed JREs, added the new location, marked it as default, removed the other, and it was effective only for the current workspace. However, when I opened a new workspace, only the old JRE was available. So this didn't change the core Eclipse config that is applicable across all (at least new) workspaces
Finally got it: The way Eclipse picks up the JRE is using the system's PATH.
I did not have
C:\home\SFTWR\jdk1.6.0_21\bin in the path at all before and I did have
C:\Program Files (x86)\Java\jre6\bin. I had both
JAVA_HOME set to
C:\home\SFTWR\jdk1.6.0_21 but neither of those two mattered. I guess Eclipse did (something to the effect of) where java (or which on UNIX/Linux) to see where Java is in the path and took the JRE to which that
java.exe belonged. In my case, despite all the configuration tweaks I had done (including
eclipse.ini -vm option as suggested above), it remained stuck to what was in the path.
I removed the old JRE bin from the path, put the new one in, and it works for all workspaces.
How to change default JRE for all Eclipse workspaces?, The default JRE is used for compiling and launching Java programs in all projects Here is how you can change the default JRE: if you have auto build enabled (Project > Build Automatically or in the Opens the Workspace preference page Check out this discussion on StackOverflow on how to change the default JRE (or JDK) in Eclipse: In Eclipse set the path to your JRE / JDK by going to Window -> Preferences -> Java -> Installed JREs. Click on the Add button on the right hand side, choose Standard VM, choose the directory to your JRE / JDK.
Open the Java > Installed JREs preference page. 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.
Assigning the default JRE for the workbench, Setup Default JRE as JDK. Once you have started Eclipse, click [Window]/[Preference]: SettingJREinEclipse01.png; Select Java/Install JREs on Here is how you can change the default JRE: Open the Java > Installed JREs preference page. 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.
The Installed JREs is used for what JREs to execute for your downstream Java projects and servers. As far as what JVM or JRE that is used to execute Eclipse process (workbench) itself that is controlled by your environment, history and eclipse.exe binary. So eclipse.exe itself decides what JRE Eclipse will execute itself with, not installed JREs preferences since those are not read until OSGi framework is up and running which is loaded after the JVM/JRE is picked.
So for new workspaces, Eclipse is going to use its currently executing JRE to populate the JRE prefs.
The best way I know how is to force eclipse.exe to use the JRE that you tell it via the
-vm switch. So in your eclipse.ini do this:
-startup plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar --launcher.library plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.100.v20110502 -vm /path/to/exactly/what/jre/you/want/as/default/javaw.exe ...
Setting Default JRE In Eclipse - Documentation, Learn how to add a new JRE into our Eclipse workspace and how to switch to a different add a JRE to Eclipse, and change a Java version in an Eclipse project, so we'll be In our case it says Java 10, so we're all good:. In the next screen, JRE Definition, click Directory button to locate installation directory of the desired JRE: Wait a few seconds for Eclipse loading JRE system libraries jar files, and then click Finish. The newly added JRE is shown in the table: If you want to use the newly added JRE as the default, select the appropriate checkbox. To edit or remove a JRE, click the corresponding button Edit or Remove. NOTES:
In eclipse go to
Window-> Java -> Installed JREs
You can remove your current installed jre and add the jdk by specifying the path to where the jdk is installed.
How to Change Java Version in an Eclipse Project, However, when I opened a new workspace, only the old JRE was available. So this didn't change the core Eclipse config that is applicable across all (at least change workspace JRE in Eclipse. While creating your java project if you get warning “The current workspace uses 1.4 JRE…” OR If you want to change workspace JRE in Eclipse OR If any of existing project you are importing into your eclipse workspace and get No JREs in workspace compatible with specified execution environment.
How to change default JRE for all Eclipse workspaces?, By default, Eclipse uses the JRE on which it is running, as the default As we see, Eclipse lists all JREs in the Installed JREs table with the default one That means different workspaces may have different set of installed Setup Default JRE as JDK. Once you have started Eclipse, click [Window]/[Preference]: Select Java/Install JREs on the left, click the Add button on the right side. On the first page of popup wizard, select "Standard VM", then click Next. Click Directory, Select JDK's path then press OK.
How to manage JRE installations in Eclipse, Learn how to set up an Eclipse workspace for platform development. Table of Contents. Overview; Prerequisites; Configure the default JRE; Configure the OSGi Target Platform See Installing the Akana API Platform (all versions). Eclipse Find the steps to install JRE in eclipse. Step 1: Go to Window -> Preferences. Step 2: Go to Java -> Installed JREs. Step 3: Click on Add and select Standard VM and then click on Directory and select JRE home or JDK home. We can add more than one JRE versions.
Eclipse Workspace Setup, In your workspace you can have any number of JRE definitions. Standard VM - You will select a folder where the JRE is installed. will select an execution environment (EE) file that describes all the details required to set up the JRE. In the Default VM Arguments field, you can add/edit the default arguments that will be If you want to change recent workspace manually in a configurationfile org.eclipse.ui.ide.prefs exists in . eclipse > configuration > .settings > org.eclipse.ui.ide.prefs open this file in an editor find RECENT_WORKSPACES in line #2 and in this line you can see recent workspaces and can change or even remove them.
Adding a new JRE definition, Eclipse has the notion of a workspace, which is a collection of one or more projects. Ptolemy II is a When all the changes are done, hit OK , which will close the Eclipse Preferences Window. By default, Eclipse rebuilds a project when any change is made to a file. This will Select the default JRE | Edit | Add External Jars . So, I ran my Projects in Eclipse with a Run Configuration that used the JRE 1.8_40, but I update it to 1.8_45 and Eclipse says this: Unable to locate executable for jre1.8.0_40 Because when I installed the _45 version Java told me If I wanted to clean the system by deleting the old Java Versions, thinking that Eclipse was smart and knew that I