ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Conor MacNeill <co...@cortexebusiness.com.au>
Subject Re: java task classpath is not added to java.class.path?
Date Wed, 02 Apr 2003 23:06:01 GMT
On Thu, 3 Apr 2003 02:50 am, Maria Ivanova wrote:
> Hello,
>
> How to add classpath to java.class.path when running a java task (is it
> possible without using <jvmarg value="-classpath" /> <jvmarg
> value="${some.classpath}" />")?  I could not make it using the <classpath>
> element.
>

In general you should not rely on the contents of the java.class.path 
property. It provides the classpath that was in effect when the Virtual 
Machine was started. If your class is loaded through a classloader, the 
property will not reflect the path being used by this classloader.

So, in your case, you see the Ant classpath since you are running in Ant's VM. 
If you want to see the path in java.class.path, you will need your own VM. 
You achieve that by using the fork attribute on the <java> task. 

-- 
Conor MacNeill
Blog: http://codefeed.com/blog/


Mime
View raw message