ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Diane Holt <hol...@yahoo.com>
Subject Re: java task
Date Wed, 30 Jan 2002 01:28:34 GMT
--- 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>


Mime
View raw message