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

[Packager] Unable to start application when user JVM options are provided

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 8u40
    • Fix Version/s: 8u40
    • Component/s: deploy
    • Labels:
    • Environment:

      Windows 7

      Description

      To reproduce:

      Create any bundle using the following properties:

      Map<String, String> userJvmOptions = new HashMap<String, String>();
      userJvmOptions.put("-Xmx", "1024m");
      userJvmOptions .put("-Xms", "1024m");
      params.put(USER_JVM_OPTIONS.getID(), userJvmOptions);

      The bundled application won't start.

      E.g. on Windows using EXE bundler I got the following values in the .cfg file:

      jvmuserarg.1.name=-Xmx
      jvmuserarg.1.value=1024m
      jvmuserarg.2.name=-Xms
      jvmuserarg.2.value=1024m

      When I run the app I got:

      Error occurred during initialization of VM
      Initial heap size set to a larger value than the maximum heap size.


      If I don't specify the Xmx value then the following code
      {{
        RuntimeMXBean bean = ManagementFactory.getRuntimeMXBean();
        List<String> aList = bean.getInputArguments();

        for (String prop : aList) {
          System.out.println(prop);
        }
      }}

      returns:
      -Xmx100m

        Attachments

          Activity

            People

            Assignee:
            shemnon Danno Ferrin (Inactive)
            Reporter:
            dzinkevi Dmitry Zinkevich (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Imported: