I am having issues starting up my java neon, and it keeps saying saying "A Java Runtime Environment (JRE) or Java Development Kit (JDK) must be available in order to run eclipse. no java virtual machine was found after searching the following locations C:/Program Files/Java/jre1.8.0_45/bin" but i installed the jre1.8.0_131, as i dont know how to either downgrade mine or update eclipse's. I feel so silly for not even knowing how to do this but thanks for any help you guys have!
-
did you set up environment variable? – Kumaresan Perumal Jun 08 '17 at 15:15
-
https://stackoverflow.com/search?tab=votes&q=must%20be%20available%20in%20order%20to%20run%20eclipse – Oleg Estekhin Jun 08 '17 at 15:15
-
@OlegEstekhin That question worked, i went in and edited my .ini file for eclipse from the 45 version to 131 and it actually launched – Inertialilty Jun 08 '17 at 15:26
4 Answers
It's better if you uninstall current java version and install newest jdk from here. This jdk also contains jre inside.
After installation in Eclipse go to Preferences -> Java -> Installed JREs
and point to your jdk installation folder, for example C:\Java\jdk1.8.0_131
. After that it should be fine.

- 3,655
- 8
- 40
- 74
This is not a version problem, but a problem with where it is installed. You need to do more than install the JDE or JDK. You have to put it in a special location depending on your OS.
Here is a good step by step for installing JDK on MAC, Windows and Linux: https://www3.ntu.edu.sg/home/ehchua/programming/howto/JDK_Howto.html
You might also need to look at what you gave eclipse access to in the setup stage. There is a chance you didn't give it the option to look in the place it needs to.
I would reccommend you try to compile and run java from a text file and use the command prompt before an IDE. If you can compile and run a test prompt then you know its in the right spot and the problem lies with eclipse location/locator.
To run from a text file. Just open a text file, save it as something.java then type some code and navigate to the file, type javac name of file.java and then if that works type java name of file If this all works fine then it is a problem with eclipse. If not you have a problem with where it is installed.

- 216
- 4
- 14
Your JAVA_HOME and or JRE_HOME variables are probably pointing to a wrong installation.
Update those environmental variables and you should be good.

- 7,031
- 2
- 29
- 56
Please edit the eclipse.ini which is located in the eclipse folder and specifiy the vm you want to use.
simply add two lines at the beginning of the file (set path to directory of your java installation)
-vm
C:/Program Files/Java/jdk1.8.0_121/bin/javaw.exe
the other way is to check and update the environment variables JAVA_HOME and/or JRE_HOME.

- 3,250
- 1
- 11
- 17