• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

help me!

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
mister krabs
Posts: 13974
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This has nothing to do with J2EE but rather belongs in the Jakarta forum so I am moving it there.
 
ansen chen
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thank you!I hava known the answer.I forget to add the ant.jar and parser.jar into my classpath.
 
Thomas Paul
mister krabs
Posts: 13974
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
 
Ranch Hand
Posts: 149
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic