-
Enhancement
-
Resolution: Fixed
-
P4
-
8
-
b08
-
generic
-
generic
-
Verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2223530 | 8 | Anthony Petrov | P4 | Resolved | Fixed | b38 |
On the Mac the following environment variables can be set by the launcher code:
JAVA_MAIN_CLASS_<pid> - a string containing the class name which main() methods is called.
JAVA_STARTED_ON_FIRST_THREAD_<pid> - set when the -XstartOnFirstThread is specified on the command line.
APP_ICON_<pid>, APP_NAME_<pid> - set when the corresponding -Xdock:icon or name are specified on the command line.
These variables were first introduced in Apple JDK. Oracle JDK for the Mac continues to use them. The variables are used from libosxapp dynamic library to initialize an instance of the NSApplicationAWT class properly.
While the APP_* and JAVA_STARTED_* are conditional, the JAVA_MAIN_CLASS is set unconditionally. This may cause problems with tests or applications that start another process from the currently running Java app, and want to be able to specify an empty or custom environment for the newly started app.
JAVA_MAIN_CLASS_<pid> - a string containing the class name which main() methods is called.
JAVA_STARTED_ON_FIRST_THREAD_<pid> - set when the -XstartOnFirstThread is specified on the command line.
APP_ICON_<pid>, APP_NAME_<pid> - set when the corresponding -Xdock:icon or name are specified on the command line.
These variables were first introduced in Apple JDK. Oracle JDK for the Mac continues to use them. The variables are used from libosxapp dynamic library to initialize an instance of the NSApplicationAWT class properly.
While the APP_* and JAVA_STARTED_* are conditional, the JAVA_MAIN_CLASS is set unconditionally. This may cause problems with tests or applications that start another process from the currently running Java app, and want to be able to specify an empty or custom environment for the newly started app.
- backported by
-
JDK-2223530 [macosx] Consider using system properties to pass arguments from the launcher to AWT/SplashScreen
-
- Resolved
-
- relates to
-
JDK-8274397 [macOS] Stop setting env. var JAVA_MAIN_CLASS_<pid> in launcher code
-
- Resolved
-