I use Tomcat 5.5.9 , and the JVM it uses java 5 how can I change the Java version to 6.0? is there any configuration file which I can edit, I tried server.xml or catalina.property file, they seem not the right one. help please
benjamin muktesh wrote:Go to tomcat/bin and modify the JAVA_HOME parmater in catalina.sh (for linux/unix) or catalina.bat (for windows)
Ive been searching for days for this solution,
I've had this error and now it's solved:
javax.servlet.ServletException: Bad version number in .class file
for my Java Server Faces JSF beans which all gave errors.
Ulf Dittmer wrote:Which JRE version and which JSF version are you using? JSF 1.2 requires at least Java 5 (since it's part of JEE 5), while JSF 2.0 requires Java 6 (since it's part of JEE 6).
Is there a class file version number given in the error message? Should be a number around 50.
No I meant with my post that my problem was already solved. After googling my error I found that there's a JDK difference between Tomcat and Maven, so I just googled how to change Tomcat's JDK version and found this thread. But I had been searching long before I realised that the JDK difference was the problem (I had two JDK's on my pc and the system environment variable pointed to the outdated JDK, which Tomcat uses) so I thought I'd post the error message here so Googlers might end up here.
SEVERE: Servlet.service() for servlet RestServlet threw exception
java.lang.UnsupportedClassVersionError: Bad version number in .class file
at java.lang.ClassLoader.defineClass1(Native Method)
Hello I am struggling with the same error.
My server side application is using jdk 1.5 specification.
when I build it through eclipse 1.5 compliance setting and exporting it as a war file to the server tomcat web apps folder. I am getting the same error.
I have build the application using dynamic web project 2.4.
In project facets section I have following points checked.
1.Dynamic web module :2.4
Will my windows environment variable affect the eclipse build settings??