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

Support command line arguments to the JVM passed to self-contained app launchers

    Details

    • Type: Enhancement
    • Status: Closed
    • Priority: P4
    • Resolution: Duplicate
    • Affects Version/s: 8u45
    • Fix Version/s: tbd_minor
    • Component/s: deploy
    • Labels:
    • Subcomponent:
    • CPU:
      x86
    • OS:
      os_x

      Description

      A DESCRIPTION OF THE REQUEST :
      Since 8u40, self-contained applications pass command line arguments to the Java runtime. This is great. However, there is no way to configure the behavior of the JVM itself via the command line, when invoking the application through the native launcher.

      It seems the only way to control the JVM environment (max heap size, -verbose mode, remote debugging, etc.) is to use the UserJvmOptionsService, then restart the application. It would be more convenient if JVM flags could somehow be passed to the native launcher itself on the CLI.

      JUSTIFICATION :
      Without this feature, there is no way to pass arguments to the JVM "on the fly" without launching the application twice.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      One way to avoid ambiguity between JVM arguments and application-side arguments would be to use the classic "--" Unix-style divider. So e.g.:

          MyImageViewer -Xmx512m -verbose -- myFile.png

      Could pass "-Xmx512m -verbose" to the JVM, and "myFile.png" to the application.

      But this RFE is less concerned with the exact syntax, and more with making it possible whatsoever to configure the JVM on the CLI.

      ACTUAL -
      The actual behavior currently is that all arguments are simply passed through to the Java application.

      ---------- BEGIN SOURCE ----------
      You can reproduce by deploying the JavaFX Hello World example as a self-contained application as described at:

      https://docs.oracle.com/javase/8/docs/technotes/guides/deploy/javafx_ant_tasks.html#CHDBGIJG

      Then try passing a JVM argument to the native application launcher.
      ---------- END SOURCE ----------

      CUSTOMER SUBMITTED WORKAROUND :
      I discuss some possible workarounds on a StackOverflow post I made about this topic:

          http://stackoverflow.com/q/30809330/1207769

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                cbensen Chris Bensen (Inactive)
                Reporter:
                webbuggrp Webbug Group
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: