I wrote a web application using jdk 1.6 and
tomcat 6.0 at home and it worked fine. Then I wanted to put it online so I found a host site and uploaded my war. I got this:
java.lang.UnsupportedClassVersionError: Bad version number in .class file
This happened when it was trying to load my ServletContextListener. It looks like the host site was running Tomcat 5.5.17.
I then downloaded the
java 1.5 jdk and tried to compile my
servlet classes with that and then reployed it and I got the same thing. I searched through the tomcat documentation for a while and I couldn't find the JRE it was using to run my classes. What jdk do I need to use to compile my servlet classes for tomcat 5.5.17? Please don't tell me I have to rewrite my classes to be compatible with jdk 1.4. Thanks in advance.