dcsimg
Junit installation Classpath problem
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   andrew_beales
Posted On:   Friday, September 3, 2004 06:52 PM

Hello I have been trying to install junit to my classpath through adding junit.jar to my ext folder of jdk. When I command a simple call to java junit.swingui.TestRunner I get cannot not find main noDefintionClassFound. C:J2EEwileyJavaOpSourProexamplesexampleschapter03> java junit.swingui.TestRunner Exception in thread "main" java.lang.NoClassDefFoundError: junit/swingui/TestRunner Please use html tags to format code blocks. I also tried deleting it form the ext ext folder then and putting it the classpath variable of enviromental settings,with the samme error.I then tried just putting the jar in the same folder and using the classpath command argument    More>>

Hello I have been trying to install junit to my classpath through adding junit.jar to my ext folder of jdk.
When I command a simple call to
java junit.swingui.TestRunner I get cannot not find main noDefintionClassFound.


C:J2EEwileyJavaOpSourProexamplesexampleschapter03>
java junit.swingui.TestRunner
Exception in thread "main" java.lang.NoClassDefFoundError: junit/swingui/TestRunner
Please use html tags to format code blocks.


I also tried deleting it form the ext ext folder then and putting it the classpath variable of enviromental settings,with the samme error.I then tried just putting the jar in the same folder and using the classpath command argument


java -cp junit-3.8.1.jar junit.swingui.TestRunner

This worked what can be my problem with classpath,I am using Microsoft Home.

   <<Less

Re: Junit installation Classpath problem

Posted By:   andrew_beales  
Posted On:   Friday, September 3, 2004 07:39 PM

Finally I got junit to work ,to show the swing gui.When I run the testclass
public class TestCsvParser extends TestCase
from the test class name by pressing Run.

I get : Class not found "TestCsvParser".When I open the navigator through the button with ... symbol I get the No Test class found Check that the configured "TestCollector" is supported on this platform.


Why is this?
I also run the test through ant using the preconfigured test task.It works as it should from my book.
What can I do with this?

About | Sitemap | Contact