Win a copy of Murach's Python Programming this week in the Jython/Python forum!
    Bookmark Topic Watch Topic
  • New Topic

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

 
rewati raman
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Report post to moderator
Hi
I want to deply a servlet on a server which is running jvm1.5. but my workstation has jdk1.6. the servlet is runing fine on my system but it giving this error on the server.
java.lang.UnsupportedClassVersionError: Bad version number in .class file
I googled and foung it because of other version of jvm. I dont want to install jdk1.5 on my system. is there anyway to solve this problem.
thanks
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Report post to moderator
1) Why don't you want to install 1.5? There's no issues having multiple versions on a single machine (I have at least a half a dozen).
2) Try compiling with a target of 1.5.
 
Gajendra Tomer
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Report post to moderator
I believe javac utility has a switch to compile source in earlier versions too....hope this will help you
 
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!