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 Re: NetBeans target "run" to .bat file
Date Fri, 28 Mar 2008 21:18:24 GMT

David Brown wrote:
> Hello Andrew, fixing the build.xml would be the better solution in the long-run.
Well, it is an automatically generated and maintained Ant build file 
created by NetBeans.
The Ant build seems to work great, even independent of NetBeans, so I 
don't even know what to "fix".
And I still need to create a batch file that runs without Ant for my 
non-developers.

So, I'm not convinced that is the right approach.
> What interesting output does ant -debug display? And, what is the default target (ant
-p)?
>   
All of the targets are imported from nbproject/build-impl.xml, the 
NetBeans managed file.  The default target is "default", which is 
described as "Build and test whole project".

"ant -debug" spews lots of information.  Nothing looks particularly 
"interesting" in the context of this problem.  Again, the ant build file 
runs fine.


Anm


> Andrew n marshall wrote ..
>   
>> 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
>>     
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>
>   

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


Mime
View raw message