| Author |
Weird installation problem
|
Mike Firkser
Ranch Hand
Joined: Oct 21, 2003
Posts: 243
|
|
I downloaded ant, and I thought I installed it correctly, but when I type in ant at the command line I get: Usage: java [-options] class [args...] (to execute a class) or java -jar [-options] jarfile [args...] (to execute a jar file) Any idea what I did wrong? Thanks in advance.
|
Mike Firkser
Rutgers '84
|
 |
Paul Sturrock
Bartender
Joined: Apr 14, 2004
Posts: 10336
|
|
|
Sounds like ant.bat (or ant depending on OS) is messed up. Its that which runs ant, which is just a Java app. You could have a glance at this and see if you see anything wrong. Of course, presuming you have not edited it and you've installed Ant as directed then there should be no problem.
|
JavaRanch FAQ HowToAskQuestionsOnJavaRanch
|
 |
Mike Firkser
Ranch Hand
Joined: Oct 21, 2003
Posts: 243
|
|
Thanks for the reply. I've done some checking in the ant.bat file (putting in echos and pauses, and it seems my problem line is in the :runAntWithClasspath section:
|
 |
Paul Sturrock
Bartender
Joined: Apr 14, 2004
Posts: 10336
|
|
|
...and you have definately set all the environment variables Ant needs (especially ANT_HOME)?
|
 |
Mike Firkser
Ranch Hand
Joined: Oct 21, 2003
Posts: 243
|
|
I think the problem is with my classpath, and the fact another program (Rationale) has an entry in there from the "Program Files" directory (who was the genius at Microsoft who decided to put spaces into directory names?). If I put those entries into quotes I get a reponse and if I take the quotes out, I get a - I have ant working fine at home (Windows 98), it's here at work (Windows 2000) that is giving me problems.
|
 |
Paul Sturrock
Bartender
Joined: Apr 14, 2004
Posts: 10336
|
|
|
Yeah could be. Try using short directory names (dir /X will tell you what they are).
|
 |
Mike Firkser
Ranch Hand
Joined: Oct 21, 2003
Posts: 243
|
|
I found the problem - when I set the ANT_HOME variable, I had a slash at the end, so it was looking for: C:\ant\apache-ant-1.6.1\\lib\ant-launcher.jar Thanks for all your help Paul. [ June 29, 2004: Message edited by: Mike Rutgers ]
|
 |
 |
|
|
subject: Weird installation problem
|
|
|