ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gabriel Petrovay <gabipetro...@gmail.com>
Subject Run ant with java from Powershell
Date Wed, 09 Feb 2011 12:06:43 GMT
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-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message