So, you installed a JRE on your operating system but your Eclipse IDE doesn’t seem to see it. Not only this, you’d like to update Eclipse to use a specific Java Runtime Environment (JRE) by default. To do so, follow the instructions below:

  1. Open Eclipse
  2. Select Windows -> Preferences -> Java -> Installed JREs
  3. Select the Add button -> StandardVM -> select the Directory button (next to JRE home)
  4. Select the path where the target JRE folder is located (e.g. C:\Program Files\Java\jre7) and hit OK.
  5. Select the checkbox next to the new JRE
  6. Still in the preferences dialog, select Java -> Installed JREs -> Execution Environments
  7. Select all environments and put a check next to all environments that can use the newly installed JRE
  8. Select Java -> Compiler -> Compiler Compliance Level -> Select the JRE you just installed
  9. Select Java -> Compiler -> Compiler Compliance Level -> De-select Use Default Compliance Settings
  10. On the same screen, next to Generated .class files Compatibility, select the newly installed JRE from the dropdown
  11. On the same screen, next to Source Compatibility, select the newly installed JRE from the dropdown
  12. Select OK in the Preferences Dialog and your done.

Leave a Reply

Your email address will not be published. Required fields are marked *