ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dominique Devienne <>
Subject RE: Setting environment for forked java process on Win XP
Date Tue, 03 Dec 2002 15:41:04 GMT
We have discovered recently that the case of PATH matters quite a bit on our
Win2K machines. We believe PATH should be defined with the same case in the
environment and in Ant. Do a 'set' in DOS window, and look at the case of
PATH there. Use the same case in Ant.

Once we all had the path defined as 'Path' everywhere (Ant, System, etc...)
things started working just fine.

Also, don't know if it's related, but I'm not sure <env path=""/> supports
the : unix path separator on Windows. Try with ; instead.


-----Original Message-----
From: Michael Kuß [] 
Sent: Tuesday, December 03, 2002 5:08 AM
Subject: Setting environment for forked java process on Win XP


I try to start a java task from ant 1.5.1 on Windows XP.

<java classname="" fork="yes">

The Problem is that I need a dll (DLL1) to call some JNI stuff.
This dll needs another dll (DLL2) not located in the PATH environment.
I have tried to modify the PATH for my java task with

<env key="PATH" path="${java.library.path}:${rundir}/Client/lib" />

The DLL2 is located in the ${rundir}/Client/lib directory.
I'm also setting

<sysproperty key="java.library.path"

If I start the java process the DLL2 will not be found in the PATH
environment. DLL1 is found in the java.library.path. It seems
that the PATH environment is not properly set. ant -v shows
that the PATH environment is set.

I have also tried to use "newenvironment=true" in my java task. That
leaves my program fully useless to network calls. I can't find my
host anymore (gethostbyname() failed:

Can anyone help me out of this?
How do I set the PATH environment properly and/or how do I get
a working environment with newenvironment=true?

Thanx in advance,

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

View raw message