dcsimg
UnsupportedClassVersionError
2 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   j_g
Posted On:   Thursday, August 10, 2006 01:48 PM

I installed junit4.1, set classpath then ran the test. Here's what I got: H:junit4.1>java org.junit.runner.JUnitCore org.junit.tests.AllTests Exception in thread "main" java.lang.UnsupportedClassVersionError: org/junit/run ner/JUnitCore (Unsupported major.minor version 49.0) at java.lang.ClassLoader.defineClass0(Native Method) at java.lang.ClassLoader.defineClass(Unknown Source) at java.security.SecureClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.access$100(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.n   More>>

I installed junit4.1, set classpath then ran the test. Here's what I got:
H:junit4.1>java org.junit.runner.JUnitCore org.junit.tests.AllTests
Exception in thread "main" java.lang.UnsupportedClassVersionError: org/junit/run
ner/JUnitCore (Unsupported major.minor version 49.0)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)


Any idea how what went wrong?

   <<Less

Re: UnsupportedClassVersionError

Posted By:   Anonymous  
Posted On:   Wednesday, October 25, 2006 05:51 AM

jdk1.4 does not support junit4.1, jdk1.5 will support it.
Install jdk1.5 and set path, classpath and java_home also in enronment variables and run.

Re: UnsupportedClassVersionError

Posted By:   WarnerJan_Veldhuis  
Posted On:   Thursday, August 10, 2006 04:35 PM

You are tesing classes and/or running JUnit on different JDK.JRE versions. Java 5 = 49.0. Java 1.4 = 48.0. See your path environment variable which JDK/JRE is used first
About | Sitemap | Contact