ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gurdev Parmar" <gpar...@versant.com>
Subject Re: java task
Date Wed, 30 Jan 2002 02:03:16 GMT
Thanks Diane!
The "fork" attribute worked.

The documentation in the ant manual for "fork" is so obscure
I never tried that option. The thought was that what benefit I'll derive
in making the java task run in another VM. I still do not
understand how/why it works now.

-Gurdev

----- Original Message -----
From: "Diane Holt" <holtdl@yahoo.com>
To: "Ant Users List" <ant-user@jakarta.apache.org>
Sent: Tuesday, January 29, 2002 5:28 PM
Subject: Re: java task


> --- Gurdev Parmar <gparmar@versant.com> wrote:
> > Is this how you would translate the below given java command to an
> > equivalent java task?
> >
> > java command:
> > ${JDK_HOME}/bin/java -Dproject.home=${PROJ_HOME} -classpath ${CP}
> > project.Classname -keepgenerated -compiler ${JDK_HOME}/bin/javac
> > -classpath
> > ${OUT_DIR};${CP} ${OUT_DIR}/project.jar ${PROJECT_DIR}
> >
> > <java classname="project.Classname">
> >   <arg line=" -keepgenerated -compiler ${JDK_HOME}/bin/javac -classpath
> > ${OUT_DIR}:${CP} ${OUT_DIR}/project.jar ${PROJECT_DIR}" />
> >   <classpath>
> >     <pathelement path="${CP}"/>
> >   </classpath>
> >   <jvmarg value="-Dproject.home=${PROJ_HOME}"/>
> >  </java>
>
> Close, but not exactly. If your references to things like ${PROJ_HOME},
> etc. are to environment variables, you need to read them in first, and
> they'll be prefixed (with whatever prefix you choose) -- eg:
>   <property environment="env"/>
> will read in your env vars and prefix them with "env." -- then you
> reference them as, eg., ${env.PROJ_HOME}.
>
> Also, in order to use <jvmarg>, you need to specify fork="true" (or "yes"
> or "on"). And you'll need to include the "-classpath ${env.CP}" in the
> <jvmarg> in order for it to be used as the classpath for the forked java
> process.
>
> Diane
>
> =====
> (holtdl@yahoo.com)
>
>
>
> __________________________________________________
> Do You Yahoo!?
> Great stuff seeking new owners in Yahoo! Auctions!
> http://auctions.yahoo.com
>
> --
> To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>
>
>


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


Mime
View raw message