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
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,
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.
Joined: Apr 01, 2003
Thanks for you people, who helped me in this and i was able to resolve the problem thanks a lot
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."