You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Diane Holt <ho...@yahoo.com> on 2000/09/20 06:31:36 UTC
Using nested s with task
I need to pass a number of defines to a java command, so do I use <arg> in
the <java> task like this:
<arg value="-Dfoo=bar"/>
<arg value="-Dbaz=boz"/>
...
to get a java command line like:
java -Dfoo=bar -Dbaz=boz COM.foo.bar.Main
Unfortunately, when you run -verbose, the <java> task doesn't show the
actual command line it's sending -- it just says:
[java] Calling COM.foo.bar.Main
I'm getting a null pointer exception, and I'm guessing it might be that
the defines aren't coming down the line right, but I can't really tell
without seeing what the actual command line looks like.
I've tried various variations on using value vs. line, but all to no
avail.
Thanks,
Diane
=====
(holtdl@yahoo.com)
__________________________________________________
Do You Yahoo!?
Send instant messages & get email alerts with Yahoo! Messenger.
http://im.yahoo.com/
Re: Using nested s with task
Posted by Stefan Bodewig <bo...@bost.de>.
>>>>> "DH" == Diane Holt <ho...@yahoo.com> writes:
DH> I need to pass a number of defines to a java command, so do I use
DH> <arg> in the <java> task [...] to get a java command line like:
DH> java -Dfoo=bar -Dbaz=boz COM.foo.bar.Main
The stuff between java and the classname needs to be set using the
jvmargs, that's probably all you need to change.
Nevertheless, we should improve the output of the <java> task with
-verbose.
Stefan