• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Ranch Hand
Posts: 681
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 681
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
reply
    Bookmark Topic Watch Topic
  • New Topic