Meaningless Drivel is fun!*
The moose likes Ant, Maven and Other Build Tools and the fly likes setting ANT class path 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 "setting ANT class path" Watch "setting ANT class path" New topic
Author

setting ANT class path

Arun Srinivasa
Greenhorn

Joined: Jun 01, 2006
Posts: 3
Hi iam running an webservice application, i created an simple application by writing Java class then i created build .xml...

<project name="Calculator Service" default="ear">
<target name="ear">
<servicegen destEar="Calc.ear" contextURI="Calc">
<service
javaClassComponents="Calc.Calculator"
targetNamespace="www.Arun.com"
serviceName="CalculatorService"
serviceURI="/CalculatorService"
generateTypes="True"
expandMethods="True"
style="rpc">
</service>
</servicegen>
</target>
</project>
when i typed ant on command prompt some errors C:\Arun\Arun\java2ws> ommand,

C:\Arun\Arun\java2ws>
C:\Arun\Arun\java2ws>Ant could not find the task or a class this task relies upo
n.
Buildfile: build.xml

BUILD FAILED
Target `could' does not exist in this project.

Total time: 0 seconds
C:\Arun\Arun\java2ws>
C:\Arun\Arun\java2ws>This is common and has a number of causes; the usual
'This' is not recognized as an internal or external command,
operable program or batch file.

C:\Arun\Arun\java2ws>solutions are to read the manual pages then download and
'solutions' is not recognized as an internal or external command,
operable program or batch file.

C:\Arun\Arun\java2ws>install needed JAR files, or fix the build file:
'install' is not recognized as an internal or external command,
operable program or batch file.

C:\Arun\Arun\java2ws> - You have misspelt 'servicegen'.
'-' is not recognized as an internal or external command,
operable program or batch file.

C:\Arun\Arun\java2ws> Fix: check your spelling.
'Fix:' is not recognized as an internal or external command,
operable program or batch file.

C:\Arun\Arun\java2ws> - The task needs an external JAR file to execute
'-' is not recognized as an internal or external command,
operable program or batch file.

C:\Arun\Arun\java2ws> and this is not found at the right place in the classp
ath.
'and' is not recognized as an internal or external command,
operable program or batch file.

C:\Arun\Arun\java2ws> Fix: check the documentation for dependencies.
'Fix:' is not recognized as an internal or external command,
operable program or batch file.

C:\Arun\Arun\java2ws> Fix: declare the task.
'Fix:' is not recognized as an internal or external command,
operable program or batch file.

C:\Arun\Arun\java2ws> - The task is an Ant optional task and the JAR file and/or
libraries
'-' is not recognized as an internal or external command,
operable program or batch file.

C:\Arun\Arun\java2ws> implementing the functionality were not found at the t
ime you
'implementing' is not recognized as an internal or external command,
operable program or batch file.

C:\Arun\Arun\java2ws> yourself built your installation of Ant from the Ant s
ources.
'yourself' is not recognized as an internal or external command,
operable program or batch file.

C:\Arun\Arun\java2ws> Fix: Look in the ANT_HOME/lib for the 'ant-' JAR corresp
onding to the
'Fix:' is not recognized as an internal or external command,
operable program or batch file.

C:\Arun\Arun\java2ws> task and make sure it contains more than merely a META
-INF/MANIFEST.MF.
'task' is not recognized as an internal or external command,
operable program or batch file.

C:\Arun\Arun\java2ws> If all it contains is the manifest, then rebuild Ant w
ith the needed
it was unexpected at this time.

C:\Arun\Arun\java2ws> libraries present in ${ant.home}/lib/optional/ , or al
ternatively,
'libraries' is not recognized as an internal or external command,
operable program or batch file.

C:\Arun\Arun\java2ws> download a pre-built release version from apache.org
'download' is not recognized as an internal or external command,
operable program or batch file.

C:\Arun\Arun\java2ws> - The build file was written for a later version of Ant
'-' is not recognized as an internal or external command,
operable program or batch file.

C:\Arun\Arun\java2ws> Fix: upgrade to at least the latest release version of A
nt
'Fix:' is not recognized as an internal or external command,
operable program or batch file.

C:\Arun\Arun\java2ws> - The task is not an Ant core or optional task
'-' is not recognized as an internal or external command,
operable program or batch file.


but i instaled on the paths in my classpath.

can u help me in this regard

Thanks


Arun Earni
marc weber
Sheriff

Joined: Aug 31, 2004
Posts: 11343

Moving to the forum for Ant, Maven, and other Build Tools.


"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer
sscce.org
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 29253
    
140

Arun,
It's not enough to add the jars to your system classpath. You have to either put them in the ANT_HOME/lib directory or add them to the classpath (command line) when you run Ant.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: setting ANT class path
 
Similar Threads
Help
Environment Problem
Problem with Eclipse and the servicegen task of weblogic
problem in web services
Running code