| « Why do I use Green Energy? | Copying files to a remote share on windows » |
STS brakes after uninstalling Java
April 15th, 2010As 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.exe
The path of javaw.exe was 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/bin it 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
4 comments
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.

