This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes JSP and the fly likes Bad version number in .class file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Bad version number in .class file" Watch "Bad version number in .class file" New topic
Author

Bad version number in .class file

sameer khazi
Greenhorn

Joined: Sep 05, 2008
Posts: 28
Hi all..

Please let me know how to resolve the following error:

i am using jdk 1.6._10 , Tomcat 5.5 ; jstl 1.1.2

The error displayed by Tomcat 5.5 is ..

javax.servlet.ServletException: Bad version number in .class file
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:273)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)


Thank you...
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

It sounds like Tomcat is running under a different version of the JVM than what you used to compile your classes.

Tomcat's manager app (under Server Settings) will show you what JVM you're using.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Vinod K Singh
Ranch Hand

Joined: Sep 30, 2008
Posts: 198
This happens when a class compiled by higher version of Java is run under lower version of JVM.


My Blog
 
jQuery in Action, 2nd edition
 
subject: Bad version number in .class file