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

JNLP Bundler Needs to Handle New Module Arguments

XMLWordPrintable

      After some investigation the option is -detectmodules not -detectmodules=true or -Bdetectmodules=true. So this bug is to add better error handling to arguments.

      JNLP Bundler fails with the argument:

      -Bdetectmodules=true

      Failing in DeployParams.public.getBundleParams()

      Line 742:

              // check for collisions
              TreeSet<String> keys = new TreeSet<>(bundlerArguments.keySet());
              keys.retainAll(bundleParams.getBundleParamsAsMap().keySet());

              if (!keys.isEmpty()) {
                  throw new RuntimeException("Deploy Params and Bundler Arguments overlap in the following values:" + keys.toString());
              }

      Exception in thread "main" com.sun.javafx.tools.packager.PackagerException: Error: deploy failed
      at com.sun.javafx.tools.packager.PackagerLib.generateDeploymentPackages(jdk.packager/PackagerLib.java:341)
      at com.sun.javafx.tools.packager.Main.main(jdk.packager/Main.java:502)
      Caused by: java.lang.RuntimeException: Deploy Params and Bundler Arguments overlap in the following values:[detectmodules]
      at com.sun.javafx.tools.packager.DeployParams.getBundleParams(jdk.packager/DeployParams.java:742)
      at com.sun.javafx.tools.packager.PackagerLib.generateDeploymentPackages(jdk.packager/PackagerLib.java:315)
      ... 1 more

      Something in this change is causing problems, or how I’m calling it:

                              } else if (arg.equals("-addmodule")) {
                                  deployParams.addModules.add(nextArg(args, i++));
                              } else if (arg.equals("-limitmodule")) {
                                  deployParams.limitModules.add(nextArg(args, i++));
                              } else if (arg.equals("-detectmodules")) {
                                  deployParams.detectModules = true;
                              } else if (arg.equals("-linkmodulepath")) {
                                  if (deployParams.linkModulePath == null) {
                                      deployParams.linkModulePath = nextArg(args, i++);
                                  } else {
                                      deployParams.linkModulePath =
                                              deployParams.linkModulePath
                                              + File.pathSeparator
                                              + nextArg(args, i++);
                                  }
                              } else if (arg.equals("-appmodulepath")) {
                                  if (deployParams.appModulePath == null) {
                                      deployParams.appModulePath = nextArg(args, i++);
                                  } else {
                                      deployParams.appModulePath =
                                              deployParams.appModulePath
                                              + File.pathSeparator
                                              + nextArg(args, i++);
                                  }

            cbensen Chris Bensen (Inactive)
            cbensen Chris Bensen (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: