A spot check of several classes shows that the jar file JUnit 4.8.2 was compiled with java 5 or with the java 6 compiler with the -target option, so it creates class files compatible with java5.
A more likely explanation is that you accidentally compiled a test that you want to run with the Java 6 JDK. What is he doing:
javap -verbose -classpath YOUR_TOP_DIRECTORY com.yourname.YourTest
they say at the top of their output for the "main version"? If he says 50 , then the problem is that you compiled your test class only for java 6. You need to either use the JDK 5 compiler, or pass the -target 1.5 option to your compiler.
Daniel Martin
source share