• Post Reply Bookmark Topic Watch Topic
  • New Topic

Ant  RSS feed

 
Simon Xu
Ranch Hand
Posts: 235
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi, I download Jakarta-ant from jakarta-ant-1.3-bin.tar.gz and set the ANT_HOME and path. When I type ant, it gives me the following error:
C:\jakarta-ant\bin>ant
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/tools/ant/Main
What is wrong? Thanks
 
aanchal mathur
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1). If you are using Windows OS then right click the MYComputer icon.
2). Go To its Properties and there set the environment vars.
3).In the System vars add a new var called ANT_HOME=c:\ant (assuming that your ant folder name is ant).
4).It is advisable to change the name of your dir to a smaller length like c:\ant ,rather than c:\jakarta-ant-1.3.
5).Also after setting the ANT_HOME var,next set the path of you system to contain its bin dir. i.e
set path=%path%;%ANT_HOME%\bin;c:\(your jdk (c:\jdk\bin) path).
6).Lastly set JAVA_HOME=c:\jdk (wherever your jdk folder exists)
Thats about it.After carefully setting all the vars test to check if everything is fine,by running ant on the command prompt.
If it gives you a Build failed message you ant is working fine.
Else again check your path and try again.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!