You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by "Karr, David" <Da...@wamu.net> on 2003/03/05 18:34:47 UTC

Figure out why spec. env var gets unset when gets to wrapped ant script

I have a situation with an ant script that is called from a java class
(apparently), which is called from a DOS "cmd" script.  I can tell
exactly what the cmd script is doing, but it executes a jar file with
code that I cannot see, which eventually executes an ant script.  I
don't think it's "execing" ant, but probably calling the
"ant.Main.main()" method directly (because I put print statements in all
the "ant" scripts that I could find.

In the batch file, just before "call"ing java, I print out the value of
a particular environment variable.  It's value is fine.  Inside the ant
script, however, when I reference "${env.<varname>}", it just prints out
that string, which tells me the variable is unset at that point.  At the
same point, I also print out the value of "${env.JAVA_HOME}", and that
value is fine.

Does anyone have any clue what could be going wrong here?

Not that it matters, but these scripts are part of the WebLogic 7.0SP2
distribution.

Although I have JDK 1.4.1 installed on my system, the WebLogic
infrastructure forces its scripts to use its own embedded copy of JDK
1.3.1.

I'm on Windows XPSP1.