• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

making ant run using command line

 
Samanthi perera
Ranch Hand
Posts: 510
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How to enable ant to run using command line?
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Type "ant"?

There's nothing special, just make sure the ant executable is on your path.
 
Samanthi perera
Ranch Hand
Posts: 510
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I used http://code.google.com/webtoolkit/gettingstarted.html tutorial to run GWT.
I have finished till running the ant devmode command.When i run ant devmode it says


what should i do?IS there any jar files added to classpath?
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
David Newton wrote:[...] make sure the ant executable is on your path.
 
Samanthi perera
Ranch Hand
Posts: 510
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How to added ant executable is on path ?
Can you give me a example or tutorials?
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You don't know how to make your own command line work?! I don't even know what OS you're using.
 
Samanthi perera
Ranch Hand
Posts: 510
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using Windows Xp now.When a type ant devmode it says
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So take the few minutes necessary to find out how to add a directory to your path.

It's on the web.
 
Samanthi perera
Ranch Hand
Posts: 510
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have already added ant jar file to to class path
D:\AllJarFiles\antlr-2.7.7.jar
 
Samanthi perera
Ranch Hand
Posts: 510
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I also added path variable to D:\AllJarFiles;
Still not working ?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64715
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
He didn't say classpath.
 
Samanthi perera
Ranch Hand
Posts: 510
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
please tell me what to do?
 
Samanthi perera
Ranch Hand
Posts: 510
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hay this is not a joke.I need to know urgently,if anyone can tellme i am very gratfull?
 
Jaikiran Pai
Marshal
Pie
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Samanthi perera wrote:Hay this is not a joke.I need to know urgently,if anyone can tellme i am very gratfull?


No one is joking. And this is not the right place to ask "Urgent" questions. Everyone here is a volunteer.

By the way, did you even try "set PATH in Windows" in google search?
 
Jaikiran Pai
Marshal
Pie
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jaikiran Pai wrote:

By the way, did you even try "set PATH in Windows" in google search?


Or for that matter, did you even do a google search for the error message you are getting?
 
Samanthi perera
Ranch Hand
Posts: 510
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I found one answer
Put an enviornment variable ANT_HOME pointing to your ant folder..
and also append the bin folder of ant to the PATH variable....

But what is anb folder.I only have antlr-2.7.7.jar file.
 
Jaikiran Pai
Marshal
Pie
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Samanthi perera wrote:But what is anb folder.I only have antlr-2.7.7.jar file.

...
Samanthi perera wrote:I used http://code.google.com/webtoolkit/gettingstarted.html tutorial to run GWT.


So what does it say in the "Prerequisites" section?
 
Samanthi perera
Ranch Hand
Posts: 510
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I added ANT_HOME as D:\software\ant\apache-ivy-2.1.0.

Here is the screen shot of my ant directory

http://4.bp.blogspot.com/_bpkZ2BsqXug/S1QqhlQjlhI/AAAAAAAAAA0/OPN2KT55zKE/s1600-h/ant.bmp

anyway there is no nay folder named bin.

still not working
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18098
50
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
OK children, playtime's over. We don't want to forget we have a "Be Nice" policy here.

Samanthi, in their own not-so-subtle way, people are saying that we're here to help thinking people, but we're not here to do people's thinking for them. After all, we don't get paid to do this, and some people would be so cynical as to say that when you come in asking such basic questions are these that maybe you're not really well-enough trained to be doing this kind of work. It's unfortunate, but there's a perception that any child can develop professional-grade software, and so some companies figure that they can just hire the cheapest person that comes along regardles of skills or talent. We know better and it causes resentment.

However, we've had our fun, so here's the basics.

Java command-line apps work based on 2 resources. The PATH, which is what the Windows OS uses to locate and execute programs, and the CLASSPATH, which is what the Java Virtual Machine uses to find Java classes and class resources. To run Ant from the command line, you need both.

That usually involves commands that look something like this:



You can set the ANT_HOME and PATH environment settings permanently using the Windows Control Panel. And, no, I'm not supplying further help. The rest is up to you.
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Samanthi perera wrote:Here is the screen shot of my ant directory

In the future please cut-and-paste directory trees rather than a screenshot--the linked screenshot is impossible to read.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic