Simon skrev:
> > C:\junit\; C:\junit\junit-4.1.jar
> ^
> Try to remove the blank.
>
> Cheers,
> Simon
It helped, tahanks. But now I get a new problem:
C:\> 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)
Can anyone fix that?
Kind regards
Jimmi W.
Thomas Weidenfeller - 20 Sep 2006 10:19 GMT
> C:\> 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)
Your JDK and JRE versions don't match or at least JUnit was compiled
with a newer compiler. Use the same releases, or try to compile
everything from scratch with with the -target option (and -source and
-bootclasspath) for your older JRE. The later might fail if your source
code uses newer Java features and APIs.
/Thomas

Signature
The comp.lang.java.gui FAQ:
ftp://ftp.cs.uu.nl/pub/NEWS.ANSWERS/computer-lang/java/gui/faq
http://www.uni-giessen.de/faq/archiv/computer-lang.java.gui.faq/
Chris Uppal - 20 Sep 2006 10:19 GMT
> Exception in thread "main" java.lang.UnsupportedClassVersionError:
> org/junit/run
> ner/JUnitCore (Unsupported major.minor version 49.0)
That means that you are attempting to load a class, apparently
org.junit.runner.JUnitCore, which has been compiled by a 1.5 compiler and is
intended to run on a 1.5 JVM, into an older JVM. If you can't, or don't want
to, update your platform, and can't find a version of JUnit compiled for that
platform (presumably 1.4 or 1.3), then you'll have to rebuild JUnit from source
yourself.
-- chris
Greg R. Broderick - 23 Sep 2006 19:05 GMT
"jimmi1311" <wolff13@gmail.com> wrote in news:1158743246.661051.137310
@m7g2000cwm.googlegroups.com:
> Simon skrev:
>> > C:\junit\; C:\junit\junit-4.1.jar ^
[quoted text clipped - 9 lines]
> org/junit/run
> ner/JUnitCore (Unsupported major.minor version 49.0)
Your version of JUnit was compiled with JDK 1.5.0, and you are trying to run
it with an older version of the JRE.
Solutions:
1. upgrade to JDK 1.5.0 on your development platform
or
2. download an older version of JUnit that does not require Java 1.5
features. JUnit 3.8.x versions will run under JDK/JRE 1.4.
Cheers
GRB

Signature
---------------------------------------------------------------------
Greg R. Broderick gregb.usenet200609@blackholio.dyndns.org
A. Top posters.
Q. What is the most annoying thing on Usenet?
---------------------------------------------------------------------