I have a web-app, built and compiled in Eclipse, which I want to deploy to my Tomcat 6 (I want to do it manually) and I get a UnsupportedClassVersionError exception which means the JVM tomcat is running is older than the one my eclipse is running. After some checking I see that in the tomcat manager window it says: JVM Version-1.5.0_20-b02 and in my eclipse: Java-Installed JREs- default is pointing at the JDK which is defined as my JAVA_HOME env-var and the one used in my path as the env-var (It’s 1.6.013).
My question is how can I tell tomcat to use my JDK? I though that it was supposed to use the JAVA_HOME var but it is defined properly and if I issue java-version in the command prompt I get the proper advanced version.
After doing a bit more checking I saw that under the tomcat library there is a JRE folder which I presume the tomcat is using but if I delete this folder the Tomcat won’t start (even after I defined a JRE_HOME env-var and pointed it to the JRE listed under my JDK).
So I’m at a loss.
Thanks for any help landed
Ittai
Update: As someone asked me I’m using the xampp add-on tomcat.
There’s no JRE in the standard Tomcat 6.0.20 download from Apache. Are you possibly using a pre-packaged/support version like Spring ship?
Either that or someone has modified the standard Tomcat startup to prefer the shipped JRE. How do you start Tomcat? Trace through the startup scripts and see. Or just re-download Tomcat 6 and start again, knowing that you have the canonical installation.