ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew n marshall <Andrew.n.marsh...@mail.com>
Subject NetBeans target "run" to .bat file
Date Thu, 27 Mar 2008 23:03:39 GMT
This may be more of a general Java question than a specific Ant 
question, but here it goes....

I have a project that I built with NetBeans.  NetBeans gave me a nice 
ant file that works great.  But I need non-developers who don't have ant 
installed to be able to run it.

When I run "ant -v run", I get this:
(This is going to word wrap horribly. Sorry.)

run:
dropping D:\Projects\SASO\sandbox\saso\tools\JavaTestGUI\${libs.swing-layout.classpath} from
path as it doesn't exist
dropping D:\Projects\SASO\sandbox\saso\tools\JavaTestGUI\${libs.swing-layout.classpath} from
path as it doesn't exist
     [java] Executing 'C:\local\Java\jdk1.5.0_15\jre\bin\java.exe' with arguments:
     [java] '-classpath'
     [java] 'D:\Projects\SASO\sandbox\saso\lib\elutil\je4util.jar;D:\Projects\SASO\sandbox\saso\tools\JavaTestGUI\lib\swing-layout-1.0.jar;D:\Projects\SASO\sandbox\saso\tools\JavaTestGUI\lib\vecmath.jar;D:\Projects\SASO\sandbox\saso\tools\JavaTestGUI\build\classes'
     [java] 'edu.usc.ict.saso.testgui.Main'
     [java]
     [java] The ' characters around the executable and arguments are
     [java] not part of the command.
dropping D:\Projects\SASO\sandbox\saso\tools\JavaTestGUI\${libs.swing-layout.classpath} from
path as it doesn't exist
dropping D:\Projects\SASO\sandbox\saso\tools\JavaTestGUI\${libs.swing-layout.classpath} from
path as it doesn't exist



... and proceeds to run fine.

I copy, pasted, and editted that output down to a .bat file looking like 
this:

C:\local\Java\jdk1.5.0_15\jre\bin\java.exe -classpath "D:\Projects\SASO\sandbox\saso\lib\elutil\je4util.jar;D:\Projects\SASO\sandbox\saso\tools\JavaTestGUI\lib\swing-layout-1.0.jar;D:\Project\SASO\sandbox\saso\tools\JavaTestGUI\lib\vecmath.jar;D:\Projects\SASO\sandbox\saso\tools\JavaTestGUI\build\classes"
edu.usc.ict.saso.testgui.Main

At least on my own machine, it should run exactly like it does in Ant, 
right?

But it doesn't.  It throws a NoClassDefFoundError when it can't find the 
javax/vecmath/Tuple3f inside the vecmath.jar.  Apparently the -classpath 
in the batch file is not getting loaded in the same way it is in the Ant 
run target.

HELP!!  What is my batch file missing to make this run?


Anm

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


Mime
View raw message