ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Raja Nagendra Kumar <nagendra.r...@tejasoft.com>
Subject Ant Command Line args to be passed to all the Java Tasks
Date Tue, 26 Mar 2013 05:41:35 GMT
Hi,

I would like to invoke java applications using the ant task , however all
the -D options used to invoke ant should be available to <java task invoked
application

e.g

if I say

ant -Dprop=d2 -Dhost=ab.com etc.. 

then the respective java invoked application should be able to know the
value of system properties prop and host.

My java taks has option of fork=true. I tried with option clonevm=true but
jdk gives an error 

run.retry:
     [java] Error occurred during initialization of VM
     [java] java.lang.ExceptionInInitializerError
     [java]     at java.lang.Runtime.loadLibrary0(Runtime.java:841)
     [java]     at java.lang.System.loadLibrary(System.java:1084)
     [java]     at java.lang.System.initializeSystemClass(System.java:1145)
     [java] Caused by: java.lang.StringIndexOutOfBoundsException: String
index o
ut of range: 0
     [java]     at java.lang.String.charAt(String.java:658)
     [java]     at
java.io.Win32FileSystem.&lt;init>(Win32FileSystem.java:40)
     [java]     at java.io.WinNTFileSystem.<init>(WinNTFileSystem.java:37)
     [java]     at java.io.FileSystem.getFileSystem(Native Method)
     [java]     at java.io.File.<clinit>(File.java:156)
     [java]     at java.lang.Runtime.loadLibrary0(Runtime.java:841)
     [java]     at java.lang.System.loadLibrary(System.java:1084)
     [java]     at java.lang.System.initializeSystemClass(System.java:1145)

Are there any better ways to read system properties used in innovacation of
ant avaiable to all the java tasks.

Regards
Nagendra



--
View this message in context: http://ant.1045680.n5.nabble.com/Ant-Command-Line-args-to-be-passed-to-all-the-Java-Tasks-tp5713977.html
Sent from the Ant - Users mailing list archive at Nabble.com.

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


Mime
View raw message