wood burning stoves 2.0*
The moose likes Ant, Maven and Other Build Tools and the fly likes Problem in installing Ant Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Problem in installing Ant " Watch "Problem in installing Ant " New topic
Author

Problem in installing Ant

Badri Sarma
Ranch Hand

Joined: Apr 01, 2003
Posts: 72
Hi,
i tried many probabilities but finally i am notable to start ant.
My system is windows 98 and i have written a batch file
sys-set JAVA_HOME=c:\j2sdk14
set ANT_HOME=c:\softwares\ant153
set path=%path%;%JAVA_HOME%\bin;%JAVA_HOME%\lib;%ANT_HOME%\bin;%ANT_HOME%\lib;
set classpath = %classpath%;%ANT_HOME%\lib\ant.jar;
but i am getting the same error
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/tools/ant/Main

Can anybody please help me out
Thanks in advance
badri


Thanks<br />Badri
jyothi sunke
Ranch Hand

Joined: Sep 11, 2002
Posts: 65
Hi,
Looks like everything is correct.. but, are you running batch file before start trying to build ant scripts??
And make sure to have build.xml in the directory in which you are running ant command..try to run some examples..then you will know correctly..
I don't know about OS(How this works for Windows 98) related issues..
Thanks,


jyothi
Greg Charles
Sheriff

Joined: Oct 01, 2001
Posts: 2861
    
  11

That error means that ant.jar is not in the classpath. You seem to be setting up your classpath correctly, but something has gone wrong. It could be you're not running that script, or you're running it in a different shell (command window). It could be you've made a typo specifying the ant home directory. Maybe it's that sys-set command. I've never heard of that one. Maybe it's preventing the rest of the script from executing?
Anyway, the only thing I can say for sure is ant.jar is somehow not in your classpath.
Badri Sarma
Ranch Hand

Joined: Apr 01, 2003
Posts: 72
Thanks for you people, who helped me in this and i was able to resolve the problem
thanks a lot
narasimharao konjeti
Ranch Hand

Joined: Apr 26, 2003
Posts: 130
hi, friend, u installed ant in windows 98, sometimes, the environment variable size of 98 is not sufficient, when ever u r using use 2000,and make sure the ur javahome should be a system environment variable. there is no seperation in system and user evironment variable in 98. ok
try to work with 2000(dont go for me also). use 2000 or nt. if u work on 98 , it may be fine now. u may get problems in future.
bye....c..u..
good luck


"Unwise to sweat petty stuff, wise to pet sweaty stuff."
 
wood burning stoves
 
subject: Problem in installing Ant