I had 2 grails projects which worked once upon a time, meaning I could run as grails app, and have a functional web app running.
We had a massive merge, so I decided to delete the old projects, and just re-import the entire project from svn, using the Subeclipse plugin.
Somehow, something got corrupted, such that when I attempt to run the project as a grails app, the following error pops up:
The archive: C:/Program Files/Java/jdk1.6.0_26/lib/tools.jar which is referenced by the classpath, does not exist.
I don’t know what classpath the error is referencing. I do not even HAVE 1.6 on my machine. I searched through the entire project directory, and the only references to 1.6 were in the buildconfig.groovy files, so I changed those references to 1.7, cleaned all projects, recompiled, and attempted to re-run. Same error.
My system classpath certainly does not reference 1.6. The STS projects are also configured to compile to 1.7.
So, this leaves me with no other viable option but to uninstall and reinstall STS, which I have had to do on a fairly regular basis ANYWAY – unless anyone here may have some other pointers for me to chase down. I’ve spent a few fruitless hours on this, and am very close to jumping to the VisualStudio side of the fence, where I’ve heard such strange things never happen in that IDE… 😉
Your launch configuration is broken and points to the non-existing JDK. You can fix it manually in all
*.launchfiles of your workspace:$WORKSPACE/.metadata/.plugins/org.eclipse.debug.core/.launches/or just open the run configuration in STS and save it. STS shall automatically switch to the new JDK (tested with sts-2.9.1).