ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Clifton Craig <>
Subject Re: AW: Force PATH env variable - Enabling .DLL loading
Date Mon, 09 Jan 2006 18:50:35 GMT
Maybe try forking the java task and using an <env/> sub-element with it? Using 
the <env/> tag you can set environment variables for the forked process where 
the JRE runs. My other suggestion would be to distribute the DLL with the 
Java library which may or may not make more sense depending on your 
situation. I would think the Java code could be packaged in a jar and 
distributed with the dll such that you could run java in the working folder 
of the jar and the dll will automatically be picked up as long as it's in the 
folder with the jar. This approach is reccomended by an SWT book I've read.
Clifton C. Craig, Software Engineer
Intelligent Computer Systems -  A Division of GBG

On Monday 09 January 2006 4:52 am, wrote:
> >I would like to use ant to launch a java application that
> >loads a black box .dll under Windows.
> >Whatever the reason, the .dll path need to be present in the
> >PATH environment variable.
> >Otherwise, the java app fails to find and load the library.
> e.g. using SWT ...
> >As I need to deploy the app on numerous machines, I'd rather
> >avoid to set the PATH each time.
> >Any idea to set the environment within ant commandline or even
> >better within the ant file before I call the java task?
> try setting the   java.library.path  system property.
> Jan
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message