jUnit ClassNotFoundException
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Pat_Cousineau
Posted On:   Saturday, March 23, 2002 08:57 PM

I think I must be reading the documentation incorrectly ... I read that the jUnit dir attribute is the directory to run the vm from? That is to say, the directory I would be in to run the class? My jUnit task looks like this: I compile to an installation dir which is c:/install/site/classes. ${classes.dir} is set to: The ant build file is in a config directory outside the java directory structure. When (using a console) I go to that directory and run the test by hand, it works just fine. But I get a ClassNotFoundException when I run it through Ant. I have read most of the documentation on    More>>

I think I must be reading the documentation incorrectly ... I read that the jUnit dir attribute is the directory to run the vm from? That is to say, the directory I would be in to run the class?


My jUnit task looks like this:














I compile to an installation dir which is c:/install/site/classes. ${classes.dir} is set to:


The ant build file is in a config directory outside the java directory structure.


When (using a console) I go to that directory and run the test by hand, it works just fine. But I get a ClassNotFoundException when I run it through Ant.


I have read most of the documentation on the site, and am reading Java Tools for eXtreme Programming. If there are other sources to read, please give a pointer!


Thanks, Pat

   <<Less

Re: jUnit ClassNotFoundException

Posted By:   Pat_Cousineau  
Posted On:   Sunday, March 24, 2002 06:16 PM

Finally found my own answer.


I have the classpath assigned in the task. While this works for compiling the build ( tasks), the jUnit task required it explicitly within itself.


Now to get to work ...


Pat

About | Sitemap | Contact