• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Tony Evans
Ranch Hand
Posts: 597
1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When I run my junit I get the two standard eclipse junit bug errors

1) UnsupportedClassVersionError: Bad version number in .class file

And

2) Class not found com.myapp.MyClass when juint testing myclass.

My JAVA_HOME is pointing at 1.6 eclipse/window/preferences/java/compliler is pointing at 1.6

But when I run my junit its looking at jre1.5.09 how do I configure junit tests in eclipse to make sure they all look run the same complier

Thanks
 
Tony Evans
Ranch Hand
Posts: 597
1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Fixed when setting your JDK1.6 in eclipse eindows preferences java/complier select at the bottom of the preferences if you are not using the right jre it will prompt you, make sure its using the same version as your JDK in my case 1.6
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic