Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / May 2007

Tip: Looking for answers? Try searching our database.

help with the path while using ant

Thread view: 
ros - 11 May 2007 08:21 GMT
Hi,

I am trying to learn the Ant framework. And for this I am doing the
tutorial that comes with the framework download.

Everything went well until I reached the part where I have to reach
the JUnit framework for testing. I get the error pasted below when I
use this.

I would be really thankful if somebody could help me make sense of
this error message. Would really appreciate help.

Thanks
ros

C:\ANT tutorial 1>ant junit
Buildfile: build.xml

compile:
   [javac] Compiling 1 source file to C:\ANT tutorial 1\build\classes
   [javac] C:\ANT tutorial 1\src\HelloWorldTest.java:1: package
junit.tests.fra
mework does not exist
   [javac] public class HelloWorldTest extends
junit.tests.framework.TestCase {

   [javac]                                                          ^
   [javac] C:\ANT tutorial 1\src\HelloWorldTest.java:7: cannot
resolve symbol
   [javac] symbol  : method fail  (java.lang.String)
   [javac] location: class HelloWorldTest
   [javac]         fail("An error message");
   [javac]         ^
   [javac] 2 errors

BUILD FAILED
C:\ANT tutorial 1\build.xml:24: Compile failed; see the compiler error
output fo
r details.

Total time: 4 seconds
sherod - 11 May 2007 12:48 GMT
I would suspect you don't have the junit jar in your class path.

> Hi,
>
[quoted text clipped - 37 lines]
>
> Total time: 4 seconds
Daniel Dyer - 11 May 2007 13:11 GMT
> Everything went well until I reached the part where I have to reach
> the JUnit framework for testing. I get the error pasted below when I
[quoted text clipped - 16 lines]
>     [javac] public class HelloWorldTest extends
> junit.tests.framework.TestCase {

The TestCase class is in the junit.framework package, not  
junit.tests.framework.  Classes under the junit.tests.* hierarchy are unit  
tests for the framework itself and are presumably not included in the JAR  
file.

Dan.

Signature

Daniel Dyer
https://watchmaker.dev.java.net - Evolutionary Algorithm Framework for Java



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.