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

Implement change in extractFlagsFromVersion

    Details

      Description

      src/main/java/com/oracle/tools/packager/windows/WindowsBundlerParam.java
      211: Pattern versionMatcher = Pattern.compile("java version \"((\\d+.\\d+.\\d+)_(\\d+))(-(.*))?\"");
      src/main/native/tests/DevTest/DevTest/nbproject/build-impl.xml

          public static void extractFlagsFromVersion(Map<String, ? super Object> params, String versionOutput) {
              Pattern bitArchPattern = Pattern.compile("(\\d*)[- ]?[bB]it");
              Matcher matcher = bitArchPattern.matcher(versionOutput);
              if (matcher.find()) {
                  params.put(".runtime.bit-arch", matcher.group(1));
              } else {
                  // presume 32 bit on no match
                  params.put(".runtime.bit-arch", "32");
              }

              Pattern versionMatcher = Pattern.compile("java version \"((\\d+.\\d+.\\d+)_(\\d+))(-(.*))?\"");
              matcher = versionMatcher.matcher(versionOutput);
              if (matcher.find()) {
                  params.put(".runtime.version", matcher.group(1));
                  params.put(".runtime.version.release", matcher.group(2));
                  params.put(".runtime.version.update", matcher.group(3));
                  params.put(".runtime.version.modifiers", matcher.group(5));
              } else {
                  params.put(".runtime.version", "");
                  params.put(".runtime.version.release", "");
                  params.put(".runtime.version.update", "");
                  params.put(".runtime.version.modifiers", "");
              }
          }

        Attachments

          Activity

            People

            • Assignee:
              shemnon Danno Ferrin (Inactive)
              Reporter:
              cbensen Chris Bensen (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Due:
                Created:
                Updated:
                Resolved: