I have a simple sample to get started with
Ant such as show a Hello frame.
My project structure is:
And ant.xml file like that:
It ran OK until target "run" when this error is thrown out:
Buildfile: D:\workspaces\Java_app\antSample\ant.xml
run:
[
java] java.lang.NoClassDefFoundError: app/main/Main
[java] Caused by: java.lang.ClassNotFoundException: app.main.Main
[java] at java.net.URLClassLoader$1.run(Unknown Source)
[java] at java.security.AccessController.doPrivileged(Native Method)
[java] at java.net.URLClassLoader.findClass(Unknown Source)
[java] at java.lang.ClassLoader.loadClass(Unknown Source)
[java] at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
[java] at java.lang.ClassLoader.loadClass(Unknown Source)
[java] at java.lang.ClassLoader.loadClassInternal(Unknown Source)
[java] Could not find the main class: app.main.Main. Program will exit.
[java] Exception in
thread "main"
[java] Java Result: 1
BUILD SUCCESSFUL
Total time: 352 milliseconds
I have try to modify Ant Runtime as some intructions found on internet
Window > References > Ant > Runtime > Point to Ant Home to /eclipse_home/plugins/org.apache.antXXXX
Add tool.jar from JDK
But it's still getting stack.
Thanks for anysuggestion :-)