File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Bad version number in .class file

 
Mike Landeros
Greenhorn
Posts: 2
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I was getting the following error:

java.lang.UnsupportedClassVersionError: Bad version number in .class file

I understand it is because I was trying to run a .class or jar file that was compiled with a higher version of java than the virtual machine I was using to run it.

I downloaded and installed the latest version Java SE 7 (I use linux SLACKWARE).

I set Java_Home and Path to point to the version of java using "export"

I restarted tomcat and it recognized the new JAVA_HOME.

I ran the jsp and still got the Bad version number.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic