Hi!

Did somebody manage to launch ant form the ant.jar with java? I cannot
make it work. I must include all the jars in a certain directory in
the classpath.

Using java 6, I tried:

java -cp "D:\Software\webtest\lib\*" org.apache.tools.ant.Main

and I get:

Exception in thread "main" java.lang.NoClassDefFoundError:
D:\Software\webtest\lib\ant-1/7/0/jar
Caused by: java.lang.ClassNotFoundException:
D:\Software\webtest\lib\ant-1.7.0.jar
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)

So, probably "D:\Software\webtest\lib\*" gets expanded using spaces
between the path items instead of columns (;).


Any ideas?

Thanks!

-- 
MSc Gabriel Petrovay
Mobile: +41(0)787978034
www.28msec.com

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@ant.apache.org
For additional commands, e-mail: user-h...@ant.apache.org

Reply via email to