Bootstrap FreeKB - Java - Set Java Runtime Environment (JRE) Compiler in Eclipse
Java - Set Java Runtime Environment (JRE) Compiler in Eclipse

Updated:   |  Java articles

If you have a project that you want to update to use a certain Java Runtime Environment (JRE), you may need to:

Here is how you would set the Java Compiler Java Runtime Environment (JRE).

  1. Right click on the project and select Properties
  2. Select Java Compiler
  3. Uncheck "Use compliance from execution environment" and then update the drop-down with the Java Runtime Environment (JRE) version you want to use > Apply and Close

 

Or, to be absolutely certain that Eclipse is being run on a certain Java Runtime, you can updated eclipse.ini with the -vm option.

  • The -vm option and its value (the path to the javaw.exe file) must be on separate lines
  • The value must be the full absolute or relative path to the javaw.exe file
  • The -vm option must occur after the other options and before the -vmargs option
  • For 32-bit Eclipse a 32-bit version of Java must be used - Or 64-bit Java for 64-bit Eclipse
-startup
plugins/org.eclipse.equinox.launcher_1.4.0.v20161219-1356.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.551.v20171108-1834
-product
org.eclipse.epp.package.jee.product
-showsplash
org.eclipse.epp.package.common
--launcher.defaultAction
openFile
--launcher.defaultAction
openFile
--launcher.appendVmargs
-vm
C:\Program Files\Java\JDK8u332-B09\bin\javaw.exe
-vmargs
-Dosgi.instance.area.default=@user.home/eclipse-workspace
-XX:+UseG1GC
-XX:+UseStringDeduplication
-Xms256m
-Xmx1024m
--add-modules=ALL-SYSTEM

 




Did you find this article helpful?

If so, consider buying me a coffee over at Buy Me A Coffee



Comments


Add a Comment


Please enter aabe99 in the box below so that we can be sure you are a human.