Merge
authorjwilhelm
Fri, 06 Apr 2018 03:53:28 +0200
changeset 49679 7084eec5c723
parent 49678 fa26e7c6efb7 (current diff)
parent 49520 7a64b48586d8 (diff)
child 49680 2e681d678ec8
child 49708 6709f13dccd3
Merge
make/autoconf/flags-cflags.m4
make/autoconf/platform.m4
make/hotspot/lib/CompileLibjsig.gmk
make/lib/Awt2dLibraries.gmk
make/lib/SoundLibraries.gmk
make/mapfiles/libattach/mapfile-aix
make/mapfiles/libattach/mapfile-linux
make/mapfiles/libattach/mapfile-solaris
make/mapfiles/libattach/reorder-windows-x86
make/mapfiles/libattach/reorder-windows-x86_64
make/mapfiles/libawt/mapfile-mawt-vers
make/mapfiles/libawt/mapfile-vers
make/mapfiles/libawt/mapfile-vers-linux
make/mapfiles/libawt_headless/mapfile-vers
make/mapfiles/libawt_headless/reorder-sparc
make/mapfiles/libawt_headless/reorder-sparcv9
make/mapfiles/libawt_headless/reorder-x86
make/mapfiles/libawt_xawt/mapfile-vers
make/mapfiles/libdt_socket/mapfile-vers
make/mapfiles/libextnet/mapfile-linux
make/mapfiles/libextnet/mapfile-solaris
make/mapfiles/libfontmanager/mapfile-vers
make/mapfiles/libinstrument/mapfile-vers
make/mapfiles/libj2gss/mapfile-vers
make/mapfiles/libj2pcsc/mapfile-vers
make/mapfiles/libj2pkcs11/mapfile-vers
make/mapfiles/libj2ucrypto/mapfile-vers
make/mapfiles/libjaas/mapfile-vers
make/mapfiles/libjava/mapfile-vers
make/mapfiles/libjava/reorder-sparc
make/mapfiles/libjava/reorder-sparcv9
make/mapfiles/libjava/reorder-x86
make/mapfiles/libjawt/mapfile-vers
make/mapfiles/libjdwp/mapfile-vers
make/mapfiles/libjimage/mapfile-vers
make/mapfiles/libjli/mapfile-vers
make/mapfiles/libjpeg/mapfile-vers
make/mapfiles/libjpeg/reorder-sparc
make/mapfiles/libjpeg/reorder-sparcv9
make/mapfiles/libjpeg/reorder-x86
make/mapfiles/libjsdt/mapfile-vers
make/mapfiles/libjsig/mapfile-vers-solaris
make/mapfiles/liblcms/mapfile-vers
make/mapfiles/libmanagement/mapfile-vers
make/mapfiles/libmanagement_agent/mapfile-vers
make/mapfiles/libmanagement_ext/mapfile-vers
make/mapfiles/libmlib_image/mapfile-vers
make/mapfiles/libnet/mapfile-vers
make/mapfiles/libnio/mapfile-aix
make/mapfiles/libnio/mapfile-linux
make/mapfiles/libnio/mapfile-macosx
make/mapfiles/libnio/mapfile-solaris
make/mapfiles/libnio/reorder-sparc
make/mapfiles/libnio/reorder-sparcv9
make/mapfiles/libnio/reorder-x86
make/mapfiles/libprefs/mapfile-vers
make/mapfiles/librmi/mapfile-vers
make/mapfiles/libsaproc/mapfile-linux
make/mapfiles/libsaproc/mapfile-macosx
make/mapfiles/libsaproc/mapfile-solaris
make/mapfiles/libsctp/mapfile-vers
make/mapfiles/libsplashscreen/mapfile-vers
make/mapfiles/libsunec/mapfile-vers
make/mapfiles/libunpack/mapfile-vers
make/mapfiles/libverify/mapfile-vers
make/mapfiles/libverify/reorder-sparc
make/mapfiles/libverify/reorder-sparcv9
make/mapfiles/libverify/reorder-x86
make/mapfiles/libzip/mapfile-vers
make/mapfiles/libzip/reorder-sparc
make/mapfiles/libzip/reorder-sparcv9
make/mapfiles/libzip/reorder-x86
src/bsd/doc/man/ja/javah.1
src/bsd/doc/man/java.1
src/bsd/doc/man/javah.1
src/hotspot/share/gc/g1/g1BarrierSet.cpp
src/hotspot/share/gc/parallel/psCardTable.cpp
src/hotspot/share/runtime/interfaceSupport.inline.hpp
src/java.base/share/classes/sun/nio/ch/AbstractPollArrayWrapper.java
src/java.base/share/classes/sun/nio/ch/AbstractPollSelectorImpl.java
src/java.base/share/classes/sun/nio/ch/PollSelectorProvider.java
src/java.base/solaris/classes/sun/nio/ch/EventPortWrapper.java
src/java.base/unix/classes/sun/nio/ch/PollArrayWrapper.java
src/java.base/unix/classes/sun/nio/ch/PollSelectorProvider.java
src/java.base/unix/native/libnio/ch/PollArrayWrapper.c
src/java.base/unix/native/libnio/ch/PollSelectorImpl.c
src/linux/doc/man/ja/javah.1
src/linux/doc/man/java.1
src/linux/doc/man/javah.1
src/solaris/doc/sun/man/man1/ja/javah.1
src/solaris/doc/sun/man/man1/java.1
src/solaris/doc/sun/man/man1/javah.1
test/hotspot/jtreg/ProblemList.txt
test/jdk/java/io/ByteArrayOutputStream/Write.java
test/jdk/java/io/ByteArrayOutputStream/WriteBounds.java
test/jdk/java/lang/SecurityManager/DepMethodsRequireAllPerm.java
--- a/.hgtags	Thu Apr 05 11:18:39 2018 -0700
+++ b/.hgtags	Fri Apr 06 03:53:28 2018 +0200
@@ -477,3 +477,4 @@
 e59941f7247d451fa7df9eaef3fce0f492f8420c jdk-11+4
 d5c43e9f08fb9a7c74aae0d48daf17f2ad2afaef jdk-11+5
 3acb379b86725c47e7f33358cb22efa8752ae532 jdk-11+6
+f7363de371c9a1f668bd0a01b7df3d1ddb9cc58b jdk-11+7
--- a/make/CompileDemos.gmk	Thu Apr 05 11:18:39 2018 -0700
+++ b/make/CompileDemos.gmk	Fri Apr 06 03:53:28 2018 +0200
@@ -242,6 +242,13 @@
     DEMO_SUBDIR := jfc, \
 ))
 
+$(eval $(call SetupBuildDemo, SwingSet2, \
+    DEMO_SUBDIR := jfc, \
+    EXTRA_COPY_TO_JAR := .java, \
+    EXTRA_MANIFEST_ATTR := SplashScreen-Image: resources/images/splash.png, \
+    DISABLE_SJAVAC := true, \
+))
+
 $(eval $(call SetupBuildDemo, Font2DTest, \
     DEMO_SUBDIR := jfc, \
 ))
--- a/make/CompileJavaModules.gmk	Thu Apr 05 11:18:39 2018 -0700
+++ b/make/CompileJavaModules.gmk	Fri Apr 06 03:53:28 2018 +0200
@@ -51,14 +51,6 @@
 # data files and shouldn't go in the product
 java.base_EXCLUDE_FILES += sun/text/resources/BreakIteratorRules.java
 
-ifneq ($(filter solaris macosx linux windows,$(OPENJDK_TARGET_OS)), )
-  java.base_EXCLUDE_FILES += \
-      sun/nio/ch/AbstractPollSelectorImpl.java \
-      sun/nio/ch/PollSelectorImpl.java \
-      sun/nio/ch/PollSelectorProvider.java \
-      #
-endif
-
 ifneq ($(OPENJDK_TARGET_OS), solaris)
   java.base_EXCLUDE_FILES += \
       SolarisLoginModule.java \
--- a/make/Docs.gmk	Thu Apr 05 11:18:39 2018 -0700
+++ b/make/Docs.gmk	Fri Apr 06 03:53:28 2018 +0200
@@ -64,7 +64,7 @@
 JAVADOC_BASE_URL := http://www.oracle.com/pls/topic/lookup?ctx=javase10&id=homepage
 BUG_SUBMIT_URL := http://bugreport.java.com/bugreport/
 COPYRIGHT_URL := {@docroot}/../legal/copyright.html
-LICENSE_URL := http://www.oracle.com/technetwork/java/javase/terms/license/java10speclicense.html
+LICENSE_URL := http://www.oracle.com/technetwork/java/javase/terms/license/java$(VERSION_NUMBER)speclicense.html
 REDISTRIBUTION_URL := http://www.oracle.com/technetwork/java/redist-137594.html
 
 # In order to get a specific ordering it's necessary to specify the total
@@ -108,7 +108,7 @@
 # The initial set of options for javadoc
 JAVADOC_OPTIONS := -use -keywords -notimestamp \
     -serialwarn -encoding ISO-8859-1 -docencoding UTF-8 -breakiterator \
-    -splitIndex --system none -html5 -javafx --expand-requires transitive \
+    -splitIndex --system none -javafx --expand-requires transitive \
     --override-methods=summary
 
 # The reference options must stay stable to allow for comparisons across the
--- a/make/Main.gmk	Thu Apr 05 11:18:39 2018 -0700
+++ b/make/Main.gmk	Fri Apr 06 03:53:28 2018 +0200
@@ -266,14 +266,11 @@
 
 $(foreach v, $(JVM_VARIANTS), $(eval $(call DeclareHotspotLibsRecipe,$v)))
 
-hotspot-jsig:
-	+($(CD) $(TOPDIR)/make/hotspot && $(MAKE) $(MAKE_ARGS) -f lib/CompileLibjsig.gmk)
-
 hotspot-ide-project:
 	+($(CD) $(TOPDIR)/make/hotspot && $(MAKE) $(MAKE_ARGS) -f ide/CreateVSProject.gmk)
 
 ALL_TARGETS += $(HOTSPOT_VARIANT_TARGETS) $(HOTSPOT_VARIANT_GENSRC_TARGETS) \
-    $(HOTSPOT_VARIANT_LIBS_TARGETS) hotspot-jsig hotspot-ide-project
+    $(HOTSPOT_VARIANT_LIBS_TARGETS) hotspot-ide-project
 
 ################################################################################
 # Build demos targets
@@ -909,9 +906,7 @@
 buildtools: buildtools-langtools interim-langtools interim-rmic \
     buildtools-jdk $(JVM_TOOLS_TARGETS)
 
-hotspot: $(HOTSPOT_VARIANT_TARGETS) hotspot-jsig
-
-hotspot-libs: hotspot-jsig
+hotspot: $(HOTSPOT_VARIANT_TARGETS)
 
 # Create targets hotspot-libs and hotspot-gensrc.
 $(foreach v, $(JVM_VARIANTS), \
--- a/make/autoconf/flags-cflags.m4	Thu Apr 05 11:18:39 2018 -0700
+++ b/make/autoconf/flags-cflags.m4	Fri Apr 06 03:53:28 2018 +0200
@@ -394,8 +394,6 @@
     CFLAGS_OS_DEF_JVM="-D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
   fi
 
-  # Setup target OS define. Use OS target name but in upper case.
-  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
   CFLAGS_OS_DEF_JDK="$CFLAGS_OS_DEF_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
 
   #### GLOBAL DEFINES
--- a/make/autoconf/flags-ldflags.m4	Thu Apr 05 11:18:39 2018 -0700
+++ b/make/autoconf/flags-ldflags.m4	Fri Apr 06 03:53:28 2018 +0200
@@ -99,7 +99,7 @@
   elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
     BASIC_LDFLAGS="-nologo -opt:ref"
     BASIC_LDFLAGS_JDK_ONLY="-incremental:no"
-    BASIC_LDFLAGS_JVM_ONLY="-opt:icf,8 -subsystem:windows -base:0x8000000"
+    BASIC_LDFLAGS_JVM_ONLY="-opt:icf,8 -subsystem:windows"
   fi
 
   # Setup OS-dependent LDFLAGS
--- a/make/autoconf/flags.m4	Thu Apr 05 11:18:39 2018 -0700
+++ b/make/autoconf/flags.m4	Fri Apr 06 03:53:28 2018 +0200
@@ -237,7 +237,11 @@
     MACHINE_FLAG="-q${OPENJDK_TARGET_CPU_BITS}"
   elif test "x$TOOLCHAIN_TYPE" != xmicrosoft; then
     if test "x$OPENJDK_TARGET_CPU" != xaarch64 &&
-        test "x$OPENJDK_TARGET_CPU" != xarm; then
+       test "x$OPENJDK_TARGET_CPU" != xarm &&
+       test "x$OPENJDK_TARGET_CPU" != xmips &&
+       test "x$OPENJDK_TARGET_CPU" != xmipsel &&
+       test "x$OPENJDK_TARGET_CPU" != xmips64 &&
+       test "x$OPENJDK_TARGET_CPU" != xmips64el; then 
       MACHINE_FLAG="-m${OPENJDK_TARGET_CPU_BITS}"
     fi
   fi
--- a/make/autoconf/platform.m4	Thu Apr 05 11:18:39 2018 -0700
+++ b/make/autoconf/platform.m4	Fri Apr 06 03:53:28 2018 +0200
@@ -262,9 +262,12 @@
   OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
   OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
   OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
+  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+
   AC_SUBST(OPENJDK_TARGET_OS)
   AC_SUBST(OPENJDK_TARGET_OS_TYPE)
   AC_SUBST(OPENJDK_TARGET_OS_ENV)
+  AC_SUBST(OPENJDK_TARGET_OS_UPPERCASE)
   AC_SUBST(OPENJDK_TARGET_CPU)
   AC_SUBST(OPENJDK_TARGET_CPU_ARCH)
   AC_SUBST(OPENJDK_TARGET_CPU_BITS)
--- a/make/autoconf/spec.gmk.in	Thu Apr 05 11:18:39 2018 -0700
+++ b/make/autoconf/spec.gmk.in	Fri Apr 06 03:53:28 2018 +0200
@@ -65,6 +65,7 @@
 OPENJDK_TARGET_OS:=@OPENJDK_TARGET_OS@
 OPENJDK_TARGET_OS_TYPE:=@OPENJDK_TARGET_OS_TYPE@
 OPENJDK_TARGET_OS_ENV:=@OPENJDK_TARGET_OS_ENV@
+OPENJDK_TARGET_OS_UPPERCASE:=@OPENJDK_TARGET_OS_UPPERCASE@
 
 OPENJDK_TARGET_CPU:=@OPENJDK_TARGET_CPU@
 OPENJDK_TARGET_CPU_ARCH:=@OPENJDK_TARGET_CPU_ARCH@
--- a/make/autoconf/toolchain.m4	Thu Apr 05 11:18:39 2018 -0700
+++ b/make/autoconf/toolchain.m4	Fri Apr 06 03:53:28 2018 +0200
@@ -597,8 +597,9 @@
 
     # solstudio cc requires us to have an existing file to pass as argument,
     # but it need not be a syntactically correct C file, so just use
-    # ourself. :)
-    LINKER_VERSION_STRING=`$LD -Wl,-V $TOPDIR/configure 2>&1 | $HEAD -n 1 | $SED -e 's/ld: //'`
+    # ourself. :) The intermediate 'cat' is needed to stop ld from leaving
+    # a lingering a.out (!).
+    LINKER_VERSION_STRING=`$LD -Wl,-V $TOPDIR/configure 2>&1 | $CAT | $HEAD -n 1 | $SED -e 's/ld: //'`
     # Extract version number
     [ LINKER_VERSION_NUMBER=`$ECHO $LINKER_VERSION_STRING | \
         $SED -e 's/.* \([0-9][0-9]*\.[0-9][0-9]*\)-\([0-9][0-9]*\.[0-9][0-9]*\)/\1.\2/'` ]
--- a/make/autoconf/version-numbers	Thu Apr 05 11:18:39 2018 -0700
+++ b/make/autoconf/version-numbers	Fri Apr 06 03:53:28 2018 +0200
@@ -29,7 +29,7 @@
 DEFAULT_VERSION_INTERIM=0
 DEFAULT_VERSION_UPDATE=0
 DEFAULT_VERSION_PATCH=0
-DEFAULT_VERSION_DATE=2018-09-18
+DEFAULT_VERSION_DATE=2018-09-25
 DEFAULT_VERSION_CLASSFILE_MAJOR=55  # "`$EXPR $DEFAULT_VERSION_FEATURE + 44`"
 DEFAULT_VERSION_CLASSFILE_MINOR=0
 DEFAULT_ACCEPTABLE_BOOT_VERSIONS="9 10 11"
--- a/make/common/NativeCompilation.gmk	Thu Apr 05 11:18:39 2018 -0700
+++ b/make/common/NativeCompilation.gmk	Fri Apr 06 03:53:28 2018 +0200
@@ -292,8 +292,7 @@
     endif
 
     ifneq ($$(strip $$($1_CFLAGS) $$($1_CXXFLAGS) $$($1_OPTIMIZATION)), )
-      $1_VARDEPS := $$($1_CFLAGS) $$($1_CXXFLAGS) $$($1_OPT_CFLAGS) \
-          $$($1_OPT_CXXFLAGS)
+      $1_VARDEPS := $$($1_CFLAGS) $$($1_CXXFLAGS) $$($1_OPTIMIZATION)
       $1_VARDEPS_FILE := $$(call DependOnVariable, $1_VARDEPS, $$($1_OBJ).vardeps)
     endif
 
--- a/make/conf/jib-profiles.js	Thu Apr 05 11:18:39 2018 -0700
+++ b/make/conf/jib-profiles.js	Fri Apr 06 03:53:28 2018 +0200
@@ -816,7 +816,7 @@
 var getJibProfilesDependencies = function (input, common) {
 
     var devkit_platform_revisions = {
-        linux_x64: "gcc4.9.2-OEL6.4+1.3",
+        linux_x64: "gcc7.3.0-OEL6.4+1.0",
         macosx_x64: "Xcode6.3-MacOSX10.9+1.0",
         solaris_x64: "SS12u4-Solaris11u1+1.0",
         solaris_sparcv9: "SS12u4-Solaris11u1+1.1",
--- a/make/hotspot/lib/CompileLibjsig.gmk	Thu Apr 05 11:18:39 2018 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,160 +0,0 @@
-#
-# Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.  Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-################################################################################
-# Create the libjsig.so shared library
-
-default: all
-
-include $(SPEC)
-include MakeBase.gmk
-include NativeCompilation.gmk
-
-ifneq ($(OPENJDK_TARGET_OS), windows)
-  ifeq ($(STATIC_BUILD), false)
-    ifeq ($(OPENJDK_TARGET_OS), linux)
-      LIBJSIG_CFLAGS := -fPIC -D_GNU_SOURCE -D_REENTRANT $(EXTRA_CFLAGS)
-      LIBJSIG_LDFLAGS := $(LIBJSIG_HASHSTYLE_LDFLAGS) ${LIBJSIG_NOEXECSTACK_LDFLAGS} $(EXTRA_CFLAGS)
-      LIBJSIG_LIBS := $(LIBDL)
-
-      # NOTE: The old build compiled this library without -soname.
-      # To emulate this, we need to clear out SET_SHARED_LIBRARY_NAME.
-      SET_SHARED_LIBRARY_NAME :=
-
-      # Flags for other CPUs can be provided in EXTRA_CFLAGS
-      ifeq ($(OPENJDK_TARGET_CPU), x86_64)
-        LIBJSIG_CPU_FLAGS := -m64
-      else ifeq ($(OPENJDK_TARGET_CPU), x86)
-        LIBJSIG_CPU_FLAGS := -m32 -march=i586
-      else ifeq ($(OPENJDK_TARGET_CPU), ppc64)
-        LIBJSIG_CPU_FLAGS := -mcpu=powerpc64 -mtune=power5
-      else ifeq ($(OPENJDK_TARGET_CPU), ppc64le)
-        LIBJSIG_CPU_FLAGS := -DABI_ELFv2 -mcpu=power8 -mtune=power8
-      else ifeq ($(OPENJDK_TARGET_CPU), s390x)
-        LIBJSIG_CPU_FLAGS := -mbackchain -march=z10
-      endif
-
-    else ifeq ($(OPENJDK_TARGET_OS), solaris)
-      LIBJSIG_CFLAGS := -m64 -KPIC -mt -I $(TOPDIR)/src/hotspot/os/$(HOTSPOT_TARGET_OS_TYPE)/include
-      LIBJSIG_LDFLAGS := -m64 -mt -xnolib
-      LIBJSIG_LIBS := $(LIBDL)
-
-      # NOTE: The old build compiled this library without -soname.
-      # To emulate this, we need to clear out SET_SHARED_LIBRARY_NAME.
-      SET_SHARED_LIBRARY_NAME :=
-
-    else ifeq ($(OPENJDK_TARGET_OS), aix)
-      LIBJSIG_CFLAGS := -q64 -D_GNU_SOURCE -D_REENTRANT -qpic=large
-      LIBJSIG_LDFLAGS := -b64 -bexpall -G -bnoentry -qmkshrobj -brtl -bnolibpath -bernotok
-      LIBJSIG_LIBS := $(LIBDL)
-
-      # NOTE: The old build compiled this library without -soname.
-      # To emulate this, we need to clear out SET_SHARED_LIBRARY_NAME.
-      SET_SHARED_LIBRARY_NAME :=
-
-    else ifeq ($(OPENJDK_TARGET_OS), macosx)
-      LIBJSIG_CFLAGS := -m64 -D_GNU_SOURCE -pthread -mno-omit-leaf-frame-pointer -mstack-alignment=16 -fPIC
-      LIBJSIG_LDFLAGS := $(LIBJSIG_HASHSTYLE_LDFLAGS)
-    else
-      $(error Unknown target OS $(OPENJDK_TARGET_OS) in CompileLibjsig.gmk)
-    endif
-
-    LIBJSIG_SRC_DIR := $(TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS)/native/libjsig
-    LIBJSIG_MAPFILE := $(wildcard $(TOPDIR)/make/mapfiles/libjsig/mapfile-vers-$(OPENJDK_TARGET_OS))
-    LIBJSIG_OUTPUTDIR := $(HOTSPOT_OUTPUTDIR)/libjsig
-
-    LIBJSIG_LDFLAGS += $(SHARED_LIBRARY_FLAGS)
-
-    LIB_OUTPUTDIR := $(call FindLibDirForModule, java.base)
-
-    $(eval $(call SetupNativeCompilation, BUILD_LIBJSIG, \
-        NAME := jsig, \
-        SRC := $(LIBJSIG_SRC_DIR), \
-        OUTPUT_DIR := $(LIB_OUTPUTDIR), \
-        LANG := C, \
-        CFLAGS := $(LIBJSIG_CFLAGS) $(LIBJSIG_CPU_FLAGS), \
-        LDFLAGS := $(LIBJSIG_LDFLAGS) $(LIBJSIG_CPU_FLAGS), \
-        LIBS := $(LIBJSIG_LIBS), \
-        MAPFILE := $(LIBJSIG_MAPFILE), \
-        OBJECT_DIR := $(LIBJSIG_OUTPUTDIR)/objs, \
-    ))
-
-    TARGETS += $(BUILD_LIBJSIG)
-
-    ############################################################################
-    # Create symlinks in each variant sub dir
-    ifeq ($(OPENJDK_TARGET_OS), macosx)
-      DEBUG_INFO_SUFFIX := $(SHARED_LIBRARY_SUFFIX).dSYM
-    else
-      DEBUG_INFO_SUFFIX := .debuginfo
-    endif
-
-    # $1 variant subdir
-    define CreateSymlinks
-      # Always symlink from libdir/variant/libjsig.so -> ../libjsig.so and
-      # the corresponding debuginfo.
-      $(LIB_OUTPUTDIR)/$1/$(call SHARED_LIBRARY,jsig): \
-          $(LIB_OUTPUTDIR)/$(call SHARED_LIBRARY,jsig)
-		$$(call MakeDir, $$(@D))
-		$(RM) $$@
-		$(LN) -s ../$$(@F) $$@
-
-      TARGETS += $(LIB_OUTPUTDIR)/$1/$(call SHARED_LIBRARY,jsig)
-
-      ifeq ($(COPY_DEBUG_SYMBOLS), true)
-        $(LIB_OUTPUTDIR)/$1/$(LIBRARY_PREFIX)jsig$(DEBUG_INFO_SUFFIX): \
-            $(LIB_OUTPUTDIR)/$(call SHARED_LIBRARY,jsig)
-		$$(call MakeDir, $$(@D))
-		$(RM) $$@
-		$(LN) -s ../$$(@F) $$@
-
-        TARGETS += $(LIB_OUTPUTDIR)/$1/$(LIBRARY_PREFIX)jsig$(DEBUG_INFO_SUFFIX)
-
-        ifeq ($(ZIP_EXTERNAL_DEBUG_SYMBOLS), true)
-          $(LIB_OUTPUTDIR)/$1/$(LIBRARY_PREFIX)jsig.diz: \
-              $(LIB_OUTPUTDIR)/$1/$(LIBRARY_PREFIX)jsig$(DEBUG_INFO_SUFFIX)
-			$(CD) $$(@D) && $(ZIPEXE) -q -y $$@ $$(basename $$(@F))$(DEBUG_INFO_SUFFIX)
-
-          TARGETS += $(LIB_OUTPUTDIR)/$1/$(LIBRARY_PREFIX)jsig.diz
-        endif
-      endif
-    endef
-
-    # The subdir is the same as the variant for client and minimal, for all
-    # others it's server.
-    VARIANT_SUBDIRS := $(filter client minimal, $(JVM_VARIANTS)) \
-        $(if $(filter-out client minimal, $(JVM_VARIANTS)), server)
-    $(foreach v, $(VARIANT_SUBDIRS), $(eval $(call CreateSymlinks,$v)))
-
-    ############################################################################
-
-    include CopyToExplodedJdk.gmk
-
-  endif
-endif
-
-all: $(TARGETS)
-
-.PHONY: all
--- a/make/lib/Awt2dLibraries.gmk	Thu Apr 05 11:18:39 2018 -0700
+++ b/make/lib/Awt2dLibraries.gmk	Fri Apr 06 03:53:28 2018 +0200
@@ -36,7 +36,6 @@
     -I$(TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_TYPE)/native/libmlib_image
 
 BUILD_LIBMLIB_LDLIBS :=
-BUILD_LIBMLIB_IMAGE_MAPFILE := $(TOPDIR)/make/mapfiles/libmlib_image/mapfile-vers
 
 BUILD_LIBMLIB_CFLAGS += -DMLIB_NO_LIBSUNMATH
 
@@ -55,7 +54,6 @@
     OPTIMIZATION := HIGHEST, \
     CFLAGS := $(CFLAGS_JDKLIB) \
         $(BUILD_LIBMLIB_CFLAGS), \
-    MAPFILE := $(BUILD_LIBMLIB_IMAGE_MAPFILE), \
     LDFLAGS := $(LDFLAGS_JDKLIB) \
         $(call SET_SHARED_LIBRARY_ORIGIN), \
     LIBS := $(BUILD_LIBMLIB_LDLIBS) \
@@ -107,7 +105,6 @@
       CFLAGS := -xarch=sparcvis \
           $(LIBMLIB_IMAGE_V_CFLAGS) \
           $(CFLAGS_JDKLIB), \
-      MAPFILE := $(BUILD_LIBMLIB_IMAGE_MAPFILE), \
       LDFLAGS := $(LDFLAGS_JDKLIB) \
           $(call SET_SHARED_LIBRARY_ORIGIN), \
       LIBS := -ljava -ljvm $(BUILD_LIBMLIB_LDLIBS), \
@@ -202,9 +199,9 @@
   LIBAWT_VERSIONINFO_RESOURCE := $(TOPDIR)/src/java.desktop/windows/native/libawt/windows/awt.rc
 endif
 
-LIBAWT_MAPFILE := $(TOPDIR)/make/mapfiles/libawt/mapfile-vers
 ifeq ($(OPENJDK_TARGET_OS), linux)
-  LIBAWT_MAPFILE :=
+  # FIXME: This is probably not what we want to do, but keep it now for compatibility.
+  LIBAWT_CFLAGS += $(EXPORT_ALL_SYMBOLS)
 endif
 
 # Turn off all warnings for debug_mem.c This is needed because the specific warning
@@ -229,7 +226,6 @@
     DISABLED_WARNINGS_solstudio := E_DECLARATION_IN_CODE, \
     DISABLED_WARNINGS_microsoft := 4297 4244 4267 4996, \
     ASFLAGS := $(LIBAWT_ASFLAGS), \
-    MAPFILE := $(LIBAWT_MAPFILE), \
     LDFLAGS := $(LDFLAGS_JDKLIB) $(call SET_SHARED_LIBRARY_ORIGIN), \
     LDFLAGS_macosx := -L$(INSTALL_LIBRARIES_HERE), \
     LDFLAGS_windows := -delayload:user32.dll -delayload:gdi32.dll \
@@ -349,7 +345,6 @@
             implicit-fallthrough, \
         DISABLED_WARNINGS_solstudio := E_DECLARATION_IN_CODE \
             E_ASSIGNMENT_TYPE_MISMATCH E_NON_CONST_INIT, \
-        MAPFILE := $(TOPDIR)/make/mapfiles/libawt_xawt/mapfile-vers, \
         LDFLAGS := $(LDFLAGS_JDKLIB) \
             $(call SET_SHARED_LIBRARY_ORIGIN) \
             -L$(INSTALL_LIBRARIES_HERE), \
@@ -405,7 +400,6 @@
     DISABLED_WARNINGS_clang := tautological-compare, \
     DISABLED_WARNINGS_solstudio := E_STATEMENT_NOT_REACHED, \
     DISABLED_WARNINGS_microsoft := 4819, \
-    MAPFILE := $(TOPDIR)/make/mapfiles/liblcms/mapfile-vers, \
     LDFLAGS := $(LDFLAGS_JDKLIB) \
         $(call SET_SHARED_LIBRARY_ORIGIN), \
     LDFLAGS_unix := -L$(INSTALL_LIBRARIES_HERE), \
@@ -421,28 +415,13 @@
 
 LIBJAVAJPEG_SRC += $(TOPDIR)/src/java.desktop/share/native/libjavajpeg
 
-BUILD_LIBJAVAJPEG_REORDER :=
-ifeq ($(OPENJDK_TARGET_OS), solaris)
-  ifneq ($(OPENJDK_TARGET_CPU), x86_64)
-    BUILD_LIBJAVAJPEG_REORDER := $(TOPDIR)/make/mapfiles/libjpeg/reorder-$(OPENJDK_TARGET_CPU)
-  endif
-endif
-
-
+# "DISABLED_WARNINGS_gcc := clobbered" rationale:
 # Suppress gcc warnings like "variable might be clobbered by 'longjmp'
 # or 'vfork'": this warning indicates that some variable is placed to
 # a register by optimized compiler and it's value might be lost on longjmp().
 # Recommended way to avoid such warning is to declare the variable as
 # volatile to prevent the optimization. However, this approach does not
 # work because we have to declare all variables as volatile in result.
-#ifndef CROSS_COMPILE_ARCH
-#  CC_43_OR_NEWER := \
-#      $(shell $(EXPR) $(CC_MAJORVER) \> 4 \| \
-#          \( $(CC_MAJORVER) = 4 \& $(CC_MINORVER) \>= 3 \) )
-#  ifeq ($(CC_43_OR_NEWER), 1)
-#    BUILD_LIBJAVAJPEG_CFLAGS_linux += -Wno-clobbered
-#  endif
-#endif
 
 ifeq ($(USE_EXTERNAL_LIBJPEG), true)
   LIBJPEG_LIBS := -ljpeg
@@ -465,12 +444,10 @@
         $(LIBJAVA_HEADER_FLAGS) \
         -I$(SUPPORT_OUTPUTDIR)/headers/java.desktop, \
     DISABLED_WARNINGS_gcc := clobbered implicit-fallthrough shift-negative-value, \
-    MAPFILE := $(TOPDIR)/make/mapfiles/libjpeg/mapfile-vers, \
     LDFLAGS := $(LDFLAGS_JDKLIB) \
         $(call SET_SHARED_LIBRARY_ORIGIN), \
     LIBS := $(LIBJPEG_LIBS) $(JDKLIB_LIBS), \
     LIBS_windows := $(WIN_JAVA_LIB) jvm.lib, \
-    REORDER := $(BUILD_LIBJAVAJPEG_REORDER), \
 ))
 
 $(BUILD_LIBJAVAJPEG): $(call FindLib, java.base, java)
@@ -506,13 +483,6 @@
       $(LIBJAVA_HEADER_FLAGS) \
       #
 
-  LIBAWT_HEADLESS_REORDER :=
-  ifeq ($(OPENJDK_TARGET_OS), solaris)
-    ifneq ($(OPENJDK_TARGET_CPU), x86_64)
-      LIBAWT_HEADLESS_REORDER := $(TOPDIR)/make/mapfiles/libawt_headless/reorder-$(OPENJDK_TARGET_CPU)
-    endif
-  endif
-
   $(eval $(call SetupJdkLibrary, BUILD_LIBAWT_HEADLESS, \
       NAME := awt_headless, \
       SRC := $(LIBAWT_HEADLESS_DIRS), \
@@ -527,11 +497,9 @@
           $(LIBAWT_HEADLESS_CFLAGS), \
       DISABLED_WARNINGS_xlc := 1506-356, \
       DISABLED_WARNINGS_solstudio := E_EMPTY_TRANSLATION_UNIT, \
-      MAPFILE := $(TOPDIR)/make/mapfiles/libawt_headless/mapfile-vers, \
       LDFLAGS := $(LDFLAGS_JDKLIB) \
           $(call SET_SHARED_LIBRARY_ORIGIN), \
       LDFLAGS_unix := -L$(INSTALL_LIBRARIES_HERE), \
-      REORDER := $(LIBAWT_HEADLESS_REORDER), \
       LIBS_unix := -lawt -ljvm -ljava, \
       LIBS_linux := $(LIBM) $(LIBDL), \
       LIBS_solaris := $(LIBM) $(LIBDL) $(LIBCXX), \
@@ -567,11 +535,11 @@
       SRC := $(LIBFREETYPE_SRC)/src, \
       OPTIMIZATION := HIGHEST, \
       CFLAGS := $(CFLAGS_JDKLIB) $(BUILD_LIBFREETYPE_HEADERS) \
-          -DFT2_BUILD_LIBRARY, \
+          -DFT2_BUILD_LIBRARY $(EXPORT_ALL_SYMBOLS), \
       DISABLED_WARNINGS_solstudio := \
          E_STATEMENT_NOT_REACHED \
          E_END_OF_LOOP_CODE_NOT_REACHED, \
-      DISABLED_WARNINGS_microsoft := 4267 2220 4244, \
+      DISABLED_WARNINGS_microsoft := 4267 4244, \
       LDFLAGS := $(LDFLAGS_JDKLIB) \
           $(call SET_SHARED_LIBRARY_ORIGIN), \
   ))
@@ -622,8 +590,6 @@
 #### End harfbuzz configuration
 
 LIBFONTMANAGER_CFLAGS += $(LIBFREETYPE_CFLAGS)
-# This may be overridden in a custom makefile
-BUILD_LIBFONTMANAGER_MAPFILE ?= $(TOPDIR)/make/mapfiles/libfontmanager/mapfile-vers
 BUILD_LIBFONTMANAGER_FONTLIB += $(LIBFREETYPE_LIBS)
 
 LIBFONTMANAGER_OPTIMIZATION := HIGH
@@ -678,7 +644,6 @@
         truncwarn wvarhidenmem wvarhidemem wbadlkginit identexpected \
         hidevf w_novirtualdescr arrowrtn2, \
     DISABLED_WARNINGS_microsoft := 4267 4244 4018 4090 4996 4146 4334 4819 4101, \
-    MAPFILE := $(BUILD_LIBFONTMANAGER_MAPFILE), \
     LDFLAGS := $(subst -Wl$(COMMA)-z$(COMMA)defs,,$(LDFLAGS_JDKLIB)) $(LDFLAGS_CXX_JDK) \
         $(call SET_SHARED_LIBRARY_ORIGIN), \
     LDFLAGS_unix := -L$(INSTALL_LIBRARIES_HERE), \
@@ -782,7 +747,6 @@
           $(LIBJAWT_CFLAGS), \
       CFLAGS_linux := $(HEADLESS_CFLAG), \
       CFLAGS_macosx := $(LIBJAWT_CFLAGS_macosx), \
-      MAPFILE := $(TOPDIR)/make/mapfiles/libjawt/mapfile-vers, \
       LDFLAGS := $(LDFLAGS_JDKLIB) \
           $(call SET_SHARED_LIBRARY_ORIGIN), \
       LDFLAGS_unix := -L$(INSTALL_LIBRARIES_HERE), \
@@ -914,7 +878,6 @@
       DISABLED_WARNINGS_solstudio := E_NEWLINE_NOT_LAST E_DECLARATION_IN_CODE \
           E_STATEMENT_NOT_REACHED, \
       DISABLED_WARNINGS_microsoft := 4018 4244 4267, \
-      MAPFILE := $(TOPDIR)/make/mapfiles/libsplashscreen/mapfile-vers, \
       LDFLAGS := $(LDFLAGS_JDKLIB) \
           $(call SET_SHARED_LIBRARY_ORIGIN), \
       LDFLAGS_macosx := -L$(INSTALL_LIBRARIES_HERE), \
--- a/make/lib/CoreLibraries.gmk	Thu Apr 05 11:18:39 2018 -0700
+++ b/make/lib/CoreLibraries.gmk	Fri Apr 06 03:53:28 2018 +0200
@@ -95,12 +95,6 @@
 
 ##########################################################################################
 
-ifeq ($(OPENJDK_TARGET_OS), solaris)
-  ifneq ($(OPENJDK_TARGET_CPU), x86_64)
-    BUILD_LIBVERIFY_REORDER := $(TOPDIR)/make/mapfiles/libverify/reorder-$(OPENJDK_TARGET_CPU)
-  endif
-endif
-
 LIBVERIFY_OPTIMIZATION := HIGH
 ifneq ($(findstring $(OPENJDK_TARGET_OS), solaris linux), )
   ifeq ($(COMPILE_WITH_DEBUG_SYMBOLS), true)
@@ -115,12 +109,10 @@
     CFLAGS := $(CFLAGS_JDKLIB), \
     DISABLED_WARNINGS_gcc := implicit-fallthrough, \
     DISABLED_WARNINGS_microsoft := 4244 4267, \
-    MAPFILE := $(TOPDIR)/make/mapfiles/libverify/mapfile-vers, \
     LDFLAGS := $(LDFLAGS_JDKLIB) \
         $(call SET_SHARED_LIBRARY_ORIGIN), \
     LIBS_unix := -ljvm, \
     LIBS_windows := jvm.lib, \
-    REORDER := $(BUILD_LIBVERIFY_REORDER), \
 ))
 
 TARGETS += $(BUILD_LIBVERIFY)
@@ -135,20 +127,11 @@
     -I$(SUPPORT_OUTPUTDIR)/headers/java.base \
     -DARCHPROPNAME='"$(OPENJDK_TARGET_CPU_OSARCH)"'
 
-# Make it possible to override this variable
-LIBJAVA_MAPFILE ?= $(TOPDIR)/make/mapfiles/libjava/mapfile-vers
-
 ifeq ($(OPENJDK_TARGET_OS), macosx)
   BUILD_LIBJAVA_java_props_md.c_CFLAGS := -x objective-c
   BUILD_LIBJAVA_java_props_macosx.c_CFLAGS := -x objective-c
 endif
 
-ifeq ($(OPENJDK_TARGET_OS), solaris)
-  ifneq ($(OPENJDK_TARGET_CPU), x86_64)
-    LIBJAVA_REORDER := $(TOPDIR)/make/mapfiles/libjava/reorder-$(OPENJDK_TARGET_CPU)
-  endif
-endif
-
 $(eval $(call SetupJdkLibrary, BUILD_LIBJAVA, \
     NAME := java, \
     SRC := $(LIBJAVA_SRC_DIRS), \
@@ -160,13 +143,10 @@
     WARNINGS_AS_ERRORS_xlc := false, \
     DISABLED_WARNINGS_gcc := unused-result, \
     DISABLED_WARNINGS_solstudio := E_STATEMENT_NOT_REACHED, \
-    MAPFILE := $(LIBJAVA_MAPFILE), \
     LDFLAGS := $(LDFLAGS_JDKLIB) \
         $(call SET_SHARED_LIBRARY_ORIGIN), \
     LDFLAGS_macosx := -L$(SUPPORT_OUTPUTDIR)/native/$(MODULE)/, \
-    LDFLAGS_windows := -export:winFileHandleOpen -export:handleLseek \
-        -export:getLastErrorString \
-        -export:getErrorString -delayload:shell32.dll, \
+    LDFLAGS_windows := -delayload:shell32.dll, \
     LIBS_unix := -ljvm -lverify, \
     LIBS_linux := $(LIBDL) $(BUILD_LIBFDLIBM), \
     LIBS_solaris := -lsocket -lnsl -lscf $(LIBDL) $(BUILD_LIBFDLIBM), \
@@ -178,7 +158,6 @@
     LIBS_windows := jvm.lib $(BUILD_LIBFDLIBM) $(WIN_VERIFY_LIB) \
         shell32.lib delayimp.lib \
         advapi32.lib version.lib, \
-    REORDER := $(LIBJAVA_REORDER), \
 ))
 
 TARGETS += $(BUILD_LIBJAVA)
@@ -194,13 +173,6 @@
   LIBZIP_EXCLUDES += zlib
 endif
 
-BUILD_LIBZIP_REORDER :=
-ifeq ($(OPENJDK_TARGET_OS), solaris)
-  ifneq ($(OPENJDK_TARGET_CPU), x86_64)
-    BUILD_LIBZIP_REORDER := $(TOPDIR)/make/mapfiles/libzip/reorder-$(OPENJDK_TARGET_CPU)
-  endif
-endif
-
 ifeq ($(LIBZIP_CAN_USE_MMAP), true)
   BUILD_LIBZIP_MMAP := -DUSE_MMAP
 endif
@@ -217,13 +189,8 @@
         -I$(SUPPORT_OUTPUTDIR)/headers/java.base, \
     CFLAGS_unix := $(BUILD_LIBZIP_MMAP) -UDEBUG, \
     DISABLED_WARNINGS_gcc := implicit-fallthrough, \
-    MAPFILE := $(TOPDIR)/make/mapfiles/libzip/mapfile-vers, \
-    REORDER := $(BUILD_LIBZIP_REORDER), \
     LDFLAGS := $(LDFLAGS_JDKLIB) \
         $(call SET_SHARED_LIBRARY_ORIGIN), \
-    LDFLAGS_windows := -export:ZIP_Open -export:ZIP_Close -export:ZIP_FindEntry \
-        -export:ZIP_ReadEntry -export:ZIP_GetNextEntry \
-        -export:ZIP_InflateFully -export:ZIP_CRC32 -export:ZIP_FreeEntry, \
     LIBS_unix := -ljvm -ljava $(LIBZ_LIBS), \
     LIBS_windows := jvm.lib $(WIN_JAVA_LIB), \
 ))
@@ -252,13 +219,8 @@
     CXXFLAGS := $(CXXFLAGS_JDKLIB) $(JIMAGELIB_CPPFLAGS), \
     DISABLED_WARNINGS_gcc := implicit-fallthrough, \
     CFLAGS_unix := -UDEBUG, \
-    MAPFILE := $(TOPDIR)/make/mapfiles/libjimage/mapfile-vers, \
     LDFLAGS := $(LDFLAGS_JDKLIB) $(LDFLAGS_CXX_JDK) \
         $(call SET_SHARED_LIBRARY_ORIGIN), \
-    LDFLAGS_windows := -export:JIMAGE_Open -export:JIMAGE_Close \
-        -export:JIMAGE_PackageToModule \
-        -export:JIMAGE_FindResource -export:JIMAGE_GetResource \
-        -export:JIMAGE_ResourceIterator -export:JIMAGE_ResourcePath, \
     LIBS_unix := -ljvm -ldl $(LIBCXX), \
     LIBS_macosx := -lc++, \
     LIBS_windows := jvm.lib, \
@@ -341,31 +303,10 @@
     DISABLED_WARNINGS_solstudio := \
         E_ASM_DISABLES_OPTIMIZATION \
         E_STATEMENT_NOT_REACHED, \
-    MAPFILE := $(TOPDIR)/make/mapfiles/libjli/mapfile-vers, \
     LDFLAGS := $(LDFLAGS_JDKLIB) \
         $(call SET_SHARED_LIBRARY_ORIGIN), \
     LDFLAGS_linux := $(call SET_SHARED_LIBRARY_ORIGIN,/..), \
     LDFLAGS_solaris := $(call SET_SHARED_LIBRARY_ORIGIN,/..), \
-    LDFLAGS_windows := \
-        -export:JLI_Launch \
-        -export:JLI_ManifestIterate \
-        -export:JLI_SetTraceLauncher \
-        -export:JLI_ReportErrorMessage \
-        -export:JLI_ReportErrorMessageSys \
-        -export:JLI_ReportMessage \
-        -export:JLI_ReportExceptionDescription \
-        -export:JLI_MemAlloc \
-        -export:JLI_CmdToArgs \
-        -export:JLI_GetStdArgc \
-        -export:JLI_GetStdArgs \
-        -export:JLI_List_new \
-        -export:JLI_List_add \
-        -export:JLI_StringDup \
-        -export:JLI_MemFree \
-        -export:JLI_InitArgProcessing \
-        -export:JLI_PreprocessArg \
-        -export:JLI_AddArgsFromEnvVar \
-        -export:JLI_GetAppArgIndex, \
     LIBS_unix := $(LIBZ_LIBS), \
     LIBS_linux := $(LIBDL) -lpthread, \
     LIBS_solaris := $(LIBDL), \
--- a/make/lib/Lib-java.base.gmk	Thu Apr 05 11:18:39 2018 -0700
+++ b/make/lib/Lib-java.base.gmk	Fri Apr 06 03:53:28 2018 +0200
@@ -53,7 +53,6 @@
     DISABLED_WARNINGS_clang := parentheses-equality constant-logical-operand, \
     DISABLED_WARNINGS_microsoft := 4244 4047 4133 4996, \
     DISABLED_WARNINGS_solstudio := E_ARG_INCOMPATIBLE_WITH_ARG_L, \
-    MAPFILE := $(TOPDIR)/make/mapfiles/libnet/mapfile-vers, \
     LDFLAGS := $(LDFLAGS_JDKLIB) \
         $(call SET_SHARED_LIBRARY_ORIGIN), \
     LDFLAGS_windows := -delayload:secur32.dll -delayload:iphlpapi.dll, \
@@ -90,22 +89,6 @@
     $(LIBJAVA_HEADER_FLAGS) \
     $(addprefix -I, $(BUILD_LIBNET_SRC))
 
-ifeq ($(OPENJDK_TARGET_OS), linux)
-  BUILD_LIBNIO_MAPFILE := $(TOPDIR)/make/mapfiles/libnio/mapfile-$(OPENJDK_TARGET_OS)
-endif
-
-ifeq ($(OPENJDK_TARGET_OS), macosx)
-  BUILD_LIBNIO_MAPFILE := $(TOPDIR)/make/mapfiles/libnio/mapfile-$(OPENJDK_TARGET_OS)
-endif
-
-ifeq ($(OPENJDK_TARGET_OS), solaris)
-  BUILD_LIBNIO_MAPFILE := $(TOPDIR)/make/mapfiles/libnio/mapfile-$(OPENJDK_TARGET_OS)
-endif
-
-ifeq ($(OPENJDK_TARGET_OS), aix)
-  BUILD_LIBNIO_MAPFILE := $(TOPDIR)/make/mapfiles/libnio/mapfile-$(OPENJDK_TARGET_OS)
-endif
-
 $(eval $(call SetupJdkLibrary, BUILD_LIBNIO, \
     NAME := nio, \
     SRC := $(BUILD_LIBNIO_SRC), \
@@ -114,7 +97,6 @@
     WARNINGS_AS_ERRORS_xlc := false, \
     CFLAGS := $(CFLAGS_JDKLIB) \
         $(BUILD_LIBNIO_CFLAGS), \
-    MAPFILE := $(BUILD_LIBNIO_MAPFILE), \
     LDFLAGS := $(LDFLAGS_JDKLIB) \
         $(call SET_SHARED_LIBRARY_ORIGIN), \
     LIBS_unix := -ljava -lnet, \
@@ -171,6 +153,61 @@
 endif
 
 ################################################################################
+# Create the jsig library
+
+ifneq ($(OPENJDK_TARGET_OS), windows)
+  ifeq ($(STATIC_BUILD), false)
+
+    LIBJSIG_SRC_DIR := $(TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS)/native/libjsig
+    LIBJSIG_MAPFILE := $(wildcard $(TOPDIR)/make/mapfiles/libjsig/mapfile-vers-$(OPENJDK_TARGET_OS))
+
+    ifeq ($(OPENJDK_TARGET_OS), linux)
+      # FIXME: This is probably not what we want to do, but keep it now for compatibility.
+      LIBJSIG_CFLAGS := $(EXPORT_ALL_SYMBOLS)
+    endif
+
+    $(eval $(call SetupJdkLibrary, BUILD_LIBJSIG, \
+        NAME := jsig, \
+        SRC := $(LIBJSIG_SRC_DIR), \
+        CFLAGS := $(CFLAGS_JDKLIB) $(LIBJSIG_CFLAGS), \
+        LDFLAGS := $(LDFLAGS_JDKLIB) \
+            $(call SET_SHARED_LIBRARY_ORIGIN), \
+        LIBS_linux := $(LIBDL), \
+        LIBS_solaris := $(LIBDL), \
+        LIBS_aix := $(LIBDL), \
+        MAPFILE := $(LIBJSIG_MAPFILE), \
+    ))
+
+    TARGETS += $(BUILD_LIBJSIG)
+
+    ############################################################################
+    # Create symlinks to libjsig in each JVM variant sub dir
+    LIB_OUTPUTDIR := $(call FindLibDirForModule, java.base)
+
+    # $1 variant subdir
+    define CreateSymlinks
+      # Always symlink from libdir/variant/libjsig.so -> ../libjsig.so.
+      $(LIB_OUTPUTDIR)/$1/$(call SHARED_LIBRARY,jsig): \
+          $(LIB_OUTPUTDIR)/$(call SHARED_LIBRARY,jsig)
+		$$(call MakeDir, $$(@D))
+		$(RM) $$@
+		$(LN) -s ../$$(@F) $$@
+
+      TARGETS += $(LIB_OUTPUTDIR)/$1/$(call SHARED_LIBRARY,jsig)
+    endef
+
+    # The subdir is the same as the variant for client and minimal, for all
+    # others it's server.
+    VARIANT_SUBDIRS := $(filter client minimal, $(JVM_VARIANTS)) \
+        $(if $(filter-out client minimal, $(JVM_VARIANTS)), server)
+    $(foreach v, $(VARIANT_SUBDIRS), $(eval $(call CreateSymlinks,$v)))
+
+    ############################################################################
+
+  endif
+endif
+
+################################################################################
 # Create the symbols file for static builds.
 
 ifeq ($(STATIC_BUILD), true)
--- a/make/lib/Lib-java.desktop.gmk	Thu Apr 05 11:18:39 2018 -0700
+++ b/make/lib/Lib-java.desktop.gmk	Fri Apr 06 03:53:28 2018 +0200
@@ -34,10 +34,63 @@
 $(eval $(call FillCacheFind, $(wildcard $(LIB_java.desktop_SRC_DIRS))))
 
 ################################################################################
-# Create the AWT/2D and sound libraries
+# Create the AWT/2D libraries
 
 include Awt2dLibraries.gmk
-include SoundLibraries.gmk
+
+################################################################################
+# Create the libjsound library
+
+ifneq ($(OPENJDK_TARGET_OS), aix)
+
+  LIBJSOUND_SRC_DIRS := $(wildcard \
+      $(TOPDIR)/src/java.desktop/share/native/libjsound \
+      $(TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS)/native/libjsound \
+      )
+
+  LIBJSOUND_CFLAGS := \
+      -I$(SUPPORT_OUTPUTDIR)/headers/java.desktop \
+      $(LIBJAVA_HEADER_FLAGS) \
+      $(foreach dir, $(LIBJSOUND_SRC_DIRS), -I$(dir)) \
+      -DX_PLATFORM=X_$(OPENJDK_TARGET_OS_UPPERCASE) \
+      -DUSE_PORTS=TRUE \
+      -DUSE_DAUDIO=TRUE \
+      #
+
+  ifneq ($(OPENJDK_TARGET_OS), solaris)
+    LIBJSOUND_CFLAGS += \
+        -DUSE_PLATFORM_MIDI_OUT=TRUE \
+        -DUSE_PLATFORM_MIDI_IN=TRUE \
+        #
+  endif
+
+  ifeq ($(OPENJDK_TARGET_OS), macosx)
+    LIBJSOUND_TOOLCHAIN := TOOLCHAIN_LINK_CXX
+  endif
+
+  $(eval $(call SetupJdkLibrary, BUILD_LIBJSOUND, \
+      NAME := jsound, \
+      SRC := $(LIBJSOUND_SRC_DIRS), \
+      TOOLCHAIN := $(LIBJSOUND_TOOLCHAIN), \
+      OPTIMIZATION := LOW, \
+      CFLAGS := $(CFLAGS_JDKLIB) \
+          $(LIBJSOUND_CFLAGS), \
+      CXXFLAGS := $(CXXFLAGS_JDKLIB) $(LIBJSOUND_CFLAGS), \
+      LDFLAGS := $(LDFLAGS_JDKLIB) \
+          $(call SET_SHARED_LIBRARY_ORIGIN), \
+      LIBS_unix := -ljava -ljvm, \
+      LIBS_linux := $(ALSA_LIBS), \
+      LIBS_macosx := -framework CoreAudio -framework CoreFoundation \
+          -framework CoreServices -framework AudioUnit \
+          -framework CoreMIDI -framework AudioToolbox $(LIBCXX), \
+      LIBS_windows := $(WIN_JAVA_LIB) advapi32.lib dsound.lib winmm.lib user32.lib ole32.lib, \
+  ))
+
+  $(BUILD_LIBJSOUND): $(call FindLib, java.base, java)
+
+  TARGETS += $(BUILD_LIBJSOUND)
+
+endif
 
 ################################################################################
 # Create the macosx specific osxapp and osx libraries
--- a/make/lib/Lib-java.instrument.gmk	Thu Apr 05 11:18:39 2018 -0700
+++ b/make/lib/Lib-java.instrument.gmk	Fri Apr 06 03:53:28 2018 +0200
@@ -56,7 +56,6 @@
     CFLAGS := $(LIBINSTRUMENT_CFLAGS), \
     CFLAGS_debug := -DJPLIS_LOGGING, \
     CFLAGS_release := -DNO_JPLIS_LOGGING, \
-    MAPFILE := $(TOPDIR)/make/mapfiles/libinstrument/mapfile-vers, \
     LDFLAGS := $(LDFLAGS_JDKLIB) \
         $(call SET_SHARED_LIBRARY_ORIGIN) \
         $(LIBINSTRUMENT_LDFLAGS), \
--- a/make/lib/Lib-java.management.gmk	Thu Apr 05 11:18:39 2018 -0700
+++ b/make/lib/Lib-java.management.gmk	Fri Apr 06 03:53:28 2018 +0200
@@ -49,7 +49,6 @@
     SRC := $(LIBMANAGEMENT_SRC), \
     OPTIMIZATION := $(LIBMANAGEMENT_OPTIMIZATION), \
     CFLAGS := $(CFLAGS_JDKLIB) $(LIBMANAGEMENT_CFLAGS), \
-    MAPFILE := $(TOPDIR)/make/mapfiles/libmanagement/mapfile-vers, \
     LDFLAGS := $(LDFLAGS_JDKLIB) \
         $(call SET_SHARED_LIBRARY_ORIGIN), \
     LIBS := $(JDKLIB_LIBS), \
--- a/make/lib/Lib-java.prefs.gmk	Thu Apr 05 11:18:39 2018 -0700
+++ b/make/lib/Lib-java.prefs.gmk	Fri Apr 06 03:53:28 2018 +0200
@@ -39,7 +39,6 @@
     OPTIMIZATION := HIGH, \
     CFLAGS := $(CFLAGS_JDKLIB) $(addprefix -I, $(LIBPREF_SRC_DIRS)) \
         $(LIBJAVA_HEADER_FLAGS), \
-    MAPFILE := $(TOPDIR)/make/mapfiles/libprefs/mapfile-vers, \
     LDFLAGS := $(LDFLAGS_JDKLIB) \
         $(call SET_SHARED_LIBRARY_ORIGIN), \
     LIBS_unix := -ljvm, \
--- a/make/lib/Lib-java.rmi.gmk	Thu Apr 05 11:18:39 2018 -0700
+++ b/make/lib/Lib-java.rmi.gmk	Fri Apr 06 03:53:28 2018 +0200
@@ -32,7 +32,6 @@
     SRC := $(TOPDIR)/src/java.rmi/share/native/librmi, \
     OPTIMIZATION := LOW, \
     CFLAGS := $(CFLAGS_JDKLIB) -I$(SUPPORT_OUTPUTDIR)/headers/java.rmi, \
-    MAPFILE := $(TOPDIR)/make/mapfiles/librmi/mapfile-vers, \
     LDFLAGS := $(LDFLAGS_JDKLIB) \
         $(call SET_SHARED_LIBRARY_ORIGIN), \
     LIBS_unix := -ljvm, \
--- a/make/lib/Lib-java.security.jgss.gmk	Thu Apr 05 11:18:39 2018 -0700
+++ b/make/lib/Lib-java.security.jgss.gmk	Fri Apr 06 03:53:28 2018 +0200
@@ -39,7 +39,6 @@
       CFLAGS := $(CFLAGS_JDKLIB) $(addprefix -I, $(LIBJ2GSS_SRC)) \
           $(LIBJAVA_HEADER_FLAGS) \
           -I$(SUPPORT_OUTPUTDIR)/headers/java.security.jgss, \
-      MAPFILE := $(TOPDIR)/make/mapfiles/libj2gss/mapfile-vers, \
       LDFLAGS := $(LDFLAGS_JDKLIB) \
           $(call SET_SHARED_LIBRARY_ORIGIN), \
       LIBS := $(LIBDL), \
--- a/make/lib/Lib-java.smartcardio.gmk	Thu Apr 05 11:18:39 2018 -0700
+++ b/make/lib/Lib-java.smartcardio.gmk	Fri Apr 06 03:53:28 2018 +0200
@@ -39,7 +39,6 @@
     CFLAGS_unix := -D__sun_jdk, \
     OPTIMIZATION := LOW, \
     CFLAGS := $(CFLAGS_JDKLIB) $(LIBJ2PCSC_CPPFLAGS), \
-    MAPFILE := $(TOPDIR)/make/mapfiles/libj2pcsc/mapfile-vers, \
     LDFLAGS := $(LDFLAGS_JDKLIB) \
         $(call SET_SHARED_LIBRARY_ORIGIN), \
     LIBS_unix := $(LIBDL), \
--- a/make/lib/Lib-jdk.attach.gmk	Thu Apr 05 11:18:39 2018 -0700
+++ b/make/lib/Lib-jdk.attach.gmk	Fri Apr 06 03:53:28 2018 +0200
@@ -42,10 +42,8 @@
         -I$(SUPPORT_OUTPUTDIR)/headers/jdk.attach \
         $(LIBJAVA_HEADER_FLAGS) $(LIBATTACH_CFLAGS), \
     CFLAGS_windows := /Gy, \
-    MAPFILE := $(TOPDIR)/make/mapfiles/libattach/mapfile-$(OPENJDK_TARGET_OS), \
     LDFLAGS := $(LDFLAGS_JDKLIB) \
         $(call SET_SHARED_LIBRARY_ORIGIN), \
-    LDFLAGS_windows := -order:@$(TOPDIR)/make/mapfiles/libattach/reorder-windows-$(OPENJDK_TARGET_CPU), \
     LIBS := $(JDKLIB_LIBS), \
     LIBS_solaris := -ldoor, \
     LIBS_windows := $(WIN_JAVA_LIB) advapi32.lib psapi.lib, \
--- a/make/lib/Lib-jdk.crypto.cryptoki.gmk	Thu Apr 05 11:18:39 2018 -0700
+++ b/make/lib/Lib-jdk.crypto.cryptoki.gmk	Fri Apr 06 03:53:28 2018 +0200
@@ -37,7 +37,6 @@
     CFLAGS := $(CFLAGS_JDKLIB) $(addprefix -I, $(LIBJ2PKCS11_SRC)) \
         $(LIBJAVA_HEADER_FLAGS) \
         -I$(SUPPORT_OUTPUTDIR)/headers/jdk.crypto.cryptoki, \
-    MAPFILE := $(TOPDIR)/make/mapfiles/libj2pkcs11/mapfile-vers, \
     LDFLAGS := $(LDFLAGS_JDKLIB) \
         $(call SET_SHARED_LIBRARY_ORIGIN), \
     LIBS_unix := $(LIBDL), \
--- a/make/lib/Lib-jdk.crypto.ec.gmk	Thu Apr 05 11:18:39 2018 -0700
+++ b/make/lib/Lib-jdk.crypto.ec.gmk	Fri Apr 06 03:53:28 2018 +0200
@@ -55,7 +55,6 @@
           $(BUILD_LIBSUNEC_FLAGS), \
       DISABLED_WARNINGS_gcc := sign-compare implicit-fallthrough, \
       DISABLED_WARNINGS_microsoft := 4101 4244 4146 4018, \
-      MAPFILE := $(TOPDIR)/make/mapfiles/libsunec/mapfile-vers, \
       LDFLAGS := $(LDFLAGS_JDKLIB) $(LDFLAGS_CXX_JDK), \
       LDFLAGS_macosx := $(call SET_SHARED_LIBRARY_ORIGIN), \
       LIBS := $(LIBCXX), \
--- a/make/lib/Lib-jdk.crypto.ucrypto.gmk	Thu Apr 05 11:18:39 2018 -0700
+++ b/make/lib/Lib-jdk.crypto.ucrypto.gmk	Fri Apr 06 03:53:28 2018 +0200
@@ -37,7 +37,6 @@
       OPTIMIZATION := LOW, \
       CFLAGS := $(CFLAGS_JDKLIB) \
           $(addprefix -I, $(LIBJ2UCRYPTO_SRC)), \
-      MAPFILE := $(TOPDIR)/make/mapfiles/libj2ucrypto/mapfile-vers, \
       LDFLAGS := $(LDFLAGS_JDKLIB), \
       LIBS := $(LIBDL), \
   ))
--- a/make/lib/Lib-jdk.hotspot.agent.gmk	Thu Apr 05 11:18:39 2018 -0700
+++ b/make/lib/Lib-jdk.hotspot.agent.gmk	Fri Apr 06 03:53:28 2018 +0200
@@ -36,8 +36,6 @@
     $(SA_TOPDIR)/$(OPENJDK_TARGET_OS)/native/libsaproc \
     #
 
-SA_MAPFILE := $(TOPDIR)/make/mapfiles/libsaproc/mapfile-$(OPENJDK_TARGET_OS)
-
 SA_INCLUDES := \
     $(addprefix -I, $(SA_SRC)) \
     -I$(SUPPORT_OUTPUTDIR)/headers/jdk.hotspot.agent \
@@ -79,7 +77,6 @@
     LIBS_macosx := -framework Foundation -framework JavaNativeFoundation \
         -framework JavaRuntimeSupport -framework Security -framework CoreFoundation, \
     LIBS_windows := dbgeng.lib, \
-    MAPFILE := $(SA_MAPFILE), \
 ))
 
 TARGETS += $(BUILD_LIBSA)
--- a/make/lib/Lib-jdk.jdi.gmk	Thu Apr 05 11:18:39 2018 -0700
+++ b/make/lib/Lib-jdk.jdi.gmk	Fri Apr 06 03:53:28 2018 +0200
@@ -46,7 +46,6 @@
       CFLAGS := $(CFLAGS_JDKLIB) -DUSE_MMAP \
           $(LIBDT_SHMEM_CPPFLAGS), \
       LDFLAGS := $(LDFLAGS_JDKLIB), \
-      LDFLAGS_windows := -export:jdwpTransport_OnLoad, \
       LIBS := $(JDKLIB_LIBS), \
   ))
 
--- a/make/lib/Lib-jdk.jdwp.agent.gmk	Thu Apr 05 11:18:39 2018 -0700
+++ b/make/lib/Lib-jdk.jdwp.agent.gmk	Fri Apr 06 03:53:28 2018 +0200
@@ -42,10 +42,8 @@
     OPTIMIZATION := LOW, \
     CFLAGS := $(CFLAGS_JDKLIB) -DUSE_MMAP \
         $(LIBDT_SOCKET_CPPFLAGS), \
-    MAPFILE := $(TOPDIR)/make/mapfiles/libdt_socket/mapfile-vers, \
     LDFLAGS := $(LDFLAGS_JDKLIB) \
         $(call SET_SHARED_LIBRARY_ORIGIN), \
-    LDFLAGS_windows := -export:jdwpTransport_OnLoad, \
     LIBS_linux := -lpthread, \
     LIBS_solaris := -lnsl -lsocket, \
     LIBS_windows := $(JDKLIB_LIBS) ws2_32.lib, \
@@ -73,7 +71,6 @@
     CFLAGS := $(CFLAGS_JDKLIB) -DJDWP_LOGGING \
         $(LIBJDWP_CPPFLAGS) \
         -I$(SUPPORT_OUTPUTDIR)/headers/jdk.jdwp.agent, \
-    MAPFILE := $(TOPDIR)/make/mapfiles/libjdwp/mapfile-vers, \
     LDFLAGS := $(LDFLAGS_JDKLIB) \
         $(call SET_SHARED_LIBRARY_ORIGIN), \
     LIBS := $(JDKLIB_LIBS), \
--- a/make/lib/Lib-jdk.management.agent.gmk	Thu Apr 05 11:18:39 2018 -0700
+++ b/make/lib/Lib-jdk.management.agent.gmk	Fri Apr 06 03:53:28 2018 +0200
@@ -38,7 +38,6 @@
     SRC := $(LIBMANAGEMENT_AGENT_SRC), \
     OPTIMIZATION := LOW, \
     CFLAGS := $(CFLAGS_JDKLIB) $(LIBMANAGEMENT_AGENT_CFLAGS), \
-    MAPFILE := $(TOPDIR)/make/mapfiles/libmanagement_agent/mapfile-vers, \
     LDFLAGS := $(LDFLAGS_JDKLIB) \
         $(call SET_SHARED_LIBRARY_ORIGIN), \
     LIBS := $(JDKLIB_LIBS), \
--- a/make/lib/Lib-jdk.management.gmk	Thu Apr 05 11:18:39 2018 -0700
+++ b/make/lib/Lib-jdk.management.gmk	Fri Apr 06 03:53:28 2018 +0200
@@ -59,7 +59,6 @@
     LANG := C, \
     OPTIMIZATION := $(LIBMANAGEMENT_EXT_OPTIMIZATION), \
     CFLAGS := $(CFLAGS_JDKLIB) $(LIBMANAGEMENT_EXT_CFLAGS), \
-    MAPFILE := $(TOPDIR)/make/mapfiles/libmanagement_ext/mapfile-vers, \
     LDFLAGS := $(LDFLAGS_JDKLIB) \
         $(call SET_SHARED_LIBRARY_ORIGIN), \
     LIBS := $(JDKLIB_LIBS), \
--- a/make/lib/Lib-jdk.net.gmk	Thu Apr 05 11:18:39 2018 -0700
+++ b/make/lib/Lib-jdk.net.gmk	Fri Apr 06 03:53:28 2018 +0200
@@ -34,7 +34,6 @@
       SRC := $(TOPDIR)/src/jdk.net/$(OPENJDK_TARGET_OS)/native/libextnet, \
       OPTIMIZATION := LOW, \
       CFLAGS := $(CFLAGS_JDKLIB) -I$(SUPPORT_OUTPUTDIR)/headers/jdk.net, \
-      MAPFILE := $(TOPDIR)/make/mapfiles/libextnet/mapfile-$(OPENJDK_TARGET_OS), \
       LDFLAGS := $(LDFLAGS_JDKLIB) \
           $(call SET_SHARED_LIBRARY_ORIGIN), \
       LIBS := -ljava, \
--- a/make/lib/Lib-jdk.pack.gmk	Thu Apr 05 11:18:39 2018 -0700
+++ b/make/lib/Lib-jdk.pack.gmk	Fri Apr 06 03:53:28 2018 +0200
@@ -40,7 +40,6 @@
         $(LIBJAVA_HEADER_FLAGS), \
     CFLAGS_release := -DPRODUCT, \
     DISABLED_WARNINGS_gcc := implicit-fallthrough, \
-    MAPFILE := $(TOPDIR)/make/mapfiles/libunpack/mapfile-vers, \
     LDFLAGS := $(LDFLAGS_JDKLIB) $(LDFLAGS_CXX_JDK) \
         $(call SET_SHARED_LIBRARY_ORIGIN), \
     LDFLAGS_windows := -map:$(SUPPORT_OUTPUTDIR)/native/$(MODULE)/unpack.map -debug, \
--- a/make/lib/Lib-jdk.sctp.gmk	Thu Apr 05 11:18:39 2018 -0700
+++ b/make/lib/Lib-jdk.sctp.gmk	Fri Apr 06 03:53:28 2018 +0200
@@ -41,7 +41,6 @@
             $(LIBJAVA_HEADER_FLAGS) \
             -I$(SUPPORT_OUTPUTDIR)/headers/jdk.sctp \
             -I$(SUPPORT_OUTPUTDIR)/headers/java.base, \
-        MAPFILE := $(TOPDIR)/make/mapfiles/libsctp/mapfile-vers, \
         LDFLAGS := $(LDFLAGS_JDKLIB) \
             $(call SET_SHARED_LIBRARY_ORIGIN), \
         LIBS_unix := -lnio -lnet -ljava -ljvm, \
--- a/make/lib/Lib-jdk.security.auth.gmk	Thu Apr 05 11:18:39 2018 -0700
+++ b/make/lib/Lib-jdk.security.auth.gmk	Fri Apr 06 03:53:28 2018 +0200
@@ -27,18 +27,11 @@
 
 ################################################################################
 
-LIBJAAS_MAPFILE :=
-ifeq ($(OPENJDK_TARGET_OS), solaris)
-  # only on solaris...wonder why
-  LIBJAAS_MAPFILE := $(TOPDIR)/make/mapfiles/libjaas/mapfile-vers
-endif
-
 $(eval $(call SetupJdkLibrary, BUILD_LIBJAAS, \
     NAME := jaas, \
     SRC := $(call FindSrcDirsForLib, jdk.security.auth, jaas), \
     OPTIMIZATION := LOW, \
     CFLAGS := $(CFLAGS_JDKLIB) -I$(SUPPORT_OUTPUTDIR)/headers/jdk.security.auth, \
-    MAPFILE := $(LIBJAAS_MAPFILE), \
     LDFLAGS := $(LDFLAGS_JDKLIB) \
         $(call SET_SHARED_LIBRARY_ORIGIN), \
     LIBS_windows := netapi32.lib user32.lib mpr.lib advapi32.lib $(JDKLIB_LIBS), \
--- a/make/lib/LibCommon.gmk	Thu Apr 05 11:18:39 2018 -0700
+++ b/make/lib/LibCommon.gmk	Fri Apr 06 03:53:28 2018 +0200
@@ -36,8 +36,31 @@
 # elegant solution to this.
 WIN_JAVA_LIB := $(SUPPORT_OUTPUTDIR)/native/java.base/libjava/java.lib
 
-ifneq ($(findstring $(OPENJDK_TARGET_OS), macosx windows), )
-  DISABLE_MAPFILES := true
+# Tell the compiler not to export any functions unless declared so in
+# the source code. On Windows, this is the default and cannot be changed.
+# On Mac, we have always exported all symbols, probably due to oversight
+# and/or misunderstanding. To emulate this, don't hide any symbols
+# by default.
+# Also provide an override for non-conformant libraries.
+ifeq ($(TOOLCHAIN_TYPE), gcc)
+  CFLAGS_JDKLIB += -fvisibility=hidden
+  CXXFLAGS_JDKLIB += -fvisibility=hidden
+  LDFLAGS_JDKLIB += -Wl,--exclude-libs,ALL
+  EXPORT_ALL_SYMBOLS := -fvisibility=default
+else ifeq ($(TOOLCHAIN_TYPE), clang)
+  ifneq ($(OPENJDK_TARGET_OS), macosx)
+    CFLAGS_JDKLIB += -fvisibility=hidden
+    CXXFLAGS_JDKLIB += -fvisibility=hidden
+    EXPORT_ALL_SYMBOLS := -fvisibility=default
+  endif
+else ifeq ($(TOOLCHAIN_TYPE), solstudio)
+  CFLAGS_JDKLIB += -xldscope=hidden
+  CXXFLAGS_JDKLIB += -xldscope=hidden
+  EXPORT_ALL_SYMBOLS := -xldscope=global
+else ifeq ($(TOOLCHAIN_TYPE), xlc)
+  CFLAGS_JDKLIB += -qvisibility=hidden
+  CXXFLAGS_JDKLIB += -qvisibility=hidden
+  EXPORT_ALL_SYMBOLS := -qvisibility=default
 endif
 
 ################################################################################
--- a/make/lib/SoundLibraries.gmk	Thu Apr 05 11:18:39 2018 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,90 +0,0 @@
-#
-# Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.  Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-LIBJSOUND_SRC_DIRS := $(wildcard \
-    $(TOPDIR)/src/java.desktop/share/native/libjsound \
-    $(TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS)/native/libjsound \
-    )
-
-LIBJSOUND_CFLAGS := \
-    -I$(SUPPORT_OUTPUTDIR)/headers/java.desktop \
-    $(LIBJAVA_HEADER_FLAGS) \
-    $(foreach dir, $(LIBJSOUND_SRC_DIRS), -I$(dir)) \
-    -DUSE_PORTS=TRUE \
-    -DUSE_DAUDIO=TRUE \
-    #
-
-ifneq ($(OPENJDK_TARGET_OS), solaris)
-  LIBJSOUND_CFLAGS += \
-      -DUSE_PLATFORM_MIDI_OUT=TRUE \
-      -DUSE_PLATFORM_MIDI_IN=TRUE \
-      #
-endif
-
-ifeq ($(OPENJDK_TARGET_OS), windows)
-  LIBJSOUND_CFLAGS += -DX_PLATFORM=X_WINDOWS
-endif
-
-ifeq ($(OPENJDK_TARGET_OS), linux)
-  LIBJSOUND_CFLAGS += -DX_PLATFORM=X_LINUX
-endif
-
-ifeq ($(OPENJDK_TARGET_OS), aix)
-  LIBJSOUND_CFLAGS += -DX_PLATFORM=X_AIX
-endif
-
-ifeq ($(OPENJDK_TARGET_OS), macosx)
-  LIBJSOUND_TOOLCHAIN := TOOLCHAIN_LINK_CXX
-  LIBJSOUND_CFLAGS += -DX_PLATFORM=X_MACOSX
-endif
-
-ifeq ($(OPENJDK_TARGET_OS), solaris)
-  LIBJSOUND_CFLAGS += -DX_PLATFORM=X_SOLARIS
-endif
-
-$(eval $(call SetupJdkLibrary, BUILD_LIBJSOUND, \
-    NAME := jsound, \
-    SRC := $(LIBJSOUND_SRC_DIRS), \
-    TOOLCHAIN := $(LIBJSOUND_TOOLCHAIN), \
-    OPTIMIZATION := LOW, \
-    CFLAGS := $(CFLAGS_JDKLIB) \
-        $(LIBJSOUND_CFLAGS), \
-    CXXFLAGS := $(CXXFLAGS_JDKLIB) $(LIBJSOUND_CFLAGS), \
-    MAPFILE := $(TOPDIR)/make/mapfiles/libjsound/mapfile-vers, \
-    LDFLAGS := $(LDFLAGS_JDKLIB) \
-        $(call SET_SHARED_LIBRARY_ORIGIN), \
-    LIBS_unix := -ljava -ljvm, \
-    LIBS_linux := $(ALSA_LIBS), \
-    LIBS_macosx := -framework CoreAudio -framework CoreFoundation \
-        -framework CoreServices -framework AudioUnit \
-        -framework CoreMIDI -framework AudioToolbox $(LIBCXX), \
-    LIBS_windows := $(WIN_JAVA_LIB) advapi32.lib dsound.lib winmm.lib user32.lib ole32.lib, \
-))
-
-$(BUILD_LIBJSOUND): $(call FindLib, java.base, java)
-
-TARGETS += $(BUILD_LIBJSOUND)
-
-##########################################################################################
--- a/make/mapfiles/libattach/mapfile-aix	Thu Apr 05 11:18:39 2018 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,39 +0,0 @@
-#
-# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.  Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Define public interface.
-
-SUNWprivate_1.1 {
-	global:
-            Java_sun_tools_attach_VirtualMachineImpl_socket
-            Java_sun_tools_attach_VirtualMachineImpl_connect
-            Java_sun_tools_attach_VirtualMachineImpl_sendQuitTo
-            Java_sun_tools_attach_VirtualMachineImpl_checkPermissions
-            Java_sun_tools_attach_VirtualMachineImpl_close
-            Java_sun_tools_attach_VirtualMachineImpl_read
-            Java_sun_tools_attach_VirtualMachineImpl_write
-	local:
-		*;
-};
--- a/make/mapfiles/libattach/mapfile-linux	Thu Apr 05 11:18:39 2018 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,41 +0,0 @@
-#
-# Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.  Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Define public interface.
-
-SUNWprivate_1.1 {
-	global:
-	    Java_sun_tools_attach_VirtualMachineImpl_checkPermissions;
-	    Java_sun_tools_attach_VirtualMachineImpl_close;
-	    Java_sun_tools_attach_VirtualMachineImpl_connect;
-	    Java_sun_tools_attach_VirtualMachineImpl_open;
-	    Java_sun_tools_attach_VirtualMachineImpl_sendQuitTo;
-            Java_sun_tools_attach_VirtualMachineImpl_sendQuitToChildrenOf;
-	    Java_sun_tools_attach_VirtualMachineImpl_socket;
-	    Java_sun_tools_attach_VirtualMachineImpl_read;
-	    Java_sun_tools_attach_VirtualMachineImpl_write;
-	local:
-		*;
-};
--- a/make/mapfiles/libattach/mapfile-solaris	Thu Apr 05 11:18:39 2018 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,38 +0,0 @@
-#
-# Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.  Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Define public interface.
-
-SUNWprivate_1.1 {
-	global:
-            Java_sun_tools_attach_VirtualMachineImpl_checkPermissions;
-            Java_sun_tools_attach_VirtualMachineImpl_enqueue;
-            Java_sun_tools_attach_VirtualMachineImpl_open;
-	    Java_sun_tools_attach_VirtualMachineImpl_close;
-	    Java_sun_tools_attach_VirtualMachineImpl_read;
-	    Java_sun_tools_attach_VirtualMachineImpl_sigquit;
-	local:
-		*;
-};
--- a/make/mapfiles/libattach/reorder-windows-x86	Thu Apr 05 11:18:39 2018 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,2 +0,0 @@
-jvm_attach_thread_func@4
-jvm_attach_thread_func_end
--- a/make/mapfiles/libattach/reorder-windows-x86_64	Thu Apr 05 11:18:39 2018 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,2 +0,0 @@
-jvm_attach_thread_func
-jvm_attach_thread_func_end
--- a/make/mapfiles/libawt/mapfile-mawt-vers	Thu Apr 05 11:18:39 2018 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,280 +0,0 @@
-#
-# Copyright (c) 2001, 2016, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.  Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Define public interface.
-# These are the libmawt exports. See mapfile-vers for the libawt exports
-
-SUNWprivate_1.1 {
-    global:
-        JNI_OnLoad;
-
-        Java_sun_awt_DefaultMouseInfoPeer_fillPointWithCoords;
-        Java_sun_awt_DefaultMouseInfoPeer_isWindowUnderMouse;
-        Java_java_awt_AWTEvent_nativeSetSource;
-        Java_java_awt_Checkbox_initIDs;
-        Java_java_awt_Component_initIDs;
-        Java_java_awt_Dialog_initIDs;
-        Java_java_awt_Font_initIDs;
-        Java_java_awt_KeyboardFocusManager_initIDs;
-        Java_java_awt_Menu_initIDs;
-        Java_java_awt_MenuComponent_initIDs;
-        Java_java_awt_MenuItem_initIDs;
-        Java_java_awt_Scrollbar_initIDs;
-        Java_java_awt_ScrollPane_initIDs;
-        Java_java_awt_TextArea_initIDs;
-        Java_sun_awt_FontDescriptor_initIDs;
-        Java_sun_awt_KeyboardFocusManagerPeerImpl_clearNativeGlobalFocusOwner;
-        Java_sun_awt_KeyboardFocusManagerPeerImpl_getNativeFocusOwner;
-        Java_sun_awt_KeyboardFocusManagerPeerImpl_getNativeFocusedWindow;
-        Java_sun_awt_UNIXToolkit_check_1gtk;
-        Java_sun_awt_UNIXToolkit_load_1gtk;
-        Java_sun_awt_UNIXToolkit_unload_1gtk;
-        Java_sun_awt_UNIXToolkit_load_1stock_1icon;
-        Java_sun_awt_UNIXToolkit_load_1gtk_1icon;
-        Java_sun_awt_UNIXToolkit_nativeSync;
-        Java_sun_awt_X11InputMethod_disposeXIC;
-        Java_sun_awt_X11InputMethod_isCompositionEnabledNative;
-        Java_sun_awt_X11InputMethod_resetXIC;
-        Java_sun_awt_X11InputMethod_setCompositionEnabledNative;
-        Java_sun_awt_X11InputMethod_turnoffStatusWindow;
-        Java_sun_awt_SunToolkit_closeSplashScreen;
-        Java_sun_awt_PlatformFont_initIDs;
-        Java_sun_awt_X11GraphicsConfig_init;
-        Java_sun_awt_X11GraphicsConfig_dispose;
-        Java_sun_awt_X11GraphicsConfig_pGetBounds;
-        Java_sun_awt_X11GraphicsConfig_getNumColors;
-        Java_sun_awt_X11GraphicsConfig_getXResolution;
-        Java_sun_awt_X11GraphicsConfig_getYResolution;
-        Java_sun_awt_X11GraphicsConfig_createBackBuffer;
-        Java_sun_awt_X11GraphicsConfig_destroyBackBuffer;
-        Java_sun_awt_X11GraphicsConfig_swapBuffers;
-        Java_sun_awt_X11GraphicsConfig_isTranslucencyCapable;
-        Java_sun_awt_X11GraphicsDevice_isDBESupported;
-        Java_sun_awt_X11GraphicsDevice_getDisplay;
-        Java_sun_awt_X11GraphicsDevice_getDoubleBufferVisuals;
-        Java_sun_awt_X11GraphicsDevice_getNumConfigs;
-        Java_sun_awt_X11GraphicsDevice_initIDs;
-        Java_sun_awt_X11GraphicsDevice_initXrandrExtension;
-        Java_sun_awt_X11GraphicsDevice_enterFullScreenExclusive;
-        Java_sun_awt_X11GraphicsDevice_exitFullScreenExclusive;
-        Java_sun_awt_X11GraphicsDevice_getCurrentDisplayMode;
-        Java_sun_awt_X11GraphicsDevice_enumDisplayModes;
-        Java_sun_awt_X11GraphicsDevice_configDisplayMode;
-        Java_sun_awt_X11GraphicsDevice_resetNativeData;
-        Java_sun_awt_X11GraphicsEnvironment_checkShmExt;
-        Java_sun_awt_X11GraphicsEnvironment_getDefaultScreenNum;
-        Java_sun_awt_X11GraphicsEnvironment_getDisplayString;
-        Java_sun_awt_X11GraphicsEnvironment_getNumScreens;
-        Java_sun_awt_X11GraphicsEnvironment_initDisplay;
-        Java_sun_awt_X11GraphicsEnvironment_initGLX;
-        Java_sun_awt_X11GraphicsEnvironment_pRunningXinerama;
-        Java_sun_awt_X11GraphicsEnvironment_getXineramaCenterPoint;
-        Java_sun_awt_X11GraphicsEnvironment_initXRender;
-        Java_java_awt_AWTEvent_initIDs;
-        Java_java_awt_Button_initIDs;
-        Java_java_awt_Container_initIDs;
-        Java_java_awt_Cursor_finalizeImpl;
-        Java_java_awt_Cursor_initIDs;
-        Java_java_awt_Event_initIDs;
-        Java_java_awt_event_InputEvent_initIDs;
-        Java_java_awt_event_KeyEvent_initIDs;
-        Java_java_awt_FileDialog_initIDs;
-        Java_java_awt_Frame_initIDs;
-        Java_java_awt_Insets_initIDs;
-        Java_java_awt_TextField_initIDs;
-        Java_java_awt_Window_initIDs;
-        Java_sun_awt_X11GraphicsConfig_init;
-        Java_sun_awt_X11GraphicsConfig_initIDs;
-        Java_sun_awt_X11GraphicsConfig_makeColorModel;
-        Java_sun_awt_X11GraphicsDevice_getConfigVisualId;
-        Java_sun_awt_X11GraphicsDevice_getConfigColormap;
-        Java_sun_awt_X11GraphicsDevice_getConfigDepth;
-
-        Java_sun_java2d_x11_X11PMBlitLoops_nativeBlit;
-        Java_sun_java2d_x11_X11PMBlitLoops_updateBitmask;
-        Java_sun_java2d_x11_X11PMBlitBgLoops_nativeBlitBg;
-        Java_sun_java2d_x11_X11Renderer_XFillSpans;
-        Java_sun_java2d_x11_X11Renderer_XDrawArc;
-        Java_sun_java2d_x11_X11Renderer_XDrawLine;
-        Java_sun_java2d_x11_X11Renderer_XDrawOval;
-        Java_sun_java2d_x11_X11Renderer_XDrawPoly;
-        Java_sun_java2d_x11_X11Renderer_XDrawRect;
-        Java_sun_java2d_x11_X11Renderer_XDrawRoundRect;
-        Java_sun_java2d_x11_X11Renderer_XDoPath;
-        Java_sun_java2d_x11_X11Renderer_XFillArc;
-        Java_sun_java2d_x11_X11Renderer_XFillOval;
-        Java_sun_java2d_x11_X11Renderer_XFillPoly;
-        Java_sun_java2d_x11_X11Renderer_XFillRect;
-        Java_sun_java2d_x11_X11Renderer_XFillRoundRect;
-        Java_sun_java2d_x11_X11Renderer_devCopyArea;
-        Java_sun_java2d_x11_X11SurfaceData_initIDs;
-        Java_sun_java2d_x11_X11SurfaceData_initOps;
-        Java_sun_java2d_x11_X11SurfaceData_initSurface;
-        Java_sun_java2d_x11_X11SurfaceData_isShmPMAvailable;
-        Java_sun_java2d_x11_X11SurfaceData_XSetCopyMode;
-        Java_sun_java2d_x11_X11SurfaceData_XSetXorMode;
-        Java_sun_java2d_x11_X11SurfaceData_XSetForeground;
-
-        Java_sun_java2d_x11_XSurfaceData_initOps;
-        Java_sun_java2d_x11_XSurfaceData_XCreateGC;
-        Java_sun_java2d_x11_XSurfaceData_XResetClip;
-        Java_sun_java2d_x11_XSurfaceData_XSetClip;
-        Java_sun_java2d_x11_XSurfaceData_flushNativeSurface;
-        Java_sun_java2d_x11_XSurfaceData_isDrawableValid;
-        Java_sun_java2d_x11_XSurfaceData_setInvalid;
-        Java_sun_java2d_x11_XSurfaceData_XSetGraphicsExposures;
-        Java_sun_java2d_xr_XRSurfaceData_initXRPicture;
-        Java_sun_java2d_xr_XRSurfaceData_initIDs;
-        Java_sun_java2d_xr_XRSurfaceData_XRInitSurface;
-        Java_sun_java2d_xr_XRSurfaceData_freeXSDOPicture;
-        Java_sun_java2d_xr_XRBackendNative_initIDs;
-        Java_sun_java2d_xr_XIDGenerator_bufferXIDs;
-        Java_sun_java2d_xr_XRBackendNative_freeGC;
-        Java_sun_java2d_xr_XRBackendNative_createGC;
-        Java_sun_java2d_xr_XRBackendNative_createPixmap;
-        Java_sun_java2d_xr_XRBackendNative_createPictureNative;
-        Java_sun_java2d_xr_XRBackendNative_freePicture;
-        Java_sun_java2d_xr_XRBackendNative_freePixmap;
-        Java_sun_java2d_xr_XRBackendNative_setPictureRepeat;
-        Java_sun_java2d_xr_XRBackendNative_setGCExposures;
-        Java_sun_java2d_xr_XRBackendNative_setGCForeground;
-        Java_sun_java2d_xr_XRBackendNative_copyArea;
-        Java_sun_java2d_xr_XRBackendNative_renderComposite;
-        Java_sun_java2d_xr_XRBackendNative_renderRectangle;
-        Java_sun_java2d_xr_XRBackendNative_XRenderRectanglesNative;
-        Java_sun_java2d_xr_XRBackendNative_XRSetTransformNative;
-        Java_sun_java2d_xr_XRBackendNative_XRCreateLinearGradientPaintNative;
-        Java_sun_java2d_xr_XRBackendNative_XRCreateRadialGradientPaintNative;
-        Java_sun_java2d_xr_XRBackendNative_setFilter;
-        Java_sun_java2d_xr_XRBackendNative_XRSetClipNative;
-        Java_sun_java2d_xr_XRBackendNative_putMaskNative;
-        Java_sun_java2d_xr_XRBackendNative_XRAddGlyphsNative;
-        Java_sun_java2d_xr_XRBackendNative_XRFreeGlyphsNative;
-        Java_sun_java2d_xr_XRBackendNative_XRenderCreateGlyphSetNative;
-        Java_sun_java2d_xr_XRBackendNative_XRenderCompositeTextNative;
-        Java_sun_java2d_xr_XRBackendNative_setGCMode;
-        Java_sun_java2d_xr_XRBackendNative_GCRectanglesNative;
-        Java_sun_java2d_xr_XRUtils_initFormatPtrs;
-        XRT_DrawGlyphList;
-
-        Java_sun_java2d_opengl_OGLContext_getOGLIdString;
-        Java_sun_java2d_opengl_OGLMaskFill_maskFill;
-        Java_sun_java2d_opengl_OGLRenderer_drawPoly;
-        Java_sun_java2d_opengl_OGLRenderQueue_flushBuffer;
-        Java_sun_java2d_opengl_OGLSurfaceData_initTexture;
-        Java_sun_java2d_opengl_OGLSurfaceData_initFBObject;
-        Java_sun_java2d_opengl_OGLSurfaceData_initFlipBackbuffer;
-        Java_sun_java2d_opengl_OGLSurfaceData_getTextureID;
-        Java_sun_java2d_opengl_OGLSurfaceData_getTextureTarget;
-        Java_sun_java2d_opengl_OGLTextRenderer_drawGlyphList;
-        Java_sun_java2d_opengl_GLXGraphicsConfig_getGLXConfigInfo;
-        Java_sun_java2d_opengl_GLXGraphicsConfig_initConfig;
-        Java_sun_java2d_opengl_GLXGraphicsConfig_getOGLCapabilities;
-        Java_sun_java2d_opengl_GLXSurfaceData_initOps;
-
-        Java_sun_print_CUPSPrinter_initIDs;
-        Java_sun_print_CUPSPrinter_getCupsServer;
-        Java_sun_print_CUPSPrinter_getCupsPort;
-        Java_sun_print_CUPSPrinter_getCupsDefaultPrinter;
-        Java_sun_print_CUPSPrinter_canConnect;
-        Java_sun_print_CUPSPrinter_getMedia;
-        Java_sun_print_CUPSPrinter_getPageSizes;
-        Java_sun_print_CUPSPrinter_getResolutions;
-
-        Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1arrow;
-        Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1box;
-        Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1box_1gap;
-        Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1check;
-        Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1expander;
-        Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1extension;
-        Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1flat_1box;
-        Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1focus;
-        Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1handle;
-        Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1hline;
-        Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1option;
-        Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1shadow;
-        Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1slider;
-        Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1vline;
-        Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1background;
-        Java_com_sun_java_swing_plaf_gtk_GTKEngine_nativeStartPainting;
-        Java_com_sun_java_swing_plaf_gtk_GTKEngine_nativeFinishPainting;
-        Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1switch_1theme;
-        Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1get_1gtk_1setting;
-        Java_com_sun_java_swing_plaf_gtk_GTKEngine_nativeSetRangeValue;
-        Java_com_sun_java_swing_plaf_gtk_GTKStyle_nativeGetXThickness;
-        Java_com_sun_java_swing_plaf_gtk_GTKStyle_nativeGetYThickness;
-        Java_com_sun_java_swing_plaf_gtk_GTKStyle_nativeGetColorForState;
-        Java_com_sun_java_swing_plaf_gtk_GTKStyle_nativeGetClassValue;
-        Java_com_sun_java_swing_plaf_gtk_GTKStyle_nativeGetPangoFontName;
-
-        awt_display;
-        awt_Lock;
-        awt_Unlock;
-        awt_GetDrawingSurface;
-        awt_FreeDrawingSurface;
-        awt_GetComponent;
-        awt_CreateEmbeddedFrame;
-        awt_SetBounds;
-        awt_SynthesizeWindowActivation;
-
-        X11SurfaceData_GetOps;
-        getDefaultConfig;
-            Java_sun_font_FontConfigManager_getFontConfig;
-            Java_sun_font_FontConfigManager_getFontConfigAASettings;
-        Java_sun_awt_FcFontManager_getFontPathNative;
-        Java_sun_font_SunFontManager_populateFontFileNameMap;
-
-        # CDE private entry point
-        Java_sun_awt_motif_XsessionWMcommand;
-        Java_sun_awt_motif_XsessionWMcommand_New;
-
-        # libfontmanager entry points
-        AWTIsHeadless;
-        AWTCountFonts;
-        AWTLoadFont;
-        AWTFreeFont;
-        AWTFontAscent;
-        AWTFontDescent;
-        AWTFontMinByte1;
-        AWTFontMaxByte1;
-        AWTFontMinCharOrByte2;
-        AWTFontMaxCharOrByte2;
-        AWTFontDefaultChar;
-        AWTFontPerChar;
-        AWTFontMaxBounds;
-        AWTFontTextExtents16;
-        AWTFreeChar;
-        AWTFontGenerateImage;
-        AWTCharAdvance;
-        AWTCharLBearing;
-        AWTCharRBearing;
-        AWTCharAscent;
-        AWTCharDescent;
-        AWTDrawGlyphList;
-        AccelGlyphCache_RemoveAllCellInfos;
-
-    local:
-        *;
-};
--- a/make/mapfiles/libawt/mapfile-vers	Thu Apr 05 11:18:39 2018 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,189 +0,0 @@
-#
-# Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.  Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Define public interface.
-# These are the libawt exports, mapfile-mawt-vers contains the libmawt exports.
-
-SUNWprivate_1.1 {
-    global:
-        JNI_OnLoad;
-
-        Java_java_awt_CheckboxMenuItem_initIDs;
-        Java_java_awt_Color_initIDs;
-        Java_java_awt_FontMetrics_initIDs;
-        Java_java_awt_image_BufferedImage_initIDs;
-        Java_sun_awt_image_DataBufferNative_getElem;
-        Java_sun_awt_image_DataBufferNative_setElem;
-        Java_java_awt_image_ColorModel_initIDs;
-        Java_java_awt_image_IndexColorModel_initIDs;
-        Java_java_awt_image_Kernel_initIDs;
-        Java_java_awt_image_Raster_initIDs;
-        Java_java_awt_image_SampleModel_initIDs;
-        Java_java_awt_Label_initIDs;
-        Java_java_awt_MenuBar_initIDs;
-        Java_java_awt_ScrollPaneAdjustable_initIDs;
-        Java_java_awt_Toolkit_initIDs;
-        Java_sun_awt_DebugSettings_setCTracingOn__Z;
-        Java_sun_awt_DebugSettings_setCTracingOn__ZLjava_lang_String_2;
-        Java_sun_awt_DebugSettings_setCTracingOn__ZLjava_lang_String_2I;
-        Java_sun_awt_image_ByteComponentRaster_initIDs;
-        Java_sun_awt_image_GifImageDecoder_initIDs;
-        Java_sun_awt_image_GifImageDecoder_parseImage;
-        Java_sun_awt_image_ImageRepresentation_initIDs;
-        Java_sun_awt_image_ImageRepresentation_setDiffICM;
-        Java_sun_awt_image_ImageRepresentation_setICMpixels;
-        Java_sun_awt_image_ImagingLib_convolveBI;
-        Java_sun_awt_image_ImagingLib_convolveRaster;
-        Java_sun_awt_image_ImagingLib_init;
-        Java_sun_awt_image_ImagingLib_transformBI;
-        Java_sun_awt_image_ImagingLib_transformRaster;
-        Java_sun_awt_image_IntegerComponentRaster_initIDs;
-        Java_sun_awt_image_ShortComponentRaster_initIDs;
-        Java_sun_java2d_pipe_BufferedMaskBlit_enqueueTile;
-        Java_sun_java2d_pipe_BufferedRenderPipe_fillSpans;
-        Java_sun_java2d_pipe_SpanClipRenderer_eraseTile;
-        Java_sun_java2d_pipe_SpanClipRenderer_fillTile;
-        Java_sun_java2d_pipe_ShapeSpanIterator_addSegment;
-        Java_sun_java2d_pipe_ShapeSpanIterator_moveTo;
-        Java_sun_java2d_pipe_ShapeSpanIterator_lineTo;
-        Java_sun_java2d_pipe_ShapeSpanIterator_quadTo;
-        Java_sun_java2d_pipe_ShapeSpanIterator_curveTo;
-        Java_sun_java2d_pipe_ShapeSpanIterator_closePath;
-        Java_sun_java2d_pipe_ShapeSpanIterator_pathDone;
-        Java_sun_java2d_pipe_ShapeSpanIterator_getNativeConsumer;
-        Java_sun_java2d_pipe_ShapeSpanIterator_appendPoly;
-        Java_sun_java2d_pipe_ShapeSpanIterator_dispose;
-        Java_sun_java2d_pipe_ShapeSpanIterator_getNativeIterator;
-        Java_sun_java2d_pipe_ShapeSpanIterator_getPathBox;
-        Java_sun_java2d_pipe_ShapeSpanIterator_initIDs;
-        Java_sun_java2d_pipe_ShapeSpanIterator_intersectClipBox;
-        Java_sun_java2d_pipe_ShapeSpanIterator_nextSpan;
-        Java_sun_java2d_pipe_ShapeSpanIterator_setNormalize;
-        Java_sun_java2d_pipe_ShapeSpanIterator_setOutputAreaXYXY;
-        Java_sun_java2d_pipe_ShapeSpanIterator_setRule;
-        Java_sun_java2d_pipe_ShapeSpanIterator_skipDownTo;
-
-        Java_java_awt_Choice_initIDs;
-        Java_java_awt_Dimension_initIDs;
-        Java_java_awt_event_MouseEvent_initIDs;
-        Java_java_awt_image_SinglePixelPackedSampleModel_initIDs;
-        Java_java_awt_Rectangle_initIDs;
-        Java_sun_awt_image_BufImgSurfaceData_initIDs;
-        Java_sun_awt_image_BufImgSurfaceData_initRaster;
-        Java_sun_awt_image_BufImgSurfaceData_freeNativeICMData;
-        Java_sun_awt_image_BytePackedRaster_initIDs;
-        Java_sun_awt_image_ImagingLib_lookupByteBI;
-        Java_sun_awt_image_ImagingLib_lookupByteRaster;
-        Java_sun_java2d_SurfaceData_initIDs;
-        Java_sun_java2d_SurfaceData_isOpaqueGray;
-        Java_sun_java2d_Disposer_initIDs;
-        Java_sun_java2d_DefaultDisposerRecord_invokeNativeDispose;
-        Java_sun_java2d_loops_BlitBg_BlitBg;
-        Java_sun_java2d_loops_Blit_Blit;
-        Java_sun_java2d_loops_ScaledBlit_Scale;
-        Java_sun_java2d_loops_DrawLine_DrawLine;
-        Java_sun_java2d_loops_DrawPolygons_DrawPolygons;
-        Java_sun_java2d_loops_DrawPath_DrawPath;
-        Java_sun_java2d_loops_FillPath_FillPath;
-
-        Java_sun_java2d_loops_DrawRect_DrawRect;
-        Java_sun_java2d_loops_FillRect_FillRect;
-        Java_sun_java2d_loops_FillSpans_FillSpans;
-        Java_sun_java2d_loops_FillParallelogram_FillParallelogram;
-        Java_sun_java2d_loops_DrawParallelogram_DrawParallelogram;
-        Java_sun_java2d_loops_GraphicsPrimitiveMgr_initIDs;
-        Java_sun_java2d_loops_GraphicsPrimitiveMgr_registerNativeLoops;
-        Java_sun_java2d_loops_MaskBlit_MaskBlit;
-        Java_sun_java2d_loops_MaskFill_MaskFill;
-        Java_sun_java2d_loops_MaskFill_FillAAPgram;
-        Java_sun_java2d_loops_MaskFill_DrawAAPgram;
-        Java_sun_java2d_loops_TransformHelper_Transform;
-        Java_sun_java2d_pipe_Region_initIDs;
-        Java_sun_java2d_pipe_SpanClipRenderer_initIDs;
-        sun_awt_image_GifImageDecoder_initIDs;
-
-        # libmawt entry points
-        SurfaceData_InitOps;
-        SurfaceData_ThrowInvalidPipeException;
-        SurfaceData_IntersectBlitBounds;
-        SurfaceData_IntersectBoundsXYXY;
-        Region_GetBounds;
-        Region_GetInfo;
-        Region_StartIteration;
-        Region_CountIterationRects;
-        Region_NextIteration;
-        Region_EndIteration;
-        RegionToYXBandedRectangles;
-        GrPrim_CompGetXorInfo;
-        GrPrim_CompGetAlphaInfo;
-        J2dTraceImpl;
-        J2dTraceInit;
-        img_makePalette;
-        initInverseGrayLut;
-        make_dither_arrays;
-        make_uns_ordered_dither_array;
-
-        # variables exported to libmawt
-        std_img_oda_red;
-        std_img_oda_blue;
-        std_img_oda_green;
-        std_odas_computed;
-        g_CMpDataID;
-        colorValueID;
-        mul8table;
-        div8table;
-        jvm;
-
-        # ProcessPath entry points and data
-        doDrawPath;
-        doFillPath;
-        path2DNumTypesID;
-        path2DTypesID;
-        path2DWindingRuleID;
-        path2DFloatCoordsID;
-        sg2dStrokeHintID;
-        sunHints_INTVAL_STROKE_PURE;
-
-        # CDE private entry points
-        # These are in awt_LoadLibrary.c and falls through to libmawt.
-        # Evidently CDE needs this for backward compatability.
-        Java_sun_awt_motif_XsessionWMcommand;
-        Java_sun_awt_motif_XsessionWMcommand_New;
-
-        # libfontmanager entry points
-        AWTIsHeadless;
-        GrPrim_Sg2dGetCompInfo;
-        GrPrim_Sg2dGetClip;
-        GetNativePrim;
-        SurfaceData_IntersectBounds;
-        SurfaceData_GetOps;
-        Disposer_AddRecord;
-        GrPrim_Sg2dGetEaRGB;
-        GrPrim_Sg2dGetPixel;
-        GrPrim_Sg2dGetLCDTextContrast;
-
-    local:
-        *;
-};
--- a/make/mapfiles/libawt/mapfile-vers-linux	Thu Apr 05 11:18:39 2018 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,303 +0,0 @@
-#
-# Copyright (c) 2002, 2016, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.  Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Define public interface for libawt.so on Linux.
-# Linux port does not use mawt, all public symbols are in libawt.so
-
-SUNWprivate_1.1 {
-    global:
-        JNI_OnLoad;
-
-        Java_java_awt_CheckboxMenuItem_initIDs;
-        Java_java_awt_Color_initIDs;
-        Java_java_awt_FontMetrics_initIDs;
-        Java_java_awt_image_BufferedImage_initIDs;
-        Java_sun_awt_image_DataBufferNative_getElem;
-        Java_sun_awt_image_DataBufferNative_setElem;
-        Java_java_awt_image_ColorModel_initIDs;
-        Java_java_awt_image_IndexColorModel_initIDs;
-        Java_java_awt_image_Kernel_initIDs;
-        Java_java_awt_image_Raster_initIDs;
-        Java_java_awt_image_SampleModel_initIDs;
-        Java_java_awt_Label_initIDs;
-        Java_java_awt_MenuBar_initIDs;
-        Java_java_awt_ScrollPaneAdjustable_initIDs;
-        Java_java_awt_Toolkit_initIDs;
-        Java_java_awt_TrayIcon_initIDs;
-        Java_sun_awt_DebugSettings_setCTracingOn__Z;
-        Java_sun_awt_DebugSettings_setCTracingOn__ZLjava_lang_String_2;
-        Java_sun_awt_DebugSettings_setCTracingOn__ZLjava_lang_String_2I;
-        Java_sun_awt_image_ByteComponentRaster_initIDs;
-        Java_sun_awt_image_GifImageDecoder_initIDs;
-        Java_sun_awt_image_GifImageDecoder_parseImage;
-        Java_sun_awt_image_Image_initIDs;
-        Java_sun_awt_image_ImageRepresentation_initIDs;
-        Java_sun_awt_image_ImageRepresentation_setDiffICM;
-        Java_sun_awt_image_ImageRepresentation_setICMpixels;
-        Java_sun_awt_image_ImagingLib_convolveBI;
-        Java_sun_awt_image_ImagingLib_convolveRaster;
-        Java_sun_awt_image_ImagingLib_init;
-        Java_sun_awt_image_ImagingLib_transformBI;
-        Java_sun_awt_image_ImagingLib_transformRaster;
-        Java_sun_awt_image_IntegerComponentRaster_initIDs;
-        Java_sun_awt_image_ShortComponentRaster_initIDs;
-        Java_sun_java2d_pipe_SpanClipRenderer_eraseTile;
-        Java_sun_java2d_pipe_SpanClipRenderer_fillTile;
-        Java_sun_java2d_pipe_ShapeSpanIterator_addSegment;
-        Java_sun_java2d_pipe_ShapeSpanIterator_moveTo;
-        Java_sun_java2d_pipe_ShapeSpanIterator_lineTo;
-        Java_sun_java2d_pipe_ShapeSpanIterator_quadTo;
-        Java_sun_java2d_pipe_ShapeSpanIterator_curveTo;
-        Java_sun_java2d_pipe_ShapeSpanIterator_closePath;
-        Java_sun_java2d_pipe_ShapeSpanIterator_pathDone;
-        Java_sun_java2d_pipe_ShapeSpanIterator_getNativeConsumer;
-        Java_sun_java2d_pipe_ShapeSpanIterator_appendPoly;
-        Java_sun_java2d_pipe_ShapeSpanIterator_dispose;
-        Java_sun_java2d_pipe_ShapeSpanIterator_getNativeIterator;
-        Java_sun_java2d_pipe_ShapeSpanIterator_getPathBox;
-        Java_sun_java2d_pipe_ShapeSpanIterator_initIDs;
-        Java_sun_java2d_pipe_ShapeSpanIterator_intersectClipBox;
-        Java_sun_java2d_pipe_ShapeSpanIterator_nextSpan;
-        Java_sun_java2d_pipe_ShapeSpanIterator_setNormalize;
-        Java_sun_java2d_pipe_ShapeSpanIterator_setOutputAreaXYXY;
-        Java_sun_java2d_pipe_ShapeSpanIterator_setRule;
-        Java_sun_java2d_pipe_ShapeSpanIterator_skipDownTo;
-
-        Java_java_awt_Choice_initIDs;
-        Java_java_awt_Dimension_initIDs;
-        Java_java_awt_event_MouseEvent_initIDs;
-        Java_java_awt_image_SinglePixelPackedSampleModel_initIDs;
-        Java_java_awt_Rectangle_initIDs;
-        Java_sun_awt_image_BufImgSurfaceData_getSurfaceData;
-        Java_sun_awt_image_BufImgSurfaceData_initIDs;
-        Java_sun_awt_image_BufImgSurfaceData_initRaster;
-        Java_sun_awt_image_BufImgSurfaceData_setSurfaceData;
-        Java_sun_awt_image_BufImgSurfaceData_freeNativeICMData;
-        Java_sun_awt_image_BytePackedRaster_initIDs;
-        Java_sun_awt_image_ImagingLib_lookupByteBI;
-        Java_sun_awt_image_ImagingLib_lookupByteRaster;
-        Java_sun_java2d_SurfaceData_initIDs;
-        Java_sun_java2d_SurfaceData_isOpaqueGray;
-        Java_sun_java2d_Disposer_initIDs;
-        Java_sun_java2d_DefaultDisposerRecord_invokeNativeDispose;
-        Java_sun_java2d_loops_BlitBg_BlitBg;
-        Java_sun_java2d_loops_Blit_Blit;
-        Java_sun_java2d_loops_ScaledBlit_Scale;
-        Java_sun_java2d_loops_DrawLine_DrawLine;
-        Java_sun_java2d_loops_DrawPolygons_DrawPolygons;
-        Java_sun_java2d_loops_DrawRect_DrawRect;
-        Java_sun_java2d_loops_FillRect_FillRect;
-        Java_sun_java2d_loops_FillSpans_FillSpans;
-        Java_sun_java2d_loops_GraphicsPrimitiveMgr_initIDs;
-        Java_sun_java2d_loops_GraphicsPrimitiveMgr_registerNativeLoops;
-        Java_sun_java2d_loops_MaskBlit_MaskBlit;
-        Java_sun_java2d_loops_MaskFill_MaskFill;
-        Java_sun_java2d_loops_MaskFill_FillAAPgram;
-        Java_sun_java2d_loops_MaskFill_DrawAAPgram;
-        Java_sun_java2d_pipe_BufferedRenderPipe_fillSpans;
-        Java_sun_java2d_pipe_SpanClipRenderer_initIDs;
-        sun_awt_image_GifImageDecoder_initIDs;
-
-        # libmawt entry points
-        SurfaceData_InitOps;
-        SurfaceData_ThrowInvalidPipeException;
-        Region_GetBounds;
-        Region_GetInfo;
-        Region_StartIteration;
-        Region_CountIterationRects;
-        Region_NextIteration;
-        Region_EndIteration;
-        GrPrim_CompGetXorInfo;
-        GrPrim_CompGetAlphaInfo;
-        img_makePalette;
-        initInverseGrayLut;
-        make_dither_arrays;
-        make_uns_ordered_dither_array;
-
-        # variables exported to libmawt
-        std_img_oda_red;
-        std_img_oda_blue;
-        std_img_oda_green;
-        std_odas_computed;
-        g_CMpDataID;
-        colorValueID;
-        jvm;
-
-        # CDE private entry point
-        # This is in awt_LoadLibrary.c and falls through to libmawt.
-        # Evidently CDE needs this for backward compatability.
-        Java_sun_awt_motif_XsessionWMcommand;
-
-        # libfontmanager entry points
-        AWTIsHeadless;
-        GrPrim_Sg2dGetCompInfo;
-        GrPrim_Sg2dGetClip;
-        GetNativePrim;
-        SurfaceData_IntersectBounds;
-        SurfaceData_GetOps;
-        Disposer_AddRecord;
-        GrPrim_Sg2dGetEaRGB;
-        GrPrim_Sg2dGetPixel;
-        GrPrim_Sg2dGetLCDTextContrast;
-
-        Java_sun_awt_DefaultMouseInfoPeer_fillPointWithCoords;
-        Java_sun_awt_DefaultMouseInfoPeer_isWindowUnderMouse;
-        Java_java_awt_AWTEvent_nativeSetSource;
-        Java_java_awt_Checkbox_initIDs;
-        Java_java_awt_Component_initIDs;
-        Java_java_awt_Dialog_initIDs;
-        Java_java_awt_Font_initIDs;
-        Java_sun_awt_KeyboardFocusManagerPeerImpl_clearNativeGlobalFocusOwner;
-        Java_sun_awt_KeyboardFocusManagerPeerImpl_getNativeFocusOwner;
-        Java_sun_awt_KeyboardFocusManagerPeerImpl_getNativeFocusedWindow;
-        Java_java_awt_KeyboardFocusManager_initIDs;
-        Java_java_awt_Menu_initIDs;
-        Java_java_awt_MenuComponent_initIDs;
-        Java_java_awt_MenuItem_initIDs;
-        Java_java_awt_Scrollbar_initIDs;
-        Java_java_awt_ScrollPane_initIDs;
-        Java_java_awt_TextArea_initIDs;
-        Java_sun_awt_FontDescriptor_initIDs;
-        Java_sun_awt_X11InputMethod_disposeXIC;
-        Java_sun_awt_X11InputMethod_isCompositionEnabledNative;
-        Java_sun_awt_X11InputMethod_resetXIC;
-        Java_sun_awt_X11InputMethod_setCompositionEnabledNative;
-        Java_sun_awt_X11InputMethod_turnoffStatusWindow;
-        Java_sun_awt_SunToolkit_closeSplashScreen;
-        Java_sun_awt_PlatformFont_initIDs;
-        Java_sun_awt_X11GraphicsConfig_init;
-        Java_sun_awt_X11GraphicsConfig_dispose;
-        Java_sun_awt_X11GraphicsConfig_pGetBounds;
-        Java_sun_awt_X11GraphicsConfig_getNumColors;
-        Java_sun_awt_X11GraphicsConfig_getXResolution;
-        Java_sun_awt_X11GraphicsConfig_getYResolution;
-        Java_sun_awt_X11GraphicsConfig_isTranslucencyCapable;
-        Java_sun_awt_X11GraphicsDevice_isDBESupported;
-        Java_sun_awt_X11GraphicsDevice_getDisplay;
-        Java_sun_awt_X11GraphicsDevice_getDoubleBufferVisuals;
-        Java_sun_awt_X11GraphicsDevice_getNumConfigs;
-        Java_sun_awt_X11GraphicsDevice_initIDs;
-        Java_sun_awt_X11GraphicsDevice_initXrandrExtension;
-        Java_sun_awt_X11GraphicsDevice_enterFullScreenExclusive;
-        Java_sun_awt_X11GraphicsDevice_exitFullScreenExclusive;
-        Java_sun_awt_X11GraphicsDevice_getCurrentDisplayMode;
-        Java_sun_awt_X11GraphicsDevice_enumDisplayModes;
-        Java_sun_awt_X11GraphicsDevice_configDisplayMode;
-        Java_sun_awt_X11GraphicsDevice_resetNativeData;
-        Java_sun_awt_X11GraphicsDevice_getNativeScaleFactor;
-        Java_sun_awt_X11GraphicsEnvironment_checkShmExt;
-        Java_sun_awt_X11GraphicsEnvironment_getDefaultScreenNum;
-        Java_sun_awt_X11GraphicsEnvironment_getDisplayString;
-        Java_sun_awt_X11GraphicsEnvironment_getNumScreens;
-        Java_sun_awt_X11GraphicsEnvironment_initDisplay;
-        Java_sun_awt_X11GraphicsEnvironment_pRunningXinerama;
-        Java_sun_awt_X11GraphicsEnvironment_getXineramaCenterPoint;
-        Java_sun_awt_X11GraphicsEnvironment_initXRender;
-
-        Java_java_awt_AWTEvent_initIDs;
-        Java_java_awt_Button_initIDs;
-        Java_java_awt_Container_initIDs;
-        Java_java_awt_Cursor_finalizeImpl;
-        Java_java_awt_Cursor_initIDs;
-        Java_java_awt_Event_initIDs;
-        Java_java_awt_event_InputEvent_initIDs;
-        Java_java_awt_event_KeyEvent_initIDs;
-        Java_java_awt_FileDialog_initIDs;
-        Java_java_awt_Frame_initIDs;
-        Java_java_awt_Insets_initIDs;
-        Java_java_awt_TextField_initIDs;
-        Java_java_awt_Window_initIDs;
-        Java_sun_awt_motif_X11OffScreenImage_updateBitmask;
-        Java_sun_awt_X11GraphicsConfig_init;
-        Java_sun_awt_X11GraphicsConfig_initIDs;
-        Java_sun_awt_X11GraphicsConfig_makeColorModel;
-        Java_sun_awt_X11GraphicsDevice_getConfigVisualId;
-        Java_sun_awt_X11PMBlitLoops_Blit;
-        Java_sun_awt_X11PMBlitBgLoops_nativeBlitBg;
-        Java_sun_awt_X11Renderer_devFillSpans;
-        Java_sun_awt_X11Renderer_doDrawArc;
-        Java_sun_awt_X11Renderer_doDrawLine;
-        Java_sun_awt_X11Renderer_doDrawOval;
-        Java_sun_awt_X11Renderer_doDrawPoly;
-        Java_sun_awt_X11Renderer_doDrawRect;
-        Java_sun_awt_X11Renderer_doDrawRoundRect;
-        Java_sun_awt_X11Renderer_doFillArc;
-        Java_sun_awt_X11Renderer_doFillOval;
-        Java_sun_awt_X11Renderer_doFillPoly;
-        Java_sun_awt_X11Renderer_doFillRect;
-        Java_sun_awt_X11Renderer_doFillRoundRect;
-        Java_sun_awt_X11Renderer_devCopyArea;
-        Java_sun_awt_X11SurfaceData_initIDs;
-        Java_sun_awt_X11SurfaceData_initOps;
-        Java_sun_awt_X11SurfaceData_initSurface;
-        Java_sun_awt_X11SurfaceData_setInvalid;
-        Java_sun_awt_X11SurfaceData_flushNativeSurface;
-        awt_display;
-        awt_lock;
-        awt_Lock;
-        awt_Unlock;
-        awt_GetDrawingSurface;
-        awt_FreeDrawingSurface;
-        awt_GetComponent;
-        awt_CreateEmbeddedFrame;
-        awt_SetBounds;
-        awt_SynthesizeWindowActivation;
-
-        X11SurfaceData_GetOps;
-        getDefaultConfig;
-        Java_sun_font_FontConfigManager_getFontConfig;
-        Java_sun_font_FontConfigManager_getFontConfigAASettings;
-        Java_sun_awt_FcFontManager_getFontPathNative;
-        Java_sun_font_SunFontManager_populateFontFileNameMap;
-
-        # CDE private entry point
-        Java_sun_awt_motif_XsessionWMcommand;
-
-        # libfontmanager entry points
-        AWTIsHeadless;
-        AWTCountFonts;
-        AWTLoadFont;
-        AWTFreeFont;
-        AWTFontMinByte1;
-        AWTFontMaxByte1;
-        AWTFontMinCharOrByte2;
-        AWTFontMaxCharOrByte2;
-        AWTFontDefaultChar;
-        AWTFontPerChar;
-        AWTFontMaxBounds;
-        AWTFontTextExtents16;
-        AWTFreeChar;
-        AWTFontGenerateImage;
-        AWTCharAdvance;
-        AWTCharLBearing;
-        AWTCharRBearing;
-        AWTCharAscent;
-        AWTCharDescent;
-        AWTDrawGlyphList;
-        AccelGlyphCache_RemoveAllCellInfos;
-
-    local:
-        *;
-};
--- a/make/mapfiles/libawt_headless/mapfile-vers	Thu Apr 05 11:18:39 2018 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,109 +0,0 @@
-#
-# Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.  Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Define public interface.
-
-SUNWprivate_1.1 {
-    global:
-        JNI_OnLoad;
-
-        Java_sun_java2d_x11_X11PMBlitLoops_nativeBlit;
-        Java_sun_java2d_x11_X11PMBlitBgLoops_nativeBlitBg;
-        Java_sun_java2d_x11_X11Renderer_XFillSpans;
-        Java_sun_java2d_x11_X11Renderer_XDrawArc;
-        Java_sun_java2d_x11_X11Renderer_XDrawLine;
-        Java_sun_java2d_x11_X11Renderer_XDrawOval;
-        Java_sun_java2d_x11_X11Renderer_XDrawPoly;
-        Java_sun_java2d_x11_X11Renderer_XDrawRect;
-        Java_sun_java2d_x11_X11Renderer_XDrawRoundRect;
-        Java_sun_java2d_x11_X11Renderer_XDoPath;
-        Java_sun_java2d_x11_X11Renderer_XFillArc;
-        Java_sun_java2d_x11_X11Renderer_XFillOval;
-        Java_sun_java2d_x11_X11Renderer_XFillPoly;
-        Java_sun_java2d_x11_X11Renderer_XFillRect;
-        Java_sun_java2d_x11_X11Renderer_XFillRoundRect;
-        Java_sun_java2d_x11_X11Renderer_devCopyArea;
-        Java_sun_java2d_x11_X11SurfaceData_initIDs;
-        Java_sun_java2d_x11_X11SurfaceData_initSurface;
-        Java_sun_java2d_x11_X11SurfaceData_XSetCopyMode;
-        Java_sun_java2d_x11_X11SurfaceData_XSetXorMode;
-        Java_sun_java2d_x11_X11SurfaceData_XSetForeground;
-
-        Java_sun_java2d_x11_XSurfaceData_initOps;
-        Java_sun_java2d_x11_XSurfaceData_XCreateGC;
-        Java_sun_java2d_x11_XSurfaceData_XResetClip;
-        Java_sun_java2d_x11_XSurfaceData_XSetClip;
-        Java_sun_java2d_x11_XSurfaceData_flushNativeSurface;
-        Java_sun_java2d_x11_XSurfaceData_isDrawableValid;
-        Java_sun_java2d_x11_XSurfaceData_setInvalid;
-        Java_sun_java2d_x11_XSurfaceData_XSetGraphicsExposures;
-
-        X11SurfaceData_GetOps;
-        Java_java_awt_Font_initIDs;
-        Java_sun_font_FontConfigManager_getFontConfig;
-        Java_sun_font_FontConfigManager_getFontConfigAASettings;
-        Java_sun_font_FontConfigManager_getFontConfigVersion;
-        Java_sun_awt_FcFontManager_getFontPathNative;
-
-        Java_sun_awt_FontDescriptor_initIDs;
-        Java_sun_awt_PlatformFont_initIDs;
-
-        Java_sun_print_CUPSPrinter_initIDs;
-        Java_sun_print_CUPSPrinter_getCupsServer;
-        Java_sun_print_CUPSPrinter_getCupsPort;
-        Java_sun_print_CUPSPrinter_getCupsDefaultPrinter;
-        Java_sun_print_CUPSPrinter_canConnect;
-        Java_sun_print_CUPSPrinter_getMedia;
-        Java_sun_print_CUPSPrinter_getPageSizes;
-        Java_sun_print_CUPSPrinter_getResolutions;
-
-        # libfontmanager entry points
-        AWTIsHeadless;
-        AWTCountFonts;
-        AWTLoadFont;
-        AWTFreeFont;
-        AWTFontAscent;
-        AWTFontDescent;
-        AWTFontMinByte1;
-        AWTFontMaxByte1;
-        AWTFontMinCharOrByte2;
-        AWTFontMaxCharOrByte2;
-        AWTFontDefaultChar;
-        AWTFontPerChar;
-        AWTFontMaxBounds;
-        AWTFontTextExtents16;
-        AWTFreeChar;
-        AWTFontGenerateImage;
-        AWTCharAdvance;
-        AWTCharLBearing;
-        AWTCharRBearing;
-        AWTCharAscent;
-        AWTCharDescent;
-        AWTDrawGlyphList;
-        AccelGlyphCache_RemoveAllCellInfos;
-
-    local:
-        *;
-};
--- a/make/mapfiles/libawt_headless/reorder-sparc	Thu Apr 05 11:18:39 2018 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-# Temporary file for headless
--- a/make/mapfiles/libawt_headless/reorder-sparcv9	Thu Apr 05 11:18:39 2018 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-# Temporary file for headless
--- a/make/mapfiles/libawt_headless/reorder-x86	Thu Apr 05 11:18:39 2018 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-# Temporary file for headless
--- a/make/mapfiles/libawt_xawt/mapfile-vers	Thu Apr 05 11:18:39 2018 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,468 +0,0 @@
-#
-# Copyright (c) 2002, 2016, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.  Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Define public interface.
-
-SUNWprivate_1.1 {
-    global:
-        JNI_OnLoad;
-        Java_sun_awt_X11_XlibWrapper_copyIntArray;
-        Java_sun_awt_X11_XlibWrapper_copyLongArray;
-        Java_sun_awt_X11_XlibWrapper_getAddress;
-        Java_sun_awt_X11_XlibWrapper_XConvertSelection;
-        Java_sun_awt_X11_XlibWrapper_XSetSelectionOwner;
-        Java_sun_awt_X11_XlibWrapper_XGetSelectionOwner;
-        Java_sun_awt_X11_XlibWrapper_XGetAtomName;
-        Java_sun_awt_X11_XlibWrapper_XMaxRequestSize;
-        Java_sun_awt_X11_XlibWrapper_XReparentWindow;
-        Java_sun_awt_X11_XlibWrapper_XAllocSizeHints;
-        Java_sun_awt_X11_XlibWrapper_XAllocWMHints;
-        Java_sun_awt_X11_XlibWrapper_XSetMinMaxHints;
-        Java_sun_awt_X11_XlibWrapper_XGetVisualInfo;
-        Java_sun_awt_X11_XlibWrapper_XOpenDisplay;
-        Java_sun_awt_X11_XlibWrapper_XCloseDisplay;
-        Java_sun_awt_X11_XlibWrapper_XDisplayString;
-        Java_sun_awt_X11_XlibWrapper_XSetCloseDownMode;
-        Java_sun_awt_X11_XlibWrapper_XCreateWindow;
-        Java_sun_awt_X11_XlibWrapper_XMapWindow;
-        Java_sun_awt_X11_XlibWrapper_XMapRaised;
-        Java_sun_awt_X11_XlibWrapper_XUnmapWindow;
-        Java_sun_awt_X11_XlibWrapper_XSelectInput;
-        Java_sun_awt_X11_XlibWrapper_XNextEvent;
-        Java_sun_awt_X11_XlibWrapper_XMaskEvent;
-        Java_sun_awt_X11_XlibWrapper_XWindowEvent;
-        Java_sun_awt_X11_XlibWrapper_XFilterEvent;
-        Java_sun_awt_X11_XlibWrapper_XSupportsLocale;
-        Java_sun_awt_X11_XlibWrapper_XSetLocaleModifiers;
-        Java_sun_awt_X11_XlibWrapper_XPeekEvent;
-        Java_sun_awt_X11_XlibWrapper_DefaultScreen;
-        Java_sun_awt_X11_XlibWrapper_ScreenOfDisplay;
-        Java_sun_awt_X11_XlibWrapper_DoesBackingStore;
-        Java_sun_awt_X11_XlibWrapper_RootWindow;
-        Java_sun_awt_X11_XlibWrapper_DisplayHeight;
-        Java_sun_awt_X11_XlibWrapper_DisplayWidthMM;
-        Java_sun_awt_X11_XlibWrapper_DisplayWidth;
-        Java_sun_awt_X11_XlibWrapper_DisplayHeightMM;
-        Java_sun_awt_X11_XlibWrapper_ScreenCount;
-        Java_sun_awt_X11_XlibWrapper_XMoveResizeWindow;
-        Java_sun_awt_X11_XlibWrapper_XResizeWindow;
-        Java_sun_awt_X11_XlibWrapper_XMoveWindow;
-        Java_sun_awt_X11_XlibWrapper_XGetWindowAttributes;
-        Java_sun_awt_X11_XlibWrapper_XGetGeometry;
-        Java_sun_awt_X11_XlibWrapper_XGrabPointer;
-        Java_sun_awt_X11_XlibWrapper_XUngrabPointer;
-        Java_sun_awt_X11_XlibWrapper_XGrabKeyboard;
-        Java_sun_awt_X11_XlibWrapper_XUngrabKeyboard;
-        Java_sun_awt_X11_XlibWrapper_XSetWindowBackground;
-        Java_sun_awt_X11_XlibWrapper_XFlush;
-        Java_sun_awt_X11_XlibWrapper_XSync;
-        Java_sun_awt_X11_XlibWrapper_XEventsQueued;
-        Java_sun_awt_X11_XlibWrapper_XRaiseWindow;
-        Java_sun_awt_X11_XlibWrapper_XLowerWindow;
-        Java_sun_awt_X11_XlibWrapper_XRestackWindows;
-        Java_sun_awt_X11_XlibWrapper_XSetInputFocus;
-        Java_sun_awt_X11_XlibWrapper_XSetInputFocus2;
-        Java_sun_awt_X11_XlibWrapper_XGetInputFocus;
-        Java_sun_awt_X11_XlibWrapper_XDestroyWindow;
-        Java_sun_awt_X11_XlibWrapper_XTranslateCoordinates;
-        Java_sun_awt_X11_XlibWrapper_XCreateFontCursor;
-        Java_sun_awt_X11_XlibWrapper_XSetTransientFor;
-        Java_sun_awt_X11_XlibWrapper_XSetWMHints;
-        Java_sun_awt_X11_XlibWrapper_XGetWMHints;
-        Java_sun_awt_X11_XlibWrapper_XShapeQueryExtension;
-        Java_sun_awt_X11_XlibWrapper_SetRectangularShape;
-        Java_sun_awt_X11_XlibWrapper_SetBitmapShape;
-        Java_sun_awt_X11_XlibWrapper_XConfigureWindow;
-        Java_sun_awt_X11_XlibWrapper_SetZOrder;
-        Java_sun_awt_X11_XToolkit_initIDs;
-        Java_sun_awt_X11_XWindow_getNativeColor;
-        Java_sun_awt_X11_XWindow_getWMInsets;
-        Java_sun_awt_X11_XWindow_getTopWindow;
-        Java_sun_awt_X11_XWindow_getWindowBounds;
-        Java_sun_awt_X11_XWindow_setSizeHints;
-        Java_sun_awt_X11_XWindow_getAWTKeyCodeForKeySym;
-        Java_sun_awt_X11_XWindow_getKeySymForAWTKeyCode;
-        Java_sun_awt_X11_XToolkit_nativeLoadSystemColors;
-        Java_sun_awt_X11_XToolkit_awt_1toolkit_1init;
-        Java_sun_awt_X11_XToolkit_awt_1output_1flush;
-        Java_sun_awt_X11_XToolkit_wakeup_1poll;
-        Java_java_awt_Cursor_finalizeImpl;
-        Java_sun_awt_X11_XlibWrapper_InternAtom;
-        Java_sun_awt_X11_XlibWrapper_GetProperty;
-        Java_sun_awt_X11_XlibWrapper_SetProperty;
-        Java_sun_awt_X11_XlibWrapper_XGetDefault;
-        Java_sun_awt_X11_XlibWrapper_XGetPointerMapping;
-        Java_sun_awt_X11_XlibWrapper_XScreenNumberOfScreen;
-        Java_sun_awt_X11_XlibWrapper_getScreenOfWindow;
-        Java_sun_awt_X11_XlibWrapper_XIconifyWindow;
-        Java_sun_awt_X11_XlibWrapper_XBell;
-        Java_sun_awt_X11_XlibWrapper_XChangePropertyImpl;
-        Java_sun_awt_X11_XlibWrapper_XChangePropertyS;
-        Java_sun_awt_X11_XlibWrapper_XGetWindowProperty;
-        Java_sun_awt_X11_XlibWrapper_getStringBytes;
-        Java_sun_awt_X11_XlibWrapper_XFree;
-        Java_sun_awt_X11_XlibWrapper_ServerVendor;
-        Java_sun_awt_X11_XlibWrapper_VendorRelease;
-        Java_sun_awt_X11_XlibWrapper_IsXsunKPBehavior;
-        Java_sun_awt_X11_XlibWrapper_IsSunKeyboard;
-        Java_sun_awt_X11_XlibWrapper_IsKanaKeyboard;
-        Java_sun_awt_X11_XlibWrapper_SetToolkitErrorHandler;
-        Java_sun_awt_X11_XlibWrapper_XSetErrorHandler;
-        Java_sun_awt_X11_XlibWrapper_CallErrorHandler;
-        Java_sun_awt_X11_XlibWrapper_PrintXErrorEvent;
-        Java_sun_awt_X11_XlibWrapper_XInternAtoms;
-        Java_sun_awt_X11_XlibWrapper_XChangeWindowAttributes;
-        Java_sun_awt_X11_XlibWrapper_XDeleteProperty;
-        Java_sun_awt_X11_XlibWrapper_XSetWMNormalHints;
-        Java_sun_awt_X11_XlibWrapper_XGetWMNormalHints;
-        Java_sun_awt_X11_XlibWrapper_XSendEvent;
-        Java_sun_awt_X11_XlibWrapper_XQueryTree;
-        Java_sun_awt_X11_XlibWrapper_memcpy;
-        Java_sun_awt_X11_XlibWrapper_XdbeQueryExtension;
-        Java_sun_awt_X11_XlibWrapper_XQueryExtension;
-        Java_sun_awt_X11_XlibWrapper_IsKeypadKey;
-        Java_sun_awt_X11_XlibWrapper_XdbeAllocateBackBufferName;
-        Java_sun_awt_X11_XlibWrapper_XdbeDeallocateBackBufferName;
-        Java_sun_awt_X11_XlibWrapper_XdbeSwapBuffers;
-        Java_sun_awt_X11_XlibWrapper_XdbeBeginIdiom;
-        Java_sun_awt_X11_XlibWrapper_XdbeEndIdiom;
-        Java_sun_awt_X11_XDesktopPeer_init;
-        Java_sun_awt_X11_XDesktopPeer_gnome_1url_1show;
-        Java_sun_awt_X11_XTaskbarPeer_init;
-        Java_sun_awt_X11_XTaskbarPeer_runloop;
-        Java_sun_awt_X11_XTaskbarPeer_setBadge;
-        Java_sun_awt_X11_XTaskbarPeer_setUrgent;
-        Java_sun_awt_X11_XTaskbarPeer_updateProgress;
-        Java_sun_awt_X11_XTaskbarPeer_setNativeMenu;
-        Java_sun_awt_X11_XRobotPeer_getRGBPixelsImpl;
-        Java_sun_awt_X11_XRobotPeer_keyPressImpl;
-        Java_sun_awt_X11_XRobotPeer_keyReleaseImpl;
-        Java_sun_awt_X11_XRobotPeer_mouseMoveImpl;
-        Java_sun_awt_X11_XRobotPeer_mousePressImpl;
-        Java_sun_awt_X11_XRobotPeer_mouseReleaseImpl;
-        Java_sun_awt_X11_XRobotPeer_mouseWheelImpl;
-        Java_sun_awt_X11_XRobotPeer_setup;
-        Java_sun_awt_X11_XRobotPeer_loadNativeLibraries;
-        Java_sun_awt_X11_XToolkit_getNumberOfButtonsImpl;
-        Java_java_awt_Component_initIDs;
-        Java_java_awt_Container_initIDs;
-        Java_java_awt_Button_initIDs;
-        Java_java_awt_Scrollbar_initIDs;
-        Java_java_awt_Window_initIDs;
-        Java_java_awt_Frame_initIDs;
-        Java_sun_awt_SunToolkit_closeSplashScreen;
-        Java_sun_awt_UNIXToolkit_check_1gtk;
-        Java_sun_awt_UNIXToolkit_load_1gtk;
-        Java_sun_awt_UNIXToolkit_unload_1gtk;
-        Java_sun_awt_UNIXToolkit_load_1stock_1icon;
-        Java_sun_awt_UNIXToolkit_load_1gtk_1icon;
-        Java_sun_awt_UNIXToolkit_nativeSync;
-        Java_sun_awt_UNIXToolkit_gtkCheckVersionImpl;
-        Java_sun_awt_UNIXToolkit_get_1gtk_1version;
-        Java_java_awt_AWTEvent_initIDs;
-        Java_java_awt_event_InputEvent_initIDs;
-        Java_java_awt_event_KeyEvent_initIDs;
-        Java_java_awt_MenuComponent_initIDs;
-        Java_java_awt_Cursor_initIDs;
-        Java_java_awt_MenuItem_initIDs;
-        Java_java_awt_Menu_initIDs;
-        Java_java_awt_TextArea_initIDs;
-        Java_java_awt_Checkbox_initIDs;
-        Java_java_awt_ScrollPane_initIDs;
-        Java_java_awt_TextField_initIDs;
-        Java_java_awt_TrayIcon_initIDs;
-        Java_sun_font_FontConfigManager_getFontConfig;
-        Java_sun_font_FontConfigManager_getFontConfigAASettings;
-        Java_sun_font_FontConfigManager_getFontConfigVersion;
-        Java_sun_awt_FcFontManager_getFontPathNative;
-        Java_sun_awt_X11GraphicsEnvironment_initDisplay;
-        Java_sun_awt_X11GraphicsEnvironment_initGLX;
-        Java_sun_awt_X11GraphicsEnvironment_initXRender;
-        Java_sun_awt_X11GraphicsEnvironment_checkShmExt;
-        Java_sun_awt_X11GraphicsEnvironment_getNumScreens;
-        Java_sun_awt_X11GraphicsEnvironment_getDefaultScreenNum;
-        Java_sun_awt_X11GraphicsEnvironment_pRunningXinerama;
-        Java_sun_awt_X11GraphicsEnvironment_getXineramaCenterPoint;
-        Java_sun_awt_X11GraphicsEnvironment_getDisplayString;
-        Java_sun_awt_X11GraphicsDevice_initIDs;
-        Java_sun_awt_X11GraphicsDevice_getConfigVisualId;
-        Java_sun_awt_X11GraphicsDevice_getConfigDepth;
-        Java_sun_awt_X11GraphicsDevice_getNumConfigs;
-        Java_sun_awt_X11GraphicsDevice_getConfigColormap;
-        Java_sun_awt_X11GraphicsDevice_isDBESupported;
-        Java_sun_awt_X11GraphicsDevice_getDisplay;
-        Java_sun_awt_X11GraphicsDevice_getDoubleBufferVisuals;
-        Java_sun_awt_X11GraphicsDevice_initXrandrExtension;
-        Java_sun_awt_X11GraphicsDevice_enterFullScreenExclusive;
-        Java_sun_awt_X11GraphicsDevice_exitFullScreenExclusive;
-        Java_sun_awt_X11GraphicsDevice_getCurrentDisplayMode;
-        Java_sun_awt_X11GraphicsDevice_enumDisplayModes;
-        Java_sun_awt_X11GraphicsDevice_configDisplayMode;
-        Java_sun_awt_X11GraphicsDevice_resetNativeData;
-        Java_sun_awt_X11GraphicsDevice_getNativeScaleFactor;
-        Java_sun_awt_X11GraphicsConfig_initIDs;
-        Java_sun_awt_X11GraphicsConfig_getXResolution;
-        Java_sun_awt_X11GraphicsConfig_getYResolution;
-        Java_sun_awt_X11GraphicsConfig_init;
-        Java_sun_awt_X11GraphicsConfig_dispose;
-        Java_sun_awt_X11GraphicsConfig_makeColorModel;
-        Java_sun_awt_X11GraphicsConfig_pGetBounds;
-        Java_sun_awt_X11GraphicsConfig_createBackBuffer;
-        Java_sun_awt_X11GraphicsConfig_destroyBackBuffer;
-        Java_sun_awt_X11GraphicsConfig_swapBuffers;
-        Java_sun_awt_X11GraphicsConfig_isTranslucencyCapable;
-        Java_sun_awt_X11_XToolkit_getTrayIconDisplayTimeout;
-        Java_java_awt_Insets_initIDs;
-        Java_java_awt_KeyboardFocusManager_initIDs;
-        Java_java_awt_Font_initIDs;
-        # libfontmanager entry points
-        AWTIsHeadless;
-        AWTCountFonts;
-        AWTLoadFont;
-        AWTFreeFont;
-        AWTFontAscent;
-        AWTFontDescent;
-        AWTFontMinByte1;
-        AWTFontMaxByte1;
-        AWTFontMinCharOrByte2;
-        AWTFontMaxCharOrByte2;
-        AWTFontDefaultChar;
-        AWTFontPerChar;
-        AWTFontMaxBounds;
-        AWTFontTextExtents16;
-        AWTFreeChar;
-        AWTFontGenerateImage;
-        AWTCharAdvance;
-        AWTCharLBearing;
-        AWTCharRBearing;
-        AWTCharAscent;
-        AWTCharDescent;
-        AWTDrawGlyphList;
-        AccelGlyphCache_RemoveAllCellInfos;
-
-        Java_sun_awt_X11_XToolkit_waitForEvents;
-        Java_java_awt_Event_initIDs;
-        Java_sun_awt_X11_XWindow_x11inputMethodLookupString;
-        Java_sun_awt_X11_XWindow_haveCurrentX11InputMethodInstance;
-        Java_java_awt_AWTEvent_nativeSetSource;
-        Java_java_awt_Dialog_initIDs;
-        Java_sun_awt_PlatformFont_initIDs;
-        Java_sun_awt_FontDescriptor_initIDs;
-        Java_sun_awt_X11_XFontPeer_initIDs;
-        Java_sun_awt_X11InputMethod_initIDs;
-        Java_sun_awt_X11InputMethod_resetXIC;
-        Java_sun_awt_X11InputMethod_disposeXIC;
-        Java_sun_awt_X11InputMethod_setCompositionEnabledNative;
-        Java_sun_awt_X11InputMethod_isCompositionEnabledNative;
-        Java_sun_awt_X11InputMethod_turnoffStatusWindow;
-        Java_sun_awt_X11_XInputMethod_openXIMNative;
-        Java_sun_awt_X11_XInputMethod_createXICNative;
-        Java_sun_awt_X11_XInputMethod_setXICFocusNative;
-        Java_sun_awt_X11_XInputMethod_adjustStatusWindow;
-        Java_sun_awt_X11_XlibWrapper_XQueryPointer;
-        Java_sun_awt_X11_XlibWrapper_XFreeCursor;
-        Java_sun_awt_X11_XToolkit_getDefaultXColormap;
-        Java_sun_awt_X11_XToolkit_getDefaultScreenData;
-        Java_sun_awt_X11_XToolkit_getEnv;
-        Java_sun_awt_X11_XlibWrapper_XCreateBitmapFromData;
-        Java_sun_awt_X11_XlibWrapper_XFreePixmap;
-        Java_sun_awt_X11_XlibWrapper_XAllocColor;
-        Java_sun_awt_X11_XlibWrapper_XCreatePixmapCursor;
-        Java_sun_awt_X11_XlibWrapper_XQueryBestCursor;
-        Java_sun_awt_X11_XlibWrapper_XCreatePixmap;
-        Java_sun_awt_X11_XlibWrapper_XCreateImage;
-        Java_sun_awt_X11_XlibWrapper_XCreateGC;
-        Java_sun_awt_X11_XlibWrapper_XDestroyImage;
-        Java_sun_awt_X11_XlibWrapper_XPutImage;
-        Java_sun_awt_X11_XlibWrapper_XFreeGC;
-        Java_sun_awt_X11_XlibWrapper_XSetWindowBackgroundPixmap;
-        Java_sun_awt_X11_XlibWrapper_XClearWindow;
-        Java_sun_awt_X11_XlibWrapper_XGetIconSizes;
-        Java_sun_awt_X11_XlibWrapper_XKeycodeToKeysym;
-        Java_sun_awt_X11_XlibWrapper_XKeysymToKeycode;
-        Java_sun_awt_X11_XlibWrapper_XQueryKeymap;
-        Java_sun_awt_X11_XlibWrapper_XkbGetEffectiveGroup;
-        Java_sun_awt_X11_XlibWrapper_XkbSelectEvents;
-        Java_sun_awt_X11_XlibWrapper_XkbSelectEventDetails;
-        Java_sun_awt_X11_XlibWrapper_XkbKeycodeToKeysym;
-        Java_sun_awt_X11_XlibWrapper_XkbLibraryVersion;
-        Java_sun_awt_X11_XlibWrapper_XkbQueryExtension;
-        Java_sun_awt_X11_XlibWrapper_XkbGetMap;
-        Java_sun_awt_X11_XlibWrapper_XkbGetUpdatedMap;
-        Java_sun_awt_X11_XlibWrapper_XkbFreeKeyboard;
-        Java_sun_awt_X11_XlibWrapper_XkbTranslateKeyCode;
-        Java_sun_awt_X11_XlibWrapper_XkbSetDetectableAutoRepeat;
-        Java_sun_awt_X11_XlibWrapper_XGetModifierMapping;
-        Java_sun_awt_X11_XlibWrapper_XFreeModifiermap;
-        Java_sun_awt_X11_XlibWrapper_XRefreshKeyboardMapping;
-        Java_sun_awt_X11_XlibWrapper_XChangeActivePointerGrab;
-        Java_sun_awt_X11_XlibWrapper_XNextSecondaryLoopEvent;
-        Java_sun_awt_X11_XlibWrapper_ExitSecondaryLoop;
-        Java_sun_awt_X11_XlibWrapper_XTextPropertyToStringList;
-        Java_sun_awt_X11_XlibWrapper_XGrabServer;
-        Java_sun_awt_X11_XlibWrapper_XUngrabServer;
-        Java_sun_awt_X11_XlibWrapper_XPutBackEvent;
-        Java_sun_awt_X11_XlibWrapper_XConvertCase;
-        Java_sun_awt_X11_XlibWrapper_XSynchronize;
-        Java_java_awt_FileDialog_initIDs;
-        Java_sun_awt_X11_XWindow_initIDs;
-        Java_sun_awt_X11_XWindowPeer_getLocalHostname;
-        Java_sun_awt_X11_XWindowPeer_getJvmPID;
-
-        Java_sun_java2d_opengl_OGLContext_getOGLIdString;
-        Java_sun_java2d_opengl_OGLMaskFill_maskFill;
-        Java_sun_java2d_opengl_OGLRenderer_drawPoly;
-        Java_sun_java2d_opengl_OGLRenderQueue_flushBuffer;
-        Java_sun_java2d_opengl_OGLSurfaceData_initTexture;
-        Java_sun_java2d_opengl_OGLSurfaceData_initFBObject;
-        Java_sun_java2d_opengl_OGLSurfaceData_initFlipBackbuffer;
-        Java_sun_java2d_opengl_OGLSurfaceData_getTextureID;
-        Java_sun_java2d_opengl_OGLSurfaceData_getTextureTarget;
-        Java_sun_java2d_opengl_OGLTextRenderer_drawGlyphList;
-        Java_sun_java2d_opengl_GLXGraphicsConfig_getGLXConfigInfo;
-        Java_sun_java2d_opengl_GLXGraphicsConfig_initConfig;
-        Java_sun_java2d_opengl_GLXGraphicsConfig_getOGLCapabilities;
-        Java_sun_java2d_opengl_GLXSurfaceData_initOps;
-
-        Java_sun_java2d_x11_X11PMBlitBgLoops_nativeBlitBg;
-        Java_sun_java2d_x11_X11PMBlitLoops_nativeBlit;
-        Java_sun_java2d_x11_X11PMBlitLoops_updateBitmask;
-        Java_sun_java2d_x11_X11Renderer_XFillSpans;
-        Java_sun_java2d_x11_X11Renderer_XDrawArc;
-        Java_sun_java2d_x11_X11Renderer_XDrawLine;
-        Java_sun_java2d_x11_X11Renderer_XDrawOval;
-        Java_sun_java2d_x11_X11Renderer_XDrawPoly;
-        Java_sun_java2d_x11_X11Renderer_XDrawRect;
-        Java_sun_java2d_x11_X11Renderer_XDrawRoundRect;
-        Java_sun_java2d_x11_X11Renderer_XDoPath;
-        Java_sun_java2d_x11_X11Renderer_XFillArc;
-        Java_sun_java2d_x11_X11Renderer_XFillOval;
-        Java_sun_java2d_x11_X11Renderer_XFillPoly;
-        Java_sun_java2d_x11_X11Renderer_XFillRect;
-        Java_sun_java2d_x11_X11Renderer_XFillRoundRect;
-        Java_sun_java2d_x11_X11Renderer_devCopyArea;
-        Java_sun_java2d_x11_X11SurfaceData_initIDs;
-        Java_sun_java2d_x11_X11SurfaceData_isShmPMAvailable;
-        Java_sun_java2d_x11_X11SurfaceData_initSurface;
-        Java_sun_java2d_x11_X11SurfaceData_XSetCopyMode;
-        Java_sun_java2d_x11_X11SurfaceData_XSetXorMode;
-        Java_sun_java2d_x11_X11SurfaceData_XSetForeground;
-
-        Java_sun_java2d_x11_XSurfaceData_initOps;
-        Java_sun_java2d_x11_XSurfaceData_XCreateGC;
-        Java_sun_java2d_x11_XSurfaceData_XResetClip;
-        Java_sun_java2d_x11_XSurfaceData_XSetClip;
-        Java_sun_java2d_x11_XSurfaceData_flushNativeSurface;
-        Java_sun_java2d_x11_XSurfaceData_isDrawableValid;
-        Java_sun_java2d_x11_XSurfaceData_setInvalid;
-        Java_sun_java2d_x11_XSurfaceData_XSetGraphicsExposures;
-        Java_sun_java2d_xr_XRSurfaceData_initXRPicture;
-        Java_sun_java2d_xr_XRSurfaceData_initIDs;
-        Java_sun_java2d_xr_XRSurfaceData_XRInitSurface;
-        Java_sun_java2d_xr_XRSurfaceData_freeXSDOPicture;
-        Java_sun_java2d_xr_XRBackendNative_initIDs;
-        Java_sun_java2d_xr_XRBackendNative_freeGC;
-        Java_sun_java2d_xr_XRBackendNative_createGC;
-        Java_sun_java2d_xr_XRBackendNative_createPixmap;
-        Java_sun_java2d_xr_XRBackendNative_createPictureNative;
-        Java_sun_java2d_xr_XRBackendNative_freePicture;
-        Java_sun_java2d_xr_XRBackendNative_freePixmap;
-        Java_sun_java2d_xr_XRBackendNative_setPictureRepeat;
-        Java_sun_java2d_xr_XRBackendNative_setGCExposures;
-        Java_sun_java2d_xr_XRBackendNative_setGCForeground;
-        Java_sun_java2d_xr_XRBackendNative_copyArea;
-        Java_sun_java2d_xr_XRBackendNative_renderComposite;
-        Java_sun_java2d_xr_XRBackendNative_renderRectangle;
-        Java_sun_java2d_xr_XRBackendNative_XRenderRectanglesNative;
-        Java_sun_java2d_xr_XRBackendNative_XRSetTransformNative;
-        Java_sun_java2d_xr_XRBackendNative_XRCreateLinearGradientPaintNative;
-        Java_sun_java2d_xr_XRBackendNative_XRCreateRadialGradientPaintNative;
-        Java_sun_java2d_xr_XRBackendNative_setFilter;
-        Java_sun_java2d_xr_XRBackendNative_XRSetClipNative;
-        Java_sun_java2d_xr_XRBackendNative_putMaskNative;
-        Java_sun_java2d_xr_XRBackendNative_XRAddGlyphsNative;
-        Java_sun_java2d_xr_XRBackendNative_XRFreeGlyphsNative;
-        Java_sun_java2d_xr_XRBackendNative_XRenderCreateGlyphSetNative;
-        Java_sun_java2d_xr_XRBackendNative_XRenderCompositeTextNative;
-        Java_sun_java2d_xr_XRBackendNative_setGCMode;
-        Java_sun_java2d_xr_XRBackendNative_GCRectanglesNative;
-
-        Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1arrow;
-        Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1box;
-        Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1box_1gap;
-        Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1check;
-        Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1expander;
-        Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1extension;
-        Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1flat_1box;
-        Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1focus;
-        Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1handle;
-        Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1hline;
-        Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1option;
-        Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1shadow;
-        Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1slider;
-        Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1vline;
-        Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1background;
-        Java_com_sun_java_swing_plaf_gtk_GTKEngine_nativeStartPainting;
-        Java_com_sun_java_swing_plaf_gtk_GTKEngine_nativeFinishPainting;
-        Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1switch_1theme;
-        Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1get_1gtk_1setting;
-        Java_com_sun_java_swing_plaf_gtk_GTKEngine_nativeSetRangeValue;
-        Java_com_sun_java_swing_plaf_gtk_GTKStyle_nativeGetXThickness;
-        Java_com_sun_java_swing_plaf_gtk_GTKStyle_nativeGetYThickness;
-        Java_com_sun_java_swing_plaf_gtk_GTKStyle_nativeGetColorForState;
-        Java_com_sun_java_swing_plaf_gtk_GTKStyle_nativeGetClassValue;
-        Java_com_sun_java_swing_plaf_gtk_GTKStyle_nativeGetPangoFontName;
-
-        Java_sun_awt_X11_GtkFileDialogPeer_initIDs;
-        Java_sun_awt_X11_GtkFileDialogPeer_run;
-        Java_sun_awt_X11_GtkFileDialogPeer_quit;
-        Java_sun_awt_X11_GtkFileDialogPeer_toFront;
-        Java_sun_awt_X11_GtkFileDialogPeer_setBounds;
-
-        Java_sun_print_CUPSPrinter_initIDs;
-        Java_sun_print_CUPSPrinter_getCupsServer;
-        Java_sun_print_CUPSPrinter_getCupsPort;
-        Java_sun_print_CUPSPrinter_getCupsDefaultPrinter;
-        Java_sun_print_CUPSPrinter_canConnect;
-        Java_sun_print_CUPSPrinter_getMedia;
-        Java_sun_print_CUPSPrinter_getPageSizes;
-        Java_sun_print_CUPSPrinter_getResolutions;
-
-        awt_GetDrawingSurface;
-        awt_FreeDrawingSurface;
-        awt_Unlock;
-        awt_Lock;
-        awt_GetComponent;
-        awt_CreateEmbeddedFrame;
-        awt_SetBounds;
-        awt_SynthesizeWindowActivation;
-
-        #XAWT entry point for CDE
-        Java_sun_awt_motif_XsessionWMcommand;
-        Java_sun_awt_motif_XsessionWMcommand_New;
-
-    local:
-        *;
-};
--- a/make/mapfiles/libdt_socket/mapfile-vers	Thu Apr 05 11:18:39 2018 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,33 +0,0 @@
-#
-# Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.  Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Define public interface.
-
-SUNWprivate_1.1 {
-	global:
-	    jdwpTransport_OnLoad;
-	local:
-		*;
-};
--- a/make/mapfiles/libextnet/mapfile-linux	Thu Apr 05 11:18:39 2018 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,33 +0,0 @@
-#
-# Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.  Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-SUNWprivate_1.1 {
-	global:
-    	Java_jdk_net_LinuxSocketOptions_setQuickAck0;
-    	Java_jdk_net_LinuxSocketOptions_getQuickAck0;
-    	Java_jdk_net_LinuxSocketOptions_quickAckSupported0;
-	local:
-	    *;
-};
--- a/make/mapfiles/libextnet/mapfile-solaris	Thu Apr 05 11:18:39 2018 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,34 +0,0 @@
-#
-# Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.  Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-SUNWprivate_1.1 {
-	global:
-	    Java_jdk_net_SolarisSocketOptions_init;
-	    Java_jdk_net_SolarisSocketOptions_setFlowOption;
-	    Java_jdk_net_SolarisSocketOptions_getFlowOption;
-	    Java_jdk_net_SolarisSocketOptions_flowSupported;
-	local:
-	    *;
-};
--- a/make/mapfiles/libfontmanager/mapfile-vers	Thu Apr 05 11:18:39 2018 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,79 +0,0 @@
-#
-# Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.  Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Define public interface.
-
-# In addition to regular symbols also include Freetype scaler
-
-SUNWprivate_1.1 {
-	global:
-                getSunFontIDs;
-                newLayoutTableCache;
-                freeLayoutTableCache;
-                isNullScalerContext;
-                Java_sun_font_NullFontScaler_getNullScalerContext;
-                Java_sun_font_NullFontScaler_getGlyphImage;
-                Java_sun_font_SunFontManager_initIDs;
-                Java_sun_font_StrikeCache_getGlyphCacheDescription;
-                Java_sun_font_StrikeCache_freeIntPointer;
-                Java_sun_font_StrikeCache_freeLongPointer;
-                Java_sun_font_StrikeCache_freeIntMemory;
-                Java_sun_font_StrikeCache_freeLongMemory;
-                Java_sun_font_SunLayoutEngine_shape;
-                Java_sun_font_X11TextRenderer_doDrawGlyphList;
-		Java_sun_java2d_loops_DrawGlyphListAA_DrawGlyphListAA;
-		Java_sun_java2d_loops_DrawGlyphListLCD_DrawGlyphListLCD;
-		Java_sun_java2d_loops_DrawGlyphList_DrawGlyphList;
-                Java_sun_font_NativeStrikeDisposer_freeNativeScalerContext;
-                Java_sun_font_NativeStrike_createNullScalerContext;
-                Java_sun_font_NativeStrike_createScalerContext;
-                Java_sun_font_NativeStrike_getMaxGlyph;
-                Java_sun_font_NativeFont_fontExists;
-                Java_sun_font_NativeFont_haveBitmapFonts;
-                Java_sun_font_NativeFont_countGlyphs;
-                Java_sun_font_NativeFont_getGlyphAdvance;
-                Java_sun_font_NativeFont_getGlyphImage;
-                Java_sun_font_NativeFont_getGlyphImageNoDefault;
-                Java_sun_font_NativeFont_getFontMetrics;
-                Java_sun_font_FreetypeFontScaler_initIDs;
-                Java_sun_font_FreetypeFontScaler_createScalerContextNative;
-                Java_sun_font_FreetypeFontScaler_disposeNativeScaler;
-                Java_sun_font_FreetypeFontScaler_getFontMetricsNative;
-                Java_sun_font_FreetypeFontScaler_getGlyphAdvanceNative;
-                Java_sun_font_FreetypeFontScaler_getGlyphCodeNative;
-                Java_sun_font_FreetypeFontScaler_getGlyphImageNative;
-                Java_sun_font_FreetypeFontScaler_getGlyphMetricsNative;
-                Java_sun_font_FreetypeFontScaler_getGlyphOutlineBoundsNative;
-                Java_sun_font_FreetypeFontScaler_getGlyphOutlineNative;
-                Java_sun_font_FreetypeFontScaler_getGlyphVectorOutlineNative;
-                Java_sun_font_FreetypeFontScaler_getLayoutTableCacheNative;
-                Java_sun_font_FreetypeFontScaler_getMissingGlyphCodeNative;
-                Java_sun_font_FreetypeFontScaler_getNumGlyphsNative;
-                Java_sun_font_FreetypeFontScaler_getUnitsPerEMNative;
-                Java_sun_font_FreetypeFontScaler_initNativeScaler;
-                Java_sun_font_FreetypeFontScaler_getGlyphPointNative;
-	local:
-		*;
-};
--- a/make/mapfiles/libinstrument/mapfile-vers	Thu Apr 05 11:18:39 2018 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,46 +0,0 @@
-#
-# Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.  Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Define public interface.
-
-SUNWprivate_1.1 {
-	global:
-	    Agent_OnLoad;
-	    Agent_OnAttach;
-            Java_sun_instrument_InstrumentationImpl_isModifiableClass0;
-            Java_sun_instrument_InstrumentationImpl_isRetransformClassesSupported0;
-            Java_sun_instrument_InstrumentationImpl_setHasTransformers;
-            Java_sun_instrument_InstrumentationImpl_setHasRetransformableTransformers;
-            Java_sun_instrument_InstrumentationImpl_retransformClasses0;
-            Java_sun_instrument_InstrumentationImpl_getAllLoadedClasses0;
-            Java_sun_instrument_InstrumentationImpl_getInitiatedClasses0;
-            Java_sun_instrument_InstrumentationImpl_redefineClasses0;
-            Java_sun_instrument_InstrumentationImpl_getObjectSize0;
-	    Java_sun_instrument_InstrumentationImpl_appendToClassLoaderSearch0;
-	    Java_sun_instrument_InstrumentationImpl_setNativeMethodPrefixes;
-            Java_sun_instrument_InstrumentationImpl_loadAgent0;
-	local:
-		*;
-};
--- a/make/mapfiles/libj2gss/mapfile-vers	Thu Apr 05 11:18:39 2018 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,63 +0,0 @@
-#
-# Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.  Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Define public interface.
-
-SUNWprivate_1.1 {
-	global:
-		JNI_OnLoad;
-		JNI_OnUnload;
-		Java_sun_security_jgss_wrapper_GSSLibStub_releaseName;
-		Java_sun_security_jgss_wrapper_GSSLibStub_importName;
-		Java_sun_security_jgss_wrapper_GSSLibStub_compareName;
-		Java_sun_security_jgss_wrapper_GSSLibStub_canonicalizeName;
-		Java_sun_security_jgss_wrapper_GSSLibStub_exportName;
-		Java_sun_security_jgss_wrapper_GSSLibStub_displayName;
-		Java_sun_security_jgss_wrapper_GSSLibStub_acquireCred;
-		Java_sun_security_jgss_wrapper_GSSLibStub_releaseCred;
-		Java_sun_security_jgss_wrapper_GSSLibStub_getCredName;
-		Java_sun_security_jgss_wrapper_GSSLibStub_getCredTime;
-		Java_sun_security_jgss_wrapper_GSSLibStub_getCredUsage;
-		Java_sun_security_jgss_wrapper_GSSLibStub_importContext;
-		Java_sun_security_jgss_wrapper_GSSLibStub_initContext;
-		Java_sun_security_jgss_wrapper_GSSLibStub_acceptContext;
-		Java_sun_security_jgss_wrapper_GSSLibStub_getContextName;
-		Java_sun_security_jgss_wrapper_GSSLibStub_getContextMech;
-		Java_sun_security_jgss_wrapper_GSSLibStub_inquireContext;
-		Java_sun_security_jgss_wrapper_GSSLibStub_deleteContext;
-		Java_sun_security_jgss_wrapper_GSSLibStub_getContextTime;
-		Java_sun_security_jgss_wrapper_GSSLibStub_wrapSizeLimit;
-		Java_sun_security_jgss_wrapper_GSSLibStub_exportContext;
-		Java_sun_security_jgss_wrapper_GSSLibStub_getMic;
-		Java_sun_security_jgss_wrapper_GSSLibStub_verifyMic;
-		Java_sun_security_jgss_wrapper_GSSLibStub_wrap;
-		Java_sun_security_jgss_wrapper_GSSLibStub_unwrap;
-		Java_sun_security_jgss_wrapper_GSSLibStub_indicateMechs;
-		Java_sun_security_jgss_wrapper_GSSLibStub_inquireNamesForMech;
-		Java_sun_security_jgss_wrapper_GSSLibStub_init;
-		Java_sun_security_jgss_wrapper_GSSLibStub_getMechPtr;
-	local:
-		*;
-};
--- a/make/mapfiles/libj2pcsc/mapfile-vers	Thu Apr 05 11:18:39 2018 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,45 +0,0 @@
-#
-# Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.  Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Define public interface.
-
-SUNWprivate_1.1 {
-	global:
-		JNI_OnLoad;
-		Java_sun_security_smartcardio_PlatformPCSC_initialize;
-		Java_sun_security_smartcardio_PCSC_SCardEstablishContext;
-		Java_sun_security_smartcardio_PCSC_SCardListReaders;
-		Java_sun_security_smartcardio_PCSC_SCardConnect;
-		Java_sun_security_smartcardio_PCSC_SCardTransmit;
-		Java_sun_security_smartcardio_PCSC_SCardStatus;
-		Java_sun_security_smartcardio_PCSC_SCardDisconnect;
-		Java_sun_security_smartcardio_PCSC_SCardGetStatusChange;
-		Java_sun_security_smartcardio_PCSC_SCardBeginTransaction;
-		Java_sun_security_smartcardio_PCSC_SCardEndTransaction;
-		Java_sun_security_smartcardio_PCSC_SCardControl;
-
-	local:
-		*;
-};
--- a/make/mapfiles/libj2pkcs11/mapfile-vers	Thu Apr 05 11:18:39 2018 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,110 +0,0 @@
-#
-# Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.  Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Define public interface.
-
-SUNWprivate_1.1 {
-	global:
-		JNI_OnLoad;
-		Java_sun_security_pkcs11_wrapper_PKCS11_initializeLibrary;
-		Java_sun_security_pkcs11_wrapper_PKCS11_finalizeLibrary;
-		Java_sun_security_pkcs11_wrapper_PKCS11_connect;
-		Java_sun_security_pkcs11_wrapper_PKCS11_disconnect;
-		Java_sun_security_pkcs11_wrapper_PKCS11_C_1Initialize;
-		Java_sun_security_pkcs11_wrapper_PKCS11_C_1Finalize;
-		Java_sun_security_pkcs11_wrapper_PKCS11_C_1GetInfo;
-		Java_sun_security_pkcs11_wrapper_PKCS11_C_1GetSlotList;
-		Java_sun_security_pkcs11_wrapper_PKCS11_C_1GetSlotInfo;
-		Java_sun_security_pkcs11_wrapper_PKCS11_C_1GetTokenInfo;
-		Java_sun_security_pkcs11_wrapper_PKCS11_C_1GetMechanismList;
-		Java_sun_security_pkcs11_wrapper_PKCS11_C_1GetMechanismInfo;
-#		Java_sun_security_pkcs11_wrapper_PKCS11_C_1InitToken;
-#		Java_sun_security_pkcs11_wrapper_PKCS11_C_1InitPIN;
-#		Java_sun_security_pkcs11_wrapper_PKCS11_C_1SetPIN;
-		Java_sun_security_pkcs11_wrapper_PKCS11_C_1OpenSession;
-		Java_sun_security_pkcs11_wrapper_PKCS11_C_1CloseSession;
-#		Java_sun_security_pkcs11_wrapper_PKCS11_C_1CloseAllSessions;
-		Java_sun_security_pkcs11_wrapper_PKCS11_C_1GetSessionInfo;
-		Java_sun_security_pkcs11_wrapper_PKCS11_C_1GetOperationState;
-		Java_sun_security_pkcs11_wrapper_PKCS11_C_1SetOperationState;
-		Java_sun_security_pkcs11_wrapper_PKCS11_C_1Login;
-		Java_sun_security_pkcs11_wrapper_PKCS11_C_1Logout;
-		Java_sun_security_pkcs11_wrapper_PKCS11_C_1CreateObject;
-		Java_sun_security_pkcs11_wrapper_PKCS11_C_1CopyObject;
-		Java_sun_security_pkcs11_wrapper_PKCS11_C_1DestroyObject;
-#		Java_sun_security_pkcs11_wrapper_PKCS11_C_1GetObjectSize;
-		Java_sun_security_pkcs11_wrapper_PKCS11_C_1GetAttributeValue;
-		Java_sun_security_pkcs11_wrapper_PKCS11_C_1SetAttributeValue;
-		Java_sun_security_pkcs11_wrapper_PKCS11_C_1FindObjectsInit;
-		Java_sun_security_pkcs11_wrapper_PKCS11_C_1FindObjects;
-		Java_sun_security_pkcs11_wrapper_PKCS11_C_1FindObjectsFinal;
-		Java_sun_security_pkcs11_wrapper_PKCS11_C_1EncryptInit;
-		Java_sun_security_pkcs11_wrapper_PKCS11_C_1Encrypt;
-		Java_sun_security_pkcs11_wrapper_PKCS11_C_1EncryptUpdate;
-		Java_sun_security_pkcs11_wrapper_PKCS11_C_1EncryptFinal;
-		Java_sun_security_pkcs11_wrapper_PKCS11_C_1DecryptInit;
-		Java_sun_security_pkcs11_wrapper_PKCS11_C_1Decrypt;
-		Java_sun_security_pkcs11_wrapper_PKCS11_C_1DecryptUpdate;
-		Java_sun_security_pkcs11_wrapper_PKCS11_C_1DecryptFinal;
-		Java_sun_security_pkcs11_wrapper_PKCS11_C_1DigestInit;
-		Java_sun_security_pkcs11_wrapper_PKCS11_C_1DigestSingle;
-		Java_sun_security_pkcs11_wrapper_PKCS11_C_1DigestUpdate;
-		Java_sun_security_pkcs11_wrapper_PKCS11_C_1DigestKey;
-		Java_sun_security_pkcs11_wrapper_PKCS11_C_1DigestFinal;
-		Java_sun_security_pkcs11_wrapper_PKCS11_C_1SignInit;
-		Java_sun_security_pkcs11_wrapper_PKCS11_C_1Sign;
-		Java_sun_security_pkcs11_wrapper_PKCS11_C_1SignUpdate;
-		Java_sun_security_pkcs11_wrapper_PKCS11_C_1SignFinal;
-		Java_sun_security_pkcs11_wrapper_PKCS11_C_1SignRecoverInit;
-		Java_sun_security_pkcs11_wrapper_PKCS11_C_1SignRecover;
-		Java_sun_security_pkcs11_wrapper_PKCS11_C_1VerifyInit;
-		Java_sun_security_pkcs11_wrapper_PKCS11_C_1Verify;
-		Java_sun_security_pkcs11_wrapper_PKCS11_C_1VerifyUpdate;
-		Java_sun_security_pkcs11_wrapper_PKCS11_C_1VerifyFinal;
-		Java_sun_security_pkcs11_wrapper_PKCS11_C_1VerifyRecoverInit;
-		Java_sun_security_pkcs11_wrapper_PKCS11_C_1VerifyRecover;
-#		Java_sun_security_pkcs11_wrapper_PKCS11_C_1DigestEncryptUpdate;
-#		Java_sun_security_pkcs11_wrapper_PKCS11_C_1DecryptDigestUpdate;
-#		Java_sun_security_pkcs11_wrapper_PKCS11_C_1SignEncryptUpdate;
-#		Java_sun_security_pkcs11_wrapper_PKCS11_C_1DecryptVerifyUpdate;
-		Java_sun_security_pkcs11_wrapper_PKCS11_C_1GenerateKey;
-		Java_sun_security_pkcs11_wrapper_PKCS11_C_1GenerateKeyPair;
-		Java_sun_security_pkcs11_wrapper_PKCS11_C_1WrapKey;
-		Java_sun_security_pkcs11_wrapper_PKCS11_C_1UnwrapKey;
-		Java_sun_security_pkcs11_wrapper_PKCS11_C_1DeriveKey;
-		Java_sun_security_pkcs11_wrapper_PKCS11_C_1SeedRandom;
-		Java_sun_security_pkcs11_wrapper_PKCS11_C_1GenerateRandom;
-#		Java_sun_security_pkcs11_wrapper_PKCS11_C_1GetFunctionStatus;
-#		Java_sun_security_pkcs11_wrapper_PKCS11_C_1CancelFunction;
-#		Java_sun_security_pkcs11_wrapper_PKCS11_C_1WaitForSlotEvent;
-		Java_sun_security_pkcs11_Secmod_nssGetLibraryHandle;
-		Java_sun_security_pkcs11_Secmod_nssLoadLibrary;
-		Java_sun_security_pkcs11_Secmod_nssVersionCheck;
-		Java_sun_security_pkcs11_Secmod_nssInitialize;
-		Java_sun_security_pkcs11_Secmod_nssGetModuleList;
-
-	local:
-		*;
-};
--- a/make/mapfiles/libj2ucrypto/mapfile-vers	Thu Apr 05 11:18:39 2018 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,78 +0,0 @@
-#
-# Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.  Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Define public interface.
-
-SUNWprivate_1.1 {
-	global:
-                JNI_OnLoad;
-                Java_com_oracle_security_ucrypto_UcryptoProvider_loadLibraries;
-                Java_com_oracle_security_ucrypto_UcryptoProvider_getMechList;
-                Java_com_oracle_security_ucrypto_NativeDigestMD_nativeInit;
-                Java_com_oracle_security_ucrypto_NativeDigestMD_nativeUpdate;
-                Java_com_oracle_security_ucrypto_NativeDigestMD_nativeDigest;
-                Java_com_oracle_security_ucrypto_NativeDigestMD_nativeClone;
-                Java_com_oracle_security_ucrypto_NativeDigestMD_nativeFree;
-                Java_com_oracle_security_ucrypto_NativeDigest_nativeInit;
-                Java_com_oracle_security_ucrypto_NativeDigest_nativeUpdate;
-                Java_com_oracle_security_ucrypto_NativeDigest_nativeDigest;
-                Java_com_oracle_security_ucrypto_NativeDigest_nativeFree;
-                Java_com_oracle_security_ucrypto_NativeCipher_nativeInit;
-                Java_com_oracle_security_ucrypto_NativeCipher_nativeUpdate;
-                Java_com_oracle_security_ucrypto_NativeCipher_nativeFinal;
-                Java_com_oracle_security_ucrypto_NativeKey_nativeFree;
-                Java_com_oracle_security_ucrypto_NativeKey_00024RSAPrivate_nativeInit;
-                Java_com_oracle_security_ucrypto_NativeKey_00024RSAPrivateCrt_nativeInit;
-                Java_com_oracle_security_ucrypto_NativeKey_00024RSAPublic_nativeInit;
-                Java_com_oracle_security_ucrypto_NativeRSASignature_nativeInit;
-                Java_com_oracle_security_ucrypto_NativeRSASignature_nativeUpdate__JZ_3BII;
-                Java_com_oracle_security_ucrypto_NativeRSASignature_nativeUpdate__JZJI;
-                Java_com_oracle_security_ucrypto_NativeRSASignature_nativeFinal;
-                Java_com_oracle_security_ucrypto_NativeRSACipher_nativeAtomic;
-                JavaCritical_com_oracle_security_ucrypto_NativeDigestMD_nativeInit;
-                JavaCritical_com_oracle_security_ucrypto_NativeDigestMD_nativeUpdate;
-                JavaCritical_com_oracle_security_ucrypto_NativeDigestMD_nativeDigest;
-                JavaCritical_com_oracle_security_ucrypto_NativeDigestMD_nativeClone;
-                JavaCritical_com_oracle_security_ucrypto_NativeDigestMD_nativeFree;
-                JavaCritical_com_oracle_security_ucrypto_NativeDigest_nativeInit;
-                JavaCritical_com_oracle_security_ucrypto_NativeDigest_nativeUpdate;
-                JavaCritical_com_oracle_security_ucrypto_NativeDigest_nativeDigest;
-                JavaCritical_com_oracle_security_ucrypto_NativeDigest_nativeFree;
-                JavaCritical_com_oracle_security_ucrypto_NativeCipher_nativeInit;
-                JavaCritical_com_oracle_security_ucrypto_NativeCipher_nativeUpdate;
-                JavaCritical_com_oracle_security_ucrypto_NativeCipher_nativeFinal;
-                JavaCritical_com_oracle_security_ucrypto_NativeKey_nativeFree;
-                JavaCritical_com_oracle_security_ucrypto_NativeKey_00024RSAPrivate_nativeInit;
-                JavaCritical_com_oracle_security_ucrypto_NativeKey_00024RSAPrivateCrt_nativeInit;
-                JavaCritical_com_oracle_security_ucrypto_NativeKey_00024RSAPublic_nativeInit;
-                JavaCritical_com_oracle_security_ucrypto_NativeRSASignature_nativeInit;
-                JavaCritical_com_oracle_security_ucrypto_NativeRSASignature_nativeUpdate__JZ_3BII;
-                JavaCritical_com_oracle_security_ucrypto_NativeRSASignature_nativeUpdate__JZJI;
-                JavaCritical_com_oracle_security_ucrypto_NativeRSASignature_nativeFinal;
-                JavaCritical_com_oracle_security_ucrypto_NativeRSACipher_nativeAtomic;
-
-	local:
-		*;
-};
--- a/make/mapfiles/libjaas/mapfile-vers	Thu Apr 05 11:18:39 2018 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,34 +0,0 @@
-#
-# Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.  Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Define library interface.
-
-SUNWprivate_1.1 {
-	global:
-            Java_com_sun_security_auth_module_UnixSystem_getUnixInfo;
-        local:
-	    *;
-};
-
--- a/make/mapfiles/libjava/mapfile-vers	Thu Apr 05 11:18:39 2018 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,300 +0,0 @@
-#
-# Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.  Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Define public interface.
-
-SUNWprivate_1.1 {
-	global:
-		JNI_OnLoad;
-		JNU_ThrowNoSuchMethodException;
-		JNU_CallStaticMethodByName;
-		JNU_CallMethodByName;
-		JNU_CallMethodByNameV;
-		JNU_ClassClass;
-		JNU_ClassObject;
-		JNU_ClassString;
-		JNU_ClassThrowable;
-		JNU_CopyObjectArray;
-		JNU_Equals;
-		JNU_GetEnv;
-		JNU_GetFieldByName;
-		JNU_GetStaticFieldByName;
-		JNU_GetStringPlatformChars;
-		JNU_IsInstanceOfByName;
-		JNU_MonitorWait;
-		JNU_NewObjectByName;
-		JNU_NewStringPlatform;
-		JNU_Notify;
-		JNU_NotifyAll;
-		JNU_PrintClass;
-		JNU_PrintString;
-		JNU_ReleaseStringPlatformChars;
-		JNU_SetFieldByName;
-		JNU_SetStaticFieldByName;
-		JNU_ThrowArrayIndexOutOfBoundsException;
-		JNU_ThrowByName;
-		JNU_ThrowByNameWithLastError;
-		JNU_ThrowByNameWithMessageAndLastError;
-		JNU_ThrowClassNotFoundException;
-		JNU_ThrowIllegalAccessError;
-		JNU_ThrowIllegalAccessException;
-		JNU_ThrowIllegalArgumentException;
-		JNU_ThrowInstantiationException;
-		JNU_ThrowInternalError;
-		JNU_ThrowIOException;
-		JNU_ThrowIOExceptionWithLastError;
-		JNU_ThrowNoSuchFieldError;
-		JNU_ThrowNoSuchFieldException;
-		JNU_ThrowNoSuchMethodError;
-		JNU_ThrowNullPointerException;
-		JNU_ThrowNumberFormatException;
-		JNU_ThrowOutOfMemoryError;
-		JNU_ThrowStringIndexOutOfBoundsException;
-		JNU_ToString;
-
-		Java_java_io_FileCleanable_cleanupClose0;
-		Java_java_io_FileDescriptor_close0;
-		Java_java_io_FileDescriptor_initIDs;
-		Java_java_io_FileDescriptor_sync;
-		Java_java_io_FileDescriptor_getAppend;
-		Java_java_io_FileDescriptor_getHandle;
-		Java_java_io_FileInputStream_available0;
-		Java_java_io_FileInputStream_initIDs;
-		Java_java_io_FileInputStream_open0;
-		Java_java_io_FileInputStream_read0;
-		Java_java_io_FileInputStream_readBytes;
-		Java_java_io_FileInputStream_skip0;
-		Java_java_io_FileOutputStream_initIDs;
-		Java_java_io_FileOutputStream_open0;
-		Java_java_io_FileOutputStream_write;
-		Java_java_io_FileOutputStream_writeBytes;
-		Java_java_io_ObjectInputStream_bytesToDoubles;
-		Java_java_io_ObjectInputStream_bytesToFloats;
-		Java_java_io_ObjectOutputStream_doublesToBytes;
-		Java_java_io_ObjectOutputStream_floatsToBytes;
-		Java_java_io_ObjectStreamClass_hasStaticInitializer;
-		Java_java_io_ObjectStreamClass_initNative;
-		Java_java_io_RandomAccessFile_getFilePointer;
-		Java_java_io_RandomAccessFile_initIDs;
-		Java_java_io_RandomAccessFile_length;
-		Java_java_io_RandomAccessFile_open0;
-		Java_java_io_RandomAccessFile_read0;
-		Java_java_io_RandomAccessFile_readBytes;
-		Java_java_io_RandomAccessFile_seek0;
-		Java_java_io_RandomAccessFile_setLength;
-		Java_java_io_RandomAccessFile_write0;
-		Java_java_io_RandomAccessFile_writeBytes;
-		Java_java_io_UnixFileSystem_canonicalize0;
-		Java_java_io_UnixFileSystem_checkAccess;
-		Java_java_io_UnixFileSystem_createDirectory;
-		Java_java_io_UnixFileSystem_createFileExclusively;
-		Java_java_io_UnixFileSystem_delete0;
-		Java_java_io_UnixFileSystem_getBooleanAttributes0;
-		Java_java_io_UnixFileSystem_getLastModifiedTime;
-		Java_java_io_UnixFileSystem_getLength;
-		Java_java_io_UnixFileSystem_getNameMax0;
-		Java_java_io_UnixFileSystem_getSpace;
-		Java_java_io_UnixFileSystem_initIDs;
-		Java_java_io_UnixFileSystem_list;
-		Java_java_io_UnixFileSystem_rename0;
-		Java_java_io_UnixFileSystem_setLastModifiedTime;
-		Java_java_io_UnixFileSystem_setReadOnly;
-		Java_java_io_UnixFileSystem_setPermission;
-		Java_java_lang_Class_forName0;
-		Java_java_lang_Class_getPrimitiveClass;
-		Java_java_lang_Class_isAssignableFrom;
-		Java_java_lang_Class_isInstance;
-		Java_java_lang_Class_registerNatives;
-		Java_java_lang_ClassLoader_findBootstrapClass;
-		Java_java_lang_ClassLoader_defineClass1;
-		Java_java_lang_ClassLoader_defineClass2;
-		Java_java_lang_ClassLoader_findBuiltinLib;
-		Java_java_lang_ClassLoader_findLoadedClass0;
-		Java_java_lang_ClassLoader_00024NativeLibrary_findEntry;
-		Java_java_lang_ClassLoader_00024NativeLibrary_load0;
-		Java_java_lang_ClassLoader_00024NativeLibrary_unload;
-		Java_java_lang_ClassLoader_registerNatives;
-		Java_java_lang_Double_longBitsToDouble;
-		Java_java_lang_Double_doubleToRawLongBits;
-		Java_java_lang_Float_intBitsToFloat;
-		Java_java_lang_Float_floatToRawIntBits;
-                Java_java_lang_StackStreamFactory_checkStackWalkModes;
-                Java_java_lang_StackStreamFactory_00024AbstractStackWalker_callStackWalk;
-                Java_java_lang_StackStreamFactory_00024AbstractStackWalker_fetchStackFrames;
-		Java_java_lang_StrictMath_IEEEremainder;
-		Java_java_lang_StrictMath_acos;
-		Java_java_lang_StrictMath_asin;
-		Java_java_lang_StrictMath_atan;
-		Java_java_lang_StrictMath_atan2;
-		Java_java_lang_StrictMath_cos;
-		Java_java_lang_StrictMath_log;
-		Java_java_lang_StrictMath_log10;
-		Java_java_lang_StrictMath_sin;
-		Java_java_lang_StrictMath_sqrt;
-		Java_java_lang_StrictMath_tan;
-		Java_java_lang_StrictMath_cosh;
-		Java_java_lang_StrictMath_sinh;
-		Java_java_lang_StrictMath_tanh;
-		Java_java_lang_StrictMath_log1p;
-		Java_java_lang_StrictMath_expm1;
-		Java_java_lang_Object_getClass;
-		Java_java_lang_Object_registerNatives;
-		Java_java_lang_ProcessEnvironment_environ;
-		Java_java_lang_ProcessHandleImpl_destroy0;
-		Java_java_lang_ProcessHandleImpl_getCurrentPid0;
-		Java_java_lang_ProcessHandleImpl_getProcessPids0;
-		Java_java_lang_ProcessHandleImpl_initNative;
-		Java_java_lang_ProcessHandleImpl_isAlive0;
-		Java_java_lang_ProcessHandleImpl_parent0;
-		Java_java_lang_ProcessHandleImpl_waitForProcessExit0;
-		Java_java_lang_ProcessHandleImpl_00024Info_initIDs;
-		Java_java_lang_ProcessHandleImpl_00024Info_info0;
-		Java_java_lang_ProcessImpl_init;
-		Java_java_lang_ProcessImpl_forkAndExec;
-		Java_java_lang_ref_Reference_getAndClearReferencePendingList;
-		Java_java_lang_ref_Reference_hasReferencePendingList;
-		Java_java_lang_ref_Reference_waitForReferencePendingList;
-		Java_java_lang_reflect_Array_get;
-		Java_java_lang_reflect_Array_getBoolean;
-		Java_java_lang_reflect_Array_getByte;
-		Java_java_lang_reflect_Array_getChar;
-		Java_java_lang_reflect_Array_getDouble;
-		Java_java_lang_reflect_Array_getFloat;
-		Java_java_lang_reflect_Array_getInt;
-		Java_java_lang_reflect_Array_getLength;
-		Java_java_lang_reflect_Array_getLong;
-		Java_java_lang_reflect_Array_getShort;
-		Java_java_lang_reflect_Array_multiNewArray;
-		Java_java_lang_reflect_Array_newArray;
-		Java_java_lang_reflect_Array_set;
-		Java_java_lang_reflect_Array_setBoolean;
-		Java_java_lang_reflect_Array_setByte;
-		Java_java_lang_reflect_Array_setChar;
-		Java_java_lang_reflect_Array_setDouble;
-		Java_java_lang_reflect_Array_setFloat;
-		Java_java_lang_reflect_Array_setInt;
-		Java_java_lang_reflect_Array_setLong;
-		Java_java_lang_reflect_Array_setShort;
-		Java_java_lang_reflect_Executable_getParameters0;
-		Java_java_lang_reflect_Executable_getTypeAnnotationBytes0;
-		Java_java_lang_reflect_Field_getTypeAnnotationBytes0;
-		Java_java_lang_Runtime_freeMemory;
-		Java_java_lang_Runtime_maxMemory;
-		Java_java_lang_Runtime_gc;
-		Java_java_lang_Runtime_totalMemory;
-		Java_java_lang_Runtime_availableProcessors;
-		Java_java_lang_SecurityManager_getClassContext;
-		Java_java_lang_Shutdown_beforeHalt;
-		Java_java_lang_Shutdown_halt0;
-                Java_java_lang_StackTraceElement_initStackTraceElement;
-                Java_java_lang_StackTraceElement_initStackTraceElements;
-		Java_java_lang_String_intern;
-		Java_java_lang_StringCoding_err;
-		Java_java_lang_StringUTF16_isBigEndian;
-		Java_java_lang_System_identityHashCode;
-		Java_java_lang_System_initProperties;
-		Java_java_lang_System_mapLibraryName;
-		Java_java_lang_System_registerNatives;
-		Java_java_lang_System_setErr0;
-		Java_java_lang_System_setIn0;
-		Java_java_lang_System_setOut0;
-		Java_java_lang_Thread_registerNatives;
-		Java_java_lang_Throwable_fillInStackTrace;
-		Java_java_security_AccessController_doPrivileged__Ljava_security_PrivilegedAction_2;
-		Java_java_security_AccessController_doPrivileged__Ljava_security_PrivilegedAction_2Ljava_security_AccessControlContext_2;
-		Java_java_security_AccessController_doPrivileged__Ljava_security_PrivilegedExceptionAction_2;
-		Java_java_security_AccessController_doPrivileged__Ljava_security_PrivilegedExceptionAction_2Ljava_security_AccessControlContext_2;
-		Java_java_security_AccessController_getStackAccessControlContext;
-		Java_java_security_AccessController_getInheritedAccessControlContext;
-		Java_java_util_TimeZone_getSystemTimeZoneID;
-		Java_java_util_TimeZone_getSystemGMTOffsetID;
-		Java_java_util_concurrent_atomic_AtomicLong_VMSupportsCS8;
-		Java_jdk_internal_misc_Signal_findSignal0;
-		Java_jdk_internal_misc_Signal_handle0;
-		Java_jdk_internal_misc_Signal_raise0;
-              Java_jdk_internal_reflect_ConstantPool_getClassAt0;
-              Java_jdk_internal_reflect_ConstantPool_getClassAtIfLoaded0;
-              Java_jdk_internal_reflect_ConstantPool_getClassRefIndexAt0;
-              Java_jdk_internal_reflect_ConstantPool_getDoubleAt0;
-              Java_jdk_internal_reflect_ConstantPool_getFieldAt0;
-              Java_jdk_internal_reflect_ConstantPool_getFieldAtIfLoaded0;
-              Java_jdk_internal_reflect_ConstantPool_getFloatAt0;
-              Java_jdk_internal_reflect_ConstantPool_getIntAt0;
-              Java_jdk_internal_reflect_ConstantPool_getLongAt0;
-              Java_jdk_internal_reflect_ConstantPool_getMemberRefInfoAt0;
-              Java_jdk_internal_reflect_ConstantPool_getMethodAt0;
-              Java_jdk_internal_reflect_ConstantPool_getMethodAtIfLoaded0;
-              Java_jdk_internal_reflect_ConstantPool_getNameAndTypeRefIndexAt0;
-              Java_jdk_internal_reflect_ConstantPool_getNameAndTypeRefInfoAt0;
-              Java_jdk_internal_reflect_ConstantPool_getSize0;
-              Java_jdk_internal_reflect_ConstantPool_getStringAt0;
-              Java_jdk_internal_reflect_ConstantPool_getTagAt0;
-              Java_jdk_internal_reflect_ConstantPool_getUTF8At0;
-		Java_java_io_Console_istty;
-		Java_java_io_Console_encoding;
-                Java_java_io_Console_echo;
-		Java_jdk_internal_reflect_NativeConstructorAccessorImpl_newInstance0;
-		Java_jdk_internal_reflect_NativeMethodAccessorImpl_invoke0;
-		Java_jdk_internal_reflect_Reflection_getCallerClass__;
-		Java_jdk_internal_reflect_Reflection_getClassAccessFlags;
-		Java_jdk_internal_misc_VM_latestUserDefinedLoader0;
-                Java_jdk_internal_misc_VM_getuid;
-                Java_jdk_internal_misc_VM_geteuid;
-                Java_jdk_internal_misc_VM_getgid;
-                Java_jdk_internal_misc_VM_getegid;
-                Java_jdk_internal_misc_VM_getRuntimeArguments;
-                Java_jdk_internal_misc_VM_initialize;
-
-                Java_java_lang_Module_defineModule0;
-                Java_java_lang_Module_addReads0;
-                Java_java_lang_Module_addExports0;
-                Java_java_lang_Module_addExportsToAll0;
-                Java_java_lang_Module_addExportsToAllUnnamed0;
-
-		Java_jdk_internal_loader_BootLoader_getSystemPackageLocation;
-		Java_jdk_internal_loader_BootLoader_getSystemPackageNames;
-                Java_jdk_internal_loader_BootLoader_setBootLoaderUnnamedModule0;
-
-		Java_jdk_internal_vm_VMSupport_initAgentProperties;
-		Java_jdk_internal_vm_VMSupport_getVMTemporaryDirectory;
-
-                # ZipFile.c needs this one
-		throwFileNotFoundException;
-                # zip_util.c needs these
-		getLastErrorString;
-		getErrorString;
-
-	# Outcalls from libjvm done using dlsym().
-
-		VerifyClassCodes;
-		VerifyClassCodesForMajorVersion;
-		NewStringPlatform;
-		GetStringPlatformChars;
-		Canonicalize;
-		JDK_GetVersionInfo0;
-
-	local:
-		*;
-};
--- a/make/mapfiles/libjava/reorder-sparc	Thu Apr 05 11:18:39 2018 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,96 +0,0 @@
-data = R0x2000;
-text = LOAD ?RXO;
-# Test Null
-text: .text%JNI_OnLoad;
-text: .text%Canonicalize;
-text: .text%canonicalize;
-text: .text%collapse: OUTPUTDIR/canonicalize_md.o;
-text: .text%Java_java_lang_Object_registerNatives;
-text: .text%Java_java_lang_System_registerNatives;
-text: .text%Java_java_lang_Thread_registerNatives;
-text: .text%Java_java_security_AccessController_getStackAccessControlContext;
-text: .text%Java_java_security_AccessController_getInheritedAccessControlContext;
-text: .text%Java_java_lang_ClassLoader_registerNatives;
-text: .text%Java_java_security_AccessController_doPrivileged__Ljava_security_PrivilegedAction_2;
-text: .text%Java_java_lang_Class_registerNatives;
-text: .text%Java_java_io_ObjectStreamClass_initNative;
-text: .text%Java_java_lang_Class_getPrimitiveClass;
-text: .text%Java_java_lang_System_initProperties;
-text: .text%GetJavaProperties;
-text: .text%JNU_NewStringPlatform;
-text: .text%initializeEncoding: OUTPUTDIR/jni_util.o;
-text: .text%JNU_CallStaticMethodByName;
-text: .text%newString646_US: OUTPUTDIR/jni_util.o;
-text: .text%NewStringPlatform;
-text: .text%Java_java_io_FileInputStream_initIDs;
-text: .text%Java_java_io_FileDescriptor_initIDs;
-text: .text%Java_java_io_FileOutputStream_initIDs;
-text: .text%Java_java_lang_System_setIn0;
-text: .text%Java_java_lang_Class_forName0;
-text: .text%Java_java_lang_Object_getClass;
-text: .text%Java_sun_reflect_Reflection_getClassAccessFlags;
-text: .text%Java_sun_reflect_NativeConstructorAccessorImpl_newInstance0;
-text: .text%Java_java_lang_System_setOut0;
-text: .text%Java_java_lang_System_setErr0;
-text: .text%Java_java_lang_System_identityHashCode;
-text: .text%JNU_NewObjectByName;
-text: .text%Java_java_io_UnixFileSystem_initIDs;
-text: .text%Java_java_io_UnixFileSystem_canonicalize0;
-text: .text%JNU_GetStringPlatformChars;
-text: .text%JNU_ReleaseStringPlatformChars;
-text: .text%Java_java_io_FileInputStream_open0;
-text: .text%fileOpen;
-text: .text%Java_java_io_FileInputStream_readBytes;
-text: .text%readBytes;
-text: .text%Java_java_io_FileInputStream_available0;
-text: .text%Java_java_io_FileInputStream_close0;
-text: .text%Java_java_lang_System_mapLibraryName;
-text: .text%Java_java_io_UnixFileSystem_getBooleanAttributes0;
-text: .text%Java_java_lang_ClassLoader_00024NativeLibrary_load0;
-text: .text%Java_java_lang_ClassLoader_00024NativeLibrary_findEntry;
-text: .text%Java_java_security_AccessController_doPrivileged__Ljava_security_PrivilegedExceptionAction_2;
-text: .text%Java_java_io_UnixFileSystem_list;
-text: .text%JNU_ClassString;
-text: .text%JNU_CopyObjectArray;
-text: .text%Java_java_lang_String_intern;
-text: .text%Java_java_lang_StringUTF16_isBigEndian;
-text: .text%Java_java_lang_ClassLoader_findLoadedClass0;
-text: .text%Java_java_lang_ClassLoader_findBootstrapClass;
-text: .text%Java_java_lang_Throwable_fillInStackTrace;
-text: .text%Java_java_security_AccessController_doPrivileged__Ljava_security_PrivilegedExceptionAction_2Ljava_security_AccessControlContext_2;
-text: .text%Java_java_io_UnixFileSystem_getLastModifiedTime;
-text: .text%Java_java_lang_Float_floatToRawIntBits;
-text: .text%Java_java_lang_Double_doubleToRawLongBits;
-text: .text%Java_java_io_UnixFileSystem_getLength;
-text: .text%Java_java_lang_ClassLoader_defineClass0;
-text: .text%VerifyClassCodes;
-# Test Exit
-text: .text%Java_java_lang_Shutdown_halt0;
-# Test Hello
-text: .text%Java_java_io_FileOutputStream_writeBytes;
-text: .text%writeBytes;
-# Test Sleep
-# Test IntToString
-# Test LoadToolkit
-text: .text%Java_java_security_AccessController_doPrivileged__Ljava_security_PrivilegedAction_2Ljava_security_AccessControlContext_2;
-text: .text%JNU_GetEnv;
-text: .text%Java_java_io_UnixFileSystem_checkAccess;
-text: .text%Java_java_lang_reflect_Array_newArray;
-text: .text%Java_java_lang_StackTraceElement_initStackTraceElements;
-text: .text%throwFileNotFoundException;
-text: .text%JNU_NotifyAll;
-# Test LoadFrame
-text: .text%JNU_CallMethodByName;
-text: .text%JNU_CallMethodByNameV;
-text: .text%Java_java_io_UnixFileSystem_createDirectory;
-text: .text%Java_java_io_UnixFileSystem_setLastModifiedTime;
-# Test LoadJFrame
-text: .text%Java_sun_reflect_NativeMethodAccessorImpl_invoke0;
-text: .text%Java_java_lang_Class_isInstance;
-# Test JHello
-# SwingSet
-text: .text%Java_java_lang_Class_isAssignableFrom;
-text: .text%Java_java_util_TimeZone_getSystemTimeZoneID;
-text: .text%findJavaTZ_md;
-text: .text%Java_java_lang_StrictMath_log;
-text: .text%Java_java_lang_StrictMath_sqrt;
--- a/make/mapfiles/libjava/reorder-sparcv9	Thu Apr 05 11:18:39 2018 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,92 +0,0 @@
-data = R0x2000;
-text = LOAD ?RXO;
-# Test Null
-text: .text%JNI_OnLoad;
-text: .text%Canonicalize;
-text: .text%canonicalize;
-text: .text%collapse: OUTPUTDIR/canonicalize_md.o;
-text: .text%Java_java_lang_Object_registerNatives;
-text: .text%Java_java_lang_System_registerNatives;
-text: .text%Java_java_lang_Thread_registerNatives;
-text: .text%Java_java_security_AccessController_getStackAccessControlContext;
-text: .text%Java_java_security_AccessController_getInheritedAccessControlContext;
-text: .text%Java_java_lang_ClassLoader_registerNatives;
-text: .text%Java_java_security_AccessController_doPrivileged__Ljava_security_PrivilegedAction_2;
-text: .text%Java_java_lang_Class_registerNatives;
-text: .text%Java_java_lang_Class_getPrimitiveClass;
-text: .text%Java_java_lang_System_initProperties;
-text: .text%GetJavaProperties;
-text: .text%JNU_NewStringPlatform;
-text: .text%initializeEncoding: OUTPUTDIR/jni_util.o;
-text: .text%JNU_CallStaticMethodByName;
-text: .text%newString8859_1: OUTPUTDIR/jni_util.o;
-text: .text%NewStringPlatform;
-text: .text%Java_java_io_FileInputStream_initIDs;
-text: .text%Java_java_io_FileDescriptor_initIDs;
-text: .text%Java_java_io_FileOutputStream_initIDs;
-text: .text%Java_java_lang_System_setIn0;
-text: .text%Java_java_lang_Class_forName0;
-text: .text%Java_java_lang_String_intern;
-text: .text%Java_java_lang_StringUTF16_isBigEndian;
-text: .text%Java_java_lang_Float_floatToRawIntBits;
-text: .text%Java_java_lang_Double_doubleToRawLongBits;
-text: .text%Java_java_lang_ClassLoader_findLoadedClass0;
-text: .text%Java_java_lang_ClassLoader_findBootstrapClass;
-text: .text%VerifyClassCodes;
-text: .text%Java_java_lang_Throwable_fillInStackTrace;
-text: .text%Java_java_lang_System_setOut0;
-text: .text%Java_java_lang_System_setErr0;
-text: .text%Java_java_lang_System_identityHashCode;
-text: .text%JNU_NewObjectByName;
-text: .text%Java_java_io_UnixFileSystem_initIDs;
-text: .text%Java_java_io_UnixFileSystem_canonicalize0;
-text: .text%JNU_GetStringPlatformChars;
-text: .text%JNU_ReleaseStringPlatformChars;
-text: .text%Java_java_io_FileInputStream_open0;
-text: .text%fileOpen;
-text: .text%Java_java_io_FileInputStream_readBytes;
-text: .text%readBytes;
-text: .text%Java_java_io_FileInputStream_available0;
-text: .text%Java_java_io_FileInputStream_close0;
-text: .text%Java_java_security_AccessController_doPrivileged__Ljava_security_PrivilegedExceptionAction_2;
-text: .text%Java_java_io_UnixFileSystem_list;
-text: .text%JNU_ClassString;
-text: .text%JNU_CopyObjectArray;
-text: .text%Java_java_io_UnixFileSystem_getBooleanAttributes0;
-text: .text%Java_java_security_AccessController_doPrivileged__Ljava_security_PrivilegedExceptionAction_2Ljava_security_AccessControlContext_2;
-text: .text%Java_java_lang_System_mapLibraryName;
-text: .text%Java_java_lang_ClassLoader_00024NativeLibrary_load0;
-text: .text%Java_java_lang_ClassLoader_00024NativeLibrary_findEntry;
-text: .text%Java_java_io_UnixFileSystem_getLength;
-text: .text%Java_java_lang_Object_getClass;
-text: .text%Java_java_lang_ClassLoader_defineClass0;
-# Test Exit
-text: .text%Java_java_lang_Shutdown_halt0;
-# Test Hello
-text: .text%Java_java_io_FileOutputStream_writeBytes;
-text: .text%writeBytes;
-# Test Sleep
-# Test IntToString
-# Test LoadToolkit
-text: .text%Java_java_security_AccessController_doPrivileged__Ljava_security_PrivilegedAction_2Ljava_security_AccessControlContext_2;
-text: .text%JNU_GetEnv;
-text: .text%Java_java_io_UnixFileSystem_checkAccess;
-text: .text%Java_java_lang_reflect_Array_newArray;
-text: .text%Java_java_lang_StackTraceElement_initStackTraceElements;
-text: .text%throwFileNotFoundException: OUTPUTDIR/io_util.o;
-text: .text%JNU_NotifyAll;
-# Test LoadFrame
-text: .text%JNU_CallMethodByName;
-text: .text%JNU_CallMethodByNameV;
-text: .text%Java_java_io_UnixFileSystem_createDirectory;
-text: .text%Java_java_io_UnixFileSystem_getLastModifiedTime;
-text: .text%Java_java_io_UnixFileSystem_setLastModifiedTime;
-# Test LoadJFrame
-text: .text%Java_java_lang_Class_isAssignableFrom;
-text: .text%Java_java_lang_Class_isInstance;
-# Test JHello
-# SwingSet
-text: .text%Java_java_util_TimeZone_getSystemTimeZoneID;
-text: .text%findJavaTZ_md;
-text: .text%Java_java_lang_StrictMath_log;
-text: .text%Java_java_lang_StrictMath_sqrt;
--- a/make/mapfiles/libjava/reorder-x86	Thu Apr 05 11:18:39 2018 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,98 +0,0 @@
-data = R0x2000;
-text = LOAD ?RXO;
-# Test Null
-text: .text%_init;
-text: .text%JNI_OnLoad;
-text: .text%Canonicalize;
-text: .text%canonicalize;
-text: .text%collapse: OUTPUTDIR/canonicalize_md.o;
-text: .text%Java_java_lang_Object_registerNatives;
-text: .text%Java_java_lang_System_registerNatives;
-text: .text%Java_java_lang_Thread_registerNatives;
-text: .text%Java_java_security_AccessController_getStackAccessControlContext;
-text: .text%Java_java_security_AccessController_getInheritedAccessControlContext;
-text: .text%Java_java_lang_ClassLoader_registerNatives;
-text: .text%Java_java_security_AccessController_doPrivileged__Ljava_security_PrivilegedAction_2;
-text: .text%Java_java_lang_Class_registerNatives;
-text: .text%Java_java_lang_Class_getPrimitiveClass;
-text: .text%Java_java_lang_System_initProperties;
-text: .text%GetJavaProperties;
-text: .text%uname: OUTPUTDIR/java_props_md.o;
-text: .text%mapLookup: OUTPUTDIR/java_props_md.o;
-text: .text%JNU_NewStringPlatform;
-text: .text%JNU_CallStaticMethodByName;
-text: .text%NewStringPlatform;
-text: .text%Java_java_io_FileInputStream_initIDs;
-text: .text%Java_java_io_FileDescriptor_initIDs;
-text: .text%Java_java_io_FileOutputStream_initIDs;
-text: .text%Java_java_lang_System_setIn0;
-text: .text%Java_java_lang_Class_forName0;
-text: .text%Java_java_lang_String_intern;
-text: .text%Java_java_lang_StringUTF16_isBigEndian;
-text: .text%Java_sun_reflect_NativeConstructorAccessorImpl_newInstance0;
-text: .text%Java_java_lang_Throwable_fillInStackTrace;
-text: .text%Java_java_lang_System_setOut0;
-text: .text%Java_java_lang_System_setErr0;
-text: .text%JNU_NewObjectByName;
-text: .text%Java_java_io_UnixFileSystem_initIDs;
-text: .text%Java_java_security_AccessController_doPrivileged__Ljava_security_PrivilegedExceptionAction_2;
-text: .text%Java_java_io_UnixFileSystem_list;
-text: .text%JNU_GetStringPlatformChars;
-text: .text%JNU_ReleaseStringPlatformChars;
-text: .text%JNU_ClassString;
-text: .text%JNU_CopyObjectArray;
-text: .text%Java_java_io_UnixFileSystem_canonicalize0;
-text: .text%Java_java_io_UnixFileSystem_getBooleanAttributes0;
-text: .text%Java_java_lang_ClassLoader_findLoadedClass0;
-text: .text%Java_java_lang_ClassLoader_findBootstrapClass;
-text: .text%Java_java_security_AccessController_doPrivileged__Ljava_security_PrivilegedExceptionAction_2Ljava_security_AccessControlContext_2;
-text: .text%Java_java_lang_System_mapLibraryName;
-text: .text%cpchars: OUTPUTDIR/System.o;
-text: .text%Java_java_lang_ClassLoader_00024NativeLibrary_load0;
-text: .text%Java_java_lang_ClassLoader_00024NativeLibrary_findEntry;
-text: .text%Java_java_lang_Float_floatToRawIntBits;
-text: .text%Java_java_lang_Double_doubleToRawLongBits;
-text: .text%Java_java_io_FileInputStream_open0;
-text: .text%fileOpen;
-text: .text%Java_java_io_UnixFileSystem_getLength;
-text: .text%Java_java_io_FileInputStream_readBytes;
-text: .text%readBytes;
-text: .text%Java_java_io_FileInputStream_close0;
-text: .text%Java_java_lang_Object_getClass;
-text: .text%Java_java_lang_ClassLoader_defineClass0;
-text: .text%VerifyClassCodes;
-# Test Exit
-text: .text%Java_java_lang_Shutdown_halt0;
-# Test Hello
-text: .text%Java_java_io_FileOutputStream_writeBytes;
-text: .text%writeBytes;
-# Test Sleep
-# Test IntToString
-# Test LoadToolkit
-text: .text%Java_java_security_AccessController_doPrivileged__Ljava_security_PrivilegedAction_2Ljava_security_AccessControlContext_2;
-text: .text%JNU_GetEnv;
-text: .text%Java_java_io_UnixFileSystem_checkAccess;
-text: .text%Java_sun_reflect_NativeMethodAccessorImpl_invoke0;
-text: .text%Java_java_io_FileInputStream_available0;
-text: .text%Java_java_lang_reflect_Array_newArray;
-text: .text%Java_java_lang_StackTraceElement_initStackTraceElements;
-text: .text%Java_java_lang_System_identityHashCode;
-text: .text%JNU_NotifyAll;
-# Test LoadFrame
-text: .text%JNU_CallMethodByName;
-text: .text%JNU_CallMethodByNameV;
-text: .text%Java_java_util_logging_FileHandler_lockFile;
-text: .text%Java_java_io_FileOutputStream_open0;
-text: .text%Java_java_io_UnixFileSystem_createDirectory;
-text: .text%Java_java_io_UnixFileSystem_getLastModifiedTime;
-text: .text%Java_java_io_UnixFileSystem_setLastModifiedTime;
-text: .text%Java_java_io_FileOutputStream_close0;
-text: .text%Java_java_util_logging_FileHandler_unlockFile;
-# Test LoadJFrame
-text: .text%Java_java_lang_Class_isAssignableFrom;
-text: .text%Java_java_lang_Class_isInstance;
-# Test JHello
-# SwingSet
-text: .text%Java_java_util_TimeZone_getSystemTimeZoneID;
-text: .text%findJavaTZ_md;
-text: .text%Java_java_lang_StrictMath_log;
--- a/make/mapfiles/libjawt/mapfile-vers	Thu Apr 05 11:18:39 2018 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,33 +0,0 @@
-#
-# Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.  Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Define library interface.
-
-SUNWprivate_1.1 {
-    global:
-        JAWT_GetAWT;
-    local:
-        *;
-};
--- a/make/mapfiles/libjdwp/mapfile-vers	Thu Apr 05 11:18:39 2018 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,34 +0,0 @@
-#
-# Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.  Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Define public interface.
-
-SUNWprivate_1.1 {
-	global:
-	    Agent_OnLoad;
-	    Agent_OnUnload;
-	local:
-		*;
-};
--- a/make/mapfiles/libjimage/mapfile-vers	Thu Apr 05 11:18:39 2018 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,40 +0,0 @@
-#
-# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.  Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Define public interface.
-
-SUNWprivate_1.1 {
-    global:
-        Java_jdk_internal_jimage_NativeImageBuffer_getNativeMap;
-        JIMAGE_Open;
-        JIMAGE_Close;
-        JIMAGE_PackageToModule;
-        JIMAGE_FindResource;
-        JIMAGE_GetResource;
-        JIMAGE_ResourceIterator;
-        JIMAGE_ResourcePath;
-    local:
-        *;
-};
--- a/make/mapfiles/libjli/mapfile-vers	Thu Apr 05 11:18:39 2018 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,50 +0,0 @@
-#
-# Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.  Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Define public interface.
-
-SUNWprivate_1.1 {
-	global:
-		JLI_Launch;
-		JLI_ManifestIterate;
-		JLI_SetTraceLauncher;
-		JLI_ReportErrorMessage;
-		JLI_ReportErrorMessageSys;
-		JLI_ReportMessage;
-		JLI_ReportExceptionDescription;
-		JLI_GetStdArgs;
-		JLI_GetStdArgc;
-		JLI_List_new;
-		JLI_List_add;
-		JLI_StringDup;
-		JLI_MemFree;
-		JLI_InitArgProcessing;
-		JLI_PreprocessArg;
-		JLI_AddArgsFromEnvVar;
-		JLI_GetAppArgIndex;
-
-	local:
-		*;
-};
--- a/make/mapfiles/libjpeg/mapfile-vers	Thu Apr 05 11:18:39 2018 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,56 +0,0 @@
-#
-# Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.  Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Define public interface.
-
-SUNWprivate_1.1 {
-    global:
-        JNI_OnLoad;
-
-        Java_sun_awt_image_JPEGImageDecoder_initIDs;
-        Java_sun_awt_image_JPEGImageDecoder_readImage;
-
-        Java_com_sun_imageio_plugins_jpeg_JPEGImageReader_initReaderIDs;
-        Java_com_sun_imageio_plugins_jpeg_JPEGImageReader_initJPEGImageReader;
-        Java_com_sun_imageio_plugins_jpeg_JPEGImageReader_setSource;
-        Java_com_sun_imageio_plugins_jpeg_JPEGImageReader_readImageHeader;
-        Java_com_sun_imageio_plugins_jpeg_JPEGImageReader_setOutColorSpace;
-        Java_com_sun_imageio_plugins_jpeg_JPEGImageReader_readImage;
-        Java_com_sun_imageio_plugins_jpeg_JPEGImageReader_abortRead;
-        Java_com_sun_imageio_plugins_jpeg_JPEGImageReader_resetReader;
-        Java_com_sun_imageio_plugins_jpeg_JPEGImageReader_disposeReader;
-        Java_com_sun_imageio_plugins_jpeg_JPEGImageReader_resetLibraryState;
-        Java_com_sun_imageio_plugins_jpeg_JPEGImageReader_clearNativeReadAbortFlag;
-        Java_com_sun_imageio_plugins_jpeg_JPEGImageWriter_initWriterIDs;
-        Java_com_sun_imageio_plugins_jpeg_JPEGImageWriter_initJPEGImageWriter;
-        Java_com_sun_imageio_plugins_jpeg_JPEGImageWriter_setDest;
-        Java_com_sun_imageio_plugins_jpeg_JPEGImageWriter_writeTables;
-        Java_com_sun_imageio_plugins_jpeg_JPEGImageWriter_writeImage;
-        Java_com_sun_imageio_plugins_jpeg_JPEGImageWriter_abortWrite;
-        Java_com_sun_imageio_plugins_jpeg_JPEGImageWriter_resetWriter;
-        Java_com_sun_imageio_plugins_jpeg_JPEGImageWriter_disposeWriter;
-    local:
-        *;
-};
--- a/make/mapfiles/libjpeg/reorder-sparc	Thu Apr 05 11:18:39 2018 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,119 +0,0 @@
-data = R0x2000;
-text = LOAD ?RXO;
-# Test Null
-# Test Exit
-# Test Hello
-# Test Sleep
-# Test IntToString
-# Test LoadToolkit
-# Test LoadFrame
-# Test LoadJFrame
-# Test JHello
-# SwingSet
-text: .text%JNI_OnLoad;
-text: .text%Java_sun_awt_image_JPEGImageDecoder_initIDs;
-text: .text%Java_sun_awt_image_JPEGImageDecoder_readImage;
-text: .text%jStdError;
-text: .text%jCreaDecompress;
-text: .text%jIMemMgr;
-text: .text%jMemInit;
-text: .text%jGetSmall;
-text: .text%jIMReader;
-text: .text%alloc_small: OUTPUTDIR/jmemmgr.o;
-text: .text%reset_marker_reader: OUTPUTDIR/jdmarker.o;
-text: .text%jIInCtlr;
-text: .text%GET_ARRAYS: OUTPUTDIR/jpegdecoder.o;
-text: .text%jReadHeader;
-text: .text%jConsumeInput;
-text: .text%reset_input_controller: OUTPUTDIR/jdinput.o;
-text: .text%reset_error_mgr: OUTPUTDIR/jerror.o;
-text: .text%sun_jpeg_init_source;
-text: .text%consume_markers: OUTPUTDIR/jdinput.o;
-text: .text%read_markers: OUTPUTDIR/jdmarker.o;
-# text: .text%first_marker: OUTPUTDIR/jdmarker.o;
-text: .text%sun_jpeg_fill_input_buffer;
-text: .text%RELEASE_ARRAYS: OUTPUTDIR/jpegdecoder.o;
-# text: .text%get_soi: OUTPUTDIR/jdmarker.o;
-text: .text%emit_message: OUTPUTDIR/jerror.o;
-text: .text%next_marker: OUTPUTDIR/jdmarker.o;
-text: .text%get_interesting_appn: OUTPUTDIR/jdmarker.o;
-text: .text%examine_app0: OUTPUTDIR/jdmarker.o;
-text: .text%skip_variable: OUTPUTDIR/jdmarker.o;
-text: .text%sun_jpeg_skip_input_data;
-text: .text%examine_app14: OUTPUTDIR/jdmarker.o;
-text: .text%get_dqt: OUTPUTDIR/jdmarker.o;
-text: .text%jAlcQTable;
-text: .text%get_sof: OUTPUTDIR/jdmarker.o;
-# text: .text%get_dri: OUTPUTDIR/jdmarker.o;
-text: .text%get_dht: OUTPUTDIR/jdmarker.o;
-text: .text%jAlcHTable;
-text: .text%get_sos: OUTPUTDIR/jdmarker.o;
-text: .text%initial_setup: OUTPUTDIR/jdinput.o;
-text: .text%jDivRound;
-text: .text%default_decompress_parms: OUTPUTDIR/jdapimin.o;
-text: .text%jHasMultScn;
-text: .text%jStrtDecompress;
-text: .text%jIDMaster;
-text: .text%master_selection: OUTPUTDIR/jdmaster.o;
-text: .text%jCalcDimensions;
-# text: .text%use_merged_upsample: OUTPUTDIR/jdmaster.o;
-# text: .text%prepare_range_limit_table: OUTPUTDIR/jdmaster.o;
-text: .text%jIDColor;
-# text: .text%build_ycc_rgb_table: OUTPUTDIR/jdcolor.o;
-text: .text%jIUpsampler;
-text: .text%jRound;
-text: .text%alloc_sarray: OUTPUTDIR/jmemmgr.o;
-text: .text%alloc_large: OUTPUTDIR/jmemmgr.o;
-text: .text%jGetLarge;
-text: .text%jIDPostC;
-text: .text%jIIDCT;
-text: .text%jIHDecoder;
-text: .text%jIDCoefC;
-text: .text%jIDMainC;
-text: .text%alloc_funny_pointers: OUTPUTDIR/jdmainct.o;
-text: .text%realize_virt_arrays: OUTPUTDIR/jmemmgr.o;
-text: .text%start_input_pass: OUTPUTDIR/jdinput.o;
-text: .text%per_scan_setup: OUTPUTDIR/jdinput.o;
-text: .text%latch_quant_tables: OUTPUTDIR/jdinput.o;
-text: .text%start_pass_huff_decoder: OUTPUTDIR/jdhuff.o;
-text: .text%jMkDDerived;
-text: .text%start_input_pass: OUTPUTDIR/jdcoefct.o;
-# text: .text%start_iMCU_row: OUTPUTDIR/jdcoefct.o;
-text: .text%output_pass_setup: OUTPUTDIR/jdapistd.o;
-text: .text%prepare_for_output_pass: OUTPUTDIR/jdmaster.o;
-text: .text%start_pass: OUTPUTDIR/jddctmgr.o;
-text: .text%start_output_pass: OUTPUTDIR/jdcoefct.o;
-text: .text%start_pass_dcolor: OUTPUTDIR/jdcolor.o;
-text: .text%start_pass_upsample: OUTPUTDIR/jdsample.o;
-text: .text%start_pass_dpost: OUTPUTDIR/jdpostct.o;
-text: .text%start_pass_main: OUTPUTDIR/jdmainct.o;
-text: .text%make_funny_pointers: OUTPUTDIR/jdmainct.o;
-text: .text%jReadScanlines;
-text: .text%process_data_context_main: OUTPUTDIR/jdmainct.o;
-text: .text%decompress_onepass: OUTPUTDIR/jdcoefct.o;
-text: .text%jZeroFar;
-text: .text%decode_mcu: OUTPUTDIR/jdhuff.o;
-text: .text%jFilBitBuf;
-text: .text%jHufDecode;
-text: .text%jRDislow;
-text: .text%sep_upsample: OUTPUTDIR/jdsample.o;
-text: .text%fullsize_upsample: OUTPUTDIR/jdsample.o;
-text: .text%h2v2_fancy_upsample: OUTPUTDIR/jdsample.o;
-text: .text%ycc_rgb_convert: OUTPUTDIR/jdcolor.o;
-# text: .text%set_wraparound_pointers: OUTPUTDIR/jdmainct.o;
-#text: .text%process_restart: OUTPUTDIR/jdhuff.o;
-text: .text%read_restart_marker: OUTPUTDIR/jdmarker.o;
-text: .text%finish_input_pass: OUTPUTDIR/jdinput.o;
-# text: .text%set_bottom_pointers: OUTPUTDIR/jdmainct.o;
-text: .text%jFinDecompress;
-text: .text%finish_output_pass: OUTPUTDIR/jdmaster.o;
-text: .text%sun_jpeg_term_source;
-text: .text%jAbort;
-text: .text%free_pool: OUTPUTDIR/jmemmgr.o;
-text: .text%jFreeLarge;
-text: .text%jFreeSmall;
-text: .text%jDestDecompress;
-text: .text%jDestroy;
-text: .text%self_destruct: OUTPUTDIR/jmemmgr.o;
-text: .text%jMemTerm;
-text: .text%process_data_simple_main: OUTPUTDIR/jdmainct.o;
--- a/make/mapfiles/libjpeg/reorder-sparcv9	Thu Apr 05 11:18:39 2018 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,119 +0,0 @@
-data = R0x2000;
-text = LOAD ?RXO;
-# Test Null
-# Test Exit
-# Test Hello
-# Test Sleep
-# Test IntToString
-# Test LoadToolkit
-# Test LoadFrame
-# Test LoadJFrame
-# Test JHello
-# SwingSet
-text: .text%JNI_OnLoad;
-text: .text%Java_sun_awt_image_JPEGImageDecoder_initIDs;
-text: .text%Java_sun_awt_image_JPEGImageDecoder_readImage;
-text: .text%jStdError;
-text: .text%jCreaDecompress;
-text: .text%jIMemMgr;
-text: .text%jMemInit;
-text: .text%jGetSmall;
-text: .text%jIMReader;
-text: .text%alloc_small: OUTPUTDIR/jmemmgr.o;
-text: .text%reset_marker_reader: OUTPUTDIR/jdmarker.o;
-text: .text%jIInCtlr;
-text: .text%GET_ARRAYS: OUTPUTDIR/jpegdecoder.o;
-text: .text%jReadHeader;
-text: .text%jConsumeInput;
-text: .text%reset_input_controller: OUTPUTDIR/jdinput.o;
-text: .text%reset_error_mgr: OUTPUTDIR/jerror.o;
-text: .text%sun_jpeg_init_source;
-text: .text%consume_markers: OUTPUTDIR/jdinput.o;
-text: .text%read_markers: OUTPUTDIR/jdmarker.o;
-# text: .text%first_marker: OUTPUTDIR/jdmarker.o;
-text: .text%sun_jpeg_fill_input_buffer;
-text: .text%RELEASE_ARRAYS: OUTPUTDIR/jpegdecoder.o;
-# text: .text%get_soi: OUTPUTDIR/jdmarker.o;
-text: .text%emit_message: OUTPUTDIR/jerror.o;
-text: .text%next_marker: OUTPUTDIR/jdmarker.o;
-text: .text%get_interesting_appn: OUTPUTDIR/jdmarker.o;
-text: .text%examine_app0: OUTPUTDIR/jdmarker.o;
-text: .text%skip_variable: OUTPUTDIR/jdmarker.o;
-text: .text%sun_jpeg_skip_input_data;
-text: .text%examine_app14: OUTPUTDIR/jdmarker.o;
-text: .text%get_dqt: OUTPUTDIR/jdmarker.o;
-text: .text%jAlcQTable;
-text: .text%get_sof: OUTPUTDIR/jdmarker.o;
-# text: .text%get_dri: OUTPUTDIR/jdmarker.o;
-text: .text%get_dht: OUTPUTDIR/jdmarker.o;
-text: .text%jAlcHTable;
-text: .text%get_sos: OUTPUTDIR/jdmarker.o;
-text: .text%initial_setup: OUTPUTDIR/jdinput.o;
-text: .text%jDivRound;
-text: .text%default_decompress_parms: OUTPUTDIR/jdapimin.o;
-text: .text%jHasMultScn;
-text: .text%jStrtDecompress;
-text: .text%jIDMaster;
-text: .text%master_selection: OUTPUTDIR/jdmaster.o;
-text: .text%jCalcDimensions;
-# text: .text%use_merged_upsample: OUTPUTDIR/jdmaster.o;
-# text: .text%prepare_range_limit_table: OUTPUTDIR/jdmaster.o;
-text: .text%jIDColor;
-# text: .text%build_ycc_rgb_table: OUTPUTDIR/jdcolor.o;
-text: .text%jIUpsampler;
-text: .text%jRound;
-text: .text%alloc_sarray: OUTPUTDIR/jmemmgr.o;
-text: .text%alloc_large: OUTPUTDIR/jmemmgr.o;
-text: .text%jGetLarge;
-text: .text%jIDPostC;
-text: .text%jIIDCT;
-text: .text%jIHDecoder;
-text: .text%jIDCoefC;
-text: .text%jIDMainC;
-text: .text%alloc_funny_pointers: OUTPUTDIR/jdmainct.o;
-text: .text%realize_virt_arrays: OUTPUTDIR/jmemmgr.o;
-text: .text%start_input_pass: OUTPUTDIR/jdinput.o;
-text: .text%per_scan_setup: OUTPUTDIR/jdinput.o;
-text: .text%latch_quant_tables: OUTPUTDIR/jdinput.o;
-text: .text%start_pass_huff_decoder: OUTPUTDIR/jdhuff.o;
-text: .text%jMkDDerived;
-text: .text%start_input_pass: OUTPUTDIR/jdcoefct.o;
-# text: .text%start_iMCU_row: OUTPUTDIR/jdcoefct.o;
-text: .text%output_pass_setup: OUTPUTDIR/jdapistd.o;
-text: .text%prepare_for_output_pass: OUTPUTDIR/jdmaster.o;
-text: .text%start_pass: OUTPUTDIR/jddctmgr.o;
-text: .text%start_output_pass: OUTPUTDIR/jdcoefct.o;
-text: .text%start_pass_dcolor: OUTPUTDIR/jdcolor.o;
-text: .text%start_pass_upsample: OUTPUTDIR/jdsample.o;
-text: .text%start_pass_dpost: OUTPUTDIR/jdpostct.o;
-text: .text%start_pass_main: OUTPUTDIR/jdmainct.o;
-text: .text%make_funny_pointers: OUTPUTDIR/jdmainct.o;
-text: .text%jReadScanlines;
-text: .text%process_data_context_main: OUTPUTDIR/jdmainct.o;
-text: .text%decompress_onepass: OUTPUTDIR/jdcoefct.o;
-text: .text%jZeroFar;
-text: .text%decode_mcu: OUTPUTDIR/jdhuff.o;
-text: .text%jFilBitBuf;
-text: .text%jHufDecode;
-text: .text%jRDislow;
-text: .text%sep_upsample: OUTPUTDIR/jdsample.o;
-text: .text%fullsize_upsample: OUTPUTDIR/jdsample.o;
-text: .text%h2v2_fancy_upsample: OUTPUTDIR/jdsample.o;
-text: .text%ycc_rgb_convert: OUTPUTDIR/jdcolor.o;
-# text: .text%set_wraparound_pointers: OUTPUTDIR/jdmainct.o;
-text: .text%process_restart: OUTPUTDIR/jdhuff.o;
-text: .text%read_restart_marker: OUTPUTDIR/jdmarker.o;
-text: .text%finish_input_pass: OUTPUTDIR/jdinput.o;
-# text: .text%set_bottom_pointers: OUTPUTDIR/jdmainct.o;
-text: .text%jFinDecompress;
-text: .text%finish_output_pass: OUTPUTDIR/jdmaster.o;
-text: .text%sun_jpeg_term_source;
-text: .text%jAbort;
-text: .text%free_pool: OUTPUTDIR/jmemmgr.o;
-text: .text%jFreeLarge;
-text: .text%jFreeSmall;
-text: .text%jDestDecompress;
-text: .text%jDestroy;
-text: .text%self_destruct: OUTPUTDIR/jmemmgr.o;
-text: .text%jMemTerm;
-text: .text%process_data_simple_main: OUTPUTDIR/jdmainct.o;
--- a/make/mapfiles/libjpeg/reorder-x86	Thu Apr 05 11:18:39 2018 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,119 +0,0 @@
-data = R0x2000;
-text = LOAD ?RXO;
-# Test Null
-# Test Exit
-# Test Hello
-# Test Sleep
-# Test IntToString
-# Test LoadToolkit
-# Test LoadFrame
-# Test LoadJFrame
-# Test JHello
-# SwingSet
-text: .text%JNI_OnLoad;
-text: .text%Java_sun_awt_image_JPEGImageDecoder_initIDs;
-text: .text%Java_sun_awt_image_JPEGImageDecoder_readImage;
-text: .text%jStdError;
-text: .text%jCreaDecompress;
-text: .text%jIMemMgr;
-text: .text%jMemInit;
-text: .text%jGetSmall;
-text: .text%jIMReader;
-text: .text%alloc_small: OUTPUTDIR/jmemmgr.o;
-text: .text%reset_marker_reader: OUTPUTDIR/jdmarker.o;
-text: .text%jIInCtlr;
-# text: .text%GET_ARRAYS: OUTPUTDIR/jpegdecoder.o;
-text: .text%jReadHeader;
-text: .text%jConsumeInput;
-text: .text%reset_input_controller: OUTPUTDIR/jdinput.o;
-text: .text%reset_error_mgr: OUTPUTDIR/jerror.o;
-text: .text%sun_jpeg_init_source;
-text: .text%consume_markers: OUTPUTDIR/jdinput.o;
-text: .text%read_markers: OUTPUTDIR/jdmarker.o;
-# text: .text%first_marker: OUTPUTDIR/jdmarker.o;
-text: .text%sun_jpeg_fill_input_buffer;
-# text: .text%RELEASE_ARRAYS: OUTPUTDIR/jpegdecoder.o;
-# text: .text%get_soi: OUTPUTDIR/jdmarker.o;
-text: .text%emit_message: OUTPUTDIR/jerror.o;
-# text: .text%next_marker: OUTPUTDIR/jdmarker.o;
-text: .text%get_interesting_appn: OUTPUTDIR/jdmarker.o;
-# text: .text%examine_app0: OUTPUTDIR/jdmarker.o;
-text: .text%skip_variable: OUTPUTDIR/jdmarker.o;
-text: .text%sun_jpeg_skip_input_data;
-# text: .text%examine_app14: OUTPUTDIR/jdmarker.o;
-text: .text%get_dqt: OUTPUTDIR/jdmarker.o;
-text: .text%jAlcQTable;
-text: .text%get_sof: OUTPUTDIR/jdmarker.o;
-# text: .text%get_dri: OUTPUTDIR/jdmarker.o;
-text: .text%get_dht: OUTPUTDIR/jdmarker.o;
-text: .text%jAlcHTable;
-text: .text%get_sos: OUTPUTDIR/jdmarker.o;
-# text: .text%initial_setup: OUTPUTDIR/jdinput.o;
-text: .text%jDivRound;
-# text: .text%default_decompress_parms: OUTPUTDIR/jdapimin.o;
-text: .text%jHasMultScn;
-text: .text%jStrtDecompress;
-text: .text%jIDMaster;
-# text: .text%master_selection: OUTPUTDIR/jdmaster.o;
-text: .text%jCalcDimensions;
-# text: .text%use_merged_upsample: OUTPUTDIR/jdmaster.o;
-# text: .text%prepare_range_limit_table: OUTPUTDIR/jdmaster.o;
-text: .text%jIDColor;
-# text: .text%build_ycc_rgb_table: OUTPUTDIR/jdcolor.o;
-text: .text%jIUpsampler;
-text: .text%jRound;
-text: .text%alloc_sarray: OUTPUTDIR/jmemmgr.o;
-text: .text%alloc_large: OUTPUTDIR/jmemmgr.o;
-text: .text%jGetLarge;
-text: .text%jIDPostC;
-text: .text%jIIDCT;
-text: .text%jIHDecoder;
-text: .text%jIDCoefC;
-text: .text%jIDMainC;
-# text: .text%alloc_funny_pointers: OUTPUTDIR/jdmainct.o;
-text: .text%realize_virt_arrays: OUTPUTDIR/jmemmgr.o;
-text: .text%start_input_pass: OUTPUTDIR/jdinput.o;
-# text: .text%per_scan_setup: OUTPUTDIR/jdinput.o;
-# text: .text%latch_quant_tables: OUTPUTDIR/jdinput.o;
-text: .text%start_pass_huff_decoder: OUTPUTDIR/jdhuff.o;
-text: .text%jMkDDerived;
-text: .text%start_input_pass: OUTPUTDIR/jdcoefct.o;
-# text: .text%start_iMCU_row: OUTPUTDIR/jdcoefct.o;
-# text: .text%output_pass_setup: OUTPUTDIR/jdapistd.o;
-text: .text%prepare_for_output_pass: OUTPUTDIR/jdmaster.o;
-text: .text%start_pass: OUTPUTDIR/jddctmgr.o;
-text: .text%start_output_pass: OUTPUTDIR/jdcoefct.o;
-text: .text%start_pass_dcolor: OUTPUTDIR/jdcolor.o;
-text: .text%start_pass_upsample: OUTPUTDIR/jdsample.o;
-text: .text%start_pass_dpost: OUTPUTDIR/jdpostct.o;
-text: .text%start_pass_main: OUTPUTDIR/jdmainct.o;
-# text: .text%make_funny_pointers: OUTPUTDIR/jdmainct.o;
-text: .text%jReadScanlines;
-text: .text%process_data_context_main: OUTPUTDIR/jdmainct.o;
-text: .text%decompress_onepass: OUTPUTDIR/jdcoefct.o;
-text: .text%jZeroFar;
-text: .text%decode_mcu: OUTPUTDIR/jdhuff.o;
-text: .text%jFilBitBuf;
-text: .text%jHufDecode;
-text: .text%jRDislow;
-text: .text%sep_upsample: OUTPUTDIR/jdsample.o;
-text: .text%fullsize_upsample: OUTPUTDIR/jdsample.o;
-text: .text%h2v2_fancy_upsample: OUTPUTDIR/jdsample.o;
-text: .text%ycc_rgb_convert: OUTPUTDIR/jdcolor.o;
-# text: .text%set_wraparound_pointers: OUTPUTDIR/jdmainct.o;
-# text: .text%process_restart: OUTPUTDIR/jdhuff.o;
-text: .text%read_restart_marker: OUTPUTDIR/jdmarker.o;
-text: .text%finish_input_pass: OUTPUTDIR/jdinput.o;
-# text: .text%set_bottom_pointers: OUTPUTDIR/jdmainct.o;
-text: .text%jFinDecompress;
-text: .text%finish_output_pass: OUTPUTDIR/jdmaster.o;
-text: .text%sun_jpeg_term_source;
-text: .text%jAbort;
-text: .text%free_pool: OUTPUTDIR/jmemmgr.o;
-text: .text%jFreeLarge;
-text: .text%jFreeSmall;
-text: .text%jDestDecompress;
-text: .text%jDestroy;
-text: .text%self_destruct: OUTPUTDIR/jmemmgr.o;
-text: .text%jMemTerm;
-text: .text%process_data_simple_main: OUTPUTDIR/jdmainct.o;
--- a/make/mapfiles/libjsdt/mapfile-vers	Thu Apr 05 11:18:39 2018 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +0,0 @@
-#
-# Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.  Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Define library interface.
-
-SUNWprivate_1.1 {
-    global:
-        Java_sun_tracing_dtrace_JVM_isSupported0;
-        Java_sun_tracing_dtrace_JVM_activate0;
-        Java_sun_tracing_dtrace_JVM_dispose0;
-        Java_sun_tracing_dtrace_JVM_isEnabled0;
-        Java_sun_tracing_dtrace_JVM_defineClass0;
-    local:
-        *;
-};
--- a/make/mapfiles/liblcms/mapfile-vers	Thu Apr 05 11:18:39 2018 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,43 +0,0 @@
-#
-# Copyright (c) 2007, 2013, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.  Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Define public interface.
-
-SUNWprivate_1.1 {
-	global:
-        Java_sun_java2d_cmm_lcms_LCMS_loadProfileNative;
-        Java_sun_java2d_cmm_lcms_LCMS_getProfileSizeNative;
-        Java_sun_java2d_cmm_lcms_LCMS_getProfileDataNative;
-        Java_sun_java2d_cmm_lcms_LCMS_getTagNative;
-        Java_sun_java2d_cmm_lcms_LCMS_setTagDataNative;
-        Java_sun_java2d_cmm_lcms_LCMS_colorConvert;
-        Java_sun_java2d_cmm_lcms_LCMS_getProfileID;
-        Java_sun_java2d_cmm_lcms_LCMS_initLCMS;
-        Java_sun_java2d_cmm_lcms_LCMS_createNativeTransform;
-        JNI_OnLoad;
-
-	local:
-		*;
-};
--- a/make/mapfiles/libmanagement/mapfile-vers	Thu Apr 05 11:18:39 2018 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,97 +0,0 @@
-#
-# Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.  Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Define library interface.
-
-SUNWprivate_1.1 {
-	global:
-	    Java_sun_management_ClassLoadingImpl_setVerboseClass;
-            Java_sun_management_GarbageCollectorImpl_getCollectionCount;
-	    Java_sun_management_GarbageCollectorImpl_getCollectionTime;
-	    Java_sun_management_HotspotThread_getInternalThreadCount;
-	    Java_sun_management_HotspotThread_getInternalThreadTimes0;
-	    Java_sun_management_MemoryImpl_getMemoryManagers0;
-	    Java_sun_management_MemoryImpl_getMemoryPools0;
-	    Java_sun_management_MemoryImpl_getMemoryUsage0;
-	    Java_sun_management_MemoryImpl_setVerboseGC;
-	    Java_sun_management_MemoryManagerImpl_getMemoryPools0;
-	    Java_sun_management_MemoryPoolImpl_getCollectionUsage0;
-	    Java_sun_management_MemoryPoolImpl_getMemoryManagers0;
-	    Java_sun_management_MemoryPoolImpl_getPeakUsage0;
-	    Java_sun_management_MemoryPoolImpl_getUsage0;
-	    Java_sun_management_MemoryPoolImpl_resetPeakUsage0;
-	    Java_sun_management_MemoryPoolImpl_setCollectionThreshold0;
-	    Java_sun_management_MemoryPoolImpl_setPoolCollectionSensor;
-	    Java_sun_management_MemoryPoolImpl_setPoolUsageSensor;
-	    Java_sun_management_MemoryPoolImpl_setUsageThreshold0;
-	    Java_sun_management_ThreadImpl_dumpThreads0;
-	    Java_sun_management_ThreadImpl_findDeadlockedThreads0;
-	    Java_sun_management_ThreadImpl_findMonitorDeadlockedThreads0;
-	    Java_sun_management_ThreadImpl_getThreadInfo1;
-	    Java_sun_management_ThreadImpl_getThreads;
-	    Java_sun_management_ThreadImpl_getThreadTotalCpuTime0;
-	    Java_sun_management_ThreadImpl_getThreadTotalCpuTime1;
-	    Java_sun_management_ThreadImpl_getThreadUserCpuTime0;
-	    Java_sun_management_ThreadImpl_getThreadUserCpuTime1;
-	    Java_sun_management_ThreadImpl_getThreadAllocatedMemory1;
-	    Java_sun_management_ThreadImpl_resetContentionTimes0;
-	    Java_sun_management_ThreadImpl_resetPeakThreadCount0;
-	    Java_sun_management_ThreadImpl_setThreadContentionMonitoringEnabled0;
-	    Java_sun_management_ThreadImpl_setThreadCpuTimeEnabled0;
-	    Java_sun_management_ThreadImpl_setThreadAllocatedMemoryEnabled0;
-	    Java_sun_management_VMManagementImpl_getAvailableProcessors;
-	    Java_sun_management_VMManagementImpl_getClassInitializationTime;
-	    Java_sun_management_VMManagementImpl_getClassLoadingTime;
-	    Java_sun_management_VMManagementImpl_getClassVerificationTime;
-	    Java_sun_management_VMManagementImpl_getDaemonThreadCount;
-	    Java_sun_management_VMManagementImpl_getInitializedClassCount;
-	    Java_sun_management_VMManagementImpl_getLiveThreadCount;
-	    Java_sun_management_VMManagementImpl_getLoadedClassSize;
-	    Java_sun_management_VMManagementImpl_getMethodDataSize;
-	    Java_sun_management_VMManagementImpl_getPeakThreadCount;
-	    Java_sun_management_VMManagementImpl_getProcessId;
-	    Java_sun_management_VMManagementImpl_getSafepointCount;
-	    Java_sun_management_VMManagementImpl_getSafepointSyncTime;
-	    Java_sun_management_VMManagementImpl_getStartupTime;
-	    Java_sun_management_VMManagementImpl_getUptime0;
-	    Java_sun_management_VMManagementImpl_getTotalApplicationNonStoppedTime;
-	    Java_sun_management_VMManagementImpl_getTotalClassCount;
-	    Java_sun_management_VMManagementImpl_getTotalCompileTime;
-	    Java_sun_management_VMManagementImpl_getTotalSafepointTime;
-	    Java_sun_management_VMManagementImpl_getTotalThreadCount;
-	    Java_sun_management_VMManagementImpl_getUnloadedClassCount;
-	    Java_sun_management_VMManagementImpl_getUnloadedClassSize;
-	    Java_sun_management_VMManagementImpl_getVerboseClass;
-	    Java_sun_management_VMManagementImpl_getVerboseGC;
-	    Java_sun_management_VMManagementImpl_getVersion0;
-	    Java_sun_management_VMManagementImpl_getVmArguments0;
-	    Java_sun_management_VMManagementImpl_initOptionalSupportFields;
-	    Java_sun_management_VMManagementImpl_isThreadContentionMonitoringEnabled;
-	    Java_sun_management_VMManagementImpl_isThreadCpuTimeEnabled;
-	    Java_sun_management_VMManagementImpl_isThreadAllocatedMemoryEnabled;
-            JNI_OnLoad;
-	local:
-	    *;
-};
--- a/make/mapfiles/libmanagement_agent/mapfile-vers	Thu Apr 05 11:18:39 2018 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,34 +0,0 @@
-#
-# Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.  Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Define library interface.
-
-SUNWprivate_1.1 {
-	global:
-            Java_jdk_internal_agent_FileSystemImpl_isAccessUserOnly0;
-            JNI_OnLoad;
-	local:
-	    *;
-};
--- a/make/mapfiles/libmanagement_ext/mapfile-vers	Thu Apr 05 11:18:39 2018 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,60 +0,0 @@
-#
-# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.  Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Define library interface.
-
-SUNWprivate_1.1 {
-	global:
-	    Java_com_sun_management_internal_OperatingSystemImpl_getCommittedVirtualMemorySize0;
-	    Java_com_sun_management_internal_OperatingSystemImpl_getFreePhysicalMemorySize0;
-	    Java_com_sun_management_internal_OperatingSystemImpl_getFreeSwapSpaceSize0;
-	    Java_com_sun_management_internal_OperatingSystemImpl_getMaxFileDescriptorCount0;
-	    Java_com_sun_management_internal_OperatingSystemImpl_getOpenFileDescriptorCount0;
-	    Java_com_sun_management_internal_OperatingSystemImpl_getProcessCpuLoad0;
-	    Java_com_sun_management_internal_OperatingSystemImpl_getProcessCpuTime0;
-	    Java_com_sun_management_internal_OperatingSystemImpl_getSystemCpuLoad0;
-	    Java_com_sun_management_internal_OperatingSystemImpl_getTotalPhysicalMemorySize0;
-	    Java_com_sun_management_internal_OperatingSystemImpl_getTotalSwapSpaceSize0;
-	    Java_com_sun_management_internal_OperatingSystemImpl_initialize0;
-            Java_com_sun_management_internal_DiagnosticCommandImpl_executeDiagnosticCommand;
-            Java_com_sun_management_internal_DiagnosticCommandImpl_getDiagnosticCommands;
-            Java_com_sun_management_internal_DiagnosticCommandImpl_getDiagnosticCommandInfo;
-            Java_com_sun_management_internal_DiagnosticCommandImpl_setNotificationEnabled;
-	    Java_com_sun_management_internal_Flag_getAllFlagNames;
-	    Java_com_sun_management_internal_Flag_getFlags;
-	    Java_com_sun_management_internal_Flag_getInternalFlagCount;
-	    Java_com_sun_management_internal_Flag_initialize;
-	    Java_com_sun_management_internal_Flag_setLongValue;
-	    Java_com_sun_management_internal_Flag_setBooleanValue;
-	    Java_com_sun_management_internal_Flag_setStringValue;
-            Java_com_sun_management_internal_GarbageCollectorExtImpl_setNotificationEnabled;
-	    Java_com_sun_management_internal_GcInfoBuilder_fillGcAttributeInfo;
-	    Java_com_sun_management_internal_GcInfoBuilder_getLastGcInfo0;
-	    Java_com_sun_management_internal_GcInfoBuilder_getNumGcExtAttributes;
-	    Java_com_sun_management_internal_HotSpotDiagnostic_dumpHeap0;
-            JNI_OnLoad;
-	local:
-	    *;
-};
--- a/make/mapfiles/libmlib_image/mapfile-vers	Thu Apr 05 11:18:39 2018 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,39 +0,0 @@
-#
-# Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.  Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Define public interface.
-
-SUNWprivate_1.1 {
-	global:
-            j2d_mlib_ImageDelete;
-            j2d_mlib_ImageCreateStruct;
-            j2d_mlib_ImageLookUp;
-            j2d_mlib_ImageCreate;
-            j2d_mlib_ImageConvMxN;
-            j2d_mlib_ImageAffine;
-            j2d_mlib_ImageConvKernelConvert;
-	local:
-	    *;
-};
--- a/make/mapfiles/libnet/mapfile-vers	Thu Apr 05 11:18:39 2018 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,119 +0,0 @@
-#
-# Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.  Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Define public interface.
-
-SUNWprivate_1.1 {
-	global:
-		JNI_OnLoad;
-		Java_java_net_PlainDatagramSocketImpl_dataAvailable;
-		Java_java_net_PlainSocketImpl_socketListen;
-		Java_java_net_PlainDatagramSocketImpl_getTTL;
-		Java_java_net_PlainDatagramSocketImpl_init;
-		Java_java_net_SocketOutputStream_socketWrite0;
-		Java_java_net_PlainSocketImpl_socketCreate;
-		Java_java_net_PlainSocketImpl_socketAvailable;
-		Java_java_net_PlainDatagramSocketImpl_join;
-		Java_java_net_PlainDatagramSocketImpl_socketGetOption;
-		Java_java_net_InetAddress_init;
-		Java_java_net_Inet4Address_init;
-		Java_java_net_Inet6Address_init;
-		Java_java_net_PlainDatagramSocketImpl_setTTL;
-		Java_java_net_PlainDatagramSocketImpl_socketSetOption0;
-		Java_java_net_PlainDatagramSocketImpl_bind0;
-		Java_java_net_PlainSocketImpl_socketAccept;
-		Java_java_net_DatagramPacket_init;
-		Java_java_net_PlainDatagramSocketImpl_leave;
-		Java_java_net_SocketInputStream_socketRead0;
-		Java_java_net_InetAddressImplFactory_isIPv6Supported;
-		Java_java_net_Inet4AddressImpl_getLocalHostName;
-		Java_java_net_Inet4AddressImpl_lookupAllHostAddr;
-		Java_java_net_Inet4AddressImpl_getHostByAddr;
-		Java_java_net_Inet4AddressImpl_isReachable0;
-		Java_java_net_Inet6AddressImpl_getLocalHostName;
-		Java_java_net_Inet6AddressImpl_lookupAllHostAddr;
-		Java_java_net_Inet6AddressImpl_getHostByAddr;
-		Java_java_net_Inet6AddressImpl_isReachable0;
-		Java_java_net_NetworkInterface_init;
-		Java_java_net_NetworkInterface_getByName0;
-		Java_java_net_NetworkInterface_getByIndex0;
-		Java_java_net_NetworkInterface_getByInetAddress0;
-		Java_java_net_NetworkInterface_getAll;
-		Java_java_net_NetworkInterface_isUp0;
-		Java_java_net_NetworkInterface_isLoopback0;
-		Java_java_net_NetworkInterface_isP2P0;
-		Java_java_net_NetworkInterface_supportsMulticast0;
-		Java_java_net_NetworkInterface_getMacAddr0;
-		Java_java_net_NetworkInterface_getMTU0;
-		Java_java_net_PlainDatagramSocketImpl_send;
-		Java_java_net_PlainSocketImpl_socketClose0;
-		Java_java_net_SocketOutputStream_init;
-		Java_java_net_PlainDatagramSocketImpl_peek;
-		Java_java_net_PlainDatagramSocketImpl_peekData;
-		Java_java_net_PlainSocketImpl_socketSetOption0;
-		Java_java_net_PlainSocketImpl_socketSendUrgentData;
-		Java_java_net_PlainDatagramSocketImpl_datagramSocketCreate;
-		Java_java_net_PlainSocketImpl_socketGetOption;
-		Java_java_net_PlainDatagramSocketImpl_receive0;
-		Java_java_net_PlainDatagramSocketImpl_connect0;
-		Java_java_net_PlainDatagramSocketImpl_disconnect0;
-		Java_java_net_PlainDatagramSocketImpl_datagramSocketClose;
-		Java_java_net_PlainSocketImpl_initProto;
-		Java_java_net_PlainSocketImpl_socketBind;
-		Java_java_net_PlainSocketImpl_socketShutdown;
-		Java_java_net_SocketInputStream_init;
-		Java_java_net_PlainSocketImpl_socketConnect;
-		Java_java_net_PlainDatagramSocketImpl_getTimeToLive;
-		Java_java_net_PlainDatagramSocketImpl_setTimeToLive;
-                Java_java_net_AbstractPlainSocketImpl_isReusePortAvailable0;
-                Java_java_net_AbstractPlainDatagramSocketImpl_isReusePortAvailable0;
-                Java_java_net_SocketCleanable_cleanupClose0;
-                Java_jdk_net_Sockets_isReusePortAvailable0;
-		Java_sun_net_PortConfig_getUpper0;
-		Java_sun_net_PortConfig_getLower0;
-		Java_sun_net_dns_ResolverConfigurationImpl_localDomain0;
-		Java_sun_net_dns_ResolverConfigurationImpl_fallbackDomain0;
-		Java_sun_net_sdp_SdpSupport_convert0;
-		Java_sun_net_sdp_SdpSupport_create0;
-		Java_sun_net_spi_DefaultProxySelector_init;
-		Java_sun_net_spi_DefaultProxySelector_getSystemProxies;
-		NET_SockaddrToInetAddress;
-                NET_SockaddrEqualsInetAddress;
-		NET_InetAddressToSockaddr;
-		NET_GetPortFromSockaddr;
-		NET_SetSockOpt;
-		NET_GetSockOpt;
-		NET_Bind;
-		NET_MapSocketOption;
-		NET_Wait;
-		NET_EnableFastTcpLoopback;
-		NET_ThrowNew;
-                ipv6_available;
-                reuseport_available;
-                initInetAddressIDs;
-
-	local:
-		*;
-};
--- a/make/mapfiles/libnio/mapfile-aix	Thu Apr 05 11:18:39 2018 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,33 +0,0 @@
-#
-# Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.  Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# TODO: implement for AIX
-
-SUNWprivate_1.1 {
-	global:
-
-	local:
-		*;
-};
--- a/make/mapfiles/libnio/mapfile-linux	Thu Apr 05 11:18:39 2018 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,198 +0,0 @@
-#
-# Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.  Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-SUNWprivate_1.1 {
-	global:
-                JNI_OnLoad;
-                Java_java_nio_MappedByteBuffer_force0;
-                Java_java_nio_MappedByteBuffer_isLoaded0;
-                Java_java_nio_MappedByteBuffer_load0;
-                Java_sun_nio_ch_DatagramChannelImpl_disconnect0;
-                Java_sun_nio_ch_DatagramChannelImpl_initIDs;
-                Java_sun_nio_ch_DatagramChannelImpl_receive0;
-                Java_sun_nio_ch_DatagramChannelImpl_send0;
-                Java_sun_nio_ch_DatagramDispatcher_read0;
-                Java_sun_nio_ch_DatagramDispatcher_readv0;
-                Java_sun_nio_ch_DatagramDispatcher_write0;
-                Java_sun_nio_ch_DatagramDispatcher_writev0;
-		Java_sun_nio_ch_EPoll_eventSize;
-		Java_sun_nio_ch_EPoll_eventsOffset;
-		Java_sun_nio_ch_EPoll_dataOffset;
-		Java_sun_nio_ch_EPoll_create;
-		Java_sun_nio_ch_EPoll_ctl;
-		Java_sun_nio_ch_EPoll_wait;
-                Java_sun_nio_ch_FileChannelImpl_initIDs;
-                Java_sun_nio_ch_FileChannelImpl_map0;
-                Java_sun_nio_ch_FileChannelImpl_position0;
-                Java_sun_nio_ch_FileChannelImpl_transferTo0;
-                Java_sun_nio_ch_FileChannelImpl_unmap0;
-		Java_sun_nio_ch_FileDispatcherImpl_allocate0;
-                Java_sun_nio_ch_FileDispatcherImpl_close0;
-                Java_sun_nio_ch_FileDispatcherImpl_closeIntFD;
-		Java_sun_nio_ch_FileDispatcherImpl_force0;
-                Java_sun_nio_ch_FileDispatcherImpl_init;
-		Java_sun_nio_ch_FileDispatcherImpl_lock0;
-                Java_sun_nio_ch_FileDispatcherImpl_preClose0;
-                Java_sun_nio_ch_FileDispatcherImpl_pread0;
-                Java_sun_nio_ch_FileDispatcherImpl_pwrite0;
-                Java_sun_nio_ch_FileDispatcherImpl_read0;
-                Java_sun_nio_ch_FileDispatcherImpl_readv0;
-		Java_sun_nio_ch_FileDispatcherImpl_release0;
-		Java_sun_nio_ch_FileDispatcherImpl_size0;
-		Java_sun_nio_ch_FileDispatcherImpl_truncate0;
-                Java_sun_nio_ch_FileDispatcherImpl_write0;
-                Java_sun_nio_ch_FileDispatcherImpl_writev0;
-                Java_sun_nio_ch_FileDispatcherImpl_setDirect0;
-                Java_sun_nio_ch_FileKey_init;
-                Java_sun_nio_ch_FileKey_initIDs;
-		Java_sun_nio_ch_InheritedChannel_close0;
-		Java_sun_nio_ch_InheritedChannel_dup;
-		Java_sun_nio_ch_InheritedChannel_dup2;
-		Java_sun_nio_ch_InheritedChannel_initIDs;
-		Java_sun_nio_ch_InheritedChannel_open0;
-		Java_sun_nio_ch_InheritedChannel_peerAddress0;
-		Java_sun_nio_ch_InheritedChannel_peerPort0;
-		Java_sun_nio_ch_InheritedChannel_soType0;
-                Java_sun_nio_ch_IOUtil_configureBlocking;
-                Java_sun_nio_ch_IOUtil_drain;
-                Java_sun_nio_ch_IOUtil_fdVal;
-		Java_sun_nio_ch_IOUtil_fdLimit;
-                Java_sun_nio_ch_IOUtil_initIDs;
-		Java_sun_nio_ch_IOUtil_iovMax;
-                Java_sun_nio_ch_IOUtil_makePipe;
-                Java_sun_nio_ch_IOUtil_randomBytes;
-                Java_sun_nio_ch_IOUtil_setfdVal;
-                Java_sun_nio_ch_IOUtil_write1;
-		Java_sun_nio_ch_NativeThread_current;
-		Java_sun_nio_ch_NativeThread_init;
-		Java_sun_nio_ch_NativeThread_signal;
-		Java_sun_nio_ch_Net_canIPv6SocketJoinIPv4Group0;
-		Java_sun_nio_ch_Net_canJoin6WithIPv4Group0;
-		Java_sun_nio_ch_Net_socket0;
-		Java_sun_nio_ch_Net_bind0;
-		Java_sun_nio_ch_Net_connect0;
-		Java_sun_nio_ch_Net_listen;
-		Java_sun_nio_ch_Net_localPort;
-		Java_sun_nio_ch_Net_localInetAddress;
-		Java_sun_nio_ch_Net_getIntOption0;
-		Java_sun_nio_ch_Net_setIntOption0;
-                Java_sun_nio_ch_Net_initIDs;
-		Java_sun_nio_ch_Net_isIPv6Available0;
-                Java_sun_nio_ch_Net_isReusePortAvailable0;
-		Java_sun_nio_ch_Net_joinOrDrop4;
-		Java_sun_nio_ch_Net_blockOrUnblock4;
-		Java_sun_nio_ch_Net_joinOrDrop6;
-		Java_sun_nio_ch_Net_blockOrUnblock6;
-		Java_sun_nio_ch_Net_setInterface4;
-		Java_sun_nio_ch_Net_getInterface4;
-		Java_sun_nio_ch_Net_setInterface6;
-		Java_sun_nio_ch_Net_getInterface6;
-		Java_sun_nio_ch_Net_shutdown;
-		Java_sun_nio_ch_Net_poll;
-		Java_sun_nio_ch_Net_pollinValue;
-		Java_sun_nio_ch_Net_polloutValue;
-		Java_sun_nio_ch_Net_pollerrValue;
-		Java_sun_nio_ch_Net_pollhupValue;
-		Java_sun_nio_ch_Net_pollnvalValue;
-		Java_sun_nio_ch_Net_pollconnValue;
-                Java_sun_nio_ch_Net_isExclusiveBindAvailable;
-                Java_sun_nio_ch_PollArrayWrapper_interrupt;
-                Java_sun_nio_ch_PollArrayWrapper_poll0;
-                Java_sun_nio_ch_ServerSocketChannelImpl_accept0;
-                Java_sun_nio_ch_ServerSocketChannelImpl_initIDs;
-                Java_sun_nio_ch_SocketChannelImpl_checkConnect;
-		Java_sun_nio_ch_SocketChannelImpl_sendOutOfBandData;
-		Java_sun_nio_ch_UnixAsynchronousServerSocketChannelImpl_accept0;
-		Java_sun_nio_ch_UnixAsynchronousServerSocketChannelImpl_initIDs;
-		Java_sun_nio_ch_UnixAsynchronousSocketChannelImpl_checkConnect;
-		Java_sun_nio_fs_LinuxWatchService_eventSize;
-		Java_sun_nio_fs_LinuxWatchService_eventOffsets;
-		Java_sun_nio_fs_LinuxWatchService_inotifyInit;
-		Java_sun_nio_fs_LinuxWatchService_inotifyAddWatch;
-		Java_sun_nio_fs_LinuxWatchService_inotifyRmWatch;
-		Java_sun_nio_fs_LinuxWatchService_configureBlocking;
-		Java_sun_nio_fs_LinuxWatchService_socketpair;
-		Java_sun_nio_fs_LinuxWatchService_poll;
-		Java_sun_nio_fs_LinuxNativeDispatcher_init;
-		Java_sun_nio_fs_LinuxNativeDispatcher_fgetxattr0;
-		Java_sun_nio_fs_LinuxNativeDispatcher_flistxattr;
-		Java_sun_nio_fs_LinuxNativeDispatcher_fsetxattr0;
-		Java_sun_nio_fs_LinuxNativeDispatcher_fremovexattr0;
-		Java_sun_nio_fs_LinuxNativeDispatcher_setmntent0;
-                Java_sun_nio_fs_LinuxNativeDispatcher_getmntent;
-		Java_sun_nio_fs_LinuxNativeDispatcher_endmntent;
-		Java_sun_nio_fs_UnixNativeDispatcher_init;
-		Java_sun_nio_fs_UnixNativeDispatcher_getcwd;
-		Java_sun_nio_fs_UnixNativeDispatcher_strerror;
-		Java_sun_nio_fs_UnixNativeDispatcher_dup;
-		Java_sun_nio_fs_UnixNativeDispatcher_access0;
-		Java_sun_nio_fs_UnixNativeDispatcher_exists0;
-		Java_sun_nio_fs_UnixNativeDispatcher_stat0;
-		Java_sun_nio_fs_UnixNativeDispatcher_stat1;
-		Java_sun_nio_fs_UnixNativeDispatcher_lstat0;
-		Java_sun_nio_fs_UnixNativeDispatcher_fstat;
-		Java_sun_nio_fs_UnixNativeDispatcher_fstatat0;
-		Java_sun_nio_fs_UnixNativeDispatcher_chmod0;
-		Java_sun_nio_fs_UnixNativeDispatcher_fchmod;
-		Java_sun_nio_fs_UnixNativeDispatcher_chown0;
-		Java_sun_nio_fs_UnixNativeDispatcher_lchown0;
-		Java_sun_nio_fs_UnixNativeDispatcher_fchown;
-		Java_sun_nio_fs_UnixNativeDispatcher_utimes0;
-		Java_sun_nio_fs_UnixNativeDispatcher_futimes;
-		Java_sun_nio_fs_UnixNativeDispatcher_open0;
-		Java_sun_nio_fs_UnixNativeDispatcher_openat0;
-		Java_sun_nio_fs_UnixNativeDispatcher_close0;
-		Java_sun_nio_fs_UnixNativeDispatcher_read;
-		Java_sun_nio_fs_UnixNativeDispatcher_write;
-		Java_sun_nio_fs_UnixNativeDispatcher_fopen0;
-		Java_sun_nio_fs_UnixNativeDispatcher_fclose;
-		Java_sun_nio_fs_UnixNativeDispatcher_opendir0;
-		Java_sun_nio_fs_UnixNativeDispatcher_fdopendir;
-		Java_sun_nio_fs_UnixNativeDispatcher_readdir;
-		Java_sun_nio_fs_UnixNativeDispatcher_closedir;
-		Java_sun_nio_fs_UnixNativeDispatcher_link0;
-		Java_sun_nio_fs_UnixNativeDispatcher_unlink0;
-		Java_sun_nio_fs_UnixNativeDispatcher_unlinkat0;
-		Java_sun_nio_fs_UnixNativeDispatcher_rename0;
-		Java_sun_nio_fs_UnixNativeDispatcher_renameat0;
-		Java_sun_nio_fs_UnixNativeDispatcher_mkdir0;
-		Java_sun_nio_fs_UnixNativeDispatcher_rmdir0;
-		Java_sun_nio_fs_UnixNativeDispatcher_symlink0;
-		Java_sun_nio_fs_UnixNativeDispatcher_readlink0;
-		Java_sun_nio_fs_UnixNativeDispatcher_realpath0;
-		Java_sun_nio_fs_UnixNativeDispatcher_statvfs0;
-		Java_sun_nio_fs_UnixNativeDispatcher_pathconf0;
-		Java_sun_nio_fs_UnixNativeDispatcher_fpathconf;
-		Java_sun_nio_fs_UnixNativeDispatcher_mknod0;
-		Java_sun_nio_fs_UnixNativeDispatcher_getpwuid;
-		Java_sun_nio_fs_UnixNativeDispatcher_getgrgid;
-		Java_sun_nio_fs_UnixNativeDispatcher_getpwnam0;
-		Java_sun_nio_fs_UnixNativeDispatcher_getgrnam0;
-		Java_sun_nio_fs_UnixCopyFile_transfer;
-		handleSocketError;
-
-	local:
-		*;
-};
--- a/make/mapfiles/libnio/mapfile-macosx	Thu Apr 05 11:18:39 2018 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,186 +0,0 @@
-#
-# Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.  Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-SUNWprivate_1.1 {
-	global:
-                JNI_OnLoad;
-                Java_java_nio_MappedByteBuffer_force0;
-                Java_java_nio_MappedByteBuffer_isLoaded0;
-                Java_java_nio_MappedByteBuffer_load0;
-                Java_sun_nio_ch_DatagramChannelImpl_disconnect0;
-                Java_sun_nio_ch_DatagramChannelImpl_initIDs;
-                Java_sun_nio_ch_DatagramChannelImpl_receive0;
-                Java_sun_nio_ch_DatagramChannelImpl_send0;
-                Java_sun_nio_ch_DatagramDispatcher_read0;
-                Java_sun_nio_ch_DatagramDispatcher_readv0;
-                Java_sun_nio_ch_DatagramDispatcher_write0;
-                Java_sun_nio_ch_DatagramDispatcher_writev0;
-                Java_sun_nio_ch_FileChannelImpl_initIDs;
-                Java_sun_nio_ch_FileChannelImpl_map0;
-                Java_sun_nio_ch_FileChannelImpl_position0;
-                Java_sun_nio_ch_FileChannelImpl_transferTo0;
-                Java_sun_nio_ch_FileChannelImpl_unmap0;
-	        Java_sun_nio_ch_FileDispatcherImpl_allocate0;
-                Java_sun_nio_ch_FileDispatcherImpl_close0;
-                Java_sun_nio_ch_FileDispatcherImpl_closeIntFD;
-		Java_sun_nio_ch_FileDispatcherImpl_force0;
-                Java_sun_nio_ch_FileDispatcherImpl_init;
-		Java_sun_nio_ch_FileDispatcherImpl_lock0;
-                Java_sun_nio_ch_FileDispatcherImpl_preClose0;
-                Java_sun_nio_ch_FileDispatcherImpl_pread0;
-                Java_sun_nio_ch_FileDispatcherImpl_pwrite0;
-                Java_sun_nio_ch_FileDispatcherImpl_read0;
-                Java_sun_nio_ch_FileDispatcherImpl_readv0;
-		Java_sun_nio_ch_FileDispatcherImpl_release0;
-		Java_sun_nio_ch_FileDispatcherImpl_size0;
-		Java_sun_nio_ch_FileDispatcherImpl_truncate0;
-                Java_sun_nio_ch_FileDispatcherImpl_write0;
-                Java_sun_nio_ch_FileDispatcherImpl_writev0;
-                Java_sun_nio_ch_FileKey_init;
-                Java_sun_nio_ch_FileKey_initIDs;
-		Java_sun_nio_ch_InheritedChannel_close0;
-		Java_sun_nio_ch_InheritedChannel_dup;
-		Java_sun_nio_ch_InheritedChannel_dup2;
-                Java_sun_nio_ch_InheritedChannel_initIDs;
-		Java_sun_nio_ch_InheritedChannel_open0;
-		Java_sun_nio_ch_InheritedChannel_peerAddress0;
-		Java_sun_nio_ch_InheritedChannel_peerPort0;
-		Java_sun_nio_ch_InheritedChannel_soType0;
-                Java_sun_nio_ch_IOUtil_configureBlocking;
-                Java_sun_nio_ch_IOUtil_drain;
-                Java_sun_nio_ch_IOUtil_fdVal;
-                Java_sun_nio_ch_IOUtil_fdLimit;
-                Java_sun_nio_ch_IOUtil_initIDs;
-                Java_sun_nio_ch_IOUtil_iovMax;
-                Java_sun_nio_ch_IOUtil_makePipe;
-                Java_sun_nio_ch_IOUtil_randomBytes;
-                Java_sun_nio_ch_IOUtil_setfdVal;
-                Java_sun_nio_ch_IOUtil_write1;
-                Java_sun_nio_ch_KQueue_create;
-                Java_sun_nio_ch_KQueue_register;
-                Java_sun_nio_ch_KQueue_poll;
-                Java_sun_nio_ch_KQueue_keventSize;
-                Java_sun_nio_ch_KQueue_identOffset;
-                Java_sun_nio_ch_KQueue_filterOffset;
-                Java_sun_nio_ch_KQueue_flagsOffset;
-                Java_sun_nio_ch_NativeThread_current;
-                Java_sun_nio_ch_NativeThread_init;
-                Java_sun_nio_ch_NativeThread_signal;
-                Java_sun_nio_ch_Net_canIPv6SocketJoinIPv4Group0;
-                Java_sun_nio_ch_Net_canJoin6WithIPv4Group0;
-                Java_sun_nio_ch_Net_socket0;
-                Java_sun_nio_ch_Net_bind0;
-                Java_sun_nio_ch_Net_connect0;
-                Java_sun_nio_ch_Net_listen;
-                Java_sun_nio_ch_Net_localPort;
-                Java_sun_nio_ch_Net_localInetAddress;
-                Java_sun_nio_ch_Net_getIntOption0;
-                Java_sun_nio_ch_Net_setIntOption0;
-                Java_sun_nio_ch_Net_initIDs;
-		Java_sun_nio_ch_Net_isIPv6Available0;
-                Java_sun_nio_ch_Net_isReusePortAvailable0;
-                Java_sun_nio_ch_Net_joinOrDrop4;
-                Java_sun_nio_ch_Net_blockOrUnblock4;
-                Java_sun_nio_ch_Net_joinOrDrop6;
-                Java_sun_nio_ch_Net_blockOrUnblock6;
-                Java_sun_nio_ch_Net_setInterface4;
-                Java_sun_nio_ch_Net_getInterface4;
-                Java_sun_nio_ch_Net_setInterface6;
-                Java_sun_nio_ch_Net_getInterface6;
-                Java_sun_nio_ch_Net_shutdown;
-                Java_sun_nio_ch_Net_poll;
-                Java_sun_nio_ch_Net_pollinValue;
-                Java_sun_nio_ch_Net_polloutValue;
-                Java_sun_nio_ch_Net_pollerrValue;
-                Java_sun_nio_ch_Net_pollhupValue;
-                Java_sun_nio_ch_Net_pollnvalValue;
-                Java_sun_nio_ch_Net_pollconnValue;
-                Java_sun_nio_ch_Net_isExclusiveBindAvailable;
-                Java_sun_nio_ch_PollArrayWrapper_interrupt;
-                Java_sun_nio_ch_PollArrayWrapper_poll0;
-                Java_sun_nio_ch_ServerSocketChannelImpl_accept0;
-                Java_sun_nio_ch_ServerSocketChannelImpl_initIDs;
-                Java_sun_nio_ch_SocketChannelImpl_checkConnect;
-                Java_sun_nio_ch_SocketChannelImpl_sendOutOfBandData;
-                Java_sun_nio_ch_UnixAsynchronousServerSocketChannelImpl_accept0;
-                Java_sun_nio_ch_UnixAsynchronousServerSocketChannelImpl_initIDs;
-                Java_sun_nio_ch_UnixAsynchronousSocketChannelImpl_checkConnect;
-                Java_sun_nio_fs_BsdNativeDispatcher_initIDs;
-                Java_sun_nio_fs_BsdNativeDispatcher_getfsstat;
-                Java_sun_nio_fs_BsdNativeDispatcher_fsstatEntry;
-                Java_sun_nio_fs_BsdNativeDispatcher_endfsstat;
-                Java_sun_nio_fs_UnixNativeDispatcher_init;
-                Java_sun_nio_fs_UnixNativeDispatcher_getcwd;
-                Java_sun_nio_fs_UnixNativeDispatcher_strerror;
-                Java_sun_nio_fs_UnixNativeDispatcher_dup;
-                Java_sun_nio_fs_UnixNativeDispatcher_access0;
-                Java_sun_nio_fs_UnixNativeDispatcher_exists0;
-                Java_sun_nio_fs_UnixNativeDispatcher_stat0;
-                Java_sun_nio_fs_UnixNativeDispatcher_stat1;
-                Java_sun_nio_fs_UnixNativeDispatcher_lstat0;
-                Java_sun_nio_fs_UnixNativeDispatcher_fstat;
-                Java_sun_nio_fs_UnixNativeDispatcher_fstatat0;
-                Java_sun_nio_fs_UnixNativeDispatcher_chmod0;
-                Java_sun_nio_fs_UnixNativeDispatcher_fchmod;
-                Java_sun_nio_fs_UnixNativeDispatcher_chown0;
-                Java_sun_nio_fs_UnixNativeDispatcher_lchown0;
-                Java_sun_nio_fs_UnixNativeDispatcher_fchown;
-                Java_sun_nio_fs_UnixNativeDispatcher_utimes0;
-                Java_sun_nio_fs_UnixNativeDispatcher_futimes;
-                Java_sun_nio_fs_UnixNativeDispatcher_open0;
-                Java_sun_nio_fs_UnixNativeDispatcher_openat0;
-                Java_sun_nio_fs_UnixNativeDispatcher_close0;
-                Java_sun_nio_fs_UnixNativeDispatcher_read;
-                Java_sun_nio_fs_UnixNativeDispatcher_write;
-                Java_sun_nio_fs_UnixNativeDispatcher_fopen0;
-                Java_sun_nio_fs_UnixNativeDispatcher_fclose;
-                Java_sun_nio_fs_UnixNativeDispatcher_opendir0;
-                Java_sun_nio_fs_UnixNativeDispatcher_fdopendir;
-                Java_sun_nio_fs_UnixNativeDispatcher_readdir;
-                Java_sun_nio_fs_UnixNativeDispatcher_closedir;
-                Java_sun_nio_fs_UnixNativeDispatcher_link0;
-                Java_sun_nio_fs_UnixNativeDispatcher_unlink0;
-                Java_sun_nio_fs_UnixNativeDispatcher_unlinkat0;
-                Java_sun_nio_fs_UnixNativeDispatcher_rename0;
-                Java_sun_nio_fs_UnixNativeDispatcher_renameat0;
-                Java_sun_nio_fs_UnixNativeDispatcher_mkdir0;
-                Java_sun_nio_fs_UnixNativeDispatcher_rmdir0;
-                Java_sun_nio_fs_UnixNativeDispatcher_symlink0;
-                Java_sun_nio_fs_UnixNativeDispatcher_readlink0;
-                Java_sun_nio_fs_UnixNativeDispatcher_realpath0;
-                Java_sun_nio_fs_UnixNativeDispatcher_statvfs0;
-                Java_sun_nio_fs_UnixNativeDispatcher_pathconf0;
-                Java_sun_nio_fs_UnixNativeDispatcher_fpathconf;
-                Java_sun_nio_fs_UnixNativeDispatcher_mknod0;
-                Java_sun_nio_fs_UnixNativeDispatcher_getpwuid;
-                Java_sun_nio_fs_UnixNativeDispatcher_getgrgid;
-                Java_sun_nio_fs_UnixNativeDispatcher_getpwnam0;
-                Java_sun_nio_fs_UnixNativeDispatcher_getgrnam0;
-                Java_sun_nio_fs_UnixCopyFile_transfer;
-                handleSocketError;
-
-	local:
-		*;
-};
--- a/make/mapfiles/libnio/mapfile-solaris	Thu Apr 05 11:18:39 2018 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,196 +0,0 @@
-#
-# Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.  Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-SUNWprivate_1.1 {
-	global:
-                JNI_OnLoad;
-                Java_java_nio_MappedByteBuffer_force0;
-                Java_java_nio_MappedByteBuffer_isLoaded0;
-                Java_java_nio_MappedByteBuffer_load0;
-                Java_sun_nio_ch_DatagramChannelImpl_disconnect0;
-                Java_sun_nio_ch_DatagramChannelImpl_initIDs;
-                Java_sun_nio_ch_DatagramChannelImpl_receive0;
-                Java_sun_nio_ch_DatagramChannelImpl_send0;
-                Java_sun_nio_ch_DatagramDispatcher_read0;
-                Java_sun_nio_ch_DatagramDispatcher_readv0;
-                Java_sun_nio_ch_DatagramDispatcher_write0;
-                Java_sun_nio_ch_DatagramDispatcher_writev0;
-                Java_sun_nio_ch_DevPollArrayWrapper_init;
-                Java_sun_nio_ch_DevPollArrayWrapper_poll0;
-                Java_sun_nio_ch_DevPollArrayWrapper_register;
-                Java_sun_nio_ch_DevPollArrayWrapper_registerMultiple;
-                Java_sun_nio_ch_FileChannelImpl_initIDs;
-                Java_sun_nio_ch_FileChannelImpl_map0;
-                Java_sun_nio_ch_FileChannelImpl_position0;
-                Java_sun_nio_ch_FileChannelImpl_transferTo0;
-                Java_sun_nio_ch_FileChannelImpl_unmap0;
-		Java_sun_nio_ch_FileDispatcherImpl_allocate0;
-                Java_sun_nio_ch_FileDispatcherImpl_close0;
-                Java_sun_nio_ch_FileDispatcherImpl_closeIntFD;
-		Java_sun_nio_ch_FileDispatcherImpl_force0;
-                Java_sun_nio_ch_FileDispatcherImpl_init;
-		Java_sun_nio_ch_FileDispatcherImpl_lock0;
-                Java_sun_nio_ch_FileDispatcherImpl_preClose0;
-                Java_sun_nio_ch_FileDispatcherImpl_pread0;
-                Java_sun_nio_ch_FileDispatcherImpl_pwrite0;
-                Java_sun_nio_ch_FileDispatcherImpl_read0;
-                Java_sun_nio_ch_FileDispatcherImpl_readv0;
-		Java_sun_nio_ch_FileDispatcherImpl_release0;
-		Java_sun_nio_ch_FileDispatcherImpl_size0;
-		Java_sun_nio_ch_FileDispatcherImpl_truncate0;
-                Java_sun_nio_ch_FileDispatcherImpl_write0;
-                Java_sun_nio_ch_FileDispatcherImpl_writev0;
-                Java_sun_nio_ch_FileDispatcherImpl_setDirect0;
-                Java_sun_nio_ch_FileKey_init;
-                Java_sun_nio_ch_FileKey_initIDs;
-		Java_sun_nio_ch_InheritedChannel_close0;
-		Java_sun_nio_ch_InheritedChannel_dup;
-		Java_sun_nio_ch_InheritedChannel_dup2;
-                Java_sun_nio_ch_InheritedChannel_initIDs;
-		Java_sun_nio_ch_InheritedChannel_open0;
-		Java_sun_nio_ch_InheritedChannel_peerAddress0;
-		Java_sun_nio_ch_InheritedChannel_peerPort0;
-		Java_sun_nio_ch_InheritedChannel_soType0;
-                Java_sun_nio_ch_IOUtil_configureBlocking;
-                Java_sun_nio_ch_IOUtil_drain;
-		Java_sun_nio_ch_IOUtil_fdLimit;
-                Java_sun_nio_ch_IOUtil_fdVal;
-                Java_sun_nio_ch_IOUtil_initIDs;
-		Java_sun_nio_ch_IOUtil_iovMax;
-                Java_sun_nio_ch_IOUtil_makePipe;
-                Java_sun_nio_ch_IOUtil_randomBytes;
-                Java_sun_nio_ch_IOUtil_setfdVal;
-                Java_sun_nio_ch_IOUtil_write1;
-		Java_sun_nio_ch_NativeThread_current;
-		Java_sun_nio_ch_NativeThread_init;
-		Java_sun_nio_ch_NativeThread_signal;
-		Java_sun_nio_ch_Net_canIPv6SocketJoinIPv4Group0;
-                Java_sun_nio_ch_Net_canJoin6WithIPv4Group0;
-		Java_sun_nio_ch_Net_socket0;
-		Java_sun_nio_ch_Net_bind0;
-		Java_sun_nio_ch_Net_connect0;
-		Java_sun_nio_ch_Net_listen;
-		Java_sun_nio_ch_Net_localPort;
-		Java_sun_nio_ch_Net_localInetAddress;
-		Java_sun_nio_ch_Net_getIntOption0;
-		Java_sun_nio_ch_Net_setIntOption0;
-                Java_sun_nio_ch_Net_initIDs;
-		Java_sun_nio_ch_Net_isIPv6Available0;
-                Java_sun_nio_ch_Net_isReusePortAvailable0;
-		Java_sun_nio_ch_Net_joinOrDrop4;
-		Java_sun_nio_ch_Net_blockOrUnblock4;
-		Java_sun_nio_ch_Net_joinOrDrop6;
-		Java_sun_nio_ch_Net_blockOrUnblock6;
-		Java_sun_nio_ch_Net_setInterface4;
-		Java_sun_nio_ch_Net_getInterface4;
-		Java_sun_nio_ch_Net_setInterface6;
-		Java_sun_nio_ch_Net_getInterface6;
-		Java_sun_nio_ch_Net_shutdown;
-		Java_sun_nio_ch_Net_poll;
-		Java_sun_nio_ch_Net_pollinValue;
-		Java_sun_nio_ch_Net_polloutValue;
-		Java_sun_nio_ch_Net_pollerrValue;
-		Java_sun_nio_ch_Net_pollhupValue;
-		Java_sun_nio_ch_Net_pollnvalValue;
-		Java_sun_nio_ch_Net_pollconnValue;
-                Java_sun_nio_ch_Net_isExclusiveBindAvailable;
-                Java_sun_nio_ch_PollArrayWrapper_interrupt;
-                Java_sun_nio_ch_PollArrayWrapper_poll0;
-                Java_sun_nio_ch_ServerSocketChannelImpl_accept0;
-                Java_sun_nio_ch_ServerSocketChannelImpl_initIDs;
-                Java_sun_nio_ch_SocketChannelImpl_checkConnect;
-		Java_sun_nio_ch_SocketChannelImpl_sendOutOfBandData;
-		Java_sun_nio_ch_UnixAsynchronousServerSocketChannelImpl_accept0;
-		Java_sun_nio_ch_UnixAsynchronousServerSocketChannelImpl_initIDs;
-		Java_sun_nio_ch_UnixAsynchronousSocketChannelImpl_checkConnect;
-		Java_sun_nio_ch_SolarisEventPort_port_1create;
-		Java_sun_nio_ch_SolarisEventPort_port_1close;
-		Java_sun_nio_ch_SolarisEventPort_port_1associate;
-		Java_sun_nio_ch_SolarisEventPort_port_1dissociate;
-		Java_sun_nio_ch_SolarisEventPort_port_1get;
-		Java_sun_nio_ch_SolarisEventPort_port_1getn;
-		Java_sun_nio_ch_SolarisEventPort_port_1send;
-		Java_sun_nio_fs_UnixNativeDispatcher_init;
-		Java_sun_nio_fs_UnixNativeDispatcher_getcwd;
-		Java_sun_nio_fs_UnixNativeDispatcher_strerror;
-		Java_sun_nio_fs_UnixNativeDispatcher_dup;
-		Java_sun_nio_fs_UnixNativeDispatcher_access0;
-		Java_sun_nio_fs_UnixNativeDispatcher_exists0;
-		Java_sun_nio_fs_UnixNativeDispatcher_stat0;
-		Java_sun_nio_fs_UnixNativeDispatcher_stat1;
-		Java_sun_nio_fs_UnixNativeDispatcher_lstat0;
-		Java_sun_nio_fs_UnixNativeDispatcher_fstat;
-		Java_sun_nio_fs_UnixNativeDispatcher_fstatat0;
-		Java_sun_nio_fs_UnixNativeDispatcher_chmod0;
-		Java_sun_nio_fs_UnixNativeDispatcher_fchmod;
-		Java_sun_nio_fs_UnixNativeDispatcher_chown0;
-		Java_sun_nio_fs_UnixNativeDispatcher_lchown0;
-		Java_sun_nio_fs_UnixNativeDispatcher_fchown;
-		Java_sun_nio_fs_UnixNativeDispatcher_utimes0;
-		Java_sun_nio_fs_UnixNativeDispatcher_futimes;
-		Java_sun_nio_fs_UnixNativeDispatcher_open0;
-		Java_sun_nio_fs_UnixNativeDispatcher_openat0;
-		Java_sun_nio_fs_UnixNativeDispatcher_close0;
-		Java_sun_nio_fs_UnixNativeDispatcher_read;
-		Java_sun_nio_fs_UnixNativeDispatcher_write;
-		Java_sun_nio_fs_UnixNativeDispatcher_fopen0;
-		Java_sun_nio_fs_UnixNativeDispatcher_fclose;
-		Java_sun_nio_fs_UnixNativeDispatcher_opendir0;
-		Java_sun_nio_fs_UnixNativeDispatcher_fdopendir;
-		Java_sun_nio_fs_UnixNativeDispatcher_readdir;
-		Java_sun_nio_fs_UnixNativeDispatcher_closedir;
-		Java_sun_nio_fs_UnixNativeDispatcher_link0;
-		Java_sun_nio_fs_UnixNativeDispatcher_unlink0;
-		Java_sun_nio_fs_UnixNativeDispatcher_unlinkat0;
-		Java_sun_nio_fs_UnixNativeDispatcher_rename0;
-		Java_sun_nio_fs_UnixNativeDispatcher_renameat0;
-		Java_sun_nio_fs_UnixNativeDispatcher_mkdir0;
-		Java_sun_nio_fs_UnixNativeDispatcher_rmdir0;
-		Java_sun_nio_fs_UnixNativeDispatcher_symlink0;
-		Java_sun_nio_fs_UnixNativeDispatcher_readlink0;
-		Java_sun_nio_fs_UnixNativeDispatcher_realpath0;
-		Java_sun_nio_fs_UnixNativeDispatcher_statvfs0;
-		Java_sun_nio_fs_UnixNativeDispatcher_pathconf0;
-		Java_sun_nio_fs_UnixNativeDispatcher_fpathconf;
-		Java_sun_nio_fs_UnixNativeDispatcher_mknod0;
-		Java_sun_nio_fs_UnixNativeDispatcher_getpwuid;
-		Java_sun_nio_fs_UnixNativeDispatcher_getgrgid;
-		Java_sun_nio_fs_UnixNativeDispatcher_getpwnam0;
-		Java_sun_nio_fs_UnixNativeDispatcher_getgrnam0;
-		Java_sun_nio_fs_UnixCopyFile_transfer;
-		Java_sun_nio_fs_SolarisNativeDispatcher_init;
-		Java_sun_nio_fs_SolarisNativeDispatcher_facl;
-		Java_sun_nio_fs_SolarisNativeDispatcher_getextmntent;
-		Java_sun_nio_fs_SolarisWatchService_init;
-		Java_sun_nio_fs_SolarisWatchService_portCreate;
-		Java_sun_nio_fs_SolarisWatchService_portAssociate;
-		Java_sun_nio_fs_SolarisWatchService_portDissociate;
-		Java_sun_nio_fs_SolarisWatchService_portSend;
-		Java_sun_nio_fs_SolarisWatchService_portGetn;
-		handleSocketError;
-
-	local:
-		*;
-};
--- a/make/mapfiles/libnio/reorder-sparc	Thu Apr 05 11:18:39 2018 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,12 +0,0 @@
-data = R0x2000;
-text = LOAD ?RXO;
-# Test Null
-# Test Exit
-# Test Hello
-# Test Sleep
-# Test IntToString
-# Test LoadToolkit
-# Test LoadFrame
-# Test LoadJFrame
-# Test JHello
-# SwingSet
--- a/make/mapfiles/libnio/reorder-sparcv9	Thu Apr 05 11:18:39 2018 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,17 +0,0 @@
-data = R0x2000;
-text = LOAD ?RXO;
-# Test Null
-# Test Exit
-# Test Hello
-# Test Sleep
-# Test IntToString
-# Test LoadToolkit
-text: .text%Java_sun_nio_ch_FileChannelImpl_initIDs;
-text: .text%Java_sun_nio_ch_FileDispatcher_initIDs;
-text: .text%Java_sun_nio_ch_IOUtil_initIDs;
-text: .text%Java_sun_nio_ch_FileDispatcher_read0;
-text: .text%convertReturnVal;
-# Test LoadFrame
-# Test LoadJFrame
-# Test JHello
-# SwingSet
--- a/make/mapfiles/libnio/reorder-x86	Thu Apr 05 11:18:39 2018 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,17 +0,0 @@
-data = R0x2000;
-text = LOAD ?RXO;
-# Test Null
-# Test Exit
-# Test Hello
-# Test Sleep
-# Test IntToString
-# Test LoadToolkit
-text: .text%Java_sun_nio_ch_FileChannelImpl_initIDs;
-text: .text%Java_sun_nio_ch_FileDispatcher_initIDs;
-text: .text%Java_sun_nio_ch_IOUtil_initIDs;
-text: .text%Java_sun_nio_ch_FileDispatcher_read0;
-text: .text%convertReturnVal;
-# Test LoadFrame
-# Test LoadJFrame
-# Test JHello
-# SwingSet
--- a/make/mapfiles/libprefs/mapfile-vers	Thu Apr 05 11:18:39 2018 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,36 +0,0 @@
-#
-# Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.  Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Define public interface.
-
-SUNWprivate_1.1 {
-	global:
-		Java_java_util_prefs_FileSystemPreferences_chmod;
-		Java_java_util_prefs_FileSystemPreferences_lockFile0;
-		Java_java_util_prefs_FileSystemPreferences_unlockFile0;
-
-	local:
-		*;
-};
--- a/make/mapfiles/librmi/mapfile-vers	Thu Apr 05 11:18:39 2018 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,31 +0,0 @@
-#
-# Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.  Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-SUNWprivate_1.1 {
-	global:
-	    Java_sun_rmi_transport_GC_maxObjectInspectionAge;
-	local:
-	    *;
-};
--- a/make/mapfiles/libsaproc/mapfile-linux	Thu Apr 05 11:18:39 2018 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,63 +0,0 @@
-#
-# Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#  
-
-# Define public interface.
-
-SUNWprivate_1.1 {
-        global:
-
-		# native methods of LinuxDebuggerLocal class
-		Java_sun_jvm_hotspot_debugger_linux_LinuxDebuggerLocal_init0;
-		Java_sun_jvm_hotspot_debugger_linux_LinuxDebuggerLocal_getAddressSize;
-		Java_sun_jvm_hotspot_debugger_linux_LinuxDebuggerLocal_attach0__I;
-		Java_sun_jvm_hotspot_debugger_linux_LinuxDebuggerLocal_attach0__Ljava_lang_String_2Ljava_lang_String_2;
-		Java_sun_jvm_hotspot_debugger_linux_LinuxDebuggerLocal_detach0;
-		Java_sun_jvm_hotspot_debugger_linux_LinuxDebuggerLocal_lookupByName0;
-		Java_sun_jvm_hotspot_debugger_linux_LinuxDebuggerLocal_lookupByAddress0;
-		Java_sun_jvm_hotspot_debugger_linux_LinuxDebuggerLocal_readBytesFromProcess0;
-		Java_sun_jvm_hotspot_debugger_linux_LinuxDebuggerLocal_getThreadIntegerRegisterSet0;
-	
-                # Disassembler interface
-                Java_sun_jvm_hotspot_asm_Disassembler_decode;
-                Java_sun_jvm_hotspot_asm_Disassembler_load_1library;
-
-		# proc_service.h functions - to be used by libthread_db
-		ps_getpid;
-		ps_pglobal_lookup;
-		ps_pdread;
-		ps_pdwrite;
-		ps_lsetfpregs;
-		ps_lsetregs;
-		ps_lgetfpregs;
-		ps_lgetregs;
-		ps_get_thread_area;
-
-                # used by attach test program
-                init_libproc;
-                Pgrab;
-                Pgrab_core;
-                Prelease;
-	
-	local:
-		*;
-};
--- a/make/mapfiles/libsaproc/mapfile-macosx	Thu Apr 05 11:18:39 2018 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,66 +0,0 @@
-#
-
-#
-# Copyright (c) 2003, 2006, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#  
-#
-
-# Define public interface.
-
-SUNWprivate_1.1 {
-        global:
-
-		# native methods of BsdDebuggerLocal class
-		Java_sun_jvm_hotspot_debugger_bsd_BsdDebuggerLocal_init0;
-		Java_sun_jvm_hotspot_debugger_bsd_BsdDebuggerLocal_getAddressSize;
-		Java_sun_jvm_hotspot_debugger_bsd_BsdDebuggerLocal_attach0__I;
-		Java_sun_jvm_hotspot_debugger_bsd_BsdDebuggerLocal_attach0__Ljava_lang_String_2Ljava_lang_String_2;
-		Java_sun_jvm_hotspot_debugger_bsd_BsdDebuggerLocal_detach0;
-		Java_sun_jvm_hotspot_debugger_bsd_BsdDebuggerLocal_lookupByName0;
-		Java_sun_jvm_hotspot_debugger_bsd_BsdDebuggerLocal_lookupByAddress0;
-		Java_sun_jvm_hotspot_debugger_bsd_BsdDebuggerLocal_readBytesFromProcess0;
-		Java_sun_jvm_hotspot_debugger_bsd_BsdDebuggerLocal_getThreadIntegerRegisterSet0;
-	
-		# proc_service.h functions - to be used by libthread_db
-		ps_getpid;
-		ps_pglobal_lookup;
-		ps_pread;
-		ps_pwrite;
-		ps_lsetfpregs;
-		ps_lsetregs;
-		ps_lgetfpregs;
-		ps_lgetregs;
-		ps_lcontinue;
-		ps_lgetxmmregs;
-		ps_lsetxmmregs;
-		ps_lstop;
-		ps_linfo;
-
-                # used by attach test program
-                init_libproc;
-                Pgrab;
-                Pgrab_core;
-                Prelease;
-	
-	local:
-		*;
-};
--- a/make/mapfiles/libsaproc/mapfile-solaris	Thu Apr 05 11:18:39 2018 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,51 +0,0 @@
-#
-# Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#  
-
-# Define public interface.
-SUNWprivate_1.1 {
-	global:
-		Java_sun_jvm_hotspot_debugger_proc_ProcDebuggerLocal_attach0__Ljava_lang_String_2;
-		Java_sun_jvm_hotspot_debugger_proc_ProcDebuggerLocal_attach0__Ljava_lang_String_2Ljava_lang_String_2;
-		Java_sun_jvm_hotspot_debugger_proc_ProcDebuggerLocal_demangle0;
-		Java_sun_jvm_hotspot_debugger_proc_ProcDebuggerLocal_detach0;
-		Java_sun_jvm_hotspot_debugger_proc_ProcDebuggerLocal_fillCFrameList0;
-		Java_sun_jvm_hotspot_debugger_proc_ProcDebuggerLocal_fillLoadObjectList0;
-		Java_sun_jvm_hotspot_debugger_proc_ProcDebuggerLocal_fillThreadList0;
-		Java_sun_jvm_hotspot_debugger_proc_ProcDebuggerLocal_getPageSize0;
-		Java_sun_jvm_hotspot_debugger_proc_ProcDebuggerLocal_getRemoteProcessAddressSize0;
-		Java_sun_jvm_hotspot_debugger_proc_ProcDebuggerLocal_getThreadIntegerRegisterSet0;
-		Java_sun_jvm_hotspot_debugger_proc_ProcDebuggerLocal_initIDs;
-		Java_sun_jvm_hotspot_debugger_proc_ProcDebuggerLocal_lookupByAddress0;
-		Java_sun_jvm_hotspot_debugger_proc_ProcDebuggerLocal_lookupByName0;
-		Java_sun_jvm_hotspot_debugger_proc_ProcDebuggerLocal_readBytesFromProcess0;
-		Java_sun_jvm_hotspot_debugger_proc_ProcDebuggerLocal_resume0;
-		Java_sun_jvm_hotspot_debugger_proc_ProcDebuggerLocal_suspend0;
-		Java_sun_jvm_hotspot_debugger_proc_ProcDebuggerLocal_writeBytesToProcess0;
-                # this is needed by saproc_audit.c to redirect opens in libproc.so
-                libsaproc_open;
-                # Disassembler interface
-		Java_sun_jvm_hotspot_asm_Disassembler_decode;
-		Java_sun_jvm_hotspot_asm_Disassembler_load_1library;
-	local:
-	*;
-};
--- a/make/mapfiles/libsctp/mapfile-vers	Thu Apr 05 11:18:39 2018 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,55 +0,0 @@
-#
-# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.  Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-SUNWprivate_1.1 {
-	global:
-		Java_sun_nio_ch_sctp_SctpNet_init;
-		Java_sun_nio_ch_sctp_SctpNet_socket0;
-		Java_sun_nio_ch_sctp_SctpNet_bindx;
-		Java_sun_nio_ch_sctp_SctpNet_branch0;
-		Java_sun_nio_ch_sctp_SctpNet_listen0;
-		Java_sun_nio_ch_sctp_SctpNet_connect0;
-		Java_sun_nio_ch_sctp_SctpNet_close0;
-		Java_sun_nio_ch_sctp_SctpNet_preClose0;
-		Java_sun_nio_ch_sctp_SctpNet_getLocalAddresses0;
-		Java_sun_nio_ch_sctp_SctpNet_getRemoteAddresses0;
-		Java_sun_nio_ch_sctp_SctpNet_getPrimAddrOption0;
-		Java_sun_nio_ch_sctp_SctpNet_setPrimAddrOption0;
-		Java_sun_nio_ch_sctp_SctpNet_setPeerPrimAddrOption0;
-		Java_sun_nio_ch_sctp_SctpNet_getInitMsgOption0;
-		Java_sun_nio_ch_sctp_SctpNet_setInitMsgOption0;
-		Java_sun_nio_ch_sctp_SctpNet_getIntOption0;
-		Java_sun_nio_ch_sctp_SctpNet_setIntOption0;
-		Java_sun_nio_ch_sctp_SctpNet_shutdown0;
-		Java_sun_nio_ch_sctp_SctpChannelImpl_initIDs;
-		Java_sun_nio_ch_sctp_SctpChannelImpl_checkConnect;
-		Java_sun_nio_ch_sctp_SctpChannelImpl_receive0;
-		Java_sun_nio_ch_sctp_SctpChannelImpl_send0;
-		Java_sun_nio_ch_sctp_SctpServerChannelImpl_initIDs;
-		Java_sun_nio_ch_sctp_SctpServerChannelImpl_accept0;
-                JNI_OnLoad;
-	local:
-		*;
-};
--- a/make/mapfiles/libsplashscreen/mapfile-vers	Thu Apr 05 11:18:39 2018 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,50 +0,0 @@
-#
-# Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.  Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Define public interface.
-
-SUNWprivate_1.1 {
-    global:
-        Java_java_awt_SplashScreen__1update;
-        Java_java_awt_SplashScreen__1isVisible;
-        Java_java_awt_SplashScreen__1getBounds;
-        Java_java_awt_SplashScreen__1getInstance;
-        Java_java_awt_SplashScreen__1close;
-        Java_java_awt_SplashScreen__1getImageFileName;
-        Java_java_awt_SplashScreen__1getImageJarName;
-        Java_java_awt_SplashScreen__1setImageData;
-        Java_java_awt_SplashScreen__1getScaleFactor;
-
-        SplashLoadMemory;
-        SplashLoadFile;
-        SplashInit;
-        SplashClose;
-        SplashSetFileJarName;
-        SplashSetScaleFactor;
-        SplashGetScaledImageName;
-        SplashGetScaledImgNameMaxPstfixLen;
-    local:
-        *;
-};
--- a/make/mapfiles/libsunec/mapfile-vers	Thu Apr 05 11:18:39 2018 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +0,0 @@
-#
-# Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.  Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Define public interface.
-
-SUNWprivate_1.1 {
-        global:
-                Java_sun_security_ec_ECKeyPairGenerator_isCurveSupported;
-                Java_sun_security_ec_ECKeyPairGenerator_generateECKeyPair;
-                Java_sun_security_ec_ECDSASignature_signDigest;
-                Java_sun_security_ec_ECDSASignature_verifySignedDigest;
-                Java_sun_security_ec_ECDHKeyAgreement_deriveKey;
-        local:
-                *;
-};
--- a/make/mapfiles/libunpack/mapfile-vers	Thu Apr 05 11:18:39 2018 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,40 +0,0 @@
-
-#
-# Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.  Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Define library interface.
-
-SUNWprivate_1.1 {
-	global:
-	    Java_com_sun_java_util_jar_pack_NativeUnpack_finish;
-	    Java_com_sun_java_util_jar_pack_NativeUnpack_getNextFile;
-	    Java_com_sun_java_util_jar_pack_NativeUnpack_getOption;
-	    Java_com_sun_java_util_jar_pack_NativeUnpack_getUnusedInput;
-	    Java_com_sun_java_util_jar_pack_NativeUnpack_initIDs;
-	    Java_com_sun_java_util_jar_pack_NativeUnpack_setOption;
-	    Java_com_sun_java_util_jar_pack_NativeUnpack_start;
-	local:
-	    *;
-};
--- a/make/mapfiles/libverify/mapfile-vers	Thu Apr 05 11:18:39 2018 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,34 +0,0 @@
-#
-# Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.  Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-SUNWprivate_1.1 {
-   global:
-           VerifyClass;
-           VerifyClassForMajorVersion;
-           VerifyClassname;
-           VerifyFixClassname;
-   local:
-           *;
-};
--- a/make/mapfiles/libverify/reorder-sparc	Thu Apr 05 11:18:39 2018 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,44 +0,0 @@
-data = R0x2000;
-text = LOAD ?RXO;
-# Test Null
-text: .text%VerifyFixClassname;
-text: .text%VerifyClassname;
-text: .text%skip_over_fieldname: OUTPUTDIR/check_format.o;
-text: .text%VerifyClass;
-text: .text%CCinit: OUTPUTDIR/check_code.o;
-text: .text%initialize_class_hash;
-text: .text%make_class_info_from_name: OUTPUTDIR/check_code.o;
-text: .text%make_class_info: OUTPUTDIR/check_code.o;
-text: .text%verify_method: OUTPUTDIR/check_code.o;
-text: .text%instruction_length: OUTPUTDIR/check_code.o;
-text: .text%verify_opcode_operands: OUTPUTDIR/check_code.o;
-text: .text%initialize_exception_table: OUTPUTDIR/check_code.o;
-text: .text%initialize_dataflow: OUTPUTDIR/check_code.o;
-text: .text%signature_to_fieldtype: OUTPUTDIR/check_code.o;
-text: .text%check_register_values: OUTPUTDIR/check_code.o;
-text: .text%pop_stack: OUTPUTDIR/check_code.o;
-text: .text%update_registers: OUTPUTDIR/check_code.o;
-text: .text%push_stack: OUTPUTDIR/check_code.o;
-text: .text%merge_into_successors: OUTPUTDIR/check_code.o;
-text: .text%pop_and_free: OUTPUTDIR/check_code.o;
-text: .text%cp_index_to_class_fullinfo: OUTPUTDIR/check_code.o;
-text: .text%set_protected: OUTPUTDIR/check_code.o;
-text: .text%merge_into_one_successor: OUTPUTDIR/check_code.o;
-text: .text%merge_stack: OUTPUTDIR/check_code.o;
-text: .text%merge_registers: OUTPUTDIR/check_code.o;
-text: .text%finalize_class_hash: OUTPUTDIR/check_code.o;
-text: .text%CCdestroy: OUTPUTDIR/check_code.o;
-# Test Exit
-# Test Hello
-text: .text%merge_fullinfo_types: OUTPUTDIR/check_code.o;
-# Test Sleep
-# Test IntToString
-# Test LoadToolkit
-# Test LoadFrame
-text: .text%verify_constant_pool_type: OUTPUTDIR/check_code.o;
-# Test LoadJFrame
-# Test JHello
-# SwingSet
-text: .text%verify_field: OUTPUTDIR/check_code.o;
-text: .text%check_and_push: OUTPUTDIR/check_code.o;
-text: .text%signature_to_args_size: OUTPUTDIR/check_code.o;
--- a/make/mapfiles/libverify/reorder-sparcv9	Thu Apr 05 11:18:39 2018 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,45 +0,0 @@
-data = R0x2000;
-text = LOAD ?RXO;
-# Test Null
-text: .text%VerifyFixClassname;
-text: .text%next_utf2unicode: OUTPUTDIR/check_format.o;
-text: .text%VerifyClassname;
-text: .text%skip_over_fieldname: OUTPUTDIR/check_format.o;
-text: .text%VerifyClass;
-text: .text%CCinit: OUTPUTDIR/check_code.o;
-text: .text%initialize_class_hash;
-text: .text%make_class_info_from_name: OUTPUTDIR/check_code.o;
-text: .text%make_class_info: OUTPUTDIR/check_code.o;
-text: .text%verify_method: OUTPUTDIR/check_code.o;
-text: .text%instruction_length: OUTPUTDIR/check_code.o;
-text: .text%verify_opcode_operands: OUTPUTDIR/check_code.o;
-text: .text%verify_constant_pool_type: OUTPUTDIR/check_code.o;
-text: .text%cp_index_to_class_fullinfo: OUTPUTDIR/check_code.o;
-text: .text%check_and_push: OUTPUTDIR/check_code.o;
-text: .text%pop_and_free: OUTPUTDIR/check_code.o;
-text: .text%set_protected: OUTPUTDIR/check_code.o;
-text: .text%initialize_exception_table: OUTPUTDIR/check_code.o;
-text: .text%merge_fullinfo_types: OUTPUTDIR/check_code.o;
-text: .text%initialize_dataflow: OUTPUTDIR/check_code.o;
-text: .text%signature_to_fieldtype: OUTPUTDIR/check_code.o;
-text: .text%check_register_values: OUTPUTDIR/check_code.o;
-text: .text%pop_stack: OUTPUTDIR/check_code.o;
-text: .text%update_registers: OUTPUTDIR/check_code.o;
-text: .text%push_stack: OUTPUTDIR/check_code.o;
-text: .text%merge_into_successors: OUTPUTDIR/check_code.o;
-text: .text%merge_into_one_successor: OUTPUTDIR/check_code.o;
-text: .text%merge_stack: OUTPUTDIR/check_code.o;
-text: .text%merge_registers: OUTPUTDIR/check_code.o;
-text: .text%finalize_class_hash: OUTPUTDIR/check_code.o;
-text: .text%CCdestroy: OUTPUTDIR/check_code.o;
-# Test Exit
-# Test Hello
-# Test Sleep
-# Test IntToString
-# Test LoadToolkit
-# Test LoadFrame
-# Test LoadJFrame
-# Test JHello
-# SwingSet
-text: .text%verify_field: OUTPUTDIR/check_code.o;
-text: .text%signature_to_args_size: OUTPUTDIR/check_code.o;
--- a/make/mapfiles/libverify/reorder-x86	Thu Apr 05 11:18:39 2018 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,40 +0,0 @@
-data = R0x2000;
-text = LOAD ?RXO;
-# Test Null
-text: .text%VerifyFixClassname;
-text: .text%VerifyClassname;
-text: .text%skip_over_fieldname: OUTPUTDIR/check_format.o;
-text: .text%skip_over_field_signature: OUTPUTDIR/check_format.o;
-text: .text%VerifyClass;
-text: .text%make_class_info_from_name: OUTPUTDIR/check_code.o;
-text: .text%class_name_to_ID: OUTPUTDIR/check_code.o;
-text: .text%make_class_info: OUTPUTDIR/check_code.o;
-text: .text%free_block: OUTPUTDIR/check_code.o;
-text: .text%verify_method: OUTPUTDIR/check_code.o;
-text: .text%verify_opcode_operands: OUTPUTDIR/check_code.o;
-text: .text%initialize_dataflow: OUTPUTDIR/check_code.o;
-text: .text%signature_to_fieldtype: OUTPUTDIR/check_code.o;
-text: .text%check_register_values: OUTPUTDIR/check_code.o;
-text: .text%pop_stack: OUTPUTDIR/check_code.o;
-text: .text%update_registers: OUTPUTDIR/check_code.o;
-text: .text%push_stack: OUTPUTDIR/check_code.o;
-text: .text%merge_into_successors: OUTPUTDIR/check_code.o;
-text: .text%cp_index_to_class_fullinfo: OUTPUTDIR/check_code.o;
-text: .text%set_protected: OUTPUTDIR/check_code.o;
-text: .text%merge_into_one_successor: OUTPUTDIR/check_code.o;
-text: .text%merge_registers: OUTPUTDIR/check_code.o;
-# Test Exit
-# Test Hello
-text: .text%merge_fullinfo_types: OUTPUTDIR/check_code.o;
-text: .text%isAssignableTo: OUTPUTDIR/check_code.o;
-# Test Sleep
-text: .text%isLegalTarget: OUTPUTDIR/check_code.o;
-text: .text%verify_constant_pool_type: OUTPUTDIR/check_code.o;
-# Test IntToString
-# Test LoadToolkit
-# Test LoadFrame
-# Test LoadJFrame
-# Test JHello
-# SwingSet
-text: .text%copy_stack: OUTPUTDIR/check_code.o;
-text: .text%ntohl: OUTPUTDIR/check_code.o;
--- a/make/mapfiles/libzip/mapfile-vers	Thu Apr 05 11:18:39 2018 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,65 +0,0 @@
-#
-# Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.  Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Define public interface.
-
-SUNWprivate_1.1 {
-	global:
-		Java_java_util_zip_Adler32_update;
-		Java_java_util_zip_Adler32_updateBytes;
-		Java_java_util_zip_Adler32_updateByteBuffer;
-		Java_java_util_zip_CRC32_update;
-		Java_java_util_zip_CRC32_updateBytes0;
-		Java_java_util_zip_CRC32_updateByteBuffer0;
-		Java_java_util_zip_Deflater_deflateBytes;
-		Java_java_util_zip_Deflater_end;
-		Java_java_util_zip_Deflater_getAdler;
-		Java_java_util_zip_Deflater_init;
-		Java_java_util_zip_Deflater_initIDs;
-		Java_java_util_zip_Deflater_reset;
-		Java_java_util_zip_Deflater_setDictionary;
-		Java_java_util_zip_Inflater_end;
-		Java_java_util_zip_Inflater_getAdler;
-		Java_java_util_zip_Inflater_inflateBytes;
-		Java_java_util_zip_Inflater_init;
-		Java_java_util_zip_Inflater_initIDs;
-		Java_java_util_zip_Inflater_reset;
-		Java_java_util_zip_Inflater_setDictionary;
-		ZIP_Close;
-		ZIP_CRC32;
-		ZIP_FreeEntry;
-		ZIP_FindEntry;
-		ZIP_GetEntry;
-		ZIP_GetNextEntry;
-	        ZIP_InflateFully;
-		ZIP_Lock;
-		ZIP_Open;
-		ZIP_Read;
-		ZIP_ReadEntry;
-		ZIP_Unlock;
-
-	local:
-		*;
-};
--- a/make/mapfiles/libzip/reorder-sparc	Thu Apr 05 11:18:39 2018 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,29 +0,0 @@
-data = R0x2000;
-text = LOAD ?RXO;
-# Test Null
-text: .text%ZIP_Open;
-text: .text%ZIP_Open_Generic;
-text: .text%InitializeZip;
-text: .text%allocZip;
-text: .text%readCEN: OUTPUTDIR/zip_util.o;
-text: .text%findEND: OUTPUTDIR/zip_util.o;
-text: .text%hash: OUTPUTDIR/zip_util.o;
-text: .text%isMetaName: OUTPUTDIR/zip_util.o;
-text: .text%addMetaName: OUTPUTDIR/zip_util.o;
-text: .text%ZIP_FindEntry;
-text: .text%ZIP_GetEntry;
-text: .text%ZIP_InflateFully;
-text: .text%ZIP_Lock;
-text: .text%ZIP_Unlock;
-text: .text%ZIP_FreeEntry;
-text: .text%Java_java_util_zip_Inflater_initIDs;
-text: .text%Java_java_util_zip_Inflater_init;
-text: .text%inflateInit2_;
-text: .text%zcalloc;
-text: .text%Java_java_util_zip_Inflater_inflateBytes;
-text: .text%ZIP_Read;
-text: .text%zcfree;
-text: .text%Java_java_util_zip_Inflater_reset;
-text: .text%Java_java_util_zip_Inflater_end;
-text: .text%inflateEnd;
-text: .text%ZIP_Close;
--- a/make/mapfiles/libzip/reorder-sparcv9	Thu Apr 05 11:18:39 2018 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,33 +0,0 @@
-data = R0x2000;
-text = LOAD ?RXO;
-text: .text%ZIP_Open;
-text: .text%ZIP_Open_Generic;
-text: .text%InitializeZip;
-text: .text%allocZip;
-text: .text%readCEN: OUTPUTDIR/zip_util.o;
-text: .text%findEND: OUTPUTDIR/zip_util.o;
-text: .text%hash: OUTPUTDIR/zip_util.o;
-text: .text%isMetaName: OUTPUTDIR/zip_util.o;
-text: .text%addMetaName: OUTPUTDIR/zip_util.o;
-text: .text%ZIP_FindEntry;
-text: .text%ZIP_GetEntry;
-text: .text%ZIP_InflateFully;
-text: .text%ZIP_Lock;
-text: .text%ZIP_Unlock;
-text: .text%ZIP_FreeEntry;
-text: .text%Java_java_util_zip_Inflater_initIDs;
-text: .text%Java_java_util_zip_Inflater_init;
-text: .text%inflateInit2_;
-text: .text%zcalloc;
-text: .text%inflateReset;
-text: .text%Java_java_util_zip_Inflater_inflateBytes;
-text: .text%inflate;
-text: .text%ZIP_Read;
-text: .text%zcfree;
-text: .text%Java_java_util_jar_JarFile_getMetaInfEntryNames;
-text: .text%ZIP_ReadEntry;
-text: .text%InflateFully;
-text: .text%inflateEnd;
-text: .text%Java_java_util_zip_Inflater_reset;
-text: .text%ZIP_Close;
-text: .text%Java_java_util_zip_Inflater_end;
--- a/make/mapfiles/libzip/reorder-x86	Thu Apr 05 11:18:39 2018 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,31 +0,0 @@
-data = R0x2000;
-text = LOAD ?RXO;
-# Test Null
-text: .text%ZIP_Open;
-text: .text%ZIP_Open_Generic;
-text: .text%InitializeZip;
-text: .text%allocZip;
-text: .text%readCEN: OUTPUTDIR/zip_util.o;
-text: .text%findEND: OUTPUTDIR/zip_util.o;
-text: .text%hash: OUTPUTDIR/zip_util.o;
-text: .text%isMetaName: OUTPUTDIR/zip_util.o;
-text: .text%addMetaName: OUTPUTDIR/zip_util.o;
-text: .text%ZIP_FindEntry;
-text: .text%ZIP_GetEntry;
-text: .text%ZIP_InflateFully;
-text: .text%ZIP_Lock;
-text: .text%ZIP_Unlock;
-text: .text%ZIP_FreeEntry;
-text: .text%inflateInit2_;
-text: .text%zcalloc;
-text: .text%inflateReset;
-text: .text%Java_java_util_zip_Inflater_inflateBytes;
-text: .text%inflate;
-text: .text%ZIP_Read;
-text: .text%zcfree;
-text: .text%ZIP_ReadEntry;
-text: .text%InflateFully;
-text: .text%inflateEnd;
-text: .text%Java_java_util_zip_Inflater_reset;
-text: .text%ZIP_Close;
-text: .text%Java_java_util_zip_Inflater_end;
--- a/src/bsd/doc/man/ja/javah.1	Thu Apr 05 11:18:39 2018 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,24 +0,0 @@
-." Copyright (c) 1994, 2012, Oracle and/or its affiliates. All rights reserved.
-." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-."
-." This code is free software; you can redistribute it and/or modify it
-." under the terms of the GNU General Public License version 2 only, as
-." published by the Free Software Foundation.
-."
-." This code is distributed in the hope that it will be useful, but WITHOUT
-." ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-." FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-." version 2 for more details (a copy is included in the LICENSE file that
-." accompanied this code).
-."
-." You should have received a copy of the GNU General Public License version
-." 2 along with this work; if not, write to the Free Software Foundation,
-." Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-."
-." Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-." or visit www.oracle.com if you need additional information or have any
-." questions.
-."
-.TH javah 1 "07 May 2011"
-
-.LP
--- a/src/bsd/doc/man/java.1	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/bsd/doc/man/java.1	Fri Apr 06 03:53:28 2018 +0200
@@ -3713,17 +3713,6 @@
 .sp -1
 .IP \(bu 2.3
 .\}
-javah(1)
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
 jar(1)
 .RE
 .sp
--- a/src/bsd/doc/man/javac.1	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/bsd/doc/man/javac.1	Fri Apr 06 03:53:28 2018 +0200
@@ -1353,9 +1353,6 @@
 jdb(1)
 .TP 0.2i    
 \(bu
-javah(1)
-.TP 0.2i    
-\(bu
 javadoc(1)
 .TP 0.2i    
 \(bu
--- a/src/bsd/doc/man/javadoc.1	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/bsd/doc/man/javadoc.1	Fri Apr 06 03:53:28 2018 +0200
@@ -2978,9 +2978,6 @@
 jdb(1)
 .TP 0.2i    
 \(bu
-javah(1)
-.TP 0.2i    
-\(bu
 javap(1)
 .SH RELATED\ DOCUMENTS    
 .TP 0.2i    
--- a/src/bsd/doc/man/javah.1	Thu Apr 05 11:18:39 2018 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,158 +0,0 @@
-'\" t
-.\" Copyright (c) 1994, 2013, Oracle and/or its affiliates. All rights reserved.
-.\" DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-.\"
-.\" This code is free software; you can redistribute it and/or modify it
-.\" under the terms of the GNU General Public License version 2 only, as
-.\" published by the Free Software Foundation.
-.\"
-.\" This code is distributed in the hope that it will be useful, but WITHOUT
-.\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-.\" FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-.\" version 2 for more details (a copy is included in the LICENSE file that
-.\" accompanied this code).
-.\"
-.\" You should have received a copy of the GNU General Public License version
-.\" 2 along with this work; if not, write to the Free Software Foundation,
-.\" Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-.\"
-.\" Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-.\" or visit www.oracle.com if you need additional information or have any
-.\" questions.
-.\"
-.\"     Arch: generic
-.\"     Software: JDK 8
-.\"     Date: 21 November 2013
-.\"     SectDesc: Basic Tools
-.\"     Title: javah.1
-.\"
-.if n .pl 99999
-.TH javah 1 "21 November 2013" "JDK 8" "Basic Tools"
-.\" -----------------------------------------------------------------
-.\" * Define some portability stuff
-.\" -----------------------------------------------------------------
-.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-.\" http://bugs.debian.org/507673
-.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
-.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-.ie \n(.g .ds Aq \(aq
-.el       .ds Aq '
-.\" -----------------------------------------------------------------
-.\" * set default formatting
-.\" -----------------------------------------------------------------
-.\" disable hyphenation
-.nh
-.\" disable justification (adjust text to left margin only)
-.ad l
-.\" -----------------------------------------------------------------
-.\" * MAIN CONTENT STARTS HERE *
-.\" -----------------------------------------------------------------
-
-.SH NAME    
-javah \- Generates C header and source files from a Java class\&.
-.SH SYNOPSIS    
-.sp     
-.nf     
-
-\fBjavah\fR [ \fIoptions\fR ] f\fIully\-qualified\-class\-name \&.\&.\&.\fR
-.fi     
-.sp     
-.TP     
-\fIoptions\fR
-The command-line options\&. See Options\&.
-.TP     
-\fIfully-qualified-class-name\fR
-The fully qualified location of the classes to be converted to C header and source files\&.
-.SH DESCRIPTION    
-The \f3javah\fR command generates C header and source files that are needed to implement native methods\&. The generated header and source files are used by C programs to reference an object\&'s instance variables from native source code\&. The \f3\&.h\fR file contains a \f3struct\fR definition with a layout that parallels the layout of the corresponding class\&. The fields in the \f3struct\fR correspond to instance variables in the class\&.
-.PP
-The name of the header file and the structure declared within it are derived from the name of the class\&. When the class passed to the \f3javah\fR command is inside a package, the package name is added to the beginning of both the header file name and the structure name\&. Underscores (_) are used as name delimiters\&.
-.PP
-By default the \f3javah\fR command creates a header file for each class listed on the command line and puts the files in the current directory\&. Use the \f3-stubs\fR option to create source files\&. Use the \f3-o\fR option to concatenate the results for all listed classes into a single file\&.
-.PP
-The Java Native Interface (JNI) does not require header information or stub files\&. The \f3javah\fR command can still be used to generate native method function prototypes needed for JNI-style native methods\&. The \f3javah\fR command produces JNI-style output by default and places the result in the \f3\&.h\fR file\&.
-.SH OPTIONS    
-.TP
--o \fIoutputfile\fR
-.br
-Concatenates the resulting header or source files for all the classes listed on the command line into an output file\&. Only one of \f3-o\fR or \f3-d\fR can be used\&.
-.TP
--d \fIdirectory\fR
-.br
-Sets the directory where the \f3javah\fR command saves the header files or the stub files\&. Only one of \f3-d\fR or \f3-o\fR can be used\&.
-.TP
--stubs
-.br
-Causes the \f3javah\fR command to generate C declarations from the Java object file\&.
-.TP
--verbose
-.br
-Indicates verbose output and causes the \f3javah\fR command to print a message to \f3stdout\fR about the status of the generated files\&.
-.TP
--help
-.br
-Prints a help message for \f3javah\fR usage\&.
-.TP
--version
-.br
-Prints \f3javah\fR command release information\&.
-.TP
--jni
-.br
-Causes the \f3javah\fR command to create an output file containing JNI-style native method function prototypes\&. This is the default output; use of \f3-jni\fR is optional\&.
-.TP
--classpath \fIpath\fR
-.br
-Specifies the path the \f3javah\fR command uses to look up classes\&. Overrides the default or the \f3CLASSPATH\fR environment variable when it is set\&. Directories are separated by colons on Oracle Solaris and semicolons on Windows\&. The general format for path is:
-
-\fIOracle Solaris\fR:
-
-\&.:\fIyour-path\fR
-
-Example: \f3\&.:/home/avh/classes:/usr/local/java/classes\fR
-
-\fIWindows\fR:
-
-\&.;\fIyour-path\fR
-
-Example: \f3\&.;C:\eusers\edac\eclasses;C:\etools\ejava\eclasses\fR
-
-As a special convenience, a class path element that contains a base name of * is considered equivalent to specifying a list of all the files in the directory with the extension \f3\&.jar\fR or \f3\&.JAR\fR\&.
-
-For example, if directory \f3mydir\fR contains \f3a\&.jar\fR and \f3b\&.JAR\fR, then the class path element \f3mydir/*\fR is expanded to a \f3A\fR\f3\&.jar:b\&.JAR\fR, except that the order of jar files is unspecified\&. All JAR files in the specified directory, including hidden ones, are included in the list\&. A class path entry that consists of * expands to a list of all the JAR files in the current directory\&. The \f3CLASSPATH\fR environment variable, where defined, is similarly expanded\&. Any class path wild card expansion occurs before the Java Virtual Machine (JVM) is started\&. A Java program will never see unexpanded wild cards except by querying the environment\&. For example, by calling \f3System\&.getenv("CLASSPATH")\fR\&.
-.TP
--bootclasspath \fIpath\fR
-.br
-Specifies the path from which to load bootstrap classes\&. By default, the bootstrap classes are the classes that implement the core Java platform located in \f3jre\elib\ert\&.jar\fR and several other JAR files\&.
-.TP
--old
-.br
-Specifies that old JDK 1\&.0-style header files should be generated\&.
-.TP
--force
-.br
-Specifies that output files should always be written\&.
-.TP
--J\fIoption\fR
-.br
-Passes \f3option\fR to the Java Virtual Machine, where \f3option\fR is one of the options described on the reference page for the Java application launcher\&. For example, \f3-J-Xms48m\fR sets the startup memory to 48 MB\&. See java(1)\&.
-.SH SEE\ ALSO    
-.TP 0.2i    
-\(bu
-javah(1)
-.TP 0.2i    
-\(bu
-java(1)
-.TP 0.2i    
-\(bu
-jdb(1)
-.TP 0.2i    
-\(bu
-javap(1)
-.TP 0.2i    
-\(bu
-javadoc(1)
-.RE
-.br
-'pl 8.5i
-'bp
--- a/src/bsd/doc/man/javap.1	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/bsd/doc/man/javap.1	Fri Apr 06 03:53:28 2018 +0200
@@ -362,17 +362,6 @@
 .sp -1
 .IP \(bu 2.3
 .\}
-javah(1)
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
 jdb(1)
 .RE
 .sp
--- a/src/bsd/doc/man/jdb.1	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/bsd/doc/man/jdb.1	Fri Apr 06 03:53:28 2018 +0200
@@ -260,9 +260,6 @@
 java(1)
 .TP 0.2i    
 \(bu
-javah(1)
-.TP 0.2i    
-\(bu
 javap(1)
 .RE
 .br
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/demo/share/jfc/SwingSet2/AquaTheme.java	Fri Apr 06 03:53:28 2018 +0200
@@ -0,0 +1,57 @@
+/*
+ *
+ * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ *   - Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ *
+ *   - Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ *
+ *   - Neither the name of Oracle nor the names of its
+ *     contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+ * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+
+import javax.swing.plaf.*;
+import javax.swing.plaf.metal.*;
+import javax.swing.*;
+import javax.swing.border.*;
+import java.awt.*;
+
+/**
+ * This class describes a theme using "blue-green" colors.
+ *
+ * @author Steve Wilson
+ */
+public class AquaTheme extends DefaultMetalTheme {
+
+    public String getName() { return "Aqua"; }
+
+    private final ColorUIResource primary1 = new ColorUIResource(102, 153, 153);
+    private final ColorUIResource primary2 = new ColorUIResource(128, 192, 192);
+    private final ColorUIResource primary3 = new ColorUIResource(159, 235, 235);
+
+    protected ColorUIResource getPrimary1() { return primary1; }
+    protected ColorUIResource getPrimary2() { return primary2; }
+    protected ColorUIResource getPrimary3() { return primary3; }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/demo/share/jfc/SwingSet2/BezierAnimationPanel.java	Fri Apr 06 03:53:28 2018 +0200
@@ -0,0 +1,331 @@
+/*
+ *
+ * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ *   - Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ *
+ *   - Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ *
+ *   - Neither the name of Oracle nor the names of its
+ *     contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+ * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+
+import javax.swing.*;
+import javax.swing.event.*;
+import javax.swing.text.*;
+import javax.swing.border.*;
+import javax.swing.colorchooser.*;
+import javax.swing.filechooser.*;
+import javax.accessibility.*;
+
+import java.awt.*;
+import java.awt.font.*;
+import java.awt.geom.*;
+import java.awt.image.*;
+import java.awt.event.*;
+
+/**
+ * BezierAnimationPanel
+ *
+ * @author Jim Graham
+ * @author Jeff Dinkins (removed dynamic setting changes, made swing friendly)
+ */
+class BezierAnimationPanel extends JPanel implements Runnable {
+
+    Color backgroundColor =  new Color(0,     0, 153);
+    Color outerColor      =  new Color(255, 255, 255);
+    Color gradientColorA  =  new Color(255,   0, 101);
+    Color gradientColorB  =  new Color(255, 255,   0);
+
+    boolean bgChanged = false;
+
+    GradientPaint gradient = null;
+
+    public final int NUMPTS = 6;
+
+    float animpts[] = new float[NUMPTS * 2];
+
+    float deltas[] = new float[NUMPTS * 2];
+
+    float staticpts[] = {
+         50.0f,   0.0f,
+        150.0f,   0.0f,
+        200.0f,  75.0f,
+        150.0f, 150.0f,
+         50.0f, 150.0f,
+          0.0f,  75.0f,
+    };
+
+    float movepts[] = new float[staticpts.length];
+
+    BufferedImage img;
+
+    Rectangle bounds = null;
+
+    Thread anim;
+
+    private final Object lock = new Object();
+
+    /**
+     * BezierAnimationPanel Constructor
+     */
+    public BezierAnimationPanel() {
+        addHierarchyListener(
+            new HierarchyListener() {
+               public void hierarchyChanged(HierarchyEvent e) {
+                   if(isShowing()) {
+                       start();
+                   } else {
+                       stop();
+                   }
+               }
+           }
+        );
+        setBackground(getBackgroundColor());
+    }
+
+    public boolean isOpaque() {
+        return true;
+    }
+
+    public Color getGradientColorA() {
+        return gradientColorA;
+    }
+
+    public void setGradientColorA(Color c) {
+        if(c != null) {
+            gradientColorA = c;
+        }
+    }
+
+    public Color getGradientColorB() {
+        return gradientColorB;
+    }
+
+    public void setGradientColorB(Color c) {
+        if(c != null) {
+            gradientColorB = c;
+        }
+    }
+
+    public Color getOuterColor() {
+        return outerColor;
+    }
+
+    public void setOuterColor(Color c) {
+        if(c != null) {
+            outerColor = c;
+        }
+    }
+
+    public Color getBackgroundColor() {
+        return backgroundColor;
+    }
+
+    public void setBackgroundColor(Color c) {
+        if(c != null) {
+            backgroundColor = c;
+            setBackground(c);
+            bgChanged = true;
+        }
+    }
+
+    public void start() {
+        Dimension size = getSize();
+        for (int i = 0; i < animpts.length; i += 2) {
+            animpts[i + 0] = (float) (Math.random() * size.width);
+            animpts[i + 1] = (float) (Math.random() * size.height);
+            deltas[i + 0] = (float) (Math.random() * 4.0 + 2.0);
+            deltas[i + 1] = (float) (Math.random() * 4.0 + 2.0);
+            if (animpts[i + 0] > size.width / 6.0f) {
+                deltas[i + 0] = -deltas[i + 0];
+            }
+            if (animpts[i + 1] > size.height / 6.0f) {
+                deltas[i + 1] = -deltas[i + 1];
+            }
+        }
+        anim = new Thread(this);
+        anim.setPriority(Thread.MIN_PRIORITY);
+        anim.start();
+    }
+
+    public synchronized void stop() {
+        anim = null;
+        notify();
+    }
+
+    public void animate(float[] pts, float[] deltas, int index, int limit) {
+        float newpt = pts[index] + deltas[index];
+        if (newpt <= 0) {
+            newpt = -newpt;
+            deltas[index] = (float) (Math.random() * 3.0 + 2.0);
+        } else if (newpt >= (float) limit) {
+            newpt = 2.0f * limit - newpt;
+            deltas[index] = - (float) (Math.random() * 3.0 + 2.0);
+        }
+        pts[index] = newpt;
+    }
+
+    public void run() {
+        Thread me = Thread.currentThread();
+        while (getSize().width <= 0) {
+            try {
+                anim.sleep(500);
+            } catch (InterruptedException e) {
+                return;
+            }
+        }
+
+        Graphics2D g2d = null;
+        Graphics2D BufferG2D = null;
+        Graphics2D ScreenG2D = null;
+        BasicStroke solid = new BasicStroke(9.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_ROUND, 9.0f);
+        GeneralPath gp = new GeneralPath(GeneralPath.WIND_NON_ZERO);
+        int rule = AlphaComposite.SRC_OVER;
+        AlphaComposite opaque = AlphaComposite.SrcOver;
+        AlphaComposite blend = AlphaComposite.getInstance(rule, 0.9f);
+        AlphaComposite set = AlphaComposite.Src;
+        int frame = 0;
+        int frametmp = 0;
+        Dimension oldSize = getSize();
+        Shape clippath = null;
+        while (anim == me) {
+            Dimension size = getSize();
+            if (size.width != oldSize.width || size.height != oldSize.height) {
+                img = null;
+                clippath = null;
+                if (BufferG2D != null) {
+                    BufferG2D.dispose();
+                    BufferG2D = null;
+                }
+                if (ScreenG2D != null) {
+                    ScreenG2D.dispose();
+                    ScreenG2D = null;
+                }
+            }
+            oldSize = size;
+
+            if (img == null) {
+                img = (BufferedImage) createImage(size.width, size.height);
+            }
+
+        if (BufferG2D == null) {
+                BufferG2D = img.createGraphics();
+                BufferG2D.setRenderingHint(RenderingHints.KEY_RENDERING,
+                                           RenderingHints.VALUE_RENDER_DEFAULT);
+                BufferG2D.setClip(clippath);
+            }
+            g2d = BufferG2D;
+
+            float[] ctrlpts;
+            for (int i = 0; i < animpts.length; i += 2) {
+                animate(animpts, deltas, i + 0, size.width);
+                animate(animpts, deltas, i + 1, size.height);
+            }
+            ctrlpts = animpts;
+            int len = ctrlpts.length;
+            gp.reset();
+            int dir = 0;
+            float prevx = ctrlpts[len - 2];
+            float prevy = ctrlpts[len - 1];
+            float curx = ctrlpts[0];
+            float cury = ctrlpts[1];
+            float midx = (curx + prevx) / 2.0f;
+            float midy = (cury + prevy) / 2.0f;
+            gp.moveTo(midx, midy);
+            for (int i = 2; i <= ctrlpts.length; i += 2) {
+                float x1 = (midx + curx) / 2.0f;
+                float y1 = (midy + cury) / 2.0f;
+                prevx = curx;
+                prevy = cury;
+                if (i < ctrlpts.length) {
+                    curx = ctrlpts[i + 0];
+                    cury = ctrlpts[i + 1];
+                } else {
+                    curx = ctrlpts[0];
+                    cury = ctrlpts[1];
+                }
+                midx = (curx + prevx) / 2.0f;
+                midy = (cury + prevy) / 2.0f;
+                float x2 = (prevx + midx) / 2.0f;
+                float y2 = (prevy + midy) / 2.0f;
+                gp.curveTo(x1, y1, x2, y2, midx, midy);
+            }
+            gp.closePath();
+
+            synchronized(lock) {
+        g2d.setComposite(set);
+            g2d.setBackground(backgroundColor);
+            g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
+                                 RenderingHints.VALUE_ANTIALIAS_OFF);
+
+            if(bgChanged || bounds == null) {
+                bounds = new Rectangle(0, 0, getWidth(), getHeight());
+                bgChanged = false;
+            }
+
+        // g2d.clearRect(bounds.x-5, bounds.y-5, bounds.x + bounds.width + 5, bounds.y + bounds.height + 5);
+            g2d.clearRect(0, 0, getWidth(), getHeight());
+
+            g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
+                                 RenderingHints.VALUE_ANTIALIAS_ON);
+            g2d.setColor(outerColor);
+            g2d.setComposite(opaque);
+            g2d.setStroke(solid);
+            g2d.draw(gp);
+            g2d.setPaint(gradient);
+
+            if(!bgChanged) {
+                bounds = gp.getBounds();
+            } else {
+                bounds = new Rectangle(0, 0, getWidth(), getHeight());
+                bgChanged = false;
+            }
+            gradient = new GradientPaint(bounds.x, bounds.y, gradientColorA,
+                                         bounds.x + bounds.width, bounds.y + bounds.height,
+                                         gradientColorB, true);
+            g2d.setComposite(blend);
+            g2d.fill(gp);
+        }
+            if (g2d == BufferG2D) {
+                repaint();
+            }
+            ++frame;
+            Thread.yield();
+        }
+        if (g2d != null) {
+            g2d.dispose();
+        }
+    }
+
+    public void paint(Graphics g) {
+        synchronized (lock) {
+           Graphics2D g2d = (Graphics2D) g;
+           if (img != null) {
+               g2d.setComposite(AlphaComposite.Src);
+               g2d.drawImage(img, null, 0, 0);
+           }
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/demo/share/jfc/SwingSet2/ButtonDemo.java	Fri Apr 06 03:53:28 2018 +0200
@@ -0,0 +1,555 @@
+/*
+ *
+ * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ *   - Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ *
+ *   - Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ *
+ *   - Neither the name of Oracle nor the names of its
+ *     contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+ * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+
+import javax.swing.*;
+import javax.swing.event.*;
+import javax.swing.text.*;
+import javax.swing.border.*;
+import javax.swing.colorchooser.*;
+import javax.swing.filechooser.*;
+import javax.accessibility.*;
+
+import java.awt.*;
+import java.awt.event.*;
+import java.beans.*;
+import java.util.*;
+import java.io.*;
+import java.applet.*;
+import java.net.*;
+
+/**
+ * JButton, JRadioButton, JToggleButton, JCheckBox Demos
+ *
+ * @author Jeff Dinkins
+ */
+public class ButtonDemo extends DemoModule implements ChangeListener {
+
+    JTabbedPane tab;
+
+    JPanel buttonPanel = new JPanel();
+    JPanel checkboxPanel = new JPanel();
+    JPanel radioButtonPanel = new JPanel();
+    JPanel toggleButtonPanel = new JPanel();
+
+    Vector buttons = new Vector();
+    Vector checkboxes = new Vector();
+    Vector radiobuttons = new Vector();
+    Vector togglebuttons = new Vector();
+
+    Vector currentControls = buttons;
+
+    JButton button;
+    JCheckBox check;
+    JRadioButton radio;
+    JToggleButton toggle;
+
+    EmptyBorder border5 = new EmptyBorder(5,5,5,5);
+    EmptyBorder border10 = new EmptyBorder(10,10,10,10);
+
+    ItemListener buttonDisplayListener = null;
+    ItemListener buttonPadListener = null;
+
+    Insets insets0 = new Insets(0,0,0,0);
+    Insets insets10 = new Insets(10,10,10,10);
+
+    /**
+     * main method allows us to run as a standalone demo.
+     */
+    public static void main(String[] args) {
+        ButtonDemo demo = new ButtonDemo(null);
+        demo.mainImpl();
+    }
+
+    /**
+     * ButtonDemo Constructor
+     */
+    public ButtonDemo(SwingSet2 swingset) {
+        // Set the title for this demo, and an icon used to represent this
+        // demo inside the SwingSet2 app.
+        super(swingset, "ButtonDemo", "toolbar/JButton.gif");
+
+        tab = new JTabbedPane();
+        tab.getModel().addChangeListener(this);
+
+        JPanel demo = getDemoPanel();
+        demo.setLayout(new BoxLayout(demo, BoxLayout.Y_AXIS));
+        demo.add(tab);
+
+        addButtons();
+        addRadioButtons();
+        addCheckBoxes();
+        // addToggleButtons();
+        currentControls = buttons;
+    }
+
+    public void addButtons() {
+        tab.addTab(getString("ButtonDemo.buttons"), buttonPanel);
+        buttonPanel.setLayout(new BoxLayout(buttonPanel, BoxLayout.X_AXIS));
+        buttonPanel.setBorder(border5);
+
+        JPanel p1 = createVerticalPanel(true);
+        p1.setAlignmentY(TOP_ALIGNMENT);
+        buttonPanel.add(p1);
+
+        // Text Buttons
+        JPanel p2 = createHorizontalPanel(false);
+        p1.add(p2);
+        p2.setBorder(new CompoundBorder(new TitledBorder(null, getString("ButtonDemo.textbuttons"),
+                                                          TitledBorder.LEFT, TitledBorder.TOP), border5));
+
+        buttons.add(p2.add(new JButton(getString("ButtonDemo.button1"))));
+        p2.add(Box.createRigidArea(HGAP10));
+
+        buttons.add(p2.add(new JButton(getString("ButtonDemo.button2"))));
+        p2.add(Box.createRigidArea(HGAP10));
+
+        buttons.add(p2.add(new JButton(getString("ButtonDemo.button3"))));
+
+
+        // Image Buttons
+        p1.add(Box.createRigidArea(VGAP30));
+        JPanel p3 = createHorizontalPanel(false);
+        p1.add(p3);
+        p3.setLayout(new BoxLayout(p3, BoxLayout.X_AXIS));
+        p3.setBorder(new TitledBorder(null, getString("ButtonDemo.imagebuttons"),
+                                         TitledBorder.LEFT, TitledBorder.TOP));
+
+        // home image button
+        String description = getString("ButtonDemo.phone");
+        button = new JButton(createImageIcon("buttons/b1.gif", description));
+        button.setPressedIcon(createImageIcon("buttons/b1p.gif", description));
+        button.setRolloverIcon(createImageIcon("buttons/b1r.gif", description));
+        button.setDisabledIcon(createImageIcon("buttons/b1d.gif", description));
+        button.setMargin(new Insets(0,0,0,0));
+        p3.add(button);
+        buttons.add(button);
+        p3.add(Box.createRigidArea(HGAP10));
+
+        // write image button
+        description = getString("ButtonDemo.write");
+        button = new JButton(createImageIcon("buttons/b2.gif", description));
+        button.setPressedIcon(createImageIcon("buttons/b2p.gif", description));
+        button.setRolloverIcon(createImageIcon("buttons/b2r.gif", description));
+        button.setDisabledIcon(createImageIcon("buttons/b2d.gif", description));
+        button.setMargin(new Insets(0,0,0,0));
+        p3.add(button);
+        buttons.add(button);
+        p3.add(Box.createRigidArea(HGAP10));
+
+        // write image button
+        description = getString("ButtonDemo.peace");
+        button = new JButton(createImageIcon("buttons/b3.gif", description));
+        button.setPressedIcon(createImageIcon("buttons/b3p.gif", description));
+        button.setRolloverIcon(createImageIcon("buttons/b3r.gif", description));
+        button.setDisabledIcon(createImageIcon("buttons/b3d.gif", description));
+        button.setMargin(new Insets(0,0,0,0));
+        p3.add(button);
+        buttons.add(button);
+
+        p1.add(Box.createVerticalGlue());
+
+        buttonPanel.add(Box.createHorizontalGlue());
+        currentControls = buttons;
+        buttonPanel.add(createControls());
+    }
+
+    public void addRadioButtons() {
+        ButtonGroup group = new ButtonGroup();
+
+        tab.addTab(getString("ButtonDemo.radiobuttons"), radioButtonPanel);
+        radioButtonPanel.setLayout(new BoxLayout(radioButtonPanel, BoxLayout.X_AXIS));
+        radioButtonPanel.setBorder(border5);
+
+        JPanel p1 = createVerticalPanel(true);
+        p1.setAlignmentY(TOP_ALIGNMENT);
+        radioButtonPanel.add(p1);
+
+        // Text Radio Buttons
+        JPanel p2 = createHorizontalPanel(false);
+        p1.add(p2);
+        p2.setBorder(new CompoundBorder(
+                      new TitledBorder(
+                        null, getString("ButtonDemo.textradiobuttons"),
+                        TitledBorder.LEFT, TitledBorder.TOP), border5)
+        );
+
+        radio = (JRadioButton)p2.add(
+                new JRadioButton(getString("ButtonDemo.radio1")));
+        group.add(radio);
+        radiobuttons.add(radio);
+        p2.add(Box.createRigidArea(HGAP10));
+
+        radio = (JRadioButton)p2.add(
+                new JRadioButton(getString("ButtonDemo.radio2")));
+        group.add(radio);
+        radiobuttons.add(radio);
+        p2.add(Box.createRigidArea(HGAP10));
+
+        radio = (JRadioButton)p2.add(
+                new JRadioButton(getString("ButtonDemo.radio3")));
+        group.add(radio);
+        radiobuttons.add(radio);
+
+        // Image Radio Buttons
+        group = new ButtonGroup();
+        p1.add(Box.createRigidArea(VGAP30));
+        JPanel p3 = createHorizontalPanel(false);
+        p1.add(p3);
+        p3.setLayout(new BoxLayout(p3, BoxLayout.X_AXIS));
+        p3.setBorder(new TitledBorder(null, getString("ButtonDemo.imageradiobuttons"),
+                                         TitledBorder.LEFT, TitledBorder.TOP));
+
+        // image radio button 1
+        String description = getString("ButtonDemo.customradio");
+        String text = getString("ButtonDemo.radio1");
+        radio = new JRadioButton(text, createImageIcon("buttons/rb.gif", description));
+        radio.setPressedIcon(createImageIcon("buttons/rbp.gif", description));
+        radio.setRolloverIcon(createImageIcon("buttons/rbr.gif", description));
+        radio.setRolloverSelectedIcon(createImageIcon("buttons/rbrs.gif", description));
+        radio.setSelectedIcon(createImageIcon("buttons/rbs.gif", description));
+        radio.setMargin(new Insets(0,0,0,0));
+        group.add(radio);
+        p3.add(radio);
+        radiobuttons.add(radio);
+        p3.add(Box.createRigidArea(HGAP20));
+
+        // image radio button 2
+        text = getString("ButtonDemo.radio2");
+        radio = new JRadioButton(text, createImageIcon("buttons/rb.gif", description));
+        radio.setPressedIcon(createImageIcon("buttons/rbp.gif", description));
+        radio.setRolloverIcon(createImageIcon("buttons/rbr.gif", description));
+        radio.setRolloverSelectedIcon(createImageIcon("buttons/rbrs.gif", description));
+        radio.setSelectedIcon(createImageIcon("buttons/rbs.gif", description));
+        radio.setMargin(new Insets(0,0,0,0));
+        group.add(radio);
+        p3.add(radio);
+        radiobuttons.add(radio);
+        p3.add(Box.createRigidArea(HGAP20));
+
+        // image radio button 3
+        text = getString("ButtonDemo.radio3");
+        radio = new JRadioButton(text, createImageIcon("buttons/rb.gif", description));
+        radio.setPressedIcon(createImageIcon("buttons/rbp.gif", description));
+        radio.setRolloverIcon(createImageIcon("buttons/rbr.gif", description));
+        radio.setRolloverSelectedIcon(createImageIcon("buttons/rbrs.gif", description));
+        radio.setSelectedIcon(createImageIcon("buttons/rbs.gif", description));
+        radio.setMargin(new Insets(0,0,0,0));
+        group.add(radio);
+        radiobuttons.add(radio);
+        p3.add(radio);
+
+        // verticaly glue fills out the rest of the box
+        p1.add(Box.createVerticalGlue());
+
+        radioButtonPanel.add(Box.createHorizontalGlue());
+        currentControls = radiobuttons;
+        radioButtonPanel.add(createControls());
+    }
+
+
+    public void addCheckBoxes() {
+        tab.addTab(getString("ButtonDemo.checkboxes"), checkboxPanel);
+        checkboxPanel.setLayout(new BoxLayout(checkboxPanel, BoxLayout.X_AXIS));
+        checkboxPanel.setBorder(border5);
+
+        JPanel p1 = createVerticalPanel(true);
+        p1.setAlignmentY(TOP_ALIGNMENT);
+        checkboxPanel.add(p1);
+
+        // Text Radio Buttons
+        JPanel p2 = createHorizontalPanel(false);
+        p1.add(p2);
+        p2.setBorder(new CompoundBorder(
+                      new TitledBorder(
+                        null, getString("ButtonDemo.textcheckboxes"),
+                        TitledBorder.LEFT, TitledBorder.TOP), border5)
+        );
+
+        checkboxes.add(p2.add(new JCheckBox(getString("ButtonDemo.check1"))));
+        p2.add(Box.createRigidArea(HGAP10));
+
+        checkboxes.add(p2.add(new JCheckBox(getString("ButtonDemo.check2"))));
+        p2.add(Box.createRigidArea(HGAP10));
+
+        checkboxes.add(p2.add(new JCheckBox(getString("ButtonDemo.check3"))));
+
+        // Image Radio Buttons
+        p1.add(Box.createRigidArea(VGAP30));
+        JPanel p3 = createHorizontalPanel(false);
+        p1.add(p3);
+        p3.setLayout(new BoxLayout(p3, BoxLayout.X_AXIS));
+        p3.setBorder(new TitledBorder(null, getString("ButtonDemo.imagecheckboxes"),
+                                         TitledBorder.LEFT, TitledBorder.TOP));
+
+        // image checkbox 1
+        String description = getString("ButtonDemo.customcheck");
+        String text = getString("ButtonDemo.check1");
+        check = new JCheckBox(text, createImageIcon("buttons/cb.gif", description));
+        check.setRolloverIcon(createImageIcon("buttons/cbr.gif", description));
+        check.setRolloverSelectedIcon(createImageIcon("buttons/cbrs.gif", description));
+        check.setSelectedIcon(createImageIcon("buttons/cbs.gif", description));
+        check.setMargin(new Insets(0,0,0,0));
+        p3.add(check);
+        checkboxes.add(check);
+        p3.add(Box.createRigidArea(HGAP20));
+
+        // image checkbox 2
+        text = getString("ButtonDemo.check2");
+        check = new JCheckBox(text, createImageIcon("buttons/cb.gif", description));
+        check.setRolloverIcon(createImageIcon("buttons/cbr.gif", description));
+        check.setRolloverSelectedIcon(createImageIcon("buttons/cbrs.gif", description));
+        check.setSelectedIcon(createImageIcon("buttons/cbs.gif", description));
+        check.setMargin(new Insets(0,0,0,0));
+        p3.add(check);
+        checkboxes.add(check);
+        p3.add(Box.createRigidArea(HGAP20));
+
+        // image checkbox 3
+        text = getString("ButtonDemo.check3");
+        check = new JCheckBox(text, createImageIcon("buttons/cb.gif", description));
+        check.setRolloverIcon(createImageIcon("buttons/cbr.gif", description));
+        check.setRolloverSelectedIcon(createImageIcon("buttons/cbrs.gif", description));
+        check.setSelectedIcon(createImageIcon("buttons/cbs.gif", description));
+        check.setMargin(new Insets(0,0,0,0));
+        p3.add(check);
+        checkboxes.add(check);
+
+        // verticaly glue fills out the rest of the box
+        p1.add(Box.createVerticalGlue());
+
+        checkboxPanel.add(Box.createHorizontalGlue());
+        currentControls = checkboxes;
+        checkboxPanel.add(createControls());
+    }
+
+    public void addToggleButtons() {
+        tab.addTab(getString("ButtonDemo.togglebuttons"), toggleButtonPanel);
+    }
+
+    public JPanel createControls() {
+        JPanel controls = new JPanel() {
+            public Dimension getMaximumSize() {
+                return new Dimension(300, super.getMaximumSize().height);
+            }
+        };
+        controls.setLayout(new BoxLayout(controls, BoxLayout.Y_AXIS));
+        controls.setAlignmentY(TOP_ALIGNMENT);
+        controls.setAlignmentX(LEFT_ALIGNMENT);
+
+        JPanel buttonControls = createHorizontalPanel(true);
+        buttonControls.setAlignmentY(TOP_ALIGNMENT);
+        buttonControls.setAlignmentX(LEFT_ALIGNMENT);
+
+        JPanel leftColumn = createVerticalPanel(false);
+        leftColumn.setAlignmentX(LEFT_ALIGNMENT);
+        leftColumn.setAlignmentY(TOP_ALIGNMENT);
+
+        JPanel rightColumn = new LayoutControlPanel(this);
+
+        buttonControls.add(leftColumn);
+        buttonControls.add(Box.createRigidArea(HGAP20));
+        buttonControls.add(rightColumn);
+        buttonControls.add(Box.createRigidArea(HGAP20));
+
+        controls.add(buttonControls);
+
+        createListeners();
+
+        // Display Options
+        JLabel l = new JLabel(getString("ButtonDemo.controlpanel_label"));
+        leftColumn.add(l);
+
+        JCheckBox bordered = new JCheckBox(getString("ButtonDemo.paintborder"));
+        bordered.setActionCommand("PaintBorder");
+        bordered.setToolTipText(getString("ButtonDemo.paintborder_tooltip"));
+        bordered.setMnemonic(getMnemonic("ButtonDemo.paintborder_mnemonic"));
+        if (currentControls == buttons) {
+                bordered.setSelected(true);
+        }
+        bordered.addItemListener(buttonDisplayListener);
+        leftColumn.add(bordered);
+
+        JCheckBox focused = new JCheckBox(getString("ButtonDemo.paintfocus"));
+        focused.setActionCommand("PaintFocus");
+        focused.setToolTipText(getString("ButtonDemo.paintfocus_tooltip"));
+        focused.setMnemonic(getMnemonic("ButtonDemo.paintfocus_mnemonic"));
+        focused.setSelected(true);
+        focused.addItemListener(buttonDisplayListener);
+        leftColumn.add(focused);
+
+        JCheckBox enabled = new JCheckBox(getString("ButtonDemo.enabled"));
+        enabled.setActionCommand("Enabled");
+        enabled.setToolTipText(getString("ButtonDemo.enabled_tooltip"));
+        enabled.setSelected(true);
+        enabled.addItemListener(buttonDisplayListener);
+        enabled.setMnemonic(getMnemonic("ButtonDemo.enabled_mnemonic"));
+        leftColumn.add(enabled);
+
+        JCheckBox filled = new JCheckBox(getString("ButtonDemo.contentfilled"));
+        filled.setActionCommand("ContentFilled");
+        filled.setToolTipText(getString("ButtonDemo.contentfilled_tooltip"));
+        filled.setSelected(true);
+        filled.addItemListener(buttonDisplayListener);
+        filled.setMnemonic(getMnemonic("ButtonDemo.contentfilled_mnemonic"));
+        leftColumn.add(filled);
+
+        leftColumn.add(Box.createRigidArea(VGAP20));
+
+        l = new JLabel(getString("ButtonDemo.padamount_label"));
+        leftColumn.add(l);
+        ButtonGroup group = new ButtonGroup();
+        JRadioButton defaultPad = new JRadioButton(getString("ButtonDemo.default"));
+        defaultPad.setToolTipText(getString("ButtonDemo.default_tooltip"));
+        defaultPad.setMnemonic(getMnemonic("ButtonDemo.default_mnemonic"));
+        defaultPad.addItemListener(buttonPadListener);
+        group.add(defaultPad);
+        defaultPad.setSelected(true);
+        leftColumn.add(defaultPad);
+
+        JRadioButton zeroPad = new JRadioButton(getString("ButtonDemo.zero"));
+        zeroPad.setActionCommand("ZeroPad");
+        zeroPad.setToolTipText(getString("ButtonDemo.zero_tooltip"));
+        zeroPad.addItemListener(buttonPadListener);
+        zeroPad.setMnemonic(getMnemonic("ButtonDemo.zero_mnemonic"));
+        group.add(zeroPad);
+        leftColumn.add(zeroPad);
+
+        JRadioButton tenPad = new JRadioButton(getString("ButtonDemo.ten"));
+        tenPad.setActionCommand("TenPad");
+        tenPad.setMnemonic(getMnemonic("ButtonDemo.ten_mnemonic"));
+        tenPad.setToolTipText(getString("ButtonDemo.ten_tooltip"));
+        tenPad.addItemListener(buttonPadListener);
+        group.add(tenPad);
+        leftColumn.add(tenPad);
+
+        leftColumn.add(Box.createRigidArea(VGAP20));
+        return controls;
+    }
+
+    public void createListeners() {
+        buttonDisplayListener = new ItemListener() {
+                Component c;
+                AbstractButton b;
+
+                public void itemStateChanged(ItemEvent e) {
+                    JCheckBox cb = (JCheckBox) e.getSource();
+                    String command = cb.getActionCommand();
+                    if(command == "Enabled") {
+                        for(int i = 0; i < currentControls.size(); i++) {
+                            c = (Component) currentControls.elementAt(i);
+                            c.setEnabled(cb.isSelected());
+                            c.invalidate();
+                        }
+                    } else if(command == "PaintBorder") {
+                        c = (Component) currentControls.elementAt(0);
+                        if(c instanceof AbstractButton) {
+                            for(int i = 0; i < currentControls.size(); i++) {
+                                b = (AbstractButton) currentControls.elementAt(i);
+                                b.setBorderPainted(cb.isSelected());
+                                b.invalidate();
+                            }
+                        }
+                    } else if(command == "PaintFocus") {
+                        c = (Component) currentControls.elementAt(0);
+                        if(c instanceof AbstractButton) {
+                            for(int i = 0; i < currentControls.size(); i++) {
+                                b = (AbstractButton) currentControls.elementAt(i);
+                                b.setFocusPainted(cb.isSelected());
+                                b.invalidate();
+                            }
+                        }
+                    } else if(command == "ContentFilled") {
+                        c = (Component) currentControls.elementAt(0);
+                        if(c instanceof AbstractButton) {
+                            for(int i = 0; i < currentControls.size(); i++) {
+                                b = (AbstractButton) currentControls.elementAt(i);
+                                b.setContentAreaFilled(cb.isSelected());
+                                b.invalidate();
+                            }
+                        }
+                    }
+                    invalidate();
+                    validate();
+                    repaint();
+                }
+        };
+
+        buttonPadListener = new ItemListener() {
+                Component c;
+                AbstractButton b;
+
+                public void itemStateChanged(ItemEvent e) {
+                    // *** pad = 0
+                    int pad = -1;
+                    JRadioButton rb = (JRadioButton) e.getSource();
+                    String command = rb.getActionCommand();
+                    if(command == "ZeroPad" && rb.isSelected()) {
+                        pad = 0;
+                    } else if(command == "TenPad" && rb.isSelected()) {
+                        pad = 10;
+                    }
+
+                    for(int i = 0; i < currentControls.size(); i++) {
+                        b = (AbstractButton) currentControls.elementAt(i);
+                        if(pad == -1) {
+                            b.setMargin(null);
+                        } else if(pad == 0) {
+                            b.setMargin(insets0);
+                        } else {
+                            b.setMargin(insets10);
+                        }
+                    }
+                    invalidate();
+                    validate();
+                    repaint();
+                }
+        };
+    }
+
+    public void stateChanged(ChangeEvent e) {
+        SingleSelectionModel model = (SingleSelectionModel) e.getSource();
+        if(model.getSelectedIndex() == 0) {
+            currentControls = buttons;
+        } else if(model.getSelectedIndex() == 1) {
+            currentControls = radiobuttons;
+        } else if(model.getSelectedIndex() == 2) {
+            currentControls = checkboxes;
+        } else {
+            currentControls = togglebuttons;
+        }
+    }
+
+    public Vector getCurrentControls() {
+        return currentControls;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/demo/share/jfc/SwingSet2/CharcoalTheme.java	Fri Apr 06 03:53:28 2018 +0200
@@ -0,0 +1,71 @@
+/*
+ *
+ * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ *   - Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ *
+ *   - Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ *
+ *   - Neither the name of Oracle nor the names of its
+ *     contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+ * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+
+import javax.swing.plaf.*;
+import javax.swing.plaf.metal.*;
+import javax.swing.*;
+import javax.swing.border.*;
+import java.awt.*;
+
+/**
+ * This class describes a theme using gray colors.
+ *
+ * @author Steve Wilson
+ */
+public class CharcoalTheme extends DefaultMetalTheme {
+
+    public String getName() { return "Charcoal"; }
+
+    private final ColorUIResource primary1 = new ColorUIResource(66, 33, 66);
+    private final ColorUIResource primary2 = new ColorUIResource(90, 86, 99);
+    private final ColorUIResource primary3 = new ColorUIResource(99, 99, 99);
+
+    private final ColorUIResource secondary1 = new ColorUIResource(0, 0, 0);
+    private final ColorUIResource secondary2 = new ColorUIResource(51, 51, 51);
+    private final ColorUIResource secondary3 = new ColorUIResource(102, 102, 102);
+
+    private final ColorUIResource black = new ColorUIResource(222, 222, 222);
+    private final ColorUIResource white = new ColorUIResource(0, 0, 0);
+
+    protected ColorUIResource getPrimary1() { return primary1; }
+    protected ColorUIResource getPrimary2() { return primary2; }
+    protected ColorUIResource getPrimary3() { return primary3; }
+
+    protected ColorUIResource getSecondary1() { return secondary1; }
+    protected ColorUIResource getSecondary2() { return secondary2; }
+    protected ColorUIResource getSecondary3() { return secondary3; }
+
+    protected ColorUIResource getBlack() { return black; }
+    protected ColorUIResource getWhite() { return white; }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/demo/share/jfc/SwingSet2/ColorChooserDemo.java	Fri Apr 06 03:53:28 2018 +0200
@@ -0,0 +1,209 @@
+/*
+ *
+ * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ *   - Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ *
+ *   - Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ *
+ *   - Neither the name of Oracle nor the names of its
+ *     contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+ * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+
+import javax.swing.*;
+import javax.swing.event.*;
+import javax.swing.text.*;
+import javax.swing.border.*;
+import javax.swing.colorchooser.*;
+import javax.swing.filechooser.*;
+import javax.accessibility.*;
+
+import java.awt.*;
+import java.awt.event.*;
+import java.beans.*;
+import java.util.*;
+import java.io.*;
+import java.applet.*;
+import java.net.*;
+
+/**
+ * JColorChooserDemo
+ *
+ * @author Jeff Dinkins
+ */
+public class ColorChooserDemo extends DemoModule {
+
+    BezierAnimationPanel bezAnim;
+    JButton outerColorButton = null;
+    JButton backgroundColorButton = null;
+    JButton gradientAButton = null;
+    JButton gradientBButton = null;
+
+    // to store the color chosen from the JColorChooser
+    private Color chosen;
+
+    /**
+     * main method allows us to run as a standalone demo.
+     */
+    public static void main(String[] args) {
+        ColorChooserDemo demo = new ColorChooserDemo(null);
+        demo.mainImpl();
+    }
+
+
+    /**
+     * ColorChooserDemo Constructor
+     */
+    public ColorChooserDemo(SwingSet2 swingset) {
+        // Set the title for this demo, and an icon used to represent this
+        // demo inside the SwingSet2 app.
+        super(swingset, "ColorChooserDemo", "toolbar/JColorChooser.gif");
+
+        // Create the bezier animation panel to put in the center of the panel.
+        bezAnim = new BezierAnimationPanel();
+
+        outerColorButton = new JButton(getString("ColorChooserDemo.outer_line"));
+        outerColorButton.setIcon(new ColorSwatch("OuterLine", bezAnim));
+
+        backgroundColorButton = new JButton(getString("ColorChooserDemo.background"));
+        backgroundColorButton.setIcon(new ColorSwatch("Background", bezAnim));
+
+        gradientAButton = new JButton(getString("ColorChooserDemo.grad_a"));
+        gradientAButton.setIcon(new ColorSwatch("GradientA", bezAnim));
+
+        gradientBButton = new JButton(getString("ColorChooserDemo.grad_b"));
+        gradientBButton.setIcon(new ColorSwatch("GradientB", bezAnim));
+
+        ActionListener l = new ActionListener() {
+            public void actionPerformed(ActionEvent e) {
+                Color current = bezAnim.getOuterColor();
+
+                if(e.getSource() == backgroundColorButton) {
+                    current = bezAnim.getBackgroundColor();
+                } else if(e.getSource() == gradientAButton) {
+                    current = bezAnim.getGradientColorA();
+                } else if(e.getSource() == gradientBButton) {
+                    current = bezAnim.getGradientColorB();
+                }
+
+                final JColorChooser chooser = new JColorChooser(current != null ?
+                                                                current :
+                                                                Color.WHITE);
+                if (getSwingSet2() != null && getSwingSet2().isDragEnabled()) {
+                    chooser.setDragEnabled(true);
+                }
+
+                chosen = null;
+                ActionListener okListener = new ActionListener() {
+                    public void actionPerformed(ActionEvent ae) {
+                        chosen = chooser.getColor();
+                    }
+                };
+
+                JDialog dialog = JColorChooser.createDialog(getDemoPanel(),
+                                                            getString("ColorChooserDemo.chooser_title"),
+                                                            true,
+                                                            chooser,
+                                                            okListener,
+                                                            null);
+
+                dialog.show();
+
+                if(e.getSource() == outerColorButton) {
+                    bezAnim.setOuterColor(chosen);
+                } else if(e.getSource() == backgroundColorButton) {
+                    bezAnim.setBackgroundColor(chosen);
+                } else if(e.getSource() == gradientAButton) {
+                    bezAnim.setGradientColorA(chosen);
+                } else {
+                    bezAnim.setGradientColorB(chosen);
+                }
+            }
+        };
+
+        outerColorButton.addActionListener(l);
+        backgroundColorButton.addActionListener(l);
+        gradientAButton.addActionListener(l);
+        gradientBButton.addActionListener(l);
+
+        // Add everything to the panel
+        JPanel p = getDemoPanel();
+        p.setLayout(new BoxLayout(p, BoxLayout.Y_AXIS));
+
+        // Add control buttons
+        JPanel buttonPanel = new JPanel();
+        buttonPanel.setLayout(new BoxLayout(buttonPanel, BoxLayout.X_AXIS));
+
+        buttonPanel.add(backgroundColorButton);
+        buttonPanel.add(Box.createRigidArea(new Dimension(15, 1)));
+
+        buttonPanel.add(gradientAButton);
+        buttonPanel.add(Box.createRigidArea(new Dimension(15, 1)));
+
+        buttonPanel.add(gradientBButton);
+        buttonPanel.add(Box.createRigidArea(new Dimension(15, 1)));
+
+        buttonPanel.add(outerColorButton);
+
+        // Add the panel midway down the panel
+        p.add(Box.createRigidArea(new Dimension(1, 10)));
+        p.add(buttonPanel);
+        p.add(Box.createRigidArea(new Dimension(1, 5)));
+        p.add(bezAnim);
+    }
+
+    class ColorSwatch implements Icon {
+        String gradient;
+        BezierAnimationPanel bez;
+
+        public ColorSwatch(String g, BezierAnimationPanel b) {
+            bez = b;
+            gradient = g;
+        }
+
+        public int getIconWidth() {
+            return 11;
+        }
+
+        public int getIconHeight() {
+            return 11;
+        }
+
+        public void paintIcon(Component c, Graphics g, int x, int y) {
+            g.setColor(Color.black);
+            g.fillRect(x, y, getIconWidth(), getIconHeight());
+            if(gradient.equals("GradientA")) {
+                g.setColor(bez.getGradientColorA());
+            } else if(gradient.equals("GradientB")) {
+                g.setColor(bez.getGradientColorB());
+            } else if(gradient.equals("Background")) {
+                g.setColor(bez.getBackgroundColor());
+            } else if(gradient.equals("OuterLine")) {
+                g.setColor(bez.getOuterColor());
+            }
+            g.fillRect(x+2, y+2, getIconWidth()-4, getIconHeight()-4);
+        }
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/demo/share/jfc/SwingSet2/ComboBoxDemo.java	Fri Apr 06 03:53:28 2018 +0200
@@ -0,0 +1,400 @@
+/*
+ *
+ * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ *   - Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ *
+ *   - Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ *
+ *   - Neither the name of Oracle nor the names of its
+ *     contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+ * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+
+import javax.swing.*;
+import javax.swing.event.*;
+import javax.swing.text.*;
+import javax.swing.border.*;
+import javax.swing.colorchooser.*;
+import javax.swing.filechooser.*;
+import javax.accessibility.*;
+
+import java.awt.*;
+import java.awt.event.*;
+import java.beans.*;
+import java.util.*;
+import java.io.*;
+import java.applet.*;
+import java.net.*;
+
+/**
+ * JComboBox Demo
+ *
+ * @author Jeff Dinkins
+ */
+public class ComboBoxDemo extends DemoModule implements ActionListener {
+
+    Face face;
+    JLabel faceLabel;
+
+    JComboBox hairCB;
+    JComboBox eyesCB;
+    JComboBox mouthCB;
+
+    JComboBox presetCB;
+
+    Hashtable parts = new Hashtable();
+
+    /**
+     * main method allows us to run as a standalone demo.
+     */
+    public static void main(String[] args) {
+        ComboBoxDemo demo = new ComboBoxDemo(null);
+        demo.mainImpl();
+    }
+
+    /**
+     * ComboBoxDemo Constructor
+     */
+    public ComboBoxDemo(SwingSet2 swingset) {
+        // Set the title for this demo, and an icon used to represent this
+        // demo inside the SwingSet2 app.
+        super(swingset, "ComboBoxDemo", "toolbar/JComboBox.gif");
+
+        createComboBoxDemo();
+    }
+
+    public void createComboBoxDemo() {
+        JPanel demo = getDemoPanel();
+
+        JPanel demoPanel = getDemoPanel();
+        demoPanel.setLayout(new BoxLayout(demoPanel, BoxLayout.Y_AXIS));
+
+        JPanel innerPanel = new JPanel();
+        innerPanel.setLayout(new BoxLayout(innerPanel, BoxLayout.X_AXIS));
+
+        demoPanel.add(Box.createRigidArea(VGAP20));
+        demoPanel.add(innerPanel);
+        demoPanel.add(Box.createRigidArea(VGAP20));
+
+        innerPanel.add(Box.createRigidArea(HGAP20));
+
+        // Create a panel to hold buttons
+        JPanel comboBoxPanel = new JPanel() {
+                public Dimension getMaximumSize() {
+                    return new Dimension(getPreferredSize().width, super.getMaximumSize().height);
+                }
+        };
+        comboBoxPanel.setLayout(new BoxLayout(comboBoxPanel, BoxLayout.Y_AXIS));
+
+        comboBoxPanel.add(Box.createRigidArea(VGAP15));
+
+        JLabel l = (JLabel) comboBoxPanel.add(new JLabel(getString("ComboBoxDemo.presets")));
+        l.setAlignmentX(JLabel.LEFT_ALIGNMENT);
+        presetCB = (JComboBox) comboBoxPanel.add(createPresetComboBox());
+        presetCB.setAlignmentX(JComboBox.LEFT_ALIGNMENT);
+        l.setLabelFor(presetCB);
+        comboBoxPanel.add(Box.createRigidArea(VGAP30));
+
+        l = (JLabel) comboBoxPanel.add(new JLabel(getString("ComboBoxDemo.hair_description")));
+        l.setAlignmentX(JLabel.LEFT_ALIGNMENT);
+        hairCB = (JComboBox) comboBoxPanel.add(createHairComboBox());
+        hairCB.setAlignmentX(JComboBox.LEFT_ALIGNMENT);
+        l.setLabelFor(hairCB);
+        comboBoxPanel.add(Box.createRigidArea(VGAP15));
+
+        l = (JLabel) comboBoxPanel.add(new JLabel(getString("ComboBoxDemo.eyes_description")));
+        l.setAlignmentX(JLabel.LEFT_ALIGNMENT);
+        eyesCB = (JComboBox) comboBoxPanel.add(createEyesComboBox());
+        eyesCB.setAlignmentX(JComboBox.LEFT_ALIGNMENT);
+        l.setLabelFor(eyesCB);
+        comboBoxPanel.add(Box.createRigidArea(VGAP15));
+
+        l = (JLabel) comboBoxPanel.add(new JLabel(getString("ComboBoxDemo.mouth_description")));
+        l.setAlignmentX(JLabel.LEFT_ALIGNMENT);
+        mouthCB = (JComboBox) comboBoxPanel.add(createMouthComboBox());
+        mouthCB.setAlignmentX(JComboBox.LEFT_ALIGNMENT);
+        l.setLabelFor(mouthCB);
+        comboBoxPanel.add(Box.createRigidArea(VGAP15));
+
+        // Fill up the remaining space
+        comboBoxPanel.add(new JPanel(new BorderLayout()));
+
+        // Create and place the Face.
+
+        face = new Face();
+        JPanel facePanel = new JPanel();
+        facePanel.setLayout(new BorderLayout());
+        facePanel.setBorder(new BevelBorder(BevelBorder.LOWERED));
+
+        faceLabel = new JLabel(face);
+        facePanel.add(faceLabel, BorderLayout.CENTER);
+        // Indicate that the face panel is controlled by the hair, eyes and
+        // mouth combo boxes.
+        Object [] controlledByObjects = new Object[3];
+        controlledByObjects[0] = hairCB;
+        controlledByObjects[1] = eyesCB;
+        controlledByObjects[2] = mouthCB;
+        AccessibleRelation controlledByRelation =
+            new AccessibleRelation(AccessibleRelation.CONTROLLED_BY_PROPERTY,
+                                   controlledByObjects);
+        facePanel.getAccessibleContext().getAccessibleRelationSet().add(controlledByRelation);
+
+        // Indicate that the hair, eyes and mouth combo boxes are controllers
+        // for the face panel.
+        AccessibleRelation controllerForRelation =
+            new AccessibleRelation(AccessibleRelation.CONTROLLER_FOR_PROPERTY,
+                                   facePanel);
+        hairCB.getAccessibleContext().getAccessibleRelationSet().add(controllerForRelation);
+        eyesCB.getAccessibleContext().getAccessibleRelationSet().add(controllerForRelation);
+        mouthCB.getAccessibleContext().getAccessibleRelationSet().add(controllerForRelation);
+
+        // add buttons and image panels to inner panel
+        innerPanel.add(comboBoxPanel);
+        innerPanel.add(Box.createRigidArea(HGAP30));
+        innerPanel.add(facePanel);
+        innerPanel.add(Box.createRigidArea(HGAP20));
+
+        // load up the face parts
+        addFace("brent",     getString("ComboBoxDemo.brent"));
+        addFace("georges",   getString("ComboBoxDemo.georges"));
+        addFace("hans",      getString("ComboBoxDemo.hans"));
+        addFace("howard",    getString("ComboBoxDemo.howard"));
+        addFace("james",     getString("ComboBoxDemo.james"));
+        addFace("jeff",      getString("ComboBoxDemo.jeff"));
+        addFace("jon",       getString("ComboBoxDemo.jon"));
+        addFace("lara",      getString("ComboBoxDemo.lara"));
+        addFace("larry",     getString("ComboBoxDemo.larry"));
+        addFace("lisa",      getString("ComboBoxDemo.lisa"));
+        addFace("michael",   getString("ComboBoxDemo.michael"));
+        addFace("philip",    getString("ComboBoxDemo.philip"));
+        addFace("scott",     getString("ComboBoxDemo.scott"));
+
+        // set the default face
+        presetCB.setSelectedIndex(0);
+    }
+
+    void addFace(String name, String i18n_name) {
+        ImageIcon i;
+        String i18n_hair = getString("ComboBoxDemo.hair");
+        String i18n_eyes = getString("ComboBoxDemo.eyes");
+        String i18n_mouth = getString("ComboBoxDemo.mouth");
+
+        parts.put(i18n_name, name); // i18n name lookup
+        parts.put(name, i18n_name); // reverse name lookup
+
+        i = createImageIcon("combobox/" + name + "hair.jpg", i18n_name + i18n_hair);
+        parts.put(name +  "hair", i);
+
+        i = createImageIcon("combobox/" + name + "eyes.jpg", i18n_name + i18n_eyes);
+        parts.put(name +  "eyes", i);
+
+        i = createImageIcon("combobox/" + name + "mouth.jpg", i18n_name + i18n_mouth);
+        parts.put(name +  "mouth", i);
+    }
+
+    Face getFace() {
+        return face;
+    }
+
+    JComboBox createHairComboBox() {
+        JComboBox cb = new JComboBox();
+        fillComboBox(cb);
+        cb.addActionListener(this);
+        return cb;
+    }
+
+    JComboBox createEyesComboBox() {
+        JComboBox cb = new JComboBox();
+        fillComboBox(cb);
+        cb.addActionListener(this);
+        return cb;
+    }
+
+    JComboBox createNoseComboBox() {
+        JComboBox cb = new JComboBox();
+        fillComboBox(cb);
+        cb.addActionListener(this);
+        return cb;
+    }
+
+    JComboBox createMouthComboBox() {
+        JComboBox cb = new JComboBox();
+        fillComboBox(cb);
+        cb.addActionListener(this);
+        return cb;
+    }
+
+    JComboBox createPresetComboBox() {
+        JComboBox cb = new JComboBox();
+        cb.addItem(getString("ComboBoxDemo.preset1"));
+        cb.addItem(getString("ComboBoxDemo.preset2"));
+        cb.addItem(getString("ComboBoxDemo.preset3"));
+        cb.addItem(getString("ComboBoxDemo.preset4"));
+        cb.addItem(getString("ComboBoxDemo.preset5"));
+        cb.addItem(getString("ComboBoxDemo.preset6"));
+        cb.addItem(getString("ComboBoxDemo.preset7"));
+        cb.addItem(getString("ComboBoxDemo.preset8"));
+        cb.addItem(getString("ComboBoxDemo.preset9"));
+        cb.addItem(getString("ComboBoxDemo.preset10"));
+        cb.addActionListener(this);
+        return cb;
+    }
+
+    void fillComboBox(JComboBox cb) {
+        cb.addItem(getString("ComboBoxDemo.brent"));
+        cb.addItem(getString("ComboBoxDemo.georges"));
+        cb.addItem(getString("ComboBoxDemo.hans"));
+        cb.addItem(getString("ComboBoxDemo.howard"));
+        cb.addItem(getString("ComboBoxDemo.james"));
+        cb.addItem(getString("ComboBoxDemo.jeff"));
+        cb.addItem(getString("ComboBoxDemo.jon"));
+        cb.addItem(getString("ComboBoxDemo.lara"));
+        cb.addItem(getString("ComboBoxDemo.larry"));
+        cb.addItem(getString("ComboBoxDemo.lisa"));
+        cb.addItem(getString("ComboBoxDemo.michael"));
+        cb.addItem(getString("ComboBoxDemo.philip"));
+        cb.addItem(getString("ComboBoxDemo.scott"));
+    }
+
+    public void actionPerformed(ActionEvent e) {
+        if(e.getSource() == hairCB) {
+            String name = (String) parts.get((String) hairCB.getSelectedItem());
+            face.setHair((ImageIcon) parts.get(name + "hair"));
+            faceLabel.repaint();
+        } else if(e.getSource() == eyesCB) {
+            String name = (String) parts.get((String) eyesCB.getSelectedItem());
+            face.setEyes((ImageIcon) parts.get(name + "eyes"));
+            faceLabel.repaint();
+        } else if(e.getSource() == mouthCB) {
+            String name = (String) parts.get((String) mouthCB.getSelectedItem());
+            face.setMouth((ImageIcon) parts.get(name + "mouth"));
+            faceLabel.repaint();
+        } else if(e.getSource() == presetCB) {
+            String hair = null;
+            String eyes = null;
+            String mouth = null;
+            switch(presetCB.getSelectedIndex()) {
+               case 0:
+                   hair = (String) parts.get("philip");
+                   eyes = (String) parts.get("howard");
+                   mouth = (String) parts.get("jeff");
+                   break;
+               case 1:
+                   hair = (String) parts.get("jeff");
+                   eyes = (String) parts.get("larry");
+                   mouth = (String) parts.get("philip");
+                   break;
+               case 2:
+                   hair = (String) parts.get("howard");
+                   eyes = (String) parts.get("scott");
+                   mouth = (String) parts.get("hans");
+                   break;
+               case 3:
+                   hair = (String) parts.get("philip");
+                   eyes = (String) parts.get("jeff");
+                   mouth = (String) parts.get("hans");
+                   break;
+               case 4:
+                   hair = (String) parts.get("brent");
+                   eyes = (String) parts.get("jon");
+                   mouth = (String) parts.get("scott");
+                   break;
+               case 5:
+                   hair = (String) parts.get("lara");
+                   eyes = (String) parts.get("larry");
+                   mouth = (String) parts.get("lisa");
+                   break;
+               case 6:
+                   hair = (String) parts.get("james");
+                   eyes = (String) parts.get("philip");
+                   mouth = (String) parts.get("michael");
+                   break;
+               case 7:
+                   hair = (String) parts.get("philip");
+                   eyes = (String) parts.get("lisa");
+                   mouth = (String) parts.get("brent");
+                   break;
+               case 8:
+                   hair = (String) parts.get("james");
+                   eyes = (String) parts.get("philip");
+                   mouth = (String) parts.get("jon");
+                   break;
+               case 9:
+                   hair = (String) parts.get("lara");
+                   eyes = (String) parts.get("jon");
+                   mouth = (String) parts.get("scott");
+                   break;
+            }
+            if(hair != null) {
+                hairCB.setSelectedItem(hair);
+                eyesCB.setSelectedItem(eyes);
+                mouthCB.setSelectedItem(mouth);
+                faceLabel.repaint();
+            }
+        }
+    }
+
+    class Face implements Icon {
+        ImageIcon hair;
+        ImageIcon eyes;
+        ImageIcon mouth;
+
+        void setHair(ImageIcon i) {
+            hair = i;
+        }
+
+        void setEyes(ImageIcon i) {
+            eyes = i;
+        }
+
+        void setMouth(ImageIcon i) {
+            mouth = i;
+        }
+
+        public void paintIcon(Component c, Graphics g, int x, int y) {
+            int height = y;
+            x = c.getWidth()/2 - getIconWidth()/2;
+
+            if(hair != null) {
+                hair.paintIcon(c, g, x, height);   height += hair.getIconHeight();
+            }
+
+            if(eyes != null) {
+                eyes.paintIcon(c, g, x, height);   height += eyes.getIconHeight();
+            }
+
+            if(mouth != null) {
+                mouth.paintIcon(c, g, x, height);
+            }
+        }
+
+        public int getIconWidth() {
+            return 344;
+        }
+
+        public int getIconHeight() {
+            return 455;
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/demo/share/jfc/SwingSet2/ContrastTheme.java	Fri Apr 06 03:53:28 2018 +0200
@@ -0,0 +1,100 @@
+/*
+ *
+ * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ *   - Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ *
+ *   - Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ *
+ *   - Neither the name of Oracle nor the names of its
+ *     contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+ * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+
+import javax.swing.plaf.*;
+import javax.swing.plaf.basic.*;
+import javax.swing.plaf.metal.*;
+import javax.swing.*;
+import javax.swing.border.*;
+import java.awt.*;
+
+/**
+ * This class describes a higher-contrast Metal Theme.
+ *
+ * @author Michael C. Albers
+ */
+
+public class ContrastTheme extends DefaultMetalTheme {
+
+    public String getName() { return "Contrast"; }
+
+    private final ColorUIResource primary1 = new ColorUIResource(0, 0, 0);
+    private final ColorUIResource primary2 = new ColorUIResource(204, 204, 204);
+    private final ColorUIResource primary3 = new ColorUIResource(255, 255, 255);
+    private final ColorUIResource primaryHighlight = new ColorUIResource(102,102,102);
+
+    private final ColorUIResource secondary2 = new ColorUIResource(204, 204, 204);
+    private final ColorUIResource secondary3 = new ColorUIResource(255, 255, 255);
+    private final ColorUIResource controlHighlight = new ColorUIResource(102,102,102);
+
+    protected ColorUIResource getPrimary1() { return primary1; }
+    protected ColorUIResource getPrimary2() { return primary2; }
+    protected ColorUIResource getPrimary3() { return primary3; }
+    public ColorUIResource getPrimaryControlHighlight() { return primaryHighlight;}
+
+    protected ColorUIResource getSecondary2() { return secondary2; }
+    protected ColorUIResource getSecondary3() { return secondary3; }
+    public ColorUIResource getControlHighlight() { return super.getSecondary3(); }
+
+    public ColorUIResource getFocusColor() { return getBlack(); }
+
+    public ColorUIResource getTextHighlightColor() { return getBlack(); }
+    public ColorUIResource getHighlightedTextColor() { return getWhite(); }
+
+    public ColorUIResource getMenuSelectedBackground() { return getBlack(); }
+    public ColorUIResource getMenuSelectedForeground() { return getWhite(); }
+    public ColorUIResource getAcceleratorForeground() { return getBlack(); }
+    public ColorUIResource getAcceleratorSelectedForeground() { return getWhite(); }
+
+
+    public void addCustomEntriesToTable(UIDefaults table) {
+
+        Border blackLineBorder = new BorderUIResource(new LineBorder( getBlack() ));
+
+        Object textBorder = new BorderUIResource( new CompoundBorder(
+                                                       blackLineBorder,
+                                                       new BasicBorders.MarginBorder()));
+
+        table.put( "ToolTip.border", blackLineBorder);
+        table.put( "TitledBorder.border", blackLineBorder);
+
+        table.put( "TextField.border", textBorder);
+        table.put( "PasswordField.border", textBorder);
+        table.put( "TextArea.border", textBorder);
+        table.put( "TextPane.border", textBorder);
+        table.put( "EditorPane.border", textBorder);
+
+
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/demo/share/jfc/SwingSet2/DemoModule.java	Fri Apr 06 03:53:28 2018 +0200
@@ -0,0 +1,229 @@
+/*
+ *
+ * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ *   - Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ *
+ *   - Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ *
+ *   - Neither the name of Oracle nor the names of its
+ *     contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+ * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+import javax.swing.*;
+import javax.swing.event.*;
+import javax.swing.text.*;
+import javax.swing.border.*;
+import javax.swing.colorchooser.*;
+import javax.swing.filechooser.*;
+import javax.accessibility.*;
+
+import java.awt.*;
+import java.awt.event.*;
+import java.beans.*;
+import java.util.*;
+import java.io.*;
+import java.applet.*;
+import java.net.*;
+
+/**
+ * A generic SwingSet2 demo module
+ *
+ * @author Jeff Dinkins
+ */
+public class DemoModule extends JApplet {
+
+    // The preferred size of the demo
+    private int PREFERRED_WIDTH = 680;
+    private int PREFERRED_HEIGHT = 600;
+
+    Border loweredBorder = new CompoundBorder(new SoftBevelBorder(SoftBevelBorder.LOWERED),
+                                              new EmptyBorder(5,5,5,5));
+
+    // Premade convenience dimensions, for use wherever you need 'em.
+    public static Dimension HGAP2 = new Dimension(2,1);
+    public static Dimension VGAP2 = new Dimension(1,2);
+
+    public static Dimension HGAP5 = new Dimension(5,1);
+    public static Dimension VGAP5 = new Dimension(1,5);
+
+    public static Dimension HGAP10 = new Dimension(10,1);
+    public static Dimension VGAP10 = new Dimension(1,10);
+
+    public static Dimension HGAP15 = new Dimension(15,1);
+    public static Dimension VGAP15 = new Dimension(1,15);
+
+    public static Dimension HGAP20 = new Dimension(20,1);
+    public static Dimension VGAP20 = new Dimension(1,20);
+
+    public static Dimension HGAP25 = new Dimension(25,1);
+    public static Dimension VGAP25 = new Dimension(1,25);
+
+    public static Dimension HGAP30 = new Dimension(30,1);
+    public static Dimension VGAP30 = new Dimension(1,30);
+
+    private SwingSet2 swingset = null;
+    private JPanel panel = null;
+    private String resourceName = null;
+    private String iconPath = null;
+    private String sourceCode = null;
+
+    public DemoModule(SwingSet2 swingset) {
+        this(swingset, null, null);
+    }
+
+    public DemoModule(SwingSet2 swingset, String resourceName, String iconPath) {
+        UIManager.put("swing.boldMetal", Boolean.FALSE);
+        panel = new JPanel();
+        panel.setLayout(new BorderLayout());
+
+        this.resourceName = resourceName;
+        this.iconPath = iconPath;
+        this.swingset = swingset;
+
+        loadSourceCode();
+    }
+
+    public String getResourceName() {
+        return resourceName;
+    }
+
+    public JPanel getDemoPanel() {
+        return panel;
+    }
+
+    public SwingSet2 getSwingSet2() {
+        return swingset;
+    }
+
+
+    public String getString(String key) {
+
+        if (getSwingSet2() != null) {
+            return getSwingSet2().getString(key);
+        }else{
+            return "nada";
+        }
+    }
+
+    public char getMnemonic(String key) {
+        return (getString(key)).charAt(0);
+    }
+
+    public ImageIcon createImageIcon(String filename, String description) {
+        if(getSwingSet2() != null) {
+            return getSwingSet2().createImageIcon(filename, description);
+        } else {
+            String path = "/resources/images/" + filename;
+            return new ImageIcon(getClass().getResource(path), description);
+        }
+    }
+
+
+    public String getSourceCode() {
+        return sourceCode;
+    }
+
+    public void loadSourceCode() {
+        if(getResourceName() != null) {
+            String filename = getResourceName() + ".java";
+            sourceCode = new String("<html><body bgcolor=\"#ffffff\"><pre>");
+            InputStream is;
+            InputStreamReader isr;
+            URL url;
+
+            try {
+                url = getClass().getResource(filename);
+                is = url.openStream();
+                isr = new InputStreamReader(is, "UTF-8");
+                BufferedReader reader = new BufferedReader(isr);
+
+                // Read one line at a time, htmlize using super-spiffy
+                // html java code formating utility from www.CoolServlets.com
+                String line = reader.readLine();
+                while(line != null) {
+                    sourceCode += line + " \n ";
+                    line = reader.readLine();
+                }
+                sourceCode += new String("</pre></body></html>");
+            } catch (Exception ex) {
+                sourceCode = "Could not load file: " + filename;
+            }
+        }
+    }
+
+    public String getName() {
+        return getString(getResourceName() + ".name");
+    };
+
+    public Icon getIcon() {
+        return createImageIcon(iconPath, getResourceName() + ".name");
+    };
+
+    public String getToolTip() {
+        return getString(getResourceName() + ".tooltip");
+    };
+
+    public void mainImpl() {
+        JFrame frame = new JFrame(getName());
+        frame.getContentPane().setLayout(new BorderLayout());
+        frame.getContentPane().add(getDemoPanel(), BorderLayout.CENTER);
+        getDemoPanel().setPreferredSize(new Dimension(PREFERRED_WIDTH, PREFERRED_HEIGHT));
+        frame.pack();
+        frame.show();
+    }
+
+    public JPanel createHorizontalPanel(boolean threeD) {
+        JPanel p = new JPanel();
+        p.setLayout(new BoxLayout(p, BoxLayout.X_AXIS));
+        p.setAlignmentY(TOP_ALIGNMENT);
+        p.setAlignmentX(LEFT_ALIGNMENT);
+        if(threeD) {
+            p.setBorder(loweredBorder);
+        }
+        return p;
+    }
+
+    public JPanel createVerticalPanel(boolean threeD) {
+        JPanel p = new JPanel();
+        p.setLayout(new BoxLayout(p, BoxLayout.Y_AXIS));
+        p.setAlignmentY(TOP_ALIGNMENT);
+        p.setAlignmentX(LEFT_ALIGNMENT);
+        if(threeD) {
+            p.setBorder(loweredBorder);
+        }
+        return p;
+    }
+
+    public static void main(String[] args) {
+        DemoModule demo = new DemoModule(null);
+        demo.mainImpl();
+    }
+
+    public void init() {
+        getContentPane().setLayout(new BorderLayout());
+        getContentPane().add(getDemoPanel(), BorderLayout.CENTER);
+    }
+
+    void updateDragEnabled(boolean dragEnabled) {}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/demo/share/jfc/SwingSet2/DirectionPanel.java	Fri Apr 06 03:53:28 2018 +0200
@@ -0,0 +1,159 @@
+/*
+ *
+ * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ *   - Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ *
+ *   - Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ *
+ *   - Neither the name of Oracle nor the names of its
+ *     contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+ * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+import javax.swing.*;
+import javax.swing.border.*;
+
+import java.awt.*;
+import java.awt.event.*;
+import java.util.*;
+
+
+/**
+ * @author Jeff Dinkins
+ * @author Chester Rose
+ * @author Brian Beck
+ */
+
+public class DirectionPanel extends JPanel {
+
+    private ButtonGroup group;
+
+    public DirectionPanel(boolean enable, String selection, ActionListener l) {
+        setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));
+        setAlignmentY(TOP_ALIGNMENT);
+        setAlignmentX(LEFT_ALIGNMENT);
+
+        Box firstThree = Box.createHorizontalBox();
+        Box secondThree = Box.createHorizontalBox();
+        Box thirdThree = Box.createHorizontalBox();
+
+        if(!enable) {
+            selection = "None";
+        }
+
+        group = new ButtonGroup();
+        DirectionButton b;
+        b = (DirectionButton) firstThree.add(new DirectionButton(  tl_dot, tldn_dot, "NW", "Sets the orientation to the North-West", l, group, selection.equals("NW")));
+        b.setEnabled(enable);
+        b = (DirectionButton) firstThree.add(new DirectionButton(  tm_dot, tmdn_dot, "N",  "Sets the orientation to the North", l, group, selection.equals("N")));
+        b.setEnabled(enable);
+        b = (DirectionButton) firstThree.add(new DirectionButton(  tr_dot, trdn_dot, "NE", "Sets the orientation to the North-East", l, group, selection.equals("NE")));
+        b.setEnabled(enable);
+        b = (DirectionButton) secondThree.add(new DirectionButton( ml_dot, mldn_dot, "W", "Sets the orientation to the West", l, group, selection.equals("W")));
+        b.setEnabled(enable);
+        b = (DirectionButton) secondThree.add(new DirectionButton( c_dot,  cdn_dot,  "C", "Sets the orientation to the Center", l, group, selection.equals("C")));
+        b.setEnabled(enable);
+        b = (DirectionButton) secondThree.add(new DirectionButton( mr_dot, mrdn_dot, "E", "Sets the orientation to the East", l, group, selection.equals("E")));
+        b.setEnabled(enable);
+        b = (DirectionButton) thirdThree.add(new DirectionButton(  bl_dot, bldn_dot, "SW", "Sets the orientation to the South-West", l, group, selection.equals("SW")));
+        b.setEnabled(enable);
+        b = (DirectionButton) thirdThree.add(new DirectionButton(  bm_dot, bmdn_dot, "S", "Sets the orientation to the South", l, group, selection.equals("S")));
+        b.setEnabled(enable);
+        b = (DirectionButton) thirdThree.add(new DirectionButton(  br_dot, brdn_dot, "SE", "Sets the orientation to the South-East", l, group, selection.equals("SE")));
+        b.setEnabled(enable);
+
+        add(firstThree);
+        add(secondThree);
+        add(thirdThree);
+    }
+
+    public String getSelection() {
+        return group.getSelection().getActionCommand();
+    }
+
+    public void setSelection( String selection  ) {
+        Enumeration e = group.getElements();
+        while( e.hasMoreElements() ) {
+            JRadioButton b = (JRadioButton)e.nextElement();
+            if( b.getActionCommand().equals(selection) ) {
+               b.setSelected(true);
+            }
+        }
+    }
+
+    // Chester's way cool layout buttons
+    public ImageIcon bl_dot   = loadImageIcon("bl.gif","bottom left layout button");
+    public ImageIcon bldn_dot = loadImageIcon("bldn.gif","selected bottom left layout button");
+    public ImageIcon bm_dot   = loadImageIcon("bm.gif","bottom middle layout button");
+    public ImageIcon bmdn_dot = loadImageIcon("bmdn.gif","selected bottom middle layout button");
+    public ImageIcon br_dot   = loadImageIcon("br.gif","bottom right layout button");
+    public ImageIcon brdn_dot = loadImageIcon("brdn.gif","selected bottom right layout button");
+    public ImageIcon c_dot    = loadImageIcon("c.gif","center layout button");
+    public ImageIcon cdn_dot  = loadImageIcon("cdn.gif","selected center layout button");
+    public ImageIcon ml_dot   = loadImageIcon("ml.gif","middle left layout button");
+    public ImageIcon mldn_dot = loadImageIcon("mldn.gif","selected middle left layout button");
+    public ImageIcon mr_dot   = loadImageIcon("mr.gif","middle right layout button");
+    public ImageIcon mrdn_dot = loadImageIcon("mrdn.gif","selected middle right layout button");
+    public ImageIcon tl_dot   = loadImageIcon("tl.gif","top left layout button");
+    public ImageIcon tldn_dot = loadImageIcon("tldn.gif","selected top left layout button");
+    public ImageIcon tm_dot   = loadImageIcon("tm.gif","top middle layout button");
+    public ImageIcon tmdn_dot = loadImageIcon("tmdn.gif","selected top middle layout button");
+    public ImageIcon tr_dot   = loadImageIcon("tr.gif","top right layout button");
+    public ImageIcon trdn_dot = loadImageIcon("trdn.gif","selected top right layout button");
+
+    public ImageIcon loadImageIcon(String filename, String description) {
+        String path = "/resources/images/buttons/" + filename;
+        return new ImageIcon(getClass().getResource(path), description);
+    }
+
+
+    public class DirectionButton extends JRadioButton {
+
+        /**
+         * A layout direction button
+         */
+        public DirectionButton(Icon icon, Icon downIcon, String direction,
+                               String description, ActionListener l,
+                               ButtonGroup group, boolean selected)
+        {
+            super();
+            this.addActionListener(l);
+            setFocusPainted(false);
+            setHorizontalTextPosition(CENTER);
+            group.add(this);
+            setIcon(icon);
+            setSelectedIcon(downIcon);
+            setActionCommand(direction);
+            getAccessibleContext().setAccessibleName(direction);
+            getAccessibleContext().setAccessibleDescription(description);
+            setSelected(selected);
+        }
+
+        public boolean isFocusTraversable() {
+            return false;
+        }
+
+        public void setBorder(Border b) {
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/demo/share/jfc/SwingSet2/EmeraldTheme.java	Fri Apr 06 03:53:28 2018 +0200
@@ -0,0 +1,56 @@
+/*
+ *
+ * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ *   - Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ *
+ *   - Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ *
+ *   - Neither the name of Oracle nor the names of its
+ *     contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+ * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+import javax.swing.plaf.*;
+import javax.swing.plaf.metal.*;
+import javax.swing.*;
+import javax.swing.border.*;
+import java.awt.*;
+
+/**
+ * This class describes a theme using glowing green colors.
+ *
+ * @author Jeff Dinkins
+ */
+public class EmeraldTheme extends DefaultMetalTheme {
+
+    public String getName() { return "Emerald"; }
+
+    private final ColorUIResource primary1 = new ColorUIResource(51, 142, 71);
+    private final ColorUIResource primary2 = new ColorUIResource(102, 193, 122);
+    private final ColorUIResource primary3 = new ColorUIResource(153, 244, 173);
+
+    protected ColorUIResource getPrimary1() { return primary1; }
+    protected ColorUIResource getPrimary2() { return primary2; }
+    protected ColorUIResource getPrimary3() { return primary3; }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/demo/share/jfc/SwingSet2/ExampleFileView.java	Fri Apr 06 03:53:28 2018 +0200
@@ -0,0 +1,176 @@
+/*
+ *
+ * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ *   - Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ *
+ *   - Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ *
+ *   - Neither the name of Oracle nor the names of its
+ *     contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+ * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+import javax.swing.*;
+import javax.swing.filechooser.*;
+
+import java.io.File;
+import java.util.Hashtable;
+
+/**
+ * A convenience implementation of the FileView interface that
+ * manages name, icon, traversable, and file type information.
+ *
+ * This this implemention will work well with file systems that use
+ * "dot" extensions to indicate file type. For example: "picture.gif"
+ * as a gif image.
+ *
+ * If the java.io.File ever contains some of this information, such as
+ * file type, icon, and hidden file inforation, this implementation may
+ * become obsolete. At minimum, it should be rewritten at that time to
+ * use any new type information provided by java.io.File
+ *
+ * Example:
+ *    JFileChooser chooser = new JFileChooser();
+ *    fileView = new ExampleFileView();
+ *    fileView.putIcon("jpg", new ImageIcon("images/jpgIcon.jpg"));
+ *    fileView.putIcon("gif", new ImageIcon("images/gifIcon.gif"));
+ *    chooser.setFileView(fileView);
+ *
+ * @author Jeff Dinkins
+ */
+public class ExampleFileView extends FileView {
+    private Hashtable icons = new Hashtable(5);
+    private Hashtable fileDescriptions = new Hashtable(5);
+    private Hashtable typeDescriptions = new Hashtable(5);
+
+    /**
+     * The name of the file.  Do nothing special here. Let
+     * the system file view handle this.
+     * @see FileView#getName
+     */
+    public String getName(File f) {
+        return null;
+    }
+
+    /**
+     * Adds a human readable description of the file.
+     */
+    public void putDescription(File f, String fileDescription) {
+        fileDescriptions.put(f, fileDescription);
+    }
+
+    /**
+     * A human readable description of the file.
+     *
+     * @see FileView#getDescription
+     */
+    public String getDescription(File f) {
+        return (String) fileDescriptions.get(f);
+    };
+
+    /**
+     * Adds a human readable type description for files. Based on "dot"
+     * extension strings, e.g: ".gif". Case is ignored.
+     */
+    public void putTypeDescription(String extension, String typeDescription) {
+        typeDescriptions.put(extension, typeDescription);
+    }
+
+    /**
+     * Adds a human readable type description for files of the type of
+     * the passed in file. Based on "dot" extension strings, e.g: ".gif".
+     * Case is ignored.
+     */
+    public void putTypeDescription(File f, String typeDescription) {
+        putTypeDescription(getExtension(f), typeDescription);
+    }
+
+    /**
+     * A human readable description of the type of the file.
+     *
+     * @see FileView#getTypeDescription
+     */
+    public String getTypeDescription(File f) {
+        return (String) typeDescriptions.get(getExtension(f));
+    }
+
+    /**
+     * Convenience method that returns the "dot" extension for the
+     * given file.
+     */
+    public String getExtension(File f) {
+        String name = f.getName();
+        if(name != null) {
+            int extensionIndex = name.lastIndexOf('.');
+            if(extensionIndex < 0) {
+                return null;
+            }
+            return name.substring(extensionIndex+1).toLowerCase();
+        }
+        return null;
+    }
+
+    /**
+     * Adds an icon based on the file type "dot" extension
+     * string, e.g: ".gif". Case is ignored.
+     */
+    public void putIcon(String extension, Icon icon) {
+        icons.put(extension, icon);
+    }
+
+    /**
+     * Icon that reperesents this file. Default implementation returns
+     * null. You might want to override this to return something more
+     * interesting.
+     *
+     * @see FileView#getIcon
+     */
+    public Icon getIcon(File f) {
+        Icon icon = null;
+        String extension = getExtension(f);
+        if(extension != null) {
+            icon = (Icon) icons.get(extension);
+        }
+        return icon;
+    }
+
+    /**
+     * Whether the directory is traversable or not. Generic implementation
+     * returns true for all directories and special folders.
+     *
+     * You might want to subtype ExampleFileView to do somethimg more interesting,
+     * such as recognize compound documents directories; in such a case you might
+     * return a special icon for the directory that makes it look like a regular
+     * document, and return false for isTraversable to not allow users to
+     * descend into the directory.
+     *
+     * @see FileView#isTraversable
+     */
+    public Boolean isTraversable(File f) {
+        // if (some_reason) {
+        //    return Boolean.FALSE;
+        // }
+        return null;    // Use default from FileSystemView
+    };
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/demo/share/jfc/SwingSet2/FileChooserDemo.java	Fri Apr 06 03:53:28 2018 +0200
@@ -0,0 +1,436 @@
+/*
+ *
+ * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ *   - Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ *
+ *   - Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ *
+ *   - Neither the name of Oracle nor the names of its
+ *     contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+ * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+
+import javax.swing.*;
+import javax.swing.event.*;
+import javax.swing.text.*;
+import javax.swing.border.*;
+import javax.swing.colorchooser.*;
+import javax.swing.filechooser.*;
+import javax.accessibility.*;
+
+import java.awt.*;
+import java.awt.event.*;
+import java.beans.*;
+import java.util.*;
+import java.io.*;
+import java.applet.*;
+import java.net.*;
+
+/**
+ * JFileChooserDemo
+ *
+ * @author Jeff Dinkins
+ */
+public class FileChooserDemo extends DemoModule {
+    JLabel theImage;
+    Icon jpgIcon;
+    Icon gifIcon;
+
+    /**
+     * main method allows us to run as a standalone demo.
+     */
+    public static void main(String[] args) {
+        FileChooserDemo demo = new FileChooserDemo(null);
+        demo.mainImpl();
+    }
+
+    /**
+     * FileChooserDemo Constructor
+     */
+    public FileChooserDemo(SwingSet2 swingset) {
+        // Set the title for this demo, and an icon used to represent this
+        // demo inside the SwingSet2 app.
+        super(swingset, "FileChooserDemo", "toolbar/JFileChooser.gif");
+        createFileChooserDemo();
+    }
+
+    public void createFileChooserDemo() {
+        theImage = new JLabel("");
+        jpgIcon = createImageIcon("filechooser/jpgIcon.jpg", "jpg image");
+        gifIcon = createImageIcon("filechooser/gifIcon.gif", "gif image");
+
+        JPanel demoPanel = getDemoPanel();
+        demoPanel.setLayout(new BoxLayout(demoPanel, BoxLayout.Y_AXIS));
+
+        JPanel innerPanel = new JPanel();
+        innerPanel.setLayout(new BoxLayout(innerPanel, BoxLayout.X_AXIS));
+
+        demoPanel.add(Box.createRigidArea(VGAP20));
+        demoPanel.add(innerPanel);
+        demoPanel.add(Box.createRigidArea(VGAP20));
+
+        innerPanel.add(Box.createRigidArea(HGAP20));
+
+        // Create a panel to hold buttons
+        JPanel buttonPanel = new JPanel() {
+            public Dimension getMaximumSize() {
+                return new Dimension(getPreferredSize().width, super.getMaximumSize().height);
+            }
+        };
+        buttonPanel.setLayout(new BoxLayout(buttonPanel, BoxLayout.Y_AXIS));
+
+        buttonPanel.add(Box.createRigidArea(VGAP15));
+        buttonPanel.add(createPlainFileChooserButton());
+        buttonPanel.add(Box.createRigidArea(VGAP15));
+        buttonPanel.add(createPreviewFileChooserButton());
+        buttonPanel.add(Box.createRigidArea(VGAP15));
+        buttonPanel.add(createCustomFileChooserButton());
+        buttonPanel.add(Box.createVerticalGlue());
+
+        // Create a panel to hold the image
+        JPanel imagePanel = new JPanel();
+        imagePanel.setLayout(new BorderLayout());
+        imagePanel.setBorder(new BevelBorder(BevelBorder.LOWERED));
+        JScrollPane scroller = new JScrollPane(theImage);
+        scroller.getVerticalScrollBar().setUnitIncrement(10);
+        scroller.getHorizontalScrollBar().setUnitIncrement(10);
+        imagePanel.add(scroller, BorderLayout.CENTER);
+
+        // add buttons and image panels to inner panel
+        innerPanel.add(buttonPanel);
+        innerPanel.add(Box.createRigidArea(HGAP30));
+        innerPanel.add(imagePanel);
+        innerPanel.add(Box.createRigidArea(HGAP20));
+    }
+
+    public JFileChooser createFileChooser() {
+        // create a filechooser
+        JFileChooser fc = new JFileChooser();
+        if (getSwingSet2() != null && getSwingSet2().isDragEnabled()) {
+            fc.setDragEnabled(true);
+        }
+
+        // set the current directory to be the images directory
+        File swingFile = new File("resources/images/About.jpg");
+        if(swingFile.exists()) {
+            fc.setCurrentDirectory(swingFile);
+            fc.setSelectedFile(swingFile);
+        }
+
+        return fc;
+    }
+
+
+    public JButton createPlainFileChooserButton() {
+        Action a = new AbstractAction(getString("FileChooserDemo.plainbutton")) {
+            public void actionPerformed(ActionEvent e) {
+                JFileChooser fc = createFileChooser();
+
+                // show the filechooser
+                int result = fc.showOpenDialog(getDemoPanel());
+
+                // if we selected an image, load the image
+                if(result == JFileChooser.APPROVE_OPTION) {
+                    loadImage(fc.getSelectedFile().getPath());
+                }
+            }
+        };
+        return createButton(a);
+    }
+
+    public JButton createPreviewFileChooserButton() {
+        Action a = new AbstractAction(getString("FileChooserDemo.previewbutton")) {
+            public void actionPerformed(ActionEvent e) {
+                JFileChooser fc = createFileChooser();
+
+                // Add filefilter & fileview
+                javax.swing.filechooser.FileFilter filter = createFileFilter(
+                    getString("FileChooserDemo.filterdescription"),
+                    "jpg", "gif");
+                ExampleFileView fileView = new ExampleFileView();
+                fileView.putIcon("jpg", jpgIcon);
+                fileView.putIcon("gif", gifIcon);
+                fc.setFileView(fileView);
+                fc.addChoosableFileFilter(filter);
+                fc.setFileFilter(filter);
+
+                // add preview accessory
+                fc.setAccessory(new FilePreviewer(fc));
+
+                // show the filechooser
+                int result = fc.showOpenDialog(getDemoPanel());
+
+                // if we selected an image, load the image
+                if(result == JFileChooser.APPROVE_OPTION) {
+                    loadImage(fc.getSelectedFile().getPath());
+                }
+            }
+        };
+        return createButton(a);
+    }
+
+    JDialog dialog;
+    JFileChooser fc;
+
+    private javax.swing.filechooser.FileFilter createFileFilter(
+            String description, String...extensions) {
+        description = createFileNameFilterDescriptionFromExtensions(
+                    description, extensions);
+        return new FileNameExtensionFilter(description, extensions);
+    }
+
+    private String createFileNameFilterDescriptionFromExtensions(
+            String description, String[] extensions) {
+        String fullDescription = (description == null) ?
+                "(" : description + " (";
+        // build the description from the extension list
+        fullDescription += "." + extensions[0];
+        for (int i = 1; i < extensions.length; i++) {
+            fullDescription += ", .";
+            fullDescription += extensions[i];
+        }
+        fullDescription += ")";
+        return fullDescription;
+    }
+
+    public JButton createCustomFileChooserButton() {
+        Action a = new AbstractAction(getString("FileChooserDemo.custombutton")) {
+            public void actionPerformed(ActionEvent e) {
+                fc = createFileChooser();
+
+                // Add filefilter & fileview
+                javax.swing.filechooser.FileFilter filter = createFileFilter(
+                    getString("FileChooserDemo.filterdescription"),
+                    "jpg", "gif");
+                ExampleFileView fileView = new ExampleFileView();
+                fileView.putIcon("jpg", jpgIcon);
+                fileView.putIcon("gif", gifIcon);
+                fc.setFileView(fileView);
+                fc.addChoosableFileFilter(filter);
+
+                // add preview accessory
+                fc.setAccessory(new FilePreviewer(fc));
+
+                // remove the approve/cancel buttons
+                fc.setControlButtonsAreShown(false);
+
+                // make custom controls
+                //wokka
+                JPanel custom = new JPanel();
+                custom.setLayout(new BoxLayout(custom, BoxLayout.Y_AXIS));
+                custom.add(Box.createRigidArea(VGAP10));
+                JLabel description = new JLabel(getString("FileChooserDemo.description"));
+                description.setAlignmentX(JLabel.CENTER_ALIGNMENT);
+                custom.add(description);
+                custom.add(Box.createRigidArea(VGAP10));
+                custom.add(fc);
+
+                Action okAction = createOKAction();
+                fc.addActionListener(okAction);
+
+                JPanel buttons = new JPanel();
+                buttons.setLayout(new BoxLayout(buttons, BoxLayout.X_AXIS));
+                buttons.add(Box.createRigidArea(HGAP10));
+                buttons.add(createImageButton(createFindAction()));
+                buttons.add(Box.createRigidArea(HGAP10));
+                buttons.add(createButton(createAboutAction()));
+                buttons.add(Box.createRigidArea(HGAP10));
+                buttons.add(createButton(okAction));
+                buttons.add(Box.createRigidArea(HGAP10));
+                buttons.add(createButton(createCancelAction()));
+                buttons.add(Box.createRigidArea(HGAP10));
+                buttons.add(createImageButton(createHelpAction()));
+                buttons.add(Box.createRigidArea(HGAP10));
+
+                custom.add(buttons);
+                custom.add(Box.createRigidArea(VGAP10));
+
+                // show the filechooser
+                Frame parent = (Frame) SwingUtilities.getAncestorOfClass(Frame.class, getDemoPanel());
+                dialog = new JDialog(parent, getString("FileChooserDemo.dialogtitle"), true);
+                dialog.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
+                dialog.getContentPane().add(custom, BorderLayout.CENTER);
+                dialog.pack();
+                dialog.setLocationRelativeTo(getDemoPanel());
+                dialog.show();
+            }
+        };
+        return createButton(a);
+    }
+
+    public Action createAboutAction() {
+        return new AbstractAction(getString("FileChooserDemo.about")) {
+            public void actionPerformed(ActionEvent e) {
+                File file = fc.getSelectedFile();
+                String text;
+                if(file == null) {
+                    text = getString("FileChooserDemo.nofileselected");
+                } else {
+                    text = "<html>" + getString("FileChooserDemo.thefile");
+                    text += "<br><font color=green>" + file.getName() + "</font><br>";
+                    text += getString("FileChooserDemo.isprobably") + "</html>";
+                }
+                JOptionPane.showMessageDialog(getDemoPanel(), text);
+            }
+        };
+    }
+
+    public Action createOKAction() {
+        return new AbstractAction(getString("FileChooserDemo.ok")) {
+            public void actionPerformed(ActionEvent e) {
+                dialog.dispose();
+                if (!e.getActionCommand().equals(JFileChooser.CANCEL_SELECTION)
+                    && fc.getSelectedFile() != null) {
+
+                    loadImage(fc.getSelectedFile().getPath());
+                }
+            }
+        };
+    }
+
+    public Action createCancelAction() {
+        return new AbstractAction(getString("FileChooserDemo.cancel")) {
+            public void actionPerformed(ActionEvent e) {
+                dialog.dispose();
+            }
+        };
+    }
+
+    public Action createFindAction() {
+        Icon icon = createImageIcon("filechooser/find.gif", getString("FileChooserDemo.find"));
+        return new AbstractAction("", icon) {
+            public void actionPerformed(ActionEvent e) {
+                String result = JOptionPane.showInputDialog(getDemoPanel(), getString("FileChooserDemo.findquestion"));
+                if (result != null) {
+                    JOptionPane.showMessageDialog(getDemoPanel(), getString("FileChooserDemo.findresponse"));
+                }
+            }
+        };
+    }
+
+    public Action createHelpAction() {
+        Icon icon = createImageIcon("filechooser/help.gif", getString("FileChooserDemo.help"));
+        return new AbstractAction("", icon) {
+            public void actionPerformed(ActionEvent e) {
+                JOptionPane.showMessageDialog(getDemoPanel(), getString("FileChooserDemo.helptext"));
+            }
+        };
+    }
+
+    class MyImageIcon extends ImageIcon {
+        public MyImageIcon(String filename) {
+            super(filename);
+        };
+        public synchronized void paintIcon(Component c, Graphics g, int x, int y) {
+            g.setColor(Color.white);
+            g.fillRect(0,0, c.getWidth(), c.getHeight());
+            if(getImageObserver() == null) {
+                g.drawImage(
+                    getImage(),
+                    c.getWidth()/2 - getIconWidth()/2,
+                    c.getHeight()/2 - getIconHeight()/2,
+                    c
+                );
+            } else {
+                g.drawImage(
+                    getImage(),
+                    c.getWidth()/2 - getIconWidth()/2,
+                    c.getHeight()/2 - getIconHeight()/2,
+                    getImageObserver()
+                );
+            }
+        }
+    }
+
+    public void loadImage(String filename) {
+        theImage.setIcon(new MyImageIcon(filename));
+    }
+
+    public JButton createButton(Action a) {
+        JButton b = new JButton(a) {
+            public Dimension getMaximumSize() {
+                int width = Short.MAX_VALUE;
+                int height = super.getMaximumSize().height;
+                return new Dimension(width, height);
+            }
+        };
+        return b;
+    }
+
+    public JButton createImageButton(Action a) {
+        JButton b = new JButton(a);
+        b.setMargin(new Insets(0,0,0,0));
+        return b;
+    }
+}
+
+class FilePreviewer extends JComponent implements PropertyChangeListener {
+    ImageIcon thumbnail = null;
+
+    public FilePreviewer(JFileChooser fc) {
+        setPreferredSize(new Dimension(100, 50));
+        fc.addPropertyChangeListener(this);
+        setBorder(new BevelBorder(BevelBorder.LOWERED));
+    }
+
+    public void loadImage(File f) {
+        if (f == null) {
+            thumbnail = null;
+        } else {
+            ImageIcon tmpIcon = new ImageIcon(f.getPath());
+            if(tmpIcon.getIconWidth() > 90) {
+                thumbnail = new ImageIcon(
+                    tmpIcon.getImage().getScaledInstance(90, -1, Image.SCALE_DEFAULT));
+            } else {
+                thumbnail = tmpIcon;
+            }
+        }
+    }
+
+    public void propertyChange(PropertyChangeEvent e) {
+        String prop = e.getPropertyName();
+        if(prop == JFileChooser.SELECTED_FILE_CHANGED_PROPERTY) {
+            if(isShowing()) {
+                loadImage((File) e.getNewValue());
+                repaint();
+            }
+        }
+    }
+
+    public void paint(Graphics g) {
+        super.paint(g);
+        if(thumbnail != null) {
+            int x = getWidth()/2 - thumbnail.getIconWidth()/2;
+            int y = getHeight()/2 - thumbnail.getIconHeight()/2;
+            if(y < 0) {
+                y = 0;
+            }
+
+            if(x < 5) {
+                x = 5;
+            }
+            thumbnail.paintIcon(this, g, x, y);
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/demo/share/jfc/SwingSet2/HtmlDemo.java	Fri Apr 06 03:53:28 2018 +0200
@@ -0,0 +1,129 @@
+/*
+ *
+ * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ *   - Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ *
+ *   - Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ *
+ *   - Neither the name of Oracle nor the names of its
+ *     contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+ * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+
+import javax.swing.*;
+import javax.swing.event.*;
+import javax.swing.text.*;
+import javax.swing.text.html.*;
+import javax.swing.border.*;
+import javax.swing.colorchooser.*;
+import javax.swing.filechooser.*;
+import javax.accessibility.*;
+
+import java.awt.*;
+import java.awt.event.*;
+import java.beans.*;
+import java.util.*;
+import java.io.*;
+import java.applet.*;
+import java.net.*;
+
+/**
+ * Html Demo
+ *
+ * @author Jeff Dinkins
+ */
+public class HtmlDemo extends DemoModule {
+
+    JEditorPane html;
+
+    /**
+     * main method allows us to run as a standalone demo.
+     */
+    public static void main(String[] args) {
+        HtmlDemo demo = new HtmlDemo(null);
+        demo.mainImpl();
+    }
+
+    /**
+     * HtmlDemo Constructor
+     */
+    public HtmlDemo(SwingSet2 swingset) {
+        // Set the title for this demo, and an icon used to represent this
+        // demo inside the SwingSet2 app.
+        super(swingset, "HtmlDemo", "toolbar/JEditorPane.gif");
+
+        try {
+            URL url = null;
+            // System.getProperty("user.dir") +
+            // System.getProperty("file.separator");
+            String path = null;
+            try {
+                path = "/resources/index.html";
+                url = getClass().getResource(path);
+            } catch (Exception e) {
+                System.err.println("Failed to open " + path);
+                url = null;
+            }
+
+            if(url != null) {
+                html = new JEditorPane(url);
+                html.setEditable(false);
+                html.addHyperlinkListener(createHyperLinkListener());
+
+                JScrollPane scroller = new JScrollPane();
+                JViewport vp = scroller.getViewport();
+                vp.add(html);
+                getDemoPanel().add(scroller, BorderLayout.CENTER);
+            }
+        } catch (MalformedURLException e) {
+            System.out.println("Malformed URL: " + e);
+        } catch (IOException e) {
+            System.out.println("IOException: " + e);
+        }
+    }
+
+    public HyperlinkListener createHyperLinkListener() {
+        return new HyperlinkListener() {
+            public void hyperlinkUpdate(HyperlinkEvent e) {
+                if (e.getEventType() == HyperlinkEvent.EventType.ACTIVATED) {
+                    if (e instanceof HTMLFrameHyperlinkEvent) {
+                        ((HTMLDocument)html.getDocument()).processHTMLFrameHyperlinkEvent(
+                            (HTMLFrameHyperlinkEvent)e);
+                    } else {
+                        try {
+                            html.setPage(e.getURL());
+                        } catch (IOException ioe) {
+                            System.out.println("IOE: " + ioe);
+                        }
+                    }
+                }
+            }
+        };
+    }
+
+    void updateDragEnabled(boolean dragEnabled) {
+        html.setDragEnabled(dragEnabled);
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/demo/share/jfc/SwingSet2/InternalFrameDemo.java	Fri Apr 06 03:53:28 2018 +0200
@@ -0,0 +1,342 @@
+/*
+ *
+ * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ *   - Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ *
+ *   - Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ *
+ *   - Neither the name of Oracle nor the names of its
+ *     contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+ * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+
+import javax.swing.*;
+import javax.swing.event.*;
+import javax.swing.text.*;
+import javax.swing.border.*;
+import javax.swing.colorchooser.*;
+import javax.swing.filechooser.*;
+import javax.accessibility.*;
+
+import java.awt.*;
+import java.awt.event.*;
+import java.beans.*;
+import java.util.*;
+import java.io.*;
+import java.applet.*;
+import java.net.*;
+
+/**
+ * Internal Frames Demo
+ *
+ * @author Jeff Dinkins
+ */
+public class InternalFrameDemo extends DemoModule {
+    int windowCount = 0;
+    JDesktopPane desktop = null;
+
+    ImageIcon icon1, icon2, icon3, icon4;
+    ImageIcon smIcon1, smIcon2, smIcon3, smIcon4;
+
+    public Integer FIRST_FRAME_LAYER  = new Integer(1);
+    public Integer DEMO_FRAME_LAYER   = new Integer(2);
+    public Integer PALETTE_LAYER     = new Integer(3);
+
+    public int FRAME0_X        = 15;
+    public int FRAME0_Y        = 280;
+
+    public int FRAME0_WIDTH    = 320;
+    public int FRAME0_HEIGHT   = 230;
+
+    public int FRAME_WIDTH     = 225;
+    public int FRAME_HEIGHT    = 150;
+
+    public int PALETTE_X      = 375;
+    public int PALETTE_Y      = 20;
+
+    public int PALETTE_WIDTH  = 260;
+    public int PALETTE_HEIGHT = 260;
+
+    JCheckBox windowResizable   = null;
+    JCheckBox windowClosable    = null;
+    JCheckBox windowIconifiable = null;
+    JCheckBox windowMaximizable = null;
+
+    JTextField windowTitleField = null;
+    JLabel windowTitleLabel = null;
+
+
+    /**
+     * main method allows us to run as a standalone demo.
+     */
+    public static void main(String[] args) {
+        InternalFrameDemo demo = new InternalFrameDemo(null);
+        demo.mainImpl();
+    }
+
+    /**
+     * InternalFrameDemo Constructor
+     */
+    public InternalFrameDemo(SwingSet2 swingset) {
+        super(swingset, "InternalFrameDemo", "toolbar/JDesktop.gif");
+
+        // preload all the icons we need for this demo
+        icon1 = createImageIcon("misc/toast.gif", getString("InternalFrameDemo.toast"));
+        icon2 = createImageIcon("misc/duke.gif", getString("InternalFrameDemo.duke"));
+        icon3 = createImageIcon("misc/duchess.gif",  getString("InternalFrameDemo.duchess"));
+        icon4 = createImageIcon("misc/cab.gif",  getString("InternalFrameDemo.cab"));
+
+        smIcon1 = createImageIcon("misc/toast_small.gif", getString("InternalFrameDemo.toast"));
+        smIcon2 = createImageIcon("misc/duke_small.gif", getString("InternalFrameDemo.duke"));
+        smIcon3 = createImageIcon("misc/duchess_small.gif",  getString("InternalFrameDemo.duchess"));
+        smIcon4 = createImageIcon("misc/cab_small.gif",  getString("InternalFrameDemo.cab"));
+
+        // Create the desktop pane
+        desktop = new JDesktopPane();
+        getDemoPanel().add(desktop, BorderLayout.CENTER);
+
+        // Create the "frame maker" palette
+        createInternalFramePalette();
+
+        // Create an initial internal frame to show
+        JInternalFrame frame1 = createInternalFrame(icon1, FIRST_FRAME_LAYER, 1, 1);
+        frame1.setBounds(FRAME0_X, FRAME0_Y, FRAME0_WIDTH, FRAME0_HEIGHT);
+
+        // Create four more starter windows
+        createInternalFrame(icon1, DEMO_FRAME_LAYER, FRAME_WIDTH, FRAME_HEIGHT);
+        createInternalFrame(icon3, DEMO_FRAME_LAYER, FRAME_WIDTH, FRAME_HEIGHT);
+        createInternalFrame(icon4, DEMO_FRAME_LAYER, FRAME_WIDTH, FRAME_HEIGHT);
+        createInternalFrame(icon2, DEMO_FRAME_LAYER, FRAME_WIDTH, FRAME_HEIGHT);
+    }
+
+
+
+    /**
+     * Create an internal frame and add a scrollable imageicon to it
+     */
+    public JInternalFrame createInternalFrame(Icon icon, Integer layer, int width, int height) {
+        JInternalFrame jif = new JInternalFrame();
+
+        if(!windowTitleField.getText().equals(getString("InternalFrameDemo.frame_label"))) {
+            jif.setTitle(windowTitleField.getText() + "  ");
+        } else {
+            jif = new JInternalFrame(getString("InternalFrameDemo.frame_label") + " " + windowCount + "  ");
+        }
+
+        // set properties
+        jif.setClosable(windowClosable.isSelected());
+        jif.setMaximizable(windowMaximizable.isSelected());
+        jif.setIconifiable(windowIconifiable.isSelected());
+        jif.setResizable(windowResizable.isSelected());
+
+        jif.setBounds(20*(windowCount%10), 20*(windowCount%10), width, height);
+        jif.setContentPane(new ImageScroller(this, icon, 0, windowCount));
+
+        windowCount++;
+
+        desktop.add(jif, layer);
+
+        // Set this internal frame to be selected
+
+        try {
+            jif.setSelected(true);
+        } catch (java.beans.PropertyVetoException e2) {
+        }
+
+        jif.show();
+
+        return jif;
+    }
+
+    public JInternalFrame createInternalFramePalette() {
+        JInternalFrame palette = new JInternalFrame(
+            getString("InternalFrameDemo.palette_label")
+        );
+        palette.putClientProperty("JInternalFrame.isPalette", Boolean.TRUE);
+        palette.getContentPane().setLayout(new BorderLayout());
+        palette.setBounds(PALETTE_X, PALETTE_Y, PALETTE_WIDTH, PALETTE_HEIGHT);
+        palette.setResizable(true);
+        palette.setIconifiable(true);
+        desktop.add(palette, PALETTE_LAYER);
+
+        // *************************************
+        // * Create create frame maker buttons *
+        // *************************************
+        JButton b1 = new JButton(smIcon1);
+        JButton b2 = new JButton(smIcon2);
+        JButton b3 = new JButton(smIcon3);
+        JButton b4 = new JButton(smIcon4);
+
+        // add frame maker actions
+        b1.addActionListener(new ShowFrameAction(this, icon1));
+        b2.addActionListener(new ShowFrameAction(this, icon2));
+        b3.addActionListener(new ShowFrameAction(this, icon3));
+        b4.addActionListener(new ShowFrameAction(this, icon4));
+
+        // add frame maker buttons to panel
+        JPanel p = new JPanel();
+        p.setLayout(new BoxLayout(p, BoxLayout.Y_AXIS));
+
+        JPanel buttons1 = new JPanel();
+        buttons1.setLayout(new BoxLayout(buttons1, BoxLayout.X_AXIS));
+
+        JPanel buttons2 = new JPanel();
+        buttons2.setLayout(new BoxLayout(buttons2, BoxLayout.X_AXIS));
+
+        buttons1.add(b1);
+        buttons1.add(Box.createRigidArea(HGAP15));
+        buttons1.add(b2);
+
+        buttons2.add(b3);
+        buttons2.add(Box.createRigidArea(HGAP15));
+        buttons2.add(b4);
+
+        p.add(Box.createRigidArea(VGAP10));
+        p.add(buttons1);
+        p.add(Box.createRigidArea(VGAP15));
+        p.add(buttons2);
+        p.add(Box.createRigidArea(VGAP10));
+
+        palette.getContentPane().add(p, BorderLayout.NORTH);
+
+        // ************************************
+        // * Create frame property checkboxes *
+        // ************************************
+        p = new JPanel() {
+            Insets insets = new Insets(10,15,10,5);
+            public Insets getInsets() {
+                return insets;
+            }
+        };
+        p.setLayout(new GridLayout(1,2));
+
+
+        Box box = new Box(BoxLayout.Y_AXIS);
+        windowResizable   = new JCheckBox(getString("InternalFrameDemo.resizable_label"), true);
+        windowIconifiable = new JCheckBox(getString("InternalFrameDemo.iconifiable_label"), true);
+
+        box.add(Box.createGlue());
+        box.add(windowResizable);
+        box.add(windowIconifiable);
+        box.add(Box.createGlue());
+        p.add(box);
+
+        box = new Box(BoxLayout.Y_AXIS);
+        windowClosable    = new JCheckBox(getString("InternalFrameDemo.closable_label"), true);
+        windowMaximizable = new JCheckBox(getString("InternalFrameDemo.maximizable_label"), true);
+
+        box.add(Box.createGlue());
+        box.add(windowClosable);
+        box.add(windowMaximizable);
+        box.add(Box.createGlue());
+        p.add(box);
+
+        palette.getContentPane().add(p, BorderLayout.CENTER);
+
+
+        // ************************************
+        // *   Create Frame title textfield   *
+        // ************************************
+        p = new JPanel() {
+            Insets insets = new Insets(0,0,10,0);
+            public Insets getInsets() {
+                return insets;
+            }
+        };
+
+        windowTitleField = new JTextField(getString("InternalFrameDemo.frame_label"));
+        windowTitleLabel = new JLabel(getString("InternalFrameDemo.title_text_field_label"));
+
+        p.setLayout(new BoxLayout(p, BoxLayout.X_AXIS));
+        p.add(Box.createRigidArea(HGAP5));
+        p.add(windowTitleLabel, BorderLayout.WEST);
+        p.add(Box.createRigidArea(HGAP5));
+        p.add(windowTitleField, BorderLayout.CENTER);
+        p.add(Box.createRigidArea(HGAP5));
+
+        palette.getContentPane().add(p, BorderLayout.SOUTH);
+
+        palette.show();
+
+        return palette;
+    }
+
+
+    class ShowFrameAction extends AbstractAction {
+        InternalFrameDemo demo;
+        Icon icon;
+
+
+        public ShowFrameAction(InternalFrameDemo demo, Icon icon) {
+            this.demo = demo;
+            this.icon = icon;
+        }
+
+        public void actionPerformed(ActionEvent e) {
+            demo.createInternalFrame(icon,
+                                     getDemoFrameLayer(),
+                                     getFrameWidth(),
+                                     getFrameHeight()
+            );
+        }
+    }
+
+    public int getFrameWidth() {
+        return FRAME_WIDTH;
+    }
+
+    public int getFrameHeight() {
+        return FRAME_HEIGHT;
+    }
+
+    public Integer getDemoFrameLayer() {
+        return DEMO_FRAME_LAYER;
+    }
+
+    class ImageScroller extends JScrollPane {
+
+        public ImageScroller(InternalFrameDemo demo, Icon icon, int layer, int count) {
+            super();
+            JPanel p = new JPanel();
+            p.setBackground(Color.white);
+            p.setLayout(new BorderLayout() );
+
+            p.add(new JLabel(icon), BorderLayout.CENTER);
+
+            getViewport().add(p);
+            getHorizontalScrollBar().setUnitIncrement(10);
+            getVerticalScrollBar().setUnitIncrement(10);
+        }
+
+        public Dimension getMinimumSize() {
+            return new Dimension(25, 25);
+        }
+
+    }
+
+    void updateDragEnabled(boolean dragEnabled) {
+        windowTitleField.setDragEnabled(dragEnabled);
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/demo/share/jfc/SwingSet2/LayoutControlPanel.java	Fri Apr 06 03:53:28 2018 +0200
@@ -0,0 +1,334 @@
+/*
+ *
+ * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ *   - Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ *
+ *   - Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ *
+ *   - Neither the name of Oracle nor the names of its
+ *     contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+ * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+import javax.swing.*;
+import javax.swing.text.*;
+import javax.swing.border.*;
+
+import java.awt.*;
+import java.awt.event.*;
+import java.util.*;
+
+/*
+ * The LayoutControlPanel contains controls for setting an
+ * AbstractButton's horizontal and vertical text position and
+ * horizontal and vertical alignment.
+ */
+
+public class LayoutControlPanel extends JPanel implements SwingConstants {
+
+    private boolean  absolutePositions;
+    private DirectionPanel textPosition = null;
+    private DirectionPanel labelAlignment = null;
+    private ButtonDemo demo = null;
+
+    // private ComponentOrientChanger componentOrientChanger = null;
+
+    LayoutControlPanel(ButtonDemo demo) {
+        this.demo = demo;
+
+        // this.componentOrientationChanger = componentOrientationChanger;
+
+        setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));
+        setAlignmentX(LEFT_ALIGNMENT);
+        setAlignmentY(TOP_ALIGNMENT);
+
+        JLabel l;
+
+        // If SwingSet has a ComponentOrientationChanger, then include control
+        // for choosing between absolute and relative positioning.  This will
+        // only happen when we're running on JDK 1.2 or above.
+        //
+        // if(componentOrientationChanger != null ) {
+        //     l = new JLabel("Positioning:");
+        //     add(l);
+        //
+        //    ButtonGroup group = new ButtonGroup();
+        //    PositioningListener positioningListener = new PositioningListener();
+        //    JRadioButton absolutePos = new JRadioButton("Absolute");
+        //    absolutePos.setMnemonic('a');
+        //    absolutePos.setToolTipText("Text/Content positioning is independant of line direction");
+        //    group.add(absolutePos);
+        //    absolutePos.addItemListener(positioningListener);
+        //    add(absolutePos);
+        //
+        //    JRadioButton relativePos = new JRadioButton("Relative");
+        //    relativePos.setMnemonic('r');
+        //    relativePos.setToolTipText("Text/Content positioning depends on line direction.");
+        //    group.add(relativePos);
+        //    relativePos.addItemListener(positioningListener);
+        //    add(relativePos);
+        //
+        //    add(Box.createRigidArea(demo.VGAP20));
+        //
+        //    absolutePositions = false;
+        //    relativePos.setSelected(true);
+        //
+        //    componentOrientationChanger.addActionListener( new OrientationChangeListener() );
+        //} else {
+            absolutePositions = true;
+        //}
+
+        textPosition = new DirectionPanel(true, "E", new TextPositionListener());
+        labelAlignment = new DirectionPanel(true, "C", new LabelAlignmentListener());
+
+        // Make sure the controls' text position and label alignment match
+        // the initial value of the associated direction panel.
+        for(int i = 0; i < demo.getCurrentControls().size(); i++) {
+            Component c = (Component) demo.getCurrentControls().elementAt(i);
+            setPosition(c, RIGHT, CENTER);
+            setAlignment(c,CENTER,CENTER);
+        }
+
+        l = new JLabel(demo.getString("LayoutControlPanel.textposition_label"));
+        add(l);
+        add(textPosition);
+
+        add(Box.createRigidArea(demo.VGAP20));
+
+        l = new JLabel(demo.getString("LayoutControlPanel.contentalignment_label"));
+        add(l);
+        add(labelAlignment);
+
+        add(Box.createGlue());
+    }
+
+
+    class OrientationChangeListener implements ActionListener {
+        public void actionPerformed( ActionEvent e ) {
+            if( !e.getActionCommand().equals("OrientationChanged") ){
+                return;
+            }
+            if( absolutePositions ){
+                return;
+            }
+
+            String currentTextPosition = textPosition.getSelection();
+            if( currentTextPosition.equals("NW") )
+                textPosition.setSelection("NE");
+            else if( currentTextPosition.equals("NE") )
+                textPosition.setSelection("NW");
+            else if( currentTextPosition.equals("E") )
+                textPosition.setSelection("W");
+            else if( currentTextPosition.equals("W") )
+                textPosition.setSelection("E");
+            else if( currentTextPosition.equals("SE") )
+                textPosition.setSelection("SW");
+            else if( currentTextPosition.equals("SW") )
+                textPosition.setSelection("SE");
+
+            String currentLabelAlignment = labelAlignment.getSelection();
+            if( currentLabelAlignment.equals("NW") )
+                labelAlignment.setSelection("NE");
+            else if( currentLabelAlignment.equals("NE") )
+                labelAlignment.setSelection("NW");
+            else if( currentLabelAlignment.equals("E") )
+                labelAlignment.setSelection("W");
+            else if( currentLabelAlignment.equals("W") )
+                labelAlignment.setSelection("E");
+            else if( currentLabelAlignment.equals("SE") )
+                labelAlignment.setSelection("SW");
+            else if( currentLabelAlignment.equals("SW") )
+                labelAlignment.setSelection("SE");
+        }
+    }
+
+    class PositioningListener implements ItemListener {
+
+        public void itemStateChanged(ItemEvent e) {
+            JRadioButton rb = (JRadioButton) e.getSource();
+            if(rb.getText().equals("Absolute") && rb.isSelected()) {
+                absolutePositions = true;
+            } else if(rb.getText().equals("Relative") && rb.isSelected()) {
+                absolutePositions = false;
+            }
+
+            for(int i = 0; i < demo.getCurrentControls().size(); i++) {
+                Component c = (Component) demo.getCurrentControls().elementAt(i);
+                int hPos, vPos, hAlign, vAlign;
+                if( c instanceof AbstractButton ) {
+                   hPos = ((AbstractButton)c).getHorizontalTextPosition();
+                   vPos = ((AbstractButton)c).getVerticalTextPosition();
+                   hAlign = ((AbstractButton)c).getHorizontalAlignment();
+                   vAlign = ((AbstractButton)c).getVerticalAlignment();
+                } else if( c instanceof JLabel ) {
+                   hPos = ((JLabel)c).getHorizontalTextPosition();
+                   vPos = ((JLabel)c).getVerticalTextPosition();
+                   hAlign = ((JLabel)c).getHorizontalAlignment();
+                   vAlign = ((JLabel)c).getVerticalAlignment();
+                } else {
+                    continue;
+                }
+                setPosition(c, hPos, vPos);
+                setAlignment(c, hAlign, vAlign);
+            }
+
+            demo.invalidate();
+            demo.validate();
+            demo.repaint();
+        }
+    };
+
+
+    // Text Position Listener
+    class TextPositionListener implements ActionListener {
+        public void actionPerformed(ActionEvent e) {
+            JRadioButton rb = (JRadioButton) e.getSource();
+            if(!rb.isSelected()) {
+                return;
+            }
+            String cmd = rb.getActionCommand();
+            int hPos, vPos;
+            if(cmd.equals("NW")) {
+                    hPos = LEFT; vPos = TOP;
+            } else if(cmd.equals("N")) {
+                    hPos = CENTER; vPos = TOP;
+            } else if(cmd.equals("NE")) {
+                    hPos = RIGHT; vPos = TOP;
+            } else if(cmd.equals("W")) {
+                    hPos = LEFT; vPos = CENTER;
+            } else if(cmd.equals("C")) {
+                    hPos = CENTER; vPos = CENTER;
+            } else if(cmd.equals("E")) {
+                    hPos = RIGHT; vPos = CENTER;
+            } else if(cmd.equals("SW")) {
+                    hPos = LEFT; vPos = BOTTOM;
+            } else if(cmd.equals("S")) {
+                    hPos = CENTER; vPos = BOTTOM;
+            } else /*if(cmd.equals("SE"))*/ {
+                    hPos = RIGHT; vPos = BOTTOM;
+            }
+            for(int i = 0; i < demo.getCurrentControls().size(); i++) {
+                Component c = (Component) demo.getCurrentControls().elementAt(i);
+                setPosition(c, hPos, vPos);
+            }
+            demo.invalidate();
+            demo.validate();
+            demo.repaint();
+        }
+    };
+
+
+    // Label Alignment Listener
+    class LabelAlignmentListener implements  ActionListener {
+        public void actionPerformed(ActionEvent e) {
+            JRadioButton rb = (JRadioButton) e.getSource();
+            if(!rb.isSelected()) {
+                return;
+            }
+            String cmd = rb.getActionCommand();
+            int hPos, vPos;
+            if(cmd.equals("NW")) {
+                    hPos = LEFT; vPos = TOP;
+            } else if(cmd.equals("N")) {
+                    hPos = CENTER; vPos = TOP;
+            } else if(cmd.equals("NE")) {
+                    hPos = RIGHT; vPos = TOP;
+            } else if(cmd.equals("W")) {
+                    hPos = LEFT; vPos = CENTER;
+            } else if(cmd.equals("C")) {
+                    hPos = CENTER; vPos = CENTER;
+            } else if(cmd.equals("E")) {
+                    hPos = RIGHT; vPos = CENTER;
+            } else if(cmd.equals("SW")) {
+                    hPos = LEFT; vPos = BOTTOM;
+            } else if(cmd.equals("S")) {
+                    hPos = CENTER; vPos = BOTTOM;
+            } else /*if(cmd.equals("SE"))*/ {
+                    hPos = RIGHT; vPos = BOTTOM;
+            }
+            for(int i = 0; i < demo.getCurrentControls().size(); i++) {
+                Component c = (Component) demo.getCurrentControls().elementAt(i);
+                setAlignment(c,hPos,vPos);
+                c.invalidate();
+            }
+            demo.invalidate();
+            demo.validate();
+            demo.repaint();
+        }
+    };
+
+    // Position
+    void setPosition(Component c, int hPos, int vPos) {
+        boolean ltr = true;
+        ltr = c.getComponentOrientation().isLeftToRight();
+        if( absolutePositions ) {
+            if( hPos == LEADING ) {
+                hPos = ltr ? LEFT : RIGHT;
+            } else if( hPos == TRAILING ) {
+                hPos = ltr ? RIGHT : LEFT;
+            }
+        } else {
+            if( hPos == LEFT ) {
+                hPos = ltr ? LEADING : TRAILING;
+            } else if( hPos == RIGHT ) {
+                hPos = ltr ? TRAILING : LEADING;
+            }
+        }
+        if(c instanceof AbstractButton) {
+            AbstractButton x = (AbstractButton) c;
+            x.setHorizontalTextPosition(hPos);
+            x.setVerticalTextPosition(vPos);
+        } else if(c instanceof JLabel) {
+            JLabel x = (JLabel) c;
+            x.setHorizontalTextPosition(hPos);
+            x.setVerticalTextPosition(vPos);
+        }
+    }
+
+    void setAlignment(Component c, int hPos, int vPos) {
+        boolean ltr = true;
+        ltr = c.getComponentOrientation().isLeftToRight();
+        if( absolutePositions ) {
+            if( hPos == LEADING ) {
+                hPos = ltr ? LEFT : RIGHT;
+            } else if( hPos == TRAILING ) {
+                hPos = ltr ? RIGHT : LEFT;
+            }
+        } else {
+            if( hPos == LEFT ) {
+                hPos = ltr ? LEADING : TRAILING;
+            } else if( hPos == RIGHT ) {
+                hPos = ltr ? TRAILING : LEADING;
+            }
+        }
+        if(c instanceof AbstractButton) {
+            AbstractButton x = (AbstractButton) c;
+            x.setHorizontalAlignment(hPos);
+            x.setVerticalAlignment(vPos);
+        } else if(c instanceof JLabel) {
+            JLabel x = (JLabel) c;
+            x.setHorizontalAlignment(hPos);
+            x.setVerticalAlignment(vPos);
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/demo/share/jfc/SwingSet2/ListDemo.java	Fri Apr 06 03:53:28 2018 +0200
@@ -0,0 +1,379 @@
+/*
+ *
+ * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ *   - Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ *
+ *   - Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ *
+ *   - Neither the name of Oracle nor the names of its
+ *     contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+ * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+
+import javax.swing.*;
+import javax.swing.event.*;
+import javax.swing.text.*;
+import javax.swing.border.*;
+import javax.swing.colorchooser.*;
+import javax.swing.filechooser.*;
+import javax.accessibility.*;
+
+import java.awt.*;
+import java.awt.event.*;
+import java.beans.*;
+import java.util.*;
+import java.io.*;
+import java.applet.*;
+import java.net.*;
+
+/**
+ * List Demo. This demo shows that it is not
+ * always necessary to have an array of objects
+ * as big as the size of the list stored.
+ *
+ * Indeed, in this example, there is no array
+ * kept for the list data, rather it is generated
+ * on the fly as only those elements are needed.
+ *
+ * @author Jeff Dinkins
+ */
+public class ListDemo extends DemoModule {
+    JList list;
+
+    JPanel prefixList;
+    JPanel suffixList;
+
+    Action prefixAction;
+    Action suffixAction;
+
+    GeneratedListModel listModel;
+
+    Vector checkboxes = new Vector();
+
+    /**
+     * main method allows us to run as a standalone demo.
+     */
+    public static void main(String[] args) {
+        ListDemo demo = new ListDemo(null);
+        demo.mainImpl();
+    }
+
+    /**
+     * ListDemo Constructor
+     */
+    public ListDemo(SwingSet2 swingset) {
+        super(swingset, "ListDemo", "toolbar/JList.gif");
+
+        loadImages();
+
+        JLabel description = new JLabel(getString("ListDemo.description"));
+        getDemoPanel().add(description, BorderLayout.NORTH);
+
+        JPanel centerPanel = new JPanel();
+        centerPanel.setLayout(new BoxLayout(centerPanel, BoxLayout.X_AXIS));
+        centerPanel.add(Box.createRigidArea(HGAP10));
+        getDemoPanel().add(centerPanel, BorderLayout.CENTER);
+
+        JPanel listPanel = new JPanel();
+        listPanel.setLayout(new BoxLayout(listPanel, BoxLayout.Y_AXIS));
+        listPanel.add(Box.createRigidArea(VGAP10));
+
+        centerPanel.add(listPanel);
+        centerPanel.add(Box.createRigidArea(HGAP30));
+
+        // Create the list
+        list = new JList();
+        list.setCellRenderer(new CompanyLogoListCellRenderer());
+        listModel = new GeneratedListModel(this);
+        list.setModel(listModel);
+
+        // Set the preferred row count. This affects the preferredSize
+        // of the JList when it's in a scrollpane.
+        list.setVisibleRowCount(22);
+
+        // Add list to a scrollpane
+        JScrollPane scrollPane = new JScrollPane(list);
+        listPanel.add(scrollPane);
+        listPanel.add(Box.createRigidArea(VGAP10));
+
+        // Add the control panel (holds the prefix/suffix list and prefix/suffix checkboxes)
+        centerPanel.add(createControlPanel());
+
+        // create prefixes and suffixes
+        addPrefix("Tera", true);
+        addPrefix("Micro", false);
+        addPrefix("Southern", false);
+        addPrefix("Net", true);
+        addPrefix("YoYo", true);
+        addPrefix("Northern", false);
+        addPrefix("Tele", false);
+        addPrefix("Eastern", false);
+        addPrefix("Neo", false);
+        addPrefix("Digi", false);
+        addPrefix("National", false);
+        addPrefix("Compu", true);
+        addPrefix("Meta", true);
+        addPrefix("Info", false);
+        addPrefix("Western", false);
+        addPrefix("Data", false);
+        addPrefix("Atlantic", false);
+        addPrefix("Advanced", false);
+        addPrefix("Euro", false);
+        addPrefix("Pacific", false);
+        addPrefix("Mobile", false);
+        addPrefix("In", false);
+        addPrefix("Computa", false);
+        addPrefix("Digital", false);
+        addPrefix("Analog", false);
+
+        addSuffix("Tech", true);
+        addSuffix("Soft", true);
+        addSuffix("Telecom", true);
+        addSuffix("Solutions", false);
+        addSuffix("Works", true);
+        addSuffix("Dyne", false);
+        addSuffix("Services", false);
+        addSuffix("Vers", false);
+        addSuffix("Devices", false);
+        addSuffix("Software", false);
+        addSuffix("Serv", false);
+        addSuffix("Systems", true);
+        addSuffix("Dynamics", true);
+        addSuffix("Net", false);
+        addSuffix("Sys", false);
+        addSuffix("Computing", false);
+        addSuffix("Scape", false);
+        addSuffix("Com", false);
+        addSuffix("Ware", false);
+        addSuffix("Widgets", false);
+        addSuffix("Media", false);
+        addSuffix("Computer", false);
+        addSuffix("Hardware", false);
+        addSuffix("Gizmos", false);
+        addSuffix("Concepts", false);
+    }
+
+    void updateDragEnabled(boolean dragEnabled) {
+        list.setDragEnabled(dragEnabled);
+    }
+
+    public JPanel createControlPanel() {
+        JPanel controlPanel = new JPanel() {
+            Insets insets = new Insets(0, 4, 10, 10);
+            public Insets getInsets() {
+                return insets;
+            }
+        };
+        controlPanel.setLayout(new BoxLayout(controlPanel, BoxLayout.X_AXIS));
+
+        JPanel prefixPanel = new JPanel();
+        prefixPanel.setLayout(new BoxLayout(prefixPanel, BoxLayout.Y_AXIS));
+        prefixPanel.add(new JLabel(getString("ListDemo.prefixes")));
+
+        JPanel suffixPanel = new JPanel();
+        suffixPanel.setLayout(new BoxLayout(suffixPanel, BoxLayout.Y_AXIS));
+        suffixPanel.add(new JLabel(getString("ListDemo.suffixes")));
+
+        prefixList = new JPanel() {
+            Insets insets = new Insets(0, 4, 0, 0);
+            public Insets getInsets() {
+                return insets;
+            }
+        };
+        prefixList.setLayout(new BoxLayout(prefixList, BoxLayout.Y_AXIS));
+        JScrollPane scrollPane = new JScrollPane(prefixList);
+        scrollPane.getVerticalScrollBar().setUnitIncrement(10);
+        prefixPanel.add(scrollPane);
+        prefixPanel.add(Box.createRigidArea(HGAP10));
+
+        suffixList = new JPanel() {
+            Insets insets = new Insets(0, 4, 0, 0);
+            public Insets getInsets() {
+                return insets;
+            }
+        };
+        suffixList.setLayout(new BoxLayout(suffixList, BoxLayout.Y_AXIS));
+        scrollPane = new JScrollPane(suffixList);
+        scrollPane.getVerticalScrollBar().setUnitIncrement(10);
+        suffixPanel.add(scrollPane);
+        suffixPanel.add(Box.createRigidArea(HGAP10));
+
+        controlPanel.add(prefixPanel);
+        controlPanel.add(Box.createRigidArea(HGAP15));
+        controlPanel.add(suffixPanel);
+        return controlPanel;
+    }
+
+    private FocusListener listFocusListener = new FocusAdapter() {
+        public void focusGained(FocusEvent e) {
+            JComponent c = (JComponent)e.getComponent();
+            c.scrollRectToVisible(new Rectangle(0, 0, c.getWidth(), c.getHeight()));
+        }
+    };
+
+    public void addPrefix(String prefix, boolean selected) {
+        if(prefixAction == null) {
+            prefixAction = new UpdatePrefixListAction(listModel);
+        }
+        final JCheckBox cb = (JCheckBox) prefixList.add(new JCheckBox(prefix));
+        checkboxes.addElement(cb);
+        cb.setSelected(selected);
+        cb.addActionListener(prefixAction);
+        if(selected) {
+            listModel.addPrefix(prefix);
+        }
+        cb.addFocusListener(listFocusListener);
+    }
+
+    public void addSuffix(String suffix, boolean selected) {
+        if(suffixAction == null) {
+            suffixAction = new UpdateSuffixListAction(listModel);
+        }
+        final JCheckBox cb = (JCheckBox) suffixList.add(new JCheckBox(suffix));
+        checkboxes.addElement(cb);
+        cb.setSelected(selected);
+        cb.addActionListener(suffixAction);
+        if(selected) {
+            listModel.addSuffix(suffix);
+        }
+        cb.addFocusListener(listFocusListener);
+    }
+
+    class UpdatePrefixListAction extends AbstractAction {
+        GeneratedListModel listModel;
+        protected UpdatePrefixListAction(GeneratedListModel listModel) {
+            this.listModel = listModel;
+        }
+
+        public void actionPerformed(ActionEvent e) {
+            JCheckBox cb = (JCheckBox) e.getSource();
+            if(cb.isSelected()) {
+                listModel.addPrefix(cb.getText());
+            } else {
+                listModel.removePrefix(cb.getText());
+            }
+        }
+    }
+
+    class UpdateSuffixListAction extends AbstractAction {
+        GeneratedListModel listModel;
+        protected UpdateSuffixListAction(GeneratedListModel listModel) {
+            this.listModel = listModel;
+        }
+
+        public void actionPerformed(ActionEvent e) {
+            JCheckBox cb = (JCheckBox) e.getSource();
+            if(cb.isSelected()) {
+                listModel.addSuffix(cb.getText());
+            } else {
+                listModel.removeSuffix(cb.getText());
+            }
+        }
+    }
+
+
+    class GeneratedListModel extends AbstractListModel {
+        ListDemo demo;
+        Permuter permuter;
+
+        public Vector prefix = new Vector();
+        public Vector suffix = new Vector();
+
+        public GeneratedListModel (ListDemo demo) {
+            this.demo = demo;
+        }
+
+        private void update() {
+            permuter = new Permuter(getSize());
+            fireContentsChanged(this, 0, getSize());
+        }
+
+        public void addPrefix(String s) {
+            if(!prefix.contains(s)) {
+                prefix.addElement(s);
+                update();
+            }
+        }
+
+        public void removePrefix(String s) {
+            prefix.removeElement(s);
+            update();
+        }
+
+        public void addSuffix(String s) {
+            if(!suffix.contains(s)) {
+                suffix.addElement(s);
+                update();
+            }
+        }
+
+        public void removeSuffix(String s) {
+            suffix.removeElement(s);
+            update();
+        }
+
+        public int getSize() {
+            return prefix.size() * suffix.size();
+        }
+
+        public Object getElementAt(int index) {
+            if(permuter == null) {
+                update();
+            }
+            // morph the index to another int -- this has the benefit of
+            // causing the list to look random.
+            int j = permuter.map(index);
+            int ps = prefix.size();
+            int ss = suffix.size();
+            return (String) prefix.elementAt(j%ps) + (String) suffix.elementAt((j/ps)%ss);
+        }
+    }
+
+    ImageIcon images[] = new ImageIcon[7];
+    void loadImages() {
+            images[0] = createImageIcon("list/red.gif",  getString("ListDemo.red"));
+            images[1] = createImageIcon("list/blue.gif",  getString("ListDemo.blue"));
+            images[2] = createImageIcon("list/yellow.gif",  getString("ListDemo.yellow"));
+            images[3] = createImageIcon("list/green.gif",  getString("ListDemo.green"));
+            images[4] = createImageIcon("list/gray.gif",  getString("ListDemo.gray"));
+            images[5] = createImageIcon("list/cyan.gif",  getString("ListDemo.cyan"));
+            images[6] = createImageIcon("list/magenta.gif",  getString("ListDemo.magenta"));
+    }
+
+    class CompanyLogoListCellRenderer extends DefaultListCellRenderer {
+       public Component getListCellRendererComponent(
+            JList list,
+            Object value,
+            int index,
+            boolean isSelected,
+            boolean cellHasFocus)
+        {
+            Component retValue = super.getListCellRendererComponent(
+                list, value, index, isSelected, cellHasFocus
+            );
+            setIcon(images[index%7]);
+            return retValue;
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/demo/share/jfc/SwingSet2/OptionPaneDemo.java	Fri Apr 06 03:53:28 2018 +0200
@@ -0,0 +1,231 @@
+/*
+ *
+ * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ *   - Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ *
+ *   - Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ *
+ *   - Neither the name of Oracle nor the names of its
+ *     contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+ * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+
+import javax.swing.*;
+import javax.swing.event.*;
+import javax.swing.text.*;
+import javax.swing.border.*;
+import javax.swing.colorchooser.*;
+import javax.swing.filechooser.*;
+import javax.accessibility.*;
+
+import java.awt.*;
+import java.awt.event.*;
+import java.beans.*;
+import java.util.*;
+import java.io.*;
+import java.applet.*;
+import java.net.*;
+
+/**
+ * JOptionPaneDemo
+ *
+ * @author Jeff Dinkins
+ */
+public class OptionPaneDemo extends DemoModule {
+
+    /**
+     * main method allows us to run as a standalone demo.
+     */
+    public static void main(String[] args) {
+        OptionPaneDemo demo = new OptionPaneDemo(null);
+        demo.mainImpl();
+    }
+
+    /**
+     * OptionPaneDemo Constructor
+     */
+    public OptionPaneDemo(SwingSet2 swingset) {
+        // Set the title for this demo, and an icon used to represent this
+        // demo inside the SwingSet2 app.
+        super(swingset, "OptionPaneDemo", "toolbar/JOptionPane.gif");
+
+        JPanel demo = getDemoPanel();
+
+        demo.setLayout(new BoxLayout(demo, BoxLayout.X_AXIS));
+
+        JPanel bp = new JPanel() {
+            public Dimension getMaximumSize() {
+                return new Dimension(getPreferredSize().width, super.getMaximumSize().height);
+            }
+        };
+        bp.setLayout(new BoxLayout(bp, BoxLayout.Y_AXIS));
+
+        bp.add(Box.createRigidArea(VGAP30));
+        bp.add(Box.createRigidArea(VGAP30));
+
+        bp.add(createInputDialogButton());      bp.add(Box.createRigidArea(VGAP15));
+        bp.add(createWarningDialogButton());    bp.add(Box.createRigidArea(VGAP15));
+        bp.add(createMessageDialogButton());    bp.add(Box.createRigidArea(VGAP15));
+        bp.add(createComponentDialogButton());  bp.add(Box.createRigidArea(VGAP15));
+        bp.add(createConfirmDialogButton());    bp.add(Box.createVerticalGlue());
+
+        demo.add(Box.createHorizontalGlue());
+        demo.add(bp);
+        demo.add(Box.createHorizontalGlue());
+    }
+
+    public JButton createWarningDialogButton() {
+        Action a = new AbstractAction(getString("OptionPaneDemo.warningbutton")) {
+            public void actionPerformed(ActionEvent e) {
+                JOptionPane.showMessageDialog(
+                    getDemoPanel(),
+                    getString("OptionPaneDemo.warningtext"),
+                    getString("OptionPaneDemo.warningtitle"),
+                    JOptionPane.WARNING_MESSAGE
+                );
+            }
+        };
+        return createButton(a);
+    }
+
+    public JButton createMessageDialogButton() {
+        Action a = new AbstractAction(getString("OptionPaneDemo.messagebutton")) {
+            URL img = getClass().getResource("/resources/images/optionpane/bottle.gif");
+            String imagesrc = "<img src=\"" + img + "\" width=\"284\" height=\"100\">";
+            String message = getString("OptionPaneDemo.messagetext");
+            public void actionPerformed(ActionEvent e) {
+                JOptionPane.showMessageDialog(
+                    getDemoPanel(),
+                    "<html>" + imagesrc + "<br><center>" + message + "</center><br></html>"
+                );
+            }
+        };
+        return createButton(a);
+    }
+
+    public JButton createConfirmDialogButton() {
+        Action a = new AbstractAction(getString("OptionPaneDemo.confirmbutton")) {
+            public void actionPerformed(ActionEvent e) {
+                int result = JOptionPane.showConfirmDialog(getDemoPanel(), getString("OptionPaneDemo.confirmquestion"));
+                if(result == JOptionPane.YES_OPTION) {
+                    JOptionPane.showMessageDialog(getDemoPanel(), getString("OptionPaneDemo.confirmyes"));
+                } else if(result == JOptionPane.NO_OPTION) {
+                    JOptionPane.showMessageDialog(getDemoPanel(), getString("OptionPaneDemo.confirmno"));
+                }
+            }
+        };
+        return createButton(a);
+    }
+
+    public JButton createInputDialogButton() {
+        Action a = new AbstractAction(getString("OptionPaneDemo.inputbutton")) {
+            public void actionPerformed(ActionEvent e) {
+                String result = JOptionPane.showInputDialog(getDemoPanel(), getString("OptionPaneDemo.inputquestion"));
+                if ((result != null) && (result.length() > 0)) {
+                    JOptionPane.showMessageDialog(getDemoPanel(),
+                                    result + ": " +
+                                    getString("OptionPaneDemo.inputresponse"));
+                }
+            }
+        };
+        return createButton(a);
+    }
+
+    public JButton createComponentDialogButton() {
+        Action a = new AbstractAction(getString("OptionPaneDemo.componentbutton")) {
+            public void actionPerformed(ActionEvent e) {
+                // In a ComponentDialog, you can show as many message components and
+                // as many options as you want:
+
+                // Messages
+                Object[]      message = new Object[4];
+                message[0] = getString("OptionPaneDemo.componentmessage");
+                message[1] = new JTextField(getString("OptionPaneDemo.componenttextfield"));
+
+                JComboBox cb = new JComboBox();
+                cb.addItem(getString("OptionPaneDemo.component_cb1"));
+                cb.addItem(getString("OptionPaneDemo.component_cb2"));
+                cb.addItem(getString("OptionPaneDemo.component_cb3"));
+                message[2] = cb;
+
+                message[3] = getString("OptionPaneDemo.componentmessage2");
+
+                // Options
+                String[] options = {
+                    getString("OptionPaneDemo.component_op1"),
+                    getString("OptionPaneDemo.component_op2"),
+                    getString("OptionPaneDemo.component_op3"),
+                    getString("OptionPaneDemo.component_op4"),
+                    getString("OptionPaneDemo.component_op5")
+                };
+                int result = JOptionPane.showOptionDialog(
+                    getDemoPanel(),                             // the parent that the dialog blocks
+                    message,                                    // the dialog message array
+                    getString("OptionPaneDemo.componenttitle"), // the title of the dialog window
+                    JOptionPane.DEFAULT_OPTION,                 // option type
+                    JOptionPane.INFORMATION_MESSAGE,            // message type
+                    null,                                       // optional icon, use null to use the default icon
+                    options,                                    // options string array, will be made into buttons
+                    options[3]                                  // option that should be made into a default button
+                );
+                switch(result) {
+                   case 0: // yes
+                     JOptionPane.showMessageDialog(getDemoPanel(), getString("OptionPaneDemo.component_r1"));
+                     break;
+                   case 1: // no
+                     JOptionPane.showMessageDialog(getDemoPanel(), getString("OptionPaneDemo.component_r2"));
+                     break;
+                   case 2: // maybe
+                     JOptionPane.showMessageDialog(getDemoPanel(), getString("OptionPaneDemo.component_r3"));
+                     break;
+                   case 3: // probably
+                     JOptionPane.showMessageDialog(getDemoPanel(), getString("OptionPaneDemo.component_r4"));
+                     break;
+                   default:
+                     break;
+                }
+
+            }
+        };
+        return createButton(a);
+    }
+
+    public JButton createButton(Action a) {
+        JButton b = new JButton() {
+            public Dimension getMaximumSize() {
+                int width = Short.MAX_VALUE;
+                int height = super.getMaximumSize().height;
+                return new Dimension(width, height);
+            }
+        };
+        // setting the following client property informs the button to show
+        // the action text as it's name. The default is to not show the
+        // action text.
+        b.putClientProperty("displayActionText", Boolean.TRUE);
+        b.setAction(a);
+        // b.setAlignmentX(JButton.CENTER_ALIGNMENT);
+        return b;
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/demo/share/jfc/SwingSet2/Permuter.java	Fri Apr 06 03:53:28 2018 +0200
@@ -0,0 +1,110 @@
+/*
+ *
+ * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ *   - Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ *
+ *   - Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ *
+ *   - Neither the name of Oracle nor the names of its
+ *     contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+ * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+
+
+import java.util.Random;
+
+/**
+ * An object that implements a cheesy pseudorandom permutation of the integers
+ * from zero to some user-specified value. (The permutation is a linear
+ * function.)
+ *
+ * @author Josh Bloch
+ */
+class Permuter {
+    /**
+     * The size of the permutation.
+     */
+    private int modulus;
+
+    /**
+     * Nonnegative integer less than n that is relatively prime to m.
+     */
+    private int multiplier;
+
+    /**
+     * Pseudorandom nonnegative integer less than n.
+     */
+    private int addend = 22;
+
+    public Permuter(int n) {
+        if (n<0) {
+            throw new IllegalArgumentException();
+        }
+        modulus = n;
+        if (n==1) {
+            return;
+        }
+
+        // Initialize the multiplier and offset
+        multiplier = (int) Math.sqrt(n);
+        while (gcd(multiplier, n) != 1) {
+            if (++multiplier == n) {
+                multiplier = 1;
+            }
+        }
+    }
+
+    /**
+     * Returns the integer to which this permuter maps the specified integer.
+     * The specified integer must be between 0 and n-1, and the returned
+     * integer will be as well.
+     */
+    public int map(int i) {
+        return (multiplier * i + addend) % modulus;
+    }
+
+    /**
+     * Calculate GCD of a and b, which are assumed to be non-negative.
+     */
+    private static int gcd(int a, int b) {
+        while(b != 0) {
+            int tmp = a % b;
+            a = b;
+            b = tmp;
+        }
+        return a;
+    }
+
+    /**
+     * Simple test.  Takes modulus on command line and prints out permutation.
+     */
+    public static void main(String[] args) {
+        int modulus = Integer.parseInt(args[0]);
+        Permuter p = new Permuter(modulus);
+        for (int i=0; i<modulus; i++) {
+            System.out.print(p.map(i)+" ");
+        }
+        System.out.println();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/demo/share/jfc/SwingSet2/ProgressBarDemo.java	Fri Apr 06 03:53:28 2018 +0200
@@ -0,0 +1,190 @@
+/*
+ *
+ * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ *   - Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ *
+ *   - Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ *
+ *   - Neither the name of Oracle nor the names of its
+ *     contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+ * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+
+import javax.swing.*;
+import javax.swing.event.*;
+import javax.swing.text.*;
+import javax.swing.border.*;
+import javax.swing.colorchooser.*;
+import javax.swing.filechooser.*;
+import javax.accessibility.*;
+
+import java.awt.*;
+import java.awt.event.*;
+import java.beans.*;
+import java.util.*;
+import java.io.*;
+import java.applet.*;
+import java.net.*;
+
+/**
+ * JProgressBar Demo
+ *
+ * @author Jeff Dinkins
+ # @author Peter Korn (accessibility support)
+ */
+public class ProgressBarDemo extends DemoModule {
+
+    /**
+     * main method allows us to run as a standalone demo.
+     */
+    public static void main(String[] args) {
+        ProgressBarDemo demo = new ProgressBarDemo(null);
+        demo.mainImpl();
+    }
+
+    /**
+     * ProgressBarDemo Constructor
+     */
+    public ProgressBarDemo(SwingSet2 swingset) {
+        // Set the title for this demo, and an icon used to represent this
+        // demo inside the SwingSet2 app.
+        super(swingset, "ProgressBarDemo", "toolbar/JProgressBar.gif");
+
+        createProgressPanel();
+    }
+
+    javax.swing.Timer timer = new javax.swing.Timer(18, createTextLoadAction());
+    Action loadAction;
+    Action stopAction;
+    JProgressBar progressBar;
+    JTextArea progressTextArea;
+
+    void updateDragEnabled(boolean dragEnabled) {
+        progressTextArea.setDragEnabled(dragEnabled);
+    }
+
+    public void createProgressPanel() {
+        getDemoPanel().setLayout(new BorderLayout());
+
+        JPanel textWrapper = new JPanel(new BorderLayout());
+        textWrapper.setBorder(new SoftBevelBorder(BevelBorder.LOWERED));
+        textWrapper.setAlignmentX(LEFT_ALIGNMENT);
+        progressTextArea = new MyTextArea();
+
+        progressTextArea.getAccessibleContext().setAccessibleName(getString("ProgressBarDemo.accessible_text_area_name"));
+        progressTextArea.getAccessibleContext().setAccessibleName(getString("ProgressBarDemo.accessible_text_area_description"));
+        textWrapper.add(new JScrollPane(progressTextArea), BorderLayout.CENTER);
+
+        getDemoPanel().add(textWrapper, BorderLayout.CENTER);
+
+        JPanel progressPanel = new JPanel();
+        getDemoPanel().add(progressPanel, BorderLayout.SOUTH);
+
+        progressBar = new JProgressBar(JProgressBar.HORIZONTAL, 0, text.length()) {
+            public Dimension getPreferredSize() {
+                return new Dimension(300, super.getPreferredSize().height);
+            }
+        };
+        progressBar.getAccessibleContext().setAccessibleName(getString("ProgressBarDemo.accessible_text_loading_progress"));
+
+        progressPanel.add(progressBar);
+        progressPanel.add(createLoadButton());
+        progressPanel.add(createStopButton());
+    }
+
+    public JButton createLoadButton() {
+        loadAction = new AbstractAction(getString("ProgressBarDemo.start_button")) {
+            public void actionPerformed(ActionEvent e) {
+                loadAction.setEnabled(false);
+                stopAction.setEnabled(true);
+                if (progressBar.getValue() == progressBar.getMaximum()) {
+                    progressBar.setValue(0);
+                    textLocation = 0;
+                    progressTextArea.setText("");
+                }
+                timer.start();
+            }
+        };
+        return createButton(loadAction);
+    }
+
+    public JButton createStopButton() {
+        stopAction = new AbstractAction(getString("ProgressBarDemo.stop_button")) {
+            public void actionPerformed(ActionEvent e) {
+                timer.stop();
+                loadAction.setEnabled(true);
+                stopAction.setEnabled(false);
+            }
+        };
+        return createButton(stopAction);
+    }
+
+    public JButton createButton(Action a) {
+        JButton b = new JButton();
+        // setting the following client property informs the button to show
+        // the action text as it's name. The default is to not show the
+        // action text.
+        b.putClientProperty("displayActionText", Boolean.TRUE);
+        b.setAction(a);
+        return b;
+    }
+
+
+    int textLocation = 0;
+
+    String text = getString("ProgressBarDemo.text");
+
+    public Action createTextLoadAction() {
+        return new AbstractAction("text load action") {
+            public void actionPerformed (ActionEvent e) {
+                if(progressBar.getValue() < progressBar.getMaximum()) {
+                    progressBar.setValue(progressBar.getValue() + 1);
+                    progressTextArea.append(text.substring(textLocation, textLocation+1));
+                    textLocation++;
+                } else {
+                        timer.stop();
+                        loadAction.setEnabled(true);
+                        stopAction.setEnabled(false);
+                }
+            }
+        };
+    }
+
+
+    class MyTextArea extends JTextArea {
+        public MyTextArea() {
+            super(null, 0, 0);
+            setEditable(false);
+            setText("");
+        }
+
+        public float getAlignmentX () {
+            return LEFT_ALIGNMENT;
+        }
+
+        public float getAlignmentY () {
+            return TOP_ALIGNMENT;
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/demo/share/jfc/SwingSet2/README.txt	Fri Apr 06 03:53:28 2018 +0200
@@ -0,0 +1,47 @@
+SwingSet2 demonstrates some of the abilities of the Swing User Interface
+Toolkit by displaying many of the components in a single showcase application.
+Use it to try out different components and features provided by Swing.
+
+
+==================================
+TO RUN SWINGSET2 AS AN APPLICATION
+==================================
+
+  java -jar SwingSet2.jar
+
+
+=============================
+TO RUN SWINGSET2 AS AN APPLET
+=============================
+
+  appletviewer SwingSet2.html
+
+=========================
+TO MODIFY/BUILD SWINGSET2
+=========================
+
+The full source for the SwingSet2 demo can be found in the "src"
+subdirectory. If you wish to play with the source code and try
+out your changes, you can compile and run in this "src" directory:
+
+  javac *.java
+  
+  java SwingSet2
+
+You may notice a difference when running SwingSet from your compiled source
+(versus running from the packaged JAR file), in that it won't show the
+splash screen. This is expected, as the splash screen is shown using the
+java.awt.SplashScreen support, which allows specifying a splash screen
+image as an attribute in the JAR's manifest file. If you'd like to see the
+splash screen with your own compiled version, you can package your classes
+into a JAR and specify the splash screen (as outlined in the java.awt.SplashScreen
+documentation) or you can specify the splash screen image on the command line:
+
+java -splash:resources/images/splash.png SwingSet2
+
+
+Note: These instructions assume that this installation's versions of the java,
+appletviewer, and javac commands are in your path.  If they aren't, then you should
+either specify the complete path to the commands or update your PATH environment
+variable as described in the installation instructions for the
+Java(TM) SE Development Kit.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/demo/share/jfc/SwingSet2/RubyTheme.java	Fri Apr 06 03:53:28 2018 +0200
@@ -0,0 +1,56 @@
+/*
+ *
+ * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ *   - Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ *
+ *   - Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ *
+ *   - Neither the name of Oracle nor the names of its
+ *     contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+ * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+import javax.swing.plaf.*;
+import javax.swing.plaf.metal.*;
+import javax.swing.*;
+import javax.swing.border.*;
+import java.awt.*;
+
+/**
+ * This class describes a theme using red colors.
+ *
+ * @author Jeff Dinkins
+ */
+public class RubyTheme extends DefaultMetalTheme {
+
+    public String getName() { return "Ruby"; }
+
+    private final ColorUIResource primary1 = new ColorUIResource(80, 10, 22);
+    private final ColorUIResource primary2 = new ColorUIResource(193, 10, 44);
+    private final ColorUIResource primary3 = new ColorUIResource(244, 10, 66);
+
+    protected ColorUIResource getPrimary1() { return primary1; }
+    protected ColorUIResource getPrimary2() { return primary2; }
+    protected ColorUIResource getPrimary3() { return primary3; }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/demo/share/jfc/SwingSet2/ScrollPaneDemo.java	Fri Apr 06 03:53:28 2018 +0200
@@ -0,0 +1,122 @@
+/*
+ *
+ * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ *   - Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ *
+ *   - Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ *
+ *   - Neither the name of Oracle nor the names of its
+ *     contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+ * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+
+import javax.swing.*;
+import javax.swing.event.*;
+import javax.swing.text.*;
+import javax.swing.border.*;
+import javax.swing.colorchooser.*;
+import javax.swing.filechooser.*;
+import javax.accessibility.*;
+
+import java.awt.*;
+import java.awt.event.*;
+import java.beans.*;
+import java.util.*;
+import java.io.*;
+import java.applet.*;
+import java.net.*;
+
+/**
+ * Scroll Pane Demo
+ *
+ * @author Jeff Dinkins
+ */
+public class ScrollPaneDemo extends DemoModule {
+
+    /**
+     * main method allows us to run as a standalone demo.
+     */
+    public static void main(String[] args) {
+        ScrollPaneDemo demo = new ScrollPaneDemo(null);
+        demo.mainImpl();
+    }
+
+    /**
+     * ScrollPaneDemo Constructor
+     */
+    public ScrollPaneDemo(SwingSet2 swingset) {
+        super(swingset, "ScrollPaneDemo", "toolbar/JScrollPane.gif");
+
+        ImageIcon crayons = createImageIcon("scrollpane/crayons.jpg",  getString("ScrollPaneDemo.crayons"));
+        getDemoPanel().add(new ImageScroller(this, crayons), BorderLayout.CENTER);
+    }
+
+
+    /**
+     * ScrollPane class that demonstrates how to set the various column and row headers
+     * and corners.
+     */
+    class ImageScroller extends JScrollPane {
+        public ImageScroller(ScrollPaneDemo demo, Icon icon) {
+            super();
+
+            // Panel to hold the icon image
+            JPanel p = new JPanel(new BorderLayout());
+            p.add(new JLabel(icon), BorderLayout.CENTER);
+            getViewport().add(p);
+
+            // Create and add a column header to the scrollpane
+            JLabel colHeader = new JLabel(
+                demo.createImageIcon("scrollpane/colheader.jpg", getString("ScrollPaneDemo.colheader")));
+            setColumnHeaderView(colHeader);
+
+            // Create and add a row header to the scrollpane
+            JLabel rowHeader = new JLabel(
+                demo.createImageIcon("scrollpane/rowheader.jpg", getString("ScrollPaneDemo.rowheader")));
+            setRowHeaderView(rowHeader);
+
+            // Create and add the upper left corner
+            JLabel cornerUL = new JLabel(
+                demo.createImageIcon("scrollpane/upperleft.jpg", getString("ScrollPaneDemo.upperleft")));
+            setCorner(UPPER_LEFT_CORNER, cornerUL);
+
+            // Create and add the upper right corner
+            JLabel cornerUR = new JLabel(
+                demo.createImageIcon("scrollpane/upperright.jpg", getString("ScrollPaneDemo.upperright")));
+            setCorner(UPPER_RIGHT_CORNER, cornerUR);
+
+            // Create and add the lower left corner
+            JLabel cornerLL = new JLabel(
+                demo.createImageIcon("scrollpane/lowerleft.jpg", getString("ScrollPaneDemo.lowerleft")));
+            setCorner(LOWER_LEFT_CORNER, cornerLL);
+
+            JScrollBar vsb = getVerticalScrollBar();
+            JScrollBar hsb = getHorizontalScrollBar();
+
+            vsb.setValue(icon.getIconHeight());
+            hsb.setValue(icon.getIconWidth()/10);
+        }
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/demo/share/jfc/SwingSet2/SliderDemo.java	Fri Apr 06 03:53:28 2018 +0200
@@ -0,0 +1,284 @@
+/*
+ *
+ * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ *   - Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ *
+ *   - Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ *
+ *   - Neither the name of Oracle nor the names of its
+ *     contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+ * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+
+import javax.swing.*;
+import javax.swing.event.*;
+import javax.swing.text.*;
+import javax.swing.border.*;
+import javax.swing.colorchooser.*;
+import javax.swing.filechooser.*;
+import javax.accessibility.*;
+
+import java.awt.*;
+import java.awt.event.*;
+import java.beans.*;
+import java.util.*;
+import java.io.*;
+import java.applet.*;
+import java.net.*;
+
+/**
+ * JSlider Demo
+ *
+ * @author Dave Kloba
+ * @author Jeff Dinkins
+ */
+public class SliderDemo extends DemoModule {
+
+    /**
+     * main method allows us to run as a standalone demo.
+     */
+    public static void main(String[] args) {
+        SliderDemo demo = new SliderDemo(null);
+        demo.mainImpl();
+    }
+
+    /**
+     * SliderDemo Constructor
+     */
+    public SliderDemo(SwingSet2 swingset) {
+        // Set the title for this demo, and an icon used to represent this
+        // demo inside the SwingSet2 app.
+        super(swingset, "SliderDemo", "toolbar/JSlider.gif");
+
+        createSliderDemo();
+    }
+
+    public void createSliderDemo() {
+        JSlider s;
+        JPanel hp;
+        JPanel vp;
+        GridLayout g;
+        JPanel tp;
+        JLabel tf;
+        ChangeListener listener;
+
+        getDemoPanel().setLayout(new BorderLayout());
+
+        tf = new JLabel(getString("SliderDemo.slidervalue"));
+        getDemoPanel().add(tf, BorderLayout.SOUTH);
+
+        tp = new JPanel();
+        g = new GridLayout(1, 2);
+        g.setHgap(5);
+        g.setVgap(5);
+        tp.setLayout(g);
+        getDemoPanel().add(tp, BorderLayout.CENTER);
+
+        listener = new SliderListener(tf);
+
+        BevelBorder border = new BevelBorder(BevelBorder.LOWERED);
+
+        hp = new JPanel();
+        hp.setLayout(new BoxLayout(hp, BoxLayout.Y_AXIS));
+        hp.setBorder(new TitledBorder(
+                        border,
+                        getString("SliderDemo.horizontal"),
+                        TitledBorder.LEFT,
+                        TitledBorder.ABOVE_TOP));
+        tp.add(hp);
+
+        vp = new JPanel();
+        vp.setLayout(new BoxLayout(vp, BoxLayout.X_AXIS));
+        vp.setBorder(new TitledBorder(
+                        border,
+                        getString("SliderDemo.vertical"),
+                        TitledBorder.LEFT,
+                        TitledBorder.ABOVE_TOP));
+        tp.add(vp);
+
+        // Horizontal Slider 1
+        JPanel p = new JPanel();
+        p.setLayout(new BoxLayout(p, BoxLayout.Y_AXIS));
+        p.setBorder(new TitledBorder(getString("SliderDemo.plain")));
+        s = new JSlider(-10, 100, 20);
+        s.getAccessibleContext().setAccessibleName(getString("SliderDemo.plain"));
+        s.getAccessibleContext().setAccessibleDescription(getString("SliderDemo.a_plain_slider"));
+        s.addChangeListener(listener);
+
+        p.add(Box.createRigidArea(VGAP5));
+        p.add(s);
+        p.add(Box.createRigidArea(VGAP5));
+        hp.add(p);
+        hp.add(Box.createRigidArea(VGAP10));
+
+        // Horizontal Slider 2
+        p = new JPanel();
+        p.setLayout(new BoxLayout(p, BoxLayout.Y_AXIS));
+        p.setBorder(new TitledBorder(getString("SliderDemo.majorticks")));
+        s = new JSlider(100, 1000, 400);
+        s.setPaintTicks(true);
+        s.setMajorTickSpacing(100);
+        s.getAccessibleContext().setAccessibleName(getString("SliderDemo.majorticks"));
+        s.getAccessibleContext().setAccessibleDescription(getString("SliderDemo.majorticksdescription"));
+        s.addChangeListener(listener);
+
+        p.add(Box.createRigidArea(VGAP5));
+        p.add(s);
+        p.add(Box.createRigidArea(VGAP5));
+        hp.add(p);
+        hp.add(Box.createRigidArea(VGAP10));
+
+        // Horizontal Slider 3
+        p = new JPanel();
+        p.setLayout(new BoxLayout(p, BoxLayout.Y_AXIS));
+        p.setBorder(new TitledBorder(getString("SliderDemo.ticks")));
+        s = new JSlider(0, 11, 6);
+
+        s.putClientProperty("JSlider.isFilled", Boolean.TRUE );
+
+        s.setPaintTicks(true);
+        s.setMajorTickSpacing(5);
+        s.setMinorTickSpacing(1);
+
+        s.setPaintLabels( true );
+        s.setSnapToTicks( true );
+
+        s.getLabelTable().put(new Integer(11), new JLabel(new Integer(11).toString(), JLabel.CENTER));
+        s.setLabelTable( s.getLabelTable() );
+
+        s.getAccessibleContext().setAccessibleName(getString("SliderDemo.minorticks"));
+        s.getAccessibleContext().setAccessibleDescription(getString("SliderDemo.minorticksdescription"));
+
+        s.addChangeListener(listener);
+
+        p.add(Box.createRigidArea(VGAP5));
+        p.add(s);
+        p.add(Box.createRigidArea(VGAP5));
+        hp.add(p);
+        hp.add(Box.createRigidArea(VGAP10));
+
+        // Horizontal Slider 4
+        p = new JPanel();
+        p.setLayout(new BoxLayout(p, BoxLayout.Y_AXIS));
+        p.setBorder(new TitledBorder(getString("SliderDemo.disabled")));
+        BoundedRangeModel brm = new DefaultBoundedRangeModel(80, 0, 0, 100);
+        s = new JSlider(brm);
+        s.setPaintTicks(true);
+        s.setMajorTickSpacing(20);
+        s.setMinorTickSpacing(5);
+        s.setEnabled(false);
+        s.getAccessibleContext().setAccessibleName(getString("SliderDemo.disabled"));
+        s.getAccessibleContext().setAccessibleDescription(getString("SliderDemo.disableddescription"));
+        s.addChangeListener(listener);
+
+        p.add(Box.createRigidArea(VGAP5));
+        p.add(s);
+        p.add(Box.createRigidArea(VGAP5));
+        hp.add(p);
+
+        //////////////////////////////////////////////////////////////////////////////
+
+        // Vertical Slider 1
+        p = new JPanel();
+        p.setLayout(new BoxLayout(p, BoxLayout.X_AXIS));
+        p.setBorder(new TitledBorder(getString("SliderDemo.plain")));
+        s = new JSlider(JSlider.VERTICAL, -10, 100, 20);
+        s.getAccessibleContext().setAccessibleName(getString("SliderDemo.plain"));
+        s.getAccessibleContext().setAccessibleDescription(getString("SliderDemo.a_plain_slider"));
+        s.addChangeListener(listener);
+        p.add(Box.createRigidArea(HGAP10));
+        p.add(s);
+        p.add(Box.createRigidArea(HGAP10));
+        vp.add(p);
+        vp.add(Box.createRigidArea(HGAP10));
+
+        // Vertical Slider 2
+        p = new JPanel();
+        p.setLayout(new BoxLayout(p, BoxLayout.X_AXIS));
+        p.setBorder(new TitledBorder(getString("SliderDemo.majorticks")));
+        s = new JSlider(JSlider.VERTICAL, 100, 1000, 400);
+
+        s.putClientProperty( "JSlider.isFilled", Boolean.TRUE );
+
+        s.setPaintTicks(true);
+        s.setMajorTickSpacing(100);
+        s.getAccessibleContext().setAccessibleName(getString("SliderDemo.majorticks"));
+        s.getAccessibleContext().setAccessibleDescription(getString("SliderDemo.majorticksdescription"));
+        s.addChangeListener(listener);
+        p.add(Box.createRigidArea(HGAP25));
+        p.add(s);
+        p.add(Box.createRigidArea(HGAP25));
+        vp.add(p);
+        vp.add(Box.createRigidArea(HGAP5));
+
+        // Vertical Slider 3
+        p = new JPanel();
+        p.setLayout(new BoxLayout(p, BoxLayout.X_AXIS));
+        p.setBorder(new TitledBorder(getString("SliderDemo.minorticks")));
+        s = new JSlider(JSlider.VERTICAL, 0, 100, 60);
+        s.setPaintTicks(true);
+        s.setMajorTickSpacing(20);
+        s.setMinorTickSpacing(5);
+
+        s.setPaintLabels( true );
+
+        s.getAccessibleContext().setAccessibleName(getString("SliderDemo.minorticks"));
+        s.getAccessibleContext().setAccessibleDescription(getString("SliderDemo.minorticksdescription"));
+
+        s.addChangeListener(listener);
+        p.add(Box.createRigidArea(HGAP10));
+        p.add(s);
+        p.add(Box.createRigidArea(HGAP10));
+        vp.add(p);
+        vp.add(Box.createRigidArea(HGAP5));
+
+        // Vertical Slider 4
+        p = new JPanel();
+        p.setLayout(new BoxLayout(p, BoxLayout.X_AXIS));
+        p.setBorder(new TitledBorder(getString("SliderDemo.disabled")));
+        s = new JSlider(JSlider.VERTICAL, 0, 100, 80);
+        s.setPaintTicks(true);
+        s.setMajorTickSpacing(20);
+        s.setMinorTickSpacing(5);
+        s.setEnabled(false);
+        s.getAccessibleContext().setAccessibleName(getString("SliderDemo.disabled"));
+        s.getAccessibleContext().setAccessibleDescription(getString("SliderDemo.disableddescription"));
+        s.addChangeListener(listener);
+        p.add(Box.createRigidArea(HGAP20));
+        p.add(s);
+        p.add(Box.createRigidArea(HGAP20));
+        vp.add(p);
+    }
+
+    class SliderListener implements ChangeListener {
+        JLabel tf;
+        public SliderListener(JLabel f) {
+            tf = f;
+        }
+        public void stateChanged(ChangeEvent e) {
+            JSlider s1 = (JSlider)e.getSource();
+            tf.setText(getString("SliderDemo.slidervalue") + s1.getValue());
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/demo/share/jfc/SwingSet2/SplitPaneDemo.java	Fri Apr 06 03:53:28 2018 +0200
@@ -0,0 +1,276 @@
+/*
+ *
+ * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ *   - Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ *
+ *   - Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ *
+ *   - Neither the name of Oracle nor the names of its
+ *     contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+ * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+
+import javax.swing.*;
+import javax.swing.event.*;
+import javax.swing.text.*;
+import javax.swing.table.*;
+import javax.swing.border.*;
+import javax.swing.colorchooser.*;
+import javax.swing.filechooser.*;
+import javax.accessibility.*;
+
+import java.awt.*;
+import java.awt.event.*;
+import java.beans.*;
+import java.util.*;
+import java.io.*;
+import java.applet.*;
+import java.net.*;
+
+/**
+ * Split Pane demo
+ *
+ * @author Scott Violet
+ * @author Jeff Dinkins
+ */
+public class SplitPaneDemo extends DemoModule {
+
+    JSplitPane splitPane = null;
+    JLabel earth = null;
+    JLabel moon = null;
+
+    JTextField divSize;
+    JTextField earthSize;
+    JTextField moonSize;
+
+    /**
+     * main method allows us to run as a standalone demo.
+     */
+    public static void main(String[] args) {
+        SplitPaneDemo demo = new SplitPaneDemo(null);
+        demo.mainImpl();
+    }
+
+    /**
+     * SplitPaneDemo Constructor
+     */
+    public SplitPaneDemo(SwingSet2 swingset) {
+        super(swingset, "SplitPaneDemo", "toolbar/JSplitPane.gif");
+
+        earth = new JLabel(createImageIcon("splitpane/earth.jpg", getString("SplitPaneDemo.earth")));
+        earth.setMinimumSize(new Dimension(20, 20));
+
+        moon = new JLabel(createImageIcon("splitpane/moon.jpg", getString("SplitPaneDemo.moon")));
+        moon.setMinimumSize(new Dimension(20, 20));
+
+        splitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, earth, moon);
+        splitPane.setContinuousLayout(true);
+        splitPane.setOneTouchExpandable(true);
+
+        splitPane.setDividerLocation(200);
+
+        getDemoPanel().add(splitPane, BorderLayout.CENTER);
+        getDemoPanel().setBackground(Color.black);
+
+        getDemoPanel().add(createSplitPaneControls(), BorderLayout.SOUTH);
+    }
+
+    /**
+     * Creates controls to alter the JSplitPane.
+     */
+    protected JPanel createSplitPaneControls() {
+        JPanel wrapper = new JPanel();
+        ButtonGroup group = new ButtonGroup();
+        JRadioButton button;
+
+        Box buttonWrapper = new Box(BoxLayout.X_AXIS);
+
+        wrapper.setLayout(new GridLayout(0, 1));
+
+        /* Create a radio button to vertically split the split pane. */
+        button = new JRadioButton(getString("SplitPaneDemo.vert_split"));
+        button.setMnemonic(getMnemonic("SplitPaneDemo.vert_split_mnemonic"));
+        button.addActionListener(new ActionListener() {
+            public void actionPerformed(ActionEvent e) {
+                splitPane.setOrientation(JSplitPane.VERTICAL_SPLIT);
+            }
+        });
+        group.add(button);
+        buttonWrapper.add(button);
+
+        /* Create a radio button the horizontally split the split pane. */
+        button = new JRadioButton(getString("SplitPaneDemo.horz_split"));
+        button.setMnemonic(getMnemonic("SplitPaneDemo.horz_split_mnemonic"));
+        button.setSelected(true);
+        button.addActionListener(new ActionListener() {
+            public void actionPerformed(ActionEvent e) {
+                splitPane.setOrientation(JSplitPane.HORIZONTAL_SPLIT);
+            }
+        });
+        group.add(button);
+        buttonWrapper.add(button);
+
+        /* Create a check box as to whether or not the split pane continually
+           lays out the component when dragging. */
+        JCheckBox checkBox = new JCheckBox(getString("SplitPaneDemo.cont_layout"));
+        checkBox.setMnemonic(getMnemonic("SplitPaneDemo.cont_layout_mnemonic"));
+        checkBox.setSelected(true);
+
+        checkBox.addChangeListener(new ChangeListener() {
+            public void stateChanged(ChangeEvent e) {
+                splitPane.setContinuousLayout(
+                    ((JCheckBox)e.getSource()).isSelected());
+            }
+        });
+        buttonWrapper.add(checkBox);
+
+        /* Create a check box as to whether or not the split pane divider
+           contains the oneTouchExpandable buttons. */
+        checkBox = new JCheckBox(getString("SplitPaneDemo.one_touch_expandable"));
+        checkBox.setMnemonic(getMnemonic("SplitPaneDemo.one_touch_expandable_mnemonic"));
+        checkBox.setSelected(true);
+
+        checkBox.addChangeListener(new ChangeListener() {
+            public void stateChanged(ChangeEvent e) {
+                splitPane.setOneTouchExpandable(
+                    ((JCheckBox) e.getSource()).isSelected());
+            }
+        });
+        buttonWrapper.add(checkBox);
+        wrapper.add(buttonWrapper);
+
+        /* Create a text field to change the divider size. */
+        JPanel                   tfWrapper;
+        JLabel                   label;
+
+        divSize = new JTextField();
+        divSize.setText(new Integer(splitPane.getDividerSize()).toString());
+        divSize.setColumns(5);
+        divSize.getAccessibleContext().setAccessibleName(getString("SplitPaneDemo.divider_size"));
+        divSize.addActionListener(new ActionListener() {
+            public void actionPerformed(ActionEvent e) {
+                String  value = ((JTextField)e.getSource()).getText();
+                int newSize;
+
+                try {
+                    newSize = Integer.parseInt(value);
+                } catch (Exception ex) {
+                    newSize = -1;
+                }
+                if(newSize > 0) {
+                    splitPane.setDividerSize(newSize);
+                } else {
+                    JOptionPane.showMessageDialog(splitPane,
+                                                  getString("SplitPaneDemo.invalid_divider_size"),
+                                                  getString("SplitPaneDemo.error"),
+                                                  JOptionPane.ERROR_MESSAGE);
+                }
+            }
+        });
+        label = new JLabel(getString("SplitPaneDemo.divider_size"));
+        tfWrapper = new JPanel(new FlowLayout(FlowLayout.LEFT));
+        tfWrapper.add(label);
+        tfWrapper.add(divSize);
+        label.setLabelFor(divSize);
+        label.setDisplayedMnemonic(getMnemonic("SplitPaneDemo.divider_size_mnemonic"));
+        wrapper.add(tfWrapper);
+
+        /* Create a text field that will change the preferred/minimum size
+           of the earth component. */
+        earthSize = new JTextField(String.valueOf(earth.getMinimumSize().width));
+        earthSize.setColumns(5);
+        earthSize.getAccessibleContext().setAccessibleName(getString("SplitPaneDemo.first_component_min_size"));
+        earthSize.addActionListener(new ActionListener() {
+            public void actionPerformed(ActionEvent e) {
+                String           value = ((JTextField)e.getSource()).getText();
+                int              newSize;
+
+                try {
+                    newSize = Integer.parseInt(value);
+                } catch (Exception ex) {
+                    newSize = -1;
+                }
+                if(newSize > 10) {
+                    earth.setMinimumSize(new Dimension(newSize, newSize));
+                } else {
+                    JOptionPane.showMessageDialog(splitPane,
+                                                  getString("SplitPaneDemo.invalid_min_size") +
+                                                  getString("SplitPaneDemo.must_be_greater_than") + 10,
+                                                  getString("SplitPaneDemo.error"),
+                                                  JOptionPane.ERROR_MESSAGE);
+                }
+            }
+        });
+        label = new JLabel(getString("SplitPaneDemo.first_component_min_size"));
+        tfWrapper = new JPanel(new FlowLayout(FlowLayout.LEFT));
+        tfWrapper.add(label);
+        tfWrapper.add(earthSize);
+        label.setLabelFor(earthSize);
+        label.setDisplayedMnemonic(getMnemonic("SplitPaneDemo.first_component_min_size_mnemonic"));
+        wrapper.add(tfWrapper);
+
+        /* Create a text field that will change the preferred/minimum size
+           of the moon component. */
+        moonSize = new JTextField(String.valueOf(moon.getMinimumSize().width));
+        moonSize.setColumns(5);
+        moonSize.getAccessibleContext().setAccessibleName(getString("SplitPaneDemo.second_component_min_size"));
+        moonSize.addActionListener(new ActionListener() {
+            public void actionPerformed(ActionEvent e) {
+                String           value = ((JTextField)e.getSource()).getText();
+                int              newSize;
+
+                try {
+                    newSize = Integer.parseInt(value);
+                } catch (Exception ex) {
+                    newSize = -1;
+                }
+                if(newSize > 10) {
+                    moon.setMinimumSize(new Dimension(newSize, newSize));
+                } else {
+                    JOptionPane.showMessageDialog(splitPane,
+                                                  getString("SplitPaneDemo.invalid_min_size") +
+                                                  getString("SplitPaneDemo.must_be_greater_than") + 10,
+                                                  getString("SplitPaneDemo.error"),
+                                                  JOptionPane.ERROR_MESSAGE);
+                }
+            }
+        });
+        label = new JLabel(getString("SplitPaneDemo.second_component_min_size"));
+        tfWrapper = new JPanel(new FlowLayout(FlowLayout.LEFT));
+        tfWrapper.add(label);
+        tfWrapper.add(moonSize);
+        label.setLabelFor(moonSize);
+        label.setDisplayedMnemonic(getMnemonic("SplitPaneDemo.second_component_min_size_mnemonic"));
+        wrapper.add(tfWrapper);
+
+        return wrapper;
+    }
+
+    void updateDragEnabled(boolean dragEnabled) {
+        divSize.setDragEnabled(dragEnabled);
+        earthSize.setDragEnabled(dragEnabled);
+        moonSize.setDragEnabled(dragEnabled);
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/demo/share/jfc/SwingSet2/SwingSet2.html	Fri Apr 06 03:53:28 2018 +0200
@@ -0,0 +1,14 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+  <head>
+    <title>SwingSet demo</title>
+  </head>
+
+  <body>
+      <h1>SwingSet demo</h1>
+      <applet code=SwingSet2Applet              
+              archive="SwingSet2.jar"
+      	      width=695 height=525>
+      </applet>
+  </body>
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/demo/share/jfc/SwingSet2/SwingSet2.java	Fri Apr 06 03:53:28 2018 +0200
@@ -0,0 +1,1367 @@
+/*
+ *
+ * Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ *   - Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ *
+ *   - Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ *
+ *   - Neither the name of Oracle nor the names of its
+ *     contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+ * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+import javax.swing.*;
+import javax.swing.event.*;
+import javax.swing.border.*;
+
+import javax.swing.plaf.metal.MetalTheme;
+import javax.swing.plaf.metal.OceanTheme;
+import javax.swing.plaf.metal.DefaultMetalTheme;
+import javax.swing.plaf.metal.MetalLookAndFeel;
+
+import java.lang.reflect.*;
+import java.awt.*;
+import java.awt.event.*;
+import java.util.*;
+
+/**
+ * A demo that shows all of the Swing components.
+ *
+ * @author Jeff Dinkins
+ */
+public class SwingSet2 extends JPanel {
+
+    String[] demos = {
+      "ButtonDemo",
+      "ColorChooserDemo",
+      "ComboBoxDemo",
+      "FileChooserDemo",
+      "HtmlDemo",
+      "ListDemo",
+      "OptionPaneDemo",
+      "ProgressBarDemo",
+      "ScrollPaneDemo",
+      "SliderDemo",
+      "SplitPaneDemo",
+      "TabbedPaneDemo",
+      "TableDemo",
+      "ToolTipDemo",
+      "TreeDemo"
+    };
+
+    void loadDemos() {
+        for(int i = 0; i < demos.length;) {
+            if(isApplet() && demos[i].equals("FileChooserDemo")) {
+               // don't load the file chooser demo if we are
+               // an applet
+            } else {
+               loadDemo(demos[i]);
+            }
+            i++;
+        }
+    }
+
+    // The current Look & Feel
+    private static LookAndFeelData currentLookAndFeel;
+    private static LookAndFeelData[] lookAndFeelData;
+    // List of demos
+    private ArrayList<DemoModule> demosList = new ArrayList<DemoModule>();
+
+    // The preferred size of the demo
+    private static final int PREFERRED_WIDTH = 720;
+    private static final int PREFERRED_HEIGHT = 640;
+
+    // Box spacers
+    private Dimension HGAP = new Dimension(1,5);
+    private Dimension VGAP = new Dimension(5,1);
+
+    // A place to hold on to the visible demo
+    private DemoModule currentDemo = null;
+    private JPanel demoPanel = null;
+
+    // About Box
+    private JDialog aboutBox = null;
+
+    // Status Bar
+    private JTextField statusField = null;
+
+    // Tool Bar
+    private ToggleButtonToolBar toolbar = null;
+    private ButtonGroup toolbarGroup = new ButtonGroup();
+
+    // Menus
+    private JMenuBar menuBar = null;
+    private JMenu lafMenu = null;
+    private JMenu themesMenu = null;
+    private JMenu audioMenu = null;
+    private JMenu optionsMenu = null;
+    private ButtonGroup lafMenuGroup = new ButtonGroup();
+    private ButtonGroup themesMenuGroup = new ButtonGroup();
+    private ButtonGroup audioMenuGroup = new ButtonGroup();
+
+    // Popup menu
+    private JPopupMenu popupMenu = null;
+    private ButtonGroup popupMenuGroup = new ButtonGroup();
+
+    // Used only if swingset is an application
+    private JFrame frame = null;
+
+    // Used only if swingset is an applet
+    private SwingSet2Applet applet = null;
+
+    // To debug or not to debug, that is the question
+    private boolean DEBUG = true;
+    private int debugCounter = 0;
+
+    // The tab pane that holds the demo
+    private JTabbedPane tabbedPane = null;
+
+    private JEditorPane demoSrcPane = null;
+
+
+    // contentPane cache, saved from the applet or application frame
+    Container contentPane = null;
+
+
+    // number of swingsets - for multiscreen
+    // keep track of the number of SwingSets created - we only want to exit
+    // the program when the last one has been closed.
+    private static int numSSs = 0;
+    private static Vector<SwingSet2> swingSets = new Vector<SwingSet2>();
+
+    private boolean dragEnabled = false;
+
+    public SwingSet2(SwingSet2Applet applet) {
+        this(applet, null);
+    }
+
+    /**
+     * SwingSet2 Constructor
+     */
+    public SwingSet2(SwingSet2Applet applet, GraphicsConfiguration gc) {
+
+        // Note that applet may be null if this is started as an application
+        this.applet = applet;
+
+        String lafClassName = UIManager.getLookAndFeel().getClass().getName();
+        lookAndFeelData = getInstalledLookAndFeelData();
+        currentLookAndFeel = Arrays.stream(lookAndFeelData)
+                .filter(laf -> lafClassName.equals(laf.className))
+                .findFirst().get();
+
+        if (!isApplet()) {
+            frame = createFrame(gc);
+        }
+
+        // set the layout
+        setLayout(new BorderLayout());
+
+        // set the preferred size of the demo
+        setPreferredSize(new Dimension(PREFERRED_WIDTH,PREFERRED_HEIGHT));
+
+        initializeDemo();
+        preloadFirstDemo();
+
+        showSwingSet2();
+
+        // Start loading the rest of the demo in the background
+        DemoLoadThread demoLoader = new DemoLoadThread(this);
+        demoLoader.start();
+    }
+
+
+    /**
+     * SwingSet2 Main. Called only if we're an application, not an applet.
+     */
+    public static void main(final String[] args) {
+        // must run in EDT when constructing the GUI components
+        SwingUtilities.invokeLater(() -> {
+            // Create SwingSet on the default monitor
+            UIManager.put("swing.boldMetal", Boolean.FALSE);
+            SwingSet2 swingset = new SwingSet2(null, GraphicsEnvironment.
+                                         getLocalGraphicsEnvironment().
+                                         getDefaultScreenDevice().
+                                         getDefaultConfiguration());
+        });
+    }
+
+    // *******************************************************
+    // *************** Demo Loading Methods ******************
+    // *******************************************************
+
+
+
+    public void initializeDemo() {
+        JPanel top = new JPanel();
+        top.setLayout(new BorderLayout());
+        add(top, BorderLayout.NORTH);
+
+        menuBar = createMenus();
+
+    if (isApplet()) {
+        applet.setJMenuBar(menuBar);
+    } else {
+        frame.setJMenuBar(menuBar);
+    }
+
+        // creates popup menu accessible via keyboard
+        popupMenu = createPopupMenu();
+
+        ToolBarPanel toolbarPanel = new ToolBarPanel();
+        toolbarPanel.setLayout(new BorderLayout());
+        toolbar = new ToggleButtonToolBar();
+        toolbarPanel.add(toolbar, BorderLayout.CENTER);
+        top.add(toolbarPanel, BorderLayout.SOUTH);
+        toolbarPanel.addContainerListener(toolbarPanel);
+
+        tabbedPane = new JTabbedPane();
+        add(tabbedPane, BorderLayout.CENTER);
+        tabbedPane.getModel().addChangeListener(new TabListener());
+
+        statusField = new JTextField("");
+        statusField.setEditable(false);
+        add(statusField, BorderLayout.SOUTH);
+
+        demoPanel = new JPanel();
+        demoPanel.setLayout(new BorderLayout());
+        demoPanel.setBorder(new EtchedBorder());
+        tabbedPane.addTab("Hi There!", demoPanel);
+
+        // Add html src code viewer
+        demoSrcPane = new JEditorPane("text/html", getString("SourceCode.loading"));
+        demoSrcPane.setEditable(false);
+
+        JScrollPane scroller = new JScrollPane();
+        scroller.getViewport().add(demoSrcPane);
+
+        tabbedPane.addTab(
+            getString("TabbedPane.src_label"),
+            null,
+            scroller,
+            getString("TabbedPane.src_tooltip")
+        );
+    }
+
+    DemoModule currentTabDemo = null;
+    class TabListener implements ChangeListener {
+        public void stateChanged(ChangeEvent e) {
+            SingleSelectionModel model = (SingleSelectionModel) e.getSource();
+            boolean srcSelected = model.getSelectedIndex() == 1;
+            if(currentTabDemo != currentDemo && demoSrcPane != null && srcSelected) {
+                demoSrcPane.setText(getString("SourceCode.loading"));
+                repaint();
+            }
+            if(currentTabDemo != currentDemo && srcSelected) {
+                currentTabDemo = currentDemo;
+                setSourceCode(currentDemo);
+            }
+        }
+    }
+
+
+    /**
+     * Create menus
+     */
+    public JMenuBar createMenus() {
+        JMenuItem mi;
+        // ***** create the menubar ****
+        JMenuBar menuBar = new JMenuBar();
+        menuBar.getAccessibleContext().setAccessibleName(
+            getString("MenuBar.accessible_description"));
+
+        // ***** create File menu
+        JMenu fileMenu = (JMenu) menuBar.add(new JMenu(getString("FileMenu.file_label")));
+        fileMenu.setMnemonic(getMnemonic("FileMenu.file_mnemonic"));
+        fileMenu.getAccessibleContext().setAccessibleDescription(getString("FileMenu.accessible_description"));
+
+        createMenuItem(fileMenu, "FileMenu.about_label", "FileMenu.about_mnemonic",
+                       "FileMenu.about_accessible_description", new AboutAction(this));
+
+        fileMenu.addSeparator();
+
+        createMenuItem(fileMenu, "FileMenu.open_label", "FileMenu.open_mnemonic",
+                       "FileMenu.open_accessible_description", null);
+
+        createMenuItem(fileMenu, "FileMenu.save_label", "FileMenu.save_mnemonic",
+                       "FileMenu.save_accessible_description", null);
+
+        createMenuItem(fileMenu, "FileMenu.save_as_label", "FileMenu.save_as_mnemonic",
+                       "FileMenu.save_as_accessible_description", null);
+
+
+        if(!isApplet()) {
+            fileMenu.addSeparator();
+
+            createMenuItem(fileMenu, "FileMenu.exit_label", "FileMenu.exit_mnemonic",
+                           "FileMenu.exit_accessible_description", new ExitAction(this)
+            );
+        }
+
+        // Create these menu items for the first SwingSet only.
+        if (numSSs == 0) {
+        // ***** create laf switcher menu
+        lafMenu = (JMenu) menuBar.add(new JMenu(getString("LafMenu.laf_label")));
+        lafMenu.setMnemonic(getMnemonic("LafMenu.laf_mnemonic"));
+        lafMenu.getAccessibleContext().setAccessibleDescription(
+            getString("LafMenu.laf_accessible_description"));
+
+        for (LookAndFeelData lafData : lookAndFeelData) {
+            mi = createLafMenuItem(lafMenu, lafData);
+            mi.setSelected(lafData.equals(currentLookAndFeel));
+        }
+
+        // ***** create themes menu
+        themesMenu = (JMenu) menuBar.add(new JMenu(getString("ThemesMenu.themes_label")));
+        themesMenu.setMnemonic(getMnemonic("ThemesMenu.themes_mnemonic"));
+        themesMenu.getAccessibleContext().setAccessibleDescription(
+            getString("ThemesMenu.themes_accessible_description"));
+
+        // ***** create the audio submenu under the theme menu
+        audioMenu = (JMenu) themesMenu.add(new JMenu(getString("AudioMenu.audio_label")));
+        audioMenu.setMnemonic(getMnemonic("AudioMenu.audio_mnemonic"));
+        audioMenu.getAccessibleContext().setAccessibleDescription(
+            getString("AudioMenu.audio_accessible_description"));
+
+        createAudioMenuItem(audioMenu, "AudioMenu.on_label",
+                            "AudioMenu.on_mnemonic",
+                            "AudioMenu.on_accessible_description",
+                            new OnAudioAction(this));
+
+        mi = createAudioMenuItem(audioMenu, "AudioMenu.default_label",
+                                 "AudioMenu.default_mnemonic",
+                                 "AudioMenu.default_accessible_description",
+                                 new DefaultAudioAction(this));
+        mi.setSelected(true); // This is the default feedback setting
+
+        createAudioMenuItem(audioMenu, "AudioMenu.off_label",
+                            "AudioMenu.off_mnemonic",
+                            "AudioMenu.off_accessible_description",
+                            new OffAudioAction(this));
+
+
+        // ***** create the font submenu under the theme menu
+        JMenu fontMenu = (JMenu) themesMenu.add(new JMenu(getString("FontMenu.fonts_label")));
+        fontMenu.setMnemonic(getMnemonic("FontMenu.fonts_mnemonic"));
+        fontMenu.getAccessibleContext().setAccessibleDescription(
+            getString("FontMenu.fonts_accessible_description"));
+        ButtonGroup fontButtonGroup = new ButtonGroup();
+        mi = createButtonGroupMenuItem(fontMenu, "FontMenu.plain_label",
+                "FontMenu.plain_mnemonic",
+                "FontMenu.plain_accessible_description",
+                new ChangeFontAction(this, true), fontButtonGroup);
+        mi.setSelected(true);
+        mi = createButtonGroupMenuItem(fontMenu, "FontMenu.bold_label",
+                "FontMenu.bold_mnemonic",
+                "FontMenu.bold_accessible_description",
+                new ChangeFontAction(this, false), fontButtonGroup);
+
+
+
+        // *** now back to adding color/font themes to the theme menu
+        mi = createThemesMenuItem(themesMenu, "ThemesMenu.ocean_label",
+                                              "ThemesMenu.ocean_mnemonic",
+                                              "ThemesMenu.ocean_accessible_description",
+                                              new OceanTheme());
+        mi.setSelected(true); // This is the default theme
+
+        createThemesMenuItem(themesMenu, "ThemesMenu.steel_label",
+                             "ThemesMenu.steel_mnemonic",
+                             "ThemesMenu.steel_accessible_description",
+                             new DefaultMetalTheme());
+
+        createThemesMenuItem(themesMenu, "ThemesMenu.aqua_label", "ThemesMenu.aqua_mnemonic",
+                       "ThemesMenu.aqua_accessible_description", new AquaTheme());
+
+        createThemesMenuItem(themesMenu, "ThemesMenu.charcoal_label", "ThemesMenu.charcoal_mnemonic",
+                       "ThemesMenu.charcoal_accessible_description", new CharcoalTheme());
+
+        createThemesMenuItem(themesMenu, "ThemesMenu.contrast_label", "ThemesMenu.contrast_mnemonic",
+                       "ThemesMenu.contrast_accessible_description", new ContrastTheme());
+
+        createThemesMenuItem(themesMenu, "ThemesMenu.emerald_label", "ThemesMenu.emerald_mnemonic",
+                       "ThemesMenu.emerald_accessible_description", new EmeraldTheme());
+
+        createThemesMenuItem(themesMenu, "ThemesMenu.ruby_label", "ThemesMenu.ruby_mnemonic",
+                       "ThemesMenu.ruby_accessible_description", new RubyTheme());
+
+        // Enable theme menu based on L&F
+        themesMenu.setEnabled("Metal".equals(currentLookAndFeel.name));
+
+        // ***** create the options menu
+        optionsMenu = (JMenu)menuBar.add(
+            new JMenu(getString("OptionsMenu.options_label")));
+        optionsMenu.setMnemonic(getMnemonic("OptionsMenu.options_mnemonic"));
+        optionsMenu.getAccessibleContext().setAccessibleDescription(
+            getString("OptionsMenu.options_accessible_description"));
+
+        // ***** create tool tip submenu item.
+        mi = createCheckBoxMenuItem(optionsMenu, "OptionsMenu.tooltip_label",
+                "OptionsMenu.tooltip_mnemonic",
+                "OptionsMenu.tooltip_accessible_description",
+                new ToolTipAction());
+        mi.setSelected(true);
+
+        // ***** create drag support submenu item.
+        createCheckBoxMenuItem(optionsMenu, "OptionsMenu.dragEnabled_label",
+                "OptionsMenu.dragEnabled_mnemonic",
+                "OptionsMenu.dragEnabled_accessible_description",
+                new DragSupportAction());
+
+        }
+
+
+        // ***** create the multiscreen menu, if we have multiple screens
+    if (!isApplet()) {
+        GraphicsDevice[] screens = GraphicsEnvironment.
+                                    getLocalGraphicsEnvironment().
+                                    getScreenDevices();
+        if (screens.length > 1) {
+
+            JMenu multiScreenMenu = (JMenu) menuBar.add(new JMenu(
+                                     getString("MultiMenu.multi_label")));
+
+            multiScreenMenu.setMnemonic(getMnemonic("MultiMenu.multi_mnemonic"));
+            multiScreenMenu.getAccessibleContext().setAccessibleDescription(
+             getString("MultiMenu.multi_accessible_description"));
+
+            createMultiscreenMenuItem(multiScreenMenu, MultiScreenAction.ALL_SCREENS);
+            for (int i = 0; i < screens.length; i++) {
+                createMultiscreenMenuItem(multiScreenMenu, i);
+            }
+        }
+    }
+
+        return menuBar;
+    }
+
+    /**
+     * Create a checkbox menu menu item
+     */
+    private JMenuItem createCheckBoxMenuItem(JMenu menu, String label,
+                                             String mnemonic,
+                                             String accessibleDescription,
+                                             Action action) {
+        JCheckBoxMenuItem mi = (JCheckBoxMenuItem)menu.add(
+                new JCheckBoxMenuItem(getString(label)));
+        mi.setMnemonic(getMnemonic(mnemonic));
+        mi.getAccessibleContext().setAccessibleDescription(getString(
+                accessibleDescription));
+        mi.addActionListener(action);
+        return mi;
+    }
+
+    /**
+     * Create a radio button menu menu item for items that are part of a
+     * button group.
+     */
+    private JMenuItem createButtonGroupMenuItem(JMenu menu, String label,
+                                                String mnemonic,
+                                                String accessibleDescription,
+                                                Action action,
+                                                ButtonGroup buttonGroup) {
+        JRadioButtonMenuItem mi = (JRadioButtonMenuItem)menu.add(
+                new JRadioButtonMenuItem(getString(label)));
+        buttonGroup.add(mi);
+        mi.setMnemonic(getMnemonic(mnemonic));
+        mi.getAccessibleContext().setAccessibleDescription(getString(
+                accessibleDescription));
+        mi.addActionListener(action);
+        return mi;
+    }
+
+    /**
+     * Create the theme's audio submenu
+     */
+    public JMenuItem createAudioMenuItem(JMenu menu, String label,
+                                         String mnemonic,
+                                         String accessibleDescription,
+                                         Action action) {
+        JRadioButtonMenuItem mi = (JRadioButtonMenuItem) menu.add(new JRadioButtonMenuItem(getString(label)));
+        audioMenuGroup.add(mi);
+        mi.setMnemonic(getMnemonic(mnemonic));
+        mi.getAccessibleContext().setAccessibleDescription(getString(accessibleDescription));
+        mi.addActionListener(action);
+
+        return mi;
+    }
+
+    /**
+     * Creates a generic menu item
+     */
+    public JMenuItem createMenuItem(JMenu menu, String label, String mnemonic,
+                               String accessibleDescription, Action action) {
+        JMenuItem mi = (JMenuItem) menu.add(new JMenuItem(getString(label)));
+        mi.setMnemonic(getMnemonic(mnemonic));
+        mi.getAccessibleContext().setAccessibleDescription(getString(accessibleDescription));
+        mi.addActionListener(action);
+        if(action == null) {
+            mi.setEnabled(false);
+        }
+        return mi;
+    }
+
+    /**
+     * Creates a JRadioButtonMenuItem for the Themes menu
+     */
+    public JMenuItem createThemesMenuItem(JMenu menu, String label, String mnemonic,
+                               String accessibleDescription, MetalTheme theme) {
+        JRadioButtonMenuItem mi = (JRadioButtonMenuItem) menu.add(new JRadioButtonMenuItem(getString(label)));
+        themesMenuGroup.add(mi);
+        mi.setMnemonic(getMnemonic(mnemonic));
+        mi.getAccessibleContext().setAccessibleDescription(getString(accessibleDescription));
+        mi.addActionListener(new ChangeThemeAction(this, theme));
+
+        return mi;
+    }
+
+    /**
+     * Creates a JRadioButtonMenuItem for the Look and Feel menu
+     */
+    public JMenuItem createLafMenuItem(JMenu menu, LookAndFeelData lafData) {
+        JMenuItem mi = menu.add(new JRadioButtonMenuItem(lafData.label));
+        lafMenuGroup.add(mi);
+        mi.setMnemonic(lafData.mnemonic);
+        mi.getAccessibleContext().setAccessibleDescription(lafData.accDescription);
+        mi.addActionListener(new ChangeLookAndFeelAction(this, lafData));
+        return mi;
+    }
+
+    /**
+     * Creates a multi-screen menu item
+     */
+    public JMenuItem createMultiscreenMenuItem(JMenu menu, int screen) {
+        JMenuItem mi = null;
+        if (screen == MultiScreenAction.ALL_SCREENS) {
+            mi = (JMenuItem) menu.add(new JMenuItem(getString("MultiMenu.all_label")));
+            mi.setMnemonic(getMnemonic("MultiMenu.all_mnemonic"));
+            mi.getAccessibleContext().setAccessibleDescription(getString(
+                                                                 "MultiMenu.all_accessible_description"));
+        }
+        else {
+            mi = (JMenuItem) menu.add(new JMenuItem(getString("MultiMenu.single_label") + " " +
+                                                                                                 screen));
+            mi.setMnemonic(KeyEvent.VK_0 + screen);
+            mi.getAccessibleContext().setAccessibleDescription(getString(
+                                               "MultiMenu.single_accessible_description") + " " + screen);
+
+        }
+        mi.addActionListener(new MultiScreenAction(this, screen));
+        return mi;
+    }
+
+    public JPopupMenu createPopupMenu() {
+        JPopupMenu popup = new JPopupMenu("JPopupMenu demo");
+
+        for (LookAndFeelData lafData : lookAndFeelData) {
+            createPopupMenuItem(popup, lafData);
+        }
+
+        // register key binding to activate popup menu
+        InputMap map = getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW);
+        map.put(KeyStroke.getKeyStroke(KeyEvent.VK_F10, InputEvent.SHIFT_MASK),
+                "postMenuAction");
+        map.put(KeyStroke.getKeyStroke(KeyEvent.VK_CONTEXT_MENU, 0), "postMenuAction");
+        getActionMap().put("postMenuAction", new ActivatePopupMenuAction(this, popup));
+
+        return popup;
+    }
+
+    /**
+     * Creates a JMenuItem for the Look and Feel popup menu
+     */
+    public JMenuItem createPopupMenuItem(JPopupMenu menu, LookAndFeelData lafData) {
+        JMenuItem mi = menu.add(new JMenuItem(lafData.label));
+        popupMenuGroup.add(mi);
+        mi.setMnemonic(lafData.mnemonic);
+        mi.getAccessibleContext().setAccessibleDescription(lafData.accDescription);
+        mi.addActionListener(new ChangeLookAndFeelAction(this, lafData));
+        return mi;
+    }
+
+
+    /**
+     * Load the first demo. This is done separately from the remaining demos
+     * so that we can get SwingSet2 up and available to the user quickly.
+     */
+    public void preloadFirstDemo() {
+        DemoModule demo = addDemo(new InternalFrameDemo(this));
+        setDemo(demo);
+    }
+
+
+    /**
+     * Add a demo to the toolbar
+     */
+    public DemoModule addDemo(DemoModule demo) {
+        demosList.add(demo);
+        if (dragEnabled) {
+            demo.updateDragEnabled(true);
+        }
+        // do the following on the gui thread
+        SwingUtilities.invokeLater(new SwingSetRunnable(this, demo) {
+            public void run() {
+                SwitchToDemoAction action = new SwitchToDemoAction(swingset, (DemoModule) obj);
+                JToggleButton tb = swingset.getToolBar().addToggleButton(action);
+                swingset.getToolBarGroup().add(tb);
+                if(swingset.getToolBarGroup().getSelection() == null) {
+                    tb.setSelected(true);
+                }
+                tb.setText(null);
+                tb.setToolTipText(((DemoModule)obj).getToolTip());
+
+                if(demos[demos.length-1].equals(obj.getClass().getName())) {
+                    setStatus(getString("Status.popupMenuAccessible"));
+                }
+
+            }
+        });
+        return demo;
+    }
+
+
+    /**
+     * Sets the current demo
+     */
+    public void setDemo(DemoModule demo) {
+        currentDemo = demo;
+
+        // Ensure panel's UI is current before making visible
+        JComponent currentDemoPanel = demo.getDemoPanel();
+        SwingUtilities.updateComponentTreeUI(currentDemoPanel);
+
+        demoPanel.removeAll();
+        demoPanel.add(currentDemoPanel, BorderLayout.CENTER);
+
+        tabbedPane.setSelectedIndex(0);
+        tabbedPane.setTitleAt(0, demo.getName());
+        tabbedPane.setToolTipTextAt(0, demo.getToolTip());
+    }
+
+
+    /**
+     * Bring up the SwingSet2 demo by showing the frame (only
+     * applicable if coming up as an application, not an applet);
+     */
+    public void showSwingSet2() {
+        if(!isApplet() && getFrame() != null) {
+            // put swingset in a frame and show it
+            JFrame f = getFrame();
+            f.setTitle(getString("Frame.title"));
+            f.getContentPane().add(this, BorderLayout.CENTER);
+            f.pack();
+
+            Rectangle screenRect = f.getGraphicsConfiguration().getBounds();
+            Insets screenInsets = Toolkit.getDefaultToolkit().getScreenInsets(
+                    f.getGraphicsConfiguration());
+
+            // Make sure we don't place the demo off the screen.
+            int centerWidth = screenRect.width < f.getSize().width ?
+                    screenRect.x :
+                    screenRect.x + screenRect.width/2 - f.getSize().width/2;
+            int centerHeight = screenRect.height < f.getSize().height ?
+                    screenRect.y :
+                    screenRect.y + screenRect.height/2 - f.getSize().height/2;
+
+            centerHeight = centerHeight < screenInsets.top ?
+                    screenInsets.top : centerHeight;
+
+            f.setLocation(centerWidth, centerHeight);
+            f.show();
+            numSSs++;
+            swingSets.add(this);
+        }
+    }
+
+    // *******************************************************
+    // ****************** Utility Methods ********************
+    // *******************************************************
+
+    /**
+     * Loads a demo from a classname
+     */
+    void loadDemo(String classname) {
+        setStatus(getString("Status.loading") + getString(classname + ".name"));
+        DemoModule demo = null;
+        try {
+            Class demoClass = Class.forName(classname);
+            Constructor demoConstructor = demoClass.getConstructor(new Class[]{SwingSet2.class});
+            demo = (DemoModule) demoConstructor.newInstance(new Object[]{this});
+            addDemo(demo);
+        } catch (Exception e) {
+            System.out.println("Error occurred loading demo: " + classname);
+        }
+    }
+
+    /**
+     * Determines if this is an applet or application
+     */
+    public boolean isApplet() {
+        return (applet != null);
+    }
+
+    /**
+     * Returns the applet instance
+     */
+    public SwingSet2Applet getApplet() {
+        return applet;
+    }
+
+
+    /**
+     * Returns the frame instance
+     */
+    public JFrame getFrame() {
+        return frame;
+    }
+
+    /**
+     * Returns the menubar
+     */
+    public JMenuBar getMenuBar() {
+        return menuBar;
+    }
+
+    /**
+     * Returns the toolbar
+     */
+    public ToggleButtonToolBar getToolBar() {
+        return toolbar;
+    }
+
+    /**
+     * Returns the toolbar button group
+     */
+    public ButtonGroup getToolBarGroup() {
+        return toolbarGroup;
+    }
+
+    /**
+     * Returns the content pane whether we're in an applet
+     * or application
+     */
+    public Container getContentPane() {
+        if(contentPane == null) {
+            if(getFrame() != null) {
+                contentPane = getFrame().getContentPane();
+            } else if (getApplet() != null) {
+                contentPane = getApplet().getContentPane();
+            }
+        }
+        return contentPane;
+    }
+
+    /**
+     * Create a frame for SwingSet2 to reside in if brought up
+     * as an application.
+     */
+    public static JFrame createFrame(GraphicsConfiguration gc) {
+        JFrame frame = new JFrame(gc);
+        if (numSSs == 0) {
+            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
+        } else {
+            WindowListener l = new WindowAdapter() {
+                public void windowClosing(WindowEvent e) {
+                    numSSs--;
+                    swingSets.remove(this);
+                }
+            };
+            frame.addWindowListener(l);
+        }
+        return frame;
+    }
+
+
+    /**
+     * Set the status
+     */
+    public void setStatus(String s) {
+        // do the following on the gui thread
+        SwingUtilities.invokeLater(new SwingSetRunnable(this, s) {
+            public void run() {
+                swingset.statusField.setText((String) obj);
+            }
+        });
+    }
+
+
+    /**
+     * This method returns a string from the demo's resource bundle.
+     */
+    public static String getString(String key) {
+        String value = null;
+        try {
+            value = TextAndMnemonicUtils.getTextAndMnemonicString(key);
+        } catch (MissingResourceException e) {
+            System.out.println("java.util.MissingResourceException: Couldn't find value for: " + key);
+        }
+        if(value == null) {
+            value = "Could not find resource: " + key + "  ";
+        }
+        return value;
+    }
+
+    void setDragEnabled(boolean dragEnabled) {
+        if (dragEnabled == this.dragEnabled) {
+            return;
+        }
+
+        this.dragEnabled = dragEnabled;
+
+        for (DemoModule dm : demosList) {
+            dm.updateDragEnabled(dragEnabled);
+        }
+
+        demoSrcPane.setDragEnabled(dragEnabled);
+    }
+
+    boolean isDragEnabled() {
+        return dragEnabled;
+    }
+
+
+    /**
+     * Returns a mnemonic from the resource bundle. Typically used as
+     * keyboard shortcuts in menu items.
+     */
+    public char getMnemonic(String key) {
+        return (getString(key)).charAt(0);
+    }
+
+    /**
+     * Creates an icon from an image contained in the "images" directory.
+     */
+    public ImageIcon createImageIcon(String filename, String description) {
+        String path = "/resources/images/" + filename;
+        return new ImageIcon(getClass().getResource(path));
+    }
+
+    /**
+     * If DEBUG is defined, prints debug information out to std ouput.
+     */
+    public void debug(String s) {
+        if(DEBUG) {
+            System.out.println((debugCounter++) + ": " + s);
+        }
+    }
+
+    /**
+     * Stores the current L&F, and calls updateLookAndFeel, below
+     */
+    public void setLookAndFeel(LookAndFeelData laf) {
+        if(!currentLookAndFeel.equals(laf)) {
+            currentLookAndFeel = laf;
+            /* The recommended way of synchronizing state between multiple
+             * controls that represent the same command is to use Actions.
+             * The code below is a workaround and will be replaced in future
+             * version of SwingSet2 demo.
+             */
+            String lafName = laf.label;
+            themesMenu.setEnabled(laf.name.equals("Metal"));
+            updateLookAndFeel();
+            for(int i=0;i<lafMenu.getItemCount();i++) {
+                JMenuItem item = lafMenu.getItem(i);
+                item.setSelected(item.getText().equals(lafName));
+            }
+        }
+    }
+
+    private void updateThisSwingSet() {
+        if (isApplet()) {
+            SwingUtilities.updateComponentTreeUI(getApplet());
+        } else {
+            JFrame frame = getFrame();
+            if (frame == null) {
+                SwingUtilities.updateComponentTreeUI(this);
+            } else {
+                SwingUtilities.updateComponentTreeUI(frame);
+            }
+        }
+
+        SwingUtilities.updateComponentTreeUI(popupMenu);
+        if (aboutBox != null) {
+            SwingUtilities.updateComponentTreeUI(aboutBox);
+        }
+    }
+
+    /**
+     * Sets the current L&F on each demo module
+     */
+    public void updateLookAndFeel() {
+        try {
+            UIManager.setLookAndFeel(currentLookAndFeel.className);
+            if (isApplet()) {
+                updateThisSwingSet();
+            } else {
+                for (SwingSet2 ss : swingSets) {
+                    ss.updateThisSwingSet();
+                }
+            }
+        } catch (Exception ex) {
+            System.out.println("Failed loading L&F: " + currentLookAndFeel);
+            System.out.println(ex);
+        }
+    }
+
+    /**
+     * Loads and puts the source code text into JEditorPane in the "Source Code" tab
+     */
+    public void setSourceCode(DemoModule demo) {
+        // do the following on the gui thread
+        SwingUtilities.invokeLater(new SwingSetRunnable(this, demo) {
+            public void run() {
+                swingset.demoSrcPane.setText(((DemoModule)obj).getSourceCode());
+                swingset.demoSrcPane.setCaretPosition(0);
+
+            }
+        });
+    }
+
+    // *******************************************************
+    // **************   ToggleButtonToolbar  *****************
+    // *******************************************************
+    static Insets zeroInsets = new Insets(1,1,1,1);
+    protected class ToggleButtonToolBar extends JToolBar {
+        public ToggleButtonToolBar() {
+            super();
+        }
+
+        JToggleButton addToggleButton(Action a) {
+            JToggleButton tb = new JToggleButton(
+                (String)a.getValue(Action.NAME),
+                (Icon)a.getValue(Action.SMALL_ICON)
+            );
+            tb.setMargin(zeroInsets);
+            tb.setText(null);
+            tb.setEnabled(a.isEnabled());
+            tb.setToolTipText((String)a.getValue(Action.SHORT_DESCRIPTION));
+            tb.setAction(a);
+            add(tb);
+            return tb;
+        }
+    }
+
+    // *******************************************************
+    // *********  ToolBar Panel / Docking Listener ***********
+    // *******************************************************
+    class ToolBarPanel extends JPanel implements ContainerListener {
+
+        public boolean contains(int x, int y) {
+            Component c = getParent();
+            if (c != null) {
+                Rectangle r = c.getBounds();
+                return (x >= 0) && (x < r.width) && (y >= 0) && (y < r.height);
+            }
+            else {
+                return super.contains(x,y);
+            }
+        }
+
+        public void componentAdded(ContainerEvent e) {
+            Container c = e.getContainer().getParent();
+            if (c != null) {
+                c.getParent().validate();
+                c.getParent().repaint();
+            }
+        }
+
+        public void componentRemoved(ContainerEvent e) {
+            Container c = e.getContainer().getParent();
+            if (c != null) {
+                c.getParent().validate();
+                c.getParent().repaint();
+            }
+        }
+    }
+
+    // *******************************************************
+    // ******************   Runnables  ***********************
+    // *******************************************************
+
+    /**
+     * Generic SwingSet2 runnable. This is intended to run on the
+     * AWT gui event thread so as not to muck things up by doing
+     * gui work off the gui thread. Accepts a SwingSet2 and an Object
+     * as arguments, which gives subtypes of this class the two
+     * "must haves" needed in most runnables for this demo.
+     */
+    class SwingSetRunnable implements Runnable {
+        protected SwingSet2 swingset;
+        protected Object obj;
+
+        public SwingSetRunnable(SwingSet2 swingset, Object obj) {
+            this.swingset = swingset;
+            this.obj = obj;
+        }
+
+        public void run() {
+        }
+    }
+
+
+    // *******************************************************
+    // ********************   Actions  ***********************
+    // *******************************************************
+
+    public class SwitchToDemoAction extends AbstractAction {
+        SwingSet2 swingset;
+        DemoModule demo;
+
+        public SwitchToDemoAction(SwingSet2 swingset, DemoModule demo) {
+            super(demo.getName(), demo.getIcon());
+            this.swingset = swingset;
+            this.demo = demo;
+        }
+
+        public void actionPerformed(ActionEvent e) {
+            swingset.setDemo(demo);
+        }
+    }
+
+    class OkAction extends AbstractAction {
+        JDialog aboutBox;
+
+        protected OkAction(JDialog aboutBox) {
+            super("OkAction");
+            this.aboutBox = aboutBox;
+        }
+
+        public void actionPerformed(ActionEvent e) {
+            aboutBox.setVisible(false);
+        }
+    }
+
+    class ChangeLookAndFeelAction extends AbstractAction {
+        SwingSet2 swingset;
+        LookAndFeelData lafData;
+        protected ChangeLookAndFeelAction(SwingSet2 swingset, LookAndFeelData lafData) {
+            super("ChangeTheme");
+            this.swingset = swingset;
+            this.lafData = lafData;
+        }
+
+        public void actionPerformed(ActionEvent e) {
+            swingset.setLookAndFeel(lafData);
+        }
+    }
+
+    class ActivatePopupMenuAction extends AbstractAction {
+        SwingSet2 swingset;
+        JPopupMenu popup;
+        protected ActivatePopupMenuAction(SwingSet2 swingset, JPopupMenu popup) {
+            super("ActivatePopupMenu");
+            this.swingset = swingset;
+            this.popup = popup;
+        }
+
+        public void actionPerformed(ActionEvent e) {
+            Dimension invokerSize = getSize();
+            Dimension popupSize = popup.getPreferredSize();
+            popup.show(swingset, (invokerSize.width - popupSize.width) / 2,
+                       (invokerSize.height - popupSize.height) / 2);
+        }
+    }
+
+    // Turns on all possible auditory feedback
+    class OnAudioAction extends AbstractAction {
+        SwingSet2 swingset;
+        protected OnAudioAction(SwingSet2 swingset) {
+            super("Audio On");
+            this.swingset = swingset;
+        }
+        public void actionPerformed(ActionEvent e) {
+            UIManager.put("AuditoryCues.playList",
+                          UIManager.get("AuditoryCues.allAuditoryCues"));
+            swingset.updateLookAndFeel();
+        }
+    }
+
+    // Turns on the default amount of auditory feedback
+    class DefaultAudioAction extends AbstractAction {
+        SwingSet2 swingset;
+        protected DefaultAudioAction(SwingSet2 swingset) {
+            super("Audio Default");
+            this.swingset = swingset;
+        }
+        public void actionPerformed(ActionEvent e) {
+            UIManager.put("AuditoryCues.playList",
+                          UIManager.get("AuditoryCues.defaultCueList"));
+            swingset.updateLookAndFeel();
+        }
+    }
+
+    // Turns off all possible auditory feedback
+    class OffAudioAction extends AbstractAction {
+        SwingSet2 swingset;
+        protected OffAudioAction(SwingSet2 swingset) {
+            super("Audio Off");
+            this.swingset = swingset;
+        }
+        public void actionPerformed(ActionEvent e) {
+            UIManager.put("AuditoryCues.playList",
+                          UIManager.get("AuditoryCues.noAuditoryCues"));
+            swingset.updateLookAndFeel();
+        }
+    }
+
+    // Turns on or off the tool tips for the demo.
+    class ToolTipAction extends AbstractAction {
+        protected ToolTipAction() {
+            super("ToolTip Control");
+        }
+
+        public void actionPerformed(ActionEvent e) {
+            boolean status = ((JCheckBoxMenuItem)e.getSource()).isSelected();
+            ToolTipManager.sharedInstance().setEnabled(status);
+        }
+    }
+
+    class DragSupportAction extends AbstractAction {
+        protected DragSupportAction() {
+            super("DragSupport Control");
+        }
+
+        public void actionPerformed(ActionEvent e) {
+            boolean dragEnabled = ((JCheckBoxMenuItem)e.getSource()).isSelected();
+            if (isApplet()) {
+                setDragEnabled(dragEnabled);
+            } else {
+                for (SwingSet2 ss : swingSets) {
+                    ss.setDragEnabled(dragEnabled);
+                }
+            }
+        }
+    }
+
+    class ChangeThemeAction extends AbstractAction {
+        SwingSet2 swingset;
+        MetalTheme theme;
+        protected ChangeThemeAction(SwingSet2 swingset, MetalTheme theme) {
+            super("ChangeTheme");
+            this.swingset = swingset;
+            this.theme = theme;
+        }
+
+        public void actionPerformed(ActionEvent e) {
+            MetalLookAndFeel.setCurrentTheme(theme);
+            swingset.updateLookAndFeel();
+        }
+    }
+
+    class ExitAction extends AbstractAction {
+        SwingSet2 swingset;
+        protected ExitAction(SwingSet2 swingset) {
+            super("ExitAction");
+            this.swingset = swingset;
+        }
+
+        public void actionPerformed(ActionEvent e) {
+            System.exit(0);
+        }
+    }
+
+    class AboutAction extends AbstractAction {
+        SwingSet2 swingset;
+        protected AboutAction(SwingSet2 swingset) {
+            super("AboutAction");
+            this.swingset = swingset;
+        }
+
+        public void actionPerformed(ActionEvent e) {
+            if(aboutBox == null) {
+                // JPanel panel = new JPanel(new BorderLayout());
+                JPanel panel = new AboutPanel(swingset);
+                panel.setLayout(new BorderLayout());
+
+                aboutBox = new JDialog(swingset.getFrame(), getString("AboutBox.title"), false);
+                aboutBox.setResizable(false);
+                aboutBox.getContentPane().add(panel, BorderLayout.CENTER);
+
+                // JButton button = new JButton(getString("AboutBox.ok_button_text"));
+                JPanel buttonpanel = new JPanel();
+                buttonpanel.setBorder(new javax.swing.border.EmptyBorder(0, 0, 3, 0));
+                buttonpanel.setOpaque(false);
+                JButton button = (JButton) buttonpanel.add(
+                    new JButton(getString("AboutBox.ok_button_text"))
+                );
+                panel.add(buttonpanel, BorderLayout.SOUTH);
+
+                button.addActionListener(new OkAction(aboutBox));
+            }
+            aboutBox.pack();
+            if (isApplet()) {
+                aboutBox.setLocationRelativeTo(getApplet());
+            } else {
+                aboutBox.setLocationRelativeTo(getFrame());
+            }
+            aboutBox.show();
+        }
+    }
+
+    class MultiScreenAction extends AbstractAction {
+        static final int ALL_SCREENS = -1;
+        int screen;
+        protected MultiScreenAction(SwingSet2 swingset, int screen) {
+            super("MultiScreenAction");
+            this.screen = screen;
+        }
+
+        public void actionPerformed(ActionEvent e) {
+            GraphicsDevice[] gds = GraphicsEnvironment.
+                                   getLocalGraphicsEnvironment().
+                                   getScreenDevices();
+            if (screen == ALL_SCREENS) {
+                for (int i = 0; i < gds.length; i++) {
+                    SwingSet2 swingset = new SwingSet2(null,
+                                  gds[i].getDefaultConfiguration());
+                    swingset.setDragEnabled(dragEnabled);
+                }
+            }
+            else {
+                SwingSet2 swingset = new SwingSet2(null,
+                             gds[screen].getDefaultConfiguration());
+                swingset.setDragEnabled(dragEnabled);
+            }
+        }
+    }
+
+    // *******************************************************
+    // **********************  Misc  *************************
+    // *******************************************************
+
+    class DemoLoadThread extends Thread {
+        SwingSet2 swingset;
+
+        DemoLoadThread(SwingSet2 swingset) {
+            this.swingset = swingset;
+        }
+
+        public void run() {
+            SwingUtilities.invokeLater(swingset::loadDemos);
+        }
+    }
+
+    class AboutPanel extends JPanel {
+        ImageIcon aboutimage = null;
+        SwingSet2 swingset = null;
+
+        public AboutPanel(SwingSet2 swingset) {
+            this.swingset = swingset;
+            aboutimage = swingset.createImageIcon("About.jpg", "AboutBox.accessible_description");
+            setOpaque(false);
+        }
+
+        public void paint(Graphics g) {
+            aboutimage.paintIcon(this, g, 0, 0);
+            super.paint(g);
+        }
+
+        public Dimension getPreferredSize() {
+            return new Dimension(aboutimage.getIconWidth(),
+                                 aboutimage.getIconHeight());
+        }
+    }
+
+
+    private class ChangeFontAction extends AbstractAction {
+        private SwingSet2 swingset;
+        private boolean plain;
+
+        ChangeFontAction(SwingSet2 swingset, boolean plain) {
+            super("FontMenu");
+            this.swingset = swingset;
+            this.plain = plain;
+        }
+
+        public void actionPerformed(ActionEvent e) {
+            if (plain) {
+                UIManager.put("swing.boldMetal", Boolean.FALSE);
+            }
+            else {
+                UIManager.put("swing.boldMetal", Boolean.TRUE);
+            }
+            // Change the look and feel to force the settings to take effect.
+            updateLookAndFeel();
+        }
+    }
+
+    private static LookAndFeelData[] getInstalledLookAndFeelData() {
+        return Arrays.stream(UIManager.getInstalledLookAndFeels())
+                .map(laf -> getLookAndFeelData(laf))
+                .toArray(LookAndFeelData[]::new);
+    }
+
+    private static LookAndFeelData getLookAndFeelData(
+            UIManager.LookAndFeelInfo info) {
+        switch (info.getName()) {
+            case "Metal":
+                return new LookAndFeelData(info, "java");
+            case "Nimbus":
+                return new LookAndFeelData(info, "nimbus");
+            case "Windows":
+                return new LookAndFeelData(info, "windows");
+            case "GTK+":
+                return new LookAndFeelData(info, "gtk");
+            case "CDE/Motif":
+                return new LookAndFeelData(info, "motif");
+            case "Mac OS X":
+                return new LookAndFeelData(info, "mac");
+            default:
+                return new LookAndFeelData(info);
+        }
+    }
+
+    private static class LookAndFeelData {
+        String name;
+        String className;
+        String label;
+        char mnemonic;
+        String accDescription;
+
+        public LookAndFeelData(UIManager.LookAndFeelInfo info) {
+            this(info.getName(), info.getClassName(), info.getName(),
+                 info.getName(), info.getName());
+        }
+
+        public LookAndFeelData(UIManager.LookAndFeelInfo info, String property) {
+            this(info.getName(), info.getClassName(),
+                    getString(String.format("LafMenu.%s_label", property)),
+                    getString(String.format("LafMenu.%s_mnemonic", property)),
+                    getString(String.format("LafMenu.%s_accessible_description",
+                                    property)));
+        }
+
+        public LookAndFeelData(String name, String className, String label,
+                               String mnemonic, String accDescription) {
+            this.name = name;
+            this.className = className;
+            this.label = label;
+            this.mnemonic = mnemonic.charAt(0);
+            this.accDescription = accDescription;
+        }
+
+        @Override
+        public String toString() {
+            return className;
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/demo/share/jfc/SwingSet2/SwingSet2Applet.java	Fri Apr 06 03:53:28 2018 +0200
@@ -0,0 +1,78 @@
+/*
+ *
+ * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ *   - Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ *
+ *   - Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ *
+ *   - Neither the name of Oracle nor the names of its
+ *     contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+ * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+
+import javax.swing.*;
+import javax.swing.event.*;
+import javax.swing.text.*;
+import javax.swing.border.*;
+import javax.swing.colorchooser.*;
+import javax.swing.filechooser.*;
+import javax.accessibility.*;
+
+import java.awt.*;
+import java.awt.event.*;
+import java.beans.*;
+import java.util.*;
+import java.io.*;
+import java.applet.*;
+import java.net.*;
+
+/**
+ *
+ *
+ * @author Jeff Dinkins
+ */
+
+public class SwingSet2Applet extends JApplet {
+    public void init() {
+        getContentPane().setLayout(new BorderLayout());
+        getContentPane().add(new SwingSet2(this), BorderLayout.CENTER);
+    }
+
+    public URL getURL(String filename) {
+        URL codeBase = this.getCodeBase();
+        URL url = null;
+
+        try {
+            url = new URL(codeBase, filename);
+            System.out.println(url);
+        } catch (java.net.MalformedURLException e) {
+            System.out.println("Error: badly specified URL");
+            return null;
+        }
+
+        return url;
+    }
+
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/demo/share/jfc/SwingSet2/TabbedPaneDemo.java	Fri Apr 06 03:53:28 2018 +0200
@@ -0,0 +1,233 @@
+/*
+ *
+ * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ *   - Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ *
+ *   - Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ *
+ *   - Neither the name of Oracle nor the names of its
+ *     contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+ * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+
+import javax.swing.*;
+import javax.swing.event.*;
+import javax.swing.text.*;
+import javax.swing.border.*;
+import javax.swing.colorchooser.*;
+import javax.swing.filechooser.*;
+import javax.accessibility.*;
+
+import java.awt.*;
+import java.awt.event.*;
+import java.beans.*;
+import java.util.*;
+import java.io.*;
+import java.applet.*;
+import java.net.*;
+
+/**
+ * JTabbedPane Demo
+ *
+ * @author Jeff Dinkins
+ */
+public class TabbedPaneDemo extends DemoModule implements ActionListener {
+    HeadSpin spin;
+
+    JTabbedPane tabbedpane;
+
+    ButtonGroup group;
+
+    JRadioButton top;
+    JRadioButton bottom;
+    JRadioButton left;
+    JRadioButton right;
+
+    /**
+     * main method allows us to run as a standalone demo.
+     */
+    public static void main(String[] args) {
+        TabbedPaneDemo demo = new TabbedPaneDemo(null);
+        demo.mainImpl();
+    }
+
+    /**
+     * TabbedPaneDemo Constructor
+     */
+    public TabbedPaneDemo(SwingSet2 swingset) {
+        // Set the title for this demo, and an icon used to represent this
+        // demo inside the SwingSet2 app.
+        super(swingset, "TabbedPaneDemo", "toolbar/JTabbedPane.gif");
+
+        // create tab position controls
+        JPanel tabControls = new JPanel();
+        tabControls.add(new JLabel(getString("TabbedPaneDemo.label")));
+        top    = (JRadioButton) tabControls.add(new JRadioButton(getString("TabbedPaneDemo.top")));
+        left   = (JRadioButton) tabControls.add(new JRadioButton(getString("TabbedPaneDemo.left")));
+        bottom = (JRadioButton) tabControls.add(new JRadioButton(getString("TabbedPaneDemo.bottom")));
+        right  = (JRadioButton) tabControls.add(new JRadioButton(getString("TabbedPaneDemo.right")));
+        getDemoPanel().add(tabControls, BorderLayout.NORTH);
+
+        group = new ButtonGroup();
+        group.add(top);
+        group.add(bottom);
+        group.add(left);
+        group.add(right);
+
+        top.setSelected(true);
+
+        top.addActionListener(this);
+        bottom.addActionListener(this);
+        left.addActionListener(this);
+        right.addActionListener(this);
+
+        // create tab
+        tabbedpane = new JTabbedPane();
+        getDemoPanel().add(tabbedpane, BorderLayout.CENTER);
+
+        String name = getString("TabbedPaneDemo.laine");
+        JLabel pix = new JLabel(createImageIcon("tabbedpane/laine.jpg", name));
+        tabbedpane.add(name, pix);
+
+        name = getString("TabbedPaneDemo.ewan");
+        pix = new JLabel(createImageIcon("tabbedpane/ewan.jpg", name));
+        tabbedpane.add(name, pix);
+
+        name = getString("TabbedPaneDemo.hania");
+        pix = new JLabel(createImageIcon("tabbedpane/hania.jpg", name));
+        tabbedpane.add(name, pix);
+
+        name = getString("TabbedPaneDemo.bounce");
+        spin = new HeadSpin();
+        tabbedpane.add(name, spin);
+
+        tabbedpane.getModel().addChangeListener(
+           new ChangeListener() {
+              public void stateChanged(ChangeEvent e) {
+                  SingleSelectionModel model = (SingleSelectionModel) e.getSource();
+                  if(model.getSelectedIndex() == tabbedpane.getTabCount()-1) {
+                      spin.go();
+                  }
+              }
+           }
+        );
+    }
+
+    public void actionPerformed(ActionEvent e) {
+        if(e.getSource() == top) {
+            tabbedpane.setTabPlacement(JTabbedPane.TOP);
+        } else if(e.getSource() == left) {
+            tabbedpane.setTabPlacement(JTabbedPane.LEFT);
+        } else if(e.getSource() == bottom) {
+            tabbedpane.setTabPlacement(JTabbedPane.BOTTOM);
+        } else if(e.getSource() == right) {
+            tabbedpane.setTabPlacement(JTabbedPane.RIGHT);
+        }
+    }
+
+    class HeadSpin extends JComponent implements ActionListener {
+        javax.swing.Timer animator;
+
+        ImageIcon icon[] = new ImageIcon[6];
+
+        int tmpScale;
+
+        static final int numImages = 6;
+
+        double x[] = new double[numImages];
+        double y[] = new double[numImages];
+
+        int xh[] = new int[numImages];
+        int yh[] = new int[numImages];
+
+        double scale[] = new double[numImages];
+
+        public HeadSpin() {
+            setBackground(Color.black);
+            icon[0] = createImageIcon("tabbedpane/ewan.gif", getString("TabbedPaneDemo.ewan"));
+            icon[1] = createImageIcon("tabbedpane/stephen.gif", getString("TabbedPaneDemo.stephen"));
+            icon[2] = createImageIcon("tabbedpane/david.gif", getString("TabbedPaneDemo.david"));
+            icon[3] = createImageIcon("tabbedpane/matthew.gif", getString("TabbedPaneDemo.matthew"));
+            icon[4] = createImageIcon("tabbedpane/blake.gif", getString("TabbedPaneDemo.blake"));
+            icon[5] = createImageIcon("tabbedpane/brooke.gif", getString("TabbedPaneDemo.brooke"));
+
+            /*
+            for(int i = 0; i < 6; i++) {
+                x[i] = (double) rand.nextInt(500);
+                y[i] = (double) rand.nextInt(500);
+            }
+            */
+        }
+
+        public void go() {
+            animator = new javax.swing.Timer(22 + 22 + 22, this);
+            animator.start();
+        }
+
+        public void paint(Graphics g) {
+            g.setColor(getBackground());
+            g.fillRect(0, 0, getWidth(), getHeight());
+
+            for(int i = 0; i < numImages; i++) {
+                if(x[i] > 3*i) {
+                    nudge(i);
+                    squish(g, icon[i], xh[i], yh[i], scale[i]);
+                } else {
+                    x[i] += .05;
+                    y[i] += .05;
+                }
+            }
+        }
+
+        Random rand = new Random();
+
+        public void nudge(int i) {
+            x[i] += (double) rand.nextInt(1000) / 8756;
+            y[i] += (double) rand.nextInt(1000) / 5432;
+            int tmpScale = (int) (Math.abs(Math.sin(x[i])) * 10);
+            scale[i] = (double) tmpScale / 10;
+            int nudgeX = (int) (((double) getWidth()/2) * .8);
+            int nudgeY = (int) (((double) getHeight()/2) * .60);
+            xh[i] = (int) (Math.sin(x[i]) * nudgeX) + nudgeX;
+            yh[i] = (int) (Math.sin(y[i]) * nudgeY) + nudgeY;
+        }
+
+        public void squish(Graphics g, ImageIcon icon, int x, int y, double scale) {
+            if(isVisible()) {
+                g.drawImage(icon.getImage(), x, y,
+                            (int) (icon.getIconWidth()*scale),
+                            (int) (icon.getIconHeight()*scale),
+                            this);
+            }
+        }
+
+        public void actionPerformed(ActionEvent e) {
+            if(isVisible()) {
+                repaint();
+            } else {
+                animator.stop();
+            }
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/demo/share/jfc/SwingSet2/TableDemo.java	Fri Apr 06 03:53:28 2018 +0200
@@ -0,0 +1,741 @@
+/*
+ *
+ * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ *   - Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ *
+ *   - Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ *
+ *   - Neither the name of Oracle nor the names of its
+ *     contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+ * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+
+import javax.swing.*;
+import javax.swing.event.*;
+import javax.swing.text.*;
+import javax.swing.table.*;
+import javax.swing.border.*;
+import javax.swing.colorchooser.*;
+import javax.swing.filechooser.*;
+import javax.accessibility.*;
+
+import java.awt.*;
+import java.awt.event.*;
+import java.awt.print.PrinterException;
+import java.beans.*;
+import java.util.*;
+import java.io.*;
+import java.applet.*;
+import java.net.*;
+
+import java.text.MessageFormat;
+
+/**
+ * Table demo
+ *
+ * @author Philip Milne
+ * @author Steve Wilson
+ */
+public class TableDemo extends DemoModule {
+    JTable      tableView;
+    JScrollPane scrollpane;
+    Dimension   origin = new Dimension(0, 0);
+
+    JCheckBox   isColumnReorderingAllowedCheckBox;
+    JCheckBox   showHorizontalLinesCheckBox;
+    JCheckBox   showVerticalLinesCheckBox;
+
+    JCheckBox   isColumnSelectionAllowedCheckBox;
+    JCheckBox   isRowSelectionAllowedCheckBox;
+
+    JLabel      interCellSpacingLabel;
+    JLabel      rowHeightLabel;
+
+    JSlider     interCellSpacingSlider;
+    JSlider     rowHeightSlider;
+
+    JComboBox   selectionModeComboBox = null;
+    JComboBox   resizeModeComboBox = null;
+
+    JLabel      headerLabel;
+    JLabel      footerLabel;
+
+    JTextField  headerTextField;
+    JTextField  footerTextField;
+
+    JCheckBox   fitWidth;
+    JButton     printButton;
+
+    JPanel      controlPanel;
+    JScrollPane tableAggregate;
+
+    String path = "food/";
+
+    final int INITIAL_ROWHEIGHT = 33;
+
+    /**
+     * main method allows us to run as a standalone demo.
+     */
+    public static void main(String[] args) {
+        TableDemo demo = new TableDemo(null);
+        demo.mainImpl();
+    }
+
+    /**
+     * TableDemo Constructor
+     */
+    public TableDemo(SwingSet2 swingset) {
+        super(swingset, "TableDemo", "toolbar/JTable.gif");
+
+        getDemoPanel().setLayout(new BorderLayout());
+        controlPanel = new JPanel();
+        controlPanel.setLayout(new BoxLayout(controlPanel, BoxLayout.X_AXIS));
+        JPanel cbPanel = new JPanel(new GridLayout(3, 2));
+        JPanel labelPanel = new JPanel(new GridLayout(2, 1)) {
+            public Dimension getMaximumSize() {
+                return new Dimension(getPreferredSize().width, super.getMaximumSize().height);
+            }
+        };
+        JPanel sliderPanel = new JPanel(new GridLayout(2, 1)) {
+            public Dimension getMaximumSize() {
+                return new Dimension(getPreferredSize().width, super.getMaximumSize().height);
+            }
+        };
+        JPanel comboPanel = new JPanel(new GridLayout(2, 1));
+        JPanel printPanel = new JPanel(new ColumnLayout());
+
+        getDemoPanel().add(controlPanel, BorderLayout.NORTH);
+        Vector relatedComponents = new Vector();
+
+
+        // check box panel
+        isColumnReorderingAllowedCheckBox = new JCheckBox(getString("TableDemo.reordering_allowed"), true);
+        isColumnReorderingAllowedCheckBox.addActionListener(new ActionListener() {
+            public void actionPerformed(ActionEvent e) {
+                boolean flag = ((JCheckBox)e.getSource()).isSelected();
+                tableView.getTableHeader().setReorderingAllowed(flag);
+                tableView.repaint();
+            }
+        });
+
+        showHorizontalLinesCheckBox = new JCheckBox(getString("TableDemo.horz_lines"), true);
+        showHorizontalLinesCheckBox.addActionListener(new ActionListener() {
+            public void actionPerformed(ActionEvent e) {
+                boolean flag = ((JCheckBox)e.getSource()).isSelected();
+                tableView.setShowHorizontalLines(flag); ;
+                tableView.repaint();
+            }
+        });
+
+        showVerticalLinesCheckBox = new JCheckBox(getString("TableDemo.vert_lines"), true);
+        showVerticalLinesCheckBox.addActionListener(new ActionListener() {
+            public void actionPerformed(ActionEvent e) {
+                boolean flag = ((JCheckBox)e.getSource()).isSelected();
+                tableView.setShowVerticalLines(flag); ;
+                tableView.repaint();
+            }
+        });
+
+        // Show that showHorizontal/Vertical controls are related
+        relatedComponents.removeAllElements();
+        relatedComponents.add(showHorizontalLinesCheckBox);
+        relatedComponents.add(showVerticalLinesCheckBox);
+        buildAccessibleGroup(relatedComponents);
+
+        isRowSelectionAllowedCheckBox = new JCheckBox(getString("TableDemo.row_selection"), true);
+        isRowSelectionAllowedCheckBox.addActionListener(new ActionListener() {
+            public void actionPerformed(ActionEvent e) {
+                boolean flag = ((JCheckBox)e.getSource()).isSelected();
+                tableView.setRowSelectionAllowed(flag); ;
+                tableView.repaint();
+            }
+        });
+
+        isColumnSelectionAllowedCheckBox = new JCheckBox(getString("TableDemo.column_selection"), false);
+        isColumnSelectionAllowedCheckBox.addActionListener(new ActionListener() {
+            public void actionPerformed(ActionEvent e) {
+                boolean flag = ((JCheckBox)e.getSource()).isSelected();
+                tableView.setColumnSelectionAllowed(flag); ;
+                tableView.repaint();
+            }
+        });
+
+        // Show that row/column selections are related
+        relatedComponents.removeAllElements();
+        relatedComponents.add(isColumnSelectionAllowedCheckBox);
+        relatedComponents.add(isRowSelectionAllowedCheckBox);
+        buildAccessibleGroup(relatedComponents);
+
+        cbPanel.add(isColumnReorderingAllowedCheckBox);
+        cbPanel.add(isRowSelectionAllowedCheckBox);
+        cbPanel.add(showHorizontalLinesCheckBox);
+        cbPanel.add(isColumnSelectionAllowedCheckBox);
+        cbPanel.add(showVerticalLinesCheckBox);
+
+
+        // label panel
+        interCellSpacingLabel = new JLabel(getString("TableDemo.intercell_spacing_colon"));
+        labelPanel.add(interCellSpacingLabel);
+
+        rowHeightLabel = new JLabel(getString("TableDemo.row_height_colon"));
+        labelPanel.add(rowHeightLabel);
+
+
+        // slider panel
+        interCellSpacingSlider = new JSlider(JSlider.HORIZONTAL, 0, 10, 1);
+        interCellSpacingSlider.getAccessibleContext().setAccessibleName(getString("TableDemo.intercell_spacing"));
+        interCellSpacingLabel.setLabelFor(interCellSpacingSlider);
+        sliderPanel.add(interCellSpacingSlider);
+        interCellSpacingSlider.addChangeListener(new ChangeListener() {
+            public void stateChanged(ChangeEvent e) {
+                int spacing = ((JSlider)e.getSource()).getValue();
+                tableView.setIntercellSpacing(new Dimension(spacing, spacing));
+                tableView.repaint();
+            }
+        });
+
+        rowHeightSlider = new JSlider(JSlider.HORIZONTAL, 5, 100, INITIAL_ROWHEIGHT);
+        rowHeightSlider.getAccessibleContext().setAccessibleName(getString("TableDemo.row_height"));
+        rowHeightLabel.setLabelFor(rowHeightSlider);
+        sliderPanel.add(rowHeightSlider);
+        rowHeightSlider.addChangeListener(new ChangeListener() {
+            public void stateChanged(ChangeEvent e) {
+                int height = ((JSlider)e.getSource()).getValue();
+                tableView.setRowHeight(height);
+                tableView.repaint();
+            }
+        });
+
+        // Show that spacing controls are related
+        relatedComponents.removeAllElements();
+        relatedComponents.add(interCellSpacingSlider);
+        relatedComponents.add(rowHeightSlider);
+        buildAccessibleGroup(relatedComponents);
+
+
+        // Create the table.
+        tableAggregate = createTable();
+        getDemoPanel().add(tableAggregate, BorderLayout.CENTER);
+
+
+        // ComboBox for selection modes.
+        JPanel selectMode = new JPanel();
+        selectMode.setLayout(new BoxLayout(selectMode, BoxLayout.X_AXIS));
+        selectMode.setBorder(new TitledBorder(getString("TableDemo.selection_mode")));
+
+
+        selectionModeComboBox = new JComboBox() {
+            public Dimension getMaximumSize() {
+                return getPreferredSize();
+            }
+        };
+        selectionModeComboBox.addItem(getString("TableDemo.single"));
+        selectionModeComboBox.addItem(getString("TableDemo.one_range"));
+        selectionModeComboBox.addItem(getString("TableDemo.multiple_ranges"));
+        selectionModeComboBox.setSelectedIndex(tableView.getSelectionModel().getSelectionMode());
+        selectionModeComboBox.addItemListener(new ItemListener() {
+            public void itemStateChanged(ItemEvent e) {
+                JComboBox source = (JComboBox)e.getSource();
+                tableView.setSelectionMode(source.getSelectedIndex());
+            }
+        });
+
+        selectMode.add(Box.createHorizontalStrut(2));
+        selectMode.add(selectionModeComboBox);
+        selectMode.add(Box.createHorizontalGlue());
+        comboPanel.add(selectMode);
+
+        // Combo box for table resize mode.
+        JPanel resizeMode = new JPanel();
+        resizeMode.setLayout(new BoxLayout(resizeMode, BoxLayout.X_AXIS));
+        resizeMode.setBorder(new TitledBorder(getString("TableDemo.autoresize_mode")));
+
+
+        resizeModeComboBox = new JComboBox() {
+            public Dimension getMaximumSize() {
+                return getPreferredSize();
+            }
+        };
+        resizeModeComboBox.addItem(getString("TableDemo.off"));
+        resizeModeComboBox.addItem(getString("TableDemo.column_boundaries"));
+        resizeModeComboBox.addItem(getString("TableDemo.subsequent_columns"));
+        resizeModeComboBox.addItem(getString("TableDemo.last_column"));
+        resizeModeComboBox.addItem(getString("TableDemo.all_columns"));
+        resizeModeComboBox.setSelectedIndex(tableView.getAutoResizeMode());
+        resizeModeComboBox.addItemListener(new ItemListener() {
+            public void itemStateChanged(ItemEvent e) {
+                JComboBox source = (JComboBox)e.getSource();
+                tableView.setAutoResizeMode(source.getSelectedIndex());
+            }
+        });
+
+        resizeMode.add(Box.createHorizontalStrut(2));
+        resizeMode.add(resizeModeComboBox);
+        resizeMode.add(Box.createHorizontalGlue());
+        comboPanel.add(resizeMode);
+
+        // print panel
+        printPanel.setBorder(new TitledBorder(getString("TableDemo.printing")));
+        headerLabel = new JLabel(getString("TableDemo.header"));
+        footerLabel = new JLabel(getString("TableDemo.footer"));
+        headerTextField = new JTextField(getString("TableDemo.headerText"), 15);
+        footerTextField = new JTextField(getString("TableDemo.footerText"), 15);
+        fitWidth = new JCheckBox(getString("TableDemo.fitWidth"), true);
+        printButton = new JButton(getString("TableDemo.print"));
+        printButton.addActionListener(new ActionListener() {
+            public void actionPerformed(ActionEvent ae) {
+                printTable();
+            }
+        });
+
+        printPanel.add(headerLabel);
+        printPanel.add(headerTextField);
+        printPanel.add(footerLabel);
+        printPanel.add(footerTextField);
+
+        JPanel buttons = new JPanel();
+        buttons.add(fitWidth);
+        buttons.add(printButton);
+
+        printPanel.add(buttons);
+
+        // Show that printing controls are related
+        relatedComponents.removeAllElements();
+        relatedComponents.add(headerTextField);
+        relatedComponents.add(footerTextField);
+        relatedComponents.add(printButton);
+        buildAccessibleGroup(relatedComponents);
+
+        // wrap up the panels and add them
+        JPanel sliderWrapper = new JPanel();
+        sliderWrapper.setLayout(new BoxLayout(sliderWrapper, BoxLayout.X_AXIS));
+        sliderWrapper.add(labelPanel);
+        sliderWrapper.add(sliderPanel);
+        sliderWrapper.add(Box.createHorizontalGlue());
+        sliderWrapper.setBorder(BorderFactory.createEmptyBorder(0, 4, 0, 0));
+
+        JPanel leftWrapper = new JPanel();
+        leftWrapper.setLayout(new BoxLayout(leftWrapper, BoxLayout.Y_AXIS));
+        leftWrapper.add(cbPanel);
+        leftWrapper.add(sliderWrapper);
+
+        // add everything
+        controlPanel.setBorder(BorderFactory.createEmptyBorder(0, 0, 2, 0));
+        controlPanel.add(leftWrapper);
+        controlPanel.add(comboPanel);
+        controlPanel.add(printPanel);
+
+        setTableControllers(); // Set accessibility information
+
+        getDemoPanel().getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT)
+            .put(KeyStroke.getKeyStroke("ctrl P"), "print");
+
+        getDemoPanel().getActionMap().put("print", new AbstractAction() {
+            public void actionPerformed(ActionEvent ae) {
+                printTable();
+            }
+        });
+
+    } // TableDemo()
+
+    /**
+     * Sets the Accessibility MEMBER_OF property to denote that
+     * these components work together as a group. Each object
+     * is set to be a MEMBER_OF an array that contains all of
+     * the objects in the group, including itself.
+     *
+     * @param components The list of objects that are related
+     */
+    void buildAccessibleGroup(Vector components) {
+
+        AccessibleContext context = null;
+        int numComponents = components.size();
+        Object[] group = components.toArray();
+        Object object = null;
+        for (int i = 0; i < numComponents; ++i) {
+            object = components.elementAt(i);
+            if (object instanceof Accessible) {
+                context = ((Accessible)components.elementAt(i)).
+                                                 getAccessibleContext();
+                context.getAccessibleRelationSet().add(
+                    new AccessibleRelation(
+                        AccessibleRelation.MEMBER_OF, group));
+            }
+        }
+    } // buildAccessibleGroup()
+
+    /**
+     * This sets CONTROLLER_FOR on the controls that manipulate the
+     * table and CONTROLLED_BY relationships on the table to point
+     * back to the controllers.
+     */
+    private void setTableControllers() {
+
+        // Set up the relationships to show what controls the table
+        setAccessibleController(isColumnReorderingAllowedCheckBox,
+                                tableAggregate);
+        setAccessibleController(showHorizontalLinesCheckBox,
+                                tableAggregate);
+        setAccessibleController(showVerticalLinesCheckBox,
+                                tableAggregate);
+        setAccessibleController(isColumnSelectionAllowedCheckBox,
+                                tableAggregate);
+        setAccessibleController(isRowSelectionAllowedCheckBox,
+                                tableAggregate);
+        setAccessibleController(interCellSpacingSlider,
+                                tableAggregate);
+        setAccessibleController(rowHeightSlider,
+                                tableAggregate);
+        setAccessibleController(selectionModeComboBox,
+                                tableAggregate);
+        setAccessibleController(resizeModeComboBox,
+                                tableAggregate);
+    } // setTableControllers()
+
+    /**
+     * Sets up accessibility relationships to denote that one
+     * object controls another. The CONTROLLER_FOR property is
+     * set on the controller object, and the CONTROLLED_BY
+     * property is set on the target object.
+     */
+    private void setAccessibleController(JComponent controller,
+                                        JComponent target) {
+        AccessibleRelationSet controllerRelations =
+            controller.getAccessibleContext().getAccessibleRelationSet();
+        AccessibleRelationSet targetRelations =
+            target.getAccessibleContext().getAccessibleRelationSet();
+
+        controllerRelations.add(
+            new AccessibleRelation(
+                AccessibleRelation.CONTROLLER_FOR, target));
+        targetRelations.add(
+            new AccessibleRelation(
+                AccessibleRelation.CONTROLLED_BY, controller));
+    } // setAccessibleController()
+
+    public JScrollPane createTable() {
+
+        // final
+        final String[] names = {
+          getString("TableDemo.first_name"),
+          getString("TableDemo.last_name"),
+          getString("TableDemo.favorite_color"),
+          getString("TableDemo.favorite_movie"),
+          getString("TableDemo.favorite_number"),
+          getString("TableDemo.favorite_food")
+        };
+
+        ImageIcon apple        = createImageIcon("food/apple.jpg",      getString("TableDemo.apple"));
+        ImageIcon asparagus    = createImageIcon("food/asparagus.gif",  getString("TableDemo.asparagus"));
+        ImageIcon banana       = createImageIcon("food/banana.gif",     getString("TableDemo.banana"));
+        ImageIcon broccoli     = createImageIcon("food/broccoli.gif",   getString("TableDemo.broccoli"));
+        ImageIcon cantaloupe   = createImageIcon("food/cantaloupe.gif", getString("TableDemo.cantaloupe"));
+        ImageIcon carrot       = createImageIcon("food/carrot.gif",     getString("TableDemo.carrot"));
+        ImageIcon corn         = createImageIcon("food/corn.gif",       getString("TableDemo.corn"));
+        ImageIcon grapes       = createImageIcon("food/grapes.gif",     getString("TableDemo.grapes"));
+        ImageIcon grapefruit   = createImageIcon("food/grapefruit.gif", getString("TableDemo.grapefruit"));
+        ImageIcon kiwi         = createImageIcon("food/kiwi.gif",       getString("TableDemo.kiwi"));
+        ImageIcon onion        = createImageIcon("food/onion.gif",      getString("TableDemo.onion"));
+        ImageIcon pear         = createImageIcon("food/pear.gif",       getString("TableDemo.pear"));
+        ImageIcon peach        = createImageIcon("food/peach.gif",      getString("TableDemo.peach"));
+        ImageIcon pepper       = createImageIcon("food/pepper.gif",     getString("TableDemo.pepper"));
+        ImageIcon pickle       = createImageIcon("food/pickle.gif",     getString("TableDemo.pickle"));
+        ImageIcon pineapple    = createImageIcon("food/pineapple.gif",  getString("TableDemo.pineapple"));
+        ImageIcon raspberry    = createImageIcon("food/raspberry.gif",  getString("TableDemo.raspberry"));
+        ImageIcon sparegrass   = createImageIcon("food/asparagus.gif",  getString("TableDemo.sparegrass"));
+        ImageIcon strawberry   = createImageIcon("food/strawberry.gif", getString("TableDemo.strawberry"));
+        ImageIcon tomato       = createImageIcon("food/tomato.gif",     getString("TableDemo.tomato"));
+        ImageIcon watermelon   = createImageIcon("food/watermelon.gif", getString("TableDemo.watermelon"));
+
+        NamedColor aqua        = new NamedColor(new Color(127, 255, 212), getString("TableDemo.aqua"));
+        NamedColor beige       = new NamedColor(new Color(245, 245, 220), getString("TableDemo.beige"));
+        NamedColor black       = new NamedColor(Color.black, getString("TableDemo.black"));
+        NamedColor blue        = new NamedColor(new Color(0, 0, 222), getString("TableDemo.blue"));
+        NamedColor eblue       = new NamedColor(Color.blue, getString("TableDemo.eblue"));
+        NamedColor jfcblue     = new NamedColor(new Color(204, 204, 255), getString("TableDemo.jfcblue"));
+        NamedColor jfcblue2    = new NamedColor(new Color(153, 153, 204), getString("TableDemo.jfcblue2"));
+        NamedColor cybergreen  = new NamedColor(Color.green.darker().brighter(), getString("TableDemo.cybergreen"));
+        NamedColor darkgreen   = new NamedColor(new Color(0, 100, 75), getString("TableDemo.darkgreen"));
+        NamedColor forestgreen = new NamedColor(Color.green.darker(), getString("TableDemo.forestgreen"));
+        NamedColor gray        = new NamedColor(Color.gray, getString("TableDemo.gray"));
+        NamedColor green       = new NamedColor(Color.green, getString("TableDemo.green"));
+        NamedColor orange      = new NamedColor(new Color(255, 165, 0), getString("TableDemo.orange"));
+        NamedColor purple      = new NamedColor(new Color(160, 32, 240),  getString("TableDemo.purple"));
+        NamedColor red         = new NamedColor(Color.red, getString("TableDemo.red"));
+        NamedColor rustred     = new NamedColor(Color.red.darker(), getString("TableDemo.rustred"));
+        NamedColor sunpurple   = new NamedColor(new Color(100, 100, 255), getString("TableDemo.sunpurple"));
+        NamedColor suspectpink = new NamedColor(new Color(255, 105, 180), getString("TableDemo.suspectpink"));
+        NamedColor turquoise   = new NamedColor(new Color(0, 255, 255), getString("TableDemo.turquoise"));
+        NamedColor violet      = new NamedColor(new Color(238, 130, 238), getString("TableDemo.violet"));
+        NamedColor yellow      = new NamedColor(Color.yellow, getString("TableDemo.yellow"));
+
+        // Create the dummy data (a few rows of names)
+        final Object[][] data = {
+          {"Mike", "Albers",      green,       getString("TableDemo.brazil"), new Double(44.0), strawberry},
+          {"Mark", "Andrews",     blue,        getString("TableDemo.curse"), new Double(3), grapes},
+          {"Brian", "Beck",       black,       getString("TableDemo.bluesbros"), new Double(2.7182818285), raspberry},
+          {"Lara", "Bunni",       red,         getString("TableDemo.airplane"), new Double(15), strawberry},
+          {"Roger", "Brinkley",   blue,        getString("TableDemo.man"), new Double(13), peach},
+          {"Brent", "Christian",  black,       getString("TableDemo.bladerunner"), new Double(23), broccoli},
+          {"Mark", "Davidson",    darkgreen,   getString("TableDemo.brazil"), new Double(27), asparagus},
+          {"Jeff", "Dinkins",     blue,        getString("TableDemo.ladyvanishes"), new Double(8), kiwi},
+          {"Ewan", "Dinkins",     yellow,      getString("TableDemo.bugs"), new Double(2), strawberry},
+          {"Amy", "Fowler",       violet,      getString("TableDemo.reservoir"), new Double(3), raspberry},
+          {"Hania", "Gajewska",   purple,      getString("TableDemo.jules"), new Double(5), raspberry},
+          {"David", "Geary",      blue,        getString("TableDemo.pulpfiction"), new Double(3), watermelon},
+//        {"James", "Gosling",    pink,        getString("TableDemo.tennis"), new Double(21), donut},
+          {"Eric", "Hawkes",      blue,        getString("TableDemo.bladerunner"), new Double(.693), pickle},
+          {"Shannon", "Hickey",   green,       getString("TableDemo.shawshank"), new Double(2), grapes},
+          {"Earl", "Johnson",     green,       getString("TableDemo.pulpfiction"), new Double(8), carrot},
+          {"Robi", "Khan",        green,       getString("TableDemo.goodfellas"), new Double(89), apple},
+          {"Robert", "Kim",       blue,        getString("TableDemo.mohicans"), new Double(655321), strawberry},
+          {"Janet", "Koenig",     turquoise,   getString("TableDemo.lonestar"), new Double(7), peach},
+          {"Jeff", "Kesselman",   blue,        getString("TableDemo.stuntman"), new Double(17), pineapple},
+          {"Onno", "Kluyt",       orange,      getString("TableDemo.oncewest"), new Double(8), broccoli},
+          {"Peter", "Korn",       sunpurple,   getString("TableDemo.musicman"), new Double(12), sparegrass},
+
+          {"Rick", "Levenson",    black,       getString("TableDemo.harold"), new Double(1327), raspberry},
+          {"Brian", "Lichtenwalter", jfcblue,  getString("TableDemo.fifthelement"), new Double(22), pear},
+          {"Malini", "Minasandram", beige,     getString("TableDemo.joyluck"), new Double(9), corn},
+          {"Michael", "Martak",   green,       getString("TableDemo.city"), new Double(3), strawberry},
+          {"David", "Mendenhall", forestgreen, getString("TableDemo.schindlerslist"), new Double(7), peach},
+          {"Phil", "Milne",       suspectpink, getString("TableDemo.withnail"), new Double(3), banana},
+          {"Lynn", "Monsanto",    cybergreen,  getString("TableDemo.dasboot"), new Double(52), peach},
+          {"Hans", "Muller",      rustred,     getString("TableDemo.eraserhead"), new Double(0), pineapple},
+          {"Joshua", "Outwater",  blue,        getString("TableDemo.labyrinth"), new Double(3), pineapple},
+          {"Tim", "Prinzing",     blue,        getString("TableDemo.firstsight"), new Double(69), pepper},
+          {"Raj", "Premkumar",    jfcblue2,    getString("TableDemo.none"), new Double(7), broccoli},
+          {"Howard", "Rosen",     green,       getString("TableDemo.defending"), new Double(7), strawberry},
+          {"Ray", "Ryan",         black,       getString("TableDemo.buckaroo"),
+           new Double(3.141592653589793238462643383279502884197169399375105820974944), banana},
+          {"Georges", "Saab",     aqua,        getString("TableDemo.bicycle"), new Double(290), cantaloupe},
+          {"Tom", "Santos",       blue,        getString("TableDemo.spinaltap"), new Double(241), pepper},
+          {"Rich", "Schiavi",     blue,        getString("TableDemo.repoman"), new Double(0xFF), pepper},
+          {"Nancy", "Schorr",     green,       getString("TableDemo.fifthelement"), new Double(47), watermelon},
+          {"Keith", "Sprochi",    darkgreen,   getString("TableDemo.2001"), new Double(13), watermelon},
+          {"Matt", "Tucker",      eblue,       getString("TableDemo.starwars"), new Double(2), broccoli},
+          {"Dmitri", "Trembovetski", red,      getString("TableDemo.aliens"), new Double(222), tomato},
+          {"Scott", "Violet",     violet,      getString("TableDemo.raiders"), new Double(-97), banana},
+          {"Kathy", "Walrath",    darkgreen,   getString("TableDemo.thinman"), new Double(8), pear},
+          {"Nathan", "Walrath",   black,       getString("TableDemo.chusingura"), new Double(3), grapefruit},
+          {"Steve", "Wilson",     green,       getString("TableDemo.raiders"), new Double(7), onion},
+          {"Kathleen", "Zelony",  gray,        getString("TableDemo.dog"), new Double(13), grapes}
+        };
+
+        // Create a model of the data.
+        TableModel dataModel = new AbstractTableModel() {
+            public int getColumnCount() { return names.length; }
+            public int getRowCount() { return data.length;}
+            public Object getValueAt(int row, int col) {return data[row][col];}
+            public String getColumnName(int column) {return names[column];}
+            public Class getColumnClass(int c) {return getValueAt(0, c).getClass();}
+            public boolean isCellEditable(int row, int col) {return col != 5;}
+            public void setValueAt(Object aValue, int row, int column) { data[row][column] = aValue; }
+         };
+
+
+        // Create the table
+        tableView = new JTable(dataModel);
+        TableRowSorter sorter = new TableRowSorter(dataModel);
+        tableView.setRowSorter(sorter);
+
+        // Show colors by rendering them in their own color.
+        DefaultTableCellRenderer colorRenderer = new DefaultTableCellRenderer() {
+            public void setValue(Object value) {
+                if (value instanceof NamedColor) {
+                    NamedColor c = (NamedColor) value;
+                    setBackground(c);
+                    setForeground(c.getTextColor());
+                    setText(c.toString());
+                } else {
+                    super.setValue(value);
+                }
+            }
+        };
+
+        // Create a combo box to show that you can use one in a table.
+        JComboBox comboBox = new JComboBox();
+        comboBox.addItem(aqua);
+        comboBox.addItem(beige);
+        comboBox.addItem(black);
+        comboBox.addItem(blue);
+        comboBox.addItem(eblue);
+        comboBox.addItem(jfcblue);
+        comboBox.addItem(jfcblue2);
+        comboBox.addItem(cybergreen);
+        comboBox.addItem(darkgreen);
+        comboBox.addItem(forestgreen);
+        comboBox.addItem(gray);
+        comboBox.addItem(green);
+        comboBox.addItem(orange);
+        comboBox.addItem(purple);
+        comboBox.addItem(red);
+        comboBox.addItem(rustred);
+        comboBox.addItem(sunpurple);
+        comboBox.addItem(suspectpink);
+        comboBox.addItem(turquoise);
+        comboBox.addItem(violet);
+        comboBox.addItem(yellow);
+
+        TableColumn colorColumn = tableView.getColumn(getString("TableDemo.favorite_color"));
+        // Use the combo box as the editor in the "Favorite Color" column.
+        colorColumn.setCellEditor(new DefaultCellEditor(comboBox));
+
+        colorRenderer.setHorizontalAlignment(JLabel.CENTER);
+        colorColumn.setCellRenderer(colorRenderer);
+
+        tableView.setRowHeight(INITIAL_ROWHEIGHT);
+
+        scrollpane = new JScrollPane(tableView);
+        return scrollpane;
+    }
+
+    private void printTable() {
+        MessageFormat headerFmt;
+        MessageFormat footerFmt;
+        JTable.PrintMode printMode = fitWidth.isSelected() ?
+                                     JTable.PrintMode.FIT_WIDTH :
+                                     JTable.PrintMode.NORMAL;
+
+        String text;
+        text = headerTextField.getText();
+        if (text != null && text.length() > 0) {
+            headerFmt = new MessageFormat(text);
+        } else {
+            headerFmt = null;
+        }
+
+        text = footerTextField.getText();
+        if (text != null && text.length() > 0) {
+            footerFmt = new MessageFormat(text);
+        } else {
+            footerFmt = null;
+        }
+
+        try {
+            boolean status = tableView.print(printMode, headerFmt, footerFmt);
+
+            if (status) {
+                JOptionPane.showMessageDialog(tableView.getParent(),
+                                              getString("TableDemo.printingComplete"),
+                                              getString("TableDemo.printingResult"),
+                                              JOptionPane.INFORMATION_MESSAGE);
+            } else {
+                JOptionPane.showMessageDialog(tableView.getParent(),
+                                              getString("TableDemo.printingCancelled"),
+                                              getString("TableDemo.printingResult"),
+                                              JOptionPane.INFORMATION_MESSAGE);
+            }
+        } catch (PrinterException pe) {
+            String errorMessage = MessageFormat.format(getString("TableDemo.printingFailed"),
+                                                       new Object[] {pe.getMessage()});
+            JOptionPane.showMessageDialog(tableView.getParent(),
+                                          errorMessage,
+                                          getString("TableDemo.printingResult"),
+                                          JOptionPane.ERROR_MESSAGE);
+        } catch (SecurityException se) {
+            String errorMessage = MessageFormat.format(getString("TableDemo.printingFailed"),
+                                                       new Object[] {se.getMessage()});
+            JOptionPane.showMessageDialog(tableView.getParent(),
+                                          errorMessage,
+                                          getString("TableDemo.printingResult"),
+                                          JOptionPane.ERROR_MESSAGE);
+        }
+    }
+
+    class NamedColor extends Color {
+        String name;
+        public NamedColor(Color color, String name) {
+            super(color.getRGB());
+            this.name = name;
+        }
+
+        public Color getTextColor() {
+            int r = getRed();
+            int g = getGreen();
+            int b = getBlue();
+            if(r > 240 || g > 240) {
+                return Color.black;
+            } else {
+                return Color.white;
+            }
+        }
+
+        public String toString() {
+            return name;
+        }
+    }
+
+    class ColumnLayout implements LayoutManager {
+        int xInset = 5;
+        int yInset = 5;
+        int yGap = 2;
+
+        public void addLayoutComponent(String s, Component c) {}
+
+        public void layoutContainer(Container c) {
+            Insets insets = c.getInsets();
+            int height = yInset + insets.top;
+
+            Component[] children = c.getComponents();
+            Dimension compSize = null;
+            for (int i = 0; i < children.length; i++) {
+                compSize = children[i].getPreferredSize();
+                children[i].setSize(compSize.width, compSize.height);
+                children[i].setLocation( xInset + insets.left, height);
+                height += compSize.height + yGap;
+            }
+
+        }
+
+        public Dimension minimumLayoutSize(Container c) {
+            Insets insets = c.getInsets();
+            int height = yInset + insets.top;
+            int width = 0 + insets.left + insets.right;
+
+            Component[] children = c.getComponents();
+            Dimension compSize = null;
+            for (int i = 0; i < children.length; i++) {
+                compSize = children[i].getPreferredSize();
+                height += compSize.height + yGap;
+                width = Math.max(width, compSize.width + insets.left + insets.right + xInset*2);
+            }
+            height += insets.bottom;
+            return new Dimension( width, height);
+        }
+
+        public Dimension preferredLayoutSize(Container c) {
+            return minimumLayoutSize(c);
+        }
+
+        public void removeLayoutComponent(Component c) {}
+    }
+
+    void updateDragEnabled(boolean dragEnabled) {
+        tableView.setDragEnabled(dragEnabled);
+        headerTextField.setDragEnabled(dragEnabled);
+        footerTextField.setDragEnabled(dragEnabled);
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/demo/share/jfc/SwingSet2/TextAndMnemonicUtils.java	Fri Apr 06 03:53:28 2018 +0200
@@ -0,0 +1,193 @@
+/*
+ *
+ * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * - Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * - Neither the name of Oracle nor the names of its contributors may be used to
+ * endorse or promote products derived from this software without specific prior
+ * written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+import java.io.IOException;
+import java.util.Properties;
+import java.util.ResourceBundle;
+
+/**
+ * <code>TextAndMnemonicUtils</code> allows to extract text and mnemonic values
+ * from the unified text & mnemonic strings. For example:
+ *   LafMenu.laf.labelAndMnemonic=&Look && Feel
+ * The extracted text is "Look & Feel" and the extracted mnemonic mnemonic is "L".
+ *
+ * There are several patterns for the text and mnemonic suffixes which are used
+ * in the resource file. The patterns format is:
+ * (resource key -> unified text & mnemonic resource key).
+ *
+ * Keys that have label suffixes:
+ * (xxx_label -> xxx.labelAndMnemonic)
+ *
+ * Keys that have mnemonic suffixes:
+ * (xxx_mnemonic -> xxx.labelAndMnemonic)
+ *
+ * Keys that do not have definite suffixes:
+ * (xxx -> xxx.labelAndMnemonic)
+ *
+ * @author Alexander Scherbatiy
+ */
+public class TextAndMnemonicUtils {
+
+    // Label suffix for the text & mnemonic resource
+    private static final String LABEL_SUFFIX = ".labelAndMnemonic";
+
+    // Resource bundle for internationalized and accessible text
+    private static ResourceBundle bundle = null;
+
+    // Resource properties for the mnemonic key defenition
+    private static Properties properties = null;
+
+    static {
+        bundle = ResourceBundle.getBundle("resources.swingset");
+        properties = new Properties();
+        try {
+            properties.load(TextAndMnemonicUtils.class.getResourceAsStream("resources/swingset.properties"));
+        } catch (IOException ex) {
+            System.out.println("java.io.IOException: Couldn't load properties from: resources/swingset.properties");
+        }
+    }
+
+    /**
+     * Returns accessible and internationalized strings or mnemonics from the
+     * resource bundle. The key is converted to the text & mnemonic key.
+     *
+     * The following patterns are checked:
+     * Keys that have label suffixes:
+     * (xxx_label -> xxx.labelAndMnemonic)
+     *
+     * Keys that have mnemonic suffixes:
+     * (xxx_mnemonic -> xxx.labelAndMnemonic)
+     *
+     * Keys that do not have definite suffixes:
+     * (xxx -> xxx.labelAndMnemonic)
+     *
+     * Properties class is used to check if a key created for mnemonic exists.
+     */
+    public static String getTextAndMnemonicString(String key) {
+
+        if (key.endsWith("_label")) {
+            String compositeKey = composeKey(key, 6, LABEL_SUFFIX);
+            String textAndMnemonic = bundle.getString(compositeKey);
+            return getTextFromTextAndMnemonic(textAndMnemonic);
+        }
+
+        if (key.endsWith("_mnemonic")) {
+
+            String compositeKey = composeKey(key, 9, LABEL_SUFFIX);
+            Object value = properties.getProperty(compositeKey);
+
+            if (value != null) {
+                String textAndMnemonic = bundle.getString(compositeKey);
+                return getMnemonicFromTextAndMnemonic(textAndMnemonic);
+            }
+
+        }
+
+        String compositeKey = composeKey(key, 0, LABEL_SUFFIX);
+        Object value = properties.getProperty(compositeKey);
+
+        if (value != null) {
+            String textAndMnemonic = bundle.getString(compositeKey);
+            return getTextFromTextAndMnemonic(textAndMnemonic);
+        }
+
+        String textAndMnemonic = bundle.getString(key);
+        return getTextFromTextAndMnemonic(textAndMnemonic);
+    }
+
+    /**
+     * Convert the text & mnemonic string to text string
+     *
+     * The '&' symbol is treated as the mnemonic pointer
+     * The double "&&" symbols are treated as the single '&'
+     *
+     * For example the string "&Look && Feel" is converted to "Look & Feel"
+     */
+    public static String getTextFromTextAndMnemonic(String text) {
+
+        StringBuilder sb = new StringBuilder();
+
+        int prevIndex = 0;
+        int nextIndex = text.indexOf('&');
+        int len = text.length();
+
+        while (nextIndex != -1) {
+
+            String s = text.substring(prevIndex, nextIndex);
+            sb.append(s);
+
+            nextIndex++;
+
+            if (nextIndex != len && text.charAt(nextIndex) == '&') {
+                sb.append('&');
+                nextIndex++;
+            }
+
+            prevIndex = nextIndex;
+            nextIndex = text.indexOf('&', nextIndex + 1);
+        }
+
+        sb.append(text.substring(prevIndex, text.length()));
+        return sb.toString();
+    }
+
+    /**
+     * Convert the text & mnemonic string to mnemonic
+     *
+     * The '&' symbol is treated the mnemonic pointer
+     * The double "&&" symbols are treated as the single '&'
+     *
+     * For example the string "&Look && Feel" is converted to "L"
+     */
+    public static String getMnemonicFromTextAndMnemonic(String text) {
+        int len = text.length();
+        int index = text.indexOf('&');
+
+        while (0 <= index && index < text.length() - 1) {
+            index++;
+            if (text.charAt(index) == '&') {
+                index = text.indexOf('&', index + 1);
+            } else {
+                char c = text.charAt(index);
+                return String.valueOf(Character.toUpperCase(c));
+            }
+        }
+
+        return null;
+    }
+
+    /**
+     * Removes the last n characters and adds the suffix
+     */
+    private static String composeKey(String key, int reduce, String sufix) {
+        return key.substring(0, key.length() - reduce) + sufix;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/demo/share/jfc/SwingSet2/ToolTipDemo.java	Fri Apr 06 03:53:28 2018 +0200
@@ -0,0 +1,160 @@
+/*
+ *
+ * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ *   - Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ *
+ *   - Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ *
+ *   - Neither the name of Oracle nor the names of its
+ *     contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+ * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+
+import javax.swing.*;
+import javax.swing.event.*;
+import javax.swing.text.*;
+import javax.swing.border.*;
+import javax.swing.colorchooser.*;
+import javax.swing.filechooser.*;
+import javax.accessibility.*;
+
+import java.awt.*;
+import java.awt.event.*;
+import java.beans.*;
+import java.util.*;
+import java.io.*;
+import java.applet.*;
+import java.net.*;
+
+/**
+ * ToolTip Demo
+ *
+ * @author Jeff Dinkins
+ */
+public class ToolTipDemo extends DemoModule {
+
+    /**
+     * main method allows us to run as a standalone demo.
+     */
+    public static void main(String[] args) {
+        ToolTipDemo demo = new ToolTipDemo(null);
+        demo.mainImpl();
+    }
+
+    /**
+     * ToolTipDemo Constructor
+     */
+    public ToolTipDemo(SwingSet2 swingset) {
+        // Set the title for this demo, and an icon used to represent this
+        // demo inside the SwingSet2 app.
+        super(swingset, "ToolTipDemo", "toolbar/ToolTip.gif");
+
+        // Set the layout manager.
+        JPanel p = getDemoPanel();
+        p.setLayout(new BoxLayout(p, BoxLayout.Y_AXIS));
+        p.setBackground(Color.white);
+
+        // Create a Cow to put in the center of the panel.
+        Cow cow = new Cow();
+        cow.getAccessibleContext().setAccessibleName(getString("ToolTipDemo.accessible_cow"));
+
+        // Set the tooltip text. Note, for fun, we also set more tooltip text
+        // descriptions for the cow down below in the Cow.contains() method.
+        cow.setToolTipText(getString("ToolTipDemo.cow"));
+
+        // Add the cow midway down the panel
+        p.add(Box.createRigidArea(new Dimension(1, 150)));
+        p.add(cow);
+    }
+
+
+    class Cow extends JLabel {
+        Polygon cowgon = new Polygon();
+
+        public Cow() {
+            super(createImageIcon("tooltip/cow.gif", getString("ToolTipDemo.bessie")));
+            setAlignmentX(CENTER_ALIGNMENT);
+
+            // Set polygon points that define the outline of the cow.
+            cowgon.addPoint(3,20);    cowgon.addPoint(44,4);
+            cowgon.addPoint(79,15);   cowgon.addPoint(130,11);
+            cowgon.addPoint(252,5);   cowgon.addPoint(181,17);
+            cowgon.addPoint(301,45);  cowgon.addPoint(292,214);
+            cowgon.addPoint(269,209); cowgon.addPoint(266,142);
+            cowgon.addPoint(250,161); cowgon.addPoint(235,218);
+            cowgon.addPoint(203,206); cowgon.addPoint(215,137);
+            cowgon.addPoint(195,142); cowgon.addPoint(143,132);
+            cowgon.addPoint(133,189); cowgon.addPoint(160,200);
+            cowgon.addPoint(97,196);  cowgon.addPoint(107,182);
+            cowgon.addPoint(118,185); cowgon.addPoint(110,144);
+            cowgon.addPoint(59,77);   cowgon.addPoint(30,82);
+            cowgon.addPoint(30,35);   cowgon.addPoint(15,36);
+        }
+
+        boolean moo = false;
+        boolean milk = false;
+        boolean tail = false;
+
+        // Use the contains method to set the tooltip text depending
+        // on where the mouse is over the cow.
+        public boolean contains(int x, int y) {
+            if(!cowgon.contains(new Point(x, y))) {
+                return false;
+            }
+
+            if((x > 30) && (x < 60) && (y > 60) && (y < 85)) {
+                if(!moo) {
+                    setToolTipText("<html><center><font color=blue size=+2>" +
+                                   getString("ToolTipDemo.moo") + "</font></center></html>");
+                    moo = true;
+                    milk = false;
+                    tail = false;
+                }
+            } else if((x > 150) && (x < 260) && (y > 90) && (y < 145)) {
+                if(!milk) {
+                    setToolTipText("<html><center><font face=AvantGarde size=+1 color=#D2691E>" +
+                                   getString("ToolTipDemo.got_milk") + "</font></center></html>");
+                    milk = true;
+                    moo = false;
+                    tail = false;
+                }
+            } else if((x > 280) && (x < 300) && (y > 20) && (y < 175)) {
+                if(!tail) {
+                    setToolTipText("<html><em><b>" + getString("ToolTipDemo.tail") + "</b></em></html>");
+                    tail = true;
+                    moo = false;
+                    milk = false;
+                }
+            } else if(moo || milk || tail) {
+                setToolTipText(getString("ToolTipDemo.tooltip_features"));
+                moo = false;
+                tail = false;
+                milk = false;
+            }
+
+            return true;
+        }
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/demo/share/jfc/SwingSet2/TreeDemo.java	Fri Apr 06 03:53:28 2018 +0200
@@ -0,0 +1,138 @@
+/*
+ *
+ * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ *   - Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ *
+ *   - Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ *
+ *   - Neither the name of Oracle nor the names of its
+ *     contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+ * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+
+import javax.swing.*;
+import javax.swing.event.*;
+import javax.swing.tree.*;
+import javax.accessibility.*;
+
+import java.awt.*;
+import java.awt.event.*;
+import java.beans.*;
+import java.util.*;
+import java.io.*;
+import java.applet.*;
+import java.net.*;
+
+/**
+ * JTree Demo
+ *
+ * @author Jeff Dinkins
+ */
+public class TreeDemo extends DemoModule {
+
+    JTree tree;
+
+    /**
+     * main method allows us to run as a standalone demo.
+     */
+    public static void main(String[] args) {
+        TreeDemo demo = new TreeDemo(null);
+        demo.mainImpl();
+    }
+
+    /**
+     * TreeDemo Constructor
+     */
+    public TreeDemo(SwingSet2 swingset) {
+        // Set the title for this demo, and an icon used to represent this
+        // demo inside the SwingSet2 app.
+        super(swingset, "TreeDemo", "toolbar/JTree.gif");
+
+        getDemoPanel().add(createTree(), BorderLayout.CENTER);
+    }
+
+    public JScrollPane createTree() {
+        DefaultMutableTreeNode top = new DefaultMutableTreeNode(getString("TreeDemo.music"));
+        DefaultMutableTreeNode catagory = null ;
+        DefaultMutableTreeNode artist = null;
+        DefaultMutableTreeNode record = null;
+
+        // open tree data
+        URL url = getClass().getResource("/resources/tree.txt");
+
+        try {
+            // convert url to buffered string
+            InputStream is = url.openStream();
+            InputStreamReader isr = new InputStreamReader(is, "UTF-8");
+            BufferedReader reader = new BufferedReader(isr);
+
+            // read one line at a time, put into tree
+            String line = reader.readLine();
+            while(line != null) {
+                // System.out.println("reading in: ->" + line + "<-");
+                char linetype = line.charAt(0);
+                switch(linetype) {
+                   case 'C':
+                     catagory = new DefaultMutableTreeNode(line.substring(2));
+                     top.add(catagory);
+                     break;
+                   case 'A':
+                     if(catagory != null) {
+                         catagory.add(artist = new DefaultMutableTreeNode(line.substring(2)));
+                     }
+                     break;
+                   case 'R':
+                     if(artist != null) {
+                         artist.add(record = new DefaultMutableTreeNode(line.substring(2)));
+                     }
+                     break;
+                   case 'S':
+                     if(record != null) {
+                         record.add(new DefaultMutableTreeNode(line.substring(2)));
+                     }
+                     break;
+                   default:
+                     break;
+                }
+                line = reader.readLine();
+            }
+        } catch (IOException e) {
+        }
+
+        tree = new JTree(top) {
+            public Insets getInsets() {
+                return new Insets(5,5,5,5);
+            }
+        };
+
+        tree.setEditable(true);
+
+        return new JScrollPane(tree);
+    }
+
+    void updateDragEnabled(boolean dragEnabled) {
+        tree.setDragEnabled(dragEnabled);
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/demo/share/jfc/SwingSet2/resources/ant.html	Fri Apr 06 03:53:28 2018 +0200
@@ -0,0 +1,121 @@
+<html>
+<head>
+<title>Untitled Document</title>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+</head>
+
+<body bgcolor="#FFFFFF">
+<h1 align="center"><br>
+  Observ. XLIX. Of an Ant or Pismire.<br>
+</h1>
+<p align="center"><img src="images/Octavo/ant.jpg" width="481" height="325"></p>
+<p align="center">&nbsp;</p>
+<blockquote> 
+  <blockquote>
+   <p><font size="4">This was a creature, more troublesom to be drawn, then any 
+      of the rest, for I could not, for a good while, think of a way to make it 
+      suffer its body to ly quiet in a natural posture; but whil'st it was alive,
+      if its feet were fetter'd in Wax or Glew, it would so twist and wind its body, 
+      that I could not any wayes get a good view of it; and if I killed it, its 
+      body was so little, that I did often spoile the shape of it, before I could 
+      throughly view it: for this is the nature of these minute Bodies, that as 
+      soon, almost, as ever their life is destroy'd, their parts immediately shrivel, 
+      and lose their beauty; and so is it also with small Plants, as I instanced 
+      before, in the description of Moss. </font></p>
+    <p><font size="4">And thence also is the reason of the variations in the beards 
+      of wild Oats, and in those of Muskgrass seed, that their bodies, being exceeding 
+      small, those small variations which are made in the surfaces of all bodies, 
+      almost upon every change of Air, especially if the body be porous, do here 
+      become sensible, where the whole body is so small, that it is almost nothing 
+      but surface; for as in vegetable substances, I see no great reason to think, 
+      that the moisture of the Aire (that, sticking to a wreath'd beard, does make 
+      it untwist) should evaporate, or exhale away, any faster then the moisture 
+      of other bodies, but rather that the avolation from, or access of moisture 
+      to, the surfaces of bodies being much the same, those bodies become most 
+      sensible of it, which have the least proportion of body to their surface. 
+      </font></p>
+    <p><font size="4">So is it also with Animal substances; the dead body of an 
+      Ant, or such little creature, does almost instantly shrivel and dry, and 
+      your object shall be quite another thing, before you can half delineate 
+      it, which proceeds not from the extraordinary exhalation, but from the small 
+      proportion of body and juices, to the usual drying of bodies in the Air, 
+      especially if warm. </font></p>
+    <p><font size="4">For which inconvenience, where I could not otherwise remove 
+      it, I thought of this expedient. I took the creature, I had design'd to delineate, 
+      and put it into a drop of very well rectified spirit of Wine, this I found 
+      would presently dispatch, as it were, the Animal, and being taken out of 
+      it, and lay'd on a paper,the spirit of Wine would immediately fly away, 
+      and leave the Animal dry, in its natural posture, or at least, in a constitution, 
+      that it might easily with a pin be plac'd, in what posture you desired to 
+      draw it, and the limbs would so remain, without either moving, or shriveling. 
+      </font></p>
+    <p><font size="4">And thus I dealt with this Ant, which I have here delineated, 
+      which was one of many, of a very large kind, that inhabited under the Roots 
+      of a Tree, from whence they would sally out in great parties, and make most 
+      grievous havock of the Flowers and Fruits, in the ambient Garden, and return back 
+      again very expertly, by the same wayes and paths they went. </font></p>
+    <p><font size="4">It was more then half the bigness of an Earwig, of a dark 
+      brown, or reddish colour, with long legs, on the hinder of which it would 
+      stand up, and raise its head as high as it could above the ground, that it 
+      might stare the further about it, just after the same manner as I have also 
+      observ'd a hunting Spider to do: and putting my finger towards them, they 
+      have at first all run towards it, till almost at it; and then they would stand 
+      round about it, at a certain distance, and smell, as it were, and consider 
+      whether they should any of them venture any further, till one more bold then 
+      the rest venturing to climb it, all the rest, if I would have suffered them, 
+      would have immediately followed : much such other seemingly rational actions 
+      I have observ'd in this little Vermine with much pleasure, which would be 
+      too long to be here related; those that desire more of them may satisfie 
+      their curiosity in Ligons History of the Barbadoes. </font></p>
+    <p><font size="4">Having insnar'd several of these into a small Box, I made 
+      choice of the tallest grown among them, and separating it from the rest, 
+      I gave it a Gill of Brandy, or Spirit of Wine, which after a while e'en knock'd 
+      him down dead drunk, so that he became moveless, though at first putting 
+      in he struggled for a pretty while very much, till at last, certain bubbles 
+      issuing out of his mouth, it ceased to move; this (because I had before found 
+      them quickly to recover again, if they were taken out presently) I suffered 
+      to lye above an hour in the Spirit; and after I had taken it out, and put 
+      its body and legs into a natural posture, remained moveless about an hour; 
+      but then, upon a sudden, as if it had been awaken out of a drunken sleep, 
+      it suddenly reviv'd and ran away; being caught, and serv'd as before, he 
+      for a while continued struggling and striving, till at last there issued 
+      several bubbles out of its mouth, and then, tanquam animam expirasset, he 
+      remained moveless for a good while ; but at length again recovering, it was 
+      again redipt, and suffered to lye some hours in the Spirit; notwithstanding 
+      which, after it had layen dry some three or four hours, it again recovered 
+      life and motion: Which kind of Experiments, if prosecuted, which they highly 
+      deserve, seem to me of no inconsiderable use towards the invention of the 
+      Latent Scheme, (as the Noble Ve rulam calls it) or the hidden, unknown Texture 
+      of Bodies. </font></p>
+    <p><font size="4">Of what Figure this Creature appear'd through the Microscope, 
+      the 32. Scheme (though not so carefully graven as it ought) will represent 
+      to the eye, namely, That it had a large head A A, at the upper end of which 
+      were two protuberant eyes, pearl'd like those of a Fly, but smaller B B; 
+      of the Nose, or foremost part, issued two horns C C, of a shape sufficiently 
+      differing from those of a blew Fly, though indeed they seem to be both the 
+      same kind of Organ, and to serve for a kind of smelling; beyond these were 
+      two indented jaws D D, which he open'd sideways, and was able to gape them 
+      asunder very wide; and the ends of them being armed with teeth, which meeting 
+      went between each other, it was able to grasp and hold a heavy body, three 
+      or four times the bulk and weight of its own body: It had only six legs, 
+      shap'd like those of a Fly, which, as I shewed before, is an Argument that 
+      it is a winged Insect, and though I could not perceive any sign of them in 
+      the middle part of its body (which seem'd to consist of three joints or pieces 
+      E F G, out of which sprung two legs, yet 'tis known that there are of them 
+      that have long wings, and fly up and down in the air. </font></p>
+    <p><font size="4">The third and last part of its body I I I was bigger and 
+      larger then the other two, unto which it was joyn'd by a very small middle, 
+      and had a kind of loose shell, or another distinct part of its body H, which 
+      seem'd to be interpos'd, and to keep the thorax and belly from touching. 
+      The whole body was cas'd over with a very strong armour, and the belly I 
+      I I was covered likewise with multitudes of small white shining brisles; 
+      the legs, horns, head, and middle parts of its body were bestruck with hairs 
+      also, but smaller and darker. </font></p>
+  </blockquote>
+  <p>&nbsp;</p>
+  <p><a href="seaweed.html"><img src="images/htmldemo/back.jpg" width="146" height="40" align="left" border="0"></a><a href="bug.html"><img src="images/htmldemo/forward.jpg" width="196" height="40" align="right" border="0"></a></p>
+  <p>&nbsp;</p>
+  <p>&nbsp;</p>
+</blockquote>
+</body>
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/demo/share/jfc/SwingSet2/resources/bug.html	Fri Apr 06 03:53:28 2018 +0200
@@ -0,0 +1,128 @@
+<html>
+<head>
+<title>Untitled Document</title>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+</head>
+
+<body bgcolor="#FFFFFF">
+<br>
+<h1 align="center">Observ. LIV. Of a Louse.<br>
+</h1>
+<p align="center"><img src="images/Octavo/bug.jpg" width="516" height="445"></p>
+<p align="center">&nbsp;</p>
+<blockquote> 
+  <blockquote> 
+    <p><font size="4">This is a Creature so officious, that 'twill be known to 
+      every one at one time or other, so busie, and so impudent, that it will 
+      be intruding it self in every ones company, and so proud and aspiring withall, 
+      that it fears not to trample on the best, and affects nothing so much as 
+      a Crown; feeds and lives very high, and that makes it so saucy, as to pull 
+      any one by the ears that comes in its way, and will never be quiet till 
+      it has drawn blood: it is troubled at nothing so much as at a man that scratches 
+      his head, as knowing that man is plotting and contriving some mischief against 
+      it, and that makes it oftentime sculk into some meaner and lower place, and 
+      run behind a mans back, though it go very much against the hair; which ill 
+      conditions of it having made it better known then trusted, would exempt me 
+      from making any further description of it, did not my faithful Mercury, my 
+      Microscope, bring me other information of it. </font></p>
+    <p><font size="4">For this has discovered to me, by means of a very bright light 
+      cast on it, that it is a Creature of a very odd shape ; it has a head shap'd 
+      like that exprest in 35. Scheme marked with A, which seems almost Conical, 
+      but is a little flatted on the upper and under sides, at the biggest part 
+      of which, on either side behind the head (as it were, being the place where 
+      other Creatures ears stand) are placed its two black shining goggle eyes 
+      B B, looking backwards, and fenced round with several small cilia or hairs 
+      that incompass it, so that it seems this Creature has no very good foresight: 
+      It does not seem to have any eyelids, and therefore perhaps its eyes were 
+      so placed, that it might the better cleanse them with its forelegs; and perhaps 
+      this may be the reason, why they so much avoid and run from the light behind 
+      them, for being made to live in the shady and dark recesses of the hair, 
+      and thence probably their eye having a great aperture, the open and clear 
+      light, especially that of the Sun, must needs very much offend them; to secure 
+      these eyes from receiving any injury from the hairs through which it passes, 
+      it has two horns that grow before it, in the place where one would have thought 
+      the eyes should be; each of these C C have four joynts, which are fringed, 
+      as 'twere, with small brisles, from which to the tip of its snout D, the 
+      head seems very round and tapering, ending in a very sharp nose D, which 
+      seems to have a small hole, and to be the passage through which he sucks 
+      the blood. </font></p>
+    <p>&nbsp;</p>
+    <p><img src="images/Octavo/bug2.jpg" width="537" height="348"></p>
+    <p><font size="4">Now whereas it if be plac'd on its back, with its belly 
+      upwards, as it is in the 35. Scheme, it seems in several Positions to have 
+      a resemblance of chaps, or jaws, as is represented in the Figure by E E, 
+      yet in other postures those dark strokes disappear; and having kept several 
+      of them in a box for two or three dayes, so that for all that time they had 
+      nothing to feed on, I found, upon letting onecreep on my hand, that it immediately 
+      fell to sucking, and did neither seem to thrust its nose very deep into the 
+      skin, nor to open any kind of mouth, but I could plainly perceive a small 
+      current of blood, which came directly from its snout, and past into its belly; 
+      and about A there seem'd a contrivance, somewhat resembling a Pump, pair 
+      of Bellows, or Heart, for by a very swift systole and diastole the blood 
+      seem'd drawn from the nose, and forced into the body. </font></p>
+    <p><font size="4">It did not seem at all, though I viewed it a good while as 
+      it was sucking, to thrust more of its nose into the skin then the very snout 
+      D, nor did it cause the least discernable pain, and yet the blood seem'd 
+      to run through its head very quick and freely, so that it seems there is 
+      no part of the skin but the blood is dispers'd into, nay, even into the 
+      cuticula; for had it thrust its whole nose in from D to C C, it would not 
+      have amounted to the supposed thickness of that tegument, the length of 
+      the nose being not more then a three hundredth part of an inch. </font></p>
+    <p><font size="4">It has six legs, covered with a very transparent shell, 
+      and joynted exactly like a Crab's, or Lobster's; each leg is divided into 
+      six parts by these joynts, and those have here and there several small hairs; 
+      and at the end of each leg it has two claws, very properly adapted for its 
+      peculiar use, being thereby inabled to walk very securely both on the skin 
+      and hair; and indeed this contrivance of the feet is very curious, and could 
+      not be made more commodiously and compendiously, for performing both these 
+      requisite motions, of walking and climbing up the hair of a mans head, then 
+      it is : for, by having the lesser claw (a) set so much short of the bigger 
+      (b) when it walks on the skin the shorter touches not, and then the feet 
+      are the same with those of a Mite, and several other small Insects, but by 
+      means of the small joynts of the longer claw it can bend it round, and so 
+      with both claws take hold of a hair, in the manner represented in the Figure, 
+      the long transparent Cylinder F F F, being a Man's hair held by it. </font></p>
+    <p><font size="4">The Thorax seem'd cas'd with another kind of substance then 
+      the belly, namely, with a thin transparent horny substance, which upon the fasting 
+      of the Creature did not grow flaccid; through this I could plainly see the 
+      blood, suck'd from my hand, to be variously distributed, and mov'd to and 
+      fro; and about G there seem'd a pretty big white substance, which seem'd 
+      to be moved within its thorax; besides, there appear'd very many small milk-white 
+      vessels, which crost over the breast between the legs, out of which, on 
+      either side, are many small branchings, these seem'd to be the veins and 
+      arteries, for that which is analogus to blood in all Insects is milk-white. 
+      </font></p>
+    <p><font size="4">The belly is covered with a transparent substance likewise, 
+      but more resembling a skin then a shell, for 'tis grain'd all over the belly 
+      just like the skin in the palms of a man's hand, and when the belly is empty, 
+      grows very flaccid and wrinkled ; at the upper end of this is placed the 
+      stomach H H, and perhaps also the white spot I I may be the liver, or pancreas, 
+      which by the peristaltick motion of the guts, is a little mov'd to and fro, 
+      not with a systole and diastole, but rather with a thronging or justling 
+      motion. </font></p>
+    <p><font size="4">Viewing one of these Creatures, after it had fasted two 
+      dayes, all the hinder part was lank and flaccid, and the white spot I I 
+      hardly mov'd, most of the white branchings disappear'd, and most also of 
+      the redness or sucked blood in the guts, the peristaltick motion of which 
+      was scarce discernable; but upon the suffering it to suck, it presently 
+      fill'd the skin of the belly, and of the six scolop'd embosments on either side, 
+      as full as it could be stuft ; the stomach and guts were as full as they 
+      could hold; the peristaltick motion of the gut grew quick, and the justling 
+      motion of I I accordingly ; multitudes of milk-white vessels seem'd quickly 
+      filled, and turgid, which were perhaps the veins and arteries, and the Creature 
+      was so greedy, that though it could not contain more, yet it continued sucking 
+      as fast as ever, and as fast emptying it self behind : the digestion of this 
+      Creature must needs be very quick, for though I perceiv'd the blood thicker 
+      and blacker when suck'd, yet, when in the guts, it was of a very lovely 
+      ruby colour, and that part of it, which was digested into the veins, seemed 
+      white; whence it appears, that a further digestion of blood may make it 
+      milk, at least of a resembling colour : What is else observable in the figure 
+      of this Creature, maybe seen by the 35. Scheme.</font></p>
+    </blockquote>
+  <p>&nbsp;</p>
+  <p><a href="ant.html"><img src="images/htmldemo/back.jpg" width="146" height="40" align="left" border="0"></a><a href="index.html"><img src="images/htmldemo/forward.jpg" width="196" height="40" align="right" border="0"></a></p>
+  <p>&nbsp;</p>
+  <p>&nbsp;</p>
+</blockquote>
+</body>
+</html>
Binary file src/demo/share/jfc/SwingSet2/resources/images/About.jpg has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/demo/share/jfc/SwingSet2/resources/images/Octavo/CREDITS	Fri Apr 06 03:53:28 2018 +0200
@@ -0,0 +1,2 @@
+Images and text in the SwingSet html demo are used by permission of Octavo
+Corporation and are sourced from Rare Book Room (rarebookroom.org).
Binary file src/demo/share/jfc/SwingSet2/resources/images/Octavo/ant.jpg has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/Octavo/book.jpg has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/Octavo/bug.jpg has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/Octavo/bug2.jpg has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/Octavo/crest.jpg has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/Octavo/king.jpg has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/Octavo/micro.jpg has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/Octavo/seaweed.jpg has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/buttons/b1.gif has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/buttons/b1d.gif has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/buttons/b1p.gif has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/buttons/b1r.gif has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/buttons/b2.gif has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/buttons/b2d.gif has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/buttons/b2p.gif has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/buttons/b2r.gif has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/buttons/b3.gif has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/buttons/b3d.gif has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/buttons/b3p.gif has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/buttons/b3r.gif has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/buttons/bl.gif has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/buttons/bldn.gif has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/buttons/bm.gif has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/buttons/bmdn.gif has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/buttons/br.gif has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/buttons/brdn.gif has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/buttons/c.gif has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/buttons/cb.gif has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/buttons/cbr.gif has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/buttons/cbrs.gif has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/buttons/cbs.gif has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/buttons/cdn.gif has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/buttons/ml.gif has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/buttons/mldn.gif has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/buttons/mr.gif has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/buttons/mrdn.gif has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/buttons/rb.gif has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/buttons/rbp.gif has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/buttons/rbr.gif has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/buttons/rbrs.gif has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/buttons/rbs.gif has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/buttons/tl.gif has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/buttons/tldn.gif has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/buttons/tm.gif has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/buttons/tmdn.gif has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/buttons/toggle.gif has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/buttons/toggledn.gif has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/buttons/tr.gif has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/buttons/trdn.gif has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/combobox/brenteyes.jpg has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/combobox/brenthair.jpg has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/combobox/brentmouth.jpg has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/combobox/georgeseyes.jpg has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/combobox/georgeshair.jpg has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/combobox/georgesmouth.jpg has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/combobox/hanseyes.jpg has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/combobox/hanshair.jpg has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/combobox/hansmouth.jpg has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/combobox/howardeyes.jpg has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/combobox/howardhair.jpg has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/combobox/howardmouth.jpg has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/combobox/jameseyes.jpg has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/combobox/jameshair.jpg has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/combobox/jamesmouth.jpg has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/combobox/jeffeyes.jpg has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/combobox/jeffhair.jpg has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/combobox/jeffmouth.jpg has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/combobox/joneyes.jpg has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/combobox/jonhair.jpg has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/combobox/jonmouth.jpg has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/combobox/laraeyes.jpg has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/combobox/larahair.jpg has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/combobox/laramouth.jpg has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/combobox/larryeyes.jpg has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/combobox/larryhair.jpg has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/combobox/larrymouth.jpg has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/combobox/lisaeyes.jpg has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/combobox/lisahair.jpg has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/combobox/lisamouth.jpg has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/combobox/michaeleyes.jpg has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/combobox/michaelhair.jpg has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/combobox/michaelmouth.jpg has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/combobox/philipeyes.jpg has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/combobox/philiphair.jpg has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/combobox/philipmouth.jpg has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/combobox/scotteyes.jpg has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/combobox/scotthair.jpg has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/combobox/scottmouth.jpg has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/filechooser/find.gif has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/filechooser/gifIcon.gif has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/filechooser/help.gif has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/filechooser/jpgIcon.jpg has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/food/apple.jpeg has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/food/apple.jpg has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/food/asparagus.gif has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/food/banana.gif has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/food/broccoli.gif has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/food/cantaloupe.gif has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/food/carrot.gif has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/food/corn.gif has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/food/grapefruit.gif has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/food/grapes.gif has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/food/kiwi.gif has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/food/onion.gif has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/food/peach.gif has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/food/pear.gif has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/food/pepper.gif has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/food/pickle.gif has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/food/pineapple.gif has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/food/raspberry.gif has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/food/strawberry.gif has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/food/tomato.gif has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/food/watermelon.gif has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/htmldemo/back.jpg has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/htmldemo/forward.jpg has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/htmldemo/header.jpg has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/list/blue.gif has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/list/cyan.gif has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/list/gray.gif has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/list/green.gif has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/list/magenta.gif has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/list/red.gif has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/list/yellow.gif has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/misc/cab.gif has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/misc/cab_small.gif has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/misc/duchess.gif has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/misc/duchess_small.gif has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/misc/duke.gif has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/misc/duke_small.gif has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/misc/toast.gif has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/misc/toast_small.gif has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/optionpane/bottle.gif has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/optionpane/ibd.gif has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/optionpane/ibu.gif has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/demo/share/jfc/SwingSet2/resources/images/scrollpane/COPYRIGHT	Fri Apr 06 03:53:28 2018 +0200
@@ -0,0 +1,7 @@
+
+ All images in this directory are copyright 1995 by Jeff Dinkins. 
+ Unauthorized reproduction is prohibited.
+
+ For more information about Jeff's photographs, please see:
+      http://www.theFixx.org/Jeff
+
Binary file src/demo/share/jfc/SwingSet2/resources/images/scrollpane/colheader.jpg has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/scrollpane/crayons.jpg has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/scrollpane/lowerleft.jpg has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/scrollpane/rowheader.jpg has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/scrollpane/upperleft.jpg has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/scrollpane/upperright.jpg has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/splash.png has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/demo/share/jfc/SwingSet2/resources/images/splitpane/README	Fri Apr 06 03:53:28 2018 +0200
@@ -0,0 +1,4 @@
+
+ All images in this directory were obtained from NASA at:
+      http://www.nasa.gov
+
Binary file src/demo/share/jfc/SwingSet2/resources/images/splitpane/earth.jpg has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/splitpane/moon.jpg has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/tabbedpane/blake.gif has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/tabbedpane/brooke.gif has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/tabbedpane/david.gif has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/tabbedpane/ewan.gif has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/tabbedpane/ewan.jpg has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/tabbedpane/hania.jpg has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/tabbedpane/laine.jpg has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/tabbedpane/matthew.gif has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/tabbedpane/stephen.gif has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/toolbar/JButton.gif has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/toolbar/JColorChooser.gif has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/toolbar/JComboBox.gif has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/toolbar/JDesktop.gif has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/toolbar/JDialog.gif has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/toolbar/JEditorPane.gif has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/toolbar/JFileChooser.gif has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/toolbar/JList.gif has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/toolbar/JMenu.gif has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/toolbar/JOptionPane.gif has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/toolbar/JProgressBar.gif has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/toolbar/JRadioButton.gif has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/toolbar/JScrollBar.gif has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/toolbar/JScrollPane.gif has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/toolbar/JSlider.gif has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/toolbar/JSplitPane.gif has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/toolbar/JTabbedPane.gif has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/toolbar/JTable.gif has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/toolbar/JTree.gif has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/toolbar/ToolTip.gif has changed
Binary file src/demo/share/jfc/SwingSet2/resources/images/tooltip/cow.gif has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/demo/share/jfc/SwingSet2/resources/index.html	Fri Apr 06 03:53:28 2018 +0200
@@ -0,0 +1,42 @@
+<html>
+<head>
+<title>Untitled Document</title>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+</head>
+
+<body bgcolor="#FFFFFF">
+<p>&nbsp;</p>
+<p align="center"><img src="images/htmldemo/header.jpg" width="363" height="171"></p>
+<p align="center"><img src="images/Octavo/book.jpg" width="550" height="428"></p>
+<p align="center">&nbsp;</p>
+<p align="center">&nbsp;</p>
+<blockquote>
+  <h3><b><a href="title.html">Title Page</a></b></h3>
+  <h3><b><a href="king.html">To The King</a></b></h3>
+  <h3><b><a href="preface.html">The Preface</a></b></h3>
+  <h3><a href="seaweed.html">Of the curious texture of Sea-weeds</a></h3>
+  <h3><a href="ant.html">Of an Ant or Pismire</a></h3>
+  <h3><a href="bug.html">Of a Louse</a> <br>
+    <br>
+    <br>
+  </h3>
+  <p><font color="#990000" size="4">Images and text used by permission of Octavo 
+    Corporation (www.octavo.com),<br>
+    </font><font color="#990000" size="4">(c) 1999 Octavo Corporation. All 
+    rights reserved.</font> <br>
+    <br>
+    <br>
+    <font size="2">Octavo Corporation is a publisher of rare 
+    books and manuscripts with digital tools and formats through partnerships 
+    with libraries, museums, and individuals. Using high-resolution digital imaging 
+    technology, Octavo releases digital rare books on CD-ROM as Adobe PDF files 
+    which can be viewed on and printed from almost any computing platform. You 
+    can view each page and the binding on your computer screen, zoom in to view 
+    detail up to 800% in some cases, and search, copy and paste the "live" text 
+    placed invisibly behind the page images which is available for selected Editions. 
+    Also included in each edition is the work's collation and provenance, as well 
+    as commentary by a noted expert in its field. </font></p>
+</blockquote>
+<p>&nbsp;</p>
+</body>
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/demo/share/jfc/SwingSet2/resources/king.html	Fri Apr 06 03:53:28 2018 +0200
@@ -0,0 +1,45 @@
+<html>
+<head>
+<title>Untitled Document</title>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+</head>
+
+<body bgcolor="#FFFFFF">
+<p align="center"><font size="5"><img src="images/Octavo/king.jpg" width="420" height="290"> 
+  </font></p>
+<p align="center">&nbsp;</p>
+<blockquote> <font size="4">Do here most humbly lay this small Present at Your 
+  Majesties Royal feet. And though it comes accompany'd with two disadvantages, 
+  the meanness of the Author, and of the Subject; yet in both I am incouraged 
+  by the greatness of your Mercy and your Knowledge. </font>
+<p><font size="4">By the one I am taught , that you can forgive the most presumptuous 
+    Offendors: And by the other, that you will not esteem the least work of Nature, 
+    or Art, unworthy your Observation. </font></p>
+  <p><font size="4">Amidst the many felicities that have accompani'd your Majesties 
+    happy Restauration and Government, it is none of the least considerable, that 
+    Philosophy and Experimental Learning have prosper'd under your Royal Patronage.</font></p>
+  <p><font size="4">And as the calm prosperity of your Reign has given us the 
+    leisure to follow these Studies of quiet and retirement, so it is just, that 
+    the Fruits of them should, by way of acknowledgement, be return'd to your 
+    Majesty. There are, Sir, several other of your Subjects, of your Royal Society, 
+    now busie about Nobler matters: The Improvement of Manufactures and Agriculture, 
+    the Increase of Commerce, the Advantage of Navigation: In all which they are 
+    assisted by your Majesties Incouragement and Example. </font></p>
+  <p><font size="4">Amidst all those greater Designs, I here presume to bring 
+    in that which is more proportionable to the smalness of my Abilities, and 
+    to offer some of the least of all visible things, to that Mighty King, that 
+    has establisht an Empire over the best of all Invisible things of this World, 
+    the Minds o f Men.</font></p>
+  <blockquote>
+    <p align="right">&nbsp;</p>
+  </blockquote>
+  <p align="right"><i><font size="5">Your Majesties most humble</font></i></p>
+  <p align="right"><font size="5"><i> and most obedient</i></font></p>
+  <p align="right"><font size="5"><i> Subject and Servant,</i></font></p>
+  <p align="right">&nbsp;</p>
+  <p align="right"><b><font size="5">ROBERT HOOKE .</font></b></p>
+  <p align="right">&nbsp;</p>
+  <p align="right"><a href="title.html"><img src="images/htmldemo/back.jpg" width="146" height="40" align="left" border="0"></a><a href="preface.html"><img src="images/htmldemo/forward.jpg" width="196" height="40" align="right" border="0"></a></p>
+</blockquote>
+</body>
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/demo/share/jfc/SwingSet2/resources/preface.html	Fri Apr 06 03:53:28 2018 +0200
@@ -0,0 +1,115 @@
+<html>
+<head>
+<title>Untitled Document</title>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+</head>
+
+<body bgcolor="#FFFFFF">
+<div align="center">
+  <p>&nbsp;</p>
+  <h1 align="center">THE PREFACE</h1>
+  <img src="images/Octavo/micro.jpg" width="381" height="384"> </div>
+<div align="right"> 
+  <p align="left">&nbsp;</p>
+  <p>&nbsp;</p>
+</div>
+<blockquote> 
+  <div align="left">
+    <p><font size="5"> <font size="4">It is the great prerogative of Mankind above 
+      other Creatures, that we are not only able to behold the works of Nature, 
+      or barely to sustein our lives by them, but we have also the power of considering, 
+      comparing, altering, assisting, and improving them to various uses. </font></font></p>
+    <p><font size="4">And as this is the peculiar priviledge of humane Nature 
+      in general, so is it capable of being so far advanced by the helps of Art, 
+      and Experience, as to make some Men excel others in their Observations, 
+      and Deductions, almost as much as they do Beasts. </font></p>
+    <p><font size="4">By the addition of such artificial Instruments and methods, 
+      there may be, in some manner, a reparation made for the mischiefs, and imperfection, 
+      mankind has drawn upon itself, by negligence, and intemperance, and a wilful 
+      and superstitious deserting the Prescripts and Rules of Nature, whereby 
+      every man, both from a deriv'd corruption, innate and born with him, and 
+      from his breeding and converse with men, is very subject to slip into all 
+      sorts of errors. </font></p>
+    <p><font size="4">The only way which now remains for us to recover some degree 
+      of those former perfections, seems to be, by rectifying the operations of 
+      the Sense, the Memory, and Reason, since upon the evidence, the strength, 
+      the integrity, and the right correspondence of all these, all the light, 
+      by which our actions are to be guided, is to be renewed, and all our command 
+      over things is to be establisht.</font></p>
+    <p><font size="4"> It is therefore most worthy of our consideration, to recollect 
+      their several defects, that so we may the better understand how to supply 
+      them, and by what assistances we may inlarge their power, and secure them 
+      in performing their particular duties.</font></p>
+    <p><font size="4">As for the actions of our Senses, we cannot but observe 
+      them to be in many particulars much outdone by those of other Creatures, 
+      and when at best, to be far short of the perfection they seem capable of 
+      : And these infirmities of the Senses arise from a double cause, either 
+      from the disproportion of the Object to the Organ, whereby an infinite number 
+      of things can never enter into them, or else from error in the Perception, 
+      that many things, which come within their reach, are not received in a right 
+      manner. </font></p>
+    <p><font size="4">The like frailties are to be found in the Memory; we often 
+      let many things slip away from us, which deserve to be retain'd; and of 
+      those which we treasure up, a great part is either frivolous or false ; 
+      and if good, and substantial, either in tract of time obliterated, or at 
+      best so overwhelmed and buried under more frothy notions, that when there 
+      is need of them, they are in vain sought for. </font></p>
+    <p><font size="4">The two main foundations being so deceivable, it is no wonder, 
+      that all the succeeding works which we build upon them, of arguing, concluding, 
+      defining, judging, and all the other degrees of Reason, are lyable to the 
+      same imperfection, being, at best, either vain, or uncertain: So that the 
+      errors of the understanding are answerable to the two other, being defective 
+      both in the quantity and goodness of its knowledge; for the limits, to which 
+      our thoughts are confind, are small in respect of the vast extent of Nature 
+      it self; some parts of it are too large to be comprehended, and some too 
+      little to be perceived. </font></p>
+    <p><font size="4">And from thence it must follow, that not having a full sensation 
+      of the Object, we must be very lame and imperfect in our conceptions about 
+      it, and in all the propositions which we build upon it; hence we often take 
+      the shadow of things for the substance, small appearances for good similitudes, 
+      similitudes for definitions; and even many of those, which we think to be 
+      the most solid definitions, are rather expressions of our own misguided 
+      apprehensions then of the true nature of the things themselves. </font></p>
+    <p><font size="4">The effects of these imperfections are manifested in different 
+      ways, according to the temper and disposition of the several minds of men, 
+      some they incline to gross ignorance and stupidity, and others to a presumptuous 
+      imposing on other mens Opinions, and a confident dogmatizing on matters, 
+      whereof there is no assurance to be given. </font></p>
+    <p><font size="4">Thus all the uncertainty, and mistakes of humane actions, 
+      proceed either from the narrowness and wandring of our Senses, from the 
+      slipperiness or delusion of our Memory, from the confinement or rashness 
+      of our Understanding, so that 'tis no wonder, that our power over natural 
+      causes and effects is so slowly improvd, seeing we are not only to contend 
+      with the obscurity and difficulty of the things whereon we work and think, 
+      but even the forces of our own minds conspire to betray us. </font></p>
+    <p><font size="4">These being the dangers in the process of humane Reason, 
+      the remedies of them all can only proceed from the real, the mechanical, 
+      the experimental Philosophy, which has this advantage over the Philosophy 
+      of discourse and disputation, that whereas that chiefly aims at the subtilty 
+      of its Deductions and Conclusions, without much regard to the first groundwork, 
+      which ought to be well laid on the Sense and Memory ; so this intends the 
+      right ordering of them all, and the making them serviceable to each other. 
+      </font></p>
+    <p><font size="4">The first thing to be undertaken in this weighty work, is 
+      a watchfulness over the failings and an inlargement of the dominion, of 
+      the Senses. To which end it is requisite, first, That there should be a 
+      scrupulous choice, and a strict examination, of the reality, constancy, 
+      and certainty of the Particulars that we admit: This is the first rise whereon 
+      truth is to begin, and here the most severe, and most impartial diligence, 
+      must be imployed ; the storing up of all, without any regard to evidence 
+      or use, will only tend to darkness and confusion. </font></p>
+    <p><font size="4">We must not therefore esteem the riches of our Philosophical 
+      treasure by the number only, but chiefly by the weight; the most vulgar 
+      Instances are not to be neglected, but above all, the most instructive are 
+      to be entertain'd: the footsteps of Nature are to be trac'd, not only in 
+      her ordinary course,but when she seems to be put to her shifts, to make 
+      many doublings and turnings, and to use some kind of art in indeavouring 
+      to avoid our discovery. </font></p>
+    <p>&nbsp;</p>
+    <p><a href="king.html"><img src="images/htmldemo/back.jpg" width="146" height="40" align="left" border="0"></a><a href="seaweed.html"><img src="images/htmldemo/forward.jpg" width="196" height="40" align="right" border="0"></a></p>
+    <p>&nbsp;</p>
+    <p>&nbsp;</p>
+  </div>
+</blockquote>
+</body>
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/demo/share/jfc/SwingSet2/resources/seaweed.html	Fri Apr 06 03:53:28 2018 +0200
@@ -0,0 +1,62 @@
+<html>
+<head>
+<title>Untitled Document</title>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+</head>
+
+<body bgcolor="#FFFFFF">
+<h1 align="center"><br>
+  Observ. XXIII. Of the curious texture of Sea-weeds.<br>
+</h1>
+<p align="center"><img src="images/Octavo/seaweed.jpg" width="316" height="498"></p>
+<p align="center">&nbsp;</p>
+<blockquote>
+  <p><font size="4">For curiosity and beauty, I have not among all the Plants 
+    or Vegetables I have yet observ'd, seen any one comparable to this Sea-weed 
+    I have here describ'd, of which I am able to say very little more then what 
+    is represented by the second Figure of the ninth Scheme: Namely, that it is 
+    a Plant which grows upon the Rocks under the water, and increases and spreads 
+    it self into a great tuft, which is not onely handsomely branch'd into several 
+    leaves, but the whole surface of the Plant is cover'd over with a most curious 
+    kind of carv'd work, which consists of a texture much resembling a Honeycomb; 
+    for the whole surface on both sides is cover'd over with a multitude of very 
+    small holes, being no bigger then so many holes made with the point of a small 
+    Pinn, and rang'd in the neatest and most delicate order imaginable, they being 
+    plac'd in the manner of a Quincunx, or very much like the rows of the eyes 
+    of a Fly, the rows or orders being very regular, which way soever they are 
+    observ'd: what the texture was, as it appear'd through a pretty bigg Magnifying 
+    Microscope, I have here adjoin'd in the first Figure of the 14. Scheme. which 
+    round Area A B C D represents a part of the surface about one eighth part 
+    of an Inch in Diameter: Those little holes, which to the eye look'd round, 
+    like so many little spots, here appear'd very regularly shap'd holes, representing 
+    almost the shape of the sole of a round toed shoe, the hinder part of which, 
+    is, as it were, trod on or cover'd by the toe of that next below it; these 
+    holes seem'd wall'd about with a very thin and transparent substance, looking 
+    of a pale straw-colour; from the edge of which, against the middle of each 
+    hole, were sprouted out four small transparent straw-colour'd Thorns, which 
+    seem'd to protect and cover those cavities, from either side two; neer the 
+    root of this Plant, were sprouted out several small branches of a kind of 
+    bastard Coralline, curiously branch'd, though small. </font></p>
+  <p><font size="4">And to confirm this, having lately the opportunity of viewing 
+    the large Plant (if I may so call it) of a Sponge petrify'd, of which I made 
+    mention in the last Observation, I found, that each of the Branches or Figures 
+    of it, did, by the range of its pores, exhibit just such a texture, the rows 
+    of pores crossing one another, much after the manner as the rows of eyes do 
+    which are describ'd in the 26. Scheme : Coralline also, and several sorts of 
+    white Coral, I have with a Microscope observ'd very curiously shap'd. And 
+    I doubt not, but that he that shall observe these several kinds of Plants that 
+    grow upon Rocks, which the Sea sometimes overflows, and those heaps of others 
+    which are vomited out of it upon the shore, may find multitudes of little 
+    Plants, and other bodies, which like this will afford very beautifull objects 
+    for the Microscope ; and this Specimen here is adjoin'd onely to excite their 
+    curiosities who have opportunity of observing to examine and collect what 
+    they find worthy their notice; for the Sea, among terrestrial bodies, is also 
+    a prolifick mother, and affords as many Instances of spontaneous generations 
+    as either the Air or Earth.</font></p>
+  <p>&nbsp;</p>
+  <p><a href="preface.html"><img src="images/htmldemo/back.jpg" width="146" height="40" align="left" border="0"></a><a href="ant.html"><img src="images/htmldemo/forward.jpg" width="196" height="40" align="right" border="0"></a></p>
+  <p>&nbsp;</p>
+  <p>&nbsp;</p>
+</blockquote>
+</body>
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/demo/share/jfc/SwingSet2/resources/swingset.properties	Fri Apr 06 03:53:28 2018 +0200
@@ -0,0 +1,677 @@
+# This properties file is used to create a PropertyResourceBundle
+# It contains Locale specific strings used in the SwingSet demo.
+#
+# @author Jeff Dinkins
+
+#################################
+###  SwingSet Infrastructure  ###
+#################################
+
+### About Box ###
+
+AboutBox.title=About Swing!
+AboutBox.ok_button_text=OK
+AboutBox.accessible_description=SwingSet2 demo is Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+
+### Source Code ###
+SourceCode.loading=<html><body bgcolor=\"#ffffff\">Loading and formatting source code, please wait...</body></html>
+
+### Status ###
+
+Status.loading=Loading:
+Status.popupMenuAccessible=Press Shift-F10 to activate popup menu
+
+### Menu Bar ###
+
+MenuBar.accessible_description=Swing demo menu bar
+
+
+### Frame ###
+
+Frame.title=SwingSet2
+
+
+### Tabbed Pane ###
+
+TabbedPane.src.labelAndMnemonic=Source Code
+TabbedPane.src_tooltip=Look at the source code for this demo
+
+
+### Look & Feel Menu ###
+
+LafMenu.laf.labelAndMnemonic=&Look && Feel
+LafMenu.laf_accessible_description=Menu that allows Look && Feel switching
+
+LafMenu.java.labelAndMnemonic=&Java Look && Feel
+LafMenu.java_accessible_description=The Java Look && Feel
+
+LafMenu.nimbus.labelAndMnemonic=&Nimbus Look && Feel
+LafMenu.nimbus_accessible_description=The Nimbus Look && Feel
+
+LafMenu.mac.labelAndMnemonic=&Mac OS X Look && Feel
+LafMenu.mac_accessible_description=The Mac OS X Look && Feel
+
+LafMenu.motif.labelAndMnemonic=M&otif Look && Feel
+LafMenu.motif_accessible_description=The Motif Look && Feel
+
+LafMenu.windows.labelAndMnemonic=&Windows Style Look && Feel
+LafMenu.windows_accessible_description=Windows Style Look && Feel
+
+LafMenu.gtk.labelAndMnemonic=&GTK Style Look && Feel
+LafMenu.gtk_accessible_description=GTK Style Look && Feel
+
+
+### Themes Menu ###
+
+ThemesMenu.themes.labelAndMnemonic=&Themes
+ThemesMenu.themes_accessible_description=Menu to switch Metal color themes
+
+ThemesMenu.aqua.labelAndMnemonic=A&qua
+ThemesMenu.aqua_accessible_description=A Metal Theme that uses bluish-green colors
+
+ThemesMenu.charcoal.labelAndMnemonic=&Charcoal
+ThemesMenu.charcoal_accessible_description=A Metal Theme that uses dark grey colors
+
+ThemesMenu.contrast.labelAndMnemonic=&High Contrast
+ThemesMenu.contrast_accessible_description=A High Contrast Theme
+
+ThemesMenu.ocean.labelAndMnemonic=&Ocean
+ThemesMenu.ocean_accessible_description=The Ocean Metal Theme
+
+ThemesMenu.steel.labelAndMnemonic=&Steel
+ThemesMenu.steel_accessible_description=The blue/purple Metal Theme
+
+ThemesMenu.emerald.labelAndMnemonic=&Emerald
+ThemesMenu.emerald_accessible_description=A Metal Theme that uses green colors
+
+ThemesMenu.ruby.labelAndMnemonic=&Ruby
+ThemesMenu.ruby_accessible_description=A Metal Theme that uses red colors
+
+
+### Font SubMenu (under Themes) 
+FontMenu.fonts.labelAndMnemonic=&Fonts
+FontMenu.fonts_accessible_description=Menu to choose fonts for the Java look and feel
+
+FontMenu.bold.labelAndMnemonic=&Bold
+FontMenu.bold_accessible_description=Turns on bold fonts for the Java look and feel
+
+FontMenu.plain.labelAndMnemonic=&Plain
+FontMenu.plain_accessible_description=Turns on plain fonts for the Java look and feel
+
+
+### Audio SubMenu (under Themes) ###
+
+AudioMenu.audio.labelAndMnemonic=&Audio
+AudioMenu.audio_accessible_description=Menu to switch the amount of auditory feedback available within the Java look and feel
+
+AudioMenu.on.labelAndMnemonic=&On
+AudioMenu.on_accessible_description=Turn on all auditory feedback for the Java look and feel
+
+AudioMenu.default.labelAndMnemonic=&Default
+AudioMenu.default_accessible_description=Turn on the standard amount of auditory feedback for the Java look and feel
+
+AudioMenu.off.labelAndMnemonic=O&ff
+AudioMenu.off_accessible_description=Turn off all auditory feedback for the Java look and feel
+
+### Options Menu ###
+
+OptionsMenu.options.labelAndMnemonic=O&ptions
+OptionsMenu.options_accessible_description=Menu containing other options
+
+OptionsMenu.tooltip.labelAndMnemonic=Enable &Tool Tips
+OptionsMenu.tooltip_accessible_description=Enable or disable tool tips
+
+OptionsMenu.dragEnabled.labelAndMnemonic=Enable &Drag Support
+OptionsMenu.dragEnabled_accessible_description=Enable or disable drag support
+
+### File Menu ###
+
+FileMenu.file.labelAndMnemonic=&File
+FileMenu.accessible_description=File Menu
+FileMenu.about.labelAndMnemonic=A&bout
+FileMenu.about_accessible_description=Find out about the SwingSet2 application
+FileMenu.open.labelAndMnemonic=&Open
+FileMenu.open_accessible_description=Placeholder menu item for opening a file
+FileMenu.save.labelAndMnemonic=&Save
+FileMenu.save_accessible_description=Placeholder menu item for saving a file
+FileMenu.save_as.labelAndMnemonic=Save &As...
+FileMenu.save_as_accessible_description=Placeholder menu item for saving a file with a new name
+FileMenu.exit.labelAndMnemonic=E&xit
+FileMenu.exit_accessible_description=Exit the SwingSet2 application
+
+### Multi-Screen menu ###
+MultiMenu.multi.labelAndMnemonic=&Multiscreen
+MultiMenu.multi_accessible_description=Multiscreen Menu
+MultiMenu.all.labelAndMnemonic=Cre&ate SwingSet2 on all screens
+MultiMenu.all_accessible_description=Create a SwingSet2 window on every screen
+MultiMenu.single.labelAndMnemonic=Create SwingSet2 on screen
+MultiMenu.single_accessible_description=Create a SwingSet2 window on screen
+
+
+################################
+###          DEMOS           ###
+################################
+
+### Button Demo ###
+
+ButtonDemo.accessible_description=The ButtonDemo shows examples of using JButton, JRadioButton, JToggleButton, and JCheckBox
+ButtonDemo.tooltip=JButton, JRadioButton, JToggleButton, JCheckbox demos
+ButtonDemo.name=Button Demo
+
+ButtonDemo.buttons=Buttons
+ButtonDemo.checkboxes=Check Boxes
+ButtonDemo.radiobuttons=Radio Buttons
+ButtonDemo.togglebuttons=Toggle Buttons
+
+ButtonDemo.textbuttons=Text Buttons
+ButtonDemo.imagebuttons=Image Buttons
+ButtonDemo.textradiobuttons=Text Radio Buttons
+ButtonDemo.imageradiobuttons=Image Radio Buttons
+ButtonDemo.texttogglebuttons=Text Toggle Buttons
+ButtonDemo.imagetogglebuttons=Image Toggle Buttons
+ButtonDemo.textcheckboxes=Text CheckBoxes
+ButtonDemo.imagecheckboxes=Image CheckBoxes
+
+ButtonDemo.button1=One
+ButtonDemo.button2=Two
+ButtonDemo.button3=<html><font size=2 color=red><bold>Three!</font></html>
+
+ButtonDemo.radio1=Radio One
+ButtonDemo.radio2=Radio Two
+ButtonDemo.radio3=Radio Three
+ButtonDemo.radioX=<html><font size=2 color=red>Three<bold>(HTML!)</bold></font></html>
+
+ButtonDemo.check1=One
+ButtonDemo.check2=Two
+ButtonDemo.check3=Three
+ButtonDemo.checkX=<html><font size=2 color=red>Three<bold>(HTML!)</bold></font></html>
+
+ButtonDemo.customradio=A custom "chrome" radio button.
+ButtonDemo.customcheck=A custom lightbulb checkbox.
+
+ButtonDemo.phone=Phone
+ButtonDemo.write=Write
+ButtonDemo.peace=Peace
+
+ButtonDemo.controlpanel.labelAndMnemonic=Display Options:
+ButtonDemo.paintborder.labelAndMnemonic=Paint &Border
+ButtonDemo.paintborder_tooltip=Click here to turn border painting on or off.
+ButtonDemo.paintfocus.labelAndMnemonic=Paint &Focus
+ButtonDemo.paintfocus_tooltip=Click here to turn focus painting on or off.
+ButtonDemo.enabled.labelAndMnemonic=&Enabled
+ButtonDemo.enabled_tooltip=Click here to enable or disable the buttons.
+ButtonDemo.contentfilled.labelAndMnemonic=Content F&illed
+ButtonDemo.contentfilled_tooltip=Click here to control the filling of the content area.
+
+ButtonDemo.padamount.labelAndMnemonic=Pad Amount:
+ButtonDemo.default.labelAndMnemonic=&Default
+ButtonDemo.default_tooltip=Uses the default padding between the border and label.
+ButtonDemo.zero.labelAndMnemonic=&0
+ButtonDemo.zero_tooltip=Uses no padding between the border and label.
+ButtonDemo.ten.labelAndMnemonic=&10
+ButtonDemo.ten_tooltip=Uses a 10 pixel pad between the border and label.
+
+LayoutControlPanel.textposition.labelAndMnemonic=Text Position:
+LayoutControlPanel.contentalignment.labelAndMnemonic=Content Alignment:
+
+### ColorChooser Demo ###
+
+ColorChooserDemo.accessible_description=The ColorChooser allows a user to pick a color either from a pallete or by choosing RGB or HSB values
+ColorChooserDemo.tooltip=JColorChooser demo
+ColorChooserDemo.name=ColorChooser Demo
+ColorChooserDemo.chooser_title=Choose a Color
+ColorChooserDemo.background=Background
+ColorChooserDemo.grad_a=Gradient 1
+ColorChooserDemo.grad_b=Gradient 2
+ColorChooserDemo.outer_line=Perimeter
+ColorChooserDemo.cup=Image of the Java Trademark Coffee Cup
+
+### ComboBox Demo ###
+
+ComboBoxDemo.accessible_description=This demo shows an example of using the JComboBox component.
+ComboBoxDemo.tooltip=JComboBox demo
+ComboBoxDemo.name=ComboBox Demo
+
+ComboBoxDemo.hair=hair
+ComboBoxDemo.eyes=eyes
+ComboBoxDemo.mouth=mouth
+ComboBoxDemo.presets=Presets:
+
+ComboBoxDemo.preset1=Philip, Howard, Jeff
+ComboBoxDemo.preset2=Jeff, Larry, Philip
+ComboBoxDemo.preset3=Howard, Scott, Hans
+ComboBoxDemo.preset4=Philip, Jeff, Hans
+ComboBoxDemo.preset5=Brent, Jon, Scott
+ComboBoxDemo.preset6=Lara, Larry, Lisa
+ComboBoxDemo.preset7=James, Philip, Michael
+ComboBoxDemo.preset8=Philip, Lisa, Brent
+ComboBoxDemo.preset9=James, Philip, Jon
+ComboBoxDemo.preset10=Lara, Jon, Scott
+
+
+ComboBoxDemo.hair_description=Hair:
+ComboBoxDemo.eyes_description=Eyes && Nose:
+ComboBoxDemo.mouth_description=Mouth:
+
+ComboBoxDemo.amy=Amy
+ComboBoxDemo.brent=Brent
+ComboBoxDemo.georges=Georges
+ComboBoxDemo.hans=Hans
+ComboBoxDemo.howard=Howard
+ComboBoxDemo.james=James
+ComboBoxDemo.jeff=Jeff
+ComboBoxDemo.jon=Jon
+ComboBoxDemo.lara=Lara
+ComboBoxDemo.larry=Larry
+ComboBoxDemo.lisa=Lisa
+ComboBoxDemo.michael=Michael
+ComboBoxDemo.philip=Philip
+ComboBoxDemo.scott=Scott
+
+### FileChooser Demo ###
+
+FileChooserDemo.accessible_description=The FileChooser allows a user to select a file, usually for opening or creating/saving.
+FileChooserDemo.tooltip=JFileChooser demo
+FileChooserDemo.name=FileChooser Demo
+
+FileChooserDemo.plainbutton=Show Plain JFileChooser
+FileChooserDemo.previewbutton=Show Preview JFileChooser
+FileChooserDemo.custombutton=Show Custom JFileChooser
+
+FileChooserDemo.description=<html>\
+&&nbsp &&nbsp Note that you can easily create your own custom FileChooser<br> \
+&&nbsp &&nbsp with as many components as you like. \
+</html>
+
+FileChooserDemo.filterdescription=JPEG and GIF Image Files
+
+FileChooserDemo.nofileselected=Please select a file first.
+FileChooserDemo.thefile=the file:
+FileChooserDemo.isprobably=is probably an image.
+
+FileChooserDemo.helptext=<html>\
+Find: Find a file.<br>\
+About: Learn more about the file.<br>\
+OK: Choose that file.<br>\
+Cancel: Exit this dialog without doing anything.\
+</html>
+
+FileChooserDemo.findquestion=Find File:
+FileChooserDemo.findresponse=<html><center>\
+You really want me to find a file?!? <br>\
+I don't know how to do that! I'm just a demo!\
+</center></html>
+
+FileChooserDemo.dialogtitle=Custom Layout FileChooser
+FileChooserDemo.help=Help
+FileChooserDemo.find=Find
+FileChooserDemo.ok=OK
+FileChooserDemo.about=About
+FileChooserDemo.cancel=Cancel
+
+### Html Demo ###
+
+HtmlDemo.accessible_description=This demo shows how to display html text using the JEditorPane component.
+HtmlDemo.tooltip=JEditorPane HTML demo
+HtmlDemo.name=JEditorPane HTML Demo
+HtmlDemo.filename=swing.html
+
+
+### Internal Frame Demo ###
+
+InternalFrameDemo.accessible_description=JInternal Frame Demo
+InternalFrameDemo.create_frames.labelAndMnemonic=Create Customized Internal Frames
+InternalFrameDemo.title_text_field.labelAndMnemonic=Frame title:
+InternalFrameDemo.frame.labelAndMnemonic=Frame
+InternalFrameDemo.palette.labelAndMnemonic=Internal Frame Generator
+InternalFrameDemo.name=Internal Frames Demo
+InternalFrameDemo.tooltip=JInternalFrame demo
+InternalFrameDemo.closable.labelAndMnemonic=Closable
+InternalFrameDemo.resizable.labelAndMnemonic=Resizable
+InternalFrameDemo.iconifiable.labelAndMnemonic=Iconifiable
+InternalFrameDemo.maximizable.labelAndMnemonic=Maximizable
+InternalFrameDemo.toast=Cheers
+InternalFrameDemo.duke=Your Grace!
+InternalFrameDemo.duchess=Duchess
+InternalFrameDemo.cab=Anyone need a Taxi?
+
+
+### List Demo ###
+
+ListDemo.accessible_description=JList Demo
+ListDemo.name=List Demo
+ListDemo.tooltip=JList demo
+ListDemo.prefixes=Prefixes
+ListDemo.suffixes=Suffixes
+ListDemo.count.labelAndMnemonic=Number of generated list entries:
+ListDemo.all=All
+ListDemo.none=None
+ListDemo.red=Red Company Logo Image
+ListDemo.yellow=Red Company Logo Image
+ListDemo.blue=Blue Company Logo Image
+ListDemo.gray=Gray Company Logo Image
+ListDemo.green=Green Company Logo Image
+ListDemo.magenta=Magenta Company Logo Image
+ListDemo.cyan=Cyan Company Logo Image
+ListDemo.description=<html><P STYLE="margin-left: .25in; margin-right: .25in">This demo shows how to present lists of data in two different ways. On the left is a <b>JList</b> component whose list items consist of the permutations of the checked prefixes and suffixes. The prefix and suffix checkbox columns on the right are created by using a <b>JPanel</b> with a Y Axis <b>BoxLayout</b> inside a <b>JScrollPane</b>.</P></html>
+
+
+### OptionPane Demo ###
+
+OptionPaneDemo.accessible_description=The OptionPane Demo shows examples of using JOptionPane to generate different common option dialog boxes
+OptionPaneDemo.tooltip=JOptionPane Demo
+OptionPaneDemo.name=Option Pane Demo
+
+OptionPaneDemo.warningbutton=Show Warning Dialog
+OptionPaneDemo.componentbutton=Show Component Dialog
+OptionPaneDemo.inputbutton=Show Input Dialog
+OptionPaneDemo.confirmbutton=Show Confirmation Dialog
+OptionPaneDemo.messagebutton=Show Message Dialog
+
+OptionPaneDemo.warningtitle=Warning Dialog Example
+OptionPaneDemo.warningtext=<html><P><font color=black>This is a test of the <font color=red><b>Emergency Broadcast System</b></font>. <i><b>This is <br> only a test</b></i>.  The webmaster of your local intranet, in voluntary <br> cooperation with the <font color=blue><b>Federal</b></font> and <font color=blue><b>State</b></font> authorities, have <br> developed this system to keep you informed in the event of an <br> emergency. If this had been an actual emergency, the signal you <br> just heard would have been followed by official information, news <br> or instructions. This concludes this test of the <font color=red><b>Emergency <br> Broadcast System</b></font>.</font></P><P><br>Developer Note: This dialog demo used HTML for text formatting.</P></html>
+
+OptionPaneDemo.messagetext=Message in a Bottle (yeah)
+
+OptionPaneDemo.confirmquestion=Is the sun shining outside today?
+OptionPaneDemo.confirmyes=<html>Well what are you doing playing on the computer?<br> Get outside! Take a trip to the beach! Get a little sun!</html>
+OptionPaneDemo.confirmno=Well good thing you're inside protected from the elements!
+
+OptionPaneDemo.inputquestion=What is your favorite movie?
+OptionPaneDemo.inputresponse=That was a pretty good movie!
+
+OptionPaneDemo.componenttitle=Component Dialog Example
+OptionPaneDemo.componentmessage=<html>JOptionPane can contain as many components <br> as you want, such as a text field:</html>
+OptionPaneDemo.componenttextfield=or a combobox:
+OptionPaneDemo.component_cb1=item 1
+OptionPaneDemo.component_cb2=item 2
+OptionPaneDemo.component_cb3=item 3
+OptionPaneDemo.componentmessage2=<html>JOptionPane can also show as many options <br> as you want:</html>
+OptionPaneDemo.component_op1=Yes
+OptionPaneDemo.component_op2=No
+OptionPaneDemo.component_op3=Maybe
+OptionPaneDemo.component_op4=Probably
+OptionPaneDemo.component_op5=Cancel
+
+OptionPaneDemo.component_r1=Upbeat and positive! I like that! Good choice.
+OptionPaneDemo.component_r2=Definitely not, I wouldn't do it either.
+OptionPaneDemo.component_r3=<html><font color=black> Mmmm.. yes, the situation is unclear at this <br> time. Check back when you know for sure.</font></html>
+OptionPaneDemo.component_r4=<html><font color=black>You know you want to. I think you should <br> have gone for broke and pressed "Yes".</font></html>
+
+### ProgressBar Demo ###
+
+ProgressBarDemo.accessible_description=This demo shows an example of using the JProgressBar component.
+ProgressBarDemo.tooltip=JProgressBar demo
+ProgressBarDemo.name=ProgressBar Demo
+ProgressBarDemo.start_button=Start Loading Text
+ProgressBarDemo.stop_button=Stop Loading Text
+ProgressBarDemo.accessible_text_loading_progress=Text loading progress
+ProgressBarDemo.accessible_text_area_name=Text progressively being loaded in
+
+ProgressBarDemo.accessible_text_area_description=This JTextArea is being filled with text from a buffer progressively a character at a time while the progress bar a the bottom of the window shows the loading progress
+
+ProgressBarDemo.text=\
+The saying goes: if an infinite number of monkeys typed on an infinite number of typewriters, eventually \n\
+all the great works of mankind would emerge. Now, with today's high speed computers, we can finally test \n\
+this theory... \n\n\
+\tLzskd jfy 92y;ho4 th;qlh sd 6yty;q2 hnlj 8sdf. Djfy 92y;ho4, th;qxhz d7yty; \n\
+\tQ0hnlj 23&&^ (# ljask djf y92y; fy92y; Sd6y ty;q2h nl jk la gfa harvin garvel\n\
+\tlasdfsd a83sl la8z ks8l 92y;ho4 th;qlh sd 6yty;q2 hnlj 8sdf. Djfy 92y;ho4,\n\
+\tth;qxhz d7yty; Q0hnlj 23&&^ nknod mrs88 jsd79lfm#%$JLaoz6df  lso7dj f2 jfls\n\
+\t67d9ol1@2fou99s  1lkj2 @l.k1  2; a89o7aljf  1l3i7ou8 d8l3 lqwerty0092 #1!\n\
+\tja9o do8lkjj139rojsd9**!l6*hd # ljasd78 l2awkjad78  3ol7asljf 3 ldif && l.js\n\
+\tLl ls ewan la8uj 23lll7u 8l  3h hhxx8 8d  lsd fixx 891lkjno99sl d8l@@@!!8#8\n\
+\tdfoil jarooda mklaoorj nowai the smisthliylka jkdlfjiw ladajadra lthhheeejfjl\n\
+\tdkddooolda bub mirznod of the koojgaf!! But 2 be or not to be... that is the\n\
+\tquestion. Then when shall we three meet again In thunder, lightning, or in\n\
+\train? When the hurlyburly's done, When the battle's lost and won. That will\n\
+\tbe ere the set of sun. Where the place? Upon the heath. There to meet with\n\
+\tMacbeth. But hath forth not to want.....  a banana, or to be.... a banana.\n\
+\tBanana, I knew him banana. Banana banana. Banana banana banana banana.\n\
+\n\
+\n\
+\n\
+\n\
+Well... hmm.... it seemed like a good idea...
+
+
+### ScrollPane Demo ###
+
+ScrollPaneDemo.accessible_description=JScrollPane Demo
+ScrollPaneDemo.name=Scroll Pane Demo
+ScrollPaneDemo.tooltip=JScrollPane demo
+ScrollPaneDemo.crayons=Lots of Crayons
+ScrollPaneDemo.colheader=Column Header
+ScrollPaneDemo.rowheader=Row Header
+ScrollPaneDemo.upperleft=Upper Left Corner
+ScrollPaneDemo.upperright=Upper Right Column Header Corner
+ScrollPaneDemo.lowerleft=Lower Left Row Header Corner
+
+
+### Slider Demo ###
+
+SliderDemo.accessible_description=This demo shows an example of using the JSlider component.
+SliderDemo.tooltip=JSlider demo
+SliderDemo.name=Slider Demo
+
+SliderDemo.slidervalue=Slider Value:
+SliderDemo.horizontal=Horizontal
+SliderDemo.vertical=Vertical
+SliderDemo.plain=Plain
+SliderDemo.a_plain_slider=A Plain Slider
+SliderDemo.majorticks=Major Ticks
+SliderDemo.majorticksdescription=A slider showing major tick marks
+SliderDemo.ticks=Minor Ticks, Snap-to-ticks and Labels
+SliderDemo.minorticks=Minor Ticks
+SliderDemo.minorticksdescription=A slider showing major and minor tick marks, with slider action snapping to tick marks, with some ticks visibly labeled
+SliderDemo.disabled=Disabled
+SliderDemo.disableddescription=A slider showing major and minor tick marks that is not enabled (cannot be manipulated
+
+### SplitPane Demo ###
+
+SplitPaneDemo.accessible_description=JSplitPane Demo
+SplitPaneDemo.name=Split Pane Demo
+SplitPaneDemo.tooltip=JSplitPane demo
+SplitPaneDemo.earth=Mother Earth
+SplitPaneDemo.moon=An Astranaut on the Moon
+SplitPaneDemo.vert_split.labelAndMnemonic=&Vertically Split
+SplitPaneDemo.horz_split.labelAndMnemonic=Ho&rizontally Split
+SplitPaneDemo.cont_layout.labelAndMnemonic=&Continuous Layout
+SplitPaneDemo.one_touch_expandable.labelAndMnemonic=&One-Touch expandable
+SplitPaneDemo.divider_size.labelAndMnemonic=Divider Si&ze
+SplitPaneDemo.invalid_divider_size=Invalid Divider Size
+SplitPaneDemo.error=Error
+SplitPaneDemo.first_component_min_size.labelAndMnemonic=F&irst Component's Minimum Size
+SplitPaneDemo.second_component_min_size.labelAndMnemonic=Seco&nd Component's Minimum Size
+SplitPaneDemo.invalid_min_size=Invalid Minimum Size
+SplitPaneDemo.must_be_greater_than=must be greater than
+
+
+### TabbedPane Demo ###
+
+TabbedPaneDemo.accessible_description=This demo shows an example of using the JTabbedPane component.
+TabbedPaneDemo.tooltip=JTabbedPane demo
+TabbedPaneDemo.name=TabbedPane Demo
+
+TabbedPaneDemo.bounce=<html><font color=blue><bold><center>Bouncing Babies!</center></bold></font></html>
+TabbedPaneDemo.stephen=Stephen
+TabbedPaneDemo.david=David
+TabbedPaneDemo.matthew=Matthew
+TabbedPaneDemo.ewan=Ewan
+TabbedPaneDemo.blake=Blake
+TabbedPaneDemo.brooke=Brooke
+TabbedPaneDemo.laine=Laine
+TabbedPaneDemo.hania=Hania
+
+TabbedPaneDemo.label=Tab Placement:
+TabbedPaneDemo.top=Top
+TabbedPaneDemo.bottom=Bottom
+TabbedPaneDemo.left=Left
+TabbedPaneDemo.right=Right
+
+
+### Table Demo ###
+
+TableDemo.accessible_description=JTable Demo
+TableDemo.name=Table Demo
+TableDemo.tooltip=JTable demo
+TableDemo.all_columns=All columns
+TableDemo.autoresize_mode=Autoresize mode
+TableDemo.cell_selection=Cell selection
+TableDemo.column_boundaries=Column boundaries
+TableDemo.column_selection=Column selection
+TableDemo.horz_lines=Horiz. Lines
+TableDemo.intercell_spacing=Inter-cell spacing
+TableDemo.intercell_spacing_colon=Inter-cell spacing:
+TableDemo.last_column=Last column
+TableDemo.multiple_ranges=Multiple ranges
+TableDemo.one_range=One range
+TableDemo.reordering_allowed=Reordering allowed
+TableDemo.row_height=Row height
+TableDemo.row_height_colon=Row height:
+TableDemo.row_selection=Row selection
+TableDemo.selection_mode=Selection mode
+TableDemo.subsequent_columns=Subsequent columns
+TableDemo.vert_lines=Vert. Lines
+TableDemo.single=Single
+TableDemo.none=None
+TableDemo.off=Off
+TableDemo.first_name=First Name
+TableDemo.last_name=Last Name
+TableDemo.favorite_color=Favorite Color
+TableDemo.favorite_food=Favorite Food
+TableDemo.favorite_movie=Favorite Movie
+TableDemo.favorite_number=Favorite Number
+TableDemo.aqua=Aqua
+TableDemo.beige=Beige
+TableDemo.black=Black
+TableDemo.blue=Blue
+TableDemo.cybergreen=Cyber Green
+TableDemo.darkgreen=Dark Green
+TableDemo.eblue=Electric Blue
+TableDemo.jfcblue=JFC Primary
+TableDemo.jfcblue2=JFC Secondary
+TableDemo.forestgreen=Forest Green
+TableDemo.gray=Gray
+TableDemo.green=Green
+TableDemo.orange=Orange
+TableDemo.purple=Purple
+TableDemo.red=Red
+TableDemo.rustred=Rust Red
+TableDemo.sunpurple=Sun Purple
+TableDemo.suspectpink=Suspect Pink
+TableDemo.turquoise=Turquoise
+TableDemo.violet=Violet
+TableDemo.yellow=Yellow
+TableDemo.2001=2001: A Space Odyssey
+TableDemo.buckaroo=The Adventures of Buckaroo Banzai Across the 8th Dimension
+TableDemo.firstsight=At First Sight
+TableDemo.airplane=Airplane (the whole series)
+TableDemo.aliens=Aliens
+TableDemo.bicycle=The Bicycle Thief
+TableDemo.bladerunner=Blade Runner (Director's Cut)
+TableDemo.bluesbros=The Blues Brothers
+TableDemo.brazil=Brazil
+TableDemo.bugs=A Bug's Life
+TableDemo.city=City of Lost Children
+TableDemo.chusingura=Chusingura (1962)
+TableDemo.clock=A Clockwork Orange
+TableDemo.curse=Curse of the Demon
+TableDemo.dasboot=Das Boot
+TableDemo.dazed=Dazed and Confused
+TableDemo.defending=Defending Your Life
+TableDemo.eraserhead=Eraserhead
+TableDemo.fifthelement=The Fifth Element
+TableDemo.goodfellas=Goodfellas
+TableDemo.harold=Harold && Maude
+TableDemo.joyluck=The Joy Luck Club
+TableDemo.jules=Jules et Jim
+TableDemo.ladyvanishes=The Lady Vanishes
+TableDemo.mohicans=The Last of the Mohicans
+TableDemo.lonestar=Lone Star
+TableDemo.man=The Man Who Knew Too Much
+TableDemo.musicman=The Music Man
+TableDemo.dog=My Life as a Dog
+TableDemo.oncewest=Once Upon A Time In The West
+TableDemo.pulpfiction=Pulp Fiction
+TableDemo.raiders=Raiders of the Lost Ark
+TableDemo.reservoir=Reservoir Dogs
+TableDemo.repoman=Repo Man
+TableDemo.spinaltap=This is Spinal Tap
+TableDemo.schindlerslist=Schindler's List
+TableDemo.starwars=Star Wars
+TableDemo.stuntman=The Stuntman
+TableDemo.thinman=The Thin Man
+TableDemo.withnail=Withnail && I
+TableDemo.labyrinth=Labyrinth
+TableDemo.shawshank=The Shawshank Redemption
+TableDemo.apple=Apple
+TableDemo.asparagus=Asparagus
+TableDemo.banana=Banana
+TableDemo.broccoli=Broccoli
+TableDemo.carrot=Carrot
+TableDemo.cantaloupe=Cantaloupe
+TableDemo.corn=Corn
+TableDemo.grapes=Grapes
+TableDemo.grapefruit=Grapefruit
+TableDemo.kiwi=Kiwi
+TableDemo.onion=Onion
+TableDemo.pear=Pear
+TableDemo.peach=Peach
+TableDemo.pepper=Red Pepper
+TableDemo.pickle=Pickle
+TableDemo.pineapple=Pineapple
+TableDemo.raspberry=Raspberry
+TableDemo.sparegrass=Spare Grass
+TableDemo.strawberry=Strawberry
+TableDemo.tomato=Tomato
+TableDemo.watermelon=Watermelon
+
+TableDemo.printing=Printing
+TableDemo.fitWidth=Fit Width
+TableDemo.print=Print
+TableDemo.header=Header
+
+# This string will be formatted by a MessageFormat and
+# printed at the top of each page of the printed result.
+# You can use {0} to insert a page number.
+TableDemo.headerText=JTable Printing
+
+TableDemo.footer=Footer
+
+# This string will be formatted by a MessageFormat and
+# printed at the bottom of each page of the printed result.
+# You can use {0} to insert a page number.
+TableDemo.footerText=Page {0}
+
+TableDemo.printingResult=Printing Result
+TableDemo.printingComplete=Printing Complete
+TableDemo.printingCancelled=Printing Cancelled
+
+# This string will be formatted by a MessageFormat and
+# and displayed when an exception occurs.
+# {0} is used to place details of the exception.
+TableDemo.printingFailed=Printing Failed: {0}
+
+
+### ToolTip Demo ###
+
+ToolTipDemo.accessible_description=ToolTips show short help descriptions for a component
+ToolTipDemo.accessible_cow=This is a Cow.
+ToolTipDemo.tooltip=ToolTip demo
+ToolTipDemo.name=ToolTip Demo
+ToolTipDemo.bessie=Bessie The Cow
+ToolTipDemo.cow=Cow.
+ToolTipDemo.got_milk=Got Milk?
+ToolTipDemo.tail=tail.
+ToolTipDemo.moo=Mooooooo
+ToolTipDemo.tooltip_features=<html>In case you thought that tooltips had to be<p>boring, one line descriptions, the <font color=blue size=+2>Swing!</font> team<p> is happy to shatter your illusions.<p>In Swing, they can use HTML to <ul><li>Have Lists<li><b>Bold</b> text<li><em>emphasized</em> text<li>text with <font color=red>Color</font><li>text in different <font size=+3>sizes</font><li>and <font face=AvantGarde>Fonts</font></ul>Oh, and they can be multi-line, too.</html>
+
+
+### Tree Demo ###
+
+TreeDemo.accessible_description=This demo shows shows a sample usage of a JTree component.
+TreeDemo.tooltip=JTree demo
+TreeDemo.name=Tree Demo
+TreeDemo.music=Music
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/demo/share/jfc/SwingSet2/resources/swingset_ja.properties	Fri Apr 06 03:53:28 2018 +0200
@@ -0,0 +1,644 @@
+# This properties file is used to create a PropertyResourceBundle
+# It contains Locale specific strings used in the SwingSet demo.
+#
+# @author Jeff Dinkins
+
+#################################
+###  SwingSet Infrastructure  ###
+#################################
+
+### About Box ###
+
+AboutBox.title=Swing\u306B\u3064\u3044\u3066
+AboutBox.ok_button_text=OK
+AboutBox.accessible_description=Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+
+### Source Code ###
+SourceCode.loading=<html><body bgcolor="#ffffff">\u30BD\u30FC\u30B9\u30FB\u30B3\u30FC\u30C9\u306E\u8AAD\u8FBC\u307F\u304A\u3088\u3073\u30D5\u30A9\u30FC\u30DE\u30C3\u30C8\u4E2D\u3067\u3059\u3002\u5C11\u3005\u304A\u5F85\u3061\u304F\u3060\u3055\u3044...</body></html>
+
+### Status ###
+
+Status.loading=\u8AAD\u8FBC\u307F\u4E2D: 
+Status.popupMenuAccessible=Shift+F10: \u30DD\u30C3\u30D7\u30A2\u30C3\u30D7\u30FB\u30E1\u30CB\u30E5\u30FC\u306E\u6709\u52B9\u5316
+
+### Menu Bar ###
+
+MenuBar.accessible_description=Swing\u30C7\u30E2\u30FB\u30E1\u30CB\u30E5\u30FC\u30FB\u30D0\u30FC
+
+
+### Frame ###
+
+Frame.title=SwingSet2
+
+
+### Tabbed Pane ###
+
+TabbedPane.src.labelAndMnemonic=\u30BD\u30FC\u30B9\u30FB\u30B3\u30FC\u30C9
+TabbedPane.src_tooltip=\u30BD\u30FC\u30B9\u30FB\u30B3\u30FC\u30C9\u306E\u53C2\u7167
+
+
+### Look & Feel Menu ###
+
+LafMenu.laf.labelAndMnemonic=\u30EB\u30C3\u30AF&&\u30D5\u30A3\u30FC\u30EB(&L)
+LafMenu.laf_accessible_description=\u30EB\u30C3\u30AF&&\u30D5\u30A3\u30FC\u30EB\u3092\u5207\u308A\u66FF\u3048\u3089\u308C\u308B\u30E1\u30CB\u30E5\u30FC
+
+LafMenu.java.labelAndMnemonic=Java\u30EB\u30C3\u30AF&&\u30D5\u30A3\u30FC\u30EB(&J)
+LafMenu.java_accessible_description=Java\u30EB\u30C3\u30AF&&\u30D5\u30A3\u30FC\u30EB
+
+LafMenu.nimbus.labelAndMnemonic=Nimbus\u30EB\u30C3\u30AF&&\u30D5\u30A3\u30FC\u30EB(&N)
+LafMenu.nimbus_accessible_description=Nimbus\u30EB\u30C3\u30AF&&\u30D5\u30A3\u30FC\u30EB
+
+LafMenu.mac.labelAndMnemonic=Mac OS X\u30EB\u30C3\u30AF&&\u30D5\u30A3\u30FC\u30EB(&M)
+LafMenu.mac_accessible_description=Mac OS X\u30EB\u30C3\u30AF&&\u30D5\u30A3\u30FC\u30EB
+
+LafMenu.motif.labelAndMnemonic=Motif\u30EB\u30C3\u30AF&&\u30D5\u30A3\u30FC\u30EB(&O)
+LafMenu.motif_accessible_description=Motif\u30EB\u30C3\u30AF&&\u30D5\u30A3\u30FC\u30EB
+
+LafMenu.windows.labelAndMnemonic=Windows\u30B9\u30BF\u30A4\u30EB\u30FB\u30EB\u30C3\u30AF&&\u30D5\u30A3\u30FC\u30EB(&W)
+LafMenu.windows_accessible_description=Windows\u30B9\u30BF\u30A4\u30EB\u30FB\u30EB\u30C3\u30AF&&\u30D5\u30A3\u30FC\u30EB
+
+LafMenu.gtk.labelAndMnemonic=GTK\u30B9\u30BF\u30A4\u30EB\u30FB\u30EB\u30C3\u30AF&&\u30D5\u30A3\u30FC\u30EB(&G)
+LafMenu.gtk_accessible_description=GTK\u30B9\u30BF\u30A4\u30EB\u30FB\u30EB\u30C3\u30AF&&\u30D5\u30A3\u30FC\u30EB
+
+
+### Themes Menu ###
+
+ThemesMenu.themes.labelAndMnemonic=\u30C6\u30FC\u30DE(&T)
+ThemesMenu.themes_accessible_description=Metal\u30C6\u30FC\u30DE\u306E\u30AB\u30E9\u30FC\u5207\u66FF\u3048\u30E1\u30CB\u30E5\u30FC
+
+ThemesMenu.aqua.labelAndMnemonic=\u30A2\u30AF\u30A2(&Q)
+ThemesMenu.aqua_accessible_description=\u9752\u7DD1\u3092\u57FA\u8ABF\u3068\u3057\u305FMetal\u30C6\u30FC\u30DE
+
+ThemesMenu.charcoal.labelAndMnemonic=\u30C1\u30E3\u30B3\u30FC\u30EB(&C)
+ThemesMenu.charcoal_accessible_description=\u30C0\u30FC\u30AF\u30FB\u30B0\u30EC\u30FC\u3092\u57FA\u8ABF\u3068\u3057\u305FMetal\u30C6\u30FC\u30DE
+
+ThemesMenu.contrast.labelAndMnemonic=\u30CF\u30A4\u30FB\u30B3\u30F3\u30C8\u30E9\u30B9\u30C8(&H)
+ThemesMenu.contrast_accessible_description=\u30CF\u30A4\u30FB\u30B3\u30F3\u30C8\u30E9\u30B9\u30C8\u306E\u30C6\u30FC\u30DE
+
+ThemesMenu.ocean.labelAndMnemonic=\u30AA\u30FC\u30B7\u30E3\u30F3(&O)
+ThemesMenu.ocean_accessible_description=\u30AA\u30FC\u30B7\u30E3\u30F3\u306EMetal\u30C6\u30FC\u30DE
+
+ThemesMenu.steel.labelAndMnemonic=\u30B9\u30C1\u30FC\u30EB(&S)
+ThemesMenu.steel_accessible_description=\u9752\u7D2B\u306EMetal\u30C6\u30FC\u30DE
+
+ThemesMenu.emerald.labelAndMnemonic=\u30A8\u30E1\u30E9\u30EB\u30C9(&E)
+ThemesMenu.emerald_accessible_description=\u7DD1\u3092\u57FA\u8ABF\u3068\u3057\u305FMetal\u30C6\u30FC\u30DE
+
+ThemesMenu.ruby.labelAndMnemonic=\u30EB\u30D3\u30FC(&R)
+ThemesMenu.ruby_accessible_description=\u8D64\u3092\u57FA\u8ABF\u3068\u3057\u305FMetal\u30C6\u30FC\u30DE
+
+
+### Font SubMenu (under Themes) 
+FontMenu.fonts.labelAndMnemonic=\u30D5\u30A9\u30F3\u30C8(&F)
+FontMenu.fonts_accessible_description=Java\u30EB\u30C3\u30AF&\u30D5\u30A3\u30FC\u30EB\u7528\u306E\u30D5\u30A9\u30F3\u30C8\u9078\u629E\u30E1\u30CB\u30E5\u30FC
+
+FontMenu.bold.labelAndMnemonic=\u592A\u5B57(&B)
+FontMenu.bold_accessible_description=Java\u30EB\u30C3\u30AF&\u30D5\u30A3\u30FC\u30EB\u306B\u592A\u5B57\u30D5\u30A9\u30F3\u30C8\u3092\u4F7F\u7528\u3057\u307E\u3059
+
+FontMenu.plain.labelAndMnemonic=\u30D7\u30EC\u30FC\u30F3(&P)
+FontMenu.plain_accessible_description=Java\u30EB\u30C3\u30AF&\u30D5\u30A3\u30FC\u30EB\u306B\u30D7\u30EC\u30FC\u30F3\u30FB\u30D5\u30A9\u30F3\u30C8\u3092\u4F7F\u7528\u3057\u307E\u3059
+
+
+### Audio SubMenu (under Themes) ###
+
+AudioMenu.audio.labelAndMnemonic=\u30AA\u30FC\u30C7\u30A3\u30AA(&A)
+AudioMenu.audio_accessible_description=Java\u30EB\u30C3\u30AF&\u30D5\u30A3\u30FC\u30EB\u5185\u3067\u306E\u52B9\u679C\u97F3\u306E\u5207\u66FF\u3048\u30E1\u30CB\u30E5\u30FC
+
+AudioMenu.on.labelAndMnemonic=\u6642\u9593(&O)
+AudioMenu.on_accessible_description=Java\u30EB\u30C3\u30AF&\u30D5\u30A3\u30FC\u30EB\u306E\u3059\u3079\u3066\u306E\u52B9\u679C\u97F3\u3092\u30AA\u30F3\u306B\u3057\u307E\u3059
+
+AudioMenu.default.labelAndMnemonic=\u30C7\u30D5\u30A9\u30EB\u30C8(&D)
+AudioMenu.default_accessible_description=Java\u30EB\u30C3\u30AF&\u30D5\u30A3\u30FC\u30EB\u306E\u30C7\u30D5\u30A9\u30EB\u30C8\u306E\u52B9\u679C\u97F3\u306E\u8A2D\u5B9A\u306B\u623B\u3057\u307E\u3059
+
+AudioMenu.off.labelAndMnemonic=\u30AA\u30D5(&F)
+AudioMenu.off_accessible_description=Java\u30EB\u30C3\u30AF&\u30D5\u30A3\u30FC\u30EB\u306E\u3059\u3079\u3066\u306E\u52B9\u679C\u97F3\u3092\u30AA\u30D5\u306B\u3057\u307E\u3059
+
+### Options Menu ###
+
+OptionsMenu.options.labelAndMnemonic=\u30AA\u30D7\u30B7\u30E7\u30F3(&P)
+OptionsMenu.options_accessible_description=\u30AA\u30D7\u30B7\u30E7\u30F3\u306E\u9078\u629E\u30E1\u30CB\u30E5\u30FC
+
+OptionsMenu.tooltip.labelAndMnemonic=\u30C4\u30FC\u30EB\u30FB\u30C1\u30C3\u30D7\u306E\u6709\u52B9\u5316(&T)
+OptionsMenu.tooltip_accessible_description=\u30C4\u30FC\u30EB\u30FB\u30C1\u30C3\u30D7\u3092\u6709\u52B9\u307E\u305F\u306F\u7121\u52B9\u306B\u3057\u307E\u3059
+
+OptionsMenu.dragEnabled.labelAndMnemonic=\u30C9\u30E9\u30C3\u30B0\u306E\u6709\u52B9\u5316(&D)
+OptionsMenu.dragEnabled_accessible_description=\u30C9\u30E9\u30C3\u30B0\u3092\u6709\u52B9\u307E\u305F\u306F\u7121\u52B9\u306B\u3057\u307E\u3059
+
+### File Menu ###
+
+FileMenu.file.labelAndMnemonic=\u30D5\u30A1\u30A4\u30EB(&F)
+FileMenu.accessible_description=\u30D5\u30A1\u30A4\u30EB\u30FB\u30E1\u30CB\u30E5\u30FC
+FileMenu.about.labelAndMnemonic=\u60C5\u5831(&B)
+FileMenu.about_accessible_description=SwingSet2\u30A2\u30D7\u30EA\u30B1\u30FC\u30B7\u30E7\u30F3\u306E\u8A73\u7D30\u3092\u78BA\u8A8D\u3057\u307E\u3059
+FileMenu.open.labelAndMnemonic=\u958B\u304F(&O)
+FileMenu.open_accessible_description=\u30D5\u30A1\u30A4\u30EB\u3092\u958B\u304F\u305F\u3081\u306E\u30D7\u30EC\u30FC\u30B9\u30DB\u30EB\u30C0\u30FB\u30E1\u30CB\u30E5\u30FC\u9805\u76EE
+FileMenu.save.labelAndMnemonic=\u4FDD\u5B58(&S)
+FileMenu.save_accessible_description=\u30D5\u30A1\u30A4\u30EB\u3092\u4FDD\u5B58\u3059\u308B\u305F\u3081\u306E\u30D7\u30EC\u30FC\u30B9\u30DB\u30EB\u30C0\u30FB\u30E1\u30CB\u30E5\u30FC\u9805\u76EE
+FileMenu.save_as.labelAndMnemonic=\u5225\u540D\u4FDD\u5B58(&A)...
+FileMenu.save_as_accessible_description=\u30D5\u30A1\u30A4\u30EB\u3092\u5225\u540D\u4FDD\u5B58\u3059\u308B\u305F\u3081\u306E\u30D7\u30EC\u30FC\u30B9\u30DB\u30EB\u30C0\u30FB\u30E1\u30CB\u30E5\u30FC\u9805\u76EE
+FileMenu.exit.labelAndMnemonic=\u7D42\u4E86(&X)
+FileMenu.exit_accessible_description=SwingSet2\u30A2\u30D7\u30EA\u30B1\u30FC\u30B7\u30E7\u30F3\u3092\u7D42\u4E86\u3057\u307E\u3059
+
+### Multi-Screen menu ###
+MultiMenu.multi.labelAndMnemonic=\u30DE\u30EB\u30C1\u30B9\u30AF\u30EA\u30FC\u30F3(&M)
+MultiMenu.multi_accessible_description=\u30DE\u30EB\u30C1\u30B9\u30AF\u30EA\u30FC\u30F3\u30FB\u30E1\u30CB\u30E5\u30FC
+MultiMenu.all.labelAndMnemonic=SwingSet2\u3092\u3059\u3079\u3066\u306E\u30B9\u30AF\u30EA\u30FC\u30F3\u306B\u4F5C\u6210\u3057\u307E\u3059(&A)
+MultiMenu.all_accessible_description=SwingSet2\u306E\u30A6\u30A3\u30F3\u30C9\u30A6\u3092\u30B9\u30AF\u30EA\u30FC\u30F3\u3054\u3068\u306B\u4F5C\u6210\u3057\u307E\u3059
+MultiMenu.single.labelAndMnemonic=SwingSet2\u3092\u30B9\u30AF\u30EA\u30FC\u30F3\u306B\u4F5C\u6210\u3057\u307E\u3059
+MultiMenu.single_accessible_description=SwingSet2\u306E\u30A6\u30A3\u30F3\u30C9\u30A6\u3092\u30B9\u30AF\u30EA\u30FC\u30F3\u306B\u4F5C\u6210\u3057\u307E\u3059
+
+
+################################
+###          DEMOS           ###
+################################
+
+### Button Demo ###
+
+ButtonDemo.accessible_description=ButtonDemo\u3067\u306F\u3001JButton\u3001JRadioButton\u3001JToggleButton\u304A\u3088\u3073JCheckBox\u306E\u4F7F\u7528\u4F8B\u3092\u7D39\u4ECB\u3057\u307E\u3059 
+ButtonDemo.tooltip=JButton\u3001JRadioButton\u3001JToggleButton\u3001JCheckbox\u30C7\u30E2
+ButtonDemo.name=Button\u30C7\u30E2
+
+ButtonDemo.buttons=\u30DC\u30BF\u30F3
+ButtonDemo.checkboxes=\u30C1\u30A7\u30C3\u30AF\u30FB\u30DC\u30C3\u30AF\u30B9
+ButtonDemo.radiobuttons=\u30E9\u30B8\u30AA\u30FB\u30DC\u30BF\u30F3
+ButtonDemo.togglebuttons=\u30C8\u30B0\u30EB\u30FB\u30DC\u30BF\u30F3
+
+ButtonDemo.textbuttons=\u30C6\u30AD\u30B9\u30C8\u30FB\u30DC\u30BF\u30F3
+ButtonDemo.imagebuttons=\u30A4\u30E1\u30FC\u30B8\u30FB\u30DC\u30BF\u30F3
+ButtonDemo.textradiobuttons=\u30C6\u30AD\u30B9\u30C8\u30FB\u30E9\u30B8\u30AA\u30FB\u30DC\u30BF\u30F3
+ButtonDemo.imageradiobuttons=\u30A4\u30E1\u30FC\u30B8\u30FB\u30E9\u30B8\u30AA\u30FB\u30DC\u30BF\u30F3
+ButtonDemo.texttogglebuttons=\u30C6\u30AD\u30B9\u30C8\u30FB\u30C8\u30B0\u30EB\u30FB\u30DC\u30BF\u30F3
+ButtonDemo.imagetogglebuttons=\u30A4\u30E1\u30FC\u30B8\u30FB\u30C8\u30B0\u30EB\u30FB\u30DC\u30BF\u30F3
+ButtonDemo.textcheckboxes=\u30C6\u30AD\u30B9\u30C8\u30FB\u30C1\u30A7\u30C3\u30AF\u30FB\u30DC\u30C3\u30AF\u30B9
+ButtonDemo.imagecheckboxes=\u30A4\u30E1\u30FC\u30B8\u30FB\u30C1\u30A7\u30C3\u30AF\u30FB\u30DC\u30C3\u30AF\u30B9
+
+ButtonDemo.button1=1 
+ButtonDemo.button2=2
+ButtonDemo.button3=<html><font size=2 color=red><bold>3</font></html>
+
+ButtonDemo.radio1=\u30DC\u30BF\u30F31 
+ButtonDemo.radio2=\u30DC\u30BF\u30F32
+ButtonDemo.radio3=\u30DC\u30BF\u30F33
+ButtonDemo.radioX=<html><font size=2 color=red>3<bold>(HTML)</bold></font></html>
+
+ButtonDemo.check1=1 
+ButtonDemo.check2=2
+ButtonDemo.check3=3
+ButtonDemo.checkX=<html><font size=2 color=red>3<bold>(HTML)</bold></font></html>
+
+ButtonDemo.customradio=\u30AB\u30B9\u30BF\u30E0\u306E"\u30E1\u30BF\u30EA\u30C3\u30AF\u8ABF"\u30E9\u30B8\u30AA\u30FB\u30DC\u30BF\u30F3
+ButtonDemo.customcheck=\u30AB\u30B9\u30BF\u30E0\u306E\u96FB\u7403\u30C1\u30A7\u30C3\u30AF\u30FB\u30DC\u30C3\u30AF\u30B9
+
+ButtonDemo.phone=\u96FB\u8A71 
+ButtonDemo.write=\u66F8\u8FBC\u307F
+ButtonDemo.peace=\u30D4\u30FC\u30B9
+
+ButtonDemo.controlpanel.labelAndMnemonic=\u8868\u793A\u30AA\u30D7\u30B7\u30E7\u30F3:
+ButtonDemo.paintborder.labelAndMnemonic=\u30DC\u30FC\u30C0\u30FC\u8868\u793A(&B)
+ButtonDemo.paintborder_tooltip=\u3053\u3053\u3092\u30AF\u30EA\u30C3\u30AF\u3057\u3066\u3001\u30DC\u30FC\u30C0\u30FC\u306E\u8868\u793A\u306E\u30AA\u30F3\u3068\u30AA\u30D5\u3092\u5207\u308A\u66FF\u3048\u307E\u3059\u3002
+ButtonDemo.paintfocus.labelAndMnemonic=\u30D5\u30A9\u30FC\u30AB\u30B9\u8868\u793A(&F)
+ButtonDemo.paintfocus_tooltip=\u3053\u3053\u3092\u30AF\u30EA\u30C3\u30AF\u3057\u3066\u3001\u30D5\u30A9\u30FC\u30AB\u30B9\u306E\u8868\u793A\u306E\u30AA\u30F3\u3068\u30AA\u30D5\u3092\u5207\u308A\u66FF\u3048\u307E\u3059\u3002
+ButtonDemo.enabled.labelAndMnemonic=\u6709\u52B9(&E)
+ButtonDemo.enabled_tooltip=\u3053\u3053\u3092\u30AF\u30EA\u30C3\u30AF\u3057\u3066\u3001\u30DC\u30BF\u30F3\u3092\u6709\u52B9\u307E\u305F\u306F\u7121\u52B9\u306B\u3057\u307E\u3059\u3002
+ButtonDemo.contentfilled.labelAndMnemonic=\u30DA\u30A4\u30F3\u30C8(&I)
+ButtonDemo.contentfilled_tooltip=\u3053\u3053\u3092\u30AF\u30EA\u30C3\u30AF\u3057\u3066\u3001\u30B3\u30F3\u30C6\u30F3\u30C4\u30FB\u30A8\u30EA\u30A2\u3092\u30DA\u30A4\u30F3\u30C8\u3059\u308B\u304B\u3069\u3046\u304B\u3092\u9078\u629E\u3057\u307E\u3059\u3002
+
+ButtonDemo.padamount.labelAndMnemonic=\u4F59\u767D:
+ButtonDemo.default.labelAndMnemonic=\u30C7\u30D5\u30A9\u30EB\u30C8(&D)
+ButtonDemo.default_tooltip=\u30DC\u30FC\u30C0\u30FC\u304A\u3088\u3073\u30E9\u30D9\u30EB\u306E\u9593\u306B\u30C7\u30D5\u30A9\u30EB\u30C8\u306E\u30D4\u30AF\u30BB\u30EB\u6570\u306E\u4F59\u767D\u3092\u5165\u308C\u307E\u3059\u3002
+ButtonDemo.zero.labelAndMnemonic=&0
+ButtonDemo.zero_tooltip=\u30DC\u30FC\u30C0\u30FC\u304A\u3088\u3073\u30E9\u30D9\u30EB\u306E\u9593\u306B\u4F59\u767D\u3092\u5165\u308C\u307E\u305B\u3093\u3002
+ButtonDemo.ten.labelAndMnemonic=&10
+ButtonDemo.ten_tooltip=\u30DC\u30FC\u30C0\u30FC\u304A\u3088\u3073\u30E9\u30D9\u30EB\u306E\u9593\u306B10\u30D4\u30AF\u30BB\u30EB\u306E\u4F59\u767D\u3092\u5165\u308C\u307E\u3059\u3002
+
+LayoutControlPanel.textposition.labelAndMnemonic=\u30C6\u30AD\u30B9\u30C8\u4F4D\u7F6E:
+LayoutControlPanel.contentalignment.labelAndMnemonic=\u30B3\u30F3\u30C6\u30F3\u30C4\u4F4D\u7F6E\u5408\u305B:
+
+### ColorChooser Demo ###
+
+ColorChooserDemo.accessible_description=ColorChooser\u3092\u4F7F\u7528\u3059\u308B\u3068\u3001\u30D1\u30EC\u30C3\u30C8\u304B\u3089\u8272\u3092\u9078\u629E\u3057\u305F\u308A\u3001RGB\u5024\u307E\u305F\u306FHSB\u5024\u3092\u76F4\u63A5\u6307\u5B9A\u3067\u304D\u307E\u3059
+ColorChooserDemo.tooltip=JColorChooser\u30C7\u30E2
+ColorChooserDemo.name=ColorChooser\u30C7\u30E2
+ColorChooserDemo.chooser_title=\u8272\u306E\u9078\u629E
+ColorChooserDemo.background=\u80CC\u666F
+ColorChooserDemo.grad_a=\u30B0\u30E9\u30C7\u30FC\u30B7\u30E7\u30F3\u57FA\u672C\u82721
+ColorChooserDemo.grad_b=\u30B0\u30E9\u30C7\u30FC\u30B7\u30E7\u30F3\u57FA\u672C\u82722
+ColorChooserDemo.outer_line=\u5883\u754C\u7DDA
+ColorChooserDemo.cup=Java\u306E\u30C8\u30EC\u30FC\u30C9\u30DE\u30FC\u30AF\u3067\u3042\u308B\u30B3\u30FC\u30D2\u30FC\u30FB\u30AB\u30C3\u30D7\u306E\u30A4\u30E1\u30FC\u30B8
+
+### ComboBox Demo ###
+
+ComboBoxDemo.accessible_description=\u3053\u306E\u30C7\u30E2\u3067\u306F\u3001JComboBox\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u306E\u4F7F\u7528\u4F8B\u3092\u7D39\u4ECB\u3057\u307E\u3059\u3002
+ComboBoxDemo.tooltip=JComboBox\u30C7\u30E2
+ComboBoxDemo.name=ComboBox\u30C7\u30E2
+
+ComboBoxDemo.hair=\u9AEA
+ComboBoxDemo.eyes=\u76EE
+ComboBoxDemo.mouth=\u53E3
+ComboBoxDemo.presets=\u30D7\u30EA\u30BB\u30C3\u30C8:
+
+ComboBoxDemo.preset1=\u30D5\u30A3\u30EA\u30C3\u30D7, \u30CF\u30EF\u30FC\u30C9, \u30B8\u30A7\u30D5
+ComboBoxDemo.preset2=\u30B8\u30A7\u30D5, \u30E9\u30EA\u30FC, \u30D5\u30A3\u30EA\u30C3\u30D7
+ComboBoxDemo.preset3=\u30CF\u30EF\u30FC\u30C9, \u30B9\u30B3\u30C3\u30C8, \u30CF\u30F3\u30B9
+ComboBoxDemo.preset4=\u30D5\u30A3\u30EA\u30C3\u30D7, \u30B8\u30A7\u30D5, \u30CF\u30F3\u30B9
+ComboBoxDemo.preset5=\u30D6\u30EC\u30F3\u30C8, \u30B8\u30E7\u30F3, \u30B9\u30B3\u30C3\u30C8
+ComboBoxDemo.preset6=\u30E9\u30E9, \u30E9\u30EA\u30FC, \u30EA\u30B5
+ComboBoxDemo.preset7=\u30B8\u30A7\u30FC\u30E0\u30B9 ,\u30D5\u30A3\u30EA\u30C3\u30D7, \u30DE\u30A4\u30B1\u30EB
+ComboBoxDemo.preset8=\u30D5\u30A3\u30EA\u30C3\u30D7, \u30EA\u30B5, \u30D6\u30EC\u30F3\u30C8
+ComboBoxDemo.preset9=\u30B8\u30A7\u30FC\u30E0\u30B9, \u30D5\u30A3\u30EA\u30C3\u30D7, \u30B8\u30E7\u30F3
+ComboBoxDemo.preset10=\u30E9\u30E9, \u30B8\u30E7\u30F3, \u30B9\u30B3\u30C3\u30C8
+
+
+ComboBoxDemo.hair_description=\u9AEA:
+ComboBoxDemo.eyes_description=\u76EE\u3068\u9F3B:
+ComboBoxDemo.mouth_description=\u53E3:
+
+ComboBoxDemo.amy=\u30A8\u30A4\u30DF\u30FC
+ComboBoxDemo.brent=\u30D6\u30EC\u30F3\u30C8
+ComboBoxDemo.georges=\u30B8\u30E7\u30EB\u30B8\u30E5
+ComboBoxDemo.hans=\u30CF\u30F3\u30B9
+ComboBoxDemo.howard=\u30CF\u30EF\u30FC\u30C9
+ComboBoxDemo.james=\u30B8\u30A7\u30FC\u30E0\u30B9
+ComboBoxDemo.jeff=\u30B8\u30A7\u30D5
+ComboBoxDemo.jon=\u30B8\u30E7\u30F3
+ComboBoxDemo.lara=\u30E9\u30E9
+ComboBoxDemo.larry=\u30E9\u30EA\u30FC
+ComboBoxDemo.lisa=\u30EA\u30B5
+ComboBoxDemo.michael=\u30DE\u30A4\u30B1\u30EB
+ComboBoxDemo.philip=\u30D5\u30A3\u30EA\u30C3\u30D7
+ComboBoxDemo.scott=\u30B9\u30B3\u30C3\u30C8
+
+### FileChooser Demo ###
+
+FileChooserDemo.accessible_description=FileChooser\u3092\u4F7F\u7528\u3059\u308B\u3068\u3001\u958B\u304F\u30D5\u30A1\u30A4\u30EB\u307E\u305F\u306F\u4F5C\u6210\u304A\u3088\u3073\u4FDD\u5B58\u3059\u308B\u30D5\u30A1\u30A4\u30EB\u3092\u9078\u629E\u3067\u304D\u307E\u3059\u3002
+FileChooserDemo.tooltip=JFileChooser\u30C7\u30E2
+FileChooserDemo.name=FileChooser\u30C7\u30E2
+
+FileChooserDemo.plainbutton=\u6A19\u6E96\u306EJFileChooser\u306E\u8868\u793A
+FileChooserDemo.previewbutton=\u30D7\u30EC\u30D3\u30E5\u30FC\u4ED8\u304DJFileChooser\u306E\u8868\u793A
+FileChooserDemo.custombutton=\u30AB\u30B9\u30BF\u30DE\u30A4\u30BA\u3057\u305FJFileChooser\u306E\u8868\u793A
+
+FileChooserDemo.description=<html>&&nbsp &&nbsp\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u3092\u597D\u304D\u306A\u3060\u3051\u4F7F\u7528\u3057\u3066\u3001\u72EC\u81EA\u306EFileChooser\u3092\u7C21\u5358\u306B<br>&&nbsp &&nbsp\u4F5C\u6210\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002</html>
+
+FileChooserDemo.filterdescription=JPEG\u304A\u3088\u3073GIF\u753B\u50CF\u30D5\u30A1\u30A4\u30EB
+
+FileChooserDemo.nofileselected=\u6700\u521D\u306B\u30D5\u30A1\u30A4\u30EB\u3092\u9078\u629E\u3057\u3066\u304F\u3060\u3055\u3044\u3002
+FileChooserDemo.thefile=\u30D5\u30A1\u30A4\u30EB\u540D:
+FileChooserDemo.isprobably=\u306F\u304A\u305D\u3089\u304F\u753B\u50CF\u30C7\u30FC\u30BF\u3067\u3059\u3002
+
+FileChooserDemo.helptext=<html>\u691C\u7D22: \u30D5\u30A1\u30A4\u30EB\u3092\u691C\u7D22\u3057\u307E\u3059\u3002<br>\u8A73\u7D30: \u30D5\u30A1\u30A4\u30EB\u306B\u3064\u3044\u3066\u306E\u60C5\u5831\u3092\u8868\u793A\u3057\u307E\u3059\u3002<br>OK: \u30D5\u30A1\u30A4\u30EB\u3092\u9078\u629E\u3057\u307E\u3059\u3002<br>\u53D6\u6D88: \u4F55\u3082\u305B\u305A\u306B\u3053\u306E\u30C0\u30A4\u30A2\u30ED\u30B0\u3092\u9589\u3058\u307E\u3059\u3002</html>
+
+FileChooserDemo.findquestion=\u30D5\u30A1\u30A4\u30EB\u306E\u691C\u7D22:
+FileChooserDemo.findresponse=<html><center>\u3042\u306A\u305F\u3001\u672C\u5F53\u306B\u79C1\u306B\u30D5\u30A1\u30A4\u30EB\u3092\u691C\u7D22\u3057\u3066\u307B\u3057\u3044\u3068\u601D\u3063\u3066\u308B\u3093\u3067\u3059\u304B\u3002<br>\u305D\u3093\u306A\u3053\u3068\u3067\u304D\u306A\u3044\u3067\u3059\u3088\u3001\u3084\u308A\u65B9\u77E5\u3089\u306A\u3044\u3093\u3067\u3059\u304B\u3089\u3002\u79C1\u306F\u305F\u3060\u306E\u30C7\u30E2\u30FB\u30D7\u30ED\u30B0\u30E9\u30E0\u3067\u3059\u3088\u3002</center></html>
+
+FileChooserDemo.dialogtitle=\u30AB\u30B9\u30BF\u30DE\u30A4\u30BA\u3057\u305FFileChooser
+FileChooserDemo.help=\u30D8\u30EB\u30D7
+FileChooserDemo.find=\u691C\u7D22
+FileChooserDemo.ok=OK
+FileChooserDemo.about=\u30D0\u30FC\u30B8\u30E7\u30F3\u60C5\u5831
+FileChooserDemo.cancel=\u53D6\u6D88
+
+### Html Demo ###
+
+HtmlDemo.accessible_description=\u3053\u306E\u30C7\u30E2\u3067\u306F\u3001JEditorPane\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u3067HTML\u30C6\u30AD\u30B9\u30C8\u304C\u3069\u306E\u3088\u3046\u306B\u8868\u793A\u3055\u308C\u308B\u304B\u3092\u7D39\u4ECB\u3057\u307E\u3059\u3002
+HtmlDemo.tooltip=JEditorPane HTML\u30C7\u30E2
+HtmlDemo.name=JEditorPane HTML\u30C7\u30E2
+HtmlDemo.filename=swing.html
+
+
+### Internal Frame Demo ###
+
+InternalFrameDemo.accessible_description=JInternal Frame\u30C7\u30E2
+InternalFrameDemo.create_frames.labelAndMnemonic=\u30AB\u30B9\u30BF\u30DE\u30A4\u30BA\u3055\u308C\u305F\u5185\u90E8\u30D5\u30EC\u30FC\u30E0\u306E\u4F5C\u6210
+InternalFrameDemo.title_text_field.labelAndMnemonic=\u30D5\u30EC\u30FC\u30E0\u306E\u30BF\u30A4\u30C8\u30EB:
+InternalFrameDemo.frame.labelAndMnemonic=\u30D5\u30EC\u30FC\u30E0
+InternalFrameDemo.palette.labelAndMnemonic=\u5185\u90E8\u30D5\u30EC\u30FC\u30E0\u306E\u4F5C\u6210
+InternalFrameDemo.name=Internal Frame\u30C7\u30E2
+InternalFrameDemo.tooltip=JInternal Frame\u30C7\u30E2
+InternalFrameDemo.closable.labelAndMnemonic=\u30AF\u30ED\u30FC\u30BA\u53EF
+InternalFrameDemo.resizable.labelAndMnemonic=\u30B5\u30A4\u30BA\u5909\u66F4\u53EF
+InternalFrameDemo.iconifiable.labelAndMnemonic=\u6700\u5C0F\u5316\u53EF
+InternalFrameDemo.maximizable.labelAndMnemonic=\u6700\u5927\u5316\u53EF
+InternalFrameDemo.toast=Cheers
+InternalFrameDemo.duke=Your Grace
+InternalFrameDemo.duchess=Duchess
+InternalFrameDemo.cab=Anyone need a Taxi?
+
+
+### List Demo ###
+
+ListDemo.accessible_description=JList\u30C7\u30E2
+ListDemo.name=List\u30C7\u30E2
+ListDemo.tooltip=JList\u30C7\u30E2
+ListDemo.prefixes=\u63A5\u982D\u8F9E
+ListDemo.suffixes=\u63A5\u5C3E\u8F9E
+ListDemo.count.labelAndMnemonic=\u751F\u6210\u3055\u308C\u305F\u30EA\u30B9\u30C8\u30FB\u30A8\u30F3\u30C8\u30EA\u306E\u6570:
+ListDemo.all=\u3059\u3079\u3066
+ListDemo.none=\u306A\u3057
+ListDemo.red=\u8D64\u8272\u306E\u4F1A\u793E\u30ED\u30B4\u30FB\u30A4\u30E1\u30FC\u30B8
+ListDemo.yellow=\u8D64\u8272\u306E\u4F1A\u793E\u30ED\u30B4\u30FB\u30A4\u30E1\u30FC\u30B8
+ListDemo.blue=\u9752\u8272\u306E\u4F1A\u793E\u30ED\u30B4\u30FB\u30A4\u30E1\u30FC\u30B8
+ListDemo.gray=\u30B0\u30EC\u30FC\u306E\u4F1A\u793E\u30ED\u30B4\u30FB\u30A4\u30E1\u30FC\u30B8
+ListDemo.green=\u7DD1\u8272\u306E\u4F1A\u793E\u30ED\u30B4\u30FB\u30A4\u30E1\u30FC\u30B8
+ListDemo.magenta=\u30DE\u30BC\u30F3\u30BF\u306E\u4F1A\u793E\u30ED\u30B4\u30FB\u30A4\u30E1\u30FC\u30B8
+ListDemo.cyan=\u30B7\u30A2\u30F3\u306E\u4F1A\u793E\u30ED\u30B4\u30FB\u30A4\u30E1\u30FC\u30B8
+ListDemo.description=<html><P STYLE="margin-left: .25in; margin-right: .25in">\u3053\u306E\u30C7\u30E2\u3067\u306F\u30012\u3064\u306E\u7570\u306A\u308B\u65B9\u6CD5\u3067\u4F5C\u6210\u3057\u305F\u30EA\u30B9\u30C8\u3092\u7D39\u4ECB\u3057\u307E\u3059\u3002\u5DE6\u5074\u306B\u3042\u308B<b>JList</b>\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u306E\u30EA\u30B9\u30C8\u9805\u76EE\u306F\u3001\u30C1\u30A7\u30C3\u30AF\u30FB\u30DE\u30FC\u30AF\u306E\u4ED8\u3051\u3089\u308C\u305F\u63A5\u982D\u8F9E\u304A\u3088\u3073\u63A5\u5C3E\u8F9E\u306E\u9806\u5217\u3067\u69CB\u6210\u3055\u308C\u3066\u3044\u307E\u3059\u3002\u53F3\u5074\u306E\u63A5\u982D\u8F9E\u304A\u3088\u3073\u63A5\u5C3E\u8F9E\u306E\u30C1\u30A7\u30C3\u30AF\u30FB\u30DC\u30C3\u30AF\u30B9\u306E\u5217\u306F\u3001\u5782\u76F4\u914D\u7F6E\u306E<b>BoxLayout</b>\u3092\u6301\u3064<b>JPanel</b>\u3092\u4F7F\u7528\u3057\u3066<b>JScrollPane</b>\u5185\u306B\u4F5C\u6210\u3055\u308C\u307E\u3059\u3002</P></html>
+
+
+### OptionPane Demo ###
+
+OptionPaneDemo.accessible_description=OptionPane\u30C7\u30E2\u3067\u306F\u3001\u69D8\u3005\u306A\u5171\u901A\u306E\u30AA\u30D7\u30B7\u30E7\u30F3\u30FB\u30C0\u30A4\u30A2\u30ED\u30B0\u30FB\u30DC\u30C3\u30AF\u30B9\u3092\u751F\u6210\u3059\u308B\u305F\u3081\u306EJOptionPane\u306E\u4F7F\u7528\u4F8B\u3092\u7D39\u4ECB\u3057\u307E\u3059
+OptionPaneDemo.tooltip=JOptionPane\u30C7\u30E2
+OptionPaneDemo.name=Option Pane\u30C7\u30E2
+
+OptionPaneDemo.warningbutton=\u8B66\u544A\u30C0\u30A4\u30A2\u30ED\u30B0\u306E\u8868\u793A
+OptionPaneDemo.componentbutton=\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u30FB\u30C0\u30A4\u30A2\u30ED\u30B0\u306E\u8868\u793A
+OptionPaneDemo.inputbutton=\u5165\u529B\u30C0\u30A4\u30A2\u30ED\u30B0\u306E\u8868\u793A
+OptionPaneDemo.confirmbutton=\u78BA\u8A8D\u30C0\u30A4\u30A2\u30ED\u30B0\u306E\u8868\u793A
+OptionPaneDemo.messagebutton=\u30E1\u30C3\u30BB\u30FC\u30B8\u30FB\u30C0\u30A4\u30A2\u30ED\u30B0\u306E\u8868\u793A
+
+OptionPaneDemo.warningtitle=\u8B66\u544A\u30C0\u30A4\u30A2\u30ED\u30B0\u306E\u4F8B
+OptionPaneDemo.warningtext=<html><P><font color=black>\u3053\u308C\u306F<font color=red><b>\u7DCA\u6025\u653E\u9001\u30B7\u30B9\u30C6\u30E0</b></font>\u306E\u30C6\u30B9\u30C8\u3067\u3059\u3002<i><b>\u3053\u308C\u306F\u5358\u306A\u308B<br>\u30C6\u30B9\u30C8\u3067\u3059</b></i>\u3002\u30ED\u30FC\u30AB\u30EB\u30FB\u30A4\u30F3\u30C8\u30E9\u30CD\u30C3\u30C8\u306EWeb\u30DE\u30B9\u30BF\u30FC\u304C<br><font color=blue><b>\u9023\u90A6\u653F\u5E9C</b></font>\u304A\u3088\u3073<font color=blue><b>\u5DDE</b></font>\u5F53\u5C40\u3068\u81EA\u4E3B\u7684\u306B\u5354\u529B\u3057\u3001\u7DCA\u6025\u4E8B\u614B\u306E<br>\u767A\u751F\u6642\u306B\u901A\u5831\u3092\u884C\u3046\u305F\u3081\u306B\u3053\u306E\u30B7\u30B9\u30C6\u30E0\u3092\u958B\u767A\u3057\u307E\u3057\u305F\u3002<br>\u5B9F\u969B\u306E\u7DCA\u6025\u6642\u306B\u306F\u3001\u304A\u805E\u304D\u306B\u306A\u3063\u305F\u4FE1\u53F7\u306B\u7D9A\u3044\u3066\u5F53\u5C40\u304B\u3089\u306E<br>\u60C5\u5831\u3001\u30CB\u30E5\u30FC\u30B9\u307E\u305F\u306F\u6307\u793A\u304C\u901A\u77E5\u3055\u308C\u307E\u3059\u3002\u3053\u308C\u3067\u3001<br><font color=red><b>\u7DCA\u6025\u653E\u9001\u30B7\u30B9\u30C6\u30E0</b></font></font>\u306E\u30C6\u30B9\u30C8\u3092<br>\u7D42\u4E86\u3057\u307E\u3059\u3002</P><P><br>\u958B\u767A\u8005\u5411\u3051\u306E\u6CE8\u610F: \u3053\u306E\u30C0\u30A4\u30A2\u30ED\u30B0\u306E\u30C7\u30E2\u3067\u306F\u3001\u30C6\u30AD\u30B9\u30C8\u306E\u30D5\u30A9\u30FC\u30DE\u30C3\u30C8\u306BHTML\u304C\u4F7F\u7528\u3055\u308C\u3066\u3044\u307E\u3059\u3002</P></html>
+
+OptionPaneDemo.messagetext=\u74F6\u306B\u5165\u308C\u305F\u30E1\u30C3\u30BB\u30FC\u30B8
+
+OptionPaneDemo.confirmquestion=\u4ECA\u65E5\u306E\u5916\u306E\u5929\u6C17\u306F\u6674\u308C\u3067\u3059\u304B\u3002
+OptionPaneDemo.confirmyes=<html>\u30B3\u30F3\u30D4\u30E5\u30FC\u30BF\u3067\u904A\u3093\u3067\u306A\u3044\u3067\u5916\u306B\u51FA\u3088\u3046\u3002<br>\u30D3\u30FC\u30C1\u306B\u884C\u3063\u3066\u592A\u967D\u306E\u65E5\u3092\u6D74\u3073\u305F\u3089\u3069\u3046\u3067\u3057\u3087\u3046\u3002</html>
+OptionPaneDemo.confirmno=\u5C4B\u5185\u306B\u3044\u3066\u69D8\u3005\u306A\u3082\u306E\u304B\u3089\u4FDD\u8B77\u3055\u308C\u3066\u3044\u308B\u306E\u306F\u3044\u3044\u3053\u3068\u3067\u3059\u3002
+
+OptionPaneDemo.inputquestion=\u597D\u304D\u306A\u6620\u753B\u306F\u4F55\u3067\u3059\u304B\u3002
+OptionPaneDemo.inputresponse=\u3042\u308C\u306F\u3068\u3066\u3082\u3044\u3044\u6620\u753B\u3067\u3057\u305F\u306D\u3002
+
+OptionPaneDemo.componenttitle=\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u30FB\u30C0\u30A4\u30A2\u30ED\u30B0\u306E\u4F8B
+OptionPaneDemo.componentmessage=<html>JOptionPane\u306B\u306F\u3001\u30C6\u30AD\u30B9\u30C8\u30FB\u30D5\u30A3\u30FC\u30EB\u30C9\u306A\u3069\u306E\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u3092<br>\u5FC5\u8981\u306A\u3060\u3051\u542B\u3081\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002</html>
+OptionPaneDemo.componenttextfield=\u30B3\u30F3\u30DC\u30DC\u30C3\u30AF\u30B9:
+OptionPaneDemo.component_cb1=\u9805\u76EE1
+OptionPaneDemo.component_cb2=\u9805\u76EE2
+OptionPaneDemo.component_cb3=\u9805\u76EE3
+OptionPaneDemo.componentmessage2=<html>\u307E\u305F\u3001JOptionPane\u306B\u306F\u5FC5\u8981\u306A\u6570\u3060\u3051\u30AA\u30D7\u30B7\u30E7\u30F3\u3092<br>\u542B\u3081\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002</html>
+OptionPaneDemo.component_op1=\u306F\u3044
+OptionPaneDemo.component_op2=\u3044\u3044\u3048
+OptionPaneDemo.component_op3=\u305D\u3046\u304B\u3082\u3057\u308C\u306A\u3044
+OptionPaneDemo.component_op4=\u305F\u3076\u3093
+OptionPaneDemo.component_op5=\u53D6\u6D88
+
+OptionPaneDemo.component_r1=\u660E\u308B\u304F\u3066\u697D\u89B3\u7684\u3002\u3044\u3044\u9078\u629E\u3067\u3059\u306D\u3002
+OptionPaneDemo.component_r2=\u307E\u3063\u305F\u304F\u9055\u3044\u307E\u3059\u3002\u79C1\u306A\u3089\u305D\u3093\u306A\u3053\u3068\u306F\u3057\u307E\u305B\u3093\u3002
+OptionPaneDemo.component_r3=<html><font color=black>\u3048\u3048\u3068\u3001\u306F\u3044\u3002\u73FE\u6642\u70B9\u3067\u306F\u72B6\u6CC1\u304C\u306F\u3063\u304D\u308A\u3057\u307E\u305B\u3093\u3002<br>\u306F\u3063\u304D\u308A\u3068\u6C7A\u307E\u3063\u305F\u3089\u6559\u3048\u3066\u304F\u3060\u3055\u3044\u3002</font></html>
+OptionPaneDemo.component_r4=<html><font color=black>\u305D\u3046\u3057\u305F\u3044\u306E\u306F\u308F\u304B\u3063\u3066\u3044\u308B\u306F\u305A\u3067\u3059\u3002\u4E00\u767A\u52DD\u8CA0\u3092<br>\u304B\u3051\u3066\u300C\u306F\u3044\u300D\u3092\u62BC\u3059\u3079\u304D\u3067\u3057\u305F\u3002</font></html>
+
+### ProgressBar Demo ###
+
+ProgressBarDemo.accessible_description=\u3053\u306E\u30C7\u30E2\u3067\u306F\u3001JprogressBar\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u306E\u4F7F\u7528\u4F8B\u3092\u7D39\u4ECB\u3057\u307E\u3059\u3002
+ProgressBarDemo.tooltip=JProgressBar\u30C7\u30E2
+ProgressBarDemo.name=ProgressBar\u30C7\u30E2
+ProgressBarDemo.start_button=\u30C6\u30AD\u30B9\u30C8\u306E\u30ED\u30FC\u30C9\u958B\u59CB
+ProgressBarDemo.stop_button=\u30C6\u30AD\u30B9\u30C8\u306E\u30ED\u30FC\u30C9\u505C\u6B62
+ProgressBarDemo.accessible_text_loading_progress=\u30C6\u30AD\u30B9\u30C8\u306E\u30ED\u30FC\u30C9\u4E2D
+ProgressBarDemo.accessible_text_area_name=\u30ED\u30FC\u30C9\u4E2D\u306E\u30C6\u30AD\u30B9\u30C8
+
+ProgressBarDemo.accessible_text_area_description=\u3053\u306EJTextArea\u306B\u306F\u3001\u30C6\u30AD\u30B9\u30C8\u304C\u4E00\u5EA6\u306B1\u6587\u5B57\u305A\u3064\u30D0\u30C3\u30D5\u30A1\u304B\u3089\u57CB\u3081\u8FBC\u307E\u308C\u3066\u3044\u307E\u3059\u3002\u30A6\u30A3\u30F3\u30C9\u30A6\u306E\u4E0B\u90E8\u306B\u3042\u308B\u30D7\u30ED\u30B0\u30EC\u30B9\u30FB\u30D0\u30FC\u306B\u3001\u30ED\u30FC\u30C9\u51E6\u7406\u306E\u9032\u6357\u304C\u8868\u793A\u3055\u308C\u307E\u3059\u3002
+
+ProgressBarDemo.text=\u7121\u9650\u306E\u733F\u304C\u7121\u9650\u6570\u306E\u30BF\u30A4\u30D7\u30E9\u30A4\u30BF\u3067\u5165\u529B\u3057\u7D9A\u3051\u308C\u3070\u3001\u3044\u3064\u304B\u306F\u4EBA\u985E\u306E\u5049\u5927\u306A\u4F5C\u54C1\u304C\u3067\u304D\u3042\u304C\u308B\u3068\u4FD7\u306B\u3044\u308F\u308C\u3066\u3044\u307E\u3059\u3002\n\u73FE\u5728\u306E\u9AD8\u901F\u51E6\u7406\u30B3\u30F3\u30D4\u30E5\u30FC\u30BF\u3092\u4F7F\u7528\u3059\u308C\u3070\u3001\u3053\u306E\u7406\u8AD6\u3092\u30C6\u30B9\u30C8\n\u3067\u304D\u307E\u3059... \n\n\tLzskd jfy 92y;ho4 th;qlh sd 6yty;q2 hnlj 8sdf. Djfy 92y;ho4, th;qxhz d7yty; \n\tQ0hnlj 23&&^ (# ljask djf y92y; fy92y; Sd6y ty;q2h nl jk la gfa harvin garvel\n\tlasdfsd a83sl la8z ks8l 92y;ho4 th;qlh sd 6yty;q2 hnlj 8sdf. Djfy 92y;ho4,\n\tth;qxhz d7yty; Q0hnlj 23&&^ nknod mrs88 jsd79lfm#%$JLaoz6df  lso7dj f2 jfls\n\t67d9ol1@2fou99s  1lkj2 @l.k1  2; a89o7aljf  1l3i7ou8 d8l3 lqwerty0092 #1!\n\tja9o do8lkjj139rojsd9**!l6*hd # ljasd78 l2awkjad78  3ol7asljf 3 ldif && l.js\n\tLl ls ewan la8uj 23lll7u 8l  3h hhxx8 8d  lsd fixx 891lkjno99sl d8l@@@!!8#8\n\tdfoil jarooda mklaoorj nowai the smisthliylka jkdlfjiw ladajadra lthhheeejfjl\n\tdkddooolda bub mirznod of the koojgaf!! But 2 be or not to be... that is the\n\tquestion. Then when shall we three meet again In thunder, lightning, or in\n\train? When the hurlyburly's done, When the battle's lost and won. That will\n\tbe ere the set of sun. Where the place? Upon the heath. There to meet with\n\tMacbeth. But hath forth not to want.....  a banana, or to be.... a banana.\n\tBanana, I knew him banana. Banana banana. Banana banana banana banana.\n\n\n\n\nWell... hmm.... it seemed like a good idea...
+
+
+### ScrollPane Demo ###
+
+ScrollPaneDemo.accessible_description=JScrollPane\u30C7\u30E2
+ScrollPaneDemo.name=Scroll Pane\u30C7\u30E2
+ScrollPaneDemo.tooltip=JScrollPane\u30C7\u30E2
+ScrollPaneDemo.crayons=\u305F\u304F\u3055\u3093\u306E\u30AF\u30EC\u30E8\u30F3
+ScrollPaneDemo.colheader=\u5217\u30D8\u30C3\u30C0\u30FC
+ScrollPaneDemo.rowheader=\u884C\u30D8\u30C3\u30C0\u30FC
+ScrollPaneDemo.upperleft=\u5DE6\u4E0A\u30B3\u30FC\u30CA\u30FC
+ScrollPaneDemo.upperright=\u53F3\u4E0A\u306E\u5217\u30D8\u30C3\u30C0\u30FC\u30FB\u30B3\u30FC\u30CA\u30FC
+ScrollPaneDemo.lowerleft=\u5DE6\u4E0B\u306E\u884C\u30D8\u30C3\u30C0\u30FC\u30FB\u30B3\u30FC\u30CA\u30FC
+
+
+### Slider Demo ###
+
+SliderDemo.accessible_description=\u3053\u306E\u30C7\u30E2\u3067\u306F\u3001JSlider\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u306E\u4F7F\u7528\u4F8B\u3092\u7D39\u4ECB\u3057\u307E\u3059\u3002
+SliderDemo.tooltip=JSlider\u30C7\u30E2
+SliderDemo.name=Slider\u30C7\u30E2
+
+SliderDemo.slidervalue=Slider\u306E\u5024: 
+SliderDemo.horizontal=\u6C34\u5E73
+SliderDemo.vertical=\u5782\u76F4
+SliderDemo.plain=\u30D7\u30EC\u30FC\u30F3
+SliderDemo.a_plain_slider=\u30D7\u30EC\u30FC\u30F3\u306E\u30B9\u30E9\u30A4\u30C0
+SliderDemo.majorticks=\u5927\u76EE\u76DB
+SliderDemo.majorticksdescription=\u5927\u76EE\u76DB\u3092\u8868\u793A\u3059\u308B\u30B9\u30E9\u30A4\u30C0
+SliderDemo.ticks=\u5C0F\u76EE\u76DB\u3001Snap-to-ticks\u304A\u3088\u3073\u30E9\u30D9\u30EB
+SliderDemo.minorticks=\u5C0F\u76EE\u76DB
+SliderDemo.minorticksdescription=\u5927\u76EE\u76DB\u3068\u5C0F\u76EE\u76DB\u3092\u8868\u793A\u3059\u308B\u30B9\u30E9\u30A4\u30C0(\u76EE\u76DB\u30DE\u30FC\u30AF\u306B\u30B9\u30CA\u30C3\u30D7\u3059\u308B\u30B9\u30E9\u30A4\u30C0\u30FB\u30A2\u30AF\u30B7\u30E7\u30F3\u3042\u308A\u3001\u4E00\u90E8\u306E\u76EE\u76DB\u306F\u76EE\u7ACB\u3064\u30E9\u30D9\u30EB\u4ED8\u304D)
+SliderDemo.disabled=\u7121\u52B9
+SliderDemo.disableddescription=\u7121\u52B9\u5316\u3055\u308C\u305F\u3001\u5927\u76EE\u76DB\u3068\u5C0F\u76EE\u76DB\u3092\u8868\u793A\u3059\u308B\u30B9\u30E9\u30A4\u30C0(\u64CD\u4F5C\u4E0D\u53EF)
+
+### SplitPane Demo ###
+
+SplitPaneDemo.accessible_description=JSplitPane\u30C7\u30E2
+SplitPaneDemo.name=Split Pane\u30C7\u30E2
+SplitPaneDemo.tooltip=JSplitPane\u30C7\u30E2
+SplitPaneDemo.earth=\u6BCD\u306A\u308B\u5730\u7403
+SplitPaneDemo.moon=\u6708\u9762\u306E\u5B87\u5B99\u98DB\u884C\u58EB
+SplitPaneDemo.vert_split.labelAndMnemonic=\u5782\u76F4\u5206\u5272(&V)
+SplitPaneDemo.horz_split.labelAndMnemonic=\u6C34\u5E73\u5206\u5272(&R)
+SplitPaneDemo.cont_layout.labelAndMnemonic=\u9023\u7D9A\u3057\u305F\u30EC\u30A4\u30A2\u30A6\u30C8(&C)
+SplitPaneDemo.one_touch_expandable.labelAndMnemonic=\u30EF\u30F3\u30BF\u30C3\u30C1\u62E1\u5F35\u6A5F\u80FD(&O)
+SplitPaneDemo.divider_size.labelAndMnemonic=\u30C7\u30A3\u30D0\u30A4\u30C0\u306E\u30B5\u30A4\u30BA(&Z)
+SplitPaneDemo.invalid_divider_size=\u7121\u52B9\u306A\u30C7\u30A3\u30D0\u30A4\u30C0\u306E\u30B5\u30A4\u30BA
+SplitPaneDemo.error=\u30A8\u30E9\u30FC
+SplitPaneDemo.first_component_min_size.labelAndMnemonic=\u6700\u521D\u306E\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u306E\u6700\u5C0F\u30B5\u30A4\u30BA(&I)
+SplitPaneDemo.second_component_min_size.labelAndMnemonic=2\u3064\u76EE\u306E\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u306E\u6700\u5C0F\u30B5\u30A4\u30BA(&N)
+SplitPaneDemo.invalid_min_size=\u7121\u52B9\u306A\u6700\u5C0F\u30B5\u30A4\u30BA
+SplitPaneDemo.must_be_greater_than=\u6B21\u306E\u6570\u3088\u308A\u5927\u304D\u306A\u5024\u3092\u6307\u5B9A\u3057\u3066\u304F\u3060\u3055\u3044
+
+
+### TabbedPane Demo ###
+
+TabbedPaneDemo.accessible_description=\u3053\u306E\u30C7\u30E2\u3067\u306F\u3001JTabbedPane\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u306E\u4F7F\u7528\u4F8B\u3092\u7D39\u4ECB\u3057\u307E\u3059\u3002
+TabbedPaneDemo.tooltip=JTabbedPane\u30C7\u30E2
+TabbedPaneDemo.name=TabbedPane\u30C7\u30E2
+
+TabbedPaneDemo.bounce=<html><font color=blue><bold><center>Bouncing Babies!</center></bold></font></html>
+TabbedPaneDemo.stephen=\u30B9\u30C6\u30A3\u30FC\u30F4\u30F3
+TabbedPaneDemo.david=\u30C7\u30A4\u30F4\u30A3\u30C3\u30C9
+TabbedPaneDemo.matthew=\u30DE\u30B7\u30E5\u30FC
+TabbedPaneDemo.ewan=\u30E6\u30A2\u30F3
+TabbedPaneDemo.blake=\u30D6\u30EC\u30A4\u30AF
+TabbedPaneDemo.brooke=\u30D6\u30EB\u30C3\u30AF
+TabbedPaneDemo.laine=\u30EC\u30A4\u30F3
+TabbedPaneDemo.hania=\u30CF\u30CB\u30A2
+
+TabbedPaneDemo.label=\u30BF\u30D6\u914D\u7F6E:
+TabbedPaneDemo.top=\u4E0A
+TabbedPaneDemo.bottom=\u4E0B
+TabbedPaneDemo.left=\u5DE6
+TabbedPaneDemo.right=\u53F3
+
+
+### Table Demo ###
+
+TableDemo.accessible_description=JTable\u30C7\u30E2
+TableDemo.name=Table\u30C7\u30E2
+TableDemo.tooltip=JTable\u30C7\u30E2
+TableDemo.all_columns=\u3059\u3079\u3066\u306E\u5217
+TableDemo.autoresize_mode=\u30B5\u30A4\u30BA\u81EA\u52D5\u5909\u66F4\u30E2\u30FC\u30C9
+TableDemo.cell_selection=\u30BB\u30EB\u306E\u9078\u629E
+TableDemo.column_boundaries=\u5217\u306E\u5883\u754C
+TableDemo.column_selection=\u5217\u306E\u9078\u629E
+TableDemo.horz_lines=\u6C34\u5E73\u7DDA
+TableDemo.intercell_spacing=\u30BB\u30EB\u9593\u306E\u30B9\u30DA\u30FC\u30B9
+TableDemo.intercell_spacing_colon=\u30BB\u30EB\u9593\u306E\u30B9\u30DA\u30FC\u30B9:
+TableDemo.last_column=\u6700\u5F8C\u306E\u5217
+TableDemo.multiple_ranges=\u8907\u6570\u306E\u7BC4\u56F2
+TableDemo.one_range=1\u3064\u306E\u7BC4\u56F2
+TableDemo.reordering_allowed=\u4E26\u66FF\u3048\u3092\u8A31\u53EF
+TableDemo.row_height=\u884C\u306E\u9AD8\u3055
+TableDemo.row_height_colon=\u884C\u306E\u9AD8\u3055:
+TableDemo.row_selection=\u884C\u306E\u9078\u629E
+TableDemo.selection_mode=\u9078\u629E\u30E2\u30FC\u30C9
+TableDemo.subsequent_columns=\u5F8C\u7D9A\u306E\u5217
+TableDemo.vert_lines=\u5782\u76F4\u7DDA
+TableDemo.single=\u30B7\u30F3\u30B0\u30EB
+TableDemo.none=\u306A\u3057
+TableDemo.off=\u30AA\u30D5
+TableDemo.first_name=\u540D
+TableDemo.last_name=\u59D3
+TableDemo.favorite_color=\u597D\u304D\u306A\u8272
+TableDemo.favorite_food=\u597D\u304D\u306A\u98DF\u3079\u7269
+TableDemo.favorite_movie=\u597D\u304D\u306A\u6620\u753B
+TableDemo.favorite_number=\u597D\u304D\u306A\u6570
+TableDemo.aqua=\u30A2\u30AF\u30A2
+TableDemo.beige=\u30D9\u30FC\u30B8\u30E5
+TableDemo.black=\u9ED2
+TableDemo.blue=\u9752
+TableDemo.cybergreen=\u30B5\u30A4\u30D0\u30FC\u30FB\u30B0\u30EA\u30FC\u30F3
+TableDemo.darkgreen=\u30C0\u30FC\u30AF\u30FB\u30B0\u30EA\u30FC\u30F3
+TableDemo.eblue=\u30E1\u30BF\u30EA\u30C3\u30AF\u30FB\u30D6\u30EB\u30FC
+TableDemo.jfcblue=JFC\u30D7\u30E9\u30A4\u30DE\u30EA
+TableDemo.jfcblue2=JFC\u30BB\u30AB\u30F3\u30C0\u30EA
+TableDemo.forestgreen=\u30D5\u30A9\u30EC\u30B9\u30C8\u30FB\u30B0\u30EA\u30FC\u30F3
+TableDemo.gray=\u7070\u8272
+TableDemo.green=\u7DD1
+TableDemo.orange=\u30AA\u30EC\u30F3\u30B8
+TableDemo.purple=\u7D2B
+TableDemo.red=\u8D64
+TableDemo.rustred=\u8D64\u7149\u74E6\u8272
+TableDemo.sunpurple=Sun\u30D1\u30FC\u30D7\u30EB
+TableDemo.suspectpink=\u30D4\u30F3\u30AF
+TableDemo.turquoise=\u30BF\u30FC\u30B3\u30A4\u30BA
+TableDemo.violet=\u3059\u307F\u308C\u8272
+TableDemo.yellow=\u9EC4\u8272
+TableDemo.2001=2001\u5E74\u5B87\u5B99\u306E\u65C5
+TableDemo.buckaroo=\u30D0\u30AB\u30EB\u30FC\u30FB\u30D0\u30F3\u30B6\u30A4\u306E8\u6B21\u5143\u30AE\u30E3\u30E9\u30AF\u30B7\u30FC
+TableDemo.firstsight=\u3042\u306A\u305F\u304C\u898B\u3048\u306A\u304F\u3066\u3082
+TableDemo.airplane=\u30D5\u30E9\u30A4\u30F3\u30B0\u30FB\u30CF\u30A4(\u5168\u30B7\u30EA\u30FC\u30BA)
+TableDemo.aliens=\u30A8\u30A4\u30EA\u30A2\u30F3
+TableDemo.bicycle=\u81EA\u8EE2\u8ECA\u6CE5\u68D2
+TableDemo.bladerunner=\u30D6\u30EC\u30FC\u30C9\u30FB\u30E9\u30F3\u30CA\u30FC(\u30C7\u30A3\u30EC\u30AF\u30BF\u30FC\u30BA\u30FB\u30AB\u30C3\u30C8)
+TableDemo.bluesbros=\u30D6\u30EB\u30FC\u30B9\u30FB\u30D6\u30E9\u30B6\u30FC\u30B9
+TableDemo.brazil=\u672A\u6765\u4E16\u7D00\u30D6\u30E9\u30B8\u30EB
+TableDemo.bugs=\u30D0\u30B0\u30BA\u30FB\u30E9\u30A4\u30D5
+TableDemo.city=\u30ED\u30B9\u30C8\u30FB\u30C1\u30EB\u30C9\u30EC\u30F3
+TableDemo.chusingura=\u5FE0\u81E3\u8535(1962)
+TableDemo.clock=\u6642\u8A08\u4ED5\u639B\u3051\u306E\u30AA\u30EC\u30F3\u30B8
+TableDemo.curse=\u602A\u5947\u30DF\u30A4\u30E9\u7537
+TableDemo.dasboot=U\u30DC\u30FC\u30C8
+TableDemo.dazed=\u30D0\u30C3\u30C9\u30FB\u30C1\u30E5\u30FC\u30CB\u30F3\u30B0
+TableDemo.defending=\u3042\u306A\u305F\u306E\u6B7B\u5F8C\u306B\u3054\u7528\u5FC3
+TableDemo.eraserhead=\u30A4\u30EC\u30A4\u30B6\u30FC\u30D8\u30C3\u30C9
+TableDemo.fifthelement=\u30D5\u30A3\u30D5\u30B9\u30FB\u30A8\u30EC\u30E1\u30F3\u30C8
+TableDemo.goodfellas=\u30B0\u30C3\u30C9\u30FB\u30D5\u30A7\u30ED\u30FC\u30BA
+TableDemo.harold=\u30CF\u30ED\u30EB\u30C9\u3068\u30E2\u30FC\u30C9
+TableDemo.joyluck=\u30B8\u30E7\u30A4\u30FB\u30E9\u30C3\u30AF\u30FB\u30AF\u30E9\u30D6
+TableDemo.jules=\u7A81\u7136\u708E\u306E\u3054\u3068\u304F
+TableDemo.ladyvanishes=\u30EC\u30C7\u30A3\u30FB\u30D0\u30CB\u30C3\u30B7\u30E5/\u6697\u53F7\u3092\u6B4C\u3046\u5973
+TableDemo.mohicans=\u30E9\u30B9\u30C8\u30FB\u30AA\u30D6\u30FB\u30E2\u30D2\u30AB\u30F3
+TableDemo.lonestar=\u771F\u5B9F\u306E\u56C1\u304D
+TableDemo.man=\u77E5\u308A\u3059\u304E\u3066\u3044\u305F\u7537
+TableDemo.musicman=\u30B6\u30FB\u30DF\u30E5\u30FC\u30B8\u30C3\u30AF\u30FB\u30DE\u30F3
+TableDemo.dog=\u30DE\u30A4\u30FB\u30E9\u30A4\u30D5\u30FB\u30A2\u30BA\u30FB\u30A2\u30FB\u30C9\u30C3\u30B0
+TableDemo.oncewest=\u30A6\u30A8\u30B9\u30BF\u30F3
+TableDemo.pulpfiction=\u30D1\u30EB\u30D7\u30FB\u30D5\u30A3\u30AF\u30B7\u30E7\u30F3
+TableDemo.raiders=\u30EC\u30A4\u30C0\u30FC\u30B9/\u5931\u308F\u308C\u305F\u30A2\u30FC\u30AF(\u8056\u6AC3)
+TableDemo.reservoir=\u30EC\u30B6\u30DC\u30A2\u30FB\u30C9\u30C3\u30B0\u30B9
+TableDemo.repoman=\u30EC\u30DD\u30FB\u30DE\u30F3
+TableDemo.spinaltap=\u30B9\u30D1\u30A4\u30CA\u30EB\u30FB\u30BF\u30C3\u30D7
+TableDemo.schindlerslist=\u30B7\u30F3\u30C9\u30E9\u30FC\u306E\u30EA\u30B9\u30C8
+TableDemo.starwars=\u30B9\u30BF\u30FC\u30FB\u30A6\u30A9\u30FC\u30BA
+TableDemo.stuntman=\u30B9\u30BF\u30F3\u30C8\u30DE\u30F3
+TableDemo.thinman=\u5F71\u306A\u304D\u7537
+TableDemo.withnail=\u30A6\u30A3\u30BA\u30FB\u30CD\u30A4\u30EB\u3068\u50D5
+TableDemo.labyrinth=\u30E9\u30D3\u30EA\u30F3\u30B9/\u9B54\u738B\u306E\u8FF7\u5BAE
+TableDemo.shawshank=\u30B7\u30E7\u30FC\u30B7\u30E3\u30F3\u30AF\u306E\u7A7A\u306B
+TableDemo.apple=\u308A\u3093\u3054
+TableDemo.asparagus=\u30A2\u30B9\u30D1\u30E9\u30AC\u30B9
+TableDemo.banana=\u30D0\u30CA\u30CA
+TableDemo.broccoli=\u30D6\u30ED\u30C3\u30B3\u30EA
+TableDemo.carrot=\u30CB\u30F3\u30B8\u30F3
+TableDemo.cantaloupe=\u30E1\u30ED\u30F3
+TableDemo.corn=\u3068\u3046\u3082\u308D\u3053\u3057
+TableDemo.grapes=\u3076\u3069\u3046
+TableDemo.grapefruit=\u30B0\u30EC\u30FC\u30D7\u30D5\u30EB\u30FC\u30C4
+TableDemo.kiwi=\u30AD\u30A6\u30A3\u30FB\u30D5\u30EB\u30FC\u30C4
+TableDemo.onion=\u7389\u306D\u304E
+TableDemo.pear=\u6D0B\u306A\u3057
+TableDemo.peach=\u6843
+TableDemo.pepper=\u3068\u3046\u304C\u3089\u3057
+TableDemo.pickle=\u30D4\u30AF\u30EB\u30B9
+TableDemo.pineapple=\u30D1\u30A4\u30CA\u30C3\u30D7\u30EB
+TableDemo.raspberry=\u30E9\u30B9\u30D9\u30EA
+TableDemo.sparegrass=\u30A2\u30B9\u30D1\u30E9\u30AC\u30B9
+TableDemo.strawberry=\u3044\u3061\u3054
+TableDemo.tomato=\u30C8\u30DE\u30C8
+TableDemo.watermelon=\u3059\u3044\u304B
+
+TableDemo.printing=\u5370\u5237\u30E1\u30CB\u30E5\u30FC
+TableDemo.fitWidth=\u6A2A\u5E45\u306B\u5408\u308F\u305B\u308B
+TableDemo.print=\u5370\u5237
+TableDemo.header=\u30D8\u30C3\u30C0\u30FC
+
+# This string will be formatted by a MessageFormat and
+# printed at the top of each page of the printed result.
+# You can use {0} to insert a page number.
+TableDemo.headerText=JTable\u5370\u5237
+
+TableDemo.footer=\u30D5\u30C3\u30BF\u30FC
+
+# This string will be formatted by a MessageFormat and
+# printed at the bottom of each page of the printed result.
+# You can use {0} to insert a page number.
+TableDemo.footerText={0}\u30DA\u30FC\u30B8
+
+TableDemo.printingResult=\u5370\u5237\u7D50\u679C
+TableDemo.printingComplete=\u5370\u5237\u5B8C\u4E86
+TableDemo.printingCancelled=\u5370\u5237\u306E\u53D6\u6D88
+
+# This string will be formatted by a MessageFormat and
+# and displayed when an exception occurs.
+# {0} is used to place details of the exception.
+TableDemo.printingFailed=\u5370\u5237\u30A8\u30E9\u30FC: {0}
+
+
+### ToolTip Demo ###
+
+ToolTipDemo.accessible_description=ToolTip\u306F\u3001\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u306B\u3064\u3044\u3066\u306E\u7C21\u5358\u306A\u8AAC\u660E\u3092\u8868\u793A\u3057\u307E\u3059\u3002
+ToolTipDemo.accessible_cow=\u3053\u308C\u306F\u96CC\u725B\u3067\u3059\u3002
+ToolTipDemo.tooltip=ToolTip\u30C7\u30E2
+ToolTipDemo.name=ToolTip\u30C7\u30E2
+ToolTipDemo.bessie=\u96CC\u725B\u306E\u30D9\u30C3\u30B7\u30FC
+ToolTipDemo.cow=\u96CC\u725B\u3002
+ToolTipDemo.got_milk=\u725B\u4E73\u3042\u308B?
+ToolTipDemo.tail=\u3057\u3063\u307D\u3002
+ToolTipDemo.moo=\u30E2\u30A9\u30A9\u30A9\u30A9!
+ToolTipDemo.tooltip_features=<html>\u3082\u3057\u3084\u3042\u306A\u305F\u306F\u3001\u30C4\u30FC\u30EB\u30FB\u30C1\u30C3\u30D7\u306F\u300C1\u884C\u306E\u30D7\u30EC\u30FC\u30F3\u30FB\u30C6\u30AD\u30B9\u30C8\u300D\u3057\u304B<p>\u8868\u793A\u3067\u304D\u306A\u3044\u9000\u5C48\u306A\u3082\u306E\u3060\u306A\u3093\u3066\u601D\u3063\u3066\u3084\u3057\u307E\u305B\u3093\u304B\u3002<p>\u3060\u3068\u3057\u305F\u3089\u3001\u79C1\u305F\u3061<font color=blue size=+2>Swing!</font>\u30C1\u30FC\u30E0\u304C\u305D\u306E\u8AA4\u89E3\u3092\u89E3\u3044\u3066\u3042\u3052\u307E\u3057\u3087\u3046\u3002<p>Swing\u306EToolTip\u306F\u3001HTML\u3092\u4F7F\u7528\u3057\u3066<ul><li>List\u3092\u6301\u3063\u305F\u308A\u3001<li><b>\u592A\u5B57</b>\u306B\u3057\u305F\u308A\u3001<li><em>\u5F37\u8ABF</em>\u306B\u3057\u305F\u308A\u3001<li>\u6587\u5B57\u306B<font color=red>\u8272</font>\u3092\u4ED8\u3051\u305F\u308A\u3001<li><font size=+3>\u30B5\u30A4\u30BA</font>\u3092\u5909\u3048\u305F\u308A\u3001<li><font face=AvantGarde>\u30D5\u30A9\u30F3\u30C8</font>\u3092\u5909\u3048\u305F\u308A\u3001</ul>\u305D\u3046\u305D\u3046\u3001\u3082\u3061\u308D\u3093\u8907\u6570\u884C\u306B\u3059\u308B\u3053\u3068\u3082\u3067\u304D\u3061\u3083\u3046\u306E\u3067\u3059\u3002\u306D\u3063\u3002</html>
+
+
+### Tree Demo ###
+
+TreeDemo.accessible_description=\u3053\u306E\u30C7\u30E2\u3067\u306F\u3001JTree\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u306E\u4F7F\u7528\u4F8B\u3092\u7D39\u4ECB\u3057\u307E\u3059\u3002
+TreeDemo.tooltip=JTree\u30C7\u30E2
+TreeDemo.name=Tree\u30C7\u30E2
+TreeDemo.music=\u97F3\u697D
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/demo/share/jfc/SwingSet2/resources/swingset_zh_CN.properties	Fri Apr 06 03:53:28 2018 +0200
@@ -0,0 +1,644 @@
+# This properties file is used to create a PropertyResourceBundle
+# It contains Locale specific strings used in the SwingSet demo.
+#
+# @author Jeff Dinkins
+
+#################################
+###  SwingSet Infrastructure  ###
+#################################
+
+### About Box ###
+
+AboutBox.title=\u5173\u4E8E Swing!
+AboutBox.ok_button_text=\u786E\u5B9A
+AboutBox.accessible_description=SwingSet2 \u6F14\u793A\u7A0B\u5E8F, \u7248\u6743\u6240\u6709 (c) 2011, Oracle \u548C/\u6216\u5176\u5B50\u516C\u53F8\u3002\u4FDD\u7559\u6240\u6709\u6743\u5229\u3002
+
+### Source Code ###
+SourceCode.loading=<html><body bgcolor="#ffffff">\u6B63\u5728\u52A0\u8F7D\u548C\u683C\u5F0F\u5316\u6E90\u4EE3\u7801, \u8BF7\u7A0D\u5019...</body></html>
+
+### Status ###
+
+Status.loading=\u6B63\u5728\u52A0\u8F7D: 
+Status.popupMenuAccessible=\u8BF7\u6309 Shift-F10 \u7EC4\u5408\u952E\u6FC0\u6D3B\u5F39\u51FA\u5F0F\u83DC\u5355
+
+### Menu Bar ###
+
+MenuBar.accessible_description=Swing \u6F14\u793A\u83DC\u5355\u680F
+
+
+### Frame ###
+
+Frame.title=SwingSet2
+
+
+### Tabbed Pane ###
+
+TabbedPane.src.labelAndMnemonic=\u6E90\u4EE3\u7801
+TabbedPane.src_tooltip=\u67E5\u770B\u672C\u6F14\u793A\u7684\u6E90\u4EE3\u7801
+
+
+### Look & Feel Menu ###
+
+LafMenu.laf.labelAndMnemonic=\u5916\u89C2(&L)
+LafMenu.laf_accessible_description=\u7528\u4E8E\u5207\u6362\u5916\u89C2\u7684\u83DC\u5355
+
+LafMenu.java.labelAndMnemonic=Java \u5916\u89C2(&J)
+LafMenu.java_accessible_description=Java \u5916\u89C2
+
+LafMenu.nimbus.labelAndMnemonic=Nimbus \u5916\u89C2(&N)
+LafMenu.nimbus_accessible_description=Nimbus \u5916\u89C2
+
+LafMenu.mac.labelAndMnemonic=Mac OS X \u5916\u89C2(&M)
+LafMenu.mac_accessible_description=Mac OS X \u5916\u89C2
+
+LafMenu.motif.labelAndMnemonic=Motif \u5916\u89C2(&O)
+LafMenu.motif_accessible_description=Motif \u5916\u89C2
+
+LafMenu.windows.labelAndMnemonic=Windows \u6837\u5F0F\u5916\u89C2(&W)
+LafMenu.windows_accessible_description=Windows \u6837\u5F0F\u5916\u89C2
+
+LafMenu.gtk.labelAndMnemonic=GTK \u6837\u5F0F\u5916\u89C2(&G)
+LafMenu.gtk_accessible_description=GTK \u6837\u5F0F\u5916\u89C2
+
+
+### Themes Menu ###
+
+ThemesMenu.themes.labelAndMnemonic=\u4E3B\u9898(&T)
+ThemesMenu.themes_accessible_description=\u5207\u6362\u91D1\u5C5E\u989C\u8272\u4E3B\u9898\u7684\u83DC\u5355
+
+ThemesMenu.aqua.labelAndMnemonic=\u6C34\u7EFF(&Q)
+ThemesMenu.aqua_accessible_description=\u84DD\u7EFF\u8272\u91D1\u5C5E\u4E3B\u9898
+
+ThemesMenu.charcoal.labelAndMnemonic=\u70AD\u7070(&C)
+ThemesMenu.charcoal_accessible_description=\u6697\u7070\u8272\u91D1\u5C5E\u4E3B\u9898
+
+ThemesMenu.contrast.labelAndMnemonic=\u9AD8\u5BF9\u6BD4\u5EA6(&H)
+ThemesMenu.contrast_accessible_description=\u9AD8\u5BF9\u6BD4\u5EA6\u4E3B\u9898
+
+ThemesMenu.ocean.labelAndMnemonic=\u6D77\u6D0B(&O)
+ThemesMenu.ocean_accessible_description=\u6D77\u6D0B\u91D1\u5C5E\u4E3B\u9898
+
+ThemesMenu.steel.labelAndMnemonic=\u94A2(&S)
+ThemesMenu.steel_accessible_description=\u84DD\u8272/\u7D2B\u8272\u91D1\u5C5E\u4E3B\u9898
+
+ThemesMenu.emerald.labelAndMnemonic=\u7956\u6BCD\u7EFF(&E)
+ThemesMenu.emerald_accessible_description=\u7EFF\u8272\u91D1\u5C5E\u4E3B\u9898
+
+ThemesMenu.ruby.labelAndMnemonic=\u5B9D\u77F3\u7EA2(&R)
+ThemesMenu.ruby_accessible_description=\u7EA2\u8272\u91D1\u5C5E\u4E3B\u9898
+
+
+### Font SubMenu (under Themes) 
+FontMenu.fonts.labelAndMnemonic=\u5B57\u4F53(&F)
+FontMenu.fonts_accessible_description=\u7528\u6765\u9009\u62E9 Java \u5916\u89C2\u5B57\u4F53\u7684\u83DC\u5355
+
+FontMenu.bold.labelAndMnemonic=\u7C97\u4F53(&B)
+FontMenu.bold_accessible_description=\u4E3A Java \u5916\u89C2\u542F\u7528\u7C97\u4F53\u5B57\u4F53
+
+FontMenu.plain.labelAndMnemonic=\u65E0\u683C\u5F0F(&P)
+FontMenu.plain_accessible_description=\u4E3A Java \u5916\u89C2\u542F\u7528\u65E0\u683C\u5F0F\u5B57\u4F53
+
+
+### Audio SubMenu (under Themes) ###
+
+AudioMenu.audio.labelAndMnemonic=\u97F3\u9891(&A)
+AudioMenu.audio_accessible_description=\u7528\u6765\u5207\u6362 Java \u5916\u89C2\u4E2D\u53EF\u7528\u7684\u542C\u89C9\u53CD\u9988\u6570\u91CF\u7684\u83DC\u5355
+
+AudioMenu.on.labelAndMnemonic=\u65E5\u671F(&O)
+AudioMenu.on_accessible_description=\u4E3A Java \u5916\u89C2\u542F\u7528\u6240\u6709\u542C\u89C9\u53CD\u9988
+
+AudioMenu.default.labelAndMnemonic=\u9ED8\u8BA4\u503C(&D)
+AudioMenu.default_accessible_description=\u4E3A Java \u5916\u89C2\u542F\u7528\u6807\u51C6\u7684\u542C\u89C9\u53CD\u9988\u6570\u91CF
+
+AudioMenu.off.labelAndMnemonic=\u5173(&F)
+AudioMenu.off_accessible_description=\u4E3A Java \u5916\u89C2\u7981\u7528\u6240\u6709\u542C\u89C9\u53CD\u9988
+
+### Options Menu ###
+
+OptionsMenu.options.labelAndMnemonic=\u9009\u9879(&P)
+OptionsMenu.options_accessible_description=\u5305\u542B\u5176\u4ED6\u9009\u9879\u7684\u83DC\u5355
+
+OptionsMenu.tooltip.labelAndMnemonic=\u542F\u7528\u5DE5\u5177\u63D0\u793A(&T)
+OptionsMenu.tooltip_accessible_description=\u542F\u7528\u6216\u7981\u7528\u5DE5\u5177\u63D0\u793A
+
+OptionsMenu.dragEnabled.labelAndMnemonic=\u542F\u7528\u62D6\u52A8\u652F\u6301(&D)
+OptionsMenu.dragEnabled_accessible_description=\u542F\u7528\u6216\u7981\u7528\u62D6\u52A8\u652F\u6301
+
+### File Menu ###
+
+FileMenu.file.labelAndMnemonic=\u6587\u4EF6(&F)
+FileMenu.accessible_description=\u6587\u4EF6\u83DC\u5355
+FileMenu.about.labelAndMnemonic=\u5173\u4E8E(&B)
+FileMenu.about_accessible_description=\u4E86\u89E3 SwingSet2 \u5E94\u7528\u7A0B\u5E8F
+FileMenu.open.labelAndMnemonic=\u6253\u5F00(&O)
+FileMenu.open_accessible_description=\u7528\u4E8E\u6253\u5F00\u6587\u4EF6\u7684\u5360\u4F4D\u7B26\u83DC\u5355\u9879
+FileMenu.save.labelAndMnemonic=\u4FDD\u5B58(&S)
+FileMenu.save_accessible_description=\u7528\u4E8E\u4FDD\u5B58\u6587\u4EF6\u7684\u5360\u4F4D\u7B26\u83DC\u5355\u9879
+FileMenu.save_as.labelAndMnemonic=\u53E6\u5B58\u4E3A(&A)...
+FileMenu.save_as_accessible_description=\u7528\u4E8E\u5C06\u6587\u4EF6\u53E6\u5B58\u4E3A\u4E00\u4E2A\u65B0\u6587\u4EF6\u540D\u7684\u5360\u4F4D\u7B26\u83DC\u5355\u9879
+FileMenu.exit.labelAndMnemonic=\u9000\u51FA(&X)
+FileMenu.exit_accessible_description=\u9000\u51FA SwingSet2 \u5E94\u7528\u7A0B\u5E8F
+
+### Multi-Screen menu ###
+MultiMenu.multi.labelAndMnemonic=\u591A\u5C4F\u5E55(&M)
+MultiMenu.multi_accessible_description=\u591A\u5C4F\u5E55\u83DC\u5355
+MultiMenu.all.labelAndMnemonic=\u5728\u6240\u6709\u5C4F\u5E55\u4E0A\u521B\u5EFA SwingSet2(&A)
+MultiMenu.all_accessible_description=\u5728\u6BCF\u4E2A\u5C4F\u5E55\u4E0A\u521B\u5EFA\u4E00\u4E2A SwingSet2 \u7A97\u53E3
+MultiMenu.single.labelAndMnemonic=\u5728\u5C4F\u5E55\u4E0A\u521B\u5EFA SwingSet2
+MultiMenu.single_accessible_description=\u5728\u5C4F\u5E55\u4E0A\u521B\u5EFA SwingSet2 \u7A97\u53E3
+
+
+################################
+###          DEMOS           ###
+################################
+
+### Button Demo ###
+
+ButtonDemo.accessible_description=ButtonDemo \u663E\u793A\u4E86\u4F7F\u7528 JButton, JRadioButton, JToggleButton \u548C JCheckBox \u7684\u793A\u4F8B 
+ButtonDemo.tooltip=JButton, JRadioButton, JToggleButton, JCheckbox \u6F14\u793A
+ButtonDemo.name=\u6309\u94AE\u6F14\u793A
+
+ButtonDemo.buttons=\u6309\u94AE
+ButtonDemo.checkboxes=\u590D\u9009\u6846
+ButtonDemo.radiobuttons=\u5355\u9009\u6309\u94AE
+ButtonDemo.togglebuttons=\u5207\u6362\u6309\u94AE
+
+ButtonDemo.textbuttons=\u6587\u672C\u6309\u94AE
+ButtonDemo.imagebuttons=\u56FE\u50CF\u6309\u94AE
+ButtonDemo.textradiobuttons=\u6587\u672C\u5355\u9009\u6309\u94AE
+ButtonDemo.imageradiobuttons=\u56FE\u50CF\u5355\u9009\u6309\u94AE
+ButtonDemo.texttogglebuttons=\u6587\u672C\u5207\u6362\u6309\u94AE
+ButtonDemo.imagetogglebuttons=\u56FE\u50CF\u5207\u6362\u6309\u94AE
+ButtonDemo.textcheckboxes=\u6587\u672C\u590D\u9009\u6846
+ButtonDemo.imagecheckboxes=\u56FE\u50CF\u590D\u9009\u6846
+
+ButtonDemo.button1=\u4E00 
+ButtonDemo.button2=\u4E8C
+ButtonDemo.button3=<html><font size=2 color=red><bold>\u4E09!</font></html>
+
+ButtonDemo.radio1=\u5355\u9009\u4E00 
+ButtonDemo.radio2=\u5355\u9009\u4E8C
+ButtonDemo.radio3=\u5355\u9009\u4E09
+ButtonDemo.radioX=<html><font size=2 color=red>\u4E09<bold> (HTML!)</bold></font></html>
+
+ButtonDemo.check1=\u4E00 
+ButtonDemo.check2=\u4E8C
+ButtonDemo.check3=\u4E09
+ButtonDemo.checkX=<html><font size=2 color=red>\u4E09<bold> (HTML!)</bold></font></html>
+
+ButtonDemo.customradio=\u5B9A\u5236 "chrome" \u5355\u9009\u6309\u94AE\u3002
+ButtonDemo.customcheck=\u5B9A\u5236\u201C\u706F\u6CE1\u201D\u590D\u9009\u6846\u3002
+
+ButtonDemo.phone=\u7535\u8BDD 
+ButtonDemo.write=\u5199
+ButtonDemo.peace=\u5E73\u9759
+
+ButtonDemo.controlpanel.labelAndMnemonic=\u663E\u793A\u9009\u9879:
+ButtonDemo.paintborder.labelAndMnemonic=\u7ED8\u5236\u8FB9\u6846(&B)
+ButtonDemo.paintborder_tooltip=\u5355\u51FB\u6B64\u5904\u53EF\u6253\u5F00\u6216\u5173\u95ED\u8FB9\u6846\u7ED8\u5236\u3002
+ButtonDemo.paintfocus.labelAndMnemonic=\u7ED8\u5236\u7126\u70B9(&F)
+ButtonDemo.paintfocus_tooltip=\u5355\u51FB\u6B64\u5904\u53EF\u6253\u5F00\u6216\u5173\u95ED\u7126\u70B9\u7ED8\u5236\u3002
+ButtonDemo.enabled.labelAndMnemonic=\u542F\u7528(&E)
+ButtonDemo.enabled_tooltip=\u5355\u51FB\u6B64\u5904\u53EF\u542F\u7528\u6216\u7981\u7528\u6309\u94AE\u3002
+ButtonDemo.contentfilled.labelAndMnemonic=\u586B\u5145\u5185\u5BB9(&I)
+ButtonDemo.contentfilled_tooltip=\u5355\u51FB\u6B64\u5904\u53EF\u63A7\u5236\u5185\u5BB9\u533A\u57DF\u7684\u586B\u5145\u3002
+
+ButtonDemo.padamount.labelAndMnemonic=\u586B\u5145\u91CF:
+ButtonDemo.default.labelAndMnemonic=\u9ED8\u8BA4\u503C(&D)
+ButtonDemo.default_tooltip=\u5728\u8FB9\u6846\u4E0E\u6807\u7B7E\u4E4B\u95F4\u4F7F\u7528\u9ED8\u8BA4\u586B\u5145\u3002
+ButtonDemo.zero.labelAndMnemonic=&0
+ButtonDemo.zero_tooltip=\u5728\u8FB9\u6846\u4E0E\u6807\u7B7E\u4E4B\u95F4\u4E0D\u4F7F\u7528\u586B\u5145\u3002
+ButtonDemo.ten.labelAndMnemonic=&10
+ButtonDemo.ten_tooltip=\u5728\u8FB9\u6846\u4E0E\u6807\u7B7E\u4E4B\u95F4\u4F7F\u7528 10 \u50CF\u7D20\u586B\u5145\u3002
+
+LayoutControlPanel.textposition.labelAndMnemonic=\u6587\u672C\u4F4D\u7F6E:
+LayoutControlPanel.contentalignment.labelAndMnemonic=\u5185\u5BB9\u5BF9\u9F50:
+
+### ColorChooser Demo ###
+
+ColorChooserDemo.accessible_description=\u4F7F\u7528 ColorChooser, \u7528\u6237\u53EF\u4EE5\u4ECE\u8C03\u8272\u677F\u6216\u8005\u901A\u8FC7\u9009\u62E9 RGB \u6216 HSB \u503C\u6765\u9009\u53D6\u989C\u8272
+ColorChooserDemo.tooltip=JColorChooser \u6F14\u793A
+ColorChooserDemo.name=ColorChooser \u6F14\u793A
+ColorChooserDemo.chooser_title=\u9009\u62E9\u989C\u8272
+ColorChooserDemo.background=\u80CC\u666F
+ColorChooserDemo.grad_a=\u6E10\u53D8 1
+ColorChooserDemo.grad_b=\u6E10\u53D8 2
+ColorChooserDemo.outer_line=\u5468\u957F
+ColorChooserDemo.cup=Java \u5546\u6807\u7684\u5496\u5561\u676F\u56FE\u50CF
+
+### ComboBox Demo ###
+
+ComboBoxDemo.accessible_description=\u6B64\u6F14\u793A\u663E\u793A\u4E86\u4F7F\u7528 JComboBox \u7EC4\u4EF6\u7684\u793A\u4F8B\u3002
+ComboBoxDemo.tooltip=JComboBox \u6F14\u793A
+ComboBoxDemo.name=ComboBox \u6F14\u793A
+
+ComboBoxDemo.hair=\u5934\u53D1
+ComboBoxDemo.eyes=\u773C\u775B
+ComboBoxDemo.mouth=\u5634
+ComboBoxDemo.presets=\u9884\u8BBE:
+
+ComboBoxDemo.preset1=Philip, Howard, Jeff
+ComboBoxDemo.preset2=Jeff, Larry, Philip
+ComboBoxDemo.preset3=Howard, Scott, Hans
+ComboBoxDemo.preset4=Philip, Jeff, Hans
+ComboBoxDemo.preset5=Brent, Jon, Scott
+ComboBoxDemo.preset6=Lara, Larry, Lisa
+ComboBoxDemo.preset7=James, Philip, Michael
+ComboBoxDemo.preset8=Philip, Lisa, Brent
+ComboBoxDemo.preset9=James, Philip, Jon
+ComboBoxDemo.preset10=Lara, Jon, Scott
+
+
+ComboBoxDemo.hair_description=\u5934\u53D1:
+ComboBoxDemo.eyes_description=\u773C\u775B\u548C\u9F3B\u5B50:
+ComboBoxDemo.mouth_description=\u5634:
+
+ComboBoxDemo.amy=Amy
+ComboBoxDemo.brent=Brent
+ComboBoxDemo.georges=Georges
+ComboBoxDemo.hans=Hans
+ComboBoxDemo.howard=Howard
+ComboBoxDemo.james=James
+ComboBoxDemo.jeff=Jeff
+ComboBoxDemo.jon=Jon
+ComboBoxDemo.lara=Lara
+ComboBoxDemo.larry=Larry
+ComboBoxDemo.lisa=Lisa
+ComboBoxDemo.michael=Michael
+ComboBoxDemo.philip=Philip
+ComboBoxDemo.scott=Scott
+
+### FileChooser Demo ###
+
+FileChooserDemo.accessible_description=\u4F7F\u7528 FileChooser, \u7528\u6237\u53EF\u4EE5\u9009\u62E9\u6587\u4EF6, \u901A\u5E38\u662F\u7528\u4E8E\u6253\u5F00\u6216\u521B\u5EFA/\u4FDD\u5B58\u3002
+FileChooserDemo.tooltip=JFileChooser \u6F14\u793A
+FileChooserDemo.name=FileChooser \u6F14\u793A
+
+FileChooserDemo.plainbutton=\u663E\u793A\u65E0\u683C\u5F0F JFileChooser
+FileChooserDemo.previewbutton=\u663E\u793A\u9884\u89C8 JFileChooser
+FileChooserDemo.custombutton=\u663E\u793A\u5B9A\u5236 JFileChooser
+
+FileChooserDemo.description=<html>&&nbsp &&nbsp \u8BF7\u6CE8\u610F, \u60A8\u53EF\u4EE5\u4F7F\u7528\u4EFB\u610F\u591A\u4E2A\u7EC4\u4EF6\u8F7B\u677E\u521B\u5EFA<br> &&nbsp &&nbsp \u5B9A\u5236 FileChooser\u3002</html>
+
+FileChooserDemo.filterdescription=JPEG \u548C GIF \u56FE\u50CF\u6587\u4EF6
+
+FileChooserDemo.nofileselected=\u8BF7\u5148\u9009\u62E9\u4E00\u4E2A\u6587\u4EF6\u3002
+FileChooserDemo.thefile=\u6587\u4EF6:
+FileChooserDemo.isprobably=\u53EF\u80FD\u662F\u4E00\u4E2A\u56FE\u50CF\u3002
+
+FileChooserDemo.helptext=<html>\u67E5\u627E: \u67E5\u627E\u67D0\u4E2A\u6587\u4EF6\u3002<br>\u5173\u4E8E: \u4E86\u89E3\u6709\u5173\u8BE5\u6587\u4EF6\u7684\u8BE6\u7EC6\u4FE1\u606F\u3002<br>\u786E\u5B9A: \u9009\u62E9\u8BE5\u6587\u4EF6\u3002<br>\u53D6\u6D88: \u9000\u51FA\u6B64\u5BF9\u8BDD\u6846, \u800C\u4E0D\u8FDB\u884C\u4EFB\u4F55\u64CD\u4F5C\u3002</html>
+
+FileChooserDemo.findquestion=\u67E5\u627E\u6587\u4EF6:
+FileChooserDemo.findresponse=<html><center>\u662F\u5426\u786E\u5B9E\u8981\u67E5\u627E\u6587\u4EF6?!?<br>\u6211\u4E0D\u77E5\u9053\u5982\u4F55\u6267\u884C\u8BE5\u64CD\u4F5C! \u8FD9\u53EA\u662F\u4E00\u4E2A\u6F14\u793A!</center></html>
+
+FileChooserDemo.dialogtitle=\u5B9A\u5236\u5E03\u5C40 FileChooser
+FileChooserDemo.help=\u5E2E\u52A9
+FileChooserDemo.find=\u67E5\u627E
+FileChooserDemo.ok=\u786E\u5B9A
+FileChooserDemo.about=\u5173\u4E8E
+FileChooserDemo.cancel=\u53D6\u6D88
+
+### Html Demo ###
+
+HtmlDemo.accessible_description=\u672C\u6F14\u793A\u8BF4\u660E\u5982\u4F55\u4F7F\u7528 JEditorPane \u7EC4\u4EF6\u663E\u793A HTML \u6587\u672C\u3002
+HtmlDemo.tooltip=JEditorPane HTML \u6F14\u793A
+HtmlDemo.name=JEditorPane HTML \u6F14\u793A
+HtmlDemo.filename=swing.html
+
+
+### Internal Frame Demo ###
+
+InternalFrameDemo.accessible_description=JInternal Frame \u6F14\u793A
+InternalFrameDemo.create_frames.labelAndMnemonic=\u521B\u5EFA\u5B9A\u5236\u7684\u5185\u90E8\u6846\u67B6
+InternalFrameDemo.title_text_field.labelAndMnemonic=\u6846\u67B6\u6807\u9898:
+InternalFrameDemo.frame.labelAndMnemonic=\u6846\u67B6
+InternalFrameDemo.palette.labelAndMnemonic=\u5185\u90E8\u6846\u67B6\u751F\u6210\u5668
+InternalFrameDemo.name=\u5185\u90E8\u6846\u67B6\u6F14\u793A
+InternalFrameDemo.tooltip=JInternalFrame \u6F14\u793A
+InternalFrameDemo.closable.labelAndMnemonic=\u53EF\u5173\u95ED
+InternalFrameDemo.resizable.labelAndMnemonic=\u53EF\u8C03\u6574\u5927\u5C0F
+InternalFrameDemo.iconifiable.labelAndMnemonic=\u53EF\u56FE\u6807\u5316
+InternalFrameDemo.maximizable.labelAndMnemonic=\u53EF\u6700\u5927\u5316
+InternalFrameDemo.toast=Cheers
+InternalFrameDemo.duke=Your Grace
+InternalFrameDemo.duchess=Duchess
+InternalFrameDemo.cab=\u8C01\u9700\u8981\u51FA\u79DF\u8F66?
+
+
+### List Demo ###
+
+ListDemo.accessible_description=JList \u6F14\u793A
+ListDemo.name=List \u6F14\u793A
+ListDemo.tooltip=JList \u6F14\u793A
+ListDemo.prefixes=\u524D\u7F00
+ListDemo.suffixes=\u540E\u7F00
+ListDemo.count.labelAndMnemonic=\u751F\u6210\u7684\u5217\u8868\u6761\u76EE\u6570:
+ListDemo.all=\u5168\u90E8
+ListDemo.none=\u65E0
+ListDemo.red=\u7EA2\u8272\u516C\u53F8\u5FBD\u6807\u56FE\u50CF
+ListDemo.yellow=\u7EA2\u8272\u516C\u53F8\u5FBD\u6807\u56FE\u50CF
+ListDemo.blue=\u84DD\u8272\u516C\u53F8\u5FBD\u6807\u56FE\u50CF
+ListDemo.gray=\u7070\u8272\u516C\u53F8\u5FBD\u6807\u56FE\u50CF
+ListDemo.green=\u7EFF\u8272\u516C\u53F8\u5FBD\u6807\u56FE\u50CF
+ListDemo.magenta=\u7D2B\u7EA2\u8272\u516C\u53F8\u5FBD\u6807\u56FE\u50CF
+ListDemo.cyan=\u9752\u8272\u516C\u53F8\u5FBD\u6807\u56FE\u50CF
+ListDemo.description=<html><P STYLE="margin-left: .25in; margin-right: .25in">\u672C\u6F14\u793A\u8BF4\u660E\u5982\u4F55\u7528\u4E24\u79CD\u4E0D\u540C\u7684\u65B9\u6CD5\u6765\u5448\u73B0\u6570\u636E\u7684\u5217\u8868\u3002\u5DE6\u4FA7\u662F\u4E00\u4E2A <b>JList</b> \u7EC4\u4EF6, \u5176\u4E2D\u7684\u5217\u8868\u9879\u7531\u9009\u4E2D\u7684\u524D\u7F00\u548C\u540E\u7F00\u7EC4\u6210\u3002\u53F3\u4FA7\u7684\u524D\u7F00\u548C\u540E\u7F00\u590D\u9009\u6846\u5217\u662F\u5728 <b>JScrollPane</b> \u4E2D\u4F7F\u7528\u5E26\u6709 Y \u8F74 <b>BoxLayout</b> \u7684 <b>JPanel</b> \u521B\u5EFA\u7684\u3002</P></html>
+
+
+### OptionPane Demo ###
+
+OptionPaneDemo.accessible_description=OptionPane \u6F14\u793A\u663E\u793A\u4E86\u4F7F\u7528 JOptionPane \u751F\u6210\u4E0D\u540C\u7684\u5E38\u7528\u9009\u9879\u5BF9\u8BDD\u6846\u7684\u793A\u4F8B
+OptionPaneDemo.tooltip=JOptionPane \u6F14\u793A
+OptionPaneDemo.name=\u9009\u9879\u7A97\u683C\u6F14\u793A
+
+OptionPaneDemo.warningbutton=\u663E\u793A\u8B66\u544A\u5BF9\u8BDD\u6846
+OptionPaneDemo.componentbutton=\u663E\u793A\u7EC4\u4EF6\u5BF9\u8BDD\u6846
+OptionPaneDemo.inputbutton=\u663E\u793A\u8F93\u5165\u5BF9\u8BDD\u6846
+OptionPaneDemo.confirmbutton=\u663E\u793A\u786E\u8BA4\u5BF9\u8BDD\u6846
+OptionPaneDemo.messagebutton=\u663E\u793A\u6D88\u606F\u5BF9\u8BDD\u6846
+
+OptionPaneDemo.warningtitle=\u8B66\u544A\u5BF9\u8BDD\u6846\u793A\u4F8B
+OptionPaneDemo.warningtext=<html><P><font color=black>\u8FD9\u662F\u4E00\u6B21<font color=red><b>\u7D27\u6025\u5E7F\u64AD\u7CFB\u7EDF</b></font>\u6D4B\u8BD5\u3002<i><b>\u8FD9\u53EA\u662F<br>\u4E00\u6B21\u6D4B\u8BD5</b></i>\u3002\u81EA\u613F<br>\u4E0E<font color=blue><b>\u7F8E\u56FD\u8054\u90A6\u653F\u5E9C</b></font>\u548C<font color=blue><b>\u5DDE</b></font>\u6388\u6743\u673A\u6784\u534F\u4F5C\u7684\u672C\u5730 Intranet \u7684\u7F51\u7EDC\u7BA1\u7406\u5458<br>\u5F00\u53D1\u51FA\u4E86\u6B64\u7CFB\u7EDF, \u4EE5\u4FBF\u5728\u53D1\u751F\u7D27\u6025\u4E8B\u4EF6\u65F6\u901A\u77E5<br>\u60A8\u3002\u5982\u679C\u8FD9\u662F\u4E00\u4E2A\u771F\u5B9E\u7684\u7D27\u6025\u4E8B\u4EF6, \u5219\u521A\u521A<br>\u542C\u5230\u7684\u4FE1\u53F7\u4E4B\u540E\u5C06\u4F1A\u8DDF\u6709\u5B98\u65B9\u4FE1\u606F, \u65B0\u95FB<br>\u6216\u6307\u4EE4\u3002\u8FD9\u5C06\u7EC8\u6B62\u6B64\u6B21<font color=red><b>\u7D27\u6025<br>\u5E7F\u64AD\u7CFB\u7EDF</b></font>\u6D4B\u8BD5\u3002</font></P><P><br>\u5F00\u53D1\u8005\u8BF7\u6CE8\u610F: \u6B64\u5BF9\u8BDD\u6846\u6F14\u793A\u4E86\u4F7F\u7528 HTML \u8BBE\u7F6E\u6587\u672C\u683C\u5F0F\u3002</P></html>
+
+OptionPaneDemo.messagetext=\u74F6\u4E2D\u4FE1 (\u662F)
+
+OptionPaneDemo.confirmquestion=\u4ECA\u5929\u5929\u6C14\u6674\u6717\u5417?
+OptionPaneDemo.confirmyes=<html>\u8001\u662F\u5750\u5728\u7535\u8111\u65C1\u8FB9\u6709\u4EC0\u4E48\u610F\u601D?<br>\u5230\u6237\u5916\u53BB\u5427! \u5230\u6D77\u8FB9\u65C5\u884C\u53BB\u5427! \u4EAB\u53D7\u4E00\u4E0B\u9633\u5149!</html>
+OptionPaneDemo.confirmno=\u5F85\u5728\u5BA4\u5185\u53EF\u4EE5\u514D\u53D7\u81EA\u7136\u73AF\u5883\u7684\u4FB5\u5BB3, \u662F\u4EF6\u597D\u4E8B!
+
+OptionPaneDemo.inputquestion=\u60A8\u6700\u559C\u6B22\u54EA\u4E00\u90E8\u7535\u5F71?
+OptionPaneDemo.inputresponse=\u90A3\u662F\u4E00\u90E8\u76F8\u5F53\u597D\u770B\u7684\u7535\u5F71!
+
+OptionPaneDemo.componenttitle=\u7EC4\u4EF6\u5BF9\u8BDD\u6846\u793A\u4F8B
+OptionPaneDemo.componentmessage=<html>JOptionPane \u53EF\u4EE5\u5305\u542B\u4EFB\u610F\u591A\u4E2A\u7EC4\u4EF6<br>, \u4F8B\u5982\u6587\u672C\u5B57\u6BB5:</html>
+OptionPaneDemo.componenttextfield=\u6216\u8005\u7EC4\u5408\u6846:
+OptionPaneDemo.component_cb1=\u9879 1
+OptionPaneDemo.component_cb2=\u9879 2
+OptionPaneDemo.component_cb3=\u9879 3
+OptionPaneDemo.componentmessage2=<html>JOptionPane \u8FD8\u53EF\u4EE5\u663E\u793A\u4EFB\u610F\u591A\u4E2A<br>\u9009\u9879:</html>
+OptionPaneDemo.component_op1=\u662F
+OptionPaneDemo.component_op2=\u5426
+OptionPaneDemo.component_op3=\u6216\u8BB8
+OptionPaneDemo.component_op4=\u53EF\u80FD
+OptionPaneDemo.component_op5=\u53D6\u6D88
+
+OptionPaneDemo.component_r1=\u4E50\u89C2\u79EF\u6781! \u6211\u559C\u6B22\u8FD9\u6837! \u6B63\u786E\u7684\u9009\u62E9\u3002
+OptionPaneDemo.component_r2=\u4E00\u5B9A\u4E0D\u4F1A, \u6211\u4E5F\u4E0D\u4F1A\u90A3\u6837\u505A\u3002
+OptionPaneDemo.component_r3=<html><font color=black> \u55EF, \u662F\u7684, \u73B0\u5728\u60C5\u51B5\u8FD8\u4E0D<br>\u660E\u786E\u3002\u5F53\u60A8\u4E86\u89E3\u5230\u786E\u5207\u60C5\u51B5\u540E, \u8BF7\u8FDB\u884C\u6838\u5B9E\u3002</font></html>
+OptionPaneDemo.component_r4=<html><font color=black>\u8FD9\u624D\u662F\u60A8\u771F\u6B63\u60F3\u505A\u7684\u3002\u6211\u4EE5\u4E3A\u60A8\u672C\u5E94\u8BE5<br>\u575A\u51B3\u5730\u6309\u4E0B "\u662F"\u3002</font></html>
+
+### ProgressBar Demo ###
+
+ProgressBarDemo.accessible_description=\u6B64\u6F14\u793A\u663E\u793A\u4E86\u4F7F\u7528 JProgressBar \u7EC4\u4EF6\u7684\u793A\u4F8B\u3002
+ProgressBarDemo.tooltip=JProgressBar \u6F14\u793A
+ProgressBarDemo.name=ProgressBar \u6F14\u793A
+ProgressBarDemo.start_button=\u5F00\u59CB\u52A0\u8F7D\u6587\u672C
+ProgressBarDemo.stop_button=\u505C\u6B62\u52A0\u8F7D\u6587\u672C
+ProgressBarDemo.accessible_text_loading_progress=\u6587\u672C\u52A0\u8F7D\u8FDB\u5EA6
+ProgressBarDemo.accessible_text_area_name=\u52A0\u8F7D\u7684\u6587\u672C\u6B63\u5728\u9010\u6E10\u589E\u591A
+
+ProgressBarDemo.accessible_text_area_description=\u8FD9\u4E2A JTextArea \u7531\u6765\u81EA\u7F13\u51B2\u533A\u7684\u6587\u672C\u9010\u4E2A\u5B57\u7B26\u5730\u586B\u5145, \u540C\u65F6\u7A97\u53E3\u5E95\u90E8\u7684\u8FDB\u5EA6\u680F\u5C06\u663E\u793A\u52A0\u8F7D\u7684\u8FDB\u5EA6
+
+ProgressBarDemo.text=\u5E38\u8A00\u9053: \u5982\u679C\u65E0\u6570\u53EA\u7334\u5B50\u5728\u65E0\u6570\u53F0\u6253\u5B57\u673A\u4E0A\u6572\u51FB\u952E\u76D8, \u6700\u7EC8\n\u5C06\u5F62\u6210\u4EBA\u7C7B\u5386\u53F2\u4E0A\u6240\u6709\u4F1F\u5927\u7684\u8457\u4F5C\u3002\u73B0\u5728, \u6211\u4EEC\u53EF\u4EE5\u4F7F\u7528\u5F53\u4ECA\u7684\u9AD8\u901F\u8BA1\u7B97\u673A\u6765\u68C0\u9A8C\n\u8FD9\u4E00\u7406\u8BBA\u4E86... \n\n\tLzskd jfy 92y;ho4 th;qlh sd 6yty;q2 hnlj 8sdf. Djfy 92y;ho4, th;qxhz d7yty; \n\tQ0hnlj 23&&^ (# ljask djf y92y; fy92y; Sd6y ty;q2h nl jk la gfa harvin garvel\n\tlasdfsd a83sl la8z ks8l 92y;ho4 th;qlh sd 6yty;q2 hnlj 8sdf. Djfy 92y;ho4,\n\tth;qxhz d7yty; Q0hnlj 23&&^ nknod mrs88 jsd79lfm#%$JLaoz6df  lso7dj f2 jfls\n\t67d9ol1@2fou99s  1lkj2 @l.k1  2; a89o7aljf  1l3i7ou8 d8l3 lqwerty0092 #1!\n\tja9o do8lkjj139rojsd9**!l6*hd # ljasd78 l2awkjad78  3ol7asljf 3 ldif && l.js\n\tLl ls ewan la8uj 23lll7u 8l  3h hhxx8 8d  lsd fixx 891lkjno99sl d8l@@@!!8#8\n\tdfoil jarooda mklaoorj nowai the smisthliylka jkdlfjiw ladajadra lthhheeejfjl\n\tdkddooolda bub mirznod of the koojgaf!! But 2 be or not to be... that is the\n\tquestion. Then when shall we three meet again In thunder, lightning, or in\n\train? When the hurlyburly's done, When the battle's lost and won. That will\n\tbe ere the set of sun. Where the place? Upon the heath. There to meet with\n\tMacbeth. But hath forth not to want.....  a banana, or to be.... a banana.\n\tBanana, I knew him banana. Banana banana. Banana banana banana banana.\n\n\n\n\n\u5662, \u8FD9\u770B\u8D77\u6765\u662F\u4E2A\u597D\u4E3B\u610F...
+
+
+### ScrollPane Demo ###
+
+ScrollPaneDemo.accessible_description=JScrollPane \u6F14\u793A
+ScrollPaneDemo.name=Scroll Pane \u6F14\u793A
+ScrollPaneDemo.tooltip=JScrollPane \u6F14\u793A
+ScrollPaneDemo.crayons=\u5F88\u591A\u5F69\u7B14
+ScrollPaneDemo.colheader=\u5217\u6807\u9898
+ScrollPaneDemo.rowheader=\u884C\u6807\u9898
+ScrollPaneDemo.upperleft=\u5DE6\u4E0A\u89D2
+ScrollPaneDemo.upperright=\u53F3\u4E0A\u5217\u6807\u9898\u89D2
+ScrollPaneDemo.lowerleft=\u5DE6\u4E0B\u884C\u6807\u9898\u89D2
+
+
+### Slider Demo ###
+
+SliderDemo.accessible_description=\u6B64\u6F14\u793A\u663E\u793A\u4E86\u4F7F\u7528 JSlider \u7EC4\u4EF6\u7684\u793A\u4F8B\u3002
+SliderDemo.tooltip=JSlider \u6F14\u793A
+SliderDemo.name=\u6ED1\u5757\u6F14\u793A
+
+SliderDemo.slidervalue=\u6ED1\u5757\u503C: 
+SliderDemo.horizontal=\u6C34\u5E73
+SliderDemo.vertical=\u5782\u76F4
+SliderDemo.plain=\u65E0\u683C\u5F0F
+SliderDemo.a_plain_slider=\u65E0\u683C\u5F0F\u6ED1\u5757
+SliderDemo.majorticks=\u4E3B\u523B\u5EA6
+SliderDemo.majorticksdescription=\u663E\u793A\u4E3B\u523B\u5EA6\u7684\u6ED1\u5757
+SliderDemo.ticks=\u6B21\u523B\u5EA6, \u5BF9\u9F50\u523B\u5EA6\u548C\u6807\u7B7E
+SliderDemo.minorticks=\u6B21\u523B\u5EA6
+SliderDemo.minorticksdescription=\u6ED1\u5757\u663E\u793A\u4E3B\u523B\u5EA6\u548C\u6B21\u523B\u5EA6, \u6ED1\u5757\u52A8\u4F5C\u5C06\u5BF9\u9F50\u523B\u5EA6\u7EBF, \u5E76\u660E\u663E\u5730\u6807\u8BB0\u51FA\u67D0\u4E9B\u523B\u5EA6
+SliderDemo.disabled=\u5DF2\u7981\u7528
+SliderDemo.disableddescription=\u6ED1\u5757\u663E\u793A\u672A\u542F\u7528\u7684\u4E3B\u523B\u5EA6\u548C\u6B21\u523B\u5EA6 (\u65E0\u6CD5\u64CD\u4F5C
+
+### SplitPane Demo ###
+
+SplitPaneDemo.accessible_description=JSplitPane \u6F14\u793A
+SplitPaneDemo.name=Split Pane \u6F14\u793A
+SplitPaneDemo.tooltip=JSplitPane \u6F14\u793A
+SplitPaneDemo.earth=\u5730\u7403\u6BCD\u4EB2
+SplitPaneDemo.moon=\u6708\u7403\u4E0A\u7684\u5B87\u822A\u5458
+SplitPaneDemo.vert_split.labelAndMnemonic=\u5782\u76F4\u62C6\u5206(&V)
+SplitPaneDemo.horz_split.labelAndMnemonic=\u6C34\u5E73\u62C6\u5206(&R)
+SplitPaneDemo.cont_layout.labelAndMnemonic=\u8FDE\u7EED\u5E03\u5C40(&C)
+SplitPaneDemo.one_touch_expandable.labelAndMnemonic=\u70B9\u51FB\u53EF\u5C55\u5F00(&O)
+SplitPaneDemo.divider_size.labelAndMnemonic=\u5206\u9694\u7B26\u5927\u5C0F(&Z)
+SplitPaneDemo.invalid_divider_size=\u65E0\u6548\u7684\u5206\u9694\u7B26\u5927\u5C0F
+SplitPaneDemo.error=\u9519\u8BEF
+SplitPaneDemo.first_component_min_size.labelAndMnemonic=\u7B2C\u4E00\u4E2A\u7EC4\u4EF6\u7684\u6700\u5C0F\u5927\u5C0F(&I)
+SplitPaneDemo.second_component_min_size.labelAndMnemonic=\u7B2C\u4E8C\u7EC4\u4EF6\u7684\u6700\u5C0F\u5927\u5C0F(&N)
+SplitPaneDemo.invalid_min_size=\u65E0\u6548\u7684\u6700\u5C0F\u5927\u5C0F
+SplitPaneDemo.must_be_greater_than=\u5FC5\u987B\u5927\u4E8E
+
+
+### TabbedPane Demo ###
+
+TabbedPaneDemo.accessible_description=\u6B64\u6F14\u793A\u663E\u793A\u4E86\u4F7F\u7528 JTabbedPane \u7EC4\u4EF6\u7684\u793A\u4F8B\u3002
+TabbedPaneDemo.tooltip=JTabbedPane \u6F14\u793A
+TabbedPaneDemo.name=TabbedPane \u6F14\u793A
+
+TabbedPaneDemo.bounce=<html><font color=blue><bold><center>\u5065\u5EB7\u6D3B\u6CFC\u7684\u5A74\u513F!</center></bold></font></html>
+TabbedPaneDemo.stephen=Stephen
+TabbedPaneDemo.david=David
+TabbedPaneDemo.matthew=Matthew
+TabbedPaneDemo.ewan=Ewan
+TabbedPaneDemo.blake=Blake
+TabbedPaneDemo.brooke=Brooke
+TabbedPaneDemo.laine=Laine
+TabbedPaneDemo.hania=Hania
+
+TabbedPaneDemo.label=\u5236\u8868\u7B26\u4F4D\u7F6E:
+TabbedPaneDemo.top=\u9876\u90E8
+TabbedPaneDemo.bottom=\u5E95\u90E8
+TabbedPaneDemo.left=\u5DE6\u4FA7
+TabbedPaneDemo.right=\u53F3\u4FA7
+
+
+### Table Demo ###
+
+TableDemo.accessible_description=JTable \u6F14\u793A
+TableDemo.name=Table \u6F14\u793A
+TableDemo.tooltip=JTable \u6F14\u793A
+TableDemo.all_columns=\u6240\u6709\u5217
+TableDemo.autoresize_mode=\u81EA\u52A8\u8C03\u6574\u5927\u5C0F\u6A21\u5F0F
+TableDemo.cell_selection=\u5355\u5143\u9009\u62E9
+TableDemo.column_boundaries=\u5217\u8FB9\u754C
+TableDemo.column_selection=\u5217\u9009\u62E9
+TableDemo.horz_lines=\u6C34\u5E73\u7EBF
+TableDemo.intercell_spacing=\u5355\u5143\u95F4\u8DDD
+TableDemo.intercell_spacing_colon=\u5355\u5143\u95F4\u8DDD:
+TableDemo.last_column=\u6700\u540E\u4E00\u5217
+TableDemo.multiple_ranges=\u591A\u4E2A\u533A\u57DF
+TableDemo.one_range=\u4E00\u4E2A\u533A\u57DF
+TableDemo.reordering_allowed=\u5141\u8BB8\u91CD\u6392
+TableDemo.row_height=\u884C\u9AD8
+TableDemo.row_height_colon=\u884C\u9AD8:
+TableDemo.row_selection=\u884C\u9009\u62E9
+TableDemo.selection_mode=\u9009\u62E9\u6A21\u5F0F
+TableDemo.subsequent_columns=\u540E\u7EED\u5217
+TableDemo.vert_lines=\u5782\u76F4\u7EBF
+TableDemo.single=\u5355\u4E00
+TableDemo.none=\u65E0
+TableDemo.off=\u5173
+TableDemo.first_name=\u540D
+TableDemo.last_name=\u59D3
+TableDemo.favorite_color=\u559C\u7231\u7684\u989C\u8272
+TableDemo.favorite_food=\u559C\u7231\u7684\u98DF\u54C1
+TableDemo.favorite_movie=\u559C\u7231\u7684\u7535\u5F71
+TableDemo.favorite_number=\u559C\u7231\u7684\u6570\u5B57
+TableDemo.aqua=\u6C34\u7EFF
+TableDemo.beige=\u6DE1\u68D5
+TableDemo.black=\u9ED1\u8272
+TableDemo.blue=\u84DD\u8272
+TableDemo.cybergreen=\u4EBA\u5DE5\u7EFF
+TableDemo.darkgreen=\u58A8\u7EFF
+TableDemo.eblue=\u7535\u5668\u84DD
+TableDemo.jfcblue=JFC \u57FA\u672C
+TableDemo.jfcblue2=JFC \u8F85\u52A9
+TableDemo.forestgreen=\u68EE\u6797\u7EFF
+TableDemo.gray=\u7070\u8272
+TableDemo.green=\u7EFF\u8272
+TableDemo.orange=\u6A59\u8272
+TableDemo.purple=\u7D2B\u8272
+TableDemo.red=\u7EA2\u8272
+TableDemo.rustred=\u9508\u7EA2
+TableDemo.sunpurple=\u592A\u9633\u7D2B
+TableDemo.suspectpink=\u7591\u60D1\u7C89\u7EA2
+TableDemo.turquoise=\u9752\u7EFF\u8272
+TableDemo.violet=\u7D2B\u7F57\u5170\u8272
+TableDemo.yellow=\u9EC4\u8272
+TableDemo.2001=2001 \u592A\u7A7A\u6F2B\u6E38
+TableDemo.buckaroo=\u5929\u751F\u7231\u795E
+TableDemo.firstsight=\u771F\u60C5\u96BE\u820D
+TableDemo.airplane=\u7A7A\u524D\u7EDD\u540E\u6EE1\u5929\u98DE (\u5168\u7CFB\u5217)
+TableDemo.aliens=\u5F02\u5F62
+TableDemo.bicycle=\u5077\u81EA\u884C\u8F66\u7684\u4EBA
+TableDemo.bladerunner=\u94F6\u7FFC\u6740\u624B (\u526A\u8F91)
+TableDemo.bluesbros=\u798F\u7984\u53CC\u9738\u5929
+TableDemo.brazil=\u5DF4\u897F
+TableDemo.bugs=\u866B\u866B\u7279\u653B\u961F
+TableDemo.city=\u7AE5\u68A6\u5931\u9B42\u591C
+TableDemo.chusingura=\u6700\u540E\u7684\u5FE0\u81E3\u85CF (1962)
+TableDemo.clock=\u53D1\u6761\u6A59
+TableDemo.curse=\u9B54\u9B3C\u7684\u8BC5\u5492
+TableDemo.dasboot=\u4ECE\u6D77\u5E95\u51FA\u51FB
+TableDemo.dazed=\u5E74\u5C11\u8F7B\u72C2
+TableDemo.defending=\u9634\u9633\u754C\u751F\u6B7B\u604B
+TableDemo.eraserhead=\u6A61\u76AE\u5934
+TableDemo.fifthelement=\u7B2C\u4E94\u5143\u7D20
+TableDemo.goodfellas=\u597D\u5BB6\u4F19
+TableDemo.harold=\u54C8\u6D1B\u4E0E\u6155\u5FB7
+TableDemo.joyluck=\u559C\u798F\u4F1A
+TableDemo.jules=\u7956\u4E0E\u5360
+TableDemo.ladyvanishes=\u8D35\u5987\u5931\u8E2A\u6848
+TableDemo.mohicans=\u6700\u540E\u7684\u6469\u6839\u6218\u58EB
+TableDemo.lonestar=\u5C0F\u9547\u7591\u4E91
+TableDemo.man=\u64D2\u51F6\u8BB0
+TableDemo.musicman=\u6B22\u4E50\u97F3\u4E50\u5999\u65E0\u7A77
+TableDemo.dog=\u72D7\u8138\u7684\u5C81\u6708
+TableDemo.oncewest=\u897F\u90E8\u5F80\u4E8B
+TableDemo.pulpfiction=\u4F4E\u4FD7\u5C0F\u8BF4
+TableDemo.raiders=\u593A\u5B9D\u5947\u5175
+TableDemo.reservoir=\u843D\u6C34\u72D7
+TableDemo.repoman=\u91CD\u751F\u7537\u4EBA
+TableDemo.spinaltap=\u6447\u6EDA\u4E07\u4E07\u5C81
+TableDemo.schindlerslist=\u8F9B\u5FB7\u52D2\u540D\u5355
+TableDemo.starwars=\u661F\u7403\u5927\u6218
+TableDemo.stuntman=\u7279\u6280\u66FF\u8EAB
+TableDemo.thinman=\u7626\u5B50
+TableDemo.withnail=\u6211\u4E0E\u957F\u6307\u7532
+TableDemo.labyrinth=\u9B54\u738B\u8FF7\u5BAB
+TableDemo.shawshank=\u8096\u7533\u514B\u7684\u6551\u8D4E
+TableDemo.apple=\u82F9\u679C
+TableDemo.asparagus=\u82A6\u7B0B
+TableDemo.banana=\u9999\u8549
+TableDemo.broccoli=\u7518\u84DD
+TableDemo.carrot=\u80E1\u841D\u535C
+TableDemo.cantaloupe=\u9999\u74DC
+TableDemo.corn=\u7389\u7C73
+TableDemo.grapes=\u8461\u8404
+TableDemo.grapefruit=\u67DA\u5B50
+TableDemo.kiwi=\u5947\u5F02\u679C
+TableDemo.onion=\u6D0B\u8471
+TableDemo.pear=\u68A8
+TableDemo.peach=\u6843\u5B50
+TableDemo.pepper=\u8FA3\u6912
+TableDemo.pickle=\u6CE1\u83DC
+TableDemo.pineapple=\u83E0\u841D
+TableDemo.raspberry=\u8986\u76C6\u5B50
+TableDemo.sparegrass=\u7FBD\u72B6\u79BE\u8349
+TableDemo.strawberry=\u8349\u8393
+TableDemo.tomato=\u756A\u8304
+TableDemo.watermelon=\u897F\u74DC
+
+TableDemo.printing=\u6253\u5370
+TableDemo.fitWidth=\u9002\u5408\u5BBD\u5EA6
+TableDemo.print=\u6253\u5370
+TableDemo.header=\u9875\u7709
+
+# This string will be formatted by a MessageFormat and
+# printed at the top of each page of the printed result.
+# You can use {0} to insert a page number.
+TableDemo.headerText=JTable \u6253\u5370
+
+TableDemo.footer=\u9875\u811A
+
+# This string will be formatted by a MessageFormat and
+# printed at the bottom of each page of the printed result.
+# You can use {0} to insert a page number.
+TableDemo.footerText=\u7B2C {0} \u9875
+
+TableDemo.printingResult=\u6253\u5370\u7ED3\u679C
+TableDemo.printingComplete=\u6253\u5370\u5B8C\u6210
+TableDemo.printingCancelled=\u6253\u5370\u5DF2\u53D6\u6D88
+
+# This string will be formatted by a MessageFormat and
+# and displayed when an exception occurs.
+# {0} is used to place details of the exception.
+TableDemo.printingFailed=\u6253\u5370\u5931\u8D25: {0}
+
+
+### ToolTip Demo ###
+
+ToolTipDemo.accessible_description=\u5DE5\u5177\u63D0\u793A\u4E2D\u663E\u793A\u7EC4\u4EF6\u7684\u7B80\u77ED\u5E2E\u52A9\u8BF4\u660E
+ToolTipDemo.accessible_cow=\u8FD9\u662F\u5976\u725B\u3002
+ToolTipDemo.tooltip=\u5DE5\u5177\u63D0\u793A\u6F14\u793A
+ToolTipDemo.name=\u5DE5\u5177\u63D0\u793A\u6F14\u793A
+ToolTipDemo.bessie=\u5976\u725B Bessie
+ToolTipDemo.cow=\u5976\u725B\u3002
+ToolTipDemo.got_milk=\u5F97\u5230\u5976\u4E86\u5417?
+ToolTipDemo.tail=\u5C3E\u5DF4\u3002
+ToolTipDemo.moo=\u54DE
+ToolTipDemo.tooltip_features=<html>\u5982\u679C\u60A8\u4EE5\u524D\u8BA4\u4E3A\u5DE5\u5177\u6307\u793A\u662F<p>\u975E\u5E38\u4E4F\u5473\u7684\u5355\u884C\u8BF4\u660E, \u90A3\u4E48 <font color=blue size=+2>Swing!</font> \u5C0F\u7EC4<p>\u4F1A\u8BA9\u60A8\u5BF9\u5DE5\u5177\u63D0\u793A\u6709\u4E00\u79CD\u5168\u65B0\u7684\u8BA4\u8BC6\u3002<p>\u5728 Swing \u4E2D, \u53EF\u4EE5\u4F7F\u7528 HTML \u6765\u5B9E\u73B0:<ul><li>\u5217\u8868\u5F62\u5F0F<li><b>\u7C97\u4F53</b>\u6587\u672C<li><em>\u5F3A\u8C03\u6027</em>\u6587\u672C<li><font color=red>\u5F69\u8272</font>\u6587\u672C<li>\u4E0D\u540C<font size=+3>\u5B57\u53F7</font>\u7684\u6587\u672C<li>\u4EE5\u53CA\u4E0D\u540C\u7684<font face=AvantGarde>\u5B57\u4F53</font></ul>\u5BF9\u4E86, \u8FD9\u4E9B\u6587\u672C\u4E5F\u53EF\u4EE5\u662F\u591A\u884C\u6587\u672C\u3002</html>
+
+
+### Tree Demo ###
+
+TreeDemo.accessible_description=\u6B64\u6F14\u793A\u663E\u793A\u4E86\u4F7F\u7528 JTree \u7EC4\u4EF6\u7684\u793A\u4F8B\u3002
+TreeDemo.tooltip=JTree \u6F14\u793A
+TreeDemo.name=\u6811\u6F14\u793A
+TreeDemo.music=\u97F3\u4E50
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/demo/share/jfc/SwingSet2/resources/title.html	Fri Apr 06 03:53:28 2018 +0200
@@ -0,0 +1,37 @@
+<html>
+<head>
+<title>Untitled Document</title>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+</head>
+
+<body bgcolor="#FFFFFF">
+<h1 align="center"><font size="+1"><b><font size="+4" color="#990033"><br>
+  MICROGRAPHIA:</font><font size="+4"> </font></b></font></h1>
+<p align="center"><b>OR SOME </b></p>
+<p align="center"><font size="5">Physiological Descriptions </font></p>
+<p align="center"><b>O F</b></p>
+<p align="center"> <font size="6"><b><font color="#9F1040">MINUTE BODIES</font></b></font></p>
+<p align="center"> <b>MADE BY </b></p>
+<p align="center"><font size="5" color="#9F1040">MAGNIFYING GLASSES. </font></p>
+<p align="center"><b>WITH </b></p>
+<p align="center"><b><font color="#990033">OBSERVATIONS</font></b> and <b><font color="#9F1040">INQUIRIES</font></b> 
+  thereupon.</p>
+<p align="center"> By <font color="#990033"><i><b>R. HOOKE</b></i></font><b><i> 
+  ,</i></b> Fellow of the <font color="#990033">ROYAL SOCIETY</font> .</p>
+<p align="center"><img src="images/Octavo/crest.jpg" width="320" height="342"></p>
+<blockquote> 
+  <blockquote> 
+    <blockquote> 
+      <p align="center"><i>LONDON</i>, Printed by <font color="#990033"><i>Jo. 
+        Martyn</i>,</font> and <font color="#990033"><i>Ja. Allestry,</i></font> 
+        Printers to the <font color="#990033">ROYAL SOCIETY </font>, and are to 
+        be sold at their Shop at the Bell in S. Paul's Church-yard. <font color="#990000">M 
+        D C L X V.</font></p>
+      <p align="center"><font color="#990000"><br>
+        </font></p>
+    </blockquote>
+    <p><a href="index.html"><img src="images/htmldemo/back.jpg" width="146" height="40" align="left" border="0"></a><a href="king.html"><img src="images/htmldemo/forward.jpg" width="196" height="40" align="right" border="0"></a></p>
+  </blockquote>
+</blockquote>
+</body>
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/demo/share/jfc/SwingSet2/resources/tree.txt	Fri Apr 06 03:53:28 2018 +0200
@@ -0,0 +1,628 @@
+################################################################################
+# Note: do not add blank lines, the data parser in TreeDemo.java cannot        #
+# handle them.                                                                 #
+#                                                                              #
+# Key:                                                                         #
+#     Popular   / Classical                                                    #
+# ----------------------------                                                 #
+# A = Artist    / Composer                                                     #
+# R = Record    / Style                                                        #
+# S = Song Name / Composition                                                  #
+# C = Catagory                                                                 #
+#                                                                              #
+################################################################################
+C Classical
+A Beethoven
+R concertos
+S No. 1 - C
+S No. 2 - B-Flat Major
+S No. 3 - C Minor
+S No. 4 - G Major
+S No. 5 - E-Flat Major
+R Quartets
+S Six String Quartets
+S Three String Quartets
+S Grosse Fugue for String Quartets
+R Sonatas
+S Sonata in A Minor
+S Sonata in F Major
+R Symphonies
+S No. 1 - C Major
+S No. 2 - D Major
+S No. 3 - E-Flat Major
+S No. 4 - B-Flat Major
+S No. 5 - C Minor
+S No. 6 - F Major
+S No. 7 - A Major
+S No. 8 - F Major
+S No. 9 - D Minor
+A Brahms
+R Concertos
+S Violin Concerto
+S Double Concerto - A Minor
+S Piano Concerto No. 1 - D Minor
+S Piano Concerto No. 2 - B-Flat Major
+R Quartets
+S Piano Quartet No. 1 - G Minor
+S Piano Quartet No. 2 - A Major
+S Piano Quartet No. 3 - C Minor
+S String Quartet No. 3 - B-Flat Minor
+R Sonatas
+S Two Sonatas for Clarinet - F Minor
+S Two Sonatas for Clarinet - E-Flat Major
+R Symphonies
+S No. 1 - C Minor
+S No. 2 - D Minor
+S No. 3 - F Major
+S No. 4 - E Minor
+A Mozart
+R Concertos
+S Piano Concerto No. 12
+S Piano Concerto No. 17
+S Clarinet Concerto
+S Violin Concerto No. 5
+S Violin Concerto No. 4
+C Jazz
+A Albert Ayler
+R My Name is Albert Ayler
+S Bye Bye Blackbird
+S Billie's Bounce
+S Summertime
+S On Green Dolphin Street
+S C.T.
+R Swing Low Sweet Spiritual
+S Goin' Home
+S Old Man River
+S When The Saints Go Marching In
+S Deep River
+S Down By The Riverside
+S Spirits
+S Witches and Devils
+S Holy, Holy
+S Saints
+R Prophesy
+S Spirits
+S Wizard
+S Ghosts
+S Prophecy
+R New Grass
+S Free At Last
+S Everybody's Movin'
+S New Generation
+S Heart Love
+S Sun Watcher
+A Chet Baker
+R Sings and Plays
+S Let's Get Lost
+S This Is Always
+S Long Ago and Far Away
+S I Wish I Knew
+S Daybreak
+S Grey December
+S I Remember You
+R My Funny Valentine
+S My Funny Valentine
+S Someone To Watch Over Me
+S Moonlight Becomes You
+S I'm Glad There is You
+S This is Always
+S Time After Time
+S Sweet Lorraine
+S It's Always You
+S Moon Love
+S Like Someone In Love
+S I've Never Been In Love Before
+S Isn't it Romantic
+S I Fall In Love Too Easily
+R Grey December
+S Grey December
+S I Wish I Knew
+S Someone To Watch Over Me
+S Headline
+S Bockhanal
+S A Dandy Line
+S Pro Defunctus
+S Little Old Lady
+S Goodbye
+R The Route
+S Tynan Time
+S The Route
+S Minor Yours
+S Little Girl
+S Ol' Croix
+S The Great Lie
+S Sweet Lorrain
+S If I Should Lose You
+A John Coltrane
+R Blue Train
+S Blue Train
+S Moment's Notice
+S Locomotion
+S I'm Old Fashioned
+S Lazy Bird
+R Giant Steps
+S Giant Steps
+S Cousin Mary Steps
+S Countdown
+S Spiral
+S Syeeda's Song Flute
+S Naima
+S Mr. P.C.
+R My Favorite Things
+S My Favorite Things
+S Everytime We Say Goodbye
+S Summertime
+S But Not For Me
+R Crescent
+S Crescent
+S Wise One
+S Bessie's Blues
+S Lonnie's Lament
+S The Drum Thing
+R Interstellar Space
+S Mars
+S Leo
+S Venus
+S Jupiter Variation
+S Jupiter
+S Saturn
+A Miles Davis
+R Transition
+S Autumn Leaves
+S Two Bass Hit
+S Love, I've Found You
+S I Thought About You
+S All Blues
+S Seven Steps To Heaven
+R Quiet Nights
+S Once Upon a Summertime
+S Aos Pes Da Cruz
+S Wait Till You See Her
+S Corcovado
+S Summer Nights
+R My Funny Valentine
+S All of You
+S Stella By Starlight
+S All Blues
+S I Thought About You
+R Voodoo Down
+S Automn Leaves
+S Footprints
+S Directions
+S Bitches Brew
+S Hush
+C Rock
+A The Beatles
+R A Hard Day's Night
+S A Hard Day's Night
+S I Should Have Known Better 
+S If I Fell 
+S I'm Happy Just To Dance With You 
+S And I Love Her 
+S Tell Me Why 
+S Can't Buy Me Love 
+S Any Time At All 
+S I'll Cry Instead 
+S Things We Said Today 
+S When I Get Home 
+S You Can't Do That 
+R Beatles For Sale
+S No Reply 
+S I'm a Loser 
+S Baby's In Black 
+S Rock And Roll Music 
+S I'll Follow the Sun 
+S Mr. Moonlight 
+S Kansas City/Hey Hey Hey Hey 
+S Eight Days a Week 
+S Words Of Love 
+S Honey Don't 
+S Every Little Thing 
+S I Don't Want To Spoil the Party 
+S What You're Doing 
+S Everybody's Trying To Be My Baby 
+R Help!
+S Help! 
+S The Night Before 
+S You've Got To Hide Your Love Away 
+S I Need You 
+S Another Girl 
+S You're Going To Lose That Girl 
+S Ticket To Ride 
+S Act Naturally 
+S It's Only Love 
+S You Like Me Too Much 
+S Tell Me What You See 
+S I've Just Seen a Face 
+S Yesterday 
+S Dizzy Miss Lizzie 
+R Rubber Soul
+S Drive My Car 
+S Norwegian Wood
+S You Won't See Me
+S Nowhere Man
+S Think For Yourself
+S The Word
+S Michelle
+S What Goes On?
+S Girl 
+S I'm Looking Through You 
+S In My Life 
+S Wait 
+S If I Needed Someone 
+S Run For Your Life 
+R Revolver
+S Taxman 
+S Rigby 
+S I'm Only Sleeping 
+S For You To 
+S Here There And Everywhere 
+S Yellow Submarine
+S She Said She Said 
+S Good Day Sunshine 
+S And Your Bird Can Sing 
+S For No One 
+S Doctor Robert 
+S I Want To Tell You 
+S Got To Get You Into My Life 
+S Tomorrow Never Knows 
+R Sgt. Pepper's Lonely Hearts Club Band
+S Sgt. Pepper's Lonely Hearts Club Band
+S With a Little Help From My Friends
+S Lucy in the Sky With Diamonds
+S Getting Better
+S Fixing a Hole
+S She's Leaving Home
+S Being For the Benefit of Mr. Kite
+S Within You Without You
+S When I'm Sixty Four
+S Lovely Rita
+S Good Morning
+S Sgt. Pepper's Reprise
+S A Day In The Life
+R Magical Mystery Tour
+S Magical Mystery Tour
+S Fool on the Hill
+S Flying
+S Blue Jay Way
+S Your Mother Should Know
+S I Am The Walrus
+S Hello Goodbye
+S Strawberry Fields Forever
+S Penny Lane
+S Baby You're a Rich Man
+S All You Need Is Love
+R The White Album
+S Back in the USSR
+S Dear Prudence
+S Glass Onion
+S Wild Honey Pie
+S Bungalow Bill
+S While My Guitar Gently Weeps
+S Martha My Dear
+S I'm So Tired
+S Blackbird
+S Piggies
+S Rocky Raccoon
+S Don't Pass Me By
+S Why Don't We Do It In The Road
+S I Will
+S Julia
+S Birthday
+S Yer Blues
+S Mother Nature's Son
+S Sexy Sadie
+S Helter Skelter
+S Long Long Long
+S Revolution 1
+S Honey Pie
+S Savoy Truffle
+S Cry Baby Cry
+S Revolution 9
+S Good Night
+R Abbey Road
+S Come Together
+S Something
+S Maxwell's Silver Hammer
+S Octopus's Garden
+S She's So Heavy
+S Here Comes The Sun
+S Because
+S You Never Give Me Your Money
+S Sun King
+S Mean Mr. Mustard
+S Polythene Pam
+S She Came In Through The Bathroom Window
+S Golden Slumbers
+S Carry That Weight
+S The End
+S Her Majesty
+R Let It Be
+S Two of Us
+S Dig A Pony
+S Across the Universe
+S I Me Mine
+S Dig It
+S Let It Be
+S Maggie Mae
+S I've Got A Feeling
+S One After 909
+S The Long and Winding Road
+S For You Blue
+S Get Back
+A Crowded House
+R Crowded House
+S Mean To Me
+S World Where You Live
+S Now We're Getting Somewhere
+S Don't Dream It's Over
+S Love You Til The Day I Die
+S Something So Strong
+S Hole In The River
+S Can't Carry On
+S I Walk Away
+S Tombstone
+S That's What I Call Live
+R Temple of Low Men
+S I Feel Possessed
+S Kill Eye
+S Into Temptation
+S Mansion In The Slums
+S When You Come
+S Never Be The Same
+S Love This Life
+S Sister Madly
+S In The Lowlands
+S Better Be Home Soon
+R Woodface
+S Chocolate Cake
+S It's Only Natural
+S Fall At Your Feet
+S Tall Trees
+S Weather With You
+S Whispers and Moans
+S Four Seasons in One Day
+S There Goes God
+S Fame Is
+S All I Ask
+S As Sure As I Am
+S Italian Plastic
+S She Goes On
+S How Will You Go
+R Together Alone
+S Kare Kare
+S In My Command
+S Nails In My Feet
+S Black & White Boy
+S Fingers of Love
+S Pineapple Head
+S Locked Out
+S Private Universe
+S Walking on the Spot
+S Distant Sun
+S Catherine Wheels
+S Skin Feeling
+S Together Alone
+A The Fixx
+R Shuttered Room
+S Some People
+S Stand or Fall
+S Cameras In Paris
+S Shuttered Room
+S The Fool
+S Lost Planes
+S I Live
+S Sinking Island
+S Time in a Glass
+S Red Skies
+R Reach The Beach
+S One Thing Leads To Another
+S The Sign of Fire
+S Running
+S Saved By Zero
+S Opinions
+S Reach The Beach
+S Changing
+S Liner
+S Privilege
+S Outside
+R Phantoms
+S Lose Face
+S Less Cities, More Moving People
+S Sunshine in the Shade
+S Woman on a Train
+S Wish
+S Lost in Battle Overseas
+S Question
+S In Suspense
+S Facing the Wind
+S Are We Ourselves
+S I Will
+S Phantom Living
+R Walkabout
+S Secret Separation
+S Built for the Future
+S Treasure It
+S Can't Finish
+S Walkabout
+S One Look Up
+S Read Between The Lines
+S Sense The Adventure
+S Camphor
+S Peace On Earth/Do What You Can
+R Calm Animals
+S I'm Life
+S Driven Out
+S Subterranean
+S Precious Stone
+S Gypsy Feet
+S Calm Animals
+S Shred of Evidence
+S The Flow
+S World Weary
+S Caused To Be Alarmed
+R Ink
+S All is Fair
+S How much Is Enough
+S No One Has To Cry
+S Crucified
+S Falling In Love
+S Shut It Out
+S Still Around
+S All The Best Things
+S Yesterday, Today
+S One Jungle
+S Climb The Hill
+S Make No Plans
+R Elemental
+S Two Different Views
+S Going Without
+S Is That It?
+S Happy Landings
+S Silent House
+S Fatal Shore
+S Ocean Blue
+S You Know Me
+S We Once Held Hands
+S Life's What's Killing Me
+A Harvin Garvel
+R Harvin Garvel I
+S Body
+S What You Said
+S All Rights Reserved
+S High Purity
+S Lies
+S Get Real
+S Gradma Cries
+S First Feel
+S Somethings wrong
+S Shoes
+S Spice Rack
+S Dark Feel
+S Tug of War
+S Ant Song
+R Harvin Garvel II
+S We Ain't Through
+S Trash and Spend
+S Kick
+S The Garden
+S One & Only
+S Squid Frenzy
+S Soul In Soul
+S The Desert
+S He Grew Up
+S Talk
+S Image
+S Tomorrow
+S R70
+R Full Grown Dog
+S I Am
+S Say
+S Is This Real
+S What She Said
+S Mirror Lies
+S Girls
+S Your Will
+S Slow Motion Sunday
+S Simple Life
+S The Road Song
+S The Same Way
+S Stop Tryin
+R Persia
+S Exonic
+S Drift
+S Cruise
+S MugWump
+S Smear
+S Everything
+S Keep
+S Circle
+R Sensative Beak
+S Whatcha Gotta Do
+S Somewhere In This World
+S Awaken
+S Just A Dog
+S I Can Dance
+S Tomorrow
+S Love Who?
+S Is There Something
+S I Like It
+S Easy Chair
+S As We Are One
+S Far Away
+S Leaving Science
+S What A Life
+A Komeda
+R Plan 714 Till
+S Fuego De La Vida 
+S Herbamore 
+S Som I Fjol 
+S En Spricka I Taket
+R Genius Of
+S More Is More 
+S Fire 
+S Rocket Plane (Music On The Moon) 
+S Boogie Woogie/Rock 'N' Roll 
+S Disko 
+S Top Star 
+S Light O' My Life 
+S If 
+S Frolic 
+S In Orbit 
+S Arbogast 
+S New New No
+R What Makes It Go
+S Binario 
+S It's Alright, Baby 
+S Curious 
+S Cul de Sac 
+S Living Things 
+S Flabbergast 
+S Campfire 
+S Happyment 
+S Our Hospitality 
+S Focus 
+S A Simple Formality 
+A Steve Miller Band
+R Circle Of Love
+S Heart Like A Wheel
+S Get On Home
+S Baby Wanna Dance
+S Circle Of Love
+S Macho City
+R Fly Like An Eagle
+S Space Intro
+S Fly Like An Eagle
+S Wild Mountain Honey
+S Serenade
+S Dance, Dance, Dance
+S Mercury Blues
+S Take the Money and Run
+S Rockin' Me
+S You Send Me
+S Blue Odyssey
+S Sweet Maree
+S The Window
+R Book Of Dreams
+S Threshold
+S Jet Airliner
+S Winter Time
+S Swingtown
+S True Fine Love
+S Wish Upon A Star
+S Jungle Love
+S Electrolux Imbroglio
+S Sacrifice
+S The Stake
+S My Own Space
+S Babes In The Wood
+R Joker
+S Sugar, Babe
+S Mary Lou
+S Shu Ba Da Du Ma
+S Your Cash Ain't Nothin' But Trash
+S The Joker
+S The Lovin' Cup
+S Come On In My Kitchen
+S Evil
+S Something To Believe In
--- a/src/java.base/aix/native/libjsig/jsig.c	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/aix/native/libjsig/jsig.c	Fri Apr 06 03:53:28 2018 +0200
@@ -37,6 +37,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <stdint.h>
+#include "jni.h"
 
 #define bool int
 #define true 1
@@ -140,11 +141,13 @@
   }
 }
 
-sa_handler_t signal(int sig, sa_handler_t disp) {
+JNIEXPORT sa_handler_t JNICALL
+signal(int sig, sa_handler_t disp) {
   return set_signal(sig, disp, false);
 }
 
-sa_handler_t sigset(int sig, sa_handler_t disp) {
+JNIEXPORT sa_handler_t JNICALL
+sigset(int sig, sa_handler_t disp) {
   return set_signal(sig, disp, true);
 }
 
@@ -161,7 +164,8 @@
   return (*os_sigaction)(sig, act, oact);
 }
 
-int sigaction(int sig, const struct sigaction *act, struct sigaction *oact) {
+JNIEXPORT int JNICALL
+sigaction(int sig, const struct sigaction *act, struct sigaction *oact) {
   int res;
   bool sigused;
   struct sigaction oldAct;
@@ -206,7 +210,8 @@
 }
 
 /* The three functions for the jvm to call into. */
-void JVM_begin_signal_setting() {
+JNIEXPORT void JNICALL
+JVM_begin_signal_setting() {
   signal_lock();
   sigemptyset(&jvmsigs);
   jvm_signal_installing = true;
@@ -214,7 +219,8 @@
   signal_unlock();
 }
 
-void JVM_end_signal_setting() {
+JNIEXPORT void JNICALL
+JVM_end_signal_setting() {
   signal_lock();
   jvm_signal_installed = true;
   jvm_signal_installing = false;
@@ -222,7 +228,8 @@
   signal_unlock();
 }
 
-struct sigaction *JVM_get_signal_action(int sig) {
+JNIEXPORT struct sigaction * JNICALL
+JVM_get_signal_action(int sig) {
   /* Does race condition make sense here? */
   if (sigismember(&jvmsigs, sig)) {
     return &sact[sig];
--- a/src/java.base/linux/classes/sun/nio/ch/EPollPort.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/linux/classes/sun/nio/ch/EPollPort.java	Fri Apr 06 03:53:28 2018 +0200
@@ -164,7 +164,7 @@
         if (nThreads == 0) {
             implClose();
         } else {
-            // send interrupt to each thread
+            // send wakeup to each thread
             while (nThreads-- > 0) {
                 wakeup();
             }
@@ -182,11 +182,11 @@
             throw new AssertionError();     // should not happen
     }
 
-    /*
+    /**
      * Task to process events from epoll and dispatch to the channel's
      * onEvent handler.
      *
-     * Events are retreived from epoll in batch and offered to a BlockingQueue
+     * Events are retrieved from epoll in batch and offered to a BlockingQueue
      * where they are consumed by handler threads. A special "NEED_TO_POLL"
      * event is used to signal one consumer to re-poll when all events have
      * been consumed.
@@ -200,7 +200,7 @@
                         n = EPoll.wait(epfd, address, MAX_EPOLL_EVENTS, -1);
                     } while (n == IOStatus.INTERRUPTED);
 
-                    /*
+                    /**
                      * 'n' events have been read. Here we map them to their
                      * corresponding channel in batch and queue n-1 so that
                      * they can be handled by other handler threads. The last
@@ -215,8 +215,13 @@
                             // wakeup
                             if (fd == sp[0]) {
                                 if (wakeupCount.decrementAndGet() == 0) {
-                                    // no more wakeups so drain pipe
-                                    IOUtil.drain(sp[0]);
+                                    // consume one wakeup byte, never more as this
+                                    // would interfere with shutdown when there is
+                                    // a wakeup byte queued to wake each thread
+                                    int nread;
+                                    do {
+                                        nread = IOUtil.drain1(sp[0]);
+                                    } while (nread == IOStatus.INTERRUPTED);
                                 }
 
                                 // queue special event if there are more events
--- a/src/java.base/linux/classes/sun/nio/ch/EPollSelectorImpl.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/linux/classes/sun/nio/ch/EPollSelectorImpl.java	Fri Apr 06 03:53:28 2018 +0200
@@ -27,15 +27,11 @@
 
 import java.io.IOException;
 import java.nio.channels.ClosedSelectorException;
-import java.nio.channels.SelectableChannel;
-import java.nio.channels.SelectionKey;
 import java.nio.channels.Selector;
 import java.nio.channels.spi.SelectorProvider;
 import java.util.ArrayDeque;
-import java.util.BitSet;
 import java.util.Deque;
 import java.util.HashMap;
-import java.util.Iterator;
 import java.util.Map;
 import java.util.concurrent.TimeUnit;
 
@@ -67,14 +63,11 @@
     // maps file descriptor to selection key, synchronize on selector
     private final Map<Integer, SelectionKeyImpl> fdToKey = new HashMap<>();
 
-    // file descriptors registered with epoll, synchronize on selector
-    private final BitSet registered = new BitSet();
-
-    // pending new registrations/updates, queued by implRegister and putEventOps
+    // pending new registrations/updates, queued by implRegister and putEventOpos
     private final Object updateLock = new Object();
     private final Deque<SelectionKeyImpl> newKeys = new ArrayDeque<>();
     private final Deque<SelectionKeyImpl> updateKeys = new ArrayDeque<>();
-    private final Deque<Integer> updateOps = new ArrayDeque<>();
+    private final Deque<Integer> updateEvents = new ArrayDeque<>();
 
     // interrupt triggering and clearing
     private final Object interruptLock = new Object();
@@ -113,15 +106,17 @@
     protected int doSelect(long timeout) throws IOException {
         assert Thread.holdsLock(this);
 
+        // epoll_wait timeout is int
+        int to = (int) Math.min(timeout, Integer.MAX_VALUE);
+        boolean blocking = (to != 0);
+        boolean timedPoll = (to > 0);
+
         int numEntries;
         processUpdateQueue();
         processDeregisterQueue();
         try {
-            begin();
+            begin(blocking);
 
-            // epoll_wait timeout is int
-            int to = (int) Math.min(timeout, Integer.MAX_VALUE);
-            boolean timedPoll = (to > 0);
             do {
                 long startTime = timedPoll ? System.nanoTime() : 0;
                 numEntries = EPoll.wait(epfd, pollArrayAddress, NUM_EPOLLEVENTS, to);
@@ -138,7 +133,7 @@
             assert IOStatus.check(numEntries);
 
         } finally {
-            end();
+            end(blocking);
         }
         processDeregisterQueue();
         return updateSelectedKeys(numEntries);
@@ -156,33 +151,34 @@
             // new registrations
             while ((ski = newKeys.pollFirst()) != null) {
                 if (ski.isValid()) {
-                    SelChImpl ch = ski.channel;
-                    int fd = ch.getFDVal();
+                    int fd = ski.channel.getFDVal();
                     SelectionKeyImpl previous = fdToKey.put(fd, ski);
                     assert previous == null;
-                    assert registered.get(fd) == false;
+                    assert ski.registeredEvents() == 0;
                 }
             }
 
             // changes to interest ops
-            assert updateKeys.size() == updateOps.size();
+            assert updateKeys.size() == updateEvents.size();
             while ((ski = updateKeys.pollFirst()) != null) {
-                int ops = updateOps.pollFirst();
+                int newEvents = updateEvents.pollFirst();
                 int fd = ski.channel.getFDVal();
                 if (ski.isValid() && fdToKey.containsKey(fd)) {
-                    if (registered.get(fd)) {
-                        if (ops == 0) {
+                    int registeredEvents = ski.registeredEvents();
+                    if (newEvents != registeredEvents) {
+                        if (newEvents == 0) {
                             // remove from epoll
                             EPoll.ctl(epfd, EPOLL_CTL_DEL, fd, 0);
-                            registered.clear(fd);
                         } else {
-                            // modify events
-                            EPoll.ctl(epfd, EPOLL_CTL_MOD, fd, ops);
+                            if (registeredEvents == 0) {
+                                // add to epoll
+                                EPoll.ctl(epfd, EPOLL_CTL_ADD, fd, newEvents);
+                            } else {
+                                // modify events
+                                EPoll.ctl(epfd, EPOLL_CTL_MOD, fd, newEvents);
+                            }
                         }
-                    } else if (ops != 0) {
-                        // add to epoll
-                        EPoll.ctl(epfd, EPOLL_CTL_ADD, fd, ops);
-                        registered.set(fd);
+                        ski.registeredEvents(newEvents);
                     }
                 }
             }
@@ -190,8 +186,9 @@
     }
 
     /**
-     * Update the keys whose fd's have been selected by the epoll.
-     * Add the ready keys to the ready queue.
+     * Update the keys of file descriptors that were polled and add them to
+     * the selected-key set.
+     * If the interrupt fd has been selected, drain it and clear the interrupt.
      */
     private int updateSelectedKeys(int numEntries) throws IOException {
         assert Thread.holdsLock(this);
@@ -233,7 +230,6 @@
     @Override
     protected void implClose() throws IOException {
         assert Thread.holdsLock(this);
-        assert Thread.holdsLock(nioKeys());
 
         // prevent further wakeup
         synchronized (interruptLock) {
@@ -245,59 +241,37 @@
 
         FileDispatcherImpl.closeIntFD(fd0);
         FileDispatcherImpl.closeIntFD(fd1);
-
-        // Deregister channels
-        Iterator<SelectionKey> i = keys.iterator();
-        while (i.hasNext()) {
-            SelectionKeyImpl ski = (SelectionKeyImpl)i.next();
-            deregister(ski);
-            SelectableChannel selch = ski.channel();
-            if (!selch.isOpen() && !selch.isRegistered())
-                ((SelChImpl)selch).kill();
-            i.remove();
-        }
     }
 
     @Override
     protected void implRegister(SelectionKeyImpl ski) {
-        assert Thread.holdsLock(nioKeys());
         ensureOpen();
         synchronized (updateLock) {
             newKeys.addLast(ski);
         }
-        keys.add(ski);
     }
 
     @Override
     protected void implDereg(SelectionKeyImpl ski) throws IOException {
         assert !ski.isValid();
         assert Thread.holdsLock(this);
-        assert Thread.holdsLock(nioKeys());
-        assert Thread.holdsLock(nioSelectedKeys());
 
         int fd = ski.channel.getFDVal();
-        fdToKey.remove(fd);
-        if (registered.get(fd)) {
-            EPoll.ctl(epfd, EPOLL_CTL_DEL, fd, 0);
-            registered.clear(fd);
+        if (fdToKey.remove(fd) != null) {
+            if (ski.registeredEvents() != 0) {
+                EPoll.ctl(epfd, EPOLL_CTL_DEL, fd, 0);
+                ski.registeredEvents(0);
+            }
+        } else {
+            assert ski.registeredEvents() == 0;
         }
-
-        selectedKeys.remove(ski);
-        keys.remove(ski);
-
-        // remove from channel's key set
-        deregister(ski);
-
-        SelectableChannel selch = ski.channel();
-        if (!selch.isOpen() && !selch.isRegistered())
-            ((SelChImpl) selch).kill();
     }
 
     @Override
-    public void putEventOps(SelectionKeyImpl ski, int ops) {
+    public void putEventOps(SelectionKeyImpl ski, int events) {
         ensureOpen();
         synchronized (updateLock) {
-            updateOps.addLast(ops);   // ops first in case adding the key fails
+            updateEvents.addLast(events);  // events first in case adding key fails
             updateKeys.addLast(ski);
         }
     }
--- a/src/java.base/macosx/classes/sun/nio/ch/KQueuePort.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/macosx/classes/sun/nio/ch/KQueuePort.java	Fri Apr 06 03:53:28 2018 +0200
@@ -160,7 +160,7 @@
         if (nThreads == 0) {
             implClose();
         } else {
-            // send interrupt to each thread
+            // send wakeup to each thread
             while (nThreads-- > 0) {
                 wakeup();
             }
@@ -182,11 +182,11 @@
             throw new InternalError("kevent failed: " + err);  // should not happen
     }
 
-    /*
+    /**
      * Task to process events from kqueue and dispatch to the channel's
      * onEvent handler.
      *
-     * Events are retreived from kqueue in batch and offered to a BlockingQueue
+     * Events are retrieved from kqueue in batch and offered to a BlockingQueue
      * where they are consumed by handler threads. A special "NEED_TO_POLL"
      * event is used to signal one consumer to re-poll when all events have
      * been consumed.
@@ -200,7 +200,7 @@
                         n = KQueue.poll(kqfd, address, MAX_KEVENTS_TO_POLL, -1L);
                     } while (n == IOStatus.INTERRUPTED);
 
-                    /*
+                    /**
                      * 'n' events have been read. Here we map them to their
                      * corresponding channel in batch and queue n-1 so that
                      * they can be handled by other handler threads. The last
@@ -215,8 +215,13 @@
                             // wakeup
                             if (fd == sp[0]) {
                                 if (wakeupCount.decrementAndGet() == 0) {
-                                    // no more wakeups so drain pipe
-                                    IOUtil.drain(sp[0]);
+                                    // consume one wakeup byte, never more as this
+                                    // would interfere with shutdown when there is
+                                    // a wakeup byte queued to wake each thread
+                                    int nread;
+                                    do {
+                                        nread = IOUtil.drain1(sp[0]);
+                                    } while (nread == IOStatus.INTERRUPTED);
                                 }
 
                                 // queue special event if there are more events
--- a/src/java.base/macosx/classes/sun/nio/ch/KQueueSelectorImpl.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/macosx/classes/sun/nio/ch/KQueueSelectorImpl.java	Fri Apr 06 03:53:28 2018 +0200
@@ -27,15 +27,11 @@
 
 import java.io.IOException;
 import java.nio.channels.ClosedSelectorException;
-import java.nio.channels.SelectableChannel;
-import java.nio.channels.SelectionKey;
 import java.nio.channels.Selector;
 import java.nio.channels.spi.SelectorProvider;
 import java.util.ArrayDeque;
-import java.util.BitSet;
 import java.util.Deque;
 import java.util.HashMap;
-import java.util.Iterator;
 import java.util.Map;
 import java.util.concurrent.TimeUnit;
 
@@ -66,15 +62,11 @@
     // maps file descriptor to selection key, synchronize on selector
     private final Map<Integer, SelectionKeyImpl> fdToKey = new HashMap<>();
 
-    // file descriptors registered with kqueue, synchronize on selector
-    private final BitSet registeredReadFilter = new BitSet();
-    private final BitSet registeredWriteFilter = new BitSet();
-
     // pending new registrations/updates, queued by implRegister and putEventOps
     private final Object updateLock = new Object();
     private final Deque<SelectionKeyImpl> newKeys = new ArrayDeque<>();
     private final Deque<SelectionKeyImpl> updateKeys = new ArrayDeque<>();
-    private final Deque<Integer> updateOps = new ArrayDeque<>();
+    private final Deque<Integer> updateEvents = new ArrayDeque<>();
 
     // interrupt triggering and clearing
     private final Object interruptLock = new Object();
@@ -113,14 +105,16 @@
     protected int doSelect(long timeout) throws IOException {
         assert Thread.holdsLock(this);
 
+        long to = Math.min(timeout, Integer.MAX_VALUE);  // max kqueue timeout
+        boolean blocking = (to != 0);
+        boolean timedPoll = (to > 0);
+
         int numEntries;
         processUpdateQueue();
         processDeregisterQueue();
         try {
-            begin();
+            begin(blocking);
 
-            long to = Math.min(timeout, Integer.MAX_VALUE);  // max kqueue timeout
-            boolean timedPoll = (to > 0);
             do {
                 long startTime = timedPoll ? System.nanoTime() : 0;
                 numEntries = KQueue.poll(kqfd, pollArrayAddress, MAX_KEVENTS, to);
@@ -137,7 +131,7 @@
             assert IOStatus.check(numEntries);
 
         } finally {
-            end();
+            end(blocking);
         }
         processDeregisterQueue();
         return updateSelectedKeys(numEntries);
@@ -155,41 +149,41 @@
             // new registrations
             while ((ski = newKeys.pollFirst()) != null) {
                 if (ski.isValid()) {
-                    SelChImpl ch = ski.channel;
-                    int fd = ch.getFDVal();
+                    int fd = ski.channel.getFDVal();
                     SelectionKeyImpl previous = fdToKey.put(fd, ski);
                     assert previous == null;
-                    assert registeredReadFilter.get(fd) == false;
-                    assert registeredWriteFilter.get(fd) == false;
+                    assert ski.registeredEvents() == 0;
                 }
             }
 
             // changes to interest ops
-            assert updateKeys.size() == updateOps.size();
+            assert updateKeys.size() == updateKeys.size();
             while ((ski = updateKeys.pollFirst()) != null) {
-                int ops = updateOps.pollFirst();
+                int newEvents = updateEvents.pollFirst();
                 int fd = ski.channel.getFDVal();
                 if (ski.isValid() && fdToKey.containsKey(fd)) {
-                    // add or delete interest in read events
-                    if (registeredReadFilter.get(fd)) {
-                        if ((ops & Net.POLLIN) == 0) {
-                            KQueue.register(kqfd, fd, EVFILT_READ, EV_DELETE);
-                            registeredReadFilter.clear(fd);
+                    int registeredEvents = ski.registeredEvents();
+                    if (newEvents != registeredEvents) {
+
+                        // add or delete interest in read events
+                        if ((registeredEvents & Net.POLLIN) != 0) {
+                            if ((newEvents & Net.POLLIN) == 0) {
+                                KQueue.register(kqfd, fd, EVFILT_READ, EV_DELETE);
+                            }
+                        } else if ((newEvents & Net.POLLIN) != 0) {
+                            KQueue.register(kqfd, fd, EVFILT_READ, EV_ADD);
                         }
-                    } else if ((ops & Net.POLLIN) != 0) {
-                        KQueue.register(kqfd, fd, EVFILT_READ, EV_ADD);
-                        registeredReadFilter.set(fd);
-                    }
 
-                    // add or delete interest in write events
-                    if (registeredWriteFilter.get(fd)) {
-                        if ((ops & Net.POLLOUT) == 0) {
-                            KQueue.register(kqfd, fd, EVFILT_WRITE, EV_DELETE);
-                            registeredWriteFilter.clear(fd);
+                        // add or delete interest in write events
+                        if ((registeredEvents & Net.POLLOUT) != 0) {
+                            if ((newEvents & Net.POLLOUT) == 0) {
+                                KQueue.register(kqfd, fd, EVFILT_WRITE, EV_DELETE);
+                            }
+                        } else if ((newEvents & Net.POLLOUT) != 0) {
+                            KQueue.register(kqfd, fd, EVFILT_WRITE, EV_ADD);
                         }
-                    } else if ((ops & Net.POLLOUT) != 0) {
-                        KQueue.register(kqfd, fd, EVFILT_WRITE, EV_ADD);
-                        registeredWriteFilter.set(fd);
+
+                        ski.registeredEvents(newEvents);
                     }
                 }
             }
@@ -197,8 +191,8 @@
     }
 
     /**
-     * Update the keys whose fd's have been selected by kqueue.
-     * Add the ready keys to the selected key set.
+     * Update the keys of file descriptors that were polled and add them to
+     * the selected-key set.
      * If the interrupt fd has been selected, drain it and clear the interrupt.
      */
     private int updateSelectedKeys(int numEntries) throws IOException {
@@ -265,7 +259,6 @@
     protected void implClose() throws IOException {
         assert !isOpen();
         assert Thread.holdsLock(this);
-        assert Thread.holdsLock(nioKeys());
 
         // prevent further wakeup
         synchronized (interruptLock) {
@@ -277,63 +270,41 @@
 
         FileDispatcherImpl.closeIntFD(fd0);
         FileDispatcherImpl.closeIntFD(fd1);
-
-        // Deregister channels
-        Iterator<SelectionKey> i = keys.iterator();
-        while (i.hasNext()) {
-            SelectionKeyImpl ski = (SelectionKeyImpl)i.next();
-            deregister(ski);
-            SelectableChannel selch = ski.channel();
-            if (!selch.isOpen() && !selch.isRegistered())
-                ((SelChImpl)selch).kill();
-            i.remove();
-        }
     }
 
     @Override
     protected void implRegister(SelectionKeyImpl ski) {
-        assert Thread.holdsLock(nioKeys());
         ensureOpen();
         synchronized (updateLock) {
             newKeys.addLast(ski);
         }
-        keys.add(ski);
     }
 
     @Override
     protected void implDereg(SelectionKeyImpl ski) throws IOException {
         assert !ski.isValid();
         assert Thread.holdsLock(this);
-        assert Thread.holdsLock(nioKeys());
-        assert Thread.holdsLock(nioSelectedKeys());
 
         int fd = ski.channel.getFDVal();
-        fdToKey.remove(fd);
-        if (registeredReadFilter.get(fd)) {
-            KQueue.register(kqfd, fd, EVFILT_READ, EV_DELETE);
-            registeredReadFilter.clear(fd);
-        }
-        if (registeredWriteFilter.get(fd)) {
-            KQueue.register(kqfd, fd, EVFILT_WRITE, EV_DELETE);
-            registeredWriteFilter.clear(fd);
+        int registeredEvents = ski.registeredEvents();
+        if (fdToKey.remove(fd) != null) {
+            if (registeredEvents != 0) {
+                if ((registeredEvents & Net.POLLIN) != 0)
+                    KQueue.register(kqfd, fd, EVFILT_READ, EV_DELETE);
+                if ((registeredEvents & Net.POLLOUT) != 0)
+                    KQueue.register(kqfd, fd, EVFILT_WRITE, EV_DELETE);
+                ski.registeredEvents(0);
+            }
+        } else {
+            assert registeredEvents == 0;
         }
-
-        selectedKeys.remove(ski);
-        keys.remove(ski);
-
-        // remove from channel's key set
-        deregister(ski);
-
-        SelectableChannel selch = ski.channel();
-        if (!selch.isOpen() && !selch.isRegistered())
-            ((SelChImpl) selch).kill();
     }
 
     @Override
-    public void putEventOps(SelectionKeyImpl ski, int ops) {
+    public void putEventOps(SelectionKeyImpl ski, int events) {
         ensureOpen();
         synchronized (updateLock) {
-            updateOps.addLast(ops);   // ops first in case adding the key fails
+            updateEvents.addLast(events);  // events first in case adding key fails
             updateKeys.addLast(ski);
         }
     }
--- a/src/java.base/share/classes/java/io/ByteArrayOutputStream.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/share/classes/java/io/ByteArrayOutputStream.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1994, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1994, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -57,7 +57,7 @@
     protected int count;
 
     /**
-     * Creates a new byte array output stream. The buffer capacity is
+     * Creates a new {@code ByteArrayOutputStream}. The buffer capacity is
      * initially 32 bytes, though its size increases if necessary.
      */
     public ByteArrayOutputStream() {
@@ -65,11 +65,11 @@
     }
 
     /**
-     * Creates a new byte array output stream, with a buffer capacity of
+     * Creates a new {@code ByteArrayOutputStream}, with a buffer capacity of
      * the specified size, in bytes.
      *
-     * @param   size   the initial size.
-     * @exception  IllegalArgumentException if size is negative.
+     * @param  size   the initial size.
+     * @throws IllegalArgumentException if size is negative.
      */
     public ByteArrayOutputStream(int size) {
         if (size < 0) {
@@ -84,7 +84,7 @@
      * at least the number of elements specified by the minimum
      * capacity argument.
      *
-     * @param minCapacity the desired minimum capacity
+     * @param  minCapacity the desired minimum capacity
      * @throws OutOfMemoryError if {@code minCapacity < 0}.  This is
      * interpreted as a request for the unsatisfiably large capacity
      * {@code (long) Integer.MAX_VALUE + (minCapacity - Integer.MAX_VALUE)}.
@@ -129,7 +129,7 @@
     }
 
     /**
-     * Writes the specified byte to this byte array output stream.
+     * Writes the specified byte to this {@code ByteArrayOutputStream}.
      *
      * @param   b   the byte to be written.
      */
@@ -141,11 +141,15 @@
 
     /**
      * Writes {@code len} bytes from the specified byte array
-     * starting at offset {@code off} to this byte array output stream.
+     * starting at offset {@code off} to this {@code ByteArrayOutputStream}.
      *
      * @param   b     the data.
      * @param   off   the start offset in the data.
      * @param   len   the number of bytes to write.
+     * @throws  NullPointerException if {@code b} is {@code null}.
+     * @throws  IndexOutOfBoundsException if {@code off} is negative,
+     * {@code len} is negative, or {@code len} is greater than
+     * {@code b.length - off}
      */
     public synchronized void write(byte b[], int off, int len) {
         Objects.checkFromIndexSize(off, len, b.length);
@@ -155,20 +159,37 @@
     }
 
     /**
-     * Writes the complete contents of this byte array output stream to
+     * Writes the complete contents of the specified byte array
+     * to this {@code ByteArrayOutputStream}.
+     *
+     * @apiNote
+     * This method is equivalent to {@link #write(byte[],int,int)
+     * write(b, 0, b.length)}.
+     *
+     * @param   b     the data.
+     * @throws  NullPointerException if {@code b} is {@code null}.
+     * @since   11
+     */
+    public void writeBytes(byte b[]) {
+        write(b, 0, b.length);
+    }
+
+    /**
+     * Writes the complete contents of this {@code ByteArrayOutputStream} to
      * the specified output stream argument, as if by calling the output
      * stream's write method using {@code out.write(buf, 0, count)}.
      *
-     * @param      out   the output stream to which to write the data.
-     * @exception  IOException  if an I/O error occurs.
+     * @param   out   the output stream to which to write the data.
+     * @throws  NullPointerException if {@code out} is {@code null}.
+     * @throws  IOException if an I/O error occurs.
      */
     public synchronized void writeTo(OutputStream out) throws IOException {
         out.write(buf, 0, count);
     }
 
     /**
-     * Resets the {@code count} field of this byte array output
-     * stream to zero, so that all currently accumulated output in the
+     * Resets the {@code count} field of this {@code ByteArrayOutputStream}
+     * to zero, so that all currently accumulated output in the
      * output stream is discarded. The output stream can be used again,
      * reusing the already allocated buffer space.
      *
@@ -244,12 +265,12 @@
      * </pre>
      *
      *
-     * @param      charsetName  the name of a supported
-     *             {@link java.nio.charset.Charset charset}
-     * @return     String decoded from the buffer's contents.
-     * @exception  UnsupportedEncodingException
-     *             If the named charset is not supported
-     * @since      1.1
+     * @param  charsetName  the name of a supported
+     *         {@link java.nio.charset.Charset charset}
+     * @return String decoded from the buffer's contents.
+     * @throws UnsupportedEncodingException
+     *         If the named charset is not supported
+     * @since  1.1
      */
     public synchronized String toString(String charsetName)
         throws UnsupportedEncodingException
--- a/src/java.base/share/classes/java/io/ObjectInputFilter.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/share/classes/java/io/ObjectInputFilter.java	Fri Apr 06 03:53:28 2018 +0200
@@ -38,6 +38,15 @@
 
 /**
  * Filter classes, array lengths, and graph metrics during deserialization.
+ *
+ * <p><strong>Warning: Deserialization of untrusted data is inherently dangerous
+ * and should be avoided. Untrusted data should be carefully validated according to the
+ * "Serialization and Deserialization" section of the
+ * {@extLink secure_coding_guidelines_javase Secure Coding Guidelines for Java SE}.
+ * {@extLink serialization_filter_guide Serialization Filtering} describes best
+ * practices for defensive use of serial filters.
+ * </strong></p>
+ *
  * If set on an {@link ObjectInputStream}, the {@link #checkInput checkInput(FilterInfo)}
  * method is called to validate classes, the length of each array,
  * the number of objects being read from the stream, the depth of the graph,
--- a/src/java.base/share/classes/java/io/ObjectInputStream.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/share/classes/java/io/ObjectInputStream.java	Fri Apr 06 03:53:28 2018 +0200
@@ -52,6 +52,14 @@
  * An ObjectInputStream deserializes primitive data and objects previously
  * written using an ObjectOutputStream.
  *
+ * <p><strong>Warning: Deserialization of untrusted data is inherently dangerous
+ * and should be avoided. Untrusted data should be carefully validated according to the
+ * "Serialization and Deserialization" section of the
+ * {@extLink secure_coding_guidelines_javase Secure Coding Guidelines for Java SE}.
+ * {@extLink serialization_filter_guide Serialization Filtering} describes best
+ * practices for defensive use of serial filters.
+ * </strong></p>
+ *
  * <p>ObjectOutputStream and ObjectInputStream can provide an application with
  * persistent storage for graphs of objects when used with a FileOutputStream
  * and FileInputStream respectively.  ObjectInputStream is used to recover
--- a/src/java.base/share/classes/java/io/Serializable.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/share/classes/java/io/Serializable.java	Fri Apr 06 03:53:28 2018 +0200
@@ -27,7 +27,17 @@
 
 /**
  * Serializability of a class is enabled by the class implementing the
- * java.io.Serializable interface. Classes that do not implement this
+ * java.io.Serializable interface.
+ *
+ * <p><strong>Warning: Deserialization of untrusted data is inherently dangerous
+ * and should be avoided. Untrusted data should be carefully validated according to the
+ * "Serialization and Deserialization" section of the
+ * {@extLink secure_coding_guidelines_javase Secure Coding Guidelines for Java SE}.
+ * {@extLink serialization_filter_guide Serialization Filtering} describes best
+ * practices for defensive use of serial filters.
+ * </strong></p>
+ *
+ * Classes that do not implement this
  * interface will not have any of their state serialized or
  * deserialized.  All subtypes of a serializable class are themselves
  * serializable.  The serialization interface has no methods or fields
--- a/src/java.base/share/classes/java/io/package-info.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/share/classes/java/io/package-info.java	Fri Apr 06 03:53:28 2018 +0200
@@ -31,19 +31,17 @@
  * method in any class or interface in this package will cause a
  * {@code NullPointerException} to be thrown.
  *
- * <h2>Package Specification</h2>
+ * <h2>Object Serialization</h2>
+ * <p><strong>Warning: Deserialization of untrusted data is inherently dangerous
+ * and should be avoided. Untrusted data should be carefully validated according to the
+ * "Serialization and Deserialization" section of the
+ * {@extLink secure_coding_guidelines_javase Secure Coding Guidelines for Java SE}.
+ * </strong></p>
  * <ul>
  *   <li><a href="{@docRoot}/../specs/serialization/index.html">
  *       Java Object Serialization Specification </a>
- * </ul>
- *
- * <h2>Related Documentation</h2>
- *
- * For overviews, tutorials, examples, guides, and tool documentation,
- * please see:
- * <ul>
- *     <li>{@extLink serialver_tool_reference The serialver tool}</li>
- *     <li>{@extLink serialization_guide Serialization Documentation}</li>
+ *   <li>{@extLink serialization_filter_guide Serial Filtering} best practices</li>
+ *   <li>{@extLink serialver_tool_reference The serialver tool}</li>
  * </ul>
  *
  * @since 1.0
--- a/src/java.base/share/classes/java/lang/Boolean.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/share/classes/java/lang/Boolean.java	Fri Apr 06 03:53:28 2018 +0200
@@ -129,7 +129,7 @@
      * @since 1.5
      */
     public static boolean parseBoolean(String s) {
-        return ((s != null) && s.equalsIgnoreCase("true"));
+        return "true".equalsIgnoreCase(s);
     }
 
     /**
--- a/src/java.base/share/classes/java/lang/CharSequence.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/share/classes/java/lang/CharSequence.java	Fri Apr 06 03:53:28 2018 +0200
@@ -74,7 +74,7 @@
      * indexing.
      *
      * <p>If the {@code char} value specified by the index is a
-     * <a href="{@docRoot}/java/lang/Character.html#unicode">surrogate</a>, the surrogate
+     * <a href="{@docRoot}/java.base/java/lang/Character.html#unicode">surrogate</a>, the surrogate
      * value is returned.
      *
      * @param   index   the index of the {@code char} value to be returned
@@ -119,7 +119,7 @@
     /**
      * Returns a stream of {@code int} zero-extending the {@code char} values
      * from this sequence.  Any char which maps to a <a
-     * href="{@docRoot}/java/lang/Character.html#unicode">surrogate code
+     * href="{@docRoot}/java.base/java/lang/Character.html#unicode">surrogate code
      * point</a> is passed through uninterpreted.
      *
      * <p>The stream binds to this sequence when the terminal stream operation
--- a/src/java.base/share/classes/java/lang/ClassLoader.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/share/classes/java/lang/ClassLoader.java	Fri Apr 06 03:53:28 2018 +0200
@@ -73,7 +73,7 @@
 /**
  * A class loader is an object that is responsible for loading classes. The
  * class {@code ClassLoader} is an abstract class.  Given the <a
- * href="#name">binary name</a> of a class, a class loader should attempt to
+ * href="#binary-name">binary name</a> of a class, a class loader should attempt to
  * locate or generate data that constitutes a definition for the class.  A
  * typical strategy is to transform the name into a file name and then read a
  * "class file" of that name from a file system.
@@ -202,7 +202,7 @@
  *     }
  * </pre></blockquote>
  *
- * <h3> <a id="name">Binary names</a> </h3>
+ * <h3> <a id="binary-name">Binary names</a> </h3>
  *
  * <p> Any class name provided as a {@code String} parameter to methods in
  * {@code ClassLoader} must be a binary name as defined by
@@ -480,7 +480,7 @@
     // -- Class --
 
     /**
-     * Loads the class with the specified <a href="#name">binary name</a>.
+     * Loads the class with the specified <a href="#binary-name">binary name</a>.
      * This method searches for classes in the same manner as the {@link
      * #loadClass(String, boolean)} method.  It is invoked by the Java virtual
      * machine to resolve class references.  Invoking this method is equivalent
@@ -488,7 +488,7 @@
      * false)}.
      *
      * @param  name
-     *         The <a href="#name">binary name</a> of the class
+     *         The <a href="#binary-name">binary name</a> of the class
      *
      * @return  The resulting {@code Class} object
      *
@@ -500,7 +500,7 @@
     }
 
     /**
-     * Loads the class with the specified <a href="#name">binary name</a>.  The
+     * Loads the class with the specified <a href="#binary-name">binary name</a>.  The
      * default implementation of this method searches for classes in the
      * following order:
      *
@@ -530,7 +530,7 @@
      * during the entire class loading process.
      *
      * @param  name
-     *         The <a href="#name">binary name</a> of the class
+     *         The <a href="#binary-name">binary name</a> of the class
      *
      * @param  resolve
      *         If {@code true} then resolve the class
@@ -579,7 +579,7 @@
     }
 
     /**
-     * Loads the class with the specified <a href="#name">binary name</a>
+     * Loads the class with the specified <a href="#binary-name">binary name</a>
      * in a module defined to this class loader.  This method returns {@code null}
      * if the class could not be found.
      *
@@ -598,7 +598,7 @@
      * @param  module
      *         The module
      * @param  name
-     *         The <a href="#name">binary name</a> of the class
+     *         The <a href="#binary-name">binary name</a> of the class
      *
      * @return The resulting {@code Class} object in a module defined by
      *         this class loader, or {@code null} if the class could not be found.
@@ -674,7 +674,7 @@
     }
 
     /**
-     * Finds the class with the specified <a href="#name">binary name</a>.
+     * Finds the class with the specified <a href="#binary-name">binary name</a>.
      * This method should be overridden by class loader implementations that
      * follow the delegation model for loading classes, and will be invoked by
      * the {@link #loadClass loadClass} method after checking the
@@ -683,7 +683,7 @@
      * @implSpec The default implementation throws {@code ClassNotFoundException}.
      *
      * @param  name
-     *         The <a href="#name">binary name</a> of the class
+     *         The <a href="#binary-name">binary name</a> of the class
      *
      * @return  The resulting {@code Class} object
      *
@@ -697,7 +697,7 @@
     }
 
     /**
-     * Finds the class with the given <a href="#name">binary name</a>
+     * Finds the class with the given <a href="#binary-name">binary name</a>
      * in a module defined to this class loader.
      * Class loader implementations that support the loading from modules
      * should override this method.
@@ -715,7 +715,7 @@
      *         class loader
 
      * @param  name
-     *         The <a href="#name">binary name</a> of the class
+     *         The <a href="#binary-name">binary name</a> of the class
      *
      * @return The resulting {@code Class} object, or {@code null}
      *         if the class could not be found.
@@ -737,7 +737,7 @@
      * Converts an array of bytes into an instance of class {@code Class}.
      * Before the {@code Class} can be used it must be resolved.  This method
      * is deprecated in favor of the version that takes a <a
-     * href="#name">binary name</a> as its first argument, and is more secure.
+     * href="#binary-name">binary name</a> as its first argument, and is more secure.
      *
      * @param  b
      *         The bytes that make up the class data.  The bytes in positions
@@ -804,12 +804,12 @@
      * This method defines a package in this class loader corresponding to the
      * package of the {@code Class} (if such a package has not already been defined
      * in this class loader). The name of the defined package is derived from
-     * the <a href="#name">binary name</a> of the class specified by
+     * the <a href="#binary-name">binary name</a> of the class specified by
      * the byte array {@code b}.
      * Other properties of the defined package are as specified by {@link Package}.
      *
      * @param  name
-     *         The expected <a href="#name">binary name</a> of the class, or
+     *         The expected <a href="#binary-name">binary name</a> of the class, or
      *         {@code null} if not known
      *
      * @param  b
@@ -923,7 +923,7 @@
      * package must contain the same set of certificates or a
      * {@code SecurityException} will be thrown.  Note that if
      * {@code name} is {@code null}, this check is not performed.
-     * You should always pass in the <a href="#name">binary name</a> of the
+     * You should always pass in the <a href="#binary-name">binary name</a> of the
      * class you are defining as well as the bytes.  This ensures that the
      * class you are defining is indeed the class you think it is.
      *
@@ -931,19 +931,19 @@
      * only be defined by the {@linkplain #getPlatformClassLoader()
      * platform class loader} or its ancestors; otherwise {@code SecurityException}
      * will be thrown.  If {@code name} is not {@code null}, it must be equal to
-     * the <a href="#name">binary name</a> of the class
+     * the <a href="#binary-name">binary name</a> of the class
      * specified by the byte array {@code b}, otherwise a {@link
      * NoClassDefFoundError NoClassDefFoundError} will be thrown.
      *
      * <p> This method defines a package in this class loader corresponding to the
      * package of the {@code Class} (if such a package has not already been defined
      * in this class loader). The name of the defined package is derived from
-     * the <a href="#name">binary name</a> of the class specified by
+     * the <a href="#binary-name">binary name</a> of the class specified by
      * the byte array {@code b}.
      * Other properties of the defined package are as specified by {@link Package}.
      *
      * @param  name
-     *         The expected <a href="#name">binary name</a> of the class, or
+     *         The expected <a href="#binary-name">binary name</a> of the class, or
      *         {@code null} if not known
      *
      * @param  b
@@ -969,7 +969,7 @@
      *
      * @throws  NoClassDefFoundError
      *          If {@code name} is not {@code null} and not equal to the
-     *          <a href="#name">binary name</a> of the class specified by {@code b}
+     *          <a href="#binary-name">binary name</a> of the class specified by {@code b}
      *
      * @throws  IndexOutOfBoundsException
      *          If either {@code off} or {@code len} is negative, or if
@@ -1027,7 +1027,7 @@
      * </code></p>
      *
      * @param  name
-     *         The expected <a href="#name">binary name</a>. of the class, or
+     *         The expected <a href="#binary-name">binary name</a>. of the class, or
      *         {@code null} if not known
      *
      * @param  b
@@ -1047,7 +1047,7 @@
      *
      * @throws  NoClassDefFoundError
      *          If {@code name} is not {@code null} and not equal to the
-     *          <a href="#name">binary name</a> of the class specified by {@code b}
+     *          <a href="#binary-name">binary name</a> of the class specified by {@code b}
      *
      * @throws  SecurityException
      *          If an attempt is made to add this class to a package that
@@ -1198,7 +1198,7 @@
     }
 
     /**
-     * Finds a class with the specified <a href="#name">binary name</a>,
+     * Finds a class with the specified <a href="#binary-name">binary name</a>,
      * loading it if necessary.
      *
      * <p> This method loads the class through the system class loader (see
@@ -1209,7 +1209,7 @@
      * #findClass(String)}.  </p>
      *
      * @param  name
-     *         The <a href="#name">binary name</a> of the class
+     *         The <a href="#binary-name">binary name</a> of the class
      *
      * @return  The {@code Class} object for the specified {@code name}
      *
@@ -1239,13 +1239,13 @@
     private native Class<?> findBootstrapClass(String name);
 
     /**
-     * Returns the class with the given <a href="#name">binary name</a> if this
+     * Returns the class with the given <a href="#binary-name">binary name</a> if this
      * loader has been recorded by the Java virtual machine as an initiating
-     * loader of a class with that <a href="#name">binary name</a>.  Otherwise
+     * loader of a class with that <a href="#binary-name">binary name</a>.  Otherwise
      * {@code null} is returned.
      *
      * @param  name
-     *         The <a href="#name">binary name</a> of the class
+     *         The <a href="#binary-name">binary name</a> of the class
      *
      * @return  The {@code Class} object, or {@code null} if the class has
      *          not been loaded
@@ -2087,9 +2087,9 @@
     }
 
     /**
-     * Defines a package by <a href="#name">name</a> in this {@code ClassLoader}.
+     * Defines a package by <a href="#binary-name">name</a> in this {@code ClassLoader}.
      * <p>
-     * <a href="#name">Package names</a> must be unique within a class loader and
+     * <a href="#binary-name">Package names</a> must be unique within a class loader and
      * cannot be redefined or changed once created.
      * <p>
      * If a class loader wishes to define a package with specific properties,
@@ -2123,7 +2123,7 @@
      * in a named module may be for example sealed with different seal base.
      *
      * @param  name
-     *         The <a href="#name">package name</a>
+     *         The <a href="#binary-name">package name</a>
      *
      * @param  specTitle
      *         The specification title
@@ -2185,10 +2185,10 @@
     }
 
     /**
-     * Returns a {@code Package} of the given <a href="#name">name</a> that
+     * Returns a {@code Package} of the given <a href="#binary-name">name</a> that
      * has been defined by this class loader.
      *
-     * @param  name The <a href="#name">package name</a>
+     * @param  name The <a href="#binary-name">package name</a>
      *
      * @return The {@code Package} of the given name that has been defined
      *         by this class loader, or {@code null} if not found
@@ -2233,7 +2233,7 @@
     }
 
     /**
-     * Finds a package by <a href="#name">name</a> in this class loader and its ancestors.
+     * Finds a package by <a href="#binary-name">name</a> in this class loader and its ancestors.
      * <p>
      * If this class loader defines a {@code Package} of the given name,
      * the {@code Package} is returned. Otherwise, the ancestors of
@@ -2247,7 +2247,7 @@
      * class loader.
      *
      * @param  name
-     *         The <a href="#name">package name</a>
+     *         The <a href="#binary-name">package name</a>
      *
      * @return The {@code Package} of the given name that has been defined by
      *         this class loader or its ancestors, or {@code null} if not found.
--- a/src/java.base/share/classes/java/lang/Comparable.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/share/classes/java/lang/Comparable.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -84,7 +84,7 @@
  *     {(x, y) such that x.equals(y)}. </pre><p>
  *
  * This interface is a member of the
- * <a href="{@docRoot}/java/util/package-summary.html#CollectionsFramework">
+ * <a href="{@docRoot}/java.base/java/util/package-summary.html#CollectionsFramework">
  * Java Collections Framework</a>.
  *
  * @param <T> the type of objects that this object may be compared to
--- a/src/java.base/share/classes/java/lang/Integer.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/share/classes/java/lang/Integer.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1574,13 +1574,7 @@
      * @since 1.5
      */
     public static int highestOneBit(int i) {
-        // HD, Figure 3-1
-        i |= (i >>  1);
-        i |= (i >>  2);
-        i |= (i >>  4);
-        i |= (i >>  8);
-        i |= (i >> 16);
-        return i - (i >>> 1);
+        return i & (MIN_VALUE >>> numberOfLeadingZeros(i));
     }
 
     /**
--- a/src/java.base/share/classes/java/lang/Long.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/share/classes/java/lang/Long.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1719,14 +1719,7 @@
      * @since 1.5
      */
     public static long highestOneBit(long i) {
-        // HD, Figure 3-1
-        i |= (i >>  1);
-        i |= (i >>  2);
-        i |= (i >>  4);
-        i |= (i >>  8);
-        i |= (i >> 16);
-        i |= (i >> 32);
-        return i - (i >>> 1);
+        return i & (MIN_VALUE >>> numberOfLeadingZeros(i));
     }
 
     /**
--- a/src/java.base/share/classes/java/lang/ProcessHandle.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/share/classes/java/lang/ProcessHandle.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -80,7 +80,7 @@
  *
  * <p>
  * The {@code ProcessHandle} static factory methods return instances that are
- * <a href="{@docRoot}/java/lang/doc-files/ValueBased.html">value-based</a>,
+ * <a href="{@docRoot}/java.base/java/lang/doc-files/ValueBased.html">value-based</a>,
  * immutable and thread-safe.
  * Use of identity-sensitive operations (including reference equality
  * ({@code ==}), identity hash code, or synchronization) on these instances of
--- a/src/java.base/share/classes/java/lang/Runtime.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/share/classes/java/lang/Runtime.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1140,7 +1140,7 @@
          * number is not the major-release number but the feature-release
          * counter, incremented for every time-based release.  Use the {@link
          * #feature()} method in preference to this method.  For compatibility,
-         * this method returns the value of the <a href="FEATURE">feature</a>
+         * this method returns the value of the <a href="#FEATURE">feature</a>
          * element.
          *
          * @return The value of the feature element
@@ -1158,7 +1158,7 @@
          * number is not the minor-release number but the interim-release
          * counter, incremented for every interim release.  Use the {@link
          * #interim()} method in preference to this method.  For compatibility,
-         * this method returns the value of the <a href="INTERIM">interim</a>
+         * this method returns the value of the <a href="#INTERIM">interim</a>
          * element, or zero if it is absent.
          *
          * @return The value of the interim element, or zero
@@ -1176,7 +1176,7 @@
          * number is not the security level but the update-release counter,
          * incremented for every update release.  Use the {@link #update()}
          * method in preference to this method.  For compatibility, this method
-         * returns the value of the <a href="UPDATE">update</a> element, or
+         * returns the value of the <a href="#UPDATE">update</a> element, or
          * zero if it is absent.
          *
          * @return  The value of the update element, or zero
@@ -1188,9 +1188,9 @@
 
         /**
          * Returns an unmodifiable {@link java.util.List List} of the integers
-         * represented in the <a href="#verNum">version number</a>.  The {@code
-         * List} always contains at least one element corresponding to the <a
-         * href="#feature">feature version number</a>.
+         * represented in the <a href="#verNum">version number</a>.
+         * The {@code List} always contains at least one element corresponding to
+         * the <a href="#FEATURE">feature version number</a>.
          *
          * @return  An unmodifiable list of the integers
          *          represented in the version number
--- a/src/java.base/share/classes/java/lang/SecurityManager.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/share/classes/java/lang/SecurityManager.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1995, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -235,19 +235,6 @@
      */
     private boolean initialized = false;
 
-
-    /**
-     * returns true if the current context has been granted AllPermission
-     */
-    private boolean hasAllPermission() {
-        try {
-            checkPermission(SecurityConstants.ALL_PERMISSION);
-            return true;
-        } catch (SecurityException se) {
-            return false;
-        }
-    }
-
     /**
      * Constructs a new <code>SecurityManager</code>.
      *
@@ -1081,28 +1068,6 @@
     }
 
     /**
-     * Returns {@code true} if the calling thread has {@code AllPermission}.
-     *
-     * @param      window   not used except to check if it is {@code null}.
-     * @return     {@code true} if the calling thread has {@code AllPermission}.
-     * @exception  NullPointerException if the {@code window} argument is
-     *             {@code null}.
-     * @deprecated This method was originally used to check if the calling thread
-     *             was trusted to bring up a top-level window. The method has been
-     *             obsoleted and code should instead use {@link #checkPermission}
-     *             to check {@code AWTPermission("showWindowWithoutWarningBanner")}.
-     *             This method is subject to removal in a future version of Java SE.
-     * @see        #checkPermission(java.security.Permission) checkPermission
-     */
-    @Deprecated(since="1.8", forRemoval=true)
-    public boolean checkTopLevelWindow(Object window) {
-        if (window == null) {
-            throw new NullPointerException("window can't be null");
-        }
-        return hasAllPermission();
-    }
-
-    /**
      * Throws a <code>SecurityException</code> if the
      * calling thread is not allowed to initiate a print job request.
      * <p>
@@ -1124,44 +1089,6 @@
         checkPermission(new RuntimePermission("queuePrintJob"));
     }
 
-    /**
-     * Throws {@code SecurityException} if the calling thread does
-     * not have {@code AllPermission}.
-     *
-     * @since   1.1
-     * @exception  SecurityException  if the calling thread does not have
-     *             {@code AllPermission}
-     * @deprecated This method was originally used to check if the calling
-     *             thread could access the system clipboard. The method has been
-     *             obsoleted and code should instead use {@link #checkPermission}
-     *             to check {@code AWTPermission("accessClipboard")}.
-     *             This method is subject to removal in a future version of Java SE.
-     * @see        #checkPermission(java.security.Permission) checkPermission
-     */
-    @Deprecated(since="1.8", forRemoval=true)
-    public void checkSystemClipboardAccess() {
-        checkPermission(SecurityConstants.ALL_PERMISSION);
-    }
-
-    /**
-     * Throws {@code SecurityException} if the calling thread does
-     * not have {@code AllPermission}.
-     *
-     * @since   1.1
-     * @exception  SecurityException  if the calling thread does not have
-     *             {@code AllPermission}
-     * @deprecated This method was originally used to check if the calling
-     *             thread could access the AWT event queue. The method has been
-     *             obsoleted and code should instead use {@link #checkPermission}
-     *             to check {@code AWTPermission("accessEventQueue")}.
-     *             This method is subject to removal in a future version of Java SE.
-     * @see        #checkPermission(java.security.Permission) checkPermission
-     */
-    @Deprecated(since="1.8", forRemoval=true)
-    public void checkAwtEventQueueAccess() {
-        checkPermission(SecurityConstants.ALL_PERMISSION);
-    }
-
     /*
      * We have an initial invalid bit (initially false) for the class
      * variables which tell if the cache is valid.  If the underlying
@@ -1475,35 +1402,6 @@
     }
 
     /**
-     * Throws a {@code SecurityException} if the calling thread does
-     * not have {@code AllPermission}.
-     *
-     * @param clazz the class that reflection is to be performed on.
-     * @param which type of access, PUBLIC or DECLARED.
-     * @throws  SecurityException if the caller does not have
-     *          {@code AllPermission}
-     * @throws  NullPointerException if the {@code clazz} argument is
-     *          {@code null}
-     * @deprecated This method was originally used to check if the calling
-     *             thread was allowed to access members. It relied on the
-     *             caller being at a stack depth of 4 which is error-prone and
-     *             cannot be enforced by the runtime. The method has been
-     *             obsoleted and code should instead use
-     *             {@link #checkPermission} to check
-     *             {@code RuntimePermission("accessDeclaredMembers")}. This
-     *             method is subject to removal in a future version of Java SE.
-     * @since 1.1
-     * @see        #checkPermission(java.security.Permission) checkPermission
-     */
-    @Deprecated(since="1.8", forRemoval=true)
-    public void checkMemberAccess(Class<?> clazz, int which) {
-        if (clazz == null) {
-            throw new NullPointerException("class can't be null");
-        }
-        checkPermission(SecurityConstants.ALL_PERMISSION);
-    }
-
-    /**
      * Determines whether the permission with the specified permission target
      * name should be granted or denied.
      *
--- a/src/java.base/share/classes/java/lang/String.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/share/classes/java/lang/String.java	Fri Apr 06 03:53:28 2018 +0200
@@ -2647,7 +2647,7 @@
     /**
      * Returns a stream of {@code int} zero-extending the {@code char} values
      * from this sequence.  Any char which maps to a <a
-     * href="{@docRoot}/java/lang/Character.html#unicode">surrogate code
+     * href="{@docRoot}/java.base/java/lang/Character.html#unicode">surrogate code
      * point</a> is passed through uninterpreted.
      *
      * @return an IntStream of char values from this sequence
--- a/src/java.base/share/classes/java/lang/StringCoding.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/share/classes/java/lang/StringCoding.java	Fri Apr 06 03:53:28 2018 +0200
@@ -52,6 +52,9 @@
 import static java.lang.Character.lowSurrogate;
 import static java.lang.Character.isSupplementaryCodePoint;
 import static java.lang.StringUTF16.putChar;
+import static java.nio.charset.StandardCharsets.ISO_8859_1;
+import static java.nio.charset.StandardCharsets.US_ASCII;
+import static java.nio.charset.StandardCharsets.UTF_8;
 
 /**
  * Utility class for string encoding and decoding.
@@ -67,10 +70,6 @@
     private static final ThreadLocal<SoftReference<StringEncoder>> encoder =
         new ThreadLocal<>();
 
-    private static final Charset ISO_8859_1 = sun.nio.cs.ISO_8859_1.INSTANCE;
-    private static final Charset US_ASCII = sun.nio.cs.US_ASCII.INSTANCE;
-    private static final Charset UTF_8 = sun.nio.cs.UTF_8.INSTANCE;
-
     private static <T> T deref(ThreadLocal<SoftReference<T>> tl) {
         SoftReference<T> sr = tl.get();
         if (sr == null)
--- a/src/java.base/share/classes/java/lang/Thread.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/share/classes/java/lang/Thread.java	Fri Apr 06 03:53:28 2018 +0200
@@ -146,15 +146,14 @@
     }
 
     private volatile String name;
-    private int            priority;
-    private Thread         threadQ;
-    private long           eetop;
+    private int priority;
 
     /* Whether or not the thread is a daemon thread. */
-    private boolean     daemon = false;
+    private boolean daemon = false;
 
-    /* JVM state */
-    private boolean     stillborn = false;
+    /* Fields reserved for exclusive use by the JVM */
+    private boolean stillborn = false;
+    private long eetop;
 
     /* What will be run. */
     private Runnable target;
@@ -189,7 +188,7 @@
      * not specify a stack size.  It is up to the VM to do whatever it
      * likes with this number; some VMs will ignore it.
      */
-    private long stackSize;
+    private final long stackSize;
 
     /*
      * JVM-private state that persists after native thread termination.
@@ -199,20 +198,20 @@
     /*
      * Thread ID
      */
-    private long tid;
+    private final long tid;
 
     /* For generating thread ID */
     private static long threadSeqNumber;
 
+    private static synchronized long nextThreadID() {
+        return ++threadSeqNumber;
+    }
+
     /*
      * Java thread status for tools, default indicates thread 'not yet started'
      */
     private volatile int threadStatus;
 
-    private static synchronized long nextThreadID() {
-        return ++threadSeqNumber;
-    }
-
     /**
      * The argument supplied to the current call to
      * java.util.concurrent.locks.LockSupport.park.
@@ -378,15 +377,6 @@
     public static void onSpinWait() {}
 
     /**
-     * Initializes a Thread with the current AccessControlContext.
-     * @see #init(ThreadGroup,Runnable,String,long,AccessControlContext,boolean)
-     */
-    private void init(ThreadGroup g, Runnable target, String name,
-                      long stackSize) {
-        init(g, target, name, stackSize, null, true);
-    }
-
-    /**
      * Initializes a Thread.
      *
      * @param g the Thread group
@@ -399,9 +389,9 @@
      * @param inheritThreadLocals if {@code true}, inherit initial values for
      *            inheritable thread-locals from the constructing thread
      */
-    private void init(ThreadGroup g, Runnable target, String name,
-                      long stackSize, AccessControlContext acc,
-                      boolean inheritThreadLocals) {
+    private Thread(ThreadGroup g, Runnable target, String name,
+                   long stackSize, AccessControlContext acc,
+                   boolean inheritThreadLocals) {
         if (name == null) {
             throw new NullPointerException("name cannot be null");
         }
@@ -419,8 +409,8 @@
                 g = security.getThreadGroup();
             }
 
-            /* If the security doesn't have a strong opinion of the matter
-               use the parent thread group. */
+            /* If the security manager doesn't have a strong opinion
+               on the matter, use the parent thread group. */
             if (g == null) {
                 g = parent.getThreadGroup();
             }
@@ -459,7 +449,7 @@
         this.stackSize = stackSize;
 
         /* Set thread ID */
-        tid = nextThreadID();
+        this.tid = nextThreadID();
     }
 
     /**
@@ -482,7 +472,7 @@
      * {@code "Thread-"+}<i>n</i>, where <i>n</i> is an integer.
      */
     public Thread() {
-        init(null, null, "Thread-" + nextThreadNum(), 0);
+        this(null, null, "Thread-" + nextThreadNum(), 0);
     }
 
     /**
@@ -498,7 +488,7 @@
      *         nothing.
      */
     public Thread(Runnable target) {
-        init(null, target, "Thread-" + nextThreadNum(), 0);
+        this(null, target, "Thread-" + nextThreadNum(), 0);
     }
 
     /**
@@ -507,7 +497,7 @@
      * This is not a public constructor.
      */
     Thread(Runnable target, AccessControlContext acc) {
-        init(null, target, "Thread-" + nextThreadNum(), 0, acc, false);
+        this(null, target, "Thread-" + nextThreadNum(), 0, acc, false);
     }
 
     /**
@@ -534,7 +524,7 @@
      *          thread group
      */
     public Thread(ThreadGroup group, Runnable target) {
-        init(group, target, "Thread-" + nextThreadNum(), 0);
+        this(group, target, "Thread-" + nextThreadNum(), 0);
     }
 
     /**
@@ -546,7 +536,7 @@
      *          the name of the new thread
      */
     public Thread(String name) {
-        init(null, null, name, 0);
+        this(null, null, name, 0);
     }
 
     /**
@@ -570,7 +560,7 @@
      *          thread group
      */
     public Thread(ThreadGroup group, String name) {
-        init(group, null, name, 0);
+        this(group, null, name, 0);
     }
 
     /**
@@ -586,7 +576,7 @@
      *         the name of the new thread
      */
     public Thread(Runnable target, String name) {
-        init(null, target, name, 0);
+        this(null, target, name, 0);
     }
 
     /**
@@ -634,7 +624,7 @@
      *          thread group or cannot override the context class loader methods.
      */
     public Thread(ThreadGroup group, Runnable target, String name) {
-        init(group, target, name, 0);
+        this(group, target, name, 0);
     }
 
     /**
@@ -713,7 +703,7 @@
      */
     public Thread(ThreadGroup group, Runnable target, String name,
                   long stackSize) {
-        init(group, target, name, stackSize);
+        this(group, target, name, stackSize, null, true);
     }
 
     /**
@@ -769,7 +759,7 @@
      */
     public Thread(ThreadGroup group, Runnable target, String name,
                   long stackSize, boolean inheritThreadLocals) {
-        init(group, target, name, stackSize, null, inheritThreadLocals);
+        this(group, target, name, stackSize, null, inheritThreadLocals);
     }
 
     /**
@@ -924,7 +914,7 @@
      *       for example), the {@code interrupt} method should be used to
      *       interrupt the wait.
      *       For more information, see
-     *       <a href="{@docRoot}/java/lang/doc-files/threadPrimitiveDeprecation.html">Why
+     *       <a href="{@docRoot}/java.base/java/lang/doc-files/threadPrimitiveDeprecation.html">Why
      *       are Thread.stop, Thread.suspend and Thread.resume Deprecated?</a>.
      */
     @Deprecated(since="1.2")
@@ -957,7 +947,7 @@
      *        could be used to generate exceptions that the target thread was
      *        not prepared to handle.
      *        For more information, see
-     *        <a href="{@docRoot}/java/lang/doc-files/threadPrimitiveDeprecation.html">Why
+     *        <a href="{@docRoot}/java.base/java/lang/doc-files/threadPrimitiveDeprecation.html">Why
      *        are Thread.stop, Thread.suspend and Thread.resume Deprecated?</a>.
      *        This method is subject to removal in a future version of Java SE.
      */
@@ -1083,7 +1073,7 @@
      *     If another thread ever attempted to lock this resource, deadlock
      *     would result. Such deadlocks typically manifest themselves as
      *     "frozen" processes. For more information, see
-     *     <a href="{@docRoot}/java/lang/doc-files/threadPrimitiveDeprecation.html">
+     *     <a href="{@docRoot}/java.base/java/lang/doc-files/threadPrimitiveDeprecation.html">
      *     Why are Thread.stop, Thread.suspend and Thread.resume Deprecated?</a>.
      *     This method is subject to removal in a future version of Java SE.
      * @throws NoSuchMethodError always
@@ -1123,7 +1113,7 @@
      *   monitor prior to calling {@code resume}, deadlock results.  Such
      *   deadlocks typically manifest themselves as "frozen" processes.
      *   For more information, see
-     *   <a href="{@docRoot}/java/lang/doc-files/threadPrimitiveDeprecation.html">Why
+     *   <a href="{@docRoot}/java.base/java/lang/doc-files/threadPrimitiveDeprecation.html">Why
      *   are Thread.stop, Thread.suspend and Thread.resume Deprecated?</a>.
      */
     @Deprecated(since="1.2")
@@ -1149,7 +1139,7 @@
      * @deprecated This method exists solely for use with {@link #suspend},
      *     which has been deprecated because it is deadlock-prone.
      *     For more information, see
-     *     <a href="{@docRoot}/java/lang/doc-files/threadPrimitiveDeprecation.html">Why
+     *     <a href="{@docRoot}/java.base/java/lang/doc-files/threadPrimitiveDeprecation.html">Why
      *     are Thread.stop, Thread.suspend and Thread.resume Deprecated?</a>.
      */
     @Deprecated(since="1.2")
--- a/src/java.base/share/classes/java/lang/UnsupportedOperationException.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/share/classes/java/lang/UnsupportedOperationException.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -29,7 +29,7 @@
  * Thrown to indicate that the requested operation is not supported.<p>
  *
  * This class is a member of the
- * <a href="{@docRoot}/java/util/package-summary.html#CollectionsFramework">
+ * <a href="{@docRoot}/java.base/java/util/package-summary.html#CollectionsFramework">
  * Java Collections Framework</a>.
  *
  * @author  Josh Bloch
--- a/src/java.base/share/classes/java/lang/invoke/MethodHandles.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/share/classes/java/lang/invoke/MethodHandles.java	Fri Apr 06 03:53:28 2018 +0200
@@ -2035,11 +2035,26 @@
                                             ReflectiveOperationException.class);
         }
 
+        MemberName resolveOrNull(byte refKind, MemberName member) {
+            // do this before attempting to resolve
+            if (!isClassAccessible(member.getDeclaringClass())) {
+                return null;
+            }
+            Objects.requireNonNull(member.getName());
+            Objects.requireNonNull(member.getType());
+            return IMPL_NAMES.resolveOrNull(refKind, member, lookupClassOrNull());
+        }
+
         void checkSymbolicClass(Class<?> refc) throws IllegalAccessException {
+            if (!isClassAccessible(refc)) {
+                throw new MemberName(refc).makeAccessException("symbolic reference class is not accessible", this);
+            }
+        }
+
+        boolean isClassAccessible(Class<?> refc) {
             Objects.requireNonNull(refc);
             Class<?> caller = lookupClassOrNull();
-            if (caller != null && !VerifyAccess.isClassAccessible(refc, caller, allowedModes))
-                throw new MemberName(refc).makeAccessException("symbolic reference class is not accessible", this);
+            return caller == null || VerifyAccess.isClassAccessible(refc, caller, allowedModes);
         }
 
         /** Check name for an illegal leading "&lt;" character. */
@@ -2482,10 +2497,13 @@
                 }
             }
             try {
-                MemberName resolved2 = publicLookup().resolveOrFail(refKind,
+                MemberName resolved2 = publicLookup().resolveOrNull(refKind,
                     new MemberName(refKind, defc, member.getName(), member.getType()));
+                if (resolved2 == null) {
+                    return false;
+                }
                 checkSecurityManager(defc, resolved2);
-            } catch (ReflectiveOperationException | SecurityException ex) {
+            } catch (SecurityException ex) {
                 return false;
             }
             return true;
--- a/src/java.base/share/classes/java/lang/module/Configuration.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/share/classes/java/lang/module/Configuration.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -48,7 +48,7 @@
 /**
  * A configuration that is the result of <a href="package-summary.html#resolution">
  * resolution</a> or resolution with
- * <a href="{@docRoot}/java/lang/module/Configuration.html#service-binding">service binding</a>.
+ * <a href="{@docRoot}/java.base/java/lang/module/Configuration.html#service-binding">service binding</a>.
  *
  * <p> A configuration encapsulates the <em>readability graph</em> that is the
  * output of resolution. A readability graph is a directed graph whose vertices
--- a/src/java.base/share/classes/java/lang/package-info.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/share/classes/java/lang/package-info.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -58,7 +58,7 @@
  * represent errors and exceptions.
  *
  * <a id="charenc"></a>
- * <h3>Character Encodings</h3>
+ * <h2>Character Encodings</h2>
  *
  * The specification of the {@link java.nio.charset.Charset
  * java.nio.charset.Charset} class describes the naming conventions
--- a/src/java.base/share/classes/java/nio/charset/Charset.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/share/classes/java/nio/charset/Charset.java	Fri Apr 06 03:53:28 2018 +0200
@@ -26,7 +26,6 @@
 package java.nio.charset;
 
 import jdk.internal.misc.VM;
-import sun.nio.cs.StandardCharsets;
 import sun.nio.cs.ThreadLocalCoders;
 import sun.security.action.GetPropertyAction;
 
@@ -311,7 +310,8 @@
     }
 
     /* The standard set of charsets */
-    private static final CharsetProvider standardProvider = new StandardCharsets();
+    private static final CharsetProvider standardProvider
+        = new sun.nio.cs.StandardCharsets();
 
     private static final String[] zeroAliases = new String[0];
 
@@ -609,7 +609,7 @@
                 if (cs != null)
                     defaultCharset = cs;
                 else
-                    defaultCharset = sun.nio.cs.UTF_8.INSTANCE;
+                    defaultCharset = StandardCharsets.UTF_8;
             }
         }
         return defaultCharset;
--- a/src/java.base/share/classes/java/nio/charset/StandardCharsets.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/share/classes/java/nio/charset/StandardCharsets.java	Fri Apr 06 03:53:28 2018 +0200
@@ -41,26 +41,26 @@
      * Seven-bit ASCII, a.k.a. ISO646-US, a.k.a. the Basic Latin block of the
      * Unicode character set
      */
-    public static final Charset US_ASCII = sun.nio.cs.US_ASCII.INSTANCE;
+    public static final Charset US_ASCII = new sun.nio.cs.US_ASCII();
     /**
      * ISO Latin Alphabet No. 1, a.k.a. ISO-LATIN-1
      */
-    public static final Charset ISO_8859_1 = sun.nio.cs.ISO_8859_1.INSTANCE;
+    public static final Charset ISO_8859_1 = new sun.nio.cs.ISO_8859_1();
     /**
      * Eight-bit UCS Transformation Format
      */
-    public static final Charset UTF_8 = sun.nio.cs.UTF_8.INSTANCE;
+    public static final Charset UTF_8 = new sun.nio.cs.UTF_8();
     /**
      * Sixteen-bit UCS Transformation Format, big-endian byte order
      */
-    public static final Charset UTF_16BE = Charset.forName("UTF-16BE");
+    public static final Charset UTF_16BE = new sun.nio.cs.UTF_16BE();
     /**
      * Sixteen-bit UCS Transformation Format, little-endian byte order
      */
-    public static final Charset UTF_16LE = Charset.forName("UTF-16LE");
+    public static final Charset UTF_16LE = new sun.nio.cs.UTF_16LE();
     /**
      * Sixteen-bit UCS Transformation Format, byte order identified by an
      * optional byte-order mark
      */
-    public static final Charset UTF_16 = Charset.forName("UTF-16");
+    public static final Charset UTF_16 = new sun.nio.cs.UTF_16();
 }
--- a/src/java.base/share/classes/java/nio/file/package-info.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/share/classes/java/nio/file/package-info.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -33,7 +33,7 @@
  * package is used by service provider implementors wishing to extend the
  * platform default provider, or to construct other provider implementations. </p>
  *
- * <h3><a id="links">Symbolic Links</a></h3>
+ * <h2><a id="links">Symbolic Links</a></h2>
  * <p> Many operating systems and file systems support for <em>symbolic links</em>.
  * A symbolic link is a special file that serves as a reference to another file.
  * For the most part, symbolic links are transparent to applications and
@@ -45,7 +45,7 @@
  * that are semantically close but support for these other types of links is
  * not included in this package. </p>
  *
- * <h3><a id="interop">Interoperability</a></h3>
+ * <h2><a id="interop">Interoperability</a></h2>
  * <p> The {@link java.io.File} class defines the {@link java.io.File#toPath
  * toPath} method to construct a {@link java.nio.file.Path} by converting
  * the abstract path represented by the {@code java.io.File} object. The resulting
@@ -54,7 +54,7 @@
  * on the <a href="Path.html#interop">interoperability</a> between {@code Path}
  * and {@code java.io.File} objects. </p>
  *
- * <h3>Visibility</h3>
+ * <h2>Visibility</h2>
  * <p> The view of the files and file system provided by classes in this package are
  * guaranteed to be consistent with other views provided by other instances in the
  * same Java virtual machine.  The view may or may not, however, be consistent with
@@ -65,7 +65,7 @@
  * or on some other machine.  The exact nature of any such inconsistencies are
  * system-dependent and are therefore unspecified. </p>
  *
- * <h3><a id="integrity">Synchronized I/O File Integrity</a></h3>
+ * <h2><a id="integrity">Synchronized I/O File Integrity</a></h2>
  * <p> The {@link java.nio.file.StandardOpenOption#SYNC SYNC} and {@link
  * java.nio.file.StandardOpenOption#DSYNC DSYNC} options are used when opening a file
  * to require that updates to the file are written synchronously to the underlying
@@ -82,7 +82,7 @@
  * java.nio.file.spi.FileSystemProvider provider} implementations is provider
  * specific. </p>
  *
- * <h3>General Exceptions</h3>
+ * <h2>General Exceptions</h2>
  * <p> Unless otherwise noted, passing a {@code null} argument to a constructor
  * or method of any class or interface in this package will cause a {@link
  * java.lang.NullPointerException NullPointerException} to be thrown. Additionally,
@@ -103,7 +103,7 @@
  * provider} with a parameter that is an object created by another provider,
  * will throw {@link java.nio.file.ProviderMismatchException}. </p>
  *
- * <h3>Optional Specific Exceptions</h3>
+ * <h2>Optional Specific Exceptions</h2>
  * Most of the methods defined by classes in this package that access the
  * file system specify that {@link java.io.IOException} be thrown when an I/O
  * error occurs. In some cases, these methods define specific I/O exceptions
--- a/src/java.base/share/classes/java/text/ChoiceFormat.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/share/classes/java/text/ChoiceFormat.java	Fri Apr 06 03:53:28 2018 +0200
@@ -212,7 +212,7 @@
                 } else if (tempBuffer.equals("-\u221E")) {
                     startValue = Double.NEGATIVE_INFINITY;
                 } else {
-                    startValue = Double.valueOf(tempBuffer);
+                    startValue = Double.parseDouble(tempBuffer);
                 }
 
                 if (ch == '<' && startValue != Double.POSITIVE_INFINITY &&
--- a/src/java.base/share/classes/java/time/Duration.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/share/classes/java/time/Duration.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -119,7 +119,7 @@
  * See {@link Instant} for a discussion as to the meaning of the second and time-scales.
  *
  * <p>
- * This is a <a href="{@docRoot}/java/lang/doc-files/ValueBased.html">value-based</a>
+ * This is a <a href="{@docRoot}/java.base/java/lang/doc-files/ValueBased.html">value-based</a>
  * class; use of identity-sensitive operations (including reference equality
  * ({@code ==}), identity hash code, or synchronization) on instances of
  * {@code Duration} may have unpredictable results and should be avoided.
--- a/src/java.base/share/classes/java/time/Instant.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/share/classes/java/time/Instant.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -193,7 +193,7 @@
  * {@code ZonedDateTime} and {@code Duration}.
  *
  * <p>
- * This is a <a href="{@docRoot}/java/lang/doc-files/ValueBased.html">value-based</a>
+ * This is a <a href="{@docRoot}/java.base/java/lang/doc-files/ValueBased.html">value-based</a>
  * class; use of identity-sensitive operations (including reference equality
  * ({@code ==}), identity hash code, or synchronization) on instances of
  * {@code Instant} may have unpredictable results and should be avoided.
--- a/src/java.base/share/classes/java/time/LocalDate.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/share/classes/java/time/LocalDate.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -125,7 +125,7 @@
  * to be accurate will find the ISO-8601 approach unsuitable.
  *
  * <p>
- * This is a <a href="{@docRoot}/java/lang/doc-files/ValueBased.html">value-based</a>
+ * This is a <a href="{@docRoot}/java.base/java/lang/doc-files/ValueBased.html">value-based</a>
  * class; use of identity-sensitive operations (including reference equality
  * ({@code ==}), identity hash code, or synchronization) on instances of
  * {@code LocalDate} may have unpredictable results and should be avoided.
--- a/src/java.base/share/classes/java/time/LocalDateTime.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/share/classes/java/time/LocalDateTime.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -121,7 +121,7 @@
  * to be accurate will find the ISO-8601 approach unsuitable.
  *
  * <p>
- * This is a <a href="{@docRoot}/java/lang/doc-files/ValueBased.html">value-based</a>
+ * This is a <a href="{@docRoot}/java.base/java/lang/doc-files/ValueBased.html">value-based</a>
  * class; use of identity-sensitive operations (including reference equality
  * ({@code ==}), identity hash code, or synchronization) on instances of
  * {@code LocalDateTime} may have unpredictable results and should be avoided.
--- a/src/java.base/share/classes/java/time/LocalTime.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/share/classes/java/time/LocalTime.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -111,7 +111,7 @@
  * representation, this class, for time-of-day.
  *
  * <p>
- * This is a <a href="{@docRoot}/java/lang/doc-files/ValueBased.html">value-based</a>
+ * This is a <a href="{@docRoot}/java.base/java/lang/doc-files/ValueBased.html">value-based</a>
  * class; use of identity-sensitive operations (including reference equality
  * ({@code ==}), identity hash code, or synchronization) on instances of
  * {@code LocalTime} may have unpredictable results and should be avoided.
--- a/src/java.base/share/classes/java/time/MonthDay.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/share/classes/java/time/MonthDay.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -113,7 +113,7 @@
  * to be accurate will find the ISO-8601 approach unsuitable.
  *
  * <p>
- * This is a <a href="{@docRoot}/java/lang/doc-files/ValueBased.html">value-based</a>
+ * This is a <a href="{@docRoot}/java.base/java/lang/doc-files/ValueBased.html">value-based</a>
  * class; use of identity-sensitive operations (including reference equality
  * ({@code ==}), identity hash code, or synchronization) on instances of
  * {@code MonthDay} may have unpredictable results and should be avoided.
--- a/src/java.base/share/classes/java/time/OffsetDateTime.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/share/classes/java/time/OffsetDateTime.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -114,7 +114,7 @@
  * more detail, or when communicating to a database or in a network protocol.
  *
  * <p>
- * This is a <a href="{@docRoot}/java/lang/doc-files/ValueBased.html">value-based</a>
+ * This is a <a href="{@docRoot}/java.base/java/lang/doc-files/ValueBased.html">value-based</a>
  * class; use of identity-sensitive operations (including reference equality
  * ({@code ==}), identity hash code, or synchronization) on instances of
  * {@code OffsetDateTime} may have unpredictable results and should be avoided.
--- a/src/java.base/share/classes/java/time/OffsetTime.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/share/classes/java/time/OffsetTime.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -104,7 +104,7 @@
  * in an {@code OffsetTime}.
  *
  * <p>
- * This is a <a href="{@docRoot}/java/lang/doc-files/ValueBased.html">value-based</a>
+ * This is a <a href="{@docRoot}/java.base/java/lang/doc-files/ValueBased.html">value-based</a>
  * class; use of identity-sensitive operations (including reference equality
  * ({@code ==}), identity hash code, or synchronization) on instances of
  * {@code OffsetTime} may have unpredictable results and should be avoided.
--- a/src/java.base/share/classes/java/time/Period.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/share/classes/java/time/Period.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -119,7 +119,7 @@
  * period may be negative.
  *
  * <p>
- * This is a <a href="{@docRoot}/java/lang/doc-files/ValueBased.html">value-based</a>
+ * This is a <a href="{@docRoot}/java.base/java/lang/doc-files/ValueBased.html">value-based</a>
  * class; use of identity-sensitive operations (including reference equality
  * ({@code ==}), identity hash code, or synchronization) on instances of
  * {@code Period} may have unpredictable results and should be avoided.
--- a/src/java.base/share/classes/java/time/Year.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/share/classes/java/time/Year.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -121,7 +121,7 @@
  * to be accurate will find the ISO-8601 approach unsuitable.
  *
  * <p>
- * This is a <a href="{@docRoot}/java/lang/doc-files/ValueBased.html">value-based</a>
+ * This is a <a href="{@docRoot}/java.base/java/lang/doc-files/ValueBased.html">value-based</a>
  * class; use of identity-sensitive operations (including reference equality
  * ({@code ==}), identity hash code, or synchronization) on instances of
  * {@code Year} may have unpredictable results and should be avoided.
--- a/src/java.base/share/classes/java/time/YearMonth.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/share/classes/java/time/YearMonth.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -117,7 +117,7 @@
  * to be accurate will find the ISO-8601 approach unsuitable.
  *
  * <p>
- * This is a <a href="{@docRoot}/java/lang/doc-files/ValueBased.html">value-based</a>
+ * This is a <a href="{@docRoot}/java.base/java/lang/doc-files/ValueBased.html">value-based</a>
  * class; use of identity-sensitive operations (including reference equality
  * ({@code ==}), identity hash code, or synchronization) on instances of
  * {@code YearMonth} may have unpredictable results and should be avoided.
--- a/src/java.base/share/classes/java/time/ZoneId.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/share/classes/java/time/ZoneId.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -162,7 +162,7 @@
  * queried, but not modified, on a Java Runtime with incomplete time-zone information.
  *
  * <p>
- * This is a <a href="{@docRoot}/java/lang/doc-files/ValueBased.html">value-based</a>
+ * This is a <a href="{@docRoot}/java.base/java/lang/doc-files/ValueBased.html">value-based</a>
  * class; use of identity-sensitive operations (including reference equality
  * ({@code ==}), identity hash code, or synchronization) on instances of
  * {@code ZoneId} may have unpredictable results and should be avoided.
--- a/src/java.base/share/classes/java/time/ZoneOffset.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/share/classes/java/time/ZoneOffset.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -116,7 +116,7 @@
  * applications must not rely on such caching.
  *
  * <p>
- * This is a <a href="{@docRoot}/java/lang/doc-files/ValueBased.html">value-based</a>
+ * This is a <a href="{@docRoot}/java.base/java/lang/doc-files/ValueBased.html">value-based</a>
  * class; use of identity-sensitive operations (including reference equality
  * ({@code ==}), identity hash code, or synchronization) on instances of
  * {@code ZoneOffset} may have unpredictable results and should be avoided.
--- a/src/java.base/share/classes/java/time/ZonedDateTime.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/share/classes/java/time/ZonedDateTime.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -144,7 +144,7 @@
  * represents an instant, especially during a daylight savings overlap.
  *
  * <p>
- * This is a <a href="{@docRoot}/java/lang/doc-files/ValueBased.html">value-based</a>
+ * This is a <a href="{@docRoot}/java.base/java/lang/doc-files/ValueBased.html">value-based</a>
  * class; use of identity-sensitive operations (including reference equality
  * ({@code ==}), identity hash code, or synchronization) on instances of
  * {@code ZonedDateTime} may have unpredictable results and should be avoided.
--- a/src/java.base/share/classes/java/time/chrono/HijrahDate.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/share/classes/java/time/chrono/HijrahDate.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -105,7 +105,7 @@
  * to a new HijrahChronology.
  *
  * <p>
- * This is a <a href="{@docRoot}/java/lang/doc-files/ValueBased.html">value-based</a>
+ * This is a <a href="{@docRoot}/java.base/java/lang/doc-files/ValueBased.html">value-based</a>
  * class; use of identity-sensitive operations (including reference equality
  * ({@code ==}), identity hash code, or synchronization) on instances of
  * {@code HijrahDate} may have unpredictable results and should be avoided.
--- a/src/java.base/share/classes/java/time/chrono/JapaneseDate.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/share/classes/java/time/chrono/JapaneseDate.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -112,7 +112,7 @@
  * {@code JapaneseChronology.ERA_HEISEI}.<br>
  *
  * <p>
- * This is a <a href="{@docRoot}/java/lang/doc-files/ValueBased.html">value-based</a>
+ * This is a <a href="{@docRoot}/java.base/java/lang/doc-files/ValueBased.html">value-based</a>
  * class; use of identity-sensitive operations (including reference equality
  * ({@code ==}), identity hash code, or synchronization) on instances of
  * {@code JapaneseDate} may have unpredictable results and should be avoided.
--- a/src/java.base/share/classes/java/time/chrono/MinguoDate.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/share/classes/java/time/chrono/MinguoDate.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -92,7 +92,7 @@
  * Dates are aligned such that {@code 0001-01-01 (Minguo)} is {@code 1912-01-01 (ISO)}.
  *
  * <p>
- * This is a <a href="{@docRoot}/java/lang/doc-files/ValueBased.html">value-based</a>
+ * This is a <a href="{@docRoot}/java.base/java/lang/doc-files/ValueBased.html">value-based</a>
  * class; use of identity-sensitive operations (including reference equality
  * ({@code ==}), identity hash code, or synchronization) on instances of
  * {@code MinguoDate} may have unpredictable results and should be avoided.
--- a/src/java.base/share/classes/java/time/chrono/ThaiBuddhistDate.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/share/classes/java/time/chrono/ThaiBuddhistDate.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -92,7 +92,7 @@
  * Dates are aligned such that {@code 2484-01-01 (Buddhist)} is {@code 1941-01-01 (ISO)}.
  *
  * <p>
- * This is a <a href="{@docRoot}/java/lang/doc-files/ValueBased.html">value-based</a>
+ * This is a <a href="{@docRoot}/java.base/java/lang/doc-files/ValueBased.html">value-based</a>
  * class; use of identity-sensitive operations (including reference equality
  * ({@code ==}), identity hash code, or synchronization) on instances of
  * {@code ThaiBuddhistDate} may have unpredictable results and should be avoided.
--- a/src/java.base/share/classes/java/time/chrono/package-info.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/share/classes/java/time/chrono/package-info.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -95,7 +95,7 @@
  * <li>{@link java.time.chrono.ThaiBuddhistChronology Thai Buddhist calendar}</li>
  * </ul>
  *
- * <h3>Example</h3>
+ * <h2>Example</h2>
  * <p>
  * This example lists todays date for all of the available calendars.
  * </p>
@@ -155,7 +155,7 @@
  *                 first, last);
  *  </pre>
  *
- * <h3>Package specification</h3>
+ * <h2>Package specification</h2>
  * <p>
  * Unless otherwise noted, passing a null argument to a constructor or method in any class or interface
  * in this package will cause a {@link java.lang.NullPointerException NullPointerException} to be thrown.
--- a/src/java.base/share/classes/java/time/format/package-info.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/share/classes/java/time/format/package-info.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -79,7 +79,7 @@
  * {@link java.time.format.DecimalStyle DecimalStyle}.
  * </p>
  *
- * <h3>Package specification</h3>
+ * <h2>Package specification</h2>
  * <p>
  * Unless otherwise noted, passing a null argument to a constructor or method in any class or interface
  * in this package will cause a {@link java.lang.NullPointerException NullPointerException} to be thrown.
--- a/src/java.base/share/classes/java/time/package-info.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/share/classes/java/time/package-info.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -90,7 +90,7 @@
  * The calendar neutral API should be reserved for interactions with users.
  * </p>
  *
- * <h3>Dates and Times</h3>
+ * <h2>Dates and Times</h2>
  * <p>
  * {@link java.time.Instant} is essentially a numeric timestamp.
  * The current Instant can be retrieved from a {@link java.time.Clock}.
@@ -118,7 +118,7 @@
  * The widespread use of time-zones tends to add considerable complexity to an application.
  * </p>
  *
- * <h3>Duration and Period</h3>
+ * <h2>Duration and Period</h2>
  * <p>
  * Beyond dates and times, the API also allows the storage of periods and durations of time.
  * A {@link java.time.Duration} is a simple measure of time along the time-line in nanoseconds.
@@ -126,7 +126,7 @@
  * to humans, such as years or days.
  * </p>
  *
- * <h3>Additional value types</h3>
+ * <h2>Additional value types</h2>
  * <p>
  * {@link java.time.Month} stores a month on its own.
  * This stores a single month-of-year in isolation, such as 'DECEMBER'.
@@ -160,7 +160,7 @@
  * but contains less information than a full time-zone.
  * </p>
  *
- * <h3>Package specification</h3>
+ * <h2>Package specification</h2>
  * <p>
  * Unless otherwise noted, passing a null argument to a constructor or method in any class or interface
  * in this package will cause a {@link java.lang.NullPointerException NullPointerException} to be thrown.
@@ -172,7 +172,7 @@
  * or a {@link java.time.DateTimeException}.
  * </p>
  *
- * <h3>Design notes (non normative)</h3>
+ * <h2>Design notes (non normative)</h2>
  * <p>
  * The API has been designed to reject null early and to be clear about this behavior.
  * A key exception is any method that takes an object and returns a boolean, for the purpose
--- a/src/java.base/share/classes/java/time/temporal/package-info.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/share/classes/java/time/temporal/package-info.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -75,7 +75,7 @@
  * <li>Different definitions of weeks</li>
  * </ul>
  *
- * <h3>Fields and Units</h3>
+ * <h2>Fields and Units</h2>
  * <p>
  * Dates and times are expressed in terms of fields and units.
  * A unit is used to measure an amount of time, such as years, days or minutes.
@@ -106,7 +106,7 @@
  * The fields also provide access to the range of valid values.
  * </p>
  *
- * <h3>Adjustment and Query</h3>
+ * <h2>Adjustment and Query</h2>
  * <p>
  * A key part of the date-time problem space is adjusting a date to a new, related value,
  * such as the "last day of the month", or "next Wednesday".
@@ -131,7 +131,7 @@
  * Applications can also define queries by implementing {@link java.time.temporal.TemporalQuery}.
  * </p>
  *
- * <h3>Weeks</h3>
+ * <h2>Weeks</h2>
  * <p>
  * Different locales have different definitions of the week.
  * For example, in Europe the week typically starts on a Monday, while in the US it starts on a Sunday.
@@ -143,7 +143,7 @@
  * This is modeled in {@link java.time.temporal.IsoFields}.
  * </p>
  *
- * <h3>Package specification</h3>
+ * <h2>Package specification</h2>
  * <p>
  * Unless otherwise noted, passing a null argument to a constructor or method in any class or interface
  * in this package will cause a {@link java.lang.NullPointerException NullPointerException} to be thrown.
--- a/src/java.base/share/classes/java/time/zone/package-info.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/share/classes/java/time/zone/package-info.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -70,7 +70,7 @@
  * gaps and overlaps in the local time-line typically caused by Daylight Saving Time.
  * </p>
  *
- * <h3>Package specification</h3>
+ * <h2>Package specification</h2>
  * <p>
  * Unless otherwise noted, passing a null argument to a constructor or method in any class or interface
  * in this package will cause a {@link java.lang.NullPointerException NullPointerException} to be thrown.
--- a/src/java.base/share/classes/java/util/AbstractCollection.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/share/classes/java/util/AbstractCollection.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -49,7 +49,7 @@
  * the collection being implemented admits a more efficient implementation.<p>
  *
  * This class is a member of the
- * <a href="{@docRoot}/java/util/package-summary.html#CollectionsFramework">
+ * <a href="{@docRoot}/java.base/java/util/package-summary.html#CollectionsFramework">
  * Java Collections Framework</a>.
  *
  * @author  Josh Bloch
--- a/src/java.base/share/classes/java/util/AbstractList.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/share/classes/java/util/AbstractList.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -62,7 +62,7 @@
  * collection being implemented admits a more efficient implementation.
  *
  * <p>This class is a member of the
- * <a href="{@docRoot}/java/util/package-summary.html#CollectionsFramework">
+ * <a href="{@docRoot}/java.base/java/util/package-summary.html#CollectionsFramework">
  * Java Collections Framework</a>.
  *
  * @author  Josh Bloch
--- a/src/java.base/share/classes/java/util/AbstractMap.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/share/classes/java/util/AbstractMap.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -52,7 +52,7 @@
  * map being implemented admits a more efficient implementation.
  *
  * <p>This class is a member of the
- * <a href="{@docRoot}/java/util/package-summary.html#CollectionsFramework">
+ * <a href="{@docRoot}/java.base/java/util/package-summary.html#CollectionsFramework">
  * Java Collections Framework</a>.
  *
  * @param <K> the type of keys maintained by this map
--- a/src/java.base/share/classes/java/util/AbstractQueue.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/share/classes/java/util/AbstractQueue.java	Fri Apr 06 03:53:28 2018 +0200
@@ -54,7 +54,7 @@
  * instead subclassing {@link AbstractCollection}.
  *
  * <p>This class is a member of the
- * <a href="{@docRoot}/java/util/package-summary.html#CollectionsFramework">
+ * <a href="{@docRoot}/java.base/java/util/package-summary.html#CollectionsFramework">
  * Java Collections Framework</a>.
  *
  * @since 1.5
--- a/src/java.base/share/classes/java/util/AbstractSequentialList.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/share/classes/java/util/AbstractSequentialList.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -54,7 +54,7 @@
  * specification.<p>
  *
  * This class is a member of the
- * <a href="{@docRoot}/java/util/package-summary.html#CollectionsFramework">
+ * <a href="{@docRoot}/java.base/java/util/package-summary.html#CollectionsFramework">
  * Java Collections Framework</a>.
  *
  * @author  Josh Bloch
--- a/src/java.base/share/classes/java/util/AbstractSet.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/share/classes/java/util/AbstractSet.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -42,7 +42,7 @@
  * for {@code equals} and {@code hashCode}.<p>
  *
  * This class is a member of the
- * <a href="{@docRoot}/java/util/package-summary.html#CollectionsFramework">
+ * <a href="{@docRoot}/java.base/java/util/package-summary.html#CollectionsFramework">
  * Java Collections Framework</a>.
  *
  * @param <E> the type of elements maintained by this set
--- a/src/java.base/share/classes/java/util/ArrayDeque.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/share/classes/java/util/ArrayDeque.java	Fri Apr 06 03:53:28 2018 +0200
@@ -80,7 +80,7 @@
  * Iterator} interfaces.
  *
  * <p>This class is a member of the
- * <a href="{@docRoot}/java/util/package-summary.html#CollectionsFramework">
+ * <a href="{@docRoot}/java.base/java/util/package-summary.html#CollectionsFramework">
  * Java Collections Framework</a>.
  *
  * @author  Josh Bloch and Doug Lea
--- a/src/java.base/share/classes/java/util/ArrayList.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/share/classes/java/util/ArrayList.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -92,7 +92,7 @@
  * should be used only to detect bugs.</i>
  *
  * <p>This class is a member of the
- * <a href="{@docRoot}/java/util/package-summary.html#CollectionsFramework">
+ * <a href="{@docRoot}/java.base/java/util/package-summary.html#CollectionsFramework">
  * Java Collections Framework</a>.
  *
  * @param <E> the type of elements in this list
--- a/src/java.base/share/classes/java/util/Arrays.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/share/classes/java/util/Arrays.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -63,7 +63,7 @@
  * a MergeSort, but it does have to be <i>stable</i>.)
  *
  * <p>This class is a member of the
- * <a href="{@docRoot}/java/util/package-summary.html#CollectionsFramework">
+ * <a href="{@docRoot}/java.base/java/util/package-summary.html#CollectionsFramework">
  * Java Collections Framework</a>.
  *
  * @author Josh Bloch
--- a/src/java.base/share/classes/java/util/Collection.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/share/classes/java/util/Collection.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -188,7 +188,7 @@
  * unmodifiable view, the view can be considered effectively immutable.
  *
  * <p>This interface is a member of the
- * <a href="{@docRoot}/java/util/package-summary.html#CollectionsFramework">
+ * <a href="{@docRoot}/java.base/java/util/package-summary.html#CollectionsFramework">
  * Java Collections Framework</a>.
  *
  * @implSpec
@@ -247,10 +247,10 @@
      *         element
      * @throws ClassCastException if the type of the specified element
      *         is incompatible with this collection
-     *         (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
+     *         (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
      * @throws NullPointerException if the specified element is null and this
      *         collection does not permit null elements
-     *         (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
+     *         (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
      */
     boolean contains(Object o);
 
@@ -379,10 +379,10 @@
      * @return {@code true} if an element was removed as a result of this call
      * @throws ClassCastException if the type of the specified element
      *         is incompatible with this collection
-     *         (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
+     *         (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
      * @throws NullPointerException if the specified element is null and this
      *         collection does not permit null elements
-     *         (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
+     *         (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
      * @throws UnsupportedOperationException if the {@code remove} operation
      *         is not supported by this collection
      */
@@ -401,11 +401,11 @@
      * @throws ClassCastException if the types of one or more elements
      *         in the specified collection are incompatible with this
      *         collection
-     *         (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
+     *         (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
      * @throws NullPointerException if the specified collection contains one
      *         or more null elements and this collection does not permit null
      *         elements
-     *         (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>),
+     *         (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>),
      *         or if the specified collection is null.
      * @see    #contains(Object)
      */
@@ -451,11 +451,11 @@
      * @throws ClassCastException if the types of one or more elements
      *         in this collection are incompatible with the specified
      *         collection
-     *         (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
+     *         (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
      * @throws NullPointerException if this collection contains one or more
      *         null elements and the specified collection does not support
      *         null elements
-     *         (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>),
+     *         (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>),
      *         or if the specified collection is null
      * @see #remove(Object)
      * @see #contains(Object)
@@ -510,11 +510,11 @@
      * @throws ClassCastException if the types of one or more elements
      *         in this collection are incompatible with the specified
      *         collection
-     *         (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
+     *         (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
      * @throws NullPointerException if this collection contains one or more
      *         null elements and the specified collection does not permit null
      *         elements
-     *         (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>),
+     *         (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>),
      *         or if the specified collection is null
      * @see #remove(Object)
      * @see #contains(Object)
--- a/src/java.base/share/classes/java/util/Collections.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/share/classes/java/util/Collections.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -66,7 +66,7 @@
  * already sorted may or may not throw {@code UnsupportedOperationException}.
  *
  * <p>This class is a member of the
- * <a href="{@docRoot}/java/util/package-summary.html#CollectionsFramework">
+ * <a href="{@docRoot}/java.base/java/util/package-summary.html#CollectionsFramework">
  * Java Collections Framework</a>.
  *
  * @author  Josh Bloch
--- a/src/java.base/share/classes/java/util/Comparator.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/share/classes/java/util/Comparator.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -94,7 +94,7 @@
  * an equivalence relation.
  *
  * <p>This interface is a member of the
- * <a href="{@docRoot}/java/util/package-summary.html#CollectionsFramework">
+ * <a href="{@docRoot}/java.base/java/util/package-summary.html#CollectionsFramework">
  * Java Collections Framework</a>.
  *
  * @param <T> the type of objects that may be compared by this comparator
--- a/src/java.base/share/classes/java/util/Deque.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/share/classes/java/util/Deque.java	Fri Apr 06 03:53:28 2018 +0200
@@ -193,7 +193,7 @@
  * {@code Object}.
  *
  * <p>This interface is a member of the
- * <a href="{@docRoot}/java/util/package-summary.html#CollectionsFramework">
+ * <a href="{@docRoot}/java.base/java/util/package-summary.html#CollectionsFramework">
  * Java Collections Framework</a>.
  *
  * @author Doug Lea
@@ -363,10 +363,10 @@
      * @return {@code true} if an element was removed as a result of this call
      * @throws ClassCastException if the class of the specified element
      *         is incompatible with this deque
-     * (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
+     * (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
      * @throws NullPointerException if the specified element is null and this
      *         deque does not permit null elements
-     * (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
+     * (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
      */
     boolean removeFirstOccurrence(Object o);
 
@@ -382,10 +382,10 @@
      * @return {@code true} if an element was removed as a result of this call
      * @throws ClassCastException if the class of the specified element
      *         is incompatible with this deque
-     * (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
+     * (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
      * @throws NullPointerException if the specified element is null and this
      *         deque does not permit null elements
-     * (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
+     * (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
      */
     boolean removeLastOccurrence(Object o);
 
@@ -565,10 +565,10 @@
      * @return {@code true} if an element was removed as a result of this call
      * @throws ClassCastException if the class of the specified element
      *         is incompatible with this deque
-     * (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
+     * (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
      * @throws NullPointerException if the specified element is null and this
      *         deque does not permit null elements
-     * (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
+     * (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
      */
     boolean remove(Object o);
 
@@ -581,10 +581,10 @@
      * @return {@code true} if this deque contains the specified element
      * @throws ClassCastException if the class of the specified element
      *         is incompatible with this deque
-     * (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
+     * (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
      * @throws NullPointerException if the specified element is null and this
      *         deque does not permit null elements
-     * (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
+     * (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
      */
     boolean contains(Object o);
 
--- a/src/java.base/share/classes/java/util/EnumMap.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/share/classes/java/util/EnumMap.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -68,7 +68,7 @@
  * {@link HashMap} counterparts.
  *
  * <p>This class is a member of the
- * <a href="{@docRoot}/java/util/package-summary.html#CollectionsFramework">
+ * <a href="{@docRoot}/java.base/java/util/package-summary.html#CollectionsFramework">
  * Java Collections Framework</a>.
  *
  * @author Josh Bloch
--- a/src/java.base/share/classes/java/util/EnumSet.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/share/classes/java/util/EnumSet.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -69,7 +69,7 @@
  * constant time if their argument is also an enum set.
  *
  * <p>This class is a member of the
- * <a href="{@docRoot}/java/util/package-summary.html#CollectionsFramework">
+ * <a href="{@docRoot}/java.base/java/util/package-summary.html#CollectionsFramework">
  * Java Collections Framework</a>.
  *
  * @author Josh Bloch
--- a/src/java.base/share/classes/java/util/HashMap.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/share/classes/java/util/HashMap.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -118,7 +118,7 @@
  * should be used only to detect bugs.</i>
  *
  * <p>This class is a member of the
- * <a href="{@docRoot}/java/util/package-summary.html#CollectionsFramework">
+ * <a href="{@docRoot}/java.base/java/util/package-summary.html#CollectionsFramework">
  * Java Collections Framework</a>.
  *
  * @param <K> the type of keys maintained by this map
--- a/src/java.base/share/classes/java/util/HashSet.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/share/classes/java/util/HashSet.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -73,7 +73,7 @@
  * should be used only to detect bugs.</i>
  *
  * <p>This class is a member of the
- * <a href="{@docRoot}/java/util/package-summary.html#CollectionsFramework">
+ * <a href="{@docRoot}/java.base/java/util/package-summary.html#CollectionsFramework">
  * Java Collections Framework</a>.
  *
  * @param <E> the type of elements maintained by this set
--- a/src/java.base/share/classes/java/util/Hashtable.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/share/classes/java/util/Hashtable.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1994, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1994, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -107,7 +107,7 @@
  *
  * <p>As of the Java 2 platform v1.2, this class was retrofitted to
  * implement the {@link Map} interface, making it a member of the
- * <a href="{@docRoot}/java/util/package-summary.html#CollectionsFramework">
+ * <a href="{@docRoot}/java.base/java/util/package-summary.html#CollectionsFramework">
  *
  * Java Collections Framework</a>.  Unlike the new collection
  * implementations, {@code Hashtable} is synchronized.  If a
--- a/src/java.base/share/classes/java/util/IdentityHashMap.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/share/classes/java/util/IdentityHashMap.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -123,7 +123,7 @@
  * {@link HashMap} (which uses <i>chaining</i> rather than linear-probing).
  *
  * <p>This class is a member of the
- * <a href="{@docRoot}/java/util/package-summary.html#CollectionsFramework">
+ * <a href="{@docRoot}/java.base/java/util/package-summary.html#CollectionsFramework">
  * Java Collections Framework</a>.
  *
  * @see     System#identityHashCode(Object)
--- a/src/java.base/share/classes/java/util/Iterator.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/share/classes/java/util/Iterator.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -40,7 +40,7 @@
  * </ul>
  *
  * <p>This interface is a member of the
- * <a href="{@docRoot}/java/util/package-summary.html#CollectionsFramework">
+ * <a href="{@docRoot}/java.base/java/util/package-summary.html#CollectionsFramework">
  * Java Collections Framework</a>.
  *
  * @apiNote
--- a/src/java.base/share/classes/java/util/LinkedHashMap.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/share/classes/java/util/LinkedHashMap.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -140,7 +140,7 @@
  * <em>fail-fast</em>, and additionally report {@link Spliterator#ORDERED}.
  *
  * <p>This class is a member of the
- * <a href="{@docRoot}/java/util/package-summary.html#CollectionsFramework">
+ * <a href="{@docRoot}/java.base/java/util/package-summary.html#CollectionsFramework">
  * Java Collections Framework</a>.
  *
  * @implNote
--- a/src/java.base/share/classes/java/util/LinkedHashSet.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/share/classes/java/util/LinkedHashSet.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -100,7 +100,7 @@
  * should be used only to detect bugs.</i>
  *
  * <p>This class is a member of the
- * <a href="{@docRoot}/java/util/package-summary.html#CollectionsFramework">
+ * <a href="{@docRoot}/java.base/java/util/package-summary.html#CollectionsFramework">
  * Java Collections Framework</a>.
  *
  * @param <E> the type of elements maintained by this set
--- a/src/java.base/share/classes/java/util/LinkedList.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/share/classes/java/util/LinkedList.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -70,7 +70,7 @@
  * should be used only to detect bugs.</i>
  *
  * <p>This class is a member of the
- * <a href="{@docRoot}/java/util/package-summary.html#CollectionsFramework">
+ * <a href="{@docRoot}/java.base/java/util/package-summary.html#CollectionsFramework">
  * Java Collections Framework</a>.
  *
  * @author  Josh Bloch
--- a/src/java.base/share/classes/java/util/List.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/share/classes/java/util/List.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -115,7 +115,7 @@
  * </ul>
  *
  * <p>This interface is a member of the
- * <a href="{@docRoot}/java/util/package-summary.html#CollectionsFramework">
+ * <a href="{@docRoot}/java.base/java/util/package-summary.html#CollectionsFramework">
  * Java Collections Framework</a>.
  *
  * @param <E> the type of elements in this list
--- a/src/java.base/share/classes/java/util/ListIterator.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/share/classes/java/util/ListIterator.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -46,7 +46,7 @@
  * {@link #previous()}.
  *
  * <p>This interface is a member of the
- * <a href="{@docRoot}/java/util/package-summary.html#CollectionsFramework">
+ * <a href="{@docRoot}/java.base/java/util/package-summary.html#CollectionsFramework">
  * Java Collections Framework</a>.
  *
  * @author  Josh Bloch
--- a/src/java.base/share/classes/java/util/Map.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/share/classes/java/util/Map.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -141,7 +141,7 @@
  * </ul>
  *
  * <p>This interface is a member of the
- * <a href="{@docRoot}/java/util/package-summary.html#CollectionsFramework">
+ * <a href="{@docRoot}/java.base/java/util/package-summary.html#CollectionsFramework">
  * Java Collections Framework</a>.
  *
  * @param <K> the type of keys maintained by this map
@@ -187,10 +187,10 @@
      *         key
      * @throws ClassCastException if the key is of an inappropriate type for
      *         this map
-     * (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
+     * (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
      * @throws NullPointerException if the specified key is null and this map
      *         does not permit null keys
-     * (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
+     * (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
      */
     boolean containsKey(Object key);
 
@@ -207,10 +207,10 @@
      *         specified value
      * @throws ClassCastException if the value is of an inappropriate type for
      *         this map
-     * (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
+     * (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
      * @throws NullPointerException if the specified value is null and this
      *         map does not permit null values
-     * (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
+     * (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
      */
     boolean containsValue(Object value);
 
@@ -235,10 +235,10 @@
      *         {@code null} if this map contains no mapping for the key
      * @throws ClassCastException if the key is of an inappropriate type for
      *         this map
-     * (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
+     * (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
      * @throws NullPointerException if the specified key is null and this map
      *         does not permit null keys
-     * (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
+     * (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
      */
     V get(Object key);
 
@@ -295,10 +295,10 @@
      *         is not supported by this map
      * @throws ClassCastException if the key is of an inappropriate type for
      *         this map
-     * (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
+     * (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
      * @throws NullPointerException if the specified key is null and this
      *         map does not permit null keys
-     * (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
+     * (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
      */
     V remove(Object key);
 
@@ -608,10 +608,10 @@
      * {@code defaultValue} if this map contains no mapping for the key
      * @throws ClassCastException if the key is of an inappropriate type for
      * this map
-     * (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
+     * (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
      * @throws NullPointerException if the specified key is null and this map
      * does not permit null keys
-     * (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
+     * (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
      * @since 1.8
      */
     default V getOrDefault(Object key, V defaultValue) {
@@ -690,13 +690,13 @@
      * values
      * @throws ClassCastException if a replacement value is of an inappropriate
      *         type for this map
-     *         (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
+     *         (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
      * @throws NullPointerException if function or a replacement value is null,
      *         and this map does not permit null keys or values
-     *         (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
+     *         (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
      * @throws IllegalArgumentException if some property of a replacement value
      *         prevents it from being stored in this map
-     *         (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
+     *         (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
      * @throws ConcurrentModificationException if an entry is found to be
      * removed during iteration
      * @since 1.8
@@ -757,16 +757,16 @@
      *         if the implementation supports null values.)
      * @throws UnsupportedOperationException if the {@code put} operation
      *         is not supported by this map
-     *         (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
+     *         (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
      * @throws ClassCastException if the key or value is of an inappropriate
      *         type for this map
-     *         (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
+     *         (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
      * @throws NullPointerException if the specified key or value is null,
      *         and this map does not permit null keys or values
-     *         (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
+     *         (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
      * @throws IllegalArgumentException if some property of the specified key
      *         or value prevents it from being stored in this map
-     *         (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
+     *         (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
      * @since 1.8
      */
     default V putIfAbsent(K key, V value) {
@@ -803,13 +803,13 @@
      * @return {@code true} if the value was removed
      * @throws UnsupportedOperationException if the {@code remove} operation
      *         is not supported by this map
-     *         (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
+     *         (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
      * @throws ClassCastException if the key or value is of an inappropriate
      *         type for this map
-     *         (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
+     *         (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
      * @throws NullPointerException if the specified key or value is null,
      *         and this map does not permit null keys or values
-     *         (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
+     *         (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
      * @since 1.8
      */
     default boolean remove(Object key, Object value) {
@@ -852,14 +852,14 @@
      * @return {@code true} if the value was replaced
      * @throws UnsupportedOperationException if the {@code put} operation
      *         is not supported by this map
-     *         (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
+     *         (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
      * @throws ClassCastException if the class of a specified key or value
      *         prevents it from being stored in this map
      * @throws NullPointerException if a specified key or newValue is null,
      *         and this map does not permit null keys or values
      * @throws NullPointerException if oldValue is null and this map does not
      *         permit null values
-     *         (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
+     *         (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
      * @throws IllegalArgumentException if some property of a specified key
      *         or value prevents it from being stored in this map
      * @since 1.8
@@ -902,10 +902,10 @@
      *         if the implementation supports null values.)
      * @throws UnsupportedOperationException if the {@code put} operation
      *         is not supported by this map
-     *         (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
+     *         (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
      * @throws ClassCastException if the class of the specified key or value
      *         prevents it from being stored in this map
-     *         (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
+     *         (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
      * @throws NullPointerException if the specified key or value is null,
      *         and this map does not permit null keys or values
      * @throws IllegalArgumentException if some property of the specified key
@@ -985,13 +985,13 @@
      *         is null
      * @throws UnsupportedOperationException if the {@code put} operation
      *         is not supported by this map
-     *         (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
+     *         (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
      * @throws ClassCastException if the class of the specified key or value
      *         prevents it from being stored in this map
-     *         (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
+     *         (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
      * @throws IllegalArgumentException if some property of the specified key
      *         or value prevents it from being stored in this map
-     *         (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
+     *         (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
      * @since 1.8
      */
     default V computeIfAbsent(K key,
@@ -1062,13 +1062,13 @@
      *         remappingFunction is null
      * @throws UnsupportedOperationException if the {@code put} operation
      *         is not supported by this map
-     *         (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
+     *         (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
      * @throws ClassCastException if the class of the specified key or value
      *         prevents it from being stored in this map
-     *         (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
+     *         (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
      * @throws IllegalArgumentException if some property of the specified key
      *         or value prevents it from being stored in this map
-     *         (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
+     *         (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
      * @since 1.8
      */
     default V computeIfPresent(K key,
@@ -1154,13 +1154,13 @@
      *         remappingFunction is null
      * @throws UnsupportedOperationException if the {@code put} operation
      *         is not supported by this map
-     *         (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
+     *         (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
      * @throws ClassCastException if the class of the specified key or value
      *         prevents it from being stored in this map
-     *         (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
+     *         (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
      * @throws IllegalArgumentException if some property of the specified key
      *         or value prevents it from being stored in this map
-     *         (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
+     *         (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
      * @since 1.8
      */
     default V compute(K key,
@@ -1249,13 +1249,13 @@
      *         value is associated with the key
      * @throws UnsupportedOperationException if the {@code put} operation
      *         is not supported by this map
-     *         (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
+     *         (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
      * @throws ClassCastException if the class of the specified key or value
      *         prevents it from being stored in this map
-     *         (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
+     *         (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
      * @throws IllegalArgumentException if some property of the specified key
      *         or value prevents it from being stored in this map
-     *         (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
+     *         (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
      * @throws NullPointerException if the specified key is null and this map
      *         does not support null keys or the value or remappingFunction is
      *         null
--- a/src/java.base/share/classes/java/util/NavigableMap.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/share/classes/java/util/NavigableMap.java	Fri Apr 06 03:53:28 2018 +0200
@@ -85,7 +85,7 @@
  * {@link #keySet()} can be overridden to return {@link NavigableSet}.
  *
  * <p>This interface is a member of the
- * <a href="{@docRoot}/java/util/package-summary.html#CollectionsFramework">
+ * <a href="{@docRoot}/java.base/java/util/package-summary.html#CollectionsFramework">
  * Java Collections Framework</a>.
  *
  * @author Doug Lea
--- a/src/java.base/share/classes/java/util/NavigableSet.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/share/classes/java/util/NavigableSet.java	Fri Apr 06 03:53:28 2018 +0200
@@ -79,7 +79,7 @@
  * {@code NavigableSet}.
  *
  * <p>This interface is a member of the
- * <a href="{@docRoot}/java/util/package-summary.html#CollectionsFramework">
+ * <a href="{@docRoot}/java.base/java/util/package-summary.html#CollectionsFramework">
  * Java Collections Framework</a>.
  *
  * @author Doug Lea
--- a/src/java.base/share/classes/java/util/PriorityQueue.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/share/classes/java/util/PriorityQueue.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -74,7 +74,7 @@
  * ({@code peek}, {@code element}, and {@code size}).
  *
  * <p>This class is a member of the
- * <a href="{@docRoot}/java/util/package-summary.html#CollectionsFramework">
+ * <a href="{@docRoot}/java.base/java/util/package-summary.html#CollectionsFramework">
  * Java Collections Framework</a>.
  *
  * @since 1.5
--- a/src/java.base/share/classes/java/util/Queue.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/share/classes/java/util/Queue.java	Fri Apr 06 03:53:28 2018 +0200
@@ -128,7 +128,7 @@
  * ordering properties.
  *
  * <p>This interface is a member of the
- * <a href="{@docRoot}/java/util/package-summary.html#CollectionsFramework">
+ * <a href="{@docRoot}/java.base/java/util/package-summary.html#CollectionsFramework">
  * Java Collections Framework</a>.
  *
  * @since 1.5
--- a/src/java.base/share/classes/java/util/RandomAccess.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/share/classes/java/util/RandomAccess.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -59,7 +59,7 @@
  * </pre>
  *
  * <p>This interface is a member of the
- * <a href="{@docRoot}/java/util/package-summary.html#CollectionsFramework">
+ * <a href="{@docRoot}/java.base/java/util/package-summary.html#CollectionsFramework">
  * Java Collections Framework</a>.
  *
  * @since 1.4
--- a/src/java.base/share/classes/java/util/ResourceBundle.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/share/classes/java/util/ResourceBundle.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -251,7 +251,7 @@
  * or "{@code java.properties}" format are searched.
  *
  * <p>If the caller module is a
- * <a href="{@docRoot}/java/util/spi/ResourceBundleProvider.html#obtain-resource-bundle">
+ * <a href="{@docRoot}/java.base/java/util/spi/ResourceBundleProvider.html#obtain-resource-bundle">
  * resource bundle provider</a>, it does not fall back to the
  * class loader search.
  *
@@ -260,7 +260,7 @@
  * A common format of resource bundles is in {@linkplain PropertyResourceBundle
  * .properties} file format.  Typically {@code .properties} resource bundles
  * are packaged in a JAR file.  Resource bundle only JAR file can be readily
- * deployed as an <a href="{@docRoot}/java/lang/module/ModuleFinder.html#automatic-modules">
+ * deployed as an <a href="{@docRoot}/java.base/java/lang/module/ModuleFinder.html#automatic-modules">
  * automatic module</a>.  For example, if the JAR file contains the
  * entry "{@code p/q/Foo_ja.properties}" and no {@code .class} entry,
  * when resolved and defined as an automatic module, no package is derived
--- a/src/java.base/share/classes/java/util/Set.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/share/classes/java/util/Set.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -92,7 +92,7 @@
  * </ul>
  *
  * <p>This interface is a member of the
- * <a href="{@docRoot}/java/util/package-summary.html#CollectionsFramework">
+ * <a href="{@docRoot}/java.base/java/util/package-summary.html#CollectionsFramework">
  * Java Collections Framework</a>.
  *
  * @param <E> the type of elements maintained by this set
--- a/src/java.base/share/classes/java/util/SortedMap.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/share/classes/java/util/SortedMap.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -93,7 +93,7 @@
  *   SortedMap&lt;String, V&gt; sub = m.subMap(low+"\0", high);</pre>
  *
  * <p>This interface is a member of the
- * <a href="{@docRoot}/java/util/package-summary.html#CollectionsFramework">
+ * <a href="{@docRoot}/java.base/java/util/package-summary.html#CollectionsFramework">
  * Java Collections Framework</a>.
  *
  * @param <K> the type of keys maintained by this map
--- a/src/java.base/share/classes/java/util/SortedSet.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/share/classes/java/util/SortedSet.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -89,7 +89,7 @@
  *   SortedSet&lt;String&gt; sub = s.subSet(low+"\0", high);</pre>
  *
  * <p>This interface is a member of the
- * <a href="{@docRoot}/java/util/package-summary.html#CollectionsFramework">
+ * <a href="{@docRoot}/java.base/java/util/package-summary.html#CollectionsFramework">
  * Java Collections Framework</a>.
  *
  * @param <E> the type of elements maintained by this set
--- a/src/java.base/share/classes/java/util/TreeMap.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/share/classes/java/util/TreeMap.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -92,7 +92,7 @@
  * associated map using {@code put}.)
  *
  * <p>This class is a member of the
- * <a href="{@docRoot}/java/util/package-summary.html#CollectionsFramework">
+ * <a href="{@docRoot}/java.base/java/util/package-summary.html#CollectionsFramework">
  * Java Collections Framework</a>.
  *
  * @param <K> the type of keys maintained by this map
--- a/src/java.base/share/classes/java/util/TreeSet.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/share/classes/java/util/TreeSet.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -74,7 +74,7 @@
  * should be used only to detect bugs.</i>
  *
  * <p>This class is a member of the
- * <a href="{@docRoot}/java/util/package-summary.html#CollectionsFramework">
+ * <a href="{@docRoot}/java.base/java/util/package-summary.html#CollectionsFramework">
  * Java Collections Framework</a>.
  *
  * @param <E> the type of elements maintained by this set
--- a/src/java.base/share/classes/java/util/Vector.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/share/classes/java/util/Vector.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1994, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1994, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -70,7 +70,7 @@
  *
  * <p>As of the Java 2 platform v1.2, this class was retrofitted to
  * implement the {@link List} interface, making it a member of the
- * <a href="{@docRoot}/java/util/package-summary.html#CollectionsFramework">
+ * <a href="{@docRoot}/java.base/java/util/package-summary.html#CollectionsFramework">
  * Java Collections Framework</a>.  Unlike the new collection
  * implementations, {@code Vector} is synchronized.  If a thread-safe
  * implementation is not needed, it is recommended to use {@link
--- a/src/java.base/share/classes/java/util/WeakHashMap.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/share/classes/java/util/WeakHashMap.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -120,7 +120,7 @@
  * should be used only to detect bugs.</i>
  *
  * <p>This class is a member of the
- * <a href="{@docRoot}/java/util/package-summary.html#CollectionsFramework">
+ * <a href="{@docRoot}/java.base/java/util/package-summary.html#CollectionsFramework">
  * Java Collections Framework</a>.
  *
  * @param <K> the type of keys maintained by this map
--- a/src/java.base/share/classes/java/util/concurrent/ArrayBlockingQueue.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/share/classes/java/util/concurrent/ArrayBlockingQueue.java	Fri Apr 06 03:53:28 2018 +0200
@@ -76,7 +76,7 @@
  * methods of the {@link Collection} and {@link Iterator} interfaces.
  *
  * <p>This class is a member of the
- * <a href="{@docRoot}/java/util/package-summary.html#CollectionsFramework">
+ * <a href="{@docRoot}/java.base/java/util/package-summary.html#CollectionsFramework">
  * Java Collections Framework</a>.
  *
  * @since 1.5
--- a/src/java.base/share/classes/java/util/concurrent/BlockingDeque.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/share/classes/java/util/concurrent/BlockingDeque.java	Fri Apr 06 03:53:28 2018 +0200
@@ -188,7 +188,7 @@
  * the {@code BlockingDeque} in another thread.
  *
  * <p>This interface is a member of the
- * <a href="{@docRoot}/java/util/package-summary.html#CollectionsFramework">
+ * <a href="{@docRoot}/java.base/java/util/package-summary.html#CollectionsFramework">
  * Java Collections Framework</a>.
  *
  * @since 1.6
@@ -399,9 +399,9 @@
      * @return {@code true} if an element was removed as a result of this call
      * @throws ClassCastException if the class of the specified element
      *         is incompatible with this deque
-     * (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
+     * (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
      * @throws NullPointerException if the specified element is null
-     * (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
+     * (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
      */
     boolean removeFirstOccurrence(Object o);
 
@@ -417,9 +417,9 @@
      * @return {@code true} if an element was removed as a result of this call
      * @throws ClassCastException if the class of the specified element
      *         is incompatible with this deque
-     * (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
+     * (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
      * @throws NullPointerException if the specified element is null
-     * (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
+     * (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
      */
     boolean removeLastOccurrence(Object o);
 
@@ -594,9 +594,9 @@
      * @return {@code true} if this deque changed as a result of the call
      * @throws ClassCastException if the class of the specified element
      *         is incompatible with this deque
-     * (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
+     * (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
      * @throws NullPointerException if the specified element is null
-     * (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
+     * (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
      */
     boolean remove(Object o);
 
@@ -609,9 +609,9 @@
      * @return {@code true} if this deque contains the specified element
      * @throws ClassCastException if the class of the specified element
      *         is incompatible with this deque
-     * (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
+     * (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
      * @throws NullPointerException if the specified element is null
-     * (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
+     * (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
      */
     boolean contains(Object o);
 
--- a/src/java.base/share/classes/java/util/concurrent/BlockingQueue.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/share/classes/java/util/concurrent/BlockingQueue.java	Fri Apr 06 03:53:28 2018 +0200
@@ -169,7 +169,7 @@
  * the {@code BlockingQueue} in another thread.
  *
  * <p>This interface is a member of the
- * <a href="{@docRoot}/java/util/package-summary.html#CollectionsFramework">
+ * <a href="{@docRoot}/java.base/java/util/package-summary.html#CollectionsFramework">
  * Java Collections Framework</a>.
  *
  * @since 1.5
@@ -302,9 +302,9 @@
      * @return {@code true} if this queue changed as a result of the call
      * @throws ClassCastException if the class of the specified element
      *         is incompatible with this queue
-     * (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
+     * (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
      * @throws NullPointerException if the specified element is null
-     * (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
+     * (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
      */
     boolean remove(Object o);
 
@@ -317,9 +317,9 @@
      * @return {@code true} if this queue contains the specified element
      * @throws ClassCastException if the class of the specified element
      *         is incompatible with this queue
-     * (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
+     * (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
      * @throws NullPointerException if the specified element is null
-     * (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
+     * (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
      */
     boolean contains(Object o);
 
--- a/src/java.base/share/classes/java/util/concurrent/ConcurrentHashMap.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/share/classes/java/util/concurrent/ConcurrentHashMap.java	Fri Apr 06 03:53:28 2018 +0200
@@ -253,7 +253,7 @@
  * <p>All arguments to all task methods must be non-null.
  *
  * <p>This class is a member of the
- * <a href="{@docRoot}/java/util/package-summary.html#CollectionsFramework">
+ * <a href="{@docRoot}/java.base/java/util/package-summary.html#CollectionsFramework">
  * Java Collections Framework</a>.
  *
  * @since 1.5
--- a/src/java.base/share/classes/java/util/concurrent/ConcurrentLinkedDeque.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/share/classes/java/util/concurrent/ConcurrentLinkedDeque.java	Fri Apr 06 03:53:28 2018 +0200
@@ -85,7 +85,7 @@
  * the {@code ConcurrentLinkedDeque} in another thread.
  *
  * <p>This class is a member of the
- * <a href="{@docRoot}/java/util/package-summary.html#CollectionsFramework">
+ * <a href="{@docRoot}/java.base/java/util/package-summary.html#CollectionsFramework">
  * Java Collections Framework</a>.
  *
  * @since 1.7
--- a/src/java.base/share/classes/java/util/concurrent/ConcurrentLinkedQueue.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/share/classes/java/util/concurrent/ConcurrentLinkedQueue.java	Fri Apr 06 03:53:28 2018 +0200
@@ -99,7 +99,7 @@
  * the {@code ConcurrentLinkedQueue} in another thread.
  *
  * <p>This class is a member of the
- * <a href="{@docRoot}/java/util/package-summary.html#CollectionsFramework">
+ * <a href="{@docRoot}/java.base/java/util/package-summary.html#CollectionsFramework">
  * Java Collections Framework</a>.
  *
  * @since 1.5
--- a/src/java.base/share/classes/java/util/concurrent/ConcurrentMap.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/share/classes/java/util/concurrent/ConcurrentMap.java	Fri Apr 06 03:53:28 2018 +0200
@@ -60,7 +60,7 @@
  * the {@code ConcurrentMap} in another thread.
  *
  * <p>This interface is a member of the
- * <a href="{@docRoot}/java/util/package-summary.html#CollectionsFramework">
+ * <a href="{@docRoot}/java.base/java/util/package-summary.html#CollectionsFramework">
  * Java Collections Framework</a>.
  *
  * @since 1.5
@@ -180,10 +180,10 @@
      *         is not supported by this map
      * @throws ClassCastException if the key or value is of an inappropriate
      *         type for this map
-     * (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
+     * (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
      * @throws NullPointerException if the specified key or value is null,
      *         and this map does not permit null keys or values
-     * (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
+     * (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
      */
     boolean remove(Object key, Object value);
 
--- a/src/java.base/share/classes/java/util/concurrent/ConcurrentNavigableMap.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/share/classes/java/util/concurrent/ConcurrentNavigableMap.java	Fri Apr 06 03:53:28 2018 +0200
@@ -43,7 +43,7 @@
  * and recursively so for its navigable sub-maps.
  *
  * <p>This interface is a member of the
- * <a href="{@docRoot}/java/util/package-summary.html#CollectionsFramework">
+ * <a href="{@docRoot}/java.base/java/util/package-summary.html#CollectionsFramework">
  * Java Collections Framework</a>.
  *
  * @author Doug Lea
--- a/src/java.base/share/classes/java/util/concurrent/ConcurrentSkipListMap.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/share/classes/java/util/concurrent/ConcurrentSkipListMap.java	Fri Apr 06 03:53:28 2018 +0200
@@ -101,7 +101,7 @@
  * elements.
  *
  * <p>This class is a member of the
- * <a href="{@docRoot}/java/util/package-summary.html#CollectionsFramework">
+ * <a href="{@docRoot}/java.base/java/util/package-summary.html#CollectionsFramework">
  * Java Collections Framework</a>.
  *
  * @author Doug Lea
--- a/src/java.base/share/classes/java/util/concurrent/ConcurrentSkipListSet.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/share/classes/java/util/concurrent/ConcurrentSkipListSet.java	Fri Apr 06 03:53:28 2018 +0200
@@ -85,7 +85,7 @@
  * distinguished from the absence of elements.
  *
  * <p>This class is a member of the
- * <a href="{@docRoot}/java/util/package-summary.html#CollectionsFramework">
+ * <a href="{@docRoot}/java.base/java/util/package-summary.html#CollectionsFramework">
  * Java Collections Framework</a>.
  *
  * @author Doug Lea
@@ -324,7 +324,7 @@
      * @return {@code true} if this set changed as a result of the call
      * @throws ClassCastException if the class of an element of this set
      *         is incompatible with the specified collection
-     * (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
+     * (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
      * @throws NullPointerException if the specified collection or any
      *         of its elements are null
      */
--- a/src/java.base/share/classes/java/util/concurrent/CopyOnWriteArrayList.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/share/classes/java/util/concurrent/CopyOnWriteArrayList.java	Fri Apr 06 03:53:28 2018 +0200
@@ -83,7 +83,7 @@
  * the {@code CopyOnWriteArrayList} in another thread.
  *
  * <p>This class is a member of the
- * <a href="{@docRoot}/java/util/package-summary.html#CollectionsFramework">
+ * <a href="{@docRoot}/java.base/java/util/package-summary.html#CollectionsFramework">
  * Java Collections Framework</a>.
  *
  * @since 1.5
@@ -645,10 +645,10 @@
      * @return {@code true} if this list changed as a result of the call
      * @throws ClassCastException if the class of an element of this list
      *         is incompatible with the specified collection
-     * (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
+     * (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
      * @throws NullPointerException if this list contains a null element and the
      *         specified collection does not permit null elements
-     * (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>),
+     * (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>),
      *         or if the specified collection is null
      * @see #remove(Object)
      */
@@ -666,10 +666,10 @@
      * @return {@code true} if this list changed as a result of the call
      * @throws ClassCastException if the class of an element of this list
      *         is incompatible with the specified collection
-     * (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
+     * (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
      * @throws NullPointerException if this list contains a null element and the
      *         specified collection does not permit null elements
-     * (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>),
+     * (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>),
      *         or if the specified collection is null
      * @see #remove(Object)
      */
--- a/src/java.base/share/classes/java/util/concurrent/CopyOnWriteArraySet.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/share/classes/java/util/concurrent/CopyOnWriteArraySet.java	Fri Apr 06 03:53:28 2018 +0200
@@ -87,7 +87,7 @@
  * }}</pre>
  *
  * <p>This class is a member of the
- * <a href="{@docRoot}/java/util/package-summary.html#CollectionsFramework">
+ * <a href="{@docRoot}/java.base/java/util/package-summary.html#CollectionsFramework">
  * Java Collections Framework</a>.
  *
  * @see CopyOnWriteArrayList
@@ -340,10 +340,10 @@
      * @return {@code true} if this set changed as a result of the call
      * @throws ClassCastException if the class of an element of this set
      *         is incompatible with the specified collection
-     * (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
+     * (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
      * @throws NullPointerException if this set contains a null element and the
      *         specified collection does not permit null elements
-     * (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>),
+     * (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>),
      *         or if the specified collection is null
      * @see #remove(Object)
      */
@@ -363,10 +363,10 @@
      * @return {@code true} if this set changed as a result of the call
      * @throws ClassCastException if the class of an element of this set
      *         is incompatible with the specified collection
-     * (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
+     * (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
      * @throws NullPointerException if this set contains a null element and the
      *         specified collection does not permit null elements
-     * (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>),
+     * (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>),
      *         or if the specified collection is null
      * @see #remove(Object)
      */
--- a/src/java.base/share/classes/java/util/concurrent/DelayQueue.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/share/classes/java/util/concurrent/DelayQueue.java	Fri Apr 06 03:53:28 2018 +0200
@@ -67,7 +67,7 @@
  * particular order.
  *
  * <p>This class is a member of the
- * <a href="{@docRoot}/java/util/package-summary.html#CollectionsFramework">
+ * <a href="{@docRoot}/java.base/java/util/package-summary.html#CollectionsFramework">
  * Java Collections Framework</a>.
  *
  * @since 1.5
--- a/src/java.base/share/classes/java/util/concurrent/LinkedBlockingDeque.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/share/classes/java/util/concurrent/LinkedBlockingDeque.java	Fri Apr 06 03:53:28 2018 +0200
@@ -68,7 +68,7 @@
  * methods of the {@link Collection} and {@link Iterator} interfaces.
  *
  * <p>This class is a member of the
- * <a href="{@docRoot}/java/util/package-summary.html#CollectionsFramework">
+ * <a href="{@docRoot}/java.base/java/util/package-summary.html#CollectionsFramework">
  * Java Collections Framework</a>.
  *
  * @since 1.6
--- a/src/java.base/share/classes/java/util/concurrent/LinkedBlockingQueue.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/share/classes/java/util/concurrent/LinkedBlockingQueue.java	Fri Apr 06 03:53:28 2018 +0200
@@ -71,7 +71,7 @@
  * methods of the {@link Collection} and {@link Iterator} interfaces.
  *
  * <p>This class is a member of the
- * <a href="{@docRoot}/java/util/package-summary.html#CollectionsFramework">
+ * <a href="{@docRoot}/java.base/java/util/package-summary.html#CollectionsFramework">
  * Java Collections Framework</a>.
  *
  * @since 1.5
--- a/src/java.base/share/classes/java/util/concurrent/LinkedTransferQueue.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/share/classes/java/util/concurrent/LinkedTransferQueue.java	Fri Apr 06 03:53:28 2018 +0200
@@ -81,7 +81,7 @@
  * the {@code LinkedTransferQueue} in another thread.
  *
  * <p>This class is a member of the
- * <a href="{@docRoot}/java/util/package-summary.html#CollectionsFramework">
+ * <a href="{@docRoot}/java.base/java/util/package-summary.html#CollectionsFramework">
  * Java Collections Framework</a>.
  *
  * @since 1.7
--- a/src/java.base/share/classes/java/util/concurrent/PriorityBlockingQueue.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/share/classes/java/util/concurrent/PriorityBlockingQueue.java	Fri Apr 06 03:53:28 2018 +0200
@@ -101,7 +101,7 @@
  * }}</pre>
  *
  * <p>This class is a member of the
- * <a href="{@docRoot}/java/util/package-summary.html#CollectionsFramework">
+ * <a href="{@docRoot}/java.base/java/util/package-summary.html#CollectionsFramework">
  * Java Collections Framework</a>.
  *
  * @since 1.5
--- a/src/java.base/share/classes/java/util/concurrent/SynchronousQueue.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/share/classes/java/util/concurrent/SynchronousQueue.java	Fri Apr 06 03:53:28 2018 +0200
@@ -80,7 +80,7 @@
  * methods of the {@link Collection} and {@link Iterator} interfaces.
  *
  * <p>This class is a member of the
- * <a href="{@docRoot}/java/util/package-summary.html#CollectionsFramework">
+ * <a href="{@docRoot}/java.base/java/util/package-summary.html#CollectionsFramework">
  * Java Collections Framework</a>.
  *
  * @since 1.5
--- a/src/java.base/share/classes/java/util/concurrent/TransferQueue.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/share/classes/java/util/concurrent/TransferQueue.java	Fri Apr 06 03:53:28 2018 +0200
@@ -58,7 +58,7 @@
  * and {@code transfer} are effectively synonymous.
  *
  * <p>This interface is a member of the
- * <a href="{@docRoot}/java/util/package-summary.html#CollectionsFramework">
+ * <a href="{@docRoot}/java.base/java/util/package-summary.html#CollectionsFramework">
  * Java Collections Framework</a>.
  *
  * @since 1.7
--- a/src/java.base/share/classes/java/util/concurrent/locks/LockSupport.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/share/classes/java/util/concurrent/locks/LockSupport.java	Fri Apr 06 03:53:28 2018 +0200
@@ -412,11 +412,11 @@
     /**
      * Returns the thread id for the given thread.  We must access
      * this directly rather than via method Thread.getId() because
-     * getId() is not final, and has been known to be overridden in
-     * ways that do not preserve unique mappings.
+     * getId() has been known to be overridden in ways that do not
+     * preserve unique mappings.
      */
     static final long getThreadId(Thread thread) {
-        return U.getLongVolatile(thread, TID);
+        return U.getLong(thread, TID);
     }
 
     // Hotspot implementation via intrinsics API
--- a/src/java.base/share/classes/java/util/jar/Manifest.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/share/classes/java/util/jar/Manifest.java	Fri Apr 06 03:53:28 2018 +0200
@@ -148,7 +148,7 @@
         DataOutputStream dos = new DataOutputStream(out);
         // Write out the main attributes for the manifest
         attr.writeMain(dos);
-        // Now write out the pre-entry attributes
+        // Now write out the per-entry attributes
         for (Map.Entry<String, Attributes> e : entries.entrySet()) {
             StringBuffer buffer = new StringBuffer("Name: ");
             String value = e.getKey();
--- a/src/java.base/share/classes/java/util/zip/ZipCoder.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/share/classes/java/util/zip/ZipCoder.java	Fri Apr 06 03:53:28 2018 +0200
@@ -77,8 +77,7 @@
 
     String toString(byte[] ba, int off, int length) {
         try {
-              return decoder().decode(ByteBuffer.wrap(ba, off, length)).toString();
-
+            return decoder().decode(ByteBuffer.wrap(ba, off, length)).toString();
         } catch (CharacterCodingException x) {
             throw new IllegalArgumentException(x);
         }
--- a/src/java.base/share/classes/java/util/zip/ZipFile.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/share/classes/java/util/zip/ZipFile.java	Fri Apr 06 03:53:28 2018 +0200
@@ -64,6 +64,7 @@
 import jdk.internal.misc.VM;
 import jdk.internal.perf.PerfCounter;
 import jdk.internal.ref.CleanerFactory;
+import jdk.internal.vm.annotation.Stable;
 
 import static java.util.zip.ZipConstants64.*;
 import static java.util.zip.ZipUtils.*;
@@ -98,14 +99,14 @@
 
     private final String name;     // zip file name
     private volatile boolean closeRequested;
-    private ZipCoder zc;
+    private final @Stable ZipCoder zc;
 
     // The "resource" used by this zip file that needs to be
     // cleaned after use.
     // a) the input streams that need to be closed
     // b) the list of cached Inflater objects
     // c) the "native" source of this zip file.
-    private final CleanableResource res;
+    private final @Stable CleanableResource res;
 
     private static final int STORED = ZipEntry.STORED;
     private static final int DEFLATED = ZipEntry.DEFLATED;
@@ -369,7 +370,7 @@
     public InputStream getInputStream(ZipEntry entry) throws IOException {
         Objects.requireNonNull(entry, "entry");
         int pos = -1;
-        ZipFileInputStream in = null;
+        ZipFileInputStream in;
         Source zsrc = res.zsrc;
         Set<InputStream> istreams = res.istreams;
         synchronized (this) {
@@ -604,9 +605,7 @@
     private String getEntryName(int pos) {
         byte[] cen = res.zsrc.cen;
         int nlen = CENNAM(cen, pos);
-        int clen = CENCOM(cen, pos);
-        int flag = CENFLG(cen, pos);
-        if (!zc.isUTF8() && (flag & EFS) != 0) {
+        if (!zc.isUTF8() && (CENFLG(cen, pos) & EFS) != 0) {
             return zc.toStringUTF8(cen, pos + CENHDR, nlen);
         } else {
             return zc.toString(cen, pos + CENHDR, nlen);
@@ -1218,7 +1217,7 @@
         static Source get(File file, boolean toDelete) throws IOException {
             Key key = new Key(file,
                               Files.readAttributes(file.toPath(), BasicFileAttributes.class));
-            Source src = null;
+            Source src;
             synchronized (files) {
                 src = files.get(key);
                 if (src != null) {
--- a/src/java.base/share/classes/javax/net/ssl/SNIHostName.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/share/classes/javax/net/ssl/SNIHostName.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -290,7 +290,7 @@
      * will accept hostnames "www.example.com" and "www.example.org".
      *
      * @param  regex
-     *         the <a href="{@docRoot}/java/util/regex/Pattern.html#sum">
+     *         the <a href="{@docRoot}/java.base/java/util/regex/Pattern.html#sum">
      *         regular expression pattern</a>
      *         representing the hostname(s) to match
      * @return a {@code SNIMatcher} object for {@code SNIHostName}s
@@ -330,7 +330,7 @@
          * Creates an SNIHostNameMatcher object.
          *
          * @param  regex
-         *         the <a href="{@docRoot}/java/util/regex/Pattern.html#sum">
+         *         the <a href="{@docRoot}/java.base/java/util/regex/Pattern.html#sum">
          *         regular expression pattern</a>
          *         representing the hostname(s) to match
          * @throws NullPointerException if {@code regex} is
--- a/src/java.base/share/classes/sun/net/spi/DefaultProxySelector.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/share/classes/sun/net/spi/DefaultProxySelector.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -395,7 +395,9 @@
      */
     static String disjunctToRegex(String disjunct) {
         String regex;
-        if (disjunct.startsWith("*")) {
+        if (disjunct.startsWith("*") && disjunct.endsWith("*")) {
+            regex = ".*" + quote(disjunct.substring(1, disjunct.length() - 1)) + ".*";
+        } else if (disjunct.startsWith("*")) {
             regex = ".*" + quote(disjunct.substring(1));
         } else if (disjunct.endsWith("*")) {
             regex = quote(disjunct.substring(0, disjunct.length() - 1)) + ".*";
--- a/src/java.base/share/classes/sun/nio/ch/AbstractPollArrayWrapper.java	Thu Apr 05 11:18:39 2018 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,84 +0,0 @@
-/*
- * Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package sun.nio.ch;
-
-
-/**
- * Manipulates a native array of pollfd structs.
- *
- * @author Mike McCloskey
- * @since 1.4
- */
-
-public abstract class AbstractPollArrayWrapper {
-
-    // Miscellaneous constants
-    static final short SIZE_POLLFD   = 8;
-    static final short FD_OFFSET     = 0;
-    static final short EVENT_OFFSET  = 4;
-    static final short REVENT_OFFSET = 6;
-
-    // The poll fd array
-    protected AllocatedNativeObject pollArray;
-
-    // Number of valid entries in the pollArray
-    protected int totalChannels = 0;
-
-    // Base address of the native pollArray
-    protected long pollArrayAddress;
-
-    // Access methods for fd structures
-    int getEventOps(int i) {
-        int offset = SIZE_POLLFD * i + EVENT_OFFSET;
-        return pollArray.getShort(offset);
-    }
-
-    int getReventOps(int i) {
-        int offset = SIZE_POLLFD * i + REVENT_OFFSET;
-        return pollArray.getShort(offset);
-    }
-
-    int getDescriptor(int i) {
-        int offset = SIZE_POLLFD * i + FD_OFFSET;
-        return pollArray.getInt(offset);
-    }
-
-    void putEventOps(int i, int event) {
-        int offset = SIZE_POLLFD * i + EVENT_OFFSET;
-        pollArray.putShort(offset, (short)event);
-    }
-
-    void putReventOps(int i, int revent) {
-        int offset = SIZE_POLLFD * i + REVENT_OFFSET;
-        pollArray.putShort(offset, (short)revent);
-    }
-
-    void putDescriptor(int i, int fd) {
-        int offset = SIZE_POLLFD * i + FD_OFFSET;
-        pollArray.putInt(offset, fd);
-    }
-
-}
--- a/src/java.base/share/classes/sun/nio/ch/AbstractPollSelectorImpl.java	Thu Apr 05 11:18:39 2018 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,194 +0,0 @@
-/*
- * Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package sun.nio.ch;
-
-import java.io.IOException;
-import java.nio.channels.*;
-import java.nio.channels.spi.*;
-import java.util.*;
-
-
-/**
- * An abstract selector impl.
- */
-
-abstract class AbstractPollSelectorImpl
-    extends SelectorImpl
-{
-
-    // The poll fd array
-    PollArrayWrapper pollWrapper;
-
-    // Initial capacity of the pollfd array
-    protected final int INIT_CAP = 10;
-
-    // The list of SelectableChannels serviced by this Selector
-    protected SelectionKeyImpl[] channelArray;
-
-    // In some impls the first entry of channelArray is bogus
-    protected int channelOffset = 0;
-
-    // The number of valid channels in this Selector's poll array
-    protected int totalChannels;
-
-    // True if this Selector has been closed
-    private boolean closed = false;
-
-    // Lock for close and cleanup
-    private Object closeLock = new Object();
-
-    AbstractPollSelectorImpl(SelectorProvider sp, int channels, int offset) {
-        super(sp);
-        this.totalChannels = channels;
-        this.channelOffset = offset;
-    }
-
-    public void putEventOps(SelectionKeyImpl sk, int ops) {
-        synchronized (closeLock) {
-            if (closed)
-                throw new ClosedSelectorException();
-            pollWrapper.putEventOps(sk.getIndex(), ops);
-        }
-    }
-
-    public Selector wakeup() {
-        pollWrapper.interrupt();
-        return this;
-    }
-
-    protected abstract int doSelect(long timeout) throws IOException;
-
-    protected void implClose() throws IOException {
-        synchronized (closeLock) {
-            if (closed)
-                return;
-            closed = true;
-            // Deregister channels
-            for(int i=channelOffset; i<totalChannels; i++) {
-                SelectionKeyImpl ski = channelArray[i];
-                assert(ski.getIndex() != -1);
-                ski.setIndex(-1);
-                deregister(ski);
-                SelectableChannel selch = channelArray[i].channel();
-                if (!selch.isOpen() && !selch.isRegistered())
-                    ((SelChImpl)selch).kill();
-            }
-            implCloseInterrupt();
-            pollWrapper.free();
-            pollWrapper = null;
-            channelArray = null;
-            totalChannels = 0;
-        }
-    }
-
-    protected abstract void implCloseInterrupt() throws IOException;
-
-    /**
-     * Copy the information in the pollfd structs into the opss
-     * of the corresponding Channels. Add the ready keys to the
-     * ready queue.
-     */
-    protected int updateSelectedKeys() {
-        int numKeysUpdated = 0;
-        // Skip zeroth entry; it is for interrupts only
-        for (int i=channelOffset; i<totalChannels; i++) {
-            int rOps = pollWrapper.getReventOps(i);
-            if (rOps != 0) {
-                SelectionKeyImpl sk = channelArray[i];
-                pollWrapper.putReventOps(i, 0);
-                if (selectedKeys.contains(sk)) {
-                    if (sk.channel.translateAndSetReadyOps(rOps, sk)) {
-                        numKeysUpdated++;
-                    }
-                } else {
-                    sk.channel.translateAndSetReadyOps(rOps, sk);
-                    if ((sk.nioReadyOps() & sk.nioInterestOps()) != 0) {
-                        selectedKeys.add(sk);
-                        numKeysUpdated++;
-                    }
-                }
-            }
-        }
-        return numKeysUpdated;
-    }
-
-    protected void implRegister(SelectionKeyImpl ski) {
-        synchronized (closeLock) {
-            if (closed)
-                throw new ClosedSelectorException();
-
-            // Check to see if the array is large enough
-            if (channelArray.length == totalChannels) {
-                // Make a larger array
-                int newSize = pollWrapper.totalChannels * 2;
-                SelectionKeyImpl temp[] = new SelectionKeyImpl[newSize];
-                // Copy over
-                for (int i=channelOffset; i<totalChannels; i++)
-                    temp[i] = channelArray[i];
-                channelArray = temp;
-                // Grow the NativeObject poll array
-                pollWrapper.grow(newSize);
-            }
-            channelArray[totalChannels] = ski;
-            ski.setIndex(totalChannels);
-            pollWrapper.addEntry(ski.channel);
-            totalChannels++;
-            keys.add(ski);
-        }
-    }
-
-    protected void implDereg(SelectionKeyImpl ski) throws IOException {
-        // Algorithm: Copy the sc from the end of the list and put it into
-        // the location of the sc to be removed (since order doesn't
-        // matter). Decrement the sc count. Update the index of the sc
-        // that is moved.
-        int i = ski.getIndex();
-        assert (i >= 0);
-        if (i != totalChannels - 1) {
-            // Copy end one over it
-            SelectionKeyImpl endChannel = channelArray[totalChannels-1];
-            channelArray[i] = endChannel;
-            endChannel.setIndex(i);
-            pollWrapper.release(i);
-            PollArrayWrapper.replaceEntry(pollWrapper, totalChannels - 1,
-                                          pollWrapper, i);
-        } else {
-            pollWrapper.release(i);
-        }
-        // Destroy the last one
-        channelArray[totalChannels-1] = null;
-        totalChannels--;
-        pollWrapper.totalChannels--;
-        ski.setIndex(-1);
-        // Remove the key from keys and selectedKeys
-        keys.remove(ski);
-        selectedKeys.remove(ski);
-        deregister((AbstractSelectionKey)ski);
-        SelectableChannel selch = ski.channel();
-        if (!selch.isOpen() && !selch.isRegistered())
-            ((SelChImpl)selch).kill();
-    }
-}
--- a/src/java.base/share/classes/sun/nio/ch/AsynchronousChannelGroupImpl.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/share/classes/sun/nio/ch/AsynchronousChannelGroupImpl.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -60,8 +60,8 @@
     // associated Executor for timeouts
     private ScheduledThreadPoolExecutor timeoutExecutor;
 
-    // task queue for when using a fixed thread pool. In that case, thread
-    // waiting on I/O events must be awokon to poll tasks from this queue.
+    // task queue for when using a fixed thread pool. In that case, a thread
+    // waiting on I/O events must be awoken to poll tasks from this queue.
     private final Queue<Runnable> taskQueue;
 
     // group shutdown
--- a/src/java.base/share/classes/sun/nio/ch/DatagramChannelImpl.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/share/classes/sun/nio/ch/DatagramChannelImpl.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1229,10 +1229,9 @@
     /**
      * Translates native poll revent set into a ready operation set
      */
-    public boolean translateReadyOps(int ops, int initialOps,
-                                     SelectionKeyImpl sk) {
-        int intOps = sk.nioInterestOps(); // Do this just once, it synchronizes
-        int oldOps = sk.nioReadyOps();
+    public boolean translateReadyOps(int ops, int initialOps, SelectionKeyImpl ski) {
+        int intOps = ski.nioInterestOps();
+        int oldOps = ski.nioReadyOps();
         int newOps = initialOps;
 
         if ((ops & Net.POLLNVAL) != 0) {
@@ -1244,7 +1243,7 @@
 
         if ((ops & (Net.POLLERR | Net.POLLHUP)) != 0) {
             newOps = intOps;
-            sk.nioReadyOps(newOps);
+            ski.nioReadyOps(newOps);
             return (newOps & ~oldOps) != 0;
         }
 
@@ -1256,16 +1255,16 @@
             ((intOps & SelectionKey.OP_WRITE) != 0))
             newOps |= SelectionKey.OP_WRITE;
 
-        sk.nioReadyOps(newOps);
+        ski.nioReadyOps(newOps);
         return (newOps & ~oldOps) != 0;
     }
 
-    public boolean translateAndUpdateReadyOps(int ops, SelectionKeyImpl sk) {
-        return translateReadyOps(ops, sk.nioReadyOps(), sk);
+    public boolean translateAndUpdateReadyOps(int ops, SelectionKeyImpl ski) {
+        return translateReadyOps(ops, ski.nioReadyOps(), ski);
     }
 
-    public boolean translateAndSetReadyOps(int ops, SelectionKeyImpl sk) {
-        return translateReadyOps(ops, 0, sk);
+    public boolean translateAndSetReadyOps(int ops, SelectionKeyImpl ski) {
+        return translateReadyOps(ops, 0, ski);
     }
 
     /**
@@ -1295,16 +1294,15 @@
     /**
      * Translates an interest operation set into a native poll event set
      */
-    public void translateAndSetInterestOps(int ops, SelectionKeyImpl sk) {
+    public int translateInterestOps(int ops) {
         int newOps = 0;
-
         if ((ops & SelectionKey.OP_READ) != 0)
             newOps |= Net.POLLIN;
         if ((ops & SelectionKey.OP_WRITE) != 0)
             newOps |= Net.POLLOUT;
         if ((ops & SelectionKey.OP_CONNECT) != 0)
             newOps |= Net.POLLIN;
-        sk.selector.putEventOps(sk, newOps);
+        return newOps;
     }
 
     public FileDescriptor getFD() {
--- a/src/java.base/share/classes/sun/nio/ch/IOUtil.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/share/classes/sun/nio/ch/IOUtil.java	Fri Apr 06 03:53:28 2018 +0200
@@ -401,8 +401,17 @@
 
     static native int write1(int fd, byte b) throws IOException;
 
+    /**
+     * Read and discard all bytes.
+     */
     static native boolean drain(int fd) throws IOException;
 
+    /**
+     * Read and discard at most one byte
+     * @return the number of bytes read or IOS_INTERRUPTED
+     */
+    static native int drain1(int fd) throws IOException;
+
     public static native void configureBlocking(FileDescriptor fd,
                                                 boolean blocking)
         throws IOException;
--- a/src/java.base/share/classes/sun/nio/ch/PollSelectorProvider.java	Thu Apr 05 11:18:39 2018 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,42 +0,0 @@
-/*
- * Copyright (c) 2001, 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package sun.nio.ch;
-
-import java.io.IOException;
-import java.nio.channels.*;
-import java.nio.channels.spi.*;
-
-public class PollSelectorProvider
-    extends SelectorProviderImpl
-{
-    public AbstractSelector openSelector() throws IOException {
-        return new PollSelectorImpl(this);
-    }
-
-    public Channel inheritedChannel() throws IOException {
-        return InheritedChannel.getChannel();
-    }
-}
--- a/src/java.base/share/classes/sun/nio/ch/SelChImpl.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/share/classes/sun/nio/ch/SelChImpl.java	Fri Apr 06 03:53:28 2018 +0200
@@ -61,7 +61,10 @@
      */
     boolean translateAndSetReadyOps(int ops, SelectionKeyImpl sk);
 
-    void translateAndSetInterestOps(int ops, SelectionKeyImpl sk);
+    /**
+     * Translates an interest operation set into a native event set
+     */
+    int translateInterestOps(int ops);
 
     void kill() throws IOException;
 
--- a/src/java.base/share/classes/sun/nio/ch/SelectionKeyImpl.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/share/classes/sun/nio/ch/SelectionKeyImpl.java	Fri Apr 06 03:53:28 2018 +0200
@@ -39,21 +39,28 @@
 public final class SelectionKeyImpl
     extends AbstractSelectionKey
 {
-
     final SelChImpl channel;                            // package-private
-    public final SelectorImpl selector;
-
-    // Index for a pollfd array in Selector that this key is registered with
-    private int index;
+    private final SelectorImpl selector;
 
     private volatile int interestOps;
     private volatile int readyOps;
 
+    // registered events in kernel, used by some Selector implementations
+    private int registeredEvents;
+
+    // index of key in pollfd array, used by some Selector implementations
+    private int index;
+
     SelectionKeyImpl(SelChImpl ch, SelectorImpl sel) {
         channel = ch;
         selector = sel;
     }
 
+    private void ensureValid() {
+        if (!isValid())
+            throw new CancelledKeyException();
+    }
+
     @Override
     public SelectableChannel channel() {
         return (SelectableChannel)channel;
@@ -61,20 +68,7 @@
 
     @Override
     public Selector selector() {
-        return (Selector)selector;
-    }
-
-    int getIndex() {                                    // package-private
-        return index;
-    }
-
-    void setIndex(int i) {                              // package-private
-        index = i;
-    }
-
-    private void ensureValid() {
-        if (!isValid())
-            throw new CancelledKeyException();
+        return selector;
     }
 
     @Override
@@ -109,7 +103,7 @@
     public SelectionKey nioInterestOps(int ops) {
         if ((ops & ~channel().validOps()) != 0)
             throw new IllegalArgumentException();
-        channel.translateAndSetInterestOps(ops, this);
+        selector.putEventOps(this, channel.translateInterestOps(ops));
         interestOps = ops;
         return this;
     }
@@ -118,6 +112,24 @@
         return interestOps;
     }
 
+    void registeredEvents(int events) {
+        // assert Thread.holdsLock(selector);
+        this.registeredEvents = events;
+    }
+
+    int registeredEvents() {
+        // assert Thread.holdsLock(selector);
+        return registeredEvents;
+    }
+
+    int getIndex() {
+        return index;
+    }
+
+    void setIndex(int i) {
+        index = i;
+    }
+
     @Override
     public String toString() {
         StringBuilder sb = new StringBuilder();
--- a/src/java.base/share/classes/sun/nio/ch/SelectorImpl.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/share/classes/sun/nio/ch/SelectorImpl.java	Fri Apr 06 03:53:28 2018 +0200
@@ -26,9 +26,9 @@
 package sun.nio.ch;
 
 import java.io.IOException;
-import java.net.SocketException;
 import java.nio.channels.ClosedSelectorException;
 import java.nio.channels.IllegalSelectorException;
+import java.nio.channels.SelectableChannel;
 import java.nio.channels.SelectionKey;
 import java.nio.channels.spi.AbstractSelectableChannel;
 import java.nio.channels.spi.AbstractSelector;
@@ -47,7 +47,7 @@
     extends AbstractSelector
 {
     // The set of keys registered with this Selector
-    protected final HashSet<SelectionKey> keys;
+    protected final Set<SelectionKey> keys;
 
     // The set of keys with data ready for an operation
     protected final Set<SelectionKey> selectedKeys;
@@ -88,6 +88,26 @@
         return publicSelectedKeys;
     }
 
+    /**
+     * Marks the beginning of a select operation that might block
+     */
+    protected final void begin(boolean blocking) {
+        if (blocking) begin();
+    }
+
+    /**
+     * Marks the end of a select operation that may have blocked
+     */
+    protected final void end(boolean blocking) {
+        if (blocking) end();
+    }
+
+    /**
+     * Selects the keys for channels that are ready for I/O operations.
+     *
+     * @param timeout timeout in milliseconds to wait, 0 to not wait, -1 to
+     *                wait indefinitely
+     */
     protected abstract int doSelect(long timeout) throws IOException;
 
     private int lockAndDoSelect(long timeout) throws IOException {
@@ -125,9 +145,21 @@
     public final void implCloseSelector() throws IOException {
         wakeup();
         synchronized (this) {
+            implClose();
             synchronized (publicKeys) {
                 synchronized (publicSelectedKeys) {
-                    implClose();
+                    // Deregister channels
+                    Iterator<SelectionKey> i = keys.iterator();
+                    while (i.hasNext()) {
+                        SelectionKeyImpl ski = (SelectionKeyImpl)i.next();
+                        deregister(ski);
+                        SelectableChannel selch = ski.channel();
+                        if (!selch.isOpen() && !selch.isRegistered())
+                            ((SelChImpl)selch).kill();
+                        selectedKeys.remove(ski);
+                        i.remove();
+                    }
+                    assert selectedKeys.isEmpty() && keys.isEmpty();
                 }
             }
         }
@@ -144,8 +176,10 @@
             throw new IllegalSelectorException();
         SelectionKeyImpl k = new SelectionKeyImpl((SelChImpl)ch, this);
         k.attach(attachment);
+        // register before adding to key set
+        implRegister(k);
         synchronized (publicKeys) {
-            implRegister(k);
+            keys.add(k);
         }
         k.interestOps(ops);
         return k;
@@ -156,27 +190,37 @@
     protected abstract void implDereg(SelectionKeyImpl ski) throws IOException;
 
     protected final void processDeregisterQueue() throws IOException {
-        // Precondition: Synchronized on this, keys, and selectedKeys
+        assert Thread.holdsLock(this);
+        assert Thread.holdsLock(publicKeys);
+        assert Thread.holdsLock(publicSelectedKeys);
+
         Set<SelectionKey> cks = cancelledKeys();
         synchronized (cks) {
             if (!cks.isEmpty()) {
                 Iterator<SelectionKey> i = cks.iterator();
                 while (i.hasNext()) {
                     SelectionKeyImpl ski = (SelectionKeyImpl)i.next();
-                    try {
-                        implDereg(ski);
-                    } catch (SocketException se) {
-                        throw new IOException("Error deregistering key", se);
-                    } finally {
-                        i.remove();
-                    }
+                    i.remove();
+
+                    // remove the key from the selector
+                    implDereg(ski);
+
+                    selectedKeys.remove(ski);
+                    keys.remove(ski);
+
+                    // remove from channel's key set
+                    deregister(ski);
+
+                    SelectableChannel ch = ski.channel();
+                    if (!ch.isOpen() && !ch.isRegistered())
+                        ((SelChImpl)ch).kill();
                 }
             }
         }
     }
 
     /**
-     * Invoked to change the key's interest set
+     * Change the event set in the selector
      */
-    public abstract void putEventOps(SelectionKeyImpl ski, int ops);
+    protected abstract void putEventOps(SelectionKeyImpl ski, int events);
 }
--- a/src/java.base/share/classes/sun/nio/ch/ServerSocketChannelImpl.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/share/classes/sun/nio/ch/ServerSocketChannelImpl.java	Fri Apr 06 03:53:28 2018 +0200
@@ -445,10 +445,9 @@
     /**
      * Translates native poll revent set into a ready operation set
      */
-    public boolean translateReadyOps(int ops, int initialOps,
-                                     SelectionKeyImpl sk) {
-        int intOps = sk.nioInterestOps(); // Do this just once, it synchronizes
-        int oldOps = sk.nioReadyOps();
+    public boolean translateReadyOps(int ops, int initialOps, SelectionKeyImpl ski) {
+        int intOps = ski.nioInterestOps();
+        int oldOps = ski.nioReadyOps();
         int newOps = initialOps;
 
         if ((ops & Net.POLLNVAL) != 0) {
@@ -460,7 +459,7 @@
 
         if ((ops & (Net.POLLERR | Net.POLLHUP)) != 0) {
             newOps = intOps;
-            sk.nioReadyOps(newOps);
+            ski.nioReadyOps(newOps);
             return (newOps & ~oldOps) != 0;
         }
 
@@ -468,29 +467,26 @@
             ((intOps & SelectionKey.OP_ACCEPT) != 0))
                 newOps |= SelectionKey.OP_ACCEPT;
 
-        sk.nioReadyOps(newOps);
+        ski.nioReadyOps(newOps);
         return (newOps & ~oldOps) != 0;
     }
 
-    public boolean translateAndUpdateReadyOps(int ops, SelectionKeyImpl sk) {
-        return translateReadyOps(ops, sk.nioReadyOps(), sk);
+    public boolean translateAndUpdateReadyOps(int ops, SelectionKeyImpl ski) {
+        return translateReadyOps(ops, ski.nioReadyOps(), ski);
     }
 
-    public boolean translateAndSetReadyOps(int ops, SelectionKeyImpl sk) {
-        return translateReadyOps(ops, 0, sk);
+    public boolean translateAndSetReadyOps(int ops, SelectionKeyImpl ski) {
+        return translateReadyOps(ops, 0, ski);
     }
 
     /**
      * Translates an interest operation set into a native poll event set
      */
-    public void translateAndSetInterestOps(int ops, SelectionKeyImpl sk) {
+    public int translateInterestOps(int ops) {
         int newOps = 0;
-
-        // Translate ops
         if ((ops & SelectionKey.OP_ACCEPT) != 0)
             newOps |= Net.POLLIN;
-        // Place ops into pollfd array
-        sk.selector.putEventOps(sk, newOps);
+        return newOps;
     }
 
     public FileDescriptor getFD() {
--- a/src/java.base/share/classes/sun/nio/ch/SocketChannelImpl.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/share/classes/sun/nio/ch/SocketChannelImpl.java	Fri Apr 06 03:53:28 2018 +0200
@@ -994,10 +994,9 @@
     /**
      * Translates native poll revent ops into a ready operation ops
      */
-    public boolean translateReadyOps(int ops, int initialOps,
-                                     SelectionKeyImpl sk) {
-        int intOps = sk.nioInterestOps(); // Do this just once, it synchronizes
-        int oldOps = sk.nioReadyOps();
+    public boolean translateReadyOps(int ops, int initialOps, SelectionKeyImpl ski) {
+        int intOps = ski.nioInterestOps();
+        int oldOps = ski.nioReadyOps();
         int newOps = initialOps;
 
         if ((ops & Net.POLLNVAL) != 0) {
@@ -1009,7 +1008,7 @@
 
         if ((ops & (Net.POLLERR | Net.POLLHUP)) != 0) {
             newOps = intOps;
-            sk.nioReadyOps(newOps);
+            ski.nioReadyOps(newOps);
             return (newOps & ~oldOps) != 0;
         }
 
@@ -1026,22 +1025,22 @@
             ((intOps & SelectionKey.OP_WRITE) != 0) && connected)
             newOps |= SelectionKey.OP_WRITE;
 
-        sk.nioReadyOps(newOps);
+        ski.nioReadyOps(newOps);
         return (newOps & ~oldOps) != 0;
     }
 
-    public boolean translateAndUpdateReadyOps(int ops, SelectionKeyImpl sk) {
-        return translateReadyOps(ops, sk.nioReadyOps(), sk);
+    public boolean translateAndUpdateReadyOps(int ops, SelectionKeyImpl ski) {
+        return translateReadyOps(ops, ski.nioReadyOps(), ski);
     }
 
-    public boolean translateAndSetReadyOps(int ops, SelectionKeyImpl sk) {
-        return translateReadyOps(ops, 0, sk);
+    public boolean translateAndSetReadyOps(int ops, SelectionKeyImpl ski) {
+        return translateReadyOps(ops, 0, ski);
     }
 
     /**
      * Translates an interest operation set into a native poll event set
      */
-    public void translateAndSetInterestOps(int ops, SelectionKeyImpl sk) {
+    public int translateInterestOps(int ops) {
         int newOps = 0;
         if ((ops & SelectionKey.OP_READ) != 0)
             newOps |= Net.POLLIN;
@@ -1049,7 +1048,7 @@
             newOps |= Net.POLLOUT;
         if ((ops & SelectionKey.OP_CONNECT) != 0)
             newOps |= Net.POLLCONN;
-        sk.selector.putEventOps(sk, newOps);
+        return newOps;
     }
 
     public FileDescriptor getFD() {
--- a/src/java.base/share/classes/sun/nio/cs/ISO_8859_1.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/share/classes/sun/nio/cs/ISO_8859_1.java	Fri Apr 06 03:53:28 2018 +0200
@@ -39,9 +39,6 @@
     extends Charset
     implements HistoricallyNamedCharset
 {
-
-    public static final ISO_8859_1 INSTANCE = new ISO_8859_1();
-
     public ISO_8859_1() {
         super("ISO-8859-1", StandardCharsets.aliases_ISO_8859_1());
     }
--- a/src/java.base/share/classes/sun/nio/cs/StandardCharsets.java.template	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/share/classes/sun/nio/cs/StandardCharsets.java.template	Fri Apr 06 03:53:28 2018 +0200
@@ -83,9 +83,12 @@
         Map<String,Charset> map = cache;
         if (map == null) {
             map = new Cache();
-            map.put("utf-8", UTF_8.INSTANCE);
-            map.put("iso-8859-1", ISO_8859_1.INSTANCE);
-            map.put("us-ascii", US_ASCII.INSTANCE);
+            map.put("utf-8", java.nio.charset.StandardCharsets.UTF_8);
+            map.put("iso-8859-1", java.nio.charset.StandardCharsets.ISO_8859_1);
+            map.put("us-ascii", java.nio.charset.StandardCharsets.US_ASCII);
+            map.put("utf-16", java.nio.charset.StandardCharsets.UTF_16);
+            map.put("utf-16be", java.nio.charset.StandardCharsets.UTF_16BE);
+            map.put("utf-16le", java.nio.charset.StandardCharsets.UTF_16LE);
             cache = map;
         }
         return map;
@@ -123,11 +126,11 @@
         // Classes eagerly during bootstrap
         String csn;
         if (charsetName.equals("UTF-8")) {
-            return UTF_8.INSTANCE;
+            return java.nio.charset.StandardCharsets.UTF_8;
         } else if (charsetName.equals("US-ASCII")) {
-            return US_ASCII.INSTANCE;
+            return java.nio.charset.StandardCharsets.US_ASCII;
         } else if (charsetName.equals("ISO-8859-1")) {
-            return ISO_8859_1.INSTANCE;
+            return java.nio.charset.StandardCharsets.ISO_8859_1;
         } else {
             csn = canonicalize(toLower(charsetName));
         }
--- a/src/java.base/share/classes/sun/nio/cs/US_ASCII.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/share/classes/sun/nio/cs/US_ASCII.java	Fri Apr 06 03:53:28 2018 +0200
@@ -36,8 +36,6 @@
     extends Charset
     implements HistoricallyNamedCharset
 {
-    public static final US_ASCII INSTANCE = new US_ASCII();
-
     public US_ASCII() {
         super("US-ASCII", StandardCharsets.aliases_US_ASCII());
     }
--- a/src/java.base/share/classes/sun/nio/cs/UTF_16.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/share/classes/sun/nio/cs/UTF_16.java	Fri Apr 06 03:53:28 2018 +0200
@@ -29,7 +29,7 @@
 import java.nio.charset.CharsetDecoder;
 import java.nio.charset.CharsetEncoder;
 
-class UTF_16 extends Unicode
+public class UTF_16 extends Unicode
 {
 
     public UTF_16() {
--- a/src/java.base/share/classes/sun/nio/cs/UTF_16BE.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/share/classes/sun/nio/cs/UTF_16BE.java	Fri Apr 06 03:53:28 2018 +0200
@@ -29,7 +29,7 @@
 import java.nio.charset.CharsetDecoder;
 import java.nio.charset.CharsetEncoder;
 
-class UTF_16BE extends Unicode
+public class UTF_16BE extends Unicode
 {
 
     public UTF_16BE() {
--- a/src/java.base/share/classes/sun/nio/cs/UTF_16LE.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/share/classes/sun/nio/cs/UTF_16LE.java	Fri Apr 06 03:53:28 2018 +0200
@@ -29,7 +29,7 @@
 import java.nio.charset.CharsetDecoder;
 import java.nio.charset.CharsetEncoder;
 
-class UTF_16LE extends Unicode
+public class UTF_16LE extends Unicode
 {
 
     public UTF_16LE() {
--- a/src/java.base/share/classes/sun/nio/cs/UTF_8.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/share/classes/sun/nio/cs/UTF_8.java	Fri Apr 06 03:53:28 2018 +0200
@@ -55,9 +55,6 @@
  */
 
 public final class UTF_8 extends Unicode {
-
-    public static final UTF_8 INSTANCE = new UTF_8();
-
     public UTF_8() {
         super("UTF-8", StandardCharsets.aliases_UTF_8());
     }
--- a/src/java.base/share/native/libjava/io_util.c	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/share/native/libjava/io_util.c	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1994, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1994, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -201,7 +201,7 @@
     }
 }
 
-void
+JNIEXPORT void JNICALL
 throwFileNotFoundException(JNIEnv *env, jstring path)
 {
     char buf[256];
--- a/src/java.base/share/native/libjava/io_util.h	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/share/native/libjava/io_util.h	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -54,7 +54,8 @@
 void writeBytes(JNIEnv *env, jobject this, jbyteArray bytes, jint off,
                 jint len, jboolean append, jfieldID fid);
 void fileOpen(JNIEnv *env, jobject this, jstring path, jfieldID fid, int flags);
-void throwFileNotFoundException(JNIEnv *env, jstring path);
+JNIEXPORT void JNICALL
+throwFileNotFoundException(JNIEnv *env, jstring path);
 
 /*
  * Macros for managing platform strings.  The typical usage pattern is:
--- a/src/java.base/share/native/libjava/jni_util.h	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/share/native/libjava/jni_util.h	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -395,8 +395,11 @@
 void buildJniFunctionName(const char *sym, const char *cname,
                           char *jniEntryName);
 
-extern size_t getLastErrorString(char *buf, size_t len);
-extern int getErrorString(int err, char *buf, size_t len);
+JNIEXPORT size_t JNICALL
+getLastErrorString(char *buf, size_t len);
+
+JNIEXPORT int JNICALL
+getErrorString(int err, char *buf, size_t len);
 
 #ifdef STATIC_BUILD
 /* Macros for handling declaration of static/dynamic
--- a/src/java.base/share/native/libjimage/jimage.cpp	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/share/native/libjimage/jimage.cpp	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -55,7 +55,8 @@
  *   }
  *   ...
  */
-extern "C" JImageFile* JIMAGE_Open(const char *name, jint* error) {
+extern "C" JNIEXPORT JImageFile* JNICALL
+JIMAGE_Open(const char *name, jint* error) {
     // TODO - return a meaningful error code
     *error = 0;
     ImageFileReader* jfile = ImageFileReader::open(name);
@@ -71,7 +72,8 @@
  * Ex.
  *  (*JImageClose)(image);
  */
-extern "C" void JIMAGE_Close(JImageFile* image) {
+extern "C" JNIEXPORT void JNICALL
+JIMAGE_Close(JImageFile* image) {
     ImageFileReader::close((ImageFileReader*) image);
 }
 
@@ -87,7 +89,8 @@
  *  tty->print_cr(package);
  *  -> java.base
  */
-extern "C" const char* JIMAGE_PackageToModule(JImageFile* image, const char* package_name) {
+extern "C" JNIEXPORT const char* JNICALL
+JIMAGE_PackageToModule(JImageFile* image, const char* package_name) {
     return ((ImageFileReader*) image)->get_image_module_data()->package_to_module(package_name);
 }
 
@@ -105,7 +108,8 @@
  *   JImageLocationRef location = (*JImageFindResource)(image,
  *                                 "java.base", "9.0", "java/lang/String.class", &size);
  */
-extern "C" JImageLocationRef JIMAGE_FindResource(JImageFile* image,
+extern "C" JNIEXPORT JImageLocationRef JNICALL
+JIMAGE_FindResource(JImageFile* image,
         const char* module_name, const char* version, const char* name,
         jlong* size) {
     // Concatenate to get full path
@@ -151,7 +155,8 @@
  *  char* buffer = new char[size];
  *  (*JImageGetResource)(image, location, buffer, size);
  */
-extern "C" jlong JIMAGE_GetResource(JImageFile* image, JImageLocationRef location,
+extern "C" JNIEXPORT jlong JNICALL
+JIMAGE_GetResource(JImageFile* image, JImageLocationRef location,
         char* buffer, jlong size) {
     ((ImageFileReader*) image)->get_resource((u4) location, (u1*) buffer);
     return size;
@@ -179,7 +184,8 @@
  *   }
  *   (*JImageResourceIterator)(image, ctw_visitor, loader);
  */
-extern "C" void JIMAGE_ResourceIterator(JImageFile* image,
+extern "C" JNIEXPORT void JNICALL
+JIMAGE_ResourceIterator(JImageFile* image,
         JImageResourceVisitor_t visitor, void* arg) {
     ImageFileReader* imageFile = (ImageFileReader*) image;
     u4 nEntries = imageFile->table_length();
@@ -220,7 +226,8 @@
  *   char path[JIMAGE_MAX_PATH];
  *    (*JImageResourcePath)(image, location, path, JIMAGE_MAX_PATH);
  */
-extern "C" bool JIMAGE_ResourcePath(JImageFile* image, JImageLocationRef locationRef,
+extern "C" JNIEXPORT bool JNICALL
+JIMAGE_ResourcePath(JImageFile* image, JImageLocationRef locationRef,
                                     char* path, size_t max) {
     ImageFileReader* imageFile = (ImageFileReader*) image;
 
--- a/src/java.base/share/native/libjimage/jimage.hpp	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/share/native/libjimage/jimage.hpp	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -72,7 +72,8 @@
  *   ...
  */
 
-extern "C" JImageFile* JIMAGE_Open(const char *name, jint* error);
+extern "C" JNIEXPORT JImageFile* JNICALL
+JIMAGE_Open(const char *name, jint* error);
 
 typedef JImageFile* (*JImageOpen_t)(const char *name, jint* error);
 
@@ -86,7 +87,8 @@
  *  (*JImageClose)(image);
  */
 
-extern "C" void JIMAGE_Close(JImageFile* jimage);
+extern "C" JNIEXPORT void JNICALL
+JIMAGE_Close(JImageFile* jimage);
 
 typedef void (*JImageClose_t)(JImageFile* jimage);
 
@@ -104,7 +106,8 @@
  *  -> java.base
  */
 
-extern "C" const char * JIMAGE_PackageToModule(JImageFile* jimage, const char* package_name);
+extern "C" JNIEXPORT const char * JNICALL
+JIMAGE_PackageToModule(JImageFile* jimage, const char* package_name);
 
 typedef const char* (*JImagePackageToModule_t)(JImageFile* jimage, const char* package_name);
 
@@ -123,7 +126,7 @@
  *   JImageLocationRef location = (*JImageFindResource)(image,
  *                                "java.base", "9.0", "java/lang/String.class", &size);
  */
-extern "C" JImageLocationRef JIMAGE_FindResource(JImageFile* jimage,
+extern "C" JNIEXPORT JImageLocationRef JIMAGE_FindResource(JImageFile* jimage,
         const char* module_name, const char* version, const char* name,
         jlong* size);
 
@@ -147,7 +150,8 @@
  *  char* buffer = new char[size];
  *  (*JImageGetResource)(image, location, buffer, size);
  */
-extern "C" jlong JIMAGE_GetResource(JImageFile* jimage, JImageLocationRef location,
+extern "C" JNIEXPORT jlong JNICALL
+JIMAGE_GetResource(JImageFile* jimage, JImageLocationRef location,
         char* buffer, jlong size);
 
 typedef jlong(*JImageGetResource_t)(JImageFile* jimage, JImageLocationRef location,
@@ -181,7 +185,8 @@
         const char* module_name, const char* version, const char* package,
         const char* name, const char* extension, void* arg);
 
-extern "C" void JIMAGE_ResourceIterator(JImageFile* jimage,
+extern "C" JNIEXPORT void JNICALL
+JIMAGE_ResourceIterator(JImageFile* jimage,
         JImageResourceVisitor_t visitor, void *arg);
 
 typedef void (*JImageResourceIterator_t)(JImageFile* jimage,
@@ -197,7 +202,8 @@
  *   char path[JIMAGE_MAX_PATH];
  *    (*JImageResourcePath)(image, location, path, JIMAGE_MAX_PATH);
  */
-extern "C" bool JIMAGE_ResourcePath(JImageFile* image, JImageLocationRef locationRef,
+extern "C" JNIEXPORT bool JNICALL
+JIMAGE_ResourcePath(JImageFile* image, JImageLocationRef locationRef,
                                     char* path, size_t max);
 
 typedef bool (*JImage_ResourcePath_t)(JImageFile* jimage, JImageLocationRef location,
--- a/src/java.base/share/native/libjli/args.c	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/share/native/libjli/args.c	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -38,6 +38,7 @@
   int IsWhiteSpaceOption(const char* name) { return 1; }
 #else
   #include "java.h"
+  #include "jni.h"
 #endif
 
 #include "jli_util.h"
@@ -78,7 +79,8 @@
 static jboolean stopExpansion = JNI_FALSE;
 static jboolean relaunch = JNI_FALSE;
 
-void JLI_InitArgProcessing(jboolean hasJavaArgs, jboolean disableArgFile) {
+JNIEXPORT void JNICALL
+JLI_InitArgProcessing(jboolean hasJavaArgs, jboolean disableArgFile) {
     // No expansion for relaunch
     if (argsCount != 1) {
         relaunch = JNI_TRUE;
@@ -94,7 +96,8 @@
     firstAppArgIndex = hasJavaArgs ? 0: NOT_FOUND;
 }
 
-int JLI_GetAppArgIndex() {
+JNIEXPORT int JNICALL
+JLI_GetAppArgIndex() {
     // Will be 0 for tools
     return firstAppArgIndex;
 }
@@ -373,7 +376,8 @@
     return rv;
 }
 
-JLI_List JLI_PreprocessArg(const char *arg)
+JNIEXPORT JLI_List JNICALL
+JLI_PreprocessArg(const char *arg)
 {
     JLI_List rv;
 
@@ -428,7 +432,8 @@
            JLI_StrCmp(arg, "--full-version") == 0;
 }
 
-jboolean JLI_AddArgsFromEnvVar(JLI_List args, const char *var_name) {
+JNIEXPORT jboolean JNICALL
+JLI_AddArgsFromEnvVar(JLI_List args, const char *var_name) {
     char *env = getenv(var_name);
     char *p, *arg;
     char quote;
--- a/src/java.base/share/native/libjli/java.c	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/share/native/libjli/java.c	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1995, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -52,6 +52,7 @@
 
 
 #include "java.h"
+#include "jni.h"
 
 /*
  * A NOTE TO DEVELOPERS: For performance reasons it is important that
@@ -212,7 +213,7 @@
 /*
  * Entry point.
  */
-int
+JNIEXPORT int JNICALL
 JLI_Launch(int argc, char ** argv,              /* main argc, argc */
         int jargc, const char** jargv,          /* java args */
         int appclassc, const char** appclassv,  /* app classpath */
@@ -2337,7 +2338,7 @@
 /*
  * A utility procedure to always print to stderr
  */
-void
+JNIEXPORT void JNICALL
 JLI_ReportMessage(const char* fmt, ...)
 {
     va_list vl;
--- a/src/java.base/share/native/libjli/java.h	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/share/native/libjli/java.h	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -86,7 +86,7 @@
     GetCreatedJavaVMs_t GetCreatedJavaVMs;
 } InvocationFunctions;
 
-int
+JNIEXPORT int JNICALL
 JLI_Launch(int argc, char ** argv,              /* main argc, argc */
         int jargc, const char** jargv,          /* java args */
         int appclassc, const char** appclassv,  /* app classpath */
@@ -133,13 +133,16 @@
                                 char *jvmcfg,  jint so_jvmcfg);
 
 /* Reports an error message to stderr or a window as appropriate. */
-void JLI_ReportErrorMessage(const char * message, ...);
+JNIEXPORT void JNICALL
+JLI_ReportErrorMessage(const char * message, ...);
 
 /* Reports a system error message to stderr or a window */
-void JLI_ReportErrorMessageSys(const char * message, ...);
+JNIEXPORT void JNICALL
+JLI_ReportErrorMessageSys(const char * message, ...);
 
 /* Reports an error message only to stderr. */
-void JLI_ReportMessage(const char * message, ...);
+JNIEXPORT void JNICALL
+JLI_ReportMessage(const char * message, ...);
 
 /* Reports a message only to stdout. */
 void JLI_ShowMessage(const char * message, ...);
@@ -148,7 +151,8 @@
  * Reports an exception which terminates the vm to stderr or a window
  * as appropriate.
  */
-void JLI_ReportExceptionDescription(JNIEnv * env);
+JNIEXPORT void JNICALL
+JLI_ReportExceptionDescription(JNIEnv * env);
 void PrintMachineDependentOptions();
 
 /*
--- a/src/java.base/share/native/libjli/jli_util.c	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/share/native/libjli/jli_util.c	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,13 +26,14 @@
 #include <stdio.h>
 #include <string.h>
 #include <stdarg.h>
+#include "jni.h"
 #include "jli_util.h"
 
 /*
  * Returns a pointer to a block of at least 'size' bytes of memory.
  * Prints error message and exits if the memory could not be allocated.
  */
-void *
+JNIEXPORT void * JNICALL
 JLI_MemAlloc(size_t size)
 {
     void *p = malloc(size);
@@ -62,7 +63,7 @@
  * Wrapper over strdup(3C) which prints an error message and exits if memory
  * could not be allocated.
  */
-char *
+JNIEXPORT char * JNICALL
 JLI_StringDup(const char *s1)
 {
     char *s = strdup(s1);
@@ -77,7 +78,7 @@
  * Very equivalent to free(ptr).
  * Here to maintain pairing with the above routines.
  */
-void
+JNIEXPORT void JNICALL
 JLI_MemFree(void *ptr)
 {
     free(ptr);
@@ -99,7 +100,7 @@
     fflush(stdout);
 }
 
-void
+JNIEXPORT void JNICALL
 JLI_SetTraceLauncher()
 {
    if (getenv(JLDEBUG_ENV_ENTRY) != 0) {
@@ -120,7 +121,7 @@
    return JLI_StrNCmp(s1, s2, JLI_StrLen(s2));
 }
 
-JLI_List
+JNIEXPORT JLI_List JNICALL
 JLI_List_new(size_t capacity)
 {
     JLI_List l = (JLI_List) JLI_MemAlloc(sizeof(struct JLI_List_));
@@ -155,7 +156,7 @@
     }
 }
 
-void
+JNIEXPORT void JNICALL
 JLI_List_add(JLI_List sl, char *str)
 {
     JLI_List_ensureCapacity(sl, sl->size+1);
--- a/src/java.base/share/native/libjli/jli_util.h	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/share/native/libjli/jli_util.h	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -40,10 +40,17 @@
 
 #define JLDEBUG_ENV_ENTRY "_JAVA_LAUNCHER_DEBUG"
 
-void *JLI_MemAlloc(size_t size);
+JNIEXPORT void * JNICALL
+JLI_MemAlloc(size_t size);
+
 void *JLI_MemRealloc(void *ptr, size_t size);
-char *JLI_StringDup(const char *s1);
-void  JLI_MemFree(void *ptr);
+
+JNIEXPORT char * JNICALL
+JLI_StringDup(const char *s1);
+
+JNIEXPORT void JNICALL
+JLI_MemFree(void *ptr);
+
 int   JLI_StrCCmp(const char *s1, const char* s2);
 
 typedef struct {
@@ -51,9 +58,14 @@
     jboolean has_wildcard;
 } StdArg;
 
-StdArg *JLI_GetStdArgs();
-int     JLI_GetStdArgc();
-int     JLI_GetAppArgIndex();
+JNIEXPORT StdArg * JNICALL
+JLI_GetStdArgs();
+
+JNIEXPORT int JNICALL
+JLI_GetStdArgc();
+
+JNIEXPORT int JNICALL
+JLI_GetAppArgIndex();
 
 #define JLI_StrLen(p1)          strlen((p1))
 #define JLI_StrChr(p1, p2)      strchr((p1), (p2))
@@ -77,7 +89,8 @@
 #define JLI_StrCaseCmp(p1, p2)          stricmp((p1), (p2))
 #define JLI_StrNCaseCmp(p1, p2, p3)     strnicmp((p1), (p2), (p3))
 int  JLI_Snprintf(char *buffer, size_t size, const char *format, ...);
-void JLI_CmdToArgs(char *cmdline);
+JNIEXPORT void JNICALL
+JLI_CmdToArgs(char *cmdline);
 #define JLI_Lseek                       _lseeki64
 #define JLI_PutEnv                      _putenv
 #define JLI_GetPid                      _getpid
@@ -108,7 +121,10 @@
  * Make launcher spit debug output.
  */
 void     JLI_TraceLauncher(const char* fmt, ...);
-void     JLI_SetTraceLauncher();
+
+JNIEXPORT void JNICALL
+JLI_SetTraceLauncher();
+
 jboolean JLI_IsTraceLauncher();
 
 /*
@@ -122,19 +138,29 @@
 };
 typedef struct JLI_List_ *JLI_List;
 
-JLI_List JLI_List_new(size_t capacity);
+JNIEXPORT JLI_List JNICALL
+JLI_List_new(size_t capacity);
+
 void JLI_List_free(JLI_List l);
 void JLI_List_ensureCapacity(JLI_List l, size_t capacity);
+
 /* e must be JLI_MemFree-able */
-void JLI_List_add(JLI_List l, char *e);
+JNIEXPORT void JNICALL
+JLI_List_add(JLI_List l, char *e);
+
 /* a copy is made out of beg */
 void JLI_List_addSubstring(JLI_List l, const char *beg, size_t len);
 char *JLI_List_combine(JLI_List sl);
 char *JLI_List_join(JLI_List l, char sep);
 JLI_List JLI_List_split(const char *str, char sep);
 
-void JLI_InitArgProcessing(jboolean hasJavaArgs, jboolean disableArgFile);
-JLI_List JLI_PreprocessArg(const char *arg);
-jboolean JLI_AddArgsFromEnvVar(JLI_List args, const char *var_name);
+JNIEXPORT void JNICALL
+JLI_InitArgProcessing(jboolean hasJavaArgs, jboolean disableArgFile);
+
+JNIEXPORT JLI_List JNICALL
+JLI_PreprocessArg(const char *arg);
+
+JNIEXPORT jboolean JNICALL
+JLI_AddArgsFromEnvVar(JLI_List args, const char *var_name);
 
 #endif  /* _JLI_UTIL_H */
--- a/src/java.base/share/native/libjli/manifest_info.h	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/share/native/libjli/manifest_info.h	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,7 @@
 #define _MANIFEST_INFO_H
 
 #include <sys/types.h>
+#include "jni.h"
 
 /*
  * Zip file header signatures
@@ -186,7 +187,9 @@
 void    *JLI_JarUnpackFile(const char *jarfile, const char *filename,
                 int *size);
 void    JLI_FreeManifest(void);
-int     JLI_ManifestIterate(const char *jarfile, attribute_closure ac,
+
+JNIEXPORT int JNICALL
+JLI_ManifestIterate(const char *jarfile, attribute_closure ac,
                 void *user_data);
 
 #endif  /* _MANIFEST_INFO_H */
--- a/src/java.base/share/native/libjli/parse_manifest.c	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/share/native/libjli/parse_manifest.c	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -29,6 +29,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#include "jni.h"
 #include "jli_util.h"
 
 #include <zlib.h>
@@ -676,7 +677,7 @@
  *   -2 Error accessing the manifest from within the jarfile (most likely
  *      this means a manifest is not present, or it isn't a valid zip/jar file).
  */
-int
+JNIEXPORT int JNICALL
 JLI_ManifestIterate(const char *jarfile, attribute_closure ac, void *user_data)
 {
     int     fd;
--- a/src/java.base/share/native/libnet/net_util.h	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/share/native/libnet/net_util.h	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -202,6 +202,7 @@
 
 unsigned short in_cksum(unsigned short *addr, int len);
 
-jint NET_Wait(JNIEnv *env, jint fd, jint flags, jint timeout);
+JNIEXPORT jint JNICALL
+NET_Wait(JNIEnv *env, jint fd, jint flags, jint timeout);
 
 #endif /* NET_UTILS_H */
--- a/src/java.base/share/native/libzip/CRC32.c	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/share/native/libzip/CRC32.c	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -54,7 +54,7 @@
     return crc;
 }
 
-jint JNICALL
+JNIEXPORT jint JNICALL
 ZIP_CRC32(jint crc, const jbyte *buf, jint len)
 {
     return crc32(crc, (Bytef*)buf, len);
--- a/src/java.base/share/native/libzip/zip_util.c	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/share/native/libzip/zip_util.c	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1995, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -881,7 +881,7 @@
  * set to the error message text if msg != 0. Otherwise, *msg will be
  * set to NULL. Caller doesn't need to free the error message.
  */
-jzfile * JNICALL
+JNIEXPORT jzfile * JNICALL
 ZIP_Open(const char *name, char **pmsg)
 {
     jzfile *file = ZIP_Open_Generic(name, pmsg, O_RDONLY, 0);
@@ -895,7 +895,7 @@
 /*
  * Closes the specified zip file object.
  */
-void JNICALL
+JNIEXPORT void JNICALL
 ZIP_Close(jzfile *zip)
 {
     MLOCK(zfiles_lock);
@@ -1094,7 +1094,7 @@
  * jzentry for each zip.  This optimizes a common access pattern.
  */
 
-void JNICALL
+JNIEXPORT void JNICALL
 ZIP_FreeEntry(jzfile *jz, jzentry *ze)
 {
     jzentry *last;
@@ -1115,7 +1115,7 @@
  * Returns the zip entry corresponding to the specified name, or
  * NULL if not found.
  */
-jzentry *
+JNIEXPORT jzentry * JNICALL
 ZIP_GetEntry(jzfile *zip, char *name, jint ulen)
 {
     if (ulen == 0) {
@@ -1238,7 +1238,7 @@
  * Returns the n'th (starting at zero) zip file entry, or NULL if the
  * specified index was out of range.
  */
-jzentry * JNICALL
+JNIEXPORT jzentry * JNICALL
 ZIP_GetNextEntry(jzfile *zip, jint n)
 {
     jzentry *result;
@@ -1254,7 +1254,7 @@
 /*
  * Locks the specified zip file for reading.
  */
-void
+JNIEXPORT void JNICALL
 ZIP_Lock(jzfile *zip)
 {
     MLOCK(zip->lock);
@@ -1263,7 +1263,7 @@
 /*
  * Unlocks the specified zip file.
  */
-void
+JNIEXPORT void JNICALL
 ZIP_Unlock(jzfile *zip)
 {
     MUNLOCK(zip->lock);
@@ -1310,7 +1310,7 @@
  * The current implementation does not support reading an entry that
  * has the size bigger than 2**32 bytes in ONE invocation.
  */
-jint
+JNIEXPORT jint JNICALL
 ZIP_Read(jzfile *zip, jzentry *entry, jlong pos, void *buf, jint len)
 {
     jlong entry_size;
@@ -1439,7 +1439,7 @@
  * The current implementation does not support reading an entry that
  * has the size bigger than 2**32 bytes in ONE invocation.
  */
-jzentry * JNICALL
+JNIEXPORT jzentry * JNICALL
 ZIP_FindEntry(jzfile *zip, char *name, jint *sizeP, jint *nameLenP)
 {
     jzentry *entry = ZIP_GetEntry(zip, name, 0);
@@ -1456,7 +1456,7 @@
  * Note: this is called from the separately delivered VM (hotspot/classic)
  * so we have to be careful to maintain the expected behaviour.
  */
-jboolean JNICALL
+JNIEXPORT jboolean JNICALL
 ZIP_ReadEntry(jzfile *zip, jzentry *entry, unsigned char *buf, char *entryname)
 {
     char *msg;
@@ -1515,7 +1515,7 @@
     return JNI_TRUE;
 }
 
-jboolean JNICALL
+JNIEXPORT jboolean JNICALL
 ZIP_InflateFully(void *inBuf, jlong inLen, void *outBuf, jlong outLen, char **pmsg)
 {
     z_stream strm;
--- a/src/java.base/share/native/libzip/zip_util.h	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/share/native/libzip/zip_util.h	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -30,6 +30,8 @@
 #ifndef _ZIP_H_
 #define _ZIP_H_
 
+#include "jni.h"
+
 /*
  * Header signatures
  */
@@ -239,16 +241,16 @@
  */
 #define ZIP_ENDCHAIN ((jint)-1)
 
-jzentry * JNICALL
+JNIEXPORT jzentry * JNICALL
 ZIP_FindEntry(jzfile *zip, char *name, jint *sizeP, jint *nameLenP);
 
-jboolean JNICALL
+JNIEXPORT jboolean JNICALL
 ZIP_ReadEntry(jzfile *zip, jzentry *entry, unsigned char *buf, char *entrynm);
 
-jzentry * JNICALL
+JNIEXPORT jzentry * JNICALL
 ZIP_GetNextEntry(jzfile *zip, jint n);
 
-jzfile * JNICALL
+JNIEXPORT jzfile * JNICALL
 ZIP_Open(const char *name, char **pmsg);
 
 jzfile *
@@ -263,19 +265,23 @@
 jzfile *
 ZIP_Put_In_Cache0(const char *name, ZFILE zfd, char **pmsg, jlong lastModified, jboolean usemmap);
 
-void JNICALL
+JNIEXPORT void JNICALL
 ZIP_Close(jzfile *zip);
 
-jzentry * ZIP_GetEntry(jzfile *zip, char *name, jint ulen);
-void ZIP_Lock(jzfile *zip);
-void ZIP_Unlock(jzfile *zip);
-jint ZIP_Read(jzfile *zip, jzentry *entry, jlong pos, void *buf, jint len);
-void JNICALL
+JNIEXPORT jzentry * JNICALL
+ZIP_GetEntry(jzfile *zip, char *name, jint ulen);
+JNIEXPORT void JNICALL
+ZIP_Lock(jzfile *zip);
+JNIEXPORT void JNICALL
+ZIP_Unlock(jzfile *zip);
+JNIEXPORT jint JNICALL
+ZIP_Read(jzfile *zip, jzentry *entry, jlong pos, void *buf, jint len);
+JNIEXPORT void JNICALL
 ZIP_FreeEntry(jzfile *zip, jzentry *ze);
 jlong ZIP_GetEntryDataOffset(jzfile *zip, jzentry *entry);
 jzentry * ZIP_GetEntry2(jzfile *zip, char *name, jint ulen, jboolean addSlash);
 
-jboolean JNICALL
+JNIEXPORT jboolean JNICALL
 ZIP_InflateFully(void *inBuf, jlong inLen, void *outBuf, jlong outLen, char **pmsg);
 
 #endif /* !_ZIP_H_ */
--- a/src/java.base/solaris/classes/sun/nio/ch/DevPollArrayWrapper.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/solaris/classes/sun/nio/ch/DevPollArrayWrapper.java	Fri Apr 06 03:53:28 2018 +0200
@@ -26,12 +26,6 @@
 package sun.nio.ch;
 
 import java.io.IOException;
-import java.security.AccessController;
-import java.util.BitSet;
-import java.util.Map;
-import java.util.HashMap;
-import sun.security.action.GetIntegerAction;
-
 
 /**
  * Manipulates a native array of pollfd structs on Solaris:
@@ -48,43 +42,18 @@
 
 class DevPollArrayWrapper {
 
-    // Event masks
-    static final short POLLIN       = 0x0001;
-    static final short POLLPRI      = 0x0002;
-    static final short POLLOUT      = 0x0004;
-    static final short POLLRDNORM   = 0x0040;
-    static final short POLLWRNORM   = POLLOUT;
-    static final short POLLRDBAND   = 0x0080;
-    static final short POLLWRBAND   = 0x0100;
-    static final short POLLNORM     = POLLRDNORM;
-    static final short POLLERR      = 0x0008;
-    static final short POLLHUP      = 0x0010;
-    static final short POLLNVAL     = 0x0020;
+    // special event to remove a file descriptor from the driver
     static final short POLLREMOVE   = 0x0800;
-    static final short POLLCONN     = POLLOUT;
 
-    // Miscellaneous constants
+    // struct pollfd constants
     static final short SIZE_POLLFD   = 8;
     static final short FD_OFFSET     = 0;
     static final short EVENT_OFFSET  = 4;
     static final short REVENT_OFFSET = 6;
 
-    // Special value to indicate that an update should be ignored
-    static final byte  IGNORE        = (byte)-1;
-
-    // Maximum number of open file descriptors
-    static final int   OPEN_MAX      = IOUtil.fdLimit();
-
-    // Number of pollfd structures to create.
-    // dpwrite/ioctl(DP_POLL) allows up to OPEN_MAX-1
-    static final int   NUM_POLLFDS   = Math.min(OPEN_MAX-1, 8192);
-
-    // Initial size of arrays for fd registration changes
-    private static final int INITIAL_PENDING_UPDATE_SIZE = 64;
-
-    // maximum size of updatesLow
-    private static final int MAX_UPDATE_ARRAY_SIZE = AccessController.doPrivileged(
-        new GetIntegerAction("sun.nio.ch.maxUpdateArraySize", Math.min(OPEN_MAX, 64*1024)));
+    // maximum number of pollfd structure to poll or update at a time
+    // dpwrite/ioctl(DP_POLL) allows up to file descriptor limit minus 1
+    static final int NUM_POLLFDS = Math.min(IOUtil.fdLimit()-1, 1024);
 
     // The pollfd array for results from devpoll driver
     private final AllocatedNativeObject pollArray;
@@ -95,66 +64,29 @@
     // The fd of the devpoll driver
     private int wfd;
 
-    // The fd of the interrupt line going out
-    private int outgoingInterruptFD;
-
-    // The fd of the interrupt line coming in
-    private int incomingInterruptFD;
-
-    // The index of the interrupt FD
-    private int interruptedIndex;
-
-    // Number of updated pollfd entries
-    int updated;
-
-    // object to synchronize fd registration changes
-    private final Object updateLock = new Object();
-
-    // number of file descriptors with registration changes pending
-    private int updateCount;
+    DevPollArrayWrapper() throws IOException {
+        this.wfd = init();
 
-    // file descriptors with registration changes pending
-    private int[] updateDescriptors = new int[INITIAL_PENDING_UPDATE_SIZE];
-
-    // events for file descriptors with registration changes pending, indexed
-    // by file descriptor and stored as bytes for efficiency reasons. For
-    // file descriptors higher than MAX_UPDATE_ARRAY_SIZE (unlimited case at
-    // least then the update is stored in a map.
-    private final byte[] eventsLow = new byte[MAX_UPDATE_ARRAY_SIZE];
-    private Map<Integer,Byte> eventsHigh;
-
-    // Used by release and updateRegistrations to track whether a file
-    // descriptor is registered with /dev/poll.
-    private final BitSet registered = new BitSet();
-
-    DevPollArrayWrapper() throws IOException {
         int allocationSize = NUM_POLLFDS * SIZE_POLLFD;
-        pollArray = new AllocatedNativeObject(allocationSize, true);
-        pollArrayAddress = pollArray.address();
-        wfd = init();
-        if (OPEN_MAX > MAX_UPDATE_ARRAY_SIZE)
-            eventsHigh = new HashMap<>();
+        this.pollArray = new AllocatedNativeObject(allocationSize, true);
+        this.pollArrayAddress = pollArray.address();
     }
 
-    void initInterrupt(int fd0, int fd1) throws IOException {
-        outgoingInterruptFD = fd1;
-        incomingInterruptFD = fd0;
-        register(wfd, fd0, POLLIN);
+    void close() throws IOException {
+        FileDispatcherImpl.closeIntFD(wfd);
+        pollArray.free();
     }
 
-    void putReventOps(int i, int revent) {
-        int offset = SIZE_POLLFD * i + REVENT_OFFSET;
-        pollArray.putShort(offset, (short)revent);
+    void register(int fd, int ops) throws IOException {
+        register(wfd, fd, ops);
     }
 
-    int getEventOps(int i) {
-        int offset = SIZE_POLLFD * i + EVENT_OFFSET;
-        return pollArray.getShort(offset);
+    void registerMultiple(int numfds) throws IOException {
+        registerMultiple(wfd, pollArrayAddress, numfds);
     }
 
-    int getReventOps(int i) {
-        int offset = SIZE_POLLFD * i + REVENT_OFFSET;
-        return pollArray.getShort(offset);
+    int poll(long timeout) throws IOException {
+        return poll0(pollArrayAddress, NUM_POLLFDS, timeout, wfd);
     }
 
     int getDescriptor(int i) {
@@ -162,158 +94,24 @@
         return pollArray.getInt(offset);
     }
 
-    private void setUpdateEvents(int fd, byte events) {
-        if (fd < MAX_UPDATE_ARRAY_SIZE) {
-            eventsLow[fd] = events;
-        } else {
-            eventsHigh.put(Integer.valueOf(fd), Byte.valueOf(events));
-        }
-    }
-
-    private byte getUpdateEvents(int fd) {
-        if (fd < MAX_UPDATE_ARRAY_SIZE) {
-            return eventsLow[fd];
-        } else {
-            Byte result = eventsHigh.get(Integer.valueOf(fd));
-            // result should never be null
-            return result.byteValue();
-        }
-    }
-
-    void setInterest(int fd, int mask) {
-        synchronized (updateLock) {
-            // record the file descriptor and events, expanding the
-            // respective arrays first if necessary.
-            int oldCapacity = updateDescriptors.length;
-            if (updateCount == oldCapacity) {
-                int newCapacity = oldCapacity + INITIAL_PENDING_UPDATE_SIZE;
-                int[] newDescriptors = new int[newCapacity];
-                System.arraycopy(updateDescriptors, 0, newDescriptors, 0, oldCapacity);
-                updateDescriptors = newDescriptors;
-            }
-            updateDescriptors[updateCount++] = fd;
-
-            // events are stored as bytes for efficiency reasons
-            byte b = (byte)mask;
-            assert (b == mask) && (b != IGNORE);
-            setUpdateEvents(fd, b);
-        }
-    }
-
-    void release(int fd) throws IOException {
-        synchronized (updateLock) {
-            // ignore any pending update for this file descriptor
-            setUpdateEvents(fd, IGNORE);
-
-            // remove from /dev/poll
-            if (registered.get(fd)) {
-                register(wfd, fd, POLLREMOVE);
-                registered.clear(fd);
-            }
-        }
-    }
-
-    void close() throws IOException {
-        FileDispatcherImpl.closeIntFD(wfd);
-        pollArray.free();
-    }
-
-    int poll(long timeout) throws IOException {
-        updateRegistrations();
-        updated = poll0(pollArrayAddress, NUM_POLLFDS, timeout, wfd);
-        for (int i=0; i<updated; i++) {
-            if (getDescriptor(i) == incomingInterruptFD) {
-                interruptedIndex = i;
-                interrupted = true;
-                break;
-            }
-        }
-        return updated;
+    short getEventOps(int i) {
+        int offset = SIZE_POLLFD * i + EVENT_OFFSET;
+        return pollArray.getShort(offset);
     }
 
-    void updateRegistrations() throws IOException {
-        synchronized (updateLock) {
-            // Populate pollfd array with updated masks
-            int j = 0;
-            int index = 0;
-            while (j < updateCount) {
-                int fd = updateDescriptors[j];
-                short events = getUpdateEvents(fd);
-                boolean wasRegistered = registered.get(fd);
-
-                // events = 0 => POLLREMOVE or do-nothing
-                if (events != IGNORE) {
-                    if (events == 0) {
-                        if (wasRegistered) {
-                            events = POLLREMOVE;
-                            registered.clear(fd);
-                        } else {
-                            events = IGNORE;
-                        }
-                    } else {
-                        if (!wasRegistered) {
-                            registered.set(fd);
-                        }
-                    }
-                }
-
-                // populate pollfd array with updated event
-                if (events != IGNORE) {
-                    // insert POLLREMOVE if changing events
-                    if (wasRegistered && events != POLLREMOVE) {
-                        putPollFD(pollArray, index, fd, POLLREMOVE);
-                        index++;
-                    }
-                    putPollFD(pollArray, index, fd, events);
-                    index++;
-                    if (index >= (NUM_POLLFDS-1)) {
-                        registerMultiple(wfd, pollArray.address(), index);
-                        index = 0;
-                    }
-
-                    // events for this fd now up to date
-                    setUpdateEvents(fd, IGNORE);
-                }
-                j++;
-            }
-
-            // write any remaining updates
-            if (index > 0)
-                registerMultiple(wfd, pollArray.address(), index);
-
-            updateCount = 0;
-        }
+    short getReventOps(int i) {
+        int offset = SIZE_POLLFD * i + REVENT_OFFSET;
+        return pollArray.getShort(offset);
     }
 
-    private void putPollFD(AllocatedNativeObject array, int index, int fd,
-                           short event)
-    {
+    /**
+     * Updates the pollfd structure at the given index
+     */
+    void putPollFD(int index, int fd, short event) {
         int structIndex = SIZE_POLLFD * index;
-        array.putInt(structIndex + FD_OFFSET, fd);
-        array.putShort(structIndex + EVENT_OFFSET, event);
-        array.putShort(structIndex + REVENT_OFFSET, (short)0);
-    }
-
-    boolean interrupted = false;
-
-    public void interrupt() {
-        try {
-            IOUtil.write1(outgoingInterruptFD, (byte)0);
-        } catch (IOException ioe) {
-            throw new InternalError(ioe);
-        }
-    }
-
-    public int interruptedIndex() {
-        return interruptedIndex;
-    }
-
-    boolean interrupted() {
-        return interrupted;
-    }
-
-    void clearInterrupted() {
-        interrupted = false;
+        pollArray.putInt(structIndex + FD_OFFSET, fd);
+        pollArray.putShort(structIndex + EVENT_OFFSET, event);
+        pollArray.putShort(structIndex + REVENT_OFFSET, (short)0);
     }
 
     private native int init() throws IOException;
--- a/src/java.base/solaris/classes/sun/nio/ch/DevPollSelectorImpl.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/solaris/classes/sun/nio/ch/DevPollSelectorImpl.java	Fri Apr 06 03:53:28 2018 +0200
@@ -26,67 +26,64 @@
 package sun.nio.ch;
 
 import java.io.IOException;
-import java.nio.channels.*;
-import java.nio.channels.spi.*;
-import java.util.*;
+import java.nio.channels.ClosedSelectorException;
+import java.nio.channels.Selector;
+import java.nio.channels.spi.SelectorProvider;
+import java.util.ArrayDeque;
+import java.util.Deque;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.concurrent.TimeUnit;
 
+import static sun.nio.ch.DevPollArrayWrapper.NUM_POLLFDS;
+import static sun.nio.ch.DevPollArrayWrapper.POLLREMOVE;
 
 /**
- * An implementation of Selector for Solaris.
+ * Solaris /dev/poll based Selector implementation
  */
+
 class DevPollSelectorImpl
     extends SelectorImpl
 {
-    // File descriptors used for interrupt
+    // provides access to /dev/poll driver
+    private final DevPollArrayWrapper pollWrapper;
+
+    // file descriptors used for interrupt
     private final int fd0;
     private final int fd1;
 
-    // The poll object
-    private final DevPollArrayWrapper pollWrapper;
-
-    // Maps from file descriptors to keys
-    private final Map<Integer, SelectionKeyImpl> fdToKey;
+    // maps file descriptor to selection key, synchronize on selector
+    private final Map<Integer, SelectionKeyImpl> fdToKey = new HashMap<>();
 
-    // True if this Selector has been closed
-    private boolean closed;
+    // pending new registrations/updates, queued by implRegister and putEventOps
+    private final Object updateLock = new Object();
+    private final Deque<SelectionKeyImpl> newKeys = new ArrayDeque<>();
+    private final Deque<SelectionKeyImpl> updateKeys = new ArrayDeque<>();
+    private final Deque<Integer> updateEvents = new ArrayDeque<>();
 
-    // Lock for close/cleanup
-    private final Object closeLock = new Object();
-
-    // Lock for interrupt triggering and clearing
+    // interrupt triggering and clearing
     private final Object interruptLock = new Object();
     private boolean interruptTriggered;
 
-    /**
-     * Package private constructor called by factory method in
-     * the abstract superclass Selector.
-     */
+
     DevPollSelectorImpl(SelectorProvider sp) throws IOException {
         super(sp);
-        long pipeFds = IOUtil.makePipe(false);
-        fd0 = (int) (pipeFds >>> 32);
-        fd1 = (int) pipeFds;
+        this.pollWrapper = new DevPollArrayWrapper();
         try {
-            pollWrapper = new DevPollArrayWrapper();
-            pollWrapper.initInterrupt(fd0, fd1);
-            fdToKey = new HashMap<>();
-        } catch (Throwable t) {
-            try {
-                FileDispatcherImpl.closeIntFD(fd0);
-            } catch (IOException ioe0) {
-                t.addSuppressed(ioe0);
-            }
-            try {
-                FileDispatcherImpl.closeIntFD(fd1);
-            } catch (IOException ioe1) {
-                t.addSuppressed(ioe1);
-            }
-            throw t;
+            long fds = IOUtil.makePipe(false);
+            this.fd0 = (int) (fds >>> 32);
+            this.fd1 = (int) fds;
+        } catch (IOException ioe) {
+            pollWrapper.close();
+            throw ioe;
         }
+
+        // register one end of the socket pair for wakeups
+        pollWrapper.register(fd0, Net.POLLIN);
     }
 
     private void ensureOpen() {
-        if (closed)
+        if (!isOpen())
             throw new ClosedSelectorException();
     }
 
@@ -94,62 +91,118 @@
     protected int doSelect(long timeout)
         throws IOException
     {
-        ensureOpen();
+        assert Thread.holdsLock(this);
+        boolean blocking = (timeout != 0);
+
+        int numEntries;
+        processUpdateQueue();
         processDeregisterQueue();
         try {
-            begin();
-            pollWrapper.poll(timeout);
+            begin(blocking);
+            numEntries = pollWrapper.poll(timeout);
         } finally {
-            end();
+            end(blocking);
         }
         processDeregisterQueue();
-        int numKeysUpdated = updateSelectedKeys();
-        if (pollWrapper.interrupted()) {
-            // Clear the wakeup pipe
-            pollWrapper.putReventOps(pollWrapper.interruptedIndex(), 0);
-            synchronized (interruptLock) {
-                pollWrapper.clearInterrupted();
-                IOUtil.drain(fd0);
-                interruptTriggered = false;
-            }
-        }
-        return numKeysUpdated;
+        return updateSelectedKeys(numEntries);
     }
 
     /**
-     * Update the keys whose fd's have been selected by the devpoll
-     * driver. Add the ready keys to the ready queue.
+     * Process new registrations and changes to the interest ops.
      */
-    private int updateSelectedKeys() {
-        int entries = pollWrapper.updated;
+    private void processUpdateQueue() throws IOException {
+        assert Thread.holdsLock(this);
+
+        synchronized (updateLock) {
+            SelectionKeyImpl ski;
+
+            // new registrations
+            while ((ski = newKeys.pollFirst()) != null) {
+                if (ski.isValid()) {
+                    int fd = ski.channel.getFDVal();
+                    SelectionKeyImpl previous = fdToKey.put(fd, ski);
+                    assert previous == null;
+                    assert ski.registeredEvents() == 0;
+                }
+            }
+
+            // Translate the queued updates to changes to the set of monitored
+            // file descriptors. The changes are written to the /dev/poll driver
+            // in bulk.
+            assert updateKeys.size() == updateEvents.size();
+            int index = 0;
+            while ((ski = updateKeys.pollFirst()) != null) {
+                int newEvents = updateEvents.pollFirst();
+                int fd = ski.channel.getFDVal();
+                if (ski.isValid() && fdToKey.containsKey(fd)) {
+                    int registeredEvents = ski.registeredEvents();
+                    if (newEvents != registeredEvents) {
+                        if (registeredEvents != 0)
+                            pollWrapper.putPollFD(index++, fd, POLLREMOVE);
+                        if (newEvents != 0)
+                            pollWrapper.putPollFD(index++, fd, (short)newEvents);
+                        ski.registeredEvents(newEvents);
+
+                        // write to /dev/poll
+                        if (index > (NUM_POLLFDS-2)) {
+                            pollWrapper.registerMultiple(index);
+                            index = 0;
+                        }
+                    }
+                }
+            }
+
+            // write any remaining changes
+            if (index > 0)
+                pollWrapper.registerMultiple(index);
+        }
+    }
+
+    /**
+     * Update the keys of file descriptors that were polled and add them to
+     * the selected-key set.
+     * If the interrupt fd has been selected, drain it and clear the interrupt.
+     */
+    private int updateSelectedKeys(int numEntries) throws IOException {
+        assert Thread.holdsLock(this);
+        assert Thread.holdsLock(nioSelectedKeys());
+
+        boolean interrupted = false;
         int numKeysUpdated = 0;
-        for (int i=0; i<entries; i++) {
-            int nextFD = pollWrapper.getDescriptor(i);
-            SelectionKeyImpl ski = fdToKey.get(Integer.valueOf(nextFD));
-            // ski is null in the case of an interrupt
-            if (ski != null) {
-                int rOps = pollWrapper.getReventOps(i);
-                if (selectedKeys.contains(ski)) {
-                    if (ski.channel.translateAndSetReadyOps(rOps, ski)) {
-                        numKeysUpdated++;
-                    }
-                } else {
-                    ski.channel.translateAndSetReadyOps(rOps, ski);
-                    if ((ski.nioReadyOps() & ski.nioInterestOps()) != 0) {
-                        selectedKeys.add(ski);
-                        numKeysUpdated++;
+        for (int i=0; i<numEntries; i++) {
+            int fd = pollWrapper.getDescriptor(i);
+            if (fd == fd0) {
+                interrupted = true;
+            } else {
+                SelectionKeyImpl ski = fdToKey.get(fd);
+                if (ski != null) {
+                    int rOps = pollWrapper.getReventOps(i);
+                    if (selectedKeys.contains(ski)) {
+                        if (ski.channel.translateAndSetReadyOps(rOps, ski)) {
+                            numKeysUpdated++;
+                        }
+                    } else {
+                        ski.channel.translateAndSetReadyOps(rOps, ski);
+                        if ((ski.nioReadyOps() & ski.nioInterestOps()) != 0) {
+                            selectedKeys.add(ski);
+                            numKeysUpdated++;
+                        }
                     }
                 }
             }
         }
+
+        if (interrupted) {
+            clearInterrupt();
+        }
+
         return numKeysUpdated;
     }
 
     @Override
     protected void implClose() throws IOException {
-        if (closed)
-            return;
-        closed = true;
+        assert !isOpen();
+        assert Thread.holdsLock(this);
 
         // prevent further wakeup
         synchronized (interruptLock) {
@@ -159,57 +212,60 @@
         pollWrapper.close();
         FileDispatcherImpl.closeIntFD(fd0);
         FileDispatcherImpl.closeIntFD(fd1);
-
-        // Deregister channels
-        Iterator<SelectionKey> i = keys.iterator();
-        while (i.hasNext()) {
-            SelectionKeyImpl ski = (SelectionKeyImpl)i.next();
-            deregister(ski);
-            SelectableChannel selch = ski.channel();
-            if (!selch.isOpen() && !selch.isRegistered())
-                ((SelChImpl)selch).kill();
-            i.remove();
-        }
     }
 
     @Override
     protected void implRegister(SelectionKeyImpl ski) {
-        int fd = IOUtil.fdVal(ski.channel.getFD());
-        fdToKey.put(Integer.valueOf(fd), ski);
-        keys.add(ski);
+        ensureOpen();
+        synchronized (updateLock) {
+            newKeys.addLast(ski);
+        }
     }
 
     @Override
     protected void implDereg(SelectionKeyImpl ski) throws IOException {
-        int i = ski.getIndex();
-        assert (i >= 0);
+        assert !ski.isValid();
+        assert Thread.holdsLock(this);
+
         int fd = ski.channel.getFDVal();
-        fdToKey.remove(Integer.valueOf(fd));
-        pollWrapper.release(fd);
-        ski.setIndex(-1);
-        keys.remove(ski);
-        selectedKeys.remove(ski);
-        deregister((AbstractSelectionKey)ski);
-        SelectableChannel selch = ski.channel();
-        if (!selch.isOpen() && !selch.isRegistered())
-            ((SelChImpl)selch).kill();
+        if (fdToKey.remove(fd) != null) {
+            if (ski.registeredEvents() != 0) {
+                pollWrapper.register(fd, POLLREMOVE);
+                ski.registeredEvents(0);
+            }
+        } else {
+            assert ski.registeredEvents() == 0;
+        }
     }
 
     @Override
-    public void putEventOps(SelectionKeyImpl sk, int ops) {
+    public void putEventOps(SelectionKeyImpl ski, int events) {
         ensureOpen();
-        int fd = IOUtil.fdVal(sk.channel.getFD());
-        pollWrapper.setInterest(fd, ops);
+        synchronized (updateLock) {
+            updateEvents.addLast(events);   // events first in case adding key fails
+            updateKeys.addLast(ski);
+        }
     }
 
     @Override
     public Selector wakeup() {
         synchronized (interruptLock) {
             if (!interruptTriggered) {
-                pollWrapper.interrupt();
+                try {
+                    IOUtil.write1(fd1, (byte)0);
+                } catch (IOException ioe) {
+                    throw new InternalError(ioe);
+                }
                 interruptTriggered = true;
             }
         }
         return this;
     }
+
+    private void clearInterrupt() throws IOException {
+        synchronized (interruptLock) {
+            IOUtil.drain(fd0);
+            interruptTriggered = false;
+        }
+    }
 }
--- a/src/java.base/solaris/classes/sun/nio/ch/EventPortSelectorImpl.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/solaris/classes/sun/nio/ch/EventPortSelectorImpl.java	Fri Apr 06 03:53:28 2018 +0200
@@ -26,11 +26,28 @@
 package sun.nio.ch;
 
 import java.io.IOException;
-import java.nio.channels.*;
-import java.nio.channels.spi.*;
+import java.nio.channels.ClosedSelectorException;
+import java.nio.channels.SelectionKey;
+import java.nio.channels.Selector;
+import java.nio.channels.spi.SelectorProvider;
+import java.util.ArrayDeque;
+import java.util.Deque;
+import java.util.HashMap;
 import java.util.Map;
-import java.util.HashMap;
-import java.util.Iterator;
+import java.util.concurrent.TimeUnit;
+
+import static sun.nio.ch.SolarisEventPort.PORT_SOURCE_FD;
+import static sun.nio.ch.SolarisEventPort.PORT_SOURCE_USER;
+import static sun.nio.ch.SolarisEventPort.SIZEOF_PORT_EVENT;
+import static sun.nio.ch.SolarisEventPort.OFFSETOF_EVENTS;
+import static sun.nio.ch.SolarisEventPort.OFFSETOF_SOURCE;
+import static sun.nio.ch.SolarisEventPort.OFFSETOF_OBJECT;
+import static sun.nio.ch.SolarisEventPort.port_create;
+import static sun.nio.ch.SolarisEventPort.port_close;
+import static sun.nio.ch.SolarisEventPort.port_associate;
+import static sun.nio.ch.SolarisEventPort.port_dissociate;
+import static sun.nio.ch.SolarisEventPort.port_getn;
+import static sun.nio.ch.SolarisEventPort.port_send;
 
 /**
  * Selector implementation based on the Solaris event port mechanism.
@@ -39,140 +56,261 @@
 class EventPortSelectorImpl
     extends SelectorImpl
 {
-    private final EventPortWrapper pollWrapper;
+    // maximum number of events to retrive in one call to port_getn
+    static final int MAX_EVENTS = Math.min(IOUtil.fdLimit()-1, 1024);
 
-    // Maps from file descriptors to keys
-    private final Map<Integer, SelectionKeyImpl> fdToKey;
+    // port file descriptor
+    private final int pfd;
+
+    // the poll array (populated by port_getn)
+    private final long pollArrayAddress;
+    private final AllocatedNativeObject pollArray;
 
-    // True if this Selector has been closed
-    private boolean closed;
+    // maps file descriptor to selection key, synchronize on selector
+    private final Map<Integer, SelectionKeyImpl> fdToKey = new HashMap<>();
+
+    // the last update operation, incremented by processUpdateQueue
+    private int lastUpdate;
 
-    // Lock for interrupt triggering and clearing
+    // pending new registrations/updates, queued by implRegister, putEventOps,
+    // and updateSelectedKeys
+    private final Object updateLock = new Object();
+    private final Deque<SelectionKeyImpl> newKeys = new ArrayDeque<>();
+    private final Deque<SelectionKeyImpl> updateKeys = new ArrayDeque<>();
+    private final Deque<Integer> updateEvents = new ArrayDeque<>();
+
+    // interrupt triggering and clearing
     private final Object interruptLock = new Object();
     private boolean interruptTriggered;
 
-    /**
-     * Package private constructor called by factory method in
-     * the abstract superclass Selector.
-     */
     EventPortSelectorImpl(SelectorProvider sp) throws IOException {
         super(sp);
-        pollWrapper = new EventPortWrapper();
-        fdToKey = new HashMap<>();
+
+        this.pfd = port_create();
+
+        int allocationSize = MAX_EVENTS * SIZEOF_PORT_EVENT;
+        this.pollArray = new AllocatedNativeObject(allocationSize, false);
+        this.pollArrayAddress = pollArray.address();
     }
 
     private void ensureOpen() {
-        if (closed)
+        if (!isOpen())
             throw new ClosedSelectorException();
     }
 
     @Override
     protected int doSelect(long timeout) throws IOException {
-        ensureOpen();
+        assert Thread.holdsLock(this);
+
+        long to = timeout;
+        boolean blocking = (to != 0);
+        boolean timedPoll = (to > 0);
+
+        int numEvents;
+        processUpdateQueue();
         processDeregisterQueue();
-        int entries;
         try {
-            begin();
-            entries = pollWrapper.poll(timeout);
+            begin(blocking);
+
+            do {
+                long startTime = timedPoll ? System.nanoTime() : 0;
+                numEvents = port_getn(pfd, pollArrayAddress, MAX_EVENTS, to);
+                if (numEvents == IOStatus.INTERRUPTED && timedPoll) {
+                    // timed poll interrupted so need to adjust timeout
+                    long adjust = System.nanoTime() - startTime;
+                    to -= TimeUnit.MILLISECONDS.convert(adjust, TimeUnit.NANOSECONDS);
+                    if (to <= 0) {
+                        // timeout also expired so no retry
+                        numEvents = 0;
+                    }
+                }
+            } while (numEvents == IOStatus.INTERRUPTED);
+            assert IOStatus.check(numEvents);
+
         } finally {
-            end();
+            end(blocking);
         }
         processDeregisterQueue();
-        int numKeysUpdated = updateSelectedKeys(entries);
-        if (pollWrapper.interrupted()) {
-            synchronized (interruptLock) {
-                interruptTriggered = false;
-            }
-        }
-        return numKeysUpdated;
+        return processPortEvents(numEvents);
     }
 
-    private int updateSelectedKeys(int entries) {
-        int numKeysUpdated = 0;
-        for (int i=0; i<entries; i++) {
-            int nextFD = pollWrapper.getDescriptor(i);
-            SelectionKeyImpl ski = fdToKey.get(Integer.valueOf(nextFD));
-            if (ski != null) {
-                int rOps = pollWrapper.getEventOps(i);
-                if (selectedKeys.contains(ski)) {
-                    if (ski.channel.translateAndSetReadyOps(rOps, ski)) {
-                        numKeysUpdated++;
-                    }
-                } else {
-                    ski.channel.translateAndSetReadyOps(rOps, ski);
-                    if ((ski.nioReadyOps() & ski.nioInterestOps()) != 0) {
-                        selectedKeys.add(ski);
-                        numKeysUpdated++;
+    /**
+     * Process new registrations and changes to the interest ops.
+     */
+    private void processUpdateQueue() throws IOException {
+        assert Thread.holdsLock(this);
+
+        // bump lastUpdate to ensure that the interest ops are changed at most
+        // once per bulk update
+        lastUpdate++;
+
+        synchronized (updateLock) {
+            SelectionKeyImpl ski;
+
+            // new registrations
+            while ((ski = newKeys.pollFirst()) != null) {
+                if (ski.isValid()) {
+                    int fd = ski.channel.getFDVal();
+                    SelectionKeyImpl previous = fdToKey.put(fd, ski);
+                    assert previous == null;
+                    assert ski.registeredEvents() == 0;
+                }
+            }
+
+            // changes to interest ops
+            assert updateKeys.size() == updateEvents.size();
+            while ((ski = updateKeys.pollFirst()) != null) {
+                int newEvents = updateEvents.pollFirst();
+                int fd = ski.channel.getFDVal();
+                if (ski.isValid() && fdToKey.containsKey(fd)) {
+                    if (newEvents != ski.registeredEvents()) {
+                        if (newEvents == 0) {
+                            port_dissociate(pfd, PORT_SOURCE_FD, fd);
+                        } else {
+                            port_associate(pfd, PORT_SOURCE_FD, fd, newEvents);
+                        }
+                        ski.registeredEvents(newEvents);
                     }
                 }
             }
         }
+    }
+
+    /**
+     * Process the port events. This method updates the keys of file descriptors
+     * that were polled. It also re-queues the key so that the file descriptor
+     * is re-associated at the next select operation.
+     *
+     * @return the number of selection keys updated.
+     */
+    private int processPortEvents(int numEvents) throws IOException {
+        assert Thread.holdsLock(this);
+        assert Thread.holdsLock(nioSelectedKeys());
+
+        int numKeysUpdated = 0;
+        boolean interrupted = false;
+
+        synchronized (updateLock) {
+            for (int i = 0; i < numEvents; i++) {
+                short source = getSource(i);
+                if (source == PORT_SOURCE_FD) {
+                    int fd = getDescriptor(i);
+                    SelectionKeyImpl ski = fdToKey.get(fd);
+                    if (ski != null) {
+                        int rOps = getEventOps(i);
+                        if (selectedKeys.contains(ski)) {
+                            if (ski.channel.translateAndSetReadyOps(rOps, ski)) {
+                                numKeysUpdated++;
+                            }
+                        } else {
+                            ski.channel.translateAndSetReadyOps(rOps, ski);
+                            if ((ski.nioReadyOps() & ski.nioInterestOps()) != 0) {
+                                selectedKeys.add(ski);
+                                numKeysUpdated++;
+                            }
+                        }
+
+                        // re-queue key to head so that it is re-associated at
+                        // next select (and before other changes)
+                        updateEvents.addFirst(ski.registeredEvents());
+                        updateKeys.addFirst(ski);
+                        ski.registeredEvents(0);
+                    }
+                } else if (source == PORT_SOURCE_USER) {
+                    interrupted = true;
+                } else {
+                    assert false;
+                }
+            }
+        }
+
+        if (interrupted) {
+            clearInterrupt();
+        }
         return numKeysUpdated;
     }
 
     @Override
     protected void implClose() throws IOException {
-        if (closed)
-            return;
-        closed = true;
+        assert !isOpen();
+        assert Thread.holdsLock(this);
 
         // prevent further wakeup
         synchronized (interruptLock) {
             interruptTriggered = true;
         }
 
-        pollWrapper.close();
-
-        // Deregister channels
-        Iterator<SelectionKey> i = keys.iterator();
-        while (i.hasNext()) {
-            SelectionKeyImpl ski = (SelectionKeyImpl)i.next();
-            deregister(ski);
-            SelectableChannel selch = ski.channel();
-            if (!selch.isOpen() && !selch.isRegistered())
-                ((SelChImpl)selch).kill();
-            i.remove();
-        }
+        port_close(pfd);
+        pollArray.free();
     }
 
     @Override
     protected void implRegister(SelectionKeyImpl ski) {
-        int fd = IOUtil.fdVal(ski.channel.getFD());
-        fdToKey.put(Integer.valueOf(fd), ski);
-        keys.add(ski);
+        ensureOpen();
+        synchronized (updateLock) {
+            newKeys.addLast(ski);
+        }
     }
 
     @Override
     protected void implDereg(SelectionKeyImpl ski) throws IOException {
-        int i = ski.getIndex();
-        assert (i >= 0);
+        assert !ski.isValid();
+        assert Thread.holdsLock(this);
+
         int fd = ski.channel.getFDVal();
-        fdToKey.remove(Integer.valueOf(fd));
-        pollWrapper.release(fd);
-        ski.setIndex(-1);
-        keys.remove(ski);
-        selectedKeys.remove(ski);
-        deregister((AbstractSelectionKey)ski);
-        SelectableChannel selch = ski.channel();
-        if (!selch.isOpen() && !selch.isRegistered())
-            ((SelChImpl)selch).kill();
+        if (fdToKey.remove(fd) != null) {
+            if (ski.registeredEvents() != 0) {
+                port_dissociate(pfd, PORT_SOURCE_FD, fd);
+                ski.registeredEvents(0);
+            }
+        } else {
+            assert ski.registeredEvents() == 0;
+        }
     }
 
     @Override
-    public void putEventOps(SelectionKeyImpl sk, int ops) {
+    public void putEventOps(SelectionKeyImpl ski, int events) {
         ensureOpen();
-        int fd = sk.channel.getFDVal();
-        pollWrapper.setInterest(fd, ops);
+        synchronized (updateLock) {
+            updateEvents.addLast(events);  // events first in case adding key fails
+            updateKeys.addLast(ski);
+        }
     }
 
     @Override
     public Selector wakeup() {
         synchronized (interruptLock) {
             if (!interruptTriggered) {
-                pollWrapper.interrupt();
+                try {
+                    port_send(pfd, 0);
+                } catch (IOException ioe) {
+                    throw new InternalError(ioe);
+                }
                 interruptTriggered = true;
             }
         }
         return this;
     }
+
+    private void clearInterrupt() throws IOException {
+        synchronized (interruptLock) {
+            interruptTriggered = false;
+        }
+    }
+
+    private short getSource(int i) {
+        int offset = SIZEOF_PORT_EVENT * i + OFFSETOF_SOURCE;
+        return pollArray.getShort(offset);
+    }
+
+    private int getEventOps(int i) {
+        int offset = SIZEOF_PORT_EVENT * i + OFFSETOF_EVENTS;
+        return pollArray.getInt(offset);
+    }
+
+    private int getDescriptor(int i) {
+        //assert Unsafe.getUnsafe().addressSize() == 8;
+        int offset = SIZEOF_PORT_EVENT * i + OFFSETOF_OBJECT;
+        return (int) pollArray.getLong(offset);
+    }
 }
--- a/src/java.base/solaris/classes/sun/nio/ch/EventPortWrapper.java	Thu Apr 05 11:18:39 2018 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,276 +0,0 @@
-/*
- * Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package sun.nio.ch;
-
-import java.io.IOException;
-import java.security.AccessController;
-import java.util.BitSet;
-import java.util.HashMap;
-import java.util.Map;
-
-import jdk.internal.misc.Unsafe;
-import sun.security.action.GetIntegerAction;
-import static sun.nio.ch.SolarisEventPort.*;
-
-/**
- * Manages a Solaris event port and manipulates a native array of pollfd structs
- * on Solaris.
- */
-
-class EventPortWrapper {
-    private static final Unsafe unsafe = Unsafe.getUnsafe();
-    private static final int addressSize = unsafe.addressSize();
-
-    // Maximum number of open file descriptors
-    static final int   OPEN_MAX     = IOUtil.fdLimit();
-
-    // Maximum number of events to retrive in one call to port_getn
-    static final int   POLL_MAX     =  Math.min(OPEN_MAX-1, 1024);
-
-    // initial size of the array to hold pending updates
-    private final int INITIAL_PENDING_UPDATE_SIZE = 256;
-
-    // maximum size of updateArray
-    private static final int MAX_UPDATE_ARRAY_SIZE = AccessController.doPrivileged(
-        new GetIntegerAction("sun.nio.ch.maxUpdateArraySize", Math.min(OPEN_MAX, 64*1024)));
-
-    // special update status to indicate that it should be ignored
-    private static final byte IGNORE = -1;
-
-    // port file descriptor
-    private final int pfd;
-
-    // the poll array (populated by port_getn)
-    private final long pollArrayAddress;
-    private final AllocatedNativeObject pollArray;
-
-    // required when accessing the update* fields
-    private final Object updateLock = new Object();
-
-    // the number of pending updates
-    private int updateCount;
-
-    // queue of file descriptors with updates pending
-    private int[] updateDescriptors = new int[INITIAL_PENDING_UPDATE_SIZE];
-
-    // events for file descriptors with registration changes pending, indexed
-    // by file descriptor and stored as bytes for efficiency reasons. For
-    // file descriptors higher than MAX_UPDATE_ARRAY_SIZE (unlimited case at
-    // least then the update is stored in a map.
-    private final byte[] eventsLow = new byte[MAX_UPDATE_ARRAY_SIZE];
-    private Map<Integer,Byte> eventsHigh;
-    // Used by release and updateRegistrations to track whether a file
-    // descriptor is registered with /dev/poll.
-    private final BitSet registered = new BitSet();
-
-    // bit set to indicate if a file descriptor has been visited when
-    // processing updates (used to avoid duplicates calls to port_associate)
-    private BitSet visited = new BitSet();
-
-    EventPortWrapper() throws IOException {
-        int allocationSize = POLL_MAX * SIZEOF_PORT_EVENT;
-        pollArray = new AllocatedNativeObject(allocationSize, true);
-        pollArrayAddress = pollArray.address();
-        this.pfd = port_create();
-        if (OPEN_MAX > MAX_UPDATE_ARRAY_SIZE)
-            eventsHigh = new HashMap<>();
-    }
-
-    void close() throws IOException {
-        port_close(pfd);
-        pollArray.free();
-    }
-
-    private short getSource(int i) {
-        int offset = SIZEOF_PORT_EVENT * i + OFFSETOF_SOURCE;
-        return pollArray.getShort(offset);
-    }
-
-    int getEventOps(int i) {
-        int offset = SIZEOF_PORT_EVENT * i + OFFSETOF_EVENTS;
-        return pollArray.getInt(offset);
-    }
-
-    int getDescriptor(int i) {
-        int offset = SIZEOF_PORT_EVENT * i + OFFSETOF_OBJECT;
-        if (addressSize == 4) {
-            return pollArray.getInt(offset);
-        } else {
-            return (int) pollArray.getLong(offset);
-        }
-    }
-
-    private void setDescriptor(int i, int fd) {
-        int offset = SIZEOF_PORT_EVENT * i + OFFSETOF_OBJECT;
-        if (addressSize == 4) {
-            pollArray.putInt(offset, fd);
-        } else {
-            pollArray.putLong(offset, fd);
-        }
-    }
-
-    private void setUpdate(int fd, byte events) {
-        if (fd < MAX_UPDATE_ARRAY_SIZE) {
-            eventsLow[fd] = events;
-        } else {
-            eventsHigh.put(Integer.valueOf(fd), Byte.valueOf(events));
-        }
-    }
-
-    private byte getUpdate(int fd) {
-        if (fd < MAX_UPDATE_ARRAY_SIZE) {
-            return eventsLow[fd];
-        } else {
-            Byte result = eventsHigh.get(Integer.valueOf(fd));
-            // result should never be null
-            return result.byteValue();
-        }
-    }
-
-    int poll(long timeout) throws IOException {
-        // update registrations prior to poll
-        synchronized (updateLock) {
-
-            // process newest updates first
-            int i = updateCount - 1;
-            while (i >= 0) {
-                int fd = updateDescriptors[i];
-                if (!visited.get(fd)) {
-                    short ev = getUpdate(fd);
-                    if (ev != IGNORE) {
-                        if (ev == 0) {
-                            if (registered.get(fd)) {
-                                port_dissociate(pfd, PORT_SOURCE_FD, (long)fd);
-                                registered.clear(fd);
-                            }
-                        } else {
-                            if (port_associate(pfd, PORT_SOURCE_FD, (long)fd, ev)) {
-                                registered.set(fd);
-                            }
-                        }
-
-                    }
-                    visited.set(fd);
-                }
-                i--;
-            }
-            updateCount = 0;
-        }
-
-        // poll for events
-        int numEntries;
-        long to = timeout;
-        boolean timedPoll = (to > 0);
-        do {
-            long startTime = timedPoll ? System.currentTimeMillis() : 0;
-            numEntries = port_getn(pfd, pollArrayAddress, POLL_MAX, timeout);
-            if (numEntries == IOStatus.INTERRUPTED && timedPoll) {
-                // timed poll interrupted so need to adjust timeout
-                to -= System.currentTimeMillis() - startTime;
-                if (to <= 0) {
-                    // timeout also expired so no retry
-                    numEntries = 0;
-                }
-            }
-        } while (numEntries == IOStatus.INTERRUPTED);
-
-        // after polling we need to queue all polled file descriptors as they
-        // are candidates to register for the next poll.
-        synchronized (updateLock) {
-            for (int i=0; i<numEntries; i++) {
-                if (getSource(i) == PORT_SOURCE_USER) {
-                    interrupted = true;
-                    setDescriptor(i, -1);
-                } else {
-                    // the default is to re-associate for the next poll
-                    int fd = getDescriptor(i);
-                    registered.clear(fd);
-                    setInterest(fd);
-                }
-            }
-        }
-
-        return numEntries;
-    }
-
-    private void setInterest(int fd) {
-        assert Thread.holdsLock(updateLock);
-
-        // record the file descriptor and events, expanding the
-        // respective arrays first if necessary.
-        int oldCapacity = updateDescriptors.length;
-        if (updateCount >= oldCapacity) {
-            int newCapacity = oldCapacity + INITIAL_PENDING_UPDATE_SIZE;
-            int[] newDescriptors = new int[newCapacity];
-            System.arraycopy(updateDescriptors, 0, newDescriptors, 0, oldCapacity);
-            updateDescriptors = newDescriptors;
-        }
-        updateDescriptors[updateCount++] = fd;
-        visited.clear(fd);
-    }
-
-    void setInterest(int fd, int mask) {
-        synchronized (updateLock) {
-            setInterest(fd);
-            setUpdate(fd, (byte)mask);
-            assert getUpdate(fd) == mask;
-        }
-    }
-
-    void release(int fd) {
-        synchronized (updateLock) {
-            if (registered.get(fd)) {
-                try {
-                    port_dissociate(pfd, PORT_SOURCE_FD, (long)fd);
-                } catch (IOException ioe) {
-                    throw new InternalError(ioe);
-                }
-                registered.clear(fd);
-            }
-            setUpdate(fd, IGNORE);
-        }
-    }
-
-    // -- wakeup support --
-
-    private boolean interrupted;
-
-    public void interrupt() {
-        try {
-            port_send(pfd, 0);
-        } catch (IOException ioe) {
-            throw new InternalError(ioe);
-        }
-    }
-
-    boolean interrupted() {
-        return interrupted;
-    }
-
-    void clearInterrupted() {
-        interrupted = false;
-    }
-}
--- a/src/java.base/solaris/native/libjsig/jsig.c	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/solaris/native/libjsig/jsig.c	Fri Apr 06 03:53:28 2018 +0200
@@ -37,6 +37,7 @@
 #include <dlfcn.h>
 #include <thread.h>
 #include <synch.h>
+#include "jni.h"
 #include "jvm_md.h"
 
 #define bool int
@@ -242,14 +243,16 @@
 }
 
 /* The four functions for the jvm to call into */
-void JVM_begin_signal_setting() {
+JNIEXPORT void JNICALL
+JVM_begin_signal_setting() {
   signal_lock();
   jvm_signal_installing = true;
   tid = thr_self();
   signal_unlock();
 }
 
-void JVM_end_signal_setting() {
+JNIEXPORT void JNICALL
+JVM_end_signal_setting() {
   signal_lock();
   jvm_signal_installed = true;
   jvm_signal_installing = false;
@@ -257,7 +260,8 @@
   signal_unlock();
 }
 
-struct sigaction *JVM_get_signal_action(int sig) {
+JNIEXPORT struct sigaction * JNICALL
+JVM_get_signal_action(int sig) {
   if (sact == NULL) {
     allocate_sact();
   }
@@ -268,6 +272,7 @@
   return NULL;
 }
 
-int JVM_get_libjsig_version() {
+JNIEXPORT int JNICALL
+JVM_get_libjsig_version() {
   return JSIG_VERSION_1_4_1;
 }
--- a/src/java.base/unix/classes/sun/nio/ch/PollArrayWrapper.java	Thu Apr 05 11:18:39 2018 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,128 +0,0 @@
-/*
- * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package sun.nio.ch;
-
-
-/**
- * Manipulates a native array of pollfd structs on Solaris:
- *
- * typedef struct pollfd {
- *    int fd;
- *    short events;
- *    short revents;
- * } pollfd_t;
- *
- * @author Mike McCloskey
- * @since 1.4
- */
-
-public class PollArrayWrapper extends AbstractPollArrayWrapper {
-
-    // File descriptor to write for interrupt
-    int interruptFD;
-
-    PollArrayWrapper(int newSize) {
-        newSize = (newSize + 1) * SIZE_POLLFD;
-        pollArray = new AllocatedNativeObject(newSize, false);
-        pollArrayAddress = pollArray.address();
-        totalChannels = 1;
-    }
-
-    void initInterrupt(int fd0, int fd1) {
-        interruptFD = fd1;
-        putDescriptor(0, fd0);
-        putEventOps(0, Net.POLLIN);
-        putReventOps(0, 0);
-    }
-
-    void release(int i) {
-        return;
-    }
-
-    void free() {
-        pollArray.free();
-    }
-
-    /**
-     * Prepare another pollfd struct for use.
-     */
-    void addEntry(SelChImpl sc) {
-        putDescriptor(totalChannels, IOUtil.fdVal(sc.getFD()));
-        putEventOps(totalChannels, 0);
-        putReventOps(totalChannels, 0);
-        totalChannels++;
-    }
-
-    /**
-     * Writes the pollfd entry from the source wrapper at the source index
-     * over the entry in the target wrapper at the target index. The source
-     * array remains unchanged unless the source array and the target are
-     * the same array.
-     */
-    static void replaceEntry(PollArrayWrapper source, int sindex,
-                      PollArrayWrapper target, int tindex) {
-        target.putDescriptor(tindex, source.getDescriptor(sindex));
-        target.putEventOps(tindex, source.getEventOps(sindex));
-        target.putReventOps(tindex, source.getReventOps(sindex));
-    }
-
-    /**
-     * Grows the pollfd array to a size that will accommodate newSize
-     * pollfd entries. This method does no checking of the newSize
-     * to determine if it is in fact bigger than the old size: it
-     * always reallocates an array of the new size.
-     */
-    void grow(int newSize) {
-        // create new array
-        PollArrayWrapper temp = new PollArrayWrapper(newSize);
-
-        // Copy over existing entries
-        for (int i=0; i<totalChannels; i++)
-            replaceEntry(this, i, temp, i);
-
-        // Swap new array into pollArray field
-        pollArray.free();
-        pollArray = temp.pollArray;
-        pollArrayAddress = pollArray.address();
-    }
-
-    int poll(int numfds, int offset, long timeout) {
-        return poll0(pollArrayAddress + (offset * SIZE_POLLFD),
-                     numfds, timeout);
-    }
-
-    public void interrupt() {
-        interrupt(interruptFD);
-    }
-
-    private native int poll0(long pollAddress, int numfds, long timeout);
-
-    private static native void interrupt(int fd);
-
-    static {
-        IOUtil.load();
-    }
-}
--- a/src/java.base/unix/classes/sun/nio/ch/PollSelectorImpl.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/unix/classes/sun/nio/ch/PollSelectorImpl.java	Fri Apr 06 03:53:28 2018 +0200
@@ -22,104 +22,373 @@
  * or visit www.oracle.com if you need additional information or have any
  * questions.
  */
-
 package sun.nio.ch;
 
 import java.io.IOException;
-import java.nio.channels.*;
-import java.nio.channels.spi.*;
-import java.util.*;
+import java.nio.channels.ClosedSelectorException;
+import java.nio.channels.Selector;
+import java.nio.channels.spi.SelectorProvider;
+import java.util.ArrayDeque;
+import java.util.ArrayList;
+import java.util.Deque;
+import java.util.List;
+import java.util.concurrent.TimeUnit;
 
+import jdk.internal.misc.Unsafe;
 
 /**
- * An implementation of Selector for Solaris.
+ * Selector implementation based on poll
  */
 
-class PollSelectorImpl
-    extends AbstractPollSelectorImpl
-{
+class PollSelectorImpl extends SelectorImpl {
+
+    // initial capacity of poll array
+    private static final int INITIAL_CAPACITY = 16;
 
-    // File descriptors used for interrupt
-    private int fd0;
-    private int fd1;
+    // poll array, grows as needed
+    private int pollArrayCapacity = INITIAL_CAPACITY;
+    private int pollArraySize;
+    private AllocatedNativeObject pollArray;
 
-    // Lock for interrupt triggering and clearing
-    private Object interruptLock = new Object();
-    private boolean interruptTriggered = false;
+    // file descriptors used for interrupt
+    private final int fd0;
+    private final int fd1;
+
+    // keys for file descriptors in poll array, synchronize on selector
+    private final List<SelectionKeyImpl> pollKeys = new ArrayList<>();
 
-    /**
-     * Package private constructor called by factory method in
-     * the abstract superclass Selector.
-     */
+    // pending updates, queued by putEventOps
+    private final Object updateLock = new Object();
+    private final Deque<SelectionKeyImpl> updateKeys = new ArrayDeque<>();
+    private final Deque<Integer> updateEvents = new ArrayDeque<>();
+
+    // interrupt triggering and clearing
+    private final Object interruptLock = new Object();
+    private boolean interruptTriggered;
+
     PollSelectorImpl(SelectorProvider sp) throws IOException {
-        super(sp, 1, 1);
-        long pipeFds = IOUtil.makePipe(false);
-        fd0 = (int) (pipeFds >>> 32);
-        fd1 = (int) pipeFds;
+        super(sp);
+
+        int size = pollArrayCapacity * SIZE_POLLFD;
+        this.pollArray = new AllocatedNativeObject(size, false);
+
         try {
-            pollWrapper = new PollArrayWrapper(INIT_CAP);
-            pollWrapper.initInterrupt(fd0, fd1);
-            channelArray = new SelectionKeyImpl[INIT_CAP];
-        } catch (Throwable t) {
-            try {
-                FileDispatcherImpl.closeIntFD(fd0);
-            } catch (IOException ioe0) {
-                t.addSuppressed(ioe0);
-            }
-            try {
-                FileDispatcherImpl.closeIntFD(fd1);
-            } catch (IOException ioe1) {
-                t.addSuppressed(ioe1);
-            }
-            throw t;
+            long fds = IOUtil.makePipe(false);
+            this.fd0 = (int) (fds >>> 32);
+            this.fd1 = (int) fds;
+        } catch (IOException ioe) {
+            pollArray.free();
+            throw ioe;
+        }
+
+        // wakeup support
+        synchronized (this) {
+            setFirst(fd0, Net.POLLIN);
         }
     }
 
-    protected int doSelect(long timeout)
-        throws IOException
-    {
-        if (channelArray == null)
+    private void ensureOpen() {
+        if (!isOpen())
             throw new ClosedSelectorException();
+    }
+
+    @Override
+    protected int doSelect(long timeout) throws IOException {
+        assert Thread.holdsLock(this);
+
+        int to = (int) Math.min(timeout, Integer.MAX_VALUE); // max poll timeout
+        boolean blocking = (to != 0);
+        boolean timedPoll = (to > 0);
+
+        processUpdateQueue();
         processDeregisterQueue();
         try {
-            begin();
-            pollWrapper.poll(totalChannels, 0, timeout);
+            begin(blocking);
+
+            int numPolled;
+            do {
+                long startTime = timedPoll ? System.nanoTime() : 0;
+                numPolled = poll(pollArray.address(), pollArraySize, to);
+                if (numPolled == IOStatus.INTERRUPTED && timedPoll) {
+                    // timed poll interrupted so need to adjust timeout
+                    long adjust = System.nanoTime() - startTime;
+                    to -= TimeUnit.MILLISECONDS.convert(adjust, TimeUnit.NANOSECONDS);
+                    if (to <= 0) {
+                        // timeout expired so no retry
+                        numPolled = 0;
+                    }
+                }
+            } while (numPolled == IOStatus.INTERRUPTED);
+            assert numPolled <= pollArraySize;
+
         } finally {
-            end();
+            end(blocking);
         }
+
         processDeregisterQueue();
-        int numKeysUpdated = updateSelectedKeys();
-        if (pollWrapper.getReventOps(0) != 0) {
-            // Clear the wakeup pipe
-            pollWrapper.putReventOps(0, 0);
-            synchronized (interruptLock) {
-                IOUtil.drain(fd0);
-                interruptTriggered = false;
+        return updateSelectedKeys();
+    }
+
+    /**
+     * Process changes to the interest ops.
+     */
+    private void processUpdateQueue() {
+        assert Thread.holdsLock(this);
+
+        synchronized (updateLock) {
+            assert updateKeys.size() == updateEvents.size();
+            SelectionKeyImpl ski;
+            while ((ski = updateKeys.pollFirst()) != null) {
+                int newEvents = updateEvents.pollFirst();
+                if (ski.isValid()) {
+                    int index = ski.getIndex();
+                    assert index >= 0 && index < pollArraySize;
+                    if (index > 0) {
+                        assert pollKeys.get(index) == ski;
+                        if (newEvents == 0) {
+                            remove(ski);
+                        } else {
+                            update(ski, newEvents);
+                        }
+                    } else if (newEvents != 0) {
+                        add(ski, newEvents);
+                    }
+                }
             }
         }
+    }
+
+    /**
+     * Update the keys of file descriptors that were polled and add them to
+     * the selected-key set.
+     * If the interrupt fd has been selected, drain it and clear the interrupt.
+     */
+    private int updateSelectedKeys() throws IOException {
+        assert Thread.holdsLock(this);
+        assert Thread.holdsLock(nioSelectedKeys());
+        assert pollArraySize > 0 && pollArraySize == pollKeys.size();
+
+        int numKeysUpdated = 0;
+        for (int i = 1; i < pollArraySize; i++) {
+            int rOps = getReventOps(i);
+            if (rOps != 0) {
+                SelectionKeyImpl ski = pollKeys.get(i);
+                assert ski.channel.getFDVal() == getDescriptor(i);
+                if (ski.isValid()) {
+                    if (selectedKeys.contains(ski)) {
+                        if (ski.channel.translateAndSetReadyOps(rOps, ski)) {
+                            numKeysUpdated++;
+                        }
+                    } else {
+                        ski.channel.translateAndSetReadyOps(rOps, ski);
+                        if ((ski.nioReadyOps() & ski.nioInterestOps()) != 0) {
+                            selectedKeys.add(ski);
+                            numKeysUpdated++;
+                        }
+                    }
+                }
+            }
+        }
+
+        // check for interrupt
+        if (getReventOps(0) != 0) {
+            assert getDescriptor(0) == fd0;
+            clearInterrupt();
+        }
+
         return numKeysUpdated;
     }
 
-    protected void implCloseInterrupt() throws IOException {
+    @Override
+    protected void implClose() throws IOException {
+        assert !isOpen();
+        assert Thread.holdsLock(this);
+
         // prevent further wakeup
         synchronized (interruptLock) {
             interruptTriggered = true;
         }
+
+        pollArray.free();
         FileDispatcherImpl.closeIntFD(fd0);
         FileDispatcherImpl.closeIntFD(fd1);
-        fd0 = -1;
-        fd1 = -1;
-        pollWrapper.release(0);
+    }
+
+    @Override
+    protected void implRegister(SelectionKeyImpl ski) {
+        assert ski.getIndex() == 0;
+        ensureOpen();
     }
 
+    @Override
+    protected void implDereg(SelectionKeyImpl ski) throws IOException {
+        assert !ski.isValid();
+        assert Thread.holdsLock(this);
+
+        // remove from poll array
+        int index = ski.getIndex();
+        if (index > 0) {
+            remove(ski);
+        }
+    }
+
+    @Override
+    public void putEventOps(SelectionKeyImpl ski, int events) {
+        ensureOpen();
+        synchronized (updateLock) {
+            updateEvents.addLast(events);  // events first in case adding key fails
+            updateKeys.addLast(ski);
+        }
+    }
+
+    @Override
     public Selector wakeup() {
         synchronized (interruptLock) {
             if (!interruptTriggered) {
-                pollWrapper.interrupt();
+                try {
+                    IOUtil.write1(fd1, (byte)0);
+                } catch (IOException ioe) {
+                    throw new InternalError(ioe);
+                }
                 interruptTriggered = true;
             }
         }
         return this;
     }
 
+    private void clearInterrupt() throws IOException {
+        synchronized (interruptLock) {
+            IOUtil.drain(fd0);
+            interruptTriggered = false;
+        }
+    }
+
+    /**
+     * Sets the first pollfd enty in the poll array to the given fd
+     */
+    private void setFirst(int fd, int ops) {
+        assert pollArraySize == 0;
+        assert pollKeys.isEmpty();
+
+        putDescriptor(0, fd);
+        putEventOps(0, ops);
+        pollArraySize = 1;
+
+        pollKeys.add(null);  // dummy element
+    }
+
+    /**
+     * Adds a pollfd entry to the poll array, expanding the poll array if needed.
+     */
+    private void add(SelectionKeyImpl ski, int ops) {
+        expandIfNeeded();
+
+        int index = pollArraySize;
+        assert index > 0;
+        putDescriptor(index, ski.channel.getFDVal());
+        putEventOps(index, ops);
+        putReventOps(index, 0);
+        ski.setIndex(index);
+        pollArraySize++;
+
+        pollKeys.add(ski);
+        assert pollKeys.size() == pollArraySize;
+    }
+
+    /**
+     * Update the events of pollfd entry.
+     */
+    private void update(SelectionKeyImpl ski, int ops) {
+        int index = ski.getIndex();
+        assert index > 0 && index < pollArraySize;
+        assert getDescriptor(index) == ski.channel.getFDVal();
+        putEventOps(index, ops);
+    }
+
+    /**
+     * Removes a pollfd entry from the poll array
+     */
+    private void remove(SelectionKeyImpl ski) {
+        int index = ski.getIndex();
+        assert index > 0 && index < pollArraySize;
+        assert getDescriptor(index) == ski.channel.getFDVal();
+
+        // replace pollfd at index with the last pollfd in array
+        int lastIndex = pollArraySize - 1;
+        if (lastIndex != index) {
+            SelectionKeyImpl lastKey = pollKeys.get(lastIndex);
+            assert lastKey.getIndex() == lastIndex;
+            int lastFd = getDescriptor(lastIndex);
+            int lastOps = getEventOps(lastIndex);
+            int lastRevents = getReventOps(lastIndex);
+            assert lastKey.channel.getFDVal() == lastFd;
+            putDescriptor(index, lastFd);
+            putEventOps(index, lastOps);
+            putReventOps(index, lastRevents);
+            pollKeys.set(index, lastKey);
+            lastKey.setIndex(index);
+        }
+        pollKeys.remove(lastIndex);
+        pollArraySize--;
+        assert pollKeys.size() == pollArraySize;
+
+        ski.setIndex(0);
+    }
+
+    /**
+     * Expand poll array if at capacity
+     */
+    private void expandIfNeeded() {
+        if (pollArraySize == pollArrayCapacity) {
+            int oldSize = pollArrayCapacity * SIZE_POLLFD;
+            int newCapacity = pollArrayCapacity + INITIAL_CAPACITY;
+            int newSize = newCapacity * SIZE_POLLFD;
+            AllocatedNativeObject newPollArray = new AllocatedNativeObject(newSize, false);
+            Unsafe.getUnsafe().copyMemory(pollArray.address(), newPollArray.address(), oldSize);
+            pollArray.free();
+            pollArray = newPollArray;
+            pollArrayCapacity = newCapacity;
+        }
+    }
+
+    private static final short SIZE_POLLFD   = 8;
+    private static final short FD_OFFSET     = 0;
+    private static final short EVENT_OFFSET  = 4;
+    private static final short REVENT_OFFSET = 6;
+
+    private void putDescriptor(int i, int fd) {
+        int offset = SIZE_POLLFD * i + FD_OFFSET;
+        pollArray.putInt(offset, fd);
+    }
+
+    private int getDescriptor(int i) {
+        int offset = SIZE_POLLFD * i + FD_OFFSET;
+        return pollArray.getInt(offset);
+    }
+
+    private void putEventOps(int i, int event) {
+        int offset = SIZE_POLLFD * i + EVENT_OFFSET;
+        pollArray.putShort(offset, (short)event);
+    }
+
+    private int getEventOps(int i) {
+        int offset = SIZE_POLLFD * i + EVENT_OFFSET;
+        return pollArray.getShort(offset);
+    }
+
+    private void putReventOps(int i, int revent) {
+        int offset = SIZE_POLLFD * i + REVENT_OFFSET;
+        pollArray.putShort(offset, (short)revent);
+    }
+
+    private int getReventOps(int i) {
+        int offset = SIZE_POLLFD * i + REVENT_OFFSET;
+        return pollArray.getShort(offset);
+    }
+
+    private static native int poll(long pollAddress, int numfds, int timeout);
+
+    static {
+        IOUtil.load();
+    }
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/java.base/unix/classes/sun/nio/ch/PollSelectorProvider.java	Fri Apr 06 03:53:28 2018 +0200
@@ -0,0 +1,42 @@
+/*
+ * Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package sun.nio.ch;
+
+import java.io.IOException;
+import java.nio.channels.Channel;
+import java.nio.channels.spi.AbstractSelector;
+
+public class PollSelectorProvider
+    extends SelectorProviderImpl
+{
+    public AbstractSelector openSelector() throws IOException {
+        return new PollSelectorImpl(this);
+    }
+
+    public Channel inheritedChannel() throws IOException {
+        return InheritedChannel.getChannel();
+    }
+}
--- a/src/java.base/unix/classes/sun/nio/ch/SinkChannelImpl.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/unix/classes/sun/nio/ch/SinkChannelImpl.java	Fri Apr 06 03:53:28 2018 +0200
@@ -164,10 +164,9 @@
         }
     }
 
-    public boolean translateReadyOps(int ops, int initialOps,
-                                     SelectionKeyImpl sk) {
-        int intOps = sk.nioInterestOps();// Do this just once, it synchronizes
-        int oldOps = sk.nioReadyOps();
+    public boolean translateReadyOps(int ops, int initialOps, SelectionKeyImpl ski) {
+        int intOps = ski.nioInterestOps();
+        int oldOps = ski.nioReadyOps();
         int newOps = initialOps;
 
         if ((ops & Net.POLLNVAL) != 0)
@@ -175,7 +174,7 @@
 
         if ((ops & (Net.POLLERR | Net.POLLHUP)) != 0) {
             newOps = intOps;
-            sk.nioReadyOps(newOps);
+            ski.nioReadyOps(newOps);
             return (newOps & ~oldOps) != 0;
         }
 
@@ -183,22 +182,23 @@
             ((intOps & SelectionKey.OP_WRITE) != 0))
             newOps |= SelectionKey.OP_WRITE;
 
-        sk.nioReadyOps(newOps);
+        ski.nioReadyOps(newOps);
         return (newOps & ~oldOps) != 0;
     }
 
-    public boolean translateAndUpdateReadyOps(int ops, SelectionKeyImpl sk) {
-        return translateReadyOps(ops, sk.nioReadyOps(), sk);
+    public boolean translateAndUpdateReadyOps(int ops, SelectionKeyImpl ski) {
+        return translateReadyOps(ops, ski.nioReadyOps(), ski);
     }
 
-    public boolean translateAndSetReadyOps(int ops, SelectionKeyImpl sk) {
-        return translateReadyOps(ops, 0, sk);
+    public boolean translateAndSetReadyOps(int ops, SelectionKeyImpl ski) {
+        return translateReadyOps(ops, 0, ski);
     }
 
-    public void translateAndSetInterestOps(int ops, SelectionKeyImpl sk) {
+    public int translateInterestOps(int ops) {
+        int newOps = 0;
         if (ops == SelectionKey.OP_WRITE)
-            ops = Net.POLLOUT;
-        sk.selector.putEventOps(sk, ops);
+            newOps |= Net.POLLOUT;
+        return newOps;
     }
 
     /**
--- a/src/java.base/unix/classes/sun/nio/ch/SourceChannelImpl.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/unix/classes/sun/nio/ch/SourceChannelImpl.java	Fri Apr 06 03:53:28 2018 +0200
@@ -164,10 +164,9 @@
         }
     }
 
-    public boolean translateReadyOps(int ops, int initialOps,
-                                     SelectionKeyImpl sk) {
-        int intOps = sk.nioInterestOps(); // Do this just once, it synchronizes
-        int oldOps = sk.nioReadyOps();
+    public boolean translateReadyOps(int ops, int initialOps, SelectionKeyImpl ski) {
+        int intOps = ski.nioInterestOps();
+        int oldOps = ski.nioReadyOps();
         int newOps = initialOps;
 
         if ((ops & Net.POLLNVAL) != 0)
@@ -175,7 +174,7 @@
 
         if ((ops & (Net.POLLERR | Net.POLLHUP)) != 0) {
             newOps = intOps;
-            sk.nioReadyOps(newOps);
+            ski.nioReadyOps(newOps);
             return (newOps & ~oldOps) != 0;
         }
 
@@ -183,22 +182,23 @@
             ((intOps & SelectionKey.OP_READ) != 0))
             newOps |= SelectionKey.OP_READ;
 
-        sk.nioReadyOps(newOps);
+        ski.nioReadyOps(newOps);
         return (newOps & ~oldOps) != 0;
     }
 
-    public boolean translateAndUpdateReadyOps(int ops, SelectionKeyImpl sk) {
-        return translateReadyOps(ops, sk.nioReadyOps(), sk);
+    public boolean translateAndUpdateReadyOps(int ops, SelectionKeyImpl ski) {
+        return translateReadyOps(ops, ski.nioReadyOps(), ski);
     }
 
-    public boolean translateAndSetReadyOps(int ops, SelectionKeyImpl sk) {
-        return translateReadyOps(ops, 0, sk);
+    public boolean translateAndSetReadyOps(int ops, SelectionKeyImpl ski) {
+        return translateReadyOps(ops, 0, ski);
     }
 
-    public void translateAndSetInterestOps(int ops, SelectionKeyImpl sk) {
+    public int translateInterestOps(int ops) {
+        int newOps = 0;
         if (ops == SelectionKey.OP_READ)
-            ops = Net.POLLIN;
-        sk.selector.putEventOps(sk, ops);
+            newOps |= Net.POLLIN;
+        return newOps;
     }
 
     /**
--- a/src/java.base/unix/native/libjava/FileOutputStream_md.c	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/unix/native/libjava/FileOutputStream_md.c	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -70,7 +70,7 @@
     writeBytes(env, this, bytes, off, len, append, fos_fd);
 }
 
-JNIEXPORT void JNICALL
+void JNICALL
 Java_java_io_FileOutputStream_close0(JNIEnv *env, jobject this) {
     fileClose(env, this, fos_fd);
 }
--- a/src/java.base/unix/native/libjava/jni_util_md.c	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/unix/native/libjava/jni_util_md.c	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -59,7 +59,7 @@
     }
 }
 
-size_t
+JNIEXPORT size_t JNICALL
 getLastErrorString(char *buf, size_t len)
 {
     if (errno == 0 || len < 1) return 0;
@@ -67,7 +67,7 @@
     return strlen(buf);
 }
 
-int
+JNIEXPORT int JNICALL
 getErrorString(int err, char *buf, size_t len)
 {
     if (err == 0 || len < 1) return 0;
--- a/src/java.base/unix/native/libjli/java_md_common.c	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/unix/native/libjli/java_md_common.c	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -178,7 +178,8 @@
     return result;
 }
 
-void JLI_ReportErrorMessage(const char* fmt, ...) {
+JNIEXPORT void JNICALL
+JLI_ReportErrorMessage(const char* fmt, ...) {
     va_list vl;
     va_start(vl, fmt);
     vfprintf(stderr, fmt, vl);
@@ -186,7 +187,8 @@
     va_end(vl);
 }
 
-void JLI_ReportErrorMessageSys(const char* fmt, ...) {
+JNIEXPORT void JNICALL
+JLI_ReportErrorMessageSys(const char* fmt, ...) {
     va_list vl;
     char *emsg;
 
@@ -205,7 +207,8 @@
     va_end(vl);
 }
 
-void  JLI_ReportExceptionDescription(JNIEnv * env) {
+JNIEXPORT void JNICALL
+JLI_ReportExceptionDescription(JNIEnv * env) {
   (*env)->ExceptionDescribe(env);
 }
 
@@ -345,13 +348,13 @@
    return findBootClass(env, classname);
 }
 
-StdArg
+JNIEXPORT StdArg JNICALL
 *JLI_GetStdArgs()
 {
     return NULL;
 }
 
-int
+JNIEXPORT int JNICALL
 JLI_GetStdArgc() {
     return 0;
 }
--- a/src/java.base/unix/native/libnet/PlainSocketImpl.c	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/unix/native/libnet/PlainSocketImpl.c	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -920,7 +920,7 @@
 /*
  * Class:     java_net_PlainSocketImpl
  * Method:    socketGetOption
- * Signature: (I)I
+ * Signature: (ILjava/lang/Object;)I
  */
 JNIEXPORT jint JNICALL
 Java_java_net_PlainSocketImpl_socketGetOption
--- a/src/java.base/unix/native/libnet/net_util_md.c	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/unix/native/libnet/net_util_md.c	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -1541,7 +1541,7 @@
  * It returns the time left from the timeout (possibly 0), or -1 if it expired.
  */
 
-jint
+JNIEXPORT jint JNICALL
 NET_Wait(JNIEnv *env, jint fd, jint flags, jint timeout)
 {
     jlong prevNanoTime = JVM_NanoTime(env, 0);
--- a/src/java.base/unix/native/libnio/ch/IOUtil.c	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/unix/native/libnio/ch/IOUtil.c	Fri Apr 06 03:53:28 2018 +0200
@@ -104,7 +104,6 @@
     return ((jlong) fd[0] << 32) | (jlong) fd[1];
 }
 
-
 JNIEXPORT jint JNICALL
 Java_sun_nio_ch_IOUtil_write1(JNIEnv *env, jclass cl, jint fd, jbyte b)
 {
@@ -112,7 +111,6 @@
     return convertReturnVal(env, write(fd, &c, 1), JNI_FALSE);
 }
 
-
 JNIEXPORT jboolean JNICALL
 Java_sun_nio_ch_IOUtil_drain(JNIEnv *env, jclass cl, jint fd)
 {
@@ -131,6 +129,26 @@
 }
 
 JNIEXPORT jint JNICALL
+Java_sun_nio_ch_IOUtil_drain1(JNIEnv *env, jclass cl, jint fd)
+{
+    int res;
+    char buf[1];
+
+    res = read(fd, buf, 1);
+    if (res < 0) {
+        if (errno == EAGAIN) {
+            res = 0;
+        } else if (errno == EINTR) {
+            return IOS_INTERRUPTED;
+        } else {
+            JNU_ThrowIOExceptionWithLastError(env, "read");
+            return IOS_THROWN;
+        }
+    }
+    return res;
+}
+
+JNIEXPORT jint JNICALL
 Java_sun_nio_ch_IOUtil_fdLimit(JNIEnv *env, jclass this)
 {
     struct rlimit rlp;
--- a/src/java.base/unix/native/libnio/ch/Net.c	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/unix/native/libnio/ch/Net.c	Fri Apr 06 03:53:28 2018 +0200
@@ -40,7 +40,6 @@
 #include "net_util_md.h"
 #include "nio_util.h"
 #include "nio.h"
-#include "sun_nio_ch_PollArrayWrapper.h"
 
 #ifdef _AIX
 #include <sys/utsname.h>
@@ -747,7 +746,7 @@
 
 /* Declared in nio_util.h */
 
-jint
+JNIEXPORT jint JNICALL
 handleSocketError(JNIEnv *env, jint errorValue)
 {
     char *xn;
--- a/src/java.base/unix/native/libnio/ch/PollArrayWrapper.c	Thu Apr 05 11:18:39 2018 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,102 +0,0 @@
-/*
- * Copyright (c) 2001, 2005, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-#include "jni.h"
-#include "jni_util.h"
-#include "jvm.h"
-#include "jlong.h"
-#include "sun_nio_ch_PollArrayWrapper.h"
-#include <poll.h>
-#include <unistd.h>
-#include <sys/time.h>
-
-#define RESTARTABLE(_cmd, _result) do { \
-  do { \
-    _result = _cmd; \
-  } while((_result == -1) && (errno == EINTR)); \
-} while(0)
-
-static int
-ipoll(struct pollfd fds[], unsigned int nfds, int timeout)
-{
-    jlong start, now;
-    int remaining = timeout;
-    struct timeval t;
-    int diff;
-
-    gettimeofday(&t, NULL);
-    start = t.tv_sec * 1000 + t.tv_usec / 1000;
-
-    for (;;) {
-        int res = poll(fds, nfds, remaining);
-        if (res < 0 && errno == EINTR) {
-            if (remaining >= 0) {
-                gettimeofday(&t, NULL);
-                now = t.tv_sec * 1000 + t.tv_usec / 1000;
-                diff = now - start;
-                remaining -= diff;
-                if (diff < 0 || remaining <= 0) {
-                    return 0;
-                }
-                start = now;
-            }
-        } else {
-            return res;
-        }
-    }
-}
-
-JNIEXPORT jint JNICALL
-Java_sun_nio_ch_PollArrayWrapper_poll0(JNIEnv *env, jobject this,
-                                       jlong address, jint numfds,
-                                       jlong timeout)
-{
-    struct pollfd *a;
-    int err = 0;
-
-    a = (struct pollfd *) jlong_to_ptr(address);
-
-    if (timeout <= 0) {           /* Indefinite or no wait */
-        RESTARTABLE (poll(a, numfds, timeout), err);
-    } else {                     /* Bounded wait; bounded restarts */
-        err = ipoll(a, numfds, timeout);
-    }
-
-    if (err < 0) {
-        JNU_ThrowIOExceptionWithLastError(env, "Poll failed");
-    }
-    return (jint)err;
-}
-
-JNIEXPORT void JNICALL
-Java_sun_nio_ch_PollArrayWrapper_interrupt(JNIEnv *env, jobject this, jint fd)
-{
-    int fakebuf[1];
-    fakebuf[0] = 1;
-    if (write(fd, fakebuf, 1) < 0) {
-         JNU_ThrowIOExceptionWithLastError(env,
-                                          "Write to interrupt fd failed");
-    }
-}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/java.base/unix/native/libnio/ch/PollSelectorImpl.c	Fri Apr 06 03:53:28 2018 +0200
@@ -0,0 +1,55 @@
+/*
+ * Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+#include <poll.h>
+
+#include "jni.h"
+#include "jni_util.h"
+#include "jvm.h"
+#include "jlong.h"
+#include "nio.h"
+#include "sun_nio_ch_PollSelectorImpl.h"
+
+JNIEXPORT jint JNICALL
+Java_sun_nio_ch_PollSelectorImpl_poll(JNIEnv *env, jclass clazz,
+                                      jlong address, jint numfds,
+                                      jint timeout)
+{
+    struct pollfd *a;
+    int res;
+
+    a = (struct pollfd *) jlong_to_ptr(address);
+    res = poll(a, numfds, timeout);
+    if (res < 0) {
+        if (errno == EINTR) {
+            return IOS_INTERRUPTED;
+        } else {
+            JNU_ThrowIOExceptionWithLastError(env, "poll failed");
+            return IOS_THROWN;
+        }
+    }
+    return (jint) res;
+}
+
--- a/src/java.base/unix/native/libnio/ch/nio_util.h	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/unix/native/libnio/ch/nio_util.h	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -62,4 +62,5 @@
 
 /* Defined in Net.c */
 
-jint handleSocketError(JNIEnv *env, jint errorValue);
+JNIEXPORT jint JNICALL
+handleSocketError(JNIEnv *env, jint errorValue);
--- a/src/java.base/windows/classes/java/net/DualStackPlainSocketImpl.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/windows/classes/java/net/DualStackPlainSocketImpl.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -38,10 +38,10 @@
  * @author Chris Hegarty
  */
 
-class DualStackPlainSocketImpl extends AbstractPlainSocketImpl
-{
-    static JavaIOFileDescriptorAccess fdAccess = SharedSecrets.getJavaIOFileDescriptorAccess();
+class DualStackPlainSocketImpl extends AbstractPlainSocketImpl {
 
+    private static final JavaIOFileDescriptorAccess fdAccess =
+        SharedSecrets.getJavaIOFileDescriptorAccess();
 
     // true if this socket is exclusively bound
     private final boolean exclusiveBind;
--- a/src/java.base/windows/classes/java/net/TwoStacksPlainDatagramSocketImpl.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/windows/classes/java/net/TwoStacksPlainDatagramSocketImpl.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -40,7 +40,7 @@
  * @author Chris Hegarty
  */
 
-class TwoStacksPlainDatagramSocketImpl extends AbstractPlainDatagramSocketImpl
+final class TwoStacksPlainDatagramSocketImpl extends AbstractPlainDatagramSocketImpl
 {
     /* Used for IPv6 on Windows only */
     private FileDescriptor fd1;
@@ -105,8 +105,16 @@
     protected synchronized void bind0(int lport, InetAddress laddr)
         throws SocketException
     {
+        // The native bind0 may close one or both of the underlying file
+        // descriptors, and even create new sockets, so the safest course of
+        // action is to unregister the socket cleaners, and register afterwards.
+        SocketCleanable.unregister(fd);
+        SocketCleanable.unregister(fd1);
+
         bind0(lport, laddr, exclusiveBind);
 
+        SocketCleanable.register(fd);
+        SocketCleanable.register(fd1);
     }
 
     protected synchronized void receive(DatagramPacket p)
--- a/src/java.base/windows/classes/java/net/TwoStacksPlainSocketImpl.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/windows/classes/java/net/TwoStacksPlainSocketImpl.java	Fri Apr 06 03:53:28 2018 +0200
@@ -27,6 +27,8 @@
 import java.io.IOException;
 import java.io.FileDescriptor;
 import sun.net.ResourceManager;
+import jdk.internal.misc.SharedSecrets;
+import jdk.internal.misc.JavaIOFileDescriptorAccess;
 
 /*
  * This class defines the plain SocketImpl that is used when
@@ -37,16 +39,15 @@
 
 class TwoStacksPlainSocketImpl extends AbstractPlainSocketImpl {
 
+    private static final JavaIOFileDescriptorAccess fdAccess =
+        SharedSecrets.getJavaIOFileDescriptorAccess();
+
     // true if this socket is exclusively bound
     private final boolean exclusiveBind;
 
     // emulates SO_REUSEADDR when exclusiveBind is true
     private boolean isReuseAddress;
 
-    static {
-        initProto();
-    }
-
     public TwoStacksPlainSocketImpl(boolean exclBind) {
         exclusiveBind = exclBind;
     }
@@ -56,105 +57,268 @@
         exclusiveBind = exclBind;
     }
 
-    public Object getOption(int opt) throws SocketException {
-        if (isClosedOrPending()) {
-            throw new SocketException("Socket Closed");
+    void socketCreate(boolean stream) throws IOException {
+        if (fd == null)
+            throw new SocketException("Socket closed");
+
+        int newfd = socket0(stream, false /*v6 Only*/);
+
+        fdAccess.set(fd, newfd);
+    }
+
+    @Override
+    void socketConnect(InetAddress address, int port, int timeout)
+        throws IOException {
+        int nativefd = checkAndReturnNativeFD();
+
+        if (address == null)
+            throw new NullPointerException("inet address argument is null.");
+
+        int connectResult;
+        if (timeout <= 0) {
+            connectResult = connect0(nativefd, address, port);
+        } else {
+            configureBlocking(nativefd, false);
+            try {
+                connectResult = connect0(nativefd, address, port);
+                if (connectResult == WOULDBLOCK) {
+                    waitForConnect(nativefd, timeout);
+                }
+            } finally {
+                configureBlocking(nativefd, true);
+            }
         }
-        if (opt == SO_BINDADDR) {
-            InetAddressContainer in = new InetAddressContainer();
-            socketGetOption(opt, in);
-            return in.addr;
-        } else if (opt == SO_REUSEADDR && exclusiveBind) {
-            // SO_REUSEADDR emulated when using exclusive bind
-            return isReuseAddress;
-        } else if (opt == SO_REUSEPORT) {
-            // SO_REUSEPORT is not supported on Windows.
-            throw new UnsupportedOperationException("unsupported option");
-        } else
-            return super.getOption(opt);
+        /*
+         * We need to set the local port field. If bind was called
+         * previous to the connect (by the client) then localport field
+         * will already be set.
+         */
+        if (localport == 0)
+            localport = localPort0(nativefd);
     }
 
     @Override
     void socketBind(InetAddress address, int port) throws IOException {
-        socketBind(address, port, exclusiveBind);
+        int nativefd = checkAndReturnNativeFD();
+
+        if (address == null)
+            throw new NullPointerException("inet address argument is null.");
+
+        bind0(nativefd, address, port, exclusiveBind);
+        if (port == 0) {
+            localport = localPort0(nativefd);
+        } else {
+            localport = port;
+        }
+
+        this.address = address;
+    }
+
+    @Override
+    void socketListen(int backlog) throws IOException {
+        int nativefd = checkAndReturnNativeFD();
+
+        listen0(nativefd, backlog);
+    }
+
+    @Override
+    void socketAccept(SocketImpl s) throws IOException {
+        int nativefd = checkAndReturnNativeFD();
+
+        if (s == null)
+            throw new NullPointerException("socket is null");
+
+        int newfd = -1;
+        InetSocketAddress[] isaa = new InetSocketAddress[1];
+        if (timeout <= 0) {
+            newfd = accept0(nativefd, isaa);
+        } else {
+            configureBlocking(nativefd, false);
+            try {
+                waitForNewConnection(nativefd, timeout);
+                newfd = accept0(nativefd, isaa);
+                if (newfd != -1) {
+                    configureBlocking(newfd, true);
+                }
+            } finally {
+                configureBlocking(nativefd, true);
+            }
+        }
+        /* Update (SocketImpl)s' fd */
+        fdAccess.set(s.fd, newfd);
+        /* Update socketImpls remote port, address and localport */
+        InetSocketAddress isa = isaa[0];
+        s.port = isa.getPort();
+        s.address = isa.getAddress();
+        s.localport = localport;
+    }
+
+    @Override
+    int socketAvailable() throws IOException {
+        int nativefd = checkAndReturnNativeFD();
+        return available0(nativefd);
+    }
+
+    @Override
+    void socketClose0(boolean useDeferredClose/*unused*/) throws IOException {
+        if (fd == null)
+            throw new SocketException("Socket closed");
+
+        if (!fd.valid())
+            return;
+
+        final int nativefd = fdAccess.get(fd);
+        fdAccess.set(fd, -1);
+        close0(nativefd);
     }
 
     @Override
-    void socketSetOption(int opt, boolean on, Object value)
-        throws SocketException
-    {
-        // SO_REUSEADDR emulated when using exclusive bind
-        if (opt == SO_REUSEADDR && exclusiveBind)
-            isReuseAddress = on;
-        else if (opt == SO_REUSEPORT) {
-            // SO_REUSEPORT is not supported on Windows.
-            throw new UnsupportedOperationException("unsupported option");
-        }
-        else
-            socketNativeSetOption(opt, on, value);
+    void socketShutdown(int howto) throws IOException {
+        int nativefd = checkAndReturnNativeFD();
+        shutdown0(nativefd, howto);
     }
 
-    /**
-     * Closes the socket.
-     */
+    // Intentional fallthrough after SO_REUSEADDR
+    @SuppressWarnings("fallthrough")
     @Override
-    protected void close() throws IOException {
-        synchronized(fdLock) {
-            if (fd != null) {
-                if (!stream) {
-                    ResourceManager.afterUdpClose();
+    void socketSetOption(int opt, boolean on, Object value)
+        throws SocketException {
+        int nativefd = checkAndReturnNativeFD();
+
+        if (opt == SO_TIMEOUT) {
+            // Don't enable the socket option on ServerSocket as it's
+            // meaningless (we don't receive on a ServerSocket).
+            if (serverSocket == null) {
+                setSoTimeout0(nativefd, ((Integer)value).intValue());
+            }
+            return;
+        }
+        // SO_REUSEPORT is not supported on Windows.
+        if (opt == SO_REUSEPORT) {
+            throw new UnsupportedOperationException("unsupported option");
+        }
+
+        int optionValue = 0;
+
+        switch(opt) {
+            case SO_REUSEADDR :
+                if (exclusiveBind) {
+                    // SO_REUSEADDR emulated when using exclusive bind
+                    isReuseAddress = on;
+                    return;
+                }
+                // intentional fallthrough
+            case TCP_NODELAY :
+            case SO_OOBINLINE :
+            case SO_KEEPALIVE :
+                optionValue = on ? 1 : 0;
+                break;
+            case SO_SNDBUF :
+            case SO_RCVBUF :
+            case IP_TOS :
+                optionValue = ((Integer)value).intValue();
+                break;
+            case SO_LINGER :
+                if (on) {
+                    optionValue =  ((Integer)value).intValue();
+                } else {
+                    optionValue = -1;
                 }
-                if (fdUseCount == 0) {
-                    if (closePending) {
-                        return;
-                    }
-                    closePending = true;
-                    socketClose();
-                    fd = null;
-                    return;
-                } else {
-                    /*
-                     * If a thread has acquired the fd and a close
-                     * isn't pending then use a deferred close.
-                     * Also decrement fdUseCount to signal the last
-                     * thread that releases the fd to close it.
-                     */
-                    if (!closePending) {
-                        closePending = true;
-                        fdUseCount--;
-                        socketClose();
-                    }
-                }
-            }
+                break;
+            default :/* shouldn't get here */
+                throw new SocketException("Option not supported");
+        }
+
+        setIntOption(nativefd, opt, optionValue);
+    }
+
+    @Override
+    int socketGetOption(int opt, Object iaContainerObj) throws SocketException {
+        int nativefd = checkAndReturnNativeFD();
+
+        // SO_BINDADDR is not a socket option.
+        if (opt == SO_BINDADDR) {
+            localAddress(nativefd, (InetAddressContainer)iaContainerObj);
+            return 0;  // return value doesn't matter.
+        }
+        // SO_REUSEPORT is not supported on Windows.
+        if (opt == SO_REUSEPORT) {
+            throw new UnsupportedOperationException("unsupported option");
         }
+
+        // SO_REUSEADDR emulated when using exclusive bind
+        if (opt == SO_REUSEADDR && exclusiveBind)
+            return isReuseAddress? 1 : -1;
+
+        int value = getIntOption(nativefd, opt);
+
+        switch (opt) {
+            case TCP_NODELAY :
+            case SO_OOBINLINE :
+            case SO_KEEPALIVE :
+            case SO_REUSEADDR :
+                return (value == 0) ? -1 : 1;
+        }
+        return value;
+    }
+
+    @Override
+    void socketSendUrgentData(int data) throws IOException {
+        int nativefd = checkAndReturnNativeFD();
+        sendOOB(nativefd, data);
+    }
+
+    private int checkAndReturnNativeFD() throws SocketException {
+        if (fd == null || !fd.valid())
+            throw new SocketException("Socket closed");
+
+        return fdAccess.get(fd);
+    }
+
+    static final int WOULDBLOCK = -2;       // Nothing available (non-blocking)
+
+    static {
+        initIDs();
     }
 
     /* Native methods */
 
-    static native void initProto();
+    static native void initIDs();
 
-    native void socketCreate(boolean stream) throws IOException;
+    static native int socket0(boolean stream, boolean v6Only) throws IOException;
 
-    native void socketConnect(InetAddress address, int port, int timeout)
+    static native void bind0(int fd, InetAddress localAddress, int localport,
+                             boolean exclBind)
         throws IOException;
 
-    native void socketBind(InetAddress address, int port, boolean exclBind)
+    static native int connect0(int fd, InetAddress remote, int remotePort)
         throws IOException;
 
-    native void socketListen(int count) throws IOException;
+    static native void waitForConnect(int fd, int timeout) throws IOException;
 
-    native void socketAccept(SocketImpl s) throws IOException;
+    static native int localPort0(int fd) throws IOException;
+
+    static native void localAddress(int fd, InetAddressContainer in) throws SocketException;
 
-    native int socketAvailable() throws IOException;
+    static native void listen0(int fd, int backlog) throws IOException;
+
+    static native int accept0(int fd, InetSocketAddress[] isaa) throws IOException;
 
-    native void socketClose0(boolean useDeferredClose) throws IOException;
+    static native void waitForNewConnection(int fd, int timeout) throws IOException;
+
+    static native int available0(int fd) throws IOException;
 
-    native void socketShutdown(int howto) throws IOException;
+    static native void close0(int fd) throws IOException;
 
-    native void socketNativeSetOption(int cmd, boolean on, Object value)
-        throws SocketException;
+    static native void shutdown0(int fd, int howto) throws IOException;
+
+    static native void setIntOption(int fd, int cmd, int optionValue) throws SocketException;
 
-    native int socketGetOption(int opt, Object iaContainerObj) throws SocketException;
+    static native void setSoTimeout0(int fd, int timeout) throws SocketException;
+
+    static native int getIntOption(int fd, int cmd) throws SocketException;
 
-    native void socketSendUrgentData(int data) throws IOException;
+    static native void sendOOB(int fd, int data) throws IOException;
+
+    static native void configureBlocking(int fd, boolean blocking) throws IOException;
 }
--- a/src/java.base/windows/classes/sun/nio/ch/PollArrayWrapper.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/windows/classes/sun/nio/ch/PollArrayWrapper.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -63,8 +63,9 @@
     }
 
     // Prepare another pollfd struct for use.
-    void addEntry(int index, SelectionKeyImpl ski) {
+    void putEntry(int index, SelectionKeyImpl ski) {
         putDescriptor(index, ski.channel.getFDVal());
+        putEventOps(index, 0);
     }
 
     // Writes the pollfd entry from the source wrapper at the source index
--- a/src/java.base/windows/classes/sun/nio/ch/SinkChannelImpl.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/windows/classes/sun/nio/ch/SinkChannelImpl.java	Fri Apr 06 03:53:28 2018 +0200
@@ -72,10 +72,9 @@
         sc.configureBlocking(block);
     }
 
-    public boolean translateReadyOps(int ops, int initialOps,
-                                     SelectionKeyImpl sk) {
-        int intOps = sk.nioInterestOps(); // Do this just once, it synchronizes
-        int oldOps = sk.nioReadyOps();
+    public boolean translateReadyOps(int ops, int initialOps, SelectionKeyImpl ski) {
+        int intOps = ski.nioInterestOps();
+        int oldOps = ski.nioReadyOps();
         int newOps = initialOps;
 
         if ((ops & Net.POLLNVAL) != 0)
@@ -83,7 +82,7 @@
 
         if ((ops & (Net.POLLERR | Net.POLLHUP)) != 0) {
             newOps = intOps;
-            sk.nioReadyOps(newOps);
+            ski.nioReadyOps(newOps);
             return (newOps & ~oldOps) != 0;
         }
 
@@ -91,22 +90,23 @@
             ((intOps & SelectionKey.OP_WRITE) != 0))
             newOps |= SelectionKey.OP_WRITE;
 
-        sk.nioReadyOps(newOps);
+        ski.nioReadyOps(newOps);
         return (newOps & ~oldOps) != 0;
     }
 
-    public boolean translateAndUpdateReadyOps(int ops, SelectionKeyImpl sk) {
-        return translateReadyOps(ops, sk.nioReadyOps(), sk);
+    public boolean translateAndUpdateReadyOps(int ops, SelectionKeyImpl ski) {
+        return translateReadyOps(ops, ski.nioReadyOps(), ski);
     }
 
-    public boolean translateAndSetReadyOps(int ops, SelectionKeyImpl sk) {
-        return translateReadyOps(ops, 0, sk);
+    public boolean translateAndSetReadyOps(int ops, SelectionKeyImpl ski) {
+        return translateReadyOps(ops, 0, ski);
     }
 
-    public void translateAndSetInterestOps(int ops, SelectionKeyImpl sk) {
+    public int translateInterestOps(int ops) {
+        int newOps = 0;
         if ((ops & SelectionKey.OP_WRITE) != 0)
-            ops = Net.POLLOUT;
-        sk.selector.putEventOps(sk, ops);
+            newOps |= Net.POLLOUT;
+        return newOps;
     }
 
     public int write(ByteBuffer src) throws IOException {
--- a/src/java.base/windows/classes/sun/nio/ch/SourceChannelImpl.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/windows/classes/sun/nio/ch/SourceChannelImpl.java	Fri Apr 06 03:53:28 2018 +0200
@@ -71,10 +71,9 @@
         sc.configureBlocking(block);
     }
 
-    public boolean translateReadyOps(int ops, int initialOps,
-                                     SelectionKeyImpl sk) {
-        int intOps = sk.nioInterestOps(); // Do this just once, it synchronizes
-        int oldOps = sk.nioReadyOps();
+    public boolean translateReadyOps(int ops, int initialOps, SelectionKeyImpl ski) {
+        int intOps = ski.nioInterestOps();
+        int oldOps = ski.nioReadyOps();
         int newOps = initialOps;
 
         if ((ops & Net.POLLNVAL) != 0)
@@ -82,7 +81,7 @@
 
         if ((ops & (Net.POLLERR | Net.POLLHUP)) != 0) {
             newOps = intOps;
-            sk.nioReadyOps(newOps);
+            ski.nioReadyOps(newOps);
             return (newOps & ~oldOps) != 0;
         }
 
@@ -90,22 +89,23 @@
             ((intOps & SelectionKey.OP_READ) != 0))
             newOps |= SelectionKey.OP_READ;
 
-        sk.nioReadyOps(newOps);
+        ski.nioReadyOps(newOps);
         return (newOps & ~oldOps) != 0;
     }
 
-    public boolean translateAndUpdateReadyOps(int ops, SelectionKeyImpl sk) {
-        return translateReadyOps(ops, sk.nioReadyOps(), sk);
+    public boolean translateAndUpdateReadyOps(int ops, SelectionKeyImpl ski) {
+        return translateReadyOps(ops, ski.nioReadyOps(), ski);
     }
 
-    public boolean translateAndSetReadyOps(int ops, SelectionKeyImpl sk) {
-        return translateReadyOps(ops, 0, sk);
+    public boolean translateAndSetReadyOps(int ops, SelectionKeyImpl ski) {
+        return translateReadyOps(ops, 0, ski);
     }
 
-    public void translateAndSetInterestOps(int ops, SelectionKeyImpl sk) {
+    public int translateInterestOps(int ops) {
+        int newOps = 0;
         if ((ops & SelectionKey.OP_READ) != 0)
-            ops = Net.POLLIN;
-        sk.selector.putEventOps(sk, ops);
+            newOps |= Net.POLLIN;
+        return newOps;
     }
 
     public int read(ByteBuffer dst) throws IOException {
--- a/src/java.base/windows/classes/sun/nio/ch/WindowsSelectorImpl.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/windows/classes/sun/nio/ch/WindowsSelectorImpl.java	Fri Apr 06 03:53:28 2018 +0200
@@ -23,23 +23,19 @@
  * questions.
  */
 
-/*
- */
-
-
 package sun.nio.ch;
 
-import java.nio.channels.spi.SelectorProvider;
-import java.nio.channels.Selector;
+import java.io.IOException;
 import java.nio.channels.ClosedSelectorException;
 import java.nio.channels.Pipe;
-import java.nio.channels.SelectableChannel;
-import java.io.IOException;
-import java.nio.channels.CancelledKeyException;
+import java.nio.channels.Selector;
+import java.nio.channels.spi.SelectorProvider;
+import java.util.ArrayDeque;
+import java.util.ArrayList;
+import java.util.Deque;
+import java.util.HashMap;
 import java.util.List;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
+import java.util.Map;
 
 /**
  * A multi-threaded implementation of Selector for Windows.
@@ -80,9 +76,6 @@
     // File descriptors corresponding to source and sink
     private final int wakeupSourceFd, wakeupSinkFd;
 
-    // Lock for close cleanup
-    private final Object closeLock = new Object();
-
     // Maps file descriptors to their indices in  pollArray
     private static final class FdMap extends HashMap<Integer, MapEntry> {
         static final long serialVersionUID = 0L;
@@ -103,7 +96,7 @@
 
     // class for fdMap entries
     private static final class MapEntry {
-        SelectionKeyImpl ski;
+        final SelectionKeyImpl ski;
         long updateCount = 0;
         long clearedCount = 0;
         MapEntry(SelectionKeyImpl ski) {
@@ -121,6 +114,13 @@
     private final Object interruptLock = new Object();
     private volatile boolean interruptTriggered;
 
+    // pending new registrations/updates, queued by implRegister and putEventOps
+    private final Object updateLock = new Object();
+    private final Deque<SelectionKeyImpl> newKeys = new ArrayDeque<>();
+    private final Deque<SelectionKeyImpl> updateKeys = new ArrayDeque<>();
+    private final Deque<Integer> updateEvents = new ArrayDeque<>();
+
+
     WindowsSelectorImpl(SelectorProvider sp) throws IOException {
         super(sp);
         pollWrapper = new PollArrayWrapper(INIT_CAP);
@@ -135,11 +135,16 @@
         pollWrapper.addWakeupSocket(wakeupSourceFd, 0);
     }
 
+    private void ensureOpen() {
+        if (!isOpen())
+            throw new ClosedSelectorException();
+    }
+
     @Override
     protected int doSelect(long timeout) throws IOException {
-        if (channelArray == null)
-            throw new ClosedSelectorException();
+        assert Thread.holdsLock(this);
         this.timeout = timeout; // set selector timeout
+        processUpdateQueue();
         processDeregisterQueue();
         if (interruptTriggered) {
             resetWakeupSocket();
@@ -176,6 +181,42 @@
         return updated;
     }
 
+    /**
+     * Process new registrations and changes to the interest ops.
+     */
+    private void processUpdateQueue() {
+        assert Thread.holdsLock(this);
+
+        synchronized (updateLock) {
+            SelectionKeyImpl ski;
+
+            // new registrations
+            while ((ski = newKeys.pollFirst()) != null) {
+                if (ski.isValid()) {
+                    growIfNeeded();
+                    channelArray[totalChannels] = ski;
+                    ski.setIndex(totalChannels);
+                    pollWrapper.putEntry(totalChannels, ski);
+                    totalChannels++;
+                    MapEntry previous = fdMap.put(ski);
+                    assert previous == null;
+                }
+            }
+
+            // changes to interest ops
+            assert updateKeys.size() == updateEvents.size();
+            while ((ski = updateKeys.pollFirst()) != null) {
+                int events = updateEvents.pollFirst();
+                int fd = ski.channel.getFDVal();
+                if (ski.isValid() && fdMap.containsKey(fd)) {
+                    int index = ski.getIndex();
+                    assert index >= 0 && index < totalChannels;
+                    pollWrapper.putEventOps(index, events);
+                }
+            }
+        }
+    }
+
     // Helper threads wait on this lock for the next poll.
     private final StartLock startLock = new StartLock();
 
@@ -503,46 +544,29 @@
 
     @Override
     protected void implClose() throws IOException {
-        synchronized (closeLock) {
-            if (channelArray != null) {
-                if (pollWrapper != null) {
-                    // prevent further wakeup
-                    synchronized (interruptLock) {
-                        interruptTriggered = true;
-                    }
-                    wakeupPipe.sink().close();
-                    wakeupPipe.source().close();
-                    for(int i = 1; i < totalChannels; i++) { // Deregister channels
-                        if (i % MAX_SELECTABLE_FDS != 0) { // skip wakeupEvent
-                            deregister(channelArray[i]);
-                            SelectableChannel selch = channelArray[i].channel();
-                            if (!selch.isOpen() && !selch.isRegistered())
-                                ((SelChImpl)selch).kill();
-                        }
-                    }
-                    pollWrapper.free();
-                    pollWrapper = null;
-                    channelArray = null;
-                    // Make all remaining helper threads exit
-                    for (SelectThread t: threads)
-                         t.makeZombie();
-                    startLock.startThreads();
-                }
-            }
+        assert !isOpen();
+        assert Thread.holdsLock(this);
+
+        // prevent further wakeup
+        synchronized (interruptLock) {
+            interruptTriggered = true;
         }
+
+        wakeupPipe.sink().close();
+        wakeupPipe.source().close();
+        pollWrapper.free();
+
+        // Make all remaining helper threads exit
+        for (SelectThread t: threads)
+             t.makeZombie();
+        startLock.startThreads();
     }
 
+    @Override
     protected void implRegister(SelectionKeyImpl ski) {
-        synchronized (closeLock) {
-            if (pollWrapper == null)
-                throw new ClosedSelectorException();
-            growIfNeeded();
-            channelArray[totalChannels] = ski;
-            ski.setIndex(totalChannels);
-            fdMap.put(ski);
-            keys.add(ski);
-            pollWrapper.addEntry(totalChannels, ski);
-            totalChannels++;
+        ensureOpen();
+        synchronized (updateLock) {
+            newKeys.addLast(ski);
         }
     }
 
@@ -561,47 +585,43 @@
         }
     }
 
-    protected void implDereg(SelectionKeyImpl ski) throws IOException{
-        int i = ski.getIndex();
-        assert (i >= 0);
-        synchronized (closeLock) {
+    @Override
+    protected void implDereg(SelectionKeyImpl ski) {
+        assert !ski.isValid();
+        assert Thread.holdsLock(this);
+
+        if (fdMap.remove(ski) != null) {
+            int i = ski.getIndex();
+            assert (i >= 0);
+
             if (i != totalChannels - 1) {
                 // Copy end one over it
                 SelectionKeyImpl endChannel = channelArray[totalChannels-1];
                 channelArray[i] = endChannel;
                 endChannel.setIndex(i);
-                pollWrapper.replaceEntry(pollWrapper, totalChannels - 1,
-                                                                pollWrapper, i);
+                pollWrapper.replaceEntry(pollWrapper, totalChannels-1, pollWrapper, i);
             }
             ski.setIndex(-1);
-        }
-        channelArray[totalChannels - 1] = null;
-        totalChannels--;
-        if ( totalChannels != 1 && totalChannels % MAX_SELECTABLE_FDS == 1) {
+
+            channelArray[totalChannels - 1] = null;
             totalChannels--;
-            threadsCount--; // The last thread has become redundant.
-        }
-        fdMap.remove(ski); // Remove the key from fdMap, keys and selectedKeys
-        keys.remove(ski);
-        selectedKeys.remove(ski);
-        deregister(ski);
-        SelectableChannel selch = ski.channel();
-        if (!selch.isOpen() && !selch.isRegistered())
-            ((SelChImpl)selch).kill();
-    }
-
-    public void putEventOps(SelectionKeyImpl sk, int ops) {
-        synchronized (closeLock) {
-            if (pollWrapper == null)
-                throw new ClosedSelectorException();
-            // make sure this sk has not been removed yet
-            int index = sk.getIndex();
-            if (index == -1)
-                throw new CancelledKeyException();
-            pollWrapper.putEventOps(index, ops);
+            if (totalChannels != 1 && totalChannels % MAX_SELECTABLE_FDS == 1) {
+                totalChannels--;
+                threadsCount--; // The last thread has become redundant.
+            }
         }
     }
 
+    @Override
+    public void putEventOps(SelectionKeyImpl ski, int events) {
+        ensureOpen();
+        synchronized (updateLock) {
+            updateEvents.addLast(events);  // events first in case adding key fails
+            updateKeys.addLast(ski);
+        }
+    }
+
+    @Override
     public Selector wakeup() {
         synchronized (interruptLock) {
             if (!interruptTriggered) {
--- a/src/java.base/windows/native/libjava/io_util_md.c	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/windows/native/libjava/io_util_md.c	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -223,7 +223,7 @@
     return pathbuf;
 }
 
-FD
+JNIEXPORT FD JNICALL
 winFileHandleOpen(JNIEnv *env, jstring path, int flags)
 {
     const DWORD access =
@@ -575,7 +575,7 @@
     }
 }
 
-jlong
+JNIEXPORT jlong JNICALL
 handleLseek(FD fd, jlong offset, jint whence)
 {
     LARGE_INTEGER pos, distance;
--- a/src/java.base/windows/native/libjava/io_util_md.h	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/windows/native/libjava/io_util_md.h	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -50,13 +50,15 @@
 jint handleAppend(FD fd, const void *buf, jint len);
 void handleClose(JNIEnv *env, jobject this, jfieldID fid);
 void fileDescriptorClose(JNIEnv *env, jobject this);
-jlong handleLseek(FD fd, jlong offset, jint whence);
+JNIEXPORT jlong JNICALL
+handleLseek(FD fd, jlong offset, jint whence);
 
 /*
  * Returns an opaque handle to file named by "path".  If an error occurs,
  * returns -1 and an exception is pending.
  */
-FD winFileHandleOpen(JNIEnv *env, jstring path, int flags);
+JNIEXPORT FD JNICALL
+winFileHandleOpen(JNIEnv *env, jstring path, int flags);
 
 /*
  * Macros to set/get fd from the java.io.FileDescriptor.
--- a/src/java.base/windows/native/libjava/jni_util_md.c	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/windows/native/libjava/jni_util_md.c	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2004, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -74,7 +74,7 @@
     return;
 }
 
-size_t
+JNIEXPORT size_t JNICALL
 getLastErrorString(char *utf8_jvmErrorMsg, size_t cbErrorMsg)
 {
     size_t n = 0;
@@ -144,7 +144,7 @@
     return n;
 }
 
-int
+JNIEXPORT int JNICALL
 getErrorString(int err, char *buf, size_t len)
 {
     int ret = 0;
--- a/src/java.base/windows/native/libjli/cmdtoargs.c	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/windows/native/libjli/cmdtoargs.c	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -35,6 +35,7 @@
 
 #ifndef IDE_STANDALONE
 #include "java.h"
+#include "jni.h"
 #include "jli_util.h"
 #else /* IDE_STANDALONE */
 // The defines we need for stand alone testing
@@ -188,15 +189,18 @@
     return done ? src : NULL;
 }
 
-int JLI_GetStdArgc() {
+JNIEXPORT int JNICALL
+JLI_GetStdArgc() {
     return stdargc;
 }
 
-StdArg* JLI_GetStdArgs() {
+JNIEXPORT StdArg* JNICALL
+JLI_GetStdArgs() {
     return stdargs;
 }
 
-void JLI_CmdToArgs(char* cmdline) {
+JNIEXPORT void JNICALL
+JLI_CmdToArgs(char* cmdline) {
     int nargs = 0;
     StdArg* argv = NULL;
     jboolean wildcard = JNI_FALSE;
--- a/src/java.base/windows/native/libjli/java_md.c	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/windows/native/libjli/java_md.c	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -495,7 +495,7 @@
     return rc;
 }
 
-void
+JNIEXPORT void JNICALL
 JLI_ReportErrorMessage(const char* fmt, ...) {
     va_list vl;
     va_start(vl,fmt);
@@ -524,7 +524,7 @@
  * error message if any, its upto the calling routine to correctly
  * format the separation of the messages.
  */
-void
+JNIEXPORT void JNICALL
 JLI_ReportErrorMessageSys(const char *fmt, ...)
 {
     va_list vl;
@@ -588,7 +588,8 @@
     va_end(vl);
 }
 
-void  JLI_ReportExceptionDescription(JNIEnv * env) {
+JNIEXPORT void JNICALL
+JLI_ReportExceptionDescription(JNIEnv * env) {
     if (IsJavaw()) {
        /*
         * This code should be replaced by code which opens a window with
--- a/src/java.base/windows/native/libnet/DualStackPlainSocketImpl.c	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/windows/native/libnet/DualStackPlainSocketImpl.c	Fri Apr 06 03:53:28 2018 +0200
@@ -51,7 +51,7 @@
     initInetAddressIDs(env);
 
     // implement read timeout with select.
-    isRcvTimeoutSupported = 0;
+    isRcvTimeoutSupported = JNI_FALSE;
 }
 
 /*
--- a/src/java.base/windows/native/libnet/TwoStacksPlainDatagramSocketImpl.c	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/windows/native/libnet/TwoStacksPlainDatagramSocketImpl.c	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -491,7 +491,9 @@
             if (WSAGetLastError() == WSAEACCES) {
                 WSASetLastError(WSAEADDRINUSE);
             }
+            (*env)->SetObjectField(env, this, pdsi_fdID, NULL);
             NET_ThrowCurrent(env, "Cannot bind");
+            closesocket(fd);
             return;
         }
     }
--- a/src/java.base/windows/native/libnet/TwoStacksPlainSocketImpl.c	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/windows/native/libnet/TwoStacksPlainSocketImpl.c	Fri Apr 06 03:53:28 2018 +0200
@@ -22,623 +22,420 @@
  * or visit www.oracle.com if you need additional information or have any
  * questions.
  */
-#include <malloc.h>
-
 #include "net_util.h"
 
 #include "java_net_TwoStacksPlainSocketImpl.h"
 #include "java_net_SocketOptions.h"
 #include "java_net_InetAddress.h"
 
+#define SET_BLOCKING 0
+#define SET_NONBLOCKING 1
+
+static jclass isa_class;        /* java.net.InetSocketAddress */
+static jmethodID isa_ctorID;    /* InetSocketAddress(InetAddress, int) */
+
 /************************************************************************
  * TwoStacksPlainSocketImpl
  */
 
-static jfieldID IO_fd_fdID;
-
-jfieldID psi_fdID;
-jfieldID psi_addressID;
-jfieldID psi_portID;
-jfieldID psi_localportID;
-jfieldID psi_timeoutID;
-jfieldID psi_trafficClassID;
-jfieldID psi_serverSocketID;
-
 /*
- * the level of the TCP protocol for setsockopt and getsockopt
- * we only want to look this up once, from the static initializer
- * of TwoStacksPlainSocketImpl
- */
-static int tcp_level = -1;
-
-static int getFD(JNIEnv *env, jobject this) {
-    jobject fdObj = (*env)->GetObjectField(env, this, psi_fdID);
-
-    if (fdObj == NULL) {
-        return -1;
-    }
-    return (*env)->GetIntField(env, fdObj, IO_fd_fdID);
-}
-
-
-/*
- * The initProto function is called whenever TwoStacksPlainSocketImpl is
+ * The initIDs function is called whenever TwoStacksPlainSocketImpl is
  * loaded, to cache fieldIds for efficiency. This is called everytime
  * the Java class is loaded.
  *
  * Class:     java_net_TwoStacksPlainSocketImpl
- * Method:    initProto
-
+ * Method:    initIDs
  * Signature: ()V
  */
-JNIEXPORT void JNICALL
-Java_java_net_TwoStacksPlainSocketImpl_initProto(JNIEnv *env, jclass cls) {
+JNIEXPORT void JNICALL Java_java_net_TwoStacksPlainSocketImpl_initIDs
+  (JNIEnv *env, jclass clazz) {
 
-    struct protoent *proto = getprotobyname("TCP");
-    tcp_level = (proto == 0 ? IPPROTO_TCP: proto->p_proto);
+    jclass cls = (*env)->FindClass(env, "java/net/InetSocketAddress");
+    CHECK_NULL(cls);
+    isa_class = (*env)->NewGlobalRef(env, cls);
+    CHECK_NULL(isa_class);
+    isa_ctorID = (*env)->GetMethodID(env, cls, "<init>",
+                                     "(Ljava/net/InetAddress;I)V");
+    CHECK_NULL(isa_ctorID);
+}
 
-    psi_fdID = (*env)->GetFieldID(env, cls , "fd", "Ljava/io/FileDescriptor;");
-    CHECK_NULL(psi_fdID);
-    psi_addressID = (*env)->GetFieldID(env, cls, "address",
-                                          "Ljava/net/InetAddress;");
-    CHECK_NULL(psi_addressID);
-    psi_portID = (*env)->GetFieldID(env, cls, "port", "I");
-    CHECK_NULL(psi_portID);
-    psi_localportID = (*env)->GetFieldID(env, cls, "localport", "I");
-    CHECK_NULL(psi_localportID);
-    psi_timeoutID = (*env)->GetFieldID(env, cls, "timeout", "I");
-    CHECK_NULL(psi_timeoutID);
-    psi_trafficClassID = (*env)->GetFieldID(env, cls, "trafficClass", "I");
-    CHECK_NULL(psi_trafficClassID);
-    psi_serverSocketID = (*env)->GetFieldID(env, cls, "serverSocket",
-                                            "Ljava/net/ServerSocket;");
-    CHECK_NULL(psi_serverSocketID);
-    IO_fd_fdID = NET_GetFileDescriptorID(env);
-    CHECK_NULL(IO_fd_fdID);
+/*
+ * Class:     java_net_TwoStacksPlainSocketImpl
+ * Method:    socket0
+ * Signature: (ZZ)I
+ */
+JNIEXPORT jint JNICALL Java_java_net_TwoStacksPlainSocketImpl_socket0
+  (JNIEnv *env, jclass clazz, jboolean stream, jboolean v6Only /*unused*/) {
+    int fd;
+
+    fd = socket(AF_INET, (stream ? SOCK_STREAM: SOCK_DGRAM), 0);
+    if (fd == INVALID_SOCKET) {
+        NET_ThrowNew(env, WSAGetLastError(), "create");
+        return -1;
+    }
+
+    SetHandleInformation((HANDLE)(UINT_PTR)fd, HANDLE_FLAG_INHERIT, FALSE);
+
+    return fd;
 }
 
 /*
  * Class:     java_net_TwoStacksPlainSocketImpl
- * Method:    socketCreate
- * Signature: (Z)V
+ * Method:    bind0
+ * Signature: (ILjava/net/InetAddress;I)V
  */
-JNIEXPORT void JNICALL
-Java_java_net_TwoStacksPlainSocketImpl_socketCreate(JNIEnv *env, jobject this,
-                                           jboolean stream) {
-    jobject fdObj;
-    int fd;
+JNIEXPORT void JNICALL Java_java_net_TwoStacksPlainSocketImpl_bind0
+  (JNIEnv *env, jclass clazz, jint fd, jobject iaObj, jint port,
+   jboolean exclBind)
+{
+    SOCKETADDRESS sa;
+    int rv, sa_len = 0;
+    /* family is an int field of iaObj */
+    int family;
 
-    fdObj = (*env)->GetObjectField(env, this, psi_fdID);
-
-    if (IS_NULL(fdObj)) {
+    family = getInetAddress_family(env, iaObj);
+    if (family != java_net_InetAddress_IPv4) {
         JNU_ThrowByName(env, JNU_JAVANETPKG "SocketException",
-                        "null fd object");
+                        "Protocol family not supported");
         return;
     }
-    fd = socket(AF_INET, (stream ? SOCK_STREAM: SOCK_DGRAM), 0);
-    if (fd == -1) {
-        NET_ThrowCurrent(env, "create");
+
+    if (NET_InetAddressToSockaddr(env, iaObj, port, &sa,
+                                  &sa_len, JNI_FALSE) != 0) {
         return;
-    } else {
-        /* Set socket attribute so it is not passed to any child process */
-        SetHandleInformation((HANDLE)(UINT_PTR)fd, HANDLE_FLAG_INHERIT, FALSE);
-        (*env)->SetIntField(env, fdObj, IO_fd_fdID, (int)fd);
     }
+
+    rv = NET_WinBind(fd, &sa, sa_len, exclBind);
+
+    if (rv == SOCKET_ERROR)
+        NET_ThrowNew(env, WSAGetLastError(), "NET_Bind");
 }
 
 /*
- * inetAddress is the address object passed to the socket connect
- * call.
- *
  * Class:     java_net_TwoStacksPlainSocketImpl
- * Method:    socketConnect
- * Signature: (Ljava/net/InetAddress;I)V
+ * Method:    connect0
+ * Signature: (ILjava/net/InetAddress;I)I
  */
-JNIEXPORT void JNICALL
-Java_java_net_TwoStacksPlainSocketImpl_socketConnect(JNIEnv *env, jobject this,
-                                                     jobject iaObj, jint port,
-                                                     jint timeout)
-{
-    jint localport = (*env)->GetIntField(env, this, psi_localportID);
-
-    /* family and localport are int fields of iaObj */
+JNIEXPORT jint JNICALL Java_java_net_TwoStacksPlainSocketImpl_connect0
+  (JNIEnv *env, jclass clazz, jint fd, jobject iaObj, jint port) {
+    SOCKETADDRESS sa;
+    int rv, sa_len = 0;
     int family;
-    jint fd = -1;
-    jint len;
 
-    jobject fdObj = (*env)->GetObjectField(env, this, psi_fdID);
-
-    SOCKETADDRESS sa;
-
-    /* The result of the connection */
-    int connect_res;
-    memset((char *)&sa, 0, sizeof(sa));
-
-    if (!IS_NULL(fdObj)) {
-        fd = (*env)->GetIntField(env, fdObj, IO_fd_fdID);
-    }
-
-    if (IS_NULL(iaObj)) {
-        JNU_ThrowNullPointerException(env, "inet address argument is null.");
-        return;
-    }
-
-    if (NET_InetAddressToSockaddr(env, iaObj, port, &sa, &len,
-                                  JNI_FALSE) != 0) {
-        return;
+    if (NET_InetAddressToSockaddr(env, iaObj, port, &sa,
+                                  &sa_len, JNI_FALSE) != 0) {
+        return -1;
     }
 
     family = sa.sa.sa_family;
     if (family != AF_INET) {
         JNU_ThrowByName(env, JNU_JAVANETPKG "SocketException",
                         "Protocol family not supported");
-    }
-    if (fd == -1) {
-        JNU_ThrowByName(env, JNU_JAVANETPKG "SocketException",
-                        "Destination unreachable");
-        return;
+        return -1;
     }
 
-    if (timeout <= 0) {
-        connect_res = connect(fd, &sa.sa, sizeof(SOCKETADDRESS));
-        if (connect_res == SOCKET_ERROR) {
-            connect_res = WSAGetLastError();
-        }
-    } else {
-        int optval;
-        int optlen = sizeof(optval);
-
-        /* make socket non-blocking */
-        optval = 1;
-        ioctlsocket(fd, FIONBIO, &optval);
-
-        /* initiate the connect */
-        connect_res = connect(fd, &sa.sa, sizeof(SOCKETADDRESS));
-        if (connect_res == SOCKET_ERROR) {
-            if (WSAGetLastError() != WSAEWOULDBLOCK) {
-                connect_res = WSAGetLastError();
-            } else {
-                fd_set wr, ex;
-                struct timeval t;
-
-                FD_ZERO(&wr);
-                FD_ZERO(&ex);
-                FD_SET(fd, &wr);
-                FD_SET(fd, &ex);
-                t.tv_sec = timeout / 1000;
-                t.tv_usec = (timeout % 1000) * 1000;
-
-                /*
-                 * Wait for timout, connection established or
-                 * connection failed.
-                 */
-                connect_res = select(fd+1, 0, &wr, &ex, &t);
-
-                /*
-                 * Timeout before connection is established/failed so
-                 * we throw exception and shutdown input/output to prevent
-                 * socket from being used.
-                 * The socket should be closed immediately by the caller.
-                 */
-                if (connect_res == 0) {
-                    JNU_ThrowByName(env, JNU_JAVANETPKG "SocketTimeoutException",
-                                    "connect timed out");
-                    shutdown( fd, SD_BOTH );
-
-                     /* make socket blocking again - just in case */
-                    optval = 0;
-                    ioctlsocket( fd, FIONBIO, &optval );
-                    return;
-                }
-
-                /*
-                 * We must now determine if the connection has been established
-                 * or if it has failed. The logic here is designed to work around
-                 * bug on Windows NT whereby using getsockopt to obtain the
-                 * last error (SO_ERROR) indicates there is no error. The workaround
-                 * on NT is to allow winsock to be scheduled and this is done by
-                 * yielding and retrying. As yielding is problematic in heavy
-                 * load conditions we attempt up to 3 times to get the error reason.
-                 */
-                if (!FD_ISSET(fd, &ex)) {
-                    connect_res = 0;
-                } else {
-                    int retry;
-                    for (retry=0; retry<3; retry++) {
-                        NET_GetSockOpt(fd, SOL_SOCKET, SO_ERROR,
-                                       (char*)&connect_res, &optlen);
-                        if (connect_res) {
-                            break;
-                        }
-                        Sleep(0);
-                    }
-
-                    if (connect_res == 0) {
-                        JNU_ThrowByName(env, JNU_JAVANETPKG "SocketException",
-                                        "Unable to establish connection");
-                        return;
-                    }
-                }
-            }
-        }
-
-        /* make socket blocking again */
-        optval = 0;
-        ioctlsocket(fd, FIONBIO, &optval);
-    }
-
-    if (connect_res) {
-        if (connect_res == WSAEADDRNOTAVAIL) {
+    rv = connect(fd, &sa.sa, sa_len);
+    if (rv == SOCKET_ERROR) {
+        int err = WSAGetLastError();
+        if (err == WSAEWOULDBLOCK) {
+            return java_net_TwoStacksPlainSocketImpl_WOULDBLOCK;
+        } else if (err == WSAEADDRNOTAVAIL) {
             JNU_ThrowByName(env, JNU_JAVANETPKG "ConnectException",
                 "connect: Address is invalid on local machine, or port is not valid on remote machine");
         } else {
-            NET_ThrowNew(env, connect_res, "connect");
+            NET_ThrowNew(env, err, "connect");
         }
-        return;
+        return -1;  // return value not important.
     }
+    return rv;
+}
 
-    (*env)->SetIntField(env, fdObj, IO_fd_fdID, (int)fd);
+/*
+ * Class:     java_net_TwoStacksPlainSocketImpl
+ * Method:    waitForConnect
+ * Signature: (II)V
+ */
+JNIEXPORT void JNICALL Java_java_net_TwoStacksPlainSocketImpl_waitForConnect
+  (JNIEnv *env, jclass clazz, jint fd, jint timeout) {
+    int rv, retry;
+    int optlen = sizeof(rv);
+    fd_set wr, ex;
+    struct timeval t;
 
-    /* set the remote peer address and port */
-    (*env)->SetObjectField(env, this, psi_addressID, iaObj);
-    (*env)->SetIntField(env, this, psi_portID, port);
+    FD_ZERO(&wr);
+    FD_ZERO(&ex);
+    FD_SET(fd, &wr);
+    FD_SET(fd, &ex);
+    t.tv_sec = timeout / 1000;
+    t.tv_usec = (timeout % 1000) * 1000;
+
+    /*
+     * Wait for timeout, connection established or
+     * connection failed.
+     */
+    rv = select(fd+1, 0, &wr, &ex, &t);
 
     /*
-     * we need to initialize the local port field if bind was called
-     * previously to the connect (by the client) then localport field
-     * will already be initialized
+     * Timeout before connection is established/failed so
+     * we throw exception and shutdown input/output to prevent
+     * socket from being used.
+     * The socket should be closed immediately by the caller.
+     */
+    if (rv == 0) {
+        JNU_ThrowByName(env, JNU_JAVANETPKG "SocketTimeoutException",
+                        "connect timed out");
+        shutdown( fd, SD_BOTH );
+        return;
+    }
+    /*
+     * Socket is writable or error occurred. On some Windows editions
+     * the socket will appear writable when the connect fails so we
+     * check for error rather than writable.
      */
-    if (localport == 0) {
-        /* Now that we're a connected socket, let's extract the port number
-         * that the system chose for us and store it in the Socket object.
-         */
-        u_short port;
-        int len = sizeof(SOCKETADDRESS);
-        if (getsockname(fd, &sa.sa, &len) == -1) {
-            if (WSAGetLastError() == WSAENOTSOCK) {
-                JNU_ThrowByName(env, JNU_JAVANETPKG "SocketException",
-                                "Socket closed");
-            } else {
-                NET_ThrowCurrent(env, "getsockname failed");
-            }
-            return;
+    if (!FD_ISSET(fd, &ex)) {
+        return;         /* connection established */
+    }
+
+    /*
+     * Connection failed. The logic here is designed to work around
+     * bug on Windows NT whereby using getsockopt to obtain the
+     * last error (SO_ERROR) indicates there is no error. The workaround
+     * on NT is to allow winsock to be scheduled and this is done by
+     * yielding and retrying. As yielding is problematic in heavy
+     * load conditions we attempt up to 3 times to get the error reason.
+     */
+    for (retry=0; retry<3; retry++) {
+        NET_GetSockOpt(fd, SOL_SOCKET, SO_ERROR,
+                       (char*)&rv, &optlen);
+        if (rv) {
+            break;
         }
-        port = ntohs((u_short)GET_PORT(&sa));
-        (*env)->SetIntField(env, this, psi_localportID, (int) port);
+        Sleep(0);
+    }
+
+    if (rv == 0) {
+        JNU_ThrowByName(env, JNU_JAVANETPKG "SocketException",
+                        "Unable to establish connection");
+    } else if (rv == WSAEADDRNOTAVAIL) {
+        JNU_ThrowByName(env, JNU_JAVANETPKG "ConnectException",
+                        "connect: Address is invalid on local machine,"
+                        " or port is not valid on remote machine");
+    } else {
+        NET_ThrowNew(env, rv, "connect");
     }
 }
 
 /*
  * Class:     java_net_TwoStacksPlainSocketImpl
- * Method:    socketBind
- * Signature: (Ljava/net/InetAddress;I)V
+ * Method:    localPort0
+ * Signature: (I)I
  */
-JNIEXPORT void JNICALL
-Java_java_net_TwoStacksPlainSocketImpl_socketBind(JNIEnv *env, jobject this,
-                                         jobject iaObj, jint localport,
-                                         jboolean exclBind) {
-
-    /* fdObj is the FileDescriptor field on this */
-    jobject fdObj;
-    /* fd is an int field on fdObj */
-    int fd, len = 0;
+JNIEXPORT jint JNICALL Java_java_net_TwoStacksPlainSocketImpl_localPort0
+  (JNIEnv *env, jclass clazz, jint fd) {
+    SOCKETADDRESS sa;
+    int len = sizeof(sa);
 
-    /* family is an int field of iaObj */
-    int family;
-    int rv;
-
-    SOCKETADDRESS sa;
+    if (getsockname(fd, &sa.sa, &len) == SOCKET_ERROR) {
+        if (WSAGetLastError() == WSAENOTSOCK) {
+            JNU_ThrowByName(env, JNU_JAVANETPKG "SocketException",
+                    "Socket closed");
+        } else {
+            NET_ThrowNew(env, WSAGetLastError(), "getsockname failed");
+        }
+        return -1;
+    }
+    return (int) ntohs((u_short)GET_PORT(&sa));
+}
 
-    fdObj = (*env)->GetObjectField(env, this, psi_fdID);
-
-    family = getInetAddress_family(env, iaObj);
+/*
+ * Class:     java_net_TwoStacksPlainSocketImpl
+ * Method:    localAddress
+ * Signature: (ILjava/net/InetAddressContainer;)V
+ */
+JNIEXPORT void JNICALL Java_java_net_TwoStacksPlainSocketImpl_localAddress
+  (JNIEnv *env, jclass clazz, jint fd, jobject iaContainerObj) {
+    int port;
+    SOCKETADDRESS sa;
+    int len = sizeof(sa);
+    jobject iaObj;
+    jclass iaContainerClass;
+    jfieldID iaFieldID;
 
-    if (family != java_net_InetAddress_IPv4) {
-        JNU_ThrowByName(env, JNU_JAVANETPKG "SocketException",
-                        "Protocol family not supported");
+    if (getsockname(fd, &sa.sa, &len) == SOCKET_ERROR) {
+        NET_ThrowNew(env, WSAGetLastError(), "Error getting socket name");
         return;
     }
+    iaObj = NET_SockaddrToInetAddress(env, &sa, &port);
+    CHECK_NULL(iaObj);
 
-    if (IS_NULL(fdObj)) {
-        JNU_ThrowByName(env, JNU_JAVANETPKG "SocketException",
-                        "Socket closed");
-        return;
-    } else {
-        fd = (*env)->GetIntField(env, fdObj, IO_fd_fdID);
-    }
-    if (IS_NULL(iaObj)) {
-        JNU_ThrowNullPointerException(env, "inet address argument");
-        return;
-    }
+    iaContainerClass = (*env)->GetObjectClass(env, iaContainerObj);
+    iaFieldID = (*env)->GetFieldID(env, iaContainerClass, "addr", "Ljava/net/InetAddress;");
+    CHECK_NULL(iaFieldID);
+    (*env)->SetObjectField(env, iaContainerObj, iaFieldID, iaObj);
+}
 
-    if (NET_InetAddressToSockaddr(env, iaObj, localport, &sa, &len,
-                                  JNI_FALSE) != 0) {
-        return;
-    }
-    rv = NET_WinBind(fd, &sa, len, exclBind);
 
-    if (rv == -1) {
-        NET_ThrowCurrent(env, "NET_Bind");
-        return;
-    }
-
-    /* set the address */
-    (*env)->SetObjectField(env, this, psi_addressID, iaObj);
-
-    /* intialize the local port */
-    if (localport == 0) {
-        /* Now that we're a bound socket, let's extract the port number
-         * that the system chose for us and store it in the Socket object.
-         */
-        int len = sizeof(SOCKETADDRESS);
-        u_short port;
-
-        if (getsockname(fd, &sa.sa, &len) == -1) {
-            NET_ThrowCurrent(env, "getsockname in plain socketBind");
-            return;
-        }
-        port = ntohs((u_short) GET_PORT (&sa));
-
-        (*env)->SetIntField(env, this, psi_localportID, (int)port);
-    } else {
-        (*env)->SetIntField(env, this, psi_localportID, localport);
+/*
+ * Class:     java_net_TwoStacksPlainSocketImpl
+ * Method:    listen0
+ * Signature: (II)V
+ */
+JNIEXPORT void JNICALL Java_java_net_TwoStacksPlainSocketImpl_listen0
+  (JNIEnv *env, jclass clazz, jint fd, jint backlog) {
+    if (listen(fd, backlog) == SOCKET_ERROR) {
+        NET_ThrowNew(env, WSAGetLastError(), "listen failed");
     }
 }
 
 /*
  * Class:     java_net_TwoStacksPlainSocketImpl
- * Method:    socketListen
- * Signature: (I)V
+ * Method:    accept0
+ * Signature: (I[Ljava/net/InetSocketAddress;)I
  */
-JNIEXPORT void JNICALL
-Java_java_net_TwoStacksPlainSocketImpl_socketListen
-  (JNIEnv *env, jobject this, jint count)
-{
-    /* this FileDescriptor fd field */
-    jobject fdObj = (*env)->GetObjectField(env, this, psi_fdID);
-    jobject address;
-    /* fdObj's int fd field */
-    int fd = INVALID_SOCKET;
-    SOCKETADDRESS addr;
-    int addrlen;
-
-    if (IS_NULL(fdObj)) {
-        JNU_ThrowByName(env, JNU_JAVANETPKG "SocketException",
-                        "socket closed");
-        return;
-    }
-
-    if (!IS_NULL(fdObj)) {
-        fd = (*env)->GetIntField(env, fdObj, IO_fd_fdID);
-    }
-    address = (*env)->GetObjectField(env, this, psi_addressID);
-    if (IS_NULL(address)) {
-        JNU_ThrowNullPointerException(env, "socket address");
-        return;
-    }
-    if (NET_InetAddressToSockaddr(env, address, 0, &addr, &addrlen,
-                                  JNI_FALSE) != 0) {
-        return;
-    }
-
-    if (addr.sa.sa_family == AF_INET) {
-        /* listen on v4 */
-        if (listen(fd, count) == -1) {
-            NET_ThrowCurrent(env, "listen failed");
-        }
-    } else {
-        NET_SocketClose(fd);
-        (*env)->SetObjectField(env, this, psi_fdID, NULL);
-    }
-}
-
-/*
- * Class:     java_net_TwoStacksPlainSocketImpl
- * Method:    socketAccept
- * Signature: (Ljava/net/SocketImpl;)V
- */
-JNIEXPORT void JNICALL
-Java_java_net_TwoStacksPlainSocketImpl_socketAccept(JNIEnv *env, jobject this,
-                                           jobject socket)
-{
-    /* fields on this */
-    jint port;
-    jint timeout = (*env)->GetIntField(env, this, psi_timeoutID);
-    jobject fdObj = (*env)->GetObjectField(env, this, psi_fdID);
+JNIEXPORT jint JNICALL Java_java_net_TwoStacksPlainSocketImpl_accept0
+  (JNIEnv *env, jclass clazz, jint fd, jobjectArray isaa) {
+    int newfd, port=0;
+    jobject isa;
+    jobject ia;
+    SOCKETADDRESS sa;
+    int len = sizeof(sa);
 
-    /* the FileDescriptor field on socket */
-    jobject socketFdObj;
-
-    /* cache the Inet4 class */
-    static jclass inet4Cls;
-
-    /* the InetAddress field on socket */
-    jobject socketAddressObj;
-
-    /* the fd int field on fdObj */
-    jint fd=-1;
-
-    SOCKETADDRESS sa;
-    jint len;
-    int ret;
-
-    if (IS_NULL(fdObj)) {
-        JNU_ThrowByName(env, JNU_JAVANETPKG "SocketException",
-                        "Socket closed");
-        return;
-    }
-
-    fd = (*env)->GetIntField(env, fdObj, IO_fd_fdID);
+    memset((char *)&sa, 0, len);
+    newfd = accept(fd, &sa.sa, &len);
 
-    if (IS_NULL(socket)) {
-        JNU_ThrowNullPointerException(env, "socket is null");
-        return;
-    } else {
-        socketFdObj = (*env)->GetObjectField(env, socket, psi_fdID);
-        socketAddressObj = (*env)->GetObjectField(env, socket, psi_addressID);
-    }
-    if ((IS_NULL(socketAddressObj)) || (IS_NULL(socketFdObj))) {
-        JNU_ThrowNullPointerException(env, "socket address or fd obj");
-        return;
-    }
-
-    len = sizeof(struct sockaddr_in);
-    if (timeout) {
-        ret = NET_Timeout(fd, timeout);
-        if (ret == 0) {
-            JNU_ThrowByName(env, JNU_JAVANETPKG "SocketTimeoutException",
-                            "Accept timed out");
-            return;
-        } else if (ret == -1) {
-            JNU_ThrowByName(env, JNU_JAVANETPKG "SocketException", "socket closed");
-        /* REMIND: SOCKET CLOSED PROBLEM */
-/*        NET_ThrowCurrent(env, "Accept failed"); */
-            return;
-        } else if (ret == -2) {
-            JNU_ThrowByName(env, JNU_JAVAIOPKG "InterruptedIOException",
-                            "operation interrupted");
-            return;
-        }
-    }
-
-    fd = accept(fd, &sa.sa, &len);
-    if (fd < 0) {
-        /* REMIND: SOCKET CLOSED PROBLEM */
-        if (fd == -2) {
+    if (newfd < 0) {
+        if (newfd == -2) {
             JNU_ThrowByName(env, JNU_JAVAIOPKG "InterruptedIOException",
                             "operation interrupted");
         } else {
             JNU_ThrowByName(env, JNU_JAVANETPKG "SocketException",
                             "socket closed");
         }
-        return;
+        return -1;
     }
-    SetHandleInformation((HANDLE)(UINT_PTR)fd, HANDLE_FLAG_INHERIT, 0);
-    (*env)->SetIntField(env, socketFdObj, IO_fd_fdID, fd);
+
+    SetHandleInformation((HANDLE)(UINT_PTR)newfd, HANDLE_FLAG_INHERIT, 0);
 
     if (sa.sa.sa_family != AF_INET) {
         JNU_ThrowByName(env, JNU_JAVANETPKG "SocketException",
                         "Protocol family not supported");
-        return;
-    }
-
-    if (inet4Cls == NULL) {
-        jclass c = (*env)->FindClass(env, "java/net/Inet4Address");
-        if (c != NULL) {
-            inet4Cls = (*env)->NewGlobalRef(env, c);
-            (*env)->DeleteLocalRef(env, c);
-        }
+        NET_SocketClose(newfd);
+        return -1;
     }
 
-    /*
-     * fill up the remote peer port and address in the new socket structure
-     */
-    if (inet4Cls != NULL) {
-        socketAddressObj = (*env)->NewObject(env, inet4Cls, ia4_ctrID);
-    } else {
-        socketAddressObj = NULL;
-    }
-    if (socketAddressObj == NULL) {
-        /*
-         * FindClass or NewObject failed so close connection and
-         * exit (there will be a pending exception).
-         */
-        NET_SocketClose(fd);
-        return;
-    }
+    ia = NET_SockaddrToInetAddress(env, &sa, &port);
+    isa = (*env)->NewObject(env, isa_class, isa_ctorID, ia, port);
+    (*env)->SetObjectArrayElement(env, isaa, 0, isa);
 
-    setInetAddress_addr(env, socketAddressObj, ntohl(sa.sa4.sin_addr.s_addr));
-    setInetAddress_family(env, socketAddressObj, java_net_InetAddress_IPv4);
-    (*env)->SetObjectField(env, socket, psi_addressID, socketAddressObj);
-    port = ntohs ((u_short)GET_PORT(&sa));
-    (*env)->SetIntField(env, socket, psi_portID, (int)port);
-    port = (*env)->GetIntField(env, this, psi_localportID);
-    (*env)->SetIntField(env, socket, psi_localportID, port);
-    (*env)->SetObjectField(env, socket, psi_addressID, socketAddressObj);
+    return newfd;
 }
 
 /*
  * Class:     java_net_TwoStacksPlainSocketImpl
- * Method:    socketAvailable
- * Signature: ()I
+ * Method:    waitForNewConnection
+ * Signature: (II)V
  */
-JNIEXPORT jint JNICALL
-Java_java_net_TwoStacksPlainSocketImpl_socketAvailable(JNIEnv *env, jobject this) {
-
-    jint available = -1;
-    jint res;
-    jobject fdObj = (*env)->GetObjectField(env, this, psi_fdID);
-    jint fd;
+JNIEXPORT void JNICALL Java_java_net_TwoStacksPlainSocketImpl_waitForNewConnection
+  (JNIEnv *env, jclass clazz, jint fd, jint timeout) {
+    int rv;
 
-    if (IS_NULL(fdObj)) {
-        JNU_ThrowByName(env, JNU_JAVANETPKG "SocketException", "Socket closed");
-        return -1;
-    } else {
-        fd = (*env)->GetIntField(env, fdObj, IO_fd_fdID);
+    rv = NET_Timeout(fd, timeout);
+    if (rv == 0) {
+        JNU_ThrowByName(env, JNU_JAVANETPKG "SocketTimeoutException",
+                        "Accept timed out");
+    } else if (rv == -1) {
+        JNU_ThrowByName(env, JNU_JAVANETPKG "SocketException", "socket closed");
+    } else if (rv == -2) {
+        JNU_ThrowByName(env, JNU_JAVAIOPKG "InterruptedIOException",
+                        "operation interrupted");
     }
-    res = ioctlsocket(fd, FIONREAD, &available);
-    /* if result isn't 0, it means an error */
-    if (res != 0) {
-        NET_ThrowNew(env, res, "socket available");
+}
+
+/*
+ * Class:     java_net_TwoStacksPlainSocketImpl
+ * Method:    available0
+ * Signature: (I)I
+ */
+JNIEXPORT jint JNICALL Java_java_net_TwoStacksPlainSocketImpl_available0
+  (JNIEnv *env, jclass clazz, jint fd) {
+    jint available = -1;
+
+    if ((ioctlsocket(fd, FIONREAD, &available)) == SOCKET_ERROR) {
+        NET_ThrowNew(env, WSAGetLastError(), "socket available");
     }
+
     return available;
 }
 
 /*
  * Class:     java_net_TwoStacksPlainSocketImpl
- * Method:    socketClose
- * Signature: ()V
+ * Method:    close0
+ * Signature: (I)V
+ */
+JNIEXPORT void JNICALL Java_java_net_TwoStacksPlainSocketImpl_close0
+  (JNIEnv *env, jclass clazz, jint fd) {
+     NET_SocketClose(fd);
+}
+
+/*
+ * Class:     java_net_TwoStacksPlainSocketImpl
+ * Method:    shutdown0
+ * Signature: (II)V
+ */
+JNIEXPORT void JNICALL Java_java_net_TwoStacksPlainSocketImpl_shutdown0
+  (JNIEnv *env, jclass clazz, jint fd, jint howto) {
+    shutdown(fd, howto);
+}
+
+
+/*
+ * Class:     java_net_TwoStacksPlainSocketImpl
+ * Method:    setIntOption
+ * Signature: (III)V
  */
 JNIEXPORT void JNICALL
-Java_java_net_TwoStacksPlainSocketImpl_socketClose0(JNIEnv *env, jobject this,
-                                           jboolean useDeferredClose) {
+Java_java_net_TwoStacksPlainSocketImpl_setIntOption
+  (JNIEnv *env, jclass clazz, jint fd, jint cmd, jint value)
+{
+    int level = 0, opt = 0;
+    struct linger linger = {0, 0};
+    char *parg;
+    int arglen;
 
-    jobject fdObj = (*env)->GetObjectField(env, this, psi_fdID);
-    jint fd=-1;
-
-    if (IS_NULL(fdObj)) {
-        JNU_ThrowByName(env, JNU_JAVANETPKG "SocketException",
-                        "socket already closed");
+    if (NET_MapSocketOption(cmd, &level, &opt) < 0) {
+        JNU_ThrowByName(env, "java/net/SocketException", "Invalid option");
         return;
     }
-    if (!IS_NULL(fdObj)) {
-        fd = (*env)->GetIntField(env, fdObj, IO_fd_fdID);
+
+    if (opt == java_net_SocketOptions_SO_LINGER) {
+        parg = (char *)&linger;
+        arglen = sizeof(linger);
+        if (value >= 0) {
+            linger.l_onoff = 1;
+            linger.l_linger = (unsigned short)value;
+        } else {
+            linger.l_onoff = 0;
+            linger.l_linger = 0;
+        }
+    } else {
+        parg = (char *)&value;
+        arglen = sizeof(value);
     }
-    if (fd != -1) {
-        (*env)->SetIntField(env, fdObj, IO_fd_fdID, -1);
-        NET_SocketClose(fd);
+
+    if (NET_SetSockOpt(fd, level, opt, parg, arglen) < 0) {
+        NET_ThrowNew(env, WSAGetLastError(), "setsockopt");
     }
 }
 
 /*
- * Socket options for plainsocketImpl
- *
- *
  * Class:     java_net_TwoStacksPlainSocketImpl
- * Method:    socketNativeSetOption
- * Signature: (IZLjava/lang/Object;)V
+ * Method:    setSoTimeout0
+ * Signature: (II)V
  */
 JNIEXPORT void JNICALL
-Java_java_net_TwoStacksPlainSocketImpl_socketNativeSetOption
-  (JNIEnv *env, jobject this, jint cmd, jboolean on, jobject value)
+Java_java_net_TwoStacksPlainSocketImpl_setSoTimeout0
+  (JNIEnv *env, jclass clazz, jint fd, jint timeout)
 {
-    int fd;
-    int level = 0, optname = 0, optlen = 0;
-    union {
-        int i;
-        struct linger ling;
-    } optval;
-
-    memset((char *)&optval, 0, sizeof(optval));
-    /*
-     * Get SOCKET and check that it hasn't been closed
-     */
-    fd = getFD(env, this);
-    if (fd < 0) {
-        JNU_ThrowByName(env, JNU_JAVANETPKG "SocketException", "Socket closed");
-        return;
-    }
-
     /*
      * SO_TIMEOUT is the socket option used to specify the timeout
      * for ServerSocket.accept and Socket.getInputStream().read.
@@ -648,283 +445,106 @@
      * receive timeout is applicable to Socket only and the socket
      * option should not be set on ServerSocket.
      */
-    if (cmd == java_net_SocketOptions_SO_TIMEOUT) {
 
+    /*
+     * SO_RCVTIMEO is only supported on Microsoft's implementation
+     * of Windows Sockets so if WSAENOPROTOOPT returned then
+     * reset flag and timeout will be implemented using
+     * select() -- see SocketInputStream.socketRead.
+     */
+    if (isRcvTimeoutSupported) {
         /*
-         * Don't enable the socket option on ServerSocket as it's
-         * meaningless (we don't receive on a ServerSocket).
+         * Disable SO_RCVTIMEO if timeout is <= 5 second.
          */
-        jobject ssObj = (*env)->GetObjectField(env, this, psi_serverSocketID);
-        if (ssObj != NULL) {
-            return;
+        if (timeout <= 5000) {
+            timeout = 0;
         }
 
-        /*
-         * SO_RCVTIMEO is only supported on Microsoft's implementation
-         * of Windows Sockets so if WSAENOPROTOOPT returned then
-         * reset flag and timeout will be implemented using
-         * select() -- see SocketInputStream.socketRead.
-         */
-        if (isRcvTimeoutSupported) {
-            jclass iCls = (*env)->FindClass(env, "java/lang/Integer");
-            jfieldID i_valueID;
-            jint timeout;
-
-            CHECK_NULL(iCls);
-            i_valueID = (*env)->GetFieldID(env, iCls, "value", "I");
-            CHECK_NULL(i_valueID);
-            timeout = (*env)->GetIntField(env, value, i_valueID);
-
-            /*
-             * Disable SO_RCVTIMEO if timeout is <= 5 second.
-             */
-            if (timeout <= 5000) {
-                timeout = 0;
-            }
-
-            if (setsockopt(fd, SOL_SOCKET, SO_RCVTIMEO, (char *)&timeout,
-                sizeof(timeout)) < 0) {
-                if (WSAGetLastError() == WSAENOPROTOOPT) {
-                    isRcvTimeoutSupported = JNI_FALSE;
-                } else {
-                    NET_ThrowCurrent(env, "setsockopt SO_RCVTIMEO");
-                    return;
-                }
+        if (setsockopt(fd, SOL_SOCKET, SO_RCVTIMEO, (char *)&timeout,
+            sizeof(timeout)) < 0) {
+            int err = WSAGetLastError();
+            if (err == WSAENOPROTOOPT) {
+                isRcvTimeoutSupported = JNI_FALSE;
+            } else {
+                NET_ThrowNew(env, err, "setsockopt SO_RCVTIMEO");
             }
         }
-        return;
     }
+}
 
-    /*
-     * Map the Java level socket option to the platform specific
-     * level and option name.
-     */
-    if (NET_MapSocketOption(cmd, &level, &optname)) {
+/*
+ * Class:     java_net_TwoStacksPlainSocketImpl
+ * Method:    getIntOption
+ * Signature: (II)I
+ */
+JNIEXPORT jint JNICALL Java_java_net_TwoStacksPlainSocketImpl_getIntOption
+  (JNIEnv *env, jclass clazz, jint fd, jint cmd)
+{
+    int level = 0, opt = 0;
+    int result=0;
+    struct linger linger = {0, 0};
+    char *arg;
+    int arglen;
+
+    if (NET_MapSocketOption(cmd, &level, &opt) < 0) {
         JNU_ThrowByName(env, "java/net/SocketException", "Invalid option");
-        return;
+        return -1;
     }
 
-    switch (cmd) {
-
-        case java_net_SocketOptions_TCP_NODELAY :
-        case java_net_SocketOptions_SO_OOBINLINE :
-        case java_net_SocketOptions_SO_KEEPALIVE :
-        case java_net_SocketOptions_SO_REUSEADDR :
-            optval.i = (on ? 1 : 0);
-            optlen = sizeof(optval.i);
-            break;
-
-        case java_net_SocketOptions_SO_SNDBUF :
-        case java_net_SocketOptions_SO_RCVBUF :
-        case java_net_SocketOptions_IP_TOS :
-            {
-                jclass cls;
-                jfieldID fid;
-
-                cls = (*env)->FindClass(env, "java/lang/Integer");
-                CHECK_NULL(cls);
-                fid = (*env)->GetFieldID(env, cls, "value", "I");
-                CHECK_NULL(fid);
-
-                optval.i = (*env)->GetIntField(env, value, fid);
-                optlen = sizeof(optval.i);
-            }
-            break;
-
-        case java_net_SocketOptions_SO_LINGER :
-            {
-                jclass cls;
-                jfieldID fid;
-
-                cls = (*env)->FindClass(env, "java/lang/Integer");
-                CHECK_NULL(cls);
-                fid = (*env)->GetFieldID(env, cls, "value", "I");
-                CHECK_NULL(fid);
-
-                if (on) {
-                    optval.ling.l_onoff = 1;
-                    optval.ling.l_linger =
-                        (unsigned short)(*env)->GetIntField(env, value, fid);
-                } else {
-                    optval.ling.l_onoff = 0;
-                    optval.ling.l_linger = 0;
-                }
-                optlen = sizeof(optval.ling);
-            }
-            break;
-
-        default: /* shouldn't get here */
-            JNU_ThrowByName(env, JNU_JAVANETPKG "SocketException",
-                "Option not supported by TwoStacksPlainSocketImpl");
-            return;
+    if (opt == java_net_SocketOptions_SO_LINGER) {
+        arg = (char *)&linger;
+        arglen = sizeof(linger);
+    } else {
+        arg = (char *)&result;
+        arglen = sizeof(result);
     }
 
-    if (fd != -1) {
-        if (NET_SetSockOpt(fd, level, optname, (void *)&optval, optlen) < 0) {
-            NET_ThrowCurrent(env, "setsockopt");
-        }
+    if (NET_GetSockOpt(fd, level, opt, arg, &arglen) < 0) {
+        NET_ThrowNew(env, WSAGetLastError(), "getsockopt");
+        return -1;
     }
+
+    if (opt == java_net_SocketOptions_SO_LINGER)
+        return linger.l_onoff ? linger.l_linger : -1;
+    else
+        return result;
 }
 
 
 /*
  * Class:     java_net_TwoStacksPlainSocketImpl
- * Method:    socketGetOption
- * Signature: (I)I
+ * Method:    sendOOB
+ * Signature: (II)V
  */
-JNIEXPORT jint JNICALL
-Java_java_net_TwoStacksPlainSocketImpl_socketGetOption
-  (JNIEnv *env, jobject this, jint opt, jobject iaContainerObj)
-{
-    int fd;
-    int level = 0, optname = 0, optlen = 0;
-    union {
-        int i;
-        struct linger ling;
-    } optval;
-
-    /*
-     * Get SOCKET and check it hasn't been closed
-     */
-    fd = getFD(env, this);
-    memset((char *)&optval, 0, sizeof(optval));
-
-    if (fd < 0) {
-        JNU_ThrowByName(env, JNU_JAVANETPKG "SocketException", "Socket closed");
-        return -1;
-    }
-
-    /*
-     * SO_BINDADDR isn't a socket option
-     */
-    if (opt == java_net_SocketOptions_SO_BINDADDR) {
-        SOCKETADDRESS sa;
-        int len = sizeof(SOCKETADDRESS);
-        int port;
-        jobject iaObj;
-        jclass iaCntrClass;
-        jfieldID iaFieldID;
-
-        memset((char *)&sa, 0, len);
-
-        if (getsockname(fd, &sa.sa, &len) < 0) {
-            JNU_ThrowByNameWithMessageAndLastError
-                (env, JNU_JAVANETPKG "SocketException", "Error getting socket name");
-            return -1;
-        }
-        iaObj = NET_SockaddrToInetAddress(env, &sa, &port);
-        CHECK_NULL_RETURN(iaObj, -1);
+JNIEXPORT void JNICALL Java_java_net_TwoStacksPlainSocketImpl_sendOOB
+  (JNIEnv *env, jclass clazz, jint fd, jint data) {
+    jint n;
+    unsigned char d = (unsigned char) data & 0xff;
 
-        iaCntrClass = (*env)->GetObjectClass(env, iaContainerObj);
-        iaFieldID = (*env)->GetFieldID(env, iaCntrClass, "addr", "Ljava/net/InetAddress;");
-        CHECK_NULL_RETURN(iaFieldID, -1);
-        (*env)->SetObjectField(env, iaContainerObj, iaFieldID, iaObj);
-        return 0; /* notice change from before */
-    }
-
-    /*
-     * Map the Java level socket option to the platform specific
-     * level and option name.
-     */
-    if (NET_MapSocketOption(opt, &level, &optname)) {
-        JNU_ThrowByName(env, "java/net/SocketException", "Invalid option");
-        return -1;
-    }
-
-    /*
-     * Args are int except for SO_LINGER
-     */
-    if (opt == java_net_SocketOptions_SO_LINGER) {
-        optlen = sizeof(optval.ling);
-    } else {
-        optlen = sizeof(optval.i);
-        optval.i = 0;
-    }
-
-    if (NET_GetSockOpt(fd, level, optname, (void *)&optval, &optlen) < 0) {
-        NET_ThrowCurrent(env, "getsockopt");
-        return -1;
-    }
-
-    switch (opt) {
-        case java_net_SocketOptions_SO_LINGER:
-            return (optval.ling.l_onoff ? optval.ling.l_linger: -1);
-
-        case java_net_SocketOptions_SO_SNDBUF:
-        case java_net_SocketOptions_SO_RCVBUF:
-        case java_net_SocketOptions_IP_TOS:
-            return optval.i;
-
-        case java_net_SocketOptions_TCP_NODELAY :
-        case java_net_SocketOptions_SO_OOBINLINE :
-        case java_net_SocketOptions_SO_KEEPALIVE :
-        case java_net_SocketOptions_SO_REUSEADDR :
-            return (optval.i == 0) ? -1 : 1;
-
-        default: /* shouldn't get here */
-            JNU_ThrowByName(env, JNU_JAVANETPKG "SocketException",
-                "Option not supported by TwoStacksPlainSocketImpl");
-            return -1;
+    n = send(fd, (char *)&data, 1, MSG_OOB);
+    if (n == SOCKET_ERROR) {
+        NET_ThrowNew(env, WSAGetLastError(), "send");
     }
 }
 
 /*
  * Class:     java_net_TwoStacksPlainSocketImpl
- * Method:    socketShutdown
- * Signature: (I)V
+ * Method:    configureBlocking
+ * Signature: (IZ)V
  */
-JNIEXPORT void JNICALL
-Java_java_net_TwoStacksPlainSocketImpl_socketShutdown(JNIEnv *env, jobject this,
-                                             jint howto)
-{
-
-    jobject fdObj = (*env)->GetObjectField(env, this, psi_fdID);
-    jint fd;
-
-    /*
-     * WARNING: THIS NEEDS LOCKING. ALSO: SHOULD WE CHECK for fd being
-     * -1 already?
-     */
-    if (IS_NULL(fdObj)) {
-        JNU_ThrowByName(env, JNU_JAVANETPKG "SocketException",
-                        "socket already closed");
-        return;
-    } else {
-        fd = (*env)->GetIntField(env, fdObj, IO_fd_fdID);
-    }
-    shutdown(fd, howto);
-}
+JNIEXPORT void JNICALL Java_java_net_TwoStacksPlainSocketImpl_configureBlocking
+  (JNIEnv *env, jclass clazz, jint fd, jboolean blocking) {
+    u_long arg;
+    int result;
 
-/*
- * Class:     java_net_TwoStacksPlainSocketImpl
- * Method:    socketSendUrgentData
- * Signature: (B)V
- */
-JNIEXPORT void JNICALL
-Java_java_net_TwoStacksPlainSocketImpl_socketSendUrgentData(JNIEnv *env, jobject this,
-                                             jint data) {
-    /* The fd field */
-    jobject fdObj = (*env)->GetObjectField(env, this, psi_fdID);
-    int n, fd;
-    unsigned char d = data & 0xff;
+    if (blocking == JNI_TRUE) {
+        arg = SET_BLOCKING;    // 0
+    } else {
+        arg = SET_NONBLOCKING;   // 1
+    }
 
-    if (IS_NULL(fdObj)) {
-        JNU_ThrowByName(env, "java/net/SocketException", "Socket closed");
-        return;
-    } else {
-        fd = (*env)->GetIntField(env, fdObj, IO_fd_fdID);
-        /* Bug 4086704 - If the Socket associated with this file descriptor
-         * was closed (sysCloseFD), the file descriptor is set to -1.
-         */
-        if (fd == -1) {
-            JNU_ThrowByName(env, "java/net/SocketException", "Socket closed");
-            return;
-        }
-
-    }
-    n = send(fd, (char *)&data, 1, MSG_OOB);
-    if (n == -1) {
-        NET_ThrowCurrent(env, "send");
-        return;
+    result = ioctlsocket(fd, FIONBIO, &arg);
+    if (result == SOCKET_ERROR) {
+        NET_ThrowNew(env, WSAGetLastError(), "configureBlocking");
     }
 }
--- a/src/java.base/windows/native/libnet/net_util_md.c	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.base/windows/native/libnet/net_util_md.c	Fri Apr 06 03:53:28 2018 +0200
@@ -967,7 +967,7 @@
  * It returns the time left from the timeout, or -1 if it expired.
  */
 
-jint
+JNIEXPORT jint JNICALL
 NET_Wait(JNIEnv *env, jint fd, jint flags, jint timeout)
 {
     jlong prevTime = JVM_CurrentTimeMillis(env, 0);
--- a/src/java.desktop/macosx/native/libsplashscreen/splashscreen_config.h	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.desktop/macosx/native/libsplashscreen/splashscreen_config.h	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -56,6 +56,4 @@
 
 #define INLINE static
 
-#define SPLASHEXPORT
-
 #endif
--- a/src/java.desktop/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageWriter.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.desktop/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageWriter.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -303,6 +303,14 @@
                                          ImageWriteParam param,
                                          IIOMetadata streamMetadata,
                                          IIOMetadata imageMetadata) {
+        // Check whether sufficient data is available.
+        if (imageType == null && imageMetadata == null) {
+            // The method has been invoked with insufficient data. Henceforth
+            // we return -1 as recommended by ImageWriter specification.
+            return -1;
+        }
+
+        // Check if the image type and metadata are JFIF compatible.
         if (jfifOK(imageType, param, streamMetadata, imageMetadata)) {
             return Integer.MAX_VALUE;
         }
--- a/src/java.desktop/share/classes/javax/swing/JList.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.desktop/share/classes/javax/swing/JList.java	Fri Apr 06 03:53:28 2018 +0200
@@ -2180,24 +2180,7 @@
      */
     @Transient
     public int[] getSelectedIndices() {
-        ListSelectionModel sm = getSelectionModel();
-        int iMin = sm.getMinSelectionIndex();
-        int iMax = sm.getMaxSelectionIndex();
-
-        if ((iMin < 0) || (iMax < 0)) {
-            return new int[0];
-        }
-
-        int[] rvTmp = new int[1+ (iMax - iMin)];
-        int n = 0;
-        for(int i = iMin; i <= iMax; i++) {
-            if (sm.isSelectedIndex(i)) {
-                rvTmp[n++] = i;
-            }
-        }
-        int[] rv = new int[n];
-        System.arraycopy(rvTmp, 0, rv, 0, n);
-        return rv;
+        return getSelectionModel().getSelectedIndices();
     }
 
 
@@ -2301,25 +2284,23 @@
      */
     @BeanProperty(bound = false)
     public List<E> getSelectedValuesList() {
-        ListSelectionModel sm = getSelectionModel();
         ListModel<E> dm = getModel();
-
-        int iMin = sm.getMinSelectionIndex();
-        int iMax = sm.getMaxSelectionIndex();
-        int size = dm.getSize();
-
-        if ((iMin < 0) || (iMax < 0) || (iMin >= size)) {
-            return Collections.emptyList();
-        }
-        iMax = iMax < size ? iMax : size - 1;
-
-        List<E> selectedItems = new ArrayList<E>();
-        for(int i = iMin; i <= iMax; i++) {
-            if (sm.isSelectedIndex(i)) {
+        int[] selectedIndices = getSelectedIndices();
+
+        if (selectedIndices.length > 0) {
+            int size = dm.getSize();
+            if (selectedIndices[0] >= size) {
+                return Collections.emptyList();
+            }
+            List<E> selectedItems = new ArrayList<E>();
+            for (int i : selectedIndices) {
+                if (i >= size)
+                    break;
                 selectedItems.add(dm.getElementAt(i));
             }
+            return selectedItems;
         }
-        return selectedItems;
+        return Collections.emptyList();
     }
 
 
--- a/src/java.desktop/share/classes/javax/swing/JTable.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.desktop/share/classes/javax/swing/JTable.java	Fri Apr 06 03:53:28 2018 +0200
@@ -2268,23 +2268,7 @@
      */
     @BeanProperty(bound = false)
     public int[] getSelectedRows() {
-        int iMin = selectionModel.getMinSelectionIndex();
-        int iMax = selectionModel.getMaxSelectionIndex();
-
-        if ((iMin == -1) || (iMax == -1)) {
-            return new int[0];
-        }
-
-        int[] rvTmp = new int[1+ (iMax - iMin)];
-        int n = 0;
-        for(int i = iMin; i <= iMax; i++) {
-            if (selectionModel.isSelectedIndex(i)) {
-                rvTmp[n++] = i;
-            }
-        }
-        int[] rv = new int[n];
-        System.arraycopy(rvTmp, 0, rv, 0, n);
-        return rv;
+        return selectionModel.getSelectedIndices();
     }
 
     /**
@@ -2306,16 +2290,7 @@
      */
     @BeanProperty(bound = false)
     public int getSelectedRowCount() {
-        int iMin = selectionModel.getMinSelectionIndex();
-        int iMax = selectionModel.getMaxSelectionIndex();
-        int count = 0;
-
-        for(int i = iMin; i <= iMax; i++) {
-            if (selectionModel.isSelectedIndex(i)) {
-                count++;
-            }
-        }
-        return count;
+        return selectionModel.getSelectedItemsCount();
     }
 
     /**
--- a/src/java.desktop/share/classes/javax/swing/ListSelectionModel.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.desktop/share/classes/javax/swing/ListSelectionModel.java	Fri Apr 06 03:53:28 2018 +0200
@@ -332,4 +332,61 @@
      * @see #addListSelectionListener
      */
     void removeListSelectionListener(ListSelectionListener x);
+
+    /**
+     * Returns an array of all of the selected indices in the selection model,
+     * in increasing order.
+     *
+     * @return all of the selected indices, in increasing order,
+     *         or an empty array if nothing is selected
+     * @see #removeSelectionInterval
+     * @see #addListSelectionListener
+     * @since 11
+     * @implSpec The default implementation iterates from minimum selected
+     * index {@link #getMinSelectionIndex()} to maximum selected index {@link
+     * #getMaxSelectionIndex()} and returns the selected indices {@link
+     * #isSelectedIndex(int)} in a newly allocated int array.
+     */
+    default int[] getSelectedIndices() {
+        int iMin = getMinSelectionIndex();
+        int iMax = getMaxSelectionIndex();
+
+        if ((iMin < 0) || (iMax < 0)) {
+            return new int[0];
+        }
+
+        int[] rvTmp = new int[1+ (iMax - iMin)];
+        int n = 0;
+        for(int i = iMin; i <= iMax; i++) {
+            if (isSelectedIndex(i)) {
+                rvTmp[n++] = i;
+            }
+        }
+        int[] rv = new int[n];
+        System.arraycopy(rvTmp, 0, rv, 0, n);
+        return rv;
+    }
+
+    /**
+     * Returns the number of selected items.
+     *
+     * @return the number of selected items, 0 if no items are selected
+     * @since 11
+     * @implSpec The default implementation iterates from minimum selected
+     * index {@link #getMinSelectionIndex()} to maximum selected index {@link
+     * #getMaxSelectionIndex()} and returns the number of selected indices
+     * {@link #isSelectedIndex(int)}
+     */
+    default int getSelectedItemsCount() {
+        int iMin = getMinSelectionIndex();
+        int iMax = getMaxSelectionIndex();
+        int count = 0;
+
+        for(int i = iMin; i <= iMax; i++) {
+            if (isSelectedIndex(i)) {
+                count++;
+            }
+        }
+        return count;
+    }
 }
--- a/src/java.desktop/share/classes/javax/swing/table/DefaultTableColumnModel.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.desktop/share/classes/javax/swing/table/DefaultTableColumnModel.java	Fri Apr 06 03:53:28 2018 +0200
@@ -427,23 +427,7 @@
      */
     public int[] getSelectedColumns() {
         if (selectionModel != null) {
-            int iMin = selectionModel.getMinSelectionIndex();
-            int iMax = selectionModel.getMaxSelectionIndex();
-
-            if ((iMin == -1) || (iMax == -1)) {
-                return new int[0];
-            }
-
-            int[] rvTmp = new int[1+ (iMax - iMin)];
-            int n = 0;
-            for(int i = iMin; i <= iMax; i++) {
-                if (selectionModel.isSelectedIndex(i)) {
-                    rvTmp[n++] = i;
-                }
-            }
-            int[] rv = new int[n];
-            System.arraycopy(rvTmp, 0, rv, 0, n);
-            return rv;
+            return selectionModel.getSelectedIndices();
         }
         return  new int[0];
     }
@@ -455,16 +439,7 @@
      */
     public int getSelectedColumnCount() {
         if (selectionModel != null) {
-            int iMin = selectionModel.getMinSelectionIndex();
-            int iMax = selectionModel.getMaxSelectionIndex();
-            int count = 0;
-
-            for(int i = iMin; i <= iMax; i++) {
-                if (selectionModel.isSelectedIndex(i)) {
-                    count++;
-                }
-            }
-            return count;
+            return selectionModel.getSelectedItemsCount();
         }
         return 0;
     }
--- a/src/java.desktop/share/classes/sun/applet/AppletSecurity.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.desktop/share/classes/sun/applet/AppletSecurity.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1995, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -371,30 +371,6 @@
     }
 
     /**
-     * Tests if a client can get access to the AWT event queue.
-     * <p>
-     * This method calls {@code checkPermission} with the
-     * {@code AWTPermission("accessEventQueue")} permission.
-     *
-     * @since   1.1
-     * @exception  SecurityException  if the caller does not have
-     *             permission to access the AWT event queue.
-     */
-    @SuppressWarnings({"deprecation",
-                       "removal"}) //  SecurityManager.checkAwtEventQueueAccess
-    public void checkAwtEventQueueAccess() {
-        AppContext appContext = AppContext.getAppContext();
-        AppletClassLoader appletClassLoader = currentAppletClassLoader();
-
-        if (AppContext.isMainContext(appContext) && (appletClassLoader != null)) {
-            // If we're about to allow access to the main EventQueue,
-            // and anything untrusted is on the class context stack,
-            // disallow access.
-            super.checkPermission(AWTPermissions.CHECK_AWT_EVENTQUEUE_PERMISSION);
-        }
-    } // checkAwtEventQueueAccess()
-
-    /**
      * Returns the thread group of the applet. We consult the classloader
      * if there is one.
      */
--- a/src/java.desktop/share/classes/sun/applet/resources/MsgAppletViewer.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.desktop/share/classes/sun/applet/resources/MsgAppletViewer.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -188,10 +188,7 @@
             {"appletsecurityexception.checkpackageaccess", "Security Exception: cannot access package: {0}"},
             {"appletsecurityexception.checkpackagedefinition", "Security Exception: cannot define package: {0}"},
             {"appletsecurityexception.cannotsetfactory", "Security Exception: cannot set factory"},
-            {"appletsecurityexception.checkmemberaccess", "Security Exception: check member access"},
             {"appletsecurityexception.checkgetprintjob", "Security Exception: getPrintJob"},
-            {"appletsecurityexception.checksystemclipboardaccess", "Security Exception: getSystemClipboard"},
-            {"appletsecurityexception.checkawteventqueueaccess", "Security Exception: getEventQueue"},
             {"appletsecurityexception.checksecurityaccess", "Security Exception: security operation: {0}"},
             {"appletsecurityexception.getsecuritycontext.unknown", "unknown class loader type. unable to check for getContext"},
             {"appletsecurityexception.checkread.unknown", "unknown class loader type. unable to check for checking read {0}"},
--- a/src/java.desktop/share/classes/sun/java2d/marlin/ByteArrayCache.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.desktop/share/classes/sun/java2d/marlin/ByteArrayCache.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -99,7 +99,7 @@
         Reference(final ByteArrayCache cache, final int initialSize) {
             this.cache = cache;
             this.clean = cache.clean;
-            this.initial = createArray(initialSize, clean);
+            this.initial = createArray(initialSize);
             if (DO_STATS) {
                 cache.stats.totalInitial += initialSize;
             }
@@ -116,7 +116,7 @@
                 logInfo(getLogPrefix(clean) + "ByteArrayCache: "
                         + "getArray[oversize]: length=\t" + length);
             }
-            return createArray(length, clean);
+            return createArray(length);
         }
 
         byte[] widenArray(final byte[] array, final int usedSize,
@@ -202,7 +202,7 @@
             if (DO_STATS) {
                 stats.createOp++;
             }
-            return createArray(arraySize, clean);
+            return createArray(arraySize);
         }
 
         void putArray(final byte[] array)
@@ -229,12 +229,8 @@
         }
     }
 
-    static byte[] createArray(final int length, final boolean clean) {
-        if (clean) {
-            return new byte[length];
-        }
-        // use JDK9 Unsafe.allocateUninitializedArray(class, length):
-        return (byte[]) OffHeapArray.UNSAFE.allocateUninitializedArray(byte.class, length);
+    static byte[] createArray(final int length) {
+        return new byte[length];
     }
 
     static void fill(final byte[] array, final int fromIndex,
--- a/src/java.desktop/share/classes/sun/java2d/marlin/Curve.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.desktop/share/classes/sun/java2d/marlin/Curve.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -33,86 +33,94 @@
     Curve() {
     }
 
-    void set(float[] points, int type) {
-        switch(type) {
-        case 8:
+    void set(final float[] points, final int type) {
+        // if instead of switch (perf + most probable cases first)
+        if (type == 8) {
             set(points[0], points[1],
                 points[2], points[3],
                 points[4], points[5],
                 points[6], points[7]);
-            return;
-        case 6:
+        } else if (type == 4) {
+            set(points[0], points[1],
+                points[2], points[3]);
+        } else {
             set(points[0], points[1],
                 points[2], points[3],
                 points[4], points[5]);
-            return;
-        default:
-            throw new InternalError("Curves can only be cubic or quadratic");
         }
     }
 
-    void set(float x1, float y1,
-             float x2, float y2,
-             float x3, float y3,
-             float x4, float y4)
+    void set(final float x1, final float y1,
+             final float x2, final float y2,
+             final float x3, final float y3,
+             final float x4, final float y4)
     {
         final float dx32 = 3.0f * (x3 - x2);
         final float dy32 = 3.0f * (y3 - y2);
         final float dx21 = 3.0f * (x2 - x1);
         final float dy21 = 3.0f * (y2 - y1);
-        ax = (x4 - x1) - dx32;
+        ax = (x4 - x1) - dx32;  // A = P3 - P0 - 3 (P2 - P1) = (P3 - P0) + 3 (P1 - P2)
         ay = (y4 - y1) - dy32;
-        bx = (dx32 - dx21);
+        bx = (dx32 - dx21);     // B = 3 (P2 - P1) - 3(P1 - P0) = 3 (P2 + P0) - 6 P1
         by = (dy32 - dy21);
-        cx = dx21;
+        cx = dx21;              // C = 3 (P1 - P0)
         cy = dy21;
-        dx = x1;
+        dx = x1;                // D = P0
         dy = y1;
-        dax = 3.0f * ax; day = 3.0f * ay;
-        dbx = 2.0f * bx; dby = 2.0f * by;
+        dax = 3.0f * ax;
+        day = 3.0f * ay;
+        dbx = 2.0f * bx;
+        dby = 2.0f * by;
     }
 
-    void set(float x1, float y1,
-             float x2, float y2,
-             float x3, float y3)
+    void set(final float x1, final float y1,
+             final float x2, final float y2,
+             final float x3, final float y3)
     {
         final float dx21 = (x2 - x1);
         final float dy21 = (y2 - y1);
-        ax = 0.0f; ay = 0.0f;
-        bx = (x3 - x2) - dx21;
+        ax = 0.0f;              // A = 0
+        ay = 0.0f;
+        bx = (x3 - x2) - dx21;  // B = P3 - P0 - 2 P2
         by = (y3 - y2) - dy21;
-        cx = 2.0f * dx21;
+        cx = 2.0f * dx21;       // C = 2 (P2 - P1)
         cy = 2.0f * dy21;
-        dx = x1;
+        dx = x1;                // D = P1
         dy = y1;
-        dax = 0.0f; day = 0.0f;
-        dbx = 2.0f * bx; dby = 2.0f * by;
+        dax = 0.0f;
+        day = 0.0f;
+        dbx = 2.0f * bx;
+        dby = 2.0f * by;
     }
 
-    float xat(float t) {
-        return t * (t * (t * ax + bx) + cx) + dx;
-    }
-    float yat(float t) {
-        return t * (t * (t * ay + by) + cy) + dy;
+    void set(final float x1, final float y1,
+             final float x2, final float y2)
+    {
+        final float dx21 = (x2 - x1);
+        final float dy21 = (y2 - y1);
+        ax = 0.0f;              // A = 0
+        ay = 0.0f;
+        bx = 0.0f;              // B = 0
+        by = 0.0f;
+        cx = dx21;              // C = (P2 - P1)
+        cy = dy21;
+        dx = x1;                // D = P1
+        dy = y1;
+        dax = 0.0f;
+        day = 0.0f;
+        dbx = 0.0f;
+        dby = 0.0f;
     }
 
-    float dxat(float t) {
-        return t * (t * dax + dbx) + cx;
-    }
-
-    float dyat(float t) {
-        return t * (t * day + dby) + cy;
-    }
-
-    int dxRoots(float[] roots, int off) {
+    int dxRoots(final float[] roots, final int off) {
         return Helpers.quadraticRoots(dax, dbx, cx, roots, off);
     }
 
-    int dyRoots(float[] roots, int off) {
+    int dyRoots(final float[] roots, final int off) {
         return Helpers.quadraticRoots(day, dby, cy, roots, off);
     }
 
-    int infPoints(float[] pts, int off) {
+    int infPoints(final float[] pts, final int off) {
         // inflection point at t if -f'(t)x*f''(t)y + f'(t)y*f''(t)x == 0
         // Fortunately, this turns out to be quadratic, so there are at
         // most 2 inflection points.
@@ -123,19 +131,30 @@
         return Helpers.quadraticRoots(a, b, c, pts, off);
     }
 
+    int xPoints(final float[] ts, final int off, final float x)
+    {
+        return Helpers.cubicRootsInAB(ax, bx, cx, dx - x, ts, off, 0.0f, 1.0f);
+    }
+
+    int yPoints(final float[] ts, final int off, final float y)
+    {
+        return Helpers.cubicRootsInAB(ay, by, cy, dy - y, ts, off, 0.0f, 1.0f);
+    }
+
     // finds points where the first and second derivative are
     // perpendicular. This happens when g(t) = f'(t)*f''(t) == 0 (where
     // * is a dot product). Unfortunately, we have to solve a cubic.
-    private int perpendiculardfddf(float[] pts, int off) {
+    private int perpendiculardfddf(final float[] pts, final int off) {
         assert pts.length >= off + 4;
 
         // these are the coefficients of some multiple of g(t) (not g(t),
         // because the roots of a polynomial are not changed after multiplication
         // by a constant, and this way we save a few multiplications).
-        final float a = 2.0f * (dax*dax + day*day);
-        final float b = 3.0f * (dax*dbx + day*dby);
-        final float c = 2.0f * (dax*cx + day*cy) + dbx*dbx + dby*dby;
-        final float d = dbx*cx + dby*cy;
+        final float a = 2.0f * (dax * dax + day * day);
+        final float b = 3.0f * (dax * dbx + day * dby);
+        final float c = 2.0f * (dax * cx  + day * cy) + dbx * dbx + dby * dby;
+        final float d = dbx * cx + dby * cy;
+
         return Helpers.cubicRootsInAB(a, b, c, d, pts, off, 0.0f, 1.0f);
     }
 
@@ -152,22 +171,24 @@
     // at most 4 sub-intervals of (0,1). ROC has asymptotes at inflection
     // points, so roc-w can have at least 6 roots. This shouldn't be a
     // problem for what we're trying to do (draw a nice looking curve).
-    int rootsOfROCMinusW(float[] roots, int off, final float w, final float err) {
+    int rootsOfROCMinusW(final float[] roots, final int off, final float w2, final float err) {
         // no OOB exception, because by now off<=6, and roots.length >= 10
         assert off <= 6 && roots.length >= 10;
+
         int ret = off;
-        int numPerpdfddf = perpendiculardfddf(roots, off);
-        float t0 = 0.0f, ft0 = ROCsq(t0) - w*w;
-        roots[off + numPerpdfddf] = 1.0f; // always check interval end points
-        numPerpdfddf++;
-        for (int i = off; i < off + numPerpdfddf; i++) {
-            float t1 = roots[i], ft1 = ROCsq(t1) - w*w;
+        final int end = off + perpendiculardfddf(roots, off);
+        roots[end] = 1.0f; // always check interval end points
+
+        float t0 = 0.0f, ft0 = ROCsq(t0) - w2;
+
+        for (int i = off; i <= end; i++) {
+            float t1 = roots[i], ft1 = ROCsq(t1) - w2;
             if (ft0 == 0.0f) {
                 roots[ret++] = t0;
             } else if (ft1 * ft0 < 0.0f) { // have opposite signs
                 // (ROC(t)^2 == w^2) == (ROC(t) == w) is true because
                 // ROC(t) >= 0 for all t.
-                roots[ret++] = falsePositionROCsqMinusX(t0, t1, w*w, err);
+                roots[ret++] = falsePositionROCsqMinusX(t0, t1, w2, err);
             }
             t0 = t1;
             ft0 = ft1;
@@ -176,9 +197,9 @@
         return ret - off;
     }
 
-    private static float eliminateInf(float x) {
+    private static float eliminateInf(final float x) {
         return (x == Float.POSITIVE_INFINITY ? Float.MAX_VALUE :
-            (x == Float.NEGATIVE_INFINITY ? Float.MIN_VALUE : x));
+               (x == Float.NEGATIVE_INFINITY ? Float.MIN_VALUE : x));
     }
 
     // A slight modification of the false position algorithm on wikipedia.
@@ -188,17 +209,18 @@
     // expressions make it into the language), depending on how closures
     // and turn out. Same goes for the newton's method
     // algorithm in Helpers.java
-    private float falsePositionROCsqMinusX(float x0, float x1,
-                                           final float x, final float err)
+    private float falsePositionROCsqMinusX(final float t0, final float t1,
+                                           final float w2, final float err)
     {
         final int iterLimit = 100;
         int side = 0;
-        float t = x1, ft = eliminateInf(ROCsq(t) - x);
-        float s = x0, fs = eliminateInf(ROCsq(s) - x);
+        float t = t1, ft = eliminateInf(ROCsq(t) - w2);
+        float s = t0, fs = eliminateInf(ROCsq(s) - w2);
         float r = s, fr;
+
         for (int i = 0; i < iterLimit && Math.abs(t - s) > err * Math.abs(t + s); i++) {
             r = (fs * t - ft * s) / (fs - ft);
-            fr = ROCsq(r) - x;
+            fr = ROCsq(r) - w2;
             if (sameSign(fr, ft)) {
                 ft = fr; t = r;
                 if (side < 0) {
@@ -207,7 +229,7 @@
                 } else {
                     side = -1;
                 }
-            } else if (fr * fs > 0) {
+            } else if (fr * fs > 0.0f) {
                 fs = fr; s = r;
                 if (side > 0) {
                     ft /= (1 << side);
@@ -222,7 +244,7 @@
         return r;
     }
 
-    private static boolean sameSign(float x, float y) {
+    private static boolean sameSign(final float x, final float y) {
         // another way is to test if x*y > 0. This is bad for small x, y.
         return (x < 0.0f && y < 0.0f) || (x > 0.0f && y > 0.0f);
     }
@@ -230,14 +252,13 @@
     // returns the radius of curvature squared at t of this curve
     // see http://en.wikipedia.org/wiki/Radius_of_curvature_(applications)
     private float ROCsq(final float t) {
-        // dx=xat(t) and dy=yat(t). These calls have been inlined for efficiency
         final float dx = t * (t * dax + dbx) + cx;
         final float dy = t * (t * day + dby) + cy;
         final float ddx = 2.0f * dax * t + dbx;
         final float ddy = 2.0f * day * t + dby;
-        final float dx2dy2 = dx*dx + dy*dy;
-        final float ddx2ddy2 = ddx*ddx + ddy*ddy;
-        final float ddxdxddydy = ddx*dx + ddy*dy;
-        return dx2dy2*((dx2dy2*dx2dy2) / (dx2dy2 * ddx2ddy2 - ddxdxddydy*ddxdxddydy));
+        final float dx2dy2 = dx * dx + dy * dy;
+        final float ddx2ddy2 = ddx * ddx + ddy * ddy;
+        final float ddxdxddydy = ddx * dx + ddy * dy;
+        return dx2dy2 * ((dx2dy2 * dx2dy2) / (dx2dy2 * ddx2ddy2 - ddxdxddydy * ddxdxddydy));
     }
 }
--- a/src/java.desktop/share/classes/sun/java2d/marlin/DCurve.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.desktop/share/classes/sun/java2d/marlin/DCurve.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -33,86 +33,94 @@
     DCurve() {
     }
 
-    void set(double[] points, int type) {
-        switch(type) {
-        case 8:
+    void set(final double[] points, final int type) {
+        // if instead of switch (perf + most probable cases first)
+        if (type == 8) {
             set(points[0], points[1],
                 points[2], points[3],
                 points[4], points[5],
                 points[6], points[7]);
-            return;
-        case 6:
+        } else if (type == 4) {
+            set(points[0], points[1],
+                points[2], points[3]);
+        } else {
             set(points[0], points[1],
                 points[2], points[3],
                 points[4], points[5]);
-            return;
-        default:
-            throw new InternalError("Curves can only be cubic or quadratic");
         }
     }
 
-    void set(double x1, double y1,
-             double x2, double y2,
-             double x3, double y3,
-             double x4, double y4)
+    void set(final double x1, final double y1,
+             final double x2, final double y2,
+             final double x3, final double y3,
+             final double x4, final double y4)
     {
         final double dx32 = 3.0d * (x3 - x2);
         final double dy32 = 3.0d * (y3 - y2);
         final double dx21 = 3.0d * (x2 - x1);
         final double dy21 = 3.0d * (y2 - y1);
-        ax = (x4 - x1) - dx32;
+        ax = (x4 - x1) - dx32;  // A = P3 - P0 - 3 (P2 - P1) = (P3 - P0) + 3 (P1 - P2)
         ay = (y4 - y1) - dy32;
-        bx = (dx32 - dx21);
+        bx = (dx32 - dx21);     // B = 3 (P2 - P1) - 3(P1 - P0) = 3 (P2 + P0) - 6 P1
         by = (dy32 - dy21);
-        cx = dx21;
+        cx = dx21;              // C = 3 (P1 - P0)
         cy = dy21;
-        dx = x1;
+        dx = x1;                // D = P0
         dy = y1;
-        dax = 3.0d * ax; day = 3.0d * ay;
-        dbx = 2.0d * bx; dby = 2.0d * by;
+        dax = 3.0d * ax;
+        day = 3.0d * ay;
+        dbx = 2.0d * bx;
+        dby = 2.0d * by;
     }
 
-    void set(double x1, double y1,
-             double x2, double y2,
-             double x3, double y3)
+    void set(final double x1, final double y1,
+             final double x2, final double y2,
+             final double x3, final double y3)
     {
         final double dx21 = (x2 - x1);
         final double dy21 = (y2 - y1);
-        ax = 0.0d; ay = 0.0d;
-        bx = (x3 - x2) - dx21;
+        ax = 0.0d;              // A = 0
+        ay = 0.0d;
+        bx = (x3 - x2) - dx21;  // B = P3 - P0 - 2 P2
         by = (y3 - y2) - dy21;
-        cx = 2.0d * dx21;
+        cx = 2.0d * dx21;       // C = 2 (P2 - P1)
         cy = 2.0d * dy21;
-        dx = x1;
+        dx = x1;                // D = P1
         dy = y1;
-        dax = 0.0d; day = 0.0d;
-        dbx = 2.0d * bx; dby = 2.0d * by;
+        dax = 0.0d;
+        day = 0.0d;
+        dbx = 2.0d * bx;
+        dby = 2.0d * by;
     }
 
-    double xat(double t) {
-        return t * (t * (t * ax + bx) + cx) + dx;
-    }
-    double yat(double t) {
-        return t * (t * (t * ay + by) + cy) + dy;
+    void set(final double x1, final double y1,
+             final double x2, final double y2)
+    {
+        final double dx21 = (x2 - x1);
+        final double dy21 = (y2 - y1);
+        ax = 0.0d;              // A = 0
+        ay = 0.0d;
+        bx = 0.0d;              // B = 0
+        by = 0.0d;
+        cx = dx21;              // C = (P2 - P1)
+        cy = dy21;
+        dx = x1;                // D = P1
+        dy = y1;
+        dax = 0.0d;
+        day = 0.0d;
+        dbx = 0.0d;
+        dby = 0.0d;
     }
 
-    double dxat(double t) {
-        return t * (t * dax + dbx) + cx;
-    }
-
-    double dyat(double t) {
-        return t * (t * day + dby) + cy;
-    }
-
-    int dxRoots(double[] roots, int off) {
+    int dxRoots(final double[] roots, final int off) {
         return DHelpers.quadraticRoots(dax, dbx, cx, roots, off);
     }
 
-    int dyRoots(double[] roots, int off) {
+    int dyRoots(final double[] roots, final int off) {
         return DHelpers.quadraticRoots(day, dby, cy, roots, off);
     }
 
-    int infPoints(double[] pts, int off) {
+    int infPoints(final double[] pts, final int off) {
         // inflection point at t if -f'(t)x*f''(t)y + f'(t)y*f''(t)x == 0
         // Fortunately, this turns out to be quadratic, so there are at
         // most 2 inflection points.
@@ -123,19 +131,30 @@
         return DHelpers.quadraticRoots(a, b, c, pts, off);
     }
 
+    int xPoints(final double[] ts, final int off, final double x)
+    {
+        return DHelpers.cubicRootsInAB(ax, bx, cx, dx - x, ts, off, 0.0d, 1.0d);
+    }
+
+    int yPoints(final double[] ts, final int off, final double y)
+    {
+        return DHelpers.cubicRootsInAB(ay, by, cy, dy - y, ts, off, 0.0d, 1.0d);
+    }
+
     // finds points where the first and second derivative are
     // perpendicular. This happens when g(t) = f'(t)*f''(t) == 0 (where
     // * is a dot product). Unfortunately, we have to solve a cubic.
-    private int perpendiculardfddf(double[] pts, int off) {
+    private int perpendiculardfddf(final double[] pts, final int off) {
         assert pts.length >= off + 4;
 
         // these are the coefficients of some multiple of g(t) (not g(t),
         // because the roots of a polynomial are not changed after multiplication
         // by a constant, and this way we save a few multiplications).
-        final double a = 2.0d * (dax*dax + day*day);
-        final double b = 3.0d * (dax*dbx + day*dby);
-        final double c = 2.0d * (dax*cx + day*cy) + dbx*dbx + dby*dby;
-        final double d = dbx*cx + dby*cy;
+        final double a = 2.0d * (dax * dax + day * day);
+        final double b = 3.0d * (dax * dbx + day * dby);
+        final double c = 2.0d * (dax * cx + day * cy) + dbx * dbx + dby * dby;
+        final double d = dbx * cx + dby * cy;
+
         return DHelpers.cubicRootsInAB(a, b, c, d, pts, off, 0.0d, 1.0d);
     }
 
@@ -152,22 +171,24 @@
     // at most 4 sub-intervals of (0,1). ROC has asymptotes at inflection
     // points, so roc-w can have at least 6 roots. This shouldn't be a
     // problem for what we're trying to do (draw a nice looking curve).
-    int rootsOfROCMinusW(double[] roots, int off, final double w, final double err) {
+    int rootsOfROCMinusW(final double[] roots, final int off, final double w2, final double err) {
         // no OOB exception, because by now off<=6, and roots.length >= 10
         assert off <= 6 && roots.length >= 10;
+
         int ret = off;
-        int numPerpdfddf = perpendiculardfddf(roots, off);
-        double t0 = 0.0d, ft0 = ROCsq(t0) - w*w;
-        roots[off + numPerpdfddf] = 1.0d; // always check interval end points
-        numPerpdfddf++;
-        for (int i = off; i < off + numPerpdfddf; i++) {
-            double t1 = roots[i], ft1 = ROCsq(t1) - w*w;
+        final int end = off + perpendiculardfddf(roots, off);
+        roots[end] = 1.0d; // always check interval end points
+
+        double t0 = 0.0d, ft0 = ROCsq(t0) - w2;
+
+        for (int i = off; i <= end; i++) {
+            double t1 = roots[i], ft1 = ROCsq(t1) - w2;
             if (ft0 == 0.0d) {
                 roots[ret++] = t0;
             } else if (ft1 * ft0 < 0.0d) { // have opposite signs
                 // (ROC(t)^2 == w^2) == (ROC(t) == w) is true because
                 // ROC(t) >= 0 for all t.
-                roots[ret++] = falsePositionROCsqMinusX(t0, t1, w*w, err);
+                roots[ret++] = falsePositionROCsqMinusX(t0, t1, w2, err);
             }
             t0 = t1;
             ft0 = ft1;
@@ -176,9 +197,9 @@
         return ret - off;
     }
 
-    private static double eliminateInf(double x) {
+    private static double eliminateInf(final double x) {
         return (x == Double.POSITIVE_INFINITY ? Double.MAX_VALUE :
-            (x == Double.NEGATIVE_INFINITY ? Double.MIN_VALUE : x));
+               (x == Double.NEGATIVE_INFINITY ? Double.MIN_VALUE : x));
     }
 
     // A slight modification of the false position algorithm on wikipedia.
@@ -188,17 +209,18 @@
     // expressions make it into the language), depending on how closures
     // and turn out. Same goes for the newton's method
     // algorithm in DHelpers.java
-    private double falsePositionROCsqMinusX(double x0, double x1,
-                                           final double x, final double err)
+    private double falsePositionROCsqMinusX(final double t0, final double t1,
+                                            final double w2, final double err)
     {
         final int iterLimit = 100;
         int side = 0;
-        double t = x1, ft = eliminateInf(ROCsq(t) - x);
-        double s = x0, fs = eliminateInf(ROCsq(s) - x);
+        double t = t1, ft = eliminateInf(ROCsq(t) - w2);
+        double s = t0, fs = eliminateInf(ROCsq(s) - w2);
         double r = s, fr;
+
         for (int i = 0; i < iterLimit && Math.abs(t - s) > err * Math.abs(t + s); i++) {
             r = (fs * t - ft * s) / (fs - ft);
-            fr = ROCsq(r) - x;
+            fr = ROCsq(r) - w2;
             if (sameSign(fr, ft)) {
                 ft = fr; t = r;
                 if (side < 0) {
@@ -207,7 +229,7 @@
                 } else {
                     side = -1;
                 }
-            } else if (fr * fs > 0) {
+            } else if (fr * fs > 0.0d) {
                 fs = fr; s = r;
                 if (side > 0) {
                     ft /= (1 << side);
@@ -222,7 +244,7 @@
         return r;
     }
 
-    private static boolean sameSign(double x, double y) {
+    private static boolean sameSign(final double x, final double y) {
         // another way is to test if x*y > 0. This is bad for small x, y.
         return (x < 0.0d && y < 0.0d) || (x > 0.0d && y > 0.0d);
     }
@@ -230,14 +252,13 @@
     // returns the radius of curvature squared at t of this curve
     // see http://en.wikipedia.org/wiki/Radius_of_curvature_(applications)
     private double ROCsq(final double t) {
-        // dx=xat(t) and dy=yat(t). These calls have been inlined for efficiency
         final double dx = t * (t * dax + dbx) + cx;
         final double dy = t * (t * day + dby) + cy;
         final double ddx = 2.0d * dax * t + dbx;
         final double ddy = 2.0d * day * t + dby;
-        final double dx2dy2 = dx*dx + dy*dy;
-        final double ddx2ddy2 = ddx*ddx + ddy*ddy;
-        final double ddxdxddydy = ddx*dx + ddy*dy;
-        return dx2dy2*((dx2dy2*dx2dy2) / (dx2dy2 * ddx2ddy2 - ddxdxddydy*ddxdxddydy));
+        final double dx2dy2 = dx * dx + dy * dy;
+        final double ddx2ddy2 = ddx * ddx + ddy * ddy;
+        final double ddxdxddydy = ddx * dx + ddy * dy;
+        return dx2dy2 * ((dx2dy2 * dx2dy2) / (dx2dy2 * ddx2ddy2 - ddxdxddydy * ddxdxddydy));
     }
 }
--- a/src/java.desktop/share/classes/sun/java2d/marlin/DDasher.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.desktop/share/classes/sun/java2d/marlin/DDasher.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,8 @@
 package sun.java2d.marlin;
 
 import java.util.Arrays;
+import sun.java2d.marlin.DTransformingPathConsumer2D.CurveBasicMonotonizer;
+import sun.java2d.marlin.DTransformingPathConsumer2D.CurveClipSplitter;
 
 /**
  * The <code>DDasher</code> class takes a series of linear commands
@@ -40,8 +42,9 @@
  */
 final class DDasher implements DPathConsumer2D, MarlinConst {
 
-    static final int REC_LIMIT = 4;
-    static final double ERR = 0.01d;
+    /* huge circle with radius ~ 2E9 only needs 12 subdivision levels */
+    static final int REC_LIMIT = 16;
+    static final double CURVE_LEN_ERR = MarlinProperties.getCurveLengthError(); // 0.01 initial
     static final double MIN_T_INC = 1.0d / (1 << REC_LIMIT);
 
     // More than 24 bits of mantissa means we can no longer accurately
@@ -63,8 +66,10 @@
     private boolean dashOn;
     private double phase;
 
-    private double sx, sy;
-    private double x0, y0;
+    // The starting point of the path
+    private double sx0, sy0;
+    // the current point
+    private double cx0, cy0;
 
     // temporary storage for the current curve
     private final double[] curCurvepts;
@@ -75,11 +80,34 @@
     // flag to recycle dash array copy
     boolean recycleDashes;
 
+    // We don't emit the first dash right away. If we did, caps would be
+    // drawn on it, but we need joins to be drawn if there's a closePath()
+    // So, we store the path elements that make up the first dash in the
+    // buffer below.
+    private double[] firstSegmentsBuffer; // dynamic array
+    private int firstSegidx;
+
     // dashes ref (dirty)
     final DoubleArrayCache.Reference dashes_ref;
     // firstSegmentsBuffer ref (dirty)
     final DoubleArrayCache.Reference firstSegmentsBuffer_ref;
 
+    // Bounds of the drawing region, at pixel precision.
+    private double[] clipRect;
+
+    // the outcode of the current point
+    private int cOutCode = 0;
+
+    private boolean subdivide = DO_CLIP_SUBDIVIDER;
+
+    private final LengthIterator li = new LengthIterator();
+
+    private final CurveClipSplitter curveSplitter;
+
+    private double cycleLen;
+    private boolean outside;
+    private double totalSkipLen;
+
     /**
      * Constructs a <code>DDasher</code>.
      * @param rdrCtx per-thread renderer context
@@ -95,6 +123,8 @@
         // we need curCurvepts to be able to contain 2 curves because when
         // dashing curves, we need to subdivide it
         curCurvepts = new double[8 * 2];
+
+        this.curveSplitter = rdrCtx.curveClipSplitter;
     }
 
     /**
@@ -115,10 +145,13 @@
         // Normalize so 0 <= phase < dash[0]
         int sidx = 0;
         dashOn = true;
+
         double sum = 0.0d;
         for (double d : dash) {
             sum += d;
         }
+        this.cycleLen = sum;
+
         double cycles = phase / sum;
         if (phase < 0.0d) {
             if (-cycles >= MAX_CYCLES) {
@@ -167,6 +200,12 @@
 
         this.recycleDashes = recycleDashes;
 
+        if (rdrCtx.doClip) {
+            this.clipRect = rdrCtx.clipRect;
+        } else {
+            this.clipRect = null;
+            this.cOutCode = 0;
+        }
         return this; // fluent API
     }
 
@@ -204,33 +243,42 @@
     @Override
     public void moveTo(final double x0, final double y0) {
         if (firstSegidx != 0) {
-            out.moveTo(sx, sy);
+            out.moveTo(sx0, sy0);
             emitFirstSegments();
         }
-        needsMoveTo = true;
+        this.needsMoveTo = true;
         this.idx = startIdx;
         this.dashOn = this.startDashOn;
         this.phase = this.startPhase;
-        this.sx = x0;
-        this.sy = y0;
-        this.x0 = x0;
-        this.y0 = y0;
+        this.cx0 = x0;
+        this.cy0 = y0;
+
+        // update starting point:
+        this.sx0 = x0;
+        this.sy0 = y0;
         this.starting = true;
+
+        if (clipRect != null) {
+            final int outcode = DHelpers.outcode(x0, y0, clipRect);
+            this.cOutCode = outcode;
+            this.outside = false;
+            this.totalSkipLen = 0.0d;
+        }
     }
 
     private void emitSeg(double[] buf, int off, int type) {
         switch (type) {
         case 8:
-            out.curveTo(buf[off+0], buf[off+1],
-                        buf[off+2], buf[off+3],
-                        buf[off+4], buf[off+5]);
+            out.curveTo(buf[off    ], buf[off + 1],
+                        buf[off + 2], buf[off + 3],
+                        buf[off + 4], buf[off + 5]);
             return;
         case 6:
-            out.quadTo(buf[off+0], buf[off+1],
-                       buf[off+2], buf[off+3]);
+            out.quadTo(buf[off    ], buf[off + 1],
+                       buf[off + 2], buf[off + 3]);
             return;
         case 4:
-            out.lineTo(buf[off], buf[off+1]);
+            out.lineTo(buf[off], buf[off + 1]);
             return;
         default:
         }
@@ -246,12 +294,6 @@
         }
         firstSegidx = 0;
     }
-    // We don't emit the first dash right away. If we did, caps would be
-    // drawn on it, but we need joins to be drawn if there's a closePath()
-    // So, we store the path elements that make up the first dash in the
-    // buffer below.
-    private double[] firstSegmentsBuffer; // dynamic array
-    private int firstSegidx;
 
     // precondition: pts must be in relative coordinates (relative to x0,y0)
     private void goTo(final double[] pts, final int off, final int type,
@@ -267,7 +309,7 @@
             } else {
                 if (needsMoveTo) {
                     needsMoveTo = false;
-                    out.moveTo(x0, y0);
+                    out.moveTo(cx0, cy0);
                 }
                 emitSeg(pts, off, type);
             }
@@ -278,8 +320,8 @@
             }
             needsMoveTo = true;
         }
-        this.x0 = x;
-        this.y0 = y;
+        this.cx0 = x;
+        this.cy0 = y;
     }
 
     private void goTo_starting(final double[] pts, final int off, final int type) {
@@ -305,10 +347,56 @@
 
     @Override
     public void lineTo(final double x1, final double y1) {
-        final double dx = x1 - x0;
-        final double dy = y1 - y0;
+        final int outcode0 = this.cOutCode;
+
+        if (clipRect != null) {
+            final int outcode1 = DHelpers.outcode(x1, y1, clipRect);
+
+            // Should clip
+            final int orCode = (outcode0 | outcode1);
+
+            if (orCode != 0) {
+                final int sideCode = outcode0 & outcode1;
 
-        double len = dx*dx + dy*dy;
+                // basic rejection criteria:
+                if (sideCode == 0) {
+                    // ovelap clip:
+                    if (subdivide) {
+                        // avoid reentrance
+                        subdivide = false;
+                        // subdivide curve => callback with subdivided parts:
+                        boolean ret = curveSplitter.splitLine(cx0, cy0, x1, y1,
+                                                              orCode, this);
+                        // reentrance is done:
+                        subdivide = true;
+                        if (ret) {
+                            return;
+                        }
+                    }
+                    // already subdivided so render it
+                } else {
+                    this.cOutCode = outcode1;
+                    skipLineTo(x1, y1);
+                    return;
+                }
+            }
+
+            this.cOutCode = outcode1;
+
+            if (this.outside) {
+                this.outside = false;
+                // Adjust current index, phase & dash:
+                skipLen();
+            }
+        }
+        _lineTo(x1, y1);
+    }
+
+    private void _lineTo(final double x1, final double y1) {
+        final double dx = x1 - cx0;
+        final double dy = y1 - cy0;
+
+        double len = dx * dx + dy * dy;
         if (len == 0.0d) {
             return;
         }
@@ -327,8 +415,7 @@
         boolean _dashOn = dashOn;
         double _phase = phase;
 
-        double leftInThisDashSegment;
-        double d, dashdx, dashdy, p;
+        double leftInThisDashSegment, d;
 
         while (true) {
             d = _dash[_idx];
@@ -349,24 +436,15 @@
                     _idx = (_idx + 1) % _dashLen;
                     _dashOn = !_dashOn;
                 }
-
-                // Save local state:
-                idx = _idx;
-                dashOn = _dashOn;
-                phase = _phase;
-                return;
+                break;
             }
 
-            dashdx = d * cx;
-            dashdy = d * cy;
-
             if (_phase == 0.0d) {
-                _curCurvepts[0] = x0 + dashdx;
-                _curCurvepts[1] = y0 + dashdy;
+                _curCurvepts[0] = cx0 + d * cx;
+                _curCurvepts[1] = cy0 + d * cy;
             } else {
-                p = leftInThisDashSegment / d;
-                _curCurvepts[0] = x0 + p * dashdx;
-                _curCurvepts[1] = y0 + p * dashdy;
+                _curCurvepts[0] = cx0 + leftInThisDashSegment * cx;
+                _curCurvepts[1] = cy0 + leftInThisDashSegment * cy;
             }
 
             goTo(_curCurvepts, 0, 4, _dashOn);
@@ -377,19 +455,95 @@
             _dashOn = !_dashOn;
             _phase = 0.0d;
         }
+        // Save local state:
+        idx = _idx;
+        dashOn = _dashOn;
+        phase = _phase;
+    }
+
+    private void skipLineTo(final double x1, final double y1) {
+        final double dx = x1 - cx0;
+        final double dy = y1 - cy0;
+
+        double len = dx * dx + dy * dy;
+        if (len != 0.0d) {
+            len = Math.sqrt(len);
+        }
+
+        // Accumulate skipped length:
+        this.outside = true;
+        this.totalSkipLen += len;
+
+        // Fix initial move:
+        this.needsMoveTo = true;
+        this.starting = false;
+
+        this.cx0 = x1;
+        this.cy0 = y1;
     }
 
-    // shared instance in DDasher
-    private final LengthIterator li = new LengthIterator();
+    public void skipLen() {
+        double len = this.totalSkipLen;
+        this.totalSkipLen = 0.0d;
+
+        final double[] _dash = dash;
+        final int _dashLen = this.dashLen;
+
+        int _idx = idx;
+        boolean _dashOn = dashOn;
+        double _phase = phase;
+
+        // -2 to ensure having 2 iterations of the post-loop
+        // to compensate the remaining phase
+        final long fullcycles = (long)Math.floor(len / cycleLen) - 2L;
+
+        if (fullcycles > 0L) {
+            len -= cycleLen * fullcycles;
+
+            final long iterations = fullcycles * _dashLen;
+            _idx = (int) (iterations + _idx) % _dashLen;
+            _dashOn = (iterations + (_dashOn ? 1L : 0L) & 1L) == 1L;
+        }
+
+        double leftInThisDashSegment, d;
+
+        while (true) {
+            d = _dash[_idx];
+            leftInThisDashSegment = d - _phase;
+
+            if (len <= leftInThisDashSegment) {
+                // Advance phase within current dash segment
+                _phase += len;
+
+                // TODO: compare double values using epsilon:
+                if (len == leftInThisDashSegment) {
+                    _phase = 0.0d;
+                    _idx = (_idx + 1) % _dashLen;
+                    _dashOn = !_dashOn;
+                }
+                break;
+            }
+
+            len -= leftInThisDashSegment;
+            // Advance to next dash segment
+            _idx = (_idx + 1) % _dashLen;
+            _dashOn = !_dashOn;
+            _phase = 0.0d;
+        }
+        // Save local state:
+        idx = _idx;
+        dashOn = _dashOn;
+        phase = _phase;
+    }
 
     // preconditions: curCurvepts must be an array of length at least 2 * type,
     // that contains the curve we want to dash in the first type elements
     private void somethingTo(final int type) {
-        if (pointCurve(curCurvepts, type)) {
+        final double[] _curCurvepts = curCurvepts;
+        if (pointCurve(_curCurvepts, type)) {
             return;
         }
         final LengthIterator _li = li;
-        final double[] _curCurvepts = curCurvepts;
         final double[] _dash = dash;
         final int _dashLen = this.dashLen;
 
@@ -401,17 +555,16 @@
 
         // initially the current curve is at curCurvepts[0...type]
         int curCurveoff = 0;
-        double lastSplitT = 0.0d;
+        double prevT = 0.0d;
         double t;
         double leftInThisDashSegment = _dash[_idx] - _phase;
 
         while ((t = _li.next(leftInThisDashSegment)) < 1.0d) {
             if (t != 0.0d) {
-                DHelpers.subdivideAt((t - lastSplitT) / (1.0d - lastSplitT),
+                DHelpers.subdivideAt((t - prevT) / (1.0d - prevT),
                                     _curCurvepts, curCurveoff,
-                                    _curCurvepts, 0,
-                                    _curCurvepts, type, type);
-                lastSplitT = t;
+                                    _curCurvepts, 0, type);
+                prevT = t;
                 goTo(_curCurvepts, 2, type, _dashOn);
                 curCurveoff = type;
             }
@@ -439,7 +592,29 @@
         _li.reset();
     }
 
-    private static boolean pointCurve(double[] curve, int type) {
+    private void skipSomethingTo(final int type) {
+        final double[] _curCurvepts = curCurvepts;
+        if (pointCurve(_curCurvepts, type)) {
+            return;
+        }
+        final LengthIterator _li = li;
+
+        _li.initializeIterationOnCurve(_curCurvepts, type);
+
+        // In contrary to somethingTo(),
+        // just estimate properly the curve length:
+        final double len = _li.totalLength();
+
+        // Accumulate skipped length:
+        this.outside = true;
+        this.totalSkipLen += len;
+
+        // Fix initial move:
+        this.needsMoveTo = true;
+        this.starting = false;
+    }
+
+    private static boolean pointCurve(final double[] curve, final int type) {
         for (int i = 2; i < type; i++) {
             if (curve[i] != curve[i-2]) {
                 return false;
@@ -462,15 +637,14 @@
     // tree; however, the trees we are interested in have the property that
     // every non leaf node has exactly 2 children
     static final class LengthIterator {
-        private enum Side {LEFT, RIGHT}
         // Holds the curves at various levels of the recursion. The root
         // (i.e. the original curve) is at recCurveStack[0] (but then it
         // gets subdivided, the left half is put at 1, so most of the time
         // only the right half of the original curve is at 0)
         private final double[][] recCurveStack; // dirty
-        // sides[i] indicates whether the node at level i+1 in the path from
+        // sidesRight[i] indicates whether the node at level i+1 in the path from
         // the root to the current leaf is a left or right child of its parent.
-        private final Side[] sides; // dirty
+        private final boolean[] sidesRight; // dirty
         private int curveType;
         // lastT and nextT delimit the current leaf.
         private double nextT;
@@ -491,7 +665,7 @@
 
         LengthIterator() {
             this.recCurveStack = new double[REC_LIMIT + 1][8];
-            this.sides = new Side[REC_LIMIT];
+            this.sidesRight = new boolean[REC_LIMIT];
             // if any methods are called without first initializing this object
             // on a curve, we want it to fail ASAP.
             this.nextT = Double.MAX_VALUE;
@@ -513,7 +687,7 @@
                 for (int i = recLimit; i >= 0; i--) {
                     Arrays.fill(recCurveStack[i], 0.0d);
                 }
-                Arrays.fill(sides, Side.LEFT);
+                Arrays.fill(sidesRight, false);
                 Arrays.fill(curLeafCtrlPolyLengths, 0.0d);
                 Arrays.fill(nextRoots, 0.0d);
                 Arrays.fill(flatLeafCoefCache, 0.0d);
@@ -521,7 +695,7 @@
             }
         }
 
-        void initializeIterationOnCurve(double[] pts, int type) {
+        void initializeIterationOnCurve(final double[] pts, final int type) {
             // optimize arraycopy (8 values faster than 6 = type):
             System.arraycopy(pts, 0, recCurveStack[0], 0, 8);
             this.curveType = type;
@@ -533,11 +707,11 @@
             goLeft(); // initializes nextT and lenAtNextT properly
             this.lenAtLastSplit = 0.0d;
             if (recLevel > 0) {
-                this.sides[0] = Side.LEFT;
+                this.sidesRight[0] = false;
                 this.done = false;
             } else {
                 // the root of the tree is a leaf so we're done.
-                this.sides[0] = Side.RIGHT;
+                this.sidesRight[0] = true;
                 this.done = true;
             }
             this.lastSegLen = 0.0d;
@@ -546,7 +720,7 @@
         // 0 == false, 1 == true, -1 == invalid cached value.
         private int cachedHaveLowAcceleration = -1;
 
-        private boolean haveLowAcceleration(double err) {
+        private boolean haveLowAcceleration(final double err) {
             if (cachedHaveLowAcceleration == -1) {
                 final double len1 = curLeafCtrlPolyLengths[0];
                 final double len2 = curLeafCtrlPolyLengths[1];
@@ -613,7 +787,7 @@
 
                 if (_flatLeafCoefCache[2] < 0.0d) {
                     double x =     curLeafCtrlPolyLengths[0],
-                          y = x + curLeafCtrlPolyLengths[1];
+                           y = x + curLeafCtrlPolyLengths[1];
                     if (curveType == 8) {
                         double z = y + curLeafCtrlPolyLengths[2];
                         _flatLeafCoefCache[0] = 3.0d * (x - y) + z;
@@ -635,7 +809,7 @@
                 // we use cubicRootsInAB here, because we want only roots in 0, 1,
                 // and our quadratic root finder doesn't filter, so it's just a
                 // matter of convenience.
-                int n = DHelpers.cubicRootsInAB(a, b, c, d, nextRoots, 0, 0.0d, 1.0d);
+                final int n = DHelpers.cubicRootsInAB(a, b, c, d, nextRoots, 0, 0.0d, 1.0d);
                 if (n == 1 && !Double.isNaN(nextRoots[0])) {
                     t = nextRoots[0];
                 }
@@ -656,6 +830,16 @@
             return t;
         }
 
+        double totalLength() {
+            while (!done) {
+                goToNextLeaf();
+            }
+            // reset LengthIterator:
+            reset();
+
+            return lenAtNextT;
+        }
+
         double lastSegLen() {
             return lastSegLen;
         }
@@ -665,11 +849,11 @@
         private void goToNextLeaf() {
             // We must go to the first ancestor node that has an unvisited
             // right child.
+            final boolean[] _sides = sidesRight;
             int _recLevel = recLevel;
-            final Side[] _sides = sides;
+            _recLevel--;
 
-            _recLevel--;
-            while(_sides[_recLevel] == Side.RIGHT) {
+            while(_sides[_recLevel]) {
                 if (_recLevel == 0) {
                     recLevel = 0;
                     done = true;
@@ -678,19 +862,17 @@
                 _recLevel--;
             }
 
-            _sides[_recLevel] = Side.RIGHT;
+            _sides[_recLevel] = true;
             // optimize arraycopy (8 values faster than 6 = type):
-            System.arraycopy(recCurveStack[_recLevel], 0,
-                             recCurveStack[_recLevel+1], 0, 8);
-            _recLevel++;
-
+            System.arraycopy(recCurveStack[_recLevel++], 0,
+                             recCurveStack[_recLevel], 0, 8);
             recLevel = _recLevel;
             goLeft();
         }
 
         // go to the leftmost node from the current node. Return its length.
         private void goLeft() {
-            double len = onLeaf();
+            final double len = onLeaf();
             if (len >= 0.0d) {
                 lastT = nextT;
                 lenAtLastT = lenAtNextT;
@@ -700,10 +882,11 @@
                 flatLeafCoefCache[2] = -1.0d;
                 cachedHaveLowAcceleration = -1;
             } else {
-                DHelpers.subdivide(recCurveStack[recLevel], 0,
-                                  recCurveStack[recLevel+1], 0,
-                                  recCurveStack[recLevel], 0, curveType);
-                sides[recLevel] = Side.LEFT;
+                DHelpers.subdivide(recCurveStack[recLevel],
+                                   recCurveStack[recLevel + 1],
+                                   recCurveStack[recLevel], curveType);
+
+                sidesRight[recLevel] = false;
                 recLevel++;
                 goLeft();
             }
@@ -718,7 +901,7 @@
 
             double x0 = curve[0], y0 = curve[1];
             for (int i = 2; i < _curveType; i += 2) {
-                final double x1 = curve[i], y1 = curve[i+1];
+                final double x1 = curve[i], y1 = curve[i + 1];
                 final double len = DHelpers.linelen(x0, y0, x1, y1);
                 polyLen += len;
                 curLeafCtrlPolyLengths[(i >> 1) - 1] = len;
@@ -726,10 +909,9 @@
                 y0 = y1;
             }
 
-            final double lineLen = DHelpers.linelen(curve[0], curve[1],
-                                                    curve[_curveType-2],
-                                                    curve[_curveType-1]);
-            if ((polyLen - lineLen) < ERR || recLevel == REC_LIMIT) {
+            final double lineLen = DHelpers.linelen(curve[0], curve[1], x0, y0);
+
+            if ((polyLen - lineLen) < CURVE_LEN_ERR || recLevel == REC_LIMIT) {
                 return (polyLen + lineLen) / 2.0d;
             }
             return -1.0d;
@@ -741,41 +923,190 @@
                         final double x2, final double y2,
                         final double x3, final double y3)
     {
+        final int outcode0 = this.cOutCode;
+
+        if (clipRect != null) {
+            final int outcode1 = DHelpers.outcode(x1, y1, clipRect);
+            final int outcode2 = DHelpers.outcode(x2, y2, clipRect);
+            final int outcode3 = DHelpers.outcode(x3, y3, clipRect);
+
+            // Should clip
+            final int orCode = (outcode0 | outcode1 | outcode2 | outcode3);
+            if (orCode != 0) {
+                final int sideCode = outcode0 & outcode1 & outcode2 & outcode3;
+
+                // basic rejection criteria:
+                if (sideCode == 0) {
+                    // ovelap clip:
+                    if (subdivide) {
+                        // avoid reentrance
+                        subdivide = false;
+                        // subdivide curve => callback with subdivided parts:
+                        boolean ret = curveSplitter.splitCurve(cx0, cy0, x1, y1, x2, y2, x3, y3,
+                                                               orCode, this);
+                        // reentrance is done:
+                        subdivide = true;
+                        if (ret) {
+                            return;
+                        }
+                    }
+                    // already subdivided so render it
+                } else {
+                    this.cOutCode = outcode3;
+                    skipCurveTo(x1, y1, x2, y2, x3, y3);
+                    return;
+                }
+            }
+
+            this.cOutCode = outcode3;
+
+            if (this.outside) {
+                this.outside = false;
+                // Adjust current index, phase & dash:
+                skipLen();
+            }
+        }
+        _curveTo(x1, y1, x2, y2, x3, y3);
+    }
+
+    private void _curveTo(final double x1, final double y1,
+                          final double x2, final double y2,
+                          final double x3, final double y3)
+    {
         final double[] _curCurvepts = curCurvepts;
-        _curCurvepts[0] = x0;        _curCurvepts[1] = y0;
-        _curCurvepts[2] = x1;        _curCurvepts[3] = y1;
-        _curCurvepts[4] = x2;        _curCurvepts[5] = y2;
-        _curCurvepts[6] = x3;        _curCurvepts[7] = y3;
-        somethingTo(8);
+
+        // monotonize curve:
+        final CurveBasicMonotonizer monotonizer
+            = rdrCtx.monotonizer.curve(cx0, cy0, x1, y1, x2, y2, x3, y3);
+
+        final int nSplits = monotonizer.nbSplits;
+        final double[] mid = monotonizer.middle;
+
+        for (int i = 0, off = 0; i <= nSplits; i++, off += 6) {
+            // optimize arraycopy (8 values faster than 6 = type):
+            System.arraycopy(mid, off, _curCurvepts, 0, 8);
+
+            somethingTo(8);
+        }
+    }
+
+    private void skipCurveTo(final double x1, final double y1,
+                             final double x2, final double y2,
+                             final double x3, final double y3)
+    {
+        final double[] _curCurvepts = curCurvepts;
+        _curCurvepts[0] = cx0; _curCurvepts[1] = cy0;
+        _curCurvepts[2] = x1;  _curCurvepts[3] = y1;
+        _curCurvepts[4] = x2;  _curCurvepts[5] = y2;
+        _curCurvepts[6] = x3;  _curCurvepts[7] = y3;
+
+        skipSomethingTo(8);
+
+        this.cx0 = x3;
+        this.cy0 = y3;
     }
 
     @Override
     public void quadTo(final double x1, final double y1,
                        final double x2, final double y2)
     {
+        final int outcode0 = this.cOutCode;
+
+        if (clipRect != null) {
+            final int outcode1 = DHelpers.outcode(x1, y1, clipRect);
+            final int outcode2 = DHelpers.outcode(x2, y2, clipRect);
+
+            // Should clip
+            final int orCode = (outcode0 | outcode1 | outcode2);
+            if (orCode != 0) {
+                final int sideCode = outcode0 & outcode1 & outcode2;
+
+                // basic rejection criteria:
+                if (sideCode == 0) {
+                    // ovelap clip:
+                    if (subdivide) {
+                        // avoid reentrance
+                        subdivide = false;
+                        // subdivide curve => call lineTo() with subdivided curves:
+                        boolean ret = curveSplitter.splitQuad(cx0, cy0, x1, y1,
+                                                              x2, y2, orCode, this);
+                        // reentrance is done:
+                        subdivide = true;
+                        if (ret) {
+                            return;
+                        }
+                    }
+                    // already subdivided so render it
+                } else {
+                    this.cOutCode = outcode2;
+                    skipQuadTo(x1, y1, x2, y2);
+                    return;
+                }
+            }
+
+            this.cOutCode = outcode2;
+
+            if (this.outside) {
+                this.outside = false;
+                // Adjust current index, phase & dash:
+                skipLen();
+            }
+        }
+        _quadTo(x1, y1, x2, y2);
+    }
+
+    private void _quadTo(final double x1, final double y1,
+                         final double x2, final double y2)
+    {
         final double[] _curCurvepts = curCurvepts;
-        _curCurvepts[0] = x0;        _curCurvepts[1] = y0;
-        _curCurvepts[2] = x1;        _curCurvepts[3] = y1;
-        _curCurvepts[4] = x2;        _curCurvepts[5] = y2;
-        somethingTo(6);
+
+        // monotonize quad:
+        final CurveBasicMonotonizer monotonizer
+            = rdrCtx.monotonizer.quad(cx0, cy0, x1, y1, x2, y2);
+
+        final int nSplits = monotonizer.nbSplits;
+        final double[] mid = monotonizer.middle;
+
+        for (int i = 0, off = 0; i <= nSplits; i++, off += 4) {
+            // optimize arraycopy (8 values faster than 6 = type):
+            System.arraycopy(mid, off, _curCurvepts, 0, 8);
+
+            somethingTo(6);
+        }
+    }
+
+    private void skipQuadTo(final double x1, final double y1,
+                            final double x2, final double y2)
+    {
+        final double[] _curCurvepts = curCurvepts;
+        _curCurvepts[0] = cx0; _curCurvepts[1] = cy0;
+        _curCurvepts[2] = x1;  _curCurvepts[3] = y1;
+        _curCurvepts[4] = x2;  _curCurvepts[5] = y2;
+
+        skipSomethingTo(6);
+
+        this.cx0 = x2;
+        this.cy0 = y2;
     }
 
     @Override
     public void closePath() {
-        lineTo(sx, sy);
+        if (cx0 != sx0 || cy0 != sy0) {
+            lineTo(sx0, sy0);
+        }
         if (firstSegidx != 0) {
             if (!dashOn || needsMoveTo) {
-                out.moveTo(sx, sy);
+                out.moveTo(sx0, sy0);
             }
             emitFirstSegments();
         }
-        moveTo(sx, sy);
+        moveTo(sx0, sy0);
     }
 
     @Override
     public void pathDone() {
         if (firstSegidx != 0) {
-            out.moveTo(sx, sy);
+            out.moveTo(sx0, sy0);
             emitFirstSegments();
         }
         out.pathDone();
--- a/src/java.desktop/share/classes/sun/java2d/marlin/DHelpers.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.desktop/share/classes/sun/java2d/marlin/DHelpers.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,6 @@
 
 package sun.java2d.marlin;
 
-import static java.lang.Math.PI;
 import java.util.Arrays;
 import sun.java2d.marlin.stats.Histogram;
 import sun.java2d.marlin.stats.StatLong;
@@ -41,13 +40,25 @@
         return (d <= err && d >= -err);
     }
 
-    static int quadraticRoots(final double a, final double b,
-                              final double c, double[] zeroes, final int off)
+    static double evalCubic(final double a, final double b,
+                            final double c, final double d,
+                            final double t)
+    {
+        return t * (t * (t * a + b) + c) + d;
+    }
+
+    static double evalQuad(final double a, final double b,
+                           final double c, final double t)
+    {
+        return t * (t * a + b) + c;
+    }
+
+    static int quadraticRoots(final double a, final double b, final double c,
+                              final double[] zeroes, final int off)
     {
         int ret = off;
-        double t;
         if (a != 0.0d) {
-            final double dis = b*b - 4*a*c;
+            final double dis = b*b - 4.0d * a * c;
             if (dis > 0.0d) {
                 final double sqrtDis = Math.sqrt(dis);
                 // depending on the sign of b we use a slightly different
@@ -62,34 +73,34 @@
                     zeroes[ret++] = (2.0d * c) / (-b + sqrtDis);
                 }
             } else if (dis == 0.0d) {
-                t = (-b) / (2.0d * a);
-                zeroes[ret++] = t;
+                zeroes[ret++] = -b / (2.0d * a);
             }
-        } else {
-            if (b != 0.0d) {
-                t = (-c) / b;
-                zeroes[ret++] = t;
-            }
+        } else if (b != 0.0d) {
+            zeroes[ret++] = -c / b;
         }
         return ret - off;
     }
 
     // find the roots of g(t) = d*t^3 + a*t^2 + b*t + c in [A,B)
-    static int cubicRootsInAB(double d, double a, double b, double c,
-                              double[] pts, final int off,
+    static int cubicRootsInAB(final double d, double a, double b, double c,
+                              final double[] pts, final int off,
                               final double A, final double B)
     {
         if (d == 0.0d) {
-            int num = quadraticRoots(a, b, c, pts, off);
+            final int num = quadraticRoots(a, b, c, pts, off);
             return filterOutNotInAB(pts, off, num, A, B) - off;
         }
         // From Graphics Gems:
-        // http://tog.acm.org/resources/GraphicsGems/gems/Roots3And4.c
+        // https://github.com/erich666/GraphicsGems/blob/master/gems/Roots3And4.c
         // (also from awt.geom.CubicCurve2D. But here we don't need as
         // much accuracy and we don't want to create arrays so we use
         // our own customized version).
 
         // normal form: x^3 + ax^2 + bx + c = 0
+
+        /*
+         * TODO: cleanup all that code after reading Roots3And4.c
+         */
         a /= d;
         b /= d;
         c /= d;
@@ -102,63 +113,45 @@
         // p = P/3
         // q = Q/2
         // instead and use those values for simplicity of the code.
-        double sq_A = a * a;
-        double p = (1.0d/3.0d) * ((-1.0d/3.0d) * sq_A + b);
-        double q = (1.0d/2.0d) * ((2.0d/27.0d) * a * sq_A - (1.0d/3.0d) * a * b + c);
+        final double sub = (1.0d / 3.0d) * a;
+        final double sq_A = a * a;
+        final double p = (1.0d / 3.0d) * ((-1.0d / 3.0d) * sq_A + b);
+        final double q = (1.0d / 2.0d) * ((2.0d / 27.0d) * a * sq_A - sub * b + c);
 
         // use Cardano's formula
 
-        double cb_p = p * p * p;
-        double D = q * q + cb_p;
+        final double cb_p = p * p * p;
+        final double D = q * q + cb_p;
 
         int num;
         if (D < 0.0d) {
             // see: http://en.wikipedia.org/wiki/Cubic_function#Trigonometric_.28and_hyperbolic.29_method
-            final double phi = (1.0d/3.0d) * Math.acos(-q / Math.sqrt(-cb_p));
+            final double phi = (1.0d / 3.0d) * Math.acos(-q / Math.sqrt(-cb_p));
             final double t = 2.0d * Math.sqrt(-p);
 
-            pts[ off+0 ] = ( t * Math.cos(phi));
-            pts[ off+1 ] = (-t * Math.cos(phi + (PI / 3.0d)));
-            pts[ off+2 ] = (-t * Math.cos(phi - (PI / 3.0d)));
+            pts[off    ] = ( t * Math.cos(phi) - sub);
+            pts[off + 1] = (-t * Math.cos(phi + (Math.PI / 3.0d)) - sub);
+            pts[off + 2] = (-t * Math.cos(phi - (Math.PI / 3.0d)) - sub);
             num = 3;
         } else {
             final double sqrt_D = Math.sqrt(D);
             final double u =   Math.cbrt(sqrt_D - q);
             final double v = - Math.cbrt(sqrt_D + q);
 
-            pts[ off ] = (u + v);
+            pts[off    ] = (u + v - sub);
             num = 1;
 
             if (within(D, 0.0d, 1e-8d)) {
-                pts[off+1] = -(pts[off] / 2.0d);
+                pts[off + 1] = ((-1.0d / 2.0d) * (u + v) - sub);
                 num = 2;
             }
         }
 
-        final double sub = (1.0d/3.0d) * a;
-
-        for (int i = 0; i < num; ++i) {
-            pts[ off+i ] -= sub;
-        }
-
         return filterOutNotInAB(pts, off, num, A, B) - off;
     }
 
-    static double evalCubic(final double a, final double b,
-                           final double c, final double d,
-                           final double t)
-    {
-        return t * (t * (t * a + b) + c) + d;
-    }
-
-    static double evalQuad(final double a, final double b,
-                          final double c, final double t)
-    {
-        return t * (t * a + b) + c;
-    }
-
     // returns the index 1 past the last valid element remaining after filtering
-    static int filterOutNotInAB(double[] nums, final int off, final int len,
+    static int filterOutNotInAB(final double[] nums, final int off, final int len,
                                 final double a, final double b)
     {
         int ret = off;
@@ -170,35 +163,189 @@
         return ret;
     }
 
-    static double linelen(double x1, double y1, double x2, double y2) {
-        final double dx = x2 - x1;
-        final double dy = y2 - y1;
-        return Math.sqrt(dx*dx + dy*dy);
+    static double fastLineLen(final double x0, final double y0,
+                              final double x1, final double y1)
+    {
+        final double dx = x1 - x0;
+        final double dy = y1 - y0;
+
+        // use manhattan norm:
+        return Math.abs(dx) + Math.abs(dy);
+    }
+
+    static double linelen(final double x0, final double y0,
+                          final double x1, final double y1)
+    {
+        final double dx = x1 - x0;
+        final double dy = y1 - y0;
+        return Math.sqrt(dx * dx + dy * dy);
+    }
+
+    static double fastQuadLen(final double x0, final double y0,
+                              final double x1, final double y1,
+                              final double x2, final double y2)
+    {
+        final double dx1 = x1 - x0;
+        final double dx2 = x2 - x1;
+        final double dy1 = y1 - y0;
+        final double dy2 = y2 - y1;
+
+        // use manhattan norm:
+        return Math.abs(dx1) + Math.abs(dx2)
+             + Math.abs(dy1) + Math.abs(dy2);
+    }
+
+    static double quadlen(final double x0, final double y0,
+                          final double x1, final double y1,
+                          final double x2, final double y2)
+    {
+        return (linelen(x0, y0, x1, y1)
+                + linelen(x1, y1, x2, y2)
+                + linelen(x0, y0, x2, y2)) / 2.0d;
+    }
+
+    static double fastCurvelen(final double x0, final double y0,
+                               final double x1, final double y1,
+                               final double x2, final double y2,
+                               final double x3, final double y3)
+    {
+        final double dx1 = x1 - x0;
+        final double dx2 = x2 - x1;
+        final double dx3 = x3 - x2;
+        final double dy1 = y1 - y0;
+        final double dy2 = y2 - y1;
+        final double dy3 = y3 - y2;
+
+        // use manhattan norm:
+        return Math.abs(dx1) + Math.abs(dx2) + Math.abs(dx3)
+             + Math.abs(dy1) + Math.abs(dy2) + Math.abs(dy3);
+    }
+
+    static double curvelen(final double x0, final double y0,
+                           final double x1, final double y1,
+                           final double x2, final double y2,
+                           final double x3, final double y3)
+    {
+        return (linelen(x0, y0, x1, y1)
+              + linelen(x1, y1, x2, y2)
+              + linelen(x2, y2, x3, y3)
+              + linelen(x0, y0, x3, y3)) / 2.0d;
     }
 
-    static void subdivide(double[] src, int srcoff, double[] left, int leftoff,
-                          double[] right, int rightoff, int type)
+    // finds values of t where the curve in pts should be subdivided in order
+    // to get good offset curves a distance of w away from the middle curve.
+    // Stores the points in ts, and returns how many of them there were.
+    static int findSubdivPoints(final DCurve c, final double[] pts,
+                                final double[] ts, final int type,
+                                final double w2)
+    {
+        final double x12 = pts[2] - pts[0];
+        final double y12 = pts[3] - pts[1];
+        // if the curve is already parallel to either axis we gain nothing
+        // from rotating it.
+        if ((y12 != 0.0d && x12 != 0.0d)) {
+            // we rotate it so that the first vector in the control polygon is
+            // parallel to the x-axis. This will ensure that rotated quarter
+            // circles won't be subdivided.
+            final double hypot = Math.sqrt(x12 * x12 + y12 * y12);
+            final double cos = x12 / hypot;
+            final double sin = y12 / hypot;
+            final double x1 = cos * pts[0] + sin * pts[1];
+            final double y1 = cos * pts[1] - sin * pts[0];
+            final double x2 = cos * pts[2] + sin * pts[3];
+            final double y2 = cos * pts[3] - sin * pts[2];
+            final double x3 = cos * pts[4] + sin * pts[5];
+            final double y3 = cos * pts[5] - sin * pts[4];
+
+            switch(type) {
+            case 8:
+                final double x4 = cos * pts[6] + sin * pts[7];
+                final double y4 = cos * pts[7] - sin * pts[6];
+                c.set(x1, y1, x2, y2, x3, y3, x4, y4);
+                break;
+            case 6:
+                c.set(x1, y1, x2, y2, x3, y3);
+                break;
+            default:
+            }
+        } else {
+            c.set(pts, type);
+        }
+
+        int ret = 0;
+        // we subdivide at values of t such that the remaining rotated
+        // curves are monotonic in x and y.
+        ret += c.dxRoots(ts, ret);
+        ret += c.dyRoots(ts, ret);
+
+        // subdivide at inflection points.
+        if (type == 8) {
+            // quadratic curves can't have inflection points
+            ret += c.infPoints(ts, ret);
+        }
+
+        // now we must subdivide at points where one of the offset curves will have
+        // a cusp. This happens at ts where the radius of curvature is equal to w.
+        ret += c.rootsOfROCMinusW(ts, ret, w2, 0.0001d);
+
+        ret = filterOutNotInAB(ts, 0, ret, 0.0001d, 0.9999d);
+        isort(ts, ret);
+        return ret;
+    }
+
+    // finds values of t where the curve in pts should be subdivided in order
+    // to get intersections with the given clip rectangle.
+    // Stores the points in ts, and returns how many of them there were.
+    static int findClipPoints(final DCurve curve, final double[] pts,
+                              final double[] ts, final int type,
+                              final int outCodeOR,
+                              final double[] clipRect)
+    {
+        curve.set(pts, type);
+
+        // clip rectangle (ymin, ymax, xmin, xmax)
+        int ret = 0;
+
+        if ((outCodeOR & OUTCODE_LEFT) != 0) {
+            ret += curve.xPoints(ts, ret, clipRect[2]);
+        }
+        if ((outCodeOR & OUTCODE_RIGHT) != 0) {
+            ret += curve.xPoints(ts, ret, clipRect[3]);
+        }
+        if ((outCodeOR & OUTCODE_TOP) != 0) {
+            ret += curve.yPoints(ts, ret, clipRect[0]);
+        }
+        if ((outCodeOR & OUTCODE_BOTTOM) != 0) {
+            ret += curve.yPoints(ts, ret, clipRect[1]);
+        }
+        isort(ts, ret);
+        return ret;
+    }
+
+    static void subdivide(final double[] src,
+                          final double[] left, final double[] right,
+                          final int type)
     {
         switch(type) {
-        case 6:
-            DHelpers.subdivideQuad(src, srcoff, left, leftoff, right, rightoff);
+        case 8:
+            subdivideCubic(src, left, right);
             return;
-        case 8:
-            DHelpers.subdivideCubic(src, srcoff, left, leftoff, right, rightoff);
+        case 6:
+            subdivideQuad(src, left, right);
             return;
         default:
             throw new InternalError("Unsupported curve type");
         }
     }
 
-    static void isort(double[] a, int off, int len) {
-        for (int i = off + 1, end = off + len; i < end; i++) {
-            double ai = a[i];
-            int j = i - 1;
-            for (; j >= off && a[j] > ai; j--) {
-                a[j+1] = a[j];
+    static void isort(final double[] a, final int len) {
+        for (int i = 1, j; i < len; i++) {
+            final double ai = a[i];
+            j = i - 1;
+            for (; j >= 0 && a[j] > ai; j--) {
+                a[j + 1] = a[j];
             }
-            a[j+1] = ai;
+            a[j + 1] = ai;
         }
     }
 
@@ -221,206 +368,216 @@
      * equals (<code>leftoff</code> + 6), in order
      * to avoid allocating extra storage for this common point.
      * @param src the array holding the coordinates for the source curve
-     * @param srcoff the offset into the array of the beginning of the
-     * the 6 source coordinates
      * @param left the array for storing the coordinates for the first
      * half of the subdivided curve
-     * @param leftoff the offset into the array of the beginning of the
-     * the 6 left coordinates
      * @param right the array for storing the coordinates for the second
      * half of the subdivided curve
-     * @param rightoff the offset into the array of the beginning of the
-     * the 6 right coordinates
      * @since 1.7
      */
-    static void subdivideCubic(double[] src, int srcoff,
-                               double[] left, int leftoff,
-                               double[] right, int rightoff)
+    static void subdivideCubic(final double[] src,
+                               final double[] left,
+                               final double[] right)
     {
-        double x1 = src[srcoff + 0];
-        double y1 = src[srcoff + 1];
-        double ctrlx1 = src[srcoff + 2];
-        double ctrly1 = src[srcoff + 3];
-        double ctrlx2 = src[srcoff + 4];
-        double ctrly2 = src[srcoff + 5];
-        double x2 = src[srcoff + 6];
-        double y2 = src[srcoff + 7];
-        if (left != null) {
-            left[leftoff + 0] = x1;
-            left[leftoff + 1] = y1;
-        }
-        if (right != null) {
-            right[rightoff + 6] = x2;
-            right[rightoff + 7] = y2;
-        }
-        x1 = (x1 + ctrlx1) / 2.0d;
-        y1 = (y1 + ctrly1) / 2.0d;
-        x2 = (x2 + ctrlx2) / 2.0d;
-        y2 = (y2 + ctrly2) / 2.0d;
-        double centerx = (ctrlx1 + ctrlx2) / 2.0d;
-        double centery = (ctrly1 + ctrly2) / 2.0d;
-        ctrlx1 = (x1 + centerx) / 2.0d;
-        ctrly1 = (y1 + centery) / 2.0d;
-        ctrlx2 = (x2 + centerx) / 2.0d;
-        ctrly2 = (y2 + centery) / 2.0d;
-        centerx = (ctrlx1 + ctrlx2) / 2.0d;
-        centery = (ctrly1 + ctrly2) / 2.0d;
-        if (left != null) {
-            left[leftoff + 2] = x1;
-            left[leftoff + 3] = y1;
-            left[leftoff + 4] = ctrlx1;
-            left[leftoff + 5] = ctrly1;
-            left[leftoff + 6] = centerx;
-            left[leftoff + 7] = centery;
-        }
-        if (right != null) {
-            right[rightoff + 0] = centerx;
-            right[rightoff + 1] = centery;
-            right[rightoff + 2] = ctrlx2;
-            right[rightoff + 3] = ctrly2;
-            right[rightoff + 4] = x2;
-            right[rightoff + 5] = y2;
-        }
+        double  x1 = src[0];
+        double  y1 = src[1];
+        double cx1 = src[2];
+        double cy1 = src[3];
+        double cx2 = src[4];
+        double cy2 = src[5];
+        double  x2 = src[6];
+        double  y2 = src[7];
+
+        left[0]  = x1;
+        left[1]  = y1;
+
+        right[6] = x2;
+        right[7] = y2;
+
+        x1 = (x1 + cx1) / 2.0d;
+        y1 = (y1 + cy1) / 2.0d;
+        x2 = (x2 + cx2) / 2.0d;
+        y2 = (y2 + cy2) / 2.0d;
+
+        double cx = (cx1 + cx2) / 2.0d;
+        double cy = (cy1 + cy2) / 2.0d;
+
+        cx1 = (x1 + cx) / 2.0d;
+        cy1 = (y1 + cy) / 2.0d;
+        cx2 = (x2 + cx) / 2.0d;
+        cy2 = (y2 + cy) / 2.0d;
+        cx  = (cx1 + cx2) / 2.0d;
+        cy  = (cy1 + cy2) / 2.0d;
+
+        left[2] = x1;
+        left[3] = y1;
+        left[4] = cx1;
+        left[5] = cy1;
+        left[6] = cx;
+        left[7] = cy;
+
+        right[0] = cx;
+        right[1] = cy;
+        right[2] = cx2;
+        right[3] = cy2;
+        right[4] = x2;
+        right[5] = y2;
+    }
+
+    static void subdivideCubicAt(final double t,
+                                 final double[] src, final int offS,
+                                 final double[] pts, final int offL, final int offR)
+    {
+        double  x1 = src[offS    ];
+        double  y1 = src[offS + 1];
+        double cx1 = src[offS + 2];
+        double cy1 = src[offS + 3];
+        double cx2 = src[offS + 4];
+        double cy2 = src[offS + 5];
+        double  x2 = src[offS + 6];
+        double  y2 = src[offS + 7];
+
+        pts[offL    ] = x1;
+        pts[offL + 1] = y1;
+
+        pts[offR + 6] = x2;
+        pts[offR + 7] = y2;
+
+        x1 =  x1 + t * (cx1 - x1);
+        y1 =  y1 + t * (cy1 - y1);
+        x2 = cx2 + t * (x2 - cx2);
+        y2 = cy2 + t * (y2 - cy2);
+
+        double cx = cx1 + t * (cx2 - cx1);
+        double cy = cy1 + t * (cy2 - cy1);
+
+        cx1 =  x1 + t * (cx - x1);
+        cy1 =  y1 + t * (cy - y1);
+        cx2 =  cx + t * (x2 - cx);
+        cy2 =  cy + t * (y2 - cy);
+        cx  = cx1 + t * (cx2 - cx1);
+        cy  = cy1 + t * (cy2 - cy1);
+
+        pts[offL + 2] = x1;
+        pts[offL + 3] = y1;
+        pts[offL + 4] = cx1;
+        pts[offL + 5] = cy1;
+        pts[offL + 6] = cx;
+        pts[offL + 7] = cy;
+
+        pts[offR    ] = cx;
+        pts[offR + 1] = cy;
+        pts[offR + 2] = cx2;
+        pts[offR + 3] = cy2;
+        pts[offR + 4] = x2;
+        pts[offR + 5] = y2;
     }
 
-
-    static void subdivideCubicAt(double t, double[] src, int srcoff,
-                                 double[] left, int leftoff,
-                                 double[] right, int rightoff)
+    static void subdivideQuad(final double[] src,
+                              final double[] left,
+                              final double[] right)
     {
-        double x1 = src[srcoff + 0];
-        double y1 = src[srcoff + 1];
-        double ctrlx1 = src[srcoff + 2];
-        double ctrly1 = src[srcoff + 3];
-        double ctrlx2 = src[srcoff + 4];
-        double ctrly2 = src[srcoff + 5];
-        double x2 = src[srcoff + 6];
-        double y2 = src[srcoff + 7];
-        if (left != null) {
-            left[leftoff + 0] = x1;
-            left[leftoff + 1] = y1;
-        }
-        if (right != null) {
-            right[rightoff + 6] = x2;
-            right[rightoff + 7] = y2;
-        }
-        x1 = x1 + t * (ctrlx1 - x1);
-        y1 = y1 + t * (ctrly1 - y1);
-        x2 = ctrlx2 + t * (x2 - ctrlx2);
-        y2 = ctrly2 + t * (y2 - ctrly2);
-        double centerx = ctrlx1 + t * (ctrlx2 - ctrlx1);
-        double centery = ctrly1 + t * (ctrly2 - ctrly1);
-        ctrlx1 = x1 + t * (centerx - x1);
-        ctrly1 = y1 + t * (centery - y1);
-        ctrlx2 = centerx + t * (x2 - centerx);
-        ctrly2 = centery + t * (y2 - centery);
-        centerx = ctrlx1 + t * (ctrlx2 - ctrlx1);
-        centery = ctrly1 + t * (ctrly2 - ctrly1);
-        if (left != null) {
-            left[leftoff + 2] = x1;
-            left[leftoff + 3] = y1;
-            left[leftoff + 4] = ctrlx1;
-            left[leftoff + 5] = ctrly1;
-            left[leftoff + 6] = centerx;
-            left[leftoff + 7] = centery;
-        }
-        if (right != null) {
-            right[rightoff + 0] = centerx;
-            right[rightoff + 1] = centery;
-            right[rightoff + 2] = ctrlx2;
-            right[rightoff + 3] = ctrly2;
-            right[rightoff + 4] = x2;
-            right[rightoff + 5] = y2;
-        }
+        double x1 = src[0];
+        double y1 = src[1];
+        double cx = src[2];
+        double cy = src[3];
+        double x2 = src[4];
+        double y2 = src[5];
+
+        left[0]  = x1;
+        left[1]  = y1;
+
+        right[4] = x2;
+        right[5] = y2;
+
+        x1 = (x1 + cx) / 2.0d;
+        y1 = (y1 + cy) / 2.0d;
+        x2 = (x2 + cx) / 2.0d;
+        y2 = (y2 + cy) / 2.0d;
+        cx = (x1 + x2) / 2.0d;
+        cy = (y1 + y2) / 2.0d;
+
+        left[2] = x1;
+        left[3] = y1;
+        left[4] = cx;
+        left[5] = cy;
+
+        right[0] = cx;
+        right[1] = cy;
+        right[2] = x2;
+        right[3] = y2;
     }
 
-    static void subdivideQuad(double[] src, int srcoff,
-                              double[] left, int leftoff,
-                              double[] right, int rightoff)
+    static void subdivideQuadAt(final double t,
+                                final double[] src, final int offS,
+                                final double[] pts, final int offL, final int offR)
     {
-        double x1 = src[srcoff + 0];
-        double y1 = src[srcoff + 1];
-        double ctrlx = src[srcoff + 2];
-        double ctrly = src[srcoff + 3];
-        double x2 = src[srcoff + 4];
-        double y2 = src[srcoff + 5];
-        if (left != null) {
-            left[leftoff + 0] = x1;
-            left[leftoff + 1] = y1;
-        }
-        if (right != null) {
-            right[rightoff + 4] = x2;
-            right[rightoff + 5] = y2;
-        }
-        x1 = (x1 + ctrlx) / 2.0d;
-        y1 = (y1 + ctrly) / 2.0d;
-        x2 = (x2 + ctrlx) / 2.0d;
-        y2 = (y2 + ctrly) / 2.0d;
-        ctrlx = (x1 + x2) / 2.0d;
-        ctrly = (y1 + y2) / 2.0d;
-        if (left != null) {
-            left[leftoff + 2] = x1;
-            left[leftoff + 3] = y1;
-            left[leftoff + 4] = ctrlx;
-            left[leftoff + 5] = ctrly;
-        }
-        if (right != null) {
-            right[rightoff + 0] = ctrlx;
-            right[rightoff + 1] = ctrly;
-            right[rightoff + 2] = x2;
-            right[rightoff + 3] = y2;
-        }
+        double x1 = src[offS    ];
+        double y1 = src[offS + 1];
+        double cx = src[offS + 2];
+        double cy = src[offS + 3];
+        double x2 = src[offS + 4];
+        double y2 = src[offS + 5];
+
+        pts[offL    ] = x1;
+        pts[offL + 1] = y1;
+
+        pts[offR + 4] = x2;
+        pts[offR + 5] = y2;
+
+        x1 = x1 + t * (cx - x1);
+        y1 = y1 + t * (cy - y1);
+        x2 = cx + t * (x2 - cx);
+        y2 = cy + t * (y2 - cy);
+        cx = x1 + t * (x2 - x1);
+        cy = y1 + t * (y2 - y1);
+
+        pts[offL + 2] = x1;
+        pts[offL + 3] = y1;
+        pts[offL + 4] = cx;
+        pts[offL + 5] = cy;
+
+        pts[offR    ] = cx;
+        pts[offR + 1] = cy;
+        pts[offR + 2] = x2;
+        pts[offR + 3] = y2;
     }
 
-    static void subdivideQuadAt(double t, double[] src, int srcoff,
-                                double[] left, int leftoff,
-                                double[] right, int rightoff)
+    static void subdivideLineAt(final double t,
+                                final double[] src, final int offS,
+                                final double[] pts, final int offL, final int offR)
     {
-        double x1 = src[srcoff + 0];
-        double y1 = src[srcoff + 1];
-        double ctrlx = src[srcoff + 2];
-        double ctrly = src[srcoff + 3];
-        double x2 = src[srcoff + 4];
-        double y2 = src[srcoff + 5];
-        if (left != null) {
-            left[leftoff + 0] = x1;
-            left[leftoff + 1] = y1;
-        }
-        if (right != null) {
-            right[rightoff + 4] = x2;
-            right[rightoff + 5] = y2;
-        }
-        x1 = x1 + t * (ctrlx - x1);
-        y1 = y1 + t * (ctrly - y1);
-        x2 = ctrlx + t * (x2 - ctrlx);
-        y2 = ctrly + t * (y2 - ctrly);
-        ctrlx = x1 + t * (x2 - x1);
-        ctrly = y1 + t * (y2 - y1);
-        if (left != null) {
-            left[leftoff + 2] = x1;
-            left[leftoff + 3] = y1;
-            left[leftoff + 4] = ctrlx;
-            left[leftoff + 5] = ctrly;
-        }
-        if (right != null) {
-            right[rightoff + 0] = ctrlx;
-            right[rightoff + 1] = ctrly;
-            right[rightoff + 2] = x2;
-            right[rightoff + 3] = y2;
-        }
+        double x1 = src[offS    ];
+        double y1 = src[offS + 1];
+        double x2 = src[offS + 2];
+        double y2 = src[offS + 3];
+
+        pts[offL    ] = x1;
+        pts[offL + 1] = y1;
+
+        pts[offR + 2] = x2;
+        pts[offR + 3] = y2;
+
+        x1 = x1 + t * (x2 - x1);
+        y1 = y1 + t * (y2 - y1);
+
+        pts[offL + 2] = x1;
+        pts[offL + 3] = y1;
+
+        pts[offR    ] = x1;
+        pts[offR + 1] = y1;
     }
 
-    static void subdivideAt(double t, double[] src, int srcoff,
-                            double[] left, int leftoff,
-                            double[] right, int rightoff, int size)
+    static void subdivideAt(final double t,
+                            final double[] src, final int offS,
+                            final double[] pts, final int offL, final int type)
     {
-        switch(size) {
-        case 8:
-            subdivideCubicAt(t, src, srcoff, left, leftoff, right, rightoff);
-            return;
-        case 6:
-            subdivideQuadAt(t, src, srcoff, left, leftoff, right, rightoff);
-            return;
+        // if instead of switch (perf + most probable cases first)
+        if (type == 8) {
+            subdivideCubicAt(t, src, offS, pts, offL, offL + type);
+        } else if (type == 4) {
+            subdivideLineAt(t, src, offS, pts, offL, offL + type);
+        } else {
+            subdivideQuadAt(t, src, offS, pts, offL, offL + type);
         }
     }
 
@@ -608,12 +765,12 @@
                     e += 2;
                     continue;
                 case TYPE_QUADTO:
-                    io.quadTo(_curves[e+0], _curves[e+1],
+                    io.quadTo(_curves[e],   _curves[e+1],
                               _curves[e+2], _curves[e+3]);
                     e += 4;
                     continue;
                 case TYPE_CUBICTO:
-                    io.curveTo(_curves[e+0], _curves[e+1],
+                    io.curveTo(_curves[e],   _curves[e+1],
                                _curves[e+2], _curves[e+3],
                                _curves[e+4], _curves[e+5]);
                     e += 6;
@@ -651,12 +808,12 @@
                     continue;
                 case TYPE_QUADTO:
                     e -= 4;
-                    io.quadTo(_curves[e+0], _curves[e+1],
+                    io.quadTo(_curves[e],   _curves[e+1],
                               _curves[e+2], _curves[e+3]);
                     continue;
                 case TYPE_CUBICTO:
                     e -= 6;
-                    io.curveTo(_curves[e+0], _curves[e+1],
+                    io.curveTo(_curves[e],   _curves[e+1],
                                _curves[e+2], _curves[e+3],
                                _curves[e+4], _curves[e+5]);
                     continue;
--- a/src/java.desktop/share/classes/sun/java2d/marlin/DMarlinRenderingEngine.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.desktop/share/classes/sun/java2d/marlin/DMarlinRenderingEngine.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -31,6 +31,7 @@
 import java.awt.geom.Path2D;
 import java.awt.geom.PathIterator;
 import java.security.AccessController;
+import sun.awt.geom.PathConsumer2D;
 import static sun.java2d.marlin.MarlinUtils.logInfo;
 import sun.java2d.ReentrantContextProvider;
 import sun.java2d.ReentrantContextProviderCLQ;
@@ -46,7 +47,21 @@
 public final class DMarlinRenderingEngine extends RenderingEngine
                                           implements MarlinConst
 {
-    private static enum NormMode {
+    // slightly slower ~2% if enabled stroker clipping (lines) but skipping cap / join handling is few percents faster in specific cases
+    static final boolean DISABLE_2ND_STROKER_CLIPPING = true;
+
+    static final boolean DO_TRACE_PATH = false;
+
+    static final boolean DO_CLIP = MarlinProperties.isDoClip();
+    static final boolean DO_CLIP_FILL = true;
+    static final boolean DO_CLIP_RUNTIME_ENABLE = MarlinProperties.isDoClipRuntimeFlag();
+
+    private static final float MIN_PEN_SIZE = 1.0f / MIN_SUBPIXELS;
+
+    static final double UPPER_BND = Float.MAX_VALUE / 2.0d;
+    static final double LOWER_BND = -UPPER_BND;
+
+    private enum NormMode {
         ON_WITH_AA {
             @Override
             PathIterator getNormalizingPathIterator(final DRendererContext rdrCtx,
@@ -79,18 +94,6 @@
                                                          PathIterator src);
     }
 
-    private static final float MIN_PEN_SIZE = 1.0f / NORM_SUBPIXELS;
-
-    static final double UPPER_BND = Float.MAX_VALUE / 2.0d;
-    static final double LOWER_BND = -UPPER_BND;
-
-    static final boolean DO_CLIP = MarlinProperties.isDoClip();
-    static final boolean DO_CLIP_FILL = true;
-
-    static final boolean DO_TRACE_PATH = false;
-
-    static final boolean DO_CLIP_RUNTIME_ENABLE = MarlinProperties.isDoClipRuntimeFlag();
-
     /**
      * Public constructor
      */
@@ -186,7 +189,7 @@
                          boolean thin,
                          boolean normalize,
                          boolean antialias,
-                         final sun.awt.geom.PathConsumer2D consumer)
+                         final PathConsumer2D consumer)
     {
         final NormMode norm = (normalize) ?
                 ((antialias) ? NormMode.ON_WITH_AA : NormMode.ON_NO_AA)
@@ -424,11 +427,24 @@
         pc2d = transformerPC2D.deltaTransformConsumer(pc2d, strokerat);
 
         // stroker will adjust the clip rectangle (width / miter limit):
-        pc2d = rdrCtx.stroker.init(pc2d, width, caps, join, miterlimit, scale);
+        pc2d = rdrCtx.stroker.init(pc2d, width, caps, join, miterlimit, scale,
+                (dashesD == null));
+
+        // Curve Monotizer:
+        rdrCtx.monotonizer.init(width);
 
         if (dashesD != null) {
+            if (DO_TRACE_PATH) {
+                pc2d = transformerPC2D.traceDasher(pc2d);
+            }
             pc2d = rdrCtx.dasher.init(pc2d, dashesD, dashLen, dashphase,
                                       recycleDashes);
+
+            if (DISABLE_2ND_STROKER_CLIPPING) {
+                // disable stoker clipping:
+                rdrCtx.stroker.disableClipping();
+            }
+
         } else if (rdrCtx.doClip && (caps != Stroker.CAP_BUTT)) {
             if (DO_TRACE_PATH) {
                 pc2d = transformerPC2D.traceClosedPathDetector(pc2d);
@@ -627,6 +643,12 @@
     private static void pathTo(final DRendererContext rdrCtx, final PathIterator pi,
                                DPathConsumer2D pc2d)
     {
+        if (USE_PATH_SIMPLIFIER) {
+            // Use path simplifier at the first step
+            // to remove useless points
+            pc2d = rdrCtx.pathSimplifier.init(pc2d);
+        }
+
         // mark context as DIRTY:
         rdrCtx.dirty = true;
 
@@ -851,8 +873,6 @@
                     // trace Input:
                     pc2d = rdrCtx.transformerPC2D.traceInput(pc2d);
                 }
-
-                // TODO: subdivide quad/cubic curves into monotonic curves ?
                 pathTo(rdrCtx, pi, pc2d);
 
             } else {
@@ -1002,14 +1022,17 @@
         final String refType = AccessController.doPrivileged(
                             new GetPropertyAction("sun.java2d.renderer.useRef",
                             "soft"));
-
-        // Java 1.6 does not support strings in switch:
-        if ("hard".equalsIgnoreCase(refType)) {
-            REF_TYPE = ReentrantContextProvider.REF_HARD;
-        } else if ("weak".equalsIgnoreCase(refType)) {
-            REF_TYPE = ReentrantContextProvider.REF_WEAK;
-        } else {
-            REF_TYPE = ReentrantContextProvider.REF_SOFT;
+        switch (refType) {
+            default:
+            case "soft":
+                REF_TYPE = ReentrantContextProvider.REF_SOFT;
+                break;
+            case "weak":
+                REF_TYPE = ReentrantContextProvider.REF_WEAK;
+                break;
+            case "hard":
+                REF_TYPE = ReentrantContextProvider.REF_HARD;
+                break;
         }
 
         if (USE_THREAD_LOCAL) {
@@ -1069,8 +1092,10 @@
 
         logInfo("sun.java2d.renderer.edges            = "
                 + MarlinConst.INITIAL_EDGES_COUNT);
-        logInfo("sun.java2d.renderer.pixelsize        = "
-                + MarlinConst.INITIAL_PIXEL_DIM);
+        logInfo("sun.java2d.renderer.pixelWidth       = "
+                + MarlinConst.INITIAL_PIXEL_WIDTH);
+        logInfo("sun.java2d.renderer.pixelHeight      = "
+                + MarlinConst.INITIAL_PIXEL_HEIGHT);
 
         logInfo("sun.java2d.renderer.subPixel_log2_X  = "
                 + MarlinConst.SUBPIXEL_LG_POSITIONS_X);
@@ -1100,12 +1125,21 @@
         // optimisation parameters
         logInfo("sun.java2d.renderer.useSimplifier    = "
                 + MarlinConst.USE_SIMPLIFIER);
+        logInfo("sun.java2d.renderer.usePathSimplifier= "
+                + MarlinConst.USE_PATH_SIMPLIFIER);
+        logInfo("sun.java2d.renderer.pathSimplifier.pixTol = "
+                + MarlinProperties.getPathSimplifierPixelTolerance());
 
         logInfo("sun.java2d.renderer.clip             = "
                 + MarlinProperties.isDoClip());
         logInfo("sun.java2d.renderer.clip.runtime.enable = "
                 + MarlinProperties.isDoClipRuntimeFlag());
 
+        logInfo("sun.java2d.renderer.clip.subdivider  = "
+                + MarlinProperties.isDoClipSubdivider());
+        logInfo("sun.java2d.renderer.clip.subdivider.minLength = "
+                + MarlinProperties.getSubdividerMinLength());
+
         // debugging parameters
         logInfo("sun.java2d.renderer.doStats          = "
                 + MarlinConst.DO_STATS);
@@ -1123,6 +1157,8 @@
                 + MarlinConst.LOG_UNSAFE_MALLOC);
 
         // quality settings
+        logInfo("sun.java2d.renderer.curve_len_err    = "
+                + MarlinProperties.getCurveLengthError());
         logInfo("sun.java2d.renderer.cubic_dec_d2     = "
                 + MarlinProperties.getCubicDecD2());
         logInfo("sun.java2d.renderer.cubic_inc_d1     = "
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/java.desktop/share/classes/sun/java2d/marlin/DPathSimplifier.java	Fri Apr 06 03:53:28 2018 +0200
@@ -0,0 +1,136 @@
+/*
+ * Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package sun.java2d.marlin;
+
+final class DPathSimplifier implements DPathConsumer2D {
+
+    // distance threshold in pixels (device)
+    private static final double PIX_THRESHOLD = MarlinProperties.getPathSimplifierPixelTolerance();
+
+    private static final double SQUARE_TOLERANCE = PIX_THRESHOLD * PIX_THRESHOLD;
+
+    // members:
+    private DPathConsumer2D delegate;
+    private double cx, cy;
+
+    DPathSimplifier() {
+    }
+
+    DPathSimplifier init(final DPathConsumer2D delegate) {
+        this.delegate = delegate;
+        return this; // fluent API
+    }
+
+    @Override
+    public void pathDone() {
+        delegate.pathDone();
+    }
+
+    @Override
+    public void closePath() {
+        delegate.closePath();
+    }
+
+    @Override
+    public long getNativeConsumer() {
+        return 0;
+    }
+
+    @Override
+    public void quadTo(final double x1, final double y1,
+                       final double xe, final double ye)
+    {
+        // Test if curve is too small:
+        double dx = (xe - cx);
+        double dy = (ye - cy);
+
+        if ((dx * dx + dy * dy) <= SQUARE_TOLERANCE) {
+            // check control points P1:
+            dx = (x1 - cx);
+            dy = (y1 - cy);
+
+            if ((dx * dx + dy * dy) <= SQUARE_TOLERANCE) {
+                return;
+            }
+        }
+        delegate.quadTo(x1, y1, xe, ye);
+        // final end point:
+        cx = xe;
+        cy = ye;
+    }
+
+    @Override
+    public void curveTo(final double x1, final double y1,
+                        final double x2, final double y2,
+                        final double xe, final double ye)
+    {
+        // Test if curve is too small:
+        double dx = (xe - cx);
+        double dy = (ye - cy);
+
+        if ((dx * dx + dy * dy) <= SQUARE_TOLERANCE) {
+            // check control points P1:
+            dx = (x1 - cx);
+            dy = (y1 - cy);
+
+            if ((dx * dx + dy * dy) <= SQUARE_TOLERANCE) {
+                // check control points P2:
+                dx = (x2 - cx);
+                dy = (y2 - cy);
+
+                if ((dx * dx + dy * dy) <= SQUARE_TOLERANCE) {
+                    return;
+                }
+            }
+        }
+        delegate.curveTo(x1, y1, x2, y2, xe, ye);
+        // final end point:
+        cx = xe;
+        cy = ye;
+    }
+
+    @Override
+    public void moveTo(final double xe, final double ye) {
+        delegate.moveTo(xe, ye);
+        // starting point:
+        cx = xe;
+        cy = ye;
+    }
+
+    @Override
+    public void lineTo(final double xe, final double ye) {
+        // Test if segment is too small:
+        double dx = (xe - cx);
+        double dy = (ye - cy);
+
+        if ((dx * dx + dy * dy) <= SQUARE_TOLERANCE) {
+            return;
+        }
+        delegate.lineTo(xe, ye);
+        // final end point:
+        cx = xe;
+        cy = ye;
+    }
+}
--- a/src/java.desktop/share/classes/sun/java2d/marlin/DRenderer.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.desktop/share/classes/sun/java2d/marlin/DRenderer.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -53,9 +53,9 @@
     private static final int SUBPIXEL_TILE
         = TILE_H << SUBPIXEL_LG_POSITIONS_Y;
 
-    // 2048 (pixelSize) pixels (height) x 8 subpixels = 64K
+    // 2176 pixels (height) x 8 subpixels = 68K
     static final int INITIAL_BUCKET_ARRAY
-        = INITIAL_PIXEL_DIM * SUBPIXEL_POSITIONS_Y;
+        = INITIAL_PIXEL_HEIGHT * SUBPIXEL_POSITIONS_Y;
 
     // crossing capacity = edges count / 4 ~ 1024
     static final int INITIAL_CROSSING_COUNT = INITIAL_EDGES_COUNT >> 2;
@@ -76,13 +76,17 @@
     // curve break into lines
     // cubic error in subpixels to decrement step
     private static final double CUB_DEC_ERR_SUBPIX
-        = MarlinProperties.getCubicDecD2() * (NORM_SUBPIXELS / 8.0d); // 1 pixel
+        = MarlinProperties.getCubicDecD2() * (SUBPIXEL_POSITIONS_X / 8.0d); // 1.0 / 8th pixel
     // cubic error in subpixels to increment step
     private static final double CUB_INC_ERR_SUBPIX
-        = MarlinProperties.getCubicIncD1() * (NORM_SUBPIXELS / 8.0d); // 0.4 pixel
+        = MarlinProperties.getCubicIncD1() * (SUBPIXEL_POSITIONS_X / 8.0d); // 0.4 / 8th pixel
+    // scale factor for Y-axis contribution to quad / cubic errors:
+    public static final double SCALE_DY = ((double) SUBPIXEL_POSITIONS_X) / SUBPIXEL_POSITIONS_Y;
 
     // TestNonAARasterization (JDK-8170879): cubics
     // bad paths (59294/100000 == 59,29%, 94335 bad pixels (avg = 1,59), 3966 warnings (avg = 0,07)
+// 2018
+    // 1.0 / 0.2: bad paths (67194/100000 == 67,19%, 117394 bad pixels (avg = 1,75 - max =  9), 4042 warnings (avg = 0,06)
 
     // cubic bind length to decrement step
     public static final double CUB_DEC_BND
@@ -109,10 +113,12 @@
     // quad break into lines
     // quadratic error in subpixels
     private static final double QUAD_DEC_ERR_SUBPIX
-        = MarlinProperties.getQuadDecD2() * (NORM_SUBPIXELS / 8.0d); // 0.5 pixel
+        = MarlinProperties.getQuadDecD2() * (SUBPIXEL_POSITIONS_X / 8.0d); // 0.5 / 8th pixel
 
     // TestNonAARasterization (JDK-8170879): quads
     // bad paths (62916/100000 == 62,92%, 103818 bad pixels (avg = 1,65), 6514 warnings (avg = 0,10)
+// 2018
+    // 0.50px  = bad paths (62915/100000 == 62,92%, 103810 bad pixels (avg = 1,65), 6512 warnings (avg = 0,10)
 
     // quadratic bind length to decrement step
     public static final double QUAD_DEC_BND
@@ -179,7 +185,7 @@
         int count = 1; // dt = 1 / count
 
         // maximum(ddX|Y) = norm(dbx, dby) * dt^2 (= 1)
-        double maxDD = Math.abs(c.dbx) + Math.abs(c.dby);
+        double maxDD = Math.abs(c.dbx) + Math.abs(c.dby) * SCALE_DY;
 
         final double _DEC_BND = QUAD_DEC_BND;
 
@@ -193,7 +199,8 @@
             }
         }
 
-        int nL = 0; // line count
+        final int nL = count; // line count
+
         if (count > 1) {
             final double icount = 1.0d / count; // dt
             final double icount2 = icount * icount; // dt^2
@@ -203,17 +210,12 @@
             double dx = c.bx * icount2 + c.cx * icount;
             double dy = c.by * icount2 + c.cy * icount;
 
-            double x1, y1;
-
-            while (--count > 0) {
-                x1 = x0 + dx;
-                dx += ddx;
-                y1 = y0 + dy;
-                dy += ddy;
+            // we use x0, y0 to walk the line
+            for (double x1 = x0, y1 = y0; --count > 0; dx += ddx, dy += ddy) {
+                x1 += dx;
+                y1 += dy;
 
                 addLine(x0, y0, x1, y1);
-
-                if (DO_STATS) { nL++; }
                 x0 = x1;
                 y0 = y1;
             }
@@ -221,7 +223,7 @@
         addLine(x0, y0, x2, y2);
 
         if (DO_STATS) {
-            rdrCtx.stats.stat_rdr_quadBreak.add(nL + 1);
+            rdrCtx.stats.stat_rdr_quadBreak.add(nL);
         }
     }
 
@@ -234,7 +236,7 @@
                                            final DCurve c,
                                            final double x3, final double y3)
     {
-        int count           = CUB_COUNT;
+        int count            = CUB_COUNT;
         final double icount  = CUB_INV_COUNT;   // dt
         final double icount2 = CUB_INV_COUNT_2; // dt^2
         final double icount3 = CUB_INV_COUNT_3; // dt^3
@@ -249,16 +251,35 @@
         dx = c.ax * icount3 + c.bx * icount2 + c.cx * icount;
         dy = c.ay * icount3 + c.by * icount2 + c.cy * icount;
 
-        // we use x0, y0 to walk the line
-        double x1 = x0, y1 = y0;
         int nL = 0; // line count
 
         final double _DEC_BND = CUB_DEC_BND;
         final double _INC_BND = CUB_INC_BND;
+        final double _SCALE_DY = SCALE_DY;
 
-        while (count > 0) {
+        // we use x0, y0 to walk the line
+        for (double x1 = x0, y1 = y0; count > 0; ) {
+            // inc / dec => ratio ~ 5 to minimize upscale / downscale but minimize edges
+
+            // double step:
+            // can only do this on even "count" values, because we must divide count by 2
+            while ((count % 2 == 0)
+                    && ((Math.abs(ddx) + Math.abs(ddy) * _SCALE_DY) <= _INC_BND)) {
+                dx = 2.0d * dx + ddx;
+                dy = 2.0d * dy + ddy;
+                ddx = 4.0d * (ddx + dddx);
+                ddy = 4.0d * (ddy + dddy);
+                dddx *= 8.0d;
+                dddy *= 8.0d;
+
+                count >>= 1;
+                if (DO_STATS) {
+                    rdrCtx.stats.stat_rdr_curveBreak_inc.add(count);
+                }
+            }
+
             // divide step by half:
-            while (Math.abs(ddx) + Math.abs(ddy) >= _DEC_BND) {
+            while ((Math.abs(ddx) + Math.abs(ddy) * _SCALE_DY) >= _DEC_BND) {
                 dddx /= 8.0d;
                 dddy /= 8.0d;
                 ddx = ddx / 4.0d - dddx;
@@ -271,44 +292,25 @@
                     rdrCtx.stats.stat_rdr_curveBreak_dec.add(count);
                 }
             }
-
-            // double step:
-            // can only do this on even "count" values, because we must divide count by 2
-            while (count % 2 == 0
-                   && Math.abs(dx) + Math.abs(dy) <= _INC_BND)
-            {
-                dx = 2.0d * dx + ddx;
-                dy = 2.0d * dy + ddy;
-                ddx = 4.0d * (ddx + dddx);
-                ddy = 4.0d * (ddy + dddy);
-                dddx *= 8.0d;
-                dddy *= 8.0d;
-
-                count >>= 1;
-                if (DO_STATS) {
-                    rdrCtx.stats.stat_rdr_curveBreak_inc.add(count);
-                }
-            }
-            if (--count > 0) {
-                x1 += dx;
-                dx += ddx;
-                ddx += dddx;
-                y1 += dy;
-                dy += ddy;
-                ddy += dddy;
-            } else {
-                x1 = x3;
-                y1 = y3;
+            if (--count == 0) {
+                break;
             }
 
-            addLine(x0, y0, x1, y1);
+            x1 += dx;
+            y1 += dy;
+            dx += ddx;
+            dy += ddy;
+            ddx += dddx;
+            ddy += dddy;
 
-            if (DO_STATS) { nL++; }
+            addLine(x0, y0, x1, y1);
             x0 = x1;
             y0 = y1;
         }
+        addLine(x0, y0, x3, y3);
+
         if (DO_STATS) {
-            rdrCtx.stats.stat_rdr_curveBreak.add(nL);
+            rdrCtx.stats.stat_rdr_curveBreak.add(nL + 1);
         }
     }
 
@@ -533,8 +535,8 @@
         edgeBuckets      = edgeBuckets_ref.initial;
         edgeBucketCounts = edgeBucketCounts_ref.initial;
 
-        // 2048 (pixelsize) pixel large
-        alphaLine_ref = rdrCtx.newCleanIntArrayRef(INITIAL_AA_ARRAY); // 8K
+        // 4096 pixels large
+        alphaLine_ref = rdrCtx.newCleanIntArrayRef(INITIAL_AA_ARRAY); // 16K
         alphaLine     = alphaLine_ref.initial;
 
         crossings_ref     = rdrCtx.newDirtyIntArrayRef(INITIAL_CROSSING_COUNT); // 2K
@@ -692,8 +694,10 @@
     {
         final double xe = tosubpixx(pix_x3);
         final double ye = tosubpixy(pix_y3);
-        curve.set(x0, y0, tosubpixx(pix_x1), tosubpixy(pix_y1),
-                  tosubpixx(pix_x2), tosubpixy(pix_y2), xe, ye);
+        curve.set(x0, y0,
+                tosubpixx(pix_x1), tosubpixy(pix_y1),
+                tosubpixx(pix_x2), tosubpixy(pix_y2),
+                xe, ye);
         curveBreakIntoLinesAndAdd(x0, y0, curve, xe, ye);
         x0 = xe;
         y0 = ye;
@@ -705,7 +709,9 @@
     {
         final double xe = tosubpixx(pix_x2);
         final double ye = tosubpixy(pix_y2);
-        curve.set(x0, y0, tosubpixx(pix_x1), tosubpixy(pix_y1), xe, ye);
+        curve.set(x0, y0,
+                tosubpixx(pix_x1), tosubpixy(pix_y1),
+                xe, ye);
         quadBreakIntoLinesAndAdd(x0, y0, curve, xe, ye);
         x0 = xe;
         y0 = ye;
--- a/src/java.desktop/share/classes/sun/java2d/marlin/DRendererContext.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.desktop/share/classes/sun/java2d/marlin/DRendererContext.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -31,6 +31,8 @@
 import sun.java2d.ReentrantContext;
 import sun.java2d.marlin.ArrayCacheConst.CacheStats;
 import sun.java2d.marlin.DMarlinRenderingEngine.NormalizingPathIterator;
+import sun.java2d.marlin.DTransformingPathConsumer2D.CurveBasicMonotonizer;
+import sun.java2d.marlin.DTransformingPathConsumer2D.CurveClipSplitter;
 
 /**
  * This class is a renderer context dedicated to a single thread
@@ -70,6 +72,8 @@
     final DStroker stroker;
     // Simplifies out collinear lines
     final DCollinearSimplifier simplifier = new DCollinearSimplifier();
+    // Simplifies path
+    final DPathSimplifier pathSimplifier = new DPathSimplifier();
     final DDasher dasher;
     final MarlinTileGenerator ptg;
     final MarlinCache cache;
@@ -81,6 +85,10 @@
     boolean closedPath = false;
     // clip rectangle (ymin, ymax, xmin, xmax):
     final double[] clipRect = new double[4];
+    // CurveBasicMonotonizer instance
+    final CurveBasicMonotonizer monotonizer;
+    // CurveClipSplitter instance
+    final CurveClipSplitter curveClipSplitter;
 
     // Array caches:
     /* clean int[] cache (zero-filled) = 5 refs */
@@ -124,6 +132,10 @@
         nPCPathIterator = new NormalizingPathIterator.NearestPixelCenter(double6);
         nPQPathIterator  = new NormalizingPathIterator.NearestPixelQuarter(double6);
 
+        // curve monotonizer & clip subdivider (before transformerPC2D init)
+        monotonizer = new CurveBasicMonotonizer(this);
+        curveClipSplitter = new CurveClipSplitter(this);
+
         // MarlinRenderingEngine.TransformingPathConsumer2D
         transformerPC2D = new DTransformingPathConsumer2D(this);
 
--- a/src/java.desktop/share/classes/sun/java2d/marlin/DStroker.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.desktop/share/classes/sun/java2d/marlin/DStroker.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,8 @@
 
 import java.util.Arrays;
 import sun.java2d.marlin.DHelpers.PolyStack;
+import sun.java2d.marlin.DTransformingPathConsumer2D.CurveBasicMonotonizer;
+import sun.java2d.marlin.DTransformingPathConsumer2D.CurveClipSplitter;
 
 // TODO: some of the arithmetic here is too verbose and prone to hard to
 // debug typos. We should consider making a small Point/Vector class that
@@ -37,10 +39,9 @@
     private static final int DRAWING_OP_TO = 1; // ie. curve, line, or quad
     private static final int CLOSE = 2;
 
-    // pisces used to use fixed point arithmetic with 16 decimal digits. I
-    // didn't want to change the values of the constant below when I converted
-    // it to floating point, so that's why the divisions by 2^16 are there.
-    private static final double ROUND_JOIN_THRESHOLD = 1000.0d/65536.0d;
+    // round join threshold = 1 subpixel
+    private static final double ERR_JOIN = (1.0f / MIN_SUBPIXELS);
+    private static final double ROUND_JOIN_THRESHOLD = ERR_JOIN * ERR_JOIN;
 
     // kappa = (4/3) * (SQRT(2) - 1)
     private static final double C = (4.0d * (Math.sqrt(2.0d) - 1.0d) / 3.0d);
@@ -48,8 +49,6 @@
     // SQRT(2)
     private static final double SQRT_2 = Math.sqrt(2.0d);
 
-    private static final int MAX_N_CURVES = 11;
-
     private DPathConsumer2D out;
 
     private int capStyle;
@@ -80,12 +79,8 @@
 
     private final PolyStack reverse;
 
-    // This is where the curve to be processed is put. We give it
-    // enough room to store all curves.
-    private final double[] middle = new double[MAX_N_CURVES * 6 + 2];
     private final double[] lp = new double[8];
     private final double[] rp = new double[8];
-    private final double[] subdivTs = new double[MAX_N_CURVES - 1];
 
     // per-thread renderer context
     final DRendererContext rdrCtx;
@@ -106,6 +101,11 @@
     private boolean opened = false;
     // flag indicating if the starting point's cap is done
     private boolean capStart = false;
+    // flag indicating to monotonize curves
+    private boolean monotonize;
+
+    private boolean subdivide = false;
+    private final CurveClipSplitter curveSplitter;
 
     /**
      * Constructs a <code>DStroker</code>.
@@ -124,6 +124,7 @@
             : new PolyStack(rdrCtx);
 
         this.curve = rdrCtx.curve;
+        this.curveSplitter = rdrCtx.curveClipSplitter;
     }
 
     /**
@@ -139,6 +140,7 @@
      * <code>JOIN_BEVEL</code>.
      * @param miterLimit the desired miter limit
      * @param scale scaling factor applied to clip boundaries
+     * @param subdivideCurves true to indicate to subdivide curves, false if dasher does
      * @return this instance
      */
     DStroker init(final DPathConsumer2D pc2d,
@@ -146,12 +148,15 @@
                   final int capStyle,
                   final int joinStyle,
                   final double miterLimit,
-                  final double scale)
+                  final double scale,
+                  final boolean subdivideCurves)
     {
         this.out = pc2d;
 
         this.lineWidth2 = lineWidth / 2.0d;
         this.invHalfLineWidth2Sq = 1.0d / (2.0d * lineWidth2 * lineWidth2);
+        this.monotonize = subdivideCurves;
+
         this.capStyle = capStyle;
         this.joinStyle = joinStyle;
 
@@ -189,6 +194,15 @@
             _clipRect[2] -= margin - rdrOffX;
             _clipRect[3] += margin + rdrOffX;
             this.clipRect = _clipRect;
+
+            // initialize curve splitter here for stroker & dasher:
+            if (DO_CLIP_SUBDIVIDER) {
+                subdivide = subdivideCurves;
+                // adjust padded clip rectangle:
+                curveSplitter.init();
+            } else {
+                subdivide = false;
+            }
         } else {
             this.clipRect = null;
             this.cOutCode = 0;
@@ -197,6 +211,12 @@
         return this; // fluent API
     }
 
+    void disableClipping() {
+        this.clipRect = null;
+        this.cOutCode = 0;
+        this.sOutCode = 0;
+    }
+
     /**
      * Disposes this stroker:
      * clean up before reusing this instance
@@ -213,10 +233,8 @@
             Arrays.fill(offset1, 0.0d);
             Arrays.fill(offset2, 0.0d);
             Arrays.fill(miter, 0.0d);
-            Arrays.fill(middle, 0.0d);
             Arrays.fill(lp, 0.0d);
             Arrays.fill(rp, 0.0d);
-            Arrays.fill(subdivTs, 0.0d);
         }
     }
 
@@ -248,19 +266,20 @@
         return dx1 * dy2 <= dy1 * dx2;
     }
 
-    private void drawRoundJoin(double x, double y,
-                               double omx, double omy, double mx, double my,
-                               boolean rev,
-                               double threshold)
+    private void mayDrawRoundJoin(double cx, double cy,
+                                  double omx, double omy,
+                                  double mx, double my,
+                                  boolean rev)
     {
         if ((omx == 0.0d && omy == 0.0d) || (mx == 0.0d && my == 0.0d)) {
             return;
         }
 
-        double domx = omx - mx;
-        double domy = omy - my;
-        double len = domx*domx + domy*domy;
-        if (len < threshold) {
+        final double domx = omx - mx;
+        final double domy = omy - my;
+        final double lenSq = domx*domx + domy*domy;
+
+        if (lenSq < ROUND_JOIN_THRESHOLD) {
             return;
         }
 
@@ -270,7 +289,7 @@
             mx  = -mx;
             my  = -my;
         }
-        drawRoundJoin(x, y, omx, omy, mx, my, rev);
+        drawRoundJoin(cx, cy, omx, omy, mx, my, rev);
     }
 
     private void drawRoundJoin(double cx, double cy,
@@ -381,7 +400,7 @@
                                      final double x1, final double y1,
                                      final double x0p, final double y0p,
                                      final double x1p, final double y1p,
-                                     final double[] m, int off)
+                                     final double[] m)
     {
         double x10 = x1 - x0;
         double y10 = y1 - y0;
@@ -400,8 +419,8 @@
         double den = x10*y10p - x10p*y10;
         double t = x10p*(y0-y0p) - y10p*(x0-x0p);
         t /= den;
-        m[off++] = x0 + t*x10;
-        m[off]   = y0 + t*y10;
+        m[0] = x0 + t*x10;
+        m[1] = y0 + t*y10;
     }
 
     // Return the intersection point of the lines (x0, y0) -> (x1, y1)
@@ -410,7 +429,7 @@
                                          final double x1, final double y1,
                                          final double x0p, final double y0p,
                                          final double x1p, final double y1p,
-                                         final double[] m, int off)
+                                         final double[] m)
     {
         double x10 = x1 - x0;
         double y10 = y1 - y0;
@@ -428,20 +447,21 @@
         // immediately).
         double den = x10*y10p - x10p*y10;
         if (den == 0.0d) {
-            m[off++] = (x0 + x0p) / 2.0d;
-            m[off]   = (y0 + y0p) / 2.0d;
-            return;
+            m[2] = (x0 + x0p) / 2.0d;
+            m[3] = (y0 + y0p) / 2.0d;
+        } else {
+            double t = x10p*(y0-y0p) - y10p*(x0-x0p);
+            t /= den;
+            m[2] = x0 + t*x10;
+            m[3] = y0 + t*y10;
         }
-        double t = x10p*(y0-y0p) - y10p*(x0-x0p);
-        t /= den;
-        m[off++] = x0 + t*x10;
-        m[off] = y0 + t*y10;
     }
 
     private void drawMiter(final double pdx, final double pdy,
                            final double x0, final double y0,
                            final double dx, final double dy,
-                           double omx, double omy, double mx, double my,
+                           double omx, double omy,
+                           double mx, double my,
                            boolean rev)
     {
         if ((mx == omx && my == omy) ||
@@ -459,8 +479,7 @@
         }
 
         computeMiter((x0 - pdx) + omx, (y0 - pdy) + omy, x0 + omx, y0 + omy,
-                     (dx + x0) + mx, (dy + y0) + my, x0 + mx, y0 + my,
-                     miter, 0);
+                     (dx + x0) + mx, (dy + y0) + my, x0 + mx, y0 + my, miter);
 
         final double miterX = miter[0];
         final double miterY = miter[1];
@@ -478,7 +497,7 @@
 
     @Override
     public void moveTo(final double x0, final double y0) {
-        moveTo(x0, y0, cOutCode);
+        _moveTo(x0, y0, cOutCode);
         // update starting point:
         this.sx0 = x0;
         this.sy0 = y0;
@@ -494,7 +513,7 @@
         }
     }
 
-    private void moveTo(final double x0, final double y0,
+    private void _moveTo(final double x0, final double y0,
                         final int outcode)
     {
         if (prev == MOVE_TO) {
@@ -521,16 +540,40 @@
                         final boolean force)
     {
         final int outcode0 = this.cOutCode;
+
         if (!force && clipRect != null) {
             final int outcode1 = DHelpers.outcode(x1, y1, clipRect);
-            this.cOutCode = outcode1;
+
+            // Should clip
+            final int orCode = (outcode0 | outcode1);
+            if (orCode != 0) {
+                final int sideCode = outcode0 & outcode1;
 
-            // basic rejection criteria
-            if ((outcode0 & outcode1) != 0) {
-                moveTo(x1, y1, outcode0);
-                opened = true;
-                return;
+                // basic rejection criteria:
+                if (sideCode == 0) {
+                    // ovelap clip:
+                    if (subdivide) {
+                        // avoid reentrance
+                        subdivide = false;
+                        // subdivide curve => callback with subdivided parts:
+                        boolean ret = curveSplitter.splitLine(cx0, cy0, x1, y1,
+                                                              orCode, this);
+                        // reentrance is done:
+                        subdivide = true;
+                        if (ret) {
+                            return;
+                        }
+                    }
+                    // already subdivided so render it
+                } else {
+                    this.cOutCode = outcode1;
+                    _moveTo(x1, y1, outcode0);
+                    opened = true;
+                    return;
+                }
             }
+
+            this.cOutCode = outcode1;
         }
 
         double dx = x1 - cx0;
@@ -752,10 +795,7 @@
                 if (joinStyle == JOIN_MITER) {
                     drawMiter(pdx, pdy, x0, y0, dx, dy, omx, omy, mx, my, cw);
                 } else if (joinStyle == JOIN_ROUND) {
-                    drawRoundJoin(x0, y0,
-                                  omx, omy,
-                                  mx, my, cw,
-                                  ROUND_JOIN_THRESHOLD);
+                    mayDrawRoundJoin(x0, y0, omx, omy, mx, my, cw);
                 }
             }
             emitLineTo(x0, y0, !cw);
@@ -765,18 +805,19 @@
 
     private static boolean within(final double x1, final double y1,
                                   final double x2, final double y2,
-                                  final double ERR)
+                                  final double err)
     {
-        assert ERR > 0 : "";
+        assert err > 0 : "";
         // compare taxicab distance. ERR will always be small, so using
         // true distance won't give much benefit
-        return (DHelpers.within(x1, x2, ERR) &&  // we want to avoid calling Math.abs
-                DHelpers.within(y1, y2, ERR)); // this is just as good.
+        return (DHelpers.within(x1, x2, err) && // we want to avoid calling Math.abs
+                DHelpers.within(y1, y2, err));  // this is just as good.
     }
 
-    private void getLineOffsets(double x1, double y1,
-                                double x2, double y2,
-                                double[] left, double[] right) {
+    private void getLineOffsets(final double x1, final double y1,
+                                final double x2, final double y2,
+                                final double[] left, final double[] right)
+    {
         computeOffset(x2 - x1, y2 - y1, lineWidth2, offset0);
         final double mx = offset0[0];
         final double my = offset0[1];
@@ -784,14 +825,16 @@
         left[1] = y1 + my;
         left[2] = x2 + mx;
         left[3] = y2 + my;
+
         right[0] = x1 - mx;
         right[1] = y1 - my;
         right[2] = x2 - mx;
         right[3] = y2 - my;
     }
 
-    private int computeOffsetCubic(double[] pts, final int off,
-                                   double[] leftOff, double[] rightOff)
+    private int computeOffsetCubic(final double[] pts, final int off,
+                                   final double[] leftOff,
+                                   final double[] rightOff)
     {
         // if p1=p2 or p3=p4 it means that the derivative at the endpoint
         // vanishes, which creates problems with computeOffset. Usually
@@ -800,7 +843,7 @@
         // the input curve at the cusp, and passes it to this function.
         // because of inaccuracies in the splitting, we consider points
         // equal if they're very close to each other.
-        final double x1 = pts[off + 0], y1 = pts[off + 1];
+        final double x1 = pts[off    ], y1 = pts[off + 1];
         final double x2 = pts[off + 2], y2 = pts[off + 3];
         final double x3 = pts[off + 4], y3 = pts[off + 5];
         final double x4 = pts[off + 6], y4 = pts[off + 7];
@@ -814,6 +857,7 @@
         // in which case ignore if p1 == p2
         final boolean p1eqp2 = within(x1, y1, x2, y2, 6.0d * Math.ulp(y2));
         final boolean p3eqp4 = within(x3, y3, x4, y4, 6.0d * Math.ulp(y4));
+
         if (p1eqp2 && p3eqp4) {
             getLineOffsets(x1, y1, x4, y4, leftOff, rightOff);
             return 4;
@@ -829,6 +873,7 @@
         double dotsq = (dx1 * dx4 + dy1 * dy4);
         dotsq *= dotsq;
         double l1sq = dx1 * dx1 + dy1 * dy1, l4sq = dx4 * dx4 + dy4 * dy4;
+
         if (DHelpers.within(dotsq, l1sq * l4sq, 4.0d * Math.ulp(dotsq))) {
             getLineOffsets(x1, y1, x4, y4, leftOff, rightOff);
             return 4;
@@ -942,10 +987,11 @@
     // compute offset curves using bezier spline through t=0.5 (i.e.
     // ComputedCurve(0.5) == IdealParallelCurve(0.5))
     // return the kind of curve in the right and left arrays.
-    private int computeOffsetQuad(double[] pts, final int off,
-                                  double[] leftOff, double[] rightOff)
+    private int computeOffsetQuad(final double[] pts, final int off,
+                                  final double[] leftOff,
+                                  final double[] rightOff)
     {
-        final double x1 = pts[off + 0], y1 = pts[off + 1];
+        final double x1 = pts[off    ], y1 = pts[off + 1];
         final double x2 = pts[off + 2], y2 = pts[off + 3];
         final double x3 = pts[off + 4], y3 = pts[off + 5];
 
@@ -966,6 +1012,7 @@
         // in which case ignore.
         final boolean p1eqp2 = within(x1, y1, x2, y2, 6.0d * Math.ulp(y2));
         final boolean p2eqp3 = within(x2, y2, x3, y3, 6.0d * Math.ulp(y3));
+
         if (p1eqp2 || p2eqp3) {
             getLineOffsets(x1, y1, x3, y3, leftOff, rightOff);
             return 4;
@@ -975,6 +1022,7 @@
         double dotsq = (dx1 * dx3 + dy1 * dy3);
         dotsq *= dotsq;
         double l1sq = dx1 * dx1 + dy1 * dy1, l3sq = dx3 * dx3 + dy3 * dy3;
+
         if (DHelpers.within(dotsq, l1sq * l3sq, 4.0d * Math.ulp(dotsq))) {
             getLineOffsets(x1, y1, x3, y3, leftOff, rightOff);
             return 4;
@@ -990,151 +1038,111 @@
         double y1p = y1 + offset0[1]; // point
         double x3p = x3 + offset1[0]; // end
         double y3p = y3 + offset1[1]; // point
-        safeComputeMiter(x1p, y1p, x1p+dx1, y1p+dy1, x3p, y3p, x3p-dx3, y3p-dy3, leftOff, 2);
+        safeComputeMiter(x1p, y1p, x1p+dx1, y1p+dy1, x3p, y3p, x3p-dx3, y3p-dy3, leftOff);
         leftOff[0] = x1p; leftOff[1] = y1p;
         leftOff[4] = x3p; leftOff[5] = y3p;
 
         x1p = x1 - offset0[0]; y1p = y1 - offset0[1];
         x3p = x3 - offset1[0]; y3p = y3 - offset1[1];
-        safeComputeMiter(x1p, y1p, x1p+dx1, y1p+dy1, x3p, y3p, x3p-dx3, y3p-dy3, rightOff, 2);
+        safeComputeMiter(x1p, y1p, x1p+dx1, y1p+dy1, x3p, y3p, x3p-dx3, y3p-dy3, rightOff);
         rightOff[0] = x1p; rightOff[1] = y1p;
         rightOff[4] = x3p; rightOff[5] = y3p;
         return 6;
     }
 
-    // finds values of t where the curve in pts should be subdivided in order
-    // to get good offset curves a distance of w away from the middle curve.
-    // Stores the points in ts, and returns how many of them there were.
-    private static int findSubdivPoints(final DCurve c, double[] pts, double[] ts,
-                                        final int type, final double w)
-    {
-        final double x12 = pts[2] - pts[0];
-        final double y12 = pts[3] - pts[1];
-        // if the curve is already parallel to either axis we gain nothing
-        // from rotating it.
-        if (y12 != 0.0d && x12 != 0.0d) {
-            // we rotate it so that the first vector in the control polygon is
-            // parallel to the x-axis. This will ensure that rotated quarter
-            // circles won't be subdivided.
-            final double hypot = Math.sqrt(x12 * x12 + y12 * y12);
-            final double cos = x12 / hypot;
-            final double sin = y12 / hypot;
-            final double x1 = cos * pts[0] + sin * pts[1];
-            final double y1 = cos * pts[1] - sin * pts[0];
-            final double x2 = cos * pts[2] + sin * pts[3];
-            final double y2 = cos * pts[3] - sin * pts[2];
-            final double x3 = cos * pts[4] + sin * pts[5];
-            final double y3 = cos * pts[5] - sin * pts[4];
-
-            switch(type) {
-            case 8:
-                final double x4 = cos * pts[6] + sin * pts[7];
-                final double y4 = cos * pts[7] - sin * pts[6];
-                c.set(x1, y1, x2, y2, x3, y3, x4, y4);
-                break;
-            case 6:
-                c.set(x1, y1, x2, y2, x3, y3);
-                break;
-            default:
-            }
-        } else {
-            c.set(pts, type);
-        }
-
-        int ret = 0;
-        // we subdivide at values of t such that the remaining rotated
-        // curves are monotonic in x and y.
-        ret += c.dxRoots(ts, ret);
-        ret += c.dyRoots(ts, ret);
-        // subdivide at inflection points.
-        if (type == 8) {
-            // quadratic curves can't have inflection points
-            ret += c.infPoints(ts, ret);
-        }
-
-        // now we must subdivide at points where one of the offset curves will have
-        // a cusp. This happens at ts where the radius of curvature is equal to w.
-        ret += c.rootsOfROCMinusW(ts, ret, w, 0.0001d);
-
-        ret = DHelpers.filterOutNotInAB(ts, 0, ret, 0.0001d, 0.9999d);
-        DHelpers.isort(ts, 0, ret);
-        return ret;
-    }
-
     @Override
     public void curveTo(final double x1, final double y1,
                         final double x2, final double y2,
                         final double x3, final double y3)
     {
         final int outcode0 = this.cOutCode;
+
         if (clipRect != null) {
+            final int outcode1 = DHelpers.outcode(x1, y1, clipRect);
+            final int outcode2 = DHelpers.outcode(x2, y2, clipRect);
             final int outcode3 = DHelpers.outcode(x3, y3, clipRect);
-            this.cOutCode = outcode3;
+
+            // Should clip
+            final int orCode = (outcode0 | outcode1 | outcode2 | outcode3);
+            if (orCode != 0) {
+                final int sideCode = outcode0 & outcode1 & outcode2 & outcode3;
 
-            if ((outcode0 & outcode3) != 0) {
-                final int outcode1 = DHelpers.outcode(x1, y1, clipRect);
-                final int outcode2 = DHelpers.outcode(x2, y2, clipRect);
-
-                // basic rejection criteria
-                if ((outcode0 & outcode1 & outcode2 & outcode3) != 0) {
-                    moveTo(x3, y3, outcode0);
+                // basic rejection criteria:
+                if (sideCode == 0) {
+                    // ovelap clip:
+                    if (subdivide) {
+                        // avoid reentrance
+                        subdivide = false;
+                        // subdivide curve => callback with subdivided parts:
+                        boolean ret = curveSplitter.splitCurve(cx0, cy0, x1, y1,
+                                                               x2, y2, x3, y3,
+                                                               orCode, this);
+                        // reentrance is done:
+                        subdivide = true;
+                        if (ret) {
+                            return;
+                        }
+                    }
+                    // already subdivided so render it
+                } else {
+                    this.cOutCode = outcode3;
+                    _moveTo(x3, y3, outcode0);
                     opened = true;
                     return;
                 }
             }
+
+            this.cOutCode = outcode3;
         }
-
-        final double[] mid = middle;
+        _curveTo(x1, y1, x2, y2, x3, y3, outcode0);
+    }
 
-        mid[0] = cx0; mid[1] = cy0;
-        mid[2] = x1;  mid[3] = y1;
-        mid[4] = x2;  mid[5] = y2;
-        mid[6] = x3;  mid[7] = y3;
-
+    private void _curveTo(final double x1, final double y1,
+                          final double x2, final double y2,
+                          final double x3, final double y3,
+                          final int outcode0)
+    {
         // need these so we can update the state at the end of this method
-        final double xf = x3, yf = y3;
-        double dxs = mid[2] - mid[0];
-        double dys = mid[3] - mid[1];
-        double dxf = mid[6] - mid[4];
-        double dyf = mid[7] - mid[5];
+        double dxs = x1 - cx0;
+        double dys = y1 - cy0;
+        double dxf = x3 - x2;
+        double dyf = y3 - y2;
 
-        boolean p1eqp2 = (dxs == 0.0d && dys == 0.0d);
-        boolean p3eqp4 = (dxf == 0.0d && dyf == 0.0d);
-        if (p1eqp2) {
-            dxs = mid[4] - mid[0];
-            dys = mid[5] - mid[1];
-            if (dxs == 0.0d && dys == 0.0d) {
-                dxs = mid[6] - mid[0];
-                dys = mid[7] - mid[1];
+        if ((dxs == 0.0d) && (dys == 0.0d)) {
+            dxs = x2 - cx0;
+            dys = y2 - cy0;
+            if ((dxs == 0.0d) && (dys == 0.0d)) {
+                dxs = x3 - cx0;
+                dys = y3 - cy0;
             }
         }
-        if (p3eqp4) {
-            dxf = mid[6] - mid[2];
-            dyf = mid[7] - mid[3];
-            if (dxf == 0.0d && dyf == 0.0d) {
-                dxf = mid[6] - mid[0];
-                dyf = mid[7] - mid[1];
+        if ((dxf == 0.0d) && (dyf == 0.0d)) {
+            dxf = x3 - x1;
+            dyf = y3 - y1;
+            if ((dxf == 0.0d) && (dyf == 0.0d)) {
+                dxf = x3 - cx0;
+                dyf = y3 - cy0;
             }
         }
-        if (dxs == 0.0d && dys == 0.0d) {
+        if ((dxs == 0.0d) && (dys == 0.0d)) {
             // this happens if the "curve" is just a point
             // fix outcode0 for lineTo() call:
             if (clipRect != null) {
                 this.cOutCode = outcode0;
             }
-            lineTo(mid[0], mid[1]);
+            lineTo(cx0, cy0);
             return;
         }
 
         // if these vectors are too small, normalize them, to avoid future
         // precision problems.
         if (Math.abs(dxs) < 0.1d && Math.abs(dys) < 0.1d) {
-            double len = Math.sqrt(dxs*dxs + dys*dys);
+            final double len = Math.sqrt(dxs * dxs + dys * dys);
             dxs /= len;
             dys /= len;
         }
         if (Math.abs(dxf) < 0.1d && Math.abs(dyf) < 0.1d) {
-            double len = Math.sqrt(dxf*dxf + dyf*dyf);
+            final double len = Math.sqrt(dxf * dxf + dyf * dyf);
             dxf /= len;
             dyf /= len;
         }
@@ -1142,17 +1150,25 @@
         computeOffset(dxs, dys, lineWidth2, offset0);
         drawJoin(cdx, cdy, cx0, cy0, dxs, dys, cmx, cmy, offset0[0], offset0[1], outcode0);
 
-        final int nSplits = findSubdivPoints(curve, mid, subdivTs, 8, lineWidth2);
+        int nSplits = 0;
+        final double[] mid;
+        final double[] l = lp;
+
+        if (monotonize) {
+            // monotonize curve:
+            final CurveBasicMonotonizer monotonizer
+                = rdrCtx.monotonizer.curve(cx0, cy0, x1, y1, x2, y2, x3, y3);
 
-        double prevT = 0.0d;
-        for (int i = 0, off = 0; i < nSplits; i++, off += 6) {
-            final double t = subdivTs[i];
-            DHelpers.subdivideCubicAt((t - prevT) / (1.0d - prevT),
-                                     mid, off, mid, off, mid, off + 6);
-            prevT = t;
+            nSplits = monotonizer.nbSplits;
+            mid = monotonizer.middle;
+        } else {
+            // use left instead:
+            mid = l;
+            mid[0] = cx0; mid[1] = cy0;
+            mid[2] = x1;  mid[3] = y1;
+            mid[4] = x2;  mid[5] = y2;
+            mid[6] = x3;  mid[7] = y3;
         }
-
-        final double[] l = lp;
         final double[] r = rp;
 
         int kind = 0;
@@ -1176,8 +1192,8 @@
         }
 
         this.prev = DRAWING_OP_TO;
-        this.cx0 = xf;
-        this.cy0 = yf;
+        this.cx0 = x3;
+        this.cy0 = y3;
         this.cdx = dxf;
         this.cdy = dyf;
         this.cmx = (l[kind - 2] - r[kind - 2]) / 2.0d;
@@ -1189,74 +1205,101 @@
                        final double x2, final double y2)
     {
         final int outcode0 = this.cOutCode;
+
         if (clipRect != null) {
+            final int outcode1 = DHelpers.outcode(x1, y1, clipRect);
             final int outcode2 = DHelpers.outcode(x2, y2, clipRect);
-            this.cOutCode = outcode2;
+
+            // Should clip
+            final int orCode = (outcode0 | outcode1 | outcode2);
+            if (orCode != 0) {
+                final int sideCode = outcode0 & outcode1 & outcode2;
 
-            if ((outcode0 & outcode2) != 0) {
-                final int outcode1 = DHelpers.outcode(x1, y1, clipRect);
-
-                // basic rejection criteria
-                if ((outcode0 & outcode1 & outcode2) != 0) {
-                    moveTo(x2, y2, outcode0);
+                // basic rejection criteria:
+                if (sideCode == 0) {
+                    // ovelap clip:
+                    if (subdivide) {
+                        // avoid reentrance
+                        subdivide = false;
+                        // subdivide curve => call lineTo() with subdivided curves:
+                        boolean ret = curveSplitter.splitQuad(cx0, cy0, x1, y1,
+                                                              x2, y2, orCode, this);
+                        // reentrance is done:
+                        subdivide = true;
+                        if (ret) {
+                            return;
+                        }
+                    }
+                    // already subdivided so render it
+                } else {
+                    this.cOutCode = outcode2;
+                    _moveTo(x2, y2, outcode0);
                     opened = true;
                     return;
                 }
             }
-        }
-
-        final double[] mid = middle;
 
-        mid[0] = cx0; mid[1] = cy0;
-        mid[2] = x1;  mid[3] = y1;
-        mid[4] = x2;  mid[5] = y2;
+            this.cOutCode = outcode2;
+        }
+        _quadTo(x1, y1, x2, y2, outcode0);
+    }
 
+    private void _quadTo(final double x1, final double y1,
+                         final double x2, final double y2,
+                         final int outcode0)
+    {
         // need these so we can update the state at the end of this method
-        final double xf = x2, yf = y2;
-        double dxs = mid[2] - mid[0];
-        double dys = mid[3] - mid[1];
-        double dxf = mid[4] - mid[2];
-        double dyf = mid[5] - mid[3];
-        if ((dxs == 0.0d && dys == 0.0d) || (dxf == 0.0d && dyf == 0.0d)) {
-            dxs = dxf = mid[4] - mid[0];
-            dys = dyf = mid[5] - mid[1];
+        double dxs = x1 - cx0;
+        double dys = y1 - cy0;
+        double dxf = x2 - x1;
+        double dyf = y2 - y1;
+
+        if (((dxs == 0.0d) && (dys == 0.0d)) || ((dxf == 0.0d) && (dyf == 0.0d))) {
+            dxs = dxf = x2 - cx0;
+            dys = dyf = y2 - cy0;
         }
-        if (dxs == 0.0d && dys == 0.0d) {
+        if ((dxs == 0.0d) && (dys == 0.0d)) {
             // this happens if the "curve" is just a point
             // fix outcode0 for lineTo() call:
             if (clipRect != null) {
                 this.cOutCode = outcode0;
             }
-            lineTo(mid[0], mid[1]);
+            lineTo(cx0, cy0);
             return;
         }
         // if these vectors are too small, normalize them, to avoid future
         // precision problems.
         if (Math.abs(dxs) < 0.1d && Math.abs(dys) < 0.1d) {
-            double len = Math.sqrt(dxs*dxs + dys*dys);
+            final double len = Math.sqrt(dxs * dxs + dys * dys);
             dxs /= len;
             dys /= len;
         }
         if (Math.abs(dxf) < 0.1d && Math.abs(dyf) < 0.1d) {
-            double len = Math.sqrt(dxf*dxf + dyf*dyf);
+            final double len = Math.sqrt(dxf * dxf + dyf * dyf);
             dxf /= len;
             dyf /= len;
         }
-
         computeOffset(dxs, dys, lineWidth2, offset0);
         drawJoin(cdx, cdy, cx0, cy0, dxs, dys, cmx, cmy, offset0[0], offset0[1], outcode0);
 
-        int nSplits = findSubdivPoints(curve, mid, subdivTs, 6, lineWidth2);
+        int nSplits = 0;
+        final double[] mid;
+        final double[] l = lp;
+
+        if (monotonize) {
+            // monotonize quad:
+            final CurveBasicMonotonizer monotonizer
+                = rdrCtx.monotonizer.quad(cx0, cy0, x1, y1, x2, y2);
 
-        double prevt = 0.0d;
-        for (int i = 0, off = 0; i < nSplits; i++, off += 4) {
-            final double t = subdivTs[i];
-            DHelpers.subdivideQuadAt((t - prevt) / (1.0d - prevt),
-                                    mid, off, mid, off, mid, off + 4);
-            prevt = t;
+            nSplits = monotonizer.nbSplits;
+            mid = monotonizer.middle;
+        } else {
+            // use left instead:
+            mid = l;
+            mid[0] = cx0; mid[1] = cy0;
+            mid[2] = x1;  mid[3] = y1;
+            mid[4] = x2;  mid[5] = y2;
         }
-
-        final double[] l = lp;
         final double[] r = rp;
 
         int kind = 0;
@@ -1280,8 +1323,8 @@
         }
 
         this.prev = DRAWING_OP_TO;
-        this.cx0 = xf;
-        this.cy0 = yf;
+        this.cx0 = x2;
+        this.cy0 = y2;
         this.cdx = dxf;
         this.cdy = dyf;
         this.cmx = (l[kind - 2] - r[kind - 2]) / 2.0d;
--- a/src/java.desktop/share/classes/sun/java2d/marlin/DTransformingPathConsumer2D.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.desktop/share/classes/sun/java2d/marlin/DTransformingPathConsumer2D.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -27,11 +27,15 @@
 
 import java.awt.geom.AffineTransform;
 import java.awt.geom.Path2D;
+import java.util.Arrays;
 import sun.java2d.marlin.DHelpers.IndexStack;
 import sun.java2d.marlin.DHelpers.PolyStack;
 
 final class DTransformingPathConsumer2D {
 
+    // smaller uncertainty in double variant
+    static final double CLIP_RECT_PADDING = 0.25d;
+
     private final DRendererContext rdrCtx;
 
     // recycled ClosedPathDetector instance from detectClosedPath()
@@ -56,6 +60,7 @@
     private final PathTracer tracerCPDetector = new PathTracer("ClosedPathDetector");
     private final PathTracer tracerFiller     = new PathTracer("Filler");
     private final PathTracer tracerStroker    = new PathTracer("Stroker");
+    private final PathTracer tracerDasher     = new PathTracer("Dasher");
 
     DTransformingPathConsumer2D(final DRendererContext rdrCtx) {
         // used by RendererContext
@@ -84,6 +89,10 @@
         return tracerStroker.init(out);
     }
 
+    DPathConsumer2D traceDasher(DPathConsumer2D out) {
+        return tracerDasher.init(out);
+    }
+
     DPathConsumer2D detectClosedPath(DPathConsumer2D out) {
         return cpDetector.init(out);
     }
@@ -499,11 +508,19 @@
 
         private boolean outside = false;
 
+        // The current point (TODO stupid repeated info)
+        private double cx0, cy0;
+
         // The current point OUTSIDE
-        private double cx0, cy0;
+        private double cox0, coy0;
+
+        private boolean subdivide = MarlinConst.DO_CLIP_SUBDIVIDER;
+        private final CurveClipSplitter curveSplitter;
 
         PathClipFilter(final DRendererContext rdrCtx) {
             this.clipRect = rdrCtx.clipRect;
+            this.curveSplitter = rdrCtx.curveClipSplitter;
+
             this.stack = (rdrCtx.stats != null) ?
                 new IndexStack(rdrCtx,
                         rdrCtx.stats.stat_pcf_idxstack_indices,
@@ -528,6 +545,11 @@
             _clipRect[2] -= margin - rdrOffX;
             _clipRect[3] += margin + rdrOffX;
 
+            if (MarlinConst.DO_CLIP_SUBDIVIDER) {
+                // adjust padded clip rectangle:
+                curveSplitter.init();
+            }
+
             this.init_corners = true;
             this.gOutCode = MarlinConst.OUTCODE_MASK_T_B_L_R;
 
@@ -578,7 +600,9 @@
                 }
                 stack.pullAll(corners, out);
             }
-            out.lineTo(cx0, cy0);
+            out.lineTo(cox0, coy0);
+            this.cx0 = cox0;
+            this.cy0 = coy0;
         }
 
         @Override
@@ -603,38 +627,68 @@
         public void moveTo(final double x0, final double y0) {
             finishPath();
 
-            final int outcode = DHelpers.outcode(x0, y0, clipRect);
-            this.cOutCode = outcode;
+            this.cOutCode = DHelpers.outcode(x0, y0, clipRect);
             this.outside = false;
             out.moveTo(x0, y0);
+            this.cx0 = x0;
+            this.cy0 = y0;
         }
 
         @Override
         public void lineTo(final double xe, final double ye) {
             final int outcode0 = this.cOutCode;
             final int outcode1 = DHelpers.outcode(xe, ye, clipRect);
-            this.cOutCode = outcode1;
 
-            final int sideCode = (outcode0 & outcode1);
+            // Should clip
+            final int orCode = (outcode0 | outcode1);
+            if (orCode != 0) {
+                final int sideCode = (outcode0 & outcode1);
 
-            // basic rejection criteria:
-            if (sideCode == 0) {
-                this.gOutCode = 0;
-            } else {
-                this.gOutCode &= sideCode;
-                // keep last point coordinate before entering the clip again:
-                this.outside = true;
-                this.cx0 = xe;
-                this.cy0 = ye;
+                // basic rejection criteria:
+                if (sideCode == 0) {
+                    // ovelap clip:
+                    if (subdivide) {
+                        // avoid reentrance
+                        subdivide = false;
+                        boolean ret;
+                        // subdivide curve => callback with subdivided parts:
+                        if (outside) {
+                            ret = curveSplitter.splitLine(cox0, coy0, xe, ye,
+                                                          orCode, this);
+                        } else {
+                            ret = curveSplitter.splitLine(cx0, cy0, xe, ye,
+                                                          orCode, this);
+                        }
+                        // reentrance is done:
+                        subdivide = true;
+                        if (ret) {
+                            return;
+                        }
+                    }
+                    // already subdivided so render it
+                } else {
+                    this.cOutCode = outcode1;
+                    this.gOutCode &= sideCode;
+                    // keep last point coordinate before entering the clip again:
+                    this.outside = true;
+                    this.cox0 = xe;
+                    this.coy0 = ye;
 
-                clip(sideCode, outcode0, outcode1);
-                return;
+                    clip(sideCode, outcode0, outcode1);
+                    return;
+                }
             }
+
+            this.cOutCode = outcode1;
+            this.gOutCode = 0;
+
             if (outside) {
                 finish();
             }
             // clipping disabled:
             out.lineTo(xe, ye);
+            this.cx0 = xe;
+            this.cy0 = ye;
         }
 
         private void clip(final int sideCode,
@@ -654,22 +708,18 @@
                 // add corners to outside stack:
                 switch (tbCode) {
                     case MarlinConst.OUTCODE_TOP:
-// System.out.println("TOP "+ ((off == 0) ? "LEFT" : "RIGHT"));
                         stack.push(off); // top
                         return;
                     case MarlinConst.OUTCODE_BOTTOM:
-// System.out.println("BOTTOM "+ ((off == 0) ? "LEFT" : "RIGHT"));
                         stack.push(off + 1); // bottom
                         return;
                     default:
                         // both TOP / BOTTOM:
                         if ((outcode0 & MarlinConst.OUTCODE_TOP) != 0) {
-// System.out.println("TOP + BOTTOM "+ ((off == 0) ? "LEFT" : "RIGHT"));
                             // top to bottom
                             stack.push(off); // top
                             stack.push(off + 1); // bottom
                         } else {
-// System.out.println("BOTTOM + TOP "+ ((off == 0) ? "LEFT" : "RIGHT"));
                             // bottom to top
                             stack.push(off + 1); // bottom
                             stack.push(off); // top
@@ -684,34 +734,62 @@
                             final double xe, final double ye)
         {
             final int outcode0 = this.cOutCode;
+            final int outcode1 = DHelpers.outcode(x1, y1, clipRect);
+            final int outcode2 = DHelpers.outcode(x2, y2, clipRect);
             final int outcode3 = DHelpers.outcode(xe, ye, clipRect);
-            this.cOutCode = outcode3;
-
-            int sideCode = outcode0 & outcode3;
 
-            if (sideCode == 0) {
-                this.gOutCode = 0;
-            } else {
-                sideCode &= DHelpers.outcode(x1, y1, clipRect);
-                sideCode &= DHelpers.outcode(x2, y2, clipRect);
-                this.gOutCode &= sideCode;
+            // Should clip
+            final int orCode = (outcode0 | outcode1 | outcode2 | outcode3);
+            if (orCode != 0) {
+                final int sideCode = outcode0 & outcode1 & outcode2 & outcode3;
 
                 // basic rejection criteria:
-                if (sideCode != 0) {
+                if (sideCode == 0) {
+                    // ovelap clip:
+                    if (subdivide) {
+                        // avoid reentrance
+                        subdivide = false;
+                        // subdivide curve => callback with subdivided parts:
+                        boolean ret;
+                        if (outside) {
+                            ret = curveSplitter.splitCurve(cox0, coy0, x1, y1,
+                                                           x2, y2, xe, ye,
+                                                           orCode, this);
+                        } else {
+                            ret = curveSplitter.splitCurve(cx0, cy0, x1, y1,
+                                                           x2, y2, xe, ye,
+                                                           orCode, this);
+                        }
+                        // reentrance is done:
+                        subdivide = true;
+                        if (ret) {
+                            return;
+                        }
+                    }
+                    // already subdivided so render it
+                } else {
+                    this.cOutCode = outcode3;
+                    this.gOutCode &= sideCode;
                     // keep last point coordinate before entering the clip again:
                     this.outside = true;
-                    this.cx0 = xe;
-                    this.cy0 = ye;
+                    this.cox0 = xe;
+                    this.coy0 = ye;
 
                     clip(sideCode, outcode0, outcode3);
                     return;
                 }
             }
+
+            this.cOutCode = outcode3;
+            this.gOutCode = 0;
+
             if (outside) {
                 finish();
             }
             // clipping disabled:
             out.curveTo(x1, y1, x2, y2, xe, ye);
+            this.cx0 = xe;
+            this.cy0 = ye;
         }
 
         @Override
@@ -719,33 +797,59 @@
                            final double xe, final double ye)
         {
             final int outcode0 = this.cOutCode;
+            final int outcode1 = DHelpers.outcode(x1, y1, clipRect);
             final int outcode2 = DHelpers.outcode(xe, ye, clipRect);
-            this.cOutCode = outcode2;
-
-            int sideCode = outcode0 & outcode2;
 
-            if (sideCode == 0) {
-                this.gOutCode = 0;
-            } else {
-                sideCode &= DHelpers.outcode(x1, y1, clipRect);
-                this.gOutCode &= sideCode;
+            // Should clip
+            final int orCode = (outcode0 | outcode1 | outcode2);
+            if (orCode != 0) {
+                final int sideCode = outcode0 & outcode1 & outcode2;
 
                 // basic rejection criteria:
-                if (sideCode != 0) {
+                if (sideCode == 0) {
+                    // ovelap clip:
+                    if (subdivide) {
+                        // avoid reentrance
+                        subdivide = false;
+                        // subdivide curve => callback with subdivided parts:
+                        boolean ret;
+                        if (outside) {
+                            ret = curveSplitter.splitQuad(cox0, coy0, x1, y1,
+                                                          xe, ye, orCode, this);
+                        } else {
+                            ret = curveSplitter.splitQuad(cx0, cy0, x1, y1,
+                                                          xe, ye, orCode, this);
+                        }
+                        // reentrance is done:
+                        subdivide = true;
+                        if (ret) {
+                            return;
+                        }
+                    }
+                    // already subdivided so render it
+                } else {
+                    this.cOutCode = outcode2;
+                    this.gOutCode &= sideCode;
                     // keep last point coordinate before entering the clip again:
                     this.outside = true;
-                    this.cx0 = xe;
-                    this.cy0 = ye;
+                    this.cox0 = xe;
+                    this.coy0 = ye;
 
                     clip(sideCode, outcode0, outcode2);
                     return;
                 }
             }
+
+            this.cOutCode = outcode2;
+            this.gOutCode = 0;
+
             if (outside) {
                 finish();
             }
             // clipping disabled:
             out.quadTo(x1, y1, xe, ye);
+            this.cx0 = xe;
+            this.cy0 = ye;
         }
 
         @Override
@@ -754,6 +858,261 @@
         }
     }
 
+    static final class CurveClipSplitter {
+
+        static final double LEN_TH = MarlinProperties.getSubdividerMinLength();
+        static final boolean DO_CHECK_LENGTH = (LEN_TH > 0.0d);
+
+        private static final boolean TRACE = false;
+
+        private static final int MAX_N_CURVES = 3 * 4;
+
+        // clip rectangle (ymin, ymax, xmin, xmax):
+        final double[] clipRect;
+
+        // clip rectangle (ymin, ymax, xmin, xmax) including padding:
+        final double[] clipRectPad = new double[4];
+        private boolean init_clipRectPad = false;
+
+        // This is where the curve to be processed is put. We give it
+        // enough room to store all curves.
+        final double[] middle = new double[MAX_N_CURVES * 8 + 2];
+        // t values at subdivision points
+        private final double[] subdivTs = new double[MAX_N_CURVES];
+
+        // dirty curve
+        private final DCurve curve;
+
+        CurveClipSplitter(final DRendererContext rdrCtx) {
+            this.clipRect = rdrCtx.clipRect;
+            this.curve = rdrCtx.curve;
+        }
+
+        void init() {
+            this.init_clipRectPad = true;
+        }
+
+        private void initPaddedClip() {
+            // bounds as half-open intervals: minX <= x < maxX and minY <= y < maxY
+            // adjust padded clip rectangle (ymin, ymax, xmin, xmax):
+            // add a rounding error (curve subdivision ~ 0.1px):
+            final double[] _clipRect = clipRect;
+            final double[] _clipRectPad = clipRectPad;
+
+            _clipRectPad[0] = _clipRect[0] - CLIP_RECT_PADDING;
+            _clipRectPad[1] = _clipRect[1] + CLIP_RECT_PADDING;
+            _clipRectPad[2] = _clipRect[2] - CLIP_RECT_PADDING;
+            _clipRectPad[3] = _clipRect[3] + CLIP_RECT_PADDING;
+
+            if (TRACE) {
+                MarlinUtils.logInfo("clip: X [" + _clipRectPad[2] + " .. " + _clipRectPad[3] +"] "
+                                        + "Y ["+ _clipRectPad[0] + " .. " + _clipRectPad[1] +"]");
+            }
+        }
+
+        boolean splitLine(final double x0, final double y0,
+                          final double x1, final double y1,
+                          final int outCodeOR,
+                          final DPathConsumer2D out)
+        {
+            if (TRACE) {
+                MarlinUtils.logInfo("divLine P0(" + x0 + ", " + y0 + ") P1(" + x1 + ", " + y1 + ")");
+            }
+
+            if (DO_CHECK_LENGTH && DHelpers.fastLineLen(x0, y0, x1, y1) <= LEN_TH) {
+                return false;
+            }
+
+            final double[] mid = middle;
+            mid[0] = x0;  mid[1] = y0;
+            mid[2] = x1;  mid[3] = y1;
+
+            return subdivideAtIntersections(4, outCodeOR, out);
+        }
+
+        boolean splitQuad(final double x0, final double y0,
+                          final double x1, final double y1,
+                          final double x2, final double y2,
+                          final int outCodeOR,
+                          final DPathConsumer2D out)
+        {
+            if (TRACE) {
+                MarlinUtils.logInfo("divQuad P0(" + x0 + ", " + y0 + ") P1(" + x1 + ", " + y1 + ") P2(" + x2 + ", " + y2 + ")");
+            }
+
+            if (DO_CHECK_LENGTH && DHelpers.fastQuadLen(x0, y0, x1, y1, x2, y2) <= LEN_TH) {
+                return false;
+            }
+
+            final double[] mid = middle;
+            mid[0] = x0;  mid[1] = y0;
+            mid[2] = x1;  mid[3] = y1;
+            mid[4] = x2;  mid[5] = y2;
+
+            return subdivideAtIntersections(6, outCodeOR, out);
+        }
+
+        boolean splitCurve(final double x0, final double y0,
+                           final double x1, final double y1,
+                           final double x2, final double y2,
+                           final double x3, final double y3,
+                           final int outCodeOR,
+                           final DPathConsumer2D out)
+        {
+            if (TRACE) {
+                MarlinUtils.logInfo("divCurve P0(" + x0 + ", " + y0 + ") P1(" + x1 + ", " + y1 + ") P2(" + x2 + ", " + y2 + ") P3(" + x3 + ", " + y3 + ")");
+            }
+
+            if (DO_CHECK_LENGTH && DHelpers.fastCurvelen(x0, y0, x1, y1, x2, y2, x3, y3) <= LEN_TH) {
+                return false;
+            }
+
+            final double[] mid = middle;
+            mid[0] = x0;  mid[1] = y0;
+            mid[2] = x1;  mid[3] = y1;
+            mid[4] = x2;  mid[5] = y2;
+            mid[6] = x3;  mid[7] = y3;
+
+            return subdivideAtIntersections(8, outCodeOR, out);
+        }
+
+        private boolean subdivideAtIntersections(final int type, final int outCodeOR,
+                                                 final DPathConsumer2D out)
+        {
+            final double[] mid = middle;
+            final double[] subTs = subdivTs;
+
+            if (init_clipRectPad) {
+                init_clipRectPad = false;
+                initPaddedClip();
+            }
+
+            final int nSplits = DHelpers.findClipPoints(curve, mid, subTs, type,
+                                                        outCodeOR, clipRectPad);
+
+            if (TRACE) {
+                MarlinUtils.logInfo("nSplits: "+ nSplits);
+                MarlinUtils.logInfo("subTs: "+Arrays.toString(Arrays.copyOfRange(subTs, 0, nSplits)));
+            }
+            if (nSplits == 0) {
+                // only curve support shortcut
+                return false;
+            }
+            double prevT = 0.0d;
+
+            for (int i = 0, off = 0; i < nSplits; i++, off += type) {
+                final double t = subTs[i];
+
+                DHelpers.subdivideAt((t - prevT) / (1.0d - prevT),
+                                     mid, off, mid, off, type);
+                prevT = t;
+            }
+
+            for (int i = 0, off = 0; i <= nSplits; i++, off += type) {
+                if (TRACE) {
+                    MarlinUtils.logInfo("Part Curve "+Arrays.toString(Arrays.copyOfRange(mid, off, off + type)));
+                }
+                emitCurrent(type, mid, off, out);
+            }
+            return true;
+        }
+
+        static void emitCurrent(final int type, final double[] pts,
+                                final int off, final DPathConsumer2D out)
+        {
+            // if instead of switch (perf + most probable cases first)
+            if (type == 8) {
+                out.curveTo(pts[off + 2], pts[off + 3],
+                            pts[off + 4], pts[off + 5],
+                            pts[off + 6], pts[off + 7]);
+            } else if (type == 4) {
+                out.lineTo(pts[off + 2], pts[off + 3]);
+            } else {
+                out.quadTo(pts[off + 2], pts[off + 3],
+                           pts[off + 4], pts[off + 5]);
+            }
+        }
+    }
+
+    static final class CurveBasicMonotonizer {
+
+        private static final int MAX_N_CURVES = 11;
+
+        // squared half line width (for stroker)
+        private double lw2;
+
+        // number of splitted curves
+        int nbSplits;
+
+        // This is where the curve to be processed is put. We give it
+        // enough room to store all curves.
+        final double[] middle = new double[MAX_N_CURVES * 6 + 2];
+        // t values at subdivision points
+        private final double[] subdivTs = new double[MAX_N_CURVES - 1];
+
+        // dirty curve
+        private final DCurve curve;
+
+        CurveBasicMonotonizer(final DRendererContext rdrCtx) {
+            this.curve = rdrCtx.curve;
+        }
+
+        void init(final double lineWidth) {
+            this.lw2 = (lineWidth * lineWidth) / 4.0d;
+        }
+
+        CurveBasicMonotonizer curve(final double x0, final double y0,
+                                    final double x1, final double y1,
+                                    final double x2, final double y2,
+                                    final double x3, final double y3)
+        {
+            final double[] mid = middle;
+            mid[0] = x0;  mid[1] = y0;
+            mid[2] = x1;  mid[3] = y1;
+            mid[4] = x2;  mid[5] = y2;
+            mid[6] = x3;  mid[7] = y3;
+
+            final double[] subTs = subdivTs;
+            final int nSplits = DHelpers.findSubdivPoints(curve, mid, subTs, 8, lw2);
+
+            double prevT = 0.0d;
+            for (int i = 0, off = 0; i < nSplits; i++, off += 6) {
+                final double t = subTs[i];
+
+                DHelpers.subdivideCubicAt((t - prevT) / (1.0d - prevT),
+                                          mid, off, mid, off, off + 6);
+                prevT = t;
+            }
+
+            this.nbSplits = nSplits;
+            return this;
+        }
+
+        CurveBasicMonotonizer quad(final double x0, final double y0,
+                                   final double x1, final double y1,
+                                   final double x2, final double y2)
+        {
+            final double[] mid = middle;
+            mid[0] = x0;  mid[1] = y0;
+            mid[2] = x1;  mid[3] = y1;
+            mid[4] = x2;  mid[5] = y2;
+
+            final double[] subTs = subdivTs;
+            final int nSplits = DHelpers.findSubdivPoints(curve, mid, subTs, 6, lw2);
+
+            double prevt = 0.0d;
+            for (int i = 0, off = 0; i < nSplits; i++, off += 4) {
+                final double t = subTs[i];
+                DHelpers.subdivideQuadAt((t - prevt) / (1.0d - prevt),
+                                         mid, off, mid, off, off + 4);
+                prevt = t;
+            }
+
+            this.nbSplits = nSplits;
+            return this;
+        }
+    }
+
     static final class PathTracer implements DPathConsumer2D {
         private final String prefix;
         private DPathConsumer2D out;
@@ -807,7 +1166,7 @@
         }
 
         private void log(final String message) {
-            System.out.println(prefix + message);
+            MarlinUtils.logInfo(prefix + message);
         }
 
         @Override
--- a/src/java.desktop/share/classes/sun/java2d/marlin/Dasher.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.desktop/share/classes/sun/java2d/marlin/Dasher.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,8 @@
 
 import java.util.Arrays;
 import sun.awt.geom.PathConsumer2D;
+import sun.java2d.marlin.TransformingPathConsumer2D.CurveBasicMonotonizer;
+import sun.java2d.marlin.TransformingPathConsumer2D.CurveClipSplitter;
 
 /**
  * The <code>Dasher</code> class takes a series of linear commands
@@ -41,8 +43,9 @@
  */
 final class Dasher implements PathConsumer2D, MarlinConst {
 
-    static final int REC_LIMIT = 4;
-    static final float ERR = 0.01f;
+    /* huge circle with radius ~ 2E9 only needs 12 subdivision levels */
+    static final int REC_LIMIT = 16;
+    static final float CURVE_LEN_ERR = MarlinProperties.getCurveLengthError(); // 0.01
     static final float MIN_T_INC = 1.0f / (1 << REC_LIMIT);
 
     // More than 24 bits of mantissa means we can no longer accurately
@@ -64,8 +67,10 @@
     private boolean dashOn;
     private float phase;
 
-    private float sx, sy;
-    private float x0, y0;
+    // The starting point of the path
+    private float sx0, sy0;
+    // the current point
+    private float cx0, cy0;
 
     // temporary storage for the current curve
     private final float[] curCurvepts;
@@ -76,11 +81,34 @@
     // flag to recycle dash array copy
     boolean recycleDashes;
 
+    // We don't emit the first dash right away. If we did, caps would be
+    // drawn on it, but we need joins to be drawn if there's a closePath()
+    // So, we store the path elements that make up the first dash in the
+    // buffer below.
+    private float[] firstSegmentsBuffer; // dynamic array
+    private int firstSegidx;
+
     // dashes ref (dirty)
     final FloatArrayCache.Reference dashes_ref;
     // firstSegmentsBuffer ref (dirty)
     final FloatArrayCache.Reference firstSegmentsBuffer_ref;
 
+    // Bounds of the drawing region, at pixel precision.
+    private float[] clipRect;
+
+    // the outcode of the current point
+    private int cOutCode = 0;
+
+    private boolean subdivide = DO_CLIP_SUBDIVIDER;
+
+    private final LengthIterator li = new LengthIterator();
+
+    private final CurveClipSplitter curveSplitter;
+
+    private float cycleLen;
+    private boolean outside;
+    private float totalSkipLen;
+
     /**
      * Constructs a <code>Dasher</code>.
      * @param rdrCtx per-thread renderer context
@@ -96,6 +124,8 @@
         // we need curCurvepts to be able to contain 2 curves because when
         // dashing curves, we need to subdivide it
         curCurvepts = new float[8 * 2];
+
+        this.curveSplitter = rdrCtx.curveClipSplitter;
     }
 
     /**
@@ -116,10 +146,13 @@
         // Normalize so 0 <= phase < dash[0]
         int sidx = 0;
         dashOn = true;
+
         float sum = 0.0f;
         for (float d : dash) {
             sum += d;
         }
+        this.cycleLen = sum;
+
         float cycles = phase / sum;
         if (phase < 0.0f) {
             if (-cycles >= MAX_CYCLES) {
@@ -168,6 +201,12 @@
 
         this.recycleDashes = recycleDashes;
 
+        if (rdrCtx.doClip) {
+            this.clipRect = rdrCtx.clipRect;
+        } else {
+            this.clipRect = null;
+            this.cOutCode = 0;
+        }
         return this; // fluent API
     }
 
@@ -205,33 +244,42 @@
     @Override
     public void moveTo(final float x0, final float y0) {
         if (firstSegidx != 0) {
-            out.moveTo(sx, sy);
+            out.moveTo(sx0, sy0);
             emitFirstSegments();
         }
-        needsMoveTo = true;
+        this.needsMoveTo = true;
         this.idx = startIdx;
         this.dashOn = this.startDashOn;
         this.phase = this.startPhase;
-        this.sx = x0;
-        this.sy = y0;
-        this.x0 = x0;
-        this.y0 = y0;
+        this.cx0 = x0;
+        this.cy0 = y0;
+
+        // update starting point:
+        this.sx0 = x0;
+        this.sy0 = y0;
         this.starting = true;
+
+        if (clipRect != null) {
+            final int outcode = Helpers.outcode(x0, y0, clipRect);
+            this.cOutCode = outcode;
+            this.outside = false;
+            this.totalSkipLen = 0.0f;
+        }
     }
 
     private void emitSeg(float[] buf, int off, int type) {
         switch (type) {
         case 8:
-            out.curveTo(buf[off+0], buf[off+1],
-                        buf[off+2], buf[off+3],
-                        buf[off+4], buf[off+5]);
+            out.curveTo(buf[off    ], buf[off + 1],
+                        buf[off + 2], buf[off + 3],
+                        buf[off + 4], buf[off + 5]);
             return;
         case 6:
-            out.quadTo(buf[off+0], buf[off+1],
-                       buf[off+2], buf[off+3]);
+            out.quadTo(buf[off    ], buf[off + 1],
+                       buf[off + 2], buf[off + 3]);
             return;
         case 4:
-            out.lineTo(buf[off], buf[off+1]);
+            out.lineTo(buf[off], buf[off + 1]);
             return;
         default:
         }
@@ -247,12 +295,6 @@
         }
         firstSegidx = 0;
     }
-    // We don't emit the first dash right away. If we did, caps would be
-    // drawn on it, but we need joins to be drawn if there's a closePath()
-    // So, we store the path elements that make up the first dash in the
-    // buffer below.
-    private float[] firstSegmentsBuffer; // dynamic array
-    private int firstSegidx;
 
     // precondition: pts must be in relative coordinates (relative to x0,y0)
     private void goTo(final float[] pts, final int off, final int type,
@@ -268,7 +310,7 @@
             } else {
                 if (needsMoveTo) {
                     needsMoveTo = false;
-                    out.moveTo(x0, y0);
+                    out.moveTo(cx0, cy0);
                 }
                 emitSeg(pts, off, type);
             }
@@ -279,8 +321,8 @@
             }
             needsMoveTo = true;
         }
-        this.x0 = x;
-        this.y0 = y;
+        this.cx0 = x;
+        this.cy0 = y;
     }
 
     private void goTo_starting(final float[] pts, final int off, final int type) {
@@ -306,10 +348,56 @@
 
     @Override
     public void lineTo(final float x1, final float y1) {
-        final float dx = x1 - x0;
-        final float dy = y1 - y0;
+        final int outcode0 = this.cOutCode;
+
+        if (clipRect != null) {
+            final int outcode1 = Helpers.outcode(x1, y1, clipRect);
+
+            // Should clip
+            final int orCode = (outcode0 | outcode1);
+
+            if (orCode != 0) {
+                final int sideCode = outcode0 & outcode1;
 
-        float len = dx*dx + dy*dy;
+                // basic rejection criteria:
+                if (sideCode == 0) {
+                    // ovelap clip:
+                    if (subdivide) {
+                        // avoid reentrance
+                        subdivide = false;
+                        // subdivide curve => callback with subdivided parts:
+                        boolean ret = curveSplitter.splitLine(cx0, cy0, x1, y1,
+                                                              orCode, this);
+                        // reentrance is done:
+                        subdivide = true;
+                        if (ret) {
+                            return;
+                        }
+                    }
+                    // already subdivided so render it
+                } else {
+                    this.cOutCode = outcode1;
+                    skipLineTo(x1, y1);
+                    return;
+                }
+            }
+
+            this.cOutCode = outcode1;
+
+            if (this.outside) {
+                this.outside = false;
+                // Adjust current index, phase & dash:
+                skipLen();
+            }
+        }
+        _lineTo(x1, y1);
+    }
+
+    private void _lineTo(final float x1, final float y1) {
+        final float dx = x1 - cx0;
+        final float dy = y1 - cy0;
+
+        float len = dx * dx + dy * dy;
         if (len == 0.0f) {
             return;
         }
@@ -328,8 +416,7 @@
         boolean _dashOn = dashOn;
         float _phase = phase;
 
-        float leftInThisDashSegment;
-        float d, dashdx, dashdy, p;
+        float leftInThisDashSegment, d;
 
         while (true) {
             d = _dash[_idx];
@@ -350,24 +437,15 @@
                     _idx = (_idx + 1) % _dashLen;
                     _dashOn = !_dashOn;
                 }
-
-                // Save local state:
-                idx = _idx;
-                dashOn = _dashOn;
-                phase = _phase;
-                return;
+                break;
             }
 
-            dashdx = d * cx;
-            dashdy = d * cy;
-
             if (_phase == 0.0f) {
-                _curCurvepts[0] = x0 + dashdx;
-                _curCurvepts[1] = y0 + dashdy;
+                _curCurvepts[0] = cx0 + d * cx;
+                _curCurvepts[1] = cy0 + d * cy;
             } else {
-                p = leftInThisDashSegment / d;
-                _curCurvepts[0] = x0 + p * dashdx;
-                _curCurvepts[1] = y0 + p * dashdy;
+                _curCurvepts[0] = cx0 + leftInThisDashSegment * cx;
+                _curCurvepts[1] = cy0 + leftInThisDashSegment * cy;
             }
 
             goTo(_curCurvepts, 0, 4, _dashOn);
@@ -378,19 +456,95 @@
             _dashOn = !_dashOn;
             _phase = 0.0f;
         }
+        // Save local state:
+        idx = _idx;
+        dashOn = _dashOn;
+        phase = _phase;
+    }
+
+    private void skipLineTo(final float x1, final float y1) {
+        final float dx = x1 - cx0;
+        final float dy = y1 - cy0;
+
+        float len = dx * dx + dy * dy;
+        if (len != 0.0f) {
+            len = (float)Math.sqrt(len);
+        }
+
+        // Accumulate skipped length:
+        this.outside = true;
+        this.totalSkipLen += len;
+
+        // Fix initial move:
+        this.needsMoveTo = true;
+        this.starting = false;
+
+        this.cx0 = x1;
+        this.cy0 = y1;
     }
 
-    // shared instance in Dasher
-    private final LengthIterator li = new LengthIterator();
+    public void skipLen() {
+        float len = this.totalSkipLen;
+        this.totalSkipLen = 0.0f;
+
+        final float[] _dash = dash;
+        final int _dashLen = this.dashLen;
+
+        int _idx = idx;
+        boolean _dashOn = dashOn;
+        float _phase = phase;
+
+        // -2 to ensure having 2 iterations of the post-loop
+        // to compensate the remaining phase
+        final long fullcycles = (long)Math.floor(len / cycleLen) - 2L;
+
+        if (fullcycles > 0L) {
+            len -= cycleLen * fullcycles;
+
+            final long iterations = fullcycles * _dashLen;
+            _idx = (int) (iterations + _idx) % _dashLen;
+            _dashOn = (iterations + (_dashOn ? 1L : 0L) & 1L) == 1L;
+        }
+
+        float leftInThisDashSegment, d;
+
+        while (true) {
+            d = _dash[_idx];
+            leftInThisDashSegment = d - _phase;
+
+            if (len <= leftInThisDashSegment) {
+                // Advance phase within current dash segment
+                _phase += len;
+
+                // TODO: compare float values using epsilon:
+                if (len == leftInThisDashSegment) {
+                    _phase = 0.0f;
+                    _idx = (_idx + 1) % _dashLen;
+                    _dashOn = !_dashOn;
+                }
+                break;
+            }
+
+            len -= leftInThisDashSegment;
+            // Advance to next dash segment
+            _idx = (_idx + 1) % _dashLen;
+            _dashOn = !_dashOn;
+            _phase = 0.0f;
+        }
+        // Save local state:
+        idx = _idx;
+        dashOn = _dashOn;
+        phase = _phase;
+    }
 
     // preconditions: curCurvepts must be an array of length at least 2 * type,
     // that contains the curve we want to dash in the first type elements
     private void somethingTo(final int type) {
-        if (pointCurve(curCurvepts, type)) {
+        final float[] _curCurvepts = curCurvepts;
+        if (pointCurve(_curCurvepts, type)) {
             return;
         }
         final LengthIterator _li = li;
-        final float[] _curCurvepts = curCurvepts;
         final float[] _dash = dash;
         final int _dashLen = this.dashLen;
 
@@ -402,17 +556,16 @@
 
         // initially the current curve is at curCurvepts[0...type]
         int curCurveoff = 0;
-        float lastSplitT = 0.0f;
+        float prevT = 0.0f;
         float t;
         float leftInThisDashSegment = _dash[_idx] - _phase;
 
         while ((t = _li.next(leftInThisDashSegment)) < 1.0f) {
             if (t != 0.0f) {
-                Helpers.subdivideAt((t - lastSplitT) / (1.0f - lastSplitT),
+                Helpers.subdivideAt((t - prevT) / (1.0f - prevT),
                                     _curCurvepts, curCurveoff,
-                                    _curCurvepts, 0,
-                                    _curCurvepts, type, type);
-                lastSplitT = t;
+                                    _curCurvepts, 0, type);
+                prevT = t;
                 goTo(_curCurvepts, 2, type, _dashOn);
                 curCurveoff = type;
             }
@@ -440,7 +593,29 @@
         _li.reset();
     }
 
-    private static boolean pointCurve(float[] curve, int type) {
+    private void skipSomethingTo(final int type) {
+        final float[] _curCurvepts = curCurvepts;
+        if (pointCurve(_curCurvepts, type)) {
+            return;
+        }
+        final LengthIterator _li = li;
+
+        _li.initializeIterationOnCurve(_curCurvepts, type);
+
+        // In contrary to somethingTo(),
+        // just estimate properly the curve length:
+        final float len = _li.totalLength();
+
+        // Accumulate skipped length:
+        this.outside = true;
+        this.totalSkipLen += len;
+
+        // Fix initial move:
+        this.needsMoveTo = true;
+        this.starting = false;
+    }
+
+    private static boolean pointCurve(final float[] curve, final int type) {
         for (int i = 2; i < type; i++) {
             if (curve[i] != curve[i-2]) {
                 return false;
@@ -463,15 +638,14 @@
     // tree; however, the trees we are interested in have the property that
     // every non leaf node has exactly 2 children
     static final class LengthIterator {
-        private enum Side {LEFT, RIGHT}
         // Holds the curves at various levels of the recursion. The root
         // (i.e. the original curve) is at recCurveStack[0] (but then it
         // gets subdivided, the left half is put at 1, so most of the time
         // only the right half of the original curve is at 0)
         private final float[][] recCurveStack; // dirty
-        // sides[i] indicates whether the node at level i+1 in the path from
+        // sidesRight[i] indicates whether the node at level i+1 in the path from
         // the root to the current leaf is a left or right child of its parent.
-        private final Side[] sides; // dirty
+        private final boolean[] sidesRight; // dirty
         private int curveType;
         // lastT and nextT delimit the current leaf.
         private float nextT;
@@ -492,7 +666,7 @@
 
         LengthIterator() {
             this.recCurveStack = new float[REC_LIMIT + 1][8];
-            this.sides = new Side[REC_LIMIT];
+            this.sidesRight = new boolean[REC_LIMIT];
             // if any methods are called without first initializing this object
             // on a curve, we want it to fail ASAP.
             this.nextT = Float.MAX_VALUE;
@@ -514,7 +688,7 @@
                 for (int i = recLimit; i >= 0; i--) {
                     Arrays.fill(recCurveStack[i], 0.0f);
                 }
-                Arrays.fill(sides, Side.LEFT);
+                Arrays.fill(sidesRight, false);
                 Arrays.fill(curLeafCtrlPolyLengths, 0.0f);
                 Arrays.fill(nextRoots, 0.0f);
                 Arrays.fill(flatLeafCoefCache, 0.0f);
@@ -522,7 +696,7 @@
             }
         }
 
-        void initializeIterationOnCurve(float[] pts, int type) {
+        void initializeIterationOnCurve(final float[] pts, final int type) {
             // optimize arraycopy (8 values faster than 6 = type):
             System.arraycopy(pts, 0, recCurveStack[0], 0, 8);
             this.curveType = type;
@@ -534,11 +708,11 @@
             goLeft(); // initializes nextT and lenAtNextT properly
             this.lenAtLastSplit = 0.0f;
             if (recLevel > 0) {
-                this.sides[0] = Side.LEFT;
+                this.sidesRight[0] = false;
                 this.done = false;
             } else {
                 // the root of the tree is a leaf so we're done.
-                this.sides[0] = Side.RIGHT;
+                this.sidesRight[0] = true;
                 this.done = true;
             }
             this.lastSegLen = 0.0f;
@@ -547,7 +721,7 @@
         // 0 == false, 1 == true, -1 == invalid cached value.
         private int cachedHaveLowAcceleration = -1;
 
-        private boolean haveLowAcceleration(float err) {
+        private boolean haveLowAcceleration(final float err) {
             if (cachedHaveLowAcceleration == -1) {
                 final float len1 = curLeafCtrlPolyLengths[0];
                 final float len2 = curLeafCtrlPolyLengths[1];
@@ -636,7 +810,7 @@
                 // we use cubicRootsInAB here, because we want only roots in 0, 1,
                 // and our quadratic root finder doesn't filter, so it's just a
                 // matter of convenience.
-                int n = Helpers.cubicRootsInAB(a, b, c, d, nextRoots, 0, 0.0f, 1.0f);
+                final int n = Helpers.cubicRootsInAB(a, b, c, d, nextRoots, 0, 0.0f, 1.0f);
                 if (n == 1 && !Float.isNaN(nextRoots[0])) {
                     t = nextRoots[0];
                 }
@@ -657,6 +831,16 @@
             return t;
         }
 
+        float totalLength() {
+            while (!done) {
+                goToNextLeaf();
+            }
+            // reset LengthIterator:
+            reset();
+
+            return lenAtNextT;
+        }
+
         float lastSegLen() {
             return lastSegLen;
         }
@@ -666,11 +850,11 @@
         private void goToNextLeaf() {
             // We must go to the first ancestor node that has an unvisited
             // right child.
+            final boolean[] _sides = sidesRight;
             int _recLevel = recLevel;
-            final Side[] _sides = sides;
+            _recLevel--;
 
-            _recLevel--;
-            while(_sides[_recLevel] == Side.RIGHT) {
+            while(_sides[_recLevel]) {
                 if (_recLevel == 0) {
                     recLevel = 0;
                     done = true;
@@ -679,19 +863,17 @@
                 _recLevel--;
             }
 
-            _sides[_recLevel] = Side.RIGHT;
+            _sides[_recLevel] = true;
             // optimize arraycopy (8 values faster than 6 = type):
-            System.arraycopy(recCurveStack[_recLevel], 0,
-                             recCurveStack[_recLevel+1], 0, 8);
-            _recLevel++;
-
+            System.arraycopy(recCurveStack[_recLevel++], 0,
+                             recCurveStack[_recLevel], 0, 8);
             recLevel = _recLevel;
             goLeft();
         }
 
         // go to the leftmost node from the current node. Return its length.
         private void goLeft() {
-            float len = onLeaf();
+            final float len = onLeaf();
             if (len >= 0.0f) {
                 lastT = nextT;
                 lenAtLastT = lenAtNextT;
@@ -701,10 +883,11 @@
                 flatLeafCoefCache[2] = -1.0f;
                 cachedHaveLowAcceleration = -1;
             } else {
-                Helpers.subdivide(recCurveStack[recLevel], 0,
-                                  recCurveStack[recLevel+1], 0,
-                                  recCurveStack[recLevel], 0, curveType);
-                sides[recLevel] = Side.LEFT;
+                Helpers.subdivide(recCurveStack[recLevel],
+                                  recCurveStack[recLevel + 1],
+                                  recCurveStack[recLevel], curveType);
+
+                sidesRight[recLevel] = false;
                 recLevel++;
                 goLeft();
             }
@@ -719,7 +902,7 @@
 
             float x0 = curve[0], y0 = curve[1];
             for (int i = 2; i < _curveType; i += 2) {
-                final float x1 = curve[i], y1 = curve[i+1];
+                final float x1 = curve[i], y1 = curve[i + 1];
                 final float len = Helpers.linelen(x0, y0, x1, y1);
                 polyLen += len;
                 curLeafCtrlPolyLengths[(i >> 1) - 1] = len;
@@ -727,10 +910,9 @@
                 y0 = y1;
             }
 
-            final float lineLen = Helpers.linelen(curve[0], curve[1],
-                                                  curve[_curveType-2],
-                                                  curve[_curveType-1]);
-            if ((polyLen - lineLen) < ERR || recLevel == REC_LIMIT) {
+            final float lineLen = Helpers.linelen(curve[0], curve[1], x0, y0);
+
+            if ((polyLen - lineLen) < CURVE_LEN_ERR || recLevel == REC_LIMIT) {
                 return (polyLen + lineLen) / 2.0f;
             }
             return -1.0f;
@@ -742,41 +924,190 @@
                         final float x2, final float y2,
                         final float x3, final float y3)
     {
+        final int outcode0 = this.cOutCode;
+
+        if (clipRect != null) {
+            final int outcode1 = Helpers.outcode(x1, y1, clipRect);
+            final int outcode2 = Helpers.outcode(x2, y2, clipRect);
+            final int outcode3 = Helpers.outcode(x3, y3, clipRect);
+
+            // Should clip
+            final int orCode = (outcode0 | outcode1 | outcode2 | outcode3);
+            if (orCode != 0) {
+                final int sideCode = outcode0 & outcode1 & outcode2 & outcode3;
+
+                // basic rejection criteria:
+                if (sideCode == 0) {
+                    // ovelap clip:
+                    if (subdivide) {
+                        // avoid reentrance
+                        subdivide = false;
+                        // subdivide curve => callback with subdivided parts:
+                        boolean ret = curveSplitter.splitCurve(cx0, cy0, x1, y1, x2, y2, x3, y3,
+                                                               orCode, this);
+                        // reentrance is done:
+                        subdivide = true;
+                        if (ret) {
+                            return;
+                        }
+                    }
+                    // already subdivided so render it
+                } else {
+                    this.cOutCode = outcode3;
+                    skipCurveTo(x1, y1, x2, y2, x3, y3);
+                    return;
+                }
+            }
+
+            this.cOutCode = outcode3;
+
+            if (this.outside) {
+                this.outside = false;
+                // Adjust current index, phase & dash:
+                skipLen();
+            }
+        }
+        _curveTo(x1, y1, x2, y2, x3, y3);
+    }
+
+    private void _curveTo(final float x1, final float y1,
+                          final float x2, final float y2,
+                          final float x3, final float y3)
+    {
         final float[] _curCurvepts = curCurvepts;
-        _curCurvepts[0] = x0;        _curCurvepts[1] = y0;
-        _curCurvepts[2] = x1;        _curCurvepts[3] = y1;
-        _curCurvepts[4] = x2;        _curCurvepts[5] = y2;
-        _curCurvepts[6] = x3;        _curCurvepts[7] = y3;
-        somethingTo(8);
+
+        // monotonize curve:
+        final CurveBasicMonotonizer monotonizer
+            = rdrCtx.monotonizer.curve(cx0, cy0, x1, y1, x2, y2, x3, y3);
+
+        final int nSplits = monotonizer.nbSplits;
+        final float[] mid = monotonizer.middle;
+
+        for (int i = 0, off = 0; i <= nSplits; i++, off += 6) {
+            // optimize arraycopy (8 values faster than 6 = type):
+            System.arraycopy(mid, off, _curCurvepts, 0, 8);
+
+            somethingTo(8);
+        }
+    }
+
+    private void skipCurveTo(final float x1, final float y1,
+                             final float x2, final float y2,
+                             final float x3, final float y3)
+    {
+        final float[] _curCurvepts = curCurvepts;
+        _curCurvepts[0] = cx0; _curCurvepts[1] = cy0;
+        _curCurvepts[2] = x1;  _curCurvepts[3] = y1;
+        _curCurvepts[4] = x2;  _curCurvepts[5] = y2;
+        _curCurvepts[6] = x3;  _curCurvepts[7] = y3;
+
+        skipSomethingTo(8);
+
+        this.cx0 = x3;
+        this.cy0 = y3;
     }
 
     @Override
     public void quadTo(final float x1, final float y1,
                        final float x2, final float y2)
     {
+        final int outcode0 = this.cOutCode;
+
+        if (clipRect != null) {
+            final int outcode1 = Helpers.outcode(x1, y1, clipRect);
+            final int outcode2 = Helpers.outcode(x2, y2, clipRect);
+
+            // Should clip
+            final int orCode = (outcode0 | outcode1 | outcode2);
+            if (orCode != 0) {
+                final int sideCode = outcode0 & outcode1 & outcode2;
+
+                // basic rejection criteria:
+                if (sideCode == 0) {
+                    // ovelap clip:
+                    if (subdivide) {
+                        // avoid reentrance
+                        subdivide = false;
+                        // subdivide curve => call lineTo() with subdivided curves:
+                        boolean ret = curveSplitter.splitQuad(cx0, cy0, x1, y1,
+                                                              x2, y2, orCode, this);
+                        // reentrance is done:
+                        subdivide = true;
+                        if (ret) {
+                            return;
+                        }
+                    }
+                    // already subdivided so render it
+                } else {
+                    this.cOutCode = outcode2;
+                    skipQuadTo(x1, y1, x2, y2);
+                    return;
+                }
+            }
+
+            this.cOutCode = outcode2;
+
+            if (this.outside) {
+                this.outside = false;
+                // Adjust current index, phase & dash:
+                skipLen();
+            }
+        }
+        _quadTo(x1, y1, x2, y2);
+    }
+
+    private void _quadTo(final float x1, final float y1,
+                         final float x2, final float y2)
+    {
         final float[] _curCurvepts = curCurvepts;
-        _curCurvepts[0] = x0;        _curCurvepts[1] = y0;
-        _curCurvepts[2] = x1;        _curCurvepts[3] = y1;
-        _curCurvepts[4] = x2;        _curCurvepts[5] = y2;
-        somethingTo(6);
+
+        // monotonize quad:
+        final CurveBasicMonotonizer monotonizer
+            = rdrCtx.monotonizer.quad(cx0, cy0, x1, y1, x2, y2);
+
+        final int nSplits = monotonizer.nbSplits;
+        final float[] mid = monotonizer.middle;
+
+        for (int i = 0, off = 0; i <= nSplits; i++, off += 4) {
+            // optimize arraycopy (8 values faster than 6 = type):
+            System.arraycopy(mid, off, _curCurvepts, 0, 8);
+
+            somethingTo(6);
+        }
+    }
+
+    private void skipQuadTo(final float x1, final float y1,
+                            final float x2, final float y2)
+    {
+        final float[] _curCurvepts = curCurvepts;
+        _curCurvepts[0] = cx0; _curCurvepts[1] = cy0;
+        _curCurvepts[2] = x1;  _curCurvepts[3] = y1;
+        _curCurvepts[4] = x2;  _curCurvepts[5] = y2;
+
+        skipSomethingTo(6);
+
+        this.cx0 = x2;
+        this.cy0 = y2;
     }
 
     @Override
     public void closePath() {
-        lineTo(sx, sy);
+        if (cx0 != sx0 || cy0 != sy0) {
+            lineTo(sx0, sy0);
+        }
         if (firstSegidx != 0) {
             if (!dashOn || needsMoveTo) {
-                out.moveTo(sx, sy);
+                out.moveTo(sx0, sy0);
             }
             emitFirstSegments();
         }
-        moveTo(sx, sy);
+        moveTo(sx0, sy0);
     }
 
     @Override
     public void pathDone() {
         if (firstSegidx != 0) {
-            out.moveTo(sx, sy);
+            out.moveTo(sx0, sy0);
             emitFirstSegments();
         }
         out.pathDone();
--- a/src/java.desktop/share/classes/sun/java2d/marlin/DoubleArrayCache.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.desktop/share/classes/sun/java2d/marlin/DoubleArrayCache.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -99,7 +99,7 @@
         Reference(final DoubleArrayCache cache, final int initialSize) {
             this.cache = cache;
             this.clean = cache.clean;
-            this.initial = createArray(initialSize, clean);
+            this.initial = createArray(initialSize);
             if (DO_STATS) {
                 cache.stats.totalInitial += initialSize;
             }
@@ -116,7 +116,7 @@
                 logInfo(getLogPrefix(clean) + "DoubleArrayCache: "
                         + "getArray[oversize]: length=\t" + length);
             }
-            return createArray(length, clean);
+            return createArray(length);
         }
 
         double[] widenArray(final double[] array, final int usedSize,
@@ -202,7 +202,7 @@
             if (DO_STATS) {
                 stats.createOp++;
             }
-            return createArray(arraySize, clean);
+            return createArray(arraySize);
         }
 
         void putArray(final double[] array)
@@ -229,12 +229,8 @@
         }
     }
 
-    static double[] createArray(final int length, final boolean clean) {
-        if (clean) {
-            return new double[length];
-        }
-        // use JDK9 Unsafe.allocateUninitializedArray(class, length):
-        return (double[]) OffHeapArray.UNSAFE.allocateUninitializedArray(double.class, length);
+    static double[] createArray(final int length) {
+        return new double[length];
     }
 
     static void fill(final double[] array, final int fromIndex,
--- a/src/java.desktop/share/classes/sun/java2d/marlin/FloatArrayCache.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.desktop/share/classes/sun/java2d/marlin/FloatArrayCache.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -99,7 +99,7 @@
         Reference(final FloatArrayCache cache, final int initialSize) {
             this.cache = cache;
             this.clean = cache.clean;
-            this.initial = createArray(initialSize, clean);
+            this.initial = createArray(initialSize);
             if (DO_STATS) {
                 cache.stats.totalInitial += initialSize;
             }
@@ -116,7 +116,7 @@
                 logInfo(getLogPrefix(clean) + "FloatArrayCache: "
                         + "getArray[oversize]: length=\t" + length);
             }
-            return createArray(length, clean);
+            return createArray(length);
         }
 
         float[] widenArray(final float[] array, final int usedSize,
@@ -202,7 +202,7 @@
             if (DO_STATS) {
                 stats.createOp++;
             }
-            return createArray(arraySize, clean);
+            return createArray(arraySize);
         }
 
         void putArray(final float[] array)
@@ -229,12 +229,8 @@
         }
     }
 
-    static float[] createArray(final int length, final boolean clean) {
-        if (clean) {
-            return new float[length];
-        }
-        // use JDK9 Unsafe.allocateUninitializedArray(class, length):
-        return (float[]) OffHeapArray.UNSAFE.allocateUninitializedArray(float.class, length);
+    static float[] createArray(final int length) {
+        return new float[length];
     }
 
     static void fill(final float[] array, final int fromIndex,
--- a/src/java.desktop/share/classes/sun/java2d/marlin/Helpers.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.desktop/share/classes/sun/java2d/marlin/Helpers.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,6 @@
 
 package sun.java2d.marlin;
 
-import static java.lang.Math.PI;
 import java.util.Arrays;
 import sun.awt.geom.PathConsumer2D;
 import sun.java2d.marlin.stats.Histogram;
@@ -47,13 +46,25 @@
         return (d <= err && d >= -err);
     }
 
-    static int quadraticRoots(final float a, final float b,
-                              final float c, float[] zeroes, final int off)
+    static float evalCubic(final float a, final float b,
+                           final float c, final float d,
+                           final float t)
+    {
+        return t * (t * (t * a + b) + c) + d;
+    }
+
+    static float evalQuad(final float a, final float b,
+                          final float c, final float t)
+    {
+        return t * (t * a + b) + c;
+    }
+
+    static int quadraticRoots(final float a, final float b, final float c,
+                              final float[] zeroes, final int off)
     {
         int ret = off;
-        float t;
         if (a != 0.0f) {
-            final float dis = b*b - 4*a*c;
+            final float dis = b*b - 4.0f * a * c;
             if (dis > 0.0f) {
                 final float sqrtDis = (float) Math.sqrt(dis);
                 // depending on the sign of b we use a slightly different
@@ -68,37 +79,38 @@
                     zeroes[ret++] = (2.0f * c) / (-b + sqrtDis);
                 }
             } else if (dis == 0.0f) {
-                t = (-b) / (2.0f * a);
-                zeroes[ret++] = t;
+                zeroes[ret++] = -b / (2.0f * a);
             }
-        } else {
-            if (b != 0.0f) {
-                t = (-c) / b;
-                zeroes[ret++] = t;
-            }
+        } else if (b != 0.0f) {
+            zeroes[ret++] = -c / b;
         }
         return ret - off;
     }
 
     // find the roots of g(t) = d*t^3 + a*t^2 + b*t + c in [A,B)
-    static int cubicRootsInAB(float d, float a, float b, float c,
-                              float[] pts, final int off,
+    static int cubicRootsInAB(final float d0, float a0, float b0, float c0,
+                              final float[] pts, final int off,
                               final float A, final float B)
     {
-        if (d == 0.0f) {
-            int num = quadraticRoots(a, b, c, pts, off);
+        if (d0 == 0.0f) {
+            final int num = quadraticRoots(a0, b0, c0, pts, off);
             return filterOutNotInAB(pts, off, num, A, B) - off;
         }
         // From Graphics Gems:
-        // http://tog.acm.org/resources/GraphicsGems/gems/Roots3And4.c
+        // https://github.com/erich666/GraphicsGems/blob/master/gems/Roots3And4.c
         // (also from awt.geom.CubicCurve2D. But here we don't need as
         // much accuracy and we don't want to create arrays so we use
         // our own customized version).
 
         // normal form: x^3 + ax^2 + bx + c = 0
-        a /= d;
-        b /= d;
-        c /= d;
+
+        // 2018.1: Need double precision if d is very small (flat curve) !
+        /*
+         * TODO: cleanup all that code after reading Roots3And4.c
+         */
+        final double a = ((double)a0) / d0;
+        final double b = ((double)b0) / d0;
+        final double c = ((double)c0) / d0;
 
         //  substitute x = y - A/3 to eliminate quadratic term:
         //     x^3 +Px + Q = 0
@@ -108,63 +120,45 @@
         // p = P/3
         // q = Q/2
         // instead and use those values for simplicity of the code.
-        double sq_A = a * a;
-        double p = (1.0d/3.0d) * ((-1.0d/3.0d) * sq_A + b);
-        double q = (1.0d/2.0d) * ((2.0d/27.0d) * a * sq_A - (1.0d/3.0d) * a * b + c);
+        final double sub = (1.0d / 3.0d) * a;
+        final double sq_A = a * a;
+        final double p = (1.0d / 3.0d) * ((-1.0d / 3.0d) * sq_A + b);
+        final double q = (1.0d / 2.0d) * ((2.0d / 27.0d) * a * sq_A - sub * b + c);
 
         // use Cardano's formula
 
-        double cb_p = p * p * p;
-        double D = q * q + cb_p;
+        final double cb_p = p * p * p;
+        final double D = q * q + cb_p;
 
         int num;
         if (D < 0.0d) {
             // see: http://en.wikipedia.org/wiki/Cubic_function#Trigonometric_.28and_hyperbolic.29_method
-            final double phi = (1.0d/3.0d) * Math.acos(-q / Math.sqrt(-cb_p));
+            final double phi = (1.0d / 3.0d) * Math.acos(-q / Math.sqrt(-cb_p));
             final double t = 2.0d * Math.sqrt(-p);
 
-            pts[ off+0 ] = (float) ( t * Math.cos(phi));
-            pts[ off+1 ] = (float) (-t * Math.cos(phi + (PI / 3.0d)));
-            pts[ off+2 ] = (float) (-t * Math.cos(phi - (PI / 3.0d)));
+            pts[off    ] = (float) ( t * Math.cos(phi) - sub);
+            pts[off + 1] = (float) (-t * Math.cos(phi + (Math.PI / 3.0d)) - sub);
+            pts[off + 2] = (float) (-t * Math.cos(phi - (Math.PI / 3.0d)) - sub);
             num = 3;
         } else {
             final double sqrt_D = Math.sqrt(D);
             final double u =   Math.cbrt(sqrt_D - q);
             final double v = - Math.cbrt(sqrt_D + q);
 
-            pts[ off ] = (float) (u + v);
+            pts[off    ] = (float) (u + v - sub);
             num = 1;
 
             if (within(D, 0.0d, 1e-8d)) {
-                pts[off+1] = -(pts[off] / 2.0f);
+                pts[off + 1] = (float)((-1.0d / 2.0d) * (u + v) - sub);
                 num = 2;
             }
         }
 
-        final float sub = (1.0f/3.0f) * a;
-
-        for (int i = 0; i < num; ++i) {
-            pts[ off+i ] -= sub;
-        }
-
         return filterOutNotInAB(pts, off, num, A, B) - off;
     }
 
-    static float evalCubic(final float a, final float b,
-                           final float c, final float d,
-                           final float t)
-    {
-        return t * (t * (t * a + b) + c) + d;
-    }
-
-    static float evalQuad(final float a, final float b,
-                          final float c, final float t)
-    {
-        return t * (t * a + b) + c;
-    }
-
     // returns the index 1 past the last valid element remaining after filtering
-    static int filterOutNotInAB(float[] nums, final int off, final int len,
+    static int filterOutNotInAB(final float[] nums, final int off, final int len,
                                 final float a, final float b)
     {
         int ret = off;
@@ -176,35 +170,190 @@
         return ret;
     }
 
-    static float linelen(float x1, float y1, float x2, float y2) {
-        final float dx = x2 - x1;
-        final float dy = y2 - y1;
-        return (float) Math.sqrt(dx*dx + dy*dy);
+    static float fastLineLen(final float x0, final float y0,
+                             final float x1, final float y1)
+    {
+        final float dx = x1 - x0;
+        final float dy = y1 - y0;
+
+        // use manhattan norm:
+        return Math.abs(dx) + Math.abs(dy);
+    }
+
+    static float linelen(final float x0, final float y0,
+                         final float x1, final float y1)
+    {
+        final float dx = x1 - x0;
+        final float dy = y1 - y0;
+        return (float) Math.sqrt(dx * dx + dy * dy);
+    }
+
+    static float fastQuadLen(final float x0, final float y0,
+                             final float x1, final float y1,
+                             final float x2, final float y2)
+    {
+        final float dx1 = x1 - x0;
+        final float dx2 = x2 - x1;
+        final float dy1 = y1 - y0;
+        final float dy2 = y2 - y1;
+
+        // use manhattan norm:
+        return Math.abs(dx1) + Math.abs(dx2)
+             + Math.abs(dy1) + Math.abs(dy2);
+    }
+
+    static float quadlen(final float x0, final float y0,
+                         final float x1, final float y1,
+                         final float x2, final float y2)
+    {
+        return (linelen(x0, y0, x1, y1)
+                + linelen(x1, y1, x2, y2)
+                + linelen(x0, y0, x2, y2)) / 2.0f;
+    }
+
+
+    static float fastCurvelen(final float x0, final float y0,
+                              final float x1, final float y1,
+                              final float x2, final float y2,
+                              final float x3, final float y3)
+    {
+        final float dx1 = x1 - x0;
+        final float dx2 = x2 - x1;
+        final float dx3 = x3 - x2;
+        final float dy1 = y1 - y0;
+        final float dy2 = y2 - y1;
+        final float dy3 = y3 - y2;
+
+        // use manhattan norm:
+        return Math.abs(dx1) + Math.abs(dx2) + Math.abs(dx3)
+             + Math.abs(dy1) + Math.abs(dy2) + Math.abs(dy3);
+    }
+
+    static float curvelen(final float x0, final float y0,
+                          final float x1, final float y1,
+                          final float x2, final float y2,
+                          final float x3, final float y3)
+    {
+        return (linelen(x0, y0, x1, y1)
+              + linelen(x1, y1, x2, y2)
+              + linelen(x2, y2, x3, y3)
+              + linelen(x0, y0, x3, y3)) / 2.0f;
     }
 
-    static void subdivide(float[] src, int srcoff, float[] left, int leftoff,
-                          float[] right, int rightoff, int type)
+    // finds values of t where the curve in pts should be subdivided in order
+    // to get good offset curves a distance of w away from the middle curve.
+    // Stores the points in ts, and returns how many of them there were.
+    static int findSubdivPoints(final Curve c, final float[] pts,
+                                final float[] ts, final int type,
+                                final float w2)
+    {
+        final float x12 = pts[2] - pts[0];
+        final float y12 = pts[3] - pts[1];
+        // if the curve is already parallel to either axis we gain nothing
+        // from rotating it.
+        if ((y12 != 0.0f && x12 != 0.0f)) {
+            // we rotate it so that the first vector in the control polygon is
+            // parallel to the x-axis. This will ensure that rotated quarter
+            // circles won't be subdivided.
+            final float hypot = (float)Math.sqrt(x12 * x12 + y12 * y12);
+            final float cos = x12 / hypot;
+            final float sin = y12 / hypot;
+            final float x1 = cos * pts[0] + sin * pts[1];
+            final float y1 = cos * pts[1] - sin * pts[0];
+            final float x2 = cos * pts[2] + sin * pts[3];
+            final float y2 = cos * pts[3] - sin * pts[2];
+            final float x3 = cos * pts[4] + sin * pts[5];
+            final float y3 = cos * pts[5] - sin * pts[4];
+
+            switch(type) {
+            case 8:
+                final float x4 = cos * pts[6] + sin * pts[7];
+                final float y4 = cos * pts[7] - sin * pts[6];
+                c.set(x1, y1, x2, y2, x3, y3, x4, y4);
+                break;
+            case 6:
+                c.set(x1, y1, x2, y2, x3, y3);
+                break;
+            default:
+            }
+        } else {
+            c.set(pts, type);
+        }
+
+        int ret = 0;
+        // we subdivide at values of t such that the remaining rotated
+        // curves are monotonic in x and y.
+        ret += c.dxRoots(ts, ret);
+        ret += c.dyRoots(ts, ret);
+
+        // subdivide at inflection points.
+        if (type == 8) {
+            // quadratic curves can't have inflection points
+            ret += c.infPoints(ts, ret);
+        }
+
+        // now we must subdivide at points where one of the offset curves will have
+        // a cusp. This happens at ts where the radius of curvature is equal to w.
+        ret += c.rootsOfROCMinusW(ts, ret, w2, 0.0001f);
+
+        ret = filterOutNotInAB(ts, 0, ret, 0.0001f, 0.9999f);
+        isort(ts, ret);
+        return ret;
+    }
+
+    // finds values of t where the curve in pts should be subdivided in order
+    // to get intersections with the given clip rectangle.
+    // Stores the points in ts, and returns how many of them there were.
+    static int findClipPoints(final Curve curve, final float[] pts,
+                              final float[] ts, final int type,
+                              final int outCodeOR,
+                              final float[] clipRect)
+    {
+        curve.set(pts, type);
+
+        // clip rectangle (ymin, ymax, xmin, xmax)
+        int ret = 0;
+
+        if ((outCodeOR & OUTCODE_LEFT) != 0) {
+            ret += curve.xPoints(ts, ret, clipRect[2]);
+        }
+        if ((outCodeOR & OUTCODE_RIGHT) != 0) {
+            ret += curve.xPoints(ts, ret, clipRect[3]);
+        }
+        if ((outCodeOR & OUTCODE_TOP) != 0) {
+            ret += curve.yPoints(ts, ret, clipRect[0]);
+        }
+        if ((outCodeOR & OUTCODE_BOTTOM) != 0) {
+            ret += curve.yPoints(ts, ret, clipRect[1]);
+        }
+        isort(ts, ret);
+        return ret;
+    }
+
+    static void subdivide(final float[] src,
+                          final float[] left, final float[] right,
+                          final int type)
     {
         switch(type) {
-        case 6:
-            Helpers.subdivideQuad(src, srcoff, left, leftoff, right, rightoff);
+        case 8:
+            subdivideCubic(src, left, right);
             return;
-        case 8:
-            Helpers.subdivideCubic(src, srcoff, left, leftoff, right, rightoff);
+        case 6:
+            subdivideQuad(src, left, right);
             return;
         default:
             throw new InternalError("Unsupported curve type");
         }
     }
 
-    static void isort(float[] a, int off, int len) {
-        for (int i = off + 1, end = off + len; i < end; i++) {
-            float ai = a[i];
-            int j = i - 1;
-            for (; j >= off && a[j] > ai; j--) {
-                a[j+1] = a[j];
+    static void isort(final float[] a, final int len) {
+        for (int i = 1, j; i < len; i++) {
+            final float ai = a[i];
+            j = i - 1;
+            for (; j >= 0 && a[j] > ai; j--) {
+                a[j + 1] = a[j];
             }
-            a[j+1] = ai;
+            a[j + 1] = ai;
         }
     }
 
@@ -227,206 +376,216 @@
      * equals (<code>leftoff</code> + 6), in order
      * to avoid allocating extra storage for this common point.
      * @param src the array holding the coordinates for the source curve
-     * @param srcoff the offset into the array of the beginning of the
-     * the 6 source coordinates
      * @param left the array for storing the coordinates for the first
      * half of the subdivided curve
-     * @param leftoff the offset into the array of the beginning of the
-     * the 6 left coordinates
      * @param right the array for storing the coordinates for the second
      * half of the subdivided curve
-     * @param rightoff the offset into the array of the beginning of the
-     * the 6 right coordinates
      * @since 1.7
      */
-    static void subdivideCubic(float[] src, int srcoff,
-                               float[] left, int leftoff,
-                               float[] right, int rightoff)
+    static void subdivideCubic(final float[] src,
+                               final float[] left,
+                               final float[] right)
     {
-        float x1 = src[srcoff + 0];
-        float y1 = src[srcoff + 1];
-        float ctrlx1 = src[srcoff + 2];
-        float ctrly1 = src[srcoff + 3];
-        float ctrlx2 = src[srcoff + 4];
-        float ctrly2 = src[srcoff + 5];
-        float x2 = src[srcoff + 6];
-        float y2 = src[srcoff + 7];
-        if (left != null) {
-            left[leftoff + 0] = x1;
-            left[leftoff + 1] = y1;
-        }
-        if (right != null) {
-            right[rightoff + 6] = x2;
-            right[rightoff + 7] = y2;
-        }
-        x1 = (x1 + ctrlx1) / 2.0f;
-        y1 = (y1 + ctrly1) / 2.0f;
-        x2 = (x2 + ctrlx2) / 2.0f;
-        y2 = (y2 + ctrly2) / 2.0f;
-        float centerx = (ctrlx1 + ctrlx2) / 2.0f;
-        float centery = (ctrly1 + ctrly2) / 2.0f;
-        ctrlx1 = (x1 + centerx) / 2.0f;
-        ctrly1 = (y1 + centery) / 2.0f;
-        ctrlx2 = (x2 + centerx) / 2.0f;
-        ctrly2 = (y2 + centery) / 2.0f;
-        centerx = (ctrlx1 + ctrlx2) / 2.0f;
-        centery = (ctrly1 + ctrly2) / 2.0f;
-        if (left != null) {
-            left[leftoff + 2] = x1;
-            left[leftoff + 3] = y1;
-            left[leftoff + 4] = ctrlx1;
-            left[leftoff + 5] = ctrly1;
-            left[leftoff + 6] = centerx;
-            left[leftoff + 7] = centery;
-        }
-        if (right != null) {
-            right[rightoff + 0] = centerx;
-            right[rightoff + 1] = centery;
-            right[rightoff + 2] = ctrlx2;
-            right[rightoff + 3] = ctrly2;
-            right[rightoff + 4] = x2;
-            right[rightoff + 5] = y2;
-        }
+        float  x1 = src[0];
+        float  y1 = src[1];
+        float cx1 = src[2];
+        float cy1 = src[3];
+        float cx2 = src[4];
+        float cy2 = src[5];
+        float  x2 = src[6];
+        float  y2 = src[7];
+
+        left[0]  = x1;
+        left[1]  = y1;
+
+        right[6] = x2;
+        right[7] = y2;
+
+        x1 = (x1 + cx1) / 2.0f;
+        y1 = (y1 + cy1) / 2.0f;
+        x2 = (x2 + cx2) / 2.0f;
+        y2 = (y2 + cy2) / 2.0f;
+
+        float cx = (cx1 + cx2) / 2.0f;
+        float cy = (cy1 + cy2) / 2.0f;
+
+        cx1 = (x1 + cx) / 2.0f;
+        cy1 = (y1 + cy) / 2.0f;
+        cx2 = (x2 + cx) / 2.0f;
+        cy2 = (y2 + cy) / 2.0f;
+        cx  = (cx1 + cx2) / 2.0f;
+        cy  = (cy1 + cy2) / 2.0f;
+
+        left[2] = x1;
+        left[3] = y1;
+        left[4] = cx1;
+        left[5] = cy1;
+        left[6] = cx;
+        left[7] = cy;
+
+        right[0] = cx;
+        right[1] = cy;
+        right[2] = cx2;
+        right[3] = cy2;
+        right[4] = x2;
+        right[5] = y2;
+    }
+
+    static void subdivideCubicAt(final float t,
+                                 final float[] src, final int offS,
+                                 final float[] pts, final int offL, final int offR)
+    {
+        float  x1 = src[offS    ];
+        float  y1 = src[offS + 1];
+        float cx1 = src[offS + 2];
+        float cy1 = src[offS + 3];
+        float cx2 = src[offS + 4];
+        float cy2 = src[offS + 5];
+        float  x2 = src[offS + 6];
+        float  y2 = src[offS + 7];
+
+        pts[offL    ] = x1;
+        pts[offL + 1] = y1;
+
+        pts[offR + 6] = x2;
+        pts[offR + 7] = y2;
+
+        x1 =  x1 + t * (cx1 - x1);
+        y1 =  y1 + t * (cy1 - y1);
+        x2 = cx2 + t * (x2 - cx2);
+        y2 = cy2 + t * (y2 - cy2);
+
+        float cx = cx1 + t * (cx2 - cx1);
+        float cy = cy1 + t * (cy2 - cy1);
+
+        cx1 =  x1 + t * (cx - x1);
+        cy1 =  y1 + t * (cy - y1);
+        cx2 =  cx + t * (x2 - cx);
+        cy2 =  cy + t * (y2 - cy);
+        cx  = cx1 + t * (cx2 - cx1);
+        cy  = cy1 + t * (cy2 - cy1);
+
+        pts[offL + 2] = x1;
+        pts[offL + 3] = y1;
+        pts[offL + 4] = cx1;
+        pts[offL + 5] = cy1;
+        pts[offL + 6] = cx;
+        pts[offL + 7] = cy;
+
+        pts[offR    ] = cx;
+        pts[offR + 1] = cy;
+        pts[offR + 2] = cx2;
+        pts[offR + 3] = cy2;
+        pts[offR + 4] = x2;
+        pts[offR + 5] = y2;
     }
 
-
-    static void subdivideCubicAt(float t, float[] src, int srcoff,
-                                 float[] left, int leftoff,
-                                 float[] right, int rightoff)
+    static void subdivideQuad(final float[] src,
+                              final float[] left,
+                              final float[] right)
     {
-        float x1 = src[srcoff + 0];
-        float y1 = src[srcoff + 1];
-        float ctrlx1 = src[srcoff + 2];
-        float ctrly1 = src[srcoff + 3];
-        float ctrlx2 = src[srcoff + 4];
-        float ctrly2 = src[srcoff + 5];
-        float x2 = src[srcoff + 6];
-        float y2 = src[srcoff + 7];
-        if (left != null) {
-            left[leftoff + 0] = x1;
-            left[leftoff + 1] = y1;
-        }
-        if (right != null) {
-            right[rightoff + 6] = x2;
-            right[rightoff + 7] = y2;
-        }
-        x1 = x1 + t * (ctrlx1 - x1);
-        y1 = y1 + t * (ctrly1 - y1);
-        x2 = ctrlx2 + t * (x2 - ctrlx2);
-        y2 = ctrly2 + t * (y2 - ctrly2);
-        float centerx = ctrlx1 + t * (ctrlx2 - ctrlx1);
-        float centery = ctrly1 + t * (ctrly2 - ctrly1);
-        ctrlx1 = x1 + t * (centerx - x1);
-        ctrly1 = y1 + t * (centery - y1);
-        ctrlx2 = centerx + t * (x2 - centerx);
-        ctrly2 = centery + t * (y2 - centery);
-        centerx = ctrlx1 + t * (ctrlx2 - ctrlx1);
-        centery = ctrly1 + t * (ctrly2 - ctrly1);
-        if (left != null) {
-            left[leftoff + 2] = x1;
-            left[leftoff + 3] = y1;
-            left[leftoff + 4] = ctrlx1;
-            left[leftoff + 5] = ctrly1;
-            left[leftoff + 6] = centerx;
-            left[leftoff + 7] = centery;
-        }
-        if (right != null) {
-            right[rightoff + 0] = centerx;
-            right[rightoff + 1] = centery;
-            right[rightoff + 2] = ctrlx2;
-            right[rightoff + 3] = ctrly2;
-            right[rightoff + 4] = x2;
-            right[rightoff + 5] = y2;
-        }
+        float x1 = src[0];
+        float y1 = src[1];
+        float cx = src[2];
+        float cy = src[3];
+        float x2 = src[4];
+        float y2 = src[5];
+
+        left[0]  = x1;
+        left[1]  = y1;
+
+        right[4] = x2;
+        right[5] = y2;
+
+        x1 = (x1 + cx) / 2.0f;
+        y1 = (y1 + cy) / 2.0f;
+        x2 = (x2 + cx) / 2.0f;
+        y2 = (y2 + cy) / 2.0f;
+        cx = (x1 + x2) / 2.0f;
+        cy = (y1 + y2) / 2.0f;
+
+        left[2] = x1;
+        left[3] = y1;
+        left[4] = cx;
+        left[5] = cy;
+
+        right[0] = cx;
+        right[1] = cy;
+        right[2] = x2;
+        right[3] = y2;
     }
 
-    static void subdivideQuad(float[] src, int srcoff,
-                              float[] left, int leftoff,
-                              float[] right, int rightoff)
+    static void subdivideQuadAt(final float t,
+                                final float[] src, final int offS,
+                                final float[] pts, final int offL, final int offR)
     {
-        float x1 = src[srcoff + 0];
-        float y1 = src[srcoff + 1];
-        float ctrlx = src[srcoff + 2];
-        float ctrly = src[srcoff + 3];
-        float x2 = src[srcoff + 4];
-        float y2 = src[srcoff + 5];
-        if (left != null) {
-            left[leftoff + 0] = x1;
-            left[leftoff + 1] = y1;
-        }
-        if (right != null) {
-            right[rightoff + 4] = x2;
-            right[rightoff + 5] = y2;
-        }
-        x1 = (x1 + ctrlx) / 2.0f;
-        y1 = (y1 + ctrly) / 2.0f;
-        x2 = (x2 + ctrlx) / 2.0f;
-        y2 = (y2 + ctrly) / 2.0f;
-        ctrlx = (x1 + x2) / 2.0f;
-        ctrly = (y1 + y2) / 2.0f;
-        if (left != null) {
-            left[leftoff + 2] = x1;
-            left[leftoff + 3] = y1;
-            left[leftoff + 4] = ctrlx;
-            left[leftoff + 5] = ctrly;
-        }
-        if (right != null) {
-            right[rightoff + 0] = ctrlx;
-            right[rightoff + 1] = ctrly;
-            right[rightoff + 2] = x2;
-            right[rightoff + 3] = y2;
-        }
+        float x1 = src[offS    ];
+        float y1 = src[offS + 1];
+        float cx = src[offS + 2];
+        float cy = src[offS + 3];
+        float x2 = src[offS + 4];
+        float y2 = src[offS + 5];
+
+        pts[offL    ] = x1;
+        pts[offL + 1] = y1;
+
+        pts[offR + 4] = x2;
+        pts[offR + 5] = y2;
+
+        x1 = x1 + t * (cx - x1);
+        y1 = y1 + t * (cy - y1);
+        x2 = cx + t * (x2 - cx);
+        y2 = cy + t * (y2 - cy);
+        cx = x1 + t * (x2 - x1);
+        cy = y1 + t * (y2 - y1);
+
+        pts[offL + 2] = x1;
+        pts[offL + 3] = y1;
+        pts[offL + 4] = cx;
+        pts[offL + 5] = cy;
+
+        pts[offR    ] = cx;
+        pts[offR + 1] = cy;
+        pts[offR + 2] = x2;
+        pts[offR + 3] = y2;
     }
 
-    static void subdivideQuadAt(float t, float[] src, int srcoff,
-                                float[] left, int leftoff,
-                                float[] right, int rightoff)
+    static void subdivideLineAt(final float t,
+                                final float[] src, final int offS,
+                                final float[] pts, final int offL, final int offR)
     {
-        float x1 = src[srcoff + 0];
-        float y1 = src[srcoff + 1];
-        float ctrlx = src[srcoff + 2];
-        float ctrly = src[srcoff + 3];
-        float x2 = src[srcoff + 4];
-        float y2 = src[srcoff + 5];
-        if (left != null) {
-            left[leftoff + 0] = x1;
-            left[leftoff + 1] = y1;
-        }
-        if (right != null) {
-            right[rightoff + 4] = x2;
-            right[rightoff + 5] = y2;
-        }
-        x1 = x1 + t * (ctrlx - x1);
-        y1 = y1 + t * (ctrly - y1);
-        x2 = ctrlx + t * (x2 - ctrlx);
-        y2 = ctrly + t * (y2 - ctrly);
-        ctrlx = x1 + t * (x2 - x1);
-        ctrly = y1 + t * (y2 - y1);
-        if (left != null) {
-            left[leftoff + 2] = x1;
-            left[leftoff + 3] = y1;
-            left[leftoff + 4] = ctrlx;
-            left[leftoff + 5] = ctrly;
-        }
-        if (right != null) {
-            right[rightoff + 0] = ctrlx;
-            right[rightoff + 1] = ctrly;
-            right[rightoff + 2] = x2;
-            right[rightoff + 3] = y2;
-        }
+        float x1 = src[offS    ];
+        float y1 = src[offS + 1];
+        float x2 = src[offS + 2];
+        float y2 = src[offS + 3];
+
+        pts[offL    ] = x1;
+        pts[offL + 1] = y1;
+
+        pts[offR + 2] = x2;
+        pts[offR + 3] = y2;
+
+        x1 = x1 + t * (x2 - x1);
+        y1 = y1 + t * (y2 - y1);
+
+        pts[offL + 2] = x1;
+        pts[offL + 3] = y1;
+
+        pts[offR    ] = x1;
+        pts[offR + 1] = y1;
     }
 
-    static void subdivideAt(float t, float[] src, int srcoff,
-                            float[] left, int leftoff,
-                            float[] right, int rightoff, int size)
+    static void subdivideAt(final float t,
+                            final float[] src, final int offS,
+                            final float[] pts, final int offL, final int type)
     {
-        switch(size) {
-        case 8:
-            subdivideCubicAt(t, src, srcoff, left, leftoff, right, rightoff);
-            return;
-        case 6:
-            subdivideQuadAt(t, src, srcoff, left, leftoff, right, rightoff);
-            return;
+        // if instead of switch (perf + most probable cases first)
+        if (type == 8) {
+            subdivideCubicAt(t, src, offS, pts, offL, offL + type);
+        } else if (type == 4) {
+            subdivideLineAt(t, src, offS, pts, offL, offL + type);
+        } else {
+            subdivideQuadAt(t, src, offS, pts, offL, offL + type);
         }
     }
 
@@ -614,12 +773,12 @@
                     e += 2;
                     continue;
                 case TYPE_QUADTO:
-                    io.quadTo(_curves[e+0], _curves[e+1],
+                    io.quadTo(_curves[e],   _curves[e+1],
                               _curves[e+2], _curves[e+3]);
                     e += 4;
                     continue;
                 case TYPE_CUBICTO:
-                    io.curveTo(_curves[e+0], _curves[e+1],
+                    io.curveTo(_curves[e],   _curves[e+1],
                                _curves[e+2], _curves[e+3],
                                _curves[e+4], _curves[e+5]);
                     e += 6;
@@ -657,12 +816,12 @@
                     continue;
                 case TYPE_QUADTO:
                     e -= 4;
-                    io.quadTo(_curves[e+0], _curves[e+1],
+                    io.quadTo(_curves[e],   _curves[e+1],
                               _curves[e+2], _curves[e+3]);
                     continue;
                 case TYPE_CUBICTO:
                     e -= 6;
-                    io.curveTo(_curves[e+0], _curves[e+1],
+                    io.curveTo(_curves[e],   _curves[e+1],
                                _curves[e+2], _curves[e+3],
                                _curves[e+4], _curves[e+5]);
                     continue;
--- a/src/java.desktop/share/classes/sun/java2d/marlin/IntArrayCache.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.desktop/share/classes/sun/java2d/marlin/IntArrayCache.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -99,7 +99,7 @@
         Reference(final IntArrayCache cache, final int initialSize) {
             this.cache = cache;
             this.clean = cache.clean;
-            this.initial = createArray(initialSize, clean);
+            this.initial = createArray(initialSize);
             if (DO_STATS) {
                 cache.stats.totalInitial += initialSize;
             }
@@ -116,7 +116,7 @@
                 logInfo(getLogPrefix(clean) + "IntArrayCache: "
                         + "getArray[oversize]: length=\t" + length);
             }
-            return createArray(length, clean);
+            return createArray(length);
         }
 
         int[] widenArray(final int[] array, final int usedSize,
@@ -202,7 +202,7 @@
             if (DO_STATS) {
                 stats.createOp++;
             }
-            return createArray(arraySize, clean);
+            return createArray(arraySize);
         }
 
         void putArray(final int[] array)
@@ -229,12 +229,8 @@
         }
     }
 
-    static int[] createArray(final int length, final boolean clean) {
-        if (clean) {
-            return new int[length];
-        }
-        // use JDK9 Unsafe.allocateUninitializedArray(class, length):
-        return (int[]) OffHeapArray.UNSAFE.allocateUninitializedArray(int.class, length);
+    static int[] createArray(final int length) {
+        return new int[length];
     }
 
     static void fill(final int[] array, final int fromIndex,
--- a/src/java.desktop/share/classes/sun/java2d/marlin/MarlinCache.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.desktop/share/classes/sun/java2d/marlin/MarlinCache.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -43,9 +43,9 @@
     // values are stored as int [x|alpha] where alpha is 8 bits
     static final int RLE_MAX_WIDTH = 1 << (24 - 1);
 
-    // 2048 (pixelSize) alpha values (width) x 32 rows (tile) = 64K bytes
+    // 4096 (pixels) alpha values (width) x 64 rows / 4 (tile) = 64K bytes
     // x1 instead of 4 bytes (RLE) ie 1/4 capacity or average good RLE compression
-    static final long INITIAL_CHUNK_ARRAY = TILE_H * INITIAL_PIXEL_DIM; // 64K
+    static final long INITIAL_CHUNK_ARRAY = TILE_H * INITIAL_PIXEL_WIDTH >> 2; // 64K
 
     // The alpha map used by this object (taken out of our map cache) to convert
     // pixel coverage counts gotten from MarlinCache (which are in the range
@@ -292,11 +292,11 @@
             // ensure values are in [0; MAX_AA_ALPHA] range
             if (DO_AA_RANGE_CHECK) {
                 if (val < 0) {
-                    System.out.println("Invalid coverage = " + val);
+                    MarlinUtils.logInfo("Invalid coverage = " + val);
                     val = 0;
                 }
                 if (val > MAX_AA_ALPHA) {
-                    System.out.println("Invalid coverage = " + val);
+                    MarlinUtils.logInfo("Invalid coverage = " + val);
                     val = MAX_AA_ALPHA;
                 }
             }
@@ -460,11 +460,11 @@
                         // ensure values are in [0; MAX_AA_ALPHA] range
                         if (DO_AA_RANGE_CHECK) {
                             if (val < 0) {
-                                System.out.println("Invalid coverage = " + val);
+                                MarlinUtils.logInfo("Invalid coverage = " + val);
                                 val = 0;
                             }
                             if (val > MAX_AA_ALPHA) {
-                                System.out.println("Invalid coverage = " + val);
+                                MarlinUtils.logInfo("Invalid coverage = " + val);
                                 val = MAX_AA_ALPHA;
                             }
                         }
@@ -630,8 +630,6 @@
         final int halfmaxalpha = maxalpha >> 2;
         for (int i = 0; i <= maxalpha; i++) {
             alMap[i] = (byte) ((i * 255 + halfmaxalpha) / maxalpha);
-//            System.out.println("alphaMap[" + i + "] = "
-//                               + Byte.toUnsignedInt(alMap[i]));
         }
         return alMap;
     }
--- a/src/java.desktop/share/classes/sun/java2d/marlin/MarlinConst.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.desktop/share/classes/sun/java2d/marlin/MarlinConst.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -74,23 +74,34 @@
     // do clean dirty array
     static final boolean DO_CLEAN_DIRTY = false;
 
-    // flag to use line simplifier
+    // flag to use collinear simplifier
     static final boolean USE_SIMPLIFIER = MarlinProperties.isUseSimplifier();
 
+    // flag to use path simplifier
+    static final boolean USE_PATH_SIMPLIFIER = MarlinProperties.isUsePathSimplifier();
+
+    static final boolean DO_CLIP_SUBDIVIDER = MarlinProperties.isDoClipSubdivider();
+
     // flag to enable logs related bounds checks
     static final boolean DO_LOG_BOUNDS = ENABLE_LOGS && false;
 
+    // flag to enable float precision correction
+    static final boolean DO_FIX_FLOAT_PREC = true;
+
     // Initial Array sizing (initial context capacity) ~ 450K
 
-    // 2048 pixel (width x height) for initial capacity
-    static final int INITIAL_PIXEL_DIM
-        = MarlinProperties.getInitialImageSize();
+    // 4096 pixels (width) for initial capacity
+    static final int INITIAL_PIXEL_WIDTH
+        = MarlinProperties.getInitialPixelWidth();
+    // 2176 pixels (height) for initial capacity
+    static final int INITIAL_PIXEL_HEIGHT
+        = MarlinProperties.getInitialPixelHeight();
 
     // typical array sizes: only odd numbers allowed below
     static final int INITIAL_ARRAY        = 256;
 
     // alpha row dimension
-    static final int INITIAL_AA_ARRAY     = INITIAL_PIXEL_DIM;
+    static final int INITIAL_AA_ARRAY     = INITIAL_PIXEL_WIDTH;
 
     // 4096 edges for initial capacity
     static final int INITIAL_EDGES_COUNT = MarlinProperties.getInitialEdges();
@@ -109,16 +120,17 @@
     public static final int SUBPIXEL_LG_POSITIONS_Y
         = MarlinProperties.getSubPixel_Log2_Y();
 
+    public static final int MIN_SUBPIXEL_LG_POSITIONS
+        = Math.min(SUBPIXEL_LG_POSITIONS_X, SUBPIXEL_LG_POSITIONS_Y);
+
     // number of subpixels
     public static final int SUBPIXEL_POSITIONS_X = 1 << (SUBPIXEL_LG_POSITIONS_X);
     public static final int SUBPIXEL_POSITIONS_Y = 1 << (SUBPIXEL_LG_POSITIONS_Y);
 
-    public static final float NORM_SUBPIXELS
-        = (float) Math.sqrt(( SUBPIXEL_POSITIONS_X * SUBPIXEL_POSITIONS_X
-                            + SUBPIXEL_POSITIONS_Y * SUBPIXEL_POSITIONS_Y) / 2.0d);
+    public static final float MIN_SUBPIXELS = 1 << MIN_SUBPIXEL_LG_POSITIONS;
 
     public static final int MAX_AA_ALPHA
-        = SUBPIXEL_POSITIONS_X * SUBPIXEL_POSITIONS_Y;
+        = (SUBPIXEL_POSITIONS_X * SUBPIXEL_POSITIONS_Y);
 
     public static final int TILE_H_LG = MarlinProperties.getTileSize_Log2();
     public static final int TILE_H = 1 << TILE_H_LG; // 32 by default
--- a/src/java.desktop/share/classes/sun/java2d/marlin/MarlinProperties.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.desktop/share/classes/sun/java2d/marlin/MarlinProperties.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -54,29 +54,41 @@
     }
 
     /**
-     * Return the initial pixel size used to define initial arrays
-     * (tile AA chunk, alpha line, buckets)
+     * Return the initial pixel width used to define initial arrays
+     * (tile AA chunk, alpha line)
      *
-     * @return 64 < initial pixel size < 32768 (2048 by default)
+     * @return 64 < initial pixel size < 32768 (4096 by default)
      */
-    public static int getInitialImageSize() {
+    public static int getInitialPixelWidth() {
         return align(
-            getInteger("sun.java2d.renderer.pixelsize", 2048, 64, 32 * 1024),
+            getInteger("sun.java2d.renderer.pixelWidth", 4096, 64, 32 * 1024),
             64);
     }
 
     /**
-     * Return the log(2) corresponding to subpixel on x-axis (
+     * Return the initial pixel height used to define initial arrays
+     * (buckets)
      *
-     * @return 0 (1 subpixels) < initial pixel size < 8 (256 subpixels)
-     * (3 by default ie 8 subpixels)
+     * @return 64 < initial pixel size < 32768 (2176 by default)
      */
-    public static int getSubPixel_Log2_X() {
-        return getInteger("sun.java2d.renderer.subPixel_log2_X", 3, 0, 8);
+    public static int getInitialPixelHeight() {
+        return align(
+            getInteger("sun.java2d.renderer.pixelHeight", 2176, 64, 32 * 1024),
+            64);
     }
 
     /**
-     * Return the log(2) corresponding to subpixel on y-axis (
+     * Return the log(2) corresponding to subpixel on x-axis
+     *
+     * @return 0 (1 subpixels) < initial pixel size < 8 (256 subpixels)
+     * (8 by default ie 256 subpixels)
+     */
+    public static int getSubPixel_Log2_X() {
+        return getInteger("sun.java2d.renderer.subPixel_log2_X", 8, 0, 8);
+    }
+
+    /**
+     * Return the log(2) corresponding to subpixel on y-axis
      *
      * @return 0 (1 subpixels) < initial pixel size < 8 (256 subpixels)
      * (3 by default ie 8 subpixels)
@@ -88,7 +100,7 @@
     /**
      * Return the log(2) corresponding to the square tile size in pixels
      *
-     * @return 3 (8x8 pixels) < tile size < 8 (256x256 pixels)
+     * @return 3 (8x8 pixels) < tile size < 10 (1024x1024 pixels)
      * (5 by default ie 32x32 pixels)
      */
     public static int getTileSize_Log2() {
@@ -98,12 +110,11 @@
     /**
      * Return the log(2) corresponding to the tile width in pixels
      *
-     * @return 3 (8 pixels) < tile with < 8 (256 pixels)
-     * (by default is given by the square tile size)
+     * @return 3 (8 pixels) < tile width < 10 (1024 pixels)
+     * (5 by default ie 32x32 pixels)
      */
     public static int getTileWidth_Log2() {
-        final int tileSize = getTileSize_Log2();
-        return getInteger("sun.java2d.renderer.tileWidth_log2", tileSize, 3, 10);
+        return getInteger("sun.java2d.renderer.tileWidth_log2", 5, 3, 10);
     }
 
     /**
@@ -145,6 +156,18 @@
         return getBoolean("sun.java2d.renderer.useSimplifier", "false");
     }
 
+    public static boolean isUsePathSimplifier() {
+        return getBoolean("sun.java2d.renderer.usePathSimplifier", "false");
+    }
+
+    public static float getPathSimplifierPixelTolerance() {
+        // default: MIN_PEN_SIZE or less ?
+        return getFloat("sun.java2d.renderer.pathSimplifier.pixTol",
+                (1.0f / MarlinConst.MIN_SUBPIXELS),
+                1e-3f,
+                10.0f);
+    }
+
     public static boolean isDoClip() {
         return getBoolean("sun.java2d.renderer.clip", "true");
     }
@@ -157,6 +180,14 @@
         return getBoolean("sun.java2d.renderer.clip.runtime", "true");
     }
 
+    public static boolean isDoClipSubdivider() {
+        return getBoolean("sun.java2d.renderer.clip.subdivider", "true");
+    }
+
+    public static float getSubdividerMinLength() {
+        return getFloat("sun.java2d.renderer.clip.subdivider.minLength", 100.0f, Float.NEGATIVE_INFINITY, Float.POSITIVE_INFINITY);
+    }
+
     // debugging parameters
 
     public static boolean isDoStats() {
@@ -191,16 +222,20 @@
 
     // quality settings
 
+    public static float getCurveLengthError() {
+        return getFloat("sun.java2d.renderer.curve_len_err", 0.01f, 1e-6f, 1.0f);
+    }
+
     public static float getCubicDecD2() {
-        return getFloat("sun.java2d.renderer.cubic_dec_d2", 1.0f, 0.01f, 4.0f);
+        return getFloat("sun.java2d.renderer.cubic_dec_d2", 1.0f, 1e-5f, 4.0f);
     }
 
     public static float getCubicIncD1() {
-        return getFloat("sun.java2d.renderer.cubic_inc_d1", 0.4f, 0.01f, 2.0f);
+        return getFloat("sun.java2d.renderer.cubic_inc_d1", 0.2f, 1e-6f, 1.0f);
     }
 
     public static float getQuadDecD2() {
-        return getFloat("sun.java2d.renderer.quad_dec_d2", 0.5f, 0.01f, 4.0f);
+        return getFloat("sun.java2d.renderer.quad_dec_d2", 0.5f, 1e-5f, 4.0f);
     }
 
     // system property utilities
--- a/src/java.desktop/share/classes/sun/java2d/marlin/MarlinRenderingEngine.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.desktop/share/classes/sun/java2d/marlin/MarlinRenderingEngine.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -47,7 +47,21 @@
 public final class MarlinRenderingEngine extends RenderingEngine
                                          implements MarlinConst
 {
-    private static enum NormMode {
+    // slightly slower ~2% if enabled stroker clipping (lines) but skipping cap / join handling is few percents faster in specific cases
+    static final boolean DISABLE_2ND_STROKER_CLIPPING = true;
+
+    static final boolean DO_TRACE_PATH = false;
+
+    static final boolean DO_CLIP = MarlinProperties.isDoClip();
+    static final boolean DO_CLIP_FILL = true;
+    static final boolean DO_CLIP_RUNTIME_ENABLE = MarlinProperties.isDoClipRuntimeFlag();
+
+    private static final float MIN_PEN_SIZE = 1.0f / MIN_SUBPIXELS;
+
+    static final float UPPER_BND = Float.MAX_VALUE / 2.0f;
+    static final float LOWER_BND = -UPPER_BND;
+
+    private enum NormMode {
         ON_WITH_AA {
             @Override
             PathIterator getNormalizingPathIterator(final RendererContext rdrCtx,
@@ -80,18 +94,6 @@
                                                          PathIterator src);
     }
 
-    private static final float MIN_PEN_SIZE = 1.0f / NORM_SUBPIXELS;
-
-    static final float UPPER_BND = Float.MAX_VALUE / 2.0f;
-    static final float LOWER_BND = -UPPER_BND;
-
-    static final boolean DO_CLIP = MarlinProperties.isDoClip();
-    static final boolean DO_CLIP_FILL = true;
-
-    static final boolean DO_TRACE_PATH = false;
-
-    static final boolean DO_CLIP_RUNTIME_ENABLE = MarlinProperties.isDoClipRuntimeFlag();
-
     /**
      * Public constructor
      */
@@ -419,14 +421,27 @@
         pc2d = transformerPC2D.deltaTransformConsumer(pc2d, strokerat);
 
         // stroker will adjust the clip rectangle (width / miter limit):
-        pc2d = rdrCtx.stroker.init(pc2d, width, caps, join, miterlimit, scale);
+        pc2d = rdrCtx.stroker.init(pc2d, width, caps, join, miterlimit, scale,
+                (dashes == null));
+
+        // Curve Monotizer:
+        rdrCtx.monotonizer.init(width);
 
         if (dashes != null) {
             if (!recycleDashes) {
                 dashLen = dashes.length;
             }
+            if (DO_TRACE_PATH) {
+                pc2d = transformerPC2D.traceDasher(pc2d);
+            }
             pc2d = rdrCtx.dasher.init(pc2d, dashes, dashLen, dashphase,
                                       recycleDashes);
+
+            if (DISABLE_2ND_STROKER_CLIPPING) {
+                // disable stoker clipping
+                rdrCtx.stroker.disableClipping();
+            }
+
         } else if (rdrCtx.doClip && (caps != Stroker.CAP_BUTT)) {
             if (DO_TRACE_PATH) {
                 pc2d = transformerPC2D.traceClosedPathDetector(pc2d);
@@ -625,6 +640,12 @@
     private static void pathTo(final RendererContext rdrCtx, final PathIterator pi,
                                PathConsumer2D pc2d)
     {
+        if (USE_PATH_SIMPLIFIER) {
+            // Use path simplifier at the first step
+            // to remove useless points
+            pc2d = rdrCtx.pathSimplifier.init(pc2d);
+        }
+
         // mark context as DIRTY:
         rdrCtx.dirty = true;
 
@@ -849,8 +870,6 @@
                     // trace Input:
                     pc2d = rdrCtx.transformerPC2D.traceInput(pc2d);
                 }
-
-                // TODO: subdivide quad/cubic curves into monotonic curves ?
                 pathTo(rdrCtx, pi, pc2d);
 
             } else {
@@ -1070,8 +1089,10 @@
 
         logInfo("sun.java2d.renderer.edges            = "
                 + MarlinConst.INITIAL_EDGES_COUNT);
-        logInfo("sun.java2d.renderer.pixelsize        = "
-                + MarlinConst.INITIAL_PIXEL_DIM);
+        logInfo("sun.java2d.renderer.pixelWidth       = "
+                + MarlinConst.INITIAL_PIXEL_WIDTH);
+        logInfo("sun.java2d.renderer.pixelHeight      = "
+                + MarlinConst.INITIAL_PIXEL_HEIGHT);
 
         logInfo("sun.java2d.renderer.subPixel_log2_X  = "
                 + MarlinConst.SUBPIXEL_LG_POSITIONS_X);
@@ -1101,12 +1122,21 @@
         // optimisation parameters
         logInfo("sun.java2d.renderer.useSimplifier    = "
                 + MarlinConst.USE_SIMPLIFIER);
+        logInfo("sun.java2d.renderer.usePathSimplifier= "
+                + MarlinConst.USE_PATH_SIMPLIFIER);
+        logInfo("sun.java2d.renderer.pathSimplifier.pixTol = "
+                + MarlinProperties.getPathSimplifierPixelTolerance());
 
         logInfo("sun.java2d.renderer.clip             = "
                 + MarlinProperties.isDoClip());
         logInfo("sun.java2d.renderer.clip.runtime.enable = "
                 + MarlinProperties.isDoClipRuntimeFlag());
 
+        logInfo("sun.java2d.renderer.clip.subdivider  = "
+                + MarlinProperties.isDoClipSubdivider());
+        logInfo("sun.java2d.renderer.clip.subdivider.minLength = "
+                + MarlinProperties.getSubdividerMinLength());
+
         // debugging parameters
         logInfo("sun.java2d.renderer.doStats          = "
                 + MarlinConst.DO_STATS);
@@ -1124,6 +1154,8 @@
                 + MarlinConst.LOG_UNSAFE_MALLOC);
 
         // quality settings
+        logInfo("sun.java2d.renderer.curve_len_err    = "
+                + MarlinProperties.getCurveLengthError());
         logInfo("sun.java2d.renderer.cubic_dec_d2     = "
                 + MarlinProperties.getCubicDecD2());
         logInfo("sun.java2d.renderer.cubic_inc_d1     = "
--- a/src/java.desktop/share/classes/sun/java2d/marlin/MarlinTileGenerator.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.desktop/share/classes/sun/java2d/marlin/MarlinTileGenerator.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -31,6 +31,8 @@
 
 final class MarlinTileGenerator implements AATileGenerator, MarlinConst {
 
+    private static final boolean DISABLE_BLEND = false;
+
     private static final int MAX_TILE_ALPHA_SUM = TILE_W * TILE_H * MAX_AA_ALPHA;
 
     private static final int TH_AA_ALPHA_FILL_EMPTY = ((MAX_AA_ALPHA + 1) / 3); // 33%
@@ -43,10 +45,10 @@
             throw new IllegalStateException("Invalid MAX_TILE_ALPHA_SUM: " + MAX_TILE_ALPHA_SUM);
         }
         if (DO_TRACE) {
-            System.out.println("MAX_AA_ALPHA           : " + MAX_AA_ALPHA);
-            System.out.println("TH_AA_ALPHA_FILL_EMPTY : " + TH_AA_ALPHA_FILL_EMPTY);
-            System.out.println("TH_AA_ALPHA_FILL_FULL  : " + TH_AA_ALPHA_FILL_FULL);
-            System.out.println("FILL_TILE_W            : " + FILL_TILE_W);
+            MarlinUtils.logInfo("MAX_AA_ALPHA           : " + MAX_AA_ALPHA);
+            MarlinUtils.logInfo("TH_AA_ALPHA_FILL_EMPTY : " + TH_AA_ALPHA_FILL_EMPTY);
+            MarlinUtils.logInfo("TH_AA_ALPHA_FILL_FULL  : " + TH_AA_ALPHA_FILL_FULL);
+            MarlinUtils.logInfo("FILL_TILE_W            : " + FILL_TILE_W);
         }
     }
 
@@ -141,6 +143,10 @@
      */
     @Override
     public int getTypicalAlpha() {
+        if (DISABLE_BLEND) {
+            // always return empty tiles to disable blending operations
+            return 0x00;
+        }
         int al = cache.alphaSumInTile(x);
         // Note: if we have a filled rectangle that doesn't end on a tile
         // border, we could still return 0xff, even though al!=maxTileAlphaSum
--- a/src/java.desktop/share/classes/sun/java2d/marlin/MarlinUtils.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.desktop/share/classes/sun/java2d/marlin/MarlinUtils.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -60,4 +60,22 @@
             th.printStackTrace(System.err);
         }
     }
+
+    // From sun.awt.util.ThreadGroupUtils
+
+    /**
+     * Returns a root thread group.
+     * Should be called with {@link sun.security.util.SecurityConstants#MODIFY_THREADGROUP_PERMISSION}
+     *
+     * @return a root {@code ThreadGroup}
+     */
+    public static ThreadGroup getRootThreadGroup() {
+        ThreadGroup currentTG = Thread.currentThread().getThreadGroup();
+        ThreadGroup parentTG = currentTG.getParent();
+        while (parentTG != null) {
+            currentTG = parentTG;
+            parentTG = currentTG.getParent();
+        }
+        return currentTG;
+    }
 }
--- a/src/java.desktop/share/classes/sun/java2d/marlin/MergeSort.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.desktop/share/classes/sun/java2d/marlin/MergeSort.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -61,7 +61,6 @@
         // Merge sorted parts (auxX/auxY) into x/y arrays
         if ((insertionSortIndex == 0)
             || (auxX[insertionSortIndex - 1] <= auxX[insertionSortIndex])) {
-//            System.out.println("mergeSortNoCopy: ordered");
             // 34 occurences
             // no initial left part or both sublists (auxX, auxY) are sorted:
             // copy back data into (x, y):
@@ -135,7 +134,6 @@
 
         // If arrays are inverted ie all(A) > all(B) do swap A and B to dst
         if (srcX[high - 1] <= srcX[low]) {
-//            System.out.println("mergeSort: inverse ordered");
             // 1561 occurences
             final int left = mid - low;
             final int right = high - mid;
@@ -151,7 +149,6 @@
         // If arrays are already sorted, just copy from src to dest.  This is an
         // optimization that results in faster sorts for nearly ordered lists.
         if (srcX[mid - 1] <= srcX[mid]) {
-//            System.out.println("mergeSort: ordered");
             // 14 occurences
             System.arraycopy(srcX, low, dstX, low, length);
             System.arraycopy(srcY, low, dstY, low, length);
--- a/src/java.desktop/share/classes/sun/java2d/marlin/OffHeapArray.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.desktop/share/classes/sun/java2d/marlin/OffHeapArray.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -31,7 +31,6 @@
 
 /**
  *
- * @author bourgesl
  */
 final class OffHeapArray  {
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/java.desktop/share/classes/sun/java2d/marlin/PathSimplifier.java	Fri Apr 06 03:53:28 2018 +0200
@@ -0,0 +1,138 @@
+/*
+ * Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package sun.java2d.marlin;
+
+import sun.awt.geom.PathConsumer2D;
+
+final class PathSimplifier implements PathConsumer2D {
+
+    // distance threshold in pixels (device)
+    private static final float PIX_THRESHOLD = MarlinProperties.getPathSimplifierPixelTolerance();
+
+    private static final float SQUARE_TOLERANCE = PIX_THRESHOLD * PIX_THRESHOLD;
+
+    // members:
+    private PathConsumer2D delegate;
+    private float cx, cy;
+
+    PathSimplifier() {
+    }
+
+    PathSimplifier init(final PathConsumer2D delegate) {
+        this.delegate = delegate;
+        return this; // fluent API
+    }
+
+    @Override
+    public void pathDone() {
+        delegate.pathDone();
+    }
+
+    @Override
+    public void closePath() {
+        delegate.closePath();
+    }
+
+    @Override
+    public long getNativeConsumer() {
+        return 0;
+    }
+
+    @Override
+    public void quadTo(final float x1, final float y1,
+                       final float xe, final float ye)
+    {
+        // Test if curve is too small:
+        float dx = (xe - cx);
+        float dy = (ye - cy);
+
+        if ((dx * dx + dy * dy) <= SQUARE_TOLERANCE) {
+            // check control points P1:
+            dx = (x1 - cx);
+            dy = (y1 - cy);
+
+            if ((dx * dx + dy * dy) <= SQUARE_TOLERANCE) {
+                return;
+            }
+        }
+        delegate.quadTo(x1, y1, xe, ye);
+        // final end point:
+        cx = xe;
+        cy = ye;
+    }
+
+    @Override
+    public void curveTo(final float x1, final float y1,
+                        final float x2, final float y2,
+                        final float xe, final float ye)
+    {
+        // Test if curve is too small:
+        float dx = (xe - cx);
+        float dy = (ye - cy);
+
+        if ((dx * dx + dy * dy) <= SQUARE_TOLERANCE) {
+            // check control points P1:
+            dx = (x1 - cx);
+            dy = (y1 - cy);
+
+            if ((dx * dx + dy * dy) <= SQUARE_TOLERANCE) {
+                // check control points P2:
+                dx = (x2 - cx);
+                dy = (y2 - cy);
+
+                if ((dx * dx + dy * dy) <= SQUARE_TOLERANCE) {
+                    return;
+                }
+            }
+        }
+        delegate.curveTo(x1, y1, x2, y2, xe, ye);
+        // final end point:
+        cx = xe;
+        cy = ye;
+    }
+
+    @Override
+    public void moveTo(final float xe, final float ye) {
+        delegate.moveTo(xe, ye);
+        // starting point:
+        cx = xe;
+        cy = ye;
+    }
+
+    @Override
+    public void lineTo(final float xe, final float ye) {
+        // Test if segment is too small:
+        float dx = (xe - cx);
+        float dy = (ye - cy);
+
+        if ((dx * dx + dy * dy) <= SQUARE_TOLERANCE) {
+            return;
+        }
+        delegate.lineTo(xe, ye);
+        // final end point:
+        cx = xe;
+        cy = ye;
+    }
+}
--- a/src/java.desktop/share/classes/sun/java2d/marlin/Renderer.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.desktop/share/classes/sun/java2d/marlin/Renderer.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -54,9 +54,9 @@
     private static final int SUBPIXEL_TILE
         = TILE_H << SUBPIXEL_LG_POSITIONS_Y;
 
-    // 2048 (pixelSize) pixels (height) x 8 subpixels = 64K
+    // 2176 pixels (height) x 8 subpixels = 68K
     static final int INITIAL_BUCKET_ARRAY
-        = INITIAL_PIXEL_DIM * SUBPIXEL_POSITIONS_Y;
+        = INITIAL_PIXEL_HEIGHT * SUBPIXEL_POSITIONS_Y;
 
     // crossing capacity = edges count / 4 ~ 1024
     static final int INITIAL_CROSSING_COUNT = INITIAL_EDGES_COUNT >> 2;
@@ -77,13 +77,17 @@
     // curve break into lines
     // cubic error in subpixels to decrement step
     private static final float CUB_DEC_ERR_SUBPIX
-        = MarlinProperties.getCubicDecD2() * (NORM_SUBPIXELS / 8.0f); // 1 pixel
+        = MarlinProperties.getCubicDecD2() * (SUBPIXEL_POSITIONS_X / 8.0f); // 1.0 / 8th pixel
     // cubic error in subpixels to increment step
     private static final float CUB_INC_ERR_SUBPIX
-        = MarlinProperties.getCubicIncD1() * (NORM_SUBPIXELS / 8.0f); // 0.4 pixel
+        = MarlinProperties.getCubicIncD1() * (SUBPIXEL_POSITIONS_X / 8.0f); // 0.4 / 8th pixel
+    // scale factor for Y-axis contribution to quad / cubic errors:
+    public static final float SCALE_DY = ((float) SUBPIXEL_POSITIONS_X) / SUBPIXEL_POSITIONS_Y;
 
     // TestNonAARasterization (JDK-8170879): cubics
     // bad paths (59294/100000 == 59,29%, 94335 bad pixels (avg = 1,59), 3966 warnings (avg = 0,07)
+// 2018
+    // 1.0 / 0.2: bad paths (67194/100000 == 67,19%, 117394 bad pixels (avg = 1,75 - max =  9), 4042 warnings (avg = 0,06)
 
     // cubic bind length to decrement step
     public static final float CUB_DEC_BND
@@ -110,10 +114,12 @@
     // quad break into lines
     // quadratic error in subpixels
     private static final float QUAD_DEC_ERR_SUBPIX
-        = MarlinProperties.getQuadDecD2() * (NORM_SUBPIXELS / 8.0f); // 0.5 pixel
+        = MarlinProperties.getQuadDecD2() * (SUBPIXEL_POSITIONS_X / 8.0f); // 0.5 / 8th pixel
 
     // TestNonAARasterization (JDK-8170879): quads
     // bad paths (62916/100000 == 62,92%, 103818 bad pixels (avg = 1,65), 6514 warnings (avg = 0,10)
+// 2018
+    // 0.50px  = bad paths (62915/100000 == 62,92%, 103810 bad pixels (avg = 1,65), 6512 warnings (avg = 0,10)
 
     // quadratic bind length to decrement step
     public static final float QUAD_DEC_BND
@@ -180,7 +186,7 @@
         int count = 1; // dt = 1 / count
 
         // maximum(ddX|Y) = norm(dbx, dby) * dt^2 (= 1)
-        float maxDD = Math.abs(c.dbx) + Math.abs(c.dby);
+        float maxDD = Math.abs(c.dbx) + Math.abs(c.dby) * SCALE_DY;
 
         final float _DEC_BND = QUAD_DEC_BND;
 
@@ -194,7 +200,8 @@
             }
         }
 
-        int nL = 0; // line count
+        final int nL = count; // line count
+
         if (count > 1) {
             final float icount = 1.0f / count; // dt
             final float icount2 = icount * icount; // dt^2
@@ -204,17 +211,12 @@
             float dx = c.bx * icount2 + c.cx * icount;
             float dy = c.by * icount2 + c.cy * icount;
 
-            float x1, y1;
-
-            while (--count > 0) {
-                x1 = x0 + dx;
-                dx += ddx;
-                y1 = y0 + dy;
-                dy += ddy;
+            // we use x0, y0 to walk the line
+            for (float x1 = x0, y1 = y0; --count > 0; dx += ddx, dy += ddy) {
+                x1 += dx;
+                y1 += dy;
 
                 addLine(x0, y0, x1, y1);
-
-                if (DO_STATS) { nL++; }
                 x0 = x1;
                 y0 = y1;
             }
@@ -222,7 +224,7 @@
         addLine(x0, y0, x2, y2);
 
         if (DO_STATS) {
-            rdrCtx.stats.stat_rdr_quadBreak.add(nL + 1);
+            rdrCtx.stats.stat_rdr_quadBreak.add(nL);
         }
     }
 
@@ -250,16 +252,35 @@
         dx = c.ax * icount3 + c.bx * icount2 + c.cx * icount;
         dy = c.ay * icount3 + c.by * icount2 + c.cy * icount;
 
-        // we use x0, y0 to walk the line
-        float x1 = x0, y1 = y0;
         int nL = 0; // line count
 
         final float _DEC_BND = CUB_DEC_BND;
         final float _INC_BND = CUB_INC_BND;
+        final float _SCALE_DY = SCALE_DY;
 
-        while (count > 0) {
+        // we use x0, y0 to walk the line
+        for (float x1 = x0, y1 = y0; count > 0; ) {
+            // inc / dec => ratio ~ 5 to minimize upscale / downscale but minimize edges
+
+            // float step:
+            // can only do this on even "count" values, because we must divide count by 2
+            while ((count % 2 == 0)
+                    && ((Math.abs(ddx) + Math.abs(ddy) * _SCALE_DY) <= _INC_BND)) {
+                dx = 2.0f * dx + ddx;
+                dy = 2.0f * dy + ddy;
+                ddx = 4.0f * (ddx + dddx);
+                ddy = 4.0f * (ddy + dddy);
+                dddx *= 8.0f;
+                dddy *= 8.0f;
+
+                count >>= 1;
+                if (DO_STATS) {
+                    rdrCtx.stats.stat_rdr_curveBreak_inc.add(count);
+                }
+            }
+
             // divide step by half:
-            while (Math.abs(ddx) + Math.abs(ddy) >= _DEC_BND) {
+            while ((Math.abs(ddx) + Math.abs(ddy) * _SCALE_DY) >= _DEC_BND) {
                 dddx /= 8.0f;
                 dddy /= 8.0f;
                 ddx = ddx / 4.0f - dddx;
@@ -272,44 +293,25 @@
                     rdrCtx.stats.stat_rdr_curveBreak_dec.add(count);
                 }
             }
-
-            // double step:
-            // can only do this on even "count" values, because we must divide count by 2
-            while (count % 2 == 0
-                   && Math.abs(dx) + Math.abs(dy) <= _INC_BND)
-            {
-                dx = 2.0f * dx + ddx;
-                dy = 2.0f * dy + ddy;
-                ddx = 4.0f * (ddx + dddx);
-                ddy = 4.0f * (ddy + dddy);
-                dddx *= 8.0f;
-                dddy *= 8.0f;
-
-                count >>= 1;
-                if (DO_STATS) {
-                    rdrCtx.stats.stat_rdr_curveBreak_inc.add(count);
-                }
-            }
-            if (--count > 0) {
-                x1 += dx;
-                dx += ddx;
-                ddx += dddx;
-                y1 += dy;
-                dy += ddy;
-                ddy += dddy;
-            } else {
-                x1 = x3;
-                y1 = y3;
+            if (--count == 0) {
+                break;
             }
 
-            addLine(x0, y0, x1, y1);
+            x1 += dx;
+            y1 += dy;
+            dx += ddx;
+            dy += ddy;
+            ddx += dddx;
+            ddy += dddy;
 
-            if (DO_STATS) { nL++; }
+            addLine(x0, y0, x1, y1);
             x0 = x1;
             y0 = y1;
         }
+        addLine(x0, y0, x3, y3);
+
         if (DO_STATS) {
-            rdrCtx.stats.stat_rdr_curveBreak.add(nL);
+            rdrCtx.stats.stat_rdr_curveBreak.add(nL + 1);
         }
     }
 
@@ -537,8 +539,8 @@
         edgeBuckets      = edgeBuckets_ref.initial;
         edgeBucketCounts = edgeBucketCounts_ref.initial;
 
-        // 2048 (pixelsize) pixel large
-        alphaLine_ref = rdrCtx.newCleanIntArrayRef(INITIAL_AA_ARRAY); // 8K
+        // 4096 pixels large
+        alphaLine_ref = rdrCtx.newCleanIntArrayRef(INITIAL_AA_ARRAY); // 16K
         alphaLine     = alphaLine_ref.initial;
 
         crossings_ref     = rdrCtx.newDirtyIntArrayRef(INITIAL_CROSSING_COUNT); // 2K
@@ -696,8 +698,10 @@
     {
         final float xe = tosubpixx(pix_x3);
         final float ye = tosubpixy(pix_y3);
-        curve.set(x0, y0, tosubpixx(pix_x1), tosubpixy(pix_y1),
-                  tosubpixx(pix_x2), tosubpixy(pix_y2), xe, ye);
+        curve.set(x0, y0,
+                tosubpixx(pix_x1), tosubpixy(pix_y1),
+                tosubpixx(pix_x2), tosubpixy(pix_y2),
+                xe, ye);
         curveBreakIntoLinesAndAdd(x0, y0, curve, xe, ye);
         x0 = xe;
         y0 = ye;
@@ -709,7 +713,9 @@
     {
         final float xe = tosubpixx(pix_x2);
         final float ye = tosubpixy(pix_y2);
-        curve.set(x0, y0, tosubpixx(pix_x1), tosubpixy(pix_y1), xe, ye);
+        curve.set(x0, y0,
+                tosubpixx(pix_x1), tosubpixy(pix_y1),
+                xe, ye);
         quadBreakIntoLinesAndAdd(x0, y0, curve, xe, ye);
         x0 = xe;
         y0 = ye;
--- a/src/java.desktop/share/classes/sun/java2d/marlin/RendererContext.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.desktop/share/classes/sun/java2d/marlin/RendererContext.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -31,6 +31,8 @@
 import sun.java2d.ReentrantContext;
 import sun.java2d.marlin.ArrayCacheConst.CacheStats;
 import sun.java2d.marlin.MarlinRenderingEngine.NormalizingPathIterator;
+import sun.java2d.marlin.TransformingPathConsumer2D.CurveBasicMonotonizer;
+import sun.java2d.marlin.TransformingPathConsumer2D.CurveClipSplitter;
 
 /**
  * This class is a renderer context dedicated to a single thread
@@ -70,6 +72,8 @@
     final Stroker stroker;
     // Simplifies out collinear lines
     final CollinearSimplifier simplifier = new CollinearSimplifier();
+    // Simplifies path
+    final PathSimplifier pathSimplifier = new PathSimplifier();
     final Dasher dasher;
     final MarlinTileGenerator ptg;
     final MarlinCache cache;
@@ -81,6 +85,10 @@
     boolean closedPath = false;
     // clip rectangle (ymin, ymax, xmin, xmax):
     final float[] clipRect = new float[4];
+    // CurveBasicMonotonizer instance
+    final CurveBasicMonotonizer monotonizer;
+    // CurveClipSplitter instance
+    final CurveClipSplitter curveClipSplitter;
 
     // Array caches:
     /* clean int[] cache (zero-filled) = 5 refs */
@@ -121,6 +129,10 @@
         nPCPathIterator = new NormalizingPathIterator.NearestPixelCenter(float6);
         nPQPathIterator  = new NormalizingPathIterator.NearestPixelQuarter(float6);
 
+        // curve monotonizer & clip subdivider (before transformerPC2D init)
+        monotonizer = new CurveBasicMonotonizer(this);
+        curveClipSplitter = new CurveClipSplitter(this);
+
         // MarlinRenderingEngine.TransformingPathConsumer2D
         transformerPC2D = new TransformingPathConsumer2D(this);
 
--- a/src/java.desktop/share/classes/sun/java2d/marlin/RendererStats.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.desktop/share/classes/sun/java2d/marlin/RendererStats.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -36,7 +36,6 @@
 import sun.java2d.marlin.stats.Histogram;
 import sun.java2d.marlin.stats.Monitor;
 import sun.java2d.marlin.stats.StatLong;
-import sun.awt.util.ThreadGroupUtils;
 
 /**
  * This class gathers global rendering statistics for debugging purposes only
@@ -359,7 +358,7 @@
             AccessController.doPrivileged(
                 (PrivilegedAction<Void>) () -> {
                     final Thread hook = new Thread(
-                        ThreadGroupUtils.getRootThreadGroup(),
+                        MarlinUtils.getRootThreadGroup(),
                         new Runnable() {
                             @Override
                             public void run() {
--- a/src/java.desktop/share/classes/sun/java2d/marlin/Stroker.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.desktop/share/classes/sun/java2d/marlin/Stroker.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -29,6 +29,8 @@
 
 import sun.awt.geom.PathConsumer2D;
 import sun.java2d.marlin.Helpers.PolyStack;
+import sun.java2d.marlin.TransformingPathConsumer2D.CurveBasicMonotonizer;
+import sun.java2d.marlin.TransformingPathConsumer2D.CurveClipSplitter;
 
 // TODO: some of the arithmetic here is too verbose and prone to hard to
 // debug typos. We should consider making a small Point/Vector class that
@@ -39,10 +41,9 @@
     private static final int DRAWING_OP_TO = 1; // ie. curve, line, or quad
     private static final int CLOSE = 2;
 
-    // pisces used to use fixed point arithmetic with 16 decimal digits. I
-    // didn't want to change the values of the constant below when I converted
-    // it to floating point, so that's why the divisions by 2^16 are there.
-    private static final float ROUND_JOIN_THRESHOLD = 1000.0f/65536.0f;
+    // round join threshold = 1 subpixel
+    private static final float ERR_JOIN = (1.0f / MIN_SUBPIXELS);
+    private static final float ROUND_JOIN_THRESHOLD = ERR_JOIN * ERR_JOIN;
 
     // kappa = (4/3) * (SQRT(2) - 1)
     private static final float C = (float)(4.0d * (Math.sqrt(2.0d) - 1.0d) / 3.0d);
@@ -50,8 +51,6 @@
     // SQRT(2)
     private static final float SQRT_2 = (float)Math.sqrt(2.0d);
 
-    private static final int MAX_N_CURVES = 11;
-
     private PathConsumer2D out;
 
     private int capStyle;
@@ -82,12 +81,8 @@
 
     private final PolyStack reverse;
 
-    // This is where the curve to be processed is put. We give it
-    // enough room to store all curves.
-    private final float[] middle = new float[MAX_N_CURVES * 6 + 2];
     private final float[] lp = new float[8];
     private final float[] rp = new float[8];
-    private final float[] subdivTs = new float[MAX_N_CURVES - 1];
 
     // per-thread renderer context
     final RendererContext rdrCtx;
@@ -108,6 +103,11 @@
     private boolean opened = false;
     // flag indicating if the starting point's cap is done
     private boolean capStart = false;
+    // flag indicating to monotonize curves
+    private boolean monotonize;
+
+    private boolean subdivide = DO_CLIP_SUBDIVIDER;
+    private final CurveClipSplitter curveSplitter;
 
     /**
      * Constructs a <code>Stroker</code>.
@@ -126,6 +126,7 @@
             : new PolyStack(rdrCtx);
 
         this.curve = rdrCtx.curve;
+        this.curveSplitter = rdrCtx.curveClipSplitter;
     }
 
     /**
@@ -141,6 +142,7 @@
      * <code>JOIN_BEVEL</code>.
      * @param miterLimit the desired miter limit
      * @param scale scaling factor applied to clip boundaries
+     * @param subdivideCurves true to indicate to subdivide curves, false if dasher does
      * @return this instance
      */
     Stroker init(final PathConsumer2D pc2d,
@@ -148,12 +150,15 @@
                  final int capStyle,
                  final int joinStyle,
                  final float miterLimit,
-                 final float scale)
+                 final float scale,
+                 final boolean subdivideCurves)
     {
         this.out = pc2d;
 
         this.lineWidth2 = lineWidth / 2.0f;
         this.invHalfLineWidth2Sq = 1.0f / (2.0f * lineWidth2 * lineWidth2);
+        this.monotonize = subdivideCurves;
+
         this.capStyle = capStyle;
         this.joinStyle = joinStyle;
 
@@ -191,6 +196,15 @@
             _clipRect[2] -= margin - rdrOffX;
             _clipRect[3] += margin + rdrOffX;
             this.clipRect = _clipRect;
+
+            // initialize curve splitter here for stroker & dasher:
+            if (DO_CLIP_SUBDIVIDER) {
+                subdivide = subdivideCurves;
+                // adjust padded clip rectangle:
+                curveSplitter.init();
+            } else {
+                subdivide = false;
+            }
         } else {
             this.clipRect = null;
             this.cOutCode = 0;
@@ -199,6 +213,12 @@
         return this; // fluent API
     }
 
+    void disableClipping() {
+        this.clipRect = null;
+        this.cOutCode = 0;
+        this.sOutCode = 0;
+    }
+
     /**
      * Disposes this stroker:
      * clean up before reusing this instance
@@ -215,10 +235,8 @@
             Arrays.fill(offset1, 0.0f);
             Arrays.fill(offset2, 0.0f);
             Arrays.fill(miter, 0.0f);
-            Arrays.fill(middle, 0.0f);
             Arrays.fill(lp, 0.0f);
             Arrays.fill(rp, 0.0f);
-            Arrays.fill(subdivTs, 0.0f);
         }
     }
 
@@ -250,19 +268,20 @@
         return dx1 * dy2 <= dy1 * dx2;
     }
 
-    private void drawRoundJoin(float x, float y,
-                               float omx, float omy, float mx, float my,
-                               boolean rev,
-                               float threshold)
+    private void mayDrawRoundJoin(float cx, float cy,
+                                  float omx, float omy,
+                                  float mx, float my,
+                                  boolean rev)
     {
         if ((omx == 0.0f && omy == 0.0f) || (mx == 0.0f && my == 0.0f)) {
             return;
         }
 
-        float domx = omx - mx;
-        float domy = omy - my;
-        float len = domx*domx + domy*domy;
-        if (len < threshold) {
+        final float domx = omx - mx;
+        final float domy = omy - my;
+        final float lenSq = domx*domx + domy*domy;
+
+        if (lenSq < ROUND_JOIN_THRESHOLD) {
             return;
         }
 
@@ -272,7 +291,7 @@
             mx  = -mx;
             my  = -my;
         }
-        drawRoundJoin(x, y, omx, omy, mx, my, rev);
+        drawRoundJoin(cx, cy, omx, omy, mx, my, rev);
     }
 
     private void drawRoundJoin(float cx, float cy,
@@ -383,7 +402,7 @@
                                      final float x1, final float y1,
                                      final float x0p, final float y0p,
                                      final float x1p, final float y1p,
-                                     final float[] m, int off)
+                                     final float[] m)
     {
         float x10 = x1 - x0;
         float y10 = y1 - y0;
@@ -402,8 +421,8 @@
         float den = x10*y10p - x10p*y10;
         float t = x10p*(y0-y0p) - y10p*(x0-x0p);
         t /= den;
-        m[off++] = x0 + t*x10;
-        m[off]   = y0 + t*y10;
+        m[0] = x0 + t*x10;
+        m[1] = y0 + t*y10;
     }
 
     // Return the intersection point of the lines (x0, y0) -> (x1, y1)
@@ -412,7 +431,7 @@
                                          final float x1, final float y1,
                                          final float x0p, final float y0p,
                                          final float x1p, final float y1p,
-                                         final float[] m, int off)
+                                         final float[] m)
     {
         float x10 = x1 - x0;
         float y10 = y1 - y0;
@@ -430,20 +449,21 @@
         // immediately).
         float den = x10*y10p - x10p*y10;
         if (den == 0.0f) {
-            m[off++] = (x0 + x0p) / 2.0f;
-            m[off]   = (y0 + y0p) / 2.0f;
-            return;
+            m[2] = (x0 + x0p) / 2.0f;
+            m[3] = (y0 + y0p) / 2.0f;
+        } else {
+            float t = x10p*(y0-y0p) - y10p*(x0-x0p);
+            t /= den;
+            m[2] = x0 + t*x10;
+            m[3] = y0 + t*y10;
         }
-        float t = x10p*(y0-y0p) - y10p*(x0-x0p);
-        t /= den;
-        m[off++] = x0 + t*x10;
-        m[off] = y0 + t*y10;
     }
 
     private void drawMiter(final float pdx, final float pdy,
                            final float x0, final float y0,
                            final float dx, final float dy,
-                           float omx, float omy, float mx, float my,
+                           float omx, float omy,
+                           float mx, float my,
                            boolean rev)
     {
         if ((mx == omx && my == omy) ||
@@ -461,8 +481,7 @@
         }
 
         computeMiter((x0 - pdx) + omx, (y0 - pdy) + omy, x0 + omx, y0 + omy,
-                     (dx + x0) + mx, (dy + y0) + my, x0 + mx, y0 + my,
-                     miter, 0);
+                     (dx + x0) + mx, (dy + y0) + my, x0 + mx, y0 + my, miter);
 
         final float miterX = miter[0];
         final float miterY = miter[1];
@@ -480,7 +499,7 @@
 
     @Override
     public void moveTo(final float x0, final float y0) {
-        moveTo(x0, y0, cOutCode);
+        _moveTo(x0, y0, cOutCode);
         // update starting point:
         this.sx0 = x0;
         this.sy0 = y0;
@@ -496,7 +515,7 @@
         }
     }
 
-    private void moveTo(final float x0, final float y0,
+    private void _moveTo(final float x0, final float y0,
                         final int outcode)
     {
         if (prev == MOVE_TO) {
@@ -523,16 +542,40 @@
                         final boolean force)
     {
         final int outcode0 = this.cOutCode;
+
         if (!force && clipRect != null) {
             final int outcode1 = Helpers.outcode(x1, y1, clipRect);
-            this.cOutCode = outcode1;
+
+            // Should clip
+            final int orCode = (outcode0 | outcode1);
+            if (orCode != 0) {
+                final int sideCode = outcode0 & outcode1;
 
-            // basic rejection criteria
-            if ((outcode0 & outcode1) != 0) {
-                moveTo(x1, y1, outcode0);
-                opened = true;
-                return;
+                // basic rejection criteria:
+                if (sideCode == 0) {
+                    // ovelap clip:
+                    if (subdivide) {
+                        // avoid reentrance
+                        subdivide = false;
+                        // subdivide curve => callback with subdivided parts:
+                        boolean ret = curveSplitter.splitLine(cx0, cy0, x1, y1,
+                                                              orCode, this);
+                        // reentrance is done:
+                        subdivide = true;
+                        if (ret) {
+                            return;
+                        }
+                    }
+                    // already subdivided so render it
+                } else {
+                    this.cOutCode = outcode1;
+                    _moveTo(x1, y1, outcode0);
+                    opened = true;
+                    return;
+                }
             }
+
+            this.cOutCode = outcode1;
         }
 
         float dx = x1 - cx0;
@@ -754,10 +797,7 @@
                 if (joinStyle == JOIN_MITER) {
                     drawMiter(pdx, pdy, x0, y0, dx, dy, omx, omy, mx, my, cw);
                 } else if (joinStyle == JOIN_ROUND) {
-                    drawRoundJoin(x0, y0,
-                                  omx, omy,
-                                  mx, my, cw,
-                                  ROUND_JOIN_THRESHOLD);
+                    mayDrawRoundJoin(x0, y0, omx, omy, mx, my, cw);
                 }
             }
             emitLineTo(x0, y0, !cw);
@@ -767,18 +807,19 @@
 
     private static boolean within(final float x1, final float y1,
                                   final float x2, final float y2,
-                                  final float ERR)
+                                  final float err)
     {
-        assert ERR > 0 : "";
+        assert err > 0 : "";
         // compare taxicab distance. ERR will always be small, so using
         // true distance won't give much benefit
-        return (Helpers.within(x1, x2, ERR) &&  // we want to avoid calling Math.abs
-                Helpers.within(y1, y2, ERR)); // this is just as good.
+        return (Helpers.within(x1, x2, err) && // we want to avoid calling Math.abs
+                Helpers.within(y1, y2, err));  // this is just as good.
     }
 
-    private void getLineOffsets(float x1, float y1,
-                                float x2, float y2,
-                                float[] left, float[] right) {
+    private void getLineOffsets(final float x1, final float y1,
+                                final float x2, final float y2,
+                                final float[] left, final float[] right)
+    {
         computeOffset(x2 - x1, y2 - y1, lineWidth2, offset0);
         final float mx = offset0[0];
         final float my = offset0[1];
@@ -786,14 +827,16 @@
         left[1] = y1 + my;
         left[2] = x2 + mx;
         left[3] = y2 + my;
+
         right[0] = x1 - mx;
         right[1] = y1 - my;
         right[2] = x2 - mx;
         right[3] = y2 - my;
     }
 
-    private int computeOffsetCubic(float[] pts, final int off,
-                                   float[] leftOff, float[] rightOff)
+    private int computeOffsetCubic(final float[] pts, final int off,
+                                   final float[] leftOff,
+                                   final float[] rightOff)
     {
         // if p1=p2 or p3=p4 it means that the derivative at the endpoint
         // vanishes, which creates problems with computeOffset. Usually
@@ -802,7 +845,7 @@
         // the input curve at the cusp, and passes it to this function.
         // because of inaccuracies in the splitting, we consider points
         // equal if they're very close to each other.
-        final float x1 = pts[off + 0], y1 = pts[off + 1];
+        final float x1 = pts[off    ], y1 = pts[off + 1];
         final float x2 = pts[off + 2], y2 = pts[off + 3];
         final float x3 = pts[off + 4], y3 = pts[off + 5];
         final float x4 = pts[off + 6], y4 = pts[off + 7];
@@ -816,6 +859,7 @@
         // in which case ignore if p1 == p2
         final boolean p1eqp2 = within(x1, y1, x2, y2, 6.0f * Math.ulp(y2));
         final boolean p3eqp4 = within(x3, y3, x4, y4, 6.0f * Math.ulp(y4));
+
         if (p1eqp2 && p3eqp4) {
             getLineOffsets(x1, y1, x4, y4, leftOff, rightOff);
             return 4;
@@ -831,6 +875,7 @@
         float dotsq = (dx1 * dx4 + dy1 * dy4);
         dotsq *= dotsq;
         float l1sq = dx1 * dx1 + dy1 * dy1, l4sq = dx4 * dx4 + dy4 * dy4;
+
         if (Helpers.within(dotsq, l1sq * l4sq, 4.0f * Math.ulp(dotsq))) {
             getLineOffsets(x1, y1, x4, y4, leftOff, rightOff);
             return 4;
@@ -944,10 +989,11 @@
     // compute offset curves using bezier spline through t=0.5 (i.e.
     // ComputedCurve(0.5) == IdealParallelCurve(0.5))
     // return the kind of curve in the right and left arrays.
-    private int computeOffsetQuad(float[] pts, final int off,
-                                  float[] leftOff, float[] rightOff)
+    private int computeOffsetQuad(final float[] pts, final int off,
+                                  final float[] leftOff,
+                                  final float[] rightOff)
     {
-        final float x1 = pts[off + 0], y1 = pts[off + 1];
+        final float x1 = pts[off    ], y1 = pts[off + 1];
         final float x2 = pts[off + 2], y2 = pts[off + 3];
         final float x3 = pts[off + 4], y3 = pts[off + 5];
 
@@ -968,6 +1014,7 @@
         // in which case ignore.
         final boolean p1eqp2 = within(x1, y1, x2, y2, 6.0f * Math.ulp(y2));
         final boolean p2eqp3 = within(x2, y2, x3, y3, 6.0f * Math.ulp(y3));
+
         if (p1eqp2 || p2eqp3) {
             getLineOffsets(x1, y1, x3, y3, leftOff, rightOff);
             return 4;
@@ -977,6 +1024,7 @@
         float dotsq = (dx1 * dx3 + dy1 * dy3);
         dotsq *= dotsq;
         float l1sq = dx1 * dx1 + dy1 * dy1, l3sq = dx3 * dx3 + dy3 * dy3;
+
         if (Helpers.within(dotsq, l1sq * l3sq, 4.0f * Math.ulp(dotsq))) {
             getLineOffsets(x1, y1, x3, y3, leftOff, rightOff);
             return 4;
@@ -992,151 +1040,111 @@
         float y1p = y1 + offset0[1]; // point
         float x3p = x3 + offset1[0]; // end
         float y3p = y3 + offset1[1]; // point
-        safeComputeMiter(x1p, y1p, x1p+dx1, y1p+dy1, x3p, y3p, x3p-dx3, y3p-dy3, leftOff, 2);
+        safeComputeMiter(x1p, y1p, x1p+dx1, y1p+dy1, x3p, y3p, x3p-dx3, y3p-dy3, leftOff);
         leftOff[0] = x1p; leftOff[1] = y1p;
         leftOff[4] = x3p; leftOff[5] = y3p;
 
         x1p = x1 - offset0[0]; y1p = y1 - offset0[1];
         x3p = x3 - offset1[0]; y3p = y3 - offset1[1];
-        safeComputeMiter(x1p, y1p, x1p+dx1, y1p+dy1, x3p, y3p, x3p-dx3, y3p-dy3, rightOff, 2);
+        safeComputeMiter(x1p, y1p, x1p+dx1, y1p+dy1, x3p, y3p, x3p-dx3, y3p-dy3, rightOff);
         rightOff[0] = x1p; rightOff[1] = y1p;
         rightOff[4] = x3p; rightOff[5] = y3p;
         return 6;
     }
 
-    // finds values of t where the curve in pts should be subdivided in order
-    // to get good offset curves a distance of w away from the middle curve.
-    // Stores the points in ts, and returns how many of them there were.
-    private static int findSubdivPoints(final Curve c, float[] pts, float[] ts,
-                                        final int type, final float w)
-    {
-        final float x12 = pts[2] - pts[0];
-        final float y12 = pts[3] - pts[1];
-        // if the curve is already parallel to either axis we gain nothing
-        // from rotating it.
-        if (y12 != 0.0f && x12 != 0.0f) {
-            // we rotate it so that the first vector in the control polygon is
-            // parallel to the x-axis. This will ensure that rotated quarter
-            // circles won't be subdivided.
-            final float hypot = (float) Math.sqrt(x12 * x12 + y12 * y12);
-            final float cos = x12 / hypot;
-            final float sin = y12 / hypot;
-            final float x1 = cos * pts[0] + sin * pts[1];
-            final float y1 = cos * pts[1] - sin * pts[0];
-            final float x2 = cos * pts[2] + sin * pts[3];
-            final float y2 = cos * pts[3] - sin * pts[2];
-            final float x3 = cos * pts[4] + sin * pts[5];
-            final float y3 = cos * pts[5] - sin * pts[4];
-
-            switch(type) {
-            case 8:
-                final float x4 = cos * pts[6] + sin * pts[7];
-                final float y4 = cos * pts[7] - sin * pts[6];
-                c.set(x1, y1, x2, y2, x3, y3, x4, y4);
-                break;
-            case 6:
-                c.set(x1, y1, x2, y2, x3, y3);
-                break;
-            default:
-            }
-        } else {
-            c.set(pts, type);
-        }
-
-        int ret = 0;
-        // we subdivide at values of t such that the remaining rotated
-        // curves are monotonic in x and y.
-        ret += c.dxRoots(ts, ret);
-        ret += c.dyRoots(ts, ret);
-        // subdivide at inflection points.
-        if (type == 8) {
-            // quadratic curves can't have inflection points
-            ret += c.infPoints(ts, ret);
-        }
-
-        // now we must subdivide at points where one of the offset curves will have
-        // a cusp. This happens at ts where the radius of curvature is equal to w.
-        ret += c.rootsOfROCMinusW(ts, ret, w, 0.0001f);
-
-        ret = Helpers.filterOutNotInAB(ts, 0, ret, 0.0001f, 0.9999f);
-        Helpers.isort(ts, 0, ret);
-        return ret;
-    }
-
     @Override
     public void curveTo(final float x1, final float y1,
                         final float x2, final float y2,
                         final float x3, final float y3)
     {
         final int outcode0 = this.cOutCode;
+
         if (clipRect != null) {
+            final int outcode1 = Helpers.outcode(x1, y1, clipRect);
+            final int outcode2 = Helpers.outcode(x2, y2, clipRect);
             final int outcode3 = Helpers.outcode(x3, y3, clipRect);
-            this.cOutCode = outcode3;
+
+            // Should clip
+            final int orCode = (outcode0 | outcode1 | outcode2 | outcode3);
+            if (orCode != 0) {
+                final int sideCode = outcode0 & outcode1 & outcode2 & outcode3;
 
-            if ((outcode0 & outcode3) != 0) {
-                final int outcode1 = Helpers.outcode(x1, y1, clipRect);
-                final int outcode2 = Helpers.outcode(x2, y2, clipRect);
-
-                // basic rejection criteria
-                if ((outcode0 & outcode1 & outcode2 & outcode3) != 0) {
-                    moveTo(x3, y3, outcode0);
+                // basic rejection criteria:
+                if (sideCode == 0) {
+                    // ovelap clip:
+                    if (subdivide) {
+                        // avoid reentrance
+                        subdivide = false;
+                        // subdivide curve => callback with subdivided parts:
+                        boolean ret = curveSplitter.splitCurve(cx0, cy0, x1, y1,
+                                                               x2, y2, x3, y3,
+                                                               orCode, this);
+                        // reentrance is done:
+                        subdivide = true;
+                        if (ret) {
+                            return;
+                        }
+                    }
+                    // already subdivided so render it
+                } else {
+                    this.cOutCode = outcode3;
+                    _moveTo(x3, y3, outcode0);
                     opened = true;
                     return;
                 }
             }
+
+            this.cOutCode = outcode3;
         }
-
-        final float[] mid = middle;
+        _curveTo(x1, y1, x2, y2, x3, y3, outcode0);
+    }
 
-        mid[0] = cx0; mid[1] = cy0;
-        mid[2] = x1;  mid[3] = y1;
-        mid[4] = x2;  mid[5] = y2;
-        mid[6] = x3;  mid[7] = y3;
-
+    private void _curveTo(final float x1, final float y1,
+                          final float x2, final float y2,
+                          final float x3, final float y3,
+                          final int outcode0)
+    {
         // need these so we can update the state at the end of this method
-        final float xf = x3, yf = y3;
-        float dxs = mid[2] - mid[0];
-        float dys = mid[3] - mid[1];
-        float dxf = mid[6] - mid[4];
-        float dyf = mid[7] - mid[5];
+        float dxs = x1 - cx0;
+        float dys = y1 - cy0;
+        float dxf = x3 - x2;
+        float dyf = y3 - y2;
 
-        boolean p1eqp2 = (dxs == 0.0f && dys == 0.0f);
-        boolean p3eqp4 = (dxf == 0.0f && dyf == 0.0f);
-        if (p1eqp2) {
-            dxs = mid[4] - mid[0];
-            dys = mid[5] - mid[1];
-            if (dxs == 0.0f && dys == 0.0f) {
-                dxs = mid[6] - mid[0];
-                dys = mid[7] - mid[1];
+        if ((dxs == 0.0f) && (dys == 0.0f)) {
+            dxs = x2 - cx0;
+            dys = y2 - cy0;
+            if ((dxs == 0.0f) && (dys == 0.0f)) {
+                dxs = x3 - cx0;
+                dys = y3 - cy0;
             }
         }
-        if (p3eqp4) {
-            dxf = mid[6] - mid[2];
-            dyf = mid[7] - mid[3];
-            if (dxf == 0.0f && dyf == 0.0f) {
-                dxf = mid[6] - mid[0];
-                dyf = mid[7] - mid[1];
+        if ((dxf == 0.0f) && (dyf == 0.0f)) {
+            dxf = x3 - x1;
+            dyf = y3 - y1;
+            if ((dxf == 0.0f) && (dyf == 0.0f)) {
+                dxf = x3 - cx0;
+                dyf = y3 - cy0;
             }
         }
-        if (dxs == 0.0f && dys == 0.0f) {
+        if ((dxs == 0.0f) && (dys == 0.0f)) {
             // this happens if the "curve" is just a point
             // fix outcode0 for lineTo() call:
             if (clipRect != null) {
                 this.cOutCode = outcode0;
             }
-            lineTo(mid[0], mid[1]);
+            lineTo(cx0, cy0);
             return;
         }
 
         // if these vectors are too small, normalize them, to avoid future
         // precision problems.
         if (Math.abs(dxs) < 0.1f && Math.abs(dys) < 0.1f) {
-            float len = (float) Math.sqrt(dxs*dxs + dys*dys);
+            final float len = (float)Math.sqrt(dxs * dxs + dys * dys);
             dxs /= len;
             dys /= len;
         }
         if (Math.abs(dxf) < 0.1f && Math.abs(dyf) < 0.1f) {
-            float len = (float) Math.sqrt(dxf*dxf + dyf*dyf);
+            final float len = (float)Math.sqrt(dxf * dxf + dyf * dyf);
             dxf /= len;
             dyf /= len;
         }
@@ -1144,17 +1152,25 @@
         computeOffset(dxs, dys, lineWidth2, offset0);
         drawJoin(cdx, cdy, cx0, cy0, dxs, dys, cmx, cmy, offset0[0], offset0[1], outcode0);
 
-        final int nSplits = findSubdivPoints(curve, mid, subdivTs, 8, lineWidth2);
+        int nSplits = 0;
+        final float[] mid;
+        final float[] l = lp;
+
+        if (monotonize) {
+            // monotonize curve:
+            final CurveBasicMonotonizer monotonizer
+                = rdrCtx.monotonizer.curve(cx0, cy0, x1, y1, x2, y2, x3, y3);
 
-        float prevT = 0.0f;
-        for (int i = 0, off = 0; i < nSplits; i++, off += 6) {
-            final float t = subdivTs[i];
-            Helpers.subdivideCubicAt((t - prevT) / (1.0f - prevT),
-                                     mid, off, mid, off, mid, off + 6);
-            prevT = t;
+            nSplits = monotonizer.nbSplits;
+            mid = monotonizer.middle;
+        } else {
+            // use left instead:
+            mid = l;
+            mid[0] = cx0; mid[1] = cy0;
+            mid[2] = x1;  mid[3] = y1;
+            mid[4] = x2;  mid[5] = y2;
+            mid[6] = x3;  mid[7] = y3;
         }
-
-        final float[] l = lp;
         final float[] r = rp;
 
         int kind = 0;
@@ -1178,8 +1194,8 @@
         }
 
         this.prev = DRAWING_OP_TO;
-        this.cx0 = xf;
-        this.cy0 = yf;
+        this.cx0 = x3;
+        this.cy0 = y3;
         this.cdx = dxf;
         this.cdy = dyf;
         this.cmx = (l[kind - 2] - r[kind - 2]) / 2.0f;
@@ -1191,74 +1207,101 @@
                        final float x2, final float y2)
     {
         final int outcode0 = this.cOutCode;
+
         if (clipRect != null) {
+            final int outcode1 = Helpers.outcode(x1, y1, clipRect);
             final int outcode2 = Helpers.outcode(x2, y2, clipRect);
-            this.cOutCode = outcode2;
+
+            // Should clip
+            final int orCode = (outcode0 | outcode1 | outcode2);
+            if (orCode != 0) {
+                final int sideCode = outcode0 & outcode1 & outcode2;
 
-            if ((outcode0 & outcode2) != 0) {
-                final int outcode1 = Helpers.outcode(x1, y1, clipRect);
-
-                // basic rejection criteria
-                if ((outcode0 & outcode1 & outcode2) != 0) {
-                    moveTo(x2, y2, outcode0);
+                // basic rejection criteria:
+                if (sideCode == 0) {
+                    // ovelap clip:
+                    if (subdivide) {
+                        // avoid reentrance
+                        subdivide = false;
+                        // subdivide curve => call lineTo() with subdivided curves:
+                        boolean ret = curveSplitter.splitQuad(cx0, cy0, x1, y1,
+                                                              x2, y2, orCode, this);
+                        // reentrance is done:
+                        subdivide = true;
+                        if (ret) {
+                            return;
+                        }
+                    }
+                    // already subdivided so render it
+                } else {
+                    this.cOutCode = outcode2;
+                    _moveTo(x2, y2, outcode0);
                     opened = true;
                     return;
                 }
             }
-        }
-
-        final float[] mid = middle;
 
-        mid[0] = cx0; mid[1] = cy0;
-        mid[2] = x1;  mid[3] = y1;
-        mid[4] = x2;  mid[5] = y2;
+            this.cOutCode = outcode2;
+        }
+        _quadTo(x1, y1, x2, y2, outcode0);
+    }
 
+    private void _quadTo(final float x1, final float y1,
+                          final float x2, final float y2,
+                          final int outcode0)
+    {
         // need these so we can update the state at the end of this method
-        final float xf = x2, yf = y2;
-        float dxs = mid[2] - mid[0];
-        float dys = mid[3] - mid[1];
-        float dxf = mid[4] - mid[2];
-        float dyf = mid[5] - mid[3];
-        if ((dxs == 0.0f && dys == 0.0f) || (dxf == 0.0f && dyf == 0.0f)) {
-            dxs = dxf = mid[4] - mid[0];
-            dys = dyf = mid[5] - mid[1];
+        float dxs = x1 - cx0;
+        float dys = y1 - cy0;
+        float dxf = x2 - x1;
+        float dyf = y2 - y1;
+
+        if (((dxs == 0.0f) && (dys == 0.0f)) || ((dxf == 0.0f) && (dyf == 0.0f))) {
+            dxs = dxf = x2 - cx0;
+            dys = dyf = y2 - cy0;
         }
-        if (dxs == 0.0f && dys == 0.0f) {
+        if ((dxs == 0.0f) && (dys == 0.0f)) {
             // this happens if the "curve" is just a point
             // fix outcode0 for lineTo() call:
             if (clipRect != null) {
                 this.cOutCode = outcode0;
             }
-            lineTo(mid[0], mid[1]);
+            lineTo(cx0, cy0);
             return;
         }
         // if these vectors are too small, normalize them, to avoid future
         // precision problems.
         if (Math.abs(dxs) < 0.1f && Math.abs(dys) < 0.1f) {
-            float len = (float) Math.sqrt(dxs*dxs + dys*dys);
+            final float len = (float)Math.sqrt(dxs * dxs + dys * dys);
             dxs /= len;
             dys /= len;
         }
         if (Math.abs(dxf) < 0.1f && Math.abs(dyf) < 0.1f) {
-            float len = (float) Math.sqrt(dxf*dxf + dyf*dyf);
+            final float len = (float)Math.sqrt(dxf * dxf + dyf * dyf);
             dxf /= len;
             dyf /= len;
         }
-
         computeOffset(dxs, dys, lineWidth2, offset0);
         drawJoin(cdx, cdy, cx0, cy0, dxs, dys, cmx, cmy, offset0[0], offset0[1], outcode0);
 
-        int nSplits = findSubdivPoints(curve, mid, subdivTs, 6, lineWidth2);
+        int nSplits = 0;
+        final float[] mid;
+        final float[] l = lp;
+
+        if (monotonize) {
+            // monotonize quad:
+            final CurveBasicMonotonizer monotonizer
+                = rdrCtx.monotonizer.quad(cx0, cy0, x1, y1, x2, y2);
 
-        float prevt = 0.0f;
-        for (int i = 0, off = 0; i < nSplits; i++, off += 4) {
-            final float t = subdivTs[i];
-            Helpers.subdivideQuadAt((t - prevt) / (1.0f - prevt),
-                                    mid, off, mid, off, mid, off + 4);
-            prevt = t;
+            nSplits = monotonizer.nbSplits;
+            mid = monotonizer.middle;
+        } else {
+            // use left instead:
+            mid = l;
+            mid[0] = cx0; mid[1] = cy0;
+            mid[2] = x1;  mid[3] = y1;
+            mid[4] = x2;  mid[5] = y2;
         }
-
-        final float[] l = lp;
         final float[] r = rp;
 
         int kind = 0;
@@ -1282,8 +1325,8 @@
         }
 
         this.prev = DRAWING_OP_TO;
-        this.cx0 = xf;
-        this.cy0 = yf;
+        this.cx0 = x2;
+        this.cy0 = y2;
         this.cdx = dxf;
         this.cdy = dyf;
         this.cmx = (l[kind - 2] - r[kind - 2]) / 2.0f;
--- a/src/java.desktop/share/classes/sun/java2d/marlin/TransformingPathConsumer2D.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.desktop/share/classes/sun/java2d/marlin/TransformingPathConsumer2D.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -28,11 +28,15 @@
 import sun.awt.geom.PathConsumer2D;
 import java.awt.geom.AffineTransform;
 import java.awt.geom.Path2D;
+import java.util.Arrays;
 import sun.java2d.marlin.Helpers.IndexStack;
 import sun.java2d.marlin.Helpers.PolyStack;
 
 final class TransformingPathConsumer2D {
 
+    // higher uncertainty in float variant for huge shapes > 10^7
+    static final float CLIP_RECT_PADDING = 1.0f;
+
     private final RendererContext rdrCtx;
 
     // recycled ClosedPathDetector instance from detectClosedPath()
@@ -57,6 +61,7 @@
     private final PathTracer tracerCPDetector = new PathTracer("ClosedPathDetector");
     private final PathTracer tracerFiller     = new PathTracer("Filler");
     private final PathTracer tracerStroker    = new PathTracer("Stroker");
+    private final PathTracer tracerDasher     = new PathTracer("Dasher");
 
     TransformingPathConsumer2D(final RendererContext rdrCtx) {
         // used by RendererContext
@@ -85,6 +90,10 @@
         return tracerStroker.init(out);
     }
 
+    PathConsumer2D traceDasher(PathConsumer2D out) {
+        return tracerDasher.init(out);
+    }
+
     PathConsumer2D detectClosedPath(PathConsumer2D out) {
         return cpDetector.init(out);
     }
@@ -500,11 +509,19 @@
 
         private boolean outside = false;
 
+        // The current point (TODO stupid repeated info)
+        private float cx0, cy0;
+
         // The current point OUTSIDE
-        private float cx0, cy0;
+        private float cox0, coy0;
+
+        private boolean subdivide = MarlinConst.DO_CLIP_SUBDIVIDER;
+        private final CurveClipSplitter curveSplitter;
 
         PathClipFilter(final RendererContext rdrCtx) {
             this.clipRect = rdrCtx.clipRect;
+            this.curveSplitter = rdrCtx.curveClipSplitter;
+
             this.stack = (rdrCtx.stats != null) ?
                 new IndexStack(rdrCtx,
                         rdrCtx.stats.stat_pcf_idxstack_indices,
@@ -529,6 +546,11 @@
             _clipRect[2] -= margin - rdrOffX;
             _clipRect[3] += margin + rdrOffX;
 
+            if (MarlinConst.DO_CLIP_SUBDIVIDER) {
+                // adjust padded clip rectangle:
+                curveSplitter.init();
+            }
+
             this.init_corners = true;
             this.gOutCode = MarlinConst.OUTCODE_MASK_T_B_L_R;
 
@@ -579,7 +601,9 @@
                 }
                 stack.pullAll(corners, out);
             }
-            out.lineTo(cx0, cy0);
+            out.lineTo(cox0, coy0);
+            this.cx0 = cox0;
+            this.cy0 = coy0;
         }
 
         @Override
@@ -604,38 +628,68 @@
         public void moveTo(final float x0, final float y0) {
             finishPath();
 
-            final int outcode = Helpers.outcode(x0, y0, clipRect);
-            this.cOutCode = outcode;
+            this.cOutCode = Helpers.outcode(x0, y0, clipRect);
             this.outside = false;
             out.moveTo(x0, y0);
+            this.cx0 = x0;
+            this.cy0 = y0;
         }
 
         @Override
         public void lineTo(final float xe, final float ye) {
             final int outcode0 = this.cOutCode;
             final int outcode1 = Helpers.outcode(xe, ye, clipRect);
-            this.cOutCode = outcode1;
 
-            final int sideCode = (outcode0 & outcode1);
+            // Should clip
+            final int orCode = (outcode0 | outcode1);
+            if (orCode != 0) {
+                final int sideCode = (outcode0 & outcode1);
 
-            // basic rejection criteria:
-            if (sideCode == 0) {
-                this.gOutCode = 0;
-            } else {
-                this.gOutCode &= sideCode;
-                // keep last point coordinate before entering the clip again:
-                this.outside = true;
-                this.cx0 = xe;
-                this.cy0 = ye;
+                // basic rejection criteria:
+                if (sideCode == 0) {
+                    // ovelap clip:
+                    if (subdivide) {
+                        // avoid reentrance
+                        subdivide = false;
+                        boolean ret;
+                        // subdivide curve => callback with subdivided parts:
+                        if (outside) {
+                            ret = curveSplitter.splitLine(cox0, coy0, xe, ye,
+                                                          orCode, this);
+                        } else {
+                            ret = curveSplitter.splitLine(cx0, cy0, xe, ye,
+                                                          orCode, this);
+                        }
+                        // reentrance is done:
+                        subdivide = true;
+                        if (ret) {
+                            return;
+                        }
+                    }
+                    // already subdivided so render it
+                } else {
+                    this.cOutCode = outcode1;
+                    this.gOutCode &= sideCode;
+                    // keep last point coordinate before entering the clip again:
+                    this.outside = true;
+                    this.cox0 = xe;
+                    this.coy0 = ye;
 
-                clip(sideCode, outcode0, outcode1);
-                return;
+                    clip(sideCode, outcode0, outcode1);
+                    return;
+                }
             }
+
+            this.cOutCode = outcode1;
+            this.gOutCode = 0;
+
             if (outside) {
                 finish();
             }
             // clipping disabled:
             out.lineTo(xe, ye);
+            this.cx0 = xe;
+            this.cy0 = ye;
         }
 
         private void clip(final int sideCode,
@@ -655,22 +709,18 @@
                 // add corners to outside stack:
                 switch (tbCode) {
                     case MarlinConst.OUTCODE_TOP:
-// System.out.println("TOP "+ ((off == 0) ? "LEFT" : "RIGHT"));
                         stack.push(off); // top
                         return;
                     case MarlinConst.OUTCODE_BOTTOM:
-// System.out.println("BOTTOM "+ ((off == 0) ? "LEFT" : "RIGHT"));
                         stack.push(off + 1); // bottom
                         return;
                     default:
                         // both TOP / BOTTOM:
                         if ((outcode0 & MarlinConst.OUTCODE_TOP) != 0) {
-// System.out.println("TOP + BOTTOM "+ ((off == 0) ? "LEFT" : "RIGHT"));
                             // top to bottom
                             stack.push(off); // top
                             stack.push(off + 1); // bottom
                         } else {
-// System.out.println("BOTTOM + TOP "+ ((off == 0) ? "LEFT" : "RIGHT"));
                             // bottom to top
                             stack.push(off + 1); // bottom
                             stack.push(off); // top
@@ -685,34 +735,62 @@
                             final float xe, final float ye)
         {
             final int outcode0 = this.cOutCode;
+            final int outcode1 = Helpers.outcode(x1, y1, clipRect);
+            final int outcode2 = Helpers.outcode(x2, y2, clipRect);
             final int outcode3 = Helpers.outcode(xe, ye, clipRect);
-            this.cOutCode = outcode3;
-
-            int sideCode = outcode0 & outcode3;
 
-            if (sideCode == 0) {
-                this.gOutCode = 0;
-            } else {
-                sideCode &= Helpers.outcode(x1, y1, clipRect);
-                sideCode &= Helpers.outcode(x2, y2, clipRect);
-                this.gOutCode &= sideCode;
+            // Should clip
+            final int orCode = (outcode0 | outcode1 | outcode2 | outcode3);
+            if (orCode != 0) {
+                final int sideCode = outcode0 & outcode1 & outcode2 & outcode3;
 
                 // basic rejection criteria:
-                if (sideCode != 0) {
+                if (sideCode == 0) {
+                    // ovelap clip:
+                    if (subdivide) {
+                        // avoid reentrance
+                        subdivide = false;
+                        // subdivide curve => callback with subdivided parts:
+                        boolean ret;
+                        if (outside) {
+                            ret = curveSplitter.splitCurve(cox0, coy0, x1, y1,
+                                                           x2, y2, xe, ye,
+                                                           orCode, this);
+                        } else {
+                            ret = curveSplitter.splitCurve(cx0, cy0, x1, y1,
+                                                           x2, y2, xe, ye,
+                                                           orCode, this);
+                        }
+                        // reentrance is done:
+                        subdivide = true;
+                        if (ret) {
+                            return;
+                        }
+                    }
+                    // already subdivided so render it
+                } else {
+                    this.cOutCode = outcode3;
+                    this.gOutCode &= sideCode;
                     // keep last point coordinate before entering the clip again:
                     this.outside = true;
-                    this.cx0 = xe;
-                    this.cy0 = ye;
+                    this.cox0 = xe;
+                    this.coy0 = ye;
 
                     clip(sideCode, outcode0, outcode3);
                     return;
                 }
             }
+
+            this.cOutCode = outcode3;
+            this.gOutCode = 0;
+
             if (outside) {
                 finish();
             }
             // clipping disabled:
             out.curveTo(x1, y1, x2, y2, xe, ye);
+            this.cx0 = xe;
+            this.cy0 = ye;
         }
 
         @Override
@@ -720,33 +798,59 @@
                            final float xe, final float ye)
         {
             final int outcode0 = this.cOutCode;
+            final int outcode1 = Helpers.outcode(x1, y1, clipRect);
             final int outcode2 = Helpers.outcode(xe, ye, clipRect);
-            this.cOutCode = outcode2;
-
-            int sideCode = outcode0 & outcode2;
 
-            if (sideCode == 0) {
-                this.gOutCode = 0;
-            } else {
-                sideCode &= Helpers.outcode(x1, y1, clipRect);
-                this.gOutCode &= sideCode;
+            // Should clip
+            final int orCode = (outcode0 | outcode1 | outcode2);
+            if (orCode != 0) {
+                final int sideCode = outcode0 & outcode1 & outcode2;
 
                 // basic rejection criteria:
-                if (sideCode != 0) {
+                if (sideCode == 0) {
+                    // ovelap clip:
+                    if (subdivide) {
+                        // avoid reentrance
+                        subdivide = false;
+                        // subdivide curve => callback with subdivided parts:
+                        boolean ret;
+                        if (outside) {
+                            ret = curveSplitter.splitQuad(cox0, coy0, x1, y1,
+                                                          xe, ye, orCode, this);
+                        } else {
+                            ret = curveSplitter.splitQuad(cx0, cy0, x1, y1,
+                                                          xe, ye, orCode, this);
+                        }
+                        // reentrance is done:
+                        subdivide = true;
+                        if (ret) {
+                            return;
+                        }
+                    }
+                    // already subdivided so render it
+                } else {
+                    this.cOutCode = outcode2;
+                    this.gOutCode &= sideCode;
                     // keep last point coordinate before entering the clip again:
                     this.outside = true;
-                    this.cx0 = xe;
-                    this.cy0 = ye;
+                    this.cox0 = xe;
+                    this.coy0 = ye;
 
                     clip(sideCode, outcode0, outcode2);
                     return;
                 }
             }
+
+            this.cOutCode = outcode2;
+            this.gOutCode = 0;
+
             if (outside) {
                 finish();
             }
             // clipping disabled:
             out.quadTo(x1, y1, xe, ye);
+            this.cx0 = xe;
+            this.cy0 = ye;
         }
 
         @Override
@@ -755,6 +859,261 @@
         }
     }
 
+    static final class CurveClipSplitter {
+
+        static final float LEN_TH = MarlinProperties.getSubdividerMinLength();
+        static final boolean DO_CHECK_LENGTH = (LEN_TH > 0.0f);
+
+        private static final boolean TRACE = false;
+
+        private static final int MAX_N_CURVES = 3 * 4;
+
+        // clip rectangle (ymin, ymax, xmin, xmax):
+        final float[] clipRect;
+
+        // clip rectangle (ymin, ymax, xmin, xmax) including padding:
+        final float[] clipRectPad = new float[4];
+        private boolean init_clipRectPad = false;
+
+        // This is where the curve to be processed is put. We give it
+        // enough room to store all curves.
+        final float[] middle = new float[MAX_N_CURVES * 8 + 2];
+        // t values at subdivision points
+        private final float[] subdivTs = new float[MAX_N_CURVES];
+
+        // dirty curve
+        private final Curve curve;
+
+        CurveClipSplitter(final RendererContext rdrCtx) {
+            this.clipRect = rdrCtx.clipRect;
+            this.curve = rdrCtx.curve;
+        }
+
+        void init() {
+            this.init_clipRectPad = true;
+        }
+
+        private void initPaddedClip() {
+            // bounds as half-open intervals: minX <= x < maxX and minY <= y < maxY
+            // adjust padded clip rectangle (ymin, ymax, xmin, xmax):
+            // add a rounding error (curve subdivision ~ 0.1px):
+            final float[] _clipRect = clipRect;
+            final float[] _clipRectPad = clipRectPad;
+
+            _clipRectPad[0] = _clipRect[0] - CLIP_RECT_PADDING;
+            _clipRectPad[1] = _clipRect[1] + CLIP_RECT_PADDING;
+            _clipRectPad[2] = _clipRect[2] - CLIP_RECT_PADDING;
+            _clipRectPad[3] = _clipRect[3] + CLIP_RECT_PADDING;
+
+            if (TRACE) {
+                MarlinUtils.logInfo("clip: X [" + _clipRectPad[2] + " .. " + _clipRectPad[3] +"] "
+                                        + "Y ["+ _clipRectPad[0] + " .. " + _clipRectPad[1] +"]");
+            }
+        }
+
+        boolean splitLine(final float x0, final float y0,
+                          final float x1, final float y1,
+                          final int outCodeOR,
+                          final PathConsumer2D out)
+        {
+            if (TRACE) {
+                MarlinUtils.logInfo("divLine P0(" + x0 + ", " + y0 + ") P1(" + x1 + ", " + y1 + ")");
+            }
+
+            if (DO_CHECK_LENGTH && Helpers.fastLineLen(x0, y0, x1, y1) <= LEN_TH) {
+                return false;
+            }
+
+            final float[] mid = middle;
+            mid[0] = x0;  mid[1] = y0;
+            mid[2] = x1;  mid[3] = y1;
+
+            return subdivideAtIntersections(4, outCodeOR, out);
+        }
+
+        boolean splitQuad(final float x0, final float y0,
+                          final float x1, final float y1,
+                          final float x2, final float y2,
+                          final int outCodeOR,
+                          final PathConsumer2D out)
+        {
+            if (TRACE) {
+                MarlinUtils.logInfo("divQuad P0(" + x0 + ", " + y0 + ") P1(" + x1 + ", " + y1 + ") P2(" + x2 + ", " + y2 + ")");
+            }
+
+            if (DO_CHECK_LENGTH && Helpers.fastQuadLen(x0, y0, x1, y1, x2, y2) <= LEN_TH) {
+                return false;
+            }
+
+            final float[] mid = middle;
+            mid[0] = x0;  mid[1] = y0;
+            mid[2] = x1;  mid[3] = y1;
+            mid[4] = x2;  mid[5] = y2;
+
+            return subdivideAtIntersections(6, outCodeOR, out);
+        }
+
+        boolean splitCurve(final float x0, final float y0,
+                           final float x1, final float y1,
+                           final float x2, final float y2,
+                           final float x3, final float y3,
+                           final int outCodeOR,
+                           final PathConsumer2D out)
+        {
+            if (TRACE) {
+                MarlinUtils.logInfo("divCurve P0(" + x0 + ", " + y0 + ") P1(" + x1 + ", " + y1 + ") P2(" + x2 + ", " + y2 + ") P3(" + x3 + ", " + y3 + ")");
+            }
+
+            if (DO_CHECK_LENGTH && Helpers.fastCurvelen(x0, y0, x1, y1, x2, y2, x3, y3) <= LEN_TH) {
+                return false;
+            }
+
+            final float[] mid = middle;
+            mid[0] = x0;  mid[1] = y0;
+            mid[2] = x1;  mid[3] = y1;
+            mid[4] = x2;  mid[5] = y2;
+            mid[6] = x3;  mid[7] = y3;
+
+            return subdivideAtIntersections(8, outCodeOR, out);
+        }
+
+        private boolean subdivideAtIntersections(final int type, final int outCodeOR,
+                                                 final PathConsumer2D out)
+        {
+            final float[] mid = middle;
+            final float[] subTs = subdivTs;
+
+            if (init_clipRectPad) {
+                init_clipRectPad = false;
+                initPaddedClip();
+            }
+
+            final int nSplits = Helpers.findClipPoints(curve, mid, subTs, type,
+                                                        outCodeOR, clipRectPad);
+
+            if (TRACE) {
+                MarlinUtils.logInfo("nSplits: "+ nSplits);
+                MarlinUtils.logInfo("subTs: "+Arrays.toString(Arrays.copyOfRange(subTs, 0, nSplits)));
+            }
+            if (nSplits == 0) {
+                // only curve support shortcut
+                return false;
+            }
+            float prevT = 0.0f;
+
+            for (int i = 0, off = 0; i < nSplits; i++, off += type) {
+                final float t = subTs[i];
+
+                Helpers.subdivideAt((t - prevT) / (1.0f - prevT),
+                                     mid, off, mid, off, type);
+                prevT = t;
+            }
+
+            for (int i = 0, off = 0; i <= nSplits; i++, off += type) {
+                if (TRACE) {
+                    MarlinUtils.logInfo("Part Curve "+Arrays.toString(Arrays.copyOfRange(mid, off, off + type)));
+                }
+                emitCurrent(type, mid, off, out);
+            }
+            return true;
+        }
+
+        static void emitCurrent(final int type, final float[] pts,
+                                final int off, final PathConsumer2D out)
+        {
+            // if instead of switch (perf + most probable cases first)
+            if (type == 8) {
+                out.curveTo(pts[off + 2], pts[off + 3],
+                            pts[off + 4], pts[off + 5],
+                            pts[off + 6], pts[off + 7]);
+            } else if (type == 4) {
+                out.lineTo(pts[off + 2], pts[off + 3]);
+            } else {
+                out.quadTo(pts[off + 2], pts[off + 3],
+                           pts[off + 4], pts[off + 5]);
+            }
+        }
+    }
+
+    static final class CurveBasicMonotonizer {
+
+        private static final int MAX_N_CURVES = 11;
+
+        // squared half line width (for stroker)
+        private float lw2;
+
+        // number of splitted curves
+        int nbSplits;
+
+        // This is where the curve to be processed is put. We give it
+        // enough room to store all curves.
+        final float[] middle = new float[MAX_N_CURVES * 6 + 2];
+        // t values at subdivision points
+        private final float[] subdivTs = new float[MAX_N_CURVES - 1];
+
+        // dirty curve
+        private final Curve curve;
+
+        CurveBasicMonotonizer(final RendererContext rdrCtx) {
+            this.curve = rdrCtx.curve;
+        }
+
+        void init(final float lineWidth) {
+            this.lw2 = (lineWidth * lineWidth) / 4.0f;
+        }
+
+        CurveBasicMonotonizer curve(final float x0, final float y0,
+                                    final float x1, final float y1,
+                                    final float x2, final float y2,
+                                    final float x3, final float y3)
+        {
+            final float[] mid = middle;
+            mid[0] = x0;  mid[1] = y0;
+            mid[2] = x1;  mid[3] = y1;
+            mid[4] = x2;  mid[5] = y2;
+            mid[6] = x3;  mid[7] = y3;
+
+            final float[] subTs = subdivTs;
+            final int nSplits = Helpers.findSubdivPoints(curve, mid, subTs, 8, lw2);
+
+            float prevT = 0.0f;
+            for (int i = 0, off = 0; i < nSplits; i++, off += 6) {
+                final float t = subTs[i];
+
+                Helpers.subdivideCubicAt((t - prevT) / (1.0f - prevT),
+                                          mid, off, mid, off, off + 6);
+                prevT = t;
+            }
+
+            this.nbSplits = nSplits;
+            return this;
+        }
+
+        CurveBasicMonotonizer quad(final float x0, final float y0,
+                                   final float x1, final float y1,
+                                   final float x2, final float y2)
+        {
+            final float[] mid = middle;
+            mid[0] = x0;  mid[1] = y0;
+            mid[2] = x1;  mid[3] = y1;
+            mid[4] = x2;  mid[5] = y2;
+
+            final float[] subTs = subdivTs;
+            final int nSplits = Helpers.findSubdivPoints(curve, mid, subTs, 6, lw2);
+
+            float prevt = 0.0f;
+            for (int i = 0, off = 0; i < nSplits; i++, off += 4) {
+                final float t = subTs[i];
+                Helpers.subdivideQuadAt((t - prevt) / (1.0f - prevt),
+                                         mid, off, mid, off, off + 4);
+                prevt = t;
+            }
+
+            this.nbSplits = nSplits;
+            return this;
+        }
+    }
+
     static final class PathTracer implements PathConsumer2D {
         private final String prefix;
         private PathConsumer2D out;
@@ -808,7 +1167,7 @@
         }
 
         private void log(final String message) {
-            System.out.println(prefix + message);
+            MarlinUtils.logInfo(prefix + message);
         }
 
         @Override
--- a/src/java.desktop/share/classes/sun/java2d/marlin/Version.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.desktop/share/classes/sun/java2d/marlin/Version.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -27,7 +27,7 @@
 
 public final class Version {
 
-    private static final String VERSION = "marlin-0.8.2-Unsafe-OpenJDK";
+    private static final String VERSION = "marlin-0.9.1-Unsafe-OpenJDK";
 
     public static String getVersion() {
         return VERSION;
--- a/src/java.desktop/share/classes/sun/java2d/marlin/stats/Histogram.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.desktop/share/classes/sun/java2d/marlin/stats/Histogram.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -42,7 +42,6 @@
             for (int i = 2; i < MAX; i++) {
                 STEPS[i] = STEPS[i - 1] * BUCKET;
             }
-//            System.out.println("Histogram.STEPS = " + Arrays.toString(STEPS));
     }
 
     static int bucket(int val) {
--- a/src/java.desktop/share/classes/sun/java2d/marlin/stats/StatLong.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.desktop/share/classes/sun/java2d/marlin/stats/StatLong.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -71,9 +71,7 @@
 
     @Override
     public String toString() {
-        final StringBuilder sb = new StringBuilder(128);
-        toString(sb);
-        return sb.toString();
+        return toString(new StringBuilder(128)).toString();
     }
 
     public final StringBuilder toString(final StringBuilder sb) {
--- a/src/java.desktop/share/classes/sun/java2d/pipe/RenderingEngine.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.desktop/share/classes/sun/java2d/pipe/RenderingEngine.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -30,7 +30,6 @@
 import java.awt.geom.PathIterator;
 import java.awt.geom.AffineTransform;
 
-import java.security.PrivilegedAction;
 import java.security.AccessController;
 import sun.security.action.GetPropertyAction;
 
--- a/src/java.desktop/share/native/libawt/awt/image/cvutils/img_colors.c	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.desktop/share/native/libawt/awt/image/cvutils/img_colors.c	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2000, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -38,6 +38,7 @@
 
 extern JavaVM *jvm;
 #endif
+#include "img_colors.h"
 
 #define jio_fprintf fprintf
 
@@ -515,7 +516,7 @@
     }
 }
 
-void
+JNIEXPORT void JNICALL
 img_makePalette(int cmapsize, int tablesize, int lookupsize,
                 float lscale, float weight,
                 int prevclrs, int doMac,
--- a/src/java.desktop/share/native/libawt/awt/image/cvutils/img_colors.h	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.desktop/share/native/libawt/awt/image/cvutils/img_colors.h	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -23,10 +23,13 @@
  * questions.
  */
 
-extern void img_makePalette(int cmapsize, int tablesize, int lookupsize,
-                            float lscale, float weight,
-                            int prevclrs, int doMac,
-                            unsigned char *reds,
-                            unsigned char *greens,
-                            unsigned char *blues,
-                            unsigned char *lookup);
+#include "jni.h"
+
+JNIEXPORT void JNICALL
+img_makePalette(int cmapsize, int tablesize, int lookupsize,
+                float lscale, float weight,
+                int prevclrs, int doMac,
+                unsigned char *reds,
+                unsigned char *greens,
+                unsigned char *blues,
+                unsigned char *lookup);
--- a/src/java.desktop/share/native/libawt/awt/image/cvutils/img_globals.c	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.desktop/share/native/libawt/awt/image/cvutils/img_globals.c	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,7 @@
  * by the image conversion package.
  */
 
+#include "jni.h"
 #include "img_globals.h"
 
 #include "java_awt_image_IndexColorModel.h"
@@ -42,7 +43,7 @@
  * a lookup table which returns the next color darker than the error
  * adjusted color used as the index.
  */
-void
+JNIEXPORT void JNICALL
 make_uns_ordered_dither_array(uns_ordered_dither_array oda,
                               int quantum)
 {
--- a/src/java.desktop/share/native/libawt/awt/image/cvutils/img_globals.h	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.desktop/share/native/libawt/awt/image/cvutils/img_globals.h	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 1998, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -31,6 +31,7 @@
 #ifndef IMAGE_GLOBALS_H
 #define IMAGE_GLOBALS_H
 
+#include "jni.h"
 
 /* Image Conversion function return codes. */
 #define SCALEFAILURE    -1
@@ -144,8 +145,9 @@
  * error values appearing in the matrix which should be the same as the
  * distance between adjacent allocated component values in the color cube).
  */
-extern void make_uns_ordered_dither_array(uns_ordered_dither_array oda,
-                                          int quantum);
+JNIEXPORT void JNICALL
+make_uns_ordered_dither_array(uns_ordered_dither_array oda,
+                              int quantum);
 extern void make_sgn_ordered_dither_array(char* oda, int errmin, int errmax);
 
 /*
--- a/src/java.desktop/share/native/libawt/awt/image/dither.c	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.desktop/share/native/libawt/awt/image/dither.c	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -23,14 +23,16 @@
  * questions.
  */
 
+#include "jni.h"
 #include "dither.h"
 
-sgn_ordered_dither_array std_img_oda_red;
-sgn_ordered_dither_array std_img_oda_green;
-sgn_ordered_dither_array std_img_oda_blue;
-int std_odas_computed = 0;
+JNIEXPORT sgn_ordered_dither_array std_img_oda_red;
+JNIEXPORT sgn_ordered_dither_array std_img_oda_green;
+JNIEXPORT sgn_ordered_dither_array std_img_oda_blue;
+JNIEXPORT int std_odas_computed = 0;
 
-void initInverseGrayLut(int* prgb, int rgbsize, ColorData *cData) {
+JNIEXPORT void JNICALL
+initInverseGrayLut(int* prgb, int rgbsize, ColorData *cData) {
     int *inverse;
     int lastindex, lastgray, missing, i;
 
@@ -267,7 +269,8 @@
 
 }
 
-void make_dither_arrays(int cmapsize, ColorData *cData) {
+JNIEXPORT void JNICALL
+make_dither_arrays(int cmapsize, ColorData *cData) {
     int i, j, k;
 
     /*
--- a/src/java.desktop/share/native/libawt/awt/image/dither.h	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.desktop/share/native/libawt/awt/image/dither.h	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -29,18 +29,22 @@
 #include <string.h>
 
 #include "colordata.h"
+#include "jni.h"
 
 #ifdef __cplusplus
 extern "C" {
 #endif
 
-extern sgn_ordered_dither_array std_img_oda_red;
-extern sgn_ordered_dither_array std_img_oda_green;
-extern sgn_ordered_dither_array std_img_oda_blue;
-extern int std_odas_computed;
+JNIEXPORT extern sgn_ordered_dither_array std_img_oda_red;
+JNIEXPORT extern sgn_ordered_dither_array std_img_oda_green;
+JNIEXPORT extern sgn_ordered_dither_array std_img_oda_blue;
+JNIEXPORT extern int std_odas_computed;
 
-void make_dither_arrays(int cmapsize, ColorData *cData);
-void initInverseGrayLut(int* prgb, int rgbsize, ColorData* cData);
+JNIEXPORT void JNICALL
+make_dither_arrays(int cmapsize, ColorData *cData);
+
+JNIEXPORT void JNICALL
+initInverseGrayLut(int* prgb, int rgbsize, ColorData* cData);
 
 /*
  * state info needed for breadth-first recursion of color cube from
--- a/src/java.desktop/share/native/libawt/awt/image/imageInitIDs.h	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.desktop/share/native/libawt/awt/image/imageInitIDs.h	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -74,6 +74,7 @@
 IMGEXTERN jfieldID g_ICRtypeID;
 
 /* Color Model ids */
+JNIEXPORT
 IMGEXTERN jfieldID g_CMpDataID;
 IMGEXTERN jfieldID g_CMnBitsID;
 IMGEXTERN jfieldID g_CMcspaceID;
--- a/src/java.desktop/share/native/libawt/java2d/SurfaceData.c	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.desktop/share/native/libawt/java2d/SurfaceData.c	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -231,7 +231,8 @@
     GETMIN(src->y2, dst->y2 - dy);
 }
 
-SurfaceDataOps *SurfaceData_InitOps(JNIEnv *env, jobject sData, int opsSize)
+JNIEXPORT SurfaceDataOps * JNICALL
+SurfaceData_InitOps(JNIEnv *env, jobject sData, int opsSize)
 {
     SurfaceDataOps *ops = malloc(opsSize);
     SurfaceData_SetOps(env, sData, ops);
--- a/src/java.desktop/share/native/libawt/java2d/SurfaceData.h	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.desktop/share/native/libawt/java2d/SurfaceData.h	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2007, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -649,7 +649,8 @@
  * Subclasses of SurfaceData should call this function instead of allocating
  * the memory directly.
  */
-SurfaceDataOps *SurfaceData_InitOps(JNIEnv *env, jobject sData, int opsSize);
+JNIEXPORT SurfaceDataOps * JNICALL
+SurfaceData_InitOps(JNIEnv *env, jobject sData, int opsSize);
 
 /*
  * This function invokes the ops-specific disposal function.
--- a/src/java.desktop/share/native/libawt/java2d/loops/AlphaMath.c	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.desktop/share/native/libawt/java2d/loops/AlphaMath.c	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -23,10 +23,11 @@
  * questions.
  */
 
+#include "jni.h"
 #include "AlphaMath.h"
 
-unsigned char mul8table[256][256];
-unsigned char div8table[256][256];
+JNIEXPORT unsigned char mul8table[256][256];
+JNIEXPORT unsigned char div8table[256][256];
 
 void initAlphaTables()
 {
--- a/src/java.desktop/share/native/libawt/java2d/loops/AlphaMath.h	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.desktop/share/native/libawt/java2d/loops/AlphaMath.h	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2005, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,8 +26,10 @@
 #ifndef AlphaMath_h_Included
 #define AlphaMath_h_Included
 
-extern unsigned char mul8table[256][256];
-extern unsigned char div8table[256][256];
+#include "jni.h"
+
+JNIEXPORT extern unsigned char mul8table[256][256];
+JNIEXPORT extern unsigned char div8table[256][256];
 extern void initAlphaTables();
 
 
--- a/src/java.desktop/share/native/libawt/java2d/loops/GraphicsPrimitiveMgr.c	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.desktop/share/native/libawt/java2d/loops/GraphicsPrimitiveMgr.c	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -69,12 +69,12 @@
 static jboolean InitSurfaceTypes(JNIEnv *env, jclass SurfaceType);
 static jboolean InitCompositeTypes(JNIEnv *env, jclass CompositeType);
 
-jfieldID path2DTypesID;
-jfieldID path2DNumTypesID;
-jfieldID path2DWindingRuleID;
-jfieldID path2DFloatCoordsID;
-jfieldID sg2dStrokeHintID;
-jint sunHints_INTVAL_STROKE_PURE;
+JNIEXPORT jfieldID path2DTypesID;
+JNIEXPORT jfieldID path2DNumTypesID;
+JNIEXPORT jfieldID path2DWindingRuleID;
+JNIEXPORT jfieldID path2DFloatCoordsID;
+JNIEXPORT jfieldID sg2dStrokeHintID;
+JNIEXPORT jint sunHints_INTVAL_STROKE_PURE;
 
 /*
  * Class:     sun_java2d_loops_GraphicsPrimitiveMgr
--- a/src/java.desktop/share/native/libawt/java2d/loops/GraphicsPrimitiveMgr.h	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.desktop/share/native/libawt/java2d/loops/GraphicsPrimitiveMgr.h	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -31,6 +31,7 @@
 #endif
 
 #include <stddef.h>
+#include "jni.h"
 
 #include "java_awt_AlphaComposite.h"
 
@@ -551,12 +552,12 @@
 void GrPrim_RefineBounds(SurfaceDataBounds *bounds, jint transX, jint transY,
                          jfloat *coords,  jint maxCoords);
 
-extern jfieldID path2DTypesID;
-extern jfieldID path2DNumTypesID;
-extern jfieldID path2DWindingRuleID;
-extern jfieldID path2DFloatCoordsID;
-extern jfieldID sg2dStrokeHintID;
-extern jint sunHints_INTVAL_STROKE_PURE;
+JNIEXPORT extern jfieldID path2DTypesID;
+JNIEXPORT extern jfieldID path2DNumTypesID;
+JNIEXPORT extern jfieldID path2DWindingRuleID;
+JNIEXPORT extern jfieldID path2DFloatCoordsID;
+JNIEXPORT extern jfieldID sg2dStrokeHintID;
+JNIEXPORT extern jint sunHints_INTVAL_STROKE_PURE;
 
 /*
  * Macros for using jlong variables as 32bits.32bits fractional values
--- a/src/java.desktop/share/native/libawt/java2d/loops/ProcessPath.c	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.desktop/share/native/libawt/java2d/loops/ProcessPath.c	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,7 @@
 #include <stdlib.h>
 #include <string.h>
 
+#include "jni.h"
 #include "j2d_md.h"
 #include "java_awt_geom_PathIterator.h"
 
@@ -2177,7 +2178,8 @@
 static void stubEndSubPath(ProcessHandler* hnd) {
 }
 
-jboolean doFillPath(DrawHandler* dhnd,
+JNIEXPORT jboolean JNICALL
+doFillPath(DrawHandler* dhnd,
                     jint transX, jint transY,
                     jfloat* coords, jint maxCoords,
                     jbyte* types, jint numTypes,
@@ -2217,7 +2219,8 @@
     return JNI_TRUE;
 }
 
-jboolean doDrawPath(DrawHandler* dhnd,
+JNIEXPORT jboolean JNICALL
+doDrawPath(DrawHandler* dhnd,
                     void (*pProcessEndSubPath)(ProcessHandler*),
                     jint transX, jint transY,
                     jfloat* coords, jint maxCoords,
--- a/src/java.desktop/share/native/libawt/java2d/loops/ProcessPath.h	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.desktop/share/native/libawt/java2d/loops/ProcessPath.h	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -92,18 +92,20 @@
 } ProcessHandler;
 
 
-jboolean doDrawPath(DrawHandler* hnd,
-                    void (*pProcessEndSubPath)(ProcessHandler* hnd),
-                    jint transX, jint transY,
-                    jfloat* coords, jint maxCoords,
-                    jbyte* types, jint numTypes,
-                    PHStroke stroke);
+JNIEXPORT jboolean JNICALL
+doDrawPath(DrawHandler* hnd,
+           void (*pProcessEndSubPath)(ProcessHandler* hnd),
+           jint transX, jint transY,
+           jfloat* coords, jint maxCoords,
+           jbyte* types, jint numTypes,
+           PHStroke stroke);
 
-jboolean doFillPath(DrawHandler* hnd,
-                    jint transX, jint transY,
-                    jfloat* coords, jint maxCoords,
-                    jbyte* types, jint numTypes,
-                    PHStroke stroke,
-                    jint fillRule);
+JNIEXPORT jboolean JNICALL
+doFillPath(DrawHandler* hnd,
+           jint transX, jint transY,
+           jfloat* coords, jint maxCoords,
+           jbyte* types, jint numTypes,
+           PHStroke stroke,
+           jint fillRule);
 
 #endif
--- a/src/java.desktop/share/native/libmlib_image/mlib_image_proto.h	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.desktop/share/native/libmlib_image/mlib_image_proto.h	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -30,6 +30,7 @@
 #include <mlib_types.h>
 #include <mlib_status.h>
 #include <mlib_image_types.h>
+#include "jni.h"
 #if defined ( __MEDIALIB_OLD_NAMES_ADDED )
 #include <../include/mlib_image_proto.h>
 #endif /* defined ( __MEDIALIB_OLD_NAMES_ADDED ) */
@@ -43,12 +44,6 @@
 #endif // __USE_J2D_NAMES
 
 #if defined ( _MSC_VER )
-#define J2D_MLIB_PUBLIC __declspec(dllexport)
-#else
-#define J2D_MLIB_PUBLIC
-#endif /* _MSC_VER */
-
-#if defined ( _MSC_VER )
 #if ! defined ( __MEDIALIB_OLD_NAMES )
 #define __MEDIALIB_OLD_NAMES
 #endif /* ! defined ( __MEDIALIB_OLD_NAMES ) */
@@ -1059,23 +1054,23 @@
 #if defined ( __MEDIALIB_OLD_NAMES )
 #define __mlib_ImageCreate mlib_ImageCreate
 #endif /* ! defined ( __MEDIALIB_OLD_NAMES ) */
-J2D_MLIB_PUBLIC
-mlib_image * __mlib_ImageCreate(mlib_type type,
-                                mlib_s32 channels,
-                                mlib_s32 width,
-                                mlib_s32 height);
+JNIEXPORT mlib_image * JNICALL
+__mlib_ImageCreate(mlib_type type,
+                   mlib_s32 channels,
+                   mlib_s32 width,
+                   mlib_s32 height);
 
 
 #if defined ( __MEDIALIB_OLD_NAMES )
 #define __mlib_ImageCreateStruct mlib_ImageCreateStruct
 #endif /* ! defined ( __MEDIALIB_OLD_NAMES ) */
-J2D_MLIB_PUBLIC
-mlib_image * __mlib_ImageCreateStruct(mlib_type type,
-                                      mlib_s32 channels,
-                                      mlib_s32 width,
-                                      mlib_s32 height,
-                                      mlib_s32 stride,
-                                      const void *data);
+JNIEXPORT mlib_image * JNICALL
+__mlib_ImageCreateStruct(mlib_type type,
+                         mlib_s32 channels,
+                         mlib_s32 width,
+                         mlib_s32 height,
+                         mlib_s32 stride,
+                         const void *data);
 
 
 #if defined ( __MEDIALIB_OLD_NAMES )
@@ -1091,8 +1086,8 @@
 #if defined ( __MEDIALIB_OLD_NAMES )
 #define __mlib_ImageDelete mlib_ImageDelete
 #endif /* ! defined ( __MEDIALIB_OLD_NAMES ) */
-J2D_MLIB_PUBLIC
-void  __mlib_ImageDelete(mlib_image *img);
+JNIEXPORT void JNICALL
+__mlib_ImageDelete(mlib_image *img);
 
 
 #if defined ( __MEDIALIB_OLD_NAMES )
@@ -1421,12 +1416,12 @@
 #if defined ( __MEDIALIB_OLD_NAMES )
 #define __mlib_ImageAffine mlib_ImageAffine
 #endif /* ! defined ( __MEDIALIB_OLD_NAMES ) */
-J2D_MLIB_PUBLIC
-mlib_status  __mlib_ImageAffine(mlib_image *dst,
-                                const mlib_image *src,
-                                const mlib_d64 *mtx,
-                                mlib_filter filter,
-                                mlib_edge edge);
+JNIEXPORT mlib_status JNICALL
+__mlib_ImageAffine(mlib_image *dst,
+                   const mlib_image *src,
+                   const mlib_d64 *mtx,
+                   mlib_filter filter,
+                   mlib_edge edge);
 
 
 #if defined ( __MEDIALIB_OLD_NAMES )
@@ -2302,10 +2297,10 @@
 #if defined ( __MEDIALIB_OLD_NAMES )
 #define __mlib_ImageLookUp mlib_ImageLookUp
 #endif /* ! defined ( __MEDIALIB_OLD_NAMES ) */
-J2D_MLIB_PUBLIC
-mlib_status  __mlib_ImageLookUp(mlib_image *dst,
-                                const mlib_image *src,
-                                const void **table);
+JNIEXPORT mlib_status JNICALL
+__mlib_ImageLookUp(mlib_image *dst,
+                   const mlib_image *src,
+                   const void **table);
 
 
 #if defined ( __MEDIALIB_OLD_NAMES )
@@ -2631,29 +2626,29 @@
 #if defined ( __MEDIALIB_OLD_NAMES )
 #define __mlib_ImageConvKernelConvert mlib_ImageConvKernelConvert
 #endif /* ! defined ( __MEDIALIB_OLD_NAMES ) */
-J2D_MLIB_PUBLIC
-mlib_status  __mlib_ImageConvKernelConvert(mlib_s32 *ikernel,
-                                           mlib_s32 *iscale,
-                                           const mlib_d64 *fkernel,
-                                           mlib_s32 m,
-                                           mlib_s32 n,
-                                           mlib_type type);
+JNIEXPORT mlib_status JNICALL
+__mlib_ImageConvKernelConvert(mlib_s32 *ikernel,
+                              mlib_s32 *iscale,
+                              const mlib_d64 *fkernel,
+                              mlib_s32 m,
+                              mlib_s32 n,
+                              mlib_type type);
 
 
 #if defined ( __MEDIALIB_OLD_NAMES )
 #define __mlib_ImageConvMxN mlib_ImageConvMxN
 #endif /* ! defined ( __MEDIALIB_OLD_NAMES ) */
-J2D_MLIB_PUBLIC
-mlib_status  __mlib_ImageConvMxN(mlib_image *dst,
-                                 const mlib_image *src,
-                                 const mlib_s32 *kernel,
-                                 mlib_s32 m,
-                                 mlib_s32 n,
-                                 mlib_s32 dm,
-                                 mlib_s32 dn,
-                                 mlib_s32 scale,
-                                 mlib_s32 cmask,
-                                 mlib_edge edge);
+JNIEXPORT mlib_status JNICALL
+__mlib_ImageConvMxN(mlib_image *dst,
+                    const mlib_image *src,
+                    const mlib_s32 *kernel,
+                    mlib_s32 m,
+                    mlib_s32 n,
+                    mlib_s32 dm,
+                    mlib_s32 dn,
+                    mlib_s32 scale,
+                    mlib_s32 cmask,
+                    mlib_edge edge);
 
 
 #if defined ( __MEDIALIB_OLD_NAMES )
--- a/src/java.desktop/share/native/libsplashscreen/splashscreen_impl.c	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.desktop/share/native/libsplashscreen/splashscreen_impl.c	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -46,7 +46,7 @@
     return &splash;
 }
 
-SPLASHEXPORT void
+JNIEXPORT void JNICALL
 SplashSetFileJarName(const char* fileName, const char* jarName) {
     Splash *splash = SplashGetInstance();
 
@@ -57,7 +57,7 @@
     splash->jarName = SplashConvertStringAlloc(jarName, &splash->jarNameLen);
 }
 
-SPLASHEXPORT void
+JNIEXPORT void JNICALL
 SplashInit()
 {
     Splash *splash = SplashGetInstance();
@@ -70,7 +70,7 @@
     SplashInitPlatform(splash);
 }
 
-SPLASHEXPORT void
+JNIEXPORT void JNICALL
 SplashClose()
 {
     Splash *splash = SplashGetInstance();
@@ -107,7 +107,7 @@
     SplashSetFileJarName(NULL, NULL);
 }
 
-SPLASHEXPORT void
+JNIEXPORT void JNICALL
 SplashSetScaleFactor(float scaleFactor)
 {
     Splash *splash = SplashGetInstance();
@@ -302,7 +302,7 @@
     return success;
 }
 
-SPLASHEXPORT int
+JNIEXPORT int JNICALL
 SplashLoadFile(const char *filename)
 {
     SplashStream stream;
@@ -310,7 +310,7 @@
                 SplashLoadStream(&stream);
 }
 
-SPLASHEXPORT int
+JNIEXPORT int JNICALL
 SplashLoadMemory(void *data, int size)
 {
     SplashStream stream;
@@ -395,7 +395,7 @@
     return 1;
 }
 
-SPLASHEXPORT int
+JNIEXPORT int JNICALL
 SplashGetScaledImgNameMaxPstfixLen(const char *fileName){
     return strlen(fileName) + strlen("@100pct") + 1;
 }
--- a/src/java.desktop/share/native/libsplashscreen/splashscreen_impl.h	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.desktop/share/native/libsplashscreen/splashscreen_impl.h	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -30,20 +30,29 @@
 #include "splashscreen_gfx.h"
 #include "jni.h"
 
-SPLASHEXPORT int SplashLoadMemory(void *pdata, int size); /* requires preloading the file */
-SPLASHEXPORT int SplashLoadFile(const char *filename);  // FIXME: range checking for SplashLoadMemory
+JNIEXPORT int JNICALL
+SplashLoadMemory(void *pdata, int size); /* requires preloading the file */
+
+JNIEXPORT int JNICALL
+SplashLoadFile(const char *filename);  // FIXME: range checking for SplashLoadMemory
+
+JNIEXPORT void JNICALL
+SplashInit(void);
 
-SPLASHEXPORT void SplashInit(void);
-SPLASHEXPORT void SplashClose(void);
+JNIEXPORT void JNICALL
+SplashClose(void);
 
-SPLASHEXPORT void SplashSetScaleFactor(float);
-SPLASHEXPORT jboolean SplashGetScaledImageName(const char*, const char*,
+JNIEXPORT void JNICALL
+SplashSetScaleFactor(float);
+
+JNIEXPORT jboolean JNICALL
+SplashGetScaledImageName(const char*, const char*,
                               float*, char*, const size_t scaledImageNameLength);
 
-SPLASHEXPORT void
+JNIEXPORT void JNICALL
 SplashSetFileJarName(const char* fileName, const char* jarName);
 
-SPLASHEXPORT int
+JNIEXPORT int JNICALL
 SplashGetScaledImgNameMaxPstfixLen(const char*);
 typedef struct SplashImage
 {
--- a/src/java.desktop/unix/native/common/awt/img_util_md.h	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.desktop/unix/native/common/awt/img_util_md.h	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -23,6 +23,7 @@
  * questions.
  */
 
+#include "jni.h"
 #include "color.h"
 
 #if !defined(HEADLESS) && !defined(MACOSX)
@@ -101,7 +102,9 @@
 
 extern void freeICMColorData(ColorData *pData);
 
-extern void initInverseGrayLut(int* prgb, int rgbsize, ColorData* cData);
+JNIEXPORT void JNICALL
+initInverseGrayLut(int* prgb, int rgbsize, ColorData* cData);
+
 extern unsigned char* initCubemap(int* cmap, int cmap_len, int cube_dim);
 extern void initDitherTables(ColorData* cData);
 
--- a/src/java.desktop/unix/native/libawt/awt/awt_LoadLibrary.c	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.desktop/unix/native/libawt/awt/awt_LoadLibrary.c	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -49,7 +49,7 @@
 
 /* Initialize the Java VM instance variable when the library is
    first loaded */
-JavaVM *jvm;
+JNIEXPORT JavaVM *jvm;
 
 JNIEXPORT jboolean JNICALL AWTIsHeadless() {
     static JNIEnv *env = NULL;
--- a/src/java.desktop/unix/native/libawt/awt/initIDs.c	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.desktop/unix/native/libawt/awt/initIDs.c	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -40,7 +40,7 @@
  * which are used in the win32 awt.
  */
 
-jfieldID colorValueID;
+JNIEXPORT jfieldID colorValueID;
 
 JNIEXPORT void JNICALL
 Java_java_awt_Color_initIDs
--- a/src/java.desktop/unix/native/libsplashscreen/splashscreen_config.h	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.desktop/unix/native/libsplashscreen/splashscreen_config.h	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -57,5 +57,4 @@
 
 #define INLINE static
 
-#define SPLASHEXPORT
 #endif
--- a/src/java.desktop/unix/native/libsplashscreen/splashscreen_sys.c	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.desktop/unix/native/libsplashscreen/splashscreen_sys.c	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -42,6 +42,7 @@
 #include <fcntl.h>
 #include <poll.h>
 #include <sizecalc.h>
+#include "jni.h"
 
 static Bool shapeSupported;
 static int shapeEventBase, shapeErrorBase;
@@ -800,7 +801,7 @@
     sendctl(splash, SPLASHCTL_RECONFIGURE);
 }
 
-SPLASHEXPORT jboolean
+JNIEXPORT jboolean JNICALL
 SplashGetScaledImageName(const char* jarName, const char* fileName,
                            float *scaleFactor, char *scaledImgName,
                            const size_t scaledImageNameLength)
--- a/src/java.desktop/windows/classes/sun/awt/shell/Win32ShellFolderManager2.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.desktop/windows/classes/sun/awt/shell/Win32ShellFolderManager2.java	Fri Apr 06 03:53:28 2018 +0200
@@ -447,22 +447,27 @@
             if (dir instanceof Win32ShellFolder2) {
                 Win32ShellFolder2 sf = (Win32ShellFolder2)dir;
 
-                return (sf.isFileSystem() && sf.parent != null &&
-                        sf.parent.equals(getDrives()));
+                //This includes all the drives under "My PC" or "My Computer.
+                // On windows 10, "External Drives" are listed under "Desktop"
+                // also
+                return  (sf.isFileSystem() && sf.parent != null &&
+                        (sf.parent.equals (getDrives()) ||
+                        (sf.parent.equals (getDesktop()) && isDrive(dir))));
             }
-            String path = dir.getPath();
-
-            if (path.length() != 3 || path.charAt(1) != ':') {
-                return false;
-            }
-
-            File[] roots = Win32ShellFolder2.listRoots();
-
-            return roots != null && Arrays.asList(roots).contains(dir);
+            return isDrive(dir);
         }
         return false;
     }
 
+    private boolean isDrive(File dir) {
+        String path = dir.getPath();
+        if (path.length() != 3 || path.charAt(1) != ':') {
+            return false;
+        }
+        File[] roots = Win32ShellFolder2.listRoots();
+        return roots != null && Arrays.asList(roots).contains(dir);
+    }
+
     private static List<Win32ShellFolder2> topFolderList = null;
     static int compareShellFolders(Win32ShellFolder2 sf1, Win32ShellFolder2 sf2) {
         boolean special1 = sf1.isSpecial();
--- a/src/java.desktop/windows/native/libawt/windows/img_util_md.h	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.desktop/windows/native/libawt/windows/img_util_md.h	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2001, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -32,6 +32,7 @@
 #else
 #include "colordata.h"
 #endif
+#include "jni.h"
 
 #ifdef __cplusplus
 extern "C" {
@@ -94,7 +95,10 @@
     ((dstLockInfo.inv_cmap)[(((r)>>3)<<10) | (((g)>>3)<<5) | ((b)>>3)])
 
 extern void freeICMColorData(ColorData *pData);
-extern void initInverseGrayLut(int* prgb, int rgbsize, ColorData* cData);
+
+JNIEXPORT void JNICALL
+initInverseGrayLut(int* prgb, int rgbsize, ColorData* cData);
+
 extern unsigned char* initCubemap(int* cmap, int cmap_len, int cube_dim);
 extern void initDitherTables(ColorData* cData);
 
--- a/src/java.desktop/windows/native/libsplashscreen/splashscreen_config.h	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.desktop/windows/native/libsplashscreen/splashscreen_config.h	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -55,6 +55,4 @@
 
 #define INLINE __inline
 
-#define SPLASHEXPORT __declspec(dllexport)
-
 #endif
--- a/src/java.logging/share/classes/java/util/logging/Logger.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.logging/share/classes/java/util/logging/Logger.java	Fri Apr 06 03:53:28 2018 +0200
@@ -640,7 +640,7 @@
                     return System.getProperty(key);
                 }
             });
-            return Boolean.valueOf(s);
+            return Boolean.parseBoolean(s);
         }
     }
 
--- a/src/java.xml/share/classes/javax/xml/transform/package-info.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.xml/share/classes/javax/xml/transform/package-info.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -38,7 +38,7 @@
  * {@link javax.xml.transform.stax}, and {@link javax.xml.transform.stream}.
  *
  *
- * <h3>Creating Objects</h3>
+ * <h2>Creating Objects</h2>
  *
  * <p>
  * The API allows a concrete {@link javax.xml.transform.TransformerFactory}
@@ -46,7 +46,7 @@
  * {@link javax.xml.transform.TransformerFactory#newInstance}.
  *
  *
- * <h3>Specification of Inputs and Outputs</h3>
+ * <h2>Specification of Inputs and Outputs</h2>
  *
  * <p>
  * This API defines two interface objects called {@link javax.xml.transform.Source}
@@ -77,9 +77,7 @@
  * </pre>
  *
  *
- * <h3>
- * <a id="qname-delimiter">Qualified Name Representation</a>
- * </h3>
+ * <h2><a id="qname-delimiter">Qualified Name Representation</a></h2>
  *
  * <p>
  * <a href="http://www.w3.org/TR/REC-xml-names">Namespaces</a> present something
@@ -112,7 +110,7 @@
  * prefix is lost.
  *
  *
- * <h3>Result Tree Serialization</h3>
+ * <h2>Result Tree Serialization</h2>
  *
  * <p>
  * Serialization of the result tree to a stream can be controlled with the
@@ -141,7 +139,7 @@
  * the source to the result. This method may be used to create a DOM from SAX
  * events or to create an XML or HTML stream from a DOM or SAX events.
  *
- * <h3>Exceptions and Error Reporting</h3>
+ * <h2>Exceptions and Error Reporting</h2>
  *
  * <p>
  * The transformation API throw three types of specialized exceptions. A
@@ -192,7 +190,7 @@
  * errors.
  *
  *
- * <h3>Resolution of URIs within a transformation</h3>
+ * <h2>Resolution of URIs within a transformation</h2>
  *
  * <p>
  * The API provides a way for URIs referenced from within the stylesheet
--- a/src/java.xml/share/classes/javax/xml/xpath/package-info.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/java.xml/share/classes/javax/xml/xpath/package-info.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -50,7 +50,7 @@
  * </ul>
  * <p>
  * <a id="XPath.Overview"></a>
- * <h3>1. XPath Overview</h3>
+ * <h2>1. XPath Overview</h2>
  *
  * <p>
  * The XPath language provides a simple, concise syntax for selecting
@@ -69,7 +69,7 @@
  *
  *
  * <a id="XPath.Expressions"></a>
- * <h3>2. XPath Expressions</h3>
+ * <h2>2. XPath Expressions</h2>
  *
  * <p>
  * An XPath <em>expression</em> is composed of a <em>location
@@ -211,7 +211,7 @@
  * </blockquote>
  *
  * <a id="XPath.Datatypes"></a>
- * <h3>3. XPath Data Types</h3>
+ * <h2>3. XPath Data Types</h2>
  *
  * <p>
  * While XPath expressions select nodes in the XML document, the XPath
@@ -225,7 +225,7 @@
  * </ul>
  *
  * <a id="XPath.Datatypes.QName"></a>
- * <h3>3.1 QName types</h3>
+ * <h2>3.1 QName types</h2>
  * The XPath API defines the following {@link javax.xml.namespace.QName} types to
  * represent return types of an XPath evaluation:
  * <ul>
@@ -258,7 +258,7 @@
  * of a node to a <code>double</code> data type.
  *
  * <a id="XPath.Datatypes.Class"></a>
- * <h3>3.2 Class types</h3>
+ * <h2>3.2 Class types</h2>
  * In addition to the QName types, the XPath API supports the use of Class types
  * through the <code>XPathExpression.evaluteExpression(...)</code> or
  * <code>XPath.evaluateExpression(...)</code> methods.
@@ -276,14 +276,14 @@
  * Of the subtypes of Number, only Double, Integer and Long are supported.
  *
  * <a id="XPath.Datatypes.Enum"></a>
- * <h3>3.3 Enum types</h3>
+ * <h2>3.3 Enum types</h2>
  * Enum types are defined in {@link javax.xml.xpath.XPathEvaluationResult.XPathResultType}
  * that provide mappings between the QName and Class types above. The result of
  * evaluating an expression using the <code>XPathExpression.evaluteExpression(...)</code>
  * or <code>XPath.evaluateExpression(...)</code> methods will be of one of these types.
  *
  * <a id="XPath.Context"></a>
- * <h3>4. XPath Context</h3>
+ * <h2>4. XPath Context</h2>
  *
  * <p>
  * XPath location paths may be relative to a particular node in the
@@ -301,7 +301,7 @@
  * {@link org.w3c.dom.Node} for example, in the JDK implementation.
  *
  * <a id="XPath.Use"></a>
- * <h3>5. Using the XPath API</h3>
+ * <h2>5. Using the XPath API</h2>
  *
  * Consider the following XML document:
  * <blockquote>
--- a/src/jdk.compiler/share/classes/com/sun/source/doctree/package-info.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/jdk.compiler/share/classes/com/sun/source/doctree/package-info.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -30,7 +30,7 @@
  * @author Jonathan Gibbons
  * @since 1.8
  *
- * @see <a href="{@docRoot}/../specs/doc-comment-spec.html">
+ * @see <a href="{@docRootParent}/specs/doc-comment-spec.html">
  *      Documentation Comment Specification for the Standard Doclet</a>
  */
 package com.sun.source.doctree;
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/Main.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/Main.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -30,7 +30,7 @@
 /**
  * A legacy programmatic interface for the Java Programming Language
  * compiler, javac.
- * See the <a href="{@docRoot}/jdk.compiler-summary.html">{@code jdk.compiler}</a>
+ * See the <a href="{@docRoot}/jdk.compiler/module-summary.html">{@code jdk.compiler}</a>
  * module for details on replacement APIs.
  */
 public class Main {
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Type.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Type.java	Fri Apr 06 03:53:28 2018 +0200
@@ -2359,7 +2359,7 @@
 
         public Type constType(Object constValue) { return this; }
         @DefinedBy(Api.LANGUAGE_MODEL)
-        public Type getEnclosingType()           { return this; }
+        public Type getEnclosingType()           { return Type.noType; }
         public Type getReturnType()              { return this; }
         public Type asSub(Symbol sym)            { return this; }
 
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Analyzer.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Analyzer.java	Fri Apr 06 03:53:28 2018 +0200
@@ -358,6 +358,10 @@
             super(AnalyzerMode.LOCAL, tag);
         }
 
+        boolean isImplicitlyTyped(JCVariableDecl decl) {
+            return decl.vartype.pos == Position.NOPOS;
+        }
+
         /**
          * Map a variable tree into a new declaration using implicit type.
          */
@@ -390,7 +394,7 @@
 
         boolean match(JCVariableDecl tree){
             return tree.sym.owner.kind == Kind.MTH &&
-                    tree.init != null && !tree.isImplicitlyTyped() &&
+                    tree.init != null && !isImplicitlyTyped(tree) &&
                     attr.canInferLocalVarType(tree) == null;
         }
         @Override
@@ -414,7 +418,7 @@
 
         @Override
         boolean match(JCEnhancedForLoop tree){
-            return !tree.var.isImplicitlyTyped();
+            return !isImplicitlyTyped(tree.var);
         }
         @Override
         List<JCEnhancedForLoop> rewrite(JCEnhancedForLoop oldTree) {
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/LambdaToMethod.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/LambdaToMethod.java	Fri Apr 06 03:53:28 2018 +0200
@@ -56,6 +56,7 @@
 import java.util.HashSet;
 import java.util.LinkedHashMap;
 import java.util.Map;
+import java.util.Objects;
 import java.util.Optional;
 import java.util.Set;
 import java.util.function.Consumer;
@@ -113,6 +114,15 @@
     /** force serializable representation, for stress testing **/
     private final boolean forceSerializable;
 
+    /** true if line or local variable debug info has been requested */
+    private final boolean debugLinesOrVars;
+
+    /** dump statistics about lambda method deduplication */
+    private final boolean verboseDeduplication;
+
+    /** deduplicate lambda implementation methods */
+    private final boolean deduplicateLambdas;
+
     /** Flag for alternate metafactories indicating the lambda object is intended to be serializable */
     public static final int FLAG_SERIALIZABLE = 1 << 0;
 
@@ -149,9 +159,64 @@
         dumpLambdaToMethodStats = options.isSet("debug.dumpLambdaToMethodStats");
         attr = Attr.instance(context);
         forceSerializable = options.isSet("forceSerializable");
+        debugLinesOrVars = options.isSet(Option.G)
+                || options.isSet(Option.G_CUSTOM, "lines")
+                || options.isSet(Option.G_CUSTOM, "vars");
+        verboseDeduplication = options.isSet("debug.dumpLambdaToMethodDeduplication");
+        deduplicateLambdas = options.getBoolean("deduplicateLambdas", true);
     }
     // </editor-fold>
 
+    class DedupedLambda {
+        private final MethodSymbol symbol;
+        private final JCTree tree;
+
+        private int hashCode;
+
+        DedupedLambda(MethodSymbol symbol, JCTree tree) {
+            this.symbol = symbol;
+            this.tree = tree;
+        }
+
+
+        @Override
+        public int hashCode() {
+            int hashCode = this.hashCode;
+            if (hashCode == 0) {
+                this.hashCode = hashCode = TreeHasher.hash(tree, sym -> {
+                    if (sym.owner == symbol) {
+                        int idx = symbol.params().indexOf(sym);
+                        if (idx != -1) {
+                            return idx;
+                        }
+                    }
+                    return null;
+                });
+            }
+            return hashCode;
+        }
+
+        @Override
+        public boolean equals(Object o) {
+            if (!(o instanceof DedupedLambda)) {
+                return false;
+            }
+            DedupedLambda that = (DedupedLambda) o;
+            return types.isSameType(symbol.asType(), that.symbol.asType())
+                    && new TreeDiffer((lhs, rhs) -> {
+                if (lhs.owner == symbol) {
+                    int idx = symbol.params().indexOf(lhs);
+                    if (idx != -1) {
+                        if (Objects.equals(idx, that.symbol.params().indexOf(rhs))) {
+                            return true;
+                        }
+                    }
+                }
+                return null;
+            }).scan(tree, that.tree);
+        }
+    }
+
     private class KlassInfo {
 
         /**
@@ -159,6 +224,8 @@
          */
         private ListBuffer<JCTree> appendedMethodList;
 
+        private Map<DedupedLambda, DedupedLambda> dedupedLambdas;
+
         /**
          * list of deserialization cases
          */
@@ -179,6 +246,7 @@
         private KlassInfo(JCClassDecl clazz) {
             this.clazz = clazz;
             appendedMethodList = new ListBuffer<>();
+            dedupedLambdas = new HashMap<>();
             deserializeCases = new HashMap<>();
             MethodType type = new MethodType(List.of(syms.serializedLambdaType), syms.objectType,
                     List.nil(), syms.methodClass);
@@ -329,8 +397,20 @@
         //captured members directly).
         lambdaDecl.body = translate(makeLambdaBody(tree, lambdaDecl));
 
-        //Add the method to the list of methods to be added to this class.
-        kInfo.addMethod(lambdaDecl);
+        boolean dedupe = false;
+        if (deduplicateLambdas && !debugLinesOrVars && !localContext.isSerializable()) {
+            DedupedLambda dedupedLambda = new DedupedLambda(lambdaDecl.sym, lambdaDecl.body);
+            DedupedLambda existing = kInfo.dedupedLambdas.putIfAbsent(dedupedLambda, dedupedLambda);
+            if (existing != null) {
+                sym = existing.symbol;
+                dedupe = true;
+                if (verboseDeduplication) log.note(tree, Notes.VerboseL2mDeduplicate(sym));
+            }
+        }
+        if (!dedupe) {
+            //Add the method to the list of methods to be added to this class.
+            kInfo.addMethod(lambdaDecl);
+        }
 
         //now that we have generated a method for the lambda expression,
         //we can translate the lambda into a method reference pointing to the newly
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/TreeDiffer.java	Fri Apr 06 03:53:28 2018 +0200
@@ -0,0 +1,614 @@
+/*
+ * Copyright (c) 2018, Google LLC. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package com.sun.tools.javac.comp;
+
+import com.sun.tools.javac.code.Symbol;
+import com.sun.tools.javac.tree.JCTree;
+import com.sun.tools.javac.tree.JCTree.JCAnnotatedType;
+import com.sun.tools.javac.tree.JCTree.JCAnnotation;
+import com.sun.tools.javac.tree.JCTree.JCArrayAccess;
+import com.sun.tools.javac.tree.JCTree.JCArrayTypeTree;
+import com.sun.tools.javac.tree.JCTree.JCAssert;
+import com.sun.tools.javac.tree.JCTree.JCAssign;
+import com.sun.tools.javac.tree.JCTree.JCAssignOp;
+import com.sun.tools.javac.tree.JCTree.JCBinary;
+import com.sun.tools.javac.tree.JCTree.JCBlock;
+import com.sun.tools.javac.tree.JCTree.JCBreak;
+import com.sun.tools.javac.tree.JCTree.JCCase;
+import com.sun.tools.javac.tree.JCTree.JCCatch;
+import com.sun.tools.javac.tree.JCTree.JCClassDecl;
+import com.sun.tools.javac.tree.JCTree.JCCompilationUnit;
+import com.sun.tools.javac.tree.JCTree.JCConditional;
+import com.sun.tools.javac.tree.JCTree.JCContinue;
+import com.sun.tools.javac.tree.JCTree.JCDoWhileLoop;
+import com.sun.tools.javac.tree.JCTree.JCEnhancedForLoop;
+import com.sun.tools.javac.tree.JCTree.JCErroneous;
+import com.sun.tools.javac.tree.JCTree.JCExports;
+import com.sun.tools.javac.tree.JCTree.JCExpressionStatement;
+import com.sun.tools.javac.tree.JCTree.JCFieldAccess;
+import com.sun.tools.javac.tree.JCTree.JCForLoop;
+import com.sun.tools.javac.tree.JCTree.JCIdent;
+import com.sun.tools.javac.tree.JCTree.JCIf;
+import com.sun.tools.javac.tree.JCTree.JCImport;
+import com.sun.tools.javac.tree.JCTree.JCInstanceOf;
+import com.sun.tools.javac.tree.JCTree.JCLabeledStatement;
+import com.sun.tools.javac.tree.JCTree.JCLambda;
+import com.sun.tools.javac.tree.JCTree.JCLiteral;
+import com.sun.tools.javac.tree.JCTree.JCMemberReference;
+import com.sun.tools.javac.tree.JCTree.JCMethodDecl;
+import com.sun.tools.javac.tree.JCTree.JCMethodInvocation;
+import com.sun.tools.javac.tree.JCTree.JCModifiers;
+import com.sun.tools.javac.tree.JCTree.JCModuleDecl;
+import com.sun.tools.javac.tree.JCTree.JCNewArray;
+import com.sun.tools.javac.tree.JCTree.JCNewClass;
+import com.sun.tools.javac.tree.JCTree.JCOpens;
+import com.sun.tools.javac.tree.JCTree.JCPackageDecl;
+import com.sun.tools.javac.tree.JCTree.JCPrimitiveTypeTree;
+import com.sun.tools.javac.tree.JCTree.JCProvides;
+import com.sun.tools.javac.tree.JCTree.JCRequires;
+import com.sun.tools.javac.tree.JCTree.JCReturn;
+import com.sun.tools.javac.tree.JCTree.JCSwitch;
+import com.sun.tools.javac.tree.JCTree.JCSynchronized;
+import com.sun.tools.javac.tree.JCTree.JCThrow;
+import com.sun.tools.javac.tree.JCTree.JCTry;
+import com.sun.tools.javac.tree.JCTree.JCTypeApply;
+import com.sun.tools.javac.tree.JCTree.JCTypeCast;
+import com.sun.tools.javac.tree.JCTree.JCTypeIntersection;
+import com.sun.tools.javac.tree.JCTree.JCTypeParameter;
+import com.sun.tools.javac.tree.JCTree.JCTypeUnion;
+import com.sun.tools.javac.tree.JCTree.JCUnary;
+import com.sun.tools.javac.tree.JCTree.JCUses;
+import com.sun.tools.javac.tree.JCTree.JCVariableDecl;
+import com.sun.tools.javac.tree.JCTree.JCWhileLoop;
+import com.sun.tools.javac.tree.JCTree.JCWildcard;
+import com.sun.tools.javac.tree.JCTree.LetExpr;
+import com.sun.tools.javac.tree.JCTree.TypeBoundKind;
+import com.sun.tools.javac.tree.TreeInfo;
+import com.sun.tools.javac.tree.TreeScanner;
+import com.sun.tools.javac.util.List;
+
+import javax.lang.model.element.ElementKind;
+import java.util.Iterator;
+import java.util.Objects;
+import java.util.function.BiFunction;
+import java.util.function.Consumer;
+
+/** A visitor that compares two lambda bodies for structural equality. */
+public class TreeDiffer extends TreeScanner {
+
+    private BiFunction<Symbol, Symbol, Boolean> symbolDiffer;
+
+    public TreeDiffer(BiFunction<Symbol, Symbol, Boolean> symbolDiffer) {
+        this.symbolDiffer = Objects.requireNonNull(symbolDiffer);
+    }
+
+    private JCTree parameter;
+    private boolean result;
+
+    public boolean scan(JCTree tree, JCTree parameter) {
+        if (tree == null || parameter == null) {
+            return tree == null && parameter == null;
+        }
+        tree = TreeInfo.skipParens(tree);
+        parameter = TreeInfo.skipParens(parameter);
+        if (tree.type != null
+                && tree.type.constValue() != null
+                && parameter.type != null
+                && parameter.type.constValue() != null) {
+            return Objects.equals(tree.type.constValue(), parameter.type.constValue());
+        }
+        if (tree.getTag() != parameter.getTag()) {
+            return false;
+        }
+        JCTree prevParameter = this.parameter;
+        boolean prevResult = this.result;
+        try {
+            this.parameter = parameter;
+            tree.accept(this);
+            return result;
+        } finally {
+            this.parameter = prevParameter;
+            this.result = prevResult;
+        }
+    }
+
+    private boolean scan(Iterable<? extends JCTree> xs, Iterable<? extends JCTree> ys) {
+        if (xs == null || ys == null) {
+            return xs == null && ys == null;
+        }
+        Iterator<? extends JCTree> x = xs.iterator();
+        Iterator<? extends JCTree> y = ys.iterator();
+        while (x.hasNext() && y.hasNext()) {
+            if (!scan(x.next(), y.next())) {
+                return false;
+            }
+        }
+        return !x.hasNext() && !y.hasNext();
+    }
+
+    private boolean scanDimAnnotations(List<List<JCAnnotation>> xs, List<List<JCAnnotation>> ys) {
+        if (xs == null || ys == null) {
+            return xs == null && ys == null;
+        }
+        Iterator<List<JCAnnotation>> x = xs.iterator();
+        Iterator<List<JCAnnotation>> y = ys.iterator();
+        while (x.hasNext() && y.hasNext()) {
+            if (!scan(x.next(), y.next())) {
+                return false;
+            }
+        }
+        return !x.hasNext() && !y.hasNext();
+    }
+
+    @Override
+    public void visitIdent(JCIdent tree) {
+        JCIdent that = (JCIdent) parameter;
+        // Identifiers are a special case: we want to ensure the identifiers correspond to the
+        // same symbols (rather than just having the same name), but also consider lambdas
+        // equal if they differ only in the names of the parameters.
+        Symbol symbol = tree.sym;
+        Symbol otherSymbol = that.sym;
+        if (symbol != null && otherSymbol != null) {
+            Boolean tmp = symbolDiffer.apply(symbol, otherSymbol);
+            if (tmp != null) {
+                result = tmp;
+                return;
+            }
+        }
+        result = tree.sym == that.sym;
+    }
+
+    @Override
+    public void visitSelect(JCFieldAccess tree) {
+        JCFieldAccess that = (JCFieldAccess) parameter;
+        result = scan(tree.selected, that.selected) && tree.sym == that.sym;
+    }
+
+    @Override
+    public void visitAnnotatedType(JCAnnotatedType tree) {
+        JCAnnotatedType that = (JCAnnotatedType) parameter;
+        result =
+                scan(tree.annotations, that.annotations)
+                        && scan(tree.underlyingType, that.underlyingType);
+    }
+
+    @Override
+    public void visitAnnotation(JCAnnotation tree) {
+        JCAnnotation that = (JCAnnotation) parameter;
+        result = scan(tree.annotationType, that.annotationType) && scan(tree.args, that.args);
+    }
+
+    @Override
+    public void visitApply(JCMethodInvocation tree) {
+        JCMethodInvocation that = (JCMethodInvocation) parameter;
+        result =
+                scan(tree.typeargs, that.typeargs)
+                        && scan(tree.meth, that.meth)
+                        && scan(tree.args, that.args)
+                        && tree.polyKind == that.polyKind;
+    }
+
+    @Override
+    public void visitAssert(JCAssert tree) {
+        JCAssert that = (JCAssert) parameter;
+        result = scan(tree.cond, that.cond) && scan(tree.detail, that.detail);
+    }
+
+    @Override
+    public void visitAssign(JCAssign tree) {
+        JCAssign that = (JCAssign) parameter;
+        result = scan(tree.lhs, that.lhs) && scan(tree.rhs, that.rhs);
+    }
+
+    @Override
+    public void visitAssignop(JCAssignOp tree) {
+        JCAssignOp that = (JCAssignOp) parameter;
+        result =
+                scan(tree.lhs, that.lhs)
+                        && scan(tree.rhs, that.rhs)
+                        && tree.operator == that.operator;
+    }
+
+    @Override
+    public void visitBinary(JCBinary tree) {
+        JCBinary that = (JCBinary) parameter;
+        result =
+                scan(tree.lhs, that.lhs)
+                        && scan(tree.rhs, that.rhs)
+                        && tree.operator == that.operator;
+    }
+
+    @Override
+    public void visitBlock(JCBlock tree) {
+        JCBlock that = (JCBlock) parameter;
+        result = tree.flags == that.flags && scan(tree.stats, that.stats);
+    }
+
+    @Override
+    public void visitBreak(JCBreak tree) {
+        JCBreak that = (JCBreak) parameter;
+        result = tree.label == that.label;
+    }
+
+    @Override
+    public void visitCase(JCCase tree) {
+        JCCase that = (JCCase) parameter;
+        result = scan(tree.pat, that.pat) && scan(tree.stats, that.stats);
+    }
+
+    @Override
+    public void visitCatch(JCCatch tree) {
+        JCCatch that = (JCCatch) parameter;
+        result = scan(tree.param, that.param) && scan(tree.body, that.body);
+    }
+
+    @Override
+    public void visitClassDef(JCClassDecl tree) {
+        JCClassDecl that = (JCClassDecl) parameter;
+        result =
+                scan(tree.mods, that.mods)
+                        && tree.name == that.name
+                        && scan(tree.typarams, that.typarams)
+                        && scan(tree.extending, that.extending)
+                        && scan(tree.implementing, that.implementing)
+                        && scan(tree.defs, that.defs);
+    }
+
+    @Override
+    public void visitConditional(JCConditional tree) {
+        JCConditional that = (JCConditional) parameter;
+        result =
+                scan(tree.cond, that.cond)
+                        && scan(tree.truepart, that.truepart)
+                        && scan(tree.falsepart, that.falsepart);
+    }
+
+    @Override
+    public void visitContinue(JCContinue tree) {
+        JCContinue that = (JCContinue) parameter;
+        result = tree.label == that.label;
+    }
+
+    @Override
+    public void visitDoLoop(JCDoWhileLoop tree) {
+        JCDoWhileLoop that = (JCDoWhileLoop) parameter;
+        result = scan(tree.body, that.body) && scan(tree.cond, that.cond);
+    }
+
+    @Override
+    public void visitErroneous(JCErroneous tree) {
+        JCErroneous that = (JCErroneous) parameter;
+        result = scan(tree.errs, that.errs);
+    }
+
+    @Override
+    public void visitExec(JCExpressionStatement tree) {
+        JCExpressionStatement that = (JCExpressionStatement) parameter;
+        result = scan(tree.expr, that.expr);
+    }
+
+    @Override
+    public void visitExports(JCExports tree) {
+        JCExports that = (JCExports) parameter;
+        result = scan(tree.qualid, that.qualid) && scan(tree.moduleNames, that.moduleNames);
+    }
+
+    @Override
+    public void visitForLoop(JCForLoop tree) {
+        JCForLoop that = (JCForLoop) parameter;
+        result =
+                scan(tree.init, that.init)
+                        && scan(tree.cond, that.cond)
+                        && scan(tree.step, that.step)
+                        && scan(tree.body, that.body);
+    }
+
+    @Override
+    public void visitForeachLoop(JCEnhancedForLoop tree) {
+        JCEnhancedForLoop that = (JCEnhancedForLoop) parameter;
+        result =
+                scan(tree.var, that.var)
+                        && scan(tree.expr, that.expr)
+                        && scan(tree.body, that.body);
+    }
+
+    @Override
+    public void visitIf(JCIf tree) {
+        JCIf that = (JCIf) parameter;
+        result =
+                scan(tree.cond, that.cond)
+                        && scan(tree.thenpart, that.thenpart)
+                        && scan(tree.elsepart, that.elsepart);
+    }
+
+    @Override
+    public void visitImport(JCImport tree) {
+        JCImport that = (JCImport) parameter;
+        result = tree.staticImport == that.staticImport && scan(tree.qualid, that.qualid);
+    }
+
+    @Override
+    public void visitIndexed(JCArrayAccess tree) {
+        JCArrayAccess that = (JCArrayAccess) parameter;
+        result = scan(tree.indexed, that.indexed) && scan(tree.index, that.index);
+    }
+
+    @Override
+    public void visitLabelled(JCLabeledStatement tree) {
+        JCLabeledStatement that = (JCLabeledStatement) parameter;
+        result = tree.label == that.label && scan(tree.body, that.body);
+    }
+
+    @Override
+    public void visitLambda(JCLambda tree) {
+        JCLambda that = (JCLambda) parameter;
+        result =
+                scan(tree.params, that.params)
+                        && scan(tree.body, that.body)
+                        && tree.paramKind == that.paramKind;
+    }
+
+    @Override
+    public void visitLetExpr(LetExpr tree) {
+        LetExpr that = (LetExpr) parameter;
+        result = scan(tree.defs, that.defs) && scan(tree.expr, that.expr);
+    }
+
+    @Override
+    public void visitLiteral(JCLiteral tree) {
+        JCLiteral that = (JCLiteral) parameter;
+        result = tree.typetag == that.typetag && Objects.equals(tree.value, that.value);
+    }
+
+    @Override
+    public void visitMethodDef(JCMethodDecl tree) {
+        JCMethodDecl that = (JCMethodDecl) parameter;
+        result =
+                scan(tree.mods, that.mods)
+                        && tree.name == that.name
+                        && scan(tree.restype, that.restype)
+                        && scan(tree.typarams, that.typarams)
+                        && scan(tree.recvparam, that.recvparam)
+                        && scan(tree.params, that.params)
+                        && scan(tree.thrown, that.thrown)
+                        && scan(tree.body, that.body)
+                        && scan(tree.defaultValue, that.defaultValue);
+    }
+
+    @Override
+    public void visitModifiers(JCModifiers tree) {
+        JCModifiers that = (JCModifiers) parameter;
+        result = tree.flags == that.flags && scan(tree.annotations, that.annotations);
+    }
+
+    @Override
+    public void visitModuleDef(JCModuleDecl tree) {
+        JCModuleDecl that = (JCModuleDecl) parameter;
+        result =
+                scan(tree.mods, that.mods)
+                        && scan(tree.qualId, that.qualId)
+                        && scan(tree.directives, that.directives);
+    }
+
+    @Override
+    public void visitNewArray(JCNewArray tree) {
+        JCNewArray that = (JCNewArray) parameter;
+        result =
+                scan(tree.elemtype, that.elemtype)
+                        && scan(tree.dims, that.dims)
+                        && scan(tree.annotations, that.annotations)
+                        && scanDimAnnotations(tree.dimAnnotations, that.dimAnnotations)
+                        && scan(tree.elems, that.elems);
+    }
+
+    @Override
+    public void visitNewClass(JCNewClass tree) {
+        JCNewClass that = (JCNewClass) parameter;
+        result =
+                scan(tree.encl, that.encl)
+                        && scan(tree.typeargs, that.typeargs)
+                        && scan(tree.clazz, that.clazz)
+                        && scan(tree.args, that.args)
+                        && scan(tree.def, that.def)
+                        && tree.constructor == that.constructor;
+    }
+
+    @Override
+    public void visitOpens(JCOpens tree) {
+        JCOpens that = (JCOpens) parameter;
+        result = scan(tree.qualid, that.qualid) && scan(tree.moduleNames, that.moduleNames);
+    }
+
+    @Override
+    public void visitPackageDef(JCPackageDecl tree) {
+        JCPackageDecl that = (JCPackageDecl) parameter;
+        result =
+                scan(tree.annotations, that.annotations)
+                        && scan(tree.pid, that.pid)
+                        && tree.packge == that.packge;
+    }
+
+    @Override
+    public void visitProvides(JCProvides tree) {
+        JCProvides that = (JCProvides) parameter;
+        result = scan(tree.serviceName, that.serviceName) && scan(tree.implNames, that.implNames);
+    }
+
+    @Override
+    public void visitReference(JCMemberReference tree) {
+        JCMemberReference that = (JCMemberReference) parameter;
+        result =
+                tree.mode == that.mode
+                        && tree.kind == that.kind
+                        && tree.name == that.name
+                        && scan(tree.expr, that.expr)
+                        && scan(tree.typeargs, that.typeargs);
+    }
+
+    @Override
+    public void visitRequires(JCRequires tree) {
+        JCRequires that = (JCRequires) parameter;
+        result =
+                tree.isTransitive == that.isTransitive
+                        && tree.isStaticPhase == that.isStaticPhase
+                        && scan(tree.moduleName, that.moduleName);
+    }
+
+    @Override
+    public void visitReturn(JCReturn tree) {
+        JCReturn that = (JCReturn) parameter;
+        result = scan(tree.expr, that.expr);
+    }
+
+    @Override
+    public void visitSwitch(JCSwitch tree) {
+        JCSwitch that = (JCSwitch) parameter;
+        result = scan(tree.selector, that.selector) && scan(tree.cases, that.cases);
+    }
+
+    @Override
+    public void visitSynchronized(JCSynchronized tree) {
+        JCSynchronized that = (JCSynchronized) parameter;
+        result = scan(tree.lock, that.lock) && scan(tree.body, that.body);
+    }
+
+    @Override
+    public void visitThrow(JCThrow tree) {
+        JCThrow that = (JCThrow) parameter;
+        result = scan(tree.expr, that.expr);
+    }
+
+    @Override
+    public void visitTopLevel(JCCompilationUnit tree) {
+        JCCompilationUnit that = (JCCompilationUnit) parameter;
+        result =
+                scan(tree.defs, that.defs)
+                        && tree.modle == that.modle
+                        && tree.packge == that.packge;
+    }
+
+    @Override
+    public void visitTry(JCTry tree) {
+        JCTry that = (JCTry) parameter;
+        result =
+                scan(tree.body, that.body)
+                        && scan(tree.catchers, that.catchers)
+                        && scan(tree.finalizer, that.finalizer)
+                        && scan(tree.resources, that.resources);
+    }
+
+    @Override
+    public void visitTypeApply(JCTypeApply tree) {
+        JCTypeApply that = (JCTypeApply) parameter;
+        result = scan(tree.clazz, that.clazz) && scan(tree.arguments, that.arguments);
+    }
+
+    @Override
+    public void visitTypeArray(JCArrayTypeTree tree) {
+        JCArrayTypeTree that = (JCArrayTypeTree) parameter;
+        result = scan(tree.elemtype, that.elemtype);
+    }
+
+    @Override
+    public void visitTypeBoundKind(TypeBoundKind tree) {
+        TypeBoundKind that = (TypeBoundKind) parameter;
+        result = tree.kind == that.kind;
+    }
+
+    @Override
+    public void visitTypeCast(JCTypeCast tree) {
+        JCTypeCast that = (JCTypeCast) parameter;
+        result = scan(tree.clazz, that.clazz) && scan(tree.expr, that.expr);
+    }
+
+    @Override
+    public void visitTypeIdent(JCPrimitiveTypeTree tree) {
+        JCPrimitiveTypeTree that = (JCPrimitiveTypeTree) parameter;
+        result = tree.typetag == that.typetag;
+    }
+
+    @Override
+    public void visitTypeIntersection(JCTypeIntersection tree) {
+        JCTypeIntersection that = (JCTypeIntersection) parameter;
+        result = scan(tree.bounds, that.bounds);
+    }
+
+    @Override
+    public void visitTypeParameter(JCTypeParameter tree) {
+        JCTypeParameter that = (JCTypeParameter) parameter;
+        result =
+                tree.name == that.name
+                        && scan(tree.bounds, that.bounds)
+                        && scan(tree.annotations, that.annotations);
+    }
+
+    @Override
+    public void visitTypeTest(JCInstanceOf tree) {
+        JCInstanceOf that = (JCInstanceOf) parameter;
+        result = scan(tree.expr, that.expr) && scan(tree.clazz, that.clazz);
+    }
+
+    @Override
+    public void visitTypeUnion(JCTypeUnion tree) {
+        JCTypeUnion that = (JCTypeUnion) parameter;
+        result = scan(tree.alternatives, that.alternatives);
+    }
+
+    @Override
+    public void visitUnary(JCUnary tree) {
+        JCUnary that = (JCUnary) parameter;
+        result = scan(tree.arg, that.arg) && tree.operator == that.operator;
+    }
+
+    @Override
+    public void visitUses(JCUses tree) {
+        JCUses that = (JCUses) parameter;
+        result = scan(tree.qualid, that.qualid);
+    }
+
+    @Override
+    public void visitVarDef(JCVariableDecl tree) {
+        JCVariableDecl that = (JCVariableDecl) parameter;
+        result =
+                scan(tree.mods, that.mods)
+                        && tree.name == that.name
+                        && scan(tree.nameexpr, that.nameexpr)
+                        && scan(tree.vartype, that.vartype)
+                        && scan(tree.init, that.init);
+    }
+
+    @Override
+    public void visitWhileLoop(JCWhileLoop tree) {
+        JCWhileLoop that = (JCWhileLoop) parameter;
+        result = scan(tree.cond, that.cond) && scan(tree.body, that.body);
+    }
+
+    @Override
+    public void visitWildcard(JCWildcard tree) {
+        JCWildcard that = (JCWildcard) parameter;
+        result = scan(tree.kind, that.kind) && scan(tree.inner, that.inner);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/TreeHasher.java	Fri Apr 06 03:53:28 2018 +0200
@@ -0,0 +1,102 @@
+/*
+ * Copyright (c) 2018, Google LLC. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package com.sun.tools.javac.comp;
+
+import com.sun.tools.javac.code.Symbol;
+import com.sun.tools.javac.tree.JCTree;
+import com.sun.tools.javac.tree.JCTree.JCFieldAccess;
+import com.sun.tools.javac.tree.JCTree.JCIdent;
+import com.sun.tools.javac.tree.JCTree.JCLiteral;
+import com.sun.tools.javac.tree.TreeInfo;
+import com.sun.tools.javac.tree.TreeScanner;
+import java.util.Objects;
+import java.util.function.Function;
+
+/** A tree visitor that computes a hash code. */
+public class TreeHasher extends TreeScanner {
+
+    private final Function<Symbol, Integer> symbolHasher;
+    private int result = 17;
+
+    public TreeHasher(Function<Symbol, Integer> symbolHasher) {
+        this.symbolHasher = Objects.requireNonNull(symbolHasher);
+    }
+
+    public static int hash(JCTree tree, Function<Symbol, Integer> symbolHasher) {
+        if (tree == null) {
+            return 0;
+        }
+        TreeHasher hasher = new TreeHasher(symbolHasher);
+        tree.accept(hasher);
+        return hasher.result;
+    }
+
+    private void hash(Object object) {
+        result = 31 * result + Objects.hashCode(object);
+    }
+
+    @Override
+    public void scan(JCTree tree) {
+        if (tree == null) {
+            return;
+        }
+        tree = TreeInfo.skipParens(tree);
+        if (tree.type != null) {
+            Object value = tree.type.constValue();
+            if (value != null) {
+                hash(value);
+                return;
+            }
+        }
+        hash(tree.getTag());
+        tree.accept(this);
+    }
+
+    @Override
+    public void visitLiteral(JCLiteral tree) {
+        hash(tree.value);
+        super.visitLiteral(tree);
+    }
+
+    @Override
+    public void visitIdent(JCIdent tree) {
+        Symbol sym = tree.sym;
+        if (sym != null) {
+            Integer hash = symbolHasher.apply(sym);
+            if (hash != null) {
+                hash(hash);
+                return;
+            }
+        }
+        hash(sym);
+    }
+
+    @Override
+    public void visitSelect(JCFieldAccess tree) {
+        hash(tree.sym);
+        super.visitSelect(tree);
+    }
+}
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/main/Option.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/main/Option.java	Fri Apr 06 03:53:28 2018 +0200
@@ -520,24 +520,24 @@
 
     XDIAGS("-Xdiags:", "opt.diags", EXTENDED, BASIC, ONEOF, "compact", "verbose"),
 
-    DEBUG("--debug:", null, HIDDEN, BASIC) {
+    DEBUG("--debug", null, HIDDEN, BASIC, ArgKind.REQUIRED) {
         @Override
-        public void process(OptionHelper helper, String option) throws InvalidValueException {
-            HiddenGroup.DEBUG.process(helper, option);
+        public void process(OptionHelper helper, String option, String arg) throws InvalidValueException {
+            HiddenGroup.DEBUG.process(helper, option, arg);
         }
     },
 
-    SHOULDSTOP("--should-stop:", null, HIDDEN, BASIC) {
+    SHOULDSTOP("--should-stop", null, HIDDEN, BASIC, ArgKind.REQUIRED) {
         @Override
-        public void process(OptionHelper helper, String option) throws InvalidValueException {
-            HiddenGroup.SHOULDSTOP.process(helper, option);
+        public void process(OptionHelper helper, String option, String arg) throws InvalidValueException {
+            HiddenGroup.SHOULDSTOP.process(helper, option, arg);
         }
     },
 
-    DIAGS("--diags:", null, HIDDEN, BASIC) {
+    DIAGS("--diags", null, HIDDEN, BASIC, ArgKind.REQUIRED) {
         @Override
-        public void process(OptionHelper helper, String option) throws InvalidValueException {
-            HiddenGroup.DIAGS.process(helper, option);
+        public void process(OptionHelper helper, String option, String arg) throws InvalidValueException {
+            HiddenGroup.DIAGS.process(helper, option, arg);
         }
     },
 
@@ -846,27 +846,19 @@
         DEBUG("debug"),
         SHOULDSTOP("should-stop");
 
-        static final Set<String> skipSet = new java.util.HashSet<>(
-                Arrays.asList("--diags:", "--debug:", "--should-stop:"));
-
         final String text;
 
         HiddenGroup(String text) {
             this.text = text;
         }
 
-        public void process(OptionHelper helper, String option) throws InvalidValueException {
-            String p = option.substring(option.indexOf(':') + 1).trim();
-            String[] subOptions = p.split(";");
+        public void process(OptionHelper helper, String option, String arg) throws InvalidValueException {
+            String[] subOptions = arg.split(";");
             for (String subOption : subOptions) {
                 subOption = text + "." + subOption.trim();
                 XD.process(helper, subOption, subOption);
             }
         }
-
-        static boolean skip(String name) {
-            return skipSet.contains(name);
-        }
     }
 
     /**
@@ -957,6 +949,11 @@
         this(text, null, descrKey, kind, group, null, null, ArgKind.NONE);
     }
 
+    Option(String text, String descrKey,
+            OptionKind kind, OptionGroup group, ArgKind argKind) {
+        this(text, null, descrKey, kind, group, null, null, argKind);
+    }
+
     Option(String text, String argsNameKey, String descrKey,
             OptionKind kind, OptionGroup group) {
         this(text, argsNameKey, descrKey, kind, group, null, null, ArgKind.REQUIRED);
@@ -1025,7 +1022,7 @@
     }
 
     private boolean matches(String option, String name) {
-        if (name.startsWith("--") && !HiddenGroup.skip(name)) {
+        if (name.startsWith("--")) {
             return option.equals(name)
                     || hasArg() && option.startsWith(name + "=");
         }
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/package-info.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/package-info.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
 
 /**
  * This package provides a legacy entry point for the <em>javac</em> tool.
- * See the <a href="{@docRoot}/jdk.compiler-summary.html">{@code jdk.compiler}</a>
+ * See the <a href="{@docRoot}/jdk.compiler/module-summary.html">{@code jdk.compiler}</a>
  * module for details on replacement APIs.
  */
 package com.sun.tools.javac;
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler.properties	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler.properties	Fri Apr 06 03:53:28 2018 +0200
@@ -2828,6 +2828,15 @@
     target-type: {2}
 
 ########################################
+# Diagnostics for lambda deduplication
+# used by LambdaToMethod (debug only)
+########################################
+
+# 0: symbol
+compiler.note.verbose.l2m.deduplicate=\
+    deduplicating lambda implementation method {0}
+
+########################################
 # Diagnostics for where clause implementation
 # used by the RichDiagnosticFormatter.
 ########################################
--- a/src/jdk.compiler/share/classes/com/sun/tools/sjavac/options/Options.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/jdk.compiler/share/classes/com/sun/tools/sjavac/options/Options.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -313,7 +313,7 @@
         }
 
         // Enable dependency generation
-        args.add("--debug:completionDeps=source,class");
+        args.add("--debug=completionDeps=source,class");
 
         // This can't be anything but 'none'. Enforced by sjavac main method.
         args.add("-implicit:" + implicitPolicy);
--- a/src/jdk.crypto.ucrypto/solaris/native/libj2ucrypto/nativeCrypto.c	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/jdk.crypto.ucrypto/solaris/native/libj2ucrypto/nativeCrypto.c	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -309,7 +309,8 @@
 ////////////////////////////////////////////////////////
 // SPECIAL ENTRIES FOR JVM JNI-BYPASSING OPTIMIZATION
 ////////////////////////////////////////////////////////
-jlong JavaCritical_com_oracle_security_ucrypto_NativeDigest_nativeInit(jint mech) {
+JNIEXPORT jlong JNICALL
+JavaCritical_com_oracle_security_ucrypto_NativeDigest_nativeInit(jint mech) {
   crypto_ctx_t *context = NULL;
   int rv;
 
@@ -325,7 +326,8 @@
   return (jlong) context;
 }
 
-jint JavaCritical_com_oracle_security_ucrypto_NativeDigest_nativeUpdate
+JNIEXPORT jint JNICALL
+JavaCritical_com_oracle_security_ucrypto_NativeDigest_nativeUpdate
   (jint mech, jlong pContext, int notUsed, unsigned char* in, jint ofs, jint len) {
   crypto_ctx_t *context;
   jint rv = 0;
@@ -342,7 +344,8 @@
   return -rv; // use negative value to indicate error
 }
 
-jint JavaCritical_com_oracle_security_ucrypto_NativeDigest_nativeDigest
+JNIEXPORT jint JNICALL
+JavaCritical_com_oracle_security_ucrypto_NativeDigest_nativeDigest
   (jint mech, jlong pContext, int notUsed, unsigned char* out, jint ofs, jint digestLen) {
   crypto_ctx_t *context;
   jint rv = 0;
@@ -359,7 +362,8 @@
   return -rv; // use negative value to indicate error
 }
 
-void JavaCritical_com_oracle_security_ucrypto_NativeDigest_nativeFree
+JNIEXPORT void JNICALL
+JavaCritical_com_oracle_security_ucrypto_NativeDigest_nativeFree
   (jint mech, jlong pContext) {
   crypto_ctx_t *context;
 
@@ -368,7 +372,8 @@
 }
 
 // AES
-jlong JavaCritical_com_oracle_security_ucrypto_NativeCipher_nativeInit
+JNIEXPORT jlong JNICALL
+JavaCritical_com_oracle_security_ucrypto_NativeCipher_nativeInit
   (jint mech, jboolean encrypt, int keyLen, unsigned char* bufKey,
    int ivLen, unsigned char* bufIv, jint tagLen, int aadLen, unsigned char* bufAad) {
   crypto_ctx_t *context = NULL;
@@ -391,7 +396,8 @@
  * Method:    nativeUpdate
  * Signature: (JZ[BII[BI)I
  */
-jint JavaCritical_com_oracle_security_ucrypto_NativeCipher_nativeUpdate
+JNIEXPORT jint JNICALL
+JavaCritical_com_oracle_security_ucrypto_NativeCipher_nativeUpdate
   (jlong pContext, jboolean encrypt, int notUsed, jbyte* bufIn, jint inOfs, jint inLen,
    int outCapacity, jbyte* bufOut, jint outOfs) {
   crypto_ctx_t *context;
@@ -413,7 +419,8 @@
  * Method:    nativeFinal
  * Signature: (JZ[BI)I
  */
-jint JavaCritical_com_oracle_security_ucrypto_NativeCipher_nativeFinal
+JNIEXPORT jint JNICALL
+JavaCritical_com_oracle_security_ucrypto_NativeCipher_nativeFinal
   (jlong pContext, jboolean encrypt, int outLen, jbyte* out, jint outOfs) {
   crypto_ctx_t *context;
   int rv = 0;
@@ -664,7 +671,8 @@
  * Method:    nativeFree
  * Signature: (JI)V
  */
-void JavaCritical_com_oracle_security_ucrypto_NativeKey_nativeFree
+JNIEXPORT void JNICALL
+JavaCritical_com_oracle_security_ucrypto_NativeKey_nativeFree
   (jlong id, jint numOfComponents) {
   crypto_object_attribute_t* pKey;
   int i;
@@ -686,7 +694,8 @@
  * Method:    nativeInit
  * Signature: ([B[B)J
  */
-jlong JavaCritical_com_oracle_security_ucrypto_NativeKey_00024RSAPrivate_nativeInit
+JNIEXPORT jlong JNICALL
+JavaCritical_com_oracle_security_ucrypto_NativeKey_00024RSAPrivate_nativeInit
 (int modLen, jbyte* jMod, int privLen, jbyte* jPriv) {
 
   unsigned char *mod, *priv;
@@ -766,7 +775,8 @@
  * Method:    nativeInit
  * Signature: ([B[B[B[B[B[B[B[B)J
  */
-jlong JavaCritical_com_oracle_security_ucrypto_NativeKey_00024RSAPrivateCrt_nativeInit
+JNIEXPORT jlong JNICALL
+JavaCritical_com_oracle_security_ucrypto_NativeKey_00024RSAPrivateCrt_nativeInit
 (int modLen, jbyte* jMod, int pubLen, jbyte* jPub, int privLen, jbyte* jPriv,
  int pLen, jbyte* jP, int qLen, jbyte* jQ, int expPLen, jbyte* jExpP,
  int expQLen, jbyte* jExpQ, int crtCoeffLen, jbyte* jCrtCoeff) {
@@ -937,7 +947,8 @@
  * Signature: ([B[B)J
  */
 
-jlong JavaCritical_com_oracle_security_ucrypto_NativeKey_00024RSAPublic_nativeInit
+JNIEXPORT jlong JNICALL
+JavaCritical_com_oracle_security_ucrypto_NativeKey_00024RSAPublic_nativeInit
 (int modLen, jbyte* jMod, int pubLen, jbyte* jPub) {
   unsigned char *mod, *pub;
   crypto_object_attribute_t* pKey = NULL;
@@ -1048,7 +1059,8 @@
  * Method:    nativeInit
  * Signature: (IZJI[B)J
  */
-jlong JavaCritical_com_oracle_security_ucrypto_NativeRSASignature_nativeInit
+JNIEXPORT jlong JNICALL
+JavaCritical_com_oracle_security_ucrypto_NativeRSASignature_nativeInit
 (jint mech, jboolean sign, jlong jKey, jint keyLength) {
   crypto_ctx_t *context;
   int rv;
@@ -1094,7 +1106,8 @@
  * Method:    nativeUpdate
  * Signature: (JZ[BII)I
  */
-jint JavaCritical_com_oracle_security_ucrypto_NativeRSASignature_nativeUpdate__JZ_3BII
+JNIEXPORT jint JNICALL
+JavaCritical_com_oracle_security_ucrypto_NativeRSASignature_nativeUpdate__JZ_3BII
 (jlong pCtxt, jboolean sign, int notUsed, jbyte* jIn, jint jInOfs, jint jInLen) {
   crypto_ctx_t *context;
   int rv = 0;
@@ -1142,7 +1155,8 @@
  * Method:    nativeUpdate
  * Signature: (JZJI)I
  */
-jint JavaCritical_com_oracle_security_ucrypto_NativeRSASignature_nativeUpdate__JZJI
+JNIEXPORT jint JNICALL
+JavaCritical_com_oracle_security_ucrypto_NativeRSASignature_nativeUpdate__JZJI
 (jlong pCtxt, jboolean sign, jlong inAddr, jint inLen) {
 
   return JavaCritical_com_oracle_security_ucrypto_NativeRSASignature_nativeUpdate__JZ_3BII
@@ -1161,7 +1175,8 @@
  * Method:    nativeFinal
  * Signature: (JZ[BII)I
  */
-jint JavaCritical_com_oracle_security_ucrypto_NativeRSASignature_nativeFinal
+JNIEXPORT jint JNICALL
+JavaCritical_com_oracle_security_ucrypto_NativeRSASignature_nativeFinal
 (jlong pCtxt, jboolean sign, int notUsed, jbyte* bufSig, jint sigOfs, jint jSigLen) {
 
   crypto_ctx_t *context;
@@ -1236,7 +1251,8 @@
  * Method:    nativeAtomic
  * Signature: (IZJI[BI[BII)I
  */
-jint JavaCritical_com_oracle_security_ucrypto_NativeRSACipher_nativeAtomic
+JNIEXPORT jint JNICALL
+JavaCritical_com_oracle_security_ucrypto_NativeRSACipher_nativeAtomic
   (jint mech, jboolean encrypt, jlong keyValue, jint keyLength,
    int notUsed1, jbyte* bufIn, jint jInLen,
    int notUsed2, jbyte* bufOut, jint jOutOfs, jint jOutLen) {
--- a/src/jdk.crypto.ucrypto/solaris/native/libj2ucrypto/nativeCryptoMD.c	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/jdk.crypto.ucrypto/solaris/native/libj2ucrypto/nativeCryptoMD.c	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -38,7 +38,8 @@
 ///////////////////////////////////////////////////////
 // SPECIAL ENTRIES FOR JVM JNI-BYPASSING OPTIMIZATION
 ////////////////////////////////////////////////////////
-jlong JavaCritical_com_oracle_security_ucrypto_NativeDigestMD_nativeInit(jint mech) {
+JNIEXPORT jlong JNICALL
+JavaCritical_com_oracle_security_ucrypto_NativeDigestMD_nativeInit(jint mech) {
   void *pContext = NULL;
 
   switch (mech) {
@@ -78,7 +79,8 @@
   return (jlong) pContext;
 }
 
-jint JavaCritical_com_oracle_security_ucrypto_NativeDigestMD_nativeUpdate
+JNIEXPORT jint JNICALL
+JavaCritical_com_oracle_security_ucrypto_NativeDigestMD_nativeUpdate
   (jint mech, jlong pContext, int notUsed, unsigned char* in, jint ofs, jint len) {
   if (mech == com_oracle_security_ucrypto_NativeDigestMD_MECH_SHA1) {
     (*ftab->sha1Update)((SHA1_CTX*)pContext, (unsigned char*)(in+ofs), len);
@@ -91,7 +93,8 @@
 }
 
 // Do digest and free the context immediately
-jint JavaCritical_com_oracle_security_ucrypto_NativeDigestMD_nativeDigest
+JNIEXPORT jint JNICALL
+JavaCritical_com_oracle_security_ucrypto_NativeDigestMD_nativeDigest
   (jint mech, jlong pContext, int notUsed, unsigned char* out, jint ofs, jint digestLen) {
 
   if (mech == com_oracle_security_ucrypto_NativeDigestMD_MECH_SHA1) {
@@ -107,7 +110,8 @@
   return 0;
 }
 
-jlong JavaCritical_com_oracle_security_ucrypto_NativeDigestMD_nativeClone
+JNIEXPORT jlong JNICALL
+JavaCritical_com_oracle_security_ucrypto_NativeDigestMD_nativeClone
   (jint mech, jlong pContext) {
   void *copy = NULL;
   size_t len = 0;
@@ -126,7 +130,8 @@
   return (jlong) copy;
 }
 
-void JavaCritical_com_oracle_security_ucrypto_NativeDigestMD_nativeFree
+JNIEXPORT void JNICALL
+JavaCritical_com_oracle_security_ucrypto_NativeDigestMD_nativeFree
   (jint mech, jlong pContext) {
   if (mech == com_oracle_security_ucrypto_NativeDigestMD_MECH_SHA1) {
     free((SHA1_CTX*) pContext);
--- a/src/jdk.hotspot.agent/linux/native/libsaproc/libproc.h	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/jdk.hotspot.agent/linux/native/libsaproc/libproc.h	Fri Apr 06 03:53:28 2018 +0200
@@ -89,19 +89,23 @@
 struct ps_prochandle;
 
 // attach to a process
-struct ps_prochandle* Pgrab(pid_t pid, char* err_buf, size_t err_buf_len);
+JNIEXPORT struct ps_prochandle* JNICALL
+Pgrab(pid_t pid, char* err_buf, size_t err_buf_len);
 
 // attach to a core dump
-struct ps_prochandle* Pgrab_core(const char* execfile, const char* corefile);
+JNIEXPORT struct ps_prochandle* JNICALL
+Pgrab_core(const char* execfile, const char* corefile);
 
 // release a process or core
-void Prelease(struct ps_prochandle* ph);
+JNIEXPORT void JNICALL
+Prelease(struct ps_prochandle* ph);
 
 // functions not directly available in Solaris libproc
 
 // initialize libproc (call this only once per app)
 // pass true to make library verbose
-bool init_libproc(bool verbose);
+JNIEXPORT bool JNICALL
+init_libproc(bool verbose);
 
 // get number of threads
 int get_num_threads(struct ps_prochandle* ph);
--- a/src/jdk.hotspot.agent/linux/native/libsaproc/libproc_impl.c	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/jdk.hotspot.agent/linux/native/libsaproc/libproc_impl.c	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -112,7 +112,8 @@
 }
 
 // initialize libproc
-bool init_libproc(bool debug) {
+JNIEXPORT bool JNICALL
+init_libproc(bool debug) {
    // init debug mode
    _libsaproc_debug = debug;
 
@@ -149,7 +150,8 @@
 // ps_prochandle cleanup
 
 // ps_prochandle cleanup
-void Prelease(struct ps_prochandle* ph) {
+JNIEXPORT void JNICALL
+Prelease(struct ps_prochandle* ph) {
    // do the "derived class" clean-up first
    ph->ops->release(ph);
    destroy_lib_info(ph);
@@ -398,7 +400,8 @@
 // proc service functions
 
 // get process id
-pid_t ps_getpid(struct ps_prochandle *ph) {
+JNIEXPORT pid_t JNICALL
+ps_getpid(struct ps_prochandle *ph) {
    return ph->pid;
 }
 
@@ -407,20 +410,23 @@
 // It returns the symbol's value as an address in the target process in
 // *sym_addr.
 
-ps_err_e ps_pglobal_lookup(struct ps_prochandle *ph, const char *object_name,
+JNIEXPORT ps_err_e JNICALL
+ps_pglobal_lookup(struct ps_prochandle *ph, const char *object_name,
                     const char *sym_name, psaddr_t *sym_addr) {
   *sym_addr = (psaddr_t) lookup_symbol(ph, object_name, sym_name);
   return (*sym_addr ? PS_OK : PS_NOSYM);
 }
 
 // read "size" bytes info "buf" from address "addr"
-ps_err_e ps_pdread(struct ps_prochandle *ph, psaddr_t  addr,
+JNIEXPORT ps_err_e JNICALL
+ps_pdread(struct ps_prochandle *ph, psaddr_t  addr,
                    void *buf, size_t size) {
   return ph->ops->p_pread(ph, (uintptr_t) addr, buf, size)? PS_OK: PS_ERR;
 }
 
 // write "size" bytes of data to debuggee at address "addr"
-ps_err_e ps_pdwrite(struct ps_prochandle *ph, psaddr_t addr,
+JNIEXPORT ps_err_e JNICALL
+ps_pdwrite(struct ps_prochandle *ph, psaddr_t addr,
                     const void *buf, size_t size) {
   return ph->ops->p_pwrite(ph, (uintptr_t)addr, buf, size)? PS_OK: PS_ERR;
 }
@@ -429,28 +435,33 @@
 // Functions below this point are not yet implemented. They are here only
 // to make the linker happy.
 
-ps_err_e ps_lsetfpregs(struct ps_prochandle *ph, lwpid_t lid, const prfpregset_t *fpregs) {
+JNIEXPORT ps_err_e JNICALL
+ps_lsetfpregs(struct ps_prochandle *ph, lwpid_t lid, const prfpregset_t *fpregs) {
   print_debug("ps_lsetfpregs not implemented\n");
   return PS_OK;
 }
 
-ps_err_e ps_lsetregs(struct ps_prochandle *ph, lwpid_t lid, const prgregset_t gregset) {
+JNIEXPORT ps_err_e JNICALL
+ps_lsetregs(struct ps_prochandle *ph, lwpid_t lid, const prgregset_t gregset) {
   print_debug("ps_lsetregs not implemented\n");
   return PS_OK;
 }
 
-ps_err_e  ps_lgetfpregs(struct  ps_prochandle  *ph,  lwpid_t lid, prfpregset_t *fpregs) {
+JNIEXPORT ps_err_e  JNICALL
+ps_lgetfpregs(struct  ps_prochandle  *ph,  lwpid_t lid, prfpregset_t *fpregs) {
   print_debug("ps_lgetfpregs not implemented\n");
   return PS_OK;
 }
 
-ps_err_e ps_lgetregs(struct ps_prochandle *ph, lwpid_t lid, prgregset_t gregset) {
+JNIEXPORT ps_err_e JNICALL
+ps_lgetregs(struct ps_prochandle *ph, lwpid_t lid, prgregset_t gregset) {
   print_debug("ps_lgetfpregs not implemented\n");
   return PS_OK;
 }
 
 // new libthread_db of NPTL seem to require this symbol
-ps_err_e ps_get_thread_area() {
+JNIEXPORT ps_err_e JNICALL
+ps_get_thread_area() {
   print_debug("ps_get_thread_area not implemented\n");
   return PS_OK;
 }
--- a/src/jdk.hotspot.agent/linux/native/libsaproc/proc_service.h	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/jdk.hotspot.agent/linux/native/libsaproc/proc_service.h	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,7 @@
 
 #include <stdio.h>
 #include <thread_db.h>
+#include "jni.h"
 
 // Linux does not have the proc service library, though it does provide the
 // thread_db library which can be used to manipulate threads without having
@@ -44,33 +45,42 @@
 } ps_err_e;
 
 // ps_getpid() is only defined on Linux to return a thread's process ID
-pid_t ps_getpid(struct ps_prochandle *ph);
+JNIEXPORT pid_t JNICALL
+ps_getpid(struct ps_prochandle *ph);
 
 // ps_pglobal_lookup() looks up the symbol sym_name in the symbol table
 // of the load object object_name in the target process identified by ph.
 // It returns the symbol's value as an address in the target process in
 // *sym_addr.
 
-ps_err_e ps_pglobal_lookup(struct ps_prochandle *ph, const char *object_name,
+JNIEXPORT ps_err_e JNICALL
+ps_pglobal_lookup(struct ps_prochandle *ph, const char *object_name,
                     const char *sym_name, psaddr_t *sym_addr);
 
 // read "size" bytes of data from debuggee at address "addr"
-ps_err_e ps_pdread(struct ps_prochandle *ph, psaddr_t  addr,
+JNIEXPORT ps_err_e JNICALL
+ps_pdread(struct ps_prochandle *ph, psaddr_t  addr,
                    void *buf, size_t size);
 
 // write "size" bytes of data to debuggee at address "addr"
-ps_err_e ps_pdwrite(struct ps_prochandle *ph, psaddr_t addr,
+JNIEXPORT ps_err_e JNICALL
+ps_pdwrite(struct ps_prochandle *ph, psaddr_t addr,
                     const void *buf, size_t size);
 
-ps_err_e ps_lsetfpregs(struct ps_prochandle *ph, lwpid_t lid, const prfpregset_t *fpregs);
+JNIEXPORT ps_err_e JNICALL
+ps_lsetfpregs(struct ps_prochandle *ph, lwpid_t lid, const prfpregset_t *fpregs);
 
-ps_err_e ps_lsetregs(struct ps_prochandle *ph, lwpid_t lid, const prgregset_t gregset);
+JNIEXPORT ps_err_e JNICALL
+ps_lsetregs(struct ps_prochandle *ph, lwpid_t lid, const prgregset_t gregset);
 
-ps_err_e  ps_lgetfpregs(struct  ps_prochandle  *ph,  lwpid_t lid, prfpregset_t *fpregs);
+JNIEXPORT ps_err_e JNICALL
+ps_lgetfpregs(struct ps_prochandle *ph, lwpid_t lid, prfpregset_t *fpregs);
 
-ps_err_e ps_lgetregs(struct ps_prochandle *ph, lwpid_t lid, prgregset_t gregset);
+JNIEXPORT ps_err_e JNICALL
+ps_lgetregs(struct ps_prochandle *ph, lwpid_t lid, prgregset_t gregset);
 
 // new libthread_db of NPTL seem to require this symbol
-ps_err_e ps_get_thread_area();
+JNIEXPORT ps_err_e JNICALL
+ps_get_thread_area();
 
 #endif /* _PROC_SERVICE_H_ */
--- a/src/jdk.hotspot.agent/linux/native/libsaproc/ps_core.c	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/jdk.hotspot.agent/linux/native/libsaproc/ps_core.c	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -1008,7 +1008,8 @@
 }
 
 // the one and only one exposed stuff from this file
-struct ps_prochandle* Pgrab_core(const char* exec_file, const char* core_file) {
+JNIEXPORT struct ps_prochandle* JNICALL
+Pgrab_core(const char* exec_file, const char* core_file) {
   ELF_EHDR core_ehdr;
   ELF_EHDR exec_ehdr;
   ELF_EHDR lib_ehdr;
--- a/src/jdk.hotspot.agent/linux/native/libsaproc/ps_proc.c	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/jdk.hotspot.agent/linux/native/libsaproc/ps_proc.c	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -373,7 +373,8 @@
 };
 
 // attach to the process. One and only one exposed stuff
-struct ps_prochandle* Pgrab(pid_t pid, char* err_buf, size_t err_buf_len) {
+JNIEXPORT struct ps_prochandle* JNICALL
+Pgrab(pid_t pid, char* err_buf, size_t err_buf_len) {
   struct ps_prochandle* ph = NULL;
   thread_info* thr = NULL;
 
--- a/src/jdk.hotspot.agent/solaris/native/libsaproc/saproc.cpp	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/jdk.hotspot.agent/solaris/native/libsaproc/saproc.cpp	Fri Apr 06 03:53:28 2018 +0200
@@ -221,7 +221,8 @@
 // implement as a pathmap style facility for the SA.  If libproc
 // starts using other interfaces then this might have to extended to
 // cover other calls.
-extern "C" int libsaproc_open(const char * name, int oflag, ...) {
+extern "C" JNIEXPORT int JNICALL
+libsaproc_open(const char * name, int oflag, ...) {
   if (oflag == O_RDONLY) {
     init_alt_root();
 
--- a/src/jdk.jartool/share/classes/sun/tools/jar/Manifest.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/jdk.jartool/share/classes/sun/tools/jar/Manifest.java	Fri Apr 06 03:53:28 2018 +0200
@@ -52,7 +52,6 @@
     private Hashtable<String, MessageHeader> tableEntries = new Hashtable<>();
 
     static final String[] hashes = {"SHA"};
-    static final byte[] EOL = {(byte)'\r', (byte)'\n'};
 
     static final boolean debug = false;
     static final String VERSION = "1.0";
--- a/src/jdk.javadoc/share/classes/com/sun/javadoc/ClassDoc.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/jdk.javadoc/share/classes/com/sun/javadoc/ClassDoc.java	Fri Apr 06 03:53:28 2018 +0200
@@ -201,7 +201,7 @@
 
     /**
      * Return
-     * <a href="{@docRoot}/com/sun/javadoc/package-summary.html#included">included</a>
+     * <a href="{@docRoot}/jdk.javadoc/com/sun/javadoc/package-summary.html#included">included</a>
      * fields in this class or interface.
      * Excludes enum constants if this is an enum type.
      *
@@ -212,7 +212,7 @@
 
     /**
      * Return fields in this class or interface, filtered to the specified
-     * <a href="{@docRoot}/com/sun/javadoc/package-summary.html#included">access
+     * <a href="{@docRoot}/jdk.javadoc/com/sun/javadoc/package-summary.html#included">access
      * modifier option</a>.
      * Excludes enum constants if this is an enum type.
      *
@@ -236,7 +236,7 @@
 
     /**
      * Return
-     * <a href="{@docRoot}/com/sun/javadoc/package-summary.html#included">included</a>
+     * <a href="{@docRoot}/jdk.javadoc/com/sun/javadoc/package-summary.html#included">included</a>
      * methods in this class or interface.
      * Same as {@code methods(true)}.
      *
@@ -248,7 +248,7 @@
 
     /**
      * Return methods in this class or interface, filtered to the specified
-     * <a href="{@docRoot}/com/sun/javadoc/package-summary.html#included">access
+     * <a href="{@docRoot}/jdk.javadoc/com/sun/javadoc/package-summary.html#included">access
      * modifier option</a>.  Does not include constructors or annotation
      *          type elements.
      *
@@ -264,7 +264,7 @@
 
     /**
      * Return
-     * <a href="{@docRoot}/com/sun/javadoc/package-summary.html#included">included</a>
+     * <a href="{@docRoot}/jdk.javadoc/com/sun/javadoc/package-summary.html#included">included</a>
      * constructors in this class.  An array containing the default
      * no-arg constructor is returned if no other constructors exist.
      * Return empty array if this is an interface.
@@ -276,7 +276,7 @@
 
     /**
      * Return constructors in this class, filtered to the specified
-     * <a href="{@docRoot}/com/sun/javadoc/package-summary.html#included">access
+     * <a href="{@docRoot}/jdk.javadoc/com/sun/javadoc/package-summary.html#included">access
      * modifier option</a>.  Return an array containing the default
      * no-arg constructor if no other constructors exist.
      *
@@ -292,7 +292,7 @@
 
     /**
      * Return
-     * <a href="{@docRoot}/com/sun/javadoc/package-summary.html#included">included</a>
+     * <a href="{@docRoot}/jdk.javadoc/com/sun/javadoc/package-summary.html#included">included</a>
      * nested classes and interfaces within this class or interface.
      * This includes both static and non-static nested classes.
      * (This method should have been named {@code nestedClasses()},
@@ -307,7 +307,7 @@
     /**
      * Return nested classes and interfaces within this class or interface
      * filtered to the specified
-     * <a href="{@docRoot}/com/sun/javadoc/package-summary.html#included">access
+     * <a href="{@docRoot}/jdk.javadoc/com/sun/javadoc/package-summary.html#included">access
      * modifier option</a>.
      * This includes both static and non-static nested classes.
      * Anonymous and local classes are not included.
--- a/src/jdk.javadoc/share/classes/com/sun/javadoc/Doc.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/jdk.javadoc/share/classes/com/sun/javadoc/Doc.java	Fri Apr 06 03:53:28 2018 +0200
@@ -241,7 +241,7 @@
 
     /**
      * Is this Doc item an
-     * <a href="{@docRoot}/com/sun/javadoc/package-summary.html#class">ordinary
+     * <a href="{@docRoot}/jdk.javadoc/com/sun/javadoc/package-summary.html#class">ordinary
      * class</a>?
      * (i.e. not an interface, annotation type, enum, exception, or error)?
      *
@@ -251,7 +251,7 @@
 
     /**
      * Is this Doc item a
-     * <a href="{@docRoot}/com/sun/javadoc/package-summary.html#class">class</a>
+     * <a href="{@docRoot}/jdk.javadoc/com/sun/javadoc/package-summary.html#class">class</a>
      * (and not an interface or annotation type)?
      * This includes ordinary classes, enums, errors and exceptions.
      *
@@ -261,11 +261,11 @@
 
     /**
      * Return true if this Doc item is
-     * <a href="{@docRoot}/com/sun/javadoc/package-summary.html#included">included</a>
+     * <a href="{@docRoot}/jdk.javadoc/com/sun/javadoc/package-summary.html#included">included</a>
      * in the result set.
      *
      * @return true if this Doc item is
-     *         <a href="{@docRoot}/com/sun/javadoc/package-summary.html#included">included</a>
+     *         <a href="{@docRoot}/jdk.javadoc/com/sun/javadoc/package-summary.html#included">included</a>
      *         in the result set.
      */
     boolean isIncluded();
--- a/src/jdk.javadoc/share/classes/com/sun/javadoc/PackageDoc.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/jdk.javadoc/share/classes/com/sun/javadoc/PackageDoc.java	Fri Apr 06 03:53:28 2018 +0200
@@ -48,7 +48,7 @@
 
     /**
      * Get all classes and interfaces in the package, filtered to the specified
-     * <a href="{@docRoot}/com/sun/javadoc/package-summary.html#included">access
+     * <a href="{@docRoot}/jdk.javadoc/com/sun/javadoc/package-summary.html#included">access
      * modifier option</a>.
      *
      * @return       filtered classes and interfaces in this package
@@ -62,7 +62,7 @@
 
     /**
      * Get all
-     * <a href="{@docRoot}/com/sun/javadoc/package-summary.html#included">included</a>
+     * <a href="{@docRoot}/jdk.javadoc/com/sun/javadoc/package-summary.html#included">included</a>
      * classes and interfaces in the package.  Same as allClasses(true).
      *
      * @return all included classes and interfaces in this package.
@@ -71,7 +71,7 @@
 
     /**
      * Get included
-     * <a href="{@docRoot}/com/sun/javadoc/package-summary.html#class">ordinary</a>
+     * <a href="{@docRoot}/jdk.javadoc/com/sun/javadoc/package-summary.html#class">ordinary</a>
      * classes (that is, exclude exceptions, errors, enums, interfaces, and
      * annotation types)
      * in this package.
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/doclet/StandardDoclet.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/doclet/StandardDoclet.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -36,7 +36,7 @@
  * This doclet generates HTML-formatted documentation for the specified modules,
  * packages and types.
  *
- * @see <a href="{@docRoot}/../specs/doc-comment-spec.html">
+ * @see <a href="{@docRootParent}/specs/doc-comment-spec.html">
  *      Documentation Comment Specification for the Standard Doclet</a>
  */
 public class StandardDoclet implements Doclet {
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AbstractIndexWriter.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AbstractIndexWriter.java	Fri Apr 06 03:53:28 2018 +0200
@@ -30,6 +30,7 @@
 import java.util.zip.*;
 
 import javax.lang.model.element.Element;
+import javax.lang.model.element.ElementKind;
 import javax.lang.model.element.ExecutableElement;
 import javax.lang.model.element.ModuleElement;
 import javax.lang.model.element.PackageElement;
@@ -316,10 +317,10 @@
             ExecutableElement ee = (ExecutableElement)member;
             name = name + utils.flatSignature(ee);
             si.setLabel(name);
-            if (!((utils.signature(ee)).equals(utils.flatSignature(ee)))) {
-                si.setUrl(links.getName(getAnchor(ee)));
+            String url = HtmlTree.encodeURL(links.getName(getAnchor(ee)));
+            if (!name.equals(url)) {
+                si.setUrl(url);
             }
-
         }  else {
             si.setLabel(name);
         }
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/markup/HtmlTree.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/markup/HtmlTree.java	Fri Apr 06 03:53:28 2018 +0200
@@ -263,8 +263,11 @@
      * is less aggressive about encoding some characters,
      * like '(', ')', ',' which are used in the anchor
      * names for Java methods in HTML5 mode.
+     *
+     * @param url the url to be percent-encoded.
+     * @return a percent-encoded string.
      */
-    private static String encodeURL(String url) {
+    public static String encodeURL(String url) {
         BitSet nonEncodingChars = MAIN_CHARS;
         StringBuilder sb = new StringBuilder();
         for (byte c : url.getBytes(Charset.forName("UTF-8"))) {
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/resources/search.js	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/resources/search.js	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -33,41 +33,6 @@
 var highlight = "<span class=\"resultHighlight\">$&</span>";
 var camelCaseRegexp = "";
 var secondaryMatcher = "";
-function getName(name) {
-    var anchor = "";
-    var ch = '';
-    for (i = 0; i < name.length; i++) {
-        ch = name.charAt(i);
-        switch (ch) {
-            case '(':
-            case ')':
-            case '<':
-            case '>':
-            case ',':
-                anchor += "-";
-                break;
-            case ' ':
-            case '[':
-                break;
-            case ']':
-                anchor += ":A";
-                break;
-            case '$':
-                if (i == 0)
-                    anchor += "Z:Z";
-                anchor += ":D";
-                break;
-            case '_':
-                if (i == 0)
-                    anchor += "Z:Z";
-                anchor += ch;
-                break;
-            default:
-                anchor += ch;
-        }
-    }
-    return anchor;
-}
 function getHighlightedText(item) {
     var ccMatcher = new RegExp(camelCaseRegexp);
     var label = item.replace(ccMatcher, highlight);
@@ -357,7 +322,7 @@
                     if (ui.item.url) {
                         url += ui.item.url;
                     } else {
-                        url += getName(ui.item.l);
+                        url += ui.item.l;
                     }
                 } else if (ui.item.category === catSearchTags) {
                     url += ui.item.u;
--- a/src/jdk.javadoc/share/classes/module-info.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/jdk.javadoc/share/classes/module-info.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -51,7 +51,7 @@
  * @provides javax.tools.DocumentationTool
  * @provides javax.tools.Tool
  *
- * @see <a href="{@docRoot}/../specs/doc-comment-spec.html">
+ * @see <a href="{@docRootParent}/specs/doc-comment-spec.html">
  *      Documentation Comment Specification for the Standard Doclet</a>
  *
  * @moduleGraph
--- a/src/jdk.jdi/share/native/libdt_shmem/shmemBack.c	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/jdk.jdi/share/native/libdt_shmem/shmemBack.c	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -23,6 +23,7 @@
  * questions.
  */
 #include <string.h>
+#include "jni.h"
 
 #include "jdwpTransport.h"
 #include "shmemBase.h"
@@ -338,7 +339,7 @@
     return JDWPTRANSPORT_ERROR_NONE;
 }
 
-jint JNICALL
+JNIEXPORT jint JNICALL
 jdwpTransport_OnLoad(JavaVM *vm, jdwpTransportCallback* cbTablePtr,
                      jint version, jdwpTransportEnv** result)
 {
--- a/src/jdk.jdwp.agent/share/native/libdt_socket/socketTransport.c	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/jdk.jdwp.agent/share/native/libdt_socket/socketTransport.c	Fri Apr 06 03:53:28 2018 +0200
@@ -28,6 +28,7 @@
 #include <stdlib.h>
 #include <ctype.h>
 
+#include "jni.h"
 #include "jdwpTransport.h"
 #include "sysSocket.h"
 
@@ -1018,7 +1019,7 @@
     return JDWPTRANSPORT_ERROR_NONE;
 }
 
-jint JNICALL
+JNIEXPORT jint JNICALL
 jdwpTransport_OnLoad(JavaVM *vm, jdwpTransportCallback* cbTablePtr,
                      jint version, jdwpTransportEnv** env)
 {
--- a/src/jdk.jshell/share/classes/jdk/internal/jshell/tool/JShellTool.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/jdk.jshell/share/classes/jdk/internal/jshell/tool/JShellTool.java	Fri Apr 06 03:53:28 2018 +0200
@@ -81,6 +81,7 @@
 import jdk.jshell.ImportSnippet;
 import jdk.jshell.JShell;
 import jdk.jshell.JShell.Subscription;
+import jdk.jshell.JShellException;
 import jdk.jshell.MethodSnippet;
 import jdk.jshell.Snippet;
 import jdk.jshell.Snippet.Kind;
@@ -3357,21 +3358,61 @@
     /**
      * Print out a snippet exception.
      *
-     * @param exception the exception to print
+     * @param exception the throwable to print
      * @return true on fatal exception
      */
-    private boolean displayException(Exception exception) {
+    private boolean displayException(Throwable exception) {
+        Throwable rootCause = exception;
+        while (rootCause instanceof EvalException) {
+            rootCause = rootCause.getCause();
+        }
+        if (rootCause != exception && rootCause instanceof UnresolvedReferenceException) {
+            // An unresolved reference caused a chained exception, just show the unresolved
+            return displayException(rootCause, null);
+        } else {
+            return displayException(exception, null);
+        }
+    }
+    //where
+    private boolean displayException(Throwable exception, StackTraceElement[] caused) {
         if (exception instanceof EvalException) {
-            printEvalException((EvalException) exception);
-            return true;
+            // User exception
+            return displayEvalException((EvalException) exception, caused);
         } else if (exception instanceof UnresolvedReferenceException) {
-            printUnresolvedException((UnresolvedReferenceException) exception);
-            return false;
+            // Reference to an undefined snippet
+            return displayUnresolvedException((UnresolvedReferenceException) exception);
         } else {
+            // Should never occur
             error("Unexpected execution exception: %s", exception);
             return true;
         }
     }
+    //where
+    private boolean displayUnresolvedException(UnresolvedReferenceException ex) {
+        // Display the resolution issue
+        printSnippetStatus(ex.getSnippet(), false);
+        return false;
+    }
+
+    //where
+    private boolean displayEvalException(EvalException ex, StackTraceElement[] caused) {
+        // The message for the user exception is configured based on the
+        // existance of an exception message and if this is a recursive
+        // invocation for a chained exception.
+        String msg = ex.getMessage();
+        String key = "jshell.err.exception" +
+                (caused == null? ".thrown" : ".cause") +
+                (msg == null? "" : ".message");
+        errormsg(key, ex.getExceptionClassName(), msg);
+        // The caused trace is sent to truncate duplicate elements in the cause trace
+        printStackTrace(ex.getStackTrace(), caused);
+        JShellException cause = ex.getCause();
+        if (cause != null) {
+            // Display the cause (recursively)
+            displayException(cause, ex.getStackTrace());
+        }
+        return true;
+    }
 
     /**
      * Display a list of diagnostics.
@@ -3518,9 +3559,19 @@
         }
         return false;
     }
-    //where
-    void printStackTrace(StackTraceElement[] stes) {
-        for (StackTraceElement ste : stes) {
+
+    // Print a stack trace, elide frames displayed for the caused exception
+    void printStackTrace(StackTraceElement[] stes, StackTraceElement[] caused) {
+        int overlap = 0;
+        if (caused != null) {
+            int maxOverlap = Math.min(stes.length, caused.length);
+            while (overlap < maxOverlap
+                    && stes[stes.length - (overlap + 1)].equals(caused[caused.length - (overlap + 1)])) {
+                ++overlap;
+            }
+        }
+        for (int i = 0; i < stes.length - overlap; ++i) {
+            StackTraceElement ste = stes[i];
             StringBuilder sb = new StringBuilder();
             String cn = ste.getClassName();
             if (!cn.isEmpty()) {
@@ -3548,19 +3599,9 @@
             error("      at %s(%s)", sb, loc);
 
         }
-    }
-    //where
-    void printUnresolvedException(UnresolvedReferenceException ex) {
-        printSnippetStatus(ex.getSnippet(), false);
-    }
-    //where
-    void printEvalException(EvalException ex) {
-        if (ex.getMessage() == null) {
-            error("%s thrown", ex.getExceptionClassName());
-        } else {
-            error("%s thrown: %s", ex.getExceptionClassName(), ex.getMessage());
+        if (overlap != 0) {
+            error("      ...");
         }
-        printStackTrace(ex.getStackTrace());
     }
 
     private FormatAction toAction(Status status, Status previousStatus, boolean isSignatureChange) {
--- a/src/jdk.jshell/share/classes/jdk/internal/jshell/tool/resources/l10n.properties	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/jdk.jshell/share/classes/jdk/internal/jshell/tool/resources/l10n.properties	Fri Apr 06 03:53:28 2018 +0200
@@ -163,6 +163,11 @@
 
 jshell.err.corrupted.stored.startup = Corrupted stored startup, using default -- {0}
 
+jshell.err.exception.thrown = Exception {0}
+jshell.err.exception.thrown.message = Exception {0}: {1}
+jshell.err.exception.cause = Caused by: {0}
+jshell.err.exception.cause.message = Caused by: {0}: {1}
+
 jshell.console.see.synopsis = <press tab again to see synopsis>
 jshell.console.see.full.documentation = <press tab again to see full documentation>
 jshell.console.see.documentation = <press tab again to see documentation>
--- a/src/jdk.jshell/share/classes/jdk/jshell/Eval.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/jdk.jshell/share/classes/jdk/jshell/Eval.java	Fri Apr 06 03:53:28 2018 +0200
@@ -850,17 +850,15 @@
                             ? expunge(value)
                             : "";
                 } catch (ResolutionException ex) {
-                    DeclarationSnippet sn = (DeclarationSnippet) state.maps.getSnippetDeadOrAlive(ex.id());
-                    exception = new UnresolvedReferenceException(sn, translateExceptionStack(ex));
+                    exception = asUnresolvedReferenceException(ex);
                 } catch (UserException ex) {
-                    exception = new EvalException(ex.getMessage(),
-                            ex.causeExceptionClass(),
-                            translateExceptionStack(ex));
+                    exception = asEvalException(ex);
                 } catch (RunException ex) {
                     // StopException - no-op
                 } catch (InternalException ex) {
                     state.debug(ex, "invoke");
                 } catch (EngineTerminationException ex) {
+                    state.debug(ex, "termination");
                     state.closeDown();
                 }
             } else if (si.subKind() == SubKind.VAR_DECLARATION_SUBKIND) {
@@ -890,6 +888,36 @@
         return events(c, outs, value, exception);
     }
 
+    // Convert an internal UserException to an API EvalException, translating
+    // the stack to snippet form.  Convert any chained exceptions
+    private EvalException asEvalException(UserException ue) {
+        return new EvalException(ue.getMessage(),
+                ue.causeExceptionClass(),
+                translateExceptionStack(ue),
+                asJShellException(ue.getCause()));
+    }
+
+    // Convert an internal ResolutionException to an API UnresolvedReferenceException,
+    // translating the snippet id to snipper and the stack to snippet form
+    private UnresolvedReferenceException asUnresolvedReferenceException(ResolutionException re) {
+        DeclarationSnippet sn = (DeclarationSnippet) state.maps.getSnippetDeadOrAlive(re.id());
+        return new UnresolvedReferenceException(sn, translateExceptionStack(re));
+    }
+
+    // Convert an internal UserException/ResolutionException to an API
+    // EvalException/UnresolvedReferenceException
+    private JShellException asJShellException(Throwable e) {
+        if (e == null) {
+            return null;
+        } else if (e instanceof UserException) {
+            return asEvalException((UserException) e);
+        } else if (e instanceof ResolutionException) {
+            return asUnresolvedReferenceException((ResolutionException) e);
+        } else {
+            throw new AssertionError(e);
+        }
+    }
+
     private boolean interestingEvent(SnippetEvent e) {
         return e.isSignatureChange()
                     || e.causeSnippet() == null
--- a/src/jdk.jshell/share/classes/jdk/jshell/EvalException.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/jdk.jshell/share/classes/jdk/jshell/EvalException.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,10 +26,10 @@
 package jdk.jshell;
 
 /**
- * Wraps an exception thrown in the remotely executing client.
+ * Wraps an throwable thrown in the executing client.
  * An instance of <code>EvalException</code> can be returned in the
  * {@link jdk.jshell.SnippetEvent#exception()} query.
- * The name of the exception thrown is available from
+ * The name of the throwable thrown is available from
  * {@link jdk.jshell.EvalException#getExceptionClassName()}.
  * Message and stack can be queried by methods on <code>Exception</code>.
  * <p>
@@ -45,8 +45,9 @@
 public class EvalException extends JShellException {
     private final String exceptionClass;
 
-    EvalException(String message, String exceptionClass, StackTraceElement[] stackElements) {
-        super(message);
+    EvalException(String message, String exceptionClass,
+            StackTraceElement[] stackElements, JShellException cause) {
+        super(message, cause);
         this.exceptionClass = exceptionClass;
         this.setStackTrace(stackElements);
     }
@@ -63,4 +64,18 @@
         return exceptionClass;
     }
 
+    /**
+     * Returns the wrapped cause of the throwable in the executing client
+     * represented by this {@code EvalException} or {@code null} if the cause is
+     * nonexistent or unknown.
+     *
+     * @return the cause wrapped in a {@code EvalException} or
+     * {@link UnresolvedReferenceException} or return {@code null} if the cause
+     * is nonexistent or unknown.
+     * @since 11
+     */
+    @Override
+    public JShellException getCause() {
+        return (JShellException) super.getCause();
+    }
 }
--- a/src/jdk.jshell/share/classes/jdk/jshell/JShellException.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/jdk.jshell/share/classes/jdk/jshell/JShellException.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -36,4 +36,8 @@
     JShellException(String message) {
         super(message);
     }
+
+    JShellException(String message, Throwable cause) {
+        super(message, cause);
+    }
 }
--- a/src/jdk.jshell/share/classes/jdk/jshell/MethodSnippet.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/jdk.jshell/share/classes/jdk/jshell/MethodSnippet.java	Fri Apr 06 03:53:28 2018 +0200
@@ -42,7 +42,7 @@
 public class MethodSnippet extends DeclarationSnippet {
 
     final String signature;
-    private String qualifiedParamaterTypes;
+    private String qualifiedParameterTypes;
 
     MethodSnippet(MethodKey key, String userSource, Wrap guts,
             String name, String signature, Wrap corralled,
@@ -90,10 +90,10 @@
     }
 
     String qualifiedParameterTypes() {
-        return qualifiedParamaterTypes;
+        return qualifiedParameterTypes;
     }
 
-    void setQualifiedParamaterTypes(String sig) {
-        qualifiedParamaterTypes = sig;
+    void setQualifiedParameterTypes(String sig) {
+        qualifiedParameterTypes = sig;
     }
 }
--- a/src/jdk.jshell/share/classes/jdk/jshell/TaskFactory.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/jdk.jshell/share/classes/jdk/jshell/TaskFactory.java	Fri Apr 06 03:53:28 2018 +0200
@@ -167,7 +167,7 @@
         WrapSourceHandler sh = new WrapSourceHandler();
         List<String> allOptions = new ArrayList<>();
 
-        allOptions.add("--should-stop:at=FLOW");
+        allOptions.add("--should-stop=at=FLOW");
         allOptions.add("-Xlint:unchecked");
         allOptions.add("-proc:none");
         allOptions.addAll(extraArgs);
--- a/src/jdk.jshell/share/classes/jdk/jshell/Unit.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/jdk.jshell/share/classes/jdk/jshell/Unit.java	Fri Apr 06 03:53:28 2018 +0200
@@ -397,17 +397,14 @@
         if (replaceOldEvent != null) secondaryEvents.add(replaceOldEvent);
 
         // Defined methods can overwrite methods of other (equivalent) snippets
-        if (isNew && si.kind() == Kind.METHOD && status.isDefined()) {
-            MethodSnippet msi = (MethodSnippet)si;
-            String oqpt = msi.qualifiedParameterTypes();
-            String nqpt = computeQualifiedParameterTypes(at, msi);
-            if (!nqpt.equals(oqpt)) {
-                msi.setQualifiedParamaterTypes(nqpt);
-                Status overwrittenStatus = overwriteMatchingMethod(msi);
-                if (overwrittenStatus != null) {
-                    prevStatus = overwrittenStatus;
-                    signatureChanged = true;
-                }
+        if (si.kind() == Kind.METHOD && status.isDefined()) {
+            MethodSnippet msi = (MethodSnippet) si;
+            msi.setQualifiedParameterTypes(
+                    computeQualifiedParameterTypes(at, msi));
+            Status overwrittenStatus = overwriteMatchingMethod(msi);
+            if (overwrittenStatus != null) {
+                prevStatus = overwrittenStatus;
+                signatureChanged = true;
             }
         }
     }
--- a/src/jdk.jshell/share/classes/jdk/jshell/UnresolvedReferenceException.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/jdk.jshell/share/classes/jdk/jshell/UnresolvedReferenceException.java	Fri Apr 06 03:53:28 2018 +0200
@@ -45,7 +45,7 @@
     final DeclarationSnippet snippet;
 
     UnresolvedReferenceException(DeclarationSnippet snippet, StackTraceElement[] stackElements) {
-        super("Attempt to use definition snippet with unresolved references");
+        super("Attempt to use definition snippet with unresolved references in " + snippet);
         this.snippet = snippet;
         this.setStackTrace(stackElements);
     }
--- a/src/jdk.jshell/share/classes/jdk/jshell/execution/DirectExecutionControl.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/jdk.jshell/share/classes/jdk/jshell/execution/DirectExecutionControl.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -288,11 +288,20 @@
      * @throws ExecutionControl.InternalException for internal problems
      */
     protected String throwConvertedInvocationException(Throwable cause) throws RunException, InternalException {
-        if (cause instanceof SPIResolutionException) {
-            SPIResolutionException spire = (SPIResolutionException) cause;
-            throw new ResolutionException(spire.id(), spire.getStackTrace());
+        throw asRunException(cause);
+    }
+
+    private RunException asRunException(Throwable ex) {
+        if (ex instanceof SPIResolutionException) {
+            SPIResolutionException spire = (SPIResolutionException) ex;
+            return new ResolutionException(spire.id(), spire.getStackTrace());
         } else {
-            throw new UserException(cause.getMessage(), cause.getClass().getName(), cause.getStackTrace());
+            UserException ue = new UserException(ex.getMessage(),
+                    ex.getClass().getName(),
+                    ex.getStackTrace());
+            Throwable cause = ex.getCause();
+            ue.initCause(cause == null ? null : asRunException(cause));
+            return ue;
         }
     }
 
--- a/src/jdk.jshell/share/classes/jdk/jshell/execution/ExecutionControlForwarder.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/jdk.jshell/share/classes/jdk/jshell/execution/ExecutionControlForwarder.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -195,8 +195,7 @@
             flush();
             return true;
         } catch (InternalException ex) {
-            writeStatus(RESULT_INTERNAL_PROBLEM);
-            writeUTF(ex.getMessage());
+            writeInternalException(ex);
             flush();
             return true;
         } catch (ClassInstallException ex) {
@@ -206,16 +205,24 @@
             flush();
             return true;
         } catch (UserException ex) {
-            writeStatus(RESULT_USER_EXCEPTION);
-            writeNullOrUTF(ex.getMessage());
-            writeUTF(ex.causeExceptionClass());
-            writeObject(ex.getStackTrace());
+            writeStatus(RESULT_USER_EXCEPTION_CHAINED);
+            for (Throwable e = ex; e != null; ) {
+                if (e instanceof UserException) {
+                    writeUserException((UserException) e);
+                    e = e.getCause();
+                } else if (e instanceof ResolutionException) {
+                    writeResolutionException((ResolutionException) e);
+                    e = null;
+                } else {
+                    writeInternalException(e);
+                    e = null;
+                }
+            }
+            writeStatus(RESULT_SUCCESS);
             flush();
             return true;
         } catch (ResolutionException ex) {
-            writeStatus(RESULT_CORRALLED);
-            writeInt(ex.id());
-            writeObject(ex.getStackTrace());
+            writeResolutionException(ex);
             flush();
             return true;
         } catch (StoppedException ex) {
@@ -232,6 +239,24 @@
         }
     }
 
+    void writeInternalException(Throwable ex) throws IOException {
+        writeStatus(RESULT_INTERNAL_PROBLEM);
+        writeUTF(ex.getMessage());
+    }
+
+    void writeUserException(UserException ex) throws IOException {
+        writeStatus(RESULT_USER_EXCEPTION);
+        writeNullOrUTF(ex.getMessage());
+        writeUTF(ex.causeExceptionClass());
+        writeObject(ex.getStackTrace());
+    }
+
+    void writeResolutionException(ResolutionException ex) throws IOException {
+        writeStatus(RESULT_CORRALLED);
+        writeInt(ex.id());
+        writeObject(ex.getStackTrace());
+    }
+
     void commandLoop() {
         try {
             while (processCommand()) {
--- a/src/jdk.jshell/share/classes/jdk/jshell/execution/RemoteCodes.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/jdk.jshell/share/classes/jdk/jshell/execution/RemoteCodes.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -89,7 +89,7 @@
      */
     static final int RESULT_INTERNAL_PROBLEM        = 103;
     /**
-     * User exception encountered.
+     * User exception encountered. Legacy and used within RESULT_USER_EXCEPTION_CHAINED
      */
     static final int RESULT_USER_EXCEPTION          = 104;
     /**
@@ -104,5 +104,9 @@
      * The invoke has been stopped.
      */
     static final int RESULT_STOPPED                 = 107;
-
+    /**
+     * User exception encountered.
+     * @since 11
+     */
+    static final int RESULT_USER_EXCEPTION_CHAINED  = 108;
 }
--- a/src/jdk.jshell/share/classes/jdk/jshell/execution/StreamingExecutionControl.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/jdk.jshell/share/classes/jdk/jshell/execution/StreamingExecutionControl.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -283,18 +283,46 @@
                     throw new NotImplementedException(message);
                 }
                 case RESULT_USER_EXCEPTION: {
-                    // A user exception was encountered.
-                    String message = readNullOrUTF();
-                    String exceptionClassName = in.readUTF();
-                    StackTraceElement[] elems = (StackTraceElement[]) in.readObject();
-                    throw new UserException(message, exceptionClassName, elems);
+                    // A user exception was encountered.  Handle pre JDK 11 back-ends
+                    throw readUserException();
                 }
                 case RESULT_CORRALLED: {
                     // An unresolved reference was encountered.
-                    int id = in.readInt();
-                    StackTraceElement[] elems = (StackTraceElement[]) in.readObject();
-                    ResolutionException re = new ResolutionException(id, elems);
-                    throw re;
+                    throw readResolutionException();
+                }
+                case RESULT_USER_EXCEPTION_CHAINED: {
+                    // A user exception was encountered -- transmit chained.
+                    in.readInt(); // always RESULT_USER_EXCEPTION
+                    UserException result = readUserException();
+                    RunException caused = result;
+                    // Loop through the chained causes (if any) building a chained exception
+                    loop: while (true) {
+                        RunException ex;
+                        int cstatus = in.readInt();
+                        switch (cstatus) {
+                            case RESULT_USER_EXCEPTION: {
+                                // A user exception was the proximal cause.
+                                ex = readUserException();
+                                break;
+                            }
+                            case RESULT_CORRALLED: {
+                                // An unresolved reference was the underlying cause.
+                                ex = readResolutionException();
+                                break;
+                            }
+                            case RESULT_SUCCESS: {
+                                // End of chained exceptions
+                                break loop;
+                            }
+                            default: {
+                                throw new EngineTerminationException("Bad chained remote result code: " + cstatus);
+                            }
+                        }
+                        caused.initCause(ex);
+                        caused = ex;
+                    }
+                    caused.initCause(null); // root cause has no cause
+                    throw result;
                 }
                 case RESULT_STOPPED: {
                     // Execution was aborted by the stop()
@@ -314,8 +342,21 @@
                 }
             }
         } catch (IOException | ClassNotFoundException ex) {
+            ex.printStackTrace();
             throw new EngineTerminationException(ex.toString());
         }
     }
 
+    private UserException readUserException() throws IOException, ClassNotFoundException {
+        String message = readNullOrUTF();
+        String exceptionClassName = in.readUTF();
+        StackTraceElement[] elems = (StackTraceElement[]) in.readObject();
+        return new UserException(message, exceptionClassName, elems);
+    }
+
+    private ResolutionException readResolutionException() throws IOException, ClassNotFoundException {
+        int id = in.readInt();
+        StackTraceElement[] elems = (StackTraceElement[]) in.readObject();
+        return new ResolutionException(id, elems);
+    }
 }
--- a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/ScriptObject.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/ScriptObject.java	Fri Apr 06 03:53:28 2018 +0200
@@ -2046,8 +2046,11 @@
     // Marks a property as declared and sets its value. Used as slow path for block-scoped LET and CONST
     @SuppressWarnings("unused")
     private void declareAndSet(final String key, final Object value) {
+        declareAndSet(findProperty(key, false), value);
+    }
+
+    private void declareAndSet(final FindProperty find, final Object value) {
         final PropertyMap oldMap = getMap();
-        final FindProperty find = findProperty(key, false);
         assert find != null;
 
         final Property property = find.getProperty();
@@ -2056,7 +2059,7 @@
 
         final PropertyMap newMap = oldMap.replaceProperty(property, property.removeFlags(Property.NEEDS_DECLARATION));
         setMap(newMap);
-        set(key, value, NashornCallSiteDescriptor.CALLSITE_DECLARE);
+        set(property.getKey(), value, NashornCallSiteDescriptor.CALLSITE_DECLARE);
     }
 
     /**
@@ -3089,6 +3092,11 @@
                 return;
             }
 
+            if (NashornCallSiteDescriptor.isDeclaration(callSiteFlags) && f.getProperty().needsDeclaration()) {
+                f.getOwner().declareAndSet(f, value);
+                return;
+            }
+
             f.setValue(value, isStrictFlag(callSiteFlags));
 
         } else if (!isExtensible()) {
--- a/src/jdk.sctp/unix/classes/sun/nio/ch/sctp/SctpChannelImpl.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/jdk.sctp/unix/classes/sun/nio/ch/sctp/SctpChannelImpl.java	Fri Apr 06 03:53:28 2018 +0200
@@ -58,7 +58,6 @@
 import sun.nio.ch.IOUtil;
 import sun.nio.ch.NativeThread;
 import sun.nio.ch.Net;
-import sun.nio.ch.PollArrayWrapper;
 import sun.nio.ch.SelChImpl;
 import sun.nio.ch.SelectionKeyImpl;
 import sun.nio.ch.Util;
@@ -642,7 +641,7 @@
     }
 
     @Override
-    public void translateAndSetInterestOps(int ops, SelectionKeyImpl sk) {
+    public int translateInterestOps(int ops) {
         int newOps = 0;
         if ((ops & SelectionKey.OP_READ) != 0)
             newOps |= Net.POLLIN;
@@ -650,7 +649,7 @@
             newOps |= Net.POLLOUT;
         if ((ops & SelectionKey.OP_CONNECT) != 0)
             newOps |= Net.POLLCONN;
-        sk.selector.putEventOps(sk, newOps);
+        return newOps;
     }
 
     @Override
--- a/src/jdk.sctp/unix/classes/sun/nio/ch/sctp/SctpMultiChannelImpl.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/jdk.sctp/unix/classes/sun/nio/ch/sctp/SctpMultiChannelImpl.java	Fri Apr 06 03:53:28 2018 +0200
@@ -58,7 +58,6 @@
 import sun.nio.ch.IOStatus;
 import sun.nio.ch.IOUtil;
 import sun.nio.ch.Net;
-import sun.nio.ch.PollArrayWrapper;
 import sun.nio.ch.SelChImpl;
 import sun.nio.ch.SelectionKeyImpl;
 import sun.nio.ch.Util;
@@ -357,13 +356,13 @@
     }
 
     @Override
-    public void translateAndSetInterestOps(int ops, SelectionKeyImpl sk) {
+    public int translateInterestOps(int ops) {
         int newOps = 0;
         if ((ops & SelectionKey.OP_READ) != 0)
             newOps |= Net.POLLIN;
         if ((ops & SelectionKey.OP_WRITE) != 0)
             newOps |= Net.POLLOUT;
-        sk.selector.putEventOps(sk, newOps);
+        return newOps;
     }
 
     @Override
--- a/src/jdk.sctp/unix/classes/sun/nio/ch/sctp/SctpServerChannelImpl.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/jdk.sctp/unix/classes/sun/nio/ch/sctp/SctpServerChannelImpl.java	Fri Apr 06 03:53:28 2018 +0200
@@ -46,7 +46,6 @@
 import sun.nio.ch.IOStatus;
 import sun.nio.ch.IOUtil;
 import sun.nio.ch.Net;
-import sun.nio.ch.PollArrayWrapper;
 import sun.nio.ch.SelChImpl;
 import sun.nio.ch.SelectionKeyImpl;
 import sun.nio.ch.Util;
@@ -346,15 +345,11 @@
     }
 
     @Override
-    public void translateAndSetInterestOps(int ops, SelectionKeyImpl sk) {
+    public int translateInterestOps(int ops) {
         int newOps = 0;
-
-        /* Translate ops */
         if ((ops & SelectionKey.OP_ACCEPT) != 0)
             newOps |= Net.POLLIN;
-        /* Place ops into pollfd array */
-        sk.selector.putEventOps(sk, newOps);
-
+        return newOps;
     }
 
     @Override
--- a/src/linux/doc/man/ja/java.1	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/linux/doc/man/ja/java.1	Fri Apr 06 03:53:28 2018 +0200
@@ -2902,17 +2902,6 @@
 .sp -1
 .IP \(bu 2.3
 .\}
-javah(1)
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
 jar(1)
 .RE
 .sp
--- a/src/linux/doc/man/ja/javac.1	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/linux/doc/man/ja/javac.1	Fri Apr 06 03:53:28 2018 +0200
@@ -1536,17 +1536,6 @@
 .sp -1
 .IP \(bu 2.3
 .\}
-javah(1)
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
 javadoc(1)
 .RE
 .sp
--- a/src/linux/doc/man/ja/javadoc.1	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/linux/doc/man/ja/javadoc.1	Fri Apr 06 03:53:28 2018 +0200
@@ -4597,17 +4597,6 @@
 .sp -1
 .IP \(bu 2.3
 .\}
-javah(1)
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
 javap(1)
 .RE
 .SH "´ØÏ¢¥É¥­¥å¥á¥ó¥È"
--- a/src/linux/doc/man/ja/javah.1	Thu Apr 05 11:18:39 2018 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,222 +0,0 @@
-'\" t
-.\" Copyright (c) 1994, 2014, Oracle and/or its affiliates. All rights reserved.
-.\" DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-.\"
-.\" This code is free software; you can redistribute it and/or modify it
-.\" under the terms of the GNU General Public License version 2 only, as
-.\" published by the Free Software Foundation.
-.\"
-.\" This code is distributed in the hope that it will be useful, but WITHOUT
-.\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-.\" FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-.\" version 2 for more details (a copy is included in the LICENSE file that
-.\" accompanied this code).
-.\"
-.\" You should have received a copy of the GNU General Public License version
-.\" 2 along with this work; if not, write to the Free Software Foundation,
-.\" Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-.\"
-.\" Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-.\" or visit www.oracle.com if you need additional information or have any
-.\" questions.
-.\"
-.\" Title: javah
-.\" Language: Japanese
-.\" Date: 2013ǯ11·î21Æü
-.\" SectDesc: ´ðËܥġ¼¥ë
-.\" Software: JDK 8
-.\" Arch: ÈÆÍÑ
-.\" Part Number: E58103-01
-.\" Doc ID: JSSON
-.\"
-.if n .pl 99999
-.TH "javah" "1" "2013ǯ11·î21Æü" "JDK 8" "´ðËܥġ¼¥ë"
-.\" -----------------------------------------------------------------
-.\" * Define some portability stuff
-.\" -----------------------------------------------------------------
-.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-.\" http://bugs.debian.org/507673
-.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
-.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-.ie \n(.g .ds Aq \(aq
-.el       .ds Aq '
-.\" -----------------------------------------------------------------
-.\" * set default formatting
-.\" -----------------------------------------------------------------
-.\" disable hyphenation
-.nh
-.\" disable justification (adjust text to left margin only)
-.ad l
-.\" -----------------------------------------------------------------
-.\" * MAIN CONTENT STARTS HERE *
-.\" -----------------------------------------------------------------
-.SH "̾Á°"
-javah \- Java¥¯¥é¥¹¤«¤éC¥Ø¥Ã¥À¡¼¤È¥½¡¼¥¹¡¦¥Õ¥¡¥¤¥ë¤òÀ¸À®¤·¤Þ¤¹¡£
-.SH "³µÍ×"
-.sp
-.if n \{\
-.RS 4
-.\}
-.nf
-\fBjavah\fR [ \fIoptions\fR ] f\fIully\-qualified\-class\-name \&.\&.\&.\fR
-.fi
-.if n \{\
-.RE
-.\}
-.PP
-\fIoptions\fR
-.RS 4
-¥³¥Þ¥ó¥É¹Ô¥ª¥×¥·¥ç¥ó¡£¥ª¥×¥·¥ç¥ó¤ò»²¾È¤·¤Æ¤¯¤À¤µ¤¤¡£
-.RE
-.PP
-\fIfully\-qualified\-class\-name\fR
-.RS 4
-C¥Ø¥Ã¥À¡¼¤È¥½¡¼¥¹¡¦¥Õ¥¡¥¤¥ë¤ËÊÑ´¹¤µ¤ì¤ë¥¯¥é¥¹¤Î´°Á´½¤¾þ¤µ¤ì¤¿¾ì½ê¡£
-.RE
-.SH "ÀâÌÀ"
-.PP
-\fBjavah\fR¥³¥Þ¥ó¥É¤Ï¡¢¥Í¥¤¥Æ¥£¥Ö¡¦¥á¥½¥Ã¥É¤ò¼ÂÁõ¤¹¤ë¤¿¤á¤ËɬÍפÊC¥Ø¥Ã¥À¡¼¤È¥½¡¼¥¹¡¦¥Õ¥¡¥¤¥ë¤òÀ¸À®¤·¤Þ¤¹¡£ºîÀ®¤µ¤ì¤¿¥Ø¥Ã¥À¡¼¤È¥½¡¼¥¹¡¦¥Õ¥¡¥¤¥ë¤Ï¡¢¥Í¥¤¥Æ¥£¥Ö¡¦¥½¡¼¥¹¡¦¥³¡¼¥É¤«¤é¥ª¥Ö¥¸¥§¥¯¥È¤Î¥¤¥ó¥¹¥¿¥ó¥¹ÊÑ¿ô¤ò»²¾È¤¹¤ë¤¿¤á¤ËC¥×¥í¥°¥é¥à¤Ë¤è¤Ã¤Æ»ÈÍѤµ¤ì¤Þ¤¹¡£\fB\&.h\fR¥Õ¥¡¥¤¥ë¤Ï¡¢Âбþ¤¹¤ë¥¯¥é¥¹¤È°ìÃפ¹¤ëÇÛÃÖ¤ò»ý¤Ä\fBstruct\fRÄêµÁ¤ò´Þ¤ß¤Þ¤¹¡£\fBstruct\fR¤Î¥Õ¥£¡¼¥ë¥É¤Ï¡¢¥¯¥é¥¹¤Î¥¤¥ó¥¹¥¿¥ó¥¹ÊÑ¿ô¤ËÂбþ¤·¤Þ¤¹¡£
-.PP
-¥Ø¥Ã¥À¡¼¡¦¥Õ¥¡¥¤¥ë¤È¤½¤ÎÃæ¤ÇÀë¸À¤µ¤ì¤ë¹½Â¤ÂΤÎ̾Á°¤Ï¥¯¥é¥¹¤Î̾Á°¤«¤éÇÉÀ¸¤·¤Þ¤¹¡£\fBjavah\fR¥³¥Þ¥ó¥É¤ËÅϤµ¤ì¤ë¥¯¥é¥¹¤¬¥Ñ¥Ã¥±¡¼¥¸¤ÎÃæ¤Ë¤¢¤ë¾ì¹ç¡¢¥Ñ¥Ã¥±¡¼¥¸Ì¾¤Ï¥Ø¥Ã¥À¡¼¡¦¥Õ¥¡¥¤¥ë̾¤È¹½Â¤ÂÎ̾¤ÎξÊý¤ÎÀèƬ¤ËÉղ䵤ì¤Þ¤¹¡£¥¢¥ó¥À¡¼¥¹¥³¥¢(_)¤¬Ì¾Á°¤Î¶èÀÚ¤êʸ»ú¤È¤·¤Æ»ÈÍѤµ¤ì¤Þ¤¹¡£
-.PP
-¥Ç¥Õ¥©¥ë¥È¤Ç¤Ï\fBjavah\fR¥³¥Þ¥ó¥É¤Ï¡¢¥³¥Þ¥ó¥É¹Ô¤Ë¥ê¥¹¥È¤µ¤ì¤ë³Æ¥¯¥é¥¹¤Î¥Ø¥Ã¥À¡¼¡¦¥Õ¥¡¥¤¥ë¤òºîÀ®¤·¡¢¸½ºß¤Î¥Ç¥£¥ì¥¯¥È¥ê¤Ë¥Õ¥¡¥¤¥ë¤òÃÖ¤­¤Þ¤¹¡£¥½¡¼¥¹¡¦¥Õ¥¡¥¤¥ë¤òºîÀ®¤¹¤ë¤Ë¤Ï¡¢\fB\-stubs\fR¥ª¥×¥·¥ç¥ó¤ò»ÈÍѤ·¤Æ¤¯¤À¤µ¤¤¡£1¤Ä¤Î¥Õ¥¡¥¤¥ë¤ÎÃæ¤Ë¡¢¥ê¥¹¥È¤µ¤ì¤¿¤¹¤Ù¤Æ¤Î¥¯¥é¥¹¤Î·ë²Ì¤òÏ¢·ë¤¹¤ë¤Ë¤Ï¡¢\fB\-o\fR¥ª¥×¥·¥ç¥ó¤ò»ÈÍѤ·¤Æ¤¯¤À¤µ¤¤¡£
-.PP
-Java Native Interface (JNI)¤Ï¥Ø¥Ã¥À¡¼¾ðÊó¤Þ¤¿¤Ï¥¹¥¿¥Ö¡¦¥Õ¥¡¥¤¥ë¤òɬÍפȤ·¤Þ¤»¤ó¡£\fBjavah\fR¥³¥Þ¥ó¥É¤Ï°ú¤­Â³¤­JNI·Á¼°¤Î¥Í¥¤¥Æ¥£¥Ö¡¦¥á¥½¥Ã¥É¤ËɬÍפʥͥ¤¥Æ¥£¥Ö¡¦¥á¥½¥Ã¥É´Ø¿ô¥×¥í¥È¥¿¥¤¥×¤ÎÀ¸À®¤Ë»ÈÍѤǤ­¤Þ¤¹¡£\fBjavah\fR¥³¥Þ¥ó¥É¤Ï¥Ç¥Õ¥©¥ë¥È¤ÇJNI·Á¼°¤Î½ÐÎϤòÀ¸À®¤·¡¢¤½¤Î·ë²Ì¤ò\fB\&.h\fR¥Õ¥¡¥¤¥ë¤Ë³ÊǼ¤·¤Þ¤¹¡£
-.SH "¥ª¥×¥·¥ç¥ó"
-.PP
-\-o \fIoutputfile\fR
-.RS 4
-¥³¥Þ¥ó¥É¹Ô¤Ë¥ê¥¹¥È¤µ¤ì¤¿¤¹¤Ù¤Æ¤Î¥¯¥é¥¹¤ËÂФ·¤Æ¡¢·ë²Ì¤Î¥Ø¥Ã¥À¡¼¤Þ¤¿¤Ï¥½¡¼¥¹¡¦¥Õ¥¡¥¤¥ë¤òÏ¢·ë¤·¤Æ½ÐÎÏ¥Õ¥¡¥¤¥ë¤Ë³ÊǼ¤·¤Þ¤¹¡£\fB\-o\fR¤Þ¤¿¤Ï\fB\-d\fR¤Î¤É¤Á¤é¤«¤Î¤ß»ÈÍѤǤ­¤Þ¤¹¡£
-.RE
-.PP
-\-d \fIdirectory\fR
-.RS 4
-\fBjavah\fR¤¬¥Ø¥Ã¥À¡¼¡¦¥Õ¥¡¥¤¥ë¤Þ¤¿¤Ï¥¹¥¿¥Ö¡¦¥Õ¥¡¥¤¥ë¤òÊݸ¤¹¤ë¡¢¥Ç¥£¥ì¥¯¥È¥ê¤òÀßÄꤷ¤Þ¤¹¡£\fB\-d\fR¤Þ¤¿¤Ï\fB\-o\fR¤Î¤É¤Á¤é¤«¤Î¤ß»ÈÍѤǤ­¤Þ¤¹¡£
-.RE
-.PP
-\-stubs
-.RS 4
-\fBjavah\fR¥³¥Þ¥ó¥É¤¬¡¢Java¥ª¥Ö¥¸¥§¥¯¥È¡¦¥Õ¥¡¥¤¥ë¤«¤éCÀë¸À¤òÀ¸À®¤·¤Þ¤¹¡£
-.RE
-.PP
-\-verbose
-.RS 4
-¾ÜºÙ½ÐÎϤò»ØÄꤷ¡¢ºîÀ®¥Õ¥¡¥¤¥ë¤Î¾õÂ֤˴ؤ¹¤ë¥á¥Ã¥»¡¼¥¸¤ò¡¢\fBjavah\fR¥³¥Þ¥ó¥É¤¬\fBɸ½à½ÐÎÏ\fR¤Ë½ÐÎϤ·¤Þ¤¹¡£
-.RE
-.PP
-\-help
-.RS 4
-\fBjavah\fR¤Î»ÈÍÑÊýË¡¤Ë¤Ä¤¤¤Æ¤Î¥Ø¥ë¥×¡¦¥á¥Ã¥»¡¼¥¸¤ò½ÐÎϤ·¤Þ¤¹¡£
-.RE
-.PP
-\-version
-.RS 4
-\fBjavah\fR¥³¥Þ¥ó¥É¤Î¥ê¥ê¡¼¥¹¾ðÊó¤ò½ÐÎϤ·¤Þ¤¹¡£
-.RE
-.PP
-\-jni
-.RS 4
-JNI·Á¼°¤Î¥Í¥¤¥Æ¥£¥Ö¡¦¥á¥½¥Ã¥Éµ¡Ç½¥×¥í¥È¥¿¥¤¥×¤ò´Þ¤à½ÐÎÏ¥Õ¥¡¥¤¥ë¤ò¡¢\fBjavah\fR¥³¥Þ¥ó¥É¤¬ºîÀ®¤·¤Þ¤¹¡£¤³¤ì¤Ïɸ½à½ÐÎϤǤ¢¤ë¤¿¤á¡¢\fB\-jni\fR¤Î»ÈÍѤϥª¥×¥·¥ç¥ó¤Ç¤¹¡£
-.RE
-.PP
-\-classpath \fIpath\fR
-.RS 4
-¥¯¥é¥¹¤òõ¤¹¤¿¤á¤Ë\fBjavah\fR¥³¥Þ¥ó¥É¤¬»ÈÍѤ¹¤ë¥Ñ¥¹¤ò»ØÄꤷ¤Þ¤¹¡£¥Ç¥Õ¥©¥ë¥È¤Þ¤¿¤Ï\fBCLASSPATH\fR´Ä¶­ÊÑ¿ô¤ÎÀßÄê¤ò¥ª¡¼¥Ð¡¼¥é¥¤¥É¤·¤Þ¤¹¡£¥Ç¥£¥ì¥¯¥È¥ê¤ÏOracle Solaris¤Î¾ì¹ç¤Ï¥³¥í¥ó¤Ç¡¢Windows¤Î¾ì¹ç¤Ï¥»¥ß¥³¥í¥ó¤Ç¶èÀÚ¤é¤ì¤Þ¤¹¡£¥Ñ¥¹¤Î°ìÈÌŪ¤Ê·Á¼°¤Ï¼¡¤Î¤è¤¦¤Ë¤Ê¤ê¤Þ¤¹¡£
-.sp
-\fBOracle Solaris\fR¤Î¾ì¹ç:
-.sp
-\&.:\fIyour\-path\fR
-.sp
-Îã:
-\fB\&.:/home/avh/classes:/usr/local/java/classes\fR
-.sp
-\fBWindows\fR¤Î¾ì¹ç:
-.sp
-\&.;\fIyour\-path\fR
-.sp
-Îã:
-\fB\&.;C:\eusers\edac\eclasses;C:\etools\ejava\eclasses\fR
-.sp
-Êص¹¾å¡¢*¤Î¥Ù¡¼¥¹Ì¾¤ò´Þ¤à¥¯¥é¥¹¡¦¥Ñ¥¹Í×ÁǤϡ¢\fB\&.jar\fR¤Þ¤¿¤Ï\fB\&.JAR\fR¤ò³ÈÄ¥»Ò¤Ë»ý¤Ä¥Ç¥£¥ì¥¯¥È¥êÆâ¤Î¤¹¤Ù¤Æ¤Î¥Õ¥¡¥¤¥ë¤Î¥ê¥¹¥È¤ò»ØÄꤹ¤ë¤Î¤ÈƱÅù¤È¤ß¤Ê¤µ¤ì¤Þ¤¹¡£
-.sp
-¤¿¤È¤¨¤Ð¡¢¥Ç¥£¥ì¥¯¥È¥ê\fBmydir\fR¤Ë\fBa\&.jar\fR¤È\fBb\&.JAR\fR¤¬´Þ¤Þ¤ì¤Æ¤¤¤ë¾ì¹ç¡¢¥¯¥é¥¹¡¦¥Ñ¥¹Í×ÁÇ\fBmydir/*\fR¤Ï\fBA\fR\fB\&.jar:b\&.JAR\fR¤ËŸ³«¤µ¤ì¤Þ¤¹¤¬¡¢JAR¥Õ¥¡¥¤¥ë¤Î½çÈÖ¤Ï̤»ØÄê¤È¤Ê¤ê¤Þ¤¹¡£¤³¤Î¥ê¥¹¥È¤Ë¤Ï¡¢±£¤·¥Õ¥¡¥¤¥ë¤â´Þ¤á¡¢»ØÄꤵ¤ì¤¿¥Ç¥£¥ì¥¯¥È¥êÆâ¤Î¤¹¤Ù¤Æ¤ÎJAR¥Õ¥¡¥¤¥ë¤¬´Þ¤Þ¤ì¤Þ¤¹¡£*¤«¤é¤Ê¤ë¥¯¥é¥¹¡¦¥Ñ¥¹¡¦¥¨¥ó¥È¥ê¤Ï¡¢¸½ºß¤Î¥Ç¥£¥ì¥¯¥È¥êÆâ¤Î¤¹¤Ù¤Æ¤ÎJAR¥Õ¥¡¥¤¥ë¤Î¥ê¥¹¥È¤ËŸ³«¤µ¤ì¤Þ¤¹¡£\fBCLASSPATH\fR´Ä¶­ÊÑ¿ô¤â¡¢ÄêµÁ»þ¤Ë¤ÏƱÍͤËŸ³«¤µ¤ì¤Þ¤¹¡£¥¯¥é¥¹¡¦¥Ñ¥¹¤Î¥ï¥¤¥ë¥É¥«¡¼¥É¤ÎŸ³«¤Ï¡¢Java Virtual Machine (JVM)¤Î³«»ÏÁ°¤Ë¹Ô¤ï¤ì¤Þ¤¹¡£Java¥×¥í¥°¥é¥à¤Ï¡¢´Ä¶­¤òÌ䤤¹ç¤»¤ë¾ì¹ç¤ò½ü¤­¡¢Å¸³«¤µ¤ì¤Æ¤¤¤Ê¤¤¥ï¥¤¥ë¥É¥«¡¼¥É¤ò»²¾È¤·¤Þ¤»¤ó¡£¤¿¤È¤¨¤Ð¡¢\fBSystem\&.getenv("CLASSPATH")\fR¤ò¥³¡¼¥ë¤·¤ÆÌ䤤¹ç¤»¤ë¾ì¹ç¤Ç¤¹¡£
-.RE
-.PP
-\-bootclasspath \fIpath\fR
-.RS 4
-¥Ö¡¼¥È¥¹¥È¥é¥Ã¥×¡¦¥¯¥é¥¹¤ò¥í¡¼¥É¤¹¤ë¥Ñ¥¹¤ò»ØÄꤷ¤Þ¤¹¡£¥Ö¡¼¥È¥¹¥È¥é¥Ã¥×¡¦¥¯¥é¥¹¤Ï¡¢¥Ç¥Õ¥©¥ë¥È¤Ç¤Ï\fBjre\elib\ert\&.jar\fR¤ª¤è¤Ó¾¤Î¤¤¤¯¤Ä¤«¤ÎJAR¥Õ¥¡¥¤¥ë¤Ë¤¢¤ë¡¢¥³¥¢Java¥×¥é¥Ã¥È¥Õ¥©¡¼¥à¤ò¼ÂÁõ¤¹¤ë¥¯¥é¥¹¤Ç¤¹¡£
-.RE
-.PP
-\-old
-.RS 4
-¸Å¤¤JDK 1\&.0·Á¼°¤Î¥Ø¥Ã¥À¡¼¡¦¥Õ¥¡¥¤¥ë¤òÀ¸À®¤¹¤ë¤è¤¦¤Ë»ØÄꤷ¤Þ¤¹¡£
-.RE
-.PP
-\-force
-.RS 4
-½ÐÎÏ¥Õ¥¡¥¤¥ë¤¬¾ï¤Ë½ñ¤­¹þ¤Þ¤ì¤ë¤è¤¦¤Ë»ØÄꤷ¤Þ¤¹¡£
-.RE
-.PP
-\-J\fIoption\fR
-.RS 4
-Java Virtual Machine¤Ë\fBoption\fR¤òÅϤ·¤Þ¤¹¡£\fBoption\fR¤Ë¤Ï¡¢Java¥¢¥×¥ê¥±¡¼¥·¥ç¥óµ¯Æ°¥Ä¡¼¥ë¤Î¥ê¥Õ¥¡¥ì¥ó¥¹¡¦¥Ú¡¼¥¸¤Ëµ­ºÜ¤µ¤ì¤Æ¤¤¤ë¥ª¥×¥·¥ç¥ó¤ò1¤Ä»ØÄꤷ¤Þ¤¹¡£¤¿¤È¤¨¤Ð¡¢\fB\-J\-Xms48m\fR¤È»ØÄꤹ¤ë¤È¡¢¥¹¥¿¡¼¥È¥¢¥Ã¥×¡¦¥á¥â¥ê¡¼¤Ï48MB¤ËÀßÄꤵ¤ì¤Þ¤¹¡£java(1)¤ò»²¾È¤·¤Æ¤¯¤À¤µ¤¤¡£
-.RE
-.SH "´ØÏ¢¹àÌÜ"
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-javah(1)
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-java(1)
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-jdb(1)
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-javap(1)
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-javadoc(1)
-.RE
-.br
-'pl 8.5i
-'bp
--- a/src/linux/doc/man/ja/javap.1	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/linux/doc/man/ja/javap.1	Fri Apr 06 03:53:28 2018 +0200
@@ -338,17 +338,6 @@
 .sp -1
 .IP \(bu 2.3
 .\}
-javah(1)
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
 jdb(1)
 .RE
 .sp
--- a/src/linux/doc/man/ja/jdb.1	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/linux/doc/man/ja/jdb.1	Fri Apr 06 03:53:28 2018 +0200
@@ -371,17 +371,6 @@
 .sp -1
 .IP \(bu 2.3
 .\}
-javah(1)
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
 javap(1)
 .RE
 .br
--- a/src/linux/doc/man/java.1	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/linux/doc/man/java.1	Fri Apr 06 03:53:28 2018 +0200
@@ -3708,17 +3708,6 @@
 .sp -1
 .IP \(bu 2.3
 .\}
-javah(1)
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
 jar(1)
 .RE
 .sp
--- a/src/linux/doc/man/javac.1	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/linux/doc/man/javac.1	Fri Apr 06 03:53:28 2018 +0200
@@ -1353,9 +1353,6 @@
 jdb(1)
 .TP 0.2i    
 \(bu
-javah(1)
-.TP 0.2i    
-\(bu
 javadoc(1)
 .TP 0.2i    
 \(bu
--- a/src/linux/doc/man/javadoc.1	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/linux/doc/man/javadoc.1	Fri Apr 06 03:53:28 2018 +0200
@@ -2978,9 +2978,6 @@
 jdb(1)
 .TP 0.2i    
 \(bu
-javah(1)
-.TP 0.2i    
-\(bu
 javap(1)
 .SH RELATED\ DOCUMENTS    
 .TP 0.2i    
--- a/src/linux/doc/man/javah.1	Thu Apr 05 11:18:39 2018 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,158 +0,0 @@
-'\" t
-.\" Copyright (c) 1994, 2013, Oracle and/or its affiliates. All rights reserved.
-.\" DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-.\"
-.\" This code is free software; you can redistribute it and/or modify it
-.\" under the terms of the GNU General Public License version 2 only, as
-.\" published by the Free Software Foundation.
-.\"
-.\" This code is distributed in the hope that it will be useful, but WITHOUT
-.\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-.\" FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-.\" version 2 for more details (a copy is included in the LICENSE file that
-.\" accompanied this code).
-.\"
-.\" You should have received a copy of the GNU General Public License version
-.\" 2 along with this work; if not, write to the Free Software Foundation,
-.\" Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-.\"
-.\" Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-.\" or visit www.oracle.com if you need additional information or have any
-.\" questions.
-.\"
-.\"     Arch: generic
-.\"     Software: JDK 8
-.\"     Date: 21 November 2013
-.\"     SectDesc: Basic Tools
-.\"     Title: javah.1
-.\"
-.if n .pl 99999
-.TH javah 1 "21 November 2013" "JDK 8" "Basic Tools"
-.\" -----------------------------------------------------------------
-.\" * Define some portability stuff
-.\" -----------------------------------------------------------------
-.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-.\" http://bugs.debian.org/507673
-.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
-.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-.ie \n(.g .ds Aq \(aq
-.el       .ds Aq '
-.\" -----------------------------------------------------------------
-.\" * set default formatting
-.\" -----------------------------------------------------------------
-.\" disable hyphenation
-.nh
-.\" disable justification (adjust text to left margin only)
-.ad l
-.\" -----------------------------------------------------------------
-.\" * MAIN CONTENT STARTS HERE *
-.\" -----------------------------------------------------------------
-
-.SH NAME    
-javah \- Generates C header and source files from a Java class\&.
-.SH SYNOPSIS    
-.sp     
-.nf     
-
-\fBjavah\fR [ \fIoptions\fR ] f\fIully\-qualified\-class\-name \&.\&.\&.\fR
-.fi     
-.sp     
-.TP     
-\fIoptions\fR
-The command-line options\&. See Options\&.
-.TP     
-\fIfully-qualified-class-name\fR
-The fully qualified location of the classes to be converted to C header and source files\&.
-.SH DESCRIPTION    
-The \f3javah\fR command generates C header and source files that are needed to implement native methods\&. The generated header and source files are used by C programs to reference an object\&'s instance variables from native source code\&. The \f3\&.h\fR file contains a \f3struct\fR definition with a layout that parallels the layout of the corresponding class\&. The fields in the \f3struct\fR correspond to instance variables in the class\&.
-.PP
-The name of the header file and the structure declared within it are derived from the name of the class\&. When the class passed to the \f3javah\fR command is inside a package, the package name is added to the beginning of both the header file name and the structure name\&. Underscores (_) are used as name delimiters\&.
-.PP
-By default the \f3javah\fR command creates a header file for each class listed on the command line and puts the files in the current directory\&. Use the \f3-stubs\fR option to create source files\&. Use the \f3-o\fR option to concatenate the results for all listed classes into a single file\&.
-.PP
-The Java Native Interface (JNI) does not require header information or stub files\&. The \f3javah\fR command can still be used to generate native method function prototypes needed for JNI-style native methods\&. The \f3javah\fR command produces JNI-style output by default and places the result in the \f3\&.h\fR file\&.
-.SH OPTIONS    
-.TP
--o \fIoutputfile\fR
-.br
-Concatenates the resulting header or source files for all the classes listed on the command line into an output file\&. Only one of \f3-o\fR or \f3-d\fR can be used\&.
-.TP
--d \fIdirectory\fR
-.br
-Sets the directory where the \f3javah\fR command saves the header files or the stub files\&. Only one of \f3-d\fR or \f3-o\fR can be used\&.
-.TP
--stubs
-.br
-Causes the \f3javah\fR command to generate C declarations from the Java object file\&.
-.TP
--verbose
-.br
-Indicates verbose output and causes the \f3javah\fR command to print a message to \f3stdout\fR about the status of the generated files\&.
-.TP
--help
-.br
-Prints a help message for \f3javah\fR usage\&.
-.TP
--version
-.br
-Prints \f3javah\fR command release information\&.
-.TP
--jni
-.br
-Causes the \f3javah\fR command to create an output file containing JNI-style native method function prototypes\&. This is the default output; use of \f3-jni\fR is optional\&.
-.TP
--classpath \fIpath\fR
-.br
-Specifies the path the \f3javah\fR command uses to look up classes\&. Overrides the default or the \f3CLASSPATH\fR environment variable when it is set\&. Directories are separated by colons on Oracle Solaris and semicolons on Windows\&. The general format for path is:
-
-\fIOracle Solaris\fR:
-
-\&.:\fIyour-path\fR
-
-Example: \f3\&.:/home/avh/classes:/usr/local/java/classes\fR
-
-\fIWindows\fR:
-
-\&.;\fIyour-path\fR
-
-Example: \f3\&.;C:\eusers\edac\eclasses;C:\etools\ejava\eclasses\fR
-
-As a special convenience, a class path element that contains a base name of * is considered equivalent to specifying a list of all the files in the directory with the extension \f3\&.jar\fR or \f3\&.JAR\fR\&.
-
-For example, if directory \f3mydir\fR contains \f3a\&.jar\fR and \f3b\&.JAR\fR, then the class path element \f3mydir/*\fR is expanded to a \f3A\fR\f3\&.jar:b\&.JAR\fR, except that the order of jar files is unspecified\&. All JAR files in the specified directory, including hidden ones, are included in the list\&. A class path entry that consists of * expands to a list of all the JAR files in the current directory\&. The \f3CLASSPATH\fR environment variable, where defined, is similarly expanded\&. Any class path wild card expansion occurs before the Java Virtual Machine (JVM) is started\&. A Java program will never see unexpanded wild cards except by querying the environment\&. For example, by calling \f3System\&.getenv("CLASSPATH")\fR\&.
-.TP
--bootclasspath \fIpath\fR
-.br
-Specifies the path from which to load bootstrap classes\&. By default, the bootstrap classes are the classes that implement the core Java platform located in \f3jre\elib\ert\&.jar\fR and several other JAR files\&.
-.TP
--old
-.br
-Specifies that old JDK 1\&.0-style header files should be generated\&.
-.TP
--force
-.br
-Specifies that output files should always be written\&.
-.TP
--J\fIoption\fR
-.br
-Passes \f3option\fR to the Java Virtual Machine, where \f3option\fR is one of the options described on the reference page for the Java application launcher\&. For example, \f3-J-Xms48m\fR sets the startup memory to 48 MB\&. See java(1)\&.
-.SH SEE\ ALSO    
-.TP 0.2i    
-\(bu
-javah(1)
-.TP 0.2i    
-\(bu
-java(1)
-.TP 0.2i    
-\(bu
-jdb(1)
-.TP 0.2i    
-\(bu
-javap(1)
-.TP 0.2i    
-\(bu
-javadoc(1)
-.RE
-.br
-'pl 8.5i
-'bp
--- a/src/linux/doc/man/javap.1	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/linux/doc/man/javap.1	Fri Apr 06 03:53:28 2018 +0200
@@ -362,17 +362,6 @@
 .sp -1
 .IP \(bu 2.3
 .\}
-javah(1)
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
 jdb(1)
 .RE
 .sp
--- a/src/linux/doc/man/jdb.1	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/linux/doc/man/jdb.1	Fri Apr 06 03:53:28 2018 +0200
@@ -260,9 +260,6 @@
 java(1)
 .TP 0.2i    
 \(bu
-javah(1)
-.TP 0.2i    
-\(bu
 javap(1)
 .RE
 .br
--- a/src/solaris/doc/sun/man/man1/ja/java.1	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/solaris/doc/sun/man/man1/ja/java.1	Fri Apr 06 03:53:28 2018 +0200
@@ -2902,17 +2902,6 @@
 .sp -1
 .IP \(bu 2.3
 .\}
-javah(1)
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
 jar(1)
 .RE
 .sp
--- a/src/solaris/doc/sun/man/man1/ja/javac.1	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/solaris/doc/sun/man/man1/ja/javac.1	Fri Apr 06 03:53:28 2018 +0200
@@ -1536,17 +1536,6 @@
 .sp -1
 .IP \(bu 2.3
 .\}
-javah(1)
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
 javadoc(1)
 .RE
 .sp
--- a/src/solaris/doc/sun/man/man1/ja/javadoc.1	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/solaris/doc/sun/man/man1/ja/javadoc.1	Fri Apr 06 03:53:28 2018 +0200
@@ -4597,17 +4597,6 @@
 .sp -1
 .IP \(bu 2.3
 .\}
-javah(1)
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
 javap(1)
 .RE
 .SH "´ØÏ¢¥É¥­¥å¥á¥ó¥È"
--- a/src/solaris/doc/sun/man/man1/ja/javah.1	Thu Apr 05 11:18:39 2018 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,222 +0,0 @@
-'\" t
-.\" Copyright (c) 1994, 2014, Oracle and/or its affiliates. All rights reserved.
-.\" DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-.\"
-.\" This code is free software; you can redistribute it and/or modify it
-.\" under the terms of the GNU General Public License version 2 only, as
-.\" published by the Free Software Foundation.
-.\"
-.\" This code is distributed in the hope that it will be useful, but WITHOUT
-.\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-.\" FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-.\" version 2 for more details (a copy is included in the LICENSE file that
-.\" accompanied this code).
-.\"
-.\" You should have received a copy of the GNU General Public License version
-.\" 2 along with this work; if not, write to the Free Software Foundation,
-.\" Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-.\"
-.\" Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-.\" or visit www.oracle.com if you need additional information or have any
-.\" questions.
-.\"
-.\" Title: javah
-.\" Language: Japanese
-.\" Date: 2013ǯ11·î21Æü
-.\" SectDesc: ´ðËܥġ¼¥ë
-.\" Software: JDK 8
-.\" Arch: ÈÆÍÑ
-.\" Part Number: E58103-01
-.\" Doc ID: JSSON
-.\"
-.if n .pl 99999
-.TH "javah" "1" "2013ǯ11·î21Æü" "JDK 8" "´ðËܥġ¼¥ë"
-.\" -----------------------------------------------------------------
-.\" * Define some portability stuff
-.\" -----------------------------------------------------------------
-.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-.\" http://bugs.debian.org/507673
-.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
-.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-.ie \n(.g .ds Aq \(aq
-.el       .ds Aq '
-.\" -----------------------------------------------------------------
-.\" * set default formatting
-.\" -----------------------------------------------------------------
-.\" disable hyphenation
-.nh
-.\" disable justification (adjust text to left margin only)
-.ad l
-.\" -----------------------------------------------------------------
-.\" * MAIN CONTENT STARTS HERE *
-.\" -----------------------------------------------------------------
-.SH "̾Á°"
-javah \- Java¥¯¥é¥¹¤«¤éC¥Ø¥Ã¥À¡¼¤È¥½¡¼¥¹¡¦¥Õ¥¡¥¤¥ë¤òÀ¸À®¤·¤Þ¤¹¡£
-.SH "³µÍ×"
-.sp
-.if n \{\
-.RS 4
-.\}
-.nf
-\fBjavah\fR [ \fIoptions\fR ] f\fIully\-qualified\-class\-name \&.\&.\&.\fR
-.fi
-.if n \{\
-.RE
-.\}
-.PP
-\fIoptions\fR
-.RS 4
-¥³¥Þ¥ó¥É¹Ô¥ª¥×¥·¥ç¥ó¡£¥ª¥×¥·¥ç¥ó¤ò»²¾È¤·¤Æ¤¯¤À¤µ¤¤¡£
-.RE
-.PP
-\fIfully\-qualified\-class\-name\fR
-.RS 4
-C¥Ø¥Ã¥À¡¼¤È¥½¡¼¥¹¡¦¥Õ¥¡¥¤¥ë¤ËÊÑ´¹¤µ¤ì¤ë¥¯¥é¥¹¤Î´°Á´½¤¾þ¤µ¤ì¤¿¾ì½ê¡£
-.RE
-.SH "ÀâÌÀ"
-.PP
-\fBjavah\fR¥³¥Þ¥ó¥É¤Ï¡¢¥Í¥¤¥Æ¥£¥Ö¡¦¥á¥½¥Ã¥É¤ò¼ÂÁõ¤¹¤ë¤¿¤á¤ËɬÍפÊC¥Ø¥Ã¥À¡¼¤È¥½¡¼¥¹¡¦¥Õ¥¡¥¤¥ë¤òÀ¸À®¤·¤Þ¤¹¡£ºîÀ®¤µ¤ì¤¿¥Ø¥Ã¥À¡¼¤È¥½¡¼¥¹¡¦¥Õ¥¡¥¤¥ë¤Ï¡¢¥Í¥¤¥Æ¥£¥Ö¡¦¥½¡¼¥¹¡¦¥³¡¼¥É¤«¤é¥ª¥Ö¥¸¥§¥¯¥È¤Î¥¤¥ó¥¹¥¿¥ó¥¹ÊÑ¿ô¤ò»²¾È¤¹¤ë¤¿¤á¤ËC¥×¥í¥°¥é¥à¤Ë¤è¤Ã¤Æ»ÈÍѤµ¤ì¤Þ¤¹¡£\fB\&.h\fR¥Õ¥¡¥¤¥ë¤Ï¡¢Âбþ¤¹¤ë¥¯¥é¥¹¤È°ìÃפ¹¤ëÇÛÃÖ¤ò»ý¤Ä\fBstruct\fRÄêµÁ¤ò´Þ¤ß¤Þ¤¹¡£\fBstruct\fR¤Î¥Õ¥£¡¼¥ë¥É¤Ï¡¢¥¯¥é¥¹¤Î¥¤¥ó¥¹¥¿¥ó¥¹ÊÑ¿ô¤ËÂбþ¤·¤Þ¤¹¡£
-.PP
-¥Ø¥Ã¥À¡¼¡¦¥Õ¥¡¥¤¥ë¤È¤½¤ÎÃæ¤ÇÀë¸À¤µ¤ì¤ë¹½Â¤ÂΤÎ̾Á°¤Ï¥¯¥é¥¹¤Î̾Á°¤«¤éÇÉÀ¸¤·¤Þ¤¹¡£\fBjavah\fR¥³¥Þ¥ó¥É¤ËÅϤµ¤ì¤ë¥¯¥é¥¹¤¬¥Ñ¥Ã¥±¡¼¥¸¤ÎÃæ¤Ë¤¢¤ë¾ì¹ç¡¢¥Ñ¥Ã¥±¡¼¥¸Ì¾¤Ï¥Ø¥Ã¥À¡¼¡¦¥Õ¥¡¥¤¥ë̾¤È¹½Â¤ÂÎ̾¤ÎξÊý¤ÎÀèƬ¤ËÉղ䵤ì¤Þ¤¹¡£¥¢¥ó¥À¡¼¥¹¥³¥¢(_)¤¬Ì¾Á°¤Î¶èÀÚ¤êʸ»ú¤È¤·¤Æ»ÈÍѤµ¤ì¤Þ¤¹¡£
-.PP
-¥Ç¥Õ¥©¥ë¥È¤Ç¤Ï\fBjavah\fR¥³¥Þ¥ó¥É¤Ï¡¢¥³¥Þ¥ó¥É¹Ô¤Ë¥ê¥¹¥È¤µ¤ì¤ë³Æ¥¯¥é¥¹¤Î¥Ø¥Ã¥À¡¼¡¦¥Õ¥¡¥¤¥ë¤òºîÀ®¤·¡¢¸½ºß¤Î¥Ç¥£¥ì¥¯¥È¥ê¤Ë¥Õ¥¡¥¤¥ë¤òÃÖ¤­¤Þ¤¹¡£¥½¡¼¥¹¡¦¥Õ¥¡¥¤¥ë¤òºîÀ®¤¹¤ë¤Ë¤Ï¡¢\fB\-stubs\fR¥ª¥×¥·¥ç¥ó¤ò»ÈÍѤ·¤Æ¤¯¤À¤µ¤¤¡£1¤Ä¤Î¥Õ¥¡¥¤¥ë¤ÎÃæ¤Ë¡¢¥ê¥¹¥È¤µ¤ì¤¿¤¹¤Ù¤Æ¤Î¥¯¥é¥¹¤Î·ë²Ì¤òÏ¢·ë¤¹¤ë¤Ë¤Ï¡¢\fB\-o\fR¥ª¥×¥·¥ç¥ó¤ò»ÈÍѤ·¤Æ¤¯¤À¤µ¤¤¡£
-.PP
-Java Native Interface (JNI)¤Ï¥Ø¥Ã¥À¡¼¾ðÊó¤Þ¤¿¤Ï¥¹¥¿¥Ö¡¦¥Õ¥¡¥¤¥ë¤òɬÍפȤ·¤Þ¤»¤ó¡£\fBjavah\fR¥³¥Þ¥ó¥É¤Ï°ú¤­Â³¤­JNI·Á¼°¤Î¥Í¥¤¥Æ¥£¥Ö¡¦¥á¥½¥Ã¥É¤ËɬÍפʥͥ¤¥Æ¥£¥Ö¡¦¥á¥½¥Ã¥É´Ø¿ô¥×¥í¥È¥¿¥¤¥×¤ÎÀ¸À®¤Ë»ÈÍѤǤ­¤Þ¤¹¡£\fBjavah\fR¥³¥Þ¥ó¥É¤Ï¥Ç¥Õ¥©¥ë¥È¤ÇJNI·Á¼°¤Î½ÐÎϤòÀ¸À®¤·¡¢¤½¤Î·ë²Ì¤ò\fB\&.h\fR¥Õ¥¡¥¤¥ë¤Ë³ÊǼ¤·¤Þ¤¹¡£
-.SH "¥ª¥×¥·¥ç¥ó"
-.PP
-\-o \fIoutputfile\fR
-.RS 4
-¥³¥Þ¥ó¥É¹Ô¤Ë¥ê¥¹¥È¤µ¤ì¤¿¤¹¤Ù¤Æ¤Î¥¯¥é¥¹¤ËÂФ·¤Æ¡¢·ë²Ì¤Î¥Ø¥Ã¥À¡¼¤Þ¤¿¤Ï¥½¡¼¥¹¡¦¥Õ¥¡¥¤¥ë¤òÏ¢·ë¤·¤Æ½ÐÎÏ¥Õ¥¡¥¤¥ë¤Ë³ÊǼ¤·¤Þ¤¹¡£\fB\-o\fR¤Þ¤¿¤Ï\fB\-d\fR¤Î¤É¤Á¤é¤«¤Î¤ß»ÈÍѤǤ­¤Þ¤¹¡£
-.RE
-.PP
-\-d \fIdirectory\fR
-.RS 4
-\fBjavah\fR¤¬¥Ø¥Ã¥À¡¼¡¦¥Õ¥¡¥¤¥ë¤Þ¤¿¤Ï¥¹¥¿¥Ö¡¦¥Õ¥¡¥¤¥ë¤òÊݸ¤¹¤ë¡¢¥Ç¥£¥ì¥¯¥È¥ê¤òÀßÄꤷ¤Þ¤¹¡£\fB\-d\fR¤Þ¤¿¤Ï\fB\-o\fR¤Î¤É¤Á¤é¤«¤Î¤ß»ÈÍѤǤ­¤Þ¤¹¡£
-.RE
-.PP
-\-stubs
-.RS 4
-\fBjavah\fR¥³¥Þ¥ó¥É¤¬¡¢Java¥ª¥Ö¥¸¥§¥¯¥È¡¦¥Õ¥¡¥¤¥ë¤«¤éCÀë¸À¤òÀ¸À®¤·¤Þ¤¹¡£
-.RE
-.PP
-\-verbose
-.RS 4
-¾ÜºÙ½ÐÎϤò»ØÄꤷ¡¢ºîÀ®¥Õ¥¡¥¤¥ë¤Î¾õÂ֤˴ؤ¹¤ë¥á¥Ã¥»¡¼¥¸¤ò¡¢\fBjavah\fR¥³¥Þ¥ó¥É¤¬\fBɸ½à½ÐÎÏ\fR¤Ë½ÐÎϤ·¤Þ¤¹¡£
-.RE
-.PP
-\-help
-.RS 4
-\fBjavah\fR¤Î»ÈÍÑÊýË¡¤Ë¤Ä¤¤¤Æ¤Î¥Ø¥ë¥×¡¦¥á¥Ã¥»¡¼¥¸¤ò½ÐÎϤ·¤Þ¤¹¡£
-.RE
-.PP
-\-version
-.RS 4
-\fBjavah\fR¥³¥Þ¥ó¥É¤Î¥ê¥ê¡¼¥¹¾ðÊó¤ò½ÐÎϤ·¤Þ¤¹¡£
-.RE
-.PP
-\-jni
-.RS 4
-JNI·Á¼°¤Î¥Í¥¤¥Æ¥£¥Ö¡¦¥á¥½¥Ã¥Éµ¡Ç½¥×¥í¥È¥¿¥¤¥×¤ò´Þ¤à½ÐÎÏ¥Õ¥¡¥¤¥ë¤ò¡¢\fBjavah\fR¥³¥Þ¥ó¥É¤¬ºîÀ®¤·¤Þ¤¹¡£¤³¤ì¤Ïɸ½à½ÐÎϤǤ¢¤ë¤¿¤á¡¢\fB\-jni\fR¤Î»ÈÍѤϥª¥×¥·¥ç¥ó¤Ç¤¹¡£
-.RE
-.PP
-\-classpath \fIpath\fR
-.RS 4
-¥¯¥é¥¹¤òõ¤¹¤¿¤á¤Ë\fBjavah\fR¥³¥Þ¥ó¥É¤¬»ÈÍѤ¹¤ë¥Ñ¥¹¤ò»ØÄꤷ¤Þ¤¹¡£¥Ç¥Õ¥©¥ë¥È¤Þ¤¿¤Ï\fBCLASSPATH\fR´Ä¶­ÊÑ¿ô¤ÎÀßÄê¤ò¥ª¡¼¥Ð¡¼¥é¥¤¥É¤·¤Þ¤¹¡£¥Ç¥£¥ì¥¯¥È¥ê¤ÏOracle Solaris¤Î¾ì¹ç¤Ï¥³¥í¥ó¤Ç¡¢Windows¤Î¾ì¹ç¤Ï¥»¥ß¥³¥í¥ó¤Ç¶èÀÚ¤é¤ì¤Þ¤¹¡£¥Ñ¥¹¤Î°ìÈÌŪ¤Ê·Á¼°¤Ï¼¡¤Î¤è¤¦¤Ë¤Ê¤ê¤Þ¤¹¡£
-.sp
-\fBOracle Solaris\fR¤Î¾ì¹ç:
-.sp
-\&.:\fIyour\-path\fR
-.sp
-Îã:
-\fB\&.:/home/avh/classes:/usr/local/java/classes\fR
-.sp
-\fBWindows\fR¤Î¾ì¹ç:
-.sp
-\&.;\fIyour\-path\fR
-.sp
-Îã:
-\fB\&.;C:\eusers\edac\eclasses;C:\etools\ejava\eclasses\fR
-.sp
-Êص¹¾å¡¢*¤Î¥Ù¡¼¥¹Ì¾¤ò´Þ¤à¥¯¥é¥¹¡¦¥Ñ¥¹Í×ÁǤϡ¢\fB\&.jar\fR¤Þ¤¿¤Ï\fB\&.JAR\fR¤ò³ÈÄ¥»Ò¤Ë»ý¤Ä¥Ç¥£¥ì¥¯¥È¥êÆâ¤Î¤¹¤Ù¤Æ¤Î¥Õ¥¡¥¤¥ë¤Î¥ê¥¹¥È¤ò»ØÄꤹ¤ë¤Î¤ÈƱÅù¤È¤ß¤Ê¤µ¤ì¤Þ¤¹¡£
-.sp
-¤¿¤È¤¨¤Ð¡¢¥Ç¥£¥ì¥¯¥È¥ê\fBmydir\fR¤Ë\fBa\&.jar\fR¤È\fBb\&.JAR\fR¤¬´Þ¤Þ¤ì¤Æ¤¤¤ë¾ì¹ç¡¢¥¯¥é¥¹¡¦¥Ñ¥¹Í×ÁÇ\fBmydir/*\fR¤Ï\fBA\fR\fB\&.jar:b\&.JAR\fR¤ËŸ³«¤µ¤ì¤Þ¤¹¤¬¡¢JAR¥Õ¥¡¥¤¥ë¤Î½çÈÖ¤Ï̤»ØÄê¤È¤Ê¤ê¤Þ¤¹¡£¤³¤Î¥ê¥¹¥È¤Ë¤Ï¡¢±£¤·¥Õ¥¡¥¤¥ë¤â´Þ¤á¡¢»ØÄꤵ¤ì¤¿¥Ç¥£¥ì¥¯¥È¥êÆâ¤Î¤¹¤Ù¤Æ¤ÎJAR¥Õ¥¡¥¤¥ë¤¬´Þ¤Þ¤ì¤Þ¤¹¡£*¤«¤é¤Ê¤ë¥¯¥é¥¹¡¦¥Ñ¥¹¡¦¥¨¥ó¥È¥ê¤Ï¡¢¸½ºß¤Î¥Ç¥£¥ì¥¯¥È¥êÆâ¤Î¤¹¤Ù¤Æ¤ÎJAR¥Õ¥¡¥¤¥ë¤Î¥ê¥¹¥È¤ËŸ³«¤µ¤ì¤Þ¤¹¡£\fBCLASSPATH\fR´Ä¶­ÊÑ¿ô¤â¡¢ÄêµÁ»þ¤Ë¤ÏƱÍͤËŸ³«¤µ¤ì¤Þ¤¹¡£¥¯¥é¥¹¡¦¥Ñ¥¹¤Î¥ï¥¤¥ë¥É¥«¡¼¥É¤ÎŸ³«¤Ï¡¢Java Virtual Machine (JVM)¤Î³«»ÏÁ°¤Ë¹Ô¤ï¤ì¤Þ¤¹¡£Java¥×¥í¥°¥é¥à¤Ï¡¢´Ä¶­¤òÌ䤤¹ç¤»¤ë¾ì¹ç¤ò½ü¤­¡¢Å¸³«¤µ¤ì¤Æ¤¤¤Ê¤¤¥ï¥¤¥ë¥É¥«¡¼¥É¤ò»²¾È¤·¤Þ¤»¤ó¡£¤¿¤È¤¨¤Ð¡¢\fBSystem\&.getenv("CLASSPATH")\fR¤ò¥³¡¼¥ë¤·¤ÆÌ䤤¹ç¤»¤ë¾ì¹ç¤Ç¤¹¡£
-.RE
-.PP
-\-bootclasspath \fIpath\fR
-.RS 4
-¥Ö¡¼¥È¥¹¥È¥é¥Ã¥×¡¦¥¯¥é¥¹¤ò¥í¡¼¥É¤¹¤ë¥Ñ¥¹¤ò»ØÄꤷ¤Þ¤¹¡£¥Ö¡¼¥È¥¹¥È¥é¥Ã¥×¡¦¥¯¥é¥¹¤Ï¡¢¥Ç¥Õ¥©¥ë¥È¤Ç¤Ï\fBjre\elib\ert\&.jar\fR¤ª¤è¤Ó¾¤Î¤¤¤¯¤Ä¤«¤ÎJAR¥Õ¥¡¥¤¥ë¤Ë¤¢¤ë¡¢¥³¥¢Java¥×¥é¥Ã¥È¥Õ¥©¡¼¥à¤ò¼ÂÁõ¤¹¤ë¥¯¥é¥¹¤Ç¤¹¡£
-.RE
-.PP
-\-old
-.RS 4
-¸Å¤¤JDK 1\&.0·Á¼°¤Î¥Ø¥Ã¥À¡¼¡¦¥Õ¥¡¥¤¥ë¤òÀ¸À®¤¹¤ë¤è¤¦¤Ë»ØÄꤷ¤Þ¤¹¡£
-.RE
-.PP
-\-force
-.RS 4
-½ÐÎÏ¥Õ¥¡¥¤¥ë¤¬¾ï¤Ë½ñ¤­¹þ¤Þ¤ì¤ë¤è¤¦¤Ë»ØÄꤷ¤Þ¤¹¡£
-.RE
-.PP
-\-J\fIoption\fR
-.RS 4
-Java Virtual Machine¤Ë\fBoption\fR¤òÅϤ·¤Þ¤¹¡£\fBoption\fR¤Ë¤Ï¡¢Java¥¢¥×¥ê¥±¡¼¥·¥ç¥óµ¯Æ°¥Ä¡¼¥ë¤Î¥ê¥Õ¥¡¥ì¥ó¥¹¡¦¥Ú¡¼¥¸¤Ëµ­ºÜ¤µ¤ì¤Æ¤¤¤ë¥ª¥×¥·¥ç¥ó¤ò1¤Ä»ØÄꤷ¤Þ¤¹¡£¤¿¤È¤¨¤Ð¡¢\fB\-J\-Xms48m\fR¤È»ØÄꤹ¤ë¤È¡¢¥¹¥¿¡¼¥È¥¢¥Ã¥×¡¦¥á¥â¥ê¡¼¤Ï48MB¤ËÀßÄꤵ¤ì¤Þ¤¹¡£java(1)¤ò»²¾È¤·¤Æ¤¯¤À¤µ¤¤¡£
-.RE
-.SH "´ØÏ¢¹àÌÜ"
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-javah(1)
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-java(1)
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-jdb(1)
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-javap(1)
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-javadoc(1)
-.RE
-.br
-'pl 8.5i
-'bp
--- a/src/solaris/doc/sun/man/man1/ja/javap.1	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/solaris/doc/sun/man/man1/ja/javap.1	Fri Apr 06 03:53:28 2018 +0200
@@ -338,17 +338,6 @@
 .sp -1
 .IP \(bu 2.3
 .\}
-javah(1)
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
 jdb(1)
 .RE
 .sp
--- a/src/solaris/doc/sun/man/man1/ja/jdb.1	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/solaris/doc/sun/man/man1/ja/jdb.1	Fri Apr 06 03:53:28 2018 +0200
@@ -371,17 +371,6 @@
 .sp -1
 .IP \(bu 2.3
 .\}
-javah(1)
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
 javap(1)
 .RE
 .br
--- a/src/solaris/doc/sun/man/man1/java.1	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/solaris/doc/sun/man/man1/java.1	Fri Apr 06 03:53:28 2018 +0200
@@ -3708,17 +3708,6 @@
 .sp -1
 .IP \(bu 2.3
 .\}
-javah(1)
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
 jar(1)
 .RE
 .sp
--- a/src/solaris/doc/sun/man/man1/javac.1	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/solaris/doc/sun/man/man1/javac.1	Fri Apr 06 03:53:28 2018 +0200
@@ -1353,9 +1353,6 @@
 jdb(1)
 .TP 0.2i    
 \(bu
-javah(1)
-.TP 0.2i    
-\(bu
 javadoc(1)
 .TP 0.2i    
 \(bu
--- a/src/solaris/doc/sun/man/man1/javadoc.1	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/solaris/doc/sun/man/man1/javadoc.1	Fri Apr 06 03:53:28 2018 +0200
@@ -2978,9 +2978,6 @@
 jdb(1)
 .TP 0.2i    
 \(bu
-javah(1)
-.TP 0.2i    
-\(bu
 javap(1)
 .SH RELATED\ DOCUMENTS    
 .TP 0.2i    
--- a/src/solaris/doc/sun/man/man1/javah.1	Thu Apr 05 11:18:39 2018 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,158 +0,0 @@
-'\" t
-.\" Copyright (c) 1994, 2013, Oracle and/or its affiliates. All rights reserved.
-.\" DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-.\"
-.\" This code is free software; you can redistribute it and/or modify it
-.\" under the terms of the GNU General Public License version 2 only, as
-.\" published by the Free Software Foundation.
-.\"
-.\" This code is distributed in the hope that it will be useful, but WITHOUT
-.\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-.\" FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-.\" version 2 for more details (a copy is included in the LICENSE file that
-.\" accompanied this code).
-.\"
-.\" You should have received a copy of the GNU General Public License version
-.\" 2 along with this work; if not, write to the Free Software Foundation,
-.\" Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-.\"
-.\" Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-.\" or visit www.oracle.com if you need additional information or have any
-.\" questions.
-.\"
-.\"     Arch: generic
-.\"     Software: JDK 8
-.\"     Date: 21 November 2013
-.\"     SectDesc: Basic Tools
-.\"     Title: javah.1
-.\"
-.if n .pl 99999
-.TH javah 1 "21 November 2013" "JDK 8" "Basic Tools"
-.\" -----------------------------------------------------------------
-.\" * Define some portability stuff
-.\" -----------------------------------------------------------------
-.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-.\" http://bugs.debian.org/507673
-.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
-.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-.ie \n(.g .ds Aq \(aq
-.el       .ds Aq '
-.\" -----------------------------------------------------------------
-.\" * set default formatting
-.\" -----------------------------------------------------------------
-.\" disable hyphenation
-.nh
-.\" disable justification (adjust text to left margin only)
-.ad l
-.\" -----------------------------------------------------------------
-.\" * MAIN CONTENT STARTS HERE *
-.\" -----------------------------------------------------------------
-
-.SH NAME    
-javah \- Generates C header and source files from a Java class\&.
-.SH SYNOPSIS    
-.sp     
-.nf     
-
-\fBjavah\fR [ \fIoptions\fR ] f\fIully\-qualified\-class\-name \&.\&.\&.\fR
-.fi     
-.sp     
-.TP     
-\fIoptions\fR
-The command-line options\&. See Options\&.
-.TP     
-\fIfully-qualified-class-name\fR
-The fully qualified location of the classes to be converted to C header and source files\&.
-.SH DESCRIPTION    
-The \f3javah\fR command generates C header and source files that are needed to implement native methods\&. The generated header and source files are used by C programs to reference an object\&'s instance variables from native source code\&. The \f3\&.h\fR file contains a \f3struct\fR definition with a layout that parallels the layout of the corresponding class\&. The fields in the \f3struct\fR correspond to instance variables in the class\&.
-.PP
-The name of the header file and the structure declared within it are derived from the name of the class\&. When the class passed to the \f3javah\fR command is inside a package, the package name is added to the beginning of both the header file name and the structure name\&. Underscores (_) are used as name delimiters\&.
-.PP
-By default the \f3javah\fR command creates a header file for each class listed on the command line and puts the files in the current directory\&. Use the \f3-stubs\fR option to create source files\&. Use the \f3-o\fR option to concatenate the results for all listed classes into a single file\&.
-.PP
-The Java Native Interface (JNI) does not require header information or stub files\&. The \f3javah\fR command can still be used to generate native method function prototypes needed for JNI-style native methods\&. The \f3javah\fR command produces JNI-style output by default and places the result in the \f3\&.h\fR file\&.
-.SH OPTIONS    
-.TP
--o \fIoutputfile\fR
-.br
-Concatenates the resulting header or source files for all the classes listed on the command line into an output file\&. Only one of \f3-o\fR or \f3-d\fR can be used\&.
-.TP
--d \fIdirectory\fR
-.br
-Sets the directory where the \f3javah\fR command saves the header files or the stub files\&. Only one of \f3-d\fR or \f3-o\fR can be used\&.
-.TP
--stubs
-.br
-Causes the \f3javah\fR command to generate C declarations from the Java object file\&.
-.TP
--verbose
-.br
-Indicates verbose output and causes the \f3javah\fR command to print a message to \f3stdout\fR about the status of the generated files\&.
-.TP
--help
-.br
-Prints a help message for \f3javah\fR usage\&.
-.TP
--version
-.br
-Prints \f3javah\fR command release information\&.
-.TP
--jni
-.br
-Causes the \f3javah\fR command to create an output file containing JNI-style native method function prototypes\&. This is the default output; use of \f3-jni\fR is optional\&.
-.TP
--classpath \fIpath\fR
-.br
-Specifies the path the \f3javah\fR command uses to look up classes\&. Overrides the default or the \f3CLASSPATH\fR environment variable when it is set\&. Directories are separated by colons on Oracle Solaris and semicolons on Windows\&. The general format for path is:
-
-\fIOracle Solaris\fR:
-
-\&.:\fIyour-path\fR
-
-Example: \f3\&.:/home/avh/classes:/usr/local/java/classes\fR
-
-\fIWindows\fR:
-
-\&.;\fIyour-path\fR
-
-Example: \f3\&.;C:\eusers\edac\eclasses;C:\etools\ejava\eclasses\fR
-
-As a special convenience, a class path element that contains a base name of * is considered equivalent to specifying a list of all the files in the directory with the extension \f3\&.jar\fR or \f3\&.JAR\fR\&.
-
-For example, if directory \f3mydir\fR contains \f3a\&.jar\fR and \f3b\&.JAR\fR, then the class path element \f3mydir/*\fR is expanded to a \f3A\fR\f3\&.jar:b\&.JAR\fR, except that the order of jar files is unspecified\&. All JAR files in the specified directory, including hidden ones, are included in the list\&. A class path entry that consists of * expands to a list of all the JAR files in the current directory\&. The \f3CLASSPATH\fR environment variable, where defined, is similarly expanded\&. Any class path wild card expansion occurs before the Java Virtual Machine (JVM) is started\&. A Java program will never see unexpanded wild cards except by querying the environment\&. For example, by calling \f3System\&.getenv("CLASSPATH")\fR\&.
-.TP
--bootclasspath \fIpath\fR
-.br
-Specifies the path from which to load bootstrap classes\&. By default, the bootstrap classes are the classes that implement the core Java platform located in \f3jre\elib\ert\&.jar\fR and several other JAR files\&.
-.TP
--old
-.br
-Specifies that old JDK 1\&.0-style header files should be generated\&.
-.TP
--force
-.br
-Specifies that output files should always be written\&.
-.TP
--J\fIoption\fR
-.br
-Passes \f3option\fR to the Java Virtual Machine, where \f3option\fR is one of the options described on the reference page for the Java application launcher\&. For example, \f3-J-Xms48m\fR sets the startup memory to 48 MB\&. See java(1)\&.
-.SH SEE\ ALSO    
-.TP 0.2i    
-\(bu
-javah(1)
-.TP 0.2i    
-\(bu
-java(1)
-.TP 0.2i    
-\(bu
-jdb(1)
-.TP 0.2i    
-\(bu
-javap(1)
-.TP 0.2i    
-\(bu
-javadoc(1)
-.RE
-.br
-'pl 8.5i
-'bp
--- a/src/solaris/doc/sun/man/man1/javap.1	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/solaris/doc/sun/man/man1/javap.1	Fri Apr 06 03:53:28 2018 +0200
@@ -362,17 +362,6 @@
 .sp -1
 .IP \(bu 2.3
 .\}
-javah(1)
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
 jdb(1)
 .RE
 .sp
--- a/src/solaris/doc/sun/man/man1/jdb.1	Thu Apr 05 11:18:39 2018 -0700
+++ b/src/solaris/doc/sun/man/man1/jdb.1	Fri Apr 06 03:53:28 2018 +0200
@@ -260,9 +260,6 @@
 java(1)
 .TP 0.2i    
 \(bu
-javah(1)
-.TP 0.2i    
-\(bu
 javap(1)
 .RE
 .br
--- a/test/hotspot/jtreg/ProblemList.txt	Thu Apr 05 11:18:39 2018 -0700
+++ b/test/hotspot/jtreg/ProblemList.txt	Fri Apr 06 03:53:28 2018 +0200
@@ -44,7 +44,6 @@
 compiler/codecache/stress/OverloadCompileQueueTest.java 8166554 generic-all
 compiler/codegen/Test6896617.java 8193479 generic-all
 compiler/compilercontrol/jcmd/ClearDirectivesFileStackTest.java 8140405 generic-all
-compiler/jvmci/compilerToVM/GetExceptionTableTest.java 8200135 generic-all
 compiler/jvmci/compilerToVM/GetResolvedJavaTypeTest.java 8158860 generic-all
 compiler/jvmci/compilerToVM/InvalidateInstalledCodeTest.java 8163894 generic-all
 compiler/tiered/LevelTransitionTest.java 8067651 generic-all
--- a/test/hotspot/jtreg/compiler/jvmci/compilerToVM/GetExceptionTableTest.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/test/hotspot/jtreg/compiler/jvmci/compilerToVM/GetExceptionTableTest.java	Fri Apr 06 03:53:28 2018 +0200
@@ -55,7 +55,7 @@
 
     public static final int TRY_CATCH_COUNT = 3;
     public static final int TRY_CATCH_FINALLY_COUNT = 8;
-    public static final int TRY_WITH_RESOURCES_COUNT = 6;
+    public static final int TRY_WITH_RESOURCES_COUNT = 5;
     public static final int EMPTY_COUNT = 0;
 
     public static void main(String[] args) {
--- a/test/hotspot/jtreg/runtime/RedefineObject/WalkThroughInvoke.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/test/hotspot/jtreg/runtime/RedefineObject/WalkThroughInvoke.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -29,7 +29,7 @@
           SecurityManager sm = new SecurityManager();
           // Walks the stack with Method.invoke in the stack (which is the
           // purpose of the test) before it gets an AccessControlException.
-          sm.checkMemberAccess(b, Member.DECLARED);
+          sm.checkPermission(new RuntimePermission("accessDeclaredMembers"));
       } catch (java.security.AccessControlException e) {
           // Ignoring an 'AccessControlException' exception since
           // it is expected as part of this test.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/java/awt/image/ColorModel/Non_sRGBCMTest.java	Fri Apr 06 03:53:28 2018 +0200
@@ -0,0 +1,152 @@
+/*
+ * Copyright (c) 1999, 2018, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 4278771 8200200
+ * @summary This test verifies that various non-sRGB ColorModels correctly
+ *          convert to and from default sRGB ColorModel pixel values
+ *
+ */
+
+import java.awt.image.*;
+import java.awt.Transparency;
+import java.awt.color.ColorSpace;
+
+public class Non_sRGBCMTest {
+    public static void main(String args[]) {
+        int[] nBits = {8, 8, 8, 8};
+        ColorSpace cs = ColorSpace.getInstance(ColorSpace.CS_CIEXYZ);
+        ComponentColorModel ccm =
+            new ComponentColorModel(cs, nBits, true, true,
+                                    Transparency.TRANSLUCENT,
+                                    DataBuffer.TYPE_BYTE);
+        byte[] pixel = new byte[4];
+        float val = (0.1f - cs.getMinValue(0)) /
+                    (cs.getMaxValue(0) - cs.getMinValue(0));
+        pixel[0] = (byte) ((int) (val * 255.0f));
+        val = (0.2f - cs.getMinValue(1)) /
+              (cs.getMaxValue(1) - cs.getMinValue(1));
+        pixel[1] = (byte) ((int) (val * 255.0f));
+        val = (0.3f - cs.getMinValue(2)) /
+              (cs.getMaxValue(2) - cs.getMinValue(2));
+        pixel[2] = (byte) ((int) (val * 255.0f));
+        pixel[3] = (byte) ((int) (0.4f * 255.0f));
+        // The theoretically correct value for blue, when converting from
+        // the specified XYZ value to sRGB, is 248.  This test allows a
+        // two-bit difference.  This may have to be adjusted over time
+        // to track evolution of the ICC spec, etc.
+        if (Math.abs(ccm.getBlue(pixel) - 248) > 2) {
+            throw new Error("Problem with ComponentColorModel.getBlue()");
+        }
+        ccm = new ComponentColorModel(cs, nBits, true, false,
+                                      Transparency.TRANSLUCENT,
+                                      DataBuffer.TYPE_BYTE);
+        val = ((0.1f / 0.4f) - cs.getMinValue(0)) /
+              (cs.getMaxValue(0) - cs.getMinValue(0));
+        pixel[0] = (byte) ((int) (val * 255.0f));
+        val = ((0.2f / 0.4f) - cs.getMinValue(1)) /
+              (cs.getMaxValue(1) - cs.getMinValue(1));
+        pixel[1] = (byte) ((int) (val * 255.0f));
+        val = ((0.3f / 0.4f) - cs.getMinValue(2)) /
+              (cs.getMaxValue(2) - cs.getMinValue(2));
+        pixel[2] = (byte) ((int) (val * 255.0f));
+        pixel[3] = (byte) ((int) (0.4f * 255.0f));
+        if (Math.abs(ccm.getBlue(pixel) - 248) > 2) {
+            throw new Error("Problem with ComponentColorModel.getBlue()");
+        }
+        int[] nBits3 = {8, 8, 8};
+        ccm = new ComponentColorModel(cs, nBits3, false, false,
+                                      Transparency.TRANSLUCENT,
+                                      DataBuffer.TYPE_BYTE);
+        val = ((0.1f / 0.4f) - cs.getMinValue(0)) /
+              (cs.getMaxValue(0) - cs.getMinValue(0));
+        pixel[0] = (byte) ((int) (val * 255.0f));
+        val = ((0.2f / 0.4f) - cs.getMinValue(1)) /
+              (cs.getMaxValue(1) - cs.getMinValue(1));
+        pixel[1] = (byte) ((int) (val * 255.0f));
+        val = ((0.3f / 0.4f) - cs.getMinValue(2)) /
+              (cs.getMaxValue(2) - cs.getMinValue(2));
+        pixel[2] = (byte) ((int) (val * 255.0f));
+        if (Math.abs(ccm.getBlue(pixel) - 248) > 2) {
+            throw new Error("Problem with ComponentColorModel.getBlue()");
+        }
+
+        DirectColorModel dcm = new DirectColorModel(
+            ColorSpace.getInstance(ColorSpace.CS_LINEAR_RGB), 32,
+            0x00ff0000, 0x0000ff00, 0x000000ff, 0xff000000, true,
+            DataBuffer.TYPE_INT);
+        int[] ipixel = new int[1];
+        ipixel[0] = (127 << 24) | (127 << 16) | (127 << 8) | 127;
+        if (Math.abs(dcm.getBlue(ipixel) - 254) > 1) {
+            throw new Error("Problem with DirectColorModel.getBlue()");
+        }
+        dcm = new DirectColorModel(
+            ColorSpace.getInstance(ColorSpace.CS_LINEAR_RGB), 32,
+            0x00ff0000, 0x0000ff00, 0x000000ff, 0xff000000, false,
+            DataBuffer.TYPE_INT);
+        ipixel[0] = (255 << 24) | (255 << 16) | (255 << 8) | 255;
+        if (Math.abs(dcm.getBlue(ipixel) - 254) > 1) {
+            throw new Error("Problem with DirectColorModel.getBlue()");
+        }
+        dcm = new DirectColorModel(
+            ColorSpace.getInstance(ColorSpace.CS_LINEAR_RGB), 32,
+            0x00ff0000, 0x0000ff00, 0x000000ff, 0x00000000, false,
+            DataBuffer.TYPE_INT);
+        ipixel[0] = (255 << 16) | (255 << 8) | 255;
+        if (Math.abs(dcm.getBlue(ipixel) - 254) > 1) {
+            throw new Error("Problem with DirectColorModel.getBlue()");
+        }
+
+        dcm = new DirectColorModel(
+            ColorSpace.getInstance(ColorSpace.CS_LINEAR_RGB), 32,
+            0x00ff0000, 0x0000ff00, 0x000000ff, 0xff000000, true,
+            DataBuffer.TYPE_INT);
+        ipixel[0] = (127 << 24) | (127 << 16) | (127 << 8) | 127;
+        int i = dcm.getRGB(ipixel);
+        if (Math.abs(((i & 0x00ff0000) >> 16) - 253) > 2) {
+            throw new Error("Problem with DirectColorModel.getRGB()");
+        }
+        int[] idata = (int []) dcm.getDataElements(i, null);
+        if (Math.abs(((idata[0] & 0x00ff0000) >> 16) - 125) > 3) {
+            throw new Error("Problem with DirectColorModel.getDataElements()");
+        }
+
+        ccm = new ComponentColorModel(
+            ColorSpace.getInstance(ColorSpace.CS_LINEAR_RGB), nBits, true,
+            true, Transparency.TRANSLUCENT, DataBuffer.TYPE_BYTE);
+        pixel[0] = 127;
+        pixel[1] = 127;
+        pixel[2] = 127;
+        pixel[3] = 127;
+        i = ccm.getRGB(pixel);
+        if (Math.abs(((i & 0x00ff0000) >> 16) - 253) > 2) {
+            throw new Error("Problem with ComponentColorModel.getRGB()");
+        }
+        byte[] bdata = (byte []) ccm.getDataElements(i, null);
+        if (Math.abs((bdata[0] & 0xff) - 125) > 3) {
+            throw new Error("Problem with" +
+                            "ComponentColorModel.getDataElements()");
+        }
+  }
+}
--- a/test/jdk/java/io/ByteArrayInputStream/ReadAllReadNTransferTo.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/test/jdk/java/io/ByteArrayInputStream/ReadAllReadNTransferTo.java	Fri Apr 06 03:53:28 2018 +0200
@@ -50,8 +50,8 @@
 
         ByteArrayInputStream bais =
             new ByteArrayInputStream(buf, position, size);
-        int off = random.nextInt(size / 2);
-        int len = random.nextInt(size - off);
+        int off = size < 2 ? 0 : random.nextInt(size / 2);
+        int len = size - off < 1 ? 0 : random.nextInt(size - off);
 
         byte[] bN = new byte[off + len];
         if (bais.readNBytes(bN, off, len) != len) {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/java/io/ByteArrayOutputStream/Write.java	Fri Apr 06 03:53:28 2018 +0200
@@ -0,0 +1,142 @@
+/*
+ * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 4017158 8180410
+ * @library /test/lib
+ * @build jdk.test.lib.RandomFactory
+ * @run testng Write
+ * @summary Check for correct implementation of ByteArrayInputStream.write
+ * @key randomness
+ */
+
+import java.io.ByteArrayOutputStream;
+import java.util.Arrays;
+import java.util.Random;
+import jdk.test.lib.RandomFactory;
+import org.testng.annotations.Test;
+import static org.testng.Assert.*;
+
+public class Write {
+    private static void doBoundsTest(byte[] b, int off, int len,
+                                     ByteArrayOutputStream baos)
+        throws Exception {
+        if (b != null) {
+            System.out.println("ByteArrayOutStream.write: b.length = " +
+                               b.length + " off = " + off + " len = " + len);
+        } else{
+            System.out.println("ByteArrayOutStream.write: b is null off = " +
+                               off + " len = " + len);
+        }
+
+        try {
+            baos.write(b, off, len);
+        } catch (IndexOutOfBoundsException e) {
+            System.out.println("IndexOutOfBoundsException is thrown: OKAY");
+        } catch (NullPointerException e) {
+            System.out.println("NullPointerException is thrown: OKAY");
+        } catch (Throwable e){
+            throw new RuntimeException("Unexpected Exception is thrown", e);
+        }
+
+        if (b != null) {
+            System.out.println("ByteArrayOutStream.writeBytes: b.length = " +
+                               b.length);
+        } else{
+            System.out.println("ByteArrayOutStream.writeBytes: b is null");
+        }
+
+        try {
+            baos.writeBytes(b);
+        } catch (NullPointerException e) {
+            System.out.println("NullPointerException is thrown: OKAY");
+        } catch (Throwable e){
+            throw new RuntimeException("Unexpected Exception is thrown", e);
+        }
+    }
+
+    @Test
+    public static void boundsTest() throws Exception {
+        byte array1[] = {1 , 2 , 3 , 4 , 5};     // Simple array
+
+        //Create new ByteArrayOutputStream object
+        ByteArrayOutputStream y1 = new ByteArrayOutputStream(5);
+
+        doBoundsTest(array1, 0, Integer.MAX_VALUE , y1);
+        doBoundsTest(array1, 0, array1.length+100, y1);
+        doBoundsTest(array1, -1, 2, y1);
+        doBoundsTest(array1, 0, -1, y1);
+        doBoundsTest(null, 0, 2, y1);
+    }
+
+    @Test
+    public static void writeTest() throws Exception {
+        ByteArrayOutputStream baos = new ByteArrayOutputStream();
+        Random rnd = RandomFactory.getRandom();
+        final int size = 17 + rnd.nextInt(128);
+
+        byte[] b = new byte[size];
+        rnd.nextBytes(b);
+
+        int off1 = rnd.nextInt(size / 4) + 1;
+        int len1 = Math.min(rnd.nextInt(size / 4) + 1, size - off1);
+        int off2 = rnd.nextInt(size / 2) + 1;
+        int len2 = Math.min(rnd.nextInt(size / 2) + 1, size - off2);
+
+        System.out.format("size: %d, off1: %d, len1: %d, off2: %d, len2: %d%n",
+            size, off1, len1, off2, len2);
+
+        baos.write(b, off1, len1);
+        byte[] b1 = baos.toByteArray();
+        assertEquals(b1.length, len1, "Array length test 1 failed.");
+        assertEquals(b1, Arrays.copyOfRange(b, off1, off1 + len1),
+            "Array equality test 1 failed.");
+
+        baos.write(b, off2, len2);
+        byte[] b2 = baos.toByteArray();
+        assertEquals(b2.length, len1 + len2, "Array length test 2 failed.");
+        assertEquals(Arrays.copyOfRange(b2, 0, len1),
+             Arrays.copyOfRange(b, off1, off1 + len1),
+            "Array equality test 2A failed.");
+        assertEquals(Arrays.copyOfRange(b2, len1, len1 + len2),
+            Arrays.copyOfRange(b, off2, off2 + len2),
+            "Array equality test 2B failed.");
+
+        baos.writeBytes(b);
+        byte[] b3 = baos.toByteArray();
+        int len3 = len1 + len2 + b.length;
+        if (b3.length != len1 + len2 + b.length) {
+            throw new RuntimeException("Array length test 3 failed.");
+        }
+        assertEquals(b3.length, len3, "Array length test 3 failed.");
+        assertEquals(Arrays.copyOfRange(b3, 0, len1),
+             Arrays.copyOfRange(b, off1, off1 + len1),
+            "Array equality test 3A failed.");
+        assertEquals(Arrays.copyOfRange(b3, len1, len1 + len2),
+            Arrays.copyOfRange(b, off2, off2 + len2),
+            "Array equality test 3B failed.");
+        assertEquals(Arrays.copyOfRange(b3, len1 + len2, len3), b,
+            "Array equality test 3C failed.");
+    }
+}
--- a/test/jdk/java/io/ByteArrayOutputStream/WriteBounds.java	Thu Apr 05 11:18:39 2018 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,76 +0,0 @@
-/*
- * Copyright (c) 1997, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/* @test
-   @bug 4017158
-   @summary Check for correct implementation of ByteArrayInputStream.write
-   */
-
-import java.io.*;
-
-
-public class WriteBounds{
-
-    private static void dotest(byte[] b, int off, int len,
-                               ByteArrayOutputStream baos)
-        throws Exception
-    {
-
-        if (b != null) {
-            System.err.println("ByteArrayOutStream.write -- b.length = " +
-                               b.length + " off = " + off + " len = " + len);
-        }
-        else{
-            System.err.println("ByteArrayOutStream.write - b is null off = " +
-                               off + " len = " + len);
-        }
-
-        try {
-            baos.write(b, off, len);
-        } catch (IndexOutOfBoundsException e) {
-            System.err.println("IndexOutOfBoundsException is thrown -- OKAY");
-        } catch (NullPointerException e) {
-            System.err.println("NullPointerException is thrown -- OKAY");
-        } catch (Throwable e){
-            throw new RuntimeException("Unexpected Exception is thrown");
-        }
-
-    }
-
-    public static void main( String argv[] ) throws Exception {
-
-        ByteArrayOutputStream y1;
-        byte array1[]={1 , 2 , 3 , 4 , 5};     // Simple array
-
-        //Create new ByteArrayOutputStream object
-        y1 = new ByteArrayOutputStream(5);
-
-        dotest(array1, 0, Integer.MAX_VALUE , y1);
-        dotest(array1, 0, array1.length+100, y1);
-        dotest(array1, -1, 2, y1);
-        dotest(array1, 0, -1, y1);
-        dotest(null, 0, 2, y1);
-
-    }
-
-}
--- a/test/jdk/java/lang/SecurityManager/DepMethodsRequireAllPerm.java	Thu Apr 05 11:18:39 2018 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,82 +0,0 @@
-/*
- * Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/* @test
- * @bug 8004502 8008793 8029886 8186535
- * @summary Sanity check that the SecurityManager checkMemberAccess method and
- *          methods that used to check AWTPermission now check for AllPermission
- */
-
-import java.security.AllPermission;
-import java.security.Permission;
-
-public class DepMethodsRequireAllPerm {
-
-    static class MySecurityManager extends SecurityManager {
-        final Class<?> expectedClass;
-
-        MySecurityManager(Class<?> c) {
-            expectedClass = c;
-        }
-
-        @Override
-        public void checkPermission(Permission perm) {
-            if (perm.getClass() != expectedClass)
-                throw new RuntimeException("Got: " + perm.getClass() + ", expected: " + expectedClass);
-            super.checkPermission(perm);
-        }
-    }
-
-    public static void main(String[] args) {
-        MySecurityManager sm = new MySecurityManager(AllPermission.class);
-
-        try {
-            sm.checkAwtEventQueueAccess();
-            throw new RuntimeException("SecurityException expected");
-        } catch (SecurityException expected) { }
-
-        try {
-            sm.checkSystemClipboardAccess();
-            throw new RuntimeException("SecurityException expected");
-        } catch (SecurityException expected) { }
-
-        try {
-            sm.checkTopLevelWindow(null);
-            throw new RuntimeException("NullPointException expected");
-        } catch (NullPointerException expected) { }
-
-        if (sm.checkTopLevelWindow(new Object())) {
-            throw new RuntimeException("checkTopLevelWindow expected to return false");
-        }
-
-        try {
-            sm.checkMemberAccess(Object.class, java.lang.reflect.Member.DECLARED);
-            throw new RuntimeException("SecurityException expected");
-        } catch (SecurityException expected) { }
-
-        try {
-            sm.checkMemberAccess(null, java.lang.reflect.Member.DECLARED);
-            throw new RuntimeException("NullPointerException expected");
-        } catch (NullPointerException expected) { }
-    }
-}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/java/lang/SecurityManager/PackageAccessTest.java	Fri Apr 06 03:53:28 2018 +0200
@@ -0,0 +1,98 @@
+/*
+ * Copyright (c) 1999, 2018, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 4256530 4136245
+ * @summary Check that restricted packages that are supposed to be restricted
+ *          and explicit grants accessClassInPackage permission overridden in
+ *          privileged block
+ * @modules java.base/sun.security.x509
+ * @run main/othervm PackageAccessTest
+ * @run main/othervm/java.security.policy=test.policy PackageAccessTest access
+ * @run main/othervm/java.security.policy=empty.policy PackageAccessTest deny
+ */
+
+import java.security.AccessControlException;
+import java.security.AccessController;
+import java.security.PrivilegedExceptionAction;
+
+public class PackageAccessTest {
+
+    public static void main(String[] args) {
+        boolean access = true;
+
+        if (args != null && args.length > 0) {
+            switch (args[0]) {
+                case "access":
+                    access = true;
+                    break;
+                case "deny":
+                    access = false;
+                    break;
+                default:
+                    throw new RuntimeException(
+                            "Invalid input parameter " + args[0]);
+            }
+        }
+
+        testPkgAccess(access);
+        testPkgAccessWithPrivileged(access);
+    }
+
+    private static void testPkgAccess(boolean access) {
+        try {
+            sun.security.x509.X509CertInfo x = new sun.security.x509.X509CertInfo();
+            if (!access) {
+                throw new RuntimeException(
+                        "application unexpectedly able to access the internal package");
+            }
+        } catch (SecurityException se) {
+            if (access) {
+                throw new RuntimeException("Unexpected security exception", se);
+            }
+        }
+    }
+
+    private static void testPkgAccessWithPrivileged(boolean access) {
+        sun.security.x509.X509CertInfo o = null;
+        try {
+            o = (sun.security.x509.X509CertInfo) AccessController.doPrivileged(
+                    (PrivilegedExceptionAction) () -> new sun.security.x509.X509CertInfo());
+            if (!access) {
+                throw new RuntimeException(
+                        "application unexpectedly able to access the internal package");
+            }
+        } catch (AccessControlException ace) {
+            if (access) {
+                throw new RuntimeException("Unexpected AccessControlException", ace);
+            }
+        } catch (Exception ex) {
+            throw new RuntimeException("Test failed with unexpected exception", ex);
+        }
+        if (access && o == null)
+            throw new RuntimeException(
+                    "Test failed: unable to instantiate object");
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/java/lang/SecurityManager/empty.policy	Fri Apr 06 03:53:28 2018 +0200
@@ -0,0 +1,1 @@
+// This is an empty policy
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/java/lang/SecurityManager/test.policy	Fri Apr 06 03:53:28 2018 +0200
@@ -0,0 +1,3 @@
+grant  {
+ permission java.lang.RuntimePermission "accessClassInPackage.sun.security.x509";
+};
--- a/test/jdk/java/lang/String/concat/CompactStringsInitialCoder.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/test/jdk/java/lang/String/concat/CompactStringsInitialCoder.java	Fri Apr 06 03:53:28 2018 +0200
@@ -26,7 +26,7 @@
  * @summary StringConcatFactory MH_INLINE_SIZED_EXACT strategy does not work with -XX:-CompactStrings
  * @bug 8148869
  *
- * @compile -XDstringConcat=indy -source 1.9 -target 1.9 CompactStringsInitialCoder.java
+ * @compile -XDstringConcat=indy CompactStringsInitialCoder.java
  *
  * @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=BC_SB                           -XX:+CompactStrings   CompactStringsInitialCoder
  * @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=BC_SB_SIZED                     -XX:+CompactStrings   CompactStringsInitialCoder
@@ -35,7 +35,7 @@
  * @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=MH_SB_SIZED_EXACT               -XX:+CompactStrings   CompactStringsInitialCoder
  * @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=MH_INLINE_SIZED_EXACT           -XX:+CompactStrings   CompactStringsInitialCoder
  *
- * @compile -XDstringConcat=indyWithConstants -source 1.9 -target 1.9 CompactStringsInitialCoder.java
+ * @compile -XDstringConcat=indyWithConstants CompactStringsInitialCoder.java
  *
  * @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=BC_SB                           -XX:+CompactStrings   CompactStringsInitialCoder
  * @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=BC_SB_SIZED                     -XX:+CompactStrings   CompactStringsInitialCoder
@@ -44,7 +44,7 @@
  * @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=MH_SB_SIZED_EXACT               -XX:+CompactStrings   CompactStringsInitialCoder
  * @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=MH_INLINE_SIZED_EXACT           -XX:+CompactStrings   CompactStringsInitialCoder
  *
- * @compile -XDstringConcat=indy -source 1.9 -target 1.9 CompactStringsInitialCoder.java
+ * @compile -XDstringConcat=indy CompactStringsInitialCoder.java
  *
  * @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=BC_SB                           -XX:-CompactStrings   CompactStringsInitialCoder
  * @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=BC_SB_SIZED                     -XX:-CompactStrings   CompactStringsInitialCoder
@@ -53,7 +53,7 @@
  * @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=MH_SB_SIZED_EXACT               -XX:-CompactStrings   CompactStringsInitialCoder
  * @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=MH_INLINE_SIZED_EXACT           -XX:-CompactStrings   CompactStringsInitialCoder
  *
- * @compile -XDstringConcat=indyWithConstants -source 1.9 -target 1.9 CompactStringsInitialCoder.java
+ * @compile -XDstringConcat=indyWithConstants CompactStringsInitialCoder.java
  *
  * @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=BC_SB                           -XX:-CompactStrings   CompactStringsInitialCoder
  * @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=BC_SB_SIZED                     -XX:-CompactStrings   CompactStringsInitialCoder
--- a/test/jdk/java/lang/String/concat/ImplicitStringConcat.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/test/jdk/java/lang/String/concat/ImplicitStringConcat.java	Fri Apr 06 03:53:28 2018 +0200
@@ -31,7 +31,7 @@
  * @compile -XDstringConcat=inline ImplicitStringConcat.java
  * @run main/othervm -Xverify:all ImplicitStringConcat
  *
- * @compile -XDstringConcat=indy -source 1.9 -target 1.9 ImplicitStringConcat.java
+ * @compile -XDstringConcat=indy ImplicitStringConcat.java
  *
  * @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=BC_SB                                                              ImplicitStringConcat
  * @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=BC_SB_SIZED                                                        ImplicitStringConcat
@@ -61,7 +61,7 @@
  * @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=MH_SB_SIZED_EXACT      -Djava.lang.invoke.stringConcat.debug=true  -Djava.lang.invoke.stringConcat.cache=true  ImplicitStringConcat
  * @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=MH_INLINE_SIZED_EXACT  -Djava.lang.invoke.stringConcat.debug=true  -Djava.lang.invoke.stringConcat.cache=true  ImplicitStringConcat
  *
- * @compile -XDstringConcat=indyWithConstants -source 1.9 -target 1.9 ImplicitStringConcat.java
+ * @compile -XDstringConcat=indyWithConstants ImplicitStringConcat.java
  *
  * @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=BC_SB                                                              ImplicitStringConcat
  * @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=BC_SB_SIZED                                                        ImplicitStringConcat
--- a/test/jdk/java/lang/String/concat/ImplicitStringConcatArgCount.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/test/jdk/java/lang/String/concat/ImplicitStringConcatArgCount.java	Fri Apr 06 03:53:28 2018 +0200
@@ -31,7 +31,7 @@
  * @compile -XDallowStringFolding=false -XDstringConcat=inline ImplicitStringConcatArgCount.java
  * @run main/othervm -Xverify:all ImplicitStringConcatArgCount
  *
- * @compile -XDallowStringFolding=false -XDstringConcat=indy -source 1.9 -target 1.9 ImplicitStringConcatArgCount.java
+ * @compile -XDallowStringFolding=false -XDstringConcat=indy ImplicitStringConcatArgCount.java
  *
  * @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=BC_SB                                                              ImplicitStringConcatArgCount
  * @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=BC_SB_SIZED                                                        ImplicitStringConcatArgCount
@@ -61,7 +61,7 @@
  * @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=MH_SB_SIZED_EXACT      -Djava.lang.invoke.stringConcat.debug=true  -Djava.lang.invoke.stringConcat.cache=true  ImplicitStringConcatArgCount
  * @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=MH_INLINE_SIZED_EXACT  -Djava.lang.invoke.stringConcat.debug=true  -Djava.lang.invoke.stringConcat.cache=true  ImplicitStringConcatArgCount
  *
- * @compile -XDallowStringFolding=false -XDstringConcat=indyWithConstants -source 1.9 -target 1.9 ImplicitStringConcatArgCount.java
+ * @compile -XDallowStringFolding=false -XDstringConcat=indyWithConstants ImplicitStringConcatArgCount.java
  *
  * @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=BC_SB                                                              ImplicitStringConcatArgCount
  * @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=BC_SB_SIZED                                                        ImplicitStringConcatArgCount
--- a/test/jdk/java/lang/String/concat/ImplicitStringConcatBoundaries.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/test/jdk/java/lang/String/concat/ImplicitStringConcatBoundaries.java	Fri Apr 06 03:53:28 2018 +0200
@@ -31,7 +31,7 @@
  * @compile -XDstringConcat=inline ImplicitStringConcatBoundaries.java
  * @run main/othervm -Xverify:all ImplicitStringConcatBoundaries
  *
- * @compile -XDstringConcat=indy -source 1.9 -target 1.9 ImplicitStringConcatBoundaries.java
+ * @compile -XDstringConcat=indy ImplicitStringConcatBoundaries.java
  *
  * @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=BC_SB                                                              ImplicitStringConcatBoundaries
  * @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=BC_SB_SIZED                                                        ImplicitStringConcatBoundaries
@@ -61,7 +61,7 @@
  * @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=MH_SB_SIZED_EXACT      -Djava.lang.invoke.stringConcat.debug=true  -Djava.lang.invoke.stringConcat.cache=true  ImplicitStringConcatBoundaries
  * @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=MH_INLINE_SIZED_EXACT  -Djava.lang.invoke.stringConcat.debug=true  -Djava.lang.invoke.stringConcat.cache=true  ImplicitStringConcatBoundaries
  *
- * @compile -XDstringConcat=indyWithConstants -source 1.9 -target 1.9 ImplicitStringConcatBoundaries.java
+ * @compile -XDstringConcat=indyWithConstants ImplicitStringConcatBoundaries.java
  *
  * @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=BC_SB                                                              ImplicitStringConcatBoundaries
  * @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=BC_SB_SIZED                                                        ImplicitStringConcatBoundaries
--- a/test/jdk/java/lang/String/concat/ImplicitStringConcatMany.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/test/jdk/java/lang/String/concat/ImplicitStringConcatMany.java	Fri Apr 06 03:53:28 2018 +0200
@@ -31,7 +31,7 @@
  * @compile -XDstringConcat=inline ImplicitStringConcatMany.java
  * @run main/othervm -Xverify:all ImplicitStringConcatMany
  *
- * @compile -XDstringConcat=indy -source 1.9 -target 1.9 ImplicitStringConcatMany.java
+ * @compile -XDstringConcat=indy ImplicitStringConcatMany.java
  *
  * @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=BC_SB                                                              ImplicitStringConcatMany
  * @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=BC_SB_SIZED                                                        ImplicitStringConcatMany
@@ -61,7 +61,7 @@
  * @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=MH_SB_SIZED_EXACT      -Djava.lang.invoke.stringConcat.debug=true  -Djava.lang.invoke.stringConcat.cache=true  ImplicitStringConcatMany
  * @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=MH_INLINE_SIZED_EXACT  -Djava.lang.invoke.stringConcat.debug=true  -Djava.lang.invoke.stringConcat.cache=true  ImplicitStringConcatMany
  *
- * @compile -XDstringConcat=indyWithConstants -source 1.9 -target 1.9 ImplicitStringConcatMany.java
+ * @compile -XDstringConcat=indyWithConstants ImplicitStringConcatMany.java
  *
  * @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=BC_SB                                                              ImplicitStringConcatMany
  * @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=BC_SB_SIZED                                                        ImplicitStringConcatMany
--- a/test/jdk/java/lang/String/concat/ImplicitStringConcatManyLongs.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/test/jdk/java/lang/String/concat/ImplicitStringConcatManyLongs.java	Fri Apr 06 03:53:28 2018 +0200
@@ -31,7 +31,7 @@
  * @compile -XDstringConcat=inline ImplicitStringConcatManyLongs.java
  * @run main/othervm -Xverify:all ImplicitStringConcatManyLongs
  *
- * @compile -XDstringConcat=indy -source 1.9 -target 1.9 ImplicitStringConcatManyLongs.java
+ * @compile -XDstringConcat=indy ImplicitStringConcatManyLongs.java
  *
  * @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=BC_SB                                                              ImplicitStringConcatManyLongs
  * @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=BC_SB_SIZED                                                        ImplicitStringConcatManyLongs
@@ -61,7 +61,7 @@
  * @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=MH_SB_SIZED_EXACT      -Djava.lang.invoke.stringConcat.debug=true  -Djava.lang.invoke.stringConcat.cache=true  ImplicitStringConcatManyLongs
  * @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=MH_INLINE_SIZED_EXACT  -Djava.lang.invoke.stringConcat.debug=true  -Djava.lang.invoke.stringConcat.cache=true  ImplicitStringConcatManyLongs
  *
- * @compile -XDstringConcat=indyWithConstants -source 1.9 -target 1.9 ImplicitStringConcatManyLongs.java
+ * @compile -XDstringConcat=indyWithConstants ImplicitStringConcatManyLongs.java
  *
  * @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=BC_SB                                                              ImplicitStringConcatManyLongs
  * @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=BC_SB_SIZED                                                        ImplicitStringConcatManyLongs
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/java/lang/String/concat/ImplicitStringConcatOrder.java	Fri Apr 06 03:53:28 2018 +0200
@@ -0,0 +1,124 @@
+/*
+ * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * @test
+ * @summary Test implicit string concat calls argument conversions in the right order
+ * @bug 8200118
+ *
+ * @compile ImplicitStringConcatOrder.java
+ * @run main/othervm -Xverify:all ImplicitStringConcatOrder
+ *
+ * @compile -XDstringConcat=inline ImplicitStringConcatOrder.java
+ * @run main/othervm -Xverify:all ImplicitStringConcatOrder
+ *
+ * @compile -XDstringConcat=indy ImplicitStringConcatOrder.java
+ *
+ * @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=BC_SB                                                              ImplicitStringConcatOrder
+ * @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=BC_SB_SIZED                                                        ImplicitStringConcatOrder
+ * @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=MH_SB_SIZED                                                        ImplicitStringConcatOrder
+ * @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=BC_SB_SIZED_EXACT                                                  ImplicitStringConcatOrder
+ * @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=MH_SB_SIZED_EXACT                                                  ImplicitStringConcatOrder
+ * @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=MH_INLINE_SIZED_EXACT                                              ImplicitStringConcatOrder
+ *
+ * @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=BC_SB                  -Djava.lang.invoke.stringConcat.debug=true  ImplicitStringConcatOrder
+ * @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=BC_SB_SIZED            -Djava.lang.invoke.stringConcat.debug=true  ImplicitStringConcatOrder
+ * @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=MH_SB_SIZED            -Djava.lang.invoke.stringConcat.debug=true  ImplicitStringConcatOrder
+ * @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=BC_SB_SIZED_EXACT      -Djava.lang.invoke.stringConcat.debug=true  ImplicitStringConcatOrder
+ * @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=MH_SB_SIZED_EXACT      -Djava.lang.invoke.stringConcat.debug=true  ImplicitStringConcatOrder
+ * @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=MH_INLINE_SIZED_EXACT  -Djava.lang.invoke.stringConcat.debug=true  ImplicitStringConcatOrder
+ *
+ * @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=BC_SB                                                              -Djava.lang.invoke.stringConcat.cache=true  ImplicitStringConcatOrder
+ * @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=BC_SB_SIZED                                                        -Djava.lang.invoke.stringConcat.cache=true  ImplicitStringConcatOrder
+ * @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=MH_SB_SIZED                                                        -Djava.lang.invoke.stringConcat.cache=true  ImplicitStringConcatOrder
+ * @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=BC_SB_SIZED_EXACT                                                  -Djava.lang.invoke.stringConcat.cache=true  ImplicitStringConcatOrder
+ * @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=MH_SB_SIZED_EXACT                                                  -Djava.lang.invoke.stringConcat.cache=true  ImplicitStringConcatOrder
+ * @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=MH_INLINE_SIZED_EXACT                                              -Djava.lang.invoke.stringConcat.cache=true  ImplicitStringConcatOrder
+
+ * @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=BC_SB                  -Djava.lang.invoke.stringConcat.debug=true  -Djava.lang.invoke.stringConcat.cache=true  ImplicitStringConcatOrder
+ * @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=BC_SB_SIZED            -Djava.lang.invoke.stringConcat.debug=true  -Djava.lang.invoke.stringConcat.cache=true  ImplicitStringConcatOrder
+ * @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=MH_SB_SIZED            -Djava.lang.invoke.stringConcat.debug=true  -Djava.lang.invoke.stringConcat.cache=true  ImplicitStringConcatOrder
+ * @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=BC_SB_SIZED_EXACT      -Djava.lang.invoke.stringConcat.debug=true  -Djava.lang.invoke.stringConcat.cache=true  ImplicitStringConcatOrder
+ * @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=MH_SB_SIZED_EXACT      -Djava.lang.invoke.stringConcat.debug=true  -Djava.lang.invoke.stringConcat.cache=true  ImplicitStringConcatOrder
+ * @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=MH_INLINE_SIZED_EXACT  -Djava.lang.invoke.stringConcat.debug=true  -Djava.lang.invoke.stringConcat.cache=true  ImplicitStringConcatOrder
+ *
+ * @compile -XDstringConcat=indyWithConstants ImplicitStringConcatOrder.java
+ *
+ * @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=BC_SB                                                              ImplicitStringConcatOrder
+ * @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=BC_SB_SIZED                                                        ImplicitStringConcatOrder
+ * @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=MH_SB_SIZED                                                        ImplicitStringConcatOrder
+ * @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=BC_SB_SIZED_EXACT                                                  ImplicitStringConcatOrder
+ * @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=MH_SB_SIZED_EXACT                                                  ImplicitStringConcatOrder
+ * @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=MH_INLINE_SIZED_EXACT                                              ImplicitStringConcatOrder
+ *
+ * @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=BC_SB                  -Djava.lang.invoke.stringConcat.debug=true  ImplicitStringConcatOrder
+ * @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=BC_SB_SIZED            -Djava.lang.invoke.stringConcat.debug=true  ImplicitStringConcatOrder
+ * @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=MH_SB_SIZED            -Djava.lang.invoke.stringConcat.debug=true  ImplicitStringConcatOrder
+ * @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=BC_SB_SIZED_EXACT      -Djava.lang.invoke.stringConcat.debug=true  ImplicitStringConcatOrder
+ * @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=MH_SB_SIZED_EXACT      -Djava.lang.invoke.stringConcat.debug=true  ImplicitStringConcatOrder
+ * @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=MH_INLINE_SIZED_EXACT  -Djava.lang.invoke.stringConcat.debug=true  ImplicitStringConcatOrder
+ *
+ * @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=BC_SB                                                              -Djava.lang.invoke.stringConcat.cache=true  ImplicitStringConcatOrder
+ * @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=BC_SB_SIZED                                                        -Djava.lang.invoke.stringConcat.cache=true  ImplicitStringConcatOrder
+ * @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=MH_SB_SIZED                                                        -Djava.lang.invoke.stringConcat.cache=true  ImplicitStringConcatOrder
+ * @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=BC_SB_SIZED_EXACT                                                  -Djava.lang.invoke.stringConcat.cache=true  ImplicitStringConcatOrder
+ * @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=MH_SB_SIZED_EXACT                                                  -Djava.lang.invoke.stringConcat.cache=true  ImplicitStringConcatOrder
+ * @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=MH_INLINE_SIZED_EXACT                                              -Djava.lang.invoke.stringConcat.cache=true  ImplicitStringConcatOrder
+ *
+ * @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=BC_SB                  -Djava.lang.invoke.stringConcat.debug=true  -Djava.lang.invoke.stringConcat.cache=true  ImplicitStringConcatOrder
+ * @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=BC_SB_SIZED            -Djava.lang.invoke.stringConcat.debug=true  -Djava.lang.invoke.stringConcat.cache=true  ImplicitStringConcatOrder
+ * @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=MH_SB_SIZED            -Djava.lang.invoke.stringConcat.debug=true  -Djava.lang.invoke.stringConcat.cache=true  ImplicitStringConcatOrder
+ * @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=BC_SB_SIZED_EXACT      -Djava.lang.invoke.stringConcat.debug=true  -Djava.lang.invoke.stringConcat.cache=true  ImplicitStringConcatOrder
+ * @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=MH_SB_SIZED_EXACT      -Djava.lang.invoke.stringConcat.debug=true  -Djava.lang.invoke.stringConcat.cache=true  ImplicitStringConcatOrder
+ * @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=MH_INLINE_SIZED_EXACT  -Djava.lang.invoke.stringConcat.debug=true  -Djava.lang.invoke.stringConcat.cache=true  ImplicitStringConcatOrder
+*/
+import java.lang.StringBuilder;
+
+public class ImplicitStringConcatOrder {
+
+    static MyClass c = new MyClass();
+
+    public static void main(String[] args) throws Exception {
+        test("foo123bar",    "foo" + c + c + c + "bar");
+        test("bazxyz456abc", "baz" + ("xyz" + c + c) + c + "abc");
+        test("caf7eba89be",  "caf" + c + ("eba" + c + c) + "be");
+    }
+
+    public static void test(String expected, String actual) {
+       if (!expected.equals(actual)) {
+           StringBuilder sb = new StringBuilder();
+           sb.append("Expected = ");
+           sb.append(expected);
+           sb.append(", actual = ");
+           sb.append(actual);
+           throw new IllegalStateException(sb.toString());
+       }
+    }
+
+    static class MyClass {
+        int x;
+        public String toString() {
+            return String.valueOf(++x);
+        }
+    }
+}
--- a/test/jdk/java/lang/String/concat/ImplicitStringConcatShapes-head.template	Thu Apr 05 11:18:39 2018 -0700
+++ b/test/jdk/java/lang/String/concat/ImplicitStringConcatShapes-head.template	Fri Apr 06 03:53:28 2018 +0200
@@ -31,7 +31,7 @@
  * @compile -XDstringConcat=inline ImplicitStringConcatShapes.java
  * @run main/othervm -Xverify:all ImplicitStringConcatShapes
  *
- * @compile -XDstringConcat=indy -source 1.9 -target 1.9 ImplicitStringConcatShapes.java
+ * @compile -XDstringConcat=indy ImplicitStringConcatShapes.java
  *
  * @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=BC_SB                                                              ImplicitStringConcatShapes
  * @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=BC_SB_SIZED                                                        ImplicitStringConcatShapes
@@ -61,7 +61,7 @@
  * @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=MH_SB_SIZED_EXACT      -Djava.lang.invoke.stringConcat.debug=true  -Djava.lang.invoke.stringConcat.cache=true  ImplicitStringConcatShapes
  * @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=MH_INLINE_SIZED_EXACT  -Djava.lang.invoke.stringConcat.debug=true  -Djava.lang.invoke.stringConcat.cache=true  ImplicitStringConcatShapes
  *
- * @compile -XDstringConcat=indyWithConstants -source 1.9 -target 1.9 ImplicitStringConcatShapes.java
+ * @compile -XDstringConcat=indyWithConstants ImplicitStringConcatShapes.java
  *
  * @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=BC_SB                                                              ImplicitStringConcatShapes
  * @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=BC_SB_SIZED                                                        ImplicitStringConcatShapes
--- a/test/jdk/java/lang/String/concat/ImplicitStringConcatShapes.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/test/jdk/java/lang/String/concat/ImplicitStringConcatShapes.java	Fri Apr 06 03:53:28 2018 +0200
@@ -31,7 +31,7 @@
  * @compile -XDstringConcat=inline ImplicitStringConcatShapes.java
  * @run main/othervm -Xverify:all ImplicitStringConcatShapes
  *
- * @compile -XDstringConcat=indy -source 1.9 -target 1.9 ImplicitStringConcatShapes.java
+ * @compile -XDstringConcat=indy ImplicitStringConcatShapes.java
  *
  * @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=BC_SB                                                              ImplicitStringConcatShapes
  * @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=BC_SB_SIZED                                                        ImplicitStringConcatShapes
@@ -61,7 +61,7 @@
  * @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=MH_SB_SIZED_EXACT      -Djava.lang.invoke.stringConcat.debug=true  -Djava.lang.invoke.stringConcat.cache=true  ImplicitStringConcatShapes
  * @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=MH_INLINE_SIZED_EXACT  -Djava.lang.invoke.stringConcat.debug=true  -Djava.lang.invoke.stringConcat.cache=true  ImplicitStringConcatShapes
  *
- * @compile -XDstringConcat=indyWithConstants -source 1.9 -target 1.9 ImplicitStringConcatShapes.java
+ * @compile -XDstringConcat=indyWithConstants ImplicitStringConcatShapes.java
  *
  * @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=BC_SB                                                              ImplicitStringConcatShapes
  * @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=BC_SB_SIZED                                                        ImplicitStringConcatShapes
--- a/test/jdk/java/net/ProxySelector/B8035158.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/test/jdk/java/net/ProxySelector/B8035158.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug 8035158 8145732
+ * @bug 8035158 8145732 8144300
  * @run main/othervm B8035158
  */
 
@@ -153,6 +153,8 @@
         t.add(new TestCase("p-proxy.com", "http://p-proxy.com", false));
         t.add(new TestCase("google.co*|google.ie", "http://google.co.uk",
                 false));
+        t.add(new TestCase("*google.*", "http://google.co.uk",
+                false));
 
         t.add(new TestCase("*oracle.com", "http://my.oracle.com", false));
         t.add(new TestCase("google.com|bing.com|yahoo.com", "http://127.0.0.1", false));
--- a/test/jdk/java/net/Socket/AddressTest.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/test/jdk/java/net/Socket/AddressTest.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,8 +24,10 @@
 /*
  * @test
  * @bug 4507501
- * @summary Test various methods that should throw IAE when passed improper SocketAddress
- *
+ * @summary Test various methods that should throw IAE when passed improper
+ *          SocketAddress
+ * @run main AddressTest
+ * @run main/othervm -Djava.net.preferIPv4Stack=true AddressTest
  */
 
 import java.net.*;
--- a/test/jdk/java/net/Socket/B6210227.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/test/jdk/java/net/Socket/B6210227.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,8 @@
  * @test
  * @bug 6210227
  * @summary  REGRESSION: Socket.getLocalAddress() returns address of 0.0.0.0 on outbound TCP
+ * @run main B6210227
+ * @run main/othervm -Djava.net.preferIPv4Stack=true B6210227
  */
 
 import java.util.*;
--- a/test/jdk/java/net/Socket/CloseAvailable.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/test/jdk/java/net/Socket/CloseAvailable.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,8 @@
  * @test
  * @bug 4091859
  * @summary Test Socket.available()
- *
+ * @run main CloseAvailable
+ * @run main/othervm -Djava.net.preferIPv4Stack=true CloseAvailable
  */
 
 import java.net.*;
--- a/test/jdk/java/net/Socket/DeadlockTest.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/test/jdk/java/net/Socket/DeadlockTest.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,8 @@
  * @bug 4176738
  * @summary Make sure a deadlock situation
  *     would not occur
+ * @run main DeadlockTest
+ * @run main/othervm -Djava.net.preferIPv4Stack=true DeadlockTest
  */
 
 import java.net.*;
--- a/test/jdk/java/net/Socket/HttpProxy.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/test/jdk/java/net/Socket/HttpProxy.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,8 @@
  * @bug 6370908
  * @summary Add support for HTTP_CONNECT proxy in Socket class
  * @modules java.base/sun.net.www
+ * @run main HttpProxy
+ * @run main/othervm -Djava.net.preferIPv4Stack=true HttpProxy
  */
 
 import java.io.IOException;
--- a/test/jdk/java/net/Socket/InheritHandle.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/test/jdk/java/net/Socket/InheritHandle.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -22,9 +22,11 @@
  */
 
 /* @test
-   @bug  6598160
-   @summary Windows IPv6 Socket implementation doesn't set the handle to not inherit
-   @author Chris Hegarty
+ * @bug  6598160
+ * @summary Windows IPv6 Socket implementation doesn't set the handle to not inherit
+ * @author Chris Hegarty
+ * @run main InheritHandle
+ * @run main/othervm -Djava.net.preferIPv4Stack=true InheritHandle
  */
 
 import java.net.BindException;
--- a/test/jdk/java/net/Socket/InheritTimeout.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/test/jdk/java/net/Socket/InheritTimeout.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2002, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,8 @@
  * @bug 4508149
  * @summary Setting ServerSocket.setSoTimeout shouldn't cause
  *          the timeout to be inherited by accepted connections
+ * @run main InheritTimeout
+ * @run main/othervm -Djava.net.preferIPv4Stack=true InheritTimeout
  */
 
 import java.net.*;
--- a/test/jdk/java/net/Socket/LingerTest.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/test/jdk/java/net/Socket/LingerTest.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,8 @@
  * @test
  * @bug 4796166
  * @summary Linger interval delays usage of released file descriptor
+ * @run main LingerTest
+ * @run main/othervm -Djava.net.preferIPv4Stack=true LingerTest
  */
 
 import java.net.*;
--- a/test/jdk/java/net/Socket/LinkLocal.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/test/jdk/java/net/Socket/LinkLocal.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -30,6 +30,7 @@
  * @build jdk.test.lib.NetworkConfiguration
  *        jdk.test.lib.Platform
  * @run main LinkLocal
+ * @run main/othervm -Djava.net.preferIPv4Stack=true LinkLocal
  */
 
 import jdk.test.lib.NetworkConfiguration;
--- a/test/jdk/java/net/Socket/ProxyCons.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/test/jdk/java/net/Socket/ProxyCons.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,7 @@
  * @bug 4097826
  * @summary SOCKS support inadequate
  * @run main/timeout=40/othervm -DsocksProxyHost=nonexistant ProxyCons
+ * @run main/timeout=40/othervm -DsocksProxyHost=nonexistant -Djava.net.preferIPv4Stack=true ProxyCons
  */
 
 import java.net.*;
--- a/test/jdk/java/net/Socket/RST.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/test/jdk/java/net/Socket/RST.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,6 +24,8 @@
 /*
  * @bug 4468997
  * @summary SO_LINGER is ignored on Windows with Winsock 2
+ * @run main RST
+ * @run main/othervm -Djava.net.preferIPv4Stack=true RST
  */
 import java.net.*;
 import java.io.*;
--- a/test/jdk/java/net/Socket/ReadTimeout.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/test/jdk/java/net/Socket/ReadTimeout.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,7 @@
  * @bug 4169831
  * @summary test timeout on a socket read
  * @run main/timeout=15 ReadTimeout
+ * @run main/othervm/timeout=15 -Djava.net.preferIPv4Stack=true ReadTimeout
  */
 
 import java.net.*;
--- a/test/jdk/java/net/Socket/SetSoLinger.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/test/jdk/java/net/Socket/SetSoLinger.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,8 @@
  * @test
  * @bug 4151834
  * @summary Test Socket.setSoLinger
- *
+ * @run main SetSoLinger
+ * @run main/othervm -Djava.net.preferIPv4Stack=true SetSoLinger
  */
 
 import java.net.*;
--- a/test/jdk/java/net/Socket/ShutdownInput.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/test/jdk/java/net/Socket/ShutdownInput.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,8 @@
  * @bug 7014860
  * @summary Socket.getInputStream().available() not clear for
  *          case that connection is shutdown for reading
+ * @run main ShutdownInput
+ * @run main/othervm -Djava.net.preferIPv4Stack=true ShutdownInput
  */
 
 import java.io.InputStream;
--- a/test/jdk/java/net/Socket/SocksConnectTimeout.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/test/jdk/java/net/Socket/SocksConnectTimeout.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,8 @@
  * @test
  * @bug 6223635
  * @summary Code hangs at connect call even when Timeout is specified
+ * @run main SocksConnectTimeout
+ * @run main/othervm -Djava.net.preferIPv4Stack=true SocksConnectTimeout
  */
 
 import java.net.InetAddress;
--- a/test/jdk/java/net/Socket/TestAfterClose.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/test/jdk/java/net/Socket/TestAfterClose.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,7 +24,10 @@
 /*
  * @test
  * @bug 6505016
- * @summary Socket spec should clarify what getInetAddress/getPort/etc return after the Socket is closed
+ * @summary Socket spec should clarify what getInetAddress/getPort/etc return
+ *          after the Socket is closed
+ * @run main TestAfterClose
+ * @run main/othervm -Djava.net.preferIPv4Stack=true TestAfterClose
  */
 
 import java.net.*;
--- a/test/jdk/java/net/Socket/TestClose.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/test/jdk/java/net/Socket/TestClose.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -22,11 +22,12 @@
  */
 /*
  * @test
- *
  * @bug 4408755
- *
- * @summary This tests wether it's possible to get some informations
- * out of a closed socket. This is for backward compatibility purposes.
+ * @summary This tests whether it's possible to get some informations
+ *          out of a closed socket. This is for backward compatibility
+ *          purposes.
+ * @run main TestClose
+ * @run main/othervm -Djava.net.preferIPv4Stack=true TestClose
  */
 
 import java.net.*;
--- a/test/jdk/java/net/Socket/TestTcpNoDelay.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/test/jdk/java/net/Socket/TestTcpNoDelay.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006, 2007, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,8 @@
  * @test
  * @bug 6404388
  * @summary VISTA: Socket setTcpNoDelay & setKeepAlive working incorrectly
+ * @run main TestTcpNoDelay
+ * @run main/othervm -Djava.net.preferIPv4Stack=true TestTcpNoDelay
  */
 
 import java.net.*;
--- a/test/jdk/java/net/Socket/Timeout.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/test/jdk/java/net/Socket/Timeout.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,7 @@
  * @bug 4163126
  * @summary  test to see if timeout hangs
  * @run main/timeout=15 Timeout
+ * @run main/othervm/timeout=15 -Djava.net.preferIPv4Stack=true Timeout
  */
 import java.net.*;
 import java.io.*;
--- a/test/jdk/java/net/Socket/TrafficClass.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/test/jdk/java/net/Socket/TrafficClass.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,8 @@
  * @bug 4511783
  * @summary Test that setTrafficClass/getTraffiClass don't
  *          throw an exception
+ * @run main TrafficClass
+ * @run main/othervm -Djava.net.preferIPv4Stack=true TrafficClass
  */
 import java.net.*;
 import java.nio.*;
--- a/test/jdk/java/net/Socket/UrgentDataTest.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/test/jdk/java/net/Socket/UrgentDataTest.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,8 @@
  * @test
  * @bug 4092038
  * @summary TCP Urgent data support
- *
+ * @run main UrgentDataTest
+ * @run main/othervm -Djava.net.preferIPv4Stack=true UrgentDataTest
  */
 
 import java.net.*;
--- a/test/jdk/java/net/Socket/asyncClose/AsyncClose.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/test/jdk/java/net/Socket/asyncClose/AsyncClose.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -31,6 +31,8 @@
  * @bug 4344135
  * @summary Check that {Socket,ServerSocket,DatagramSocket}.close will
  *          cause any thread blocked on the socket to throw a SocketException.
+ * @run main AsyncClose
+ * @run main/othervm -Djava.net.preferIPv4Stack=true AsyncClose
  */
 
 public class AsyncClose {
--- a/test/jdk/java/net/Socket/asyncClose/BrokenPipe.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/test/jdk/java/net/Socket/asyncClose/BrokenPipe.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -22,10 +22,12 @@
  */
 
 /*
- * @test 1.1 01/09/19
+ * @test
  * @bug 4511404
  * @summary Check that a broken pipe error doesn't throw an exception
  *          indicating the socket is closed.
+ * @run main BrokenPipe
+ * @run main/othervm -Djava.net.preferIPv4Stack=true BrokenPipe
  */
 import java.io.*;
 import java.net.*;
--- a/test/jdk/java/net/Socket/setReuseAddress/Basic.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/test/jdk/java/net/Socket/setReuseAddress/Basic.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,8 @@
  * method.
  * @run main Basic
  * @run main/othervm -Dsun.net.useExclusiveBind Basic
+ * @run main/othervm -Djava.net.preferIPv4Stack=true Basic
+ * @run main/othervm -Dsun.net.useExclusiveBind -Djava.net.preferIPv4Stack=true Basic
  */
 import java.net.*;
 
--- a/test/jdk/java/net/Socket/setReuseAddress/Restart.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/test/jdk/java/net/Socket/setReuseAddress/Restart.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,8 @@
  *          after a crash.
  * @run main Restart
  * @run main/othervm -Dsun.net.useExclusiveBind Restart
+ * @run main/othervm -Djava.net.preferIPv4Stack=true Restart
+ * @run main/othervm -Dsun.net.useExclusiveBind -Djava.net.preferIPv4Stack=true Restart
  */
 import java.net.*;
 
--- a/test/jdk/java/net/SocketInputStream/SocketClosedException.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/test/jdk/java/net/SocketInputStream/SocketClosedException.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,8 @@
  * @bug 4681556
  * @summary Wrong text if a read is performed on a socket after it
  *      has been closed
+ * @run main SocketClosedException
+ * @run main/othervm -Djava.net.preferIPv4Stack=true SocketClosedException
  */
 
 import java.io.*;
--- a/test/jdk/java/net/SocketInputStream/SocketTimeout.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/test/jdk/java/net/SocketInputStream/SocketTimeout.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,8 @@
  * @test
  * @bug 4158021
  * @summary cannot distinguish Thread.interrupt and Socket.setSoTimeout exceptions
+ * @run main SocketTimeout
+ * @run main/othervm -Djava.net.preferIPv4Stack=true SocketTimeout
  */
 
 import java.net.*;
--- a/test/jdk/java/net/SocketOption/ImmutableOptions.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/test/jdk/java/net/SocketOption/ImmutableOptions.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,8 +24,9 @@
  /*
  * @test
  * @bug 8148609
+ * @summary Assert that the set of socket options are immutable
  * @run testng/othervm ImmutableOptions
- * @summary Assert that the set of socket options are immutable
+ * @run testng/othervm -Djava.net.preferIPv4Stack=true ImmutableOptions
  */
 import java.io.IOException;
 import java.io.InputStream;
--- a/test/jdk/java/net/SocketOption/MinimumRcvBufferSize.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/test/jdk/java/net/SocketOption/MinimumRcvBufferSize.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
  * @test
  * @bug 8170920
  * @run main MinimumRcvBufferSize
+ * @run main/othervm -Djava.net.preferIPv4Stack=true MinimumRcvBufferSize
  */
 
 import java.nio.channels.*;
--- a/test/jdk/java/net/SocketOption/SupportedOptionsSet.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/test/jdk/java/net/SocketOption/SupportedOptionsSet.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -32,6 +32,8 @@
  * @summary java.net socket supportedOptions set depends on call order
  * @run main/othervm SupportedOptionsSet first
  * @run main/othervm SupportedOptionsSet second
+ * @run main/othervm -Djava.net.preferIPv4Stack=true SupportedOptionsSet first
+ * @run main/othervm -Djava.net.preferIPv4Stack=true SupportedOptionsSet second
  */
 
 // Run with othervm as the implementation of the supported options sets, once
--- a/test/jdk/java/net/SocketOption/UnsupportedOptionsTest.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/test/jdk/java/net/SocketOption/UnsupportedOptionsTest.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -31,9 +31,10 @@
  * @test
  * @bug 8143554 8044773
  * @summary Test checks that UnsupportedOperationException for unsupported
- * SOCKET_OPTIONS is thrown by both getOption() and setOption() methods.
+ *          SOCKET_OPTIONS is thrown by both getOption() and setOption() methods.
  * @requires !vm.graal.enabled
  * @run main UnsupportedOptionsTest
+ * @run main/othervm -Djava.net.preferIPv4Stack=true UnsupportedOptionsTest
  * @run main/othervm --limit-modules=java.base UnsupportedOptionsTest
  */
 
--- a/test/jdk/java/nio/charset/StandardCharsets/Standard.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/test/jdk/java/nio/charset/StandardCharsets/Standard.java	Fri Apr 06 03:53:28 2018 +0200
@@ -58,6 +58,13 @@
         check("UTF-16LE".equals(StandardCharsets.UTF_16LE.name()));
         check("UTF-16".equals(StandardCharsets.UTF_16.name()));
 
+        check(Charset.forName("US-ASCII") == StandardCharsets.US_ASCII);
+        check(Charset.forName("ISO-8859-1") == StandardCharsets.ISO_8859_1);
+        check(Charset.forName("UTF-8") == StandardCharsets.UTF_8);
+        check(Charset.forName("UTF-16BE") == StandardCharsets.UTF_16BE);
+        check(Charset.forName("UTF-16LE") == StandardCharsets.UTF_16LE);
+        check(Charset.forName("UTF-16") == StandardCharsets.UTF_16);
+
         Set<String> charsets = new HashSet<>();
         Field standardCharsetFields[] = StandardCharsets.class.getFields();
 
--- a/test/jdk/java/security/Signature/SignatureLength.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/test/jdk/java/security/Signature/SignatureLength.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug 8161571
+ * @bug 8161571 8178370
  * @summary Reject signatures presented for verification that contain extra
  *          bytes.
  * @modules jdk.crypto.ec
@@ -32,42 +32,71 @@
 
 import java.security.KeyPair;
 import java.security.KeyPairGenerator;
+import java.security.NoSuchAlgorithmException;
+import java.security.Provider;
+import java.security.Security;
 import java.security.Signature;
 import java.security.SignatureException;
 
 public class SignatureLength {
 
     public static void main(String[] args) throws Exception {
-        main0("EC", 256, "SHA256withECDSA", "SunEC");
-        main0("RSA", 2048, "SHA256withRSA", "SunRsaSign");
-        main0("DSA", 2048, "SHA256withDSA", "SUN");
+        for (Provider p0 : Security.getProviders()) {
+            for (Provider p1 : Security.getProviders()) {
+                for (Provider p2 : Security.getProviders()) {
+                    // SunMSCAPI signer can only be initialized with
+                    // a key generated with SunMSCAPI
+                    if (!p0.getName().equals("SunMSCAPI")
+                            && p1.getName().equals("SunMSCAPI")) continue;
 
-        if (System.getProperty("os.name").equals("SunOS")) {
-            main0("EC", 256, "SHA256withECDSA", null);
-            main0("RSA", 2048, "SHA256withRSA", null);
+                    // SunMSCAPI generated key can only be signed
+                    // with SunMSCAPI signer
+                    if (p0.getName().equals("SunMSCAPI")
+                            && !p1.getName().equals("SunMSCAPI")) continue;
+
+                    // SunMSCAPI and SunPKCS11 verifiers may return false
+                    // instead of throwing SignatureException
+                    boolean mayNotThrow = p2.getName().equals("SunMSCAPI")
+                            || p2.getName().startsWith("SunPKCS11");
+
+                    main0("EC", 256, "SHA256withECDSA", p0, p1, p2, mayNotThrow);
+                    main0("RSA", 2048, "SHA256withRSA", p0, p1, p2, mayNotThrow);
+                    main0("DSA", 2048, "SHA256withDSA", p0, p1, p2, mayNotThrow);
+                }
+            }
         }
     }
 
     private static void main0(String keyAlgorithm, int keysize,
-            String signatureAlgorithm, String provider) throws Exception {
+            String signatureAlgorithm, Provider generatorProvider,
+            Provider signerProvider, Provider verifierProvider,
+            boolean mayNotThrow) throws Exception {
+
+        KeyPairGenerator generator;
+        Signature signer;
+        Signature verifier;
+
+        try {
+            generator = KeyPairGenerator.getInstance(keyAlgorithm,
+                    generatorProvider);
+            signer = Signature.getInstance(signatureAlgorithm,
+                    signerProvider);
+            verifier = Signature.getInstance(signatureAlgorithm,
+                    verifierProvider);
+        } catch (NoSuchAlgorithmException nsae) {
+            // ignore this set of providers
+            return;
+        }
+
         byte[] plaintext = "aaa".getBytes("UTF-8");
 
         // Generate
-        KeyPairGenerator generator =
-            provider == null ?
-                (KeyPairGenerator) KeyPairGenerator.getInstance(keyAlgorithm) :
-                (KeyPairGenerator) KeyPairGenerator.getInstance(
-                                       keyAlgorithm, provider);
         generator.initialize(keysize);
         System.out.println("Generating " + keyAlgorithm + " keypair using " +
             generator.getProvider().getName() + " JCE provider");
         KeyPair keypair = generator.generateKeyPair();
 
         // Sign
-        Signature signer =
-            provider == null ?
-                Signature.getInstance(signatureAlgorithm) :
-                Signature.getInstance(signatureAlgorithm, provider);
         signer.initSign(keypair.getPrivate());
         signer.update(plaintext);
         System.out.println("Signing using " + signer.getProvider().getName() +
@@ -85,19 +114,26 @@
         badSignature[signature.length + 4] = 0x01;
 
         // Verify
-        Signature verifier =
-            provider == null ?
-                Signature.getInstance(signatureAlgorithm) :
-                Signature.getInstance(signatureAlgorithm, provider);
         verifier.initVerify(keypair.getPublic());
         verifier.update(plaintext);
         System.out.println("Verifying using " +
             verifier.getProvider().getName() + " JCE provider");
 
         try {
-            System.out.println("Valid? " + verifier.verify(badSignature));
-            throw new Exception(
-                "ERROR: expected a SignatureException but none was thrown");
+            boolean valid = verifier.verify(badSignature);
+            System.out.println("Valid? " + valid);
+            if (mayNotThrow) {
+                if (valid) {
+                    throw new Exception(
+                        "ERROR: expected a SignatureException but none was thrown"
+                        + " and invalid signature was verified");
+                } else {
+                    System.out.println("OK: verification failed as expected");
+                }
+            } else {
+                throw new Exception(
+                    "ERROR: expected a SignatureException but none was thrown");
+            }
         } catch (SignatureException e) {
             System.out.println("OK: caught expected exception: " + e);
         }
--- a/test/jdk/java/util/Optional/Basic.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/test/jdk/java/util/Optional/Basic.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -22,350 +22,182 @@
  */
 
 /* @test
+ * @bug 8195649
  * @summary Basic functional test of Optional
  * @author Mike Duigou
+ * @build ObscureException
  * @run testng Basic
  */
 
-import java.lang.AssertionError;
-import java.lang.NullPointerException;
-import java.lang.Throwable;
+import java.util.List;
 import java.util.NoSuchElementException;
 import java.util.Optional;
 import java.util.concurrent.atomic.AtomicBoolean;
-import java.util.stream.Stream;
+
+import static java.util.stream.Collectors.toList;
 
 import static org.testng.Assert.*;
 import org.testng.annotations.Test;
 
-
 public class Basic {
 
-    @Test(groups = "unit")
-    public void testEmpty() {
-        Optional<Boolean> empty = Optional.empty();
-        Optional<String> presentEmptyString = Optional.of("");
-        Optional<Boolean> present = Optional.of(Boolean.TRUE);
+    /**
+     * Checks a block of assertions over an empty Optional.
+     */
+    void checkEmpty(Optional<String> empty) {
+        assertTrue(empty.equals(Optional.empty()));
+        assertTrue(Optional.empty().equals(empty));
+        assertFalse(empty.equals(Optional.of("unexpected")));
+        assertFalse(Optional.of("unexpected").equals(empty));
+        assertFalse(empty.equals("unexpected"));
+
+        assertFalse(empty.isPresent());
+        assertEquals(empty.hashCode(), 0);
+        assertEquals(empty.orElse("x"), "x");
+        assertEquals(empty.orElseGet(() -> "y"), "y");
 
-        // empty
-        assertTrue(empty.equals(empty));
-        assertTrue(empty.equals(Optional.empty()));
-        assertTrue(!empty.equals(present));
-        assertTrue(0 == empty.hashCode());
-        assertTrue(!empty.toString().isEmpty());
-        assertTrue(!empty.toString().equals(presentEmptyString.toString()));
-        assertTrue(!empty.isPresent());
+        assertThrows(NoSuchElementException.class, () -> empty.get());
+        assertThrows(NoSuchElementException.class, () -> empty.orElseThrow());
+        assertThrows(ObscureException.class,       () -> empty.orElseThrow(ObscureException::new));
+
+        var b = new AtomicBoolean();
+        empty.ifPresent(s -> b.set(true));
+        assertFalse(b.get());
 
-        empty.ifPresent(v -> fail());
+        var b1 = new AtomicBoolean(false);
+        var b2 = new AtomicBoolean(false);
+        empty.ifPresentOrElse(s -> b1.set(true), () -> b2.set(true));
+        assertFalse(b1.get());
+        assertTrue(b2.get());
+
+        assertEquals(empty.toString(), "Optional.empty");
+    }
 
-        AtomicBoolean emptyCheck = new AtomicBoolean();
-        empty.ifPresentOrElse(v -> fail(), () -> emptyCheck.set(true));
-        assertTrue(emptyCheck.get());
+    /**
+     * Checks a block of assertions over an Optional that is expected to
+     * have a particular value present.
+     */
+    void checkPresent(Optional<String> opt, String expected) {
+        assertFalse(opt.equals(Optional.empty()));
+        assertFalse(Optional.empty().equals(opt));
+        assertTrue(opt.equals(Optional.of(expected)));
+        assertTrue(Optional.of(expected).equals(opt));
+        assertFalse(opt.equals(Optional.of("unexpected")));
+        assertFalse(Optional.of("unexpected").equals(opt));
+        assertFalse(opt.equals("unexpected"));
 
-        try {
-            empty.ifPresentOrElse(v -> fail(), () -> { throw new ObscureException(); });
-            fail();
-        } catch (ObscureException expected) {
-        } catch (AssertionError e) {
-            throw e;
-        } catch (Throwable t) {
-            fail();
-        }
+        assertTrue(opt.isPresent());
+        assertEquals(opt.hashCode(), expected.hashCode());
+        assertEquals(opt.orElse("unexpected"), expected);
+        assertEquals(opt.orElseGet(() -> "unexpected"), expected);
+
+        assertEquals(opt.get(), expected);
+        assertEquals(opt.orElseThrow(), expected);
+        assertEquals(opt.orElseThrow(ObscureException::new), expected);
 
-        assertSame(null, empty.orElse(null));
-        RuntimeException orElse = new RuntimeException() { };
-        assertSame(Boolean.FALSE, empty.orElse(Boolean.FALSE));
-        assertSame(null, empty.orElseGet(() -> null));
-        assertSame(Boolean.FALSE, empty.orElseGet(() -> Boolean.FALSE));
+        var b = new AtomicBoolean(false);
+        opt.ifPresent(s -> b.set(true));
+        assertTrue(b.get());
+
+        var b1 = new AtomicBoolean(false);
+        var b2 = new AtomicBoolean(false);
+        opt.ifPresentOrElse(s -> b1.set(true), () -> b2.set(true));
+        assertTrue(b1.get());
+        assertFalse(b2.get());
+
+        assertEquals(opt.toString(), "Optional[" + expected + "]");
     }
 
     @Test(groups = "unit")
-    public void testIfPresentAndOrElseAndNull() {
-        Optional<Boolean> empty = Optional.empty();
-        Optional<Boolean> present = Optional.of(Boolean.TRUE);
-
-        // No NPE
-        present.ifPresentOrElse(v -> {}, null);
-        empty.ifPresent(null);
-        empty.ifPresentOrElse(null, () -> {});
-
-        // NPE
-        try {
-            present.ifPresent(null);
-            fail();
-        } catch (NullPointerException ex) {}
-        try {
-            present.ifPresentOrElse(null, () -> {});
-            fail();
-        } catch (NullPointerException ex) {}
-        try {
-            empty.ifPresentOrElse(v -> {}, null);
-            fail();
-        } catch (NullPointerException ex) {}
-    }
-
-    @Test(expectedExceptions=NoSuchElementException.class)
-    public void testEmptyGet() {
-        Optional<Boolean> empty = Optional.empty();
-
-        Boolean got = empty.get();
-    }
-
-    @Test(expectedExceptions=NullPointerException.class)
-    public void testEmptyOrElseGetNull() {
-        Optional<Boolean> empty = Optional.empty();
-
-        Boolean got = empty.orElseGet(null);
-    }
-
-    @Test(expectedExceptions=NullPointerException.class)
-    public void testEmptyOrElseThrowNull() throws Throwable {
-        Optional<Boolean> empty = Optional.empty();
-
-        Boolean got = empty.orElseThrow(null);
-    }
-
-    @Test(expectedExceptions=ObscureException.class)
-    public void testEmptyOrElseThrow() throws Exception {
-        Optional<Boolean> empty = Optional.empty();
-
-        Boolean got = empty.orElseThrow(ObscureException::new);
-    }
-
-    @Test(expectedExceptions=NoSuchElementException.class)
-    public void testEmptyOrElseThrowNoArg() throws Exception {
-        Optional<Boolean> empty = Optional.empty();
-
-        Boolean got = empty.orElseThrow();
+    public void testEmpty() {
+        checkEmpty(Optional.empty());
     }
 
     @Test(groups = "unit")
-    public void testPresent() {
-        Optional<Boolean> empty = Optional.empty();
-        Optional<String> presentEmptyString = Optional.of("");
-        Optional<Boolean> present = Optional.of(Boolean.TRUE);
-
-        // present
-        assertTrue(present.equals(present));
-        assertTrue(present.equals(Optional.of(Boolean.TRUE)));
-        assertTrue(!present.equals(empty));
-        assertTrue(Boolean.TRUE.hashCode() == present.hashCode());
-        assertTrue(!present.toString().isEmpty());
-        assertTrue(!present.toString().equals(presentEmptyString.toString()));
-        assertTrue(-1 != present.toString().indexOf(Boolean.TRUE.toString()));
-        assertSame(Boolean.TRUE, present.get());
-        assertSame(Boolean.TRUE, present.orElseThrow());
-
-        AtomicBoolean presentCheck = new AtomicBoolean();
-        present.ifPresent(v -> presentCheck.set(true));
-        assertTrue(presentCheck.get());
-        presentCheck.set(false);
-        present.ifPresentOrElse(v -> presentCheck.set(true), () -> fail());
-        assertTrue(presentCheck.get());
-
-        try {
-            present.ifPresent(v -> { throw new ObscureException(); });
-            fail();
-        } catch (ObscureException expected) {
-        } catch (AssertionError e) {
-            throw e;
-        } catch (Throwable t) {
-            fail();
-        }
-        try {
-            present.ifPresentOrElse(v -> { throw new ObscureException(); }, () -> fail());
-            fail();
-        } catch (ObscureException expected) {
-        } catch (AssertionError e) {
-            throw e;
-        } catch (Throwable t) {
-            fail();
-        }
-
-        assertSame(Boolean.TRUE, present.orElse(null));
-        assertSame(Boolean.TRUE, present.orElse(Boolean.FALSE));
-        assertSame(Boolean.TRUE, present.orElseGet(null));
-        assertSame(Boolean.TRUE, present.orElseGet(() -> null));
-        assertSame(Boolean.TRUE, present.orElseGet(() -> Boolean.FALSE));
-        assertSame(Boolean.TRUE, present.<RuntimeException>orElseThrow(null));
-        assertSame(Boolean.TRUE, present.<RuntimeException>orElseThrow(ObscureException::new));
-    }
-
-    @Test(groups = "unit")
-    public void testOfNullable() {
-        Optional<String> instance = Optional.ofNullable(null);
-        assertFalse(instance.isPresent());
-
-        instance = Optional.ofNullable("Duke");
-        assertTrue(instance.isPresent());
-        assertEquals(instance.get(), "Duke");
-        assertEquals(instance.orElseThrow(), "Duke");
+    public void testOfNull() {
+        assertThrows(NullPointerException.class, () -> Optional.of(null));
     }
 
     @Test(groups = "unit")
-    public void testFilter() {
-        // Null mapper function
-        Optional<String> empty = Optional.empty();
-        Optional<String> duke = Optional.of("Duke");
-
-        try {
-            Optional<String> result = empty.filter(null);
-            fail("Should throw NPE on null mapping function");
-        } catch (NullPointerException npe) {
-            // expected
-        }
+    public void testOfPresent() {
+        checkPresent(Optional.of("xyzzy"), "xyzzy");
+    }
 
-        Optional<String> result = empty.filter(String::isEmpty);
-        assertFalse(result.isPresent());
+    @Test(groups = "unit")
+    public void testOfNullableNull() {
+        checkEmpty(Optional.ofNullable(null));
+    }
 
-        result = duke.filter(String::isEmpty);
-        assertFalse(result.isPresent());
-        result = duke.filter(s -> s.startsWith("D"));
-        assertTrue(result.isPresent());
-        assertEquals(result.get(), "Duke");
-        assertEquals(result.orElseThrow(), "Duke");
-
-        Optional<String> emptyString = Optional.of("");
-        result = emptyString.filter(String::isEmpty);
-        assertTrue(result.isPresent());
-        assertEquals(result.get(), "");
-        assertEquals(result.orElseThrow(), "");
+    @Test(groups = "unit")
+    public void testOfNullablePresent() {
+        checkPresent(Optional.ofNullable("xyzzy"), "xyzzy");
     }
 
     @Test(groups = "unit")
-    public void testMap() {
-        Optional<String> empty = Optional.empty();
-        Optional<String> duke = Optional.of("Duke");
+    public void testFilterEmpty() {
+        checkEmpty(Optional.<String>empty().filter(s -> { fail(); return true; }));
+    }
 
-        // Null mapper function
-        try {
-            Optional<Boolean> b = empty.map(null);
-            fail("Should throw NPE on null mapping function");
-        } catch (NullPointerException npe) {
-            // expected
-        }
+    @Test(groups = "unit")
+    public void testFilterFalse() {
+        checkEmpty(Optional.of("xyzzy").filter(s -> s.equals("plugh")));
+    }
 
-        // Map an empty value
-        Optional<Boolean> b = empty.map(String::isEmpty);
-        assertFalse(b.isPresent());
+    @Test(groups = "unit")
+    public void testFilterTrue() {
+        checkPresent(Optional.of("xyzzy").filter(s -> s.equals("xyzzy")), "xyzzy");
+    }
 
-        // Map into null
-        b = empty.map(n -> null);
-        assertFalse(b.isPresent());
-        b = duke.map(s -> null);
-        assertFalse(b.isPresent());
+    @Test(groups = "unit")
+    public void testMapEmpty() {
+        checkEmpty(Optional.empty().map(s -> { fail(); return ""; }));
+    }
 
-        // Map to value
-        Optional<Integer> l = duke.map(String::length);
-        assertEquals(l.get().intValue(), 4);
+    @Test(groups = "unit")
+    public void testMapPresent() {
+        checkPresent(Optional.of("xyzzy").map(s -> s.replace("xyzzy", "plugh")), "plugh");
     }
 
     @Test(groups = "unit")
-    public void testFlatMap() {
-        Optional<String> empty = Optional.empty();
-        Optional<String> duke = Optional.of("Duke");
-
-        // Null mapper function
-        try {
-            Optional<Boolean> b = empty.flatMap(null);
-            fail("Should throw NPE on null mapping function");
-        } catch (NullPointerException npe) {
-            // expected
-        }
-
-        // Map into null
-        try {
-            Optional<Boolean> b = duke.flatMap(s -> null);
-            fail("Should throw NPE when mapper return null");
-        } catch (NullPointerException npe) {
-            // expected
-        }
+    public void testFlatMapEmpty() {
+        checkEmpty(Optional.empty().flatMap(s -> { fail(); return Optional.of(""); }));
+    }
 
-        // Empty won't invoke mapper function
-        try {
-            Optional<Boolean> b = empty.flatMap(s -> null);
-            assertFalse(b.isPresent());
-        } catch (NullPointerException npe) {
-            fail("Mapper function should not be invoked");
-        }
+    @Test(groups = "unit")
+    public void testFlatMapPresentReturnEmpty() {
+        checkEmpty(Optional.of("xyzzy")
+                           .flatMap(s -> { assertEquals(s, "xyzzy"); return Optional.empty(); }));
+    }
 
-        // Map an empty value
-        Optional<Integer> l = empty.flatMap(s -> Optional.of(s.length()));
-        assertFalse(l.isPresent());
-
-        // Map to value
-        Optional<Integer> fixture = Optional.of(Integer.MAX_VALUE);
-        l = duke.flatMap(s -> Optional.of(s.length()));
-        assertTrue(l.isPresent());
-        assertEquals(l.get().intValue(), 4);
-        assertEquals(l.orElseThrow().intValue(), 4);
-
-        // Verify same instance
-        l = duke.flatMap(s -> fixture);
-        assertSame(l, fixture);
+    @Test(groups = "unit")
+    public void testFlatMapPresentReturnPresent() {
+        checkPresent(Optional.of("xyzzy")
+                             .flatMap(s -> { assertEquals(s, "xyzzy"); return Optional.of("plugh"); }),
+                     "plugh");
     }
 
     @Test(groups = "unit")
-    public void testOr() {
-        Optional<String> empty = Optional.empty();
-        Optional<String> duke = Optional.of("Duke");
-
-        // Null supplier
-        try {
-            Optional<String> b = empty.or(null);
-            fail("Should throw NPE on null supplier");
-        } catch (NullPointerException npe) {
-            // expected
-        }
+    public void testOrEmptyEmpty() {
+        checkEmpty(Optional.<String>empty().or(() -> Optional.empty()));
+    }
 
-        // Supply null
-        try {
-            Optional<String> b = empty.or(() -> null);
-            fail("Should throw NPE when supplier returns null");
-        } catch (NullPointerException npe) {
-            // expected
-        }
-
-        // Non-empty won't invoke supplier
-        try {
-            Optional<String> b = duke.or(() -> null);
-            assertTrue(b.isPresent());
-        } catch (NullPointerException npe) {
-            fail("Supplier should not be invoked");
-        }
-
-        // Supply for empty
-        Optional<String> suppliedDuke = empty.or(() -> duke);
-        assertTrue(suppliedDuke.isPresent());
-        assertSame(suppliedDuke, duke);
-
-        // Supply for non-empty
-        Optional<String> actualDuke = duke.or(() -> Optional.of("Other Duke"));
-        assertTrue(actualDuke.isPresent());
-        assertSame(actualDuke, duke);
+    @Test(groups = "unit")
+    public void testOrEmptyPresent() {
+        checkPresent(Optional.<String>empty().or(() -> Optional.of("plugh")), "plugh");
     }
 
     @Test(groups = "unit")
-    public void testStream() {
-        {
-            Stream<String> s = Optional.<String>empty().stream();
-            assertFalse(s.isParallel());
-
-            Object[] es = s.toArray();
-            assertEquals(es.length, 0);
-        }
-
-        {
-            Stream<String> s = Optional.of("Duke").stream();
-            assertFalse(s.isParallel());
-
-            String[] es = s.toArray(String[]::new);
-            assertEquals(es.length, 1);
-            assertEquals(es[0], "Duke");
-        }
+    public void testOrPresentDontCare() {
+        checkPresent(Optional.of("xyzzy").or(() -> { fail(); return Optional.of("plugh"); }), "xyzzy");
     }
 
-    private static class ObscureException extends RuntimeException {
+    @Test(groups = "unit")
+    public void testStreamEmpty() {
+        assertEquals(Optional.empty().stream().collect(toList()), List.of());
+    }
 
+    @Test(groups = "unit")
+    public void testStreamPresent() {
+        assertEquals(Optional.of("xyzzy").stream().collect(toList()), List.of("xyzzy"));
     }
 }
--- a/test/jdk/java/util/Optional/BasicDouble.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/test/jdk/java/util/Optional/BasicDouble.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -22,187 +22,108 @@
  */
 
 /* @test
+ * @bug 8195649
  * @summary Basic functional test of OptionalDouble
  * @author Mike Duigou
+ * @build ObscureException
  * @run testng BasicDouble
  */
 
 import java.util.NoSuchElementException;
 import java.util.OptionalDouble;
 import java.util.concurrent.atomic.AtomicBoolean;
-import java.util.stream.DoubleStream;
 
 import static org.testng.Assert.*;
 import org.testng.annotations.Test;
 
-
 public class BasicDouble {
+    static final double DOUBLEVAL = Math.PI;
+    static final double UNEXPECTED = 6.62607004E-34;
 
-    @Test(groups = "unit")
-    public void testEmpty() {
-        OptionalDouble empty = OptionalDouble.empty();
-        OptionalDouble present = OptionalDouble.of(1.0);
+    /**
+     * Checks a block of assertions over an empty OptionalDouble.
+     */
+    void checkEmpty(OptionalDouble empty) {
+        assertTrue(empty.equals(OptionalDouble.empty()));
+        assertTrue(OptionalDouble.empty().equals(empty));
+        assertFalse(empty.equals(OptionalDouble.of(UNEXPECTED)));
+        assertFalse(OptionalDouble.of(UNEXPECTED).equals(empty));
+        assertFalse(empty.equals("unexpected"));
 
-        // empty
-        assertTrue(empty.equals(empty));
-        assertTrue(empty.equals(OptionalDouble.empty()));
-        assertTrue(!empty.equals(present));
-        assertTrue(0 == empty.hashCode());
-        assertTrue(!empty.toString().isEmpty());
-        assertTrue(!empty.isPresent());
+        assertFalse(empty.isPresent());
+        assertEquals(empty.hashCode(), 0);
+        assertEquals(empty.orElse(UNEXPECTED), UNEXPECTED);
+        assertEquals(empty.orElseGet(() -> UNEXPECTED), UNEXPECTED);
+
+        assertThrows(NoSuchElementException.class, () -> empty.getAsDouble());
+        assertThrows(NoSuchElementException.class, () -> empty.orElseThrow());
+        assertThrows(ObscureException.class,       () -> empty.orElseThrow(ObscureException::new));
+
+        var b = new AtomicBoolean();
+        empty.ifPresent(s -> b.set(true));
+        assertFalse(b.get());
+
+        var b1 = new AtomicBoolean(false);
+        var b2 = new AtomicBoolean(false);
+        empty.ifPresentOrElse(s -> b1.set(true), () -> b2.set(true));
+        assertFalse(b1.get());
+        assertTrue(b2.get());
 
-        empty.ifPresent(v -> { fail(); });
+        assertEquals(empty.toString(), "OptionalDouble.empty");
+    }
 
-        AtomicBoolean emptyCheck = new AtomicBoolean();
-        empty.ifPresentOrElse(v -> fail(), () -> emptyCheck.set(true));
-        assertTrue(emptyCheck.get());
+    /**
+     * Checks a block of assertions over an OptionalDouble that is expected to
+     * have a particular value present.
+     */
+    void checkPresent(OptionalDouble opt, double expected) {
+        assertFalse(opt.equals(OptionalDouble.empty()));
+        assertFalse(OptionalDouble.empty().equals(opt));
+        assertTrue(opt.equals(OptionalDouble.of(expected)));
+        assertTrue(OptionalDouble.of(expected).equals(opt));
+        assertFalse(opt.equals(OptionalDouble.of(UNEXPECTED)));
+        assertFalse(OptionalDouble.of(UNEXPECTED).equals(opt));
+        assertFalse(opt.equals("unexpected"));
 
-        try {
-            empty.ifPresentOrElse(v -> fail(), () -> { throw new ObscureException(); });
-            fail();
-        } catch (ObscureException expected) {
-        } catch (AssertionError e) {
-            throw e;
-        } catch (Throwable t) {
-            fail();
-        }
+        assertTrue(opt.isPresent());
+        assertEquals(opt.hashCode(), Double.hashCode(expected));
+        assertEquals(opt.orElse(UNEXPECTED), expected);
+        assertEquals(opt.orElseGet(() -> UNEXPECTED), expected);
+
+        assertEquals(opt.getAsDouble(), expected);
+        assertEquals(opt.orElseThrow(), expected);
+        assertEquals(opt.orElseThrow(ObscureException::new), expected);
 
-        assertEquals(2.0, empty.orElse(2.0));
-        assertEquals(2.0, empty.orElseGet(()-> 2.0));
+        var b = new AtomicBoolean(false);
+        opt.ifPresent(s -> b.set(true));
+        assertTrue(b.get());
+
+        var b1 = new AtomicBoolean(false);
+        var b2 = new AtomicBoolean(false);
+        opt.ifPresentOrElse(s -> b1.set(true), () -> b2.set(true));
+        assertTrue(b1.get());
+        assertFalse(b2.get());
+
+        assertEquals(opt.toString(), "OptionalDouble[" + expected + "]");
     }
 
     @Test(groups = "unit")
-    public void testIfPresentAndOrElseAndNull() {
-        OptionalDouble empty = OptionalDouble.empty();
-        OptionalDouble present = OptionalDouble.of(1.0);
-
-        // No NPE
-        present.ifPresentOrElse(v -> {}, null);
-        empty.ifPresent(null);
-        empty.ifPresentOrElse(null, () -> {});
-
-        // NPE
-        try {
-            present.ifPresent(null);
-            fail();
-        } catch (NullPointerException ex) {}
-        try {
-            present.ifPresentOrElse(null, () -> {});
-            fail();
-        } catch (NullPointerException ex) {}
-        try {
-            empty.ifPresentOrElse(v -> {}, null);
-            fail();
-        } catch (NullPointerException ex) {}
-    }
-
-    @Test(expectedExceptions=NoSuchElementException.class)
-    public void testEmptyGet() {
-        OptionalDouble empty = OptionalDouble.empty();
-
-        double got = empty.getAsDouble();
-    }
-
-    @Test(expectedExceptions=NullPointerException.class)
-    public void testEmptyOrElseGetNull() {
-        OptionalDouble empty = OptionalDouble.empty();
-
-        double got = empty.orElseGet(null);
-    }
-
-    @Test(expectedExceptions=NullPointerException.class)
-    public void testEmptyOrElseThrowNull() throws Throwable {
-        OptionalDouble empty = OptionalDouble.empty();
-
-        double got = empty.orElseThrow(null);
-    }
-
-    @Test(expectedExceptions=ObscureException.class)
-    public void testEmptyOrElseThrow() throws Exception {
-        OptionalDouble empty = OptionalDouble.empty();
-
-        double got = empty.orElseThrow(ObscureException::new);
-    }
-
-    @Test(expectedExceptions=NoSuchElementException.class)
-    public void testEmptyOrElseThrowNoArg() throws Exception {
-        OptionalDouble empty = OptionalDouble.empty();
-
-        double got = empty.orElseThrow();
+    public void testEmpty() {
+        checkEmpty(OptionalDouble.empty());
     }
 
     @Test(groups = "unit")
     public void testPresent() {
-        OptionalDouble empty = OptionalDouble.empty();
-        OptionalDouble present = OptionalDouble.of(1.0);
-
-        // present
-        assertTrue(present.equals(present));
-        assertFalse(present.equals(OptionalDouble.of(0.0)));
-        assertTrue(present.equals(OptionalDouble.of(1.0)));
-        assertTrue(!present.equals(empty));
-        assertTrue(Double.hashCode(1.0) == present.hashCode());
-        assertFalse(present.toString().isEmpty());
-        assertTrue(-1 != present.toString().indexOf(Double.toString(present.getAsDouble()).toString()));
-        assertTrue(-1 != present.toString().indexOf(Double.toString(present.orElseThrow()).toString()));
-        assertEquals(1.0, present.getAsDouble());
-        assertEquals(1.0, present.orElseThrow());
-
-        AtomicBoolean presentCheck = new AtomicBoolean();
-        present.ifPresent(v -> presentCheck.set(true));
-        assertTrue(presentCheck.get());
-        presentCheck.set(false);
-        present.ifPresentOrElse(v -> presentCheck.set(true), () -> fail());
-        assertTrue(presentCheck.get());
-
-        try {
-            present.ifPresent(v -> { throw new ObscureException(); });
-            fail();
-        } catch (ObscureException expected) {
-        } catch (AssertionError e) {
-            throw e;
-        } catch (Throwable t) {
-            fail();
-        }
-        try {
-            present.ifPresentOrElse(v -> { throw new ObscureException(); }, () -> fail());
-            fail();
-        } catch (ObscureException expected) {
-        } catch (AssertionError e) {
-            throw e;
-        } catch (Throwable t) {
-            fail();
-        }
-
-        assertEquals(1.0, present.orElse(2.0));
-        assertEquals(1.0, present.orElseGet(null));
-        assertEquals(1.0, present.orElseGet(()-> 2.0));
-        assertEquals(1.0, present.orElseGet(()-> 3.0));
-        assertEquals(1.0, present.<RuntimeException>orElseThrow(null));
-        assertEquals(1.0, present.<RuntimeException>orElseThrow(ObscureException::new));
+        checkPresent(OptionalDouble.of(DOUBLEVAL), DOUBLEVAL);
     }
 
     @Test(groups = "unit")
-    public void testStream() {
-        {
-            DoubleStream s = OptionalDouble.empty().stream();
-            assertFalse(s.isParallel());
-
-            double[] es = s.toArray();
-            assertEquals(es.length, 0);
-        }
-
-        {
-            DoubleStream s = OptionalDouble.of(42.0).stream();
-            assertFalse(s.isParallel());
-
-            double[] es = s.toArray();
-            assertEquals(es.length, 1);
-            assertEquals(es[0], 42.0);
-        }
+    public void testStreamEmpty() {
+        assertEquals(OptionalDouble.empty().stream().toArray(), new double[] { });
     }
 
-    private static class ObscureException extends RuntimeException {
-
+    @Test(groups = "unit")
+    public void testStreamPresent() {
+        assertEquals(OptionalDouble.of(DOUBLEVAL).stream().toArray(), new double[] { DOUBLEVAL });
     }
 }
--- a/test/jdk/java/util/Optional/BasicInt.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/test/jdk/java/util/Optional/BasicInt.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -22,187 +22,109 @@
  */
 
 /* @test
+ * @bug 8195649
  * @summary Basic functional test of OptionalInt
  * @author Mike Duigou
+ * @build ObscureException
  * @run testng BasicInt
  */
 
 import java.util.NoSuchElementException;
 import java.util.OptionalInt;
 import java.util.concurrent.atomic.AtomicBoolean;
-import java.util.stream.IntStream;
 
 import static org.testng.Assert.*;
 import org.testng.annotations.Test;
 
-
 public class BasicInt {
 
-    @Test(groups = "unit")
-    public void testEmpty() {
-        OptionalInt empty = OptionalInt.empty();
-        OptionalInt present = OptionalInt.of(1);
+    static final int INTVAL = 33_550_336;
+    static final int UNEXPECTED = 0xCAFEBABE;
+
+    /**
+     * Checks a block of assertions over an empty OptionalInt.
+     */
+    void checkEmpty(OptionalInt empty) {
+        assertTrue(empty.equals(OptionalInt.empty()));
+        assertTrue(OptionalInt.empty().equals(empty));
+        assertFalse(empty.equals(OptionalInt.of(UNEXPECTED)));
+        assertFalse(OptionalInt.of(UNEXPECTED).equals(empty));
+        assertFalse(empty.equals("unexpected"));
 
-        // empty
-        assertTrue(empty.equals(empty));
-        assertTrue(empty.equals(OptionalInt.empty()));
-        assertTrue(!empty.equals(present));
-        assertTrue(0 == empty.hashCode());
-        assertTrue(!empty.toString().isEmpty());
-        assertTrue(!empty.isPresent());
+        assertFalse(empty.isPresent());
+        assertEquals(empty.hashCode(), 0);
+        assertEquals(empty.orElse(UNEXPECTED), UNEXPECTED);
+        assertEquals(empty.orElseGet(() -> UNEXPECTED), UNEXPECTED);
+
+        assertThrows(NoSuchElementException.class, () -> empty.getAsInt());
+        assertThrows(NoSuchElementException.class, () -> empty.orElseThrow());
+        assertThrows(ObscureException.class,       () -> empty.orElseThrow(ObscureException::new));
 
-        empty.ifPresent(v -> { fail(); });
+        var b = new AtomicBoolean();
+        empty.ifPresent(s -> b.set(true));
+        assertFalse(b.get());
+
+        var b1 = new AtomicBoolean(false);
+        var b2 = new AtomicBoolean(false);
+        empty.ifPresentOrElse(s -> b1.set(true), () -> b2.set(true));
+        assertFalse(b1.get());
+        assertTrue(b2.get());
 
-        AtomicBoolean emptyCheck = new AtomicBoolean();
-        empty.ifPresentOrElse(v -> fail(), () -> emptyCheck.set(true));
-        assertTrue(emptyCheck.get());
+        assertEquals(empty.toString(), "OptionalInt.empty");
+    }
+
+    /**
+     * Checks a block of assertions over an OptionalInt that is expected to
+     * have a particular value present.
+     */
+    void checkPresent(OptionalInt opt, int expected) {
+        assertFalse(opt.equals(OptionalInt.empty()));
+        assertFalse(OptionalInt.empty().equals(opt));
+        assertTrue(opt.equals(OptionalInt.of(expected)));
+        assertTrue(OptionalInt.of(expected).equals(opt));
+        assertFalse(opt.equals(OptionalInt.of(UNEXPECTED)));
+        assertFalse(OptionalInt.of(UNEXPECTED).equals(opt));
+        assertFalse(opt.equals("unexpected"));
 
-        try {
-            empty.ifPresentOrElse(v -> fail(), () -> { throw new ObscureException(); });
-            fail();
-        } catch (ObscureException expected) {
-        } catch (AssertionError e) {
-            throw e;
-        } catch (Throwable t) {
-            fail();
-        }
+        assertTrue(opt.isPresent());
+        assertEquals(opt.hashCode(), Integer.hashCode(expected));
+        assertEquals(opt.orElse(UNEXPECTED), expected);
+        assertEquals(opt.orElseGet(() -> UNEXPECTED), expected);
+
+        assertEquals(opt.getAsInt(), expected);
+        assertEquals(opt.orElseThrow(), expected);
+        assertEquals(opt.orElseThrow(ObscureException::new), expected);
 
-        assertEquals(2, empty.orElse(2));
-        assertEquals(2, empty.orElseGet(()-> 2));
+        var b = new AtomicBoolean(false);
+        opt.ifPresent(s -> b.set(true));
+        assertTrue(b.get());
+
+        var b1 = new AtomicBoolean(false);
+        var b2 = new AtomicBoolean(false);
+        opt.ifPresentOrElse(s -> b1.set(true), () -> b2.set(true));
+        assertTrue(b1.get());
+        assertFalse(b2.get());
+
+        assertEquals(opt.toString(), "OptionalInt[" + expected + "]");
     }
 
     @Test(groups = "unit")
-    public void testIfPresentAndOrElseAndNull() {
-        OptionalInt empty = OptionalInt.empty();
-        OptionalInt present = OptionalInt.of(1);
-
-        // No NPE
-        present.ifPresentOrElse(v -> {}, null);
-        empty.ifPresent(null);
-        empty.ifPresentOrElse(null, () -> {});
-
-        // NPE
-        try {
-            present.ifPresent(null);
-            fail();
-        } catch (NullPointerException ex) {}
-        try {
-            present.ifPresentOrElse(null, () -> {});
-            fail();
-        } catch (NullPointerException ex) {}
-        try {
-            empty.ifPresentOrElse(v -> {}, null);
-            fail();
-        } catch (NullPointerException ex) {}
-    }
-
-    @Test(expectedExceptions=NoSuchElementException.class)
-    public void testEmptyGet() {
-        OptionalInt empty = OptionalInt.empty();
-
-        int got = empty.getAsInt();
-    }
-
-    @Test(expectedExceptions=NullPointerException.class)
-    public void testEmptyOrElseGetNull() {
-        OptionalInt empty = OptionalInt.empty();
-
-        int got = empty.orElseGet(null);
-    }
-
-    @Test(expectedExceptions=NullPointerException.class)
-    public void testEmptyOrElseThrowNull() throws Throwable {
-        OptionalInt empty = OptionalInt.empty();
-
-        int got = empty.orElseThrow(null);
-    }
-
-    @Test(expectedExceptions=ObscureException.class)
-    public void testEmptyOrElseThrow() throws Exception {
-        OptionalInt empty = OptionalInt.empty();
-
-        int got = empty.orElseThrow(ObscureException::new);
-    }
-
-    @Test(expectedExceptions=NoSuchElementException.class)
-    public void testEmptyOrElseThrowNoArg() throws Exception {
-        OptionalInt empty = OptionalInt.empty();
-
-        int got = empty.orElseThrow();
+    public void testEmpty() {
+        checkEmpty(OptionalInt.empty());
     }
 
     @Test(groups = "unit")
     public void testPresent() {
-        OptionalInt empty = OptionalInt.empty();
-        OptionalInt present = OptionalInt.of(1);
-
-        // present
-        assertTrue(present.equals(present));
-        assertFalse(present.equals(OptionalInt.of(0)));
-        assertTrue(present.equals(OptionalInt.of(1)));
-        assertFalse(present.equals(empty));
-        assertTrue(Integer.hashCode(1) == present.hashCode());
-        assertFalse(present.toString().isEmpty());
-        assertTrue(-1 != present.toString().indexOf(Integer.toString(present.getAsInt()).toString()));
-        assertTrue(-1 != present.toString().indexOf(Integer.toString(present.orElseThrow()).toString()));
-        assertEquals(1, present.getAsInt());
-        assertEquals(1, present.orElseThrow());
-
-        AtomicBoolean presentCheck = new AtomicBoolean();
-        present.ifPresent(v -> presentCheck.set(true));
-        assertTrue(presentCheck.get());
-        presentCheck.set(false);
-        present.ifPresentOrElse(v -> presentCheck.set(true), () -> fail());
-        assertTrue(presentCheck.get());
-
-        try {
-            present.ifPresent(v -> { throw new ObscureException(); });
-            fail();
-        } catch (ObscureException expected) {
-        } catch (AssertionError e) {
-            throw e;
-        } catch (Throwable t) {
-            fail();
-        }
-        try {
-            present.ifPresentOrElse(v -> { throw new ObscureException(); }, () -> fail());
-            fail();
-        } catch (ObscureException expected) {
-        } catch (AssertionError e) {
-            throw e;
-        } catch (Throwable t) {
-            fail();
-        }
-
-        assertEquals(1, present.orElse(2));
-        assertEquals(1, present.orElseGet(null));
-        assertEquals(1, present.orElseGet(()-> 2));
-        assertEquals(1, present.orElseGet(()-> 3));
-        assertEquals(1, present.<RuntimeException>orElseThrow(null));
-        assertEquals(1, present.<RuntimeException>orElseThrow(ObscureException::new));
+        checkPresent(OptionalInt.of(INTVAL), INTVAL);
     }
 
     @Test(groups = "unit")
-    public void testStream() {
-        {
-            IntStream s = OptionalInt.empty().stream();
-            assertFalse(s.isParallel());
-
-            int[] es = s.toArray();
-            assertEquals(es.length, 0);
-        }
-
-        {
-            IntStream s = OptionalInt.of(42).stream();
-            assertFalse(s.isParallel());
-
-            int[] es = OptionalInt.of(42).stream().toArray();
-            assertEquals(es.length, 1);
-            assertEquals(es[0], 42);
-        }
+    public void testStreamEmpty() {
+        assertEquals(OptionalInt.empty().stream().toArray(), new int[] { });
     }
 
-    private static class ObscureException extends RuntimeException {
-
+    @Test(groups = "unit")
+    public void testStreamPresent() {
+        assertEquals(OptionalInt.of(INTVAL).stream().toArray(), new int[] { INTVAL });
     }
 }
--- a/test/jdk/java/util/Optional/BasicLong.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/test/jdk/java/util/Optional/BasicLong.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -22,187 +22,108 @@
  */
 
 /* @test
+ * @bug 8195649
  * @summary Basic functional test of OptionalLong
  * @author Mike Duigou
+ * @build ObscureException
  * @run testng BasicLong
  */
 
 import java.util.NoSuchElementException;
 import java.util.OptionalLong;
 import java.util.concurrent.atomic.AtomicBoolean;
-import java.util.stream.LongStream;
 
 import static org.testng.Assert.*;
 import org.testng.annotations.Test;
 
-
 public class BasicLong {
+    static final long LONGVAL = 2_305_843_008_139_952_128L;
+    static final long UNEXPECTED = 0xFEEDBEEFCAFEBABEL;
 
-    @Test(groups = "unit")
-    public void testEmpty() {
-        OptionalLong empty = OptionalLong.empty();
-        OptionalLong present = OptionalLong.of(1);
+    /**
+     * Checks a block of assertions over an empty OptionalLong.
+     */
+    void checkEmpty(OptionalLong empty) {
+        assertTrue(empty.equals(OptionalLong.empty()));
+        assertTrue(OptionalLong.empty().equals(empty));
+        assertFalse(empty.equals(OptionalLong.of(UNEXPECTED)));
+        assertFalse(OptionalLong.of(UNEXPECTED).equals(empty));
+        assertFalse(empty.equals("unexpected"));
 
-        // empty
-        assertTrue(empty.equals(empty));
-        assertTrue(empty.equals(OptionalLong.empty()));
-        assertTrue(!empty.equals(present));
-        assertTrue(0 == empty.hashCode());
-        assertTrue(!empty.toString().isEmpty());
-        assertTrue(!empty.isPresent());
+        assertFalse(empty.isPresent());
+        assertEquals(empty.hashCode(), 0);
+        assertEquals(empty.orElse(UNEXPECTED), UNEXPECTED);
+        assertEquals(empty.orElseGet(() -> UNEXPECTED), UNEXPECTED);
+
+        assertThrows(NoSuchElementException.class, () -> empty.getAsLong());
+        assertThrows(NoSuchElementException.class, () -> empty.orElseThrow());
+        assertThrows(ObscureException.class,       () -> empty.orElseThrow(ObscureException::new));
+
+        var b = new AtomicBoolean();
+        empty.ifPresent(s -> b.set(true));
+        assertFalse(b.get());
+
+        var b1 = new AtomicBoolean(false);
+        var b2 = new AtomicBoolean(false);
+        empty.ifPresentOrElse(s -> b1.set(true), () -> b2.set(true));
+        assertFalse(b1.get());
+        assertTrue(b2.get());
 
-        empty.ifPresent(v -> { fail(); });
+        assertEquals(empty.toString(), "OptionalLong.empty");
+    }
 
-        AtomicBoolean emptyCheck = new AtomicBoolean();
-        empty.ifPresentOrElse(v -> fail(), () -> emptyCheck.set(true));
-        assertTrue(emptyCheck.get());
+    /**
+     * Checks a block of assertions over an OptionalLong that is expected to
+     * have a particular value present.
+     */
+    void checkPresent(OptionalLong opt, long expected) {
+        assertFalse(opt.equals(OptionalLong.empty()));
+        assertFalse(OptionalLong.empty().equals(opt));
+        assertTrue(opt.equals(OptionalLong.of(expected)));
+        assertTrue(OptionalLong.of(expected).equals(opt));
+        assertFalse(opt.equals(OptionalLong.of(UNEXPECTED)));
+        assertFalse(OptionalLong.of(UNEXPECTED).equals(opt));
+        assertFalse(opt.equals("unexpected"));
 
-        try {
-            empty.ifPresentOrElse(v -> fail(), () -> { throw new ObscureException(); });
-            fail();
-        } catch (ObscureException expected) {
-        } catch (AssertionError e) {
-            throw e;
-        } catch (Throwable t) {
-            fail();
-        }
+        assertTrue(opt.isPresent());
+        assertEquals(opt.hashCode(), Long.hashCode(expected));
+        assertEquals(opt.orElse(UNEXPECTED), expected);
+        assertEquals(opt.orElseGet(() -> UNEXPECTED), expected);
+
+        assertEquals(opt.getAsLong(), expected);
+        assertEquals(opt.orElseThrow(), expected);
+        assertEquals(opt.orElseThrow(ObscureException::new), expected);
 
-        assertEquals(2, empty.orElse(2));
-        assertEquals(2, empty.orElseGet(()-> 2));
+        var b = new AtomicBoolean(false);
+        opt.ifPresent(s -> b.set(true));
+        assertTrue(b.get());
+
+        var b1 = new AtomicBoolean(false);
+        var b2 = new AtomicBoolean(false);
+        opt.ifPresentOrElse(s -> b1.set(true), () -> b2.set(true));
+        assertTrue(b1.get());
+        assertFalse(b2.get());
+
+        assertEquals(opt.toString(), "OptionalLong[" + expected + "]");
     }
 
     @Test(groups = "unit")
-    public void testIfPresentAndOrElseAndNull() {
-        OptionalLong empty = OptionalLong.empty();
-        OptionalLong present = OptionalLong.of(1);
-
-        // No NPE
-        present.ifPresentOrElse(v -> {}, null);
-        empty.ifPresent(null);
-        empty.ifPresentOrElse(null, () -> {});
-
-        // NPE
-        try {
-            present.ifPresent(null);
-            fail();
-        } catch (NullPointerException ex) {}
-        try {
-            present.ifPresentOrElse(null, () -> {});
-            fail();
-        } catch (NullPointerException ex) {}
-        try {
-            empty.ifPresentOrElse(v -> {}, null);
-            fail();
-        } catch (NullPointerException ex) {}
-    }
-
-    @Test(expectedExceptions=NoSuchElementException.class)
-    public void testEmptyGet() {
-        OptionalLong empty = OptionalLong.empty();
-
-        long got = empty.getAsLong();
-    }
-
-    @Test(expectedExceptions=NullPointerException.class)
-    public void testEmptyOrElseGetNull() {
-        OptionalLong empty = OptionalLong.empty();
-
-        long got = empty.orElseGet(null);
-    }
-
-    @Test(expectedExceptions=NullPointerException.class)
-    public void testEmptyOrElseThrowNull() throws Throwable {
-        OptionalLong empty = OptionalLong.empty();
-
-        long got = empty.orElseThrow(null);
-    }
-
-    @Test(expectedExceptions=ObscureException.class)
-    public void testEmptyOrElseThrow() throws Exception {
-        OptionalLong empty = OptionalLong.empty();
-
-        long got = empty.orElseThrow(ObscureException::new);
-    }
-
-    @Test(expectedExceptions=NoSuchElementException.class)
-    public void testEmptyOrElseThrowNoArg() throws Exception {
-        OptionalLong empty = OptionalLong.empty();
-
-        long got = empty.orElseThrow();
+    public void testEmpty() {
+        checkEmpty(OptionalLong.empty());
     }
 
     @Test(groups = "unit")
     public void testPresent() {
-        OptionalLong empty = OptionalLong.empty();
-        OptionalLong present = OptionalLong.of(1L);
-
-        // present
-        assertTrue(present.equals(present));
-        assertFalse(present.equals(OptionalLong.of(0L)));
-        assertTrue(present.equals(OptionalLong.of(1L)));
-        assertFalse(present.equals(empty));
-        assertTrue(Long.hashCode(1) == present.hashCode());
-        assertFalse(present.toString().isEmpty());
-        assertTrue(-1 != present.toString().indexOf(Long.toString(present.getAsLong()).toString()));
-        assertTrue(-1 != present.toString().indexOf(Long.toString(present.orElseThrow()).toString()));
-        assertEquals(1L, present.getAsLong());
-        assertEquals(1L, present.orElseThrow());
-
-        AtomicBoolean presentCheck = new AtomicBoolean();
-        present.ifPresent(v -> presentCheck.set(true));
-        assertTrue(presentCheck.get());
-        presentCheck.set(false);
-        present.ifPresentOrElse(v -> presentCheck.set(true), () -> fail());
-        assertTrue(presentCheck.get());
-
-        try {
-            present.ifPresent(v -> { throw new ObscureException(); });
-            fail();
-        } catch (ObscureException expected) {
-        } catch (AssertionError e) {
-            throw e;
-        } catch (Throwable t) {
-            fail();
-        }
-        try {
-            present.ifPresentOrElse(v -> {
-                throw new ObscureException();
-            }, () -> fail());
-            fail();
-        } catch (ObscureException expected) {
-        } catch (AssertionError e) {
-            throw e;
-        } catch (Throwable t) {
-            fail();
-        }
-
-        assertEquals(1, present.orElse(2));
-        assertEquals(1, present.orElseGet(null));
-        assertEquals(1, present.orElseGet(()-> 2));
-        assertEquals(1, present.orElseGet(()-> 3));
-        assertEquals(1, present.<RuntimeException>orElseThrow(null));
-        assertEquals(1, present.<RuntimeException>orElseThrow(ObscureException::new));
+        checkPresent(OptionalLong.of(LONGVAL), LONGVAL);
     }
 
     @Test(groups = "unit")
-    public void testStream() {
-        {
-            LongStream s = OptionalLong.empty().stream();
-
-            long[] es = s.toArray();
-            assertEquals(es.length, 0);
-        }
-
-        {
-            LongStream s = OptionalLong.of(42L).stream();
-
-            long[] es = s.toArray();
-            assertEquals(es.length, 1);
-            assertEquals(es[0], 42L);
-        }
+    public void testStreamEmpty() {
+        assertEquals(OptionalLong.empty().stream().toArray(), new long[] { });
     }
 
-    private static class ObscureException extends RuntimeException {
-
+    @Test(groups = "unit")
+    public void testStreamPresent() {
+        assertEquals(OptionalLong.of(LONGVAL).stream().toArray(), new long[] { LONGVAL });
     }
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/java/util/Optional/ObscureException.java	Fri Apr 06 03:53:28 2018 +0200
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * A unique exception used for checking exception types.
+ */
+public class ObscureException extends RuntimeException { }
--- a/test/jdk/java/util/zip/ConstructDeflaterInput.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/test/jdk/java/util/zip/ConstructDeflaterInput.java	Fri Apr 06 03:53:28 2018 +0200
@@ -33,16 +33,15 @@
 public class ConstructDeflaterInput {
 
     static class MyDeflater extends Deflater {
-        private boolean ended = false;
-        boolean getEnded() { return ended; }
+        volatile boolean ended = false;
         public void end() {
-            fail("MyDeflater had end() called");
+            ended = true;
             super.end();
         }
     }
 
-    private static MyDeflater def = new MyDeflater();
     public static void realMain(String[] args) throws Throwable {
+        final MyDeflater def = new MyDeflater();
         ByteArrayInputStream bais = new ByteArrayInputStream(
             "hello, world".getBytes());
         DeflaterInputStream dis = null;
@@ -122,7 +121,7 @@
         //
         check(!dis.markSupported());
         check(dis.available() == 1);
-        check(!def.getEnded());
+        check(!def.ended);
         try {
             dis.reset();
             fail();
@@ -133,7 +132,7 @@
         // Check close
         //
         dis.close();
-        check(!def.getEnded());
+        check(!def.ended);
 
         try {
             dis.available();
@@ -155,7 +154,7 @@
         } catch (IOException ex) {
             pass();
         }
-
+        java.lang.ref.Reference.reachabilityFence(def);
     }
 
     //--------------------- Infrastructure ---------------------------
--- a/test/jdk/java/util/zip/ConstructInflaterOutput.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/test/jdk/java/util/zip/ConstructInflaterOutput.java	Fri Apr 06 03:53:28 2018 +0200
@@ -33,17 +33,15 @@
 public class ConstructInflaterOutput {
 
     static class MyInflater extends Inflater {
-        private boolean ended = false;
-        boolean getEnded() { return ended; }
+        volatile boolean ended = false;
         public void end() {
-            fail("MyInflater had end() called");
+            ended = true;
             super.end();
         }
     }
 
-    private static MyInflater inf = new MyInflater();
-
     public static void realMain(String[] args) throws Throwable {
+        final MyInflater inf = new MyInflater();
         ByteArrayOutputStream baos = new ByteArrayOutputStream();
         InflaterOutputStream ios = null;
         byte[] b = new byte[512];
@@ -104,13 +102,13 @@
         }
 
         ios.flush();
-        check(!inf.getEnded());
+        check(!inf.ended);
         ios.flush();
-        check(!inf.getEnded());
+        check(!inf.ended);
         ios.finish();
-        check(!inf.getEnded());
+        check(!inf.ended);
         ios.close();
-        check(!inf.getEnded());
+        check(!inf.ended);
         try {
             ios.finish();
             fail();
@@ -133,6 +131,7 @@
         } catch (IOException ex) {
             pass();
         }
+        java.lang.ref.Reference.reachabilityFence(inf);
     }
 
     //--------------------- Infrastructure ---------------------------
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javax/imageio/plugins/jpeg/JpegNumThumbnailsTest.java	Fri Apr 06 03:53:28 2018 +0200
@@ -0,0 +1,101 @@
+/*
+ * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 4954348
+ * @summary Checks whether JpegImageWriter returns -1 as recommended by the
+ *          specification when getNumThumbnailsSupported method is invoked
+ *          with insufficient data.
+ * @run main JpegNumThumbnailsTest
+ */
+import javax.imageio.ImageIO;
+import javax.imageio.ImageTypeSpecifier;
+import javax.imageio.ImageWriter;
+import javax.imageio.metadata.IIOMetadata;
+import java.awt.image.BufferedImage;
+import java.util.Iterator;
+import static java.awt.image.BufferedImage.TYPE_INT_RGB;
+
+public class JpegNumThumbnailsTest {
+
+    public static void main(String args[]) {
+        // Test variables.
+        Iterator<ImageWriter> iterWriter = null;
+        ImageWriter jpgWriter = null;
+        IIOMetadata imgMetadata = null;
+        BufferedImage testImage = null;
+        ImageTypeSpecifier imgType = null;
+        int numThumbnails = 0;
+
+        iterWriter = ImageIO.getImageWritersByFormatName("JPEG");
+        if (iterWriter.hasNext()) {
+            try {
+                // JpegImageWriter requires either image type or image metadata
+                // to determine the number of thumbnails that could be
+                // supported. Hence we test for all possible input combinations
+                // and observe the result.
+                jpgWriter = iterWriter.next();
+                testImage = new BufferedImage(32, 32, TYPE_INT_RGB);
+                imgType = ImageTypeSpecifier.createFromRenderedImage(testImage);
+                imgMetadata = jpgWriter.getDefaultImageMetadata(imgType, null);
+
+                // Observe the result with insufficient data.
+                numThumbnails = jpgWriter.getNumThumbnailsSupported(null,
+                                        null, null, null);
+                if (numThumbnails != -1) {
+                    reportException("Incorrect number of thumbnails returned.");
+                }
+
+                // Observe the result with valid image type.
+                numThumbnails = jpgWriter.getNumThumbnailsSupported(imgType,
+                                        null, null, null);
+                if (numThumbnails != Integer.MAX_VALUE) {
+                    reportException("Incorrect number of thumbnails returned.");
+                }
+
+                // Observe the result with valid image metadata.
+                numThumbnails = jpgWriter.getNumThumbnailsSupported(null,
+                                        null, null, imgMetadata);
+                if (numThumbnails != Integer.MAX_VALUE) {
+                    reportException("Incorrect number of thumbnails returned.");
+                }
+
+                // Observe the result with valid image type and metadata.
+                numThumbnails = jpgWriter.getNumThumbnailsSupported(imgType,
+                                        null, null, imgMetadata);
+                if (numThumbnails != Integer.MAX_VALUE) {
+                    reportException("Incorrect number of thumbnails returned.");
+                }
+            } finally {
+                // Dispose the writer
+                jpgWriter.dispose();
+            }
+        }
+    }
+
+    private static void reportException(String message) {
+        // Report a runtime exception with the required message.
+        throw new RuntimeException("Test Failed. " + message);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javax/swing/JFileChooser/ExternalDriveNameTest.java	Fri Apr 06 03:53:28 2018 +0200
@@ -0,0 +1,185 @@
+/*
+ * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @key headful
+ * @bug 8191957
+ * @requires (os.family == "Windows")
+ * @summary Check Verifies that external drive names are shown properly when
+ *          "Desktop" is selected in JFileChooser
+ * @run main/manual ExternalDriveNameTest
+ */
+import java.awt.Color;
+import java.awt.GridBagConstraints;
+import java.awt.GridBagLayout;
+import java.util.concurrent.CountDownLatch;
+import javax.swing.JPanel;
+import javax.swing.JTextArea;
+import javax.swing.SwingUtilities;
+import javax.swing.JButton;
+import javax.swing.JFrame;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.util.concurrent.TimeUnit;
+import javax.swing.JFileChooser;
+
+public class ExternalDriveNameTest {
+
+    public static void main(String args[]) throws Exception {
+        final CountDownLatch latch = new CountDownLatch(1);
+        TestUI test = new TestUI(latch);
+        SwingUtilities.invokeAndWait(() -> {
+            try {
+                test.createUI();
+            } catch (Exception ex) {
+                throw new RuntimeException("Exception while creating UI");
+            }
+        });
+
+        boolean status = latch.await(5, TimeUnit.MINUTES);
+
+        if (!status) {
+            System.out.println("Test timed out.");
+        }
+
+        SwingUtilities.invokeAndWait(() -> {
+            try {
+                test.disposeUI();
+            } catch (Exception ex) {
+                throw new RuntimeException("Exception while disposing UI");
+            }
+        });
+
+        if (test.testResult == false) {
+            throw new RuntimeException("Test Failed.");
+        }
+    }
+}
+
+class TestUI {
+
+    private static JFrame mainFrame;
+    private static JPanel mainControlPanel;
+
+    private static JTextArea instructionTextArea;
+
+    private static JPanel resultButtonPanel;
+    private static JButton passButton;
+    private static JButton failButton;
+
+    private static GridBagLayout layout;
+    private final CountDownLatch latch;
+    public boolean testResult = false;
+
+    public TestUI(CountDownLatch latch) throws Exception {
+        this.latch = latch;
+    }
+
+    public final void createUI() throws Exception {
+        mainFrame = new JFrame("JFileChooser_ExternalDriveNameTest");
+
+        layout = new GridBagLayout();
+        mainControlPanel = new JPanel(layout);
+        resultButtonPanel = new JPanel(layout);
+
+        GridBagConstraints gbc = new GridBagConstraints();
+
+        // Create Test instructions
+        String instructions
+                = "INSTRUCTIONS:" +
+                "\n 1. This is a Windows 10 specific test. If you are not on " +
+                "Windows 10, press Pass." +
+                "\n 2. Make sure you have an External Drive attached to your " +
+                "computer." +
+                "\n 3. Open a JFileChooser by clicking on launch button." +
+                "\n 4. In JFileChooser dropdown, there are two Desktop " +
+                "locations." +
+                "\n 5. One Desktop is child of My PC and one is parent of it." +
+                "\n 6. Open the parent Desktop folder." +
+                "\n 7. You should see the External Drive in the list of " +
+                "files." +
+                "\n 8. If the External drive name is empty (it does not have " +
+                "any name), press Fail, else press Pass.";
+
+        instructionTextArea = new JTextArea();
+        instructionTextArea.setText(instructions);
+        instructionTextArea.setEnabled(false);
+        instructionTextArea.setDisabledTextColor(Color.black);
+        instructionTextArea.setBackground(Color.white);
+
+        gbc.gridx = 0;
+        gbc.gridy = 0;
+        gbc.fill = GridBagConstraints.HORIZONTAL;
+        mainControlPanel.add(instructionTextArea, gbc);
+        JButton launchButton = new JButton("Launch");
+        launchButton.setActionCommand("Launch");
+        launchButton.addActionListener((ActionEvent e) -> {
+                    JFileChooser fileChooser = new JFileChooser();
+                    fileChooser.showOpenDialog(null);
+                }
+        );
+
+        gbc.gridx = 0;
+        gbc.gridy = 1;
+        mainControlPanel.add(launchButton, gbc);
+
+        passButton = new JButton("Pass");
+        passButton.setActionCommand("Pass");
+        passButton.addActionListener((ActionEvent e) -> {
+            testResult = true;
+            mainFrame.dispose();
+            latch.countDown();
+
+        });
+        failButton = new JButton("Fail");
+        failButton.setActionCommand("Fail");
+        failButton.addActionListener(new ActionListener() {
+            @Override
+            public void actionPerformed(ActionEvent e) {
+                testResult = false;
+                mainFrame.dispose();
+                latch.countDown();
+            }
+        });
+        gbc.gridx = 0;
+        gbc.gridy = 0;
+        resultButtonPanel.add(passButton, gbc);
+        gbc.gridx = 1;
+        gbc.gridy = 0;
+        resultButtonPanel.add(failButton, gbc);
+
+        gbc.gridx = 0;
+        gbc.gridy = 2;
+        mainControlPanel.add(resultButtonPanel, gbc);
+
+        mainFrame.add(mainControlPanel);
+        mainFrame.pack();
+        mainFrame.setVisible(true);
+    }
+
+    public void disposeUI() {
+        mainFrame.setVisible(false);
+        mainFrame.dispose();
+    }
+}
--- a/test/jdk/sun/java2d/marlin/ClipShapeTest.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/test/jdk/sun/java2d/marlin/ClipShapeTest.java	Fri Apr 06 03:53:28 2018 +0200
@@ -54,13 +54,24 @@
  * @bug 8191814
  * @summary Verifies that Marlin rendering generates the same
  * images with and without clipping optimization with all possible
- * stroke (cap/join) and fill modes (EO rules)
+ * stroke (cap/join) and/or dashes or fill modes (EO rules)
+ * for paths made of either 9 lines, 4 quads, 2 cubics (random)
  * Note: Use the argument -slow to run more intensive tests (too much time)
- * @run main/othervm/timeout=120 -Dsun.java2d.renderer=sun.java2d.marlin.MarlinRenderingEngine ClipShapeTest
- * @run main/othervm/timeout=120 -Dsun.java2d.renderer=sun.java2d.marlin.DMarlinRenderingEngine ClipShapeTest
- */
+ *
+ * @run main/othervm/timeout=120 -Dsun.java2d.renderer=sun.java2d.marlin.MarlinRenderingEngine ClipShapeTest -poly
+ * @run main/othervm/timeout=240 -Dsun.java2d.renderer=sun.java2d.marlin.MarlinRenderingEngine ClipShapeTest -poly -doDash
+ * @run main/othervm/timeout=120 -Dsun.java2d.renderer=sun.java2d.marlin.MarlinRenderingEngine ClipShapeTest -cubic
+ * @run main/othervm/timeout=240 -Dsun.java2d.renderer=sun.java2d.marlin.MarlinRenderingEngine ClipShapeTest -cubic -doDash
+ * @run main/othervm/timeout=120 -Dsun.java2d.renderer=sun.java2d.marlin.DMarlinRenderingEngine ClipShapeTest -poly
+ * @run main/othervm/timeout=240 -Dsun.java2d.renderer=sun.java2d.marlin.DMarlinRenderingEngine ClipShapeTest -poly -doDash
+ * @run main/othervm/timeout=120 -Dsun.java2d.renderer=sun.java2d.marlin.DMarlinRenderingEngine ClipShapeTest -cubic
+ * @run main/othervm/timeout=240 -Dsun.java2d.renderer=sun.java2d.marlin.DMarlinRenderingEngine ClipShapeTest -cubic -doDash
+*/
 public final class ClipShapeTest {
 
+    static boolean TX_SCALE = false;
+    static boolean TX_SHEAR = false;
+
     static final boolean TEST_STROKER = true;
     static final boolean TEST_FILLER = true;
 
@@ -73,18 +84,23 @@
     static final int TESTH = 100;
 
     // shape settings:
-    static final ShapeMode SHAPE_MODE = ShapeMode.NINE_LINE_POLYS;
+    static ShapeMode SHAPE_MODE = ShapeMode.NINE_LINE_POLYS;
+
+    static int THRESHOLD_DELTA;
+    static long THRESHOLD_NBPIX;
+
     static final boolean SHAPE_REPEAT = true;
 
     // dump path on console:
     static final boolean DUMP_SHAPE = true;
 
-    static final boolean SHOW_DETAILS = true;
+    static final boolean SHOW_DETAILS = false; // disabled
     static final boolean SHOW_OUTLINE = true;
     static final boolean SHOW_POINTS = true;
     static final boolean SHOW_INFO = false;
 
     static final int MAX_SHOW_FRAMES = 10;
+    static final int MAX_SAVE_FRAMES = 100;
 
     // use fixed seed to reproduce always same polygons between tests
     static final boolean FIXED_SEED = false;
@@ -109,24 +125,13 @@
 
     static final File OUTPUT_DIR = new File(".");
 
-    /**
-     * Test
-     * @param args
-     */
-    public static void main(String[] args) {
-        boolean runSlowTests = (args.length != 0 && "-slow".equals(args[0]));
+    static final AtomicBoolean isMarlin = new AtomicBoolean();
+    static final AtomicBoolean isClipRuntime = new AtomicBoolean();
 
-        if (runSlowTests) {
-            NUM_TESTS = 20000; // or 100000 (very slow)
-            USE_DASHES = true;
-            USE_VAR_STROKE = true;
-        }
-
+    static {
         Locale.setDefault(Locale.US);
 
-        // Get Marlin runtime state from its log:
-        final AtomicBoolean isMarlin = new AtomicBoolean();
-        final AtomicBoolean isClipRuntime = new AtomicBoolean();
+        // FIRST: Get Marlin runtime state from its log:
 
         // initialize j.u.l Looger:
         final Logger log = Logger.getLogger("sun.java2d.marlin");
@@ -171,6 +176,95 @@
         System.setProperty("sun.java2d.renderer.clip", "false");
         System.setProperty("sun.java2d.renderer.clip.runtime.enable", "true");
 
+        // enable subdivider:
+        System.setProperty("sun.java2d.renderer.clip.subdivider", "true");
+
+        // disable min length check: always subdivide curves at clip edges
+        System.setProperty("sun.java2d.renderer.clip.subdivider.minLength", "-1");
+
+        // If any curve, increase curve accuracy:
+        // curve length max error:
+        System.setProperty("sun.java2d.renderer.curve_len_err", "1e-4");
+
+        // quad max error:
+        System.setProperty("sun.java2d.renderer.quad_dec_d2", "5e-4");
+
+        // cubic min/max error:
+        System.setProperty("sun.java2d.renderer.cubic_dec_d2", "1e-3");
+        System.setProperty("sun.java2d.renderer.cubic_inc_d1", "1e-4"); // or disabled ~ 1e-6
+    }
+
+    /**
+     * Test
+     * @param args
+     */
+    public static void main(String[] args) {
+        boolean runSlowTests = false;
+
+        for (String arg : args) {
+            if ("-slow".equals(arg)) {
+                System.out.println("slow: enabled.");
+                runSlowTests = true;
+            } else if ("-doScale".equals(arg)) {
+                System.out.println("doScale: enabled.");
+                TX_SCALE = true;
+            } else if ("-doShear".equals(arg)) {
+                System.out.println("doShear: enabled.");
+                TX_SHEAR = true;
+            } else if ("-doDash".equals(arg)) {
+                System.out.println("doDash: enabled.");
+                USE_DASHES = true;
+            } else if ("-doVarStroke".equals(arg)) {
+                System.out.println("doVarStroke: enabled.");
+                USE_VAR_STROKE = true;
+            }
+            // shape mode:
+            else if (arg.equalsIgnoreCase("-poly")) {
+                SHAPE_MODE = ShapeMode.NINE_LINE_POLYS;
+            } else if (arg.equalsIgnoreCase("-bigpoly")) {
+                SHAPE_MODE = ShapeMode.FIFTY_LINE_POLYS;
+            } else if (arg.equalsIgnoreCase("-quad")) {
+                SHAPE_MODE = ShapeMode.FOUR_QUADS;
+            } else if (arg.equalsIgnoreCase("-cubic")) {
+                SHAPE_MODE = ShapeMode.TWO_CUBICS;
+            } else if (arg.equalsIgnoreCase("-mixed")) {
+                SHAPE_MODE = ShapeMode.MIXED;
+            }
+        }
+
+        System.out.println("Shape mode: " + SHAPE_MODE);
+
+        // adjust image comparison thresholds:
+        switch(SHAPE_MODE) {
+            case TWO_CUBICS:
+                // Define uncertainty for curves:
+                THRESHOLD_DELTA = 32; //  / 256
+                THRESHOLD_NBPIX = 128; //  / 10000
+                break;
+            case FOUR_QUADS:
+            case MIXED:
+                // Define uncertainty for quads:
+                // curve subdivision causes curves to be smaller
+                // then curve offsets are different (more accurate)
+                THRESHOLD_DELTA = 64;  // 64 / 256
+                THRESHOLD_NBPIX = 256; // 256 / 10000
+                break;
+            default:
+                // Define uncertainty for lines:
+                // float variant have higher uncertainty
+                THRESHOLD_DELTA = 8;
+                THRESHOLD_NBPIX = 8;
+        }
+
+        System.out.println("THRESHOLD_DELTA: "+THRESHOLD_DELTA);
+        System.out.println("THRESHOLD_NBPIX: "+THRESHOLD_NBPIX);
+
+        if (runSlowTests) {
+            NUM_TESTS = 10000; // or 100000 (very slow)
+            USE_DASHES = true;
+            USE_VAR_STROKE = true;
+        }
+
         System.out.println("ClipShapeTests: image = " + TESTW + " x " + TESTH);
 
         int failures = 0;
@@ -179,14 +273,21 @@
             // TODO: test affine transforms ?
 
             if (TEST_STROKER) {
-                final float[][] dashArrays = (USE_DASHES)
-                        ? new float[][]{null, new float[]{1f, 2f}}
+                final float[][] dashArrays = (USE_DASHES) ?
+// small
+//                        new float[][]{new float[]{1f, 2f}}
+// normal
+                        new float[][]{new float[]{13f, 7f}}
+// large (prime)
+//                        new float[][]{new float[]{41f, 7f}}
+// none
                         : new float[][]{null};
 
-                System.out.println("dashes: " + Arrays.toString(dashArrays));
+                System.out.println("dashes: " + Arrays.deepToString(dashArrays));
 
                 final float[] strokeWidths = (USE_VAR_STROKE)
-                        ? new float[5] : new float[]{8f};
+                                                ? new float[5] :
+                                                  new float[]{10f};
 
                 int nsw = 0;
                 if (USE_VAR_STROKE) {
@@ -290,22 +391,20 @@
                     final double ratio = (100.0 * testCtx.histPix.count) / testCtx.histAll.count;
                     System.out.println("Diff ratio: " + testName + " = " + trimTo3Digits(ratio) + " %");
 
-                    if (false) {
-                        saveImage(diffImage, OUTPUT_DIR, testName + "-diff.png");
-                    }
-
-                    if (DUMP_SHAPE) {
-                        dumpShape(p2d);
-                    }
                     if (nd < MAX_SHOW_FRAMES) {
                         if (SHOW_DETAILS) {
                             paintShapeDetails(g2dOff, p2d);
                             paintShapeDetails(g2dOn, p2d);
                         }
 
-                        saveImage(imgOff, OUTPUT_DIR, testName + "-off.png");
-                        saveImage(imgOn, OUTPUT_DIR, testName + "-on.png");
-                        saveImage(diffImage, OUTPUT_DIR, testName + "-diff.png");
+                        if (nd < MAX_SAVE_FRAMES) {
+                            if (DUMP_SHAPE) {
+                                dumpShape(p2d);
+                            }
+                            saveImage(imgOff, OUTPUT_DIR, testName + "-off.png");
+                            saveImage(imgOn, OUTPUT_DIR, testName + "-on.png");
+                            saveImage(diffImage, OUTPUT_DIR, testName + "-diff.png");
+                        }
                     }
                 }
             }
@@ -351,6 +450,15 @@
         }
         g2d.setColor(Color.GRAY);
 
+        // Test scale
+        if (TX_SCALE) {
+            g2d.scale(1.2, 1.2);
+        }
+        // Test shear
+        if (TX_SHEAR) {
+            g2d.shear(0.1, 0.2);
+        }
+
         return g2d;
     }
 
@@ -470,6 +578,8 @@
                     }
                     break;
                 case PathIterator.SEG_LINETO:
+                case PathIterator.SEG_QUADTO:
+                case PathIterator.SEG_CUBICTO:
                     if (SHOW_POINTS) {
                         g2d.setColor((nLine % 2 == 0) ? COLOR_LINETO_ODD : COLOR_LINETO_EVEN);
                     }
@@ -515,6 +625,12 @@
                 case PathIterator.SEG_LINETO:
                     System.out.println("p2d.lineTo(" + coords[0] + ", " + coords[1] + ");");
                     break;
+                case PathIterator.SEG_QUADTO:
+                    System.out.println("p2d.quadTo(" + coords[0] + ", " + coords[1] + ", " + coords[2] + ", " + coords[3] + ");");
+                    break;
+                case PathIterator.SEG_CUBICTO:
+                    System.out.println("p2d.curveTo(" + coords[0] + ", " + coords[1] + ", " + coords[2] + ", " + coords[3] + ", " + coords[4] + ", " + coords[5] + ");");
+                    break;
                 case PathIterator.SEG_CLOSE:
                     System.out.println("p2d.closePath();");
                     break;
@@ -580,10 +696,54 @@
 
         @Override
         public String toString() {
+            if (isStroke()) {
+                return "TestSetup{id=" + id + ", shapeMode=" + shapeMode + ", closed=" + closed
+                        + ", strokeWidth=" + strokeWidth + ", strokeCap=" + getCap(strokeCap) + ", strokeJoin=" + getJoin(strokeJoin)
+                        + ((dashes != null) ? ", dashes: " + Arrays.toString(dashes) : "")
+                        + '}';
+            }
             return "TestSetup{id=" + id + ", shapeMode=" + shapeMode + ", closed=" + closed
-                    + ", strokeWidth=" + strokeWidth + ", strokeCap=" + strokeCap + ", strokeJoin=" + strokeJoin
-                    + ((dashes != null) ? ", dashes: " + Arrays.toString(dashes) : "")
-                    + ", windingRule=" + windingRule + '}';
+                    + ", fill"
+                    + ", windingRule=" + getWindingRule(windingRule) + '}';
+        }
+
+        private static String getCap(final int cap) {
+            switch (cap) {
+                case BasicStroke.CAP_BUTT:
+                    return "CAP_BUTT";
+                case BasicStroke.CAP_ROUND:
+                    return "CAP_ROUND";
+                case BasicStroke.CAP_SQUARE:
+                    return "CAP_SQUARE";
+                default:
+                    return "";
+            }
+
+        }
+
+        private static String getJoin(final int join) {
+            switch (join) {
+                case BasicStroke.JOIN_MITER:
+                    return "JOIN_MITER";
+                case BasicStroke.JOIN_ROUND:
+                    return "JOIN_ROUND";
+                case BasicStroke.JOIN_BEVEL:
+                    return "JOIN_BEVEL";
+                default:
+                    return "";
+            }
+
+        }
+
+        private static String getWindingRule(final int rule) {
+            switch (rule) {
+                case PathIterator.WIND_EVEN_ODD:
+                    return "WIND_EVEN_ODD";
+                case PathIterator.WIND_NON_ZERO:
+                    return "WIND_NON_ZERO";
+                default:
+                    return "";
+            }
         }
     }
 
@@ -618,16 +778,23 @@
             // max difference on grayscale values:
             v = (int) Math.ceil(Math.abs(dg / 3.0));
 
-            aDifPix[i] = toInt(v, v, v);
+// TODO: count warnings
+            if (v <= THRESHOLD_DELTA) {
+                aDifPix[i] = 0;
+            } else {
+                aDifPix[i] = toInt(v, v, v);
 
-            localCtx.add(v);
+                localCtx.add(v);
+            }
             globalCtx.add(v);
         }
 
-        if (!localCtx.isDiff()) {
+        if (!localCtx.isDiff() || (localCtx.histPix.count <= THRESHOLD_NBPIX)) {
             return null;
         }
 
+        localCtx.dump();
+
         return diffImage;
     }
 
--- a/test/langtools/ProblemList.txt	Thu Apr 05 11:18:39 2018 -0700
+++ b/test/langtools/ProblemList.txt	Fri Apr 06 03:53:28 2018 +0200
@@ -38,6 +38,7 @@
 
 jdk/jshell/UserJdiUserRemoteTest.java                                           8173079    linux-all
 jdk/jshell/UserInputTest.java                                                   8169536    generic-all
+jdk/jshell/ExceptionsTest.java                                                  8200701    windows-all
 
 ###########################################################################
 #
--- a/test/langtools/jdk/javadoc/doclet/testSearch/TestSearch.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/test/langtools/jdk/javadoc/doclet/testSearch/TestSearch.java	Fri Apr 06 03:53:28 2018 +0200
@@ -24,7 +24,7 @@
 /*
  * @test
  * @bug 8141492 8071982 8141636 8147890 8166175 8168965 8176794 8175218 8147881
- *      8181622 8182263 8074407 8187521 8198522 8182765
+ *      8181622 8182263 8074407 8187521 8198522 8182765 8199278
  * @summary Test the search feature of javadoc.
  * @author bpatel
  * @library ../lib
@@ -307,14 +307,44 @@
 
     @Test
     void testNoModuleDirectories() {
-        javadoc("-d", "out-noMdlDir", "--no-module-directories", "-Xdoclint:none",
+        javadoc("-d", "out-noMdlDir",
+                "--no-module-directories",
+                "-Xdoclint:none",
                 "-sourcepath", testSrc,
-                "-use", "pkg", "pkg1", "pkg2", "pkg3");
+                "-use",
+                "pkg", "pkg1", "pkg2", "pkg3");
         checkExit(Exit.OK);
         checkSearchOutput(true, false);
         checkSearchJS();
     }
 
+    @Test
+    void testURLEncoding() {
+        javadoc("-d", "out-encode-html5",
+                "--no-module-directories",
+                "-Xdoclint:none",
+                "-sourcepath", testSrc,
+                "-use",
+                "pkg", "pkg1", "pkg2", "pkg3");
+        checkExit(Exit.OK);
+        checkSearchJS();
+        checkSearchIndex(true);
+    }
+
+    @Test
+    void testURLEncoding_html4() {
+        javadoc("-d", "out-encode-html4",
+                "-html4",
+                "--no-module-directories",
+                "-Xdoclint:none",
+                "-sourcepath", testSrc,
+                "-use",
+                "pkg", "pkg1", "pkg2", "pkg3");
+        checkExit(Exit.OK);
+        checkSearchJS();
+        checkSearchIndex(false);
+    }
+
     void checkDocLintErrors() {
         checkOutput(Output.OUT, true,
                 "A sample method. Testing search tag for {@index \"unclosed quote}.",
@@ -327,6 +357,19 @@
         checkSearchOutput("overview-summary.html", expectedOutput, true);
     }
 
+    void checkSearchIndex(boolean expectedOutput) {
+        checkOutput("member-search-index.js", expectedOutput,
+                "{\"p\":\"pkg\",\"c\":\"AnotherClass\",\"l\":\"AnotherClass()\",\"url\":\"%3Cinit%3E()\"}",
+                "{\"p\":\"pkg1\",\"c\":\"RegClass\",\"l\":\"RegClass()\",\"url\":\"%3Cinit%3E()\"}",
+                "{\"p\":\"pkg2\",\"c\":\"TestError\",\"l\":\"TestError()\",\"url\":\"%3Cinit%3E()\"}",
+                "{\"p\":\"pkg\",\"c\":\"AnotherClass\",\"l\":\"method(byte[], int, String)\",\"url\":\"method(byte[],int,java.lang.String)\"}");
+        checkOutput("member-search-index.js", !expectedOutput,
+                "{\"p\":\"pkg\",\"c\":\"AnotherClass\",\"l\":\"method(RegClass)\",\"url\":\"method-pkg1.RegClass-\"}",
+                "{\"p\":\"pkg2\",\"c\":\"TestClass\",\"l\":\"TestClass()\",\"url\":\"TestClass--\"}",
+                "{\"p\":\"pkg\",\"c\":\"TestError\",\"l\":\"TestError()\",\"url\":\"TestError--\"}",
+                "{\"p\":\"pkg\",\"c\":\"AnotherClass\",\"l\":\"method(byte[], int, String)\",\"url\":\"method-byte:A-int-java.lang.String-\"}");
+    }
+
     void checkSearchOutput(boolean expectedOutput, boolean moduleDirectoriesVar) {
         checkSearchOutput("overview-summary.html", expectedOutput, moduleDirectoriesVar);
     }
@@ -594,7 +637,8 @@
                 + "        }\n"
                 + "    }\n"
                 + "    return urlPrefix;\n"
-                + "}");
+                + "}",
+                "url += ui.item.l;");
     }
 
     void checkSingleIndexSearchTagDuplication() {
--- a/test/langtools/jdk/javadoc/doclet/testSearch/pkg/AnotherClass.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/test/langtools/jdk/javadoc/doclet/testSearch/pkg/AnotherClass.java	Fri Apr 06 03:53:28 2018 +0200
@@ -75,4 +75,14 @@
     public pkg1.RegClass method(pkg1.RegClass param) {
         return param;
     }
+
+    /**
+     * Method to test member search index URL.
+     *
+     * @param testArray some test array.
+     * @param testInt some test int.
+     * @param testString some test string.
+     */
+    public void method(byte[] testArray, int testInt, String testString) {
+    }
 }
--- a/test/langtools/jdk/jshell/ExceptionsTest.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/test/langtools/jdk/jshell/ExceptionsTest.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,16 +24,20 @@
 /*
  * @test
  * @summary Tests for exceptions
+ * @bug 8198801
  * @build KullaTesting TestingInputStream
  * @run testng ExceptionsTest
  */
 
-import jdk.jshell.SnippetEvent;
-import jdk.jshell.EvalException;
+import java.io.IOException;
 import java.io.PrintWriter;
 import java.io.StringWriter;
+import jdk.jshell.EvalException;
+import jdk.jshell.JShellException;
+import jdk.jshell.Snippet;
+import jdk.jshell.SnippetEvent;
+import jdk.jshell.UnresolvedReferenceException;
 
-import jdk.jshell.Snippet;
 import org.testng.annotations.Test;
 
 import static org.testng.Assert.*;
@@ -81,6 +85,54 @@
                         newStackTraceElement("", "", cr3.snippet(), 1)));
     }
 
+    public void throwChained() {
+        String message1 = "error_message1";
+        String message2 = "error_message2";
+        Snippet s1 = methodKey(assertEval("void p() throws Exception { ((String) null).toString(); }"));
+        Snippet s2 = methodKey(assertEval("void n() throws Exception { try { p(); } catch (Exception ex) { throw new java.io.IOException(\"" + message2 + "\", ex); }}"));
+        Snippet s3 = methodKey(assertEval("void m() {\n"
+                + "try { n(); }\n"
+                + "catch (Exception ex) {\n"
+                + "    throw new RuntimeException(\"" + message1 + "\", ex);\n"
+                + "}}"));
+        SnippetEvent cr4 = assertEvalException("m();");
+        assertExceptionMatch(cr4,
+                new ExceptionInfo(RuntimeException.class, message1,
+                        new ExceptionInfo(IOException.class, message2,
+                                new ExceptionInfo(NullPointerException.class, null,
+                                        newStackTraceElement("", "p", s1, 1),
+                                        newStackTraceElement("", "n", s2, 1),
+                                        newStackTraceElement("", "m", s3, 2),
+                                        newStackTraceElement("", "", cr4.snippet(), 1)),
+                                newStackTraceElement("", "n", s2, 1),
+                                newStackTraceElement("", "m", s3, 2),
+                                newStackTraceElement("", "", cr4.snippet(), 1)),
+                        newStackTraceElement("", "m", s3, 4),
+                        newStackTraceElement("", "", cr4.snippet(), 1)));
+    }
+
+    public void throwChainedUnresolved() {
+        String message1 = "error_message1";
+        String message2 = "error_message2";
+        Snippet s1 = methodKey(assertEval("void p() throws Exception { ((String) null).toString(); }"));
+        Snippet s2 = methodKey(assertEval("void n() throws Exception { try { p(); } catch (Exception ex) { throw new java.io.IOException(\"" + message2 + "\", ex); }}"));
+        Snippet s3 = methodKey(assertEval("void m() {\n"
+                + "try { n(); }\n"
+                + "catch (Exception ex) {\n"
+                + "    throw new RuntimeException(\"" + message1 + "\", ex);\n"
+                + "}}"));
+        getState().drop(s1);
+        SnippetEvent cr4 = assertEvalException("m();");
+        assertExceptionMatch(cr4,
+                new ExceptionInfo(RuntimeException.class, message1,
+                        new UnresolvedExceptionInfo(s2,
+                                newStackTraceElement("", "n", s2, 1),
+                                newStackTraceElement("", "m", s3, 2),
+                                newStackTraceElement("", "", cr4.snippet(), 1)),
+                        newStackTraceElement("", "m", s3, 4),
+                        newStackTraceElement("", "", cr4.snippet(), 1)));
+    }
+
     public void throwFromConstructor() {
         String message = "error_message";
         Snippet s1 = methodKey(assertEval("void f() { throw new RuntimeException(\"" + message + "\"); }"));
@@ -171,15 +223,42 @@
         return new StackTraceElement(className, methodName, "#" + key.id(), lineNumber);
     }
 
-    private static class ExceptionInfo {
-        public final Class<? extends Throwable> exception;
-        public final String message;
+    private static class AnyExceptionInfo {
+
         public final StackTraceElement[] stackTraceElements;
 
-        public ExceptionInfo(Class<? extends Throwable> exception, String message, StackTraceElement...stackTraceElements) {
+        public AnyExceptionInfo(StackTraceElement... stackTraceElements) {
+            this.stackTraceElements = stackTraceElements.length == 0 ? null : stackTraceElements;
+        }
+    }
+
+    private static class UnresolvedExceptionInfo extends AnyExceptionInfo {
+
+        public final Snippet sn;
+
+        public UnresolvedExceptionInfo(Snippet sn, StackTraceElement... stackTraceElements) {
+            super(stackTraceElements);
+            this.sn = sn;
+        }
+    }
+
+    private static class ExceptionInfo extends AnyExceptionInfo {
+
+        public final Class<? extends Throwable> exception;
+        public final String message;
+        public final AnyExceptionInfo cause;
+
+        public ExceptionInfo(Class<? extends Throwable> exception, String message,
+                StackTraceElement... stackTraceElements) {
+            this(exception, message, null, stackTraceElements);
+        }
+
+        public ExceptionInfo(Class<? extends Throwable> exception, String message,
+                AnyExceptionInfo cause, StackTraceElement... stackTraceElements) {
+            super(stackTraceElements);
             this.exception = exception;
             this.message = message;
-            this.stackTraceElements = stackTraceElements.length == 0 ? null : stackTraceElements;
+            this.cause = cause;
         }
     }
 
@@ -188,28 +267,51 @@
     }
 
     private void assertExceptionMatch(SnippetEvent cr, ExceptionInfo exceptionInfo) {
-        assertNotNull(cr.exception(), "Expected exception was not thrown: " + exceptionInfo.exception);
-        if (cr.exception() instanceof EvalException) {
-            EvalException ex = (EvalException) cr.exception();
+        assertExceptionMatch(cr.exception(), cr.snippet().source(), exceptionInfo);
+    }
+
+    private void assertExceptionMatch(Throwable exception, String source, ExceptionInfo exceptionInfo) {
+        assertNotNull(exception, "Expected exception was not thrown: " + exceptionInfo.exception);
+        if (exception instanceof EvalException) {
+            EvalException ex = (EvalException) exception;
             String actualException = ex.getExceptionClassName();
             String expectedException = exceptionInfo.exception.getCanonicalName();
-            String stackTrace = getStackTrace(ex);
-            String source = cr.snippet().source();
             assertEquals(actualException, expectedException,
                     String.format("Given \"%s\" expected exception: %s, got: %s%nStack trace:%n%s",
-                            source, expectedException, actualException, stackTrace));
+                            source, expectedException, actualException, getStackTrace(ex)));
             if (exceptionInfo.message != null) {
                 assertEquals(ex.getMessage(), exceptionInfo.message,
                         String.format("Given \"%s\" expected message: %s, got: %s",
                                 source, exceptionInfo.message, ex.getMessage()));
             }
-            if (exceptionInfo.stackTraceElements != null) {
-                assertStackTrace(ex.getStackTrace(), exceptionInfo.stackTraceElements,
-                        String.format("Given \"%s\"%nStack trace:%n%s%n",
-                                source, stackTrace));
+            assertStackMatch(ex, source, exceptionInfo);
+            if (exceptionInfo.cause != null) {
+                assertAnyExceptionMatch(exception.getCause(), exceptionInfo.cause);
             }
         } else {
-            fail("Unexpected execution exceptionInfo: " + cr.exception());
+            fail("Unexpected exception: " + exception + " or exceptionInfo: " + exceptionInfo);
+        }
+    }
+
+    private void assertStackMatch(JShellException exception, String source, AnyExceptionInfo exceptionInfo) {
+        if (exceptionInfo.stackTraceElements != null) {
+            assertStackTrace(exception.getStackTrace(), exceptionInfo.stackTraceElements,
+                    String.format("Given \"%s\"%nStack trace:%n%s%n",
+                            source, getStackTrace(exception)));
+        }
+    }
+
+    private void assertAnyExceptionMatch(Throwable exception, AnyExceptionInfo exceptionInfo) {
+        if (exceptionInfo instanceof ExceptionInfo) {
+            assertExceptionMatch(exception, "", (ExceptionInfo) exceptionInfo);
+        } else {
+            assertTrue(exceptionInfo instanceof UnresolvedExceptionInfo, "Bad exceptionInfo: " + exceptionInfo);
+            assertTrue(exception instanceof UnresolvedReferenceException,
+                    "Expected UnresolvedReferenceException: " + exception);
+            UnresolvedExceptionInfo uei = (UnresolvedExceptionInfo) exceptionInfo;
+            UnresolvedReferenceException ure = (UnresolvedReferenceException) exception;
+            assertEquals(ure.getSnippet(), uei.sn);
+            assertStackMatch(ure, "", exceptionInfo);
         }
     }
 
@@ -236,7 +338,7 @@
         }
     }
 
-    private String getStackTrace(EvalException ex) {
+    private String getStackTrace(Throwable ex) {
         StringWriter st = new StringWriter();
         ex.printStackTrace(new PrintWriter(st));
         return st.toString();
--- a/test/langtools/jdk/jshell/MethodsTest.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/test/langtools/jdk/jshell/MethodsTest.java	Fri Apr 06 03:53:28 2018 +0200
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug 8080357 8167643 8187359
+ * @bug 8080357 8167643 8187359 8199762
  * @summary Tests for EvaluationState.methods
  * @build KullaTesting TestingInputStream ExpectedDiagnostic
  * @run testng MethodsTest
@@ -199,6 +199,23 @@
         assertActiveKeys();
     }
 
+    // 8199762
+    public void methodsRedeclaration5() {
+        Snippet m1 = methodKey(assertEval("int m(Object o) { return 10; }"));
+        assertMethods(method("(Object)int", "m"));
+
+        Snippet m2 = methodKey(assertEval("int m(Object o) { return 30; }",
+                ste(MAIN_SNIPPET, VALID, VALID, false, null),
+                ste(m1, VALID, OVERWRITTEN, false, MAIN_SNIPPET)));
+
+        assertEval("<T> int m(T o) { return 30; }",
+                ste(MAIN_SNIPPET, VALID, VALID, true, null),
+                ste(m2, VALID, OVERWRITTEN, false, MAIN_SNIPPET));
+        assertMethods(method("(T)int", "m"));
+        assertEval("m(null)", "30");
+        assertActiveKeys();
+    }
+
     public void methodsErrors() {
         assertDeclareFail("String f();",
                 new ExpectedDiagnostic("compiler.err.missing.meth.body.or.decl.abstract", 0, 11, 7, -1, -1, Diagnostic.Kind.ERROR));
--- a/test/langtools/jdk/jshell/ToolSimpleTest.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/test/langtools/jdk/jshell/ToolSimpleTest.java	Fri Apr 06 03:53:28 2018 +0200
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug 8153716 8143955 8151754 8150382 8153920 8156910 8131024 8160089 8153897 8167128 8154513 8170015 8170368 8172102 8172103  8165405 8173073 8173848 8174041 8173916 8174028 8174262 8174797 8177079 8180508 8177466 8172154 8192979 8191842 8198573
+ * @bug 8153716 8143955 8151754 8150382 8153920 8156910 8131024 8160089 8153897 8167128 8154513 8170015 8170368 8172102 8172103  8165405 8173073 8173848 8174041 8173916 8174028 8174262 8174797 8177079 8180508 8177466 8172154 8192979 8191842 8198573 8198801
  * @summary Simple jshell tool tests
  * @modules jdk.compiler/com.sun.tools.javac.api
  *          jdk.compiler/com.sun.tools.javac.main
@@ -87,6 +87,32 @@
     }
 
     @Test
+    public void testChainedThrow() {
+        test(
+                (a) -> assertCommand(a, "void p() throws Exception { ((String) null).toString(); }",
+                        "|  created method p()"),
+                (a) -> assertCommand(a, "void n() throws Exception { try { p(); } catch (Exception ex) { throw new IOException(\"bar\", ex); }}",
+                        "|  created method n()"),
+                (a) -> assertCommand(a, "void m() { try { n(); } catch (Exception ex) { throw new RuntimeException(\"foo\", ex); }}",
+                        "|  created method m()"),
+                (a) -> assertCommand(a, "m()",
+                          "|  Exception java.lang.RuntimeException: foo\n"
+                        + "|        at m (#3:1)\n"
+                        + "|        at (#4:1)\n"
+                        + "|  Caused by: java.io.IOException: bar\n"
+                        + "|        at n (#2:1)\n"
+                        + "|        ...\n"
+                        + "|  Caused by: java.lang.NullPointerException\n"
+                        + "|        at p (#1:1)\n"
+                        + "|        ..."),
+                (a) -> assertCommand(a, "/drop p",
+                        "|  dropped method p()"),
+                (a) -> assertCommand(a, "m()",
+                        "|  attempted to call method n() which cannot be invoked until method p() is declared")
+        );
+    }
+
+    @Test
     public void oneLineOfError() {
         test(
                 (a) -> assertCommand(a, "12+", null),
--- a/test/langtools/tools/javac/ClassFileModifiers/ClassModifiers.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/test/langtools/tools/javac/ClassFileModifiers/ClassModifiers.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -28,7 +28,7 @@
  * file are correct, including those within InnerClasses attributes.
  * @author John Rose (jrose). Entered as a regression test by Bill Maddox (maddox).
  *
- * @compile/ref=ClassModifiers.out --debug:dumpmodifiers=ci ClassModifiers.java
+ * @compile/ref=ClassModifiers.out --debug=dumpmodifiers=ci ClassModifiers.java
  *
  */
 
--- a/test/langtools/tools/javac/ClassFileModifiers/MemberModifiers.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/test/langtools/tools/javac/ClassFileModifiers/MemberModifiers.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,7 @@
  * @bug 4249112 4785453
  * @summary Verify that implicit member modifiers are set correctly.
  *
- * @compile/ref=MemberModifiers.out --debug:dumpmodifiers=cfm MemberModifiers.java
+ * @compile/ref=MemberModifiers.out --debug=dumpmodifiers=cfm MemberModifiers.java
  */
 
 // Currently, we check only that members of final classes are not final.
--- a/test/langtools/tools/javac/Diagnostics/6722234/T6722234a.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/test/langtools/tools/javac/Diagnostics/6722234/T6722234a.java	Fri Apr 06 03:53:28 2018 +0200
@@ -3,8 +3,8 @@
  * @bug     6722234
  * @summary javac diagnostics need better integration with the type-system
  * @author  mcimadamore
- * @compile/fail/ref=T6722234a_1.out -XDrawDiagnostics --diags:formatterOptions=disambiguateTvars T6722234a.java
- * @compile/fail/ref=T6722234a_2.out -XDrawDiagnostics --diags:formatterOptions=disambiguateTvars,where T6722234a.java
+ * @compile/fail/ref=T6722234a_1.out -XDrawDiagnostics --diags=formatterOptions=disambiguateTvars T6722234a.java
+ * @compile/fail/ref=T6722234a_2.out -XDrawDiagnostics --diags=formatterOptions=disambiguateTvars,where T6722234a.java
  */
 
 class T6722234a<T extends String> {
--- a/test/langtools/tools/javac/Diagnostics/6722234/T6722234b.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/test/langtools/tools/javac/Diagnostics/6722234/T6722234b.java	Fri Apr 06 03:53:28 2018 +0200
@@ -3,8 +3,8 @@
  * @bug     6722234 8078024
  * @summary javac diagnostics need better integration with the type-system
  * @author  mcimadamore
- * @compile/fail/ref=T6722234b_1.out -XDrawDiagnostics --diags:formatterOptions=simpleNames T6722234b.java
- * @compile/fail/ref=T6722234b_2.out -XDrawDiagnostics --diags:formatterOptions=simpleNames,where T6722234b.java
+ * @compile/fail/ref=T6722234b_1.out -XDrawDiagnostics --diags=formatterOptions=simpleNames T6722234b.java
+ * @compile/fail/ref=T6722234b_2.out -XDrawDiagnostics --diags=formatterOptions=simpleNames,where T6722234b.java
  */
 
 import java.util.*;
--- a/test/langtools/tools/javac/Diagnostics/6722234/T6722234c.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/test/langtools/tools/javac/Diagnostics/6722234/T6722234c.java	Fri Apr 06 03:53:28 2018 +0200
@@ -3,7 +3,7 @@
  * @bug     6722234
  * @summary javac diagnostics need better integration with the type-system
  * @author  mcimadamore
- * @compile/fail/ref=T6722234c.out -XDrawDiagnostics --diags:formatterOptions=simpleNames T6722234c.java
+ * @compile/fail/ref=T6722234c.out -XDrawDiagnostics --diags=formatterOptions=simpleNames T6722234c.java
  */
 
 class T6722234c {
--- a/test/langtools/tools/javac/Diagnostics/6722234/T6722234d.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/test/langtools/tools/javac/Diagnostics/6722234/T6722234d.java	Fri Apr 06 03:53:28 2018 +0200
@@ -3,8 +3,8 @@
  * @bug     6722234 8078024
  * @summary javac diagnostics need better integration with the type-system
  * @author  mcimadamore
- * @compile/fail/ref=T6722234d_1.out -XDrawDiagnostics --diags:formatterOptions=where T6722234d.java
- * @compile/fail/ref=T6722234d_2.out -XDrawDiagnostics --diags:formatterOptions=where,simpleNames T6722234d.java
+ * @compile/fail/ref=T6722234d_1.out -XDrawDiagnostics --diags=formatterOptions=where T6722234d.java
+ * @compile/fail/ref=T6722234d_2.out -XDrawDiagnostics --diags=formatterOptions=where,simpleNames T6722234d.java
  */
 
 class T6722234d {
--- a/test/langtools/tools/javac/Diagnostics/6862608/T6862608a.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/test/langtools/tools/javac/Diagnostics/6862608/T6862608a.java	Fri Apr 06 03:53:28 2018 +0200
@@ -3,7 +3,7 @@
  * @bug     6862608
  * @summary rich diagnostic sometimes contain wrong type variable numbering
  * @author  mcimadamore
- * @compile/fail/ref=T6862608a.out -XDrawDiagnostics --diags:formatterOptions=disambiguateTvars,where T6862608a.java
+ * @compile/fail/ref=T6862608a.out -XDrawDiagnostics --diags=formatterOptions=disambiguateTvars,where T6862608a.java
  */
 
 
--- a/test/langtools/tools/javac/Diagnostics/6862608/T6862608b.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/test/langtools/tools/javac/Diagnostics/6862608/T6862608b.java	Fri Apr 06 03:53:28 2018 +0200
@@ -3,7 +3,7 @@
  * @bug     6862608
  * @summary rich diagnostic sometimes contain wrong type variable numbering
  * @author  mcimadamore
- * @compile/fail/ref=T6862608b.out -XDrawDiagnostics --diags:formatterOptions=disambiguateTvars,where T6862608b.java
+ * @compile/fail/ref=T6862608b.out -XDrawDiagnostics --diags=formatterOptions=disambiguateTvars,where T6862608b.java
  */
 
 class T66862608b<T extends String, S> {
--- a/test/langtools/tools/javac/Diagnostics/7010608/Test.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/test/langtools/tools/javac/Diagnostics/7010608/Test.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -46,9 +46,9 @@
         try {
             test(Arrays.<String>asList(),
                     "myfo://test:1: error: cannot find symbol");
-            test(Arrays.asList("--diags:layout=OLD"),
+            test(Arrays.asList("--diags=layout=OLD"),
                     "myfo://test:1: cannot find symbol");
-            test(Arrays.asList("--diags:legacy"),
+            test(Arrays.asList("--diags=legacy"),
                     "myfo://test:1: cannot find symbol");
         } finally {
             Locale.setDefault(prev);
--- a/test/langtools/tools/javac/Diagnostics/8010387/T8010387.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/test/langtools/tools/javac/Diagnostics/8010387/T8010387.java	Fri Apr 06 03:53:28 2018 +0200
@@ -2,7 +2,7 @@
  * @test /nodynamiccopyright/
  * @bug     8010387
  * @summary rich diagnostic sometimes contain wrong type variable numbering
- * @compile/fail/ref=T8010387.out -XDrawDiagnostics --diags:formatterOptions=disambiguateTvars,where T8010387.java
+ * @compile/fail/ref=T8010387.out -XDrawDiagnostics --diags=formatterOptions=disambiguateTvars,where T8010387.java
  */
 abstract class T8010387<X> {
 
--- a/test/langtools/tools/javac/InterfaceMemberClassModifiers.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/test/langtools/tools/javac/InterfaceMemberClassModifiers.java	Fri Apr 06 03:53:28 2018 +0200
@@ -4,7 +4,7 @@
  * @summary Verify that invalid access modifiers on interface members don't cause crash.
  * @author maddox
  *
- * @compile/fail/ref=InterfaceMemberClassModifiers.out --diags:layout=%b:%l:%_%m InterfaceMemberClassModifiers.java
+ * @compile/fail/ref=InterfaceMemberClassModifiers.out --diags=layout=%b:%l:%_%m InterfaceMemberClassModifiers.java
  */
 
 public interface InterfaceMemberClassModifiers {
--- a/test/langtools/tools/javac/T6214885.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/test/langtools/tools/javac/T6214885.java	Fri Apr 06 03:53:28 2018 +0200
@@ -2,8 +2,8 @@
  * @test  /nodynamiccopyright/
  * @bug 6214885
  * @summary This test exercises features provided by the new internal Diagnostics API
- * @compile/fail/ref=T6214885a.out --diags:layout=%b:%l%_%t%m|%p%m T6214885.java
- * @compile/fail/ref=T6214885b.out --diags:layout=%b:%l:%c%_%t%m|%p%m T6214885.java
+ * @compile/fail/ref=T6214885a.out --diags=layout=%b:%l%_%t%m|%p%m T6214885.java
+ * @compile/fail/ref=T6214885b.out --diags=layout=%b:%l:%c%_%t%m|%p%m T6214885.java
  */
 class T6214885
 {
--- a/test/langtools/tools/javac/T8026963/TypeAnnotationsCrashWithErroneousTreeTest.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/test/langtools/tools/javac/T8026963/TypeAnnotationsCrashWithErroneousTreeTest.java	Fri Apr 06 03:53:28 2018 +0200
@@ -2,7 +2,7 @@
  * @test /nodynamiccopyright/
  * @bug 8026963
  * @summary type annotations code crashes for lambdas with void argument
- * @compile/fail/ref=TypeAnnotationsCrashWithErroneousTreeTest.out -XDrawDiagnostics --should-stop:at=FLOW TypeAnnotationsCrashWithErroneousTreeTest.java
+ * @compile/fail/ref=TypeAnnotationsCrashWithErroneousTreeTest.out -XDrawDiagnostics --should-stop=at=FLOW TypeAnnotationsCrashWithErroneousTreeTest.java
  */
 
 public class TypeAnnotationsCrashWithErroneousTreeTest {
--- a/test/langtools/tools/javac/annotations/neg/8022765/VerifyErroneousAnnotationsAttributed.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/test/langtools/tools/javac/annotations/neg/8022765/VerifyErroneousAnnotationsAttributed.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -237,7 +237,7 @@
         JavacTask task = tool.getTask(null,
                                       fm,
                                       devNull,
-                                      Arrays.asList("--should-stop:at=FLOW"),
+                                      Arrays.asList("--should-stop=at=FLOW"),
                                       null,
                                       Arrays.asList(new MyFileObject(code)));
 
--- a/test/langtools/tools/javac/annotations/typeAnnotations/classfile/InstanceInitializer.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/test/langtools/tools/javac/annotations/typeAnnotations/classfile/InstanceInitializer.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -28,9 +28,11 @@
 
 /*
  * @test
- * @bug 8136419
+ * @bug 8136419 8200301
  * @summary test that type annotations on entities in initializers are emitted to classfile
  * @modules jdk.jdeps/com.sun.tools.classfile
+ * @compile -XDdeduplicateLambdas=false InstanceInitializer.java
+ * @run main InstanceInitializer
  */
 
 public class InstanceInitializer extends ClassfileTestHelper {
--- a/test/langtools/tools/javac/annotations/typeAnnotations/classfile/StaticInitializer.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/test/langtools/tools/javac/annotations/typeAnnotations/classfile/StaticInitializer.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -28,9 +28,11 @@
 
 /*
  * @test
- * @bug 8136419
+ * @bug 8136419 8200301
  * @summary test that type annotations on entities in static initializers are emitted to classfile
  * @modules jdk.jdeps/com.sun.tools.classfile
+ * @compile -XDdeduplicateLambdas=false StaticInitializer.java
+ * @run main StaticInitializer
  */
 
 public class StaticInitializer extends ClassfileTestHelper {
--- a/test/langtools/tools/javac/annotations/typeAnnotations/newlocations/AfterMethodTypeParams.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/test/langtools/tools/javac/annotations/typeAnnotations/newlocations/AfterMethodTypeParams.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -54,7 +54,7 @@
             String test = TEMPLATE.replace("CONTENT", tc.snippet);
             List<JavaFileObject> files = Arrays.asList(new MyFileObject(test));
             StringWriter out = new StringWriter();
-            List<String> options = Arrays.asList("-XDrawDiagnostics", "--should-stop:at=FLOW");
+            List<String> options = Arrays.asList("-XDrawDiagnostics", "--should-stop=at=FLOW");
             JavacTask task = (JavacTask) compiler.getTask(out, null, null, options, null, files);
 
             new TreePathScanner<Void, Void>() {
--- a/test/langtools/tools/javac/api/6731573/T6731573.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/test/langtools/tools/javac/api/6731573/T6731573.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -62,8 +62,8 @@
 
     enum SourceLine {
         STANDARD(null),
-        ENABLED("--diags:showSource=true"),
-        DISABLED("--diags:showSource=false");
+        ENABLED("--diags=showSource=true"),
+        DISABLED("--diags=showSource=false");
 
         String optValue;
 
--- a/test/langtools/tools/javac/api/taskListeners/EventsBalancedTest.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/test/langtools/tools/javac/api/taskListeners/EventsBalancedTest.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -63,11 +63,11 @@
         test(null, Arrays.asList(b, a));
 
         for (CompileState stop : CompileState.values()) {
-            test(Arrays.asList("--should-stop:ifNoError=" + stop,
-                               "--should-stop:ifError=" + stop),
+            test(Arrays.asList("--should-stop=ifNoError=" + stop,
+                               "--should-stop=ifError=" + stop),
                  Arrays.asList(a, b));
-            test(Arrays.asList("--should-stop:ifNoError=" + stop,
-                               "--should-stop:ifError=" + stop),
+            test(Arrays.asList("--should-stop=ifNoError=" + stop,
+                               "--should-stop=ifError=" + stop),
                  Arrays.asList(b, a));
         }
     }
--- a/test/langtools/tools/javac/classfiles/attributes/Synthetic/BridgeMethodsForLambdaTest.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/test/langtools/tools/javac/classfiles/attributes/Synthetic/BridgeMethodsForLambdaTest.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug 8044537
+ * @bug 8044537 8200301
  * @summary Checking ACC_SYNTHETIC flag is generated for bridge method
  *          generated for lambda expressions and method references.
  * @modules jdk.compiler/com.sun.tools.javac.api
@@ -31,7 +31,8 @@
  *          jdk.jdeps/com.sun.tools.classfile
  * @library /tools/lib /tools/javac/lib ../lib
  * @build toolbox.ToolBox InMemoryFileManager TestResult TestBase
- * @build BridgeMethodsForLambdaTest SyntheticTestDriver ExpectedClass ExpectedClasses
+ * @build SyntheticTestDriver ExpectedClass ExpectedClasses
+ * @compile -XDdeduplicateLambdas=false BridgeMethodsForLambdaTest.java
  * @run main SyntheticTestDriver BridgeMethodsForLambdaTest 1
  */
 
--- a/test/langtools/tools/javac/completionDeps/DepsAndAnno.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/test/langtools/tools/javac/completionDeps/DepsAndAnno.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -47,7 +47,7 @@
     public static void main(String[] args) {
         ToolBox toolBox = new ToolBox();
         new JavacTask(toolBox, Task.Mode.CMDLINE)
-               .options("--debug:completionDeps")
+               .options("--debug=completionDeps")
                .outdir(".")
                .files(ToolBox.testSrc + "/DepsAndAnno.java")
                .run();
--- a/test/langtools/tools/javac/completionDeps/DepsAndDocLint.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/test/langtools/tools/javac/completionDeps/DepsAndDocLint.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
  * @test
  * @bug 8078389
  * @summary Make sure there is no interference between completionDeps and doclint
- * @compile --debug:completionDeps -Xdoclint DepsAndDocLint.java
+ * @compile --debug=completionDeps -Xdoclint DepsAndDocLint.java
  */
 
 public class DepsAndDocLint {
--- a/test/langtools/tools/javac/diags/examples/ApplicableMethodFound.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/test/langtools/tools/javac/diags/examples/ApplicableMethodFound.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -23,7 +23,7 @@
 
 // key: compiler.misc.applicable.method.found
 // key: compiler.note.verbose.resolve.multi
-// options: --debug:verboseResolution=applicable,success
+// options: --debug=verboseResolution=applicable,success
 
 class ApplicableMethodFound {
 
--- a/test/langtools/tools/javac/diags/examples/ApplicableMethodFound1.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/test/langtools/tools/javac/diags/examples/ApplicableMethodFound1.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,7 +24,7 @@
 // key: compiler.misc.applicable.method.found.1
 // key: compiler.note.verbose.resolve.multi
 // key: compiler.misc.partial.inst.sig
-// options: --debug:verboseResolution=applicable,success
+// options: --debug=verboseResolution=applicable,success
 
 class ApplicableMethodFound1 {
 
--- a/test/langtools/tools/javac/diags/examples/DeferredMethodInst.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/test/langtools/tools/javac/diags/examples/DeferredMethodInst.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
 // key: compiler.note.verbose.resolve.multi
 // key: compiler.note.deferred.method.inst
 // key: compiler.misc.partial.inst.sig
-// options: --debug:verboseResolution=applicable,success,deferred-inference
+// options: --debug=verboseResolution=applicable,success,deferred-inference
 
 class DeferredMethodInst {
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/langtools/tools/javac/diags/examples/LambdaDeduplicate.java	Fri Apr 06 03:53:28 2018 +0200
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2018, Google LLC. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+
+// key: compiler.note.verbose.l2m.deduplicate
+// options: --debug=dumpLambdaToMethodDeduplication
+
+import java.util.function.Function;
+
+public class LambdaDeduplicate {
+  Function<Integer, Integer> f1 = x -> x;
+  Function<Integer, Integer> f2 = x -> x;
+}
--- a/test/langtools/tools/javac/diags/examples/LambdaStat.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/test/langtools/tools/javac/diags/examples/LambdaStat.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -22,7 +22,7 @@
  */
 
 // key: compiler.note.lambda.stat
-// options: --debug:dumpLambdaToMethodStats
+// options: --debug=dumpLambdaToMethodStats
 
 class LambdaStat {
     Runnable r = ()->{};
--- a/test/langtools/tools/javac/diags/examples/MrefStat.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/test/langtools/tools/javac/diags/examples/MrefStat.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -22,7 +22,7 @@
  */
 
 // key: compiler.note.mref.stat
-// options: --debug:dumpLambdaToMethodStats
+// options: --debug=dumpLambdaToMethodStats
 
 class MrefStat {
     Runnable r = MrefStat::m;
--- a/test/langtools/tools/javac/diags/examples/MrefStat1.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/test/langtools/tools/javac/diags/examples/MrefStat1.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -22,7 +22,7 @@
  */
 
 // key: compiler.note.mref.stat.1
-// options: --debug:dumpLambdaToMethodStats
+// options: --debug=dumpLambdaToMethodStats
 
 class MrefStat1 {
 
--- a/test/langtools/tools/javac/diags/examples/NotApplicableMethodFound.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/test/langtools/tools/javac/diags/examples/NotApplicableMethodFound.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,7 @@
 // key: compiler.err.cant.apply.symbol
 // key: compiler.misc.no.conforming.assignment.exists
 // key: compiler.misc.inconvertible.types
-// options: --debug:verboseResolution=inapplicable,failure
+// options: --debug=verboseResolution=inapplicable,failure
 
 class NotApplicableMethodFound {
 
--- a/test/langtools/tools/javac/diags/examples/PartialInstSig.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/test/langtools/tools/javac/diags/examples/PartialInstSig.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,7 +24,7 @@
 // key: compiler.misc.applicable.method.found.1
 // key: compiler.note.verbose.resolve.multi
 // key: compiler.misc.partial.inst.sig
-// options: --debug:verboseResolution=applicable,success
+// options: --debug=verboseResolution=applicable,success
 
 class PartialInstSig {
 
--- a/test/langtools/tools/javac/diags/examples/VerboseResolveMulti.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/test/langtools/tools/javac/diags/examples/VerboseResolveMulti.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -23,7 +23,7 @@
 
 // key: compiler.misc.applicable.method.found
 // key: compiler.note.verbose.resolve.multi
-// options: --debug:verboseResolution=applicable,success
+// options: --debug=verboseResolution=applicable,success
 
 class VerboseResolveMulti {
 
--- a/test/langtools/tools/javac/diags/examples/VerboseResolveMulti1.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/test/langtools/tools/javac/diags/examples/VerboseResolveMulti1.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,7 @@
 // key: compiler.err.cant.apply.symbol
 // key: compiler.misc.no.conforming.assignment.exists
 // key: compiler.misc.inconvertible.types
-// options: --debug:verboseResolution=inapplicable,failure
+// options: --debug=verboseResolution=inapplicable,failure
 
 class VerboseResolveMulti1 {
 
--- a/test/langtools/tools/javac/diags/examples/WhereCaptured.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/test/langtools/tools/javac/diags/examples/WhereCaptured.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -28,7 +28,7 @@
 // key: compiler.err.cant.apply.symbol
 // key: compiler.misc.incompatible.eq.bounds
 // key: compiler.misc.captured.type
-// options: --diags:formatterOptions=where,simpleNames
+// options: --diags=formatterOptions=where,simpleNames
 // run: simple
 
 import java.util.*;
--- a/test/langtools/tools/javac/diags/examples/WhereCaptured1.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/test/langtools/tools/javac/diags/examples/WhereCaptured1.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -29,7 +29,7 @@
 // key: compiler.misc.incompatible.eq.bounds
 // key: compiler.misc.captured.type
 // key: compiler.misc.type.null
-// options: --diags:formatterOptions=where,simpleNames
+// options: --diags=formatterOptions=where,simpleNames
 // run: simple
 
 import java.util.*;
--- a/test/langtools/tools/javac/diags/examples/WhereFreshTvar.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/test/langtools/tools/javac/diags/examples/WhereFreshTvar.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
 // key: compiler.misc.where.description.typevar
 // key: compiler.err.prob.found.req
 // key: compiler.misc.inconvertible.types
-// options: --diags:formatterOptions=where,simpleNames
+// options: --diags=formatterOptions=where,simpleNames
 // run: simple
 
 import java.util.*;
--- a/test/langtools/tools/javac/diags/examples/WhereIntersection.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/test/langtools/tools/javac/diags/examples/WhereIntersection.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,7 @@
 // key: compiler.misc.where.description.intersection.1
 // key: compiler.misc.where.intersection
 // key: compiler.err.prob.found.req
-// options: --diags:formatterOptions=where
+// options: --diags=formatterOptions=where
 // run: simple
 
 class WhereIntersection {
--- a/test/langtools/tools/javac/diags/examples/WhereIntersection2.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/test/langtools/tools/javac/diags/examples/WhereIntersection2.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -29,7 +29,7 @@
 // key: compiler.misc.where.description.intersection
 // key: compiler.misc.where.intersection
 // key: compiler.err.prob.found.req
-// options: --diags:formatterOptions=where
+// options: --diags=formatterOptions=where
 // run: simple
 
 class WhereIntersection2 {
--- a/test/langtools/tools/javac/diags/examples/WhereTypeVar.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/test/langtools/tools/javac/diags/examples/WhereTypeVar.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -27,7 +27,7 @@
 // key: compiler.err.cant.apply.symbol
 // key: compiler.misc.no.conforming.assignment.exists
 // key: compiler.misc.inconvertible.types
-// options: --diags:formatterOptions=where,disambiguateTvars
+// options: --diags=formatterOptions=where,disambiguateTvars
 // run: simple
 
 class WhereTypeVar<T extends String> {
--- a/test/langtools/tools/javac/diags/examples/WhereTypeVar2.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/test/langtools/tools/javac/diags/examples/WhereTypeVar2.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
 // key: compiler.misc.where.description.typevar
 // key: compiler.misc.where.typevar
 // key: compiler.err.prob.found.req
-// options: --diags:formatterOptions=where
+// options: --diags=formatterOptions=where
 // run: simple
 
 class WhereTypeVar2 {
--- a/test/langtools/tools/javac/failover/CheckAttributedTree.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/test/langtools/tools/javac/failover/CheckAttributedTree.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -315,7 +315,7 @@
             totalNumberOfCompilations++;
             newCompilationTask()
                 .withWriter(pw)
-                    .withOption("--should-stop:at=ATTR")
+                    .withOption("--should-stop=at=ATTR")
                     .withOption("-XDverboseCompilePolicy")
                     .withOption("-Xdoclint:none")
                     .withSource(files.iterator().next())
--- a/test/langtools/tools/javac/failover/FailOver01.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/test/langtools/tools/javac/failover/FailOver01.java	Fri Apr 06 03:53:28 2018 +0200
@@ -4,7 +4,7 @@
  * @summary Flow.java should be more error-friendly
  * @author mcimadamore
  *
- * @compile/fail/ref=FailOver01.out -XDrawDiagnostics --should-stop:at=FLOW -XDdev FailOver01.java
+ * @compile/fail/ref=FailOver01.out -XDrawDiagnostics --should-stop=at=FLOW -XDdev FailOver01.java
  */
 
 class Test { { x = "" } }
--- a/test/langtools/tools/javac/failover/FailOver02.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/test/langtools/tools/javac/failover/FailOver02.java	Fri Apr 06 03:53:28 2018 +0200
@@ -4,7 +4,7 @@
  * @summary Flow.java should be more error-friendly
  * @author mcimadamore
  *
- * @compile/fail/ref=FailOver02.out -XDrawDiagnostics --should-stop:at=FLOW -XDdev FailOver02.java
+ * @compile/fail/ref=FailOver02.out -XDrawDiagnostics --should-stop=at=FLOW -XDdev FailOver02.java
  */
 
 class Test implements AutoCloseable {
--- a/test/langtools/tools/javac/failover/FailOver03.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/test/langtools/tools/javac/failover/FailOver03.java	Fri Apr 06 03:53:28 2018 +0200
@@ -4,7 +4,7 @@
  * @summary Flow.java should be more error-friendly
  * @author mcimadamore
  *
- * @compile/fail/ref=FailOver03.out -XDrawDiagnostics --should-stop:at=FLOW -XDdev FailOver03.java
+ * @compile/fail/ref=FailOver03.out -XDrawDiagnostics --should-stop=at=FLOW -XDdev FailOver03.java
  */
 
 class Test extends Test {
--- a/test/langtools/tools/javac/failover/FailOver04.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/test/langtools/tools/javac/failover/FailOver04.java	Fri Apr 06 03:53:28 2018 +0200
@@ -4,7 +4,7 @@
  * @summary Flow.java should be more error-friendly
  * @author mcimadamore
  *
- * @compile/fail/ref=FailOver04.out -XDrawDiagnostics --should-stop:at=FLOW -XDdev FailOver04.java
+ * @compile/fail/ref=FailOver04.out -XDrawDiagnostics --should-stop=at=FLOW -XDdev FailOver04.java
  */
 
 class Test {
--- a/test/langtools/tools/javac/failover/FailOver05.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/test/langtools/tools/javac/failover/FailOver05.java	Fri Apr 06 03:53:28 2018 +0200
@@ -4,7 +4,7 @@
  * @summary Flow.java should be more error-friendly
  * @author mcimadamore
  *
- * @compile/fail/ref=FailOver05.out -XDrawDiagnostics --should-stop:at=FLOW -XDdev FailOver05.java
+ * @compile/fail/ref=FailOver05.out -XDrawDiagnostics --should-stop=at=FLOW -XDdev FailOver05.java
  */
 
 class Test extends Test {
--- a/test/langtools/tools/javac/failover/FailOver06.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/test/langtools/tools/javac/failover/FailOver06.java	Fri Apr 06 03:53:28 2018 +0200
@@ -4,7 +4,7 @@
  * @summary Flow.java should be more error-friendly
  * @author mcimadamore
  *
- * @compile/fail/ref=FailOver06.out -XDrawDiagnostics --should-stop:at=FLOW -XDdev FailOver06.java
+ * @compile/fail/ref=FailOver06.out -XDrawDiagnostics --should-stop=at=FLOW -XDdev FailOver06.java
  */
 
 class Test extends Test {
--- a/test/langtools/tools/javac/failover/FailOver07.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/test/langtools/tools/javac/failover/FailOver07.java	Fri Apr 06 03:53:28 2018 +0200
@@ -4,7 +4,7 @@
  * @summary Flow.java should be more error-friendly
  * @author mcimadamore
  *
- * @compile/fail/ref=FailOver07.out -XDrawDiagnostics --should-stop:at=FLOW -XDdev FailOver07.java
+ * @compile/fail/ref=FailOver07.out -XDrawDiagnostics --should-stop=at=FLOW -XDdev FailOver07.java
  */
 
 class Test extends Test {
--- a/test/langtools/tools/javac/failover/FailOver08.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/test/langtools/tools/javac/failover/FailOver08.java	Fri Apr 06 03:53:28 2018 +0200
@@ -4,7 +4,7 @@
  * @summary Flow.java should be more error-friendly
  * @author mcimadamore
  *
- * @compile/fail/ref=FailOver08.out -XDrawDiagnostics --should-stop:at=FLOW -XDdev FailOver08.java
+ * @compile/fail/ref=FailOver08.out -XDrawDiagnostics --should-stop=at=FLOW -XDdev FailOver08.java
  */
 
 class Test extends Test {
--- a/test/langtools/tools/javac/failover/FailOver09.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/test/langtools/tools/javac/failover/FailOver09.java	Fri Apr 06 03:53:28 2018 +0200
@@ -4,7 +4,7 @@
  * @summary Flow.java should be more error-friendly
  * @author mcimadamore
  *
- * @compile/fail/ref=FailOver09.out -XDrawDiagnostics --should-stop:at=FLOW -XDdev FailOver09.java
+ * @compile/fail/ref=FailOver09.out -XDrawDiagnostics --should-stop=at=FLOW -XDdev FailOver09.java
  */
 
 class Test extends Test {
--- a/test/langtools/tools/javac/failover/FailOver10.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/test/langtools/tools/javac/failover/FailOver10.java	Fri Apr 06 03:53:28 2018 +0200
@@ -4,7 +4,7 @@
  * @summary Flow.java should be more error-friendly
  * @author mcimadamore
  *
- * @compile/fail/ref=FailOver10.out -XDrawDiagnostics --should-stop:at=FLOW -XDdev FailOver10.java
+ * @compile/fail/ref=FailOver10.out -XDrawDiagnostics --should-stop=at=FLOW -XDdev FailOver10.java
  */
 
 class Test extends Test {
--- a/test/langtools/tools/javac/failover/FailOver11.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/test/langtools/tools/javac/failover/FailOver11.java	Fri Apr 06 03:53:28 2018 +0200
@@ -4,7 +4,7 @@
  * @summary Flow.java should be more error-friendly
  * @author mcimadamore
  *
- * @compile/fail/ref=FailOver11.out -XDrawDiagnostics --should-stop:at=FLOW -XDdev FailOver11.java
+ * @compile/fail/ref=FailOver11.out -XDrawDiagnostics --should-stop=at=FLOW -XDdev FailOver11.java
  */
 
 class Test extends Test {
--- a/test/langtools/tools/javac/failover/FailOver12.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/test/langtools/tools/javac/failover/FailOver12.java	Fri Apr 06 03:53:28 2018 +0200
@@ -4,7 +4,7 @@
  * @summary Flow.java should be more error-friendly
  * @author mcimadamore
  *
- * @compile/fail/ref=FailOver12.out -XDrawDiagnostics --should-stop:at=FLOW -XDdev FailOver12.java
+ * @compile/fail/ref=FailOver12.out -XDrawDiagnostics --should-stop=at=FLOW -XDdev FailOver12.java
  */
 
 class Test extends Test {
--- a/test/langtools/tools/javac/failover/FailOver13.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/test/langtools/tools/javac/failover/FailOver13.java	Fri Apr 06 03:53:28 2018 +0200
@@ -4,7 +4,7 @@
  * @summary Flow.java should be more error-friendly
  * @author mcimadamore
  *
- * @compile/fail/ref=FailOver13.out -XDrawDiagnostics --should-stop:at=FLOW -XDdev FailOver13.java
+ * @compile/fail/ref=FailOver13.out -XDrawDiagnostics --should-stop=at=FLOW -XDdev FailOver13.java
  */
 
 class Test extends Test {
--- a/test/langtools/tools/javac/failover/FailOver14.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/test/langtools/tools/javac/failover/FailOver14.java	Fri Apr 06 03:53:28 2018 +0200
@@ -4,7 +4,7 @@
  * @summary Flow.java should be more error-friendly
  * @author mcimadamore
  *
- * @compile/fail/ref=FailOver14.out -XDrawDiagnostics --should-stop:at=FLOW -XDdev FailOver14.java
+ * @compile/fail/ref=FailOver14.out -XDrawDiagnostics --should-stop=at=FLOW -XDdev FailOver14.java
  */
 
 class Test extends Test  {
--- a/test/langtools/tools/javac/failover/FailOver15.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/test/langtools/tools/javac/failover/FailOver15.java	Fri Apr 06 03:53:28 2018 +0200
@@ -3,7 +3,7 @@
  * @bug 6970584 7060926
  * @summary Attr.PostAttrAnalyzer misses a case
  *
- * @compile/fail/ref=FailOver15.out -XDrawDiagnostics --should-stop:at=FLOW -XDdev FailOver15.java
+ * @compile/fail/ref=FailOver15.out -XDrawDiagnostics --should-stop=at=FLOW -XDdev FailOver15.java
  */
 
 class Test {
--- a/test/langtools/tools/javac/generics/inference/8158355/T8158355.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/test/langtools/tools/javac/generics/inference/8158355/T8158355.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -27,7 +27,7 @@
  * @test
  * @bug 8158355
  * @summary Inference graph dot support broken
- * @compile --debug:dumpInferenceGraphsTo=. T8158355.java
+ * @compile --debug=dumpInferenceGraphsTo=. T8158355.java
  */
 import java.util.List;
 
--- a/test/langtools/tools/javac/lambda/MostSpecific09.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/test/langtools/tools/javac/lambda/MostSpecific09.java	Fri Apr 06 03:53:28 2018 +0200
@@ -2,7 +2,7 @@
  * @test /nodynamiccopyright/
  * @bug 8029718 8065800
  * @summary Should always use lambda body structure to disambiguate overload resolution
- * @compile/fail/ref=MostSpecific09.out -XDrawDiagnostics --should-stop:at=ATTR --debug:verboseResolution=applicable,success MostSpecific09.java
+ * @compile/fail/ref=MostSpecific09.out -XDrawDiagnostics --should-stop=at=ATTR --debug=verboseResolution=applicable,success MostSpecific09.java
  */
 
 class MostSpecific09 {
--- a/test/langtools/tools/javac/lambda/TestLambdaToMethodStats.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/test/langtools/tools/javac/lambda/TestLambdaToMethodStats.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -122,7 +122,7 @@
     @Override
     public void doWork() throws IOException {
         newCompilationTask()
-                .withOption("--debug:dumpLambdaToMethodStats")
+                .withOption("--debug=dumpLambdaToMethodStats")
                 .withSourceFromTemplate(template)
                 .generate(this::check);
     }
--- a/test/langtools/tools/javac/lambda/XDdumpLambdaToMethodStats.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/test/langtools/tools/javac/lambda/XDdumpLambdaToMethodStats.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
  * @test
  * @bug 8143217
  * @summary javac throws NPE when printing diagnostics for Lambda expressions
- * @compile XDdumpLambdaToMethodStats.java --debug:dumpLambdaToMethodStats
+ * @compile XDdumpLambdaToMethodStats.java --debug=dumpLambdaToMethodStats
  *
  */
 
--- a/test/langtools/tools/javac/lambda/bridge/TestMetafactoryBridges.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/test/langtools/tools/javac/lambda/bridge/TestMetafactoryBridges.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -274,7 +274,7 @@
             sourcefiles.add(new JavaSource(ck));
         }
         JavacTask ct = (JavacTask)tool.getTask(debugWriter, null, diagChecker,
-                    Arrays.asList("--debug:dumpLambdaToMethodStats", "-d", outDir.getAbsolutePath(),
+                    Arrays.asList("--debug=dumpLambdaToMethodStats", "-d", outDir.getAbsolutePath(),
                                   "-sourcepath", srcDir.getAbsolutePath(),
                                   "-classpath", classesDir.getAbsolutePath(),
                                   pp.preferOpt), null, sourcefiles);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/langtools/tools/javac/lambda/deduplication/Deduplication.java	Fri Apr 06 03:53:28 2018 +0200
@@ -0,0 +1,113 @@
+/*
+ * Copyright (c) 2018, Google LLC. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package com.sun.tools.javac.comp;
+
+import java.util.function.BiFunction;
+import java.util.function.Consumer;
+import java.util.function.Function;
+import java.util.function.Supplier;
+
+public class Deduplication {
+    void group(Object... xs) {}
+
+    void test() {
+        group((Function<String, Integer>) x -> x.hashCode());
+        group((Function<Object, Integer>) x -> x.hashCode());
+
+        {
+            int x = 1;
+            group((Supplier<Integer>) () -> x + 1);
+        }
+        {
+            int x = 1;
+            group((Supplier<Integer>) () -> x + 1);
+        }
+        group(
+                (BiFunction<Integer, Integer, ?>) (x, y) -> x + ((y)),
+                (BiFunction<Integer, Integer, ?>) (x, y) -> x + (y),
+                (BiFunction<Integer, Integer, ?>) (x, y) -> x + y,
+                (BiFunction<Integer, Integer, ?>) (x, y) -> (x) + ((y)),
+                (BiFunction<Integer, Integer, ?>) (x, y) -> (x) + (y),
+                (BiFunction<Integer, Integer, ?>) (x, y) -> (x) + y,
+                (BiFunction<Integer, Integer, ?>) (x, y) -> ((x)) + ((y)),
+                (BiFunction<Integer, Integer, ?>) (x, y) -> ((x)) + (y),
+                (BiFunction<Integer, Integer, ?>) (x, y) -> ((x)) + y);
+
+        group(
+                (Function<Integer, Integer>) x -> x + (1 + 2 + 3),
+                (Function<Integer, Integer>) x -> x + 6);
+
+        group((Function<Integer, Integer>) x -> x + 1, (Function<Integer, Integer>) y -> y + 1);
+
+        group((Consumer<Integer>) x -> this.f(), (Consumer<Integer>) x -> this.f());
+
+        group((Consumer<Integer>) y -> this.g());
+
+        group((Consumer<Integer>) x -> f(), (Consumer<Integer>) x -> f());
+
+        group((Consumer<Integer>) y -> g());
+
+        group((Function<Integer, Integer>) x -> this.i, (Function<Integer, Integer>) x -> this.i);
+
+        group((Function<Integer, Integer>) y -> this.j);
+
+        group((Function<Integer, Integer>) x -> i, (Function<Integer, Integer>) x -> i);
+
+        group((Function<Integer, Integer>) y -> j);
+
+        group(
+                (Function<Integer, Integer>) y -> {
+                        while (true) {
+                              break;
+                        }
+                        return 42;
+                },
+                (Function<Integer, Integer>) y -> {
+                        while (true) {
+                              break;
+                        }
+                        return 42;
+                });
+
+        class Local {
+            int i;
+
+            void f() {}
+
+            {
+                group((Function<Integer, Integer>) x -> this.i);
+                group((Consumer<Integer>) x -> this.f());
+                group((Function<Integer, Integer>) x -> Deduplication.this.i);
+                group((Consumer<Integer>) x -> Deduplication.this.f());
+            }
+        }
+    }
+
+    void f() {}
+
+    void g() {}
+
+    int i;
+    int j;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/langtools/tools/javac/lambda/deduplication/DeduplicationTest.java	Fri Apr 06 03:53:28 2018 +0200
@@ -0,0 +1,357 @@
+/*
+ * Copyright (c) 2018, Google LLC. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * @test 8200301
+ * @summary deduplicate lambda methods with the same body, target type, and captured state
+ * @modules jdk.jdeps/com.sun.tools.classfile jdk.compiler/com.sun.tools.javac.api
+ *     jdk.compiler/com.sun.tools.javac.code jdk.compiler/com.sun.tools.javac.comp
+ *     jdk.compiler/com.sun.tools.javac.file jdk.compiler/com.sun.tools.javac.main
+ *     jdk.compiler/com.sun.tools.javac.tree jdk.compiler/com.sun.tools.javac.util
+ * @run main DeduplicationTest
+ */
+import static java.nio.charset.StandardCharsets.UTF_8;
+import static java.util.stream.Collectors.joining;
+import static java.util.stream.Collectors.toMap;
+import static java.util.stream.Collectors.toSet;
+
+import com.sun.source.util.JavacTask;
+import com.sun.source.util.TaskEvent;
+import com.sun.source.util.TaskEvent.Kind;
+import com.sun.source.util.TaskListener;
+import com.sun.tools.classfile.Attribute;
+import com.sun.tools.classfile.BootstrapMethods_attribute;
+import com.sun.tools.classfile.BootstrapMethods_attribute.BootstrapMethodSpecifier;
+import com.sun.tools.classfile.ClassFile;
+import com.sun.tools.classfile.ConstantPool.CONSTANT_MethodHandle_info;
+import com.sun.tools.javac.api.ClientCodeWrapper.Trusted;
+import com.sun.tools.javac.api.JavacTool;
+import com.sun.tools.javac.code.Symbol;
+import com.sun.tools.javac.code.Symbol.MethodSymbol;
+import com.sun.tools.javac.comp.TreeDiffer;
+import com.sun.tools.javac.comp.TreeHasher;
+import com.sun.tools.javac.file.JavacFileManager;
+import com.sun.tools.javac.tree.JCTree.JCCompilationUnit;
+import com.sun.tools.javac.tree.JCTree.JCExpression;
+import com.sun.tools.javac.tree.JCTree.JCIdent;
+import com.sun.tools.javac.tree.JCTree.JCLambda;
+import com.sun.tools.javac.tree.JCTree.JCMethodInvocation;
+import com.sun.tools.javac.tree.JCTree.JCTypeCast;
+import com.sun.tools.javac.tree.JCTree.JCVariableDecl;
+import com.sun.tools.javac.tree.JCTree.Tag;
+import com.sun.tools.javac.tree.TreeScanner;
+import com.sun.tools.javac.util.Context;
+import com.sun.tools.javac.util.JCDiagnostic;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+import java.util.Objects;
+import java.util.Set;
+import java.util.TreeSet;
+import java.util.function.BiFunction;
+import javax.tools.Diagnostic;
+import javax.tools.DiagnosticListener;
+import javax.tools.JavaFileObject;
+
+public class DeduplicationTest {
+
+    public static void main(String[] args) throws Exception {
+        JavacFileManager fileManager = new JavacFileManager(new Context(), false, UTF_8);
+        JavacTool javacTool = JavacTool.create();
+        Listener diagnosticListener = new Listener();
+        Path testSrc = Paths.get(System.getProperty("test.src"));
+        Path file = testSrc.resolve("Deduplication.java");
+        JavacTask task =
+                javacTool.getTask(
+                        null,
+                        null,
+                        diagnosticListener,
+                        Arrays.asList(
+                                "-d",
+                                ".",
+                                "-XDdebug.dumpLambdaToMethodDeduplication",
+                                "-XDdebug.dumpLambdaToMethodStats"),
+                        null,
+                        fileManager.getJavaFileObjects(file));
+        Map<JCLambda, JCLambda> dedupedLambdas = new LinkedHashMap<>();
+        task.addTaskListener(new TreeDiffHashTaskListener(dedupedLambdas));
+        Iterable<? extends JavaFileObject> generated = task.generate();
+        if (!diagnosticListener.unexpected.isEmpty()) {
+            throw new AssertionError(
+                    diagnosticListener
+                            .unexpected
+                            .stream()
+                            .map(
+                                    d ->
+                                            String.format(
+                                                    "%s: %s",
+                                                    d.getCode(), d.getMessage(Locale.getDefault())))
+                            .collect(joining(", ", "unexpected diagnostics: ", "")));
+        }
+
+        // Assert that each group of lambdas was deduplicated.
+        Map<JCLambda, JCLambda> actual = diagnosticListener.deduplicationTargets();
+        dedupedLambdas.forEach(
+                (k, v) -> {
+                    if (!actual.containsKey(k)) {
+                        throw new AssertionError("expected " + k + " to be deduplicated");
+                    }
+                    if (!v.equals(actual.get(k))) {
+                        throw new AssertionError(
+                                String.format(
+                                        "expected %s to be deduplicated to:\n  %s\nwas:  %s",
+                                        k, v, actual.get(v)));
+                    }
+                });
+
+        // Assert that the output contains only the canonical lambdas, and not the deduplicated
+        // lambdas.
+        Set<String> bootstrapMethodNames = new TreeSet<>();
+        for (JavaFileObject output : generated) {
+            ClassFile cf = ClassFile.read(output.openInputStream());
+            BootstrapMethods_attribute bsm =
+                    (BootstrapMethods_attribute) cf.getAttribute(Attribute.BootstrapMethods);
+            for (BootstrapMethodSpecifier b : bsm.bootstrap_method_specifiers) {
+                bootstrapMethodNames.add(
+                        ((CONSTANT_MethodHandle_info)
+                                        cf.constant_pool.get(b.bootstrap_arguments[1]))
+                                .getCPRefInfo()
+                                .getNameAndTypeInfo()
+                                .getName());
+            }
+        }
+        Set<String> deduplicatedNames =
+                diagnosticListener
+                        .expectedLambdaMethods()
+                        .stream()
+                        .map(s -> s.getSimpleName().toString())
+                        .sorted()
+                        .collect(toSet());
+        if (!deduplicatedNames.equals(bootstrapMethodNames)) {
+            throw new AssertionError(
+                    String.format(
+                            "expected deduplicated methods: %s, but saw: %s",
+                            deduplicatedNames, bootstrapMethodNames));
+        }
+    }
+
+    /**
+     * Returns a symbol comparator that treats symbols that correspond to the same parameter of each
+     * of the given lambdas as equal.
+     */
+    private static BiFunction<Symbol, Symbol, Boolean> paramsEqual(JCLambda lhs, JCLambda rhs) {
+        return (x, y) -> {
+            Integer idx = paramIndex(lhs, x);
+            if (idx != null && idx != -1) {
+                if (Objects.equals(idx, paramIndex(rhs, y))) {
+                    return true;
+                }
+            }
+            return null;
+        };
+    }
+
+    /**
+     * Returns the index of the given symbol as a parameter of the given lambda, or else {@code -1}
+     * if is not a parameter.
+     */
+    private static Integer paramIndex(JCLambda lambda, Symbol sym) {
+        if (sym != null) {
+            int idx = 0;
+            for (JCVariableDecl param : lambda.params) {
+                if (sym == param.sym) {
+                    return idx;
+                }
+            }
+        }
+        return null;
+    }
+
+    /** A diagnostic listener that records debug messages related to lambda desugaring. */
+    @Trusted
+    static class Listener implements DiagnosticListener<JavaFileObject> {
+
+        /** A map from method symbols to lambda trees for desugared lambdas. */
+        final Map<MethodSymbol, JCLambda> lambdaMethodSymbolsToTrees = new LinkedHashMap<>();
+
+        /**
+         * A map from lambda trees that were deduplicated to the method symbol of the canonical
+         * lambda implementation method they were deduplicated to.
+         */
+        final Map<JCLambda, MethodSymbol> deduped = new LinkedHashMap<>();
+
+        final List<Diagnostic<? extends JavaFileObject>> unexpected = new ArrayList<>();
+
+        @Override
+        public void report(Diagnostic<? extends JavaFileObject> diagnostic) {
+            JCDiagnostic d = (JCDiagnostic) diagnostic;
+            switch (d.getCode()) {
+                case "compiler.note.lambda.stat":
+                    lambdaMethodSymbolsToTrees.put(
+                            (MethodSymbol) d.getArgs()[1],
+                            (JCLambda) d.getDiagnosticPosition().getTree());
+                    break;
+                case "compiler.note.verbose.l2m.deduplicate":
+                    deduped.put(
+                            (JCLambda) d.getDiagnosticPosition().getTree(),
+                            (MethodSymbol) d.getArgs()[0]);
+                    break;
+                default:
+                    unexpected.add(diagnostic);
+            }
+        }
+
+        /** Returns expected lambda implementation method symbols. */
+        Set<MethodSymbol> expectedLambdaMethods() {
+            return lambdaMethodSymbolsToTrees
+                    .entrySet()
+                    .stream()
+                    .filter(e -> !deduped.containsKey(e.getValue()))
+                    .map(Map.Entry::getKey)
+                    .collect(toSet());
+        }
+
+        /**
+         * Returns a mapping from deduplicated lambda trees to the tree of the canonical lambda they
+         * were deduplicated to.
+         */
+        Map<JCLambda, JCLambda> deduplicationTargets() {
+            return deduped.entrySet()
+                    .stream()
+                    .collect(
+                            toMap(
+                                    Map.Entry::getKey,
+                                    e -> lambdaMethodSymbolsToTrees.get(e.getValue()),
+                                    (a, b) -> {
+                                        throw new AssertionError();
+                                    },
+                                    LinkedHashMap::new));
+        }
+    }
+
+    /**
+     * A task listener that tests {@link TreeDiffer} and {@link TreeHasher} on all lambda trees in a
+     * compilation, post-analysis.
+     */
+    private static class TreeDiffHashTaskListener implements TaskListener {
+
+        /**
+         * A map from deduplicated lambdas to the canonical lambda they are expected to be
+         * deduplicated to.
+         */
+        private final Map<JCLambda, JCLambda> dedupedLambdas;
+
+        public TreeDiffHashTaskListener(Map<JCLambda, JCLambda> dedupedLambdas) {
+            this.dedupedLambdas = dedupedLambdas;
+        }
+
+        @Override
+        public void finished(TaskEvent e) {
+            if (e.getKind() != Kind.ANALYZE) {
+                return;
+            }
+            // Scan the compilation for calls to a varargs method named 'group', whose arguments
+            // are a group of lambdas that are equivalent to each other, but distinct from all
+            // lambdas in the compilation unit outside of that group.
+            List<List<JCLambda>> lambdaGroups = new ArrayList<>();
+            new TreeScanner() {
+                @Override
+                public void visitApply(JCMethodInvocation tree) {
+                    if (tree.getMethodSelect().getTag() == Tag.IDENT
+                            && ((JCIdent) tree.getMethodSelect())
+                                    .getName()
+                                    .contentEquals("group")) {
+                        List<JCLambda> xs = new ArrayList<>();
+                        for (JCExpression arg : tree.getArguments()) {
+                            if (arg instanceof JCTypeCast) {
+                                arg = ((JCTypeCast) arg).getExpression();
+                            }
+                            xs.add((JCLambda) arg);
+                        }
+                        lambdaGroups.add(xs);
+                    }
+                    super.visitApply(tree);
+                }
+            }.scan((JCCompilationUnit) e.getCompilationUnit());
+            for (int i = 0; i < lambdaGroups.size(); i++) {
+                List<JCLambda> curr = lambdaGroups.get(i);
+                JCLambda first = null;
+                // Assert that all pairwise combinations of lambdas in the group are equal, and
+                // hash to the same value.
+                for (JCLambda lhs : curr) {
+                    if (first == null) {
+                        first = lhs;
+                    } else {
+                        dedupedLambdas.put(lhs, first);
+                    }
+                    for (JCLambda rhs : curr) {
+                        if (!new TreeDiffer(paramsEqual(lhs, rhs)).scan(lhs.body, rhs.body)) {
+                            throw new AssertionError(
+                                    String.format(
+                                            "expected lambdas to be equal\n%s\n%s", lhs, rhs));
+                        }
+                        if (TreeHasher.hash(lhs, sym -> paramIndex(lhs, sym))
+                                != TreeHasher.hash(rhs, sym -> paramIndex(rhs, sym))) {
+                            throw new AssertionError(
+                                    String.format(
+                                            "expected lambdas to hash to the same value\n%s\n%s",
+                                            lhs, rhs));
+                        }
+                    }
+                }
+                // Assert that no lambdas in a group are equal to any lambdas outside that group,
+                // or hash to the same value as lambda outside the group.
+                // (Note that the hash collisions won't result in correctness problems but could
+                // regress performs, and do not currently occurr for any of the test inputs.)
+                for (int j = 0; j < lambdaGroups.size(); j++) {
+                    if (i == j) {
+                        continue;
+                    }
+                    for (JCLambda lhs : curr) {
+                        for (JCLambda rhs : lambdaGroups.get(j)) {
+                            if (new TreeDiffer(paramsEqual(lhs, rhs)).scan(lhs.body, rhs.body)) {
+                                throw new AssertionError(
+                                        String.format(
+                                                "expected lambdas to not be equal\n%s\n%s",
+                                                lhs, rhs));
+                            }
+                            if (TreeHasher.hash(lhs, sym -> paramIndex(lhs, sym))
+                                    == TreeHasher.hash(rhs, sym -> paramIndex(rhs, sym))) {
+                                throw new AssertionError(
+                                        String.format(
+                                                "expected lambdas to hash to different values\n%s\n%s",
+                                                lhs, rhs));
+                            }
+                        }
+                    }
+                }
+            }
+            lambdaGroups.clear();
+        }
+    }
+}
--- a/test/langtools/tools/javac/lambda/mostSpecific/StructuralMostSpecificTest.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/test/langtools/tools/javac/lambda/mostSpecific/StructuralMostSpecificTest.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -210,7 +210,7 @@
     public void doWork() throws Throwable {
         newCompilationTask()
                 .withSourceFromTemplate(sourceTemplate)
-                .withOption("--debug:verboseResolution=all,-predef,-internal,-object-init")
+                .withOption("--debug=verboseResolution=all,-predef,-internal,-object-init")
                 .analyze(this::check);
     }
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/langtools/tools/javac/lvti/T8200199.java	Fri Apr 06 03:53:28 2018 +0200
@@ -0,0 +1,50 @@
+/*
+ * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test /nodynamioccopyright/
+ * @bug 8200199
+ * @summary javac suggests to use var even when var is used
+ * @compile/fail/ref=T8200199.out -Werror -XDfind=local -XDrawDiagnostics T8200199.java
+ */
+
+class T8200199 {
+
+    class Resource implements AutoCloseable {
+        public void close() {};
+    }
+
+    public void implicit() {
+        var i = 33;
+        for (var x = 0 ; x < 10 ; x++) { }
+        try (var r = new Resource()) { }
+    }
+
+    public void explicit() {
+        int i = 33;
+        for (int x = 0 ; x < 10 ; x++) { }
+        try (Resource r = new Resource()) { }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/langtools/tools/javac/lvti/T8200199.out	Fri Apr 06 03:53:28 2018 +0200
@@ -0,0 +1,6 @@
+T8200199.java:46:13: compiler.warn.local.redundant.type
+T8200199.java:47:18: compiler.warn.local.redundant.type
+T8200199.java:48:23: compiler.warn.local.redundant.type
+- compiler.err.warnings.and.werror
+1 error
+3 warnings
--- a/test/langtools/tools/javac/lvti/harness/LocalVariableInferenceTester.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/test/langtools/tools/javac/lvti/harness/LocalVariableInferenceTester.java	Fri Apr 06 03:53:28 2018 +0200
@@ -56,8 +56,18 @@
 
 public class LocalVariableInferenceTester {
 
-    static final JavaCompiler comp = ToolProvider.getSystemJavaCompiler();
-    static final StandardJavaFileManager fm = comp.getStandardFileManager(null, null, null);
+    static final StandardJavaFileManager fm;
+
+    static {
+        final JavaCompiler comp = ToolProvider.getSystemJavaCompiler();
+        fm = comp.getStandardFileManager(null, null, null);
+        File destDir = new File(System.getProperty("user.dir"));
+        try {
+            fm.setLocation(javax.tools.StandardLocation.CLASS_OUTPUT, Arrays.asList(destDir));
+        } catch (IOException ex) {
+            throw new AssertionError(ex);
+        }
+    }
 
     public static void main(String[] args) throws IOException {
         try {
--- a/test/langtools/tools/javac/missingSuperRecovery/MissingSuperRecovery.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/test/langtools/tools/javac/missingSuperRecovery/MissingSuperRecovery.java	Fri Apr 06 03:53:28 2018 +0200
@@ -5,7 +5,7 @@
  * class is no longer available during a subsequent compilation.
  * @author maddox
  * @build impl
- * @compile/fail/ref=MissingSuperRecovery.out --diags:layout=%b:%l:%_%m MissingSuperRecovery.java
+ * @compile/fail/ref=MissingSuperRecovery.out --diags=layout=%b:%l:%_%m MissingSuperRecovery.java
  */
 
 // Requires "golden" class file 'impl.class', which contains
--- a/test/langtools/tools/javac/modules/AddLimitMods.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/test/langtools/tools/javac/modules/AddLimitMods.java	Fri Apr 06 03:53:28 2018 +0200
@@ -120,7 +120,7 @@
         //real test
         new JavacTask(tb)
                 .options("--module-path", modulePath.toString(),
-                         "--should-stop:ifNoError=FLOW",
+                         "--should-stop=ifNoError=FLOW",
                          "--limit-modules", "java.base")
                 .outdir(modulePath)
                 .files(findJavaFiles(m1))
@@ -129,7 +129,7 @@
 
         new JavacTask(tb)
                 .options("--module-path", modulePath.toString(),
-                         "--should-stop:ifNoError=FLOW",
+                         "--should-stop=ifNoError=FLOW",
                          "--limit-modules", "java.base",
                          "--add-modules", "m2x")
                 .outdir(modulePath)
@@ -139,7 +139,7 @@
 
         new JavacTask(tb)
                 .options("--module-path", modulePath.toString(),
-                         "--should-stop:ifNoError=FLOW",
+                         "--should-stop=ifNoError=FLOW",
                          "--limit-modules", "java.base",
                          "--add-modules", "m2x,m3x")
                 .outdir(modulePath)
@@ -149,7 +149,7 @@
 
         new JavacTask(tb)
                 .options("--module-path", modulePath.toString(),
-                         "--should-stop:ifNoError=FLOW",
+                         "--should-stop=ifNoError=FLOW",
                          "--limit-modules", "m2x")
                 .outdir(modulePath)
                 .files(findJavaFiles(m1))
@@ -158,7 +158,7 @@
 
         new JavacTask(tb)
                 .options("--module-path", modulePath.toString(),
-                         "--should-stop:ifNoError=FLOW",
+                         "--should-stop=ifNoError=FLOW",
                          "--limit-modules", "m3x")
                 .outdir(modulePath)
                 .files(findJavaFiles(m1))
@@ -167,7 +167,7 @@
 
         new JavacTask(tb)
                 .options("--module-path", modulePath.toString(),
-                         "--should-stop:ifNoError=FLOW",
+                         "--should-stop=ifNoError=FLOW",
                          "--limit-modules", "m3x",
                          "--add-modules", "m2x")
                 .outdir(modulePath)
@@ -430,7 +430,7 @@
                                            auxOptions,
                                            "--module-path", modulePath.toString(),
                                            "--class-path", classpathOut.toString(),
-                                           "--should-stop:ifNoError=FLOW"))
+                                           "--should-stop=ifNoError=FLOW"))
                    .outdir(modulePath)
                    .files(findJavaFiles(m2))
                    .run(success ? Task.Expect.SUCCESS : Task.Expect.FAIL)
--- a/test/langtools/tools/javac/options/IsSupportedOptionTest.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/test/langtools/tools/javac/options/IsSupportedOptionTest.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -52,7 +52,7 @@
         check(tool, "-Xdoclint", 0);
         check(tool, "-Xdoclint:stats", 0);
         check(tool, "-Xdoclint/package:foo", 0);
-        check(tool, "--debug:any", 0);
+        check(tool, "--debug=any", 1);
         check(tool, "-g", 0);
         check(tool, "-g:vars", 0);
         check(tool, "-g:none", 0);
--- a/test/langtools/tools/javac/policy/test3/Test.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/test/langtools/tools/javac/policy/test3/Test.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -30,7 +30,7 @@
 import java.io.*;
 import java.util.*;
 
-// Simple test of --should-stop:at.
+// Simple test of --should-stop=at.
 // For each of the permissable values, we compile a file with an error in it,
 // then using -XDverboseCompilePolicy we check that the compilation gets as
 // far as expected, but no further.
@@ -83,7 +83,7 @@
         args.add("-d");
         args.add(".");
         if (ssp.needOption)
-            args.add("--should-stop:at=" + ssp);
+            args.add("--should-stop=at=" + ssp);
         args.add(new File(System.getProperty("test.src", "."), "A.java").getPath());
 
         StringWriter sw = new StringWriter();
--- a/test/langtools/tools/javac/positions/TreeEndPosTest.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/test/langtools/tools/javac/positions/TreeEndPosTest.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -145,7 +145,7 @@
             options.add(tempDir.getPath());
             options.add("-d");
             options.add(tempDir.getPath());
-            options.add("--should-stop:at=GENERATE");
+            options.add("--should-stop=at=GENERATE");
 
             List<JavaFileObject> sources = new ArrayList<>();
             sources.add(src);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/langtools/tools/javac/processing/model/MissingClassRecursiveAccessible.java	Fri Apr 06 03:53:28 2018 +0200
@@ -0,0 +1,166 @@
+/*
+ * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * @test
+ * @bug 8196519
+ * @summary Verify that enclosing type of an ErrorType is not the ErrorType itself.
+ * @library /tools/lib
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ *          jdk.compiler/com.sun.tools.javac.main
+ * @build toolbox.TestRunner toolbox.ToolBox MissingClassRecursiveAccessible
+ * @run main MissingClassRecursiveAccessible
+ */
+
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.util.Arrays;
+
+import javax.lang.model.element.TypeElement;
+import javax.lang.model.type.ErrorType;
+import javax.lang.model.type.TypeKind;
+import javax.lang.model.type.TypeMirror;
+import javax.tools.JavaCompiler;
+import javax.tools.JavaCompiler.CompilationTask;
+import javax.tools.StandardJavaFileManager;
+import javax.tools.ToolProvider;
+
+import com.sun.source.tree.CompilationUnitTree;
+import com.sun.source.tree.MemberSelectTree;
+import com.sun.source.util.TreePath;
+import com.sun.source.util.TreePathScanner;
+import com.sun.source.util.Trees;
+import com.sun.tools.javac.*;
+import toolbox.JavacTask;
+import toolbox.TestRunner;
+import toolbox.TestRunner.Test;
+import toolbox.ToolBox;
+
+public class MissingClassRecursiveAccessible extends TestRunner {
+
+    public static void main(String... args) throws Exception {
+        new MissingClassRecursiveAccessible().runTests(m -> new Object[] { Paths.get(m.getName()) });
+    }
+
+    private final ToolBox tb = new ToolBox();
+
+    public MissingClassRecursiveAccessible() {
+        super(System.err);
+    }
+
+    @Test
+    public void testMissingClass(Path outerBase) throws Exception {
+        Path src = outerBase.resolve("src");
+        tb.writeJavaFiles(src,
+                          "import java.util.Optional;\n" +
+                          "\n" +
+                          "abstract class B {\n" +
+                          "  abstract <M> Optional<M> g(F<M> p);\n" +
+                          "}\n",
+                          "interface F<M> {\n" +
+                          "  M u(A o);\n" +
+                          "}\n",
+                          "interface A {\n" +
+                          "  <T> T v(Class<? extends T> o);\n" +
+                          "}\n",
+                          "abstract class Test {\n" +
+                          "  abstract String f(Object proto);\n" +
+                          "  String test(B o) {\n" +
+                          "    return f(o.g((x) -> x.v(Object.class)).get());\n" +
+                          "  }\n" +
+                          "}\n");
+        Path classes = outerBase.resolve("classes");
+        Files.createDirectories(classes);
+        new JavacTask(tb)
+                .outdir(classes)
+                .files(src.resolve("B.java"), src.resolve("F.java"), src.resolve("A.java"))
+                .run()
+                .writeAll();
+        Files.delete(classes.resolve("A.class"));
+        StringWriter out = new StringWriter();
+        int ret = Main.compile(new String[] {"-d", classes.toString(),
+                                             "-classpath", classes.toString(),
+                                             "-XDrawDiagnostics",
+                                             src.resolve("Test.java").toString()
+                                            },
+                               new PrintWriter(out));
+
+        //check compilation output:
+        if (ret != 1) {
+            throw new AssertionError("Unexpected error code: " + ret);
+        }
+        String expectedOutput =
+            "Test.java:4:18: compiler.err.cant.access: A, (compiler.misc.class.file.not.found: A)\n" +
+            "1 error\n";
+        if (!expectedOutput.equals(out.toString().replace(System.lineSeparator(), "\n"))) {
+            throw new AssertionError("Unexpected output: " + out);
+        }
+
+        JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();
+        try (StandardJavaFileManager fm = compiler.getStandardFileManager(null, null, null)) {
+            com.sun.source.util.JavacTask task = (com.sun.source.util.JavacTask)
+                    compiler.getTask(null,
+                                     null,
+                                     d -> {},
+                                     Arrays.asList("-d", classes.toString(),
+                                                   "-classpath", classes.toString()),
+                                     null,
+                                     fm.getJavaFileObjects(src.resolve("Test.java")));
+            CompilationUnitTree cut = task.parse().iterator().next();
+            task.analyze();
+            Trees trees = Trees.instance(task);
+            TypeMirror[] foundType = new TypeMirror[1];
+            new TreePathScanner<Void, Void>() {
+                @Override
+                public Void visitMemberSelect(MemberSelectTree node, Void p) {
+                    if (node.getIdentifier().contentEquals("v")) {
+                        foundType[0] = trees.getTypeMirror(getCurrentPath().getParentPath());
+                    }
+                    return super.visitMemberSelect(node, p);
+                }
+            }.scan(cut, null);
+
+            //check error type properties:
+            if (foundType[0] == null) {
+                throw new AssertionError("Did not find the expected type.");
+            }
+            if (foundType[0].getKind() != TypeKind.ERROR) {
+                throw new AssertionError("The type has an unexpected kind: " +
+                                         foundType[0].getKind());
+            }
+            TypeMirror enclosing = ((ErrorType) foundType[0]).getEnclosingType();
+            if (enclosing.getKind() != TypeKind.NONE) {
+                throw new AssertionError("The enclosing type has an unexpected kind: " +
+                                         enclosing.getKind());
+            }
+
+            //check that isAccessible does not crash on it:
+            trees.isAccessible(trees.getScope(new TreePath(cut)),
+                               (TypeElement) task.getTypes().asElement(foundType[0]));
+        }
+    }
+
+}
--- a/test/langtools/tools/javac/protectedAccess/ProtectedMemberAccess2.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/test/langtools/tools/javac/protectedAccess/ProtectedMemberAccess2.java	Fri Apr 06 03:53:28 2018 +0200
@@ -4,7 +4,7 @@
  * @summary Verify correct implementation of JLS2e 6.6.2.1
  * @author maddox
  *
- * @compile/fail/ref=ProtectedMemberAccess2.out --diags:formatterOptions=-simpleNames;layout=%b:%l:%_%m ProtectedMemberAccess2.java
+ * @compile/fail/ref=ProtectedMemberAccess2.out --diags=formatterOptions=-simpleNames;layout=%b:%l:%_%m ProtectedMemberAccess2.java
  */
 
 // 71 errors expected.
--- a/test/langtools/tools/javac/protectedAccess/ProtectedMemberAccess3.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/test/langtools/tools/javac/protectedAccess/ProtectedMemberAccess3.java	Fri Apr 06 03:53:28 2018 +0200
@@ -4,7 +4,7 @@
  * @summary Verify correct implementation of JLS2e 6.6.2.1
  * @author maddox
  *
- * @compile/fail/ref=ProtectedMemberAccess3.out --diags:formatterOptions=-simpleNames;layout=%b:%l:%_%m ProtectedMemberAccess3.java
+ * @compile/fail/ref=ProtectedMemberAccess3.out --diags=formatterOptions=-simpleNames;layout=%b:%l:%_%m ProtectedMemberAccess3.java
  */
 
 // 46 errors expected.
--- a/test/langtools/tools/javac/protectedAccess/ProtectedMemberAccess4.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/test/langtools/tools/javac/protectedAccess/ProtectedMemberAccess4.java	Fri Apr 06 03:53:28 2018 +0200
@@ -4,7 +4,7 @@
  * @summary Verify correct implementation of JLS2e 6.6.2.1
  * @author maddox
  *
- * @compile/fail/ref=ProtectedMemberAccess4.out --diags:formatterOptions=-simpleNames;layout=%b:%l:%_%m ProtectedMemberAccess4.java
+ * @compile/fail/ref=ProtectedMemberAccess4.out --diags=formatterOptions=-simpleNames;layout=%b:%l:%_%m ProtectedMemberAccess4.java
  */
 
 // 33 errors expected.
--- a/test/langtools/tools/javac/resolve/ResolveHarness.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/test/langtools/tools/javac/resolve/ResolveHarness.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -132,8 +132,8 @@
 
     protected void check() throws Exception {
         String[] options = {
-            "--should-stop:at=ATTR",
-            "--debug:verboseResolution=success,failure,applicable,inapplicable,deferred-inference,predef"
+            "--should-stop=at=ATTR",
+            "--debug=verboseResolution=success,failure,applicable,inapplicable,deferred-inference,predef"
         };
 
         AbstractProcessor[] processors = { new ResolveCandidateFinder(), null };
--- a/test/langtools/tools/javac/tree/VarTree.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/test/langtools/tools/javac/tree/VarTree.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -77,7 +77,7 @@
         String src = prefix + parts[0] + parts[1] + parts[2] + " } }";
 
         JavacTaskImpl ct = (JavacTaskImpl) tool.getTask(null, null, d -> {},
-                                                        List.of("--should-stop:at=FLOW"),
+                                                        List.of("--should-stop=at=FLOW"),
                                                         null, Arrays.asList(new MyFileObject(src)));
 
         Iterable<? extends CompilationUnitTree> units = ct.parse();
--- a/test/langtools/tools/javac/unicode/UnicodeNewline.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/test/langtools/tools/javac/unicode/UnicodeNewline.java	Fri Apr 06 03:53:28 2018 +0200
@@ -3,7 +3,7 @@
  * @bug 4739428 4785453
  * @summary when \u000a is used, diagnostics are reported on the wrong line.
  *
- * @compile/fail/ref=UnicodeNewline.out --diags:layout=%b:%l:%_%m UnicodeNewline.java
+ * @compile/fail/ref=UnicodeNewline.out --diags=layout=%b:%l:%_%m UnicodeNewline.java
  */
 
 class UnicodeNewline {
--- a/test/langtools/tools/sjavac/JavacOptionPrep.java	Thu Apr 05 11:18:39 2018 -0700
+++ b/test/langtools/tools/sjavac/JavacOptionPrep.java	Fri Apr 06 03:53:28 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -96,7 +96,7 @@
 
             // Ignore this option for now. When the file=... requirement goes
             // away, this will be easier to handle.
-            if (option.startsWith("--debug:completionDeps"))
+            if (option.startsWith("--debug=completionDeps"))
                 continue;
 
             switch (option) {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/nashorn/script/trusted/JDK-8200215.js	Fri Apr 06 03:53:28 2018 +0200
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * JDK-8200215: 17th loop of "let foo = ''"; throws ReferenceError
+ *
+ * @test
+ * @run
+ */
+
+var NashornScriptEngineFactory = Java.type("jdk.nashorn.api.scripting.NashornScriptEngineFactory");
+var factory = new NashornScriptEngineFactory();
+var engine = factory.getScriptEngine("-strict", "--language=es6");
+var bindings = engine.createBindings();
+for (var i = 0; i < 17; i++) {
+    bindings.eval("let foo = '';\n");
+}