I have an ant task that set environment variables by calling the setenv.bat file:
<target name="setEnvWindows" if="isWindows" >
<exec dir="C:\Oracle\Middleware\Oracle_OSB1\tools\configjar" executable="cmd">
<arg value="/c"/>
<arg value="setenv.bat"/>
</exec>
<echo message="SetEnvWindows"/>
</target>
Next I have another task that uses these variables:
<property environment="env"/>
<echo message="${env.OSB_HOME}"/>
However the variable set in the first target : OSB_HOME is not visible for the remaining targets. It becomes visible only after restarting eclipse.
How can I define the environment variable such that they are visible for subsequent targets without restarting eclipse?