ClassNotFoundException junit.tests.runner.LoadedFromJar on junit3.8.1, jdk 1.5.0_01, win 2000
4 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Powah_Wong
Posted On:   Tuesday, February 1, 2005 07:44 AM

I had done what the JUnit FAQ said before I posted to this newsgroup. I thought I had put every required path in the CLASSPATH. I don't know what path is missing yet. CLASSPATH=".;C:Program FilesJavajdk1.5.0_01lib;C:Program Filesjunit3.8.1junit.jar;C:Program Filesjunit3.8.1junit ests unner est.jar;C:Program Filesjunit3.8.1src.jar;C:Program Filesjunit3.8.1". cd C:Program Filesjunit3.8.1 java junit.textui.TestRunner junit.samples.AllTests ......................................... ......................................... ....................E................. Time: 0.891 There was 1 error: 1) testJarClassLoading(junit.tests.runn   More>>


I had done what the JUnit FAQ said before I posted to this newsgroup.
I thought I had put every required path in the CLASSPATH.
I don't know what path is missing yet.


CLASSPATH=".;C:Program FilesJavajdk1.5.0_01lib;C:Program Filesjunit3.8.1junit.jar;C:Program Filesjunit3.8.1junit ests
unner est.jar;C:Program Filesjunit3.8.1src.jar;C:Program Filesjunit3.8.1".




cd C:Program Filesjunit3.8.1
java junit.textui.TestRunner junit.samples.AllTests
.........................................
.........................................
....................E.................
Time: 0.891
There was 1 error:
1) testJarClassLoading(junit.tests.runner.TestCaseClassLoaderTest)java.lang.ClassNotFoundException: junit.tests.runner.LoadedFromJar
at junit.runner.TestCaseClassLoader.lookupClassData(TestCaseClassLoader.java:124)
at junit.runner.TestCaseClassLoader.loadClass(TestCaseClassLoader.java:101)
at junit.tests.runner.TestCaseClassLoaderTest.testJarClassLoading(TestCaseClassLoa
derTest.java:33)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

FAILURES!!!
Tests run: 119, Failures: 0, Errors: 1


junit3.8.1, jdk 1.5.0_01 on windows 2000 SP4

   <<Less

Re: ClassNotFoundException junit.tests.runner.LoadedFromJar on junit3.8.1, jdk 1.5.0_01, win 2000

Posted By:   Anonymous  
Posted On:   Thursday, April 14, 2005 06:27 AM

Simply STOP using a classpath with spaces in it! The test which is failing does not like the Space " " in
C:Program Files.
;]

Re: ClassNotFoundException junit.tests.runner.LoadedFromJar on junit3.8.1, jdk 1.5.0_01, win 2000

Posted By:   WILLIAM_LAM  
Posted On:   Thursday, March 10, 2005 10:15 PM

The only thing you need in your classpath is your JSDK and junit. For mines I have it set as the following


C:Program FilesJavajdk1.5.0_01lib;C:/junit/junit.jar;


This is enough to get it working. You might not be creating your unittest correctly.

Re: ClassNotFoundException junit.tests.runner.LoadedFromJar on junit3.8.1, jdk 1.5.0_01, win 2000

Posted By:   Anonymous  
Posted On:   Thursday, March 10, 2005 04:39 PM

All you have to do:
1. Go to control panel- environment set your
path (NOT Classpath) to where ever junit that you installed.

Re: ClassNotFoundException junit.tests.runner.LoadedFromJar on junit3.8.1, jdk 1.5.0_01, win 2000

Posted By:   John_Riley  
Posted On:   Thursday, February 3, 2005 06:12 AM

move your junit installation directly under the root at c: & -of course- adjust the %CLASSPATH% accordingly. this worked for me. the problem is probably some stink associated w/ the embedded space in the path.
About | Sitemap | Contact