changeset 10085:bf79b0d8a570 jdk-9+140

Merge
author kcr
date Sat, 08 Oct 2016 06:28:49 -0700
parents 2eea327f6ffc 96758e86c132
children b55571566b03 622ae2b59516
files
diffstat 52 files changed, 592 insertions(+), 448 deletions(-) [+]
line wrap: on
line diff
--- a/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/fxom/FXOMRefresher.java	Thu Oct 06 21:30:22 2016 +0000
+++ b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/fxom/FXOMRefresher.java	Sat Oct 08 06:28:49 2016 -0700
@@ -252,9 +252,9 @@
 //            final List<String> stylesheets = new ArrayList<>();
 //            stylesheets.addAll(p.getStylesheets());
 ////            p.getStylesheets().clear();
-////            p.impl_processCSS(true);
+////            p.processCSS(true);
 //            p.getStylesheets().setAll(stylesheets);
-////            p.impl_processCSS(true);
+////            p.processCSS(true);
 //        }
 //        for (Node child : p.getChildrenUnmodifiable()) {
 //            if (child instanceof Parent) {
--- a/apps/toys/Hello/src/main/java/hello/HelloComboBox.java	Thu Oct 06 21:30:22 2016 +0000
+++ b/apps/toys/Hello/src/main/java/hello/HelloComboBox.java	Sat Oct 08 06:28:49 2016 -0700
@@ -151,7 +151,7 @@
         stage.setScene(scene);
         stage.show();
 
-//        scene.impl_focusOwnerProperty().addListener(new ChangeListener<Node>() {
+//        scene.focusOwnerProperty().addListener(new ChangeListener<Node>() {
 //            public void changed(ObservableValue<? extends Node> ov, Node t, Node t1) {
 //                System.out.println("focus moved from " + t + " to " + t1);
 //            }
--- a/build.gradle	Thu Oct 06 21:30:22 2016 +0000
+++ b/build.gradle	Sat Oct 08 06:28:49 2016 -0700
@@ -589,11 +589,11 @@
             + "Please, set the correct TEST_SDK")
 }
 
-// These tasks would be disabled when running with DO_BUILD_SDK_FOR_TEST=false as they're unneeded for running tests
-def disabledTasks = DO_BUILD_SDK_FOR_TEST ? [] : ["compileJava", "processResources", "classes", // all projects
-         "generateDecoraShaders", "generatePrismShaders",
-         "compilePrismCompilers", "compilePrismJavaShaders", "compileDecoraCompilers", // :graphics
-         "processDecoraShaders", "processPrismShaders"]
+// All "classes" and "jar" tasks and their dependencies would be disabled 
+// when running with DO_BUILD_SDK_FOR_TEST=false as they're unneeded for running tests
+if (!DO_BUILD_SDK_FOR_TEST) {
+    gradle.taskGraph.useFilter({ task -> !task.name.equals("classes") && !task.name.equals("jar") })
+}
 
 /**
  * Fetch/Check that external tools are present for the build. This method
@@ -786,6 +786,8 @@
 
     if (!targetProperties.containsKey('includeGTK')) targetProperties.includeGTK = IS_LINUX
 
+    if (!targetProperties.containsKey('modLibDest')) targetProperties.modLibDest = targetProperties.libDest
+
     // This value is used as a prefix for various directories under ./build,
     // such as sdk, to allow for a common name for the hosted build
     // (for use when building apps) and a unique name for cross builds.
@@ -3017,11 +3019,6 @@
             }
         }
     }
-
-    // Some tasks should be disabled not to compile SDK, when running only the tests
-    disabledTasks.each {
-        project.getTasksByName(it, false)*.enabled = false
-    }
 }
 
 // fxpackager requires JDK 9 to compile
@@ -3340,6 +3337,14 @@
                     from "${modulesLibsDir}/${project.ext.moduleName}"
                 }
                 into "build/${sdkDirName}/lib"
+                exclude("*.dll")
+            }
+            copy {
+                moduleProjList.each { project ->
+                    from "${modulesLibsDir}/${project.ext.moduleName}"
+                }
+                into "build/${sdkDirName}/bin"
+                include("*.dll")
             }
 
             copy {
@@ -3783,8 +3788,8 @@
 
 
             def useLipo = targetProperties.containsKey('useLipo') ? targetProperties.useLipo : false
-            def libDest = targetProperties.libDest
-            def moduleNativeDirName = "${platformPrefix}module-$libDest"
+            def modLibDest = targetProperties.modLibDest
+            def moduleNativeDirName = "${platformPrefix}module-$modLibDest"
 
             // javafx.graphics native libraries
 
--- a/buildSrc/win.gradle	Thu Oct 06 21:30:22 2016 +0000
+++ b/buildSrc/win.gradle	Sat Oct 08 06:28:49 2016 -0700
@@ -38,6 +38,7 @@
 WIN.library = { name -> return "${name}.dll" as String }
 
 WIN.libDest = "bin"
+WIN.modLibDest = "lib"
 
 setupTools("windows_tools",
     { propFile ->
@@ -108,7 +109,8 @@
         "/I$JDK_HOME/include", "/I$JDK_HOME/include/win32",
         ccDebugFlags].flatten();
 
-def linkFlags = ["/nologo", "/dll", "/manifest", "/opt:REF", "/incremental:no"];
+def linkFlags = ["/nologo", "/dll", "/manifest", "/opt:REF", "/incremental:no", "/dynamicbase", "/nxcompat"];
+if (!IS_64) linkFlags.add("/safeseh");
 if (IS_DEBUG_NATIVE) linkFlags.add("/debug");
 
 // Remove C++ static linking if not on VS2010
--- a/modules/javafx.controls/src/main/java/com/sun/javafx/scene/control/ContextMenuContent.java	Thu Oct 06 21:30:22 2016 +0000
+++ b/modules/javafx.controls/src/main/java/com/sun/javafx/scene/control/ContextMenuContent.java	Sat Oct 08 06:28:49 2016 -0700
@@ -463,6 +463,7 @@
     private void initialize() {
         // RT-19624 calling requestFocus inside layout was casuing repeated layouts.
         contextMenu.addEventHandler(Menu.ON_SHOWN, event -> {
+            currentFocusedIndex = -1;
             for (Node child : itemsContainer.getChildren()) {
                 if (child instanceof MenuItemContainer) {
                     final MenuItem item = ((MenuItemContainer)child).item;
--- a/modules/javafx.controls/src/main/java/com/sun/javafx/scene/control/LabeledImpl.java	Thu Oct 06 21:30:22 2016 +0000
+++ b/modules/javafx.controls/src/main/java/com/sun/javafx/scene/control/LabeledImpl.java	Sat Oct 08 06:28:49 2016 -0700
@@ -138,7 +138,7 @@
             // the properites that are inherited by virtue of LabeledImpl
             // being a Label. This allows for the LabledImpl to be styled
             // with styles like .menu-button .label { -fx-opacity: 80%; }
-            // If just this subset were returned (by impl_CSS_STYLEABLE) then
+            // If just this subset were returned then
             // -fx-opacity (for example) would be meaningless to the Labeled.
             //
             final List<CssMetaData<? extends Styleable, ?>> labeledStyleables = Labeled.getClassCssMetaData();
--- a/modules/javafx.controls/src/main/java/com/sun/javafx/scene/control/behavior/TableCellBehaviorBase.java	Thu Oct 06 21:30:22 2016 +0000
+++ b/modules/javafx.controls/src/main/java/com/sun/javafx/scene/control/behavior/TableCellBehaviorBase.java	Sat Oct 08 06:28:49 2016 -0700
@@ -62,7 +62,7 @@
      *************************************************************************/
 
     protected abstract TableColumnBase<S, T> getTableColumn(); // getControl().getTableColumn()
-    protected abstract int getItemCount();        // tableView.impl_getTreeItemCount()
+    protected abstract int getItemCount();
     protected abstract TableSelectionModel<S> getSelectionModel();
     protected abstract TableFocusModel<S,TC> getFocusModel();
     protected abstract TablePositionBase getFocusedCell();
--- a/modules/javafx.controls/src/main/java/javafx/scene/control/PopupControl.java	Thu Oct 06 21:30:22 2016 +0000
+++ b/modules/javafx.controls/src/main/java/javafx/scene/control/PopupControl.java	Sat Oct 08 06:28:49 2016 -0700
@@ -99,7 +99,7 @@
      * This special root node is responsible for mapping the id, styleClass,
      * and style defined on the PopupControl such that CSS will read the
      * values from the PopupControl, and then apply CSS state to that
-     * special node. The node will then be able to pass impl_cssSet calls
+     * special node. The node will then be able to pass cssSet calls
      * along, such that any subclass of PopupControl will be able to
      * use the Styleable properties  and we'll be able to style it from
      * CSS, in such a way that it participates and applies to the skin,
--- a/modules/javafx.controls/src/main/java/javafx/scene/control/skin/MenuBarSkin.java	Thu Oct 06 21:30:22 2016 +0000
+++ b/modules/javafx.controls/src/main/java/javafx/scene/control/skin/MenuBarSkin.java	Sat Oct 08 06:28:49 2016 -0700
@@ -140,9 +140,11 @@
 
     private WeakEventHandler<KeyEvent> weakSceneKeyEventHandler;
     private WeakEventHandler<MouseEvent> weakSceneMouseEventHandler;
+    private WeakEventHandler<KeyEvent> weakSceneAltKeyEventHandler;
     private WeakChangeListener<Boolean> weakWindowFocusListener;
     private WeakChangeListener<Window> weakWindowSceneListener;
     private EventHandler<KeyEvent> keyEventHandler;
+    private EventHandler<KeyEvent> altKeyEventHandler;
     private EventHandler<MouseEvent> mouseEventHandler;
     private ChangeListener<Boolean> menuBarFocusedPropertyListener;
     private ChangeListener<Scene> sceneChangeListener;
@@ -382,11 +384,10 @@
         } else {
            acceleratorKeyCombo = KeyCombination.keyCombination("F10");
         }
-        Utils.executeOnceWhenPropertyIsNonNull(control.sceneProperty(), (Scene scene) -> {
-            scene.getAccelerators().put(acceleratorKeyCombo, firstMenuRunnable);
 
-            // Clear menu selection when ALT is pressed by itself
-            scene.addEventHandler(KeyEvent.KEY_PRESSED, e -> {
+        altKeyEventHandler = e -> {
+            if (e.getEventType() == KeyEvent.KEY_PRESSED) {
+                // Clear menu selection when ALT is pressed by itself
                 altKeyPressed = false;
                 if (e.getCode() == ALT && !e.isConsumed()) {
                     if (focusedMenuIndex == -1) {
@@ -394,15 +395,20 @@
                     }
                     unSelectMenus();
                 }
-            });
-            // Put focus on the first menu when ALT is released
-            // directly after being pressed by itself
-            scene.addEventHandler(KeyEvent.KEY_RELEASED, e -> {
+            } else if (e.getEventType() == KeyEvent.KEY_RELEASED) {
+                // Put focus on the first menu when ALT is released
+                // directly after being pressed by itself
                 if (altKeyPressed && e.getCode() == ALT && !e.isConsumed()) {
                     firstMenuRunnable.run();
                 }
                 altKeyPressed = false;
-            });
+            }
+        };
+        weakSceneAltKeyEventHandler = new WeakEventHandler<>(altKeyEventHandler);
+
+        Utils.executeOnceWhenPropertyIsNonNull(control.sceneProperty(), (Scene scene) -> {
+            scene.getAccelerators().put(acceleratorKeyCombo, firstMenuRunnable);
+            scene.addEventHandler(KeyEvent.ANY, weakSceneAltKeyEventHandler);
         });
 
         ParentTraversalEngine engine = new ParentTraversalEngine(getSkinnable());
@@ -413,15 +419,17 @@
         ParentHelper.setTraversalEngine(getSkinnable(), engine);
 
         control.sceneProperty().addListener((ov, t, t1) -> {
-            if (weakSceneKeyEventHandler != null) {
-                // remove event filter from the old scene (t)
-                if (t != null)
+            // remove event handlers / filters from the old scene (t)
+            if (t != null) {
+                if (weakSceneKeyEventHandler != null) {
                     t.removeEventFilter(KeyEvent.KEY_PRESSED, weakSceneKeyEventHandler);
-            }
-            if (weakSceneMouseEventHandler != null) {
-                // remove event filter from the old scene (t)
-                if (t != null)
+                }
+                if (weakSceneMouseEventHandler != null) {
                     t.removeEventFilter(MouseEvent.MOUSE_CLICKED, weakSceneMouseEventHandler);
+                }
+                if (weakSceneAltKeyEventHandler != null) {
+                    t.removeEventHandler(KeyEvent.ANY, weakSceneAltKeyEventHandler);
+                }
             }
 
             /**
@@ -437,7 +445,11 @@
         });
     }
 
-    private void showMenu(Menu menu, boolean keyboardDriven) {
+    private void showMenu(Menu menu) {
+        showMenu(menu, false);
+    }
+
+    private void showMenu(Menu menu, boolean selectFirstItem) {
         // hide the currently visible menu, and move to the next one
         if (openMenu == menu) return;
         if (openMenu != null) {
@@ -446,7 +458,7 @@
 
         openMenu = menu;
         if (!menu.isShowing() && !isMenuEmpty(menu)) {
-            if (keyboardDriven) {
+            if (selectFirstItem) {
                 // put selection / focus on first item in menu
                 MenuButton menuButton = getNodeForMenu(focusedMenuIndex);
                 Skin<?> skin = menuButton.getSkin();
@@ -827,7 +839,6 @@
         container.getChildren().clear();
 
         if (Toolkit.getToolkit().getSystemMenu().isSupported()) {
-
             final Scene scene = getSkinnable().getScene();
             if (scene != null) {
                 // RT-36554 - make sure system menu is updated when this MenuBar's scene changes.
@@ -939,7 +950,13 @@
                         openMenuButton.hide();
                     }
                     openMenuButton = menuButton;
-                    showMenu(menu, false);
+                    showMenu(menu);
+                } else {
+                    // Fix for JDK-8167138 - we need to clear out the openMenu / openMenuButton
+                    // when the menu is hidden (e.g. via autoHide), so that we can open it again
+                    // the next time (if it is the first menu requested to show)
+                    openMenu = null;
+                    openMenuButton = null;
                 }
             });
 
@@ -948,7 +965,7 @@
 
                 // check if the owner window has focus
                 if (menuButton.getScene().getWindow().isFocused()) {
-                    showMenu(menu, false);
+                    showMenu(menu);
                     // update FocusedIndex
                     menuModeStart(getMenuBarButtonIndex(menuButton));
                 }
@@ -975,7 +992,7 @@
                     }
                     updateFocusedIndex();
                     if (openMenu != null && openMenu != menu) {
-                        showMenu(menu, false);
+                        showMenu(menu);
                     }
                 }
             });
@@ -1063,10 +1080,13 @@
     }
 
     private void moveToMenu(Direction dir, boolean doShow) {
+        boolean showNextMenu = doShow && focusedMenu.isShowing();
         findSibling(dir, focusedMenuIndex).ifPresent(p -> {
             setFocusedMenuIndex(p.getValue());
-            if (doShow) {
-                showMenu(p.getKey(), true);
+            if (showNextMenu) {
+                // we explicitly do *not* allow selection - we are moving
+                // to a sibling menu, and therefore selection should be reset
+                showMenu(p.getKey(), false);
             }
         });
     }
--- a/modules/javafx.controls/src/main/java/javafx/scene/control/skin/TableCellSkinBase.java	Thu Oct 06 21:30:22 2016 +0000
+++ b/modules/javafx.controls/src/main/java/javafx/scene/control/skin/TableCellSkinBase.java	Sat Oct 08 06:28:49 2016 -0700
@@ -156,6 +156,6 @@
         }
 
         TableColumnBase<?,?> tableColumn = getTableColumn();
-        return tableColumn == null ? 0 : tableColumn.getWidth();
+        return tableColumn == null ? 0 : snapSizeX(tableColumn.getWidth());
     }
 }
--- a/modules/javafx.controls/src/main/java/javafx/scene/control/skin/TableColumnHeader.java	Thu Oct 06 21:30:22 2016 +0000
+++ b/modules/javafx.controls/src/main/java/javafx/scene/control/skin/TableColumnHeader.java	Sat Oct 08 06:28:49 2016 -0700
@@ -398,7 +398,7 @@
 
             return width;
         } else if (getTableColumn() != null && getTableColumn().isVisible()) {
-            return getTableColumn().getWidth();
+            return snapSizeX(getTableColumn().getWidth());
         }
 
         return 0;
--- a/modules/javafx.controls/src/main/java/javafx/scene/control/skin/TableRowSkinBase.java	Thu Oct 06 21:30:22 2016 +0000
+++ b/modules/javafx.controls/src/main/java/javafx/scene/control/skin/TableRowSkinBase.java	Sat Oct 08 06:28:49 2016 -0700
@@ -567,12 +567,9 @@
     /** {@inheritDoc} */
     @Override protected double computePrefWidth(double height, double topInset, double rightInset, double bottomInset, double leftInset) {
         double prefWidth = 0.0;
-
-        final List<? extends TableColumnBase/*<T,?>*/> visibleLeafColumns = getVisibleLeafColumns();
-        for (int i = 0, max = visibleLeafColumns.size(); i < max; i++) {
-            prefWidth += visibleLeafColumns.get(i).getWidth();
+        for (R cell : cells) {
+            prefWidth += cell.prefWidth(height);
         }
-
         return prefWidth;
     }
 
--- a/modules/javafx.controls/src/main/java/javafx/scene/control/skin/VirtualFlow.java	Thu Oct 06 21:30:22 2016 +0000
+++ b/modules/javafx.controls/src/main/java/javafx/scene/control/skin/VirtualFlow.java	Sat Oct 08 06:28:49 2016 -0700
@@ -102,7 +102,7 @@
     private static final int MIN_SCROLLING_LINES_PER_PAGE = 8;
 
     /**
-     * Indicates that this is a newly created cell and we need call impl_processCSS for it.
+     * Indicates that this is a newly created cell and we need call processCSS for it.
      *
      * See RT-23616 for more details.
      */
--- a/modules/javafx.controls/src/test/java/com/sun/javafx/scene/control/ContextMenuContentShim.java	Thu Oct 06 21:30:22 2016 +0000
+++ b/modules/javafx.controls/src/test/java/com/sun/javafx/scene/control/ContextMenuContentShim.java	Sat Oct 08 06:28:49 2016 -0700
@@ -132,7 +132,7 @@
         if (showingMenuContent.isPresent()) {
             ContextMenuContent content = showingMenuContent.get();
             int currentFocusIndex = content.getCurrentFocusIndex();
-            return showingMenuItems.get(currentFocusIndex);
+            return currentFocusIndex == -1 ? null : showingMenuItems.get(currentFocusIndex);
         }
 
         return null;
--- a/modules/javafx.controls/src/test/java/test/javafx/scene/control/ContextMenuTest.java	Thu Oct 06 21:30:22 2016 +0000
+++ b/modules/javafx.controls/src/test/java/test/javafx/scene/control/ContextMenuTest.java	Sat Oct 08 06:28:49 2016 -0700
@@ -575,4 +575,49 @@
         focusedItem = getCurrentFocusedItem(cm);
         assertEquals("Expected " + menuItem1.getText() + ", found " + focusedItem.getText(), menuItem1, focusedItem);
     }
+
+    @Test public void test_jdk_8167132_issue_1() {
+        ContextMenu cm = createContextMenu(true);
+
+        MenuItem item1, item2, item3, item4;
+        cm.getItems().setAll(
+                item1 = new MenuItem("Item 1"),
+                item2 = new MenuItem("Item 2"),
+                item3 = new MenuItem("Item 3"),
+                item4 = new MenuItem("Item 4"));
+
+        assertEquals(-1, getCurrentFocusedIndex(cm));
+
+        // press down once to go to item1
+        pressDownKey(cm);
+        MenuItem focusedItem = getCurrentFocusedItem(cm);
+        assertEquals(0, getCurrentFocusedIndex(cm));
+        assertEquals("Expected " + item1.getText() + ", found " + focusedItem.getText(),
+                item1, focusedItem);
+
+        // press down once to go to item2
+        pressDownKey(cm);
+        focusedItem = getCurrentFocusedItem(cm);
+        assertEquals(1, getCurrentFocusedIndex(cm));
+        assertEquals("Expected " + item2.getText() + ", found " + focusedItem.getText(),
+                item2, focusedItem);
+
+        // hide context menu
+        cm.hide();
+
+        // show context menu again
+        cm.show(anchorBtn, Side.RIGHT, 0, 0);
+
+        // assert that focus is now not anywhere to be seen
+        focusedItem = getCurrentFocusedItem(cm);
+        assertEquals(-1, getCurrentFocusedIndex(cm));
+        assertNull(focusedItem);
+
+        // press down once to go to item1
+        pressDownKey(cm);
+        focusedItem = getCurrentFocusedItem(cm);
+        assertEquals(0, getCurrentFocusedIndex(cm));
+        assertEquals("Expected " + item1.getText() + ", found " + focusedItem.getText(),
+                item1, focusedItem);
+    }
 }
--- a/modules/javafx.graphics/src/main/java/com/sun/javafx/sg/prism/CacheFilter.java	Thu Oct 06 21:30:22 2016 +0000
+++ b/modules/javafx.graphics/src/main/java/com/sun/javafx/sg/prism/CacheFilter.java	Sat Oct 08 06:28:49 2016 -0700
@@ -226,7 +226,7 @@
                 return true;
             }
             if (scrollCacheState == ScrollCacheState.CHECKING_PRECONDITIONS) {
-                if (impl_scrollCacheCapable() && isXformScrollCacheCapable(xformInfo)) {
+                if (scrollCacheCapable() && isXformScrollCacheCapable(xformInfo)) {
                     scrollCacheState = ScrollCacheState.ENABLED;
                 } else {
                     scrollCacheState = ScrollCacheState.DISABLED;
@@ -573,9 +573,9 @@
                 screenXform.setTransform(BaseTransform.IDENTITY_TRANSFORM);
             }
 
-            cacheBounds = impl_getCacheBounds(cacheBounds, cachedXform);
-            cachedImageData = impl_createImageData(fctx, cacheBounds);
-            impl_renderNodeToCache(cachedImageData, cacheBounds, cachedXform, null);
+            cacheBounds = getCacheBounds(cacheBounds, cachedXform);
+            cachedImageData = createImageData(fctx, cacheBounds);
+            renderNodeToCache(cachedImageData, cacheBounds, cachedXform, null);
 
             // cachedBounds includes effects, and is in *scene* coords
             Rectangle cachedBounds = cachedImageData.getUntransformedBounds();
@@ -589,8 +589,8 @@
         } else {
             if (scrollCacheState == ScrollCacheState.ENABLED &&
                     (lastXDelta != 0 || lastYDelta != 0) ) {
-                impl_moveCacheBy(cachedImageData, lastXDelta, lastYDelta);
-                impl_renderNodeToCache(cachedImageData, cacheBounds, cachedXform, computeDirtyRegionForTranslate());
+                moveCacheBy(cachedImageData, lastXDelta, lastYDelta);
+                renderNodeToCache(cachedImageData, cacheBounds, cachedXform, computeDirtyRegionForTranslate());
                 lastXDelta = lastYDelta = 0;
             }
             // Using the cached image; calculate screenXform to paint to screen.
@@ -615,11 +615,11 @@
             if (PulseLogger.PULSE_LOGGING_ENABLED) {
                 PulseLogger.incrementCounter("CacheFilter not used");
             }
-            impl_renderNodeToScreen(g);
+            renderNodeToScreen(g);
         } else {
             double mxt = xform.getMxt();
             double myt = xform.getMyt();
-            impl_renderCacheToScreen(g, implImage, mxt, myt);
+            renderCacheToScreen(g, implImage, mxt, myt);
             implImage.unlock();
         }
     }
@@ -627,7 +627,7 @@
     /**
      * Create the ImageData for the cached bitmap, with the specified bounds.
      */
-    ImageData impl_createImageData(FilterContext fctx, Rectangle bounds) {
+    ImageData createImageData(FilterContext fctx, Rectangle bounds) {
         Filterable ret;
         try {
             ret = Effect.getCompatibleImage(fctx,
@@ -648,7 +648,7 @@
      * @param xform transformation
      * @param dirtyBounds null or dirty rectangle to be rendered
      */
-    void impl_renderNodeToCache(ImageData cacheData,
+    void renderNodeToCache(ImageData cacheData,
                                 Rectangle cacheBounds,
                                 BaseTransform xform,
                                 Rectangle dirtyBounds) {
@@ -684,7 +684,7 @@
      * Render the node directly to the screen, in the case that the cached
      * image is unexpectedly null.  See RT-6428.
      */
-    void impl_renderNodeToScreen(Object implGraphics) {
+    void renderNodeToScreen(Object implGraphics) {
         Graphics g = (Graphics)implGraphics;
         if (node.getEffectFilter() != null) {
             node.renderEffect(g);
@@ -696,7 +696,7 @@
     /**
      * Render the cached image to the screen, translated by mxt, myt.
      */
-    void impl_renderCacheToScreen(Object implGraphics, Filterable implImage,
+    void renderCacheToScreen(Object implGraphics, Filterable implImage,
                                   double mxt, double myt)
     {
         Graphics g = (Graphics)implGraphics;
@@ -717,7 +717,7 @@
     /**
      * True if we can use scrolling optimization on this node.
      */
-    boolean impl_scrollCacheCapable() {
+    boolean scrollCacheCapable() {
         if (!(node instanceof NGGroup)) {
             return false;
         }
@@ -767,7 +767,7 @@
      * @param xDelta x-axis delta
      * @param yDelta y-axis delta
      */
-    void impl_moveCacheBy(ImageData cachedImageData, double xDelta, double yDelta) {
+    void moveCacheBy(ImageData cachedImageData, double xDelta, double yDelta) {
         PrDrawable drawable = (PrDrawable) cachedImageData.getUntransformedImage();
         final Rectangle r = cachedImageData.getUntransformedBounds();
         int x = (int)Math.max(0, (-xDelta));
@@ -804,7 +804,7 @@
      * @param bounds rectangle to store bounds to
      * @param xform transformation
      */
-    Rectangle impl_getCacheBounds(Rectangle bounds, BaseTransform xform) {
+    Rectangle getCacheBounds(Rectangle bounds, BaseTransform xform) {
         final BaseBounds b = node.getClippedBounds(TEMP_BOUNDS, xform);
         bounds.setBounds(b);
         return bounds;
--- a/modules/javafx.graphics/src/main/java/com/sun/javafx/text/PrismTextLayout.java	Thu Oct 06 21:30:22 2016 +0000
+++ b/modules/javafx.graphics/src/main/java/com/sun/javafx/text/PrismTextLayout.java	Sat Oct 08 06:28:49 2016 -0700
@@ -954,7 +954,7 @@
 
     private float getMirroringWidth() {
         /* The text node in the scene layer is mirrored based on
-         * result of impl_computeLayoutBounds. The coordinate translation
+         * result of computeLayoutBounds. The coordinate translation
          * in text layout has to be based on the same width.
          */
         return wrapWidth != 0 ? wrapWidth : layoutWidth;
--- a/modules/javafx.graphics/src/main/java/com/sun/javafx/tk/quantum/GlassWindowEventHandler.java	Thu Oct 06 21:30:22 2016 +0000
+++ b/modules/javafx.graphics/src/main/java/com/sun/javafx/tk/quantum/GlassWindowEventHandler.java	Sat Oct 08 06:28:49 2016 -0700
@@ -58,6 +58,7 @@
                 stage.stageListener.changedIconified(true);
                 break;
             case WindowEvent.MAXIMIZE:
+                stage.stageListener.changedIconified(false);
                 stage.stageListener.changedMaximized(true);
                 break;
             case WindowEvent.RESTORE:
--- a/modules/javafx.graphics/src/main/java/javafx/scene/Cursor.java	Thu Oct 06 21:30:22 2016 +0000
+++ b/modules/javafx.graphics/src/main/java/javafx/scene/Cursor.java	Sat Oct 08 06:28:49 2016 -0700
@@ -176,7 +176,7 @@
 
     /**
      * Activates the cursor. Cursor should be activated to make sure
-     * that the {@code impl_getCurrentFrame} returns up-to date values.
+     * that the {@code getCurrentFrame} returns up-to date values.
      */
     void activate() {
         // no activation necessary for standard cursors
--- a/modules/javafx.graphics/src/main/java/javafx/scene/Node.java	Thu Oct 06 21:30:22 2016 +0000
+++ b/modules/javafx.graphics/src/main/java/javafx/scene/Node.java	Sat Oct 08 06:28:49 2016 -0700
@@ -725,7 +725,7 @@
             n.updateBounds();
         }
 
-        // See impl_syncPeer()
+        // See syncPeer()
         if (!treeVisible && !isDirty(DirtyBits.NODE_VISIBLE)) {
 
             // Need to save the dirty bits since they will be cleared even for the
@@ -3920,7 +3920,7 @@
      *
      *  layoutBound is somewhat unique in that it can be redefined in
      *  subclasses. By default, the layoutBounds is the geomBounds, and so
-     *  whenever the impl_geomBounds() function is called the layoutBounds
+     *  whenever the geomBounds() function is called the layoutBounds
      *  must be invalidated. However in subclasses, especially Resizables,
      *  the layout bounds may not be defined to be the same as the geometric
      *  bounds. This is both useful and provides a very nice performance
--- a/modules/javafx.graphics/src/main/java/javafx/scene/Scene.java	Thu Oct 06 21:30:22 2016 +0000
+++ b/modules/javafx.graphics/src/main/java/javafx/scene/Scene.java	Sat Oct 08 06:28:49 2016 -0700
@@ -804,14 +804,14 @@
         assert peer == null;
 
         Window window = getWindow();
-        // impl_initPeer() is only called from Window, either when the window
+        // initPeer() is only called from Window, either when the window
         // is being shown, or the window scene is being changed. In any case
         // this scene's window cannot be null.
         assert window != null;
 
         TKStage windowPeer = WindowHelper.getPeer(window);
         if (windowPeer == null) {
-            // This is fine, the window is not visible. impl_initPeer() will
+            // This is fine, the window is not visible. initPeer() will
             // be called again later, when the window is being shown.
             return;
         }
@@ -857,7 +857,7 @@
     public void disposePeer() {
         if (peer == null) {
             // This is fine, the window is either not shown yet and there is no
-            // need in disposing scene peer, or is hidden and impl_disposePeer()
+            // need in disposing scene peer, or is hidden and disposePeer()
             // has already been called.
             return;
         }
@@ -3227,14 +3227,14 @@
         private void processTargetActionChanged(DragEvent de) {
             // Do we want DRAG_TRANSFER_MODE_CHANGED event?
 //            final Node pickedNode = Scene.this.mouseHandler.pickNode(de.getX(), de.getY());
-//            if (pickedNode != null && pickedNode.impl_isTreeVisible()) {
-//                de = DragEvent.impl_copy(de.getSource(), pickedNode, source,
+//            if (pickedNode != null && pickedNode.isTreeVisible()) {
+//                de = DragEvent.copy(de.getSource(), pickedNode, source,
 //                        pickedNode, de, DragEvent.DRAG_TRANSFER_MODE_CHANGED);
 //
 //                if (dragboard == null) {
 //                    dragboard = createDragboard(de);
 //                }
-//                dragboard = de.impl_getPlatformDragboard();
+//                dragboard = de.getPlatformDragboard();
 //
 //                fireEvent(pickedNode, de);
 //            }
--- a/modules/javafx.graphics/src/main/java/javafx/scene/shape/PathElement.java	Thu Oct 06 21:30:22 2016 +0000
+++ b/modules/javafx.graphics/src/main/java/javafx/scene/shape/PathElement.java	Sat Oct 08 06:28:49 2016 -0700
@@ -69,18 +69,18 @@
      * Defines the sequence of {@code Path} objects this path element
      * is attached to.
      */
-    WeakReferenceQueue impl_nodes = new WeakReferenceQueue();
+    WeakReferenceQueue nodes = new WeakReferenceQueue();
 
     void addNode(final Node n) {
-        impl_nodes.add(n);
+        nodes.add(n);
     }
 
     void removeNode(final Node n) {
-        impl_nodes.remove(n);
+        nodes.remove(n);
     }
 
     void u() {
-        final Iterator iterator = impl_nodes.iterator();
+        final Iterator iterator = nodes.iterator();
         while (iterator.hasNext()) {
             ((Path) iterator.next()).markPathDirty();
         }
--- a/modules/javafx.graphics/src/main/java/javafx/scene/text/Text.java	Thu Oct 06 21:30:22 2016 +0000
+++ b/modules/javafx.graphics/src/main/java/javafx/scene/text/Text.java	Sat Oct 08 06:28:49 2016 -0700
@@ -51,9 +51,6 @@
 import javafx.beans.InvalidationListener;
 import javafx.beans.binding.DoubleBinding;
 import javafx.beans.binding.ObjectBinding;
-import javafx.beans.property.*;
-import javafx.css.*;
-import javafx.geometry.*;
 import javafx.scene.AccessibleAttribute;
 import javafx.scene.AccessibleRole;
 import javafx.scene.paint.Color;
@@ -66,6 +63,32 @@
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
+import javafx.beans.property.BooleanProperty;
+import javafx.beans.property.DoubleProperty;
+import javafx.beans.property.DoublePropertyBase;
+import javafx.beans.property.IntegerProperty;
+import javafx.beans.property.IntegerPropertyBase;
+import javafx.beans.property.ObjectProperty;
+import javafx.beans.property.ObjectPropertyBase;
+import javafx.beans.property.ReadOnlyDoubleProperty;
+import javafx.beans.property.ReadOnlyDoubleWrapper;
+import javafx.beans.property.ReadOnlyObjectProperty;
+import javafx.beans.property.SimpleBooleanProperty;
+import javafx.beans.property.SimpleObjectProperty;
+import javafx.beans.property.StringProperty;
+import javafx.beans.property.StringPropertyBase;
+import javafx.css.CssMetaData;
+import javafx.css.FontCssMetaData;
+import javafx.css.Styleable;
+import javafx.css.StyleableBooleanProperty;
+import javafx.css.StyleableDoubleProperty;
+import javafx.css.StyleableObjectProperty;
+import javafx.css.StyleableProperty;
+import javafx.geometry.BoundingBox;
+import javafx.geometry.Bounds;
+import javafx.geometry.NodeOrientation;
+import javafx.geometry.Point2D;
+import javafx.geometry.VPos;
 import javafx.scene.Node;
 
 /**
@@ -829,7 +852,7 @@
     }
 
     public final ReadOnlyObjectProperty<PathElement[]> selectionShapeProperty() {
-        return getTextAttribute().impl_selectionShapeProperty();
+        return getTextAttribute().selectionShapeProperty();
     }
 
     /**
@@ -840,21 +863,21 @@
      */
     public final void setSelectionStart(int value) {
         if (value == -1 &&
-                (attributes == null || attributes.impl_selectionStart == null)) {
+                (attributes == null || attributes.selectionStart == null)) {
             return;
         }
         selectionStartProperty().set(value);
     }
 
     public final int getSelectionStart() {
-        if (attributes == null || attributes.impl_selectionStart == null) {
+        if (attributes == null || attributes.selectionStart == null) {
             return DEFAULT_SELECTION_START;
         }
-        return attributes.getImpl_selectionStart();
+        return attributes.getSelectionStart();
     }
 
     public final IntegerProperty selectionStartProperty() {
-        return getTextAttribute().impl_selectionStartProperty();
+        return getTextAttribute().selectionStartProperty();
     }
 
     /**
@@ -865,21 +888,21 @@
      */
     public final void setSelectionEnd(int value) {
         if (value == -1 &&
-                (attributes == null || attributes.impl_selectionEnd == null)) {
+                (attributes == null || attributes.selectionEnd == null)) {
             return;
         }
         selectionEndProperty().set(value);
     }
 
     public final int getSelectionEnd() {
-        if (attributes == null || attributes.impl_selectionEnd == null) {
+        if (attributes == null || attributes.selectionEnd == null) {
             return DEFAULT_SELECTION_END;
         }
-        return attributes.getImpl_selectionEnd();
+        return attributes.getSelectionEnd();
     }
 
     public final IntegerProperty selectionEndProperty() {
-        return getTextAttribute().impl_selectionEndProperty();
+        return getTextAttribute().selectionEndProperty();
     }
 
     /**
@@ -888,7 +911,7 @@
      * @since 9
      */
     public final ObjectProperty<Paint> selectionFillProperty() {
-        return getTextAttribute().impl_selectionFillProperty();
+        return getTextAttribute().selectionFillProperty();
     }
 
     public final void setSelectionFill(Paint paint) {
@@ -908,7 +931,7 @@
     }
 
     public final ReadOnlyObjectProperty<PathElement[]> caretShapeProperty() {
-        return getTextAttribute().impl_caretShapeProperty();
+        return getTextAttribute().caretShapeProperty();
     }
 
     /**
@@ -919,21 +942,21 @@
      */
     public final void setCaretPosition(int value) {
         if (value == -1 &&
-                (attributes == null || attributes.impl_caretPosition == null)) {
+                (attributes == null || attributes.caretPosition == null)) {
             return;
         }
         caretPositionProperty().set(value);
     }
 
     public final int getCaretPosition() {
-        if (attributes == null || attributes.impl_caretPosition == null) {
+        if (attributes == null || attributes.caretPosition == null) {
             return DEFAULT_CARET_POSITION;
         }
-        return attributes.getImpl_caretPosition();
+        return attributes.getCaretPosition();
     }
 
     public final IntegerProperty caretPositionProperty() {
-        return getTextAttribute().impl_caretPositionProperty();
+        return getTextAttribute().caretPositionProperty();
     }
 
     /**
@@ -943,21 +966,21 @@
      * @since 9
      */
     public final void setCaretBias(boolean value) {
-        if (value && (attributes == null || attributes.impl_caretBias == null)) {
+        if (value && (attributes == null || attributes.caretBias == null)) {
             return;
         }
         caretBiasProperty().set(value);
     }
 
     public final boolean isCaretBias() {
-        if (attributes == null || attributes.impl_caretBias == null) {
+        if (attributes == null || attributes.caretBias == null) {
             return DEFAULT_CARET_BIAS;
         }
-        return getTextAttribute().isImpl_caretBias();
+        return getTextAttribute().isCaretBias();
     }
 
     public final BooleanProperty caretBiasProperty() {
-        return getTextAttribute().impl_caretBiasProperty();
+        return getTextAttribute().caretBiasProperty();
     }
 
     /**
@@ -1485,7 +1508,7 @@
 
         private ObjectProperty<VPos> textOrigin;
 
-        public final VPos getTextOrigin() {
+        final VPos getTextOrigin() {
             return textOrigin == null ? DEFAULT_TEXT_ORIGIN : textOrigin.get();
         }
 
@@ -1507,11 +1530,11 @@
 
         private BooleanProperty underline;
 
-        public final boolean isUnderline() {
+        final boolean isUnderline() {
             return underline == null ? DEFAULT_UNDERLINE : underline.get();
         }
 
-        public final BooleanProperty underlineProperty() {
+        final BooleanProperty underlineProperty() {
             if (underline == null) {
                 underline = new StyleableBooleanProperty() {
                     @Override public Object getBean() { return Text.this; }
@@ -1532,11 +1555,11 @@
 
         private BooleanProperty strikethrough;
 
-        public final boolean isStrikethrough() {
+        final boolean isStrikethrough() {
             return strikethrough == null ? DEFAULT_STRIKETHROUGH : strikethrough.get();
         }
 
-        public final BooleanProperty strikethroughProperty() {
+        final BooleanProperty strikethroughProperty() {
             if (strikethrough == null) {
                 strikethrough = new StyleableBooleanProperty() {
                     @Override public Object getBean() { return Text.this; }
@@ -1557,11 +1580,11 @@
 
         private ObjectProperty<TextAlignment> textAlignment;
 
-        public final TextAlignment getTextAlignment() {
+        final TextAlignment getTextAlignment() {
             return textAlignment == null ? DEFAULT_TEXT_ALIGNMENT : textAlignment.get();
         }
 
-        public final ObjectProperty<TextAlignment> textAlignmentProperty() {
+        final ObjectProperty<TextAlignment> textAlignmentProperty() {
             if (textAlignment == null) {
                 textAlignment =
                     new StyleableObjectProperty<TextAlignment>(DEFAULT_TEXT_ALIGNMENT) {
@@ -1589,11 +1612,11 @@
 
         private DoubleProperty lineSpacing;
 
-        public final double getLineSpacing() {
+        final double getLineSpacing() {
             return lineSpacing == null ? DEFAULT_LINE_SPACING : lineSpacing.get();
         }
 
-        public final DoubleProperty lineSpacingProperty() {
+        final DoubleProperty lineSpacingProperty() {
             if (lineSpacing == null) {
                 lineSpacing =
                     new StyleableDoubleProperty(DEFAULT_LINE_SPACING) {
@@ -1617,7 +1640,7 @@
 
         private ReadOnlyDoubleWrapper baselineOffset;
 
-        public final ReadOnlyDoubleProperty baselineOffsetProperty() {
+        final ReadOnlyDoubleProperty baselineOffsetProperty() {
             if (baselineOffset == null) {
                 baselineOffset = new ReadOnlyDoubleWrapper(Text.this, "baselineOffset") {
                     {bind(new DoubleBinding() {
@@ -1635,36 +1658,33 @@
             return baselineOffset.getReadOnlyProperty();
         }
 
-        @Deprecated
-        private ObjectProperty<PathElement[]> impl_selectionShape;
+        private ObjectProperty<PathElement[]> selectionShape;
         private ObjectBinding<PathElement[]> selectionBinding;
 
-        @Deprecated
-        public final ReadOnlyObjectProperty<PathElement[]> impl_selectionShapeProperty() {
-            if (impl_selectionShape == null) {
+        final ReadOnlyObjectProperty<PathElement[]> selectionShapeProperty() {
+            if (selectionShape == null) {
                 selectionBinding = new ObjectBinding<PathElement[]>() {
-                    {bind(impl_selectionStartProperty(), impl_selectionEndProperty());}
+                    {bind(selectionStartProperty(), selectionEndProperty());}
                     @Override protected PathElement[] computeValue() {
                         int start = getSelectionStart();
                         int end = getSelectionEnd();
                         return getRange(start, end, TextLayout.TYPE_TEXT);
                     }
               };
-              impl_selectionShape = new SimpleObjectProperty<PathElement[]>(Text.this, "impl_selectionShape");
-              impl_selectionShape.bind(selectionBinding);
+              selectionShape = new SimpleObjectProperty<PathElement[]>(Text.this, "selectionShape");
+              selectionShape.bind(selectionBinding);
             }
-            return impl_selectionShape;
+            return selectionShape;
         }
 
         private ObjectProperty<Paint> selectionFill;
 
-        @Deprecated
-        public final ObjectProperty<Paint> impl_selectionFillProperty() {
+        final ObjectProperty<Paint> selectionFillProperty() {
             if (selectionFill == null) {
                 selectionFill =
                     new ObjectPropertyBase<Paint>(DEFAULT_SELECTION_FILL) {
                         @Override public Object getBean() { return Text.this; }
-                        @Override public String getName() { return "impl_selectionFill"; }
+                        @Override public String getName() { return "selectionFill"; }
                         @Override protected void invalidated() {
                             NodeHelper.markDirty(Text.this, DirtyBits.TEXT_SELECTION);
                         }
@@ -1673,67 +1693,60 @@
             return selectionFill;
         }
 
-        @Deprecated
-        private IntegerProperty impl_selectionStart;
+        private IntegerProperty selectionStart;
 
-        @Deprecated
-        public final int getImpl_selectionStart() {
-            return impl_selectionStart == null ? DEFAULT_SELECTION_START : impl_selectionStart.get();
+        final int getSelectionStart() {
+            return selectionStart == null ? DEFAULT_SELECTION_START : selectionStart.get();
         }
 
-        @Deprecated
-        public final IntegerProperty impl_selectionStartProperty() {
-            if (impl_selectionStart == null) {
-                impl_selectionStart =
+        final IntegerProperty selectionStartProperty() {
+            if (selectionStart == null) {
+                selectionStart =
                     new IntegerPropertyBase(DEFAULT_SELECTION_START) {
                         @Override public Object getBean() { return Text.this; }
-                        @Override public String getName() { return "impl_selectionStart"; }
+                        @Override public String getName() { return "selectionStart"; }
                         @Override protected void invalidated() {
                             NodeHelper.markDirty(Text.this, DirtyBits.TEXT_SELECTION);
                             notifyAccessibleAttributeChanged(AccessibleAttribute.SELECTION_START);
                         }
                 };
             }
-            return impl_selectionStart;
+            return selectionStart;
         }
 
-        @Deprecated
-        private IntegerProperty impl_selectionEnd;
+        private IntegerProperty selectionEnd;
 
-        @Deprecated
-        public final int getImpl_selectionEnd() {
-            return impl_selectionEnd == null ? DEFAULT_SELECTION_END : impl_selectionEnd.get();
+        final int getSelectionEnd() {
+            return selectionEnd == null ? DEFAULT_SELECTION_END : selectionEnd.get();
         }
 
-        @Deprecated
-        public final IntegerProperty impl_selectionEndProperty() {
-            if (impl_selectionEnd == null) {
-                impl_selectionEnd =
+        final IntegerProperty selectionEndProperty() {
+            if (selectionEnd == null) {
+                selectionEnd =
                     new IntegerPropertyBase(DEFAULT_SELECTION_END) {
                         @Override public Object getBean() { return Text.this; }
-                        @Override public String getName() { return "impl_selectionEnd"; }
+                        @Override public String getName() { return "selectionEnd"; }
                         @Override protected void invalidated() {
                             NodeHelper.markDirty(Text.this, DirtyBits.TEXT_SELECTION);
                             notifyAccessibleAttributeChanged(AccessibleAttribute.SELECTION_END);
                         }
                     };
             }
-            return impl_selectionEnd;
+            return selectionEnd;
         }
 
-        private ObjectProperty<PathElement[]> impl_caretShape;
+        private ObjectProperty<PathElement[]> caretShape;
         private ObjectBinding<PathElement[]> caretBinding;
 
-        @Deprecated
-        public final ReadOnlyObjectProperty<PathElement[]> impl_caretShapeProperty() {
-            if (impl_caretShape == null) {
+        final ReadOnlyObjectProperty<PathElement[]> caretShapeProperty() {
+            if (caretShape == null) {
                 caretBinding = new ObjectBinding<PathElement[]>() {
-                    {bind(impl_caretPositionProperty(), impl_caretBiasProperty());}
+                    {bind(caretPositionProperty(), caretBiasProperty());}
                     @Override protected PathElement[] computeValue() {
-                        int pos = getImpl_caretPosition();
+                        int pos = getCaretPosition();
                         int length = getTextInternal().length();
                         if (0 <= pos && pos <= length) {
-                            boolean bias = isImpl_caretBias();
+                            boolean bias = isCaretBias();
                             float x = (float)getX();
                             float y = (float)getY() - getYRendering();
                             TextLayout layout = getTextLayout();
@@ -1742,50 +1755,44 @@
                         return EMPTY_PATH_ELEMENT_ARRAY;
                     }
                 };
-                impl_caretShape = new SimpleObjectProperty<PathElement[]>(Text.this, "impl_caretShape");
-                impl_caretShape.bind(caretBinding);
+                caretShape = new SimpleObjectProperty<PathElement[]>(Text.this, "caretShape");
+                caretShape.bind(caretBinding);
             }
-            return impl_caretShape;
+            return caretShape;
         }
 
-        @Deprecated
-        private IntegerProperty impl_caretPosition;
+        private IntegerProperty caretPosition;
 
-        @Deprecated
-        public final int getImpl_caretPosition() {
-            return impl_caretPosition == null ? DEFAULT_CARET_POSITION : impl_caretPosition.get();
+        final int getCaretPosition() {
+            return caretPosition == null ? DEFAULT_CARET_POSITION : caretPosition.get();
         }
 
-        @Deprecated
-        public final IntegerProperty impl_caretPositionProperty() {
-            if (impl_caretPosition == null) {
-                impl_caretPosition =
+        final IntegerProperty caretPositionProperty() {
+            if (caretPosition == null) {
+                caretPosition =
                     new IntegerPropertyBase(DEFAULT_CARET_POSITION) {
                         @Override public Object getBean() { return Text.this; }
-                        @Override public String getName() { return "impl_caretPosition"; }
+                        @Override public String getName() { return "caretPosition"; }
                         @Override protected void invalidated() {
                             notifyAccessibleAttributeChanged(AccessibleAttribute.SELECTION_END);
                         }
                     };
             }
-            return impl_caretPosition;
+            return caretPosition;
         }
 
-        @Deprecated
-        private BooleanProperty impl_caretBias;
+        private BooleanProperty caretBias;
 
-        @Deprecated
-        public final boolean isImpl_caretBias() {
-            return impl_caretBias == null ? DEFAULT_CARET_BIAS : impl_caretBias.get();
+        final boolean isCaretBias() {
+            return caretBias == null ? DEFAULT_CARET_BIAS : caretBias.get();
         }
 
-        @Deprecated
-        public final BooleanProperty impl_caretBiasProperty() {
-            if (impl_caretBias == null) {
-                impl_caretBias =
-                        new SimpleBooleanProperty(Text.this, "impl_caretBias", DEFAULT_CARET_BIAS);
+        final BooleanProperty caretBiasProperty() {
+            if (caretBias == null) {
+                caretBias =
+                        new SimpleBooleanProperty(Text.this, "caretBias", DEFAULT_CARET_BIAS);
             }
-            return impl_caretBias;
+            return caretBias;
         }
     }
 
--- a/modules/javafx.media/src/main/native/gstreamer/projects/win/fxplugins/Makefile	Thu Oct 06 21:30:22 2016 +0000
+++ b/modules/javafx.media/src/main/native/gstreamer/projects/win/fxplugins/Makefile	Sat Oct 08 06:28:49 2016 -0700
@@ -108,7 +108,7 @@
 endif
 
 ifeq ($(ARCH), x32)
-    LDFLAGS += -MACHINE:x86
+    LDFLAGS += -safeseh -MACHINE:x86
 else
     CFLAGS += -D_WIN64
     LDFLAGS += -MACHINE:x64
--- a/modules/javafx.media/src/main/native/gstreamer/projects/win/glib-lite/Makefile	Thu Oct 06 21:30:22 2016 +0000
+++ b/modules/javafx.media/src/main/native/gstreamer/projects/win/glib-lite/Makefile	Sat Oct 08 06:28:49 2016 -0700
@@ -43,7 +43,7 @@
 endif
 
 ifeq ($(ARCH), x32)
-    LDFLAGS += -MACHINE:x86
+    LDFLAGS += -safeseh -MACHINE:x86
 else
     LDFLAGS += -MACHINE:x64
 endif
--- a/modules/javafx.media/src/main/native/gstreamer/projects/win/glib-lite/Makefile.ffi	Thu Oct 06 21:30:22 2016 +0000
+++ b/modules/javafx.media/src/main/native/gstreamer/projects/win/glib-lite/Makefile.ffi	Sat Oct 08 06:28:49 2016 -0700
@@ -45,6 +45,7 @@
     ASM_FLAGS = -DX86_WIN32
 
     ML = ml.exe
+    MLFLAGS = -safeseh
 else
     INCLUDES += -I$(SRCBASE_DIR)/include/x64
     CFLAGS += -DX86_WIN64
@@ -55,6 +56,7 @@
     ASM_FLAGS = -DX86_WIN64
 
     ML = ml64.exe
+    MLFLAGS =
 endif
 
 OBJECTS = $(patsubst %.c,$(OBJBASE_DIR)/%.obj,$(C_SOURCES)) \
@@ -77,4 +79,4 @@
 
 $(OBJBASE_DIR)/%.obj: $(SRCBASE_DIR)/%.S
 	$(CC) -EP $(INCLUDES) $(CFLAGS) $(shell cygpath -ma $(SRCBASE_DIR)/$(ASM_SOURCES)) > $(shell cygpath -ma $@.asm)
-	$(ML) -c -Fo$(shell cygpath -ma $@) $(shell cygpath -ma $@.asm)
+	$(ML) $(MLFLAGS) -c -Fo$(shell cygpath -ma $@) $(shell cygpath -ma $@.asm)
--- a/modules/javafx.media/src/main/native/gstreamer/projects/win/gstreamer-lite/Makefile	Thu Oct 06 21:30:22 2016 +0000
+++ b/modules/javafx.media/src/main/native/gstreamer/projects/win/gstreamer-lite/Makefile	Sat Oct 08 06:28:49 2016 -0700
@@ -41,7 +41,7 @@
 endif
 
 ifeq ($(ARCH), x32)
-    LDFLAGS += -MACHINE:x86
+    LDFLAGS += -safeseh -MACHINE:x86
 else
     LDFLAGS += -MACHINE:x64
 endif
--- a/modules/javafx.media/src/main/native/jfxmedia/projects/win/Makefile	Thu Oct 06 21:30:22 2016 +0000
+++ b/modules/javafx.media/src/main/native/jfxmedia/projects/win/Makefile	Sat Oct 08 06:28:49 2016 -0700
@@ -77,7 +77,7 @@
 
 LDFLAGS = -dll -out:$(shell cygpath -ma $(TARGET)) -incremental:no -nologo -libpath:$(shell cygpath -ma $(BUILD_DIR)) $(LIBS) \
           -manifest -manifestfile:$(MANIFEST) -manifestuac:"level='asInvoker' uiAccess='false'" \
-          -subsystem:windows -dynamicbase -errorreport:queue
+          -subsystem:windows -dynamicbase -nxcompat -errorreport:queue
 
 ifeq ($(BUILD_TYPE), Release)
     CFLAGS += -DNDEBUG -O2 -MD
@@ -89,7 +89,7 @@
 
 ifeq ($(ARCH), x32)
     CFLAGS += -Oy-
-    LDFLAGS += -MACHINE:x86
+    LDFLAGS += -safeseh -MACHINE:x86
 else
     CFLAGS += -D_WIN64
     LDFLAGS += -MACHINE:x64
--- a/modules/javafx.web/src/android/java/com/sun/webkit/LoadListenerClient.java	Thu Oct 06 21:30:22 2016 +0000
+++ b/modules/javafx.web/src/android/java/com/sun/webkit/LoadListenerClient.java	Sat Oct 08 06:28:49 2016 -0700
@@ -25,75 +25,77 @@
 
 package com.sun.webkit;
 
+import java.lang.annotation.Native;
+
 public interface LoadListenerClient {
-    public final static int PAGE_STARTED = 0;
-    public final static int PAGE_FINISHED = 1;
-    public final static int PAGE_REDIRECTED = 2;
-    public final static int LOAD_FAILED = 5;
-    public final static int LOAD_STOPPED = 6;
-    public final static int CONTENT_RECEIVED = 10;
-    public final static int TITLE_RECEIVED = 11;
-    public final static int ICON_RECEIVED = 12;
-    public final static int CONTENTTYPE_RECEIVED = 13;
-    public final static int DOCUMENT_AVAILABLE = 14;
-    public final static int RESOURCE_STARTED = 20;
-    public final static int RESOURCE_REDIRECTED = 21;
-    public final static int RESOURCE_FINISHED = 22;
-    public final static int RESOURCE_FAILED = 23;
-    public final static int PROGRESS_CHANGED = 30;
+    @Native public final static int PAGE_STARTED = 0;
+    @Native public final static int PAGE_FINISHED = 1;
+    @Native public final static int PAGE_REDIRECTED = 2;
+    @Native public final static int LOAD_FAILED = 5;
+    @Native public final static int LOAD_STOPPED = 6;
+    @Native public final static int CONTENT_RECEIVED = 10;
+    @Native public final static int TITLE_RECEIVED = 11;
+    @Native public final static int ICON_RECEIVED = 12;
+    @Native public final static int CONTENTTYPE_RECEIVED = 13;
+    @Native public final static int DOCUMENT_AVAILABLE = 14;
+    @Native public final static int RESOURCE_STARTED = 20;
+    @Native public final static int RESOURCE_REDIRECTED = 21;
+    @Native public final static int RESOURCE_FINISHED = 22;
+    @Native public final static int RESOURCE_FAILED = 23;
+    @Native public final static int PROGRESS_CHANGED = 30;
 
 
     // -- Error Code values
     /**
      * An error code indicating that the host name couldn't be resolved.
      */
-    public final static int UNKNOWN_HOST = 1;
+    @Native public final static int UNKNOWN_HOST = 1;
     /**
      * An error code indicating that the URL was malformed or illegal.
      */
-    public final static int MALFORMED_URL = 2;
+    @Native public final static int MALFORMED_URL = 2;
     /**
      * An error code indicating that the SSL handshake failed.
      */
-    public final static int SSL_HANDSHAKE = 3;
+    @Native public final static int SSL_HANDSHAKE = 3;
     /**
      * An error code indicating that the connection was refused by the server.
      */
-    public final static int CONNECTION_REFUSED = 4;
+    @Native public final static int CONNECTION_REFUSED = 4;
     /**
      * An error code indicating that the connection was reset by the server.
      */
-    public final static int CONNECTION_RESET = 5;
+    @Native public final static int CONNECTION_RESET = 5;
     /**
      * An error code indicating that there was no route to the host.
      */
-    public final static int NO_ROUTE_TO_HOST = 6;
+    @Native public final static int NO_ROUTE_TO_HOST = 6;
     /**
      * An error code indicating that the connection timed out.
      */
-    public final static int CONNECTION_TIMED_OUT = 7;
+    @Native public final static int CONNECTION_TIMED_OUT = 7;
     /**
      * An error code indicating that the client was denied permission
      * to initiate connection to the server.
      */
-    public final static int PERMISSION_DENIED = 8;
+    @Native public final static int PERMISSION_DENIED = 8;
     /**
      * An error code indicating that the server response was invalid.
      */
-    public final static int INVALID_RESPONSE = 9;
+    @Native public final static int INVALID_RESPONSE = 9;
     /**
      * An error code indicating that too many redirects were encountered
      * while processing the request.
      */
-    public final static int TOO_MANY_REDIRECTS = 10;
+    @Native public final static int TOO_MANY_REDIRECTS = 10;
     /**
      * An error code indicating that the requested local file was not found.
      */
-    public final static int FILE_NOT_FOUND = 11;
+    @Native public final static int FILE_NOT_FOUND = 11;
     /**
      * An error code indicating that an unknown error occurred.
      */
-    public final static int UNKNOWN_ERROR = 99;
+    @Native public final static int UNKNOWN_ERROR = 99;
 
 
     public void dispatchLoadEvent(long frame, int state,
--- a/modules/javafx.web/src/main/java/com/sun/webkit/ContextMenuItem.java	Thu Oct 06 21:30:22 2016 +0000
+++ b/modules/javafx.web/src/main/java/com/sun/webkit/ContextMenuItem.java	Sat Oct 08 06:28:49 2016 -0700
@@ -25,10 +25,12 @@
 
 package com.sun.webkit;
 
+import java.lang.annotation.Native;
+
 public final class ContextMenuItem {
-    public static final int ACTION_TYPE = 0;
-    public static final int SEPARATOR_TYPE = 1;
-    public static final int SUBMENU_TYPE = 2;
+    @Native public static final int ACTION_TYPE = 0;
+    @Native public static final int SEPARATOR_TYPE = 1;
+    @Native public static final int SUBMENU_TYPE = 2;
 
     private String title;
     private int action;
--- a/modules/javafx.web/src/main/java/com/sun/webkit/CursorManager.java	Thu Oct 06 21:30:22 2016 +0000
+++ b/modules/javafx.web/src/main/java/com/sun/webkit/CursorManager.java	Sat Oct 08 06:28:49 2016 -0700
@@ -25,6 +25,7 @@
 
 package com.sun.webkit;
 
+import java.lang.annotation.Native;
 import java.util.HashMap;
 import java.util.Map;
 
@@ -33,49 +34,49 @@
 
 public abstract class CursorManager<T> {
 
-    public static final int POINTER                      =  0;
-    public static final int CROSS                        =  1;
-    public static final int HAND                         =  2;
-    public static final int MOVE                         =  3;
-    public static final int TEXT                         =  4;
-    public static final int WAIT                         =  5;
-    public static final int HELP                         =  6;
-    public static final int EAST_RESIZE                  =  7;
-    public static final int NORTH_RESIZE                 =  8;
-    public static final int NORTH_EAST_RESIZE            =  9;
-    public static final int NORTH_WEST_RESIZE            = 10;
-    public static final int SOUTH_RESIZE                 = 11;
-    public static final int SOUTH_EAST_RESIZE            = 12;
-    public static final int SOUTH_WEST_RESIZE            = 13;
-    public static final int WEST_RESIZE                  = 14;
-    public static final int NORTH_SOUTH_RESIZE           = 15;
-    public static final int EAST_WEST_RESIZE             = 16;
-    public static final int NORTH_EAST_SOUTH_WEST_RESIZE = 17;
-    public static final int NORTH_WEST_SOUTH_EAST_RESIZE = 18;
-    public static final int COLUMN_RESIZE                = 19;
-    public static final int ROW_RESIZE                   = 20;
-    public static final int MIDDLE_PANNING               = 21;
-    public static final int EAST_PANNING                 = 22;
-    public static final int NORTH_PANNING                = 23;
-    public static final int NORTH_EAST_PANNING           = 24;
-    public static final int NORTH_WEST_PANNING           = 25;
-    public static final int SOUTH_PANNING                = 26;
-    public static final int SOUTH_EAST_PANNING           = 27;
-    public static final int SOUTH_WEST_PANNING           = 28;
-    public static final int WEST_PANNING                 = 29;
-    public static final int VERTICAL_TEXT                = 30;
-    public static final int CELL                         = 31;
-    public static final int CONTEXT_MENU                 = 32;
-    public static final int NO_DROP                      = 33;
-    public static final int NOT_ALLOWED                  = 34;
-    public static final int PROGRESS                     = 35;
-    public static final int ALIAS                        = 36;
-    public static final int ZOOM_IN                      = 37;
-    public static final int ZOOM_OUT                     = 38;
-    public static final int COPY                         = 39;
-    public static final int NONE                         = 40;
-    public static final int GRAB                         = 41;
-    public static final int GRABBING                     = 42;
+    @Native public static final int POINTER                      =  0;
+    @Native public static final int CROSS                        =  1;
+    @Native public static final int HAND                         =  2;
+    @Native public static final int MOVE                         =  3;
+    @Native public static final int TEXT                         =  4;
+    @Native public static final int WAIT                         =  5;
+    @Native public static final int HELP                         =  6;
+    @Native public static final int EAST_RESIZE                  =  7;
+    @Native public static final int NORTH_RESIZE                 =  8;
+    @Native public static final int NORTH_EAST_RESIZE            =  9;
+    @Native public static final int NORTH_WEST_RESIZE            = 10;
+    @Native public static final int SOUTH_RESIZE                 = 11;
+    @Native public static final int SOUTH_EAST_RESIZE            = 12;
+    @Native public static final int SOUTH_WEST_RESIZE            = 13;
+    @Native public static final int WEST_RESIZE                  = 14;
+    @Native public static final int NORTH_SOUTH_RESIZE           = 15;
+    @Native public static final int EAST_WEST_RESIZE             = 16;
+    @Native public static final int NORTH_EAST_SOUTH_WEST_RESIZE = 17;
+    @Native public static final int NORTH_WEST_SOUTH_EAST_RESIZE = 18;
+    @Native public static final int COLUMN_RESIZE                = 19;
+    @Native public static final int ROW_RESIZE                   = 20;
+    @Native public static final int MIDDLE_PANNING               = 21;
+    @Native public static final int EAST_PANNING                 = 22;
+    @Native public static final int NORTH_PANNING                = 23;
+    @Native public static final int NORTH_EAST_PANNING           = 24;
+    @Native public static final int NORTH_WEST_PANNING           = 25;
+    @Native public static final int SOUTH_PANNING                = 26;
+    @Native public static final int SOUTH_EAST_PANNING           = 27;
+    @Native public static final int SOUTH_WEST_PANNING           = 28;
+    @Native public static final int WEST_PANNING                 = 29;
+    @Native public static final int VERTICAL_TEXT                = 30;
+    @Native public static final int CELL                         = 31;
+    @Native public static final int CONTEXT_MENU                 = 32;
+    @Native public static final int NO_DROP                      = 33;
+    @Native public static final int NOT_ALLOWED                  = 34;
+    @Native public static final int PROGRESS                     = 35;
+    @Native public static final int ALIAS                        = 36;
+    @Native public static final int ZOOM_IN                      = 37;
+    @Native public static final int ZOOM_OUT                     = 38;
+    @Native public static final int COPY                         = 39;
+    @Native public static final int NONE                         = 40;
+    @Native public static final int GRAB                         = 41;
+    @Native public static final int GRABBING                     = 42;
 
     private static CursorManager instance;
 
--- a/modules/javafx.web/src/main/java/com/sun/webkit/LoadListenerClient.java	Thu Oct 06 21:30:22 2016 +0000
+++ b/modules/javafx.web/src/main/java/com/sun/webkit/LoadListenerClient.java	Sat Oct 08 06:28:49 2016 -0700
@@ -25,75 +25,77 @@
 
 package com.sun.webkit;
 
+import java.lang.annotation.Native;
+
 public interface LoadListenerClient {
-    public final static int PAGE_STARTED = 0;
-    public final static int PAGE_FINISHED = 1;
-    public final static int PAGE_REDIRECTED = 2;
-    public final static int LOAD_FAILED = 5;
-    public final static int LOAD_STOPPED = 6;
-    public final static int CONTENT_RECEIVED = 10;
-    public final static int TITLE_RECEIVED = 11;
-    public final static int ICON_RECEIVED = 12;
-    public final static int CONTENTTYPE_RECEIVED = 13;
-    public final static int DOCUMENT_AVAILABLE = 14;
-    public final static int RESOURCE_STARTED = 20;
-    public final static int RESOURCE_REDIRECTED = 21;
-    public final static int RESOURCE_FINISHED = 22;
-    public final static int RESOURCE_FAILED = 23;
-    public final static int PROGRESS_CHANGED = 30;
+    @Native public final static int PAGE_STARTED = 0;
+    @Native public final static int PAGE_FINISHED = 1;
+    @Native public final static int PAGE_REDIRECTED = 2;
+    @Native public final static int LOAD_FAILED = 5;
+    @Native public final static int LOAD_STOPPED = 6;
+    @Native public final static int CONTENT_RECEIVED = 10;
+    @Native public final static int TITLE_RECEIVED = 11;
+    @Native public final static int ICON_RECEIVED = 12;
+    @Native public final static int CONTENTTYPE_RECEIVED = 13;
+    @Native public final static int DOCUMENT_AVAILABLE = 14;
+    @Native public final static int RESOURCE_STARTED = 20;
+    @Native public final static int RESOURCE_REDIRECTED = 21;
+    @Native public final static int RESOURCE_FINISHED = 22;
+    @Native public final static int RESOURCE_FAILED = 23;
+    @Native public final static int PROGRESS_CHANGED = 30;
 
 
     // -- Error Code values
     /**
      * An error code indicating that the host name couldn't be resolved.
      */
-    public final static int UNKNOWN_HOST = 1;
+    @Native public final static int UNKNOWN_HOST = 1;
     /**
      * An error code indicating that the URL was malformed or illegal.
      */
-    public final static int MALFORMED_URL = 2;
+    @Native public final static int MALFORMED_URL = 2;
     /**
      * An error code indicating that the SSL handshake failed.
      */
-    public final static int SSL_HANDSHAKE = 3;
+    @Native public final static int SSL_HANDSHAKE = 3;
     /**
      * An error code indicating that the connection was refused by the server.
      */
-    public final static int CONNECTION_REFUSED = 4;
+    @Native public final static int CONNECTION_REFUSED = 4;
     /**
      * An error code indicating that the connection was reset by the server.
      */
-    public final static int CONNECTION_RESET = 5;
+    @Native public final static int CONNECTION_RESET = 5;
     /**
      * An error code indicating that there was no route to the host.
      */
-    public final static int NO_ROUTE_TO_HOST = 6;
+    @Native public final static int NO_ROUTE_TO_HOST = 6;
     /**
      * An error code indicating that the connection timed out.
      */
-    public final static int CONNECTION_TIMED_OUT = 7;
+    @Native public final static int CONNECTION_TIMED_OUT = 7;
     /**
      * An error code indicating that the client was denied permission
      * to initiate connection to the server.
      */
-    public final static int PERMISSION_DENIED = 8;
+    @Native public final static int PERMISSION_DENIED = 8;
     /**
      * An error code indicating that the server response was invalid.
      */
-    public final static int INVALID_RESPONSE = 9;
+    @Native public final static int INVALID_RESPONSE = 9;
     /**
      * An error code indicating that too many redirects were encountered
      * while processing the request.
      */
-    public final static int TOO_MANY_REDIRECTS = 10;
+    @Native public final static int TOO_MANY_REDIRECTS = 10;
     /**
      * An error code indicating that the requested local file was not found.
      */
-    public final static int FILE_NOT_FOUND = 11;
+    @Native public final static int FILE_NOT_FOUND = 11;
     /**
      * An error code indicating that an unknown error occurred.
      */
-    public final static int UNKNOWN_ERROR = 99;
+    @Native public final static int UNKNOWN_ERROR = 99;
 
 
     public void dispatchLoadEvent(long frame, int state,
--- a/modules/javafx.web/src/main/java/com/sun/webkit/event/WCFocusEvent.java	Thu Oct 06 21:30:22 2016 +0000
+++ b/modules/javafx.web/src/main/java/com/sun/webkit/event/WCFocusEvent.java	Sat Oct 08 06:28:49 2016 -0700
@@ -25,18 +25,20 @@
 
 package com.sun.webkit.event;
 
+import java.lang.annotation.Native;
+
 public final class WCFocusEvent {
 
     // id
-    public final static int WINDOW_ACTIVATED = 0;
-    public final static int WINDOW_DEACTIVATED = 1;
-    public final static int FOCUS_GAINED = 2;
-    public final static int FOCUS_LOST = 3;
+    @Native public final static int WINDOW_ACTIVATED = 0;
+    @Native public final static int WINDOW_DEACTIVATED = 1;
+    @Native public final static int FOCUS_GAINED = 2;
+    @Native public final static int FOCUS_LOST = 3;
 
     // direction
-    public final static int UNKNOWN = -1;
-    public final static int FORWARD = 0;
-    public final static int BACKWARD = 1;
+    @Native public final static int UNKNOWN = -1;
+    @Native public final static int FORWARD = 0;
+    @Native public final static int BACKWARD = 1;
 
     private final int id;
     private final int direction;
--- a/modules/javafx.web/src/main/java/com/sun/webkit/event/WCKeyEvent.java	Thu Oct 06 21:30:22 2016 +0000
+++ b/modules/javafx.web/src/main/java/com/sun/webkit/event/WCKeyEvent.java	Sat Oct 08 06:28:49 2016 -0700
@@ -25,29 +25,31 @@
 
 package com.sun.webkit.event;
 
+import java.lang.annotation.Native;
+
 public final class WCKeyEvent {
 
     // Event types
-    public static final int KEY_TYPED       = 0;
-    public static final int KEY_PRESSED     = 1;
-    public static final int KEY_RELEASED    = 2;
+    @Native public static final int KEY_TYPED       = 0;
+    @Native public static final int KEY_PRESSED     = 1;
+    @Native public static final int KEY_RELEASED    = 2;
 
     // Windows virtual key code constants used by WebKit Java port
-    public static final int VK_BACK         = 0x08;
-    public static final int VK_TAB          = 0x09;
-    public static final int VK_RETURN       = 0x0D;
-    public static final int VK_ESCAPE       = 0x1B;
-    public static final int VK_PRIOR        = 0x21;
-    public static final int VK_NEXT         = 0x22;
-    public static final int VK_END          = 0x23;
-    public static final int VK_HOME         = 0x24;
-    public static final int VK_LEFT         = 0x25;
-    public static final int VK_UP           = 0x26;
-    public static final int VK_RIGHT        = 0x27;
-    public static final int VK_DOWN         = 0x28;
-    public static final int VK_INSERT       = 0x2D;
-    public static final int VK_DELETE       = 0x2E;
-    public static final int VK_OEM_PERIOD   = 0xBE;
+    @Native public static final int VK_BACK         = 0x08;
+    @Native public static final int VK_TAB          = 0x09;
+    @Native public static final int VK_RETURN       = 0x0D;
+    @Native public static final int VK_ESCAPE       = 0x1B;
+    @Native public static final int VK_PRIOR        = 0x21;
+    @Native public static final int VK_NEXT         = 0x22;
+    @Native public static final int VK_END          = 0x23;
+    @Native public static final int VK_HOME         = 0x24;
+    @Native public static final int VK_LEFT         = 0x25;
+    @Native public static final int VK_UP           = 0x26;
+    @Native public static final int VK_RIGHT        = 0x27;
+    @Native public static final int VK_DOWN         = 0x28;
+    @Native public static final int VK_INSERT       = 0x2D;
+    @Native public static final int VK_DELETE       = 0x2E;
+    @Native public static final int VK_OEM_PERIOD   = 0xBE;
 
 
     private final int type;
--- a/modules/javafx.web/src/main/java/com/sun/webkit/event/WCMouseEvent.java	Thu Oct 06 21:30:22 2016 +0000
+++ b/modules/javafx.web/src/main/java/com/sun/webkit/event/WCMouseEvent.java	Sat Oct 08 06:28:49 2016 -0700
@@ -25,20 +25,22 @@
 
 package com.sun.webkit.event;
 
+import java.lang.annotation.Native;
+
 public final class WCMouseEvent {
 
     // id
-    public final static int MOUSE_PRESSED = 0;
-    public final static int MOUSE_RELEASED = 1;
-    public final static int MOUSE_MOVED = 2;
-    public final static int MOUSE_DRAGGED = 3;
-    public final static int MOUSE_WHEEL = 4;
+    @Native public final static int MOUSE_PRESSED = 0;
+    @Native public final static int MOUSE_RELEASED = 1;
+    @Native public final static int MOUSE_MOVED = 2;
+    @Native public final static int MOUSE_DRAGGED = 3;
+    @Native public final static int MOUSE_WHEEL = 4;
 
     // button
-    public final static int NOBUTTON = 0;
-    public final static int BUTTON1 = 1;
-    public final static int BUTTON2 = 2;
-    public final static int BUTTON3 = 4;
+    @Native public final static int NOBUTTON = 0;
+    @Native public final static int BUTTON1 = 1;
+    @Native public final static int BUTTON2 = 2;
+    @Native public final static int BUTTON3 = 4;
 
     private final int id;
     private final long when;
--- a/modules/javafx.web/src/main/java/com/sun/webkit/graphics/GraphicsDecoder.java	Thu Oct 06 21:30:22 2016 +0000
+++ b/modules/javafx.web/src/main/java/com/sun/webkit/graphics/GraphicsDecoder.java	Sat Oct 08 06:28:49 2016 -0700
@@ -25,63 +25,64 @@
 
 package com.sun.webkit.graphics;
 
+import java.lang.annotation.Native;
 import java.nio.ByteBuffer;
 import java.nio.ByteOrder;
 import java.util.logging.Logger;
 
 public final class GraphicsDecoder  {
-    public final static int FILLRECT_FFFFI         = 0;
-    public final static int SETFILLCOLOR           = 1;
-    public final static int SETSTROKESTYLE         = 2;
-    public final static int SETSTROKECOLOR         = 3;
-    public final static int SETSTROKEWIDTH         = 4;
-    public final static int DRAWPOLYGON            = 6;
-    public final static int DRAWLINE               = 7;
-    public final static int DRAWIMAGE              = 8;
-    public final static int DRAWICON               = 9;
-    public final static int DRAWPATTERN            = 10;
-    public final static int TRANSLATE              = 11;
-    public final static int SAVESTATE              = 12;
-    public final static int RESTORESTATE           = 13;
-    public final static int CLIP_PATH              = 14;
-    public final static int SETCLIP_IIII           = 15;
-    public final static int DRAWRECT               = 16;
-    public final static int SETCOMPOSITE           = 17;
-    public final static int STROKEARC              = 18;
-    public final static int DRAWELLIPSE            = 19;
-    public final static int DRAWFOCUSRING          = 20;
-    public final static int SETALPHA               = 21;
-    public final static int BEGINTRANSPARENCYLAYER = 22;
-    public final static int ENDTRANSPARENCYLAYER   = 23;
-    public final static int STROKE_PATH            = 24;
-    public final static int FILL_PATH              = 25;
-    public final static int GETIMAGE               = 26;
-    public final static int SCALE                  = 27;
-    public final static int SETSHADOW              = 28;
-    public final static int DRAWSTRING             = 29;
-    public final static int DRAWSTRING_FAST        = 31;
-    public final static int DRAWWIDGET             = 33;
-    public final static int DRAWSCROLLBAR          = 34;
-    public final static int CLEARRECT_FFFF         = 36;
-    public final static int STROKERECT_FFFFF       = 37;
-    public final static int RENDERMEDIAPLAYER      = 38;
-    public final static int CONCATTRANSFORM_FFFFFF = 39;
-    public final static int COPYREGION             = 40;
-    public final static int DECODERQ               = 41;
-    public final static int SET_TRANSFORM          = 42;
-    public final static int ROTATE                 = 43;
-    public final static int RENDERMEDIACONTROL     = 44;
-    public final static int RENDERMEDIA_TIMETRACK  = 45;
-    public final static int RENDERMEDIA_VOLUMETRACK = 46;
-    public final static int FILLRECT_FFFF          = 47;
-    public final static int FILL_ROUNDED_RECT      = 48;
-    public final static int SET_FILL_GRADIENT      = 49;
-    public final static int SET_STROKE_GRADIENT    = 50;
-    public final static int SET_LINE_DASH          = 51;
-    public final static int SET_LINE_CAP           = 52;
-    public final static int SET_LINE_JOIN          = 53;
-    public final static int SET_MITER_LIMIT        = 54;
-    public final static int SET_TEXT_MODE          = 55;
+    @Native public final static int FILLRECT_FFFFI         = 0;
+    @Native public final static int SETFILLCOLOR           = 1;
+    @Native public final static int SETSTROKESTYLE         = 2;
+    @Native public final static int SETSTROKECOLOR         = 3;
+    @Native public final static int SETSTROKEWIDTH         = 4;
+    @Native public final static int DRAWPOLYGON            = 6;
+    @Native public final static int DRAWLINE               = 7;
+    @Native public final static int DRAWIMAGE              = 8;
+    @Native public final static int DRAWICON               = 9;
+    @Native public final static int DRAWPATTERN            = 10;
+    @Native public final static int TRANSLATE              = 11;
+    @Native public final static int SAVESTATE              = 12;
+    @Native public final static int RESTORESTATE           = 13;
+    @Native public final static int CLIP_PATH              = 14;
+    @Native public final static int SETCLIP_IIII           = 15;
+    @Native public final static int DRAWRECT               = 16;
+    @Native public final static int SETCOMPOSITE           = 17;
+    @Native public final static int STROKEARC              = 18;
+    @Native public final static int DRAWELLIPSE            = 19;
+    @Native public final static int DRAWFOCUSRING          = 20;
+    @Native public final static int SETALPHA               = 21;
+    @Native public final static int BEGINTRANSPARENCYLAYER = 22;
+    @Native public final static int ENDTRANSPARENCYLAYER   = 23;
+    @Native public final static int STROKE_PATH            = 24;
+    @Native public final static int FILL_PATH              = 25;
+    @Native public final static int GETIMAGE               = 26;
+    @Native public final static int SCALE                  = 27;
+    @Native public final static int SETSHADOW              = 28;
+    @Native public final static int DRAWSTRING             = 29;
+    @Native public final static int DRAWSTRING_FAST        = 31;
+    @Native public final static int DRAWWIDGET             = 33;
+    @Native public final static int DRAWSCROLLBAR          = 34;
+    @Native public final static int CLEARRECT_FFFF         = 36;
+    @Native public final static int STROKERECT_FFFFF       = 37;
+    @Native public final static int RENDERMEDIAPLAYER      = 38;
+    @Native public final static int CONCATTRANSFORM_FFFFFF = 39;
+    @Native public final static int COPYREGION             = 40;
+    @Native public final static int DECODERQ               = 41;
+    @Native public final static int SET_TRANSFORM          = 42;
+    @Native public final static int ROTATE                 = 43;
+    @Native public final static int RENDERMEDIACONTROL     = 44;
+    @Native public final static int RENDERMEDIA_TIMETRACK  = 45;
+    @Native public final static int RENDERMEDIA_VOLUMETRACK = 46;
+    @Native public final static int FILLRECT_FFFF          = 47;
+    @Native public final static int FILL_ROUNDED_RECT      = 48;
+    @Native public final static int SET_FILL_GRADIENT      = 49;
+    @Native public final static int SET_STROKE_GRADIENT    = 50;
+    @Native public final static int SET_LINE_DASH          = 51;
+    @Native public final static int SET_LINE_CAP           = 52;
+    @Native public final static int SET_LINE_JOIN          = 53;
+    @Native public final static int SET_MITER_LIMIT        = 54;
+    @Native public final static int SET_TEXT_MODE          = 55;
 
     private final static Logger log =
         Logger.getLogger(GraphicsDecoder.class.getName());
--- a/modules/javafx.web/src/main/java/com/sun/webkit/graphics/RenderMediaControls.java	Thu Oct 06 21:30:22 2016 +0000
+++ b/modules/javafx.web/src/main/java/com/sun/webkit/graphics/RenderMediaControls.java	Sat Oct 08 06:28:49 2016 -0700
@@ -25,6 +25,7 @@
 
 package com.sun.webkit.graphics;
 
+import java.lang.annotation.Native;
 import java.util.HashMap;
 import java.util.Map;
 
@@ -32,27 +33,27 @@
     /**
      * Media control part constants (types for the paintControl method)
      */
-    private static final int PLAY_BUTTON                     = 1;
-    private static final int PAUSE_BUTTON                    = 2;
-    private static final int DISABLED_PLAY_BUTTON            = 3;
+    @Native private static final int PLAY_BUTTON                     = 1;
+    @Native private static final int PAUSE_BUTTON                    = 2;
+    @Native private static final int DISABLED_PLAY_BUTTON            = 3;
 
-    private static final int MUTE_BUTTON                     = 4;
-    private static final int UNMUTE_BUTTON                   = 5;
-    private static final int DISABLED_MUTE_BUTTON            = 6;
+    @Native private static final int MUTE_BUTTON                     = 4;
+    @Native private static final int UNMUTE_BUTTON                   = 5;
+    @Native private static final int DISABLED_MUTE_BUTTON            = 6;
 
-    //private static final int FULLSCREEN_BUTTON               = 7;
+    //@Native private static final int FULLSCREEN_BUTTON               = 7;
 
     // background for control panel (except buttons)
-    //private static final int BACKGROUND                      = 8;
+    //@Native private static final int BACKGROUND                      = 8;
 
     // Time slider track is rendered by paintTimeSliderTrack
-    private static final int TIME_SLIDER_TRACK               = 9;
-    private static final int TIME_SLIDER_THUMB               = 10;
+    @Native private static final int TIME_SLIDER_TRACK               = 9;
+    @Native private static final int TIME_SLIDER_THUMB               = 10;
 
-    private static final int VOLUME_CONTAINER                = 11;
+    @Native private static final int VOLUME_CONTAINER                = 11;
     // Volume slider track is rendered by paintVolumeTrack
-    private static final int VOLUME_TRACK                    = 12;
-    private static final int VOLUME_THUMB                    = 13;
+    @Native private static final int VOLUME_TRACK                    = 12;
+    @Native private static final int VOLUME_THUMB                    = 13;
 
     //private static final int CURRENT_TIME                    = 14;
     //private static final int REMAINING_TIME                  = 15;
--- a/modules/javafx.web/src/main/java/com/sun/webkit/graphics/RenderTheme.java	Thu Oct 06 21:30:22 2016 +0000
+++ b/modules/javafx.web/src/main/java/com/sun/webkit/graphics/RenderTheme.java	Sat Oct 08 06:28:49 2016 -0700
@@ -27,29 +27,30 @@
 
 import java.nio.ByteBuffer;
 
+import java.lang.annotation.Native;
 
 public abstract class RenderTheme extends Ref {
 
-    public static final int TEXT_FIELD = 0;
-    public static final int BUTTON = 1;
-    public static final int CHECK_BOX = 2;
-    public static final int RADIO_BUTTON = 3;
-    public static final int MENU_LIST = 4;
-    public static final int MENU_LIST_BUTTON = 5;
-    public static final int SLIDER = 6;
-    public static final int PROGRESS_BAR = 7;
-    public static final int METER = 8;
+    @Native public static final int TEXT_FIELD = 0;
+    @Native public static final int BUTTON = 1;
+    @Native public static final int CHECK_BOX = 2;
+    @Native public static final int RADIO_BUTTON = 3;
+    @Native public static final int MENU_LIST = 4;
+    @Native public static final int MENU_LIST_BUTTON = 5;
+    @Native public static final int SLIDER = 6;
+    @Native public static final int PROGRESS_BAR = 7;
+    @Native public static final int METER = 8;
 
-    public static final int CHECKED = 1 << 0;
-    public static final int INDETERMINATE = 1 << 1;
-    public static final int ENABLED = 1 << 2;
-    public static final int FOCUSED = 1 << 3;
-    public static final int PRESSED = 1 << 4;
-    public static final int HOVERED = 1 << 5;
-    public static final int READ_ONLY = 1 << 6;
+    @Native public static final int CHECKED = 1 << 0;
+    @Native public static final int INDETERMINATE = 1 << 1;
+    @Native public static final int ENABLED = 1 << 2;
+    @Native public static final int FOCUSED = 1 << 3;
+    @Native public static final int PRESSED = 1 << 4;
+    @Native public static final int HOVERED = 1 << 5;
+    @Native public static final int READ_ONLY = 1 << 6;
 
-    public static final int BACKGROUND = 0;
-    public static final int FOREGROUND = 1;
+    @Native public static final int BACKGROUND = 0;
+    @Native public static final int FOREGROUND = 1;
 
     protected abstract Ref createWidget(long id, int widgetIndex, int state, int w, int h, int bgColor, ByteBuffer extParams);
 
--- a/modules/javafx.web/src/main/java/com/sun/webkit/graphics/ScrollBarTheme.java	Thu Oct 06 21:30:22 2016 +0000
+++ b/modules/javafx.web/src/main/java/com/sun/webkit/graphics/ScrollBarTheme.java	Sat Oct 08 06:28:49 2016 -0700
@@ -25,20 +25,22 @@
 
 package com.sun.webkit.graphics;
 
+import java.lang.annotation.Native;
+
 public abstract class ScrollBarTheme extends Ref {
 
     // See constants values WebCore/platform/ScrollTypes.h
-    public static final int NO_PART = 0;
-    public static final int BACK_BUTTON_START_PART = 1;
-    public static final int FORWARD_BUTTON_START_PART = 1 << 1;
-    public static final int BACK_TRACK_PART = 1 << 2;
-    public static final int THUMB_PART = 1 << 3;
-    public static final int FORWARD_TRACK_PART = 1 << 4;
-    public static final int BACK_BUTTON_END_PART = 1 << 5;
-    public static final int FORWARD_BUTTON_END_PART = 1 << 6;
+    @Native public static final int NO_PART = 0;
+    @Native public static final int BACK_BUTTON_START_PART = 1;
+    @Native public static final int FORWARD_BUTTON_START_PART = 1 << 1;
+    @Native public static final int BACK_TRACK_PART = 1 << 2;
+    @Native public static final int THUMB_PART = 1 << 3;
+    @Native public static final int FORWARD_TRACK_PART = 1 << 4;
+    @Native public static final int BACK_BUTTON_END_PART = 1 << 5;
+    @Native public static final int FORWARD_BUTTON_END_PART = 1 << 6;
 
-    public static final int HORIZONTAL_SCROLLBAR = 0;
-    public static final int VERTICAL_SCROLLBAR = 1;
+    @Native public static final int HORIZONTAL_SCROLLBAR = 0;
+    @Native public static final int VERTICAL_SCROLLBAR = 1;
 
     private static int thickness;
 
--- a/modules/javafx.web/src/main/java/com/sun/webkit/graphics/WCPath.java	Thu Oct 06 21:30:22 2016 +0000
+++ b/modules/javafx.web/src/main/java/com/sun/webkit/graphics/WCPath.java	Sat Oct 08 06:28:49 2016 -0700
@@ -25,6 +25,8 @@
 
 package com.sun.webkit.graphics;
 
+import java.lang.annotation.Native;
+
 public abstract class WCPath<P> extends Ref {
 
     /* The WindRule should be compliant with
@@ -40,7 +42,7 @@
      * of times in the counter-clockwise direction than the
      * clockwise direction.
      */
-    public static final int RULE_NONZERO = 0;
+    @Native public static final int RULE_NONZERO = 0;
 
     /**
      * The winding rule constant for specifying an even-odd rule
@@ -49,7 +51,7 @@
      * path if a ray drawn in any direction from that point to
      * infinity is crossed by path segments an odd number of times.
      */
-    public static final int RULE_EVENODD = 1;
+    @Native public static final int RULE_EVENODD = 1;
 
     public abstract void addRect(double x, double y, double w, double h);
 
--- a/modules/javafx.web/src/main/java/com/sun/webkit/graphics/WCPathIterator.java	Thu Oct 06 21:30:22 2016 +0000
+++ b/modules/javafx.web/src/main/java/com/sun/webkit/graphics/WCPathIterator.java	Sat Oct 08 06:28:49 2016 -0700
@@ -25,13 +25,15 @@
 
 package com.sun.webkit.graphics;
 
+import java.lang.annotation.Native;
+
 public interface WCPathIterator {
 
-    public static final int SEG_MOVETO = 0;
-    public static final int SEG_LINETO = 1;
-    public static final int SEG_QUADTO = 2;
-    public static final int SEG_CUBICTO = 3;
-    public static final int SEG_CLOSE = 4;
+    @Native public static final int SEG_MOVETO = 0;
+    @Native public static final int SEG_LINETO = 1;
+    @Native public static final int SEG_QUADTO = 2;
+    @Native public static final int SEG_CUBICTO = 3;
+    @Native public static final int SEG_CLOSE = 4;
 
     public int getWindingRule();
 
--- a/modules/javafx.web/src/main/java/com/sun/webkit/graphics/WCRenderQueue.java	Thu Oct 06 21:30:22 2016 +0000
+++ b/modules/javafx.web/src/main/java/com/sun/webkit/graphics/WCRenderQueue.java	Sat Oct 08 06:28:49 2016 -0700
@@ -25,6 +25,7 @@
 
 package com.sun.webkit.graphics;
 
+import java.lang.annotation.Native;
 import com.sun.webkit.Invoker;
 import java.nio.ByteBuffer;
 import java.util.HashMap;
@@ -37,7 +38,7 @@
     private final static AtomicInteger idCountObj = new AtomicInteger(0);
     private final static Logger log =
         Logger.getLogger(WCRenderQueue.class.getName());
-    public final static int MAX_QUEUE_SIZE = 0x80000;
+    @Native public final static int MAX_QUEUE_SIZE = 0x80000;
 
     private final LinkedList<BufferData> buffers = new LinkedList<BufferData>();
     private BufferData currentBuffer = new BufferData();
--- a/modules/javafx.web/src/main/java/com/sun/webkit/text/TextBreakIterator.java	Thu Oct 06 21:30:22 2016 +0000
+++ b/modules/javafx.web/src/main/java/com/sun/webkit/text/TextBreakIterator.java	Sat Oct 08 06:28:49 2016 -0700
@@ -25,6 +25,7 @@
 
 package com.sun.webkit.text;
 
+import java.lang.annotation.Native;
 import java.text.BreakIterator;
 import java.text.CharacterIterator;
 import java.util.HashMap;
@@ -34,21 +35,21 @@
 final class TextBreakIterator {
 
     // Break iterator types
-    static final int CHARACTER_ITERATOR = 0;
-    static final int WORD_ITERATOR = 1;
-    static final int LINE_ITERATOR = 2;
-    static final int SENTENCE_ITERATOR = 3;
+    @Native static final int CHARACTER_ITERATOR = 0;
+    @Native static final int WORD_ITERATOR = 1;
+    @Native static final int LINE_ITERATOR = 2;
+    @Native static final int SENTENCE_ITERATOR = 3;
 
     // Break iterator methods
-    static final int TEXT_BREAK_FIRST = 0;
-    static final int TEXT_BREAK_LAST = 1;
-    static final int TEXT_BREAK_NEXT = 2;
-    static final int TEXT_BREAK_PREVIOUS = 3;
-    static final int TEXT_BREAK_CURRENT = 4;
-    static final int TEXT_BREAK_PRECEDING = 5;
-    static final int TEXT_BREAK_FOLLOWING = 6;
-    static final int IS_TEXT_BREAK = 7;
-    static final int IS_WORD_TEXT_BREAK = 8;
+    @Native static final int TEXT_BREAK_FIRST = 0;
+    @Native static final int TEXT_BREAK_LAST = 1;
+    @Native static final int TEXT_BREAK_NEXT = 2;
+    @Native static final int TEXT_BREAK_PREVIOUS = 3;
+    @Native static final int TEXT_BREAK_CURRENT = 4;
+    @Native static final int TEXT_BREAK_PRECEDING = 5;
+    @Native static final int TEXT_BREAK_FOLLOWING = 6;
+    @Native static final int IS_TEXT_BREAK = 7;
+    @Native static final int IS_WORD_TEXT_BREAK = 8;
 
     // The cache key is the combination of iterator type and locale name.
     private final static class CacheKey {
--- a/modules/javafx.web/src/main/java/com/sun/webkit/text/TextNormalizer.java	Thu Oct 06 21:30:22 2016 +0000
+++ b/modules/javafx.web/src/main/java/com/sun/webkit/text/TextNormalizer.java	Sat Oct 08 06:28:49 2016 -0700
@@ -25,15 +25,16 @@
 
 package com.sun.webkit.text;
 
+import java.lang.annotation.Native;
 import java.text.Normalizer;
 
 final class TextNormalizer {
 
     // Text normalization forms
-    private static final int FORM_NFC = 0;
-    private static final int FORM_NFD = 1;
-    private static final int FORM_NFKC = 2;
-    private static final int FORM_NFKD = 3;
+    @Native private static final int FORM_NFC = 0;
+    @Native private static final int FORM_NFD = 1;
+    @Native private static final int FORM_NFKC = 2;
+    @Native private static final int FORM_NFKD = 3;
 
     private static String normalize(String data, int type) {
         Normalizer.Form form;
--- a/modules/javafx.web/src/main/native/Source/JavaScriptCore/runtime/WatchdogJava.cpp	Thu Oct 06 21:30:22 2016 +0000
+++ b/modules/javafx.web/src/main/native/Source/JavaScriptCore/runtime/WatchdogJava.cpp	Sat Oct 08 06:28:49 2016 -0700
@@ -5,8 +5,6 @@
 #include "config.h"
 #include "Watchdog.h"
 
-#include "com_sun_webkit_WatchdogTimer.h"
-
 namespace JSC {
 
 static jclass GetWatchdogTimerClass(JNIEnv* env)
--- a/modules/javafx.web/src/main/native/Source/WebCore/platform/java/PasteboardJava.cpp	Thu Oct 06 21:30:22 2016 +0000
+++ b/modules/javafx.web/src/main/native/Source/WebCore/platform/java/PasteboardJava.cpp	Sat Oct 08 06:28:49 2016 -0700
@@ -25,7 +25,6 @@
 #include "Attr.h"
 #include "HTMLNames.h"
 #include "HTMLParserIdioms.h"
-#include "com_sun_webkit_WCPasteboard.h"
 
 #include "wtf/Ref.h"
 
--- a/modules/jdk.packager/src/main/java/com/oracle/tools/packager/StandardBundlerParam.java	Thu Oct 06 21:30:22 2016 +0000
+++ b/modules/jdk.packager/src/main/java/com/oracle/tools/packager/StandardBundlerParam.java	Sat Oct 08 06:28:49 2016 -0700
@@ -156,7 +156,11 @@
                     params -> {
                         //FIXME sniff modules
                         extractMainClassInfoFromAppResources(params);
-                        return (String) params.get(BundleParams.PARAM_APPLICATION_CLASS);
+                        String s = (String) params.get(BundleParams.PARAM_APPLICATION_CLASS);
+                        if (s == null) {
+                            s = JLinkBundlerHelper.getMainClass(params);
+                        }
+                        return s;
                     },
                     (s, p) -> s
             );
--- a/modules/jdk.packager/src/main/java/com/oracle/tools/packager/windows/WinAppBundler.java	Thu Oct 06 21:30:22 2016 +0000
+++ b/modules/jdk.packager/src/main/java/com/oracle/tools/packager/windows/WinAppBundler.java	Sat Oct 08 06:28:49 2016 -0700
@@ -200,7 +200,7 @@
 
         String commandline;
         File runtimePath = JLinkBundlerHelper.getJDKHome(params).toFile();
-        File launcherPath = new File(runtimePath, "bin\\java");
+        File launcherPath = new File(runtimePath, "bin\\java.exe");
 
         ProcessBuilder pb = new ProcessBuilder(launcherPath.getAbsolutePath(), "-version");
         try (ByteArrayOutputStream baos = new ByteArrayOutputStream()) {
--- a/modules/jdk.packager/src/main/java/com/sun/javafx/tools/packager/DeployParams.java	Thu Oct 06 21:30:22 2016 +0000
+++ b/modules/jdk.packager/src/main/java/com/sun/javafx/tools/packager/DeployParams.java	Sat Oct 08 06:28:49 2016 -0700
@@ -535,7 +535,7 @@
 
         // Success
         if (((applicationClass != null && !applicationClass.isEmpty()) ||
-            !module.isEmpty())) {
+            (module != null && !module.isEmpty()))) {
             result = true;
         }
 
--- a/modules/jdk.packager/src/main/java/jdk/packager/builders/AbstractAppImageBuilder.java	Thu Oct 06 21:30:22 2016 +0000
+++ b/modules/jdk.packager/src/main/java/jdk/packager/builders/AbstractAppImageBuilder.java	Sat Oct 08 06:28:49 2016 -0700
@@ -205,7 +205,7 @@
                 // If the app is contained in an unnamed jar then launch it the
                 // legacy way and the main class string must be of the format com/foo/Main
                 out.println("app.mainclass=" + mainClass.replaceAll("\\.", "/"));
-                out.println("app.mainjar=" + mainJar);
+                out.println("app.mainjar=" + mainJar.toPath().getFileName().toString());
             }
         }
 
--- a/modules/jdk.packager/src/main/java/jdk/packager/internal/JLinkBundlerHelper.java	Thu Oct 06 21:30:22 2016 +0000
+++ b/modules/jdk.packager/src/main/java/jdk/packager/internal/JLinkBundlerHelper.java	Sat Oct 08 06:28:49 2016 -0700
@@ -30,6 +30,7 @@
 import com.oracle.tools.packager.BundlerParamInfo;
 import com.oracle.tools.packager.RelativeFileSet;
 import com.oracle.tools.packager.Log;
+import com.oracle.tools.packager.Platform;
 
 import java.io.ByteArrayOutputStream;
 import java.io.File;
@@ -240,6 +241,27 @@
 
         if (javaBasePath != null && javaBasePath.toFile().exists()) {
             result = javaBasePath.getParent();
+
+            // On a developer build the JDK Home isn't where we expect it
+            // relative to the jmods directory. Do some extra
+            // processing to find it.
+            if (result != null) {
+                boolean found = false;
+                Path bin = result.resolve("bin");
+
+                if (Files.exists(bin)) {
+                    final String exe = (Platform.getPlatform() == Platform.WINDOWS) ? ".exe" : "";
+                    Path javaExe = bin.resolve("java" + exe);
+
+                    if (Files.exists(javaExe)) {
+                        found = true;
+                    }
+                }
+
+                if (!found) {
+                    result = result.resolve(".." + File.separator + "jdk");
+                }
+            }
         }
 
         return result;
--- a/modules/jdk.packager/src/main/native/javapackager/win/javapackager.cpp	Thu Oct 06 21:30:22 2016 +0000
+++ b/modules/jdk.packager/src/main/native/javapackager/win/javapackager.cpp	Sat Oct 08 06:28:49 2016 -0700
@@ -409,9 +409,7 @@
                             }
                         }
                     }
-
                 }
-
             }
         }
 
@@ -443,6 +441,22 @@
     }
 }
 
+#define TRAILING_PATHSEPARATOR '\\'
+
+std::wstring ExtractFilePath(std::wstring Path) {
+    std::wstring result;
+    size_t slash = Path.find_last_of(TRAILING_PATHSEPARATOR);
+    if (slash != std::wstring::npos)
+        result = Path.substr(0, slash);
+    return result;
+}
+
+std::wstring GetCurrentExecutableName() {
+    TCHAR FileName[MAX_PATH];
+    GetModuleFileName(NULL, FileName, MAX_PATH);
+    return FileName;
+}
+
 int wmain(int argc, wchar_t* argv[]) {
     wchar_t buf[MAX_PATH];
     GetModuleFileName(NULL, buf, MAX_PATH);
@@ -466,7 +480,8 @@
         }
     }
     else {
-        javacmd = L"";
+        std::wstring exe = GetCurrentExecutableName();
+        javacmd = ExtractFilePath(exe) + L"\\java.exe";
     }
 
     if (javacmd.length() <= 0) {
@@ -475,8 +490,9 @@
             javacmd = jv2->path;
             javahome = jv2->home;
         }
-        else
+        else {
             javacmd = L"java.exe";
+        }
     }
 
     std::wstring cmd = L"\"" + javacmd + L"\"";