dcsimg
Error while running the sample files after unzipping the Junit.zip file
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   v_il
Posted On:   Wednesday, December 11, 2002 06:30 PM

Hello, I downloaded junit3.8.1.zip and installed junit on windows 2000. I unzipped it in the folder C:junit. I add the following to my class path.. C:junitjunit3.8.1;C:junitjunit3.8.1junit.jar. I am trying to run a sample file but am getting a NoClassDefFoundError. The directory from where I am executing the sample java file AllTests.java is C:junitjunit3.8.1. C:junitjunit3.8.1> java junit.samples.AllTests Exception in thread "main" java.lang.NoClassDefFoundError: junit/framework/Test. Please tell me where this junit/framework directory is ? Thanks vil    More>>

Hello,
I downloaded junit3.8.1.zip and installed junit on windows 2000. I unzipped it in the folder C:junit.
I add the following to my class path..
C:junitjunit3.8.1;C:junitjunit3.8.1junit.jar.

I am trying to run a sample file but am getting a NoClassDefFoundError.

The directory from where I am executing the sample java file AllTests.java is C:junitjunit3.8.1.

C:junitjunit3.8.1> java junit.samples.AllTests
Exception in thread "main" java.lang.NoClassDefFoundError: junit/framework/Test.

Please tell me where this junit/framework directory is ?

Thanks
vil

   <<Less

Re: Error while running the sample files after unzipping the Junit.zip file

Posted By:   aleng_hong  
Posted On:   Sunday, December 22, 2002 09:06 AM

u should add this to your classpath as well
.;..;
i.e. the current directory and the parent directory should be included, or the when u run main, it'll look for the class at the C:junitjunit3.8.1 directoy and the class (jar is a set of classes if i'm not wrong)C:junitjunit3.8.1junit.jar


so change the classpath to
.;..;C:junitjunit3.8.1;C:junitjunit3.8.1junit.jar will do i think.
About | Sitemap | Contact