java.lang.ClassNotFoundException: org.apache.tools.ant.Main
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:244)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
Take a look at the ANT_HOME/lib folder - and ensure that the ant.jar is in there and showing a size of 1MB or higher.
It is usually due to a corrupted version of ant.jar in the above path.
Very helpful! Thanks!
ReplyDeleteI had the same issue.
ReplyDeleteant was in my PATH
but ANT_HOME was not set
Yes Richard - that too. Thanks.
ReplyDeletewhere can i find ant_home
ReplyDeleteyes i find it , it showing a size1.22 mb but i still have the problem :s
ReplyDeleteI have the ant.jar in the mentioned path, it showing a size of 1.49 mb but i still have the same problem.
ReplyDeleteIt is because ant-launcher.jar is not there in classpath
ReplyDeleteyes, it solved my problem.
DeleteGreat. Thanks.
DeleteVery succinct and good answer
ReplyDelete