> >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.
There are 2 ways to find .dll a Java app needs. java.library.path is a Java-only way to tell the VM where to look for native libraries (.dll, .so). It allows to find the libraries loaded using java.lang.System.loadLibrary("foo"); The VM will look for foo.dll using the path from java.library.path, and if not found using the Path environment variable. If a .dll depends on another .dll, then it must be found in the system-specific, on Windows the Path (on *nix, LD_LIBRARY_PATH usually). To set the Path using <java>, you must add fork="true" and an <env> nested element. The advantage of java.library.path is that it's cross-platform, and doesn't require to fork (I think, I usually fork anyway). I hope this helps. --DD --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]