You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Atul Tiwary <at...@cedera.com> on 2001/05/15 01:10:12 UTC
using the -D option with the java task
While using the java task. I would like to be able to pass some properties
values using the -D option. Here is an excerpt from my build.xml file.
<target name="datarow">
<java classname="com.cedera.util.datatransfer.DataLoadReportRow">
<jvmarg
value="-Ddatadirectory=${src.data},-Ddatasource=${connection},-Dlogdirectory
=${src.log}"/>
</java>
</target>
The problem is that when I execute this I get null values for all these
properties.
Any ideas on how I can correctly use the -D option.
Thanks,
Atul
Re: using the -D option with the java task
Posted by Conor MacNeill <co...@cortexebusiness.com.au>.
Atul,
They should be "pumped" back into Ant and displayed as your task executes.
Is the java command you are executing interactive (i.e. is it expecting
input)?
Conor
----- Original Message -----
From: "Atul Tiwary" <at...@cedera.com>
To: <an...@jakarta.apache.org>
Sent: Tuesday, May 15, 2001 9:36 AM
Subject: RE: using the -D option with the java task
> I tried fork. Now I cant see any of my system.out.println messages.
> Why is that? Where are these redirected?
>
> -----Original Message-----
> From: Conor MacNeill [mailto:conor@cortexebusiness.com.au]
> Sent: Monday, May 14, 2001 4:30 PM
> To: ant-user@jakarta.apache.org
> Subject: RE: using the -D option with the java task
>
>
> Did you get this message in your output?
>
> JVM args ignored when same JVM is used.
>
> Try adding fork="yes" which will create a new VM to which the args can
> apply.
>
> Conor
>
>
> > -----Original Message-----
> > From: Atul Tiwary [mailto:atul@cedera.com]
> > Sent: Tuesday, 15 May 2001 9:10 AM
> > To: ant-user@jakarta.apache.org
> > Subject: using the -D option with the java task
> >
> >
> > While using the java task. I would like to be able to pass some
properties
> > values using the -D option. Here is an excerpt from my build.xml file.
> >
> > <target name="datarow">
> > <java classname="com.cedera.util.datatransfer.DataLoadReportRow">
> > <jvmarg
> > value="-Ddatadirectory=${src.data},-Ddatasource=${connection},-Dlo
> > gdirectory
> > =${src.log}"/>
> > </java>
> > </target>
> >
> > The problem is that when I execute this I get null values for all these
> > properties.
> > Any ideas on how I can correctly use the -D option.
> >
> > Thanks,
> > Atul
> >
> >
>
>
RE: using the -D option with the java task
Posted by Atul Tiwary <at...@cedera.com>.
I tried fork. Now I cant see any of my system.out.println messages.
Why is that? Where are these redirected?
-----Original Message-----
From: Conor MacNeill [mailto:conor@cortexebusiness.com.au]
Sent: Monday, May 14, 2001 4:30 PM
To: ant-user@jakarta.apache.org
Subject: RE: using the -D option with the java task
Did you get this message in your output?
JVM args ignored when same JVM is used.
Try adding fork="yes" which will create a new VM to which the args can
apply.
Conor
> -----Original Message-----
> From: Atul Tiwary [mailto:atul@cedera.com]
> Sent: Tuesday, 15 May 2001 9:10 AM
> To: ant-user@jakarta.apache.org
> Subject: using the -D option with the java task
>
>
> While using the java task. I would like to be able to pass some properties
> values using the -D option. Here is an excerpt from my build.xml file.
>
> <target name="datarow">
> <java classname="com.cedera.util.datatransfer.DataLoadReportRow">
> <jvmarg
> value="-Ddatadirectory=${src.data},-Ddatasource=${connection},-Dlo
> gdirectory
> =${src.log}"/>
> </java>
> </target>
>
> The problem is that when I execute this I get null values for all these
> properties.
> Any ideas on how I can correctly use the -D option.
>
> Thanks,
> Atul
>
>
RE: using the -D option with the java task
Posted by Conor MacNeill <co...@cortexebusiness.com.au>.
Did you get this message in your output?
JVM args ignored when same JVM is used.
Try adding fork="yes" which will create a new VM to which the args can
apply.
Conor
> -----Original Message-----
> From: Atul Tiwary [mailto:atul@cedera.com]
> Sent: Tuesday, 15 May 2001 9:10 AM
> To: ant-user@jakarta.apache.org
> Subject: using the -D option with the java task
>
>
> While using the java task. I would like to be able to pass some properties
> values using the -D option. Here is an excerpt from my build.xml file.
>
> <target name="datarow">
> <java classname="com.cedera.util.datatransfer.DataLoadReportRow">
> <jvmarg
> value="-Ddatadirectory=${src.data},-Ddatasource=${connection},-Dlo
> gdirectory
> =${src.log}"/>
> </java>
> </target>
>
> The problem is that when I execute this I get null values for all these
> properties.
> Any ideas on how I can correctly use the -D option.
>
> Thanks,
> Atul
>
>