Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-7131021

[macosx] Consider using system properties to pass arguments from the launcher to AWT/SplashScreen

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      b08
    • CPU:
      generic
    • OS:
      generic
    • Verification:
      Verified

      Backports

        Description

        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.

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                anthony Anthony Petrov (Inactive)
                Reporter:
                anthony Anthony Petrov (Inactive)
                Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: