Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Problem with Environment Variables in Runtime.exec

843798Apr 10 2003 — edited Apr 29 2003
APi says that if you pass null as the environ variable in the exec {exec (command, null, null) } the process inherits the property from the current java process. This doesnt work for me in java version 1.4.0_01 atleast. Me thinks its a bug in the version i have.

I set the property as sysproperty in Ant. I can see the property in the java program (using System.getProperty), but cant see it in the executed shell script (the script just does an echo of the property).

Can send in the files if so desired.

tx
Z
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 27 2003
Added on Apr 10 2003
4 comments
380 views