Meaningless Drivel is fun!*
The moose likes Ant, Maven and Other Build Tools and the fly likes Path setting problem in java task Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Path setting problem in java task" Watch "Path setting problem in java task" New topic
Author

Path setting problem in java task

J J Singh
Greenhorn

Joined: Mar 20, 2010
Posts: 12
Hi i am using the following code



and my javac target is



I get the message that path variable org.compile.classpath is not set when i try to run this. Can you please point out what is the mistake.
Vijitha Kumara
Bartender

Joined: Mar 24, 2008
Posts: 3816

Welcome to CodeRanch

There are many ways to do this, one way would be to refer the path to jar files in classpath of the javac task.

Then use this as a refid to the classpath


SCJP 5 | SCWCD 5
[How to ask questions] [Twitter]
J J Singh
Greenhorn

Joined: Mar 20, 2010
Posts: 12
Thank You , classpath is working now.

I have following problem further.

I am using Ant 1.8.2 and Junit 4.8

My build file is



When i run this from Eclipse it runs fine.

When i try to run it using Ant outside eclipse it gives error as Failed

The targets are clean , init ,compile.org , compile.test , testing.junit

When i run clean , init , compile.org and comiple.test from ant it runs fine. But when i run the testing.junit inside ant it gives error as




My code for Calculator.java and its test class CalculatorTest.java is




CalculatorTest.java





Thanks once again in advance
Mark Kin
Greenhorn

Joined: Jun 20, 2009
Posts: 5
Did you figure this out ? I have the same issue.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Path setting problem in java task
 
Similar Threads
ant exception
Unable to compile java file through ant
add classpath to eclips
Install task cannot find file
Ant Build Failing -- Need a way to pick jar file during run time.