Gustavo Ramos
Gustavo Ramos

Reputation: 1394

Installed JRE/JDKs are not shown on Eclipse Mars' Execution Environments

I've just installed Java EE Eclipse Mars, with a JDK 8u45 x64 and JDK 7u79 x64 JDKs. My eclipse.ini file is pointing the -vm option to my Java 8 JDK Home: C:\ambiente_mars\jdk8u45x64\bin\javaw.exe.

When I started Eclipse and was configuring my environment I started to set my Installed JREs like this (and like I've done since Indigo):

Installed JREs

My Compiler Settings are configured this way:

Compiler Settings

After all this, I went to Execution Environments to choose the right VM for all the environments, but my configured JRE's are not there:

Execution Environments

Actually, this JRE is not shown for any of the Execution Enviroments <= JSE 1.7. This very same screen, but now on Luna shows everything right, so I think I'm not doing anything wrong.

Maybe this is a bug? Can someone point another way to do it?

Thanks a lot in advance, lads!

Edit 1: Eclipse is x64 too. Thought it would be good to remember ;)

Upvotes: 4

Views: 15288

Answers (4)

Avi Jit
Avi Jit

Reputation: 1

enter image description here

  1. Click on windows → preferences → java → Installed jres
  2. Check jdk with version available or not
    • If available just tick the jdk checkbox and then goto execution environment and select javaSE version and then Compatible jre section add jdk
    • If not available click on add → select standard VM → in place of jre home add jdk bin folder path and click on apply → tick on jdk then goto Execution environments and select javaSE version and then Compatible jre section add jdk

Upvotes: 0

James G
James G

Reputation: 11

I had this problem while looking into issues with an Eclipse (Neon .1) installation yesterday.

After trying plenty of different things, we spotted that the machine had both the environment variable "JRE_HOME" set to a JRE that wasn't the one running eclipse, and a _JAVA_OPTS (global java settings override) environment variable set. When we took both of these out, the execution environments finally started being found!

Unfortunately, we removed both at once, so I can't say which of the two it was, but it's another thing you could try changing.

Upvotes: 1

Yura Shinkarev
Yura Shinkarev

Reputation: 5354

Try this: click "Search.." on item "Installed JREs". Choose your java folder.

Default is: c:\Program Files\Java\

Upvotes: 2

Abder KRIMA
Abder KRIMA

Reputation: 3678

First , you have correclty added the JDK(JRE) in your Eclipse , but the execusion environement changes from a project to an other and in the same workspace , that means , you have to right click on your project => Build Path => Configure Build Path => Libraries Tab you will find JRE System library [JDK...] => you click on and you click on Edit button then you can select the installed JDK in your machine.

Also in eclise.ini for eclipse or jbdevstudio.ini for Jboss developper Studio you set the full path of you installed JDK as a default vm

This is an example :

-vm
C:/Program Files (x86)/Java/jdk1.7.0_51/bin/javaw.exe

About the JAVA_HOME you can modify if by making you default JDK.

Hop that is useful for you.

Upvotes: 0

Related Questions