changeset 9415:a6d77b1a56fd jdk-9+95

Merge
author kcr
date Fri, 27 Nov 2015 09:44:18 -0800
parents 66c8988e78d7 12923cdabc6a
children 857e98a32911
files .hgtags build.gradle
diffstat 8 files changed, 270 insertions(+), 137 deletions(-) [+]
line wrap: on
line diff
--- a/build.gradle	Thu Nov 26 04:52:06 2015 -0800
+++ b/build.gradle	Fri Nov 27 09:44:18 2015 -0800
@@ -410,7 +410,7 @@
 // The following properties should be left alone by developers and set only from Hudson.
 defineProperty("HUDSON_JOB_NAME", "not_hudson")
 defineProperty("HUDSON_BUILD_NUMBER","0000")
-defineProperty("PROMOTED_BUILD_NUMBER", "00")
+defineProperty("PROMOTED_BUILD_NUMBER", "0")
 
 // The following properties define the product name for Oracle JDK and OpenJDK
 // for VersionInfo and the DLL manifest.
@@ -425,12 +425,37 @@
 }
 
 // The following properties are set based on properties defined in
-// build.properties. The release number or milestone number should be updated
+// build.properties. The release version and suffix should be updated
 // in that file.
-def jfxReleaseVersion = "${jfxReleaseMajorVersion}.${jfxReleaseMinorVersion}.${jfxReleaseMicroVersion}"
-defineProperty("RAW_VERSION", jfxReleaseVersion)
-defineProperty("RELEASE_NAME", jfxReleaseName)
-defineProperty("RELEASE_MILESTONE", jfxReleaseMilestone)
+def relVer = 0
+if (jfxReleasePatchVersion == "0") {
+    if (jfxReleaseSecurityVersion == "0") {
+        if (jfxReleaseMinorVersion == "0") {
+            relVer = "${jfxReleaseMajorVersion}"
+        } else {
+            relVer = "${jfxReleaseMajorVersion}.${jfxReleaseMinorVersion}"
+        }
+    } else {
+        relVer = "${jfxReleaseMajorVersion}.${jfxReleaseMinorVersion}.${jfxReleaseSecurityVersion}"
+    }
+} else {
+    relVer = "${jfxReleaseMajorVersion}.${jfxReleaseMinorVersion}.${jfxReleaseSecurityVersion}.${jfxReleasePatchVersion}"
+}
+defineProperty("RELEASE_VERSION", relVer)
+def buildDate = new java.util.Date()
+def buildTimestamp = new java.text.SimpleDateFormat("yyyy-MM-dd-HHmmss").format(buildDate)
+defineProperty("BUILD_TIMESTAMP", buildTimestamp)
+def relSuffix = ""
+def relOpt = ""
+if (HUDSON_JOB_NAME == "not_hudson") {
+    relSuffix = "-internal"
+    relOpt = "-${buildTimestamp}"
+} else {
+    relSuffix = jfxReleaseSuffix
+}
+defineProperty("RELEASE_SUFFIX", relSuffix)
+defineProperty("RELEASE_VERSION_SHORT", "${RELEASE_VERSION}${RELEASE_SUFFIX}")
+defineProperty("RELEASE_VERSION_LONG", "${RELEASE_VERSION_SHORT}+${PROMOTED_BUILD_NUMBER}${relOpt}")
 
 // Check whether the COMPILE_TARGETS property has been specified (if so, it was done by
 // the user and not by this script). If it has not been defined then default
@@ -818,9 +843,10 @@
 logger.quiet("HUDSON_BUILD_NUMBER: $HUDSON_BUILD_NUMBER")
 logger.quiet("PROMOTED_BUILD_NUMBER: $PROMOTED_BUILD_NUMBER")
 logger.quiet("PRODUCT_NAME: $PRODUCT_NAME")
-logger.quiet("RAW_VERSION: $RAW_VERSION")
-logger.quiet("RELEASE_NAME: $RELEASE_NAME")
-logger.quiet("RELEASE_MILESTONE: $RELEASE_MILESTONE")
+logger.quiet("RELEASE_VERSION: $RELEASE_VERSION")
+logger.quiet("RELEASE_SUFFIX: $RELEASE_SUFFIX")
+logger.quiet("RELEASE_VERSION_SHORT: $RELEASE_VERSION_SHORT")
+logger.quiet("RELEASE_VERSION_LONG: $RELEASE_VERSION_LONG")
 
 if (UPDATE_STUB_CACHE) {
     logger.quiet("UPDATE_STUB_CACHE: $UPDATE_STUB_CACHE")
@@ -1210,7 +1236,7 @@
         enabled = IS_BUILD_JAVADOC
         exclude("com/**/*", "Compile*", "javafx/builder/**/*", "javafx/scene/accessibility/**/*");
         executable = JAVADOC;
-        options.windowTitle("JavaFX Project ${project.name} ${RELEASE_NAME}")
+        options.windowTitle("JavaFX Project ${project.name} ${RELEASE_VERSION}")
         if (BUILD_CLOSED) {
             options.linksOffline(JDK_DOCS, JDK_DOCS_CLOSED);
         } else {
@@ -1242,14 +1268,13 @@
     // We need to take the VersionInfo.java file and replace the various
     // properties within it
     def replacements = [
-        "BUILD_TIMESTAMP": new java.util.Date(),
+        "BUILD_TIMESTAMP": BUILD_TIMESTAMP,
         "HUDSON_JOB_NAME": HUDSON_JOB_NAME,
         "HUDSON_BUILD_NUMBER": HUDSON_BUILD_NUMBER,
         "PROMOTED_BUILD_NUMBER": PROMOTED_BUILD_NUMBER,
         "PRODUCT_NAME": PRODUCT_NAME,
-        "RAW_VERSION": RAW_VERSION,
-        "RELEASE_NAME": RELEASE_NAME,
-        "RELEASE_MILESTONE": RELEASE_MILESTONE];
+        "RELEASE_VERSION": RELEASE_VERSION,
+        "RELEASE_SUFFIX": RELEASE_SUFFIX];
     task processVersionInfo(type: Copy, description: "Replace params in VersionInfo and copy file to destination") {
         doFirst { mkdir "$buildDir/generated-src/version-info" }
         from "src/main/version-info"
@@ -1963,8 +1988,9 @@
                     mkdir "$buildDir/native/javapackager"
                     from file("src/main/native/javapackager/win/javapackager.manifest")
                     into file("$buildDir/native/javapackager")
+                    // FIXME: the following is wrong and needs to be fixed
                     filter { line->
-                        line = line.replace("FXVERSION", "${RAW_VERSION}.${HUDSON_BUILD_NUMBER}");
+                        line = line.replace("FXVERSION", "${RELEASE_VERSION}.${HUDSON_BUILD_NUMBER}");
                     }
                 }
             }
@@ -3113,9 +3139,11 @@
             // Create the javafx.properties file
             final File javafxProperties = file("build/${sdkDirName}/rt/lib/javafx.properties")
             javafxProperties.delete()
-            javafxProperties << "javafx.runtime.version=$RAW_VERSION";
+            javafxProperties << "javafx.version=$RELEASE_VERSION_SHORT";
             javafxProperties << "\n"
-            javafxProperties << "javafx.runtime.build=b$PROMOTED_BUILD_NUMBER";
+            javafxProperties << "javafx.runtime.version=$RELEASE_VERSION_LONG";
+            javafxProperties << "\n"
+            javafxProperties << "javafx.runtime.build=$PROMOTED_BUILD_NUMBER";
             javafxProperties << "\n"
             // Include any properties that have been defined (most likely in
             // one of the various platform gradle files)
--- a/build.properties	Thu Nov 26 04:52:06 2015 -0800
+++ b/build.properties	Fri Nov 27 09:44:18 2015 -0800
@@ -29,14 +29,18 @@
 #
 ##############################################################################
 
-# Note: The expected value for milestone are [alpha, beta, dev, ea, fcs]
-jfx.release.milestone=ea
+# UPDATE THE FOLLOWING VALUES FOR A NEW RELEASE OR MILESTONE
+# Note: The expected value for suffix is one of [-alpha, -beta, -ea] 
 # Note: For fcs builds the suffix should be blank
 jfx.release.suffix=-ea
-jfx.release.name=9
 jfx.release.major.version=9
 jfx.release.minor.version=0
-jfx.release.micro.version=0
+jfx.release.security.version=0
+jfx.release.patch.version=0
+
+# Note: The release version is now calculated in build.gradle as the
+# dot-separated concatenation of the previous four fields with trailing zero
+# fields removed
 
 ##############################################################################
 #
--- a/buildSrc/win.gradle	Thu Nov 26 04:52:06 2015 -0800
+++ b/buildSrc/win.gradle	Fri Nov 27 09:44:18 2015 -0800
@@ -152,35 +152,24 @@
 if (!file(RC).exists()) throw new GradleException("FAIL: cannot find RC: " + RC)
 if (!file(FXC).exists()) throw new GradleException("FAIL: cannot find FXC: " + FXC)
 
-// The product version passed to RC is defined as follows:
-//
-// MAJOR.MINOR.UPDATE_10.BUILD
-//
-// where:
-//
-// MAJOR = 8 (for JDK 8)
-// MINOR = 0
-// UPDATE_10 = JDK update * 10, so 8u65 --> 650
-// BUILD = build number with no leading zeros
-//
+// Product version variables passed to RC:
+def rcVer = "$RELEASE_VERSION"
 def rcVerMajor = Integer.parseInt(jfxReleaseMajorVersion)
 def rcVerMinor = Integer.parseInt(jfxReleaseMinorVersion)
-def rcVerMicro = Integer.parseInt(jfxReleaseMicroVersion) * 10
-def rcVerSubMicro = Integer.parseInt(PROMOTED_BUILD_NUMBER)
-
-def rcVer = "${rcVerMajor}.${rcVerMinor}.${rcVerMicro}.${rcVerSubMicro}"
-def rcVerComma = "${rcVerMajor},${rcVerMinor},${rcVerMicro},${rcVerSubMicro}"
-
-def rcVerProduct = "${rcVerMajor}"
+def rcVerSecurity = Integer.parseInt(jfxReleaseSecurityVersion)
+def rcVerPatch = Integer.parseInt(jfxReleasePatchVersion)
+def rcVerFile = "${rcVerMajor},${rcVerMinor},${rcVerSecurity},${rcVerPatch}"
+def rcVerBuild = "$RELEASE_VERSION_LONG"
+def rcVerCopyrYear = "${Calendar.getInstance().get(Calendar.YEAR)}"
 
 def rcFlags = [
     "/d", "\"JFX_COMPANY=${COMPANY_NAME}\"",
     "/d", "\"JFX_COMPONENT=${PRODUCT_NAME} ${PLATFORM_NAME} binary\"",
-    "/d", "\"JFX_NAME=${PRODUCT_NAME} ${PLATFORM_NAME} ${rcVerProduct}\"",
+    "/d", "\"JFX_NAME=${PRODUCT_NAME} ${PLATFORM_NAME} ${rcVerMajor}\"",
     "/d", "\"JFX_VER=${rcVer}\"",
-    "/d", "\"JFX_BUILD_ID=${RAW_VERSION}-${RELEASE_MILESTONE}-b${PROMOTED_BUILD_NUMBER}\"",
-    "/d", "\"JFX_COPYRIGHT=Copyright \u00A9 ${Calendar.getInstance().get(Calendar.YEAR)}\"",
-    "/d", "\"JFX_FVER=${rcVerComma}\"",
+    "/d", "\"JFX_BUILD_ID=${rcVerBuild}\"",
+    "/d", "\"JFX_COPYRIGHT=Copyright \u00A9 ${rcVerCopyrYear}\"",
+    "/d", "\"JFX_FVER=${rcVerFile}\"",
     "/d", "\"JFX_FTYPE=0x2L\"",
     "/nologo"
 ];
--- a/modules/base/src/main/version-info/VersionInfo.java	Thu Nov 26 04:52:06 2015 -0800
+++ b/modules/base/src/main/version-info/VersionInfo.java	Fri Nov 27 09:44:18 2015 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -37,13 +37,18 @@
  * System Properties at the loading of the JavaFX Toolkit. The JavaFX properties
  * are javafx.version and javafx.runtime.version. Their formats follow the 
  * specification of java.version and java.runtime.version respectively.
- * See http://java.sun.com/j2se/versioning_naming.html for details.
+ * See http://openjdk.java.net/jeps/223 for details.
  * 
- * For example, a beta release build of JavaFX 2.0 build number 26 will contain 
+ * For example, an early access build of JavaFX 9 build 76 will contain 
  * the following properties:
  * 
- * javafx.version = 2.0.0-beta
- * javafx.runtime.version = 2.0.0-beta-b26
+ * javafx.version = 9-ea
+ * javafx.runtime.version = 9-ea+76
+ * 
+ * An fcs build of JavaFX 9 build 135 will contain the following properties:
+ * 
+ * javafx.version = 9
+ * javafx.runtime.version = 9+135
  * 
  * 2. It provides methods to access Hudson build information and timestamp.
  * These methods can be used to uniquely identify a particular build
@@ -68,12 +73,11 @@
  * 3. To uniquely identify a build that isn't generated on Hudson, such as a
  * local build on a developer machine. It substitutes the build number tag of
  * the javafx.runtime.version string with the build timestamp.
- * For example, a beta build of JavaFx 2.0 on a developer machine will look
+ * For example, a build of JavaFX 9 on a developer machine will look
  * something like the following:
  *
- * javafx.version = 2.0.0-beta
- * javafx.runtime.version = 2.0.0-beta (2011/04/28 22:08:04)
- *
+ * javafx.version = 9-internal
+ * javafx.runtime.version = 9-internal+0-2015-08-10_22-08-04
  * 
  * <p>
  * The tags of the form @STRING@ are populated by ant when the project is built
@@ -103,24 +107,14 @@
     private static final String PROMOTED_BUILD_NUMBER = "@PROMOTED_BUILD_NUMBER@";
 
     /**
-     * Product Name. Currently unused.
+     * Raw Version number string. (without milestone tag)
      */
-    private static final String PRODUCT_NAME = "@PRODUCT_NAME@";
+    private static final String RELEASE_VERSION = "@RELEASE_VERSION@";
 
     /**
-     * Raw Version number string. (without milestone tag)
+     * Release suffix.
      */
-    private static final String RAW_VERSION = "@RAW_VERSION@";
-
-    /**
-     * Release Milestone.
-     */
-    private static final String RELEASE_MILESTONE = "@RELEASE_MILESTONE@";
-
-    /**
-     * Release Name. Currently unused.
-     */
-    private static final String RELEASE_NAME = "@RELEASE_NAME@";
+    private static final String RELEASE_SUFFIX = "@RELEASE_SUFFIX@";
 
     /**
      * The composite version string. This is composed in the static
@@ -136,22 +130,19 @@
 
     // The static initializer composes the VERSION and RUNTIME_VERSION strings
     static {
-        String tmpVersion = RAW_VERSION;
+        String tmpVersion = RELEASE_VERSION;
 
         // Construct the VERSION string adding milestone information,
         // such as beta, if present.
-        // Note: RELEASE_MILESTONE is expected to be empty if it is set to "fcs"
-        if (getReleaseMilestone().length() > 0) {
-            tmpVersion += "-" + RELEASE_MILESTONE;
-        }
+        // Note: RELEASE_SUFFIX is expected to be empty for fcs versions
+        tmpVersion += RELEASE_SUFFIX;
         VERSION = tmpVersion;
 
         // Append the RUNTIME_VERSION string that follow the VERSION string
-        if (getHudsonJobName().length() > 0) {
-            tmpVersion += "-b" + PROMOTED_BUILD_NUMBER;
-        } else {
+        tmpVersion += "+" + PROMOTED_BUILD_NUMBER;
+        if (getHudsonJobName().length() == 0) {
             // Non hudson (developer) build
-            tmpVersion += " (" + BUILD_TIMESTAMP + ")";
+            tmpVersion += "-" + BUILD_TIMESTAMP;
         }
         RUNTIME_VERSION = tmpVersion;
     }
@@ -161,7 +152,7 @@
      * The format of the value strings of javafx.version and javafx.runtime.version
      * will follow the same pattern as java.version and java.runtime.version
      * respectively.
-     * See http://java.sun.com/j2se/versioning_naming.html for details.
+     * See http://openjdk.java.net/jeps/223 for details.
      */
     public static synchronized void setupSystemProperties() {
         if (System.getProperty("javafx.version") == null) {
@@ -199,15 +190,18 @@
     }
 
     /**
-     * Returns the release milestone string, an empty string is return if
-     * RELEASE_MILESTONE is set to "fcs".
+     * Returns the release milestone string by stripping off the leading '-'
+     * from the RELEASE_SUFFIX if present.
+     * Note: RELEASE_SUFFIX is expected to be empty for fcs versions
+     *
      * @return the release milestone string
      */
     public static String getReleaseMilestone() {
-        if (RELEASE_MILESTONE.equals("fcs")) {
-            return "";
+        String str = RELEASE_SUFFIX;
+        if (str.startsWith("-")) {
+            str = str.substring(1);
         }
-        return RELEASE_MILESTONE;
+        return str;
     }
 
     /**
--- a/modules/base/src/test/java/test/com/sun/javafx/runtime/VersionInfoTest.java	Thu Nov 26 04:52:06 2015 -0800
+++ b/modules/base/src/test/java/test/com/sun/javafx/runtime/VersionInfoTest.java	Fri Nov 27 09:44:18 2015 -0800
@@ -33,13 +33,119 @@
  */
 public class VersionInfoTest {
 
+    private static class Version {
+        private String vnum = "";
+        private String suffix = "";
+        private String build = "";
+        private String opt = "";
+
+        // Version number is in the following form:
+        // $VNUM[-$SUFFIX][+$BUILD[-$OPT]]
+        private Version(String version) {
+            int plusIdx = version.indexOf("+");
+            int firstDashIdx = version.indexOf("-");
+            if (plusIdx < 0) {
+                if (firstDashIdx >= 0) {
+                    vnum = version.substring(0, firstDashIdx);
+                    suffix = version.substring(firstDashIdx+1);
+                } else {
+                    vnum = version;
+                }
+            } else {
+                if (firstDashIdx < 0) {
+                    vnum = version.substring(0, plusIdx);
+                    build = version.substring(plusIdx+1);
+                } else {
+                    if (firstDashIdx < plusIdx) {
+                        vnum = version.substring(0, firstDashIdx);
+                        suffix = version.substring(firstDashIdx+1, plusIdx);
+                        String rest = version.substring(plusIdx+1);
+                        int nextDashIndex = rest.indexOf("-");
+                        if (nextDashIndex < 0) {
+                            build = rest;
+                        } else {
+                            build = rest.substring(0, nextDashIndex);
+                            opt = rest.substring(nextDashIndex+1);
+                        }
+                    } else {
+                        vnum = version.substring(0, plusIdx);
+                        build = version.substring(plusIdx+1, firstDashIdx);
+                        opt = version.substring(firstDashIdx+1);
+                    }
+                }
+            }
+
+//            System.err.println("version = " + version);
+//            System.err.println("    vnum = " + vnum);
+//            System.err.println("    suffix = " + suffix);
+//            System.err.println("    build = " + build);
+//            System.err.println("    opt = " + opt);
+//            System.err.println();
+        }
+    }
+
     @Test
     public void testMajorVersion() {
         String version = VersionInfo.getVersion();
         // Need to update major version number when we develop the next
         // major release.
-        assertTrue(version.startsWith("9."));
+        assertTrue(version.startsWith("9"));
         String runtimeVersion = VersionInfo.getRuntimeVersion();
         assertTrue(runtimeVersion.startsWith(version));
     }
+
+    @Test
+    public void testBuildNumber() {
+        String version = VersionInfo.getVersion();
+        assertFalse(version.contains("+"));
+        Version v = new Version(version);
+        assertEquals("", v.build);
+        assertEquals("", v.opt);
+
+        String runtimeVersion = VersionInfo.getRuntimeVersion();
+        assertTrue(runtimeVersion.contains("+"));
+        v = new Version(runtimeVersion);
+        assertTrue(v.build.length() > 0);
+        int buildNum = Integer.parseInt(v.build);
+        assertTrue(buildNum >= 0);
+    }
+
+    @Test
+    public void testNoFcs() {
+        String version = VersionInfo.getVersion();
+        assertFalse(version.contains("fcs"));
+        String runtimeVersion = VersionInfo.getRuntimeVersion();
+        assertFalse(runtimeVersion.contains("fcs"));
+    }
+
+    @Test
+    public void testSuffixOpt() {
+        String runtimeVersion = VersionInfo.getRuntimeVersion();
+        int internalIndex = runtimeVersion.indexOf("-internal");
+        boolean isInternal = internalIndex > 0;
+        Version v = new Version(runtimeVersion);
+        if (isInternal) {
+            assertEquals("internal", v.suffix);
+            assertTrue(v.opt.length() > 0);
+        } else {
+            assertFalse("internal".equals(v.suffix));
+        }
+    }
+
+    @Test
+    public void testNonPublic() {
+        String runtimeVersion = VersionInfo.getRuntimeVersion();
+        Version v = new Version(runtimeVersion);
+        String milestone = VersionInfo.getReleaseMilestone();
+        String timestamp = VersionInfo.getBuildTimestamp();
+        String hudsonJob = VersionInfo.getHudsonJobName();
+        assertEquals(milestone, v.suffix);
+        if (hudsonJob.length() == 0) {
+            assertEquals(timestamp, v.opt);
+            assertEquals("internal", v.suffix);
+        } else {
+            assertFalse("internal".equals(v.suffix));
+        }
+    }
+
 }
--- a/modules/fxml/src/main/docs/javafx/fxml/doc-files/introduction_to_fxml.html	Thu Nov 26 04:52:06 2015 -0800
+++ b/modules/fxml/src/main/docs/javafx/fxml/doc-files/introduction_to_fxml.html	Fri Nov 27 09:44:18 2015 -0800
@@ -4,14 +4,14 @@
 <head>
 <link href="fxml.css" rel="stylesheet"/>    
 <meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
-<title>Introduction to FXML | JavaFX 8.0</title>
-<meta name="description" content="The document introduces FXML, an XML-based declarative markup language for defining user interfaces in JavaFX 8.0 applications."/>
-<meta name="keywords" content="JavaFX 8.0, FXML, JavaFX GUI development, web development, Java application development, GUI applications, rich internet applications, RIA, expressive content"/>
+<title>Introduction to FXML | JavaFX 8</title>
+<meta name="description" content="The document introduces FXML, an XML-based declarative markup language for defining user interfaces in JavaFX 8 applications."/>
+<meta name="keywords" content="JavaFX 8, FXML, JavaFX GUI development, web development, Java application development, GUI applications, rich internet applications, RIA, expressive content"/>
 </head>
 <body>
 
 <div class="fx-code-header">
-<div class="version"><br/>Release: JavaFX 8.0</div>
+<div class="version"><br/>Release: JavaFX 9</div>
 </div>
 
 <h1>Introduction to FXML</h1>
@@ -802,7 +802,7 @@
 </pre>
 </assert>
 
-<p><strong>Warning:</strong>As of JavaFX 8.0, <span class="code">importClass()</span> javascript function is no longer supported. You have to use fully qualified names as in the example above or load a nashorn compatibility script.</p>
+<p><strong>Warning:</strong>As of JavaFX 8, <span class="code">importClass()</span> javascript function is no longer supported. You have to use fully qualified names as in the example above or load a nashorn compatibility script.</p>
 
 <pre class="code">
 load("nashorn:mozilla_compat.js");
--- a/modules/fxml/src/test/java/javafx/fxml/CompareVersionsTest.java	Thu Nov 26 04:52:06 2015 -0800
+++ b/modules/fxml/src/test/java/javafx/fxml/CompareVersionsTest.java	Fri Nov 27 09:44:18 2015 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -53,6 +53,10 @@
         assertTrue(FXMLLoader.compareJFXVersions("3.0.0.1", "3.0.0.0") > 0);
         assertTrue(FXMLLoader.compareJFXVersions("3.0.0.1", "3.0.0.0.0.1") > 0);
         assertTrue(FXMLLoader.compareJFXVersions("8.0.0-ea", "2.2.5") > 0);
+        assertTrue(FXMLLoader.compareJFXVersions("9-ea", "8.0.40") > 0);
+        assertTrue(FXMLLoader.compareJFXVersions("9", "8.0.40") > 0);
+        assertTrue(FXMLLoader.compareJFXVersions("9.1.2.3", "9.1") > 0);
+        assertTrue(FXMLLoader.compareJFXVersions("9.2", "9.1.2.3") > 0);
 
         assertTrue(FXMLLoader.compareJFXVersions("1", "1.0") == 0);
         assertTrue(FXMLLoader.compareJFXVersions("1.0", "1") == 0);
@@ -62,6 +66,11 @@
         assertTrue(FXMLLoader.compareJFXVersions("1.2.3.0-fcs", "1.2.3") == 0);
         assertTrue(FXMLLoader.compareJFXVersions("1.2.3_ea", "1.2.3.0.0.0") == 0);
         assertTrue(FXMLLoader.compareJFXVersions("1.2.3.0.0.0.0", "1.2.3") == 0);
+        assertTrue(FXMLLoader.compareJFXVersions("9-ea", "9") == 0);
+        assertTrue(FXMLLoader.compareJFXVersions("9-ea", "9.0.0.0") == 0);
+        assertTrue(FXMLLoader.compareJFXVersions("9", "9.0.0.0") == 0);
+        assertTrue(FXMLLoader.compareJFXVersions("9.0.0.0", "9") == 0);
+        assertTrue(FXMLLoader.compareJFXVersions("9.0.1", "9.0.1.0") == 0);
 
         assertTrue(FXMLLoader.compareJFXVersions("ABC", "1.2.3") == 0);
         assertTrue(FXMLLoader.compareJFXVersions("a.b.c", "1.2.3") == 0);
@@ -81,5 +90,8 @@
         assertTrue(FXMLLoader.compareJFXVersions("1.2.0", "1.2.0.0.0.1") < 0);
         assertTrue(FXMLLoader.compareJFXVersions("3.2.1", "3.2.2") < 0);
         assertTrue(FXMLLoader.compareJFXVersions("3.0.0.1", "3.0.0.1.0.0.1") < 0);
+        assertTrue(FXMLLoader.compareJFXVersions("8.0.40", "9") < 0);
+        assertTrue(FXMLLoader.compareJFXVersions("9.1", "9.1.2.3") < 0);
+        assertTrue(FXMLLoader.compareJFXVersions("9.1.2.3", "9.2") < 0);
     }
 }
--- a/modules/fxpackager/src/main/java/com/oracle/tools/packager/jnlp/JNLPBundler.java	Thu Nov 26 04:52:06 2015 -0800
+++ b/modules/fxpackager/src/main/java/com/oracle/tools/packager/jnlp/JNLPBundler.java	Fri Nov 27 09:44:18 2015 -0800
@@ -74,7 +74,7 @@
 import static com.oracle.tools.packager.StandardBundlerParam.*;
 
 /**
- * 
+ *
  * Created by dferrin on 1/7/15.
  */
 public class JNLPBundler extends AbstractBundler {
@@ -89,7 +89,7 @@
     private static final String EMBEDDED_DT = "./"+webfilesDir+"/"+dtFX;
 
     private static final String PUBLIC_DT = "https://java.com/js/dtjava.js";
-    
+
     private static final String JFX_NS_URI = "http://javafx.com";
 
     public static final StandardBundlerParam<String> OUT_FILE = new StandardBundlerParam<>(
@@ -140,7 +140,7 @@
             (Class<Map<File, File>>) (Object) Map.class,
             p -> new LinkedHashMap<>(),
             null);
-    
+
     public static final StandardBundlerParam<String> CODEBASE = new StandardBundlerParam<>(
             I18N.getString("param.codebase.name"),
             I18N.getString("param.codebase.description"),
@@ -148,7 +148,7 @@
             String.class,
             p -> null,
             null);
-    
+
     public static final StandardBundlerParam<String> PLACEHOLDER = new StandardBundlerParam<>(
             I18N.getString("param.placeholder.name"),
             I18N.getString("param.placeholder.description"),
@@ -164,7 +164,7 @@
                 }
                 return s;
             });
-    
+
     public static final StandardBundlerParam<Boolean> OFFLINE_ALLOWED = new StandardBundlerParam<>(
             I18N.getString("param.offline-allowed.name"),
             I18N.getString("param.offline-allowed.description"),
@@ -172,7 +172,7 @@
             Boolean.class,
             p -> true,
             (s, p) -> Boolean.valueOf(s));
-    
+
     public static final StandardBundlerParam<Boolean> ALL_PERMISSIONS = new StandardBundlerParam<>(
             I18N.getString("param.all-permissions.name"),
             I18N.getString("param.all-permissions.description"),
@@ -180,7 +180,7 @@
             Boolean.class,
             p -> false,
             (s, p) -> Boolean.valueOf(s));
-    
+
     public static final StandardBundlerParam<Integer> WIDTH = new StandardBundlerParam<>(
             I18N.getString("param.width.name"),
             I18N.getString("param.width.description"),
@@ -188,7 +188,7 @@
             Integer.class,
             p -> 0,
             (s, p) -> Integer.parseInt(s));
-    
+
     public static final StandardBundlerParam<Integer> HEIGHT = new StandardBundlerParam<>(
             I18N.getString("param.height.name"),
             I18N.getString("param.height.description"),
@@ -196,7 +196,7 @@
             Integer.class,
             p -> 0,
             (s, p) -> Integer.parseInt(s));
-    
+
     public static final StandardBundlerParam<String> EMBEDDED_WIDTH = new StandardBundlerParam<>(
             I18N.getString("param.embedded-width.name"),
             I18N.getString("param.embedded-width.description"),
@@ -204,7 +204,7 @@
             String.class,
             p -> Integer.toString(WIDTH.fetchFrom(p)),
             (s, p) -> s);
-    
+
     public static final StandardBundlerParam<String> EMBEDDED_HEIGHT = new StandardBundlerParam<>(
             I18N.getString("param.embedded-height.name"),
             I18N.getString("param.embedded-height.description"),
@@ -212,7 +212,7 @@
             String.class,
             p -> Integer.toString(HEIGHT.fetchFrom(p)),
             (s, p) -> s);
-    
+
     public static final StandardBundlerParam<String> FALLBACK_APP = new StandardBundlerParam<>(
             I18N.getString("param.fallback-app.name"),
             I18N.getString("param.fallback-app.description"),
@@ -220,7 +220,7 @@
             String.class,
             p -> null,
             (s, p) -> s);
-    
+
     public static final StandardBundlerParam<String> UPDATE_MODE = new StandardBundlerParam<>(
             I18N.getString("param.update-mode.name"),
             I18N.getString("param.update-mode.description"),
@@ -228,7 +228,7 @@
             String.class,
             p -> "background",
             (s, p) -> s);
-    
+
     public static final StandardBundlerParam<String> FX_PLATFORM = new StandardBundlerParam<>(
             I18N.getString("param.fx-platform.name"),
             I18N.getString("param.fx-platform.description"),
@@ -236,7 +236,7 @@
             String.class,
             p -> "1.8+",
             (s, p) -> s);
-    
+
     public static final StandardBundlerParam<String> JRE_PLATFORM = new StandardBundlerParam<>(
             I18N.getString("param.jre-platform.name"),
             I18N.getString("param.jre-platform.description"),
@@ -244,7 +244,7 @@
             String.class,
             p -> "1.8+",
             (s, p) -> s);
-    
+
     @SuppressWarnings("unchecked")
     public static final StandardBundlerParam<List<Map<String, ? super Object>>> ICONS = new StandardBundlerParam<>(
             I18N.getString("param.icons.name"),
@@ -540,8 +540,8 @@
             //In case of FX app we will have one JNLP and one HTML
             //In case of Swing with FX we will have 2 JNLP files and one HTML
             String outfile = OUT_FILE.fetchFrom(params);
-            boolean isSwingApp = SWING_APP.fetchFrom(params); 
-            
+            boolean isSwingApp = SWING_APP.fetchFrom(params);
+
             String jnlp_filename_webstart = outfile + ".jnlp";
             String jnlp_filename_browser
                     = isSwingApp ?
@@ -552,7 +552,7 @@
             outputParentDir.mkdirs();
 
             boolean includeDT = INCLUDE_DT.fetchFrom(params);
-            
+
             if (includeDT && !extractWebFiles(outputParentDir)) {
                 throw new PackagerException("ERR_NoEmbeddedDT");
             }
@@ -588,7 +588,7 @@
             //we do not need html if this is component and not main app
             boolean isExtension = EXTENSION.fetchFrom(params);
             if (!isExtension) {
-                // even though the html is unused if templateOn, 
+                // even though the html is unused if templateOn,
                 // the templateStrings is updated as a side effect.
                 ByteArrayOutputStream html_bos =
                         new ByteArrayOutputStream();
@@ -629,7 +629,7 @@
             ex.printStackTrace();
             Log.debug(ex);
             return null;
-        }            
+        }
     }
 
     private static void copyFiles(RelativeFileSet resources, File outdir) throws IOException, PackagerException {
@@ -699,7 +699,7 @@
                 xout.writeAttribute("codebase", codebase);
             }
             xout.writeAttribute("href", jnlp_filename);
-            
+
             xout.writeStartElement("information");
 
             xout.writeStartElement("title");
@@ -709,7 +709,7 @@
                 xout.writeCData("Sample JavaFX Application");
             }
             xout.writeEndElement();
-            
+
             xout.writeStartElement("vendor");
             if (vendor != null) {
                 xout.writeCharacters(vendor);
@@ -717,7 +717,7 @@
                 xout.writeCharacters("Unknown vendor");
             }
             xout.writeEndElement();
-            
+
             xout.writeStartElement("description");
             if (description != null) {
                 xout.writeCharacters(description);
@@ -731,15 +731,15 @@
                 String width =  ICONS_WIDTH.fetchFrom(iconInfo);
                 String height = ICONS_HEIGHT.fetchFrom(iconInfo);
                 String depth =  ICONS_DEPTH.fetchFrom(iconInfo);
-                
+
                 xout.writeStartElement("icon");
-                
+
                 xout.writeAttribute("href", href);
                 if (kind != null)   xout.writeAttribute("kind",   kind);
                 if (width != null)  xout.writeAttribute("width",  width);
                 if (height != null) xout.writeAttribute("height", height);
                 if (depth != null)  xout.writeAttribute("depth",  depth);
-                
+
                 xout.writeEndElement();
             }
 
@@ -766,9 +766,9 @@
                 }
                 xout.writeEndElement();
             }
-            
+
             //TODO file associations
-            
+
             xout.writeEndElement(); // information
 
             boolean allPermissions = ALL_PERMISSIONS.fetchFrom(params);
@@ -817,16 +817,16 @@
                         ((currentOS == null && rfs.getOs() != null) ||
                                 currentOS != null && !currentOS.equals(rfs.getOs())) ||
                         ((currentArch == null && rfs.getArch() != null) ||
-                                currentArch != null && !currentArch.equals(rfs.getArch()))) 
+                                currentArch != null && !currentArch.equals(rfs.getArch())))
                 {
-    
+
                     //we do not print right a way as it may be empty block
                     // Not all resources make sense for JNLP (e.g. data or license)
                     if (needToCloseResourceTag) {
                         xout.writeEndElement();
                     }
                     needToCloseResourceTag = true;
-                    
+
                     currentOS = rfs.getOs();
                     currentArch = rfs.getArch();
                     xout.writeStartElement("resources");
@@ -834,7 +834,7 @@
                     if (currentArch != null) xout.writeAttribute("arch", currentArch);
                 }
                 for (String relativePath : rfs.getIncludedFiles()) {
-    
+
                     final File srcFile = new File(rfs.getBaseDirectory(), relativePath);
                     if (srcFile.exists() && srcFile.isFile()) {
                         RelativeFileSet.Type type = rfs.getType();
@@ -888,12 +888,12 @@
                 if (height == null) {
                     height = 0;
                 }
-    
+
                 String applicationClass = MAIN_CLASS.fetchFrom(params);
                 String preloader = PRELOADER_CLASS.fetchFrom(params);
                 Map<String, String> appParams = APP_PARAMS.fetchFrom(params);
                 List<String> arguments = ARGUMENTS.fetchFrom(params);
-    
+
                 String appName = APP_NAME.fetchFrom(params);
                 if (m == Mode.APPLET) {
                     xout.writeStartDocument("applet-desc");
@@ -906,7 +906,7 @@
                     xout.writeAttribute("name", "requiredFXVersion");
                     xout.writeAttribute("value", FX_PLATFORM.fetchFrom(params));
                     xout.writeEndElement(); // param
-    
+
                     for (Map.Entry<String, String> appParamEntry : appParams.entrySet()) {
                         xout.writeStartElement("param");
                         xout.writeAttribute("name", appParamEntry.getKey());
@@ -944,7 +944,7 @@
 
                         xout.writeEndElement(); // applet-desc
                     }
-    
+
                     xout.writeStartElement("jfx", "javafx-desc", JFX_NS_URI);
                     xout.writeAttribute("width", Integer.toString(width));
                     xout.writeAttribute("height", Integer.toString(height));
@@ -953,7 +953,7 @@
                     if (preloader != null) {
                         xout.writeAttribute("preloader-class", preloader);
                     }
-                    
+
                     if (appParams != null) {
                         for (Map.Entry<String, String> appParamEntry : appParams.entrySet()) {
                             xout.writeStartElement("param");
@@ -971,16 +971,16 @@
                             xout.writeEndElement(); // argument
                         }
                     }
-                    
+
                     xout.writeEndElement(); //javafx-desc
                 }
             }
-            
+
             xout.writeEndElement(); // jnlp
 
             // now pretty print
             String s = baos.toString();
-            out.println(xmlPrettyPrint(s));            
+            out.println(xmlPrettyPrint(s));
         } catch (XMLStreamException | TransformerException e) {
             e.printStackTrace();
         }
@@ -1005,7 +1005,7 @@
             l.add(name + " : '" + value.replaceAll("(['\"\\\\])", "\\\\$1") + "'");
         } else {
             l.add(name + " : " + value);
-            
+
         }
     }
 
@@ -1067,14 +1067,14 @@
             String dtURL = includeDT ? EMBEDDED_DT : PUBLIC_DT;
             if (templateStrings != null) {
                 templateStrings.put(TemplatePlaceholders.SCRIPT_URL, dtURL);
-                
+
                 ByteArrayOutputStream baos2 = new ByteArrayOutputStream();
                 XMLStreamWriter xo2 = xmlOutputFactory.createXMLStreamWriter(baos2, "utf-8");
                 xo2.writeStartElement("SCRIPT");
                 xo2.writeAttribute("src", dtURL);
                 xo2.writeEndElement();
                 xo2.close();
-                templateStrings.put(TemplatePlaceholders.SCRIPT_CODE, baos.toString());
+                templateStrings.put(TemplatePlaceholders.SCRIPT_CODE, baos2.toString());
             }
             xout.writeStartElement("SCRIPT");
             xout.writeAttribute("src", dtURL);
@@ -1205,7 +1205,7 @@
             writeEmbeddedDynamic(out_embed_dynamic, embedFuncName, xout);
 
             xout.writeEndElement(); //head
-            
+
             xout.writeStartElement("body");
             xout.writeStartElement("h2");
             xout.writeCharacters("Test page for ");
@@ -1213,30 +1213,30 @@
             xout.writeCharacters(APP_NAME.fetchFrom(params));
             xout.writeEndElement(); // b
             xout.writeEndElement(); // h2
-            
+
             xout.writeStartElement("b");
             xout.writeCharacters("Webstart:");
             xout.writeEndElement();
-            
+
             xout.writeStartElement("a");
             xout.writeAttribute("href", jnlpfile_webstart);
             xout.writeAttribute("onclick", "return launchApplication('" + jnlpfile_webstart + "');");
             xout.writeCharacters("click to launch this app as webstart");
             xout.writeEndElement(); // a
-            
+
             xout.writeEmptyElement("br");
             xout.writeEmptyElement("hr");
             xout.writeEmptyElement("br");
             xout.writeCharacters("\n");
             xout.writeComment(" Applet will be inserted here ");
-            
+
             xout.writeStartElement("div");
             xout.writeAttribute("id", placeholder);
             xout.writeEndElement(); //div
             xout.writeEndElement(); // body
             xout.writeEndElement(); // html
             xout.close();
-            
+
             theOut.print(xmlPrettyPrint(baos.toString()));
 
         } catch (XMLStreamException | TransformerException e) {