As new versions of Java are released the Java updater automatically installs them. The number of Java installations on your computer increases. Normal PC housekeeping dictates that you delete the old versions because they are no longer in use. I used the Window’s Add and Remove Programs option in the Control Panel to un-install all the old JREs leaving only the latest versions. I do a lot of Java programming and I rely on the environment variable JAVA_HOME to tie together a lot of my build scripts and development environments. When I tried to load Spring Tool Suite (STS) it wouldn’t load and gave the message:
A Java Runtime Environment (JRE) or Java Development Kit (JDK) must be available in order to run STS. No Java virtual machine was found after searching the following locations: c:/Java/Java/jdk1.6.0_16/javaw.exeThe path of
javaw.exewas one of the versions I had un-installed. Even though I had reset the JAVA_HOME and updated the path to point to the new
JAVA_HOME/binit still wasn’t picking up the correct path of the Java installation. So here is how to fix it:
- Find your installation of Spring Tool Suite
- Change to that directory
- Load the file
STS.iniinto your favourite text editor.
- Change the old command line path from the old version of Java:
-vm C:/Java/Java/jdk1.6.0_16/bin/javaw.exeto the new Java path:
-vm C:/Java/Java/jdk1.6.0_18/bin/javaw.exeIn your set up the version will be different. Where 1.6.0_18 is the full path to my latest Java installation.
- Save file and re-run Spring Tool Suite
Comment from: plankscale [Visitor]
Thanks for taking the time to post. This little annoyance just happened to my instance of STS after upgrading to sun java 6 (on openSUSE 11.1 x86_64). Luckily, I found your post in my first search, so I wasn’t held up long.
Comment from: rwy [Visitor]
Thank you for your clear description and with that your help. I have searched quite a lot of time before and agree with your concern about JAVA_HOME.
Comment from: Bharath [Visitor]
This happened when i updated to new jdk. Even though i changed the Environment Variables , i was not able to launch STS. It works after changing at the STS.ini file. Thank you for your information.
Comment from: Guest [Visitor]
Was very helpful…thanks
Form is loading...