ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bill Rich" <b...@wilandra.com>
Subject RE: using arguments after the java command
Date Wed, 20 Jul 2005 04:24:26 GMT
No, the difference is between <arg value... and <arg line...

<arg value accepts only a single value whereas <arg line accepts the whole
line

Carefully read the manual and the example.

Bill 

-----Original Message-----
From: James Black [mailto:jblack@ieee.org] 
Sent: Tuesday, July 19, 2005 7:07 PM
To: Ant Users List
Subject: Re: using arguments after the java command

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Bill Rich wrote:
> See if this will help as a model --
> 
> <java classname="com.g11ntoolkit.tokenizer.TokListResourceBundle"
>          fork="true"
>          failonerror="true">
>     <classpath refid="project.class.path"/>
>         <jvmarg line="-Djava.util.logging.config.file=${LOGPROPS}"/>
>         <arg line="/in${PRODUCT}/${file.name.src.@{afile}}"/>
>         <arg line="/inloc${SOURCELOCALE}"/>
>         <arg line="/str${PRODUCTWORKDIR}/${file.name.src.@{afile}}.str"/>
>         <arg line="/context${file.name.src.@{afile}}"/>
>         <arg line="/product${PRODUCT}"/>
>         <arg line="/product-version${PRODUCT-VERSION}"/>
>         </java>
> 
> The <jvmarg> element passes the arg to the JVM while the <arg> element 
> passes the arg to the target class.

Thank you for your response.

This is what I had attempted before, but I get an error that one of the
options is unknown, but, when I run it from the commandline it works fine,
so I just assumed that I am doing something wrong in my ant script.

This is the error I get:
Exception caught: java.lang.IllegalArgumentException: Unknown command line
argument: -o filename.tini

This is also the first argument, so it would appear that something is wrong
with what I am doing.

<target name="maketini">
	<java classname="TINIConvertor"
		fork="true">
        <arg value="-o filename.tini"/>
	 <arg value="-d ${TINI_HOME}\bin\tini.db"/>
	 <arg value="-f bin\com\dtlab\zigbee\TiniSerialIO.class"/>
         <classpath>
           <pathelement location="${COMM_HOME}\comm.jar"/>
           <pathelement location="${TINI_HOME}\bin\tini.jar"/>
           <pathelement path="${java.class.path}"/>
         </classpath>
	</java>
</target>


- --
Corruptisima republica plurimae leges. [The more corrupt a republic, the
more laws.] Tacitus from Annals III, 116AD
Blogs: http://jamesruminations.blogspot.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (MingW32)

iD8DBQFC3bHEJ/zyYkX46joRAhzSAJ4+vxB8rSn4yxT0nca//nIejrsyOQCfYOBL
HHEhSqWwst7LaKRtp06x51Q=
=W9PZ
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
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