File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
JavaRanch » Java Forums » Java » JSP
Bookmark "Bad version number in .class file" Watch "Bad version number in .class file" New topic

Bad version number in .class file

sameer khazi

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

Thank you...
Ben Souther

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
I agree. Here's the link:
subject: Bad version number in .class file
It's not a secret anymore!