aspose file tools*
The moose likes Other Open Source Projects and the fly likes help me! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "help me!" Watch "help me!" New topic
Author

help me!

ansen chen
Greenhorn

Joined: Oct 18, 2001
Posts: 6
Why i enter the "ant" command,it shows the follow message:
D:\bank>ant all
Usage: java [-options] class [args...]
(to execute a class)
or java -jar [-options] jarfile [args...]
(to execute a jar file)
where options include:
-hotspot to select the "hotspot" VM
-server to select the "server" VM
-classic to select the "classic" VM
If present, the option to select the VM must be fi
The default VM is -hotspot.
-cp -classpath <directories and zip/jar files separated by ;>
set search path for application classes and resour
-D<name>=<value>
set a system property
-verbose[:class|gc|jni]
enable verbose output
-version print product version and exit
-showversion print product version and continue
-? -help print this help message
-X print help on non-standard options
Thomas Paul
mister krabs
Ranch Hand

Joined: May 05, 2000
Posts: 13974
This has nothing to do with J2EE but rather belongs in the Jakarta forum so I am moving it there.


Associate Instructor - Hofstra University
Amazon Top 750 reviewer - Blog - Unresolved References - Book Review Blog
ansen chen
Greenhorn

Joined: Oct 18, 2001
Posts: 6
thank you!I hava known the answer.I forget to add the ant.jar and parser.jar into my classpath.
Thomas Paul
mister krabs
Ranch Hand

Joined: May 05, 2000
Posts: 13974
Originally posted by ansen chen:
thank you!I hava known the answer.I forget to add the ant.jar and parser.jar into my classpath.

Are you sure? If ant.jar isn't in the classpath you should get:
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/tools/ant/Main
timothy zimmerman
Ranch Hand

Joined: Jun 26, 2001
Posts: 149
That is odd. I would agree with Thomas that if you did not have ant.jar in your classpath you wold not even get as far as you seem to have gotten.
My first thought was that you had a target whihc was trying to execute the built in java task and not passing it correct arguments but I cannot duplicate that.
My second thought is htat you are tyring to execute the java command using the built in exec task? If this is the case perhaps your problem is there?
If you post the target which is giving you thin problem that may help.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: help me!