PRB: Environment Variables Are Lost When Running from VJ6 IDE (215413)
The information in this article applies to:
This article was previously published under Q215413 SYMPTOMS
When you run a Java application within the Visual J++ 6.0 integrated development environment (IDE), none of the environment variables are set. However, when you run the application from the command line using jview or wjview, variables are set as expected. Note that this also includes the CLASSPATH environment variable.
CAUSE
When you run an application within the Visual J++ 6.0 IDE, the application's environment is not inherited from the parent process and variables are empty. However, when you run it outside the Visual J++ 6.0 IDE (from the command line or otherwise), the application's environment is inherited from the parent process and environment variables have the values of the parent.
RESOLUTION
You need to programmatically set environment variables when you run the application within the Visual J++ 6.0 IDE. To work around this problem, you can start the application outside the Visual J++ 6.0 IDE (using jview) and attach to the process for debugging with access to the environment variables (please see the comments in the sample code below).
STATUS
This behavior is by design.
REFERENCES
For support information about Visual J++ and the SDK for Java, visit the following Microsoft Web site:
Modification Type: | Major | Last Reviewed: | 6/14/2006 |
---|
Keywords: | kbide kbprb KB215413 |
---|
|