Merge
authorjwilhelm
Tue, 30 Jan 2018 16:41:40 +0100
changeset 48819 ee513596f3ee
parent 48818 ec4a84ba2aaf (current diff)
parent 48680 f944d1b7ab25 (diff)
child 48820 9a411a9a17f0
Merge
make/devkit/createWindowsDevkit.sh
src/hotspot/cpu/x86/sharedRuntime_x86_32.cpp
src/hotspot/share/jvmci/jvmciCompilerToVM.cpp
src/hotspot/share/oops/cpCache.cpp
src/hotspot/share/oops/klassVtable.cpp
src/hotspot/share/prims/jni.cpp
src/hotspot/share/runtime/arguments.cpp
src/hotspot/share/runtime/vmStructs.cpp
src/java.compiler/share/classes/javax/lang/model/overview.html
src/java.compiler/share/classes/javax/tools/overview.html
src/java.xml/share/classes/com/sun/org/apache/xalan/internal/utils/FactoryImpl.java
src/jdk.jdeps/share/classes/com/sun/tools/javap/overview.html
test/jdk/sun/security/krb5/auto/principalProperty/TestHosts
test/langtools/tools/javac/T8192885/AddGotoAfterForLoopToLNTTest.java
--- a/.hgtags	Tue Jan 30 16:26:40 2018 +0100
+++ b/.hgtags	Tue Jan 30 16:41:40 2018 +0100
@@ -464,3 +464,5 @@
 959f2f7cbaa6d2ee45d50029744efb219721576c jdk-10+36
 4f830b447edf04fb4a52151a5ad44d9bb60723cd jdk-10+37
 e569e83139fdfbecfeb3cd9014d560917787f158 jdk-10+38
+5b834ec962366e00d4445352a999a3ac14e26f64 jdk-10+39
+860326263d1f6a83996d7da0f4c66806ae4aa1eb jdk-10+40
--- a/bin/idea.sh	Tue Jan 30 16:26:40 2018 +0100
+++ b/bin/idea.sh	Tue Jan 30 16:41:40 2018 +0100
@@ -30,9 +30,10 @@
 }
 
 SCRIPT_DIR=`dirname $0`
-PWD=`pwd`
+#assume TOP is the dir from which the script has been called
+TOP=`pwd`
 cd $SCRIPT_DIR; SCRIPT_DIR=`pwd`
-cd ../; TOP=`pwd`; cd $PWD
+cd $TOP;
 
 IDEA_OUTPUT=$TOP/.idea
 VERBOSE="false"
@@ -66,30 +67,42 @@
 mkdir $IDEA_OUTPUT || exit 1
 cd $IDEA_OUTPUT; IDEA_OUTPUT=`pwd`
 
-IDEA_MAKE="$TOP/make/idea"
+MAKE_DIR="$SCRIPT_DIR/../make"
+IDEA_MAKE="$MAKE_DIR/idea"
 IDEA_TEMPLATE="$IDEA_MAKE/template"
-IML_TEMPLATE="$IDEA_TEMPLATE/jdk.iml"
-ANT_TEMPLATE="$IDEA_TEMPLATE/ant.xml"
-MISC_TEMPLATE="$IDEA_TEMPLATE/misc.xml"
-IDEA_IML="$IDEA_OUTPUT/jdk.iml"
-IDEA_ANT="$IDEA_OUTPUT/ant.xml"
-IDEA_MISC="$IDEA_OUTPUT/misc.xml"
+
+cp -r "$IDEA_TEMPLATE"/* "$IDEA_OUTPUT"
+
+#init template variables
+for file in `ls -p $IDEA_TEMPLATE | grep -v /`; do
+	VAR_SUFFIX=`echo $file | cut -d'.' -f1 | tr [:lower:] [:upper:]`
+    eval "$VAR_SUFFIX"_TEMPLATE="$IDEA_TEMPLATE"/$file
+	eval IDEA_"$VAR_SUFFIX"="$IDEA_OUTPUT"/$file
+done
+
+#override template variables
+if [ -d "$TEMPLATES_OVERRIDE" ] ; then
+    for file in `ls -p "$TEMPLATES_OVERRIDE" | grep -v /`; do
+        cp "$TEMPLATES_OVERRIDE"/$file "$IDEA_OUTPUT"/
+    	VAR_SUFFIX=`echo $file | cut -d'.' -f1 | tr [:lower:] [:upper:]`
+        eval "$VAR_SUFFIX"_TEMPLATE="$TEMPLATES_OVERRIDE"/$file
+    done
+fi
 
 if [ "$VERBOSE" = "true" ] ; then
   echo "output dir: $IDEA_OUTPUT"
   echo "idea template dir: $IDEA_TEMPLATE"
 fi
 
-if [ ! -f "$IML_TEMPLATE" ] ; then
-  echo "FATAL: cannot find $IML_TEMPLATE" >&2; exit 1
+if [ ! -f "$JDK_TEMPLATE" ] ; then
+  echo "FATAL: cannot find $JDK_TEMPLATE" >&2; exit 1
 fi
 
 if [ ! -f "$ANT_TEMPLATE" ] ; then
   echo "FATAL: cannot find $ANT_TEMPLATE" >&2; exit 1
 fi
 
-cp -r "$IDEA_TEMPLATE"/* "$IDEA_OUTPUT"
-cd $TOP ; make -f "$IDEA_MAKE/idea.gmk" -I make/common idea MAKEOVERRIDES= OUT=$IDEA_OUTPUT/env.cfg MODULES="$*" || exit 1
+cd $TOP ; make -f "$IDEA_MAKE/idea.gmk" -I $MAKE_DIR/.. idea MAKEOVERRIDES= OUT=$IDEA_OUTPUT/env.cfg MODULES="$*" || exit 1
 cd $SCRIPT_DIR
 
 . $IDEA_OUTPUT/env.cfg
@@ -118,11 +131,12 @@
   root=$@
   relativePath="`echo "$root" | sed -e s@"$TOP/\(.*$\)"@"\1"@`"
   folder="`echo "$SOURCE_FOLDER" | sed -e s@"\(.*/\)####\(.*\)"@"\1$relativePath\2"@`"
-  printf "%s\n" "$folder" >> $IDEA_IML
+  printf "%s\n" "$folder" >> $IDEA_JDK
 }
 
 ### Generate project iml
-rm -f $IDEA_IML
+
+rm -f $IDEA_JDK
 while IFS= read -r line
 do
   if echo "$line" | egrep "^ .* <sourceFolder.*####" > /dev/null ; then
@@ -133,9 +147,9 @@
       done
     fi
   else
-    printf "%s\n" "$line" >> $IDEA_IML
+    printf "%s\n" "$line" >> $IDEA_JDK
   fi
-done < "$IML_TEMPLATE"
+done < "$JDK_TEMPLATE"
 
 
 MODULE_NAME="        <property name=\"module.name\" value=\"####\" />"
--- a/make/autoconf/basics.m4	Tue Jan 30 16:26:40 2018 +0100
+++ b/make/autoconf/basics.m4	Tue Jan 30 16:41:40 2018 +0100
@@ -586,69 +586,71 @@
 AC_DEFUN_ONCE([BASIC_SETUP_DEVKIT],
 [
   AC_ARG_WITH([devkit], [AS_HELP_STRING([--with-devkit],
-      [use this devkit for compilers, tools and resources])],
-      [
-        BASIC_FIXUP_PATH([with_devkit])
-        DEVKIT_ROOT="$with_devkit"
-        # Check for a meta data info file in the root of the devkit
-        if test -f "$DEVKIT_ROOT/devkit.info"; then
-          . $DEVKIT_ROOT/devkit.info
-          # This potentially sets the following:
-          # A descriptive name of the devkit
-          BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_NAME])
-          # Corresponds to --with-extra-path
-          BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_EXTRA_PATH])
-          # Corresponds to --with-toolchain-path
-          BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_TOOLCHAIN_PATH])
-          # Corresponds to --with-sysroot
-          BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_SYSROOT])
+      [use this devkit for compilers, tools and resources])])
 
-          # Identifies the Visual Studio version in the devkit
-          BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_VS_VERSION])
-          # The Visual Studio include environment variable
-          BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_VS_INCLUDE])
-          # The Visual Studio lib environment variable
-          BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_VS_LIB])
-          # Corresponds to --with-msvcr-dll
-          BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_MSVCR_DLL])
-          # Corresponds to --with-msvcp-dll
-          BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_MSVCP_DLL])
-        fi
+  if test "x$with_devkit" = xyes; then
+    AC_MSG_ERROR([--with-devkit must have a value])
+  elif test "x$with_devkit" != x && test "x$with_devkit" != xno; then
+    BASIC_FIXUP_PATH([with_devkit])
+    DEVKIT_ROOT="$with_devkit"
+    # Check for a meta data info file in the root of the devkit
+    if test -f "$DEVKIT_ROOT/devkit.info"; then
+      . $DEVKIT_ROOT/devkit.info
+      # This potentially sets the following:
+      # A descriptive name of the devkit
+      BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_NAME])
+      # Corresponds to --with-extra-path
+      BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_EXTRA_PATH])
+      # Corresponds to --with-toolchain-path
+      BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_TOOLCHAIN_PATH])
+      # Corresponds to --with-sysroot
+      BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_SYSROOT])
+
+      # Identifies the Visual Studio version in the devkit
+      BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_VS_VERSION])
+      # The Visual Studio include environment variable
+      BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_VS_INCLUDE])
+      # The Visual Studio lib environment variable
+      BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_VS_LIB])
+      # Corresponds to --with-msvcr-dll
+      BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_MSVCR_DLL])
+      # Corresponds to --with-msvcp-dll
+      BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_MSVCP_DLL])
+    fi
 
-        AC_MSG_CHECKING([for devkit])
-        if test "x$DEVKIT_NAME" != x; then
-          AC_MSG_RESULT([$DEVKIT_NAME in $DEVKIT_ROOT])
-        else
-          AC_MSG_RESULT([$DEVKIT_ROOT])
-        fi
+    AC_MSG_CHECKING([for devkit])
+    if test "x$DEVKIT_NAME" != x; then
+      AC_MSG_RESULT([$DEVKIT_NAME in $DEVKIT_ROOT])
+    else
+      AC_MSG_RESULT([$DEVKIT_ROOT])
+    fi
 
-        BASIC_PREPEND_TO_PATH([EXTRA_PATH],$DEVKIT_EXTRA_PATH)
+    BASIC_PREPEND_TO_PATH([EXTRA_PATH],$DEVKIT_EXTRA_PATH)
 
-        # Fallback default of just /bin if DEVKIT_PATH is not defined
-        if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
-          DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
-        fi
-        BASIC_PREPEND_TO_PATH([TOOLCHAIN_PATH],$DEVKIT_TOOLCHAIN_PATH)
+    # Fallback default of just /bin if DEVKIT_PATH is not defined
+    if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
+      DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
+    fi
+    BASIC_PREPEND_TO_PATH([TOOLCHAIN_PATH],$DEVKIT_TOOLCHAIN_PATH)
 
-        # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
-        # places for backwards compatiblity.
-        if test "x$DEVKIT_SYSROOT" != x; then
-          SYSROOT="$DEVKIT_SYSROOT"
-        elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
-          SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
-        elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
-          SYSROOT="$DEVKIT_ROOT/$host/sys-root"
-        fi
+    # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
+    # places for backwards compatiblity.
+    if test "x$DEVKIT_SYSROOT" != x; then
+      SYSROOT="$DEVKIT_SYSROOT"
+    elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
+      SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
+    elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
+      SYSROOT="$DEVKIT_ROOT/$host/sys-root"
+    fi
 
-        if test "x$DEVKIT_ROOT" != x; then
-          DEVKIT_LIB_DIR="$DEVKIT_ROOT/lib"
-          if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
-            DEVKIT_LIB_DIR="$DEVKIT_ROOT/lib64"
-          fi
-          AC_SUBST(DEVKIT_LIB_DIR)
-        fi
-      ]
-  )
+    if test "x$DEVKIT_ROOT" != x; then
+      DEVKIT_LIB_DIR="$DEVKIT_ROOT/lib"
+      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
+        DEVKIT_LIB_DIR="$DEVKIT_ROOT/lib64"
+      fi
+      AC_SUBST(DEVKIT_LIB_DIR)
+    fi
+  fi
 
   # You can force the sysroot if the sysroot encoded into the compiler tools
   # is not correct.
--- a/make/autoconf/generated-configure.sh	Tue Jan 30 16:26:40 2018 +0100
+++ b/make/autoconf/generated-configure.sh	Tue Jan 30 16:41:40 2018 +0100
@@ -902,6 +902,9 @@
 VERSION_UPDATE
 VERSION_INTERIM
 VERSION_FEATURE
+VENDOR_URL_VM_BUG
+VENDOR_URL_BUG
+VENDOR_URL
 COMPANY_NAME
 MACOSX_BUNDLE_ID_BASE
 MACOSX_BUNDLE_NAME_BASE
@@ -1150,6 +1153,9 @@
 with_version_minor
 with_version_security
 with_vendor_name
+with_vendor_url
+with_vendor_bug_url
+with_vendor_vm_bug_url
 with_version_string
 with_version_pre
 with_version_opt
@@ -2074,7 +2080,16 @@
                           compatibility and is ignored
   --with-version-security Deprecated. Option is kept for backwards
                           compatibility and is ignored
-  --with-vendor-name      Set vendor name [not specified]
+  --with-vendor-name      Set vendor name. Among others, used to set the
+                          'java.vendor' and 'java.vm.vendor' system
+                          properties. [not specified]
+  --with-vendor-url       Set the 'java.vendor.url' system property [not
+                          specified]
+  --with-vendor-bug-url   Set the 'java.vendor.url.bug' system property [not
+                          specified]
+  --with-vendor-vm-bug-url
+                          Sets the bug URL which will be displayed when the VM
+                          crashes [not specified]
   --with-version-string   Set version string [calculated]
   --with-version-pre      Set the base part of the version 'PRE' field
                           (pre-release identifier) ['internal']
@@ -5102,7 +5117,7 @@
 
 ################################################################################
 # The order of these defines the priority by which we try to find them.
-VALID_VS_VERSIONS="2013 2012 2010"
+VALID_VS_VERSIONS="2013 2012 2010 2015 2017"
 
 VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
 VS_VERSION_INTERNAL_2010=100
@@ -5135,6 +5150,30 @@
 VS_VS_PLATFORM_NAME_2013="v120"
 VS_SDK_PLATFORM_NAME_2013=
 
+VS_DESCRIPTION_2015="Microsoft Visual Studio 2015 - CURRENTLY NOT WORKING"
+VS_VERSION_INTERNAL_2015=140
+VS_MSVCR_2015=vcruntime140.dll
+VS_MSVCP_2015=msvcp140.dll
+VS_ENVVAR_2015="VS140COMNTOOLS"
+VS_VS_INSTALLDIR_2015="Microsoft Visual Studio 14.0"
+VS_SDK_INSTALLDIR_2015=
+VS_VS_PLATFORM_NAME_2015="v140"
+VS_SDK_PLATFORM_NAME_2015=
+# The vcvars of 2015 breaks if 2017 is also installed. Work around this by
+# explicitly specifying Windows Kit 8.1 to be used.
+VS_ENV_ARGS_2015="8.1"
+
+VS_DESCRIPTION_2017="Microsoft Visual Studio 2017 - CURRENTLY NOT WORKING"
+VS_VERSION_INTERNAL_2017=141
+VS_MSVCR_2017=vcruntime140.dll
+VS_MSVCP_2017=msvcp140.dll
+VS_ENVVAR_2017="VS150COMNTOOLS"
+VS_VS_INSTALLDIR_2017="Microsoft Visual Studio/2017"
+VS_EDITIONS_2017="Community Professional Enterprise"
+VS_SDK_INSTALLDIR_2017=
+VS_VS_PLATFORM_NAME_2017="v141"
+VS_SDK_PLATFORM_NAME_2017=
+
 ################################################################################
 
 
@@ -5176,7 +5215,7 @@
 #CUSTOM_AUTOCONF_INCLUDE
 
 # Do not change or remove the following line, it is needed for consistency checks:
-DATE_WHEN_GENERATED=1513805283
+DATE_WHEN_GENERATED=1517244998
 
 ###############################################################################
 #
@@ -17098,6 +17137,12 @@
 # Check whether --with-devkit was given.
 if test "${with_devkit+set}" = set; then :
   withval=$with_devkit;
+fi
+
+
+  if test "x$with_devkit" = xyes; then
+    as_fn_error $? "--with-devkit must have a value" "$LINENO" 5
+  elif test "x$with_devkit" != x && test "x$with_devkit" != xno; then
 
   # Only process if variable expands to non-empty
 
@@ -17230,77 +17275,77 @@
     fi
   fi
 
-        DEVKIT_ROOT="$with_devkit"
-        # Check for a meta data info file in the root of the devkit
-        if test -f "$DEVKIT_ROOT/devkit.info"; then
-          . $DEVKIT_ROOT/devkit.info
-          # This potentially sets the following:
-          # A descriptive name of the devkit
+    DEVKIT_ROOT="$with_devkit"
+    # Check for a meta data info file in the root of the devkit
+    if test -f "$DEVKIT_ROOT/devkit.info"; then
+      . $DEVKIT_ROOT/devkit.info
+      # This potentially sets the following:
+      # A descriptive name of the devkit
 
   if test "x$DEVKIT_NAME" = x; then
     eval DEVKIT_NAME="\${DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
   fi
 
-          # Corresponds to --with-extra-path
+      # Corresponds to --with-extra-path
 
   if test "x$DEVKIT_EXTRA_PATH" = x; then
     eval DEVKIT_EXTRA_PATH="\${DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
   fi
 
-          # Corresponds to --with-toolchain-path
+      # Corresponds to --with-toolchain-path
 
   if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
     eval DEVKIT_TOOLCHAIN_PATH="\${DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
   fi
 
-          # Corresponds to --with-sysroot
+      # Corresponds to --with-sysroot
 
   if test "x$DEVKIT_SYSROOT" = x; then
     eval DEVKIT_SYSROOT="\${DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
   fi
 
 
-          # Identifies the Visual Studio version in the devkit
+      # Identifies the Visual Studio version in the devkit
 
   if test "x$DEVKIT_VS_VERSION" = x; then
     eval DEVKIT_VS_VERSION="\${DEVKIT_VS_VERSION_${OPENJDK_TARGET_CPU}}"
   fi
 
-          # The Visual Studio include environment variable
+      # The Visual Studio include environment variable
 
   if test "x$DEVKIT_VS_INCLUDE" = x; then
     eval DEVKIT_VS_INCLUDE="\${DEVKIT_VS_INCLUDE_${OPENJDK_TARGET_CPU}}"
   fi
 
-          # The Visual Studio lib environment variable
+      # The Visual Studio lib environment variable
 
   if test "x$DEVKIT_VS_LIB" = x; then
     eval DEVKIT_VS_LIB="\${DEVKIT_VS_LIB_${OPENJDK_TARGET_CPU}}"
   fi
 
-          # Corresponds to --with-msvcr-dll
+      # Corresponds to --with-msvcr-dll
 
   if test "x$DEVKIT_MSVCR_DLL" = x; then
     eval DEVKIT_MSVCR_DLL="\${DEVKIT_MSVCR_DLL_${OPENJDK_TARGET_CPU}}"
   fi
 
-          # Corresponds to --with-msvcp-dll
+      # Corresponds to --with-msvcp-dll
 
   if test "x$DEVKIT_MSVCP_DLL" = x; then
     eval DEVKIT_MSVCP_DLL="\${DEVKIT_MSVCP_DLL_${OPENJDK_TARGET_CPU}}"
   fi
 
-        fi
-
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
+    fi
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
 $as_echo_n "checking for devkit... " >&6; }
-        if test "x$DEVKIT_NAME" != x; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
+    if test "x$DEVKIT_NAME" != x; then
+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
 $as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
-        else
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
+    else
+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
 $as_echo "$DEVKIT_ROOT" >&6; }
-        fi
+    fi
 
 
   if test "x$DEVKIT_EXTRA_PATH" != x; then
@@ -17312,10 +17357,10 @@
   fi
 
 
-        # Fallback default of just /bin if DEVKIT_PATH is not defined
-        if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
-          DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
-        fi
+    # Fallback default of just /bin if DEVKIT_PATH is not defined
+    if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
+      DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
+    fi
 
   if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
     if test "x$TOOLCHAIN_PATH" = x; then
@@ -17326,27 +17371,24 @@
   fi
 
 
-        # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
-        # places for backwards compatiblity.
-        if test "x$DEVKIT_SYSROOT" != x; then
-          SYSROOT="$DEVKIT_SYSROOT"
-        elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
-          SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
-        elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
-          SYSROOT="$DEVKIT_ROOT/$host/sys-root"
-        fi
-
-        if test "x$DEVKIT_ROOT" != x; then
-          DEVKIT_LIB_DIR="$DEVKIT_ROOT/lib"
-          if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
-            DEVKIT_LIB_DIR="$DEVKIT_ROOT/lib64"
-          fi
-
-        fi
-
-
-fi
-
+    # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
+    # places for backwards compatiblity.
+    if test "x$DEVKIT_SYSROOT" != x; then
+      SYSROOT="$DEVKIT_SYSROOT"
+    elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
+      SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
+    elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
+      SYSROOT="$DEVKIT_ROOT/$host/sys-root"
+    fi
+
+    if test "x$DEVKIT_ROOT" != x; then
+      DEVKIT_LIB_DIR="$DEVKIT_ROOT/lib"
+      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
+        DEVKIT_LIB_DIR="$DEVKIT_ROOT/lib64"
+      fi
+
+    fi
+  fi
 
   # You can force the sysroot if the sysroot encoded into the compiler tools
   # is not correct.
@@ -25072,12 +25114,62 @@
   if test "x$with_vendor_name" = xyes; then
     as_fn_error $? "--with-vendor-name must have a value" "$LINENO" 5
   elif  ! [[ $with_vendor_name =~ ^[[:print:]]*$ ]] ; then
-    as_fn_error $? "--with--vendor-name contains non-printing characters: $with_vendor_name" "$LINENO" 5
-  else
+    as_fn_error $? "--with-vendor-name contains non-printing characters: $with_vendor_name" "$LINENO" 5
+  elif test "x$with_vendor_name" != x; then
+    # Only set COMPANY_NAME if '--with-vendor-name' was used and is not empty.
+    # Otherwise we will use the value from "version-numbers" included above.
     COMPANY_NAME="$with_vendor_name"
   fi
 
 
+  # The vendor URL, if any
+
+# Check whether --with-vendor-url was given.
+if test "${with_vendor_url+set}" = set; then :
+  withval=$with_vendor_url;
+fi
+
+  if test "x$with_vendor_url" = xyes; then
+    as_fn_error $? "--with-vendor-url must have a value" "$LINENO" 5
+  elif  ! [[ $with_vendor_url =~ ^[[:print:]]*$ ]] ; then
+    as_fn_error $? "--with-vendor-url contains non-printing characters: $with_vendor_url" "$LINENO" 5
+  else
+    VENDOR_URL="$with_vendor_url"
+  fi
+
+
+  # The vendor bug URL, if any
+
+# Check whether --with-vendor-bug-url was given.
+if test "${with_vendor_bug_url+set}" = set; then :
+  withval=$with_vendor_bug_url;
+fi
+
+  if test "x$with_vendor_bug_url" = xyes; then
+    as_fn_error $? "--with-vendor-bug-url must have a value" "$LINENO" 5
+  elif  ! [[ $with_vendor_bug_url =~ ^[[:print:]]*$ ]] ; then
+    as_fn_error $? "--with-vendor-bug-url contains non-printing characters: $with_vendor_bug_url" "$LINENO" 5
+  else
+    VENDOR_URL_BUG="$with_vendor_bug_url"
+  fi
+
+
+  # The vendor VM bug URL, if any
+
+# Check whether --with-vendor-vm-bug-url was given.
+if test "${with_vendor_vm_bug_url+set}" = set; then :
+  withval=$with_vendor_vm_bug_url;
+fi
+
+  if test "x$with_vendor_vm_bug_url" = xyes; then
+    as_fn_error $? "--with-vendor-vm-bug-url must have a value" "$LINENO" 5
+  elif  ! [[ $with_vendor_vm_bug_url =~ ^[[:print:]]*$ ]] ; then
+    as_fn_error $? "--with-vendor-vm-bug-url contains non-printing characters: $with_vendor_vm_bug_url" "$LINENO" 5
+  else
+    VENDOR_URL_VM_BUG="$with_vendor_vm_bug_url"
+  fi
+
+
   # Override version from arguments
 
   # If --with-version-string is set, process it first. It is possible to
@@ -32234,7 +32326,11 @@
   elif test "x$DEVKIT_VS_VERSION" != x; then
     VS_VERSION=$DEVKIT_VS_VERSION
     TOOLCHAIN_VERSION=$VS_VERSION
-    eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
+    # If the devkit has a name, use that as description
+    VS_DESCRIPTION="$DEVKIT_NAME"
+    if test "x$VS_DESCRIPTION" = x; then
+      eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
+    fi
     eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
     eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
     eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
@@ -32302,7 +32398,9 @@
   eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
   eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
   eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
+  eval VS_EDITIONS="\${VS_EDITIONS_${VS_VERSION}}"
   eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
+  eval VS_ENV_ARGS="\${VS_ENV_ARGS_${VS_VERSION}}"
 
   # When using --with-tools-dir, assume it points to the correct and default
   # version of Visual Studio or that --with-toolchain-version was also set.
@@ -32313,12 +32411,6 @@
     VS_BASE="$with_tools_dir/../.."
     METHOD="--with-tools-dir"
 
-    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
-      VCVARSFILE="vc/bin/vcvars32.bat"
-    else
-      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
-    fi
-
 
   windows_path="$VS_BASE"
   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
@@ -32329,19 +32421,42 @@
     VS_BASE="$unix_path"
   fi
 
+    # In VS 2017, the default installation is in a subdir named after the edition.
+    # Find the first one present and use that.
+    if test "x$VS_EDITIONS" != x; then
+      for edition in $VS_EDITIONS; do
+        if test -d "$VS_BASE/$edition"; then
+          VS_BASE="$VS_BASE/$edition"
+          break
+        fi
+      done
+    fi
+
     if test -d "$VS_BASE"; then
-      if test -f "$VS_BASE/$VCVARSFILE"; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
+      { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
-        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
-        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
-        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
+      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
+        VCVARSFILES="vc/bin/vcvars32.bat vc/auxiliary/build/vcvars32.bat"
+      else
+        VCVARSFILES="vc/bin/amd64/vcvars64.bat vc/bin/x86_amd64/vcvarsx86_amd64.bat \
+            vc/auxiliary/build/vcvarsx86_amd64.bat vc/auxiliary/build/vcvars64.bat"
+      fi
+
+      for VCVARSFILE in $VCVARSFILES; do
+        if test -f "$VS_BASE/$VCVARSFILE"; then
+          VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
+          break
+        fi
+      done
+
+      if test "x$VS_ENV_CMD" = x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: None of $VCVARSFILES were found, Visual Studio installation not recognized. Ignoring" >&5
+$as_echo "$as_me: Warning: None of $VCVARSFILES were found, Visual Studio installation not recognized. Ignoring" >&6;}
+      else
+        # PLATFORM_TOOLSET is used during the compilation of the freetype sources
+        # (see 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100',
+        # 'v110' or 'v120' for VS 2010, 2012 or VS2013
         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
-      else
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
-$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
-$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
       fi
     fi
   fi
@@ -32352,12 +32467,6 @@
     VS_BASE="$with_tools_dir/../../.."
     METHOD="--with-tools-dir"
 
-    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
-      VCVARSFILE="vc/bin/vcvars32.bat"
-    else
-      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
-    fi
-
 
   windows_path="$VS_BASE"
   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
@@ -32368,19 +32477,42 @@
     VS_BASE="$unix_path"
   fi
 
+    # In VS 2017, the default installation is in a subdir named after the edition.
+    # Find the first one present and use that.
+    if test "x$VS_EDITIONS" != x; then
+      for edition in $VS_EDITIONS; do
+        if test -d "$VS_BASE/$edition"; then
+          VS_BASE="$VS_BASE/$edition"
+          break
+        fi
+      done
+    fi
+
     if test -d "$VS_BASE"; then
-      if test -f "$VS_BASE/$VCVARSFILE"; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
+      { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
-        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
-        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
-        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
+      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
+        VCVARSFILES="vc/bin/vcvars32.bat vc/auxiliary/build/vcvars32.bat"
+      else
+        VCVARSFILES="vc/bin/amd64/vcvars64.bat vc/bin/x86_amd64/vcvarsx86_amd64.bat \
+            vc/auxiliary/build/vcvarsx86_amd64.bat vc/auxiliary/build/vcvars64.bat"
+      fi
+
+      for VCVARSFILE in $VCVARSFILES; do
+        if test -f "$VS_BASE/$VCVARSFILE"; then
+          VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
+          break
+        fi
+      done
+
+      if test "x$VS_ENV_CMD" = x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: None of $VCVARSFILES were found, Visual Studio installation not recognized. Ignoring" >&5
+$as_echo "$as_me: Warning: None of $VCVARSFILES were found, Visual Studio installation not recognized. Ignoring" >&6;}
+      else
+        # PLATFORM_TOOLSET is used during the compilation of the freetype sources
+        # (see 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100',
+        # 'v110' or 'v120' for VS 2010, 2012 or VS2013
         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
-      else
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
-$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
-$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
       fi
     fi
   fi
@@ -32399,7 +32531,6 @@
   fi
 
   VS_ENV_CMD=""
-  VS_ENV_ARGS=""
 
   if test "x$VS_COMNTOOLS" != x; then
 
@@ -32408,12 +32539,6 @@
     VS_BASE="$VS_COMNTOOLS/../.."
     METHOD="$VS_COMNTOOLS_VAR variable"
 
-    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
-      VCVARSFILE="vc/bin/vcvars32.bat"
-    else
-      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
-    fi
-
 
   windows_path="$VS_BASE"
   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
@@ -32424,19 +32549,42 @@
     VS_BASE="$unix_path"
   fi
 
+    # In VS 2017, the default installation is in a subdir named after the edition.
+    # Find the first one present and use that.
+    if test "x$VS_EDITIONS" != x; then
+      for edition in $VS_EDITIONS; do
+        if test -d "$VS_BASE/$edition"; then
+          VS_BASE="$VS_BASE/$edition"
+          break
+        fi
+      done
+    fi
+
     if test -d "$VS_BASE"; then
-      if test -f "$VS_BASE/$VCVARSFILE"; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
+      { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
-        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
-        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
-        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
+      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
+        VCVARSFILES="vc/bin/vcvars32.bat vc/auxiliary/build/vcvars32.bat"
+      else
+        VCVARSFILES="vc/bin/amd64/vcvars64.bat vc/bin/x86_amd64/vcvarsx86_amd64.bat \
+            vc/auxiliary/build/vcvarsx86_amd64.bat vc/auxiliary/build/vcvars64.bat"
+      fi
+
+      for VCVARSFILE in $VCVARSFILES; do
+        if test -f "$VS_BASE/$VCVARSFILE"; then
+          VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
+          break
+        fi
+      done
+
+      if test "x$VS_ENV_CMD" = x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: None of $VCVARSFILES were found, Visual Studio installation not recognized. Ignoring" >&5
+$as_echo "$as_me: Warning: None of $VCVARSFILES were found, Visual Studio installation not recognized. Ignoring" >&6;}
+      else
+        # PLATFORM_TOOLSET is used during the compilation of the freetype sources
+        # (see 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100',
+        # 'v110' or 'v120' for VS 2010, 2012 or VS2013
         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
-      else
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
-$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
-$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
       fi
     fi
   fi
@@ -32449,12 +32597,6 @@
     VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
     METHOD="well-known name"
 
-    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
-      VCVARSFILE="vc/bin/vcvars32.bat"
-    else
-      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
-    fi
-
 
   windows_path="$VS_BASE"
   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
@@ -32465,19 +32607,42 @@
     VS_BASE="$unix_path"
   fi
 
+    # In VS 2017, the default installation is in a subdir named after the edition.
+    # Find the first one present and use that.
+    if test "x$VS_EDITIONS" != x; then
+      for edition in $VS_EDITIONS; do
+        if test -d "$VS_BASE/$edition"; then
+          VS_BASE="$VS_BASE/$edition"
+          break
+        fi
+      done
+    fi
+
     if test -d "$VS_BASE"; then
-      if test -f "$VS_BASE/$VCVARSFILE"; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
+      { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
-        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
-        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
-        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
+      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
+        VCVARSFILES="vc/bin/vcvars32.bat vc/auxiliary/build/vcvars32.bat"
+      else
+        VCVARSFILES="vc/bin/amd64/vcvars64.bat vc/bin/x86_amd64/vcvarsx86_amd64.bat \
+            vc/auxiliary/build/vcvarsx86_amd64.bat vc/auxiliary/build/vcvars64.bat"
+      fi
+
+      for VCVARSFILE in $VCVARSFILES; do
+        if test -f "$VS_BASE/$VCVARSFILE"; then
+          VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
+          break
+        fi
+      done
+
+      if test "x$VS_ENV_CMD" = x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: None of $VCVARSFILES were found, Visual Studio installation not recognized. Ignoring" >&5
+$as_echo "$as_me: Warning: None of $VCVARSFILES were found, Visual Studio installation not recognized. Ignoring" >&6;}
+      else
+        # PLATFORM_TOOLSET is used during the compilation of the freetype sources
+        # (see 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100',
+        # 'v110' or 'v120' for VS 2010, 2012 or VS2013
         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
-      else
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
-$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
-$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
       fi
     fi
   fi
@@ -32492,12 +32657,6 @@
     VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
     METHOD="well-known name"
 
-    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
-      VCVARSFILE="vc/bin/vcvars32.bat"
-    else
-      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
-    fi
-
 
   windows_path="$VS_BASE"
   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
@@ -32508,19 +32667,42 @@
     VS_BASE="$unix_path"
   fi
 
+    # In VS 2017, the default installation is in a subdir named after the edition.
+    # Find the first one present and use that.
+    if test "x$VS_EDITIONS" != x; then
+      for edition in $VS_EDITIONS; do
+        if test -d "$VS_BASE/$edition"; then
+          VS_BASE="$VS_BASE/$edition"
+          break
+        fi
+      done
+    fi
+
     if test -d "$VS_BASE"; then
-      if test -f "$VS_BASE/$VCVARSFILE"; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
+      { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
-        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
-        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
-        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
+      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
+        VCVARSFILES="vc/bin/vcvars32.bat vc/auxiliary/build/vcvars32.bat"
+      else
+        VCVARSFILES="vc/bin/amd64/vcvars64.bat vc/bin/x86_amd64/vcvarsx86_amd64.bat \
+            vc/auxiliary/build/vcvarsx86_amd64.bat vc/auxiliary/build/vcvars64.bat"
+      fi
+
+      for VCVARSFILE in $VCVARSFILES; do
+        if test -f "$VS_BASE/$VCVARSFILE"; then
+          VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
+          break
+        fi
+      done
+
+      if test "x$VS_ENV_CMD" = x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: None of $VCVARSFILES were found, Visual Studio installation not recognized. Ignoring" >&5
+$as_echo "$as_me: Warning: None of $VCVARSFILES were found, Visual Studio installation not recognized. Ignoring" >&6;}
+      else
+        # PLATFORM_TOOLSET is used during the compilation of the freetype sources
+        # (see 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100',
+        # 'v110' or 'v120' for VS 2010, 2012 or VS2013
         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
-      else
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
-$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
-$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
       fi
     fi
   fi
@@ -32532,11 +32714,61 @@
     VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
     METHOD="well-known name"
 
-    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
-      VCVARSFILE="vc/bin/vcvars32.bat"
-    else
-      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
-    fi
+
+  windows_path="$VS_BASE"
+  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+    unix_path=`$CYGPATH -u "$windows_path"`
+    VS_BASE="$unix_path"
+  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+    VS_BASE="$unix_path"
+  fi
+
+    # In VS 2017, the default installation is in a subdir named after the edition.
+    # Find the first one present and use that.
+    if test "x$VS_EDITIONS" != x; then
+      for edition in $VS_EDITIONS; do
+        if test -d "$VS_BASE/$edition"; then
+          VS_BASE="$VS_BASE/$edition"
+          break
+        fi
+      done
+    fi
+
+    if test -d "$VS_BASE"; then
+      { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
+$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
+      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
+        VCVARSFILES="vc/bin/vcvars32.bat vc/auxiliary/build/vcvars32.bat"
+      else
+        VCVARSFILES="vc/bin/amd64/vcvars64.bat vc/bin/x86_amd64/vcvarsx86_amd64.bat \
+            vc/auxiliary/build/vcvarsx86_amd64.bat vc/auxiliary/build/vcvars64.bat"
+      fi
+
+      for VCVARSFILE in $VCVARSFILES; do
+        if test -f "$VS_BASE/$VCVARSFILE"; then
+          VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
+          break
+        fi
+      done
+
+      if test "x$VS_ENV_CMD" = x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: None of $VCVARSFILES were found, Visual Studio installation not recognized. Ignoring" >&5
+$as_echo "$as_me: Warning: None of $VCVARSFILES were found, Visual Studio installation not recognized. Ignoring" >&6;}
+      else
+        # PLATFORM_TOOLSET is used during the compilation of the freetype sources
+        # (see 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100',
+        # 'v110' or 'v120' for VS 2010, 2012 or VS2013
+        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
+      fi
+    fi
+  fi
+
+
+  if test "x$VS_ENV_CMD" = x; then
+    VS_VERSION="${VS_VERSION}"
+    VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
+    METHOD="well-known name"
 
 
   windows_path="$VS_BASE"
@@ -32548,58 +32780,42 @@
     VS_BASE="$unix_path"
   fi
 
-    if test -d "$VS_BASE"; then
-      if test -f "$VS_BASE/$VCVARSFILE"; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
-$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
-        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
-        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
-        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
-        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
-      else
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
-$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
-$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
-      fi
-    fi
-  fi
-
-
-  if test "x$VS_ENV_CMD" = x; then
-    VS_VERSION="${VS_VERSION}"
-    VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
-    METHOD="well-known name"
-
-    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
-      VCVARSFILE="vc/bin/vcvars32.bat"
-    else
-      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
-    fi
-
-
-  windows_path="$VS_BASE"
-  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
-    unix_path=`$CYGPATH -u "$windows_path"`
-    VS_BASE="$unix_path"
-  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
-    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
-    VS_BASE="$unix_path"
-  fi
+    # In VS 2017, the default installation is in a subdir named after the edition.
+    # Find the first one present and use that.
+    if test "x$VS_EDITIONS" != x; then
+      for edition in $VS_EDITIONS; do
+        if test -d "$VS_BASE/$edition"; then
+          VS_BASE="$VS_BASE/$edition"
+          break
+        fi
+      done
+    fi
 
     if test -d "$VS_BASE"; then
-      if test -f "$VS_BASE/$VCVARSFILE"; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
+      { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
-        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
-        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
-        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
+      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
+        VCVARSFILES="vc/bin/vcvars32.bat vc/auxiliary/build/vcvars32.bat"
+      else
+        VCVARSFILES="vc/bin/amd64/vcvars64.bat vc/bin/x86_amd64/vcvarsx86_amd64.bat \
+            vc/auxiliary/build/vcvarsx86_amd64.bat vc/auxiliary/build/vcvars64.bat"
+      fi
+
+      for VCVARSFILE in $VCVARSFILES; do
+        if test -f "$VS_BASE/$VCVARSFILE"; then
+          VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
+          break
+        fi
+      done
+
+      if test "x$VS_ENV_CMD" = x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: None of $VCVARSFILES were found, Visual Studio installation not recognized. Ignoring" >&5
+$as_echo "$as_me: Warning: None of $VCVARSFILES were found, Visual Studio installation not recognized. Ignoring" >&6;}
+      else
+        # PLATFORM_TOOLSET is used during the compilation of the freetype sources
+        # (see 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100',
+        # 'v110' or 'v120' for VS 2010, 2012 or VS2013
         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
-      else
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
-$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
-$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
       fi
     fi
   fi
@@ -32852,6 +33068,11 @@
     fi
   done
 
+  TOOLCHAIN_DESCRIPTION="$VS_DESCRIPTION"
+  if test "$TOOLCHAIN_VERSION" -gt 2013; then
+    UNSUPPORTED_TOOLCHAIN_VERSION=yes
+  fi
+
 
   # If we have a devkit, skip all of the below.
   if test "x$DEVKIT_VS_VERSION" = x; then
@@ -33184,6 +33405,9 @@
       # This will end up something like:
       # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
       $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
+      # In some cases, the VS_ENV_CMD will change directory, change back so
+      # the set-vs-env.sh ends up in the right place.
+      $ECHO 'cd %~dp0' >> $EXTRACT_VC_ENV_BAT_FILE
       # These will end up something like:
       # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
       # The trailing space for everyone except PATH is no typo, but is needed due
@@ -33605,7 +33829,7 @@
     if test "x$XCODE_VERSION_OUTPUT" != x; then
       # For Xcode, we set the Xcode version as TOOLCHAIN_VERSION
       TOOLCHAIN_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | $CUT -f 2 -d ' '`
-      TOOLCHAIN_DESCRIPTION="$TOOLCHAIN_DESCRIPTION from Xcode"
+      TOOLCHAIN_DESCRIPTION="$TOOLCHAIN_DESCRIPTION from Xcode $TOOLCHAIN_VERSION"
     else
       # Currently we do not define this for other toolchains. This might change as the need arise.
       TOOLCHAIN_VERSION=
@@ -55823,7 +56047,6 @@
   MSVC_DLL=
 
   if test "x$MSVC_DLL" = x; then
-    # Probe: Using well-known location from Visual Studio 10.0
     if test "x$VCINSTALLDIR" != x; then
       CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
 
@@ -55836,15 +56059,27 @@
     CYGWIN_VC_INSTALL_DIR="$unix_path"
   fi
 
-      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
-        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
-      else
-        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
-      fi
-      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
+      if test "$VS_VERSION" -lt 2017; then
+        # Probe: Using well-known location from Visual Studio 12.0 and older
+        if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
+          POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
+        else
+          POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
+        fi
+      else
+        # Probe: Using well-known location from VS 2017
+        if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
+          POSSIBLE_MSVC_DLL="`ls $CYGWIN_VC_INSTALL_DIR/Redist/MSVC/*/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME`"
+        else
+          POSSIBLE_MSVC_DLL="`ls $CYGWIN_VC_INSTALL_DIR/Redist/MSVC/*/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME`"
+        fi
+      fi
+      # In case any of the above finds more than one file, loop over them.
+      for possible_msvc_dll in $POSSIBLE_MSVC_DLL; do
+        $ECHO "POSSIBLE_MSVC_DLL $possible_msvc_dll"
 
   DLL_NAME="$DLL_NAME"
-  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
+  POSSIBLE_MSVC_DLL="$possible_msvc_dll"
   METHOD="well-known location in VCINSTALLDIR"
   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
@@ -56017,6 +56252,7 @@
     fi
   fi
 
+      done
     fi
   fi
 
@@ -57172,7 +57408,6 @@
   MSVC_DLL=
 
   if test "x$MSVC_DLL" = x; then
-    # Probe: Using well-known location from Visual Studio 10.0
     if test "x$VCINSTALLDIR" != x; then
       CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
 
@@ -57185,15 +57420,27 @@
     CYGWIN_VC_INSTALL_DIR="$unix_path"
   fi
 
-      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
-        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
-      else
-        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
-      fi
-      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
+      if test "$VS_VERSION" -lt 2017; then
+        # Probe: Using well-known location from Visual Studio 12.0 and older
+        if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
+          POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
+        else
+          POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
+        fi
+      else
+        # Probe: Using well-known location from VS 2017
+        if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
+          POSSIBLE_MSVC_DLL="`ls $CYGWIN_VC_INSTALL_DIR/Redist/MSVC/*/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME`"
+        else
+          POSSIBLE_MSVC_DLL="`ls $CYGWIN_VC_INSTALL_DIR/Redist/MSVC/*/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME`"
+        fi
+      fi
+      # In case any of the above finds more than one file, loop over them.
+      for possible_msvc_dll in $POSSIBLE_MSVC_DLL; do
+        $ECHO "POSSIBLE_MSVC_DLL $possible_msvc_dll"
 
   DLL_NAME="$DLL_NAME"
-  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
+  POSSIBLE_MSVC_DLL="$possible_msvc_dll"
   METHOD="well-known location in VCINSTALLDIR"
   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
@@ -57366,6 +57613,7 @@
     fi
   fi
 
+      done
     fi
   fi
 
@@ -70158,10 +70406,7 @@
     printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
   fi
   printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
-  if test "x$TOOLCHAIN_VERSION" != "x"; then
-    print_version=" $TOOLCHAIN_VERSION"
-  fi
-  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
+  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)\n"
   printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
   printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
 
@@ -70209,6 +70454,12 @@
     printf "\n"
   fi
 
+  if test "x$UNSUPPORTED_TOOLCHAIN_VERSION" = "xyes"; then
+    printf "WARNING: The toolchain version used is known to have issues. Please\n"
+    printf "consider using a supported version unless you know what you are doing.\n"
+    printf "\n"
+  fi
+
 
 
   # Locate config.log.
--- a/make/autoconf/help.m4	Tue Jan 30 16:26:40 2018 +0100
+++ b/make/autoconf/help.m4	Tue Jan 30 16:41:40 2018 +0100
@@ -242,10 +242,7 @@
     printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
   fi
   printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
-  if test "x$TOOLCHAIN_VERSION" != "x"; then
-    print_version=" $TOOLCHAIN_VERSION"
-  fi
-  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
+  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)\n"
   printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
   printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
 
@@ -292,6 +289,12 @@
     printf "You should run without '--no-create | -n' to create the configuration.\n"
     printf "\n"
   fi
+
+  if test "x$UNSUPPORTED_TOOLCHAIN_VERSION" = "xyes"; then
+    printf "WARNING: The toolchain version used is known to have issues. Please\n"
+    printf "consider using a supported version unless you know what you are doing.\n"
+    printf "\n"
+  fi
 ])
 
 AC_DEFUN_ONCE([HELP_REPEAT_WARNINGS],
--- a/make/autoconf/jdk-version.m4	Tue Jan 30 16:26:40 2018 +0100
+++ b/make/autoconf/jdk-version.m4	Tue Jan 30 16:41:40 2018 +0100
@@ -80,16 +80,55 @@
 
   # The vendor name, if any
   AC_ARG_WITH(vendor-name, [AS_HELP_STRING([--with-vendor-name],
-      [Set vendor name @<:@not specified@:>@])])
+      [Set vendor name. Among others, used to set the 'java.vendor'
+       and 'java.vm.vendor' system properties. @<:@not specified@:>@])])
   if test "x$with_vendor_name" = xyes; then
     AC_MSG_ERROR([--with-vendor-name must have a value])
   elif [ ! [[ $with_vendor_name =~ ^[[:print:]]*$ ]] ]; then
-    AC_MSG_ERROR([--with--vendor-name contains non-printing characters: $with_vendor_name])
-  else
+    AC_MSG_ERROR([--with-vendor-name contains non-printing characters: $with_vendor_name])
+  elif test "x$with_vendor_name" != x; then
+    # Only set COMPANY_NAME if '--with-vendor-name' was used and is not empty.
+    # Otherwise we will use the value from "version-numbers" included above.
     COMPANY_NAME="$with_vendor_name"
   fi
   AC_SUBST(COMPANY_NAME)
 
+  # The vendor URL, if any
+  AC_ARG_WITH(vendor-url, [AS_HELP_STRING([--with-vendor-url],
+      [Set the 'java.vendor.url' system property @<:@not specified@:>@])])
+  if test "x$with_vendor_url" = xyes; then
+    AC_MSG_ERROR([--with-vendor-url must have a value])
+  elif [ ! [[ $with_vendor_url =~ ^[[:print:]]*$ ]] ]; then
+    AC_MSG_ERROR([--with-vendor-url contains non-printing characters: $with_vendor_url])
+  else
+    VENDOR_URL="$with_vendor_url"
+  fi
+  AC_SUBST(VENDOR_URL)
+
+  # The vendor bug URL, if any
+  AC_ARG_WITH(vendor-bug-url, [AS_HELP_STRING([--with-vendor-bug-url],
+      [Set the 'java.vendor.url.bug' system property @<:@not specified@:>@])])
+  if test "x$with_vendor_bug_url" = xyes; then
+    AC_MSG_ERROR([--with-vendor-bug-url must have a value])
+  elif [ ! [[ $with_vendor_bug_url =~ ^[[:print:]]*$ ]] ]; then
+    AC_MSG_ERROR([--with-vendor-bug-url contains non-printing characters: $with_vendor_bug_url])
+  else
+    VENDOR_URL_BUG="$with_vendor_bug_url"
+  fi
+  AC_SUBST(VENDOR_URL_BUG)
+
+  # The vendor VM bug URL, if any
+  AC_ARG_WITH(vendor-vm-bug-url, [AS_HELP_STRING([--with-vendor-vm-bug-url],
+      [Sets the bug URL which will be displayed when the VM crashes @<:@not specified@:>@])])
+  if test "x$with_vendor_vm_bug_url" = xyes; then
+    AC_MSG_ERROR([--with-vendor-vm-bug-url must have a value])
+  elif [ ! [[ $with_vendor_vm_bug_url =~ ^[[:print:]]*$ ]] ]; then
+    AC_MSG_ERROR([--with-vendor-vm-bug-url contains non-printing characters: $with_vendor_vm_bug_url])
+  else
+    VENDOR_URL_VM_BUG="$with_vendor_vm_bug_url"
+  fi
+  AC_SUBST(VENDOR_URL_VM_BUG)
+
   # Override version from arguments
 
   # If --with-version-string is set, process it first. It is possible to
--- a/make/autoconf/spec.gmk.in	Tue Jan 30 16:26:40 2018 +0100
+++ b/make/autoconf/spec.gmk.in	Tue Jan 30 16:41:40 2018 +0100
@@ -142,6 +142,20 @@
 
 COPYRIGHT_YEAR:=@COPYRIGHT_YEAR@
 
+# Platform naming variables
+LAUNCHER_NAME:=@LAUNCHER_NAME@
+PRODUCT_NAME:=@PRODUCT_NAME@
+PRODUCT_SUFFIX:=@PRODUCT_SUFFIX@
+JDK_RC_PLATFORM_NAME:=@JDK_RC_PLATFORM_NAME@
+COMPANY_NAME:=@COMPANY_NAME@
+HOTSPOT_VM_DISTRO:=@HOTSPOT_VM_DISTRO@
+MACOSX_BUNDLE_NAME_BASE=@MACOSX_BUNDLE_NAME_BASE@
+MACOSX_BUNDLE_ID_BASE=@MACOSX_BUNDLE_ID_BASE@
+USERNAME:=@USERNAME@
+VENDOR_URL:=@VENDOR_URL@
+VENDOR_URL_BUG:=@VENDOR_URL_BUG@
+VENDOR_URL_VM_BUG:=@VENDOR_URL_VM_BUG@
+
 # New (JEP-223) version information
 
 ## Building blocks of the version string
@@ -201,16 +215,30 @@
     -DVERSION_CLASSFILE_MINOR=$(VERSION_CLASSFILE_MINOR) \
     #
 
-# Platform naming variables
-LAUNCHER_NAME:=@LAUNCHER_NAME@
-PRODUCT_NAME:=@PRODUCT_NAME@
-PRODUCT_SUFFIX:=@PRODUCT_SUFFIX@
-JDK_RC_PLATFORM_NAME:=@JDK_RC_PLATFORM_NAME@
-COMPANY_NAME:=@COMPANY_NAME@
-HOTSPOT_VM_DISTRO:=@HOTSPOT_VM_DISTRO@
-MACOSX_BUNDLE_NAME_BASE=@MACOSX_BUNDLE_NAME_BASE@
-MACOSX_BUNDLE_ID_BASE=@MACOSX_BUNDLE_ID_BASE@
-USERNAME:=@USERNAME@
+ifneq ($(COMPANY_NAME),)
+  # COMPANY_NAME is set to "N/A" in $AUTOCONF_DIR/version-numbers by default,
+  # but can be customized with the '--with-vendor-name' configure option.
+  # Only export "VENDOR" to the build if COMPANY_NAME contains a real value.
+  # Otherwise the default value for VENDOR, which is used to set the "java.vendor"
+  # and "java.vm.vendor" properties is hard-coded into the source code (i.e. in
+  # System.c in the jdk for "vm.vendor" and vm_version.cpp in the VM for "java.vm.vendor") 
+  ifneq ($(COMPANY_NAME), N/A)
+    VERSION_CFLAGS += -DVENDOR='"$(COMPANY_NAME)"' 
+  endif
+endif
+
+# Only export VENDOR_URL, VENDOR_URL_BUG and VENDOR_VM_URL_BUG to the build if
+# they are not empty. Otherwise, default values which are defined in the sources
+# will be used.
+ifneq ($(VENDOR_URL),)
+  VERSION_CFLAGS += -DVENDOR_URL='"$(VENDOR_URL)"'
+endif
+ifneq ($(VENDOR_URL_BUG),)
+  VERSION_CFLAGS += -DVENDOR_URL_BUG='"$(VENDOR_URL_BUG)"'
+endif
+ifneq ($(VENDOR_URL_VM_BUG),)
+  VERSION_CFLAGS += -DVENDOR_URL_VM_BUG='"$(VENDOR_URL_VM_BUG)"'
+endif
 
 # Different naming strings generated from the above information.
 RUNTIME_NAME=$(PRODUCT_NAME) $(PRODUCT_SUFFIX)
--- a/make/autoconf/toolchain.m4	Tue Jan 30 16:26:40 2018 +0100
+++ b/make/autoconf/toolchain.m4	Tue Jan 30 16:41:40 2018 +0100
@@ -286,7 +286,7 @@
     if test "x$XCODE_VERSION_OUTPUT" != x; then
       # For Xcode, we set the Xcode version as TOOLCHAIN_VERSION
       TOOLCHAIN_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | $CUT -f 2 -d ' '`
-      TOOLCHAIN_DESCRIPTION="$TOOLCHAIN_DESCRIPTION from Xcode"
+      TOOLCHAIN_DESCRIPTION="$TOOLCHAIN_DESCRIPTION from Xcode $TOOLCHAIN_VERSION"
     else
       # Currently we do not define this for other toolchains. This might change as the need arise.
       TOOLCHAIN_VERSION=
--- a/make/autoconf/toolchain_windows.m4	Tue Jan 30 16:26:40 2018 +0100
+++ b/make/autoconf/toolchain_windows.m4	Tue Jan 30 16:41:40 2018 +0100
@@ -25,7 +25,7 @@
 
 ################################################################################
 # The order of these defines the priority by which we try to find them.
-VALID_VS_VERSIONS="2013 2012 2010"
+VALID_VS_VERSIONS="2013 2012 2010 2015 2017"
 
 VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
 VS_VERSION_INTERNAL_2010=100
@@ -58,6 +58,30 @@
 VS_VS_PLATFORM_NAME_2013="v120"
 VS_SDK_PLATFORM_NAME_2013=
 
+VS_DESCRIPTION_2015="Microsoft Visual Studio 2015 - CURRENTLY NOT WORKING"
+VS_VERSION_INTERNAL_2015=140
+VS_MSVCR_2015=vcruntime140.dll
+VS_MSVCP_2015=msvcp140.dll
+VS_ENVVAR_2015="VS140COMNTOOLS"
+VS_VS_INSTALLDIR_2015="Microsoft Visual Studio 14.0"
+VS_SDK_INSTALLDIR_2015=
+VS_VS_PLATFORM_NAME_2015="v140"
+VS_SDK_PLATFORM_NAME_2015=
+# The vcvars of 2015 breaks if 2017 is also installed. Work around this by
+# explicitly specifying Windows Kit 8.1 to be used.
+VS_ENV_ARGS_2015="8.1"
+
+VS_DESCRIPTION_2017="Microsoft Visual Studio 2017 - CURRENTLY NOT WORKING"
+VS_VERSION_INTERNAL_2017=141
+VS_MSVCR_2017=vcruntime140.dll
+VS_MSVCP_2017=msvcp140.dll
+VS_ENVVAR_2017="VS150COMNTOOLS"
+VS_VS_INSTALLDIR_2017="Microsoft Visual Studio/2017"
+VS_EDITIONS_2017="Community Professional Enterprise"
+VS_SDK_INSTALLDIR_2017=
+VS_VS_PLATFORM_NAME_2017="v141"
+VS_SDK_PLATFORM_NAME_2017=
+
 ################################################################################
 
 AC_DEFUN([TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT],
@@ -67,23 +91,41 @@
     VS_BASE="$2"
     METHOD="$3"
 
-    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
-      VCVARSFILE="vc/bin/vcvars32.bat"
-    else
-      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
+    BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(VS_BASE)
+    # In VS 2017, the default installation is in a subdir named after the edition.
+    # Find the first one present and use that.
+    if test "x$VS_EDITIONS" != x; then
+      for edition in $VS_EDITIONS; do
+        if test -d "$VS_BASE/$edition"; then
+          VS_BASE="$VS_BASE/$edition"
+          break
+        fi
+      done
     fi
 
-    BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(VS_BASE)
     if test -d "$VS_BASE"; then
-      if test -f "$VS_BASE/$VCVARSFILE"; then
-        AC_MSG_NOTICE([Found Visual Studio installation at $VS_BASE using $METHOD])
-        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
-        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
-        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
+      AC_MSG_NOTICE([Found Visual Studio installation at $VS_BASE using $METHOD])
+      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
+        VCVARSFILES="vc/bin/vcvars32.bat vc/auxiliary/build/vcvars32.bat"
+      else
+        VCVARSFILES="vc/bin/amd64/vcvars64.bat vc/bin/x86_amd64/vcvarsx86_amd64.bat \
+            vc/auxiliary/build/vcvarsx86_amd64.bat vc/auxiliary/build/vcvars64.bat"
+      fi
+
+      for VCVARSFILE in $VCVARSFILES; do
+        if test -f "$VS_BASE/$VCVARSFILE"; then
+          VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
+          break
+        fi
+      done
+
+      if test "x$VS_ENV_CMD" = x; then
+        AC_MSG_NOTICE([Warning: None of $VCVARSFILES were found, Visual Studio installation not recognized. Ignoring])
+      else
+        # PLATFORM_TOOLSET is used during the compilation of the freetype sources
+        # (see 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100',
+        # 'v110' or 'v120' for VS 2010, 2012 or VS2013
         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
-      else
-        AC_MSG_NOTICE([Found Visual Studio installation at $VS_BASE using $METHOD])
-        AC_MSG_NOTICE([Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring])
       fi
     fi
   fi
@@ -133,7 +175,9 @@
   eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
   eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
   eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
+  eval VS_EDITIONS="\${VS_EDITIONS_${VS_VERSION}}"
   eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
+  eval VS_ENV_ARGS="\${VS_ENV_ARGS_${VS_VERSION}}"
 
   # When using --with-tools-dir, assume it points to the correct and default
   # version of Visual Studio or that --with-toolchain-version was also set.
@@ -153,7 +197,6 @@
   fi
 
   VS_ENV_CMD=""
-  VS_ENV_ARGS=""
 
   if test "x$VS_COMNTOOLS" != x; then
     TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT([${VS_VERSION}],
@@ -213,7 +256,11 @@
   elif test "x$DEVKIT_VS_VERSION" != x; then
     VS_VERSION=$DEVKIT_VS_VERSION
     TOOLCHAIN_VERSION=$VS_VERSION
-    eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
+    # If the devkit has a name, use that as description
+    VS_DESCRIPTION="$DEVKIT_NAME"
+    if test "x$VS_DESCRIPTION" = x; then
+      eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
+    fi
     eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
     eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
     eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
@@ -267,6 +314,11 @@
       break
     fi
   done
+
+  TOOLCHAIN_DESCRIPTION="$VS_DESCRIPTION"
+  if test "$TOOLCHAIN_VERSION" -gt 2013; then
+    UNSUPPORTED_TOOLCHAIN_VERSION=yes
+  fi
 ])
 
 ################################################################################
@@ -320,6 +372,9 @@
       # This will end up something like:
       # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
       $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
+      # In some cases, the VS_ENV_CMD will change directory, change back so
+      # the set-vs-env.sh ends up in the right place.
+      $ECHO 'cd %~dp0' >> $EXTRACT_VC_ENV_BAT_FILE
       # These will end up something like:
       # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
       # The trailing space for everyone except PATH is no typo, but is needed due
@@ -483,18 +538,30 @@
   MSVC_DLL=
 
   if test "x$MSVC_DLL" = x; then
-    # Probe: Using well-known location from Visual Studio 10.0
     if test "x$VCINSTALLDIR" != x; then
       CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
       BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(CYGWIN_VC_INSTALL_DIR)
-      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
-        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
+      if test "$VS_VERSION" -lt 2017; then
+        # Probe: Using well-known location from Visual Studio 12.0 and older
+        if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
+          POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
+        else
+          POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
+        fi
       else
-        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
+        # Probe: Using well-known location from VS 2017
+        if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
+          POSSIBLE_MSVC_DLL="`ls $CYGWIN_VC_INSTALL_DIR/Redist/MSVC/*/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME`"
+        else
+          POSSIBLE_MSVC_DLL="`ls $CYGWIN_VC_INSTALL_DIR/Redist/MSVC/*/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME`"
+        fi
       fi
-      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
-      TOOLCHAIN_CHECK_POSSIBLE_MSVC_DLL([$DLL_NAME], [$POSSIBLE_MSVC_DLL],
-          [well-known location in VCINSTALLDIR])
+      # In case any of the above finds more than one file, loop over them.
+      for possible_msvc_dll in $POSSIBLE_MSVC_DLL; do
+        $ECHO "POSSIBLE_MSVC_DLL $possible_msvc_dll"
+        TOOLCHAIN_CHECK_POSSIBLE_MSVC_DLL([$DLL_NAME], [$possible_msvc_dll],
+            [well-known location in VCINSTALLDIR])
+      done
     fi
   fi
 
@@ -576,7 +643,7 @@
     TOOLCHAIN_CHECK_POSSIBLE_MSVC_DLL($MSVCR_NAME, [$DEVKIT_MSVCR_DLL], [devkit])
     if test "x$MSVC_DLL" = x; then
       AC_MSG_ERROR([Could not find a proper $MSVCR_NAME as specified by devkit])
-    fi  
+    fi
     MSVCR_DLL="$MSVC_DLL"
   else
     TOOLCHAIN_SETUP_MSVC_DLL([${MSVCR_NAME}])
@@ -599,7 +666,7 @@
       TOOLCHAIN_CHECK_POSSIBLE_MSVC_DLL($MSVCP_NAME, [$DEVKIT_MSVCP_DLL], [devkit])
       if test "x$MSVC_DLL" = x; then
         AC_MSG_ERROR([Could not find a proper $MSVCP_NAME as specified by devkit])
-      fi  
+      fi
       MSVCP_DLL="$MSVC_DLL"
     else
       TOOLCHAIN_SETUP_MSVC_DLL([${MSVCP_NAME}])
--- a/make/data/currency/CurrencyData.properties	Tue Jan 30 16:26:40 2018 +0100
+++ b/make/data/currency/CurrencyData.properties	Tue Jan 30 16:41:40 2018 +0100
@@ -32,7 +32,7 @@
 # Version of the currency code information in this class.
 # It is a serial number that accompanies with each amendment.
 
-dataVersion=162
+dataVersion=164
 
 # List of all valid ISO 4217 currency codes.
 # To ensure compatibility, do not remove codes.
@@ -52,7 +52,7 @@
     NIO558-NLG528-NOK578-NPR524-NZD554-OMR512-PAB590-PEN604-PGK598-PHP608-\
     PKR586-PLN985-PTE620-PYG600-QAR634-ROL946-RON946-RSD941-RUB643-RUR810-RWF646-SAR682-\
     SBD090-SCR690-SDD736-SDG938-SEK752-SGD702-SHP654-SIT705-SKK703-SLL694-SOS706-\
-    SRD968-SRG740-SSP728-STD678-SVC222-SYP760-SZL748-THB764-TJS972-TMM795-TMT934-TND788-TOP776-\
+    SRD968-SRG740-SSP728-STD678-STN930-SVC222-SYP760-SZL748-THB764-TJS972-TMM795-TMT934-TND788-TOP776-\
     TPE626-TRL792-TRY949-TTD780-TWD901-TZS834-UAH980-UGX800-USD840-USN997-USS998-UYI940-\
     UYU858-UZS860-VEB862-VEF937-VND704-VUV548-WST882-XAF950-XAG961-XAU959-XBA955-\
     XBB956-XBC957-XBD958-XCD951-XDR960-XFO000-XFU000-XOF952-XPD964-XPF953-\
@@ -196,7 +196,7 @@
 CW=ANG
 # CYPRUS
 CY=EUR
-# CZECH REPUBLIC (THE)
+# CZECHIA
 CZ=CZK
 # DENMARK
 DK=DKK
@@ -470,7 +470,7 @@
 # SOUTH SUDAN
 SS=SSP
 # SAO TOME AND PRINCIPE
-ST=STD
+ST=STN
 # SAUDI ARABIA
 SA=SAR
 # SENEGAL
--- a/make/devkit/createWindowsDevkit.sh	Tue Jan 30 16:26:40 2018 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,136 +0,0 @@
-#!/bin/bash
-#
-# 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
-# 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.
-#
-
-# This script copies parts of a Visual Studio 2013 installation into a devkit
-# suitable for building OpenJDK and OracleJDK. Needs to run in Cygwin.
-# erik.joelsson@oracle.com
-
-VS_VERSION="2013"
-VS_VERSION_NUM="12.0"
-VS_VERSION_NUM_NODOT="120"
-SDK_VERSION="8.1"
-VS_VERSION_SP="SP4"
-
-SCRIPT_DIR="$(cd "$(dirname $0)" > /dev/null && pwd)"
-BUILD_DIR="${SCRIPT_DIR}/../../build/devkit"
-DEVKIT_ROOT="${BUILD_DIR}/VS${VS_VERSION}${VS_VERSION_SP}-devkit"
-DEVKIT_BUNDLE="${DEVKIT_ROOT}.tar.gz"
-
-echo "Creating devkit in $DEVKIT_ROOT"
-
-MSVCR_DLL=Microsoft.VC${VS_VERSION_NUM_NODOT}.CRT/msvcr${VS_VERSION_NUM_NODOT}.dll
-MSVCP_DLL=Microsoft.VC${VS_VERSION_NUM_NODOT}.CRT/msvcp${VS_VERSION_NUM_NODOT}.dll
-
-################################################################################
-# Copy Visual Studio files
-
-eval VSNNNCOMNTOOLS="\"\${VS${VS_VERSION_NUM_NODOT}COMNTOOLS}\""
-VS_INSTALL_DIR="$(cygpath "$VSNNNCOMNTOOLS/../..")"
-echo "VS_INSTALL_DIR: $VS_INSTALL_DIR"
-
-if [ ! -d $DEVKIT_ROOT/VC ]; then
-    echo "Copying VC..."
-    mkdir -p $DEVKIT_ROOT/VC/bin
-    cp -r "$VS_INSTALL_DIR/VC/bin/amd64" $DEVKIT_ROOT/VC/bin/
-    cp    "$VS_INSTALL_DIR/VC/bin/"*.* $DEVKIT_ROOT/VC/bin/
-    cp -r "$VS_INSTALL_DIR/VC/bin/1033/" $DEVKIT_ROOT/VC/bin/
-    mkdir -p $DEVKIT_ROOT/VC/lib
-    cp -r "$VS_INSTALL_DIR/VC/lib/amd64" $DEVKIT_ROOT/VC/lib/
-    cp    "$VS_INSTALL_DIR/VC/lib/"*.* $DEVKIT_ROOT/VC/lib/
-    cp -r "$VS_INSTALL_DIR/VC/include" $DEVKIT_ROOT/VC/
-    mkdir -p $DEVKIT_ROOT/VC/atlmfc/lib
-    cp -r "$VS_INSTALL_DIR/VC/atlmfc/include" $DEVKIT_ROOT/VC/atlmfc/
-    cp -r "$VS_INSTALL_DIR/VC/atlmfc/lib/amd64" $DEVKIT_ROOT/VC/atlmfc/lib/
-    cp    "$VS_INSTALL_DIR/VC/atlmfc/lib/"*.* $DEVKIT_ROOT/VC/atlmfc/lib/
-    mkdir -p $DEVKIT_ROOT/VC/redist
-    cp -r "$VS_INSTALL_DIR/VC/redist/x64" $DEVKIT_ROOT/VC/redist/
-    cp -r "$VS_INSTALL_DIR/VC/redist/x86" $DEVKIT_ROOT/VC/redist/
-    # The redist runtime libs are needed to run the compiler but may not be
-    # installed on the machine where the devkit will be used.
-    cp $DEVKIT_ROOT/VC/redist/x86/$MSVCR_DLL $DEVKIT_ROOT/VC/bin/
-    cp $DEVKIT_ROOT/VC/redist/x86/$MSVCP_DLL $DEVKIT_ROOT/VC/bin/
-    cp $DEVKIT_ROOT/VC/redist/x64/$MSVCR_DLL $DEVKIT_ROOT/VC/bin/amd64/
-    cp $DEVKIT_ROOT/VC/redist/x64/$MSVCP_DLL $DEVKIT_ROOT/VC/bin/amd64/
-    # The msvcdis dll is needed to run some of the tools in VC/bin but is not
-    # shipped in that directory. Copy it from the common dir.
-    cp "$VS_INSTALL_DIR/Common7/IDE/msvcdis${VS_VERSION_NUM_NODOT}.dll" \
-        $DEVKIT_ROOT/VC/bin/
-fi
-
-################################################################################
-# Copy SDK files
-
-PROGRAMFILES_X86="`env | sed -n 's/^ProgramFiles(x86)=//p'`"
-SDK_INSTALL_DIR="$(cygpath "$PROGRAMFILES_X86/Windows Kits/$SDK_VERSION")"
-echo "SDK_INSTALL_DIR: $SDK_INSTALL_DIR"
-
-if [ ! -d $DEVKIT_ROOT/$SDK_VERSION ]; then
-    echo "Copying SDK..."
-    mkdir -p $DEVKIT_ROOT/$SDK_VERSION/bin
-    cp -r "$SDK_INSTALL_DIR/bin/x64" $DEVKIT_ROOT/$SDK_VERSION/bin/
-    cp -r "$SDK_INSTALL_DIR/bin/x86" $DEVKIT_ROOT/$SDK_VERSION/bin/
-    mkdir -p $DEVKIT_ROOT/$SDK_VERSION/lib
-    cp -r "$SDK_INSTALL_DIR/lib/"winv*/um/x64 $DEVKIT_ROOT/$SDK_VERSION/lib/
-    cp -r "$SDK_INSTALL_DIR/lib/"winv*/um/x86 $DEVKIT_ROOT/$SDK_VERSION/lib/
-    cp -r "$SDK_INSTALL_DIR/include" $DEVKIT_ROOT/$SDK_VERSION/
-fi
-
-################################################################################
-# Generate devkit.info
-
-echo-info() {
-    echo "$1" >> $DEVKIT_ROOT/devkit.info
-}
-
-echo "Generating devkit.info..."
-rm -f $DEVKIT_ROOT/devkit.info
-echo-info "# This file describes to configure how to interpret the contents of this devkit"
-echo-info "DEVKIT_NAME=\"Microsoft Visual Studio $VS_VERSION $VS_VERSION_SP (devkit)\""
-echo-info "DEVKIT_VS_VERSION=\"$VS_VERSION\""
-echo-info ""
-echo-info "DEVKIT_TOOLCHAIN_PATH_x86=\"\$DEVKIT_ROOT/VC/bin:\$DEVKIT_ROOT/$SDK_VERSION/bin/x86\""
-echo-info "DEVKIT_VS_INCLUDE_x86=\"\$DEVKIT_ROOT/VC/include;\$DEVKIT_ROOT/VC/atlmfc/include;\$DEVKIT_ROOT/$SDK_VERSION/include/shared;\$DEVKIT_ROOT/$SDK_VERSION/include/um;\$DEVKIT_ROOT/$SDK_VERSION/include/winrt\""
-echo-info "DEVKIT_VS_LIB_x86=\"\$DEVKIT_ROOT/VC/lib;\$DEVKIT_ROOT/VC/atlmfc/lib;\$DEVKIT_ROOT/$SDK_VERSION/lib/x86\""
-echo-info "DEVKIT_MSVCR_DLL_x86=\"\$DEVKIT_ROOT/VC/redist/x86/$MSVCR_DLL\""
-echo-info "DEVKIT_MSVCP_DLL_x86=\"\$DEVKIT_ROOT/VC/redist/x86/$MSVCP_DLL\""
-echo-info ""
-echo-info "DEVKIT_TOOLCHAIN_PATH_x86_64=\"\$DEVKIT_ROOT/VC/bin/amd64:\$DEVKIT_ROOT/$SDK_VERSION/bin/x64:\$DEVKIT_ROOT/$SDK_VERSION/bin/x86\""
-echo-info "DEVKIT_VS_INCLUDE_x86_64=\"\$DEVKIT_ROOT/VC/include;\$DEVKIT_ROOT/VC/atlmfc/include;\$DEVKIT_ROOT/$SDK_VERSION/include/shared;\$DEVKIT_ROOT/$SDK_VERSION/include/um;\$DEVKIT_ROOT/$SDK_VERSION/include/winrt\""
-echo-info "DEVKIT_VS_LIB_x86_64=\"\$DEVKIT_ROOT/VC/lib/amd64;\$DEVKIT_ROOT/VC/atlmfc/lib/amd64;\$DEVKIT_ROOT/$SDK_VERSION/lib/x64\""
-echo-info "DEVKIT_MSVCR_DLL_x86_64=\"\$DEVKIT_ROOT/VC/redist/x64/$MSVCR_DLL\""
-echo-info "DEVKIT_MSVCP_DLL_x86_64=\"\$DEVKIT_ROOT/VC/redist/x64/$MSVCP_DLL\""
-
-################################################################################
-# Copy this script
-
-echo "Copying this script..."
-cp $0 $DEVKIT_ROOT/
-
-################################################################################
-# Create bundle
-
-echo "Creating bundle: $DEVKIT_BUNDLE"
-(cd "$DEVKIT_ROOT" && tar zcf "$DEVKIT_BUNDLE" .)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/make/devkit/createWindowsDevkit2013.sh	Tue Jan 30 16:41:40 2018 +0100
@@ -0,0 +1,136 @@
+#!/bin/bash
+#
+# 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
+# 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.
+#
+
+# This script copies parts of a Visual Studio 2013 installation into a devkit
+# suitable for building OpenJDK and OracleJDK. Needs to run in Cygwin.
+# erik.joelsson@oracle.com
+
+VS_VERSION="2013"
+VS_VERSION_NUM="12.0"
+VS_VERSION_NUM_NODOT="120"
+SDK_VERSION="8.1"
+VS_VERSION_SP="SP4"
+
+SCRIPT_DIR="$(cd "$(dirname $0)" > /dev/null && pwd)"
+BUILD_DIR="${SCRIPT_DIR}/../../build/devkit"
+DEVKIT_ROOT="${BUILD_DIR}/VS${VS_VERSION}${VS_VERSION_SP}-devkit"
+DEVKIT_BUNDLE="${DEVKIT_ROOT}.tar.gz"
+
+echo "Creating devkit in $DEVKIT_ROOT"
+
+MSVCR_DLL=Microsoft.VC${VS_VERSION_NUM_NODOT}.CRT/msvcr${VS_VERSION_NUM_NODOT}.dll
+MSVCP_DLL=Microsoft.VC${VS_VERSION_NUM_NODOT}.CRT/msvcp${VS_VERSION_NUM_NODOT}.dll
+
+################################################################################
+# Copy Visual Studio files
+
+eval VSNNNCOMNTOOLS="\"\${VS${VS_VERSION_NUM_NODOT}COMNTOOLS}\""
+VS_INSTALL_DIR="$(cygpath "$VSNNNCOMNTOOLS/../..")"
+echo "VS_INSTALL_DIR: $VS_INSTALL_DIR"
+
+if [ ! -d $DEVKIT_ROOT/VC ]; then
+    echo "Copying VC..."
+    mkdir -p $DEVKIT_ROOT/VC/bin
+    cp -r "$VS_INSTALL_DIR/VC/bin/amd64" $DEVKIT_ROOT/VC/bin/
+    cp    "$VS_INSTALL_DIR/VC/bin/"*.* $DEVKIT_ROOT/VC/bin/
+    cp -r "$VS_INSTALL_DIR/VC/bin/1033/" $DEVKIT_ROOT/VC/bin/
+    mkdir -p $DEVKIT_ROOT/VC/lib
+    cp -r "$VS_INSTALL_DIR/VC/lib/amd64" $DEVKIT_ROOT/VC/lib/
+    cp    "$VS_INSTALL_DIR/VC/lib/"*.* $DEVKIT_ROOT/VC/lib/
+    cp -r "$VS_INSTALL_DIR/VC/include" $DEVKIT_ROOT/VC/
+    mkdir -p $DEVKIT_ROOT/VC/atlmfc/lib
+    cp -r "$VS_INSTALL_DIR/VC/atlmfc/include" $DEVKIT_ROOT/VC/atlmfc/
+    cp -r "$VS_INSTALL_DIR/VC/atlmfc/lib/amd64" $DEVKIT_ROOT/VC/atlmfc/lib/
+    cp    "$VS_INSTALL_DIR/VC/atlmfc/lib/"*.* $DEVKIT_ROOT/VC/atlmfc/lib/
+    mkdir -p $DEVKIT_ROOT/VC/redist
+    cp -r "$VS_INSTALL_DIR/VC/redist/x64" $DEVKIT_ROOT/VC/redist/
+    cp -r "$VS_INSTALL_DIR/VC/redist/x86" $DEVKIT_ROOT/VC/redist/
+    # The redist runtime libs are needed to run the compiler but may not be
+    # installed on the machine where the devkit will be used.
+    cp $DEVKIT_ROOT/VC/redist/x86/$MSVCR_DLL $DEVKIT_ROOT/VC/bin/
+    cp $DEVKIT_ROOT/VC/redist/x86/$MSVCP_DLL $DEVKIT_ROOT/VC/bin/
+    cp $DEVKIT_ROOT/VC/redist/x64/$MSVCR_DLL $DEVKIT_ROOT/VC/bin/amd64/
+    cp $DEVKIT_ROOT/VC/redist/x64/$MSVCP_DLL $DEVKIT_ROOT/VC/bin/amd64/
+    # The msvcdis dll is needed to run some of the tools in VC/bin but is not
+    # shipped in that directory. Copy it from the common dir.
+    cp "$VS_INSTALL_DIR/Common7/IDE/msvcdis${VS_VERSION_NUM_NODOT}.dll" \
+        $DEVKIT_ROOT/VC/bin/
+fi
+
+################################################################################
+# Copy SDK files
+
+PROGRAMFILES_X86="`env | sed -n 's/^ProgramFiles(x86)=//p'`"
+SDK_INSTALL_DIR="$(cygpath "$PROGRAMFILES_X86/Windows Kits/$SDK_VERSION")"
+echo "SDK_INSTALL_DIR: $SDK_INSTALL_DIR"
+
+if [ ! -d $DEVKIT_ROOT/$SDK_VERSION ]; then
+    echo "Copying SDK..."
+    mkdir -p $DEVKIT_ROOT/$SDK_VERSION/bin
+    cp -r "$SDK_INSTALL_DIR/bin/x64" $DEVKIT_ROOT/$SDK_VERSION/bin/
+    cp -r "$SDK_INSTALL_DIR/bin/x86" $DEVKIT_ROOT/$SDK_VERSION/bin/
+    mkdir -p $DEVKIT_ROOT/$SDK_VERSION/lib
+    cp -r "$SDK_INSTALL_DIR/lib/"winv*/um/x64 $DEVKIT_ROOT/$SDK_VERSION/lib/
+    cp -r "$SDK_INSTALL_DIR/lib/"winv*/um/x86 $DEVKIT_ROOT/$SDK_VERSION/lib/
+    cp -r "$SDK_INSTALL_DIR/include" $DEVKIT_ROOT/$SDK_VERSION/
+fi
+
+################################################################################
+# Generate devkit.info
+
+echo-info() {
+    echo "$1" >> $DEVKIT_ROOT/devkit.info
+}
+
+echo "Generating devkit.info..."
+rm -f $DEVKIT_ROOT/devkit.info
+echo-info "# This file describes to configure how to interpret the contents of this devkit"
+echo-info "DEVKIT_NAME=\"Microsoft Visual Studio $VS_VERSION $VS_VERSION_SP (devkit)\""
+echo-info "DEVKIT_VS_VERSION=\"$VS_VERSION\""
+echo-info ""
+echo-info "DEVKIT_TOOLCHAIN_PATH_x86=\"\$DEVKIT_ROOT/VC/bin:\$DEVKIT_ROOT/$SDK_VERSION/bin/x86\""
+echo-info "DEVKIT_VS_INCLUDE_x86=\"\$DEVKIT_ROOT/VC/include;\$DEVKIT_ROOT/VC/atlmfc/include;\$DEVKIT_ROOT/$SDK_VERSION/include/shared;\$DEVKIT_ROOT/$SDK_VERSION/include/um;\$DEVKIT_ROOT/$SDK_VERSION/include/winrt\""
+echo-info "DEVKIT_VS_LIB_x86=\"\$DEVKIT_ROOT/VC/lib;\$DEVKIT_ROOT/VC/atlmfc/lib;\$DEVKIT_ROOT/$SDK_VERSION/lib/x86\""
+echo-info "DEVKIT_MSVCR_DLL_x86=\"\$DEVKIT_ROOT/VC/redist/x86/$MSVCR_DLL\""
+echo-info "DEVKIT_MSVCP_DLL_x86=\"\$DEVKIT_ROOT/VC/redist/x86/$MSVCP_DLL\""
+echo-info ""
+echo-info "DEVKIT_TOOLCHAIN_PATH_x86_64=\"\$DEVKIT_ROOT/VC/bin/amd64:\$DEVKIT_ROOT/$SDK_VERSION/bin/x64:\$DEVKIT_ROOT/$SDK_VERSION/bin/x86\""
+echo-info "DEVKIT_VS_INCLUDE_x86_64=\"\$DEVKIT_ROOT/VC/include;\$DEVKIT_ROOT/VC/atlmfc/include;\$DEVKIT_ROOT/$SDK_VERSION/include/shared;\$DEVKIT_ROOT/$SDK_VERSION/include/um;\$DEVKIT_ROOT/$SDK_VERSION/include/winrt\""
+echo-info "DEVKIT_VS_LIB_x86_64=\"\$DEVKIT_ROOT/VC/lib/amd64;\$DEVKIT_ROOT/VC/atlmfc/lib/amd64;\$DEVKIT_ROOT/$SDK_VERSION/lib/x64\""
+echo-info "DEVKIT_MSVCR_DLL_x86_64=\"\$DEVKIT_ROOT/VC/redist/x64/$MSVCR_DLL\""
+echo-info "DEVKIT_MSVCP_DLL_x86_64=\"\$DEVKIT_ROOT/VC/redist/x64/$MSVCP_DLL\""
+
+################################################################################
+# Copy this script
+
+echo "Copying this script..."
+cp $0 $DEVKIT_ROOT/
+
+################################################################################
+# Create bundle
+
+echo "Creating bundle: $DEVKIT_BUNDLE"
+(cd "$DEVKIT_ROOT" && tar zcf "$DEVKIT_BUNDLE" .)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/make/devkit/createWindowsDevkit2015.sh	Tue Jan 30 16:41:40 2018 +0100
@@ -0,0 +1,142 @@
+#!/bin/bash
+#
+# 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
+# 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.
+#
+
+# This script copies parts of a Visual Studio installation into a devkit
+# suitable for building OpenJDK and OracleJDK. Needs to run in Cygwin.
+# erik.joelsson@oracle.com
+
+VS_VERSION="2015"
+VS_VERSION_NUM="14.0"
+VS_VERSION_NUM_NODOT="140"
+SDK_VERSION="8.1"
+VS_VERSION_SP="update3"
+
+SCRIPT_DIR="$(cd "$(dirname $0)" > /dev/null && pwd)"
+BUILD_DIR="${SCRIPT_DIR}/../../build/devkit"
+DEVKIT_ROOT="${BUILD_DIR}/VS${VS_VERSION}${VS_VERSION_SP}-devkit"
+DEVKIT_BUNDLE="${DEVKIT_ROOT}.tar.gz"
+
+echo "Creating devkit in $DEVKIT_ROOT"
+
+MSVCR_DLL=Microsoft.VC${VS_VERSION_NUM_NODOT}.CRT/vcruntime${VS_VERSION_NUM_NODOT}.dll
+MSVCP_DLL=Microsoft.VC${VS_VERSION_NUM_NODOT}.CRT/msvcp${VS_VERSION_NUM_NODOT}.dll
+
+################################################################################
+# Copy Visual Studio files
+
+eval VSNNNCOMNTOOLS="\"\${VS${VS_VERSION_NUM_NODOT}COMNTOOLS}\""
+VS_INSTALL_DIR="$(cygpath "$VSNNNCOMNTOOLS/../..")"
+echo "VS_INSTALL_DIR: $VS_INSTALL_DIR"
+
+if [ ! -d $DEVKIT_ROOT/VC ]; then
+    echo "Copying VC..."
+    mkdir -p $DEVKIT_ROOT/VC/bin
+    cp -r "$VS_INSTALL_DIR/VC/bin/amd64" $DEVKIT_ROOT/VC/bin/
+    cp    "$VS_INSTALL_DIR/VC/bin/"*.* $DEVKIT_ROOT/VC/bin/
+    cp -r "$VS_INSTALL_DIR/VC/bin/1033/" $DEVKIT_ROOT/VC/bin/
+    mkdir -p $DEVKIT_ROOT/VC/lib
+    cp -r "$VS_INSTALL_DIR/VC/lib/amd64" $DEVKIT_ROOT/VC/lib/
+    cp    "$VS_INSTALL_DIR/VC/lib/"*.* $DEVKIT_ROOT/VC/lib/
+    cp -r "$VS_INSTALL_DIR/VC/include" $DEVKIT_ROOT/VC/
+    mkdir -p $DEVKIT_ROOT/VC/atlmfc/lib
+    cp -r "$VS_INSTALL_DIR/VC/atlmfc/include" $DEVKIT_ROOT/VC/atlmfc/
+    cp -r "$VS_INSTALL_DIR/VC/atlmfc/lib/amd64" $DEVKIT_ROOT/VC/atlmfc/lib/
+    cp    "$VS_INSTALL_DIR/VC/atlmfc/lib/"*.* $DEVKIT_ROOT/VC/atlmfc/lib/
+    mkdir -p $DEVKIT_ROOT/VC/redist
+    cp -r "$VS_INSTALL_DIR/VC/redist/x64" $DEVKIT_ROOT/VC/redist/
+    cp -r "$VS_INSTALL_DIR/VC/redist/x86" $DEVKIT_ROOT/VC/redist/
+    # The redist runtime libs are needed to run the compiler but may not be
+    # installed on the machine where the devkit will be used.
+    cp $DEVKIT_ROOT/VC/redist/x86/$MSVCR_DLL $DEVKIT_ROOT/VC/bin/
+    cp $DEVKIT_ROOT/VC/redist/x86/$MSVCP_DLL $DEVKIT_ROOT/VC/bin/
+    cp $DEVKIT_ROOT/VC/redist/x64/$MSVCR_DLL $DEVKIT_ROOT/VC/bin/amd64/
+    cp $DEVKIT_ROOT/VC/redist/x64/$MSVCP_DLL $DEVKIT_ROOT/VC/bin/amd64/
+    # The msvcdis dll is needed to run some of the tools in VC/bin but is not
+    # shipped in that directory. Copy it from the common dir.
+    cp "$VS_INSTALL_DIR/Common7/IDE/msvcdis${VS_VERSION_NUM_NODOT}.dll" \
+        $DEVKIT_ROOT/VC/bin/
+fi
+
+################################################################################
+# Copy SDK files
+
+PROGRAMFILES_X86="`env | sed -n 's/^ProgramFiles(x86)=//p'`"
+SDK_INSTALL_DIR="$(cygpath "$PROGRAMFILES_X86/Windows Kits/$SDK_VERSION")"
+echo "SDK_INSTALL_DIR: $SDK_INSTALL_DIR"
+
+if [ ! -d $DEVKIT_ROOT/$SDK_VERSION ]; then
+    echo "Copying SDK..."
+    mkdir -p $DEVKIT_ROOT/$SDK_VERSION/bin
+    cp -r "$SDK_INSTALL_DIR/bin/x64" $DEVKIT_ROOT/$SDK_VERSION/bin/
+    cp -r "$SDK_INSTALL_DIR/bin/x86" $DEVKIT_ROOT/$SDK_VERSION/bin/
+    mkdir -p $DEVKIT_ROOT/$SDK_VERSION/lib
+    cp -r "$SDK_INSTALL_DIR/lib/"winv*/um/x64 $DEVKIT_ROOT/$SDK_VERSION/lib/
+    cp -r "$SDK_INSTALL_DIR/lib/"winv*/um/x86 $DEVKIT_ROOT/$SDK_VERSION/lib/
+    cp -r "$SDK_INSTALL_DIR/include" $DEVKIT_ROOT/$SDK_VERSION/
+    # In 2015, the new Universal CRT is delivered in the sdk 10 directory
+    # so need to include that as well.
+    mkdir -p $DEVKIT_ROOT/10/lib
+    cp -r "$SDK_INSTALL_DIR/../10/lib/10.0.10240.0/ucrt" $DEVKIT_ROOT/10/lib/
+    mkdir -p $DEVKIT_ROOT/10/include
+    cp -r "$SDK_INSTALL_DIR/../10/include/10.0.10240.0/ucrt" $DEVKIT_ROOT/10/include/
+fi
+
+################################################################################
+# Generate devkit.info
+
+echo-info() {
+    echo "$1" >> $DEVKIT_ROOT/devkit.info
+}
+
+echo "Generating devkit.info..."
+rm -f $DEVKIT_ROOT/devkit.info
+echo-info "# This file describes to configure how to interpret the contents of this devkit"
+echo-info "DEVKIT_NAME=\"Microsoft Visual Studio $VS_VERSION $VS_VERSION_SP (devkit)\""
+echo-info "DEVKIT_VS_VERSION=\"$VS_VERSION\""
+echo-info ""
+echo-info "DEVKIT_TOOLCHAIN_PATH_x86=\"\$DEVKIT_ROOT/VC/bin:\$DEVKIT_ROOT/$SDK_VERSION/bin/x86\""
+echo-info "DEVKIT_VS_INCLUDE_x86=\"\$DEVKIT_ROOT/VC/include;\$DEVKIT_ROOT/VC/atlmfc/include;\$DEVKIT_ROOT/$SDK_VERSION/include/shared;\$DEVKIT_ROOT/$SDK_VERSION/include/um;\$DEVKIT_ROOT/$SDK_VERSION/include/winrt;\$DEVKIT_ROOT/10/include/ucrt\""
+echo-info "DEVKIT_VS_LIB_x86=\"\$DEVKIT_ROOT/VC/lib;\$DEVKIT_ROOT/VC/atlmfc/lib;\$DEVKIT_ROOT/$SDK_VERSION/lib/x86;\$DEVKIT_ROOT/10/lib/ucrt/x86\""
+echo-info "DEVKIT_MSVCR_DLL_x86=\"\$DEVKIT_ROOT/VC/redist/x86/$MSVCR_DLL\""
+echo-info "DEVKIT_MSVCP_DLL_x86=\"\$DEVKIT_ROOT/VC/redist/x86/$MSVCP_DLL\""
+echo-info ""
+echo-info "DEVKIT_TOOLCHAIN_PATH_x86_64=\"\$DEVKIT_ROOT/VC/bin/amd64:\$DEVKIT_ROOT/$SDK_VERSION/bin/x64:\$DEVKIT_ROOT/$SDK_VERSION/bin/x86\""
+echo-info "DEVKIT_VS_INCLUDE_x86_64=\"\$DEVKIT_ROOT/VC/include;\$DEVKIT_ROOT/VC/atlmfc/include;\$DEVKIT_ROOT/$SDK_VERSION/include/shared;\$DEVKIT_ROOT/$SDK_VERSION/include/um;\$DEVKIT_ROOT/$SDK_VERSION/include/winrt;\$DEVKIT_ROOT/10/include/ucrt\""
+echo-info "DEVKIT_VS_LIB_x86_64=\"\$DEVKIT_ROOT/VC/lib/amd64;\$DEVKIT_ROOT/VC/atlmfc/lib/amd64;\$DEVKIT_ROOT/$SDK_VERSION/lib/x64;\$DEVKIT_ROOT/10/lib/ucrt/x64\""
+echo-info "DEVKIT_MSVCR_DLL_x86_64=\"\$DEVKIT_ROOT/VC/redist/x64/$MSVCR_DLL\""
+echo-info "DEVKIT_MSVCP_DLL_x86_64=\"\$DEVKIT_ROOT/VC/redist/x64/$MSVCP_DLL\""
+
+################################################################################
+# Copy this script
+
+echo "Copying this script..."
+cp $0 $DEVKIT_ROOT/
+
+################################################################################
+# Create bundle
+
+echo "Creating bundle: $DEVKIT_BUNDLE"
+(cd "$DEVKIT_ROOT" && tar zcf "$DEVKIT_BUNDLE" .)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/make/devkit/createWindowsDevkit2017.sh	Tue Jan 30 16:41:40 2018 +0100
@@ -0,0 +1,172 @@
+#!/bin/bash
+#
+# 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
+# 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.
+#
+
+# This script copies parts of a Visual Studio installation into a devkit
+# suitable for building OpenJDK and OracleJDK. Needs to run in Cygwin.
+# erik.joelsson@oracle.com
+
+VS_VERSION="2017"
+VS_VERSION_NUM_NODOT="150"
+VS_DLL_VERSION="140"
+SDK_VERSION="10"
+SDK_FULL_VERSION="10.0.16299.0"
+MSVC_DIR="Microsoft.VC141.CRT"
+
+SCRIPT_DIR="$(cd "$(dirname $0)" > /dev/null && pwd)"
+BUILD_DIR="${SCRIPT_DIR}/../../build/devkit"
+
+################################################################################
+# Prepare settings
+
+# Work around the insanely named ProgramFiles(x86) env variable
+PROGRAMFILES_X86="$(cygpath "$(env | sed -n 's/^ProgramFiles(x86)=//p')")"
+
+# Find Visual Studio installation dir
+eval VSNNNCOMNTOOLS="\"\${VS${VS_VERSION_NUM_NODOT}COMNTOOLS}\""
+if [ -d "$VSNNNCOMNTOOLS" ]; then
+    VS_INSTALL_DIR="$(cygpath "$VSNNNCOMNTOOLS/../..")"
+else
+    VS_INSTALL_DIR="${PROGRAMFILES_X86}/Microsoft Visual Studio/2017"
+    VS_INSTALL_DIR="$(ls -d "${VS_INSTALL_DIR}/"{Community,Professional} 2>/dev/null | head -n1)"
+    VS_INSTALL_DIR="$(cygpath "$VS_INSTALL_DIR")"
+fi
+echo "VS_INSTALL_DIR: $VS_INSTALL_DIR"
+
+# Extract semantic version
+POTENTIAL_INI_FILES="Common7\IDE\wdexpress.isolation.ini Common7\IDE\devenv.isolation.ini"
+for f in $POTENTIAL_INI_FILES; do
+    if [ -f "$VS_INSTALL_DIR/$f" ]; then
+        VS_VERSION_SP="$(grep ^SemanticVersion= "$VS_INSTALL_DIR/$f")"
+        # Remove SemnaticVersion=
+        VS_VERSION_SP="${VS_VERSION_SP#*=}"
+        # Remove suffix of too detailed numbering starting with +
+        VS_VERSION_SP="${VS_VERSION_SP%+*}"
+        break
+    fi
+done
+if [ -z "$VS_VERSION_SP" ]; then
+    echo "Failed to find SP version"
+    exit 1
+fi
+echo "Found Version SP: $VS_VERSION_SP"
+
+# Setup output dirs
+DEVKIT_ROOT="${BUILD_DIR}/VS${VS_VERSION}-${VS_VERSION_SP}-devkit"
+DEVKIT_BUNDLE="${DEVKIT_ROOT}.tar.gz"
+
+echo "Creating devkit in $DEVKIT_ROOT"
+
+MSVCR_DLL=${MSVC_DIR}/vcruntime${VS_DLL_VERSION}.dll
+MSVCP_DLL=${MSVC_DIR}/msvcp${VS_DLL_VERSION}.dll
+
+################################################################################
+# Copy Visual Studio files
+
+if [ ! -d $DEVKIT_ROOT/VC ]; then
+    VC_SUBDIR="VC/Tools/MSVC/14.12.25827"
+    REDIST_SUBDIR="VC/Redist/MSVC/14.12.25810"
+    echo "Copying VC..."
+    mkdir -p $DEVKIT_ROOT/VC/bin
+    cp -r "$VS_INSTALL_DIR/${VC_SUBDIR}/bin/Hostx64/x64" $DEVKIT_ROOT/VC/bin/
+    cp -r "$VS_INSTALL_DIR/${VC_SUBDIR}/bin/Hostx86/x86" $DEVKIT_ROOT/VC/bin/
+    mkdir -p $DEVKIT_ROOT/VC/lib
+    cp -r "$VS_INSTALL_DIR/${VC_SUBDIR}/lib/x64" $DEVKIT_ROOT/VC/lib/
+    cp -r "$VS_INSTALL_DIR/${VC_SUBDIR}/lib/x86" $DEVKIT_ROOT/VC/lib/
+    cp -r "$VS_INSTALL_DIR/${VC_SUBDIR}/include" $DEVKIT_ROOT/VC/
+    mkdir -p $DEVKIT_ROOT/VC/atlmfc/lib
+    cp -r "$VS_INSTALL_DIR/${VC_SUBDIR}/atlmfc/lib/x64" $DEVKIT_ROOT/VC/atlmfc/lib/
+    cp -r "$VS_INSTALL_DIR/${VC_SUBDIR}/atlmfc/lib/x86" $DEVKIT_ROOT/VC/atlmfc/lib/
+    cp -r "$VS_INSTALL_DIR/${VC_SUBDIR}/atlmfc/include" $DEVKIT_ROOT/VC/atlmfc/
+    mkdir -p $DEVKIT_ROOT/VC/Auxiliary
+    cp -r "$VS_INSTALL_DIR/VC/Auxiliary/Build" $DEVKIT_ROOT/VC/Auxiliary/
+    mkdir -p $DEVKIT_ROOT/VC/redist
+    cp -r "$VS_INSTALL_DIR/$REDIST_SUBDIR/x64" $DEVKIT_ROOT/VC/redist/
+    cp -r "$VS_INSTALL_DIR/$REDIST_SUBDIR/x86" $DEVKIT_ROOT/VC/redist/
+
+    # The redist runtime libs are needed to run the compiler but may not be
+    # installed on the machine where the devkit will be used.
+    cp $DEVKIT_ROOT/VC/redist/x64/$MSVCR_DLL $DEVKIT_ROOT/VC/bin/x86
+    cp $DEVKIT_ROOT/VC/redist/x64/$MSVCP_DLL $DEVKIT_ROOT/VC/bin/x86
+    cp $DEVKIT_ROOT/VC/redist/x64/$MSVCR_DLL $DEVKIT_ROOT/VC/bin/x64
+    cp $DEVKIT_ROOT/VC/redist/x64/$MSVCP_DLL $DEVKIT_ROOT/VC/bin/x64
+fi
+
+################################################################################
+# Copy SDK files
+
+SDK_INSTALL_DIR="$(cygpath "$PROGRAMFILES_X86/Windows Kits/$SDK_VERSION")"
+echo "SDK_INSTALL_DIR: $SDK_INSTALL_DIR"
+
+if [ ! -d $DEVKIT_ROOT/$SDK_VERSION ]; then
+    echo "Copying SDK..."
+    mkdir -p $DEVKIT_ROOT/$SDK_VERSION/bin
+    cp -r "$SDK_INSTALL_DIR/bin/$SDK_FULL_VERSION/x64" $DEVKIT_ROOT/$SDK_VERSION/bin/
+    cp -r "$SDK_INSTALL_DIR/bin/$SDK_FULL_VERSION/x86" $DEVKIT_ROOT/$SDK_VERSION/bin/
+    mkdir -p $DEVKIT_ROOT/$SDK_VERSION/lib
+    cp -r "$SDK_INSTALL_DIR/lib/$SDK_FULL_VERSION/um/x64" $DEVKIT_ROOT/$SDK_VERSION/lib/
+    cp -r "$SDK_INSTALL_DIR/lib/$SDK_FULL_VERSION/um/x86" $DEVKIT_ROOT/$SDK_VERSION/lib/
+    cp -r "$SDK_INSTALL_DIR/lib/$SDK_FULL_VERSION/ucrt/x64" $DEVKIT_ROOT/$SDK_VERSION/lib/
+    cp -r "$SDK_INSTALL_DIR/lib/$SDK_FULL_VERSION/ucrt/x86" $DEVKIT_ROOT/$SDK_VERSION/lib/
+    mkdir -p $DEVKIT_ROOT/$SDK_VERSION/include
+    cp -r "$SDK_INSTALL_DIR/include/$SDK_FULL_VERSION/"* $DEVKIT_ROOT/$SDK_VERSION/include/
+fi
+
+################################################################################
+# Generate devkit.info
+
+echo-info() {
+    echo "$1" >> $DEVKIT_ROOT/devkit.info
+}
+
+echo "Generating devkit.info..."
+rm -f $DEVKIT_ROOT/devkit.info
+echo-info "# This file describes to configure how to interpret the contents of this devkit"
+echo-info "DEVKIT_NAME=\"Microsoft Visual Studio $VS_VERSION $VS_VERSION_SP (devkit)\""
+echo-info "DEVKIT_VS_VERSION=\"$VS_VERSION\""
+echo-info ""
+echo-info "DEVKIT_TOOLCHAIN_PATH_x86=\"\$DEVKIT_ROOT/VC/bin/x86:\$DEVKIT_ROOT/$SDK_VERSION/bin/x86\""
+echo-info "DEVKIT_VS_INCLUDE_x86=\"\$DEVKIT_ROOT/VC/include;\$DEVKIT_ROOT/VC/atlmfc/include;\$DEVKIT_ROOT/$SDK_VERSION/include/shared;\$DEVKIT_ROOT/$SDK_VERSION/include/ucrt;\$DEVKIT_ROOT/$SDK_VERSION/include/um;\$DEVKIT_ROOT/$SDK_VERSION/include/winrt\""
+echo-info "DEVKIT_VS_LIB_x86=\"\$DEVKIT_ROOT/VC/lib/x86;\$DEVKIT_ROOT/VC/atlmfc/lib/x86;\$DEVKIT_ROOT/$SDK_VERSION/lib/x86\""
+echo-info "DEVKIT_MSVCR_DLL_x86=\"\$DEVKIT_ROOT/VC/redist/x86/$MSVCR_DLL\""
+echo-info "DEVKIT_MSVCP_DLL_x86=\"\$DEVKIT_ROOT/VC/redist/x86/$MSVCP_DLL\""
+echo-info ""
+echo-info "DEVKIT_TOOLCHAIN_PATH_x86_64=\"\$DEVKIT_ROOT/VC/bin/x64:\$DEVKIT_ROOT/$SDK_VERSION/bin/x64:\$DEVKIT_ROOT/$SDK_VERSION/bin/x86\""
+echo-info "DEVKIT_VS_INCLUDE_x86_64=\"\$DEVKIT_ROOT/VC/include;\$DEVKIT_ROOT/VC/atlmfc/include;\$DEVKIT_ROOT/$SDK_VERSION/include/shared;\$DEVKIT_ROOT/$SDK_VERSION/include/ucrt;\$DEVKIT_ROOT/$SDK_VERSION/include/um;\$DEVKIT_ROOT/$SDK_VERSION/include/winrt\""
+echo-info "DEVKIT_VS_LIB_x86_64=\"\$DEVKIT_ROOT/VC/lib/x64;\$DEVKIT_ROOT/VC/atlmfc/lib/x64;\$DEVKIT_ROOT/$SDK_VERSION/lib/x64\""
+echo-info "DEVKIT_MSVCR_DLL_x86_64=\"\$DEVKIT_ROOT/VC/redist/x64/$MSVCR_DLL\""
+echo-info "DEVKIT_MSVCP_DLL_x86_64=\"\$DEVKIT_ROOT/VC/redist/x64/$MSVCP_DLL\""
+
+################################################################################
+# Copy this script
+
+echo "Copying this script..."
+cp $0 $DEVKIT_ROOT/
+
+################################################################################
+# Create bundle
+
+echo "Creating bundle: $DEVKIT_BUNDLE"
+(cd "$DEVKIT_ROOT" && tar zcf "$DEVKIT_BUNDLE" .)
--- a/make/gensrc/Gensrc-java.desktop.gmk	Tue Jan 30 16:26:40 2018 +0100
+++ b/make/gensrc/Gensrc-java.desktop.gmk	Tue Jan 30 16:41:40 2018 +0100
@@ -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,7 +46,6 @@
     $(TOPDIR)/src/java.desktop/share/classes/sun/awt/resources \
     $(TOPDIR)/src/java.desktop/share/classes/com/sun/accessibility/internal/resources \
     $(TOPDIR)/src/java.desktop/share/classes/com/sun/java/swing/plaf/motif/resources \
-    $(TOPDIR)/src/java.desktop/share/classes/com/sun/java/swing/plaf/windows/resources \
     $(TOPDIR)/src/java.desktop/share/classes/com/sun/swing/internal/plaf/basic/resources \
     $(TOPDIR)/src/java.desktop/share/classes/com/sun/swing/internal/plaf/metal/resources \
     $(TOPDIR)/src/java.desktop/share/classes/com/sun/swing/internal/plaf/synth/resources \
@@ -61,7 +60,10 @@
 endif
 
 ifeq ($(OPENJDK_TARGET_OS), windows)
-  PROP_SRC_DIRS += $(TOPDIR)/src/java.desktop/windows/classes/sun/awt/windows
+  PROP_SRC_DIRS += \
+      $(TOPDIR)/src/java.desktop/windows/classes/com/sun/java/swing/plaf/windows/resources \
+      $(TOPDIR)/src/java.desktop/windows/classes/sun/awt/windows \
+      #
 endif
 
 ifeq ($(filter $(OPENJDK_TARGET_OS), windows macosx), )
--- a/make/hotspot/lib/CompileJvm.gmk	Tue Jan 30 16:26:40 2018 +0100
+++ b/make/hotspot/lib/CompileJvm.gmk	Tue Jan 30 16:41:40 2018 +0100
@@ -222,6 +222,7 @@
     CFLAGS_DEBUG_SYMBOLS := $(JVM_CFLAGS_SYMBOLS), \
     CXXFLAGS_DEBUG_SYMBOLS := $(JVM_CFLAGS_SYMBOLS), \
     vm_version.cpp_CXXFLAGS := $(CFLAGS_VM_VERSION), \
+    arguments.cpp_CXXFLAGS := $(CFLAGS_VM_VERSION), \
     DISABLED_WARNINGS_clang := tautological-compare, \
     DISABLED_WARNINGS_xlc := 1540-0216 1540-0198 1540-1090 1540-1639 \
         1540-1088 1500-010, \
--- a/make/idea/idea.gmk	Tue Jan 30 16:26:40 2018 +0100
+++ b/make/idea/idea.gmk	Tue Jan 30 16:41:40 2018 +0100
@@ -20,16 +20,9 @@
     SEL_MODULES := $(MODULES)
   endif
 
-  # Find all source dirs for a particular module
-  # $1 - Module to find source dirs for
-  FindIdeaModuleSrcDirs = \
-    $(strip $(addsuffix /$(strip $1), $(GENERATED_SRC_DIRS) $(IMPORT_MODULES_SRC)) \
-        $(wildcard $(foreach sub, $(SRC_SUBDIRS), $(addsuffix /$(strip $1)/$(sub), $(TOP_SRC_DIRS)))))
-
-
   idea:
 	$(ECHO) "SUPPORT=$(SUPPORT_OUTPUTDIR)" >> $(OUT)
-	$(ECHO) "MODULE_ROOTS=\"$(foreach mod, $(SEL_MODULES), $(call FindIdeaModuleSrcDirs,$(mod)))\"" >> $(OUT)
+	$(ECHO) "MODULE_ROOTS=\"$(foreach mod, $(SEL_MODULES), $(call FindModuleSrcDirs,$(mod)))\"" >> $(OUT)
 	$(ECHO) "MODULE_NAMES=\"$(strip $(foreach mod, $(SEL_MODULES), $(mod)))\"" >> $(OUT)
 	$(ECHO) "SEL_MODULES=\"$(SEL_MODULES)\"" >> $(OUT)
 	$(ECHO) "BOOT_JDK=\"$(BOOT_JDK)\"" >> $(OUT)
--- a/make/idea/template/ant.xml	Tue Jan 30 16:26:40 2018 +0100
+++ b/make/idea/template/ant.xml	Tue Jan 30 16:41:40 2018 +0100
@@ -3,7 +3,6 @@
   <component name="AntConfiguration">
     <buildFile url="file://$PROJECT_DIR$/.idea/build.xml">
       <properties>
-        <property name="boot.java.home" value="$JDKPath$" />
         <property name="intellij.ismake" value="$IsMake$" />
         <property name="build.target.dir" value="specDir" /> <!-- this will be replaced -->
         <property name="module.name" value="java.base" /> <!-- this will be replaced -->
--- a/make/idea/template/build.xml	Tue Jan 30 16:26:40 2018 +0100
+++ b/make/idea/template/build.xml	Tue Jan 30 16:41:40 2018 +0100
@@ -6,32 +6,16 @@
         new JdkLogger(project)
     </script>
 
-     <!-- java.marker is set to a marker file to check for within a Java install dir.
-         The best file to check for across Solaris/Linux/Windows/MacOS is one of the
-         executables; regrettably, that is OS-specific. -->
-    <condition property="java.marker" value="bin/java">
-        <os family="unix"/>
-    </condition>
-    <condition property="java.marker" value="bin/java.exe">
-        <os family="windows"/>
-    </condition>
-
-    <target name="-check-jtreg.home" depends="-def-check">
-        <check name="jtreg" property="jtreg.home" marker="lib/jtreg.jar"/>
-    </target>
-
-    <property name="test.dir" value="${basedir}/jdk/test"/>
-
     <macrodef name="call-make">
-            <attribute name="dir"/>
-            <attribute name="args"/>
-            <sequential>
-                <exec executable="make" dir="@{dir}" failonerror="true">
-                    <arg line="@{args}"/>
-                    <env key="CLASSPATH" value = ""/>
-                </exec>
-            </sequential>
-        </macrodef>
+        <attribute name="dir"/>
+        <attribute name="args"/>
+        <sequential>
+            <exec executable="make" dir="@{dir}" failonerror="true">
+                <arg line="@{args}"/>
+                <env key="CLASSPATH" value = ""/>
+            </exec>
+        </sequential>
+    </macrodef>
 
     <target name="cond-clean" unless="${intellij.ismake}">
         <antcall target="clean"/>
@@ -43,71 +27,17 @@
         **** Global JDK Build Targets
     -->
 
-    <target name="clean" depends="-do-configure">
-        <echo message="base = ${basedir}"/>
-        <call-make dir = "${build.target.dir}" args = "clean"/>
-    </target>
-
-    <target name="-do-configure">
+    <target name="clean">
         <echo message="base = ${basedir}"/>
-        <fail message="Not part of a full JDK forest">
-            <condition>
-                <not>
-                    <available file="${basedir}/configure" />
-                </not>
-            </condition>
-        </fail>
-        <exec executable="sh" dir="${basedir}" failonerror="true">
-            <arg line="configure --with-boot-jdk=${boot.java.home}"/>
-        </exec>
+        <call-make dir = "${build.target.dir}" args = "reconfigure"/>
+        <call-make dir = "${build.target.dir}" args = "clean"/>
     </target>
 
     <target name="images">
         <call-make dir = "${build.target.dir}" args = "images"/>
     </target>
 
-    <target name="jimages">
-        <call-make dir = "${build.target.dir}" args = "jimages"/>
-    </target>
-
-    <target name="check-env">
-        <exec executable="env" dir="${basedir}"/>
-    </target>
-
     <target name="build-module">
         <call-make dir = "${build.target.dir}" args = "${module.name}"/>
     </target>
-
-    <target name="-check-boot.java.home" depends="-def-check">
-        <check name="bootstrap java" property="boot.java.home" marker="${java.marker}"/>
-    </target>
-
-    <target name="-def-check">
-        <macrodef name="check">
-            <attribute name="name"/>
-            <attribute name="property"/>
-            <attribute name="marker" default=""/>
-            <sequential>
-                <fail message="Cannot locate @{name}: please set @{property} to its location">
-                    <condition>
-                        <not>
-                            <isset property="@{property}"/>
-                        </not>
-                    </condition>
-                </fail>
-                <fail message="@{name} is not installed in ${@{property}}">
-                    <condition>
-                        <and>
-                            <not>
-                                <equals arg1="@{marker}" arg2=""/>
-                            </not>
-                            <not>
-                                <available file="${@{property}}/@{marker}"/>
-                            </not>
-                        </and>
-                    </condition>
-                </fail>
-            </sequential>
-        </macrodef>
-    </target>
 </project>
--- a/make/idea/template/jdk.iml	Tue Jan 30 16:26:40 2018 +0100
+++ b/make/idea/template/jdk.iml	Tue Jan 30 16:41:40 2018 +0100
@@ -4,11 +4,9 @@
     <exclude-output />
     <content url="file://$MODULE_DIR$">
       <sourceFolder url="file://$MODULE_DIR$/####" isTestSource="false" />
-      <sourceFolder url="file://$MODULE_DIR$/test" isTestSource="true" />
-      <excludeFolder url="file://$MODULE_DIR$/src" />
       <excludeFolder url="file://$MODULE_DIR$/build" />
       <excludeFolder url="file://$MODULE_DIR$/make" />
-    </content>    
+    </content>
     <orderEntry type="sourceFolder" forTests="false" />
     <orderEntry type="inheritedJdk" />
   </component>
--- a/make/mapfiles/libjava/mapfile-vers	Tue Jan 30 16:26:40 2018 +0100
+++ b/make/mapfiles/libjava/mapfile-vers	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -74,6 +74,7 @@
 		JNU_ThrowStringIndexOutOfBoundsException;
 		JNU_ToString;
 
+		Java_java_io_FileDescriptor_cleanupClose0;
 		Java_java_io_FileDescriptor_close0;
 		Java_java_io_FileDescriptor_initIDs;
 		Java_java_io_FileDescriptor_sync;
--- a/src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp	Tue Jan 30 16:41:40 2018 +0100
@@ -1049,7 +1049,8 @@
     ldr(method_result, Address(method_result, vtable_offset_in_bytes));
   } else {
     vtable_offset_in_bytes += vtable_index.as_constant() * wordSize;
-    ldr(method_result, Address(recv_klass, vtable_offset_in_bytes));
+    ldr(method_result,
+        form_address(rscratch1, recv_klass, vtable_offset_in_bytes));
   }
 }
 
--- a/src/hotspot/cpu/aarch64/sharedRuntime_aarch64.cpp	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/hotspot/cpu/aarch64/sharedRuntime_aarch64.cpp	Tue Jan 30 16:41:40 2018 +0100
@@ -774,7 +774,7 @@
     __ load_klass(rscratch1, receiver);
     __ ldr(tmp, Address(holder, CompiledICHolder::holder_klass_offset()));
     __ cmp(rscratch1, tmp);
-    __ ldr(rmethod, Address(holder, CompiledICHolder::holder_method_offset()));
+    __ ldr(rmethod, Address(holder, CompiledICHolder::holder_metadata_offset()));
     __ br(Assembler::EQ, ok);
     __ far_jump(RuntimeAddress(SharedRuntime::get_ic_miss_stub()));
 
--- a/src/hotspot/cpu/aarch64/vtableStubs_aarch64.cpp	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/hotspot/cpu/aarch64/vtableStubs_aarch64.cpp	Tue Jan 30 16:41:40 2018 +0100
@@ -63,8 +63,8 @@
 
 #ifndef PRODUCT
   if (CountCompiledCalls) {
-    __ lea(r19, ExternalAddress((address) SharedRuntime::nof_megamorphic_calls_addr()));
-    __ incrementw(Address(r19));
+    __ lea(r16, ExternalAddress((address) SharedRuntime::nof_megamorphic_calls_addr()));
+    __ incrementw(Address(r16));
   }
 #endif
 
@@ -73,13 +73,13 @@
 
   // get receiver klass
   address npe_addr = __ pc();
-  __ load_klass(r19, j_rarg0);
+  __ load_klass(r16, j_rarg0);
 
 #ifndef PRODUCT
   if (DebugVtables) {
     Label L;
     // check offset vs vtable length
-    __ ldrw(rscratch1, Address(r19, Klass::vtable_length_offset()));
+    __ ldrw(rscratch1, Address(r16, Klass::vtable_length_offset()));
     __ cmpw(rscratch1, vtable_index * vtableEntry::size());
     __ br(Assembler::GT, L);
     __ enter();
@@ -91,7 +91,7 @@
   }
 #endif // PRODUCT
 
-  __ lookup_virtual_method(r19, vtable_index, rmethod);
+  __ lookup_virtual_method(r16, vtable_index, rmethod);
 
   if (DebugVtables) {
     Label L;
@@ -145,9 +145,9 @@
   //  j_rarg0: Receiver
 
 
-  // Most registers are in use; we'll use r0, rmethod, r10, r11
+  // Most registers are in use; we'll use r16, rmethod, r10, r11
   const Register recv_klass_reg     = r10;
-  const Register holder_klass_reg   = r0; // declaring interface klass (DECC)
+  const Register holder_klass_reg   = r16; // declaring interface klass (DECC)
   const Register resolved_klass_reg = rmethod; // resolved interface klass (REFC)
   const Register temp_reg           = r11;
   const Register icholder_reg       = rscratch2;
--- a/src/hotspot/cpu/arm/macroAssembler_arm.cpp	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/hotspot/cpu/arm/macroAssembler_arm.cpp	Tue Jan 30 16:41:40 2018 +0100
@@ -2475,49 +2475,65 @@
 // On success, the result will be in method_result, and execution falls through.
 // On failure, execution transfers to the given label.
 void MacroAssembler::lookup_interface_method(Register Rklass,
-                                             Register Rinterf,
-                                             Register Rindex,
+                                             Register Rintf,
+                                             RegisterOrConstant itable_index,
                                              Register method_result,
-                                             Register temp_reg1,
-                                             Register temp_reg2,
+                                             Register Rscan,
+                                             Register Rtmp,
                                              Label& L_no_such_interface) {
 
-  assert_different_registers(Rklass, Rinterf, temp_reg1, temp_reg2, Rindex);
-
-  Register Ritable = temp_reg1;
+  assert_different_registers(Rklass, Rintf, Rscan, Rtmp);
+
+  const int entry_size = itableOffsetEntry::size() * HeapWordSize;
+  assert(itableOffsetEntry::interface_offset_in_bytes() == 0, "not added for convenience");
 
   // Compute start of first itableOffsetEntry (which is at the end of the vtable)
   const int base = in_bytes(Klass::vtable_start_offset());
   const int scale = exact_log2(vtableEntry::size_in_bytes());
-  ldr_s32(temp_reg2, Address(Rklass, Klass::vtable_length_offset())); // Get length of vtable
-  add(Ritable, Rklass, base);
-  add(Ritable, Ritable, AsmOperand(temp_reg2, lsl, scale));
-
-  Label entry, search;
-
-  b(entry);
-
-  bind(search);
-  add(Ritable, Ritable, itableOffsetEntry::size() * HeapWordSize);
-
-  bind(entry);
-
-  // Check that the entry is non-null.  A null entry means that the receiver
-  // class doesn't implement the interface, and wasn't the same as the
-  // receiver class checked when the interface was resolved.
-
-  ldr(temp_reg2, Address(Ritable, itableOffsetEntry::interface_offset_in_bytes()));
-  cbz(temp_reg2, L_no_such_interface);
-
-  cmp(Rinterf, temp_reg2);
-  b(search, ne);
-
-  ldr_s32(temp_reg2, Address(Ritable, itableOffsetEntry::offset_offset_in_bytes()));
-  add(temp_reg2, temp_reg2, Rklass); // Add offset to Klass*
-  assert(itableMethodEntry::size() * HeapWordSize == wordSize, "adjust the scaling in the code below");
-  assert(itableMethodEntry::method_offset_in_bytes() == 0, "adjust the offset in the code below");
-
-  ldr(method_result, Address::indexed_ptr(temp_reg2, Rindex));
+  ldr_s32(Rtmp, Address(Rklass, Klass::vtable_length_offset())); // Get length of vtable
+  add(Rscan, Rklass, base);
+  add(Rscan, Rscan, AsmOperand(Rtmp, lsl, scale));
+
+  // Search through the itable for an interface equal to incoming Rintf
+  // itable looks like [intface][offset][intface][offset][intface][offset]
+
+  Label loop;
+  bind(loop);
+  ldr(Rtmp, Address(Rscan, entry_size, post_indexed));
+#ifdef AARCH64
+  Label found;
+  cmp(Rtmp, Rintf);
+  b(found, eq);
+  cbnz(Rtmp, loop);
+#else
+  cmp(Rtmp, Rintf);  // set ZF and CF if interface is found
+  cmn(Rtmp, 0, ne);  // check if tmp == 0 and clear CF if it is
+  b(loop, ne);
+#endif // AARCH64
+
+#ifdef AARCH64
+  b(L_no_such_interface);
+  bind(found);
+#else
+  // CF == 0 means we reached the end of itable without finding icklass
+  b(L_no_such_interface, cc);
+#endif // !AARCH64
+
+  if (method_result != noreg) {
+    // Interface found at previous position of Rscan, now load the method
+    ldr_s32(Rtmp, Address(Rscan, itableOffsetEntry::offset_offset_in_bytes() - entry_size));
+    if (itable_index.is_register()) {
+      add(Rtmp, Rtmp, Rklass); // Add offset to Klass*
+      assert(itableMethodEntry::size() * HeapWordSize == wordSize, "adjust the scaling in the code below");
+      assert(itableMethodEntry::method_offset_in_bytes() == 0, "adjust the offset in the code below");
+      ldr(method_result, Address::indexed_ptr(Rtmp, itable_index.as_register()));
+    } else {
+      int method_offset = itableMethodEntry::size() * HeapWordSize * itable_index.as_constant() +
+                          itableMethodEntry::method_offset_in_bytes();
+      add_slow(method_result, Rklass, method_offset);
+      ldr(method_result, Address(method_result, Rtmp));
+    }
+  }
 }
 
 #ifdef COMPILER2
--- a/src/hotspot/cpu/arm/macroAssembler_arm.hpp	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/hotspot/cpu/arm/macroAssembler_arm.hpp	Tue Jan 30 16:41:40 2018 +0100
@@ -1316,7 +1316,7 @@
 
   void lookup_interface_method(Register recv_klass,
                                Register intf_klass,
-                               Register itable_index,
+                               RegisterOrConstant itable_index,
                                Register method_result,
                                Register temp_reg1,
                                Register temp_reg2,
--- a/src/hotspot/cpu/arm/sharedRuntime_arm.cpp	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/hotspot/cpu/arm/sharedRuntime_arm.cpp	Tue Jan 30 16:41:40 2018 +0100
@@ -984,7 +984,7 @@
 
   __ load_klass(receiver_klass, receiver);
   __ ldr(holder_klass, Address(Ricklass, CompiledICHolder::holder_klass_offset()));
-  __ ldr(Rmethod, Address(Ricklass, CompiledICHolder::holder_method_offset()));
+  __ ldr(Rmethod, Address(Ricklass, CompiledICHolder::holder_metadata_offset()));
   __ cmp(receiver_klass, holder_klass);
 
 #ifdef AARCH64
--- a/src/hotspot/cpu/arm/templateTable_arm.cpp	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/hotspot/cpu/arm/templateTable_arm.cpp	Tue Jan 30 16:41:40 2018 +0100
@@ -4198,7 +4198,7 @@
   const Register Rflags  = R3_tmp;
   const Register Rklass  = R3_tmp;
 
-  prepare_invoke(byte_no, Rinterf, Rindex, Rrecv, Rflags);
+  prepare_invoke(byte_no, Rinterf, Rmethod, Rrecv, Rflags);
 
   // Special case of invokeinterface called for virtual method of
   // java.lang.Object.  See cpCacheOop.cpp for details.
@@ -4207,56 +4207,39 @@
   Label notMethod;
   __ tbz(Rflags, ConstantPoolCacheEntry::is_forced_virtual_shift, notMethod);
 
-  __ mov(Rmethod, Rindex);
   invokevirtual_helper(Rmethod, Rrecv, Rflags);
   __ bind(notMethod);
 
   // Get receiver klass into Rklass - also a null check
   __ load_klass(Rklass, Rrecv);
 
+  Label no_such_interface;
+
+  // Receiver subtype check against REFC.
+  __ lookup_interface_method(// inputs: rec. class, interface
+                             Rklass, Rinterf, noreg,
+                             // outputs:  scan temp. reg1, scan temp. reg2
+                             noreg, Ritable, Rtemp,
+                             no_such_interface);
+
   // profile this call
   __ profile_virtual_call(R0_tmp, Rklass);
 
-  // Compute start of first itableOffsetEntry (which is at the end of the vtable)
-  const int base = in_bytes(Klass::vtable_start_offset());
-  assert(vtableEntry::size() == 1, "adjust the scaling in the code below");
-  __ ldr_s32(Rtemp, Address(Rklass, Klass::vtable_length_offset())); // Get length of vtable
-  __ add(Ritable, Rklass, base);
-  __ add(Ritable, Ritable, AsmOperand(Rtemp, lsl, LogBytesPerWord));
-
-  Label entry, search, interface_ok;
-
-  __ b(entry);
-
-  __ bind(search);
-  __ add(Ritable, Ritable, itableOffsetEntry::size() * HeapWordSize);
-
-  __ bind(entry);
-
-  // Check that the entry is non-null.  A null entry means that the receiver
-  // class doesn't implement the interface, and wasn't the same as the
-  // receiver class checked when the interface was resolved.
-
-  __ ldr(Rtemp, Address(Ritable, itableOffsetEntry::interface_offset_in_bytes()));
-  __ cbnz(Rtemp, interface_ok);
-
-  // throw exception
-  __ call_VM(noreg, CAST_FROM_FN_PTR(address,
-                   InterpreterRuntime::throw_IncompatibleClassChangeError));
-
-  // the call_VM checks for exception, so we should never return here.
-  __ should_not_reach_here();
-
-  __ bind(interface_ok);
-
-  __ cmp(Rinterf, Rtemp);
-  __ b(search, ne);
-
-  __ ldr_s32(Rtemp, Address(Ritable, itableOffsetEntry::offset_offset_in_bytes()));
-  __ add(Rtemp, Rtemp, Rklass); // Add offset to Klass*
-  assert(itableMethodEntry::size() == 1, "adjust the scaling in the code below");
-
-  __ ldr(Rmethod, Address::indexed_ptr(Rtemp, Rindex));
+  // Get declaring interface class from method
+  __ ldr(Rtemp, Address(Rmethod, Method::const_offset()));
+  __ ldr(Rtemp, Address(Rtemp, ConstMethod::constants_offset()));
+  __ ldr(Rinterf, Address(Rtemp, ConstantPool::pool_holder_offset_in_bytes()));
+
+  // Get itable index from method
+  __ ldr_s32(Rtemp, Address(Rmethod, Method::itable_index_offset()));
+  __ add(Rtemp, Rtemp, (-Method::itable_index_max)); // small negative constant is too large for an immediate on arm32
+  __ neg(Rindex, Rtemp);
+
+  __ lookup_interface_method(// inputs: rec. class, interface
+                             Rklass, Rinterf, Rindex,
+                             // outputs:  scan temp. reg1, scan temp. reg2
+                             Rmethod, Ritable, Rtemp,
+                             no_such_interface);
 
   // Rmethod: Method* to call
 
@@ -4278,6 +4261,13 @@
 
   // do the call
   __ jump_from_interpreted(Rmethod);
+
+  // throw exception
+  __ bind(no_such_interface);
+  __ restore_method();
+  __ call_VM(noreg, CAST_FROM_FN_PTR(address, InterpreterRuntime::throw_IncompatibleClassChangeError));
+  // the call_VM checks for exception, so we should never return here.
+  __ should_not_reach_here();
 }
 
 void TemplateTable::invokehandle(int byte_no) {
--- a/src/hotspot/cpu/arm/vtableStubs_arm.cpp	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/hotspot/cpu/arm/vtableStubs_arm.cpp	Tue Jan 30 16:41:40 2018 +0100
@@ -28,6 +28,7 @@
 #include "code/vtableStubs.hpp"
 #include "interp_masm_arm.hpp"
 #include "memory/resourceArea.hpp"
+#include "oops/compiledICHolder.hpp"
 #include "oops/instanceKlass.hpp"
 #include "oops/klassVtable.hpp"
 #include "runtime/sharedRuntime.hpp"
@@ -118,67 +119,48 @@
 
   // R0-R3 / R0-R7 registers hold the arguments and cannot be spoiled
   const Register Rclass  = AARCH64_ONLY(R9)  NOT_AARCH64(R4);
-  const Register Rlength = AARCH64_ONLY(R10)  NOT_AARCH64(R5);
+  const Register Rintf   = AARCH64_ONLY(R10) NOT_AARCH64(R5);
   const Register Rscan   = AARCH64_ONLY(R11) NOT_AARCH64(R6);
-  const Register tmp     = Rtemp;
 
-  assert_different_registers(Ricklass, Rclass, Rlength, Rscan, tmp);
+  assert_different_registers(Ricklass, Rclass, Rintf, Rscan, Rtemp);
 
   // Calculate the start of itable (itable goes after vtable)
   const int scale = exact_log2(vtableEntry::size_in_bytes());
   address npe_addr = __ pc();
   __ load_klass(Rclass, R0);
-  __ ldr_s32(Rlength, Address(Rclass, Klass::vtable_length_offset()));
 
-  __ add(Rscan, Rclass, in_bytes(Klass::vtable_start_offset()));
-  __ add(Rscan, Rscan, AsmOperand(Rlength, lsl, scale));
-
-  // Search through the itable for an interface equal to incoming Ricklass
-  // itable looks like [intface][offset][intface][offset][intface][offset]
-  const int entry_size = itableOffsetEntry::size() * HeapWordSize;
-  assert(itableOffsetEntry::interface_offset_in_bytes() == 0, "not added for convenience");
+  Label L_no_such_interface;
 
-  Label loop;
-  __ bind(loop);
-  __ ldr(tmp, Address(Rscan, entry_size, post_indexed));
-#ifdef AARCH64
-  Label found;
-  __ cmp(tmp, Ricklass);
-  __ b(found, eq);
-  __ cbnz(tmp, loop);
-#else
-  __ cmp(tmp, Ricklass);  // set ZF and CF if interface is found
-  __ cmn(tmp, 0, ne);     // check if tmp == 0 and clear CF if it is
-  __ b(loop, ne);
-#endif // AARCH64
+  // Receiver subtype check against REFC.
+  __ ldr(Rintf, Address(Ricklass, CompiledICHolder::holder_klass_offset()));
+  __ lookup_interface_method(// inputs: rec. class, interface, itable index
+                             Rclass, Rintf, noreg,
+                             // outputs: temp reg1, temp reg2
+                             noreg, Rscan, Rtemp,
+                             L_no_such_interface);
 
-  assert(StubRoutines::throw_IncompatibleClassChangeError_entry() != NULL, "Check initialization order");
-#ifdef AARCH64
-  __ jump(StubRoutines::throw_IncompatibleClassChangeError_entry(), relocInfo::runtime_call_type, tmp);
-  __ bind(found);
-#else
-  // CF == 0 means we reached the end of itable without finding icklass
-  __ jump(StubRoutines::throw_IncompatibleClassChangeError_entry(), relocInfo::runtime_call_type, noreg, cc);
-#endif // !AARCH64
-
-  // Interface found at previous position of Rscan, now load the method oop
-  __ ldr_s32(tmp, Address(Rscan, itableOffsetEntry::offset_offset_in_bytes() - entry_size));
-  {
-    const int method_offset = itableMethodEntry::size() * HeapWordSize * itable_index +
-      itableMethodEntry::method_offset_in_bytes();
-    __ add_slow(Rmethod, Rclass, method_offset);
-  }
-  __ ldr(Rmethod, Address(Rmethod, tmp));
+  // Get Method* and entry point for compiler
+  __ ldr(Rintf, Address(Ricklass, CompiledICHolder::holder_metadata_offset()));
+  __ lookup_interface_method(// inputs: rec. class, interface, itable index
+                             Rclass, Rintf, itable_index,
+                             // outputs: temp reg1, temp reg2, temp reg3
+                             Rmethod, Rscan, Rtemp,
+                             L_no_such_interface);
 
   address ame_addr = __ pc();
 
 #ifdef AARCH64
-  __ ldr(tmp, Address(Rmethod, Method::from_compiled_offset()));
-  __ br(tmp);
+  __ ldr(Rtemp, Address(Rmethod, Method::from_compiled_offset()));
+  __ br(Rtemp);
 #else
   __ ldr(PC, Address(Rmethod, Method::from_compiled_offset()));
 #endif // AARCH64
 
+  __ bind(L_no_such_interface);
+
+  assert(StubRoutines::throw_IncompatibleClassChangeError_entry() != NULL, "check initialization order");
+  __ jump(StubRoutines::throw_IncompatibleClassChangeError_entry(), relocInfo::runtime_call_type, Rtemp);
+
   masm->flush();
 
   if (PrintMiscellaneous && (WizardMode || Verbose)) {
@@ -205,7 +187,7 @@
     instr_count = NOT_AARCH64(4) AARCH64_ONLY(5);
   } else {
     // itable stub size
-    instr_count = NOT_AARCH64(20) AARCH64_ONLY(20);
+    instr_count = NOT_AARCH64(31) AARCH64_ONLY(31);
   }
 
 #ifdef AARCH64
--- a/src/hotspot/cpu/ppc/globalDefinitions_ppc.hpp	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/hotspot/cpu/ppc/globalDefinitions_ppc.hpp	Tue Jan 30 16:41:40 2018 +0100
@@ -55,5 +55,9 @@
 #define SUPPORT_RESERVED_STACK_AREA
 
 #define THREAD_LOCAL_POLL
+// If UseSIGTRAP is active, we only use the poll bit and no polling page.
+// Otherwise, we fall back to usage of the polling page in nmethods.
+// Define the condition to use this -XX flag.
+#define USE_POLL_BIT_ONLY UseSIGTRAP
 
 #endif // CPU_PPC_VM_GLOBALDEFINITIONS_PPC_HPP
--- a/src/hotspot/cpu/ppc/macroAssembler_ppc.cpp	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/hotspot/cpu/ppc/macroAssembler_ppc.cpp	Tue Jan 30 16:41:40 2018 +0100
@@ -1788,11 +1788,10 @@
                                              RegisterOrConstant itable_index,
                                              Register method_result,
                                              Register scan_temp,
-                                             Register sethi_temp,
-                                             Label& L_no_such_interface) {
+                                             Register temp2,
+                                             Label& L_no_such_interface,
+                                             bool return_method) {
   assert_different_registers(recv_klass, intf_klass, method_result, scan_temp);
-  assert(itable_index.is_constant() || itable_index.as_register() == method_result,
-         "caller must use same register for non-constant itable index as for method");
 
   // Compute start of first itableOffsetEntry (which is at the end of the vtable).
   int vtable_base = in_bytes(Klass::vtable_start_offset());
@@ -1810,15 +1809,17 @@
   add(scan_temp, recv_klass, scan_temp);
 
   // Adjust recv_klass by scaled itable_index, so we can free itable_index.
-  if (itable_index.is_register()) {
-    Register itable_offset = itable_index.as_register();
-    sldi(itable_offset, itable_offset, logMEsize);
-    if (itentry_off) addi(itable_offset, itable_offset, itentry_off);
-    add(recv_klass, itable_offset, recv_klass);
-  } else {
-    long itable_offset = (long)itable_index.as_constant();
-    load_const_optimized(sethi_temp, (itable_offset<<logMEsize)+itentry_off); // static address, no relocation
-    add(recv_klass, sethi_temp, recv_klass);
+  if (return_method) {
+    if (itable_index.is_register()) {
+      Register itable_offset = itable_index.as_register();
+      sldi(method_result, itable_offset, logMEsize);
+      if (itentry_off) { addi(method_result, method_result, itentry_off); }
+      add(method_result, method_result, recv_klass);
+    } else {
+      long itable_offset = (long)itable_index.as_constant();
+      // static address, no relocation
+      add_const_optimized(method_result, recv_klass, (itable_offset << logMEsize) + itentry_off, temp2);
+    }
   }
 
   // for (scan = klass->itable(); scan->interface() != NULL; scan += scan_step) {
@@ -1831,12 +1832,12 @@
   for (int peel = 1; peel >= 0; peel--) {
     // %%%% Could load both offset and interface in one ldx, if they were
     // in the opposite order. This would save a load.
-    ld(method_result, itableOffsetEntry::interface_offset_in_bytes(), scan_temp);
+    ld(temp2, itableOffsetEntry::interface_offset_in_bytes(), scan_temp);
 
     // Check that this entry is non-null. A null entry means that
     // the receiver class doesn't implement the interface, and wasn't the
     // same as when the caller was compiled.
-    cmpd(CCR0, method_result, intf_klass);
+    cmpd(CCR0, temp2, intf_klass);
 
     if (peel) {
       beq(CCR0, found_method);
@@ -1849,7 +1850,7 @@
 
     bind(search);
 
-    cmpdi(CCR0, method_result, 0);
+    cmpdi(CCR0, temp2, 0);
     beq(CCR0, L_no_such_interface);
     addi(scan_temp, scan_temp, scan_step);
   }
@@ -1857,9 +1858,11 @@
   bind(found_method);
 
   // Got a hit.
-  int ito_offset = itableOffsetEntry::offset_offset_in_bytes();
-  lwz(scan_temp, ito_offset, scan_temp);
-  ldx(method_result, scan_temp, recv_klass);
+  if (return_method) {
+    int ito_offset = itableOffsetEntry::offset_offset_in_bytes();
+    lwz(scan_temp, ito_offset, scan_temp);
+    ldx(method_result, scan_temp, method_result);
+  }
 }
 
 // virtual method calling
--- a/src/hotspot/cpu/ppc/macroAssembler_ppc.hpp	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/hotspot/cpu/ppc/macroAssembler_ppc.hpp	Tue Jan 30 16:41:40 2018 +0100
@@ -519,7 +519,8 @@
                                RegisterOrConstant itable_index,
                                Register method_result,
                                Register temp_reg, Register temp2_reg,
-                               Label& no_such_interface);
+                               Label& no_such_interface,
+                               bool return_method = true);
 
   // virtual method calling
   void lookup_virtual_method(Register recv_klass,
--- a/src/hotspot/cpu/ppc/macroAssembler_ppc.inline.hpp	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/hotspot/cpu/ppc/macroAssembler_ppc.inline.hpp	Tue Jan 30 16:41:40 2018 +0100
@@ -30,6 +30,7 @@
 #include "asm/macroAssembler.hpp"
 #include "asm/codeBuffer.hpp"
 #include "code/codeCache.hpp"
+#include "runtime/safepointMechanism.hpp"
 
 inline bool MacroAssembler::is_ld_largeoffset(address a) {
   const int inst1 = *(int *)a;
@@ -261,7 +262,12 @@
 
 // Read from the polling page, its address is already in a register.
 inline void MacroAssembler::load_from_polling_page(Register polling_page_address, int offset) {
-  ld(R0, offset, polling_page_address);
+  if (SafepointMechanism::uses_thread_local_poll() && USE_POLL_BIT_ONLY) {
+    int encoding = SafepointMechanism::poll_bit();
+    tdi(traptoGreaterThanUnsigned | traptoEqual, polling_page_address, encoding);
+  } else {
+    ld(R0, offset, polling_page_address);
+  }
 }
 
 // Trap-instruction-based checks.
--- a/src/hotspot/cpu/ppc/nativeInst_ppc.hpp	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/hotspot/cpu/ppc/nativeInst_ppc.hpp	Tue Jan 30 16:41:40 2018 +0100
@@ -30,6 +30,7 @@
 #include "memory/allocation.hpp"
 #include "runtime/icache.hpp"
 #include "runtime/os.hpp"
+#include "runtime/safepointMechanism.hpp"
 
 // We have interfaces for the following instructions:
 //
@@ -92,6 +93,11 @@
   bool is_safepoint_poll() {
     // Is the current instruction a POTENTIAL read access to the polling page?
     // The current arguments of the instruction are not checked!
+    if (SafepointMechanism::uses_thread_local_poll() && USE_POLL_BIT_ONLY) {
+      int encoding = SafepointMechanism::poll_bit();
+      return MacroAssembler::is_tdi(long_at(0), Assembler::traptoGreaterThanUnsigned | Assembler::traptoEqual,
+                                    -1, encoding);
+    }
     return MacroAssembler::is_load_from_polling_page(long_at(0), NULL);
   }
 
--- a/src/hotspot/cpu/ppc/sharedRuntime_ppc.cpp	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/hotspot/cpu/ppc/sharedRuntime_ppc.cpp	Tue Jan 30 16:41:40 2018 +0100
@@ -1188,7 +1188,7 @@
   // Argument is valid and klass is as expected, continue.
 
   // Extract method from inline cache, verified entry point needs it.
-  __ ld(R19_method, CompiledICHolder::holder_method_offset(), ic);
+  __ ld(R19_method, CompiledICHolder::holder_metadata_offset(), ic);
   assert(R19_method == ic, "the inline cache register is dead here");
 
   __ ld(code, method_(code));
--- a/src/hotspot/cpu/ppc/templateTable_ppc_64.cpp	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/hotspot/cpu/ppc/templateTable_ppc_64.cpp	Tue Jan 30 16:41:40 2018 +0100
@@ -3486,11 +3486,11 @@
 void TemplateTable::invokeinterface_object_method(Register Rrecv_klass,
                                                   Register Rret,
                                                   Register Rflags,
-                                                  Register Rindex,
+                                                  Register Rmethod,
                                                   Register Rtemp1,
                                                   Register Rtemp2) {
 
-  assert_different_registers(Rindex, Rret, Rrecv_klass, Rflags, Rtemp1, Rtemp2);
+  assert_different_registers(Rmethod, Rret, Rrecv_klass, Rflags, Rtemp1, Rtemp2);
   Label LnotFinal;
 
   // Check for vfinal.
@@ -3502,14 +3502,14 @@
   // Final call case.
   __ profile_final_call(Rtemp1, Rscratch);
   // Argument and return type profiling.
-  __ profile_arguments_type(Rindex, Rscratch, Rrecv_klass /* scratch */, true);
+  __ profile_arguments_type(Rmethod, Rscratch, Rrecv_klass /* scratch */, true);
   // Do the final call - the index (f2) contains the method.
-  __ call_from_interpreter(Rindex, Rret, Rscratch, Rrecv_klass /* scratch */);
+  __ call_from_interpreter(Rmethod, Rret, Rscratch, Rrecv_klass /* scratch */);
 
   // Non-final callc case.
   __ bind(LnotFinal);
   __ profile_virtual_call(Rrecv_klass, Rtemp1, Rscratch, false);
-  generate_vtable_call(Rrecv_klass, Rindex, Rret, Rscratch);
+  generate_vtable_call(Rrecv_klass, Rmethod, Rret, Rscratch);
 }
 
 void TemplateTable::invokeinterface(int byte_no) {
@@ -3518,58 +3518,61 @@
 
   const Register Rscratch1        = R11_scratch1,
                  Rscratch2        = R12_scratch2,
-                 Rscratch3        = R9_ARG7,
-                 Rscratch4        = R10_ARG8,
-                 Rtable_addr      = Rscratch2,
+                 Rmethod          = R6_ARG4,
+                 Rmethod2         = R9_ARG7,
                  Rinterface_klass = R5_ARG3,
-                 Rret_type        = R8_ARG6,
-                 Rret_addr        = Rret_type,
-                 Rindex           = R6_ARG4,
-                 Rreceiver        = R4_ARG2,
-                 Rrecv_klass      = Rreceiver,
+                 Rret_addr        = R8_ARG6,
+                 Rindex           = R10_ARG8,
+                 Rreceiver        = R3_ARG1,
+                 Rrecv_klass      = R4_ARG2,
                  Rflags           = R7_ARG5;
 
-  prepare_invoke(byte_no, Rinterface_klass, Rret_addr, Rindex, Rreceiver, Rflags, Rscratch1);
+  prepare_invoke(byte_no, Rinterface_klass, Rret_addr, Rmethod, Rreceiver, Rflags, Rscratch1);
 
   // Get receiver klass.
-  __ null_check_throw(Rreceiver, oopDesc::klass_offset_in_bytes(), Rscratch3);
+  __ null_check_throw(Rreceiver, oopDesc::klass_offset_in_bytes(), Rscratch2);
   __ load_klass(Rrecv_klass, Rreceiver);
 
   // Check corner case object method.
-  Label LobjectMethod;
-
+  Label LobjectMethod, L_no_such_interface, Lthrow_ame;
   __ testbitdi(CCR0, R0, Rflags, ConstantPoolCacheEntry::is_forced_virtual_shift);
   __ btrue(CCR0, LobjectMethod);
 
-  // Fallthrough: The normal invokeinterface case.
+  __ lookup_interface_method(Rrecv_klass, Rinterface_klass, noreg, noreg, Rscratch1, Rscratch2,
+                             L_no_such_interface, /*return_method=*/false);
+
   __ profile_virtual_call(Rrecv_klass, Rscratch1, Rscratch2, false);
 
   // Find entry point to call.
-  Label Lthrow_icc, Lthrow_ame;
-  // Result will be returned in Rindex.
-  __ mr(Rscratch4, Rrecv_klass);
-  __ mr(Rscratch3, Rindex);
-  __ lookup_interface_method(Rrecv_klass, Rinterface_klass, Rindex, Rindex, Rscratch1, Rscratch2, Lthrow_icc);
-
-  __ cmpdi(CCR0, Rindex, 0);
+
+  // Get declaring interface class from method
+  __ ld(Rinterface_klass, in_bytes(Method::const_offset()), Rmethod);
+  __ ld(Rinterface_klass, in_bytes(ConstMethod::constants_offset()), Rinterface_klass);
+  __ ld(Rinterface_klass, ConstantPool::pool_holder_offset_in_bytes(), Rinterface_klass);
+
+  // Get itable index from method
+  __ lwa(Rindex, in_bytes(Method::itable_index_offset()), Rmethod);
+  __ subfic(Rindex, Rindex, Method::itable_index_max);
+
+  __ lookup_interface_method(Rrecv_klass, Rinterface_klass, Rindex, Rmethod2, Rscratch1, Rscratch2,
+                             L_no_such_interface);
+
+  __ cmpdi(CCR0, Rmethod2, 0);
   __ beq(CCR0, Lthrow_ame);
   // Found entry. Jump off!
   // Argument and return type profiling.
-  __ profile_arguments_type(Rindex, Rscratch1, Rscratch2, true);
-  __ call_from_interpreter(Rindex, Rret_addr, Rscratch1, Rscratch2);
+  __ profile_arguments_type(Rmethod2, Rscratch1, Rscratch2, true);
+  //__ profile_called_method(Rindex, Rscratch1);
+  __ call_from_interpreter(Rmethod2, Rret_addr, Rscratch1, Rscratch2);
 
   // Vtable entry was NULL => Throw abstract method error.
   __ bind(Lthrow_ame);
-  __ mr(Rrecv_klass, Rscratch4);
-  __ mr(Rindex, Rscratch3);
   call_VM(noreg, CAST_FROM_FN_PTR(address, InterpreterRuntime::throw_AbstractMethodError));
 
   // Interface was not found => Throw incompatible class change error.
-  __ bind(Lthrow_icc);
-  __ mr(Rrecv_klass, Rscratch4);
+  __ bind(L_no_such_interface);
   call_VM(noreg, CAST_FROM_FN_PTR(address, InterpreterRuntime::throw_IncompatibleClassChangeError));
-
-  __ should_not_reach_here();
+  DEBUG_ONLY( __ should_not_reach_here(); )
 
   // Special case of invokeinterface called for virtual method of
   // java.lang.Object. See ConstantPoolCacheEntry::set_method() for details:
@@ -3577,7 +3580,7 @@
   // to handle this corner case. This code isn't produced by javac, but could
   // be produced by another compliant java compiler.
   __ bind(LobjectMethod);
-  invokeinterface_object_method(Rrecv_klass, Rret_addr, Rflags, Rindex, Rscratch1, Rscratch2);
+  invokeinterface_object_method(Rrecv_klass, Rret_addr, Rflags, Rmethod, Rscratch1, Rscratch2);
 }
 
 void TemplateTable::invokedynamic(int byte_no) {
--- a/src/hotspot/cpu/ppc/vtableStubs_ppc_64.cpp	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/hotspot/cpu/ppc/vtableStubs_ppc_64.cpp	Tue Jan 30 16:41:40 2018 +0100
@@ -1,6 +1,6 @@
 /*
- * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
- * Copyright (c) 2012, 2016 SAP SE. All rights reserved.
+ * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2017 SAP SE. All rights reserved.
  * 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 "code/vtableStubs.hpp"
 #include "interp_masm_ppc.hpp"
 #include "memory/resourceArea.hpp"
+#include "oops/compiledICHolder.hpp"
 #include "oops/instanceKlass.hpp"
 #include "oops/klassVtable.hpp"
 #include "runtime/sharedRuntime.hpp"
@@ -55,17 +56,22 @@
   // PPC port: use fixed size.
   const int code_length = VtableStub::pd_code_size_limit(true);
   VtableStub* s = new (code_length) VtableStub(true, vtable_index);
+
+  // Can be NULL if there is no free space in the code cache.
+  if (s == NULL) {
+    return NULL;
+  }
+
   ResourceMark rm;
   CodeBuffer cb(s->entry_point(), code_length);
   MacroAssembler* masm = new MacroAssembler(&cb);
-  address start_pc;
 
 #ifndef PRODUCT
   if (CountCompiledCalls) {
-    __ load_const(R11_scratch1, SharedRuntime::nof_megamorphic_calls_addr());
-    __ lwz(R12_scratch2, 0, R11_scratch1);
+    int offs = __ load_const_optimized(R11_scratch1, SharedRuntime::nof_megamorphic_calls_addr(), R12_scratch2, true);
+    __ lwz(R12_scratch2, offs, R11_scratch1);
     __ addi(R12_scratch2, R12_scratch2, 1);
-    __ stw(R12_scratch2, 0, R11_scratch1);
+    __ stw(R12_scratch2, offs, R11_scratch1);
   }
 #endif
 
@@ -116,6 +122,7 @@
   __ ld(R12_scratch2, in_bytes(Method::from_compiled_offset()), R19_method);
   __ mtctr(R12_scratch2);
   __ bctr();
+
   masm->flush();
 
   guarantee(__ pc() <= s->code_end(), "overflowed buffer");
@@ -125,10 +132,16 @@
   return s;
 }
 
-VtableStub* VtableStubs::create_itable_stub(int vtable_index) {
+VtableStub* VtableStubs::create_itable_stub(int itable_index) {
   // PPC port: use fixed size.
   const int code_length = VtableStub::pd_code_size_limit(false);
-  VtableStub* s = new (code_length) VtableStub(false, vtable_index);
+  VtableStub* s = new (code_length) VtableStub(false, itable_index);
+
+  // Can be NULL if there is no free space in the code cache.
+  if (s == NULL) {
+    return NULL;
+  }
+
   ResourceMark rm;
   CodeBuffer cb(s->entry_point(), code_length);
   MacroAssembler* masm = new MacroAssembler(&cb);
@@ -136,10 +149,10 @@
 
 #ifndef PRODUCT
   if (CountCompiledCalls) {
-    __ load_const(R11_scratch1, SharedRuntime::nof_megamorphic_calls_addr());
-    __ lwz(R12_scratch2, 0, R11_scratch1);
+    int offs = __ load_const_optimized(R11_scratch1, SharedRuntime::nof_megamorphic_calls_addr(), R12_scratch2, true);
+    __ lwz(R12_scratch2, offs, R11_scratch1);
     __ addi(R12_scratch2, R12_scratch2, 1);
-    __ stw(R12_scratch2, 0, R11_scratch1);
+    __ stw(R12_scratch2, offs, R11_scratch1);
   }
 #endif
 
@@ -148,62 +161,28 @@
   // Entry arguments:
   //  R19_method: Interface
   //  R3_ARG1:    Receiver
-  //
 
-  const Register rcvr_klass = R11_scratch1;
-  const Register vtable_len = R12_scratch2;
-  const Register itable_entry_addr = R21_tmp1;
-  const Register itable_interface = R22_tmp2;
+  Label L_no_such_interface;
+  const Register rcvr_klass = R11_scratch1,
+                 interface  = R12_scratch2,
+                 tmp1       = R21_tmp1,
+                 tmp2       = R22_tmp2;
 
-  // Get receiver klass.
-
-  // We might implicit NULL fault here.
   address npe_addr = __ pc(); // npe = null pointer exception
   __ null_check(R3_ARG1, oopDesc::klass_offset_in_bytes(), /*implicit only*/NULL);
   __ load_klass(rcvr_klass, R3_ARG1);
 
-  BLOCK_COMMENT("Load start of itable entries into itable_entry.");
-  __ lwz(vtable_len, in_bytes(Klass::vtable_length_offset()), rcvr_klass);
-  __ slwi(vtable_len, vtable_len, exact_log2(vtableEntry::size_in_bytes()));
-  __ add(itable_entry_addr, vtable_len, rcvr_klass);
-
-  // Loop over all itable entries until desired interfaceOop(Rinterface) found.
-  BLOCK_COMMENT("Increment itable_entry_addr in loop.");
-  const int vtable_base_offset = in_bytes(Klass::vtable_start_offset());
-  __ addi(itable_entry_addr, itable_entry_addr, vtable_base_offset + itableOffsetEntry::interface_offset_in_bytes());
-
-  const int itable_offset_search_inc = itableOffsetEntry::size() * wordSize;
-  Label search;
-  __ bind(search);
-  __ ld(itable_interface, 0, itable_entry_addr);
+  // Receiver subtype check against REFC.
+  __ ld(interface, CompiledICHolder::holder_klass_offset(), R19_method);
+  __ lookup_interface_method(rcvr_klass, interface, noreg,
+                             R0, tmp1, tmp2,
+                             L_no_such_interface, /*return_method=*/ false);
 
-  // Handle IncompatibleClassChangeError in itable stubs.
-  // If the entry is NULL then we've reached the end of the table
-  // without finding the expected interface, so throw an exception.
-  BLOCK_COMMENT("Handle IncompatibleClassChangeError in itable stubs.");
-  Label throw_icce;
-  __ cmpdi(CCR1, itable_interface, 0);
-  __ cmpd(CCR0, itable_interface, R19_method);
-  __ addi(itable_entry_addr, itable_entry_addr, itable_offset_search_inc);
-  __ beq(CCR1, throw_icce);
-  __ bne(CCR0, search);
-
-  // Entry found and itable_entry_addr points to it, get offset of vtable for interface.
-
-  const Register vtable_offset = R12_scratch2;
-  const Register itable_method = R11_scratch1;
-
-  const int vtable_offset_offset = (itableOffsetEntry::offset_offset_in_bytes() -
-                                    itableOffsetEntry::interface_offset_in_bytes()) -
-                                   itable_offset_search_inc;
-  __ lwz(vtable_offset, vtable_offset_offset, itable_entry_addr);
-
-  // Compute itableMethodEntry and get method and entry point for compiler.
-  const int method_offset = (itableMethodEntry::size() * wordSize * vtable_index) +
-    itableMethodEntry::method_offset_in_bytes();
-
-  __ add(itable_method, rcvr_klass, vtable_offset);
-  __ ld(R19_method, method_offset, itable_method);
+  // Get Method* and entrypoint for compiler
+  __ ld(interface, CompiledICHolder::holder_metadata_offset(), R19_method);
+  __ lookup_interface_method(rcvr_klass, interface, itable_index,
+                             R19_method, tmp1, tmp2,
+                             L_no_such_interface, /*return_method=*/ true);
 
 #ifndef PRODUCT
   if (DebugVtables) {
@@ -219,7 +198,7 @@
   address ame_addr = __ pc(); // ame = abstract method error
 
   // Must do an explicit check if implicit checks are disabled.
-  __ null_check(R19_method, in_bytes(Method::from_compiled_offset()), &throw_icce);
+  __ null_check(R19_method, in_bytes(Method::from_compiled_offset()), &L_no_such_interface);
   __ ld(R12_scratch2, in_bytes(Method::from_compiled_offset()), R19_method);
   __ mtctr(R12_scratch2);
   __ bctr();
@@ -229,8 +208,8 @@
   // We force resolving of the call site by jumping to the "handle
   // wrong method" stub, and so let the interpreter runtime do all the
   // dirty work.
-  __ bind(throw_icce);
-  __ load_const(R11_scratch1, SharedRuntime::get_handle_wrong_method_stub());
+  __ bind(L_no_such_interface);
+  __ load_const_optimized(R11_scratch1, SharedRuntime::get_handle_wrong_method_stub(), R12_scratch2);
   __ mtctr(R11_scratch1);
   __ bctr();
 
@@ -245,14 +224,15 @@
 int VtableStub::pd_code_size_limit(bool is_vtable_stub) {
   if (DebugVtables || CountCompiledCalls || VerifyOops) {
     return 1000;
-  } else {
-    int decode_klass_size = MacroAssembler::instr_size_for_decode_klass_not_null();
-    if (is_vtable_stub) {
-      return 20 + decode_klass_size +  8 + 8;   // Plain + cOops + Traps + safety
-    } else {
-      return 96 + decode_klass_size + 12 + 8;   // Plain + cOops + Traps + safety
-    }
+  }
+  int size = is_vtable_stub ? 20 + 8 : 164 + 20; // Plain + safety
+  if (UseCompressedClassPointers) {
+    size += MacroAssembler::instr_size_for_decode_klass_not_null();
   }
+  if (!ImplicitNullChecks || !os::zero_page_read_protected()) {
+    size += is_vtable_stub ? 8 : 12;
+  }
+  return size;
 }
 
 int VtableStub::pd_code_alignment() {
--- a/src/hotspot/cpu/s390/macroAssembler_s390.cpp	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/hotspot/cpu/s390/macroAssembler_s390.cpp	Tue Jan 30 16:41:40 2018 +0100
@@ -2806,8 +2806,8 @@
                                              RegisterOrConstant itable_index,
                                              Register           method_result,
                                              Register           temp1_reg,
-                                             Register           temp2_reg,
-                                             Label&             no_such_interface) {
+                                             Label&             no_such_interface,
+                                             bool               return_method) {
 
   const Register vtable_len = temp1_reg;    // Used to compute itable_entry_addr.
   const Register itable_entry_addr = Z_R1_scratch;
@@ -2842,38 +2842,36 @@
   z_brne(search);
 
   // Entry found and itable_entry_addr points to it, get offset of vtable for interface.
-
-  const int vtable_offset_offset = (itableOffsetEntry::offset_offset_in_bytes() -
-                                    itableOffsetEntry::interface_offset_in_bytes()) -
-                                   itable_offset_search_inc;
-
-  // Compute itableMethodEntry and get method and entry point
-  // we use addressing with index and displacement, since the formula
-  // for computing the entry's offset has a fixed and a dynamic part,
-  // the latter depending on the matched interface entry and on the case,
-  // that the itable index has been passed as a register, not a constant value.
-  int method_offset = itableMethodEntry::method_offset_in_bytes();
-                           // Fixed part (displacement), common operand.
-  Register itable_offset;  // Dynamic part (index register).
-
-  if (itable_index.is_register()) {
-     // Compute the method's offset in that register, for the formula, see the
-     // else-clause below.
-     itable_offset = itable_index.as_register();
-
-     z_sllg(itable_offset, itable_offset, exact_log2(itableMethodEntry::size() * wordSize));
-     z_agf(itable_offset, vtable_offset_offset, itable_entry_addr);
-  } else {
-    itable_offset = Z_R1_scratch;
-    // Displacement increases.
-    method_offset += itableMethodEntry::size() * wordSize * itable_index.as_constant();
-
-    // Load index from itable.
-    z_llgf(itable_offset, vtable_offset_offset, itable_entry_addr);
-  }
-
-  // Finally load the method's oop.
-  z_lg(method_result, method_offset, itable_offset, recv_klass);
+  if (return_method) {
+    const int vtable_offset_offset = (itableOffsetEntry::offset_offset_in_bytes() -
+                                      itableOffsetEntry::interface_offset_in_bytes()) -
+                                     itable_offset_search_inc;
+
+    // Compute itableMethodEntry and get method and entry point
+    // we use addressing with index and displacement, since the formula
+    // for computing the entry's offset has a fixed and a dynamic part,
+    // the latter depending on the matched interface entry and on the case,
+    // that the itable index has been passed as a register, not a constant value.
+    int method_offset = itableMethodEntry::method_offset_in_bytes();
+                             // Fixed part (displacement), common operand.
+    Register itable_offset = method_result;  // Dynamic part (index register).
+
+    if (itable_index.is_register()) {
+       // Compute the method's offset in that register, for the formula, see the
+       // else-clause below.
+       z_sllg(itable_offset, itable_index.as_register(), exact_log2(itableMethodEntry::size() * wordSize));
+       z_agf(itable_offset, vtable_offset_offset, itable_entry_addr);
+    } else {
+      // Displacement increases.
+      method_offset += itableMethodEntry::size() * wordSize * itable_index.as_constant();
+
+      // Load index from itable.
+      z_llgf(itable_offset, vtable_offset_offset, itable_entry_addr);
+    }
+
+    // Finally load the method's oop.
+    z_lg(method_result, method_offset, itable_offset, recv_klass);
+  }
   BLOCK_COMMENT("} lookup_interface_method");
 }
 
--- a/src/hotspot/cpu/s390/macroAssembler_s390.hpp	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/hotspot/cpu/s390/macroAssembler_s390.hpp	Tue Jan 30 16:41:40 2018 +0100
@@ -671,8 +671,8 @@
                                RegisterOrConstant itable_index,
                                Register           method_result,
                                Register           temp1_reg,
-                               Register           temp2_reg,
-                               Label&             no_such_interface);
+                               Label&             no_such_interface,
+                               bool               return_method = true);
 
   // virtual method calling
   void lookup_virtual_method(Register             recv_klass,
--- a/src/hotspot/cpu/s390/methodHandles_s390.cpp	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/hotspot/cpu/s390/methodHandles_s390.cpp	Tue Jan 30 16:41:40 2018 +0100
@@ -498,7 +498,7 @@
       Label L_no_such_interface;
       __ lookup_interface_method(temp1_recv_klass, temp3_intf,
                                  // Note: next two args must be the same:
-                                 Z_index, Z_method, temp2, noreg,
+                                 Z_index, Z_method, temp2,
                                  L_no_such_interface);
       jump_from_method_handle(_masm, Z_method, temp2, Z_R0, for_compiler_entry);
 
--- a/src/hotspot/cpu/s390/sharedRuntime_s390.cpp	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/hotspot/cpu/s390/sharedRuntime_s390.cpp	Tue Jan 30 16:41:40 2018 +0100
@@ -2660,9 +2660,9 @@
   Label skip_fixup;
   {
     Label ic_miss;
-    const int klass_offset         = oopDesc::klass_offset_in_bytes();
-    const int holder_klass_offset  = CompiledICHolder::holder_klass_offset();
-    const int holder_method_offset = CompiledICHolder::holder_method_offset();
+    const int klass_offset           = oopDesc::klass_offset_in_bytes();
+    const int holder_klass_offset    = CompiledICHolder::holder_klass_offset();
+    const int holder_metadata_offset = CompiledICHolder::holder_metadata_offset();
 
     // Out-of-line call to ic_miss handler.
     __ call_ic_miss_handler(ic_miss, 0x11, 0, Z_R1_scratch);
@@ -2691,7 +2691,7 @@
     // This def MUST MATCH code in gen_c2i_adapter!
     const Register code = Z_R11;
 
-    __ z_lg(Z_method, holder_method_offset, Z_method);
+    __ z_lg(Z_method, holder_metadata_offset, Z_method);
     __ load_and_test_long(Z_R0, method_(code));
     __ z_brne(ic_miss);  // Cache miss: call runtime to handle this.
 
--- a/src/hotspot/cpu/s390/templateTable_s390.cpp	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/hotspot/cpu/s390/templateTable_s390.cpp	Tue Jan 30 16:41:40 2018 +0100
@@ -3557,66 +3557,67 @@
   transition(vtos, vtos);
 
   assert(byte_no == f1_byte, "use this argument");
-  Register interface = Z_tos;
-  Register index = Z_ARG3;
-  Register receiver = Z_tmp_1;
-  Register flags = Z_ARG5;
+  Register klass     = Z_ARG2,
+           method    = Z_ARG3,
+           interface = Z_ARG4,
+           flags     = Z_ARG5,
+           receiver  = Z_tmp_1;
 
   BLOCK_COMMENT("invokeinterface {");
 
-  // Destroys Z_ARG1 and Z_ARG2, thus use Z_ARG4 and copy afterwards.
-  prepare_invoke(byte_no, Z_ARG4, index,  // Get f1 klassOop, f2 itable index.
+  prepare_invoke(byte_no, interface, method,  // Get f1 klassOop, f2 itable index.
                  receiver, flags);
 
   // Z_R14 (== Z_bytecode) : return entry
 
-  __ z_lgr(interface, Z_ARG4);
-
   // Special case of invokeinterface called for virtual method of
   // java.lang.Object. See cpCacheOop.cpp for details.
   // This code isn't produced by javac, but could be produced by
   // another compliant java compiler.
-  Label notMethod;
+  NearLabel notMethod, no_such_interface, no_such_method;
   __ testbit(flags, ConstantPoolCacheEntry::is_forced_virtual_shift);
   __ z_brz(notMethod);
-  invokevirtual_helper(index, receiver, flags);
+  invokevirtual_helper(method, receiver, flags);
   __ bind(notMethod);
 
   // Get receiver klass into klass - also a null check.
-  Register klass = flags;
-
   __ restore_locals();
   __ load_klass(klass, receiver);
 
+  __ lookup_interface_method(klass, interface, noreg, noreg, /*temp*/Z_ARG1,
+                             no_such_interface, /*return_method=*/false);
+
   // Profile this call.
-  __ profile_virtual_call(klass, Z_ARG2/*mdp*/, Z_ARG4/*scratch*/);
-
-  NearLabel  no_such_interface, no_such_method;
-  Register   method = Z_tmp_2;
-
-  // TK 2010-08-24: save the index to Z_ARG4. needed in case of an error
-  //                in throw_AbstractMethodErrorByTemplateTable
-  __ z_lgr(Z_ARG4, index);
-  // TK 2011-03-24: copy also klass because it could be changed in
-  //                lookup_interface_method
-  __ z_lgr(Z_ARG2, klass);
-  __ lookup_interface_method(// inputs: rec. class, interface, itable index
-                              klass, interface, index,
-                              // outputs: method, scan temp. reg
-                              method, Z_tmp_2, Z_R1_scratch,
-                              no_such_interface);
+  __ profile_virtual_call(klass, Z_ARG1/*mdp*/, flags/*scratch*/);
+
+  // Find entry point to call.
+
+  // Get declaring interface class from method
+  __ z_lg(interface, Address(method, Method::const_offset()));
+  __ z_lg(interface, Address(interface, ConstMethod::constants_offset()));
+  __ z_lg(interface, Address(interface, ConstantPool::pool_holder_offset_in_bytes()));
+
+  // Get itable index from method
+  Register index   = receiver,
+           method2 = flags;
+  __ z_lgf(index, Address(method, Method::itable_index_offset()));
+  __ z_aghi(index, -Method::itable_index_max);
+  __ z_lcgr(index, index);
+
+  __ lookup_interface_method(klass, interface, index, method2, Z_tmp_2,
+                             no_such_interface);
 
   // Check for abstract method error.
   // Note: This should be done more efficiently via a throw_abstract_method_error
   // interpreter entry point and a conditional jump to it in case of a null
   // method.
-  __ compareU64_and_branch(method, (intptr_t) 0,
+  __ compareU64_and_branch(method2, (intptr_t) 0,
                             Assembler::bcondZero, no_such_method);
 
-  __ profile_arguments_type(Z_ARG3, method, Z_ARG5, true);
+  __ profile_arguments_type(Z_tmp_1, method2, Z_tmp_2, true);
 
   // Do the call.
-  __ jump_from_interpreted(method, Z_ARG5);
+  __ jump_from_interpreted(method2, Z_tmp_2);
   __ should_not_reach_here();
 
   // exception handling code follows...
@@ -3628,12 +3629,8 @@
   // Throw exception.
   __ restore_bcp();      // Bcp must be correct for exception handler   (was destroyed).
   __ restore_locals();   // Make sure locals pointer is correct as well (was destroyed).
-  // TK 2010-08-24: Call throw_AbstractMethodErrorByTemplateTable now with the
-  //                relevant information for generating a better error message
   __ call_VM(noreg,
-              CAST_FROM_FN_PTR(address,
-                               InterpreterRuntime::throw_AbstractMethodError),
-              Z_ARG2, interface, Z_ARG4);
+             CAST_FROM_FN_PTR(address, InterpreterRuntime::throw_AbstractMethodError));
   // The call_VM checks for exception, so we should never return here.
   __ should_not_reach_here();
 
@@ -3642,12 +3639,8 @@
   // Throw exception.
   __ restore_bcp();      // Bcp must be correct for exception handler   (was destroyed).
   __ restore_locals();   // Make sure locals pointer is correct as well (was destroyed).
-  // TK 2010-08-24: Call throw_IncompatibleClassChangeErrorByTemplateTable now with the
-  //                relevant information for generating a better error message
   __ call_VM(noreg,
-             CAST_FROM_FN_PTR(address,
-                              InterpreterRuntime::throw_IncompatibleClassChangeError),
-             Z_ARG2, interface);
+             CAST_FROM_FN_PTR(address, InterpreterRuntime::throw_IncompatibleClassChangeError));
   // The call_VM checks for exception, so we should never return here.
   __ should_not_reach_here();
 
--- a/src/hotspot/cpu/s390/vtableStubs_s390.cpp	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/hotspot/cpu/s390/vtableStubs_s390.cpp	Tue Jan 30 16:41:40 2018 +0100
@@ -1,6 +1,6 @@
 /*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
- * Copyright (c) 2016 SAP SE. All rights reserved.
+ * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2017 SAP SE. All rights reserved.
  * 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 "code/vtableStubs.hpp"
 #include "interp_masm_s390.hpp"
 #include "memory/resourceArea.hpp"
+#include "oops/compiledICHolder.hpp"
 #include "oops/instanceKlass.hpp"
 #include "oops/klassVtable.hpp"
 #include "runtime/sharedRuntime.hpp"
@@ -57,7 +58,6 @@
   ResourceMark    rm;
   CodeBuffer      cb(s->entry_point(), code_length);
   MacroAssembler *masm = new MacroAssembler(&cb);
-  address start_pc;
   int     padding_bytes = 0;
 
 #if (!defined(PRODUCT) && defined(COMPILER2))
@@ -144,9 +144,9 @@
   return s;
 }
 
-VtableStub* VtableStubs::create_itable_stub(int vtable_index) {
+VtableStub* VtableStubs::create_itable_stub(int itable_index) {
   const int   code_length = VtableStub::pd_code_size_limit(false);
-  VtableStub *s = new(code_length) VtableStub(false, vtable_index);
+  VtableStub *s = new(code_length) VtableStub(false, itable_index);
   if (s == NULL) { // Indicates OOM in the code cache.
     return NULL;
   }
@@ -154,7 +154,6 @@
   ResourceMark    rm;
   CodeBuffer      cb(s->entry_point(), code_length);
   MacroAssembler *masm = new MacroAssembler(&cb);
-  address start_pc;
   int     padding_bytes = 0;
 
 #if (!defined(PRODUCT) && defined(COMPILER2))
@@ -174,11 +173,9 @@
   // Entry arguments:
   //  Z_method: Interface
   //  Z_ARG1:   Receiver
-  const Register rcvr_klass = Z_tmp_1;    // Used to compute itable_entry_addr.
-                                          // Use extra reg to avoid re-load.
-  const Register vtable_len = Z_tmp_2;    // Used to compute itable_entry_addr.
-  const Register itable_entry_addr = Z_R1_scratch;
-  const Register itable_interface  = Z_R0_scratch;
+  NearLabel no_such_interface;
+  const Register rcvr_klass = Z_tmp_1,
+                 interface  = Z_tmp_2;
 
   // Get receiver klass.
   // Must do an explicit check if implicit checks are disabled.
@@ -186,50 +183,15 @@
   __ null_check(Z_ARG1, Z_R1_scratch, oopDesc::klass_offset_in_bytes());
   __ load_klass(rcvr_klass, Z_ARG1);
 
-  // Load start of itable entries into itable_entry.
-  __ z_llgf(vtable_len, Address(rcvr_klass, Klass::vtable_length_offset()));
-  __ z_sllg(vtable_len, vtable_len, exact_log2(vtableEntry::size_in_bytes()));
-
-  // Loop over all itable entries until desired interfaceOop(Rinterface) found.
-  const int vtable_base_offset = in_bytes(Klass::vtable_start_offset());
-  // Count unused bytes.
-  start_pc = __ pc();
-  __ add2reg_with_index(itable_entry_addr, vtable_base_offset + itableOffsetEntry::interface_offset_in_bytes(), rcvr_klass, vtable_len);
-  padding_bytes += 20 - (__ pc() - start_pc);
-
-  const int itable_offset_search_inc = itableOffsetEntry::size() * wordSize;
-  Label search;
-  __ bind(search);
+  // Receiver subtype check against REFC.
+  __ z_lg(interface, Address(Z_method, CompiledICHolder::holder_klass_offset()));
+  __ lookup_interface_method(rcvr_klass, interface, noreg,
+                             noreg, Z_R1, no_such_interface, /*return_method=*/ false);
 
-  // Handle IncompatibleClassChangeError in itable stubs.
-  // If the entry is NULL then we've reached the end of the table
-  // without finding the expected interface, so throw an exception.
-  NearLabel   throw_icce;
-  __ load_and_test_long(itable_interface, Address(itable_entry_addr));
-  __ z_bre(throw_icce); // Throw the exception out-of-line.
-  // Count unused bytes.
-  start_pc = __ pc();
-  __ add2reg(itable_entry_addr, itable_offset_search_inc);
-  padding_bytes += 20 - (__ pc() - start_pc);
-  __ z_cgr(itable_interface, Z_method);
-  __ z_brne(search);
-
-  // Entry found. Itable_entry_addr points to the subsequent entry (itable_offset_search_inc too far).
-  // Get offset of vtable for interface.
-
-  const Register vtable_offset = Z_R1_scratch;
-  const Register itable_method = rcvr_klass;   // Calculated before.
-
-  const int vtable_offset_offset = (itableOffsetEntry::offset_offset_in_bytes() -
-                                    itableOffsetEntry::interface_offset_in_bytes()) -
-                                   itable_offset_search_inc;
-  __ z_llgf(vtable_offset, vtable_offset_offset, itable_entry_addr);
-
-  // Compute itableMethodEntry and get method and entry point for compiler.
-  const int method_offset = (itableMethodEntry::size() * wordSize * vtable_index) +
-                            itableMethodEntry::method_offset_in_bytes();
-
-  __ z_lg(Z_method, method_offset, vtable_offset, itable_method);
+  // Get Method* and entrypoint for compiler
+  __ z_lg(interface, Address(Z_method, CompiledICHolder::holder_metadata_offset()));
+  __ lookup_interface_method(rcvr_klass, interface, itable_index,
+                             Z_method, Z_R1, no_such_interface, /*return_method=*/ true);
 
 #ifndef PRODUCT
   if (DebugVtables) {
@@ -244,13 +206,13 @@
   address ame_addr = __ pc();
   // Must do an explicit check if implicit checks are disabled.
   if (!ImplicitNullChecks) {
-    __ compare64_and_branch(Z_method, (intptr_t) 0, Assembler::bcondEqual, throw_icce);
+    __ compare64_and_branch(Z_method, (intptr_t) 0, Assembler::bcondEqual, no_such_interface);
   }
   __ z_lg(Z_R1_scratch, in_bytes(Method::from_compiled_offset()), Z_method);
   __ z_br(Z_R1_scratch);
 
   // Handle IncompatibleClassChangeError in itable stubs.
-  __ bind(throw_icce);
+  __ bind(no_such_interface);
   // Count unused bytes
   //                  worst case          actual size
   // We force resolving of the call site by jumping to
@@ -273,13 +235,12 @@
   if (CountCompiledCalls) {
     size += 6 * 4;
   }
-  if (is_vtable_stub) {
-    size += 52;
-  } else {
-    size += 104;
+  size += is_vtable_stub ? 36 : 140;
+  if (UseCompressedClassPointers) {
+    size += MacroAssembler::instr_size_for_decode_klass_not_null();
   }
-  if (Universe::narrow_klass_base() != NULL) {
-    size += 16; // A guess.
+  if (!ImplicitNullChecks) {
+    size += 36;
   }
   return size;
 }
--- a/src/hotspot/cpu/sparc/macroAssembler_sparc.cpp	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/hotspot/cpu/sparc/macroAssembler_sparc.cpp	Tue Jan 30 16:41:40 2018 +0100
@@ -2058,9 +2058,10 @@
                                              Register method_result,
                                              Register scan_temp,
                                              Register sethi_temp,
-                                             Label& L_no_such_interface) {
+                                             Label& L_no_such_interface,
+                                             bool return_method) {
   assert_different_registers(recv_klass, intf_klass, method_result, scan_temp);
-  assert(itable_index.is_constant() || itable_index.as_register() == method_result,
+  assert(!return_method || itable_index.is_constant() || itable_index.as_register() == method_result,
          "caller must use same register for non-constant itable index as for method");
 
   Label L_no_such_interface_restore;
@@ -2092,11 +2093,13 @@
   add(scan_temp, itb_offset, scan_temp);
   add(recv_klass, scan_temp, scan_temp);
 
-  // Adjust recv_klass by scaled itable_index, so we can free itable_index.
-  RegisterOrConstant itable_offset = itable_index;
-  itable_offset = regcon_sll_ptr(itable_index, exact_log2(itableMethodEntry::size() * wordSize), itable_offset);
-  itable_offset = regcon_inc_ptr(itable_offset, itableMethodEntry::method_offset_in_bytes(), itable_offset);
-  add(recv_klass, ensure_simm13_or_reg(itable_offset, sethi_temp), recv_klass);
+  if (return_method) {
+    // Adjust recv_klass by scaled itable_index, so we can free itable_index.
+    RegisterOrConstant itable_offset = itable_index;
+    itable_offset = regcon_sll_ptr(itable_index, exact_log2(itableMethodEntry::size() * wordSize), itable_offset);
+    itable_offset = regcon_inc_ptr(itable_offset, itableMethodEntry::method_offset_in_bytes(), itable_offset);
+    add(recv_klass, ensure_simm13_or_reg(itable_offset, sethi_temp), recv_klass);
+  }
 
   // for (scan = klass->itable(); scan->interface() != NULL; scan += scan_step) {
   //   if (scan->interface() == intf) {
@@ -2131,12 +2134,14 @@
 
   bind(L_found_method);
 
-  // Got a hit.
-  int ito_offset = itableOffsetEntry::offset_offset_in_bytes();
-  // scan_temp[-scan_step] points to the vtable offset we need
-  ito_offset -= scan_step;
-  lduw(scan_temp, ito_offset, scan_temp);
-  ld_ptr(recv_klass, scan_temp, method_result);
+  if (return_method) {
+    // Got a hit.
+    int ito_offset = itableOffsetEntry::offset_offset_in_bytes();
+    // scan_temp[-scan_step] points to the vtable offset we need
+    ito_offset -= scan_step;
+    lduw(scan_temp, ito_offset, scan_temp);
+    ld_ptr(recv_klass, scan_temp, method_result);
+  }
 
   if (did_save) {
     Label L_done;
--- a/src/hotspot/cpu/sparc/macroAssembler_sparc.hpp	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/hotspot/cpu/sparc/macroAssembler_sparc.hpp	Tue Jan 30 16:41:40 2018 +0100
@@ -1277,7 +1277,8 @@
                                RegisterOrConstant itable_index,
                                Register method_result,
                                Register temp_reg, Register temp2_reg,
-                               Label& no_such_interface);
+                               Label& no_such_interface,
+                               bool return_method = true);
 
   // virtual method calling
   void lookup_virtual_method(Register recv_klass,
--- a/src/hotspot/cpu/sparc/sharedRuntime_sparc.cpp	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/hotspot/cpu/sparc/sharedRuntime_sparc.cpp	Tue Jan 30 16:41:40 2018 +0100
@@ -904,7 +904,7 @@
 
     Label ok, ok2;
     __ brx(Assembler::equal, false, Assembler::pt, ok);
-    __ delayed()->ld_ptr(G5_method, CompiledICHolder::holder_method_offset(), G5_method);
+    __ delayed()->ld_ptr(G5_method, CompiledICHolder::holder_metadata_offset(), G5_method);
     __ jump_to(ic_miss, G3_scratch);
     __ delayed()->nop();
 
--- a/src/hotspot/cpu/sparc/templateTable_sparc.cpp	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/hotspot/cpu/sparc/templateTable_sparc.cpp	Tue Jan 30 16:41:40 2018 +0100
@@ -3081,15 +3081,15 @@
   assert(byte_no == f1_byte, "use this argument");
 
   const Register Rinterface  = G1_scratch;
+  const Register Rmethod     = Lscratch;
   const Register Rret        = G3_scratch;
-  const Register Rindex      = Lscratch;
   const Register O0_recv     = O0;
   const Register O1_flags    = O1;
   const Register O2_Klass    = O2;
   const Register Rscratch    = G4_scratch;
   assert_different_registers(Rscratch, G5_method);
 
-  prepare_invoke(byte_no, Rinterface, Rret, Rindex, O0_recv, O1_flags);
+  prepare_invoke(byte_no, Rinterface, Rret, Rmethod, O0_recv, O1_flags);
 
   // get receiver klass
   __ null_check(O0_recv, oopDesc::klass_offset_in_bytes());
@@ -3109,55 +3109,40 @@
 
   __ bind(notMethod);
 
+  Register Rtemp = O1_flags;
+
+  Label L_no_such_interface;
+
+  // Receiver subtype check against REFC.
+  __ lookup_interface_method(// inputs: rec. class, interface, itable index
+                             O2_Klass, Rinterface, noreg,
+                             // outputs: temp reg1, temp reg2, temp reg3
+                             G5_method, Rscratch, Rtemp,
+                             L_no_such_interface,
+                             /*return_method=*/false);
+
   __ profile_virtual_call(O2_Klass, O4);
 
   //
   // find entry point to call
   //
 
-  // compute start of first itableOffsetEntry (which is at end of vtable)
-  const int base = in_bytes(Klass::vtable_start_offset());
-  Label search;
-  Register Rtemp = O1_flags;
-
-  __ ld(O2_Klass, in_bytes(Klass::vtable_length_offset()), Rtemp);
-  __ sll(Rtemp, LogBytesPerWord, Rtemp);   // Rscratch *= 4;
-  if (Assembler::is_simm13(base)) {
-    __ add(Rtemp, base, Rtemp);
-  } else {
-    __ set(base, Rscratch);
-    __ add(Rscratch, Rtemp, Rtemp);
-  }
-  __ add(O2_Klass, Rtemp, Rscratch);
-
-  __ bind(search);
-
-  __ ld_ptr(Rscratch, itableOffsetEntry::interface_offset_in_bytes(), Rtemp);
-  {
-    Label ok;
-
-    // Check that entry is non-null.  Null entries are probably a bytecode
-    // problem.  If the interface isn't implemented by the receiver class,
-    // the VM should throw IncompatibleClassChangeError.  linkResolver checks
-    // this too but that's only if the entry isn't already resolved, so we
-    // need to check again.
-    __ br_notnull_short( Rtemp, Assembler::pt, ok);
-    call_VM(noreg, CAST_FROM_FN_PTR(address, InterpreterRuntime::throw_IncompatibleClassChangeError));
-    __ should_not_reach_here();
-    __ bind(ok);
-  }
-
-  __ cmp(Rinterface, Rtemp);
-  __ brx(Assembler::notEqual, true, Assembler::pn, search);
-  __ delayed()->add(Rscratch, itableOffsetEntry::size() * wordSize, Rscratch);
-
-  // entry found and Rscratch points to it
-  __ ld(Rscratch, itableOffsetEntry::offset_offset_in_bytes(), Rscratch);
-
-  assert(itableMethodEntry::method_offset_in_bytes() == 0, "adjust instruction below");
-  __ sll(Rindex, exact_log2(itableMethodEntry::size() * wordSize), Rindex);       // Rindex *= 8;
-  __ add(Rscratch, Rindex, Rscratch);
-  __ ld_ptr(O2_Klass, Rscratch, G5_method);
+  // Get declaring interface class from method
+  __ ld_ptr(Rmethod, Method::const_offset(), Rinterface);
+  __ ld_ptr(Rinterface, ConstMethod::constants_offset(), Rinterface);
+  __ ld_ptr(Rinterface, ConstantPool::pool_holder_offset_in_bytes(), Rinterface);
+
+  // Get itable index from method
+  const Register Rindex = G5_method;
+  __ ld(Rmethod, Method::itable_index_offset(), Rindex);
+  __ sub(Rindex, Method::itable_index_max, Rindex);
+  __ neg(Rindex);
+
+  __ lookup_interface_method(// inputs: rec. class, interface, itable index
+                             O2_Klass, Rinterface, Rindex,
+                             // outputs: method, scan temp reg, temp reg
+                             G5_method, Rscratch, Rtemp,
+                             L_no_such_interface);
 
   // Check for abstract method error.
   {
@@ -3174,6 +3159,10 @@
   __ profile_arguments_type(G5_method, Rcall, Gargs, true);
   __ profile_called_method(G5_method, Rscratch);
   __ call_from_interpreter(Rcall, Gargs, Rret);
+
+  __ bind(L_no_such_interface);
+  call_VM(noreg, CAST_FROM_FN_PTR(address, InterpreterRuntime::throw_IncompatibleClassChangeError));
+  __ should_not_reach_here();
 }
 
 void TemplateTable::invokehandle(int byte_no) {
--- a/src/hotspot/cpu/sparc/vtableStubs_sparc.cpp	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/hotspot/cpu/sparc/vtableStubs_sparc.cpp	Tue Jan 30 16:41:40 2018 +0100
@@ -27,6 +27,7 @@
 #include "code/vtableStubs.hpp"
 #include "interp_masm_sparc.hpp"
 #include "memory/resourceArea.hpp"
+#include "oops/compiledICHolder.hpp"
 #include "oops/instanceKlass.hpp"
 #include "oops/klassVtable.hpp"
 #include "runtime/sharedRuntime.hpp"
@@ -140,7 +141,8 @@
   MacroAssembler* masm = new MacroAssembler(&cb);
 
   Register G3_Klass = G3_scratch;
-  Register G5_interface = G5;  // Passed in as an argument
+  Register G5_icholder = G5;  // Passed in as an argument
+  Register G4_interface = G4_scratch;
   Label search;
 
   // Entry arguments:
@@ -164,14 +166,26 @@
   }
 #endif /* PRODUCT */
 
-  Label throw_icce;
+  Label L_no_such_interface;
 
   Register L5_method = L5;
+
+  // Receiver subtype check against REFC.
+  __ ld_ptr(G5_icholder, CompiledICHolder::holder_klass_offset(), G4_interface);
   __ lookup_interface_method(// inputs: rec. class, interface, itable index
-                             G3_Klass, G5_interface, itable_index,
+                             G3_Klass, G4_interface, itable_index,
+                             // outputs: scan temp. reg1, scan temp. reg2
+                             L5_method, L2, L3,
+                             L_no_such_interface,
+                             /*return_method=*/ false);
+
+  // Get Method* and entrypoint for compiler
+  __ ld_ptr(G5_icholder, CompiledICHolder::holder_metadata_offset(), G4_interface);
+  __ lookup_interface_method(// inputs: rec. class, interface, itable index
+                             G3_Klass, G4_interface, itable_index,
                              // outputs: method, scan temp. reg
                              L5_method, L2, L3,
-                             throw_icce);
+                             L_no_such_interface);
 
 #ifndef PRODUCT
   if (DebugVtables) {
@@ -197,7 +211,7 @@
   __ JMP(G3_scratch, 0);
   __ delayed()->nop();
 
-  __ bind(throw_icce);
+  __ bind(L_no_such_interface);
   AddressLiteral icce(StubRoutines::throw_IncompatibleClassChangeError_entry());
   __ jump_to(icce, G3_scratch);
   __ delayed()->restore();
@@ -232,7 +246,7 @@
                           MacroAssembler::instr_size_for_decode_klass_not_null() : 0);
       return basic + slop;
     } else {
-      const int basic = 34 * BytesPerInstWord +
+      const int basic = 54 * BytesPerInstWord +
                         // shift;add for load_klass (only shift with zero heap based)
                         (UseCompressedClassPointers ?
                           MacroAssembler::instr_size_for_decode_klass_not_null() : 0);
--- a/src/hotspot/cpu/x86/macroAssembler_x86.cpp	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/hotspot/cpu/x86/macroAssembler_x86.cpp	Tue Jan 30 16:41:40 2018 +0100
@@ -5809,8 +5809,13 @@
                                              RegisterOrConstant itable_index,
                                              Register method_result,
                                              Register scan_temp,
-                                             Label& L_no_such_interface) {
-  assert_different_registers(recv_klass, intf_klass, method_result, scan_temp);
+                                             Label& L_no_such_interface,
+                                             bool return_method) {
+  assert_different_registers(recv_klass, intf_klass, scan_temp);
+  assert_different_registers(method_result, intf_klass, scan_temp);
+  assert(recv_klass != method_result || !return_method,
+         "recv_klass can be destroyed when method isn't needed");
+
   assert(itable_index.is_constant() || itable_index.as_register() == method_result,
          "caller must use same register for non-constant itable index as for method");
 
@@ -5827,9 +5832,11 @@
   // %%% Could store the aligned, prescaled offset in the klassoop.
   lea(scan_temp, Address(recv_klass, scan_temp, times_vte_scale, vtable_base));
 
-  // Adjust recv_klass by scaled itable_index, so we can free itable_index.
-  assert(itableMethodEntry::size() * wordSize == wordSize, "adjust the scaling in the code below");
-  lea(recv_klass, Address(recv_klass, itable_index, Address::times_ptr, itentry_off));
+  if (return_method) {
+    // Adjust recv_klass by scaled itable_index, so we can free itable_index.
+    assert(itableMethodEntry::size() * wordSize == wordSize, "adjust the scaling in the code below");
+    lea(recv_klass, Address(recv_klass, itable_index, Address::times_ptr, itentry_off));
+  }
 
   // for (scan = klass->itable(); scan->interface() != NULL; scan += scan_step) {
   //   if (scan->interface() == intf) {
@@ -5863,9 +5870,11 @@
 
   bind(found_method);
 
-  // Got a hit.
-  movl(scan_temp, Address(scan_temp, itableOffsetEntry::offset_offset_in_bytes()));
-  movptr(method_result, Address(recv_klass, scan_temp, Address::times_1));
+  if (return_method) {
+    // Got a hit.
+    movl(scan_temp, Address(scan_temp, itableOffsetEntry::offset_offset_in_bytes()));
+    movptr(method_result, Address(recv_klass, scan_temp, Address::times_1));
+  }
 }
 
 
--- a/src/hotspot/cpu/x86/macroAssembler_x86.hpp	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/hotspot/cpu/x86/macroAssembler_x86.hpp	Tue Jan 30 16:41:40 2018 +0100
@@ -544,7 +544,8 @@
                                RegisterOrConstant itable_index,
                                Register method_result,
                                Register scan_temp,
-                               Label& no_such_interface);
+                               Label& no_such_interface,
+                               bool return_method = true);
 
   // virtual method calling
   void lookup_virtual_method(Register recv_klass,
--- a/src/hotspot/cpu/x86/sharedRuntime_x86_32.cpp	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/hotspot/cpu/x86/sharedRuntime_x86_32.cpp	Tue Jan 30 16:41:40 2018 +0100
@@ -957,7 +957,7 @@
     Label missed;
     __ movptr(temp, Address(receiver, oopDesc::klass_offset_in_bytes()));
     __ cmpptr(temp, Address(holder, CompiledICHolder::holder_klass_offset()));
-    __ movptr(rbx, Address(holder, CompiledICHolder::holder_method_offset()));
+    __ movptr(rbx, Address(holder, CompiledICHolder::holder_metadata_offset()));
     __ jcc(Assembler::notEqual, missed);
     // Method might have been compiled since the call site was patched to
     // interpreted if that is the case treat it as a miss so we can get
--- a/src/hotspot/cpu/x86/sharedRuntime_x86_64.cpp	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/hotspot/cpu/x86/sharedRuntime_x86_64.cpp	Tue Jan 30 16:41:40 2018 +0100
@@ -949,7 +949,7 @@
   {
     __ load_klass(temp, receiver);
     __ cmpptr(temp, Address(holder, CompiledICHolder::holder_klass_offset()));
-    __ movptr(rbx, Address(holder, CompiledICHolder::holder_method_offset()));
+    __ movptr(rbx, Address(holder, CompiledICHolder::holder_metadata_offset()));
     __ jcc(Assembler::equal, ok);
     __ jump(RuntimeAddress(SharedRuntime::get_ic_miss_stub()));
 
--- a/src/hotspot/cpu/x86/templateTable_x86.cpp	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/hotspot/cpu/x86/templateTable_x86.cpp	Tue Jan 30 16:41:40 2018 +0100
@@ -3712,11 +3712,11 @@
 void TemplateTable::invokeinterface(int byte_no) {
   transition(vtos, vtos);
   assert(byte_no == f1_byte, "use this argument");
-  prepare_invoke(byte_no, rax, rbx,  // get f1 Klass*, f2 itable index
+  prepare_invoke(byte_no, rax, rbx,  // get f1 Klass*, f2 Method*
                  rcx, rdx); // recv, flags
 
-  // rax: interface klass (from f1)
-  // rbx: itable index (from f2)
+  // rax: reference klass (from f1)
+  // rbx: method (from f2)
   // rcx: receiver
   // rdx: flags
 
@@ -3738,10 +3738,28 @@
   __ null_check(rcx, oopDesc::klass_offset_in_bytes());
   __ load_klass(rdx, rcx);
 
+  Label no_such_interface, no_such_method;
+
+  // Receiver subtype check against REFC.
+  // Superklass in rax. Subklass in rdx. Blows rcx, rdi.
+  __ lookup_interface_method(// inputs: rec. class, interface, itable index
+                             rdx, rax, noreg,
+                             // outputs: scan temp. reg, scan temp. reg
+                             rbcp, rlocals,
+                             no_such_interface,
+                             /*return_method=*/false);
+
   // profile this call
+  __ restore_bcp(); // rbcp was destroyed by receiver type check
   __ profile_virtual_call(rdx, rbcp, rlocals);
 
-  Label no_such_interface, no_such_method;
+  // Get declaring interface class from method, and itable index
+  __ movptr(rax, Address(rbx, Method::const_offset()));
+  __ movptr(rax, Address(rax, ConstMethod::constants_offset()));
+  __ movptr(rax, Address(rax, ConstantPool::pool_holder_offset_in_bytes()));
+  __ movl(rbx, Address(rbx, Method::itable_index_offset()));
+  __ subl(rbx, Method::itable_index_max);
+  __ negl(rbx);
 
   __ lookup_interface_method(// inputs: rec. class, interface, itable index
                              rdx, rax, rbx,
--- a/src/hotspot/cpu/x86/vtableStubs_x86_32.cpp	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/hotspot/cpu/x86/vtableStubs_x86_32.cpp	Tue Jan 30 16:41:40 2018 +0100
@@ -27,6 +27,7 @@
 #include "code/vtableStubs.hpp"
 #include "interp_masm_x86.hpp"
 #include "memory/resourceArea.hpp"
+#include "oops/compiledICHolder.hpp"
 #include "oops/instanceKlass.hpp"
 #include "oops/klassVtable.hpp"
 #include "runtime/sharedRuntime.hpp"
@@ -147,7 +148,7 @@
   MacroAssembler* masm = new MacroAssembler(&cb);
 
   // Entry arguments:
-  //  rax,: Interface
+  //  rax: CompiledICHolder
   //  rcx: Receiver
 
 #ifndef PRODUCT
@@ -155,25 +156,42 @@
     __ incrementl(ExternalAddress((address) SharedRuntime::nof_megamorphic_calls_addr()));
   }
 #endif /* PRODUCT */
-  // get receiver (need to skip return address on top of stack)
-
-  assert(VtableStub::receiver_location() == rcx->as_VMReg(), "receiver expected in rcx");
-
-  // get receiver klass (also an implicit null-check)
-  address npe_addr = __ pc();
-  __ movptr(rsi, Address(rcx, oopDesc::klass_offset_in_bytes()));
 
   // Most registers are in use; we'll use rax, rbx, rsi, rdi
   // (If we need to make rsi, rdi callee-save, do a push/pop here.)
+  const Register recv_klass_reg     = rsi;
+  const Register holder_klass_reg   = rax; // declaring interface klass (DECC)
+  const Register resolved_klass_reg = rbx; // resolved interface klass (REFC)
+  const Register temp_reg           = rdi;
+
+  const Register icholder_reg = rax;
+  __ movptr(resolved_klass_reg, Address(icholder_reg, CompiledICHolder::holder_klass_offset()));
+  __ movptr(holder_klass_reg,   Address(icholder_reg, CompiledICHolder::holder_metadata_offset()));
+
+  Label L_no_such_interface;
+
+  // get receiver klass (also an implicit null-check)
+  address npe_addr = __ pc();
+  assert(VtableStub::receiver_location() ==  rcx->as_VMReg(), "receiver expected in  rcx");
+  __ load_klass(recv_klass_reg, rcx);
+
+  // Receiver subtype check against REFC.
+  // Destroys recv_klass_reg value.
+  __ lookup_interface_method(// inputs: rec. class, interface
+                             recv_klass_reg, resolved_klass_reg, noreg,
+                             // outputs:  scan temp. reg1, scan temp. reg2
+                             recv_klass_reg, temp_reg,
+                             L_no_such_interface,
+                             /*return_method=*/false);
+
+  // Get selected method from declaring class and itable index
   const Register method = rbx;
-  Label throw_icce;
-
-  // Get Method* and entrypoint for compiler
+  __ load_klass(recv_klass_reg, rcx); // restore recv_klass_reg
   __ lookup_interface_method(// inputs: rec. class, interface, itable index
-                             rsi, rax, itable_index,
+                             recv_klass_reg, holder_klass_reg, itable_index,
                              // outputs: method, scan temp. reg
-                             method, rdi,
-                             throw_icce);
+                             method, temp_reg,
+                             L_no_such_interface);
 
   // method (rbx): Method*
   // rcx: receiver
@@ -193,9 +211,10 @@
   address ame_addr = __ pc();
   __ jmp(Address(method, Method::from_compiled_offset()));
 
-  __ bind(throw_icce);
+  __ bind(L_no_such_interface);
   __ jump(RuntimeAddress(StubRoutines::throw_IncompatibleClassChangeError_entry()));
-  masm->flush();
+
+  __ flush();
 
   if (PrintMiscellaneous && (WizardMode || Verbose)) {
     tty->print_cr("itable #%d at " PTR_FORMAT "[%d] left over: %d",
@@ -220,7 +239,7 @@
     return (DebugVtables ? 210 : 16) + (CountCompiledCalls ? 6 : 0);
   } else {
     // Itable stub size
-    return (DebugVtables ? 256 : 66) + (CountCompiledCalls ? 6 : 0);
+    return (DebugVtables ? 256 : 110) + (CountCompiledCalls ? 6 : 0);
   }
   // In order to tune these parameters, run the JVM with VM options
   // +PrintMiscellaneous and +WizardMode to see information about
--- a/src/hotspot/cpu/x86/vtableStubs_x86_64.cpp	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/hotspot/cpu/x86/vtableStubs_x86_64.cpp	Tue Jan 30 16:41:40 2018 +0100
@@ -27,6 +27,7 @@
 #include "code/vtableStubs.hpp"
 #include "interp_masm_x86.hpp"
 #include "memory/resourceArea.hpp"
+#include "oops/compiledICHolder.hpp"
 #include "oops/instanceKlass.hpp"
 #include "oops/klassVtable.hpp"
 #include "runtime/sharedRuntime.hpp"
@@ -147,36 +148,50 @@
 #endif
 
   // Entry arguments:
-  //  rax: Interface
+  //  rax: CompiledICHolder
   //  j_rarg0: Receiver
 
-  // Free registers (non-args) are rax (interface), rbx
-
-  // get receiver (need to skip return address on top of stack)
-
-  assert(VtableStub::receiver_location() == j_rarg0->as_VMReg(), "receiver expected in j_rarg0");
-  // get receiver klass (also an implicit null-check)
-  address npe_addr = __ pc();
-
   // Most registers are in use; we'll use rax, rbx, r10, r11
   // (various calling sequences use r[cd]x, r[sd]i, r[89]; stay away from them)
-  __ load_klass(r10, j_rarg0);
+  const Register recv_klass_reg     = r10;
+  const Register holder_klass_reg   = rax; // declaring interface klass (DECC)
+  const Register resolved_klass_reg = rbx; // resolved interface klass (REFC)
+  const Register temp_reg           = r11;
+
+  Label L_no_such_interface;
+
+  const Register icholder_reg = rax;
+  __ movptr(resolved_klass_reg, Address(icholder_reg, CompiledICHolder::holder_klass_offset()));
+  __ movptr(holder_klass_reg,   Address(icholder_reg, CompiledICHolder::holder_metadata_offset()));
+
+  // get receiver klass (also an implicit null-check)
+  assert(VtableStub::receiver_location() == j_rarg0->as_VMReg(), "receiver expected in j_rarg0");
+  address npe_addr = __ pc();
+  __ load_klass(recv_klass_reg, j_rarg0);
+
+  // Receiver subtype check against REFC.
+  // Destroys recv_klass_reg value.
+  __ lookup_interface_method(// inputs: rec. class, interface
+                             recv_klass_reg, resolved_klass_reg, noreg,
+                             // outputs:  scan temp. reg1, scan temp. reg2
+                             recv_klass_reg, temp_reg,
+                             L_no_such_interface,
+                             /*return_method=*/false);
+
+  // Get selected method from declaring class and itable index
+  const Register method = rbx;
+  __ load_klass(recv_klass_reg, j_rarg0);   // restore recv_klass_reg
+  __ lookup_interface_method(// inputs: rec. class, interface, itable index
+                       recv_klass_reg, holder_klass_reg, itable_index,
+                       // outputs: method, scan temp. reg
+                       method, temp_reg,
+                       L_no_such_interface);
 
   // If we take a trap while this arg is on the stack we will not
   // be able to walk the stack properly. This is not an issue except
   // when there are mistakes in this assembly code that could generate
   // a spurious fault. Ask me how I know...
 
-  const Register method = rbx;
-  Label throw_icce;
-
-  // Get Method* and entrypoint for compiler
-  __ lookup_interface_method(// inputs: rec. class, interface, itable index
-                             r10, rax, itable_index,
-                             // outputs: method, scan temp. reg
-                             method, r11,
-                             throw_icce);
-
   // method (rbx): Method*
   // j_rarg0: receiver
 
@@ -197,7 +212,7 @@
   address ame_addr = __ pc();
   __ jmp(Address(method, Method::from_compiled_offset()));
 
-  __ bind(throw_icce);
+  __ bind(L_no_such_interface);
   __ jump(RuntimeAddress(StubRoutines::throw_IncompatibleClassChangeError_entry()));
 
   __ flush();
@@ -224,8 +239,8 @@
            (UseCompressedClassPointers ?  MacroAssembler::instr_size_for_decode_klass_not_null() : 0);
   } else {
     // Itable stub size
-    return (DebugVtables ? 512 : 74) + (CountCompiledCalls ? 13 : 0) +
-           (UseCompressedClassPointers ?  MacroAssembler::instr_size_for_decode_klass_not_null() : 0);
+    return (DebugVtables ? 512 : 140) + (CountCompiledCalls ? 13 : 0) +
+           (UseCompressedClassPointers ? 2 * MacroAssembler::instr_size_for_decode_klass_not_null() : 0);
   }
   // In order to tune these parameters, run the JVM with VM options
   // +PrintMiscellaneous and +WizardMode to see information about
--- a/src/hotspot/os/aix/safepointMechanism_aix.cpp	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/hotspot/os/aix/safepointMechanism_aix.cpp	Tue Jan 30 16:41:40 2018 +0100
@@ -30,8 +30,18 @@
 #include <sys/mman.h>
 
 void SafepointMechanism::pd_initialize() {
+  // No special code needed if we can use SIGTRAP
+  if (ThreadLocalHandshakes && USE_POLL_BIT_ONLY) {
+    default_initialize();
+    return;
+  }
+
+  // Allocate one protected page
   char* map_address = (char*)MAP_FAILED;
   const size_t page_size = os::vm_page_size();
+  const int prot  = PROT_READ;
+  const int flags = MAP_PRIVATE | MAP_ANONYMOUS;
+
   // Use optimized addresses for the polling page,
   // e.g. map it to a special 32-bit address.
   if (OptimizePollingPageLocation) {
@@ -57,14 +67,14 @@
       // Try to map with current address wish.
       // AIX: AIX needs MAP_FIXED if we provide an address and mmap will
       // fail if the address is already mapped.
-      map_address = (char*) ::mmap(address_wishes[i] - (ssize_t)page_size,
-                                   page_size, PROT_READ,
-                                   MAP_PRIVATE | MAP_ANONYMOUS | MAP_FIXED,
+      map_address = (char*) ::mmap(address_wishes[i],
+                                   page_size, prot,
+                                   flags | MAP_FIXED,
                                    -1, 0);
-      log_debug(os)("SafePoint Polling  Page address: %p (wish) => %p",
-                    address_wishes[i], map_address + (ssize_t)page_size);
+      log_debug(os)("SafePoint Polling Page address: %p (wish) => %p",
+                    address_wishes[i], map_address);
 
-      if (map_address + (ssize_t)page_size == address_wishes[i]) {
+      if (map_address == address_wishes[i]) {
         // Map succeeded and map_address is at wished address, exit loop.
         break;
       }
@@ -78,8 +88,17 @@
     }
   }
   if (map_address == (char*)MAP_FAILED) {
-    map_address = os::reserve_memory(page_size, NULL, page_size);
+    map_address = (char*) ::mmap(NULL, page_size, prot, flags, -1, 0);
   }
   guarantee(map_address != (char*)MAP_FAILED, "SafepointMechanism::pd_initialize: failed to allocate polling page");
+  log_info(os)("SafePoint Polling address: " INTPTR_FORMAT, p2i(map_address));
   os::set_polling_page((address)(map_address));
+
+  // Use same page for ThreadLocalHandshakes without SIGTRAP
+  if (ThreadLocalHandshakes) {
+    set_uses_thread_local_poll();
+    intptr_t bad_page_val = reinterpret_cast<intptr_t>(map_address);
+    _poll_armed_value    = reinterpret_cast<void*>(bad_page_val | poll_bit());
+    _poll_disarmed_value = NULL; // Readable on AIX
+  }
 }
--- a/src/hotspot/os_cpu/aix_ppc/os_aix_ppc.cpp	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/hotspot/os_cpu/aix_ppc/os_aix_ppc.cpp	Tue Jan 30 16:41:40 2018 +0100
@@ -47,6 +47,7 @@
 #include "runtime/javaCalls.hpp"
 #include "runtime/mutexLocker.hpp"
 #include "runtime/osThread.hpp"
+#include "runtime/safepointMechanism.hpp"
 #include "runtime/sharedRuntime.hpp"
 #include "runtime/stubRoutines.hpp"
 #include "runtime/thread.inline.hpp"
@@ -374,9 +375,12 @@
         goto run_stub;
       }
 
-      else if (sig == SIGSEGV && os::is_poll_address(addr)) {
+      else if ((SafepointMechanism::uses_thread_local_poll() && USE_POLL_BIT_ONLY)
+               ? (sig == SIGTRAP && ((NativeInstruction*)pc)->is_safepoint_poll())
+               : (sig == SIGSEGV && os::is_poll_address(addr))) {
         if (TraceTraps) {
-          tty->print_cr("trap: safepoint_poll at " INTPTR_FORMAT " (SIGSEGV)", pc);
+          tty->print_cr("trap: safepoint_poll at " INTPTR_FORMAT " (%s)", p2i(pc),
+                        (SafepointMechanism::uses_thread_local_poll() && USE_POLL_BIT_ONLY) ? "SIGTRAP" : "SIGSEGV");
         }
         stub = SharedRuntime::get_poll_stub(pc);
         goto run_stub;
--- a/src/hotspot/os_cpu/linux_ppc/os_linux_ppc.cpp	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/hotspot/os_cpu/linux_ppc/os_linux_ppc.cpp	Tue Jan 30 16:41:40 2018 +0100
@@ -46,6 +46,7 @@
 #include "runtime/javaCalls.hpp"
 #include "runtime/mutexLocker.hpp"
 #include "runtime/osThread.hpp"
+#include "runtime/safepointMechanism.hpp"
 #include "runtime/sharedRuntime.hpp"
 #include "runtime/stubRoutines.hpp"
 #include "runtime/thread.inline.hpp"
@@ -382,7 +383,7 @@
         stub = SharedRuntime::get_handle_wrong_method_stub();
       }
 
-      else if (sig == SIGSEGV &&
+      else if (sig == ((SafepointMechanism::uses_thread_local_poll() && USE_POLL_BIT_ONLY) ? SIGTRAP : SIGSEGV) &&
                // A linux-ppc64 kernel before 2.6.6 doesn't set si_addr on some segfaults
                // in 64bit mode (cf. http://www.kernel.org/pub/linux/kernel/v2.6/ChangeLog-2.6.6),
                // especially when we try to read from the safepoint polling page. So the check
@@ -393,7 +394,8 @@
                ((cb = CodeCache::find_blob(pc)) != NULL) &&
                cb->is_compiled()) {
         if (TraceTraps) {
-          tty->print_cr("trap: safepoint_poll at " INTPTR_FORMAT " (SIGSEGV)", p2i(pc));
+          tty->print_cr("trap: safepoint_poll at " INTPTR_FORMAT " (%s)", p2i(pc),
+                        (SafepointMechanism::uses_thread_local_poll() && USE_POLL_BIT_ONLY) ? "SIGTRAP" : "SIGSEGV");
         }
         stub = SharedRuntime::get_poll_stub(pc);
       }
--- a/src/hotspot/share/aot/aotCompiledMethod.cpp	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/hotspot/share/aot/aotCompiledMethod.cpp	Tue Jan 30 16:41:40 2018 +0100
@@ -270,7 +270,7 @@
         CompiledIC *ic = CompiledIC_at(&iter);
         if (ic->is_icholder_call()) {
           CompiledICHolder* cichk = ic->cached_icholder();
-          f(cichk->holder_method());
+          f(cichk->holder_metadata());
           f(cichk->holder_klass());
         } else {
           // Get Klass* or NULL (if value is -1) from GOT cell of virtual call PLT stub.
--- a/src/hotspot/share/ci/ciEnv.cpp	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/hotspot/share/ci/ciEnv.cpp	Tue Jan 30 16:41:40 2018 +0100
@@ -1164,28 +1164,30 @@
 
 void ciEnv::dump_compile_data(outputStream* out) {
   CompileTask* task = this->task();
-  Method* method = task->method();
-  int entry_bci = task->osr_bci();
-  int comp_level = task->comp_level();
-  out->print("compile %s %s %s %d %d",
-                method->klass_name()->as_quoted_ascii(),
-                method->name()->as_quoted_ascii(),
-                method->signature()->as_quoted_ascii(),
-                entry_bci, comp_level);
-  if (compiler_data() != NULL) {
-    if (is_c2_compile(comp_level)) {
+  if (task) {
+    Method* method = task->method();
+    int entry_bci = task->osr_bci();
+    int comp_level = task->comp_level();
+    out->print("compile %s %s %s %d %d",
+               method->klass_name()->as_quoted_ascii(),
+               method->name()->as_quoted_ascii(),
+               method->signature()->as_quoted_ascii(),
+               entry_bci, comp_level);
+    if (compiler_data() != NULL) {
+      if (is_c2_compile(comp_level)) {
 #ifdef COMPILER2
-      // Dump C2 inlining data.
-      ((Compile*)compiler_data())->dump_inline_data(out);
+        // Dump C2 inlining data.
+        ((Compile*)compiler_data())->dump_inline_data(out);
 #endif
-    } else if (is_c1_compile(comp_level)) {
+      } else if (is_c1_compile(comp_level)) {
 #ifdef COMPILER1
-      // Dump C1 inlining data.
-      ((Compilation*)compiler_data())->dump_inline_data(out);
+        // Dump C1 inlining data.
+        ((Compilation*)compiler_data())->dump_inline_data(out);
 #endif
+      }
     }
+    out->cr();
   }
-  out->cr();
 }
 
 void ciEnv::dump_replay_data_unsafe(outputStream* out) {
--- a/src/hotspot/share/classfile/classLoaderData.hpp	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/hotspot/share/classfile/classLoaderData.hpp	Tue Jan 30 16:41:40 2018 +0100
@@ -280,11 +280,6 @@
   ClassLoaderData(Handle h_class_loader, bool is_anonymous, Dependencies dependencies);
   ~ClassLoaderData();
 
-  // GC interface.
-  void clear_claimed()          { _claimed = 0; }
-  bool claimed() const          { return _claimed == 1; }
-  bool claim();
-
   // The CLD are not placed in the Heap, so the Card Table or
   // the Mod Union Table can't be used to mark when CLD have modified oops.
   // The CT and MUT bits saves this information for the whole class loader data.
@@ -316,6 +311,10 @@
 
   Dictionary* create_dictionary();
  public:
+  // GC interface.
+  void clear_claimed() { _claimed = 0; }
+  bool claimed() const { return _claimed == 1; }
+  bool claim();
 
   bool is_alive(BoolObjectClosure* is_alive_closure) const;
 
--- a/src/hotspot/share/classfile/systemDictionary.cpp	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/hotspot/share/classfile/systemDictionary.cpp	Tue Jan 30 16:41:40 2018 +0100
@@ -2734,43 +2734,68 @@
   return method_type;
 }
 
+Handle SystemDictionary::find_field_handle_type(Symbol* signature,
+                                                Klass* accessing_klass,
+                                                TRAPS) {
+  Handle empty;
+  ResourceMark rm(THREAD);
+  SignatureStream ss(signature, /*is_method=*/ false);
+  if (!ss.is_done()) {
+    Handle class_loader, protection_domain;
+    if (accessing_klass != NULL) {
+      class_loader      = Handle(THREAD, accessing_klass->class_loader());
+      protection_domain = Handle(THREAD, accessing_klass->protection_domain());
+    }
+    oop mirror = ss.as_java_mirror(class_loader, protection_domain, SignatureStream::NCDFError, CHECK_(empty));
+    ss.next();
+    if (ss.is_done()) {
+      return Handle(THREAD, mirror);
+    }
+  }
+  return empty;
+}
+
 // Ask Java code to find or construct a method handle constant.
 Handle SystemDictionary::link_method_handle_constant(Klass* caller,
                                                      int ref_kind, //e.g., JVM_REF_invokeVirtual
                                                      Klass* callee,
-                                                     Symbol* name_sym,
+                                                     Symbol* name,
                                                      Symbol* signature,
                                                      TRAPS) {
   Handle empty;
-  Handle name = java_lang_String::create_from_symbol(name_sym, CHECK_(empty));
-  Handle type;
-  if (signature->utf8_length() > 0 && signature->byte_at(0) == '(') {
-    type = find_method_handle_type(signature, caller, CHECK_(empty));
-  } else if (caller == NULL) {
-    // This should not happen.  JDK code should take care of that.
+  if (caller == NULL) {
     THROW_MSG_(vmSymbols::java_lang_InternalError(), "bad MH constant", empty);
+  }
+  Handle name_str      = java_lang_String::create_from_symbol(name,      CHECK_(empty));
+  Handle signature_str = java_lang_String::create_from_symbol(signature, CHECK_(empty));
+
+  // Put symbolic info from the MH constant into freshly created MemberName and resolve it.
+  Handle mname = MemberName_klass()->allocate_instance_handle(CHECK_(empty));
+  java_lang_invoke_MemberName::set_clazz(mname(), callee->java_mirror());
+  java_lang_invoke_MemberName::set_name (mname(), name_str());
+  java_lang_invoke_MemberName::set_type (mname(), signature_str());
+  java_lang_invoke_MemberName::set_flags(mname(), MethodHandles::ref_kind_to_flags(ref_kind));
+
+  if (ref_kind == JVM_REF_invokeVirtual &&
+      callee->name() == vmSymbols::java_lang_invoke_MethodHandle() &&
+      (name == vmSymbols::invoke_name() || name == vmSymbols::invokeExact_name())) {
+    // Skip resolution for j.l.i.MethodHandle.invoke()/invokeExact().
+    // They are public signature polymorphic methods, but require appendix argument
+    // which MemberName resolution doesn't handle. There's special logic on JDK side to handle them
+    // (see MethodHandles.linkMethodHandleConstant() and MethodHandles.findVirtualForMH()).
   } else {
-    ResourceMark rm(THREAD);
-    SignatureStream ss(signature, false);
-    if (!ss.is_done()) {
-      oop mirror = ss.as_java_mirror(Handle(THREAD, caller->class_loader()),
-                                     Handle(THREAD, caller->protection_domain()),
-                                     SignatureStream::NCDFError, CHECK_(empty));
-      type = Handle(THREAD, mirror);
-      ss.next();
-      if (!ss.is_done())  type = Handle();  // error!
-    }
+    MethodHandles::resolve_MemberName(mname, caller, CHECK_(empty));
   }
-  if (type.is_null()) {
-    THROW_MSG_(vmSymbols::java_lang_LinkageError(), "bad signature", empty);
-  }
+
+  // After method/field resolution succeeded, it's safe to resolve MH signature as well.
+  Handle type = MethodHandles::resolve_MemberName_type(mname, caller, CHECK_(empty));
 
   // call java.lang.invoke.MethodHandleNatives::linkMethodHandleConstant(Class caller, int refKind, Class callee, String name, Object type) -> MethodHandle
   JavaCallArguments args;
   args.push_oop(Handle(THREAD, caller->java_mirror()));  // the referring class
   args.push_int(ref_kind);
   args.push_oop(Handle(THREAD, callee->java_mirror()));  // the target class
-  args.push_oop(name);
+  args.push_oop(name_str);
   args.push_oop(type);
   JavaValue result(T_OBJECT);
   JavaCalls::call_static(&result,
--- a/src/hotspot/share/classfile/systemDictionary.hpp	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/hotspot/share/classfile/systemDictionary.hpp	Tue Jan 30 16:41:40 2018 +0100
@@ -533,6 +533,11 @@
                                            Klass* accessing_klass,
                                            TRAPS);
 
+  // find a java.lang.Class object for a given signature
+  static Handle    find_field_handle_type(Symbol* signature,
+                                          Klass* accessing_klass,
+                                          TRAPS);
+
   // ask Java to compute a java.lang.invoke.MethodHandle object for a given CP entry
   static Handle    link_method_handle_constant(Klass* caller,
                                                int ref_kind, //e.g., JVM_REF_invokeVirtual
--- a/src/hotspot/share/classfile/vmSymbols.hpp	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/hotspot/share/classfile/vmSymbols.hpp	Tue Jan 30 16:41:40 2018 +0100
@@ -302,6 +302,7 @@
   /* internal up-calls made only by the JVM, via class sun.invoke.MethodHandleNatives: */         \
   template(findMethodHandleType_name,                 "findMethodHandleType")                     \
   template(findMethodHandleType_signature,       "(Ljava/lang/Class;[Ljava/lang/Class;)Ljava/lang/invoke/MethodType;") \
+  template(invokeExact_name,                          "invokeExact")                              \
   template(linkMethodHandleConstant_name,             "linkMethodHandleConstant")                 \
   template(linkMethodHandleConstant_signature, "(Ljava/lang/Class;ILjava/lang/Class;Ljava/lang/String;Ljava/lang/Object;)Ljava/lang/invoke/MethodHandle;") \
   template(linkMethod_name,                           "linkMethod")                               \
--- a/src/hotspot/share/code/compiledIC.cpp	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/hotspot/share/code/compiledIC.cpp	Tue Jan 30 16:41:40 2018 +0100
@@ -230,10 +230,13 @@
 #ifdef ASSERT
     int index = call_info->resolved_method()->itable_index();
     assert(index == itable_index, "CallInfo pre-computes this");
-#endif //ASSERT
     InstanceKlass* k = call_info->resolved_method()->method_holder();
     assert(k->verify_itable_index(itable_index), "sanity check");
-    InlineCacheBuffer::create_transition_stub(this, k, entry);
+#endif //ASSERT
+    CompiledICHolder* holder = new CompiledICHolder(call_info->resolved_method()->method_holder(),
+                                                    call_info->resolved_klass());
+    holder->claim();
+    InlineCacheBuffer::create_transition_stub(this, holder, entry);
   } else {
     assert(call_info->call_kind() == CallInfo::vtable_call, "either itable or vtable");
     // Can be different than selected_method->vtable_index(), due to package-private etc.
@@ -517,7 +520,14 @@
 
 bool CompiledIC::is_icholder_entry(address entry) {
   CodeBlob* cb = CodeCache::find_blob_unsafe(entry);
-  return (cb != NULL && cb->is_adapter_blob());
+  if (cb != NULL && cb->is_adapter_blob()) {
+    return true;
+  }
+  // itable stubs also use CompiledICHolder
+  if (VtableStubs::is_entry_point(entry) && VtableStubs::stub_containing(entry)->is_itable_stub()) {
+    return true;
+  }
+  return false;
 }
 
 bool CompiledIC::is_icholder_call_site(virtual_call_Relocation* call_site, const CompiledMethod* cm) {
--- a/src/hotspot/share/code/compiledIC.hpp	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/hotspot/share/code/compiledIC.hpp	Tue Jan 30 16:41:40 2018 +0100
@@ -45,11 +45,11 @@
 //          \                        /   \     /
 //       [4] \                      / [4] \->-/
 //            \->-  Megamorphic -<-/
-//                  (Method*)
+//              (CompiledICHolder*)
 //
-// The text in paranteses () refere to the value of the inline cache receiver (mov instruction)
+// The text in parentheses () refers to the value of the inline cache receiver (mov instruction)
 //
-// The numbers in square brackets refere to the kind of transition:
+// The numbers in square brackets refer to the kind of transition:
 // [1]: Initial fixup. Receiver it found from debug information
 // [2]: Compilation of a method
 // [3]: Recompilation of a method (note: only entry is changed. The Klass* must stay the same)
--- a/src/hotspot/share/code/compiledMethod.cpp	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/hotspot/share/code/compiledMethod.cpp	Tue Jan 30 16:41:40 2018 +0100
@@ -404,8 +404,7 @@
     // yet be marked below. (We check this further below).
     CompiledICHolder* cichk_oop = ic->cached_icholder();
 
-    if (cichk_oop->holder_method()->method_holder()->is_loader_alive(is_alive) &&
-        cichk_oop->holder_klass()->is_loader_alive(is_alive)) {
+    if (cichk_oop->is_loader_alive(is_alive)) {
       return;
     }
   } else {
--- a/src/hotspot/share/code/dependencies.hpp	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/hotspot/share/code/dependencies.hpp	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -241,8 +241,18 @@
     bool is_object() const            { assert(is_valid(), "oops"); return _id < 0; }
 
     Metadata*  as_metadata(OopRecorder* rec) const    { assert(is_metadata(), "oops"); return rec->metadata_at(index()); }
-    Klass*     as_klass(OopRecorder* rec) const       { assert(as_metadata(rec)->is_klass(), "oops"); return (Klass*) as_metadata(rec); }
-    Method*    as_method(OopRecorder* rec) const      { assert(as_metadata(rec)->is_method(), "oops"); return (Method*) as_metadata(rec); }
+    Klass*     as_klass(OopRecorder* rec) const {
+      Metadata* m = as_metadata(rec);
+      assert(m != NULL, "as_metadata returned NULL");
+      assert(m->is_klass(), "oops");
+      return (Klass*) m;
+    }
+    Method*    as_method(OopRecorder* rec) const {
+      Metadata* m = as_metadata(rec);
+      assert(m != NULL, "as_metadata returned NULL");
+      assert(m->is_method(), "oops");
+      return (Method*) m;
+    }
     jobject    as_object(OopRecorder* rec) const      { assert(is_object(), "oops"); return rec->oop_at(index()); }
   };
 #endif // INCLUDE_JVMCI
--- a/src/hotspot/share/code/nmethod.cpp	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/hotspot/share/code/nmethod.cpp	Tue Jan 30 16:41:40 2018 +0100
@@ -1547,7 +1547,7 @@
         CompiledIC *ic = CompiledIC_at(&iter);
         if (ic->is_icholder_call()) {
           CompiledICHolder* cichk = ic->cached_icholder();
-          f(cichk->holder_method());
+          f(cichk->holder_metadata());
           f(cichk->holder_klass());
         } else {
           Metadata* ic_oop = ic->cached_metadata();
--- a/src/hotspot/share/gc/g1/g1CollectedHeap.cpp	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/hotspot/share/gc/g1/g1CollectedHeap.cpp	Tue Jan 30 16:41:40 2018 +0100
@@ -4722,7 +4722,7 @@
       timer->record_time_secs(G1GCPhaseTimes::YoungFreeCSet, worker_id, young_time);
     }
     if (has_non_young_time) {
-      timer->record_time_secs(G1GCPhaseTimes::NonYoungFreeCSet, worker_id, young_time);
+      timer->record_time_secs(G1GCPhaseTimes::NonYoungFreeCSet, worker_id, non_young_time);
     }
   }
 };
--- a/src/hotspot/share/gc/g1/vm_operations_g1.cpp	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/hotspot/share/gc/g1/vm_operations_g1.cpp	Tue Jan 30 16:41:40 2018 +0100
@@ -139,13 +139,17 @@
       // An allocation had been requested. Do it, eventually trying a stronger
       // kind of GC.
       _result = g1h->satisfy_failed_allocation(_word_size, _allocation_context, &_pause_succeeded);
-    } else if (!g1h->has_regions_left_for_allocation()) {
-      // There has been a request to perform a GC to free some space. We have no
-      // information on how much memory has been asked for. In case there are
-      // absolutely no regions left to allocate into, do a maximally compacting full GC.
-      log_info(gc, ergo)("Attempting maximally compacting collection");
-      _pause_succeeded = g1h->do_full_collection(false, /* explicit gc */
-                                                 true   /* clear_all_soft_refs */);
+    } else {
+      bool should_upgrade_to_full = !g1h->should_do_concurrent_full_gc(_gc_cause) &&
+                                    !g1h->has_regions_left_for_allocation();
+      if (should_upgrade_to_full) {
+        // There has been a request to perform a GC to free some space. We have no
+        // information on how much memory has been asked for. In case there are
+        // absolutely no regions left to allocate into, do a maximally compacting full GC.
+        log_info(gc, ergo)("Attempting maximally compacting collection");
+        _pause_succeeded = g1h->do_full_collection(false, /* explicit gc */
+                                                   true   /* clear_all_soft_refs */);
+      }
     }
     guarantee(_pause_succeeded, "Elevated collections during the safepoint must always succeed.");
   } else {
--- a/src/hotspot/share/interpreter/interpreterRuntime.cpp	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/hotspot/share/interpreter/interpreterRuntime.cpp	Tue Jan 30 16:41:40 2018 +0100
@@ -804,7 +804,7 @@
   // it is not an interface.  The receiver for invokespecial calls within interface
   // methods must be checked for every call.
   InstanceKlass* sender = pool->pool_holder();
-  sender = sender->is_anonymous() ? sender->host_klass() : sender;
+  sender = sender->has_host_klass() ? sender->host_klass() : sender;
 
   switch (info.call_kind()) {
   case CallInfo::direct_call:
@@ -822,6 +822,7 @@
   case CallInfo::itable_call:
     cp_cache_entry->set_itable_call(
       bytecode,
+      info.resolved_klass(),
       info.resolved_method(),
       info.itable_index());
     break;
--- a/src/hotspot/share/jvmci/jvmciCompilerToVM.cpp	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/hotspot/share/jvmci/jvmciCompilerToVM.cpp	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -1433,6 +1433,7 @@
               Deoptimization::reassign_fields(fst.current(), fst.register_map(), scope->objects(), realloc_failures, false);
 
               GrowableArray<ScopeValue*>* local_values = scope->locals();
+              assert(local_values != NULL, "NULL locals");
               typeArrayOop array_oop = oopFactory::new_boolArray(local_values->length(), CHECK_NULL);
               typeArrayHandle array(THREAD, array_oop);
               for (int i = 0; i < local_values->length(); i++) {
--- a/src/hotspot/share/memory/allocation.inline.hpp	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/hotspot/share/memory/allocation.inline.hpp	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -163,7 +163,7 @@
     return NULL;
   }
 
-  if (os::commit_memory(addr, size, !ExecMem, "Allocator (commit)")) {
+  if (os::commit_memory(addr, size, !ExecMem)) {
     return (E*)addr;
   } else {
     os::release_memory(addr, size);
--- a/src/hotspot/share/oops/compiledICHolder.cpp	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/hotspot/share/oops/compiledICHolder.cpp	Tue Jan 30 16:41:40 2018 +0100
@@ -32,8 +32,8 @@
 volatile int CompiledICHolder::_live_not_claimed_count;
 
 
-CompiledICHolder::CompiledICHolder(Method* method, Klass* klass)
-  : _holder_method(method), _holder_klass(klass) {
+CompiledICHolder::CompiledICHolder(Metadata* metadata, Klass* klass)
+  : _holder_metadata(metadata), _holder_klass(klass) {
 #ifdef ASSERT
   Atomic::inc(&_live_count);
   Atomic::inc(&_live_not_claimed_count);
@@ -47,12 +47,28 @@
 }
 #endif // ASSERT
 
+bool CompiledICHolder::is_loader_alive(BoolObjectClosure* is_alive) {
+  if (_holder_metadata->is_method()) {
+    if (!((Method*)_holder_metadata)->method_holder()->is_loader_alive(is_alive)) {
+      return false;
+    }
+  } else if (_holder_metadata->is_klass()) {
+    if (!((Klass*)_holder_metadata)->is_loader_alive(is_alive)) {
+      return false;
+    }
+  }
+  if (!_holder_klass->is_loader_alive(is_alive)) {
+    return false;
+  }
+  return true;
+}
+
 // Printing
 
 void CompiledICHolder::print_on(outputStream* st) const {
   st->print("%s", internal_name());
-  st->print(" - method: "); holder_method()->print_value_on(st); st->cr();
-  st->print(" - klass:  "); holder_klass()->print_value_on(st); st->cr();
+  st->print(" - metadata: "); holder_metadata()->print_value_on(st); st->cr();
+  st->print(" - klass:    "); holder_klass()->print_value_on(st); st->cr();
 }
 
 void CompiledICHolder::print_value_on(outputStream* st) const {
@@ -63,7 +79,7 @@
 // Verification
 
 void CompiledICHolder::verify_on(outputStream* st) {
-  guarantee(holder_method()->is_method(), "should be method");
+  guarantee(holder_metadata()->is_method() || holder_metadata()->is_klass(), "should be method or klass");
   guarantee(holder_klass()->is_klass(),   "should be klass");
 }
 
--- a/src/hotspot/share/oops/compiledICHolder.hpp	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/hotspot/share/oops/compiledICHolder.hpp	Tue Jan 30 16:41:40 2018 +0100
@@ -29,8 +29,9 @@
 #include "utilities/macros.hpp"
 
 // A CompiledICHolder* is a helper object for the inline cache implementation.
-// It holds an intermediate value (method+klass pair) used when converting from
-// compiled to an interpreted call.
+// It holds:
+//   (1) (method+klass pair) when converting from compiled to an interpreted call
+//   (2) (klass+klass pair) when calling itable stub from megamorphic compiled call
 //
 // These are always allocated in the C heap and are freed during a
 // safepoint by the ICBuffer logic.  It's unsafe to free them earlier
@@ -45,32 +46,33 @@
   static volatile int _live_not_claimed_count; // allocated but not yet in use so not
                                                // reachable by iterating over nmethods
 
-  Method* _holder_method;
+  Metadata* _holder_metadata;
   Klass*    _holder_klass;    // to avoid name conflict with oopDesc::_klass
   CompiledICHolder* _next;
 
  public:
   // Constructor
-  CompiledICHolder(Method* method, Klass* klass);
+  CompiledICHolder(Metadata* metadata, Klass* klass);
   ~CompiledICHolder() NOT_DEBUG_RETURN;
 
   static int live_count() { return _live_count; }
   static int live_not_claimed_count() { return _live_not_claimed_count; }
 
   // accessors
-  Method* holder_method() const     { return _holder_method; }
   Klass*    holder_klass()  const     { return _holder_klass; }
+  Metadata* holder_metadata() const   { return _holder_metadata; }
 
-  void set_holder_method(Method* m) { _holder_method = m; }
-  void set_holder_klass(Klass* k)   { _holder_klass = k; }
+  void set_holder_metadata(Metadata* m) { _holder_metadata = m; }
+  void set_holder_klass(Klass* k)     { _holder_klass = k; }
 
-  // interpreter support (offsets in bytes)
-  static int holder_method_offset()   { return offset_of(CompiledICHolder, _holder_method); }
+  static int holder_metadata_offset() { return offset_of(CompiledICHolder, _holder_metadata); }
   static int holder_klass_offset()    { return offset_of(CompiledICHolder, _holder_klass); }
 
   CompiledICHolder* next()     { return _next; }
   void set_next(CompiledICHolder* n) { _next = n; }
 
+  bool is_loader_alive(BoolObjectClosure* is_alive);
+
   // Verify
   void verify_on(outputStream* st);
 
--- a/src/hotspot/share/oops/constantPool.hpp	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/hotspot/share/oops/constantPool.hpp	Tue Jan 30 16:41:40 2018 +0100
@@ -25,6 +25,7 @@
 #ifndef SHARE_VM_OOPS_CONSTANTPOOLOOP_HPP
 #define SHARE_VM_OOPS_CONSTANTPOOLOOP_HPP
 
+#include "memory/allocation.inline.hpp"
 #include "oops/arrayOop.hpp"
 #include "oops/cpCache.hpp"
 #include "oops/objArrayOop.hpp"
@@ -1021,7 +1022,7 @@
         delete(cur);
       }
     }
-    delete _buckets;
+    FREE_C_HEAP_ARRAY(SymbolHashMapBucket, _buckets);
   }
 }; // End SymbolHashMap class
 
--- a/src/hotspot/share/oops/cpCache.cpp	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/hotspot/share/oops/cpCache.cpp	Tue Jan 30 16:41:40 2018 +0100
@@ -279,14 +279,16 @@
   set_direct_or_vtable_call(invoke_code, method, index, false);
 }
 
-void ConstantPoolCacheEntry::set_itable_call(Bytecodes::Code invoke_code, const methodHandle& method, int index) {
+void ConstantPoolCacheEntry::set_itable_call(Bytecodes::Code invoke_code,
+                                             Klass* referenced_klass,
+                                             const methodHandle& method, int index) {
   assert(method->method_holder()->verify_itable_index(index), "");
   assert(invoke_code == Bytecodes::_invokeinterface, "");
   InstanceKlass* interf = method->method_holder();
   assert(interf->is_interface(), "must be an interface");
   assert(!method->is_final_method(), "interfaces do not have final methods; cannot link to one here");
-  set_f1(interf);
-  set_f2(index);
+  set_f1(referenced_klass);
+  set_f2((intx)method());
   set_method_flags(as_TosState(method->result_type()),
                    0,  // no option bits
                    method()->size_of_parameters());
@@ -515,10 +517,23 @@
 
 
 #if INCLUDE_JVMTI
+
+void log_adjust(const char* entry_type, Method* old_method, Method* new_method, bool* trace_name_printed) {
+  if (log_is_enabled(Info, redefine, class, update)) {
+    ResourceMark rm;
+    if (!(*trace_name_printed)) {
+      log_info(redefine, class, update)("adjust: name=%s", old_method->method_holder()->external_name());
+      *trace_name_printed = true;
+    }
+    log_debug(redefine, class, update, constantpool)
+          ("cpc %s entry update: %s(%s)", entry_type, new_method->name()->as_C_string(), new_method->signature()->as_C_string());
+  }
+}
+
 // RedefineClasses() API support:
 // If this ConstantPoolCacheEntry refers to old_method then update it
 // to refer to new_method.
-bool ConstantPoolCacheEntry::adjust_method_entry(Method* old_method,
+void ConstantPoolCacheEntry::adjust_method_entry(Method* old_method,
        Method* new_method, bool * trace_name_printed) {
 
   if (is_vfinal()) {
@@ -527,63 +542,35 @@
       // match old_method so need an update
       // NOTE: can't use set_f2_as_vfinal_method as it asserts on different values
       _f2 = (intptr_t)new_method;
-      if (log_is_enabled(Info, redefine, class, update)) {
-        ResourceMark rm;
-        if (!(*trace_name_printed)) {
-          log_info(redefine, class, update)("adjust: name=%s", old_method->method_holder()->external_name());
-          *trace_name_printed = true;
-        }
-        log_debug(redefine, class, update, constantpool)
-          ("cpc vf-entry update: %s(%s)", new_method->name()->as_C_string(), new_method->signature()->as_C_string());
-      }
-      return true;
+      log_adjust("vfinal", old_method, new_method, trace_name_printed);
     }
-
-    // f1() is not used with virtual entries so bail out
-    return false;
+    return;
   }
 
-  if (_f1 == NULL) {
-    // NULL f1() means this is a virtual entry so bail out
-    // We are assuming that the vtable index does not need change.
-    return false;
-  }
+  assert (_f1 != NULL, "should not call with uninteresting entry");
 
-  if (_f1 == old_method) {
+  if (!(_f1->is_method())) {
+    // _f1 is a Klass* for an interface, _f2 is the method
+    if (f2_as_interface_method() == old_method) {
+      _f2 = (intptr_t)new_method;
+      log_adjust("interface", old_method, new_method, trace_name_printed);
+    }
+  } else if (_f1 == old_method) {
     _f1 = new_method;
-    if (log_is_enabled(Info, redefine, class, update)) {
-      ResourceMark rm;
-      if (!(*trace_name_printed)) {
-        log_info(redefine, class, update)("adjust: name=%s", old_method->method_holder()->external_name());
-        *trace_name_printed = true;
-      }
-      log_debug(redefine, class, update, constantpool)
-        ("cpc entry update: %s(%s)", new_method->name()->as_C_string(), new_method->signature()->as_C_string());
-    }
-    return true;
+    log_adjust("special, static or dynamic", old_method, new_method, trace_name_printed);
   }
-
-  return false;
 }
 
 // a constant pool cache entry should never contain old or obsolete methods
 bool ConstantPoolCacheEntry::check_no_old_or_obsolete_entries() {
-  if (is_vfinal()) {
-    // virtual and final so _f2 contains method ptr instead of vtable index
-    Metadata* f2 = (Metadata*)_f2;
-    // Return false if _f2 refers to an old or an obsolete method.
-    // _f2 == NULL || !_f2->is_method() are just as unexpected here.
-    return (f2 != NULL NOT_PRODUCT(&& f2->is_valid()) && f2->is_method() &&
-            !((Method*)f2)->is_old() && !((Method*)f2)->is_obsolete());
-  } else if (_f1 == NULL ||
-             (NOT_PRODUCT(_f1->is_valid() &&) !_f1->is_method())) {
-    // _f1 == NULL || !_f1->is_method() are OK here
+  Method* m = get_interesting_method_entry(NULL);
+  // return false if m refers to a non-deleted old or obsolete method
+  if (m != NULL) {
+    assert(m->is_valid() && m->is_method(), "m is a valid method");
+    return !m->is_old() && !m->is_obsolete(); // old is always set for old and obsolete
+  } else {
     return true;
   }
-  // return false if _f1 refers to a non-deleted old or obsolete method
-  return (NOT_PRODUCT(_f1->is_valid() &&) _f1->is_method() &&
-          (f1_as_method()->is_deleted() ||
-          (!f1_as_method()->is_old() && !f1_as_method()->is_obsolete())));
 }
 
 Method* ConstantPoolCacheEntry::get_interesting_method_entry(Klass* k) {
@@ -600,10 +587,11 @@
     return NULL;
   } else {
     if (!(_f1->is_method())) {
-      // _f1 can also contain a Klass* for an interface
-      return NULL;
+      // _f1 is a Klass* for an interface
+      m = f2_as_interface_method();
+    } else {
+      m = f1_as_method();
     }
-    m = f1_as_method();
   }
   assert(m != NULL && m->is_method(), "sanity check");
   if (m == NULL || !m->is_method() || (k != NULL && m->method_holder() != k)) {
--- a/src/hotspot/share/oops/cpCache.hpp	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/hotspot/share/oops/cpCache.hpp	Tue Jan 30 16:41:40 2018 +0100
@@ -249,6 +249,7 @@
 
   void set_itable_call(
     Bytecodes::Code invoke_code,                 // the bytecode used; must be invokeinterface
+    Klass* referenced_klass,                     // the referenced klass in the InterfaceMethodref
     const methodHandle& method,                  // the resolved interface method
     int itable_index                             // index into itable for the method
   );
@@ -352,6 +353,7 @@
   bool      is_f1_null() const                   { Metadata* f1 = f1_ord(); return f1 == NULL; }  // classifies a CPC entry as unbound
   int       f2_as_index() const                  { assert(!is_vfinal(), ""); return (int) _f2; }
   Method*   f2_as_vfinal_method() const          { assert(is_vfinal(), ""); return (Method*)_f2; }
+  Method*   f2_as_interface_method() const       { assert(bytecode_1() == Bytecodes::_invokeinterface, ""); return (Method*)_f2; }
   intx flags_ord() const                         { return (intx)OrderAccess::load_acquire(&_flags); }
   int  field_index() const                       { assert(is_field_entry(),  ""); return (_flags & field_index_mask); }
   int  parameter_size() const                    { assert(is_method_entry(), ""); return (_flags & parameter_size_mask); }
@@ -387,7 +389,7 @@
   // trace_name_printed is set to true if the current call has
   // printed the klass name so that other routines in the adjust_*
   // group don't print the klass name.
-  bool adjust_method_entry(Method* old_method, Method* new_method,
+  void adjust_method_entry(Method* old_method, Method* new_method,
          bool* trace_name_printed);
   bool check_no_old_or_obsolete_entries();
   Method* get_interesting_method_entry(Klass* k);
--- a/src/hotspot/share/oops/instanceKlass.hpp	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/hotspot/share/oops/instanceKlass.hpp	Tue Jan 30 16:41:40 2018 +0100
@@ -609,9 +609,11 @@
   InstanceKlass* host_klass() const              {
     InstanceKlass** hk = adr_host_klass();
     if (hk == NULL) {
+      assert(!is_anonymous(), "Anonymous classes have host klasses");
       return NULL;
     } else {
       assert(*hk != NULL, "host klass should always be set if the address is not null");
+      assert(is_anonymous(), "Only anonymous classes have host klasses");
       return *hk;
     }
   }
@@ -623,6 +625,9 @@
       *addr = host;
     }
   }
+  bool has_host_klass() const              {
+    return adr_host_klass() != NULL;
+  }
   bool is_anonymous() const                {
     return (_misc_flags & _misc_is_anonymous) != 0;
   }
--- a/src/hotspot/share/oops/klassVtable.cpp	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/hotspot/share/oops/klassVtable.cpp	Tue Jan 30 16:41:40 2018 +0100
@@ -1200,7 +1200,6 @@
   Array<Method*>* methods = InstanceKlass::cast(interf)->methods();
   int nof_methods = methods->length();
   HandleMark hm;
-  assert(nof_methods > 0, "at least one method must exist for interface to be in vtable");
   Handle interface_loader (THREAD, InstanceKlass::cast(interf)->class_loader());
 
   int ime_count = method_count_for_interface(interf);
@@ -1369,8 +1368,10 @@
       }
     }
 
-    // Only count interfaces with at least one method
-    if (method_count > 0) {
+    // Visit all interfaces which either have any methods or can participate in receiver type check.
+    // We do not bother to count methods in transitive interfaces, although that would allow us to skip
+    // this step in the rare case of a zero-method interface extending another zero-method interface.
+    if (method_count > 0 || InstanceKlass::cast(intf)->transitive_interfaces()->length() > 0) {
       blk->doit(intf, method_count);
     }
   }
--- a/src/hotspot/share/oops/method.hpp	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/hotspot/share/oops/method.hpp	Tue Jan 30 16:41:40 2018 +0100
@@ -698,6 +698,7 @@
   static ByteSize from_interpreted_offset()      { return byte_offset_of(Method, _from_interpreted_entry ); }
   static ByteSize interpreter_entry_offset()     { return byte_offset_of(Method, _i2i_entry ); }
   static ByteSize signature_handler_offset()     { return in_ByteSize(sizeof(Method) + wordSize);      }
+  static ByteSize itable_index_offset()          { return byte_offset_of(Method, _vtable_index ); }
 
   // for code generation
   static int method_data_offset_in_bytes()       { return offset_of(Method, _method_data); }
--- a/src/hotspot/share/opto/callnode.cpp	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/hotspot/share/opto/callnode.cpp	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -772,7 +772,7 @@
     ciKlass* boxing_klass = t_oop->klass();
     if (is_CallStaticJava() && as_CallStaticJava()->is_boxing_method()) {
       // Skip unrelated boxing methods.
-      Node* proj = proj_out(TypeFunc::Parms);
+      Node* proj = proj_out_or_null(TypeFunc::Parms);
       if ((proj == NULL) || (phase->type(proj)->is_instptr()->klass() != boxing_klass)) {
         return false;
       }
@@ -784,7 +784,7 @@
       }
       // May modify (by reflection) if an boxing object is passed
       // as argument or returned.
-      Node* proj = returns_pointer() ? proj_out(TypeFunc::Parms) : NULL;
+      Node* proj = returns_pointer() ? proj_out_or_null(TypeFunc::Parms) : NULL;
       if (proj != NULL) {
         const TypeInstPtr* inst_t = phase->type(proj)->isa_instptr();
         if ((inst_t != NULL) && (!inst_t->klass_is_exact() ||
@@ -824,7 +824,7 @@
 Node *CallNode::result_cast() {
   Node *cast = NULL;
 
-  Node *p = proj_out(TypeFunc::Parms);
+  Node *p = proj_out_or_null(TypeFunc::Parms);
   if (p == NULL)
     return NULL;
 
@@ -1378,13 +1378,13 @@
       PhaseIterGVN *igvn = phase->is_IterGVN();
       // Unreachable fall through path (negative array length),
       // the allocation can only throw so disconnect it.
-      Node* proj = proj_out(TypeFunc::Control);
+      Node* proj = proj_out_or_null(TypeFunc::Control);
       Node* catchproj = NULL;
       if (proj != NULL) {
         for (DUIterator_Fast imax, i = proj->fast_outs(imax); i < imax; i++) {
           Node *cn = proj->fast_out(i);
           if (cn->is_Catch()) {
-            catchproj = cn->as_Multi()->proj_out(CatchProjNode::fall_through_index);
+            catchproj = cn->as_Multi()->proj_out_or_null(CatchProjNode::fall_through_index);
             break;
           }
         }
@@ -1442,7 +1442,7 @@
       // Create a cast which is control dependent on the initialization to
       // propagate the fact that the array length must be positive.
       length = new CastIINode(length, narrow_length_type);
-      length->set_req(0, initialization()->proj_out(0));
+      length->set_req(0, initialization()->proj_out_or_null(0));
     }
   }
 
--- a/src/hotspot/share/opto/cfgnode.cpp	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/hotspot/share/opto/cfgnode.cpp	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -2373,7 +2373,7 @@
   if (can_reshape && !in(0)->is_Loop()) {
     // Dead code elimination can sometimes delete this projection so
     // if it's not there, there's nothing to do.
-    Node* fallthru = proj_out(0);
+    Node* fallthru = proj_out_or_null(0);
     if (fallthru != NULL) {
       phase->is_IterGVN()->replace_node(fallthru, in(0));
     }
--- a/src/hotspot/share/opto/divnode.hpp	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/hotspot/share/opto/divnode.hpp	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -154,8 +154,8 @@
   virtual bool is_CFG() const  { return false; }
   virtual uint ideal_reg() const { return NotAMachineReg; }
 
-  ProjNode* div_proj() { return proj_out(div_proj_num); }
-  ProjNode* mod_proj() { return proj_out(mod_proj_num); }
+  ProjNode* div_proj() { return proj_out_or_null(div_proj_num); }
+  ProjNode* mod_proj() { return proj_out_or_null(mod_proj_num); }
 };
 
 //------------------------------DivModINode---------------------------------------
--- a/src/hotspot/share/opto/escape.cpp	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/hotspot/share/opto/escape.cpp	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -366,7 +366,7 @@
       delayed_worklist->push(n);
       // Check if a call returns an object.
       if ((n->as_Call()->returns_pointer() &&
-           n->as_Call()->proj_out(TypeFunc::Parms) != NULL) ||
+           n->as_Call()->proj_out_or_null(TypeFunc::Parms) != NULL) ||
           (n->is_CallStaticJava() &&
            n->as_CallStaticJava()->is_boxing_method())) {
         add_call_node(n->as_Call());
@@ -2674,7 +2674,7 @@
   PhaseGVN* igvn = _igvn;
   const TypeOopPtr *toop = C->get_adr_type(alias_idx)->isa_oopptr();
   bool is_instance = (toop != NULL) && toop->is_known_instance();
-  Node *start_mem = C->start()->proj_out(TypeFunc::Memory);
+  Node *start_mem = C->start()->proj_out_or_null(TypeFunc::Memory);
   Node *prev = NULL;
   Node *result = orig_mem;
   while (prev != result) {
@@ -3028,7 +3028,7 @@
         // An allocation may have an Initialize which has raw stores. Scan
         // the users of the raw allocation result and push AddP users
         // on alloc_worklist.
-        Node *raw_result = alloc->proj_out(TypeFunc::Parms);
+        Node *raw_result = alloc->proj_out_or_null(TypeFunc::Parms);
         assert (raw_result != NULL, "must have an allocation result");
         for (DUIterator_Fast imax, i = raw_result->fast_outs(imax); i < imax; i++) {
           Node *use = raw_result->fast_out(i);
@@ -3219,7 +3219,7 @@
       // we don't need to do anything, but the users must be pushed
     } else if (n->is_MemBar()) { // Initialize, MemBar nodes
       // we don't need to do anything, but the users must be pushed
-      n = n->as_MemBar()->proj_out(TypeFunc::Memory);
+      n = n->as_MemBar()->proj_out_or_null(TypeFunc::Memory);
       if (n == NULL)
         continue;
     } else if (n->Opcode() == Op_StrCompressedCopy ||
--- a/src/hotspot/share/opto/graphKit.cpp	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/hotspot/share/opto/graphKit.cpp	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -3754,7 +3754,7 @@
 
 // Trace Allocate -> Proj[Parm] -> Initialize
 InitializeNode* AllocateNode::initialization() {
-  ProjNode* rawoop = proj_out(AllocateNode::RawAddress);
+  ProjNode* rawoop = proj_out_or_null(AllocateNode::RawAddress);
   if (rawoop == NULL)  return NULL;
   for (DUIterator_Fast imax, i = rawoop->fast_outs(imax); i < imax; i++) {
     Node* init = rawoop->fast_out(i);
--- a/src/hotspot/share/opto/ifnode.cpp	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/hotspot/share/opto/ifnode.cpp	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -505,7 +505,7 @@
   //  Flip 1:  If (Bool[<] CmpU(l, LoadRange)) ...
   //  Flip 2:  If (Bool[<=] CmpU(LoadRange, l)) ...
 
-  ProjNode* iftrap = proj_out(flip_test == 2 ? true : false);
+  ProjNode* iftrap = proj_out_or_null(flip_test == 2 ? true : false);
   return iftrap;
 }
 
@@ -1195,14 +1195,17 @@
 // Check that the If that is in between the 2 integer comparisons has
 // no side effect
 bool IfNode::is_side_effect_free_test(ProjNode* proj, PhaseIterGVN* igvn) {
-  if (proj != NULL &&
-      proj->is_uncommon_trap_if_pattern(Deoptimization::Reason_none) &&
-      proj->outcnt() <= 2) {
+  if (proj == NULL) {
+    return false;
+  }
+  CallStaticJavaNode* unc = proj->is_uncommon_trap_if_pattern(Deoptimization::Reason_none);
+  if (unc != NULL && proj->outcnt() <= 2) {
     if (proj->outcnt() == 1 ||
         // Allow simple null check from LoadRange
         (is_cmp_with_loadrange(proj) && is_null_check(proj, igvn))) {
       CallStaticJavaNode* unc = proj->is_uncommon_trap_if_pattern(Deoptimization::Reason_none);
       CallStaticJavaNode* dom_unc = proj->in(0)->in(0)->as_Proj()->is_uncommon_trap_if_pattern(Deoptimization::Reason_none);
+      assert(dom_unc != NULL, "is_uncommon_trap_if_pattern returned NULL");
 
       // reroute_side_effect_free_unc changes the state of this
       // uncommon trap to restart execution at the previous
@@ -1471,7 +1474,7 @@
   // be skipped. For example, range check predicate has two checks
   // for lower and upper bounds.
   ProjNode* unc_proj = proj_out(1 - prev_dom->as_Proj()->_con)->as_Proj();
-  if ((unc_proj != NULL) && (unc_proj->is_uncommon_trap_proj(Deoptimization::Reason_predicate) != NULL)) {
+  if (unc_proj->is_uncommon_trap_proj(Deoptimization::Reason_predicate) != NULL) {
     prev_dom = idom;
   }
 
--- a/src/hotspot/share/opto/library_call.cpp	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/hotspot/share/opto/library_call.cpp	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -1495,7 +1495,7 @@
     // escape analysis can go from the MemBarStoreStoreNode to the
     // AllocateNode and eliminate the MemBarStoreStoreNode if possible
     // based on the escape status of the AllocateNode.
-    insert_mem_bar(Op_MemBarStoreStore, alloc->proj_out(AllocateNode::RawAddress));
+    insert_mem_bar(Op_MemBarStoreStore, alloc->proj_out_or_null(AllocateNode::RawAddress));
   }
   if (compress) {
     set_result(_gvn.transform(count));
@@ -1589,7 +1589,7 @@
       // escape analysis can go from the MemBarStoreStoreNode to the
       // AllocateNode and eliminate the MemBarStoreStoreNode if possible
       // based on the escape status of the AllocateNode.
-      insert_mem_bar(Op_MemBarStoreStore, alloc->proj_out(AllocateNode::RawAddress));
+      insert_mem_bar(Op_MemBarStoreStore, alloc->proj_out_or_null(AllocateNode::RawAddress));
     } else {
       insert_mem_bar(Op_MemBarCPUOrder);
     }
@@ -1675,7 +1675,7 @@
       // escape analysis can go from the MemBarStoreStoreNode to the
       // AllocateNode and eliminate the MemBarStoreStoreNode if possible
       // based on the escape status of the AllocateNode.
-      insert_mem_bar(Op_MemBarStoreStore, alloc->proj_out(AllocateNode::RawAddress));
+      insert_mem_bar(Op_MemBarStoreStore, alloc->proj_out_or_null(AllocateNode::RawAddress));
     } else {
       insert_mem_bar(Op_MemBarCPUOrder);
     }
@@ -4722,7 +4722,7 @@
     // escape analysis can go from the MemBarStoreStoreNode to the
     // AllocateNode and eliminate the MemBarStoreStoreNode if possible
     // based on the escape status of the AllocateNode.
-    insert_mem_bar(Op_MemBarStoreStore, alloc->proj_out(AllocateNode::RawAddress));
+    insert_mem_bar(Op_MemBarStoreStore, alloc->proj_out_or_null(AllocateNode::RawAddress));
   } else {
     insert_mem_bar(Op_MemBarCPUOrder);
   }
@@ -5031,7 +5031,7 @@
     Node *mem = reset_memory();
     set_all_memory(mem);
     alloc->set_req(TypeFunc::Memory, mem);
-    set_control(init->proj_out(TypeFunc::Control));
+    set_control(init->proj_out_or_null(TypeFunc::Control));
     set_i_o(callprojs.fallthrough_ioproj);
 
     // Update memory as done in GraphKit::set_output_for_allocation()
@@ -5042,8 +5042,8 @@
     }
     const TypePtr* telemref = ary_type->add_offset(Type::OffsetBot);
     int            elemidx  = C->get_alias_index(telemref);
-    set_memory(init->proj_out(TypeFunc::Memory), Compile::AliasIdxRaw);
-    set_memory(init->proj_out(TypeFunc::Memory), elemidx);
+    set_memory(init->proj_out_or_null(TypeFunc::Memory), Compile::AliasIdxRaw);
+    set_memory(init->proj_out_or_null(TypeFunc::Memory), elemidx);
 
     Node* allocx = _gvn.transform(alloc);
     assert(allocx == alloc, "where has the allocation gone?");
@@ -5360,7 +5360,7 @@
     // to finish initializing the allocated object.
     if ((ctl->is_IfFalse() || ctl->is_IfTrue()) && ctl->in(0)->is_If()) {
       IfNode* iff = ctl->in(0)->as_If();
-      Node* not_ctl = iff->proj_out(1 - ctl->as_Proj()->_con);
+      Node* not_ctl = iff->proj_out_or_null(1 - ctl->as_Proj()->_con);
       assert(not_ctl != NULL && not_ctl != ctl, "found alternate");
       if (slow_region != NULL && slow_region->find_edge(not_ctl) >= 1) {
         ctl = iff->in(0);       // This test feeds the known slow_region.
--- a/src/hotspot/share/opto/loopTransform.cpp	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/hotspot/share/opto/loopTransform.cpp	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -1017,7 +1017,6 @@
   CountedLoopNode *main_head = loop->_head->as_CountedLoop();
   assert( main_head->is_normal_loop(), "" );
   CountedLoopEndNode *main_end = main_head->loopexit();
-  guarantee(main_end != NULL, "no loop exit node");
   assert( main_end->outcnt() == 2, "1 true, 1 false path only" );
 
   Node *pre_header= main_head->in(LoopNode::EntryControl);
@@ -1243,7 +1242,6 @@
   // Find common pieces of the loop being guarded with pre & post loops
   CountedLoopNode *main_head = loop->_head->as_CountedLoop();
   CountedLoopEndNode *main_end = main_head->loopexit();
-  guarantee(main_end != NULL, "no loop exit node");
   // diagnostic to show loop end is not properly formed
   assert(main_end->outcnt() == 2, "1 true, 1 false path only");
 
@@ -1293,7 +1291,6 @@
   // Find common pieces of the loop being guarded with pre & post loops
   CountedLoopNode *main_head = loop->_head->as_CountedLoop();
   CountedLoopEndNode *main_end = main_head->loopexit();
-  guarantee(main_end != NULL, "no loop exit node");
   // diagnostic to show loop end is not properly formed
   assert(main_end->outcnt() == 2, "1 true, 1 false path only");
 
@@ -1427,7 +1424,6 @@
   assert(LoopUnrollLimit, "");
   CountedLoopNode *loop_head = loop->_head->as_CountedLoop();
   CountedLoopEndNode *loop_end = loop_head->loopexit();
-  assert(loop_end, "");
 #ifndef PRODUCT
   if (PrintOpto && VerifyLoopOptimizations) {
     tty->print("Unrolling ");
@@ -2972,7 +2968,7 @@
       }
       store = n;
       store_value = value;
-    } else if (n->is_If() && n != head->loopexit()) {
+    } else if (n->is_If() && n != head->loopexit_or_null()) {
       msg = "extra control flow";
       msg_node = n;
     }
@@ -3114,7 +3110,6 @@
   ok.set(store->in(MemNode::Memory)->_idx);
 
   CountedLoopEndNode* loop_exit = head->loopexit();
-  guarantee(loop_exit != NULL, "no loop exit node");
 
   // Loop structure is ok
   ok.set(head->_idx);
@@ -3204,7 +3199,7 @@
     return false;
   }
 
-  Node* exit = head->loopexit()->proj_out(0);
+  Node* exit = head->loopexit()->proj_out_or_null(0);
   if (exit == NULL) {
     return false;
   }
@@ -3280,8 +3275,8 @@
   call->init_req(TypeFunc::Control,   head->init_control());
   call->init_req(TypeFunc::I_O,       C->top());       // Does no I/O.
   call->init_req(TypeFunc::Memory,    mem_phi->in(LoopNode::EntryControl));
-  call->init_req(TypeFunc::ReturnAdr, C->start()->proj_out(TypeFunc::ReturnAdr));
-  call->init_req(TypeFunc::FramePtr,  C->start()->proj_out(TypeFunc::FramePtr));
+  call->init_req(TypeFunc::ReturnAdr, C->start()->proj_out_or_null(TypeFunc::ReturnAdr));
+  call->init_req(TypeFunc::FramePtr,  C->start()->proj_out_or_null(TypeFunc::FramePtr));
   _igvn.register_new_node_with_optimizer(call);
   result_ctrl = new ProjNode(call,TypeFunc::Control);
   _igvn.register_new_node_with_optimizer(result_ctrl);
--- a/src/hotspot/share/opto/loopnode.cpp	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/hotspot/share/opto/loopnode.cpp	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -68,11 +68,11 @@
 bool LoopNode::is_valid_counted_loop() const {
   if (is_CountedLoop()) {
     CountedLoopNode*    l  = as_CountedLoop();
-    CountedLoopEndNode* le = l->loopexit();
+    CountedLoopEndNode* le = l->loopexit_or_null();
     if (le != NULL &&
-        le->proj_out(1 /* true */) == l->in(LoopNode::LoopBackControl)) {
+        le->proj_out_or_null(1 /* true */) == l->in(LoopNode::LoopBackControl)) {
       Node* phi  = l->phi();
-      Node* exit = le->proj_out(0 /* false */);
+      Node* exit = le->proj_out_or_null(0 /* false */);
       if (exit != NULL && exit->Opcode() == Op_IfFalse &&
           phi != NULL && phi->is_Phi() &&
           phi->in(LoopNode::LoopBackControl) == l->incr() &&
@@ -793,7 +793,7 @@
 
 #ifdef ASSERT
   assert(l->is_valid_counted_loop(), "counted loop shape is messed up");
-  assert(l == loop->_head && l->phi() == phi && l->loopexit() == lex, "" );
+  assert(l == loop->_head && l->phi() == phi && l->loopexit_or_null() == lex, "" );
 #endif
 #ifndef PRODUCT
   if (TraceLoopOpts) {
@@ -917,7 +917,7 @@
       }
     }
     CountedLoopEndNode* cle = inner_out->in(0)->as_CountedLoopEnd();
-    assert(cle == inner->loopexit(), "mismatch");
+    assert(cle == inner->loopexit_or_null(), "mismatch");
     bool has_skeleton = outer_le->in(1)->bottom_type()->singleton() && outer_le->in(1)->bottom_type()->is_int()->get_con() == 0;
     if (has_skeleton) {
       assert(expect_skeleton == 1 || expect_skeleton == -1, "unexpected skeleton node");
@@ -1216,7 +1216,7 @@
   if (le == NULL) {
     return NULL;
   }
-  Node* c = le->proj_out(false);
+  Node* c = le->proj_out_or_null(false);
   if (c == NULL) {
     return NULL;
   }
@@ -1331,8 +1331,7 @@
           n->set_req(i, old_new[n->in(i)->_idx]);
         }
       }
-      if (n->in(0) != NULL) {
-        assert(n->in(0) == cle_tail, "node not on backedge?");
+      if (n->in(0) != NULL && n->in(0) == cle_tail) {
         n->set_req(0, le_tail);
       }
       igvn->register_new_node_with_optimizer(n);
@@ -1394,9 +1393,14 @@
           Node* uu = fast_out(j);
           if (uu->is_Phi()) {
             Node* be = uu->in(LoopNode::LoopBackControl);
-            while (be->is_Store() && old_new[be->_idx] != NULL) {
-              ShouldNotReachHere();
-              be = be->in(MemNode::Memory);
+            if (be->is_Store() && old_new[be->_idx] != NULL) {
+              assert(false, "store on the backedge + sunk stores: unsupported");
+              // drop outer loop
+              IfNode* outer_le = outer_loop_end();
+              Node* iff = igvn->transform(new IfNode(outer_le->in(0), outer_le->in(1), outer_le->_prob, outer_le->_fcnt));
+              igvn->replace_node(outer_le, iff);
+              inner_cl->clear_strip_mined();
+              return;
             }
             if (be == last || be == first->in(MemNode::Memory)) {
               assert(phi == NULL, "only one phi");
@@ -1449,10 +1453,7 @@
           // Or fix the outer loop fix to include
           // that chain of stores.
           Node* be = phi->in(LoopNode::LoopBackControl);
-          while (be->is_Store() && old_new[be->_idx] != NULL) {
-            ShouldNotReachHere();
-            be = be->in(MemNode::Memory);
-          }
+          assert(!(be->is_Store() && old_new[be->_idx] != NULL), "store on the backedge + sunk stores: unsupported");
           if (be == first->in(MemNode::Memory)) {
             if (be == phi->in(LoopNode::LoopBackControl)) {
               igvn->replace_input_of(phi, LoopNode::LoopBackControl, last);
@@ -1489,8 +1490,8 @@
     } else {
       new_limit = igvn->transform(new SubINode(iv_phi, min));
     }
-    igvn->replace_input_of(inner_cle->cmp_node(), 2, new_limit);
     Node* cmp = inner_cle->cmp_node()->clone();
+    igvn->replace_input_of(cmp, 2, new_limit);
     Node* bol = inner_cle->in(CountedLoopEndNode::TestValue)->clone();
     cmp->set_req(2, limit);
     bol->set_req(1, igvn->transform(cmp));
--- a/src/hotspot/share/opto/loopnode.hpp	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/hotspot/share/opto/loopnode.hpp	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -215,6 +215,7 @@
 
   Node *init_control() const { return in(EntryControl); }
   Node *back_control() const { return in(LoopBackControl); }
+  CountedLoopEndNode *loopexit_or_null() const;
   CountedLoopEndNode *loopexit() const;
   Node *init_trip() const;
   Node *stride() const;
@@ -342,7 +343,7 @@
       return NULL;
     }
     Node *ln = iv_phi->in(0);
-    if (ln->is_CountedLoop() && ln->as_CountedLoop()->loopexit() == this) {
+    if (ln->is_CountedLoop() && ln->as_CountedLoop()->loopexit_or_null() == this) {
       return (CountedLoopNode*)ln;
     }
     return NULL;
@@ -354,7 +355,7 @@
 };
 
 
-inline CountedLoopEndNode *CountedLoopNode::loopexit() const {
+inline CountedLoopEndNode *CountedLoopNode::loopexit_or_null() const {
   Node *bc = back_control();
   if( bc == NULL ) return NULL;
   Node *le = bc->in(0);
@@ -362,13 +363,18 @@
     return NULL;
   return (CountedLoopEndNode*)le;
 }
-inline Node *CountedLoopNode::init_trip() const { return loopexit() ? loopexit()->init_trip() : NULL; }
-inline Node *CountedLoopNode::stride() const { return loopexit() ? loopexit()->stride() : NULL; }
-inline int CountedLoopNode::stride_con() const { return loopexit() ? loopexit()->stride_con() : 0; }
-inline bool CountedLoopNode::stride_is_con() const { return loopexit() && loopexit()->stride_is_con(); }
-inline Node *CountedLoopNode::limit() const { return loopexit() ? loopexit()->limit() : NULL; }
-inline Node *CountedLoopNode::incr() const { return loopexit() ? loopexit()->incr() : NULL; }
-inline Node *CountedLoopNode::phi() const { return loopexit() ? loopexit()->phi() : NULL; }
+inline CountedLoopEndNode *CountedLoopNode::loopexit() const {
+  CountedLoopEndNode* cle = loopexit_or_null();
+  assert(cle != NULL, "loopexit is NULL");
+  return cle;
+}
+inline Node *CountedLoopNode::init_trip() const { return loopexit_or_null() ? loopexit()->init_trip() : NULL; }
+inline Node *CountedLoopNode::stride() const { return loopexit_or_null() ? loopexit()->stride() : NULL; }
+inline int CountedLoopNode::stride_con() const { return loopexit_or_null() ? loopexit()->stride_con() : 0; }
+inline bool CountedLoopNode::stride_is_con() const { return loopexit_or_null() && loopexit()->stride_is_con(); }
+inline Node *CountedLoopNode::limit() const { return loopexit_or_null() ? loopexit()->limit() : NULL; }
+inline Node *CountedLoopNode::incr() const { return loopexit_or_null() ? loopexit()->incr() : NULL; }
+inline Node *CountedLoopNode::phi() const { return loopexit_or_null() ? loopexit()->phi() : NULL; }
 
 //------------------------------LoopLimitNode-----------------------------
 // Counted Loop limit node which represents exact final iterator value:
--- a/src/hotspot/share/opto/loopopts.cpp	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/hotspot/share/opto/loopopts.cpp	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -239,7 +239,7 @@
   // Make control-dependent data Nodes on the live path (path that will remain
   // once the dominated IF is removed) become control-dependent on the
   // dominating projection.
-  Node* dp = iff->as_If()->proj_out(pop == Op_IfTrue);
+  Node* dp = iff->as_If()->proj_out_or_null(pop == Op_IfTrue);
 
   // Loop predicates may have depending checks which should not
   // be skipped. For example, range check predicate has two checks
@@ -1731,7 +1731,7 @@
     Node* sfpt = cl->outer_safepoint();
     CountedLoopEndNode* cle = cl->loopexit();
     CountedLoopNode* new_cl = old_new[cl->_idx]->as_CountedLoop();
-    CountedLoopEndNode* new_cle = new_cl->as_CountedLoop()->loopexit();
+    CountedLoopEndNode* new_cle = new_cl->as_CountedLoop()->loopexit_or_null();
     Node* cle_out = cle->proj_out(false);
 
     Node* new_sfpt = NULL;
@@ -1956,7 +1956,7 @@
         if (head->is_strip_mined() && mode != IgnoreStripMined) {
           CountedLoopNode* cl = head->as_CountedLoop();
           CountedLoopEndNode* cle = cl->loopexit();
-          Node* cle_out = cle->proj_out(false);
+          Node* cle_out = cle->proj_out_or_null(false);
           if (use == cle_out) {
             IfNode* le = cl->outer_loop_end();
             use = le->proj_out(false);
--- a/src/hotspot/share/opto/macro.cpp	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/hotspot/share/opto/macro.cpp	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -496,7 +496,7 @@
   if (level <= 0) {
     return NULL; // Give up: phi tree too deep
   }
-  Node *start_mem = C->start()->proj_out(TypeFunc::Memory);
+  Node *start_mem = C->start()->proj_out_or_null(TypeFunc::Memory);
   Node *alloc_mem = alloc->in(TypeFunc::Memory);
 
   uint length = mem->req();
@@ -576,7 +576,7 @@
 
   int alias_idx = C->get_alias_index(adr_t);
   int offset = adr_t->offset();
-  Node *start_mem = C->start()->proj_out(TypeFunc::Memory);
+  Node *start_mem = C->start()->proj_out_or_null(TypeFunc::Memory);
   Node *alloc_ctrl = alloc->in(TypeFunc::Control);
   Node *alloc_mem = alloc->in(TypeFunc::Memory);
   Arena *a = Thread::current()->resource_area();
@@ -974,8 +974,8 @@
 }
 
 static void disconnect_projections(MultiNode* n, PhaseIterGVN& igvn) {
-  Node* ctl_proj = n->proj_out(TypeFunc::Control);
-  Node* mem_proj = n->proj_out(TypeFunc::Memory);
+  Node* ctl_proj = n->proj_out_or_null(TypeFunc::Control);
+  Node* mem_proj = n->proj_out_or_null(TypeFunc::Memory);
   if (ctl_proj != NULL) {
     igvn.replace_node(ctl_proj, n->in(0));
   }
@@ -1086,12 +1086,12 @@
         // Eliminate Initialize node.
         InitializeNode *init = use->as_Initialize();
         assert(init->outcnt() <= 2, "only a control and memory projection expected");
-        Node *ctrl_proj = init->proj_out(TypeFunc::Control);
+        Node *ctrl_proj = init->proj_out_or_null(TypeFunc::Control);
         if (ctrl_proj != NULL) {
            assert(init->in(TypeFunc::Control) == _fallthroughcatchproj, "allocation control projection");
           _igvn.replace_node(ctrl_proj, _fallthroughcatchproj);
         }
-        Node *mem_proj = init->proj_out(TypeFunc::Memory);
+        Node *mem_proj = init->proj_out_or_null(TypeFunc::Memory);
         if (mem_proj != NULL) {
           Node *mem = init->in(TypeFunc::Memory);
 #ifdef ASSERT
@@ -1198,7 +1198,7 @@
 
 bool PhaseMacroExpand::eliminate_boxing_node(CallStaticJavaNode *boxing) {
   // EA should remove all uses of non-escaping boxing node.
-  if (!C->eliminate_boxing() || boxing->proj_out(TypeFunc::Parms) != NULL) {
+  if (!C->eliminate_boxing() || boxing->proj_out_or_null(TypeFunc::Parms) != NULL) {
     return false;
   }
 
@@ -1580,8 +1580,8 @@
         // before the InitializeNode happen before the storestore
         // barrier.
 
-        Node* init_ctrl = init->proj_out(TypeFunc::Control);
-        Node* init_mem = init->proj_out(TypeFunc::Memory);
+        Node* init_ctrl = init->proj_out_or_null(TypeFunc::Control);
+        Node* init_mem = init->proj_out_or_null(TypeFunc::Memory);
 
         MemBarNode* mb = MemBarNode::make(C, Op_MemBarStoreStore, Compile::AliasIdxBot);
         transform_later(mb);
--- a/src/hotspot/share/opto/memnode.cpp	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/hotspot/share/opto/memnode.cpp	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -136,7 +136,7 @@
   if (!(is_instance || is_boxed_value_load))
     return mchain;  // don't try to optimize non-instance types
   uint instance_id = t_oop->instance_id();
-  Node *start_mem = phase->C->start()->proj_out(TypeFunc::Memory);
+  Node *start_mem = phase->C->start()->proj_out_or_null(TypeFunc::Memory);
   Node *prev = NULL;
   Node *result = mchain;
   while (prev != result) {
--- a/src/hotspot/share/opto/multnode.cpp	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/hotspot/share/opto/multnode.cpp	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -43,8 +43,8 @@
 Node *MultiNode::match( const ProjNode *proj, const Matcher *m ) { return proj->clone(); }
 
 //------------------------------proj_out---------------------------------------
-// Get a named projection
-ProjNode* MultiNode::proj_out(uint which_proj) const {
+// Get a named projection or null if not found
+ProjNode* MultiNode::proj_out_or_null(uint which_proj) const {
   assert((Opcode() != Op_If && Opcode() != Op_RangeCheck) || which_proj == (uint)true || which_proj == (uint)false, "must be 1 or 0");
   assert((Opcode() != Op_If && Opcode() != Op_RangeCheck) || outcnt() == 2, "bad if #1");
   for( DUIterator_Fast imax, i = fast_outs(imax); i < imax; i++ ) {
@@ -63,6 +63,13 @@
   return NULL;
 }
 
+// Get a named projection
+ProjNode* MultiNode::proj_out(uint which_proj) const {
+  ProjNode* p = proj_out_or_null(which_proj);
+  assert(p != NULL, "named projection %u not found", which_proj);
+  return p;
+}
+
 //=============================================================================
 //------------------------------ProjNode---------------------------------------
 uint ProjNode::hash() const {
@@ -214,8 +221,6 @@
   }
 
   ProjNode* other_proj = iff->proj_out(1-_con);
-  if (other_proj == NULL) // Should never happen, but make Parfait happy.
-      return NULL;
   CallStaticJavaNode* call = other_proj->is_uncommon_trap_proj(reason);
   if (call != NULL) {
     assert(reason == Deoptimization::Reason_none ||
--- a/src/hotspot/share/opto/multnode.hpp	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/hotspot/share/opto/multnode.hpp	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -47,6 +47,7 @@
   virtual Node *match( const ProjNode *proj, const Matcher *m );
   virtual uint ideal_reg() const { return NotAMachineReg; }
   ProjNode* proj_out(uint which_proj) const; // Get a named projection
+  ProjNode* proj_out_or_null(uint which_proj) const;
 
 };
 
--- a/src/hotspot/share/opto/phaseX.cpp	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/hotspot/share/opto/phaseX.cpp	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -1524,7 +1524,7 @@
     // receiver to know when to enable the regular fall-through path
     // in addition to the NullPtrException path.
     if (use->is_CallDynamicJava() && n == use->in(TypeFunc::Parms)) {
-      Node* p = use->as_CallDynamicJava()->proj_out(TypeFunc::Control);
+      Node* p = use->as_CallDynamicJava()->proj_out_or_null(TypeFunc::Control);
       if (p != NULL) {
         add_users_to_worklist0(p);
       }
@@ -1617,12 +1617,12 @@
     if (use_op == Op_Allocate || use_op == Op_AllocateArray) {
       InitializeNode* init = use->as_Allocate()->initialization();
       if (init != NULL) {
-        Node* imem = init->proj_out(TypeFunc::Memory);
+        Node* imem = init->proj_out_or_null(TypeFunc::Memory);
         if (imem != NULL)  add_users_to_worklist0(imem);
       }
     }
     if (use_op == Op_Initialize) {
-      Node* imem = use->as_Initialize()->proj_out(TypeFunc::Memory);
+      Node* imem = use->as_Initialize()->proj_out_or_null(TypeFunc::Memory);
       if (imem != NULL)  add_users_to_worklist0(imem);
     }
     // Loading the java mirror from a klass oop requires two loads and the type
--- a/src/hotspot/share/opto/stringopts.cpp	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/hotspot/share/opto/stringopts.cpp	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -362,11 +362,11 @@
   // Eliminate Initialize node.
   assert(init->outcnt() <= 2, "only a control and memory projection expected");
   assert(init->req() <= InitializeNode::RawStores, "no pending inits");
-  Node *ctrl_proj = init->proj_out(TypeFunc::Control);
+  Node *ctrl_proj = init->proj_out_or_null(TypeFunc::Control);
   if (ctrl_proj != NULL) {
     C->gvn_replace_by(ctrl_proj, init->in(TypeFunc::Control));
   }
-  Node *mem_proj = init->proj_out(TypeFunc::Memory);
+  Node *mem_proj = init->proj_out_or_null(TypeFunc::Memory);
   if (mem_proj != NULL) {
     Node *mem = init->in(TypeFunc::Memory);
     C->gvn_replace_by(mem_proj, mem);
@@ -891,7 +891,7 @@
       ctrl_path.push(cn);
       ctrl_path.push(cn->proj_out(0));
       ctrl_path.push(cn->proj_out(0)->unique_out());
-      Node* catchproj = cn->proj_out(0)->unique_out()->as_Catch()->proj_out(0);
+      Node* catchproj = cn->proj_out(0)->unique_out()->as_Catch()->proj_out_or_null(0);
       if (catchproj != NULL) {
         ctrl_path.push(catchproj);
       }
@@ -1035,13 +1035,13 @@
   // by calls in the region.
   _stringopts->_visited.Clear();
   Node_List worklist;
-  Node* final_result = _end->proj_out(TypeFunc::Parms);
+  Node* final_result = _end->proj_out_or_null(TypeFunc::Parms);
   for (uint i = 0; i < _control.size(); i++) {
     CallNode* cnode = _control.at(i)->isa_Call();
     if (cnode != NULL) {
       _stringopts->_visited.test_set(cnode->_idx);
     }
-    Node* result = cnode != NULL ? cnode->proj_out(TypeFunc::Parms) : NULL;
+    Node* result = cnode != NULL ? cnode->proj_out_or_null(TypeFunc::Parms) : NULL;
     if (result != NULL && result != final_result) {
       worklist.push(result);
     }
--- a/src/hotspot/share/opto/superword.cpp	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/hotspot/share/opto/superword.cpp	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -190,7 +190,7 @@
   int *ignored_loop_nodes = NEW_RESOURCE_ARRAY(int, ignored_size);
   Node_Stack nstack((int)ignored_size);
   CountedLoopNode *cl = lpt()->_head->as_CountedLoop();
-  Node *cl_exit = cl->loopexit();
+  Node *cl_exit = cl->loopexit_or_null();
   int rpo_idx = _post_block.length();
 
   assert(rpo_idx == 0, "post loop block is empty");
--- a/src/hotspot/share/prims/jni.cpp	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/hotspot/share/prims/jni.cpp	Tue Jan 30 16:41:40 2018 +0100
@@ -2814,7 +2814,7 @@
   EntryProbe; \
   DT_VOID_RETURN_MARK(Get##Result##ArrayRegion); \
   typeArrayOop src = typeArrayOop(JNIHandles::resolve_non_null(array)); \
-  if (start < 0 || len < 0 || ((unsigned int)start + (unsigned int)len > (unsigned int)src->length())) { \
+  if (start < 0 || len < 0 || (start > src->length() - len)) { \
     THROW(vmSymbols::java_lang_ArrayIndexOutOfBoundsException()); \
   } else { \
     if (len > 0) { \
@@ -2864,7 +2864,7 @@
   EntryProbe; \
   DT_VOID_RETURN_MARK(Set##Result##ArrayRegion); \
   typeArrayOop dst = typeArrayOop(JNIHandles::resolve_non_null(array)); \
-  if (start < 0 || len < 0 || ((unsigned int)start + (unsigned int)len > (unsigned int)dst->length())) { \
+  if (start < 0 || len < 0 || (start > dst->length() - len)) { \
     THROW(vmSymbols::java_lang_ArrayIndexOutOfBoundsException()); \
   } else { \
     if (len > 0) { \
@@ -3100,7 +3100,7 @@
   DT_VOID_RETURN_MARK(GetStringRegion);
   oop s = JNIHandles::resolve_non_null(string);
   int s_len = java_lang_String::length(s);
-  if (start < 0 || len < 0 || start + len > s_len) {
+  if (start < 0 || len < 0 || start > s_len - len) {
     THROW(vmSymbols::java_lang_StringIndexOutOfBoundsException());
   } else {
     if (len > 0) {
@@ -3126,7 +3126,7 @@
   DT_VOID_RETURN_MARK(GetStringUTFRegion);
   oop s = JNIHandles::resolve_non_null(string);
   int s_len = java_lang_String::length(s);
-  if (start < 0 || len < 0 || start + len > s_len) {
+  if (start < 0 || len < 0 || start > s_len - len) {
     THROW(vmSymbols::java_lang_StringIndexOutOfBoundsException());
   } else {
     //%note jni_7
--- a/src/hotspot/share/prims/methodHandles.cpp	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/hotspot/share/prims/methodHandles.cpp	Tue Jan 30 16:41:40 2018 +0100
@@ -122,6 +122,48 @@
   ALL_KINDS      = IS_METHOD | IS_CONSTRUCTOR | IS_FIELD | IS_TYPE
 };
 
+int MethodHandles::ref_kind_to_flags(int ref_kind) {
+  assert(ref_kind_is_valid(ref_kind), "%d", ref_kind);
+  int flags = (ref_kind << REFERENCE_KIND_SHIFT);
+  if (ref_kind_is_field(ref_kind)) {
+    flags |= IS_FIELD;
+  } else if (ref_kind_is_method(ref_kind)) {
+    flags |= IS_METHOD;
+  } else if (ref_kind == JVM_REF_newInvokeSpecial) {
+    flags |= IS_CONSTRUCTOR;
+  }
+  return flags;
+}
+
+Handle MethodHandles::resolve_MemberName_type(Handle mname, Klass* caller, TRAPS) {
+  Handle empty;
+  Handle type(THREAD, java_lang_invoke_MemberName::type(mname()));
+  if (!java_lang_String::is_instance_inlined(type())) {
+    return type; // already resolved
+  }
+  Symbol* signature = java_lang_String::as_symbol_or_null(type());
+  if (signature == NULL) {
+    return empty;  // no such signature exists in the VM
+  }
+  Handle resolved;
+  int flags = java_lang_invoke_MemberName::flags(mname());
+  switch (flags & ALL_KINDS) {
+    case IS_METHOD:
+    case IS_CONSTRUCTOR:
+      resolved = SystemDictionary::find_method_handle_type(signature, caller, CHECK_(empty));
+      break;
+    case IS_FIELD:
+      resolved = SystemDictionary::find_field_handle_type(signature, caller, CHECK_(empty));
+      break;
+    default:
+      THROW_MSG_(vmSymbols::java_lang_InternalError(), "unrecognized MemberName format", empty);
+  }
+  if (resolved.is_null()) {
+    THROW_MSG_(vmSymbols::java_lang_InternalError(), "bad MemberName type", empty);
+  }
+  return resolved;
+}
+
 oop MethodHandles::init_MemberName(Handle mname, Handle target, TRAPS) {
   // This method is used from java.lang.invoke.MemberName constructors.
   // It fills in the new MemberName from a java.lang.reflect.Member.
--- a/src/hotspot/share/prims/methodHandles.hpp	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/hotspot/share/prims/methodHandles.hpp	Tue Jan 30 16:41:40 2018 +0100
@@ -70,6 +70,8 @@
   static int find_MemberNames(Klass* k, Symbol* name, Symbol* sig,
                               int mflags, Klass* caller,
                               int skip, objArrayHandle results, TRAPS);
+  static Handle resolve_MemberName_type(Handle mname, Klass* caller, TRAPS);
+
   // bit values for suppress argument to expand_MemberName:
   enum { _suppress_defc = 1, _suppress_name = 2, _suppress_type = 4 };
 
@@ -191,6 +193,8 @@
             ref_kind == JVM_REF_invokeInterface);
   }
 
+  static int ref_kind_to_flags(int ref_kind);
+
 #include CPU_HEADER(methodHandles)
 
   // Tracing
--- a/src/hotspot/share/runtime/arguments.cpp	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/hotspot/share/runtime/arguments.cpp	Tue Jan 30 16:41:40 2018 +0100
@@ -63,7 +63,11 @@
 #endif
 
 // Note: This is a special bug reporting site for the JVM
-#define DEFAULT_VENDOR_URL_BUG "http://bugreport.java.com/bugreport/crash.jsp"
+#ifdef VENDOR_URL_VM_BUG
+# define DEFAULT_VENDOR_URL_BUG VENDOR_URL_VM_BUG
+#else
+# define DEFAULT_VENDOR_URL_BUG "http://bugreport.java.com/bugreport/crash.jsp"
+#endif
 #define DEFAULT_JAVA_LAUNCHER  "generic"
 
 char*  Arguments::_jvm_flags_file               = NULL;
--- a/src/hotspot/share/runtime/safepointMechanism.cpp	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/hotspot/share/runtime/safepointMechanism.cpp	Tue Jan 30 16:41:40 2018 +0100
@@ -36,23 +36,39 @@
 void SafepointMechanism::default_initialize() {
   if (ThreadLocalHandshakes) {
     set_uses_thread_local_poll();
-    const size_t page_size = os::vm_page_size();
-    const size_t allocation_size = 2 * page_size;
-    char* polling_page = os::reserve_memory(allocation_size, NULL, page_size);
-    os::commit_memory_or_exit(polling_page, allocation_size, false, "Unable to commit Safepoint polling page");
+
+    // Poll bit values
+    intptr_t poll_armed_value = poll_bit();
+    intptr_t poll_disarmed_value = 0;
 
-    char* bad_page  = polling_page;
-    char* good_page = polling_page + page_size;
+#ifdef USE_POLL_BIT_ONLY
+    if (!USE_POLL_BIT_ONLY)
+#endif
+    {
+      // Polling page
+      const size_t page_size = os::vm_page_size();
+      const size_t allocation_size = 2 * page_size;
+      char* polling_page = os::reserve_memory(allocation_size, NULL, page_size);
+      os::commit_memory_or_exit(polling_page, allocation_size, false, "Unable to commit Safepoint polling page");
 
-    os::protect_memory(bad_page, page_size, os::MEM_PROT_NONE);
-    os::protect_memory(good_page, page_size, os::MEM_PROT_READ);
+      char* bad_page  = polling_page;
+      char* good_page = polling_page + page_size;
+
+      os::protect_memory(bad_page,  page_size, os::MEM_PROT_NONE);
+      os::protect_memory(good_page, page_size, os::MEM_PROT_READ);
+
+      log_info(os)("SafePoint Polling address, bad (protected) page:" INTPTR_FORMAT ", good (unprotected) page:" INTPTR_FORMAT, p2i(bad_page), p2i(good_page));
+      os::set_polling_page((address)(bad_page));
 
-    log_info(os)("SafePoint Polling address, bad (protected) page:" INTPTR_FORMAT ", good (unprotected) page:" INTPTR_FORMAT, p2i(bad_page), p2i(good_page));
-    os::set_polling_page((address)(bad_page));
+      // Poll address values
+      intptr_t bad_page_val  = reinterpret_cast<intptr_t>(bad_page),
+               good_page_val = reinterpret_cast<intptr_t>(good_page);
+      poll_armed_value    |= bad_page_val;
+      poll_disarmed_value |= good_page_val;
+    }
 
-    intptr_t poll_page_val = reinterpret_cast<intptr_t>(bad_page);
-    _poll_armed_value = reinterpret_cast<void*>(poll_page_val | poll_bit());
-    _poll_disarmed_value = good_page;
+    _poll_armed_value    = reinterpret_cast<void*>(poll_armed_value);
+    _poll_disarmed_value = reinterpret_cast<void*>(poll_disarmed_value);
   } else {
     const size_t page_size = os::vm_page_size();
     char* polling_page = os::reserve_memory(page_size, NULL, page_size);
--- a/src/hotspot/share/runtime/vmStructs.cpp	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/hotspot/share/runtime/vmStructs.cpp	Tue Jan 30 16:41:40 2018 +0100
@@ -234,7 +234,7 @@
   nonstatic_field(ArrayKlass,                  _dimension,                                    int)                                   \
   volatile_nonstatic_field(ArrayKlass,         _higher_dimension,                             Klass*)                                \
   volatile_nonstatic_field(ArrayKlass,         _lower_dimension,                              Klass*)                                \
-  nonstatic_field(CompiledICHolder,            _holder_method,                                Method*)                               \
+  nonstatic_field(CompiledICHolder,            _holder_metadata,                              Metadata*)                               \
   nonstatic_field(CompiledICHolder,            _holder_klass,                                 Klass*)                                \
   nonstatic_field(ConstantPool,                _tags,                                         Array<u1>*)                            \
   nonstatic_field(ConstantPool,                _cache,                                        ConstantPoolCache*)                    \
--- a/src/java.base/macosx/native/libosxsecurity/KeystoreImpl.m	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.base/macosx/native/libosxsecurity/KeystoreImpl.m	Tue Jan 30 16:41:40 2018 +0100
@@ -439,6 +439,11 @@
                 goto errOut;
             }
             passwordStrRef = CFStringCreateWithCharacters(kCFAllocatorDefault, passwordChars, passwordLen);
+
+            // clear the password and release
+            memset(passwordChars, 0, passwordLen);
+            (*env)->ReleaseCharArrayElements(env, passwordObj, passwordChars,
+                JNI_ABORT);
         }
     }
 
@@ -527,8 +532,19 @@
 
     if (passwordObj) {
         passwordLen = (*env)->GetArrayLength(env, passwordObj);
-        passwordChars = (*env)->GetCharArrayElements(env, passwordObj, NULL);
-        passwordStrRef = CFStringCreateWithCharacters(kCFAllocatorDefault, passwordChars, passwordLen);
+
+        if (passwordLen > 0) {
+            passwordChars = (*env)->GetCharArrayElements(env, passwordObj, NULL);
+            if (passwordChars == NULL) {
+                goto errOut;
+            }
+            passwordStrRef = CFStringCreateWithCharacters(kCFAllocatorDefault, passwordChars, passwordLen);
+
+            // clear the password and release
+            memset(passwordChars, 0, passwordLen);
+            (*env)->ReleaseCharArrayElements(env, passwordObj, passwordChars,
+                JNI_ABORT);
+        }
     }
 
     paramBlock.version = SEC_KEY_IMPORT_EXPORT_PARAMS_VERSION;
--- a/src/java.base/share/classes/com/sun/crypto/provider/DESKey.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.base/share/classes/com/sun/crypto/provider/DESKey.java	Tue Jan 30 16:41:40 2018 +0100
@@ -25,6 +25,7 @@
 
 package com.sun.crypto.provider;
 
+import java.lang.ref.Reference;
 import java.security.MessageDigest;
 import java.security.KeyRep;
 import java.security.InvalidKeyException;
@@ -86,7 +87,12 @@
     public byte[] getEncoded() {
         // Return a copy of the key, rather than a reference,
         // so that the key data cannot be modified from outside
-        return this.key.clone();
+
+        // The key is zeroized by finalize()
+        // The reachability fence ensures finalize() isn't called early
+        byte[] result = key.clone();
+        Reference.reachabilityFence(this);
+        return result;
     }
 
     public String getAlgorithm() {
--- a/src/java.base/share/classes/com/sun/crypto/provider/DESedeKey.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.base/share/classes/com/sun/crypto/provider/DESedeKey.java	Tue Jan 30 16:41:40 2018 +0100
@@ -25,6 +25,7 @@
 
 package com.sun.crypto.provider;
 
+import java.lang.ref.Reference;
 import java.security.MessageDigest;
 import java.security.KeyRep;
 import java.security.InvalidKeyException;
@@ -86,7 +87,11 @@
     }
 
     public byte[] getEncoded() {
-        return this.key.clone();
+        // The key is zeroized by finalize()
+        // The reachability fence ensures finalize() isn't called early
+        byte[] result = key.clone();
+        Reference.reachabilityFence(this);
+        return result;
     }
 
     public String getAlgorithm() {
--- a/src/java.base/share/classes/com/sun/crypto/provider/DHKeyAgreement.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.base/share/classes/com/sun/crypto/provider/DHKeyAgreement.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 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
@@ -28,11 +28,13 @@
 import java.util.*;
 import java.lang.*;
 import java.math.BigInteger;
+import java.security.AccessController;
 import java.security.InvalidAlgorithmParameterException;
 import java.security.InvalidKeyException;
 import java.security.Key;
 import java.security.NoSuchAlgorithmException;
 import java.security.SecureRandom;
+import java.security.PrivilegedAction;
 import java.security.ProviderException;
 import java.security.spec.AlgorithmParameterSpec;
 import java.security.spec.InvalidKeySpecException;
@@ -60,6 +62,17 @@
     private BigInteger x = BigInteger.ZERO; // the private value
     private BigInteger y = BigInteger.ZERO;
 
+    private static class AllowKDF {
+
+        private static final boolean VALUE = getValue();
+
+        private static boolean getValue() {
+            return AccessController.doPrivileged(
+                (PrivilegedAction<Boolean>)
+                () -> Boolean.getBoolean("jdk.crypto.KeyAgreement.legacyKDF"));
+        }
+    }
+
     /**
      * Empty constructor
      */
@@ -367,6 +380,14 @@
         if (algorithm == null) {
             throw new NoSuchAlgorithmException("null algorithm");
         }
+
+        if (!algorithm.equalsIgnoreCase("TlsPremasterSecret") &&
+            !AllowKDF.VALUE) {
+
+            throw new NoSuchAlgorithmException("Unsupported secret key "
+                                               + "algorithm: " + algorithm);
+        }
+
         byte[] secret = engineGenerateSecret();
         if (algorithm.equalsIgnoreCase("DES")) {
             // DES
--- a/src/java.base/share/classes/com/sun/crypto/provider/PBEKey.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.base/share/classes/com/sun/crypto/provider/PBEKey.java	Tue Jan 30 16:41:40 2018 +0100
@@ -25,6 +25,7 @@
 
 package com.sun.crypto.provider;
 
+import java.lang.ref.Reference;
 import java.security.MessageDigest;
 import java.security.KeyRep;
 import java.security.spec.InvalidKeySpecException;
@@ -80,7 +81,11 @@
     }
 
     public byte[] getEncoded() {
-        return this.key.clone();
+        // The key is zeroized by finalize()
+        // The reachability fence ensures finalize() isn't called early
+        byte[] result = key.clone();
+        Reference.reachabilityFence(this);
+        return result;
     }
 
     public String getAlgorithm() {
--- a/src/java.base/share/classes/com/sun/crypto/provider/PBKDF2KeyImpl.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.base/share/classes/com/sun/crypto/provider/PBKDF2KeyImpl.java	Tue Jan 30 16:41:40 2018 +0100
@@ -26,6 +26,7 @@
 package com.sun.crypto.provider;
 
 import java.io.ObjectStreamException;
+import java.lang.ref.Reference;
 import java.nio.ByteBuffer;
 import java.nio.CharBuffer;
 import java.nio.charset.Charset;
@@ -208,7 +209,11 @@
     }
 
     public byte[] getEncoded() {
-        return key.clone();
+        // The key is zeroized by finalize()
+        // The reachability fence ensures finalize() isn't called early
+        byte[] result = key.clone();
+        Reference.reachabilityFence(this);
+        return result;
     }
 
     public String getAlgorithm() {
@@ -220,7 +225,11 @@
     }
 
     public char[] getPassword() {
-        return passwd.clone();
+        // The password is zeroized by finalize()
+        // The reachability fence ensures finalize() isn't called early
+        char[] result = passwd.clone();
+        Reference.reachabilityFence(this);
+        return result;
     }
 
     public byte[] getSalt() {
--- a/src/java.base/share/classes/com/sun/java/util/jar/pack/Driver.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.base/share/classes/com/sun/java/util/jar/pack/Driver.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -162,11 +162,12 @@
                         engProps.put((String) me.getKey(), (String) me.getValue());
                     }
                 } else if ("--version".equals(state)) {
-                        System.out.println(MessageFormat.format(RESOURCE.getString(DriverResource.VERSION), Driver.class.getName(), "1.31, 07/05/05"));
+                        System.out.println(MessageFormat.format(RESOURCE.getString(DriverResource.VERSION),
+                                                                Driver.class.getName(), "1.31, 07/05/05"));
                     return;
                 } else if ("--help".equals(state)) {
                     printUsage(doPack, true, System.out);
-                    System.exit(1);
+                    System.exit(0);
                     return;
                 } else {
                     break;
--- a/src/java.base/share/classes/com/sun/java/util/jar/pack/DriverResource.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.base/share/classes/com/sun/java/util/jar/pack/DriverResource.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -89,7 +89,7 @@
                 "  -q, --quiet                     set verbosity to lowest level",
                 "  -l{F}, --log-file={F}           output to the given log file, ",
                 "                                  or '-' for System.out",
-                "  -?, -h, --help                  print this message",
+                "  -?, -h, --help                  print this help message",
                 "  -V, --version                   print program version",
                 "  -J{X}                           pass option X to underlying Java VM",
                 "",
@@ -118,7 +118,7 @@
                 "  -q, --quiet                   set verbosity to lowest level",
                 "  -l{F}, --log-file={F}         output to the given log file, or",
                 "                                '-' for System.out",
-                "  -?, -h, --help                print this message",
+                "  -?, -h, --help                print this help message",
                 "  -V, --version                 print program version",
                 "  -J{X}                         pass option X to underlying Java VM"
             }
--- a/src/java.base/share/classes/java/lang/ClassLoader.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.base/share/classes/java/lang/ClassLoader.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1876,14 +1876,15 @@
      * value until the system is fully initialized.
      *
      * <p> The name of the built-in system class loader is {@code "app"}.
-     * The class path used by the built-in system class loader is determined
-     * by the system property "{@code java.class.path}" during early
-     * initialization of the VM. If the system property is not defined,
-     * or its value is an empty string, then there is no class path
-     * when the initial module is a module on the application module path,
-     * i.e. <em>a named module</em>. If the initial module is not on
-     * the application module path then the class path defaults to
-     * the current working directory.
+     * The system property "{@code java.class.path}" is read during early
+     * initialization of the VM to determine the class path.
+     * An empty value of "{@code java.class.path}" property is interpreted
+     * differently depending on whether the initial module (the module
+     * containing the main class) is named or unnamed:
+     * If named, the built-in system class loader will have no class path and
+     * will search for classes and resources using the application module path;
+     * otherwise, if unnamed, it will set the class path to the current
+     * working directory.
      *
      * @return  The system {@code ClassLoader}
      *
--- a/src/java.base/share/classes/java/lang/Runtime.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.base/share/classes/java/lang/Runtime.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -1099,16 +1099,23 @@
                     m.group(VersionPattern.OPT_GROUP));
 
             // empty '+'
-            if ((m.group(VersionPattern.PLUS_GROUP) != null)
-                    && !build.isPresent()) {
-                if (optional.isPresent()) {
-                    if (pre.isPresent())
-                        throw new IllegalArgumentException("'+' found with"
-                            + " pre-release and optional components:'" + s
-                            + "'");
+            if (!build.isPresent()) {
+                if (m.group(VersionPattern.PLUS_GROUP) != null) {
+                    if (optional.isPresent()) {
+                        if (pre.isPresent())
+                            throw new IllegalArgumentException("'+' found with"
+                                + " pre-release and optional components:'" + s
+                                + "'");
+                    } else {
+                        throw new IllegalArgumentException("'+' found with neither"
+                            + " build or optional components: '" + s + "'");
+                    }
                 } else {
-                    throw new IllegalArgumentException("'+' found with neither"
-                        + " build or optional components: '" + s + "'");
+                    if (optional.isPresent() && !pre.isPresent()) {
+                        throw new IllegalArgumentException("optional component"
+                            + " must be preceeded by a pre-release component"
+                            + " or '+': '" + s + "'");
+                    }
                 }
             }
             return new Version(List.of(version), pre, build, optional);
--- a/src/java.base/share/classes/java/lang/System.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.base/share/classes/java/lang/System.java	Tue Jan 30 16:41:40 2018 +0100
@@ -631,7 +631,8 @@
      * <tr><th scope="row"><code>java.class.version</code></th>
      *     <td>Java class format version number</td></tr>
      * <tr><th scope="row"><code>java.class.path</code></th>
-     *     <td>Java class path</td></tr>
+     *     <td>Java class path  (refer to
+     *        {@link ClassLoader#getSystemClassLoader()} for details)</td></tr>
      * <tr><th scope="row"><code>java.library.path</code></th>
      *     <td>List of paths to search when loading libraries</td></tr>
      * <tr><th scope="row"><code>java.io.tmpdir</code></th>
--- a/src/java.base/share/classes/java/lang/VersionProps.java.template	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.base/share/classes/java/lang/VersionProps.java.template	Tue Jan 30 16:41:40 2018 +0100
@@ -166,15 +166,8 @@
      * Print version info.
      */
     private static void print(boolean err, boolean newln) {
-        boolean isHeadless = false;
         PrintStream ps = err ? System.err : System.out;
 
-        /* Report that we're running headless if the property is true */
-        String headless = System.getProperty("java.awt.headless");
-        if ( (headless != null) && (headless.equalsIgnoreCase("true")) ) {
-            isHeadless = true;
-        }
-
         /* First line: platform version. */
         if (err) {
             ps.println(launcher_name + " version \"" + java_version + "\""
--- a/src/java.base/share/classes/java/lang/invoke/DirectMethodHandle.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.base/share/classes/java/lang/invoke/DirectMethodHandle.java	Tue Jan 30 16:41:40 2018 +0100
@@ -80,13 +80,20 @@
             mtype = mtype.insertParameterTypes(0, receiver);
         }
         if (!member.isField()) {
-            if (refKind == REF_invokeSpecial) {
-                member = member.asSpecial();
-                LambdaForm lform = preparedLambdaForm(member);
-                return new Special(mtype, lform, member);
-            } else {
-                LambdaForm lform = preparedLambdaForm(member);
-                return new DirectMethodHandle(mtype, lform, member);
+            switch (refKind) {
+                case REF_invokeSpecial: {
+                    member = member.asSpecial();
+                    LambdaForm lform = preparedLambdaForm(member);
+                    return new Special(mtype, lform, member);
+                }
+                case REF_invokeInterface: {
+                    LambdaForm lform = preparedLambdaForm(member);
+                    return new Interface(mtype, lform, member, receiver);
+                }
+                default: {
+                    LambdaForm lform = preparedLambdaForm(member);
+                    return new DirectMethodHandle(mtype, lform, member);
+                }
             }
         } else {
             LambdaForm lform = preparedFieldLambdaForm(member);
@@ -190,6 +197,7 @@
     static LambdaForm makePreparedLambdaForm(MethodType mtype, int which) {
         boolean needsInit = (which == LF_INVSTATIC_INIT);
         boolean doesAlloc = (which == LF_NEWINVSPECIAL);
+        boolean needsReceiverCheck = (which == LF_INVINTERFACE);
         String linkerName;
         LambdaForm.Kind kind;
         switch (which) {
@@ -219,6 +227,7 @@
         int nameCursor = ARG_LIMIT;
         final int NEW_OBJ     = (doesAlloc ? nameCursor++ : -1);
         final int GET_MEMBER  = nameCursor++;
+        final int CHECK_RECEIVER = (needsReceiverCheck ? nameCursor++ : -1);
         final int LINKER_CALL = nameCursor++;
         Name[] names = arguments(nameCursor - ARG_LIMIT, mtype.invokerType());
         assert(names.length == nameCursor);
@@ -233,6 +242,10 @@
         }
         assert(findDirectMethodHandle(names[GET_MEMBER]) == names[DMH_THIS]);
         Object[] outArgs = Arrays.copyOfRange(names, ARG_BASE, GET_MEMBER+1, Object[].class);
+        if (needsReceiverCheck) {
+            names[CHECK_RECEIVER] = new Name(getFunction(NF_checkReceiver), names[DMH_THIS], names[ARG_BASE]);
+            outArgs[0] = names[CHECK_RECEIVER];
+        }
         assert(outArgs[outArgs.length-1] == names[GET_MEMBER]);  // look, shifted args!
         int result = LAST_RESULT;
         if (doesAlloc) {
@@ -376,6 +389,29 @@
         }
     }
 
+    /** This subclass represents invokeinterface instructions. */
+    static class Interface extends DirectMethodHandle {
+        private final Class<?> refc;
+        private Interface(MethodType mtype, LambdaForm form, MemberName member, Class<?> refc) {
+            super(mtype, form, member);
+            assert refc.isInterface() : refc;
+            this.refc = refc;
+        }
+        @Override
+        MethodHandle copyWith(MethodType mt, LambdaForm lf) {
+            return new Interface(mt, lf, member, refc);
+        }
+
+        Object checkReceiver(Object recv) {
+            if (!refc.isInstance(recv)) {
+                String msg = String.format("Class %s does not implement the requested interface %s",
+                        recv.getClass().getName(), refc.getName());
+                throw new IncompatibleClassChangeError(msg);
+            }
+            return recv;
+        }
+    }
+
     /** This subclass handles constructor references. */
     static class Constructor extends DirectMethodHandle {
         final MemberName initMethod;
@@ -738,7 +774,8 @@
             NF_allocateInstance = 8,
             NF_constructorMethod = 9,
             NF_UNSAFE = 10,
-            NF_LIMIT = 11;
+            NF_checkReceiver = 11,
+            NF_LIMIT = 12;
 
     private static final @Stable NamedFunction[] NFS = new NamedFunction[NF_LIMIT];
 
@@ -785,6 +822,11 @@
                     return new NamedFunction(
                             MemberName.getFactory()
                                     .resolveOrFail(REF_getField, member, DirectMethodHandle.class, NoSuchMethodException.class));
+                case NF_checkReceiver:
+                    member = new MemberName(Interface.class, "checkReceiver", OBJ_OBJ_TYPE, REF_invokeVirtual);
+                    return new NamedFunction(
+                        MemberName.getFactory()
+                            .resolveOrFail(REF_invokeVirtual, member, Interface.class, NoSuchMethodException.class));
                 default:
                     throw newInternalError("Unknown function: " + func);
             }
--- a/src/java.base/share/classes/java/lang/invoke/MemberName.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.base/share/classes/java/lang/invoke/MemberName.java	Tue Jan 30 16:41:40 2018 +0100
@@ -900,9 +900,9 @@
             buf.append(getName(clazz));
             buf.append('.');
         }
-        String name = getName();
+        String name = this.name; // avoid expanding from VM
         buf.append(name == null ? "*" : name);
-        Object type = getType();
+        Object type = this.type; // avoid expanding from VM
         if (!isInvocable()) {
             buf.append('/');
             buf.append(type == null ? "*" : getName(type));
--- a/src/java.base/share/classes/java/lang/invoke/MethodHandles.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.base/share/classes/java/lang/invoke/MethodHandles.java	Tue Jan 30 16:41:40 2018 +0100
@@ -3766,6 +3766,7 @@
      * specified in the elements of the {@code filters} array.
      * The first element of the filter array corresponds to the {@code pos}
      * argument of the target, and so on in sequence.
+     * The filter functions are invoked in left to right order.
      * <p>
      * Null arguments in the array are treated as identity functions,
      * and the corresponding arguments left unchanged.
@@ -3836,11 +3837,12 @@
     MethodHandle filterArguments(MethodHandle target, int pos, MethodHandle... filters) {
         filterArgumentsCheckArity(target, pos, filters);
         MethodHandle adapter = target;
-        int curPos = pos-1;  // pre-incremented
-        for (MethodHandle filter : filters) {
-            curPos += 1;
+        // process filters in reverse order so that the invocation of
+        // the resulting adapter will invoke the filters in left-to-right order
+        for (int i = filters.length - 1; i >= 0; --i) {
+            MethodHandle filter = filters[i];
             if (filter == null)  continue;  // ignore null elements of filters
-            adapter = filterArgument(adapter, curPos, filter);
+            adapter = filterArgument(adapter, pos + i, filter);
         }
         return adapter;
     }
--- a/src/java.base/share/classes/java/net/Inet6Address.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.base/share/classes/java/net/Inet6Address.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -595,7 +595,7 @@
         }
 
         ObjectInputStream.GetField gf = s.readFields();
-        byte[] ipaddress = (byte[])gf.get("ipaddress", null);
+        byte[] ipaddress = (byte[])gf.get("ipaddress", new byte[0]);
         int scope_id = gf.get("scope_id", -1);
         boolean scope_id_set = gf.get("scope_id_set", false);
         boolean scope_ifname_set = gf.get("scope_ifname_set", false);
--- a/src/java.base/share/classes/java/text/DateFormatSymbols.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.base/share/classes/java/text/DateFormatSymbols.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -394,6 +394,12 @@
 
     /**
      * Gets month strings. For example: "January", "February", etc.
+     * An array with either 12 or 13 elements will be returned depending
+     * on whether or not {@link java.util.Calendar#UNDECIMBER Calendar.UNDECIMBER}
+     * is supported. Use
+     * {@link java.util.Calendar#JANUARY Calendar.JANUARY},
+     * {@link java.util.Calendar#FEBRUARY Calendar.FEBRUARY},
+     * etc. to index the result array.
      *
      * <p>If the language requires different forms for formatting and
      * stand-alone usages, this method returns month names in the
@@ -405,10 +411,9 @@
      * Calendar Elements in the Unicode Locale Data Markup Language
      * (LDML) specification</a> for more details.
      *
-     * @return the month strings. Use
-     * {@link java.util.Calendar#JANUARY Calendar.JANUARY},
-     * {@link java.util.Calendar#FEBRUARY Calendar.FEBRUARY},
-     * etc. to index the result array.
+     * @implSpec This method returns 13 elements since
+     * {@link java.util.Calendar#UNDECIMBER Calendar.UNDECIMBER} is supported.
+     * @return the month strings.
      */
     public String[] getMonths() {
         return Arrays.copyOf(months, months.length);
@@ -427,6 +432,12 @@
 
     /**
      * Gets short month strings. For example: "Jan", "Feb", etc.
+     * An array with either 12 or 13 elements will be returned depending
+     * on whether or not {@link java.util.Calendar#UNDECIMBER Calendar.UNDECIMBER}
+     * is supported. Use
+     * {@link java.util.Calendar#JANUARY Calendar.JANUARY},
+     * {@link java.util.Calendar#FEBRUARY Calendar.FEBRUARY},
+     * etc. to index the result array.
      *
      * <p>If the language requires different forms for formatting and
      * stand-alone usages, this method returns short month names in
@@ -438,10 +449,9 @@
      * Calendar Elements in the Unicode Locale Data Markup Language
      * (LDML) specification</a> for more details.
      *
-     * @return the short month strings. Use
-     * {@link java.util.Calendar#JANUARY Calendar.JANUARY},
-     * {@link java.util.Calendar#FEBRUARY Calendar.FEBRUARY},
-     * etc. to index the result array.
+     * @implSpec This method returns 13 elements since
+     * {@link java.util.Calendar#UNDECIMBER Calendar.UNDECIMBER} is supported.
+     * @return the short month strings.
      */
     public String[] getShortMonths() {
         return Arrays.copyOf(shortMonths, shortMonths.length);
--- a/src/java.base/share/classes/java/time/temporal/IsoFields.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.base/share/classes/java/time/temporal/IsoFields.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -708,9 +708,8 @@
                     return (R) temporal.with(WEEK_BASED_YEAR,
                             Math.addExact(temporal.get(WEEK_BASED_YEAR), amount));
                 case QUARTER_YEARS:
-                    // no overflow (256 is multiple of 4)
-                    return (R) temporal.plus(amount / 256, YEARS)
-                            .plus((amount % 256) * 3, MONTHS);
+                    return (R) temporal.plus(amount / 4, YEARS)
+                            .plus((amount % 4) * 3, MONTHS);
                 default:
                     throw new IllegalStateException("Unreachable");
             }
--- a/src/java.base/share/classes/java/util/ArrayList.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.base/share/classes/java/util/ArrayList.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1550,7 +1550,6 @@
                     setBit(deathRow, i - beg);
             if (modCount != expectedModCount)
                 throw new ConcurrentModificationException();
-            expectedModCount++;
             modCount++;
             int w = beg;
             for (i = beg; i < end; i++)
--- a/src/java.base/share/classes/java/util/ResourceBundle.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.base/share/classes/java/util/ResourceBundle.java	Tue Jan 30 16:41:40 2018 +0100
@@ -591,7 +591,7 @@
      */
     private static ClassLoader getLoaderForControl(Module module) {
         ClassLoader loader = getLoader(module);
-        return loader == null ? ClassLoader.getSystemClassLoader() : loader;
+        return loader == null ? ClassLoader.getPlatformClassLoader() : loader;
     }
 
     /**
--- a/src/java.base/share/classes/java/util/Vector.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.base/share/classes/java/util/Vector.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1023,7 +1023,6 @@
                     setBit(deathRow, i - beg);
             if (modCount != expectedModCount)
                 throw new ConcurrentModificationException();
-            expectedModCount++;
             modCount++;
             int w = beg;
             for (i = beg; i < end; i++)
--- a/src/java.base/share/classes/java/util/concurrent/AbstractExecutorService.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.base/share/classes/java/util/concurrent/AbstractExecutorService.java	Tue Jan 30 16:41:40 2018 +0100
@@ -245,8 +245,7 @@
                 Future<T> f = futures.get(i);
                 if (!f.isDone()) {
                     try { f.get(); }
-                    catch (CancellationException ignore) {}
-                    catch (ExecutionException ignore) {}
+                    catch (CancellationException | ExecutionException ignore) {}
                 }
             }
             return futures;
@@ -283,8 +282,7 @@
                 Future<T> f = futures.get(j);
                 if (!f.isDone()) {
                     try { f.get(deadline - System.nanoTime(), NANOSECONDS); }
-                    catch (CancellationException ignore) {}
-                    catch (ExecutionException ignore) {}
+                    catch (CancellationException | ExecutionException ignore) {}
                     catch (TimeoutException timedOut) {
                         break timedOut;
                     }
--- a/src/java.base/share/classes/java/util/concurrent/ArrayBlockingQueue.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.base/share/classes/java/util/concurrent/ArrayBlockingQueue.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1608,4 +1608,30 @@
         }
     }
 
+    /**
+     * Deserializes this queue and then checks some invariants.
+     *
+     * @param s the input stream
+     * @throws ClassNotFoundException if the class of a serialized object
+     *         could not be found
+     * @throws java.io.InvalidObjectException if invariants are violated
+     * @throws java.io.IOException if an I/O error occurs
+     */
+    private void readObject(java.io.ObjectInputStream s)
+        throws java.io.IOException, ClassNotFoundException {
+
+        // Read in items array and various fields
+        s.defaultReadObject();
+
+        // Check invariants over count and index fields. Note that
+        // if putIndex==takeIndex, count can be either 0 or items.length.
+        if (items.length == 0 ||
+            takeIndex < 0 || takeIndex >= items.length ||
+            putIndex  < 0 || putIndex  >= items.length ||
+            count < 0     || count     >  items.length ||
+            Math.floorMod(putIndex - takeIndex, items.length) !=
+            Math.floorMod(count, items.length)) {
+            throw new java.io.InvalidObjectException("invariants violated");
+        }
+    }
 }
--- a/src/java.base/share/classes/java/util/concurrent/ConcurrentHashMap.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.base/share/classes/java/util/concurrent/ConcurrentHashMap.java	Tue Jan 30 16:41:40 2018 +0100
@@ -717,12 +717,12 @@
      */
     static Class<?> comparableClassFor(Object x) {
         if (x instanceof Comparable) {
-            Class<?> c; Type[] ts, as; Type t; ParameterizedType p;
+            Class<?> c; Type[] ts, as; ParameterizedType p;
             if ((c = x.getClass()) == String.class) // bypass checks
                 return c;
             if ((ts = c.getGenericInterfaces()) != null) {
-                for (int i = 0; i < ts.length; ++i) {
-                    if (((t = ts[i]) instanceof ParameterizedType) &&
+                for (Type t : ts) {
+                    if ((t instanceof ParameterizedType) &&
                         ((p = (ParameterizedType)t).getRawType() ==
                          Comparable.class) &&
                         (as = p.getActualTypeArguments()) != null &&
@@ -2328,15 +2328,15 @@
      * @param check if <0, don't check resize, if <= 1 only check if uncontended
      */
     private final void addCount(long x, int check) {
-        CounterCell[] as; long b, s;
-        if ((as = counterCells) != null ||
+        CounterCell[] cs; long b, s;
+        if ((cs = counterCells) != null ||
             !U.compareAndSetLong(this, BASECOUNT, b = baseCount, s = b + x)) {
-            CounterCell a; long v; int m;
+            CounterCell c; long v; int m;
             boolean uncontended = true;
-            if (as == null || (m = as.length - 1) < 0 ||
-                (a = as[ThreadLocalRandom.getProbe() & m]) == null ||
+            if (cs == null || (m = cs.length - 1) < 0 ||
+                (c = cs[ThreadLocalRandom.getProbe() & m]) == null ||
                 !(uncontended =
-                  U.compareAndSetLong(a, CELLVALUE, v = a.value, v + x))) {
+                  U.compareAndSetLong(c, CELLVALUE, v = c.value, v + x))) {
                 fullAddCount(x, uncontended);
                 return;
             }
@@ -2574,13 +2574,12 @@
     }
 
     final long sumCount() {
-        CounterCell[] as = counterCells; CounterCell a;
+        CounterCell[] cs = counterCells;
         long sum = baseCount;
-        if (as != null) {
-            for (int i = 0; i < as.length; ++i) {
-                if ((a = as[i]) != null)
-                    sum += a.value;
-            }
+        if (cs != null) {
+            for (CounterCell c : cs)
+                if (c != null)
+                    sum += c.value;
         }
         return sum;
     }
@@ -2595,9 +2594,9 @@
         }
         boolean collide = false;                // True if last slot nonempty
         for (;;) {
-            CounterCell[] as; CounterCell a; int n; long v;
-            if ((as = counterCells) != null && (n = as.length) > 0) {
-                if ((a = as[(n - 1) & h]) == null) {
+            CounterCell[] cs; CounterCell c; int n; long v;
+            if ((cs = counterCells) != null && (n = cs.length) > 0) {
+                if ((c = cs[(n - 1) & h]) == null) {
                     if (cellsBusy == 0) {            // Try to attach new Cell
                         CounterCell r = new CounterCell(x); // Optimistic create
                         if (cellsBusy == 0 &&
@@ -2623,21 +2622,17 @@
                 }
                 else if (!wasUncontended)       // CAS already known to fail
                     wasUncontended = true;      // Continue after rehash
-                else if (U.compareAndSetLong(a, CELLVALUE, v = a.value, v + x))
+                else if (U.compareAndSetLong(c, CELLVALUE, v = c.value, v + x))
                     break;
-                else if (counterCells != as || n >= NCPU)
+                else if (counterCells != cs || n >= NCPU)
                     collide = false;            // At max size or stale
                 else if (!collide)
                     collide = true;
                 else if (cellsBusy == 0 &&
                          U.compareAndSetInt(this, CELLSBUSY, 0, 1)) {
                     try {
-                        if (counterCells == as) {// Expand table unless stale
-                            CounterCell[] rs = new CounterCell[n << 1];
-                            for (int i = 0; i < n; ++i)
-                                rs[i] = as[i];
-                            counterCells = rs;
-                        }
+                        if (counterCells == cs) // Expand table unless stale
+                            counterCells = Arrays.copyOf(cs, n << 1);
                     } finally {
                         cellsBusy = 0;
                     }
@@ -2646,11 +2641,11 @@
                 }
                 h = ThreadLocalRandom.advanceProbe(h);
             }
-            else if (cellsBusy == 0 && counterCells == as &&
+            else if (cellsBusy == 0 && counterCells == cs &&
                      U.compareAndSetInt(this, CELLSBUSY, 0, 1)) {
                 boolean init = false;
                 try {                           // Initialize table
-                    if (counterCells == as) {
+                    if (counterCells == cs) {
                         CounterCell[] rs = new CounterCell[2];
                         rs[h & 1] = new CounterCell(x);
                         counterCells = rs;
--- a/src/java.base/share/classes/java/util/concurrent/ConcurrentSkipListMap.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.base/share/classes/java/util/concurrent/ConcurrentSkipListMap.java	Tue Jan 30 16:41:40 2018 +0100
@@ -2204,9 +2204,7 @@
             Collection<?> c = (Collection<?>) o;
             try {
                 return containsAll(c) && c.containsAll(this);
-            } catch (ClassCastException unused) {
-                return false;
-            } catch (NullPointerException unused) {
+            } catch (ClassCastException | NullPointerException unused) {
                 return false;
             }
         }
@@ -2331,9 +2329,7 @@
             Collection<?> c = (Collection<?>) o;
             try {
                 return containsAll(c) && c.containsAll(this);
-            } catch (ClassCastException unused) {
-                return false;
-            } catch (NullPointerException unused) {
+            } catch (ClassCastException | NullPointerException unused) {
                 return false;
             }
         }
@@ -2453,9 +2449,7 @@
             if (k == null) // pass by markers and headers
                 return true;
             int c = cpr(cmp, k, hi);
-            if (c > 0 || (c == 0 && !hiInclusive))
-                return false;
-            return true;
+            return c < 0 || (c == 0 && hiInclusive);
         }
 
         /**
--- a/src/java.base/share/classes/java/util/concurrent/ConcurrentSkipListSet.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.base/share/classes/java/util/concurrent/ConcurrentSkipListSet.java	Tue Jan 30 16:41:40 2018 +0100
@@ -309,9 +309,7 @@
         Collection<?> c = (Collection<?>) o;
         try {
             return containsAll(c) && c.containsAll(this);
-        } catch (ClassCastException unused) {
-            return false;
-        } catch (NullPointerException unused) {
+        } catch (ClassCastException | NullPointerException unused) {
             return false;
         }
     }
--- a/src/java.base/share/classes/java/util/concurrent/CopyOnWriteArrayList.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.base/share/classes/java/util/concurrent/CopyOnWriteArrayList.java	Tue Jan 30 16:41:40 2018 +0100
@@ -508,7 +508,7 @@
     public boolean remove(Object o) {
         Object[] snapshot = getArray();
         int index = indexOf(o, snapshot, 0, snapshot.length);
-        return (index < 0) ? false : remove(o, snapshot, index);
+        return index >= 0 && remove(o, snapshot, index);
     }
 
     /**
@@ -587,8 +587,8 @@
      */
     public boolean addIfAbsent(E e) {
         Object[] snapshot = getArray();
-        return indexOf(e, snapshot, 0, snapshot.length) >= 0 ? false :
-            addIfAbsent(e, snapshot);
+        return indexOf(e, snapshot, 0, snapshot.length) < 0
+            && addIfAbsent(e, snapshot);
     }
 
     /**
@@ -980,13 +980,10 @@
 
         List<?> list = (List<?>)o;
         Iterator<?> it = list.iterator();
-        Object[] elements = getArray();
-        for (int i = 0, len = elements.length; i < len; i++)
-            if (!it.hasNext() || !Objects.equals(elements[i], it.next()))
+        for (Object element : getArray())
+            if (!it.hasNext() || !Objects.equals(element, it.next()))
                 return false;
-        if (it.hasNext())
-            return false;
-        return true;
+        return !it.hasNext();
     }
 
     /**
--- a/src/java.base/share/classes/java/util/concurrent/LinkedBlockingDeque.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.base/share/classes/java/util/concurrent/LinkedBlockingDeque.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1353,17 +1353,16 @@
     @SuppressWarnings("unchecked")
     private boolean bulkRemove(Predicate<? super E> filter) {
         boolean removed = false;
+        final ReentrantLock lock = this.lock;
         Node<E> p = null;
-        final ReentrantLock lock = this.lock;
         Node<E>[] nodes = null;
         int n, len = 0;
         do {
             // 1. Extract batch of up to 64 elements while holding the lock.
-            long deathRow = 0;          // "bitset" of size 64
             lock.lock();
             try {
-                if (nodes == null) {
-                    if (p == null) p = first;
+                if (nodes == null) {  // first batch; initialize
+                    p = first;
                     for (Node<E> q = p; q != null; q = succ(q))
                         if (q.item != null && ++len == 64)
                             break;
@@ -1376,6 +1375,7 @@
             }
 
             // 2. Run the filter on the elements while lock is free.
+            long deathRow = 0L;       // "bitset" of size 64
             for (int i = 0; i < n; i++) {
                 final E e;
                 if ((e = nodes[i].item) != null && filter.test(e))
@@ -1393,6 +1393,7 @@
                             unlink(q);
                             removed = true;
                         }
+                        nodes[i] = null; // help GC
                     }
                 } finally {
                     lock.unlock();
--- a/src/java.base/share/classes/java/util/concurrent/LinkedBlockingQueue.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.base/share/classes/java/util/concurrent/LinkedBlockingQueue.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1060,11 +1060,10 @@
         int n, len = 0;
         do {
             // 1. Extract batch of up to 64 elements while holding the lock.
-            long deathRow = 0;          // "bitset" of size 64
             fullyLock();
             try {
-                if (nodes == null) {
-                    if (p == null) p = head.next;
+                if (nodes == null) {  // first batch; initialize
+                    p = head.next;
                     for (Node<E> q = p; q != null; q = succ(q))
                         if (q.item != null && ++len == 64)
                             break;
@@ -1077,6 +1076,7 @@
             }
 
             // 2. Run the filter on the elements while lock is free.
+            long deathRow = 0L;       // "bitset" of size 64
             for (int i = 0; i < n; i++) {
                 final E e;
                 if ((e = nodes[i].item) != null && filter.test(e))
@@ -1095,6 +1095,7 @@
                             unlink(q, ancestor);
                             removed = true;
                         }
+                        nodes[i] = null; // help GC
                     }
                 } finally {
                     fullyUnlock();
--- a/src/java.base/share/classes/java/util/concurrent/LinkedTransferQueue.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.base/share/classes/java/util/concurrent/LinkedTransferQueue.java	Tue Jan 30 16:41:40 2018 +0100
@@ -772,9 +772,8 @@
         Node first = null;
         restartFromHead: for (;;) {
             Node h = head, p = h;
-            for (; p != null;) {
-                final Object item;
-                if ((item = p.item) != null) {
+            while (p != null) {
+                if (p.item != null) {
                     if (p.isData) {
                         first = p;
                         break;
@@ -1602,8 +1601,7 @@
         // Read in elements until trailing null sentinel found
         Node h = null, t = null;
         for (Object item; (item = s.readObject()) != null; ) {
-            @SuppressWarnings("unchecked")
-            Node newNode = new Node((E) item);
+            Node newNode = new Node(item);
             if (h == null)
                 h = t = newNode;
             else
--- a/src/java.base/share/classes/java/util/concurrent/PriorityBlockingQueue.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.base/share/classes/java/util/concurrent/PriorityBlockingQueue.java	Tue Jan 30 16:41:40 2018 +0100
@@ -269,8 +269,8 @@
         if (a.getClass() != Object[].class)
             a = Arrays.copyOf(a, n, Object[].class);
         if (screen && (n == 1 || this.comparator != null)) {
-            for (int i = 0; i < n; ++i)
-                if (a[i] == null)
+            for (Object elt : a)
+                if (elt == null)
                     throw new NullPointerException();
         }
         this.queue = a;
--- a/src/java.base/share/classes/java/util/concurrent/SubmissionPublisher.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.base/share/classes/java/util/concurrent/SubmissionPublisher.java	Tue Jan 30 16:41:40 2018 +0100
@@ -753,8 +753,10 @@
                     else
                         pred.next = next;
                 }
-                else
+                else {
                     subs.add(b.subscriber);
+                    pred = b;
+                }
             }
         }
         return subs;
--- a/src/java.base/share/classes/java/util/concurrent/ThreadLocalRandom.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.base/share/classes/java/util/concurrent/ThreadLocalRandom.java	Tue Jan 30 16:41:40 2018 +0100
@@ -67,7 +67,7 @@
  * {@code ThreadLocalRandom.current().nextX(...)} (where
  * {@code X} is {@code Int}, {@code Long}, etc).
  * When all usages are of this form, it is never possible to
- * accidently share a {@code ThreadLocalRandom} across multiple threads.
+ * accidentally share a {@code ThreadLocalRandom} across multiple threads.
  *
  * <p>This class also provides additional commonly used bounded random
  * generation methods.
--- a/src/java.base/share/classes/java/util/concurrent/ThreadPoolExecutor.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.base/share/classes/java/util/concurrent/ThreadPoolExecutor.java	Tue Jan 30 16:41:40 2018 +0100
@@ -264,13 +264,12 @@
  * assist in storage reclamation when large numbers of queued tasks
  * become cancelled.</dd>
  *
- * <dt>Finalization</dt>
+ * <dt>Reclamation</dt>
  *
  * <dd>A pool that is no longer referenced in a program <em>AND</em>
- * has no remaining threads will be {@code shutdown} automatically. If
- * you would like to ensure that unreferenced pools are reclaimed even
- * if users forget to call {@link #shutdown}, then you must arrange
- * that unused threads eventually die, by setting appropriate
+ * has no remaining threads may be reclaimed (garbage collected)
+ * without being explicity shutdown. You can configure a pool to allow
+ * all unused threads to eventually die by setting appropriate
  * keep-alive times, using a lower bound of zero core threads and/or
  * setting {@link #allowCoreThreadTimeOut(boolean)}.  </dd>
  *
@@ -361,7 +360,7 @@
      * time, but need not hit each state. The transitions are:
      *
      * RUNNING -> SHUTDOWN
-     *    On invocation of shutdown(), perhaps implicitly in finalize()
+     *    On invocation of shutdown()
      * (RUNNING or SHUTDOWN) -> STOP
      *    On invocation of shutdownNow()
      * SHUTDOWN -> TIDYING
@@ -581,9 +580,6 @@
     private static final RuntimePermission shutdownPerm =
         new RuntimePermission("modifyThread");
 
-    /** The context to be used when executing the finalizer, or null. */
-    private final AccessControlContext acc;
-
     /**
      * Class Worker mainly maintains interrupt control state for
      * threads running tasks, along with other minor bookkeeping.
@@ -1300,9 +1296,6 @@
             throw new IllegalArgumentException();
         if (workQueue == null || threadFactory == null || handler == null)
             throw new NullPointerException();
-        this.acc = (System.getSecurityManager() == null)
-            ? null
-            : AccessController.getContext();
         this.corePoolSize = corePoolSize;
         this.maximumPoolSize = maximumPoolSize;
         this.workQueue = workQueue;
@@ -1470,33 +1463,6 @@
     }
 
     /**
-     * Invokes {@code shutdown} when this executor is no longer
-     * referenced and it has no threads.
-     *
-     * <p>This method is invoked with privileges that are restricted by
-     * the security context of the caller that invokes the constructor.
-     *
-     * @deprecated The {@code finalize} method has been deprecated.
-     *     Subclasses that override {@code finalize} in order to perform cleanup
-     *     should be modified to use alternative cleanup mechanisms and
-     *     to remove the overriding {@code finalize} method.
-     *     When overriding the {@code finalize} method, its implementation must explicitly
-     *     ensure that {@code super.finalize()} is invoked as described in {@link Object#finalize}.
-     *     See the specification for {@link Object#finalize()} for further
-     *     information about migration options.
-     */
-    @Deprecated(since="9")
-    protected void finalize() {
-        SecurityManager sm = System.getSecurityManager();
-        if (sm == null || acc == null) {
-            shutdown();
-        } else {
-            PrivilegedAction<Void> pa = () -> { shutdown(); return null; };
-            AccessController.doPrivileged(pa, acc);
-        }
-    }
-
-    /**
      * Sets the thread factory used to create new threads.
      *
      * @param threadFactory the new thread factory
--- a/src/java.base/share/classes/java/util/concurrent/locks/AbstractQueuedLongSynchronizer.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.base/share/classes/java/util/concurrent/locks/AbstractQueuedLongSynchronizer.java	Tue Jan 30 16:41:40 2018 +0100
@@ -320,7 +320,9 @@
 
         // predNext is the apparent node to unsplice. CASes below will
         // fail if not, in which case, we lost race vs another cancel
-        // or signal, so no further action is necessary.
+        // or signal, so no further action is necessary, although with
+        // a possibility that a cancelled node may transiently remain
+        // reachable.
         Node predNext = pred.next;
 
         // Can use unconditional write instead of CAS here.
@@ -912,13 +914,13 @@
      * at any time, a {@code true} return does not guarantee that any
      * other thread will ever acquire.
      *
-     * <p>In this implementation, this operation returns in
-     * constant time.
-     *
      * @return {@code true} if there may be other threads waiting to acquire
      */
     public final boolean hasQueuedThreads() {
-        return head != tail;
+        for (Node p = tail, h = head; p != h && p != null; p = p.prev)
+            if (p.waitStatus <= 0)
+                return true;
+        return false;
     }
 
     /**
@@ -1067,17 +1069,21 @@
      * @since 1.7
      */
     public final boolean hasQueuedPredecessors() {
-        // The correctness of this depends on head being initialized
-        // before tail and on head.next being accurate if the current
-        // thread is first in queue.
-        Node t = tail; // Read fields in reverse initialization order
-        Node h = head;
-        Node s;
-        return h != t &&
-            ((s = h.next) == null || s.thread != Thread.currentThread());
+        Node h, s;
+        if ((h = head) != null) {
+            if ((s = h.next) == null || s.waitStatus > 0) {
+                s = null; // traverse in case of concurrent cancellation
+                for (Node p = tail; p != h && p != null; p = p.prev) {
+                    if (p.waitStatus <= 0)
+                        s = p;
+                }
+            }
+            if (s != null && s.thread != Thread.currentThread())
+                return true;
+        }
+        return false;
     }
 
-
     // Instrumentation and monitoring methods
 
     /**
--- a/src/java.base/share/classes/java/util/concurrent/locks/AbstractQueuedSynchronizer.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.base/share/classes/java/util/concurrent/locks/AbstractQueuedSynchronizer.java	Tue Jan 30 16:41:40 2018 +0100
@@ -800,7 +800,9 @@
 
         // predNext is the apparent node to unsplice. CASes below will
         // fail if not, in which case, we lost race vs another cancel
-        // or signal, so no further action is necessary.
+        // or signal, so no further action is necessary, although with
+        // a possibility that a cancelled node may transiently remain
+        // reachable.
         Node predNext = pred.next;
 
         // Can use unconditional write instead of CAS here.
@@ -1392,13 +1394,13 @@
      * at any time, a {@code true} return does not guarantee that any
      * other thread will ever acquire.
      *
-     * <p>In this implementation, this operation returns in
-     * constant time.
-     *
      * @return {@code true} if there may be other threads waiting to acquire
      */
     public final boolean hasQueuedThreads() {
-        return head != tail;
+        for (Node p = tail, h = head; p != h && p != null; p = p.prev)
+            if (p.waitStatus <= 0)
+                return true;
+        return false;
     }
 
     /**
@@ -1547,17 +1549,21 @@
      * @since 1.7
      */
     public final boolean hasQueuedPredecessors() {
-        // The correctness of this depends on head being initialized
-        // before tail and on head.next being accurate if the current
-        // thread is first in queue.
-        Node t = tail; // Read fields in reverse initialization order
-        Node h = head;
-        Node s;
-        return h != t &&
-            ((s = h.next) == null || s.thread != Thread.currentThread());
+        Node h, s;
+        if ((h = head) != null) {
+            if ((s = h.next) == null || s.waitStatus > 0) {
+                s = null; // traverse in case of concurrent cancellation
+                for (Node p = tail; p != h && p != null; p = p.prev) {
+                    if (p.waitStatus <= 0)
+                        s = p;
+                }
+            }
+            if (s != null && s.thread != Thread.currentThread())
+                return true;
+        }
+        return false;
     }
 
-
     // Instrumentation and monitoring methods
 
     /**
--- a/src/java.base/share/classes/java/util/stream/DoublePipeline.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.base/share/classes/java/util/stream/DoublePipeline.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
+ * 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
@@ -40,7 +40,6 @@
 import java.util.function.DoubleToLongFunction;
 import java.util.function.DoubleUnaryOperator;
 import java.util.function.IntFunction;
-import java.util.function.LongPredicate;
 import java.util.function.ObjDoubleConsumer;
 import java.util.function.Supplier;
 
@@ -265,6 +264,12 @@
             @Override
             Sink<Double> opWrapSink(int flags, Sink<Double> sink) {
                 return new Sink.ChainedDouble<Double>(sink) {
+                    // true if cancellationRequested() has been called
+                    boolean cancellationRequestedCalled;
+
+                    // cache the consumer to avoid creation on every accepted element
+                    DoubleConsumer downstreamAsDouble = downstream::accept;
+
                     @Override
                     public void begin(long size) {
                         downstream.begin(-1);
@@ -273,11 +278,27 @@
                     @Override
                     public void accept(double t) {
                         try (DoubleStream result = mapper.apply(t)) {
-                            // We can do better that this too; optimize for depth=0 case and just grab spliterator and forEach it
-                            if (result != null)
-                                result.sequential().forEach(i -> downstream.accept(i));
+                            if (result != null) {
+                                if (!cancellationRequestedCalled) {
+                                    result.sequential().forEach(downstreamAsDouble);
+                                }
+                                else {
+                                    var s = result.sequential().spliterator();
+                                    do { } while (!downstream.cancellationRequested() && s.tryAdvance(downstreamAsDouble));
+                                }
+                            }
                         }
                     }
+
+                    @Override
+                    public boolean cancellationRequested() {
+                        // If this method is called then an operation within the stream
+                        // pipeline is short-circuiting (see AbstractPipeline.copyInto).
+                        // Note that we cannot differentiate between an upstream or
+                        // downstream operation
+                        cancellationRequestedCalled = true;
+                        return downstream.cancellationRequested();
+                    }
                 };
             }
         };
--- a/src/java.base/share/classes/java/util/stream/IntPipeline.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.base/share/classes/java/util/stream/IntPipeline.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 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
@@ -298,6 +298,12 @@
             @Override
             Sink<Integer> opWrapSink(int flags, Sink<Integer> sink) {
                 return new Sink.ChainedInt<Integer>(sink) {
+                    // true if cancellationRequested() has been called
+                    boolean cancellationRequestedCalled;
+
+                    // cache the consumer to avoid creation on every accepted element
+                    IntConsumer downstreamAsInt = downstream::accept;
+
                     @Override
                     public void begin(long size) {
                         downstream.begin(-1);
@@ -306,11 +312,27 @@
                     @Override
                     public void accept(int t) {
                         try (IntStream result = mapper.apply(t)) {
-                            // We can do better that this too; optimize for depth=0 case and just grab spliterator and forEach it
-                            if (result != null)
-                                result.sequential().forEach(i -> downstream.accept(i));
+                            if (result != null) {
+                                if (!cancellationRequestedCalled) {
+                                    result.sequential().forEach(downstreamAsInt);
+                                }
+                                else {
+                                    var s = result.sequential().spliterator();
+                                    do { } while (!downstream.cancellationRequested() && s.tryAdvance(downstreamAsInt));
+                                }
+                            }
                         }
                     }
+
+                    @Override
+                    public boolean cancellationRequested() {
+                        // If this method is called then an operation within the stream
+                        // pipeline is short-circuiting (see AbstractPipeline.copyInto).
+                        // Note that we cannot differentiate between an upstream or
+                        // downstream operation
+                        cancellationRequestedCalled = true;
+                        return downstream.cancellationRequested();
+                    }
                 };
             }
         };
--- a/src/java.base/share/classes/java/util/stream/LongPipeline.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.base/share/classes/java/util/stream/LongPipeline.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
+ * 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
@@ -280,6 +280,12 @@
             @Override
             Sink<Long> opWrapSink(int flags, Sink<Long> sink) {
                 return new Sink.ChainedLong<Long>(sink) {
+                    // true if cancellationRequested() has been called
+                    boolean cancellationRequestedCalled;
+
+                    // cache the consumer to avoid creation on every accepted element
+                    LongConsumer downstreamAsLong = downstream::accept;
+
                     @Override
                     public void begin(long size) {
                         downstream.begin(-1);
@@ -288,11 +294,27 @@
                     @Override
                     public void accept(long t) {
                         try (LongStream result = mapper.apply(t)) {
-                            // We can do better that this too; optimize for depth=0 case and just grab spliterator and forEach it
-                            if (result != null)
-                                result.sequential().forEach(i -> downstream.accept(i));
+                            if (result != null) {
+                                if (!cancellationRequestedCalled) {
+                                    result.sequential().forEach(downstreamAsLong);
+                                }
+                                else {
+                                    var s = result.sequential().spliterator();
+                                    do { } while (!downstream.cancellationRequested() && s.tryAdvance(downstreamAsLong));
+                                }
+                            }
                         }
                     }
+
+                    @Override
+                    public boolean cancellationRequested() {
+                        // If this method is called then an operation within the stream
+                        // pipeline is short-circuiting (see AbstractPipeline.copyInto).
+                        // Note that we cannot differentiate between an upstream or
+                        // downstream operation
+                        cancellationRequestedCalled = true;
+                        return downstream.cancellationRequested();
+                    }
                 };
             }
         };
--- a/src/java.base/share/classes/java/util/stream/ReferencePipeline.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.base/share/classes/java/util/stream/ReferencePipeline.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 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
@@ -253,12 +253,14 @@
     @Override
     public final <R> Stream<R> flatMap(Function<? super P_OUT, ? extends Stream<? extends R>> mapper) {
         Objects.requireNonNull(mapper);
-        // We can do better than this, by polling cancellationRequested when stream is infinite
         return new StatelessOp<P_OUT, R>(this, StreamShape.REFERENCE,
                                      StreamOpFlag.NOT_SORTED | StreamOpFlag.NOT_DISTINCT | StreamOpFlag.NOT_SIZED) {
             @Override
             Sink<P_OUT> opWrapSink(int flags, Sink<R> sink) {
                 return new Sink.ChainedReference<P_OUT, R>(sink) {
+                    // true if cancellationRequested() has been called
+                    boolean cancellationRequestedCalled;
+
                     @Override
                     public void begin(long size) {
                         downstream.begin(-1);
@@ -267,11 +269,27 @@
                     @Override
                     public void accept(P_OUT u) {
                         try (Stream<? extends R> result = mapper.apply(u)) {
-                            // We can do better that this too; optimize for depth=0 case and just grab spliterator and forEach it
-                            if (result != null)
-                                result.sequential().forEach(downstream);
+                            if (result != null) {
+                                if (!cancellationRequestedCalled) {
+                                    result.sequential().forEach(downstream);
+                                }
+                                else {
+                                    var s = result.sequential().spliterator();
+                                    do { } while (!downstream.cancellationRequested() && s.tryAdvance(downstream));
+                                }
+                            }
                         }
                     }
+
+                    @Override
+                    public boolean cancellationRequested() {
+                        // If this method is called then an operation within the stream
+                        // pipeline is short-circuiting (see AbstractPipeline.copyInto).
+                        // Note that we cannot differentiate between an upstream or
+                        // downstream operation
+                        cancellationRequestedCalled = true;
+                        return downstream.cancellationRequested();
+                    }
                 };
             }
         };
@@ -280,13 +298,17 @@
     @Override
     public final IntStream flatMapToInt(Function<? super P_OUT, ? extends IntStream> mapper) {
         Objects.requireNonNull(mapper);
-        // We can do better than this, by polling cancellationRequested when stream is infinite
         return new IntPipeline.StatelessOp<P_OUT>(this, StreamShape.REFERENCE,
                                               StreamOpFlag.NOT_SORTED | StreamOpFlag.NOT_DISTINCT | StreamOpFlag.NOT_SIZED) {
             @Override
             Sink<P_OUT> opWrapSink(int flags, Sink<Integer> sink) {
                 return new Sink.ChainedReference<P_OUT, Integer>(sink) {
+                    // true if cancellationRequested() has been called
+                    boolean cancellationRequestedCalled;
+
+                    // cache the consumer to avoid creation on every accepted element
                     IntConsumer downstreamAsInt = downstream::accept;
+
                     @Override
                     public void begin(long size) {
                         downstream.begin(-1);
@@ -295,11 +317,23 @@
                     @Override
                     public void accept(P_OUT u) {
                         try (IntStream result = mapper.apply(u)) {
-                            // We can do better that this too; optimize for depth=0 case and just grab spliterator and forEach it
-                            if (result != null)
-                                result.sequential().forEach(downstreamAsInt);
+                            if (result != null) {
+                                if (!cancellationRequestedCalled) {
+                                    result.sequential().forEach(downstreamAsInt);
+                                }
+                                else {
+                                    var s = result.sequential().spliterator();
+                                    do { } while (!downstream.cancellationRequested() && s.tryAdvance(downstreamAsInt));
+                                }
+                            }
                         }
                     }
+
+                    @Override
+                    public boolean cancellationRequested() {
+                        cancellationRequestedCalled = true;
+                        return downstream.cancellationRequested();
+                    }
                 };
             }
         };
@@ -308,13 +342,17 @@
     @Override
     public final DoubleStream flatMapToDouble(Function<? super P_OUT, ? extends DoubleStream> mapper) {
         Objects.requireNonNull(mapper);
-        // We can do better than this, by polling cancellationRequested when stream is infinite
         return new DoublePipeline.StatelessOp<P_OUT>(this, StreamShape.REFERENCE,
                                                      StreamOpFlag.NOT_SORTED | StreamOpFlag.NOT_DISTINCT | StreamOpFlag.NOT_SIZED) {
             @Override
             Sink<P_OUT> opWrapSink(int flags, Sink<Double> sink) {
                 return new Sink.ChainedReference<P_OUT, Double>(sink) {
+                    // true if cancellationRequested() has been called
+                    boolean cancellationRequestedCalled;
+
+                    // cache the consumer to avoid creation on every accepted element
                     DoubleConsumer downstreamAsDouble = downstream::accept;
+
                     @Override
                     public void begin(long size) {
                         downstream.begin(-1);
@@ -323,11 +361,23 @@
                     @Override
                     public void accept(P_OUT u) {
                         try (DoubleStream result = mapper.apply(u)) {
-                            // We can do better that this too; optimize for depth=0 case and just grab spliterator and forEach it
-                            if (result != null)
-                                result.sequential().forEach(downstreamAsDouble);
+                            if (result != null) {
+                                if (!cancellationRequestedCalled) {
+                                    result.sequential().forEach(downstreamAsDouble);
+                                }
+                                else {
+                                    var s = result.sequential().spliterator();
+                                    do { } while (!downstream.cancellationRequested() && s.tryAdvance(downstreamAsDouble));
+                                }
+                            }
                         }
                     }
+
+                    @Override
+                    public boolean cancellationRequested() {
+                        cancellationRequestedCalled = true;
+                        return downstream.cancellationRequested();
+                    }
                 };
             }
         };
@@ -342,7 +392,12 @@
             @Override
             Sink<P_OUT> opWrapSink(int flags, Sink<Long> sink) {
                 return new Sink.ChainedReference<P_OUT, Long>(sink) {
+                    // true if cancellationRequested() has been called
+                    boolean cancellationRequestedCalled;
+
+                    // cache the consumer to avoid creation on every accepted element
                     LongConsumer downstreamAsLong = downstream::accept;
+
                     @Override
                     public void begin(long size) {
                         downstream.begin(-1);
@@ -351,11 +406,23 @@
                     @Override
                     public void accept(P_OUT u) {
                         try (LongStream result = mapper.apply(u)) {
-                            // We can do better that this too; optimize for depth=0 case and just grab spliterator and forEach it
-                            if (result != null)
-                                result.sequential().forEach(downstreamAsLong);
+                            if (result != null) {
+                                if (!cancellationRequestedCalled) {
+                                    result.sequential().forEach(downstreamAsLong);
+                                }
+                                else {
+                                    var s = result.sequential().spliterator();
+                                    do { } while (!downstream.cancellationRequested() && s.tryAdvance(downstreamAsLong));
+                                }
+                            }
                         }
                     }
+
+                    @Override
+                    public boolean cancellationRequested() {
+                        cancellationRequestedCalled = true;
+                        return downstream.cancellationRequested();
+                    }
                 };
             }
         };
--- a/src/java.base/share/classes/java/util/stream/SortedOps.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.base/share/classes/java/util/stream/SortedOps.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 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
@@ -304,7 +304,8 @@
     private abstract static class AbstractRefSortingSink<T> extends Sink.ChainedReference<T, T> {
         protected final Comparator<? super T> comparator;
         // @@@ could be a lazy final value, if/when support is added
-        protected boolean cancellationWasRequested;
+        // true if cancellationRequested() has been called
+        protected boolean cancellationRequestedCalled;
 
         AbstractRefSortingSink(Sink<? super T> downstream, Comparator<? super T> comparator) {
             super(downstream);
@@ -319,7 +320,11 @@
          */
         @Override
         public final boolean cancellationRequested() {
-            cancellationWasRequested = true;
+            // If this method is called then an operation within the stream
+            // pipeline is short-circuiting (see AbstractPipeline.copyInto).
+            // Note that we cannot differentiate between an upstream or
+            // downstream operation
+            cancellationRequestedCalled = true;
             return false;
         }
     }
@@ -347,7 +352,7 @@
         public void end() {
             Arrays.sort(array, 0, offset, comparator);
             downstream.begin(offset);
-            if (!cancellationWasRequested) {
+            if (!cancellationRequestedCalled) {
                 for (int i = 0; i < offset; i++)
                     downstream.accept(array[i]);
             }
@@ -386,7 +391,7 @@
         public void end() {
             list.sort(comparator);
             downstream.begin(list.size());
-            if (!cancellationWasRequested) {
+            if (!cancellationRequestedCalled) {
                 list.forEach(downstream::accept);
             }
             else {
@@ -409,7 +414,8 @@
      * Abstract {@link Sink} for implementing sort on int streams.
      */
     private abstract static class AbstractIntSortingSink extends Sink.ChainedInt<Integer> {
-        protected boolean cancellationWasRequested;
+        // true if cancellationRequested() has been called
+        protected boolean cancellationRequestedCalled;
 
         AbstractIntSortingSink(Sink<? super Integer> downstream) {
             super(downstream);
@@ -417,7 +423,7 @@
 
         @Override
         public final boolean cancellationRequested() {
-            cancellationWasRequested = true;
+            cancellationRequestedCalled = true;
             return false;
         }
     }
@@ -444,7 +450,7 @@
         public void end() {
             Arrays.sort(array, 0, offset);
             downstream.begin(offset);
-            if (!cancellationWasRequested) {
+            if (!cancellationRequestedCalled) {
                 for (int i = 0; i < offset; i++)
                     downstream.accept(array[i]);
             }
@@ -484,7 +490,7 @@
             int[] ints = b.asPrimitiveArray();
             Arrays.sort(ints);
             downstream.begin(ints.length);
-            if (!cancellationWasRequested) {
+            if (!cancellationRequestedCalled) {
                 for (int anInt : ints)
                     downstream.accept(anInt);
             }
@@ -507,7 +513,8 @@
      * Abstract {@link Sink} for implementing sort on long streams.
      */
     private abstract static class AbstractLongSortingSink extends Sink.ChainedLong<Long> {
-        protected boolean cancellationWasRequested;
+        // true if cancellationRequested() has been called
+        protected boolean cancellationRequestedCalled;
 
         AbstractLongSortingSink(Sink<? super Long> downstream) {
             super(downstream);
@@ -515,7 +522,7 @@
 
         @Override
         public final boolean cancellationRequested() {
-            cancellationWasRequested = true;
+            cancellationRequestedCalled = true;
             return false;
         }
     }
@@ -542,7 +549,7 @@
         public void end() {
             Arrays.sort(array, 0, offset);
             downstream.begin(offset);
-            if (!cancellationWasRequested) {
+            if (!cancellationRequestedCalled) {
                 for (int i = 0; i < offset; i++)
                     downstream.accept(array[i]);
             }
@@ -582,7 +589,7 @@
             long[] longs = b.asPrimitiveArray();
             Arrays.sort(longs);
             downstream.begin(longs.length);
-            if (!cancellationWasRequested) {
+            if (!cancellationRequestedCalled) {
                 for (long aLong : longs)
                     downstream.accept(aLong);
             }
@@ -605,7 +612,8 @@
      * Abstract {@link Sink} for implementing sort on long streams.
      */
     private abstract static class AbstractDoubleSortingSink extends Sink.ChainedDouble<Double> {
-        protected boolean cancellationWasRequested;
+        // true if cancellationRequested() has been called
+        protected boolean cancellationRequestedCalled;
 
         AbstractDoubleSortingSink(Sink<? super Double> downstream) {
             super(downstream);
@@ -613,7 +621,7 @@
 
         @Override
         public final boolean cancellationRequested() {
-            cancellationWasRequested = true;
+            cancellationRequestedCalled = true;
             return false;
         }
     }
@@ -640,7 +648,7 @@
         public void end() {
             Arrays.sort(array, 0, offset);
             downstream.begin(offset);
-            if (!cancellationWasRequested) {
+            if (!cancellationRequestedCalled) {
                 for (int i = 0; i < offset; i++)
                     downstream.accept(array[i]);
             }
@@ -680,7 +688,7 @@
             double[] doubles = b.asPrimitiveArray();
             Arrays.sort(doubles);
             downstream.begin(doubles.length);
-            if (!cancellationWasRequested) {
+            if (!cancellationRequestedCalled) {
                 for (double aDouble : doubles)
                     downstream.accept(aDouble);
             }
--- a/src/java.base/share/classes/module-info.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.base/share/classes/module-info.java	Tue Jan 30 16:41:40 2018 +0100
@@ -212,7 +212,8 @@
     exports jdk.internal.util.jar to
         jdk.jartool;
     exports sun.net to
-        jdk.incubator.httpclient;
+        jdk.incubator.httpclient,
+        jdk.naming.dns;
     exports sun.net.ext to
         jdk.net;
     exports sun.net.dns to
--- a/src/java.base/share/classes/sun/launcher/resources/launcher_de.properties	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.base/share/classes/sun/launcher/resources/launcher_de.properties	Tue Jan 30 16:41:40 2018 +0100
@@ -26,17 +26,16 @@
 # Translators please note do not translate the options themselves
 java.launcher.opt.header  =   Verwendung: {0} [Optionen] <mainclass> [args...]\n           (zur Ausf\u00FChrung einer Klasse)\n   oder  {0} [Optionen] -jar <jarfile> [args...]\n           (zur Ausf\u00FChrung einer JAR-Datei)\n   oder  {0} [Optionen] -m <module>[/<mainclass>] [args...]\n       {0} [Optionen] --module <module>[/<mainclass>] [args...]\n            (zur Ausf\u00FChrung der Hauptklasse in einem Modul)\n\n Argumente, die auf die Hauptklasse folgen, -jar <jarfile>, -m oder --module\n <module>/<mainclass> werden als Argumente f\u00FCr die Hauptklasse \u00FCbergeben.\n\n wobei "Optionen" Folgendes umfasst:\n\n
 
-java.launcher.opt.datamodel  =\    -d{0}\t  Veraltet, wird in einem zuk\u00FCnftigen Release entfernt\n
 java.launcher.opt.vmselect   =\    {0}\t  zur Auswahl der "{1}" VM\n
 java.launcher.opt.hotspot    =\    {0}\t  ist ein Synonym f\u00FCr die "{1}" VM  [verworfen]\n
 
 # Translators please note do not translate the options themselves
-java.launcher.opt.footer = \    -cp <Klassensuchpfad mit Verzeichnissen und ZIP-/JAR-Dateien>\n    -classpath <Klassensuchpfad mit Verzeichnissen und ZIP-/JAR-Dateien>\n    --class-path <Klassensuchpfad mit Verzeichnissen und ZIP-/JAR-Dateien>\n                  Eine durch {0} getrennte Liste mit Verzeichnissen, JAR-Archiven\n                  und ZIP-Archiven, in denen nach Klassendateien gesucht wird.\n    -p <Modulpfad>\n    --module-path <Modulpfad>...\n                  Eine durch {0} getrennte Liste mit Verzeichnissen, von denen jedes Verzeichnis\n                  ein Verzeichnis mit Modulen ist.\n    --upgrade-module-path <Modulpfad>...\n                  Eine durch {0} getrennte Liste mit Verzeichnissen, von denen jedes Verzeichnis\n                  ein Verzeichnis mit Modulen ist, die upgradef\u00E4hige\n                  Module im Laufzeitimage ersetzen\n    --add-modules <Modulname>[,<Modulname>...]\n                  Root-Module, die zus\u00E4tzlich zum anf\u00E4nglichen Modul aufgel\u00F6st werden sollen.\n                  <Modulname> kann auch wie folgt lauten: ALL-DEFAULT, ALL-SYSTEM,\n                  ALL-MODULE-PATH.\n    --list-modules\n                  Listet beobachtbare Module auf und beendet den Vorgang\n    --d <Modulname>\n    --describe-module <Modulname>\n                  Beschreibt ein Modul und beendet den Vorgang\n    --dry-run     Erstellt eine VM und l\u00E4dt die Hauptklasse, f\u00FChrt aber nicht die Hauptmethode aus.\n                  Die Option "--dry-run" kann n\u00FCtzlich sein, um die\n                  Befehlszeilenoptionen, wie die Modulsystemkonfiguration, zu validieren.\n    --validate-modules\n                  Validiert alle Module und beendet den Vorgang\n                  Die Option "--validate-modules" kann n\u00FCtzlich sein, um\n                  Konflikte und andere Fehler mit Modulen auf dem Modulpfad zu ermitteln.\n    -D<Name>=<Wert>\n                  Legt eine Systemeigenschaft fest\n    -verbose:[class|module|gc|jni]\n                  Ausgabe im Verbose-Modus aktivieren\n    -version      Gibt die Produktversion an den Fehlerstream aus und beendet den Vorgang\n    --version      Gibt die Produktversion an den Outputstream aus und beendet den Vorgang\n    -showversion  Gibt die Produktversion an den Fehlerstream aus und setzt den Vorgang fort\n    --show-version\n                  Gibt die Produktversion an den Outputstream aus und setzt den Vorgang fort\n    --show-module-resolution\n                  Zeigt die Modulaufl\u00F6sungsausgabe beim Start an\n    -? -h -help\n                  Gibt diese Hilfemeldung an den Fehlerstream aus\n    --help        Gibt diese Hilfemeldung an den Outputstream aus\n    -X            Gibt Hilfe zu zus\u00E4tzlichen Optionen an den Fehlerstream aus\n    --help-extra  Gibt Hilfe zu zus\u00E4tzlichen Optionen an den Outputstream aus\n    -ea[:<packagename>...|:<classname>]\n    -enableassertions[:<packagename>...|:<classname>]\n                  Aktiviert Assertions mit angegebener Granularit\u00E4t\n    -da[:<packagename>...|:<classname>]\n    -disableassertions[:<packagename>...|:<classname>]\n                  Deaktiviert Assertions mit angegebener Granularit\u00E4t\n    -esa | -enablesystemassertions\n                  Aktiviert System-Assertions\n    -dsa | -disablesystemassertions\n                  Deaktiviert System-Assertions\n    -agentlib:<libname>[=<options>]\n                  L\u00E4dt die native Agent Library <libname>. Beispiel: -agentlib:jdwp\n                  siehe auch -agentlib:jdwp=help\n    -agentpath:<pathname>[=<options>]\n                  L\u00E4dt die native Agent Library mit dem vollst\u00E4ndigen Pfadnamen\n    -javaagent:<jarpath>[=<options>]\n                  L\u00E4dt den Java-Programmiersprachen-Agent, siehe java.lang.instrument\n    -splash:<imagepath>\n                  Zeigt den Startbildschirm mit einem angegebenen Bild an\n                  Skalierte HiDPI-Bilder werden automatisch \
+java.launcher.opt.footer = \    -cp <Klassensuchpfad mit Verzeichnissen und ZIP-/JAR-Dateien>\n    -classpath <Klassensuchpfad mit Verzeichnissen und ZIP-/JAR-Dateien>\n    --class-path <Klassensuchpfad mit Verzeichnissen und ZIP-/JAR-Dateien>\n                  Eine durch {0} getrennte Liste mit Verzeichnissen, JAR-Archiven\n                  und ZIP-Archiven, in denen nach Klassendateien gesucht wird.\n    -p <Modulpfad>\n    --module-path <Modulpfad>...\n                  Eine durch {0} getrennte Liste mit Verzeichnissen, von denen jedes Verzeichnis\n                  ein Verzeichnis mit Modulen ist.\n    --upgrade-module-path <Modulpfad>...\n                  Eine durch {0} getrennte Liste mit Verzeichnissen, von denen jedes Verzeichnis\n                  ein Verzeichnis mit Modulen ist, die upgradef\u00E4hige\n                  Module im Laufzeitimage ersetzen\n    --add-modules <Modulname>[,<Modulname>...]\n                  Root-Module, die zus\u00E4tzlich zum anf\u00E4nglichen Modul aufgel\u00F6st werden sollen.\n                  <Modulname> kann auch wie folgt lauten: ALL-DEFAULT, ALL-SYSTEM,\n                  ALL-MODULE-PATH.\n    --list-modules\n                  Listet beobachtbare Module auf und beendet den Vorgang\n    -d <Modulname>\n    --describe-module <Modulname>\n                  Beschreibt ein Modul und beendet den Vorgang\n    --dry-run     Erstellt eine VM und l\u00E4dt die Hauptklasse, f\u00FChrt aber nicht die Hauptmethode aus.\n                  Die Option "--dry-run" kann n\u00FCtzlich sein, um die\n                  Befehlszeilenoptionen, wie die Modulsystemkonfiguration, zu validieren.\n    --validate-modules\n                  Validiert alle Module und beendet den Vorgang\n                  Die Option "--validate-modules" kann n\u00FCtzlich sein, um\n                  Konflikte und andere Fehler mit Modulen auf dem Modulpfad zu ermitteln.\n    -D<Name>=<Wert>\n                  Legt eine Systemeigenschaft fest\n    -verbose:[class|module|gc|jni]\n                  Ausgabe im Verbose-Modus aktivieren\n    -version      Gibt die Produktversion an den Fehlerstream aus und beendet den Vorgang\n    --version      Gibt die Produktversion an den Outputstream aus und beendet den Vorgang\n    -showversion  Gibt die Produktversion an den Fehlerstream aus und setzt den Vorgang fort\n    --show-version\n                  Gibt die Produktversion an den Outputstream aus und setzt den Vorgang fort\n    --show-module-resolution\n                  Zeigt die Modulaufl\u00F6sungsausgabe beim Start an\n    -? -h -help\n                  Gibt diese Hilfemeldung an den Fehlerstream aus\n    --help        Gibt diese Hilfemeldung an den Outputstream aus\n    -X            Gibt Hilfe zu zus\u00E4tzlichen Optionen an den Fehlerstream aus\n    --help-extra  Gibt Hilfe zu zus\u00E4tzlichen Optionen an den Outputstream aus\n    -ea[:<packagename>...|:<classname>]\n    -enableassertions[:<packagename>...|:<classname>]\n                  Aktiviert Assertions mit angegebener Granularit\u00E4t\n    -da[:<packagename>...|:<classname>]\n    -disableassertions[:<packagename>...|:<classname>]\n                  Deaktiviert Assertions mit angegebener Granularit\u00E4t\n    -esa | -enablesystemassertions\n                  Aktiviert System-Assertions\n    -dsa | -disablesystemassertions\n                  Deaktiviert System-Assertions\n    -agentlib:<libname>[=<options>]\n                  L\u00E4dt die native Agent Library <libname>. Beispiel: -agentlib:jdwp\n                  siehe auch -agentlib:jdwp=help\n    -agentpath:<pathname>[=<options>]\n                  L\u00E4dt die native Agent Library mit dem vollst\u00E4ndigen Pfadnamen\n    -javaagent:<jarpath>[=<options>]\n                  L\u00E4dt den Java-Programmiersprachen-Agent, siehe java.lang.instrument\n    -splash:<imagepath>\n                  Zeigt den Startbildschirm mit einem angegebenen Bild an\n                  Skalierte HiDPI-Bilder werden automatisch \
 unterst\u00FCtzt und verwendet,\n                  falls verf\u00FCgbar. Der nicht skalierte Bilddateiname (Beispiel: image.ext)\n                  muss immer als Argument an die Option "-splash" \u00FCbergeben werden.\n                  Das am besten geeignete angegebene skalierte Bild wird\n                  automatisch ausgew\u00E4hlt.\n                  Weitere Informationen finden Sie in der Dokumentation zur SplashScreen-API\n    @argument files\n                  Eine oder mehrere Argumentdateien mit Optionen\n    -disable-@files\n                  Verhindert die weitere Erweiterung von Argumentdateien\nUm ein Argument f\u00FCr eine lange Option anzugeben, k\u00F6nnen Sie --<Name>=<Wert> oder\n--<Name> <Wert> verwenden.\n
 
 # Translators please note do not translate the options themselves
-java.launcher.X.usage=\n    -Xbatch           Deaktiviert Hintergrundkompilierung\n    -Xbootclasspath/a: <Durch {0} getrennte Verzeichnisse und ZIP-/JAR-Dateien>\n                      an Ende von Bootstrap Classpath anh\u00E4ngen\n    -Xcheck:jni       F\u00FChrt zus\u00E4tzliche Pr\u00FCfungen f\u00FCr JNI-Funktionen aus\n    -Xcomp            Erzwingt Kompilierung von Methoden beim ersten Aufruf\n    -Xdebug           Wird zur Abw\u00E4rtskompatiblit\u00E4t bereitgestellt\n    -Xdiag            Zeigt zus\u00E4tzliche Diagnosemeldungen an\n    -Xfuture          Aktiviert strengste Pr\u00FCfungen, wird als m\u00F6glicher zuk\u00FCnftiger Standardwert erwartet\n    -Xint             Nur Ausf\u00FChrung im interpretierten Modus\n    -Xinternalversion\n                      Zeigt detailliertere JVM-Versionsinformationen an als die\n                      Option "-version"\n    -Xloggc:<Datei>    Protokolliert GC-Status in einer Datei mit Zeitstempeln\n    -Xmixed           Ausf\u00FChrung im gemischten Modus (Standard)\n    -Xmn<Gr\u00F6\u00DFe>        Legt die anf\u00E4ngliche und die maximale Gr\u00F6\u00DFe (in Byte) des Heaps\n                      f\u00FCr die junge Generation (Nursery) fest\n    -Xms<Gr\u00F6\u00DFe>        Legt die anf\u00E4ngliche Java-Heap-Gr\u00F6\u00DFe fest\n    -Xmx<Gr\u00F6\u00DFe>        Legt die maximale Java-Heap-Gr\u00F6\u00DFe fest\n    -Xnoclassgc       Deaktiviert die Klassen-Garbage Collection\n    -Xprof            Gibt CPU-Profilierungsdaten aus (veraltet)\n    -Xrs              Reduziert die Verwendung von BS-Signalen durch Java/VM (siehe Dokumentation)\n    -Xshare:auto      Verwendet, wenn m\u00F6glich, freigegebene Klassendaten (Standard)\n    -Xshare:off       Versucht nicht, freigegebene Klassendaten zu verwenden\n    -Xshare:on        Erfordert die Verwendung von freigegebenen Klassendaten, verl\u00E4uft sonst nicht erfolgreich.\n    -XshowSettings    Zeigt alle Einstellungen an und f\u00E4hrt fort\n    -XshowSettings:all\n                      Zeigt alle Einstellungen an und f\u00E4hrt fort\n    -XshowSettings:locale\n                      Zeigt alle gebietsschemabezogenen Einstellungen an und f\u00E4hrt fort\n    -XshowSettings:properties\n                      Zeigt alle Eigenschaftseinstellungen an und f\u00E4hrt fort\n    -XshowSettings:vm Zeigt alle VM-bezogenen Einstellungen an und f\u00E4hrt fort\n    -Xss<Gr\u00F6\u00DFe>        Legt Stack-Gr\u00F6\u00DFe des Java-Threads fest\n    -Xverify          Legt den Modus der Bytecodeverifizierung fest\n    --add-reads <Modul>=<Zielmodul>(,<Zielmodul>)*\n                      Aktualisiert <Modul>, damit <Zielmodul> ungeachtet der\n                      Moduldeklaration gelesen wird. \n                      <Zielmodul> kann ALL-UNNAMED sein, um alle unbenannten\n                      Module zu lesen.\n    --add-exports <Modul>/<Package>=<Zielmodul>(,<Zielmodul>)*\n                      Aktualisiert <Modul>, um <Package> ungeachtet der Moduldeklaration\n                        in <Zielmodul> zu exportieren.\n                      <Zielmodul> kann ALL-UNNAMED sein, um in alle \n                      unbenannten Module zu exportieren.\n    --add-opens <Modul>/<Package>=<Zielmodul>(,<Zielmodul>)*\n                      Aktualisiert <Modul>, um <Package> ungeachtet der Moduldeklaration\n                      in <Zielmodul> zu \u00F6ffnen.\n    --limit-modules <Modulname>[,<Modulname>...]\n                      Grenzt die Gesamtmenge der beobachtbaren Module ein\n   --patch-module <Modul>=<Datei>({0}<Datei>)*\n                      \u00DCberschreibt oder erweitert ein Modul in JAR-Dateien\n                      oder -Verzeichnissen mit \
-Klassen und Ressourcen.\n    --disable-@files  Deaktiviert die weitere Erweiterung von Argumentdateien\n\nDiese zus\u00E4tzlichen Optionen k\u00F6nnen ohne Vorank\u00FCndigung ge\u00E4ndert werden.
+java.launcher.X.usage=\n    -Xbatch           Deaktiviert Hintergrundkompilierung\n    -Xbootclasspath/a:<Durch {0} getrennte Verzeichnisse und ZIP-/JAR-Dateien>\n                      an Ende von Bootstrap Classpath anh\u00E4ngen\n    -Xcheck:jni       F\u00FChrt zus\u00E4tzliche Pr\u00FCfungen f\u00FCr JNI-Funktionen aus\n    -Xcomp            Erzwingt Kompilierung von Methoden beim ersten Aufruf\n    -Xdebug           Wird zur Abw\u00E4rtskompatibilit\u00E4t bereitgestellt\n    -Xdiag            Zeigt zus\u00E4tzliche Diagnosemeldungen an\n    -Xfuture          Aktiviert strengste Pr\u00FCfungen, wird als m\u00F6glicher zuk\u00FCnftiger Standardwert erwartet\n    -Xint              Nur Ausf\u00FChrung im interpretierten Modus\n    -Xinternalversion\n                      Zeigt detailliertere JVM-Versionsinformationen an als die\n                      Option "-version"\n    -Xloggc:<Datei>    Protokolliert GC-Status in einer Datei mit Zeitstempeln\n    -Xmixed           Ausf\u00FChrung im gemischten Modus (Standard)\n    -Xmn<Gr\u00F6\u00DFe>        Legt die anf\u00E4ngliche und die maximale Gr\u00F6\u00DFe (in Byte) des Heaps\n                      f\u00FCr die Young Generation (Nursery) fest\n    -Xms<Gr\u00F6\u00DFe>        Legt die anf\u00E4ngliche Java-Heap-Gr\u00F6\u00DFe fest\n    -Xmx<Gr\u00F6\u00DFe>        Legt die maximale Java-Heap-Gr\u00F6\u00DFe fest\n    -Xnoclassgc       Deaktiviert die Klassen-Garbage Collection\n    -Xrs              Reduziert die Verwendung von BS-Signalen durch Java/VM (siehe Dokumentation)\n    -Xshare:auto      Verwendet, wenn m\u00F6glich, freigegebene Klassendaten (Standard)\n    -Xshare:off       Versucht nicht freigegebene Klassendaten zu verwenden\n    -Xshare:on        Erfordert die Verwendung von freigegebenen Klassendaten, verl\u00E4uft sonst nicht erfolgreich.\n    -XshowSettings    Zeigt alle Einstellungen an und f\u00E4hrt fort\n    -XshowSettings:all\n                      Zeigt alle Einstellungen an und f\u00E4hrt fort\n    -XshowSettings:locale\n                      Zeigt alle gebietsschemabezogenen Einstellungen an und f\u00E4hrt fort\n    -XshowSettings:properties\n                      Zeigt alle Eigenschaftseinstellungen an und f\u00E4hrt fort\n    -XshowSettings:vm Zeigt alle VM-bezogenen Einstellungen an und f\u00E4hrt fort\n    -Xss<Gr\u00F6\u00DFe>         Legt Stackgr\u00F6\u00DFe des Java-Threads fest\n    -Xverify           Legt den Modus der Bytecodeverifizierung fest\n    --add-reads <Modul>=<Zielmodul>(,<Zielmodul>)*\n                      Aktualisiert <Modul>, damit <Zielmodul> ungeachtet der\n                      Moduldeklaration gelesen wird.\n                      <Zielmodul> kann ALL-UNNAMED sein, um alle unbenannten\n                      Module zu lesen.\n    --add-exports <Modul>/<Package>=<Zielmodul>(,<Zielmodul>)*\n                      Aktualisiert <Modul>, um <Package> ungeachtet der Moduldeklaration in <Zielmodul>\n                      zu exportieren.\n                      <Zielmodul> kann ALL-UNNAMED sein, um in alle\n                      unbenannten Module zu exportieren.\n    --add-opens <Modul>/<Package>=<Zielmodul>(,<Zielmodul>)*\n                      Aktualisiert <Modul>, um <Package> ungeachtet der Moduldeklaration in\n                      <Zielmodul> zu \u00F6ffnen.\n    --illegal-access=<Wert>\n                      L\u00E4sst Zugriff f\u00FCr Mitglieder mit den Typen in den benannten Modulen\n                       nach Code in unbenannten Modulen zu oder lehnt ihn ab.\n                      <Wert> ist entweder "deny", "permit", "warn" oder "debug"\n                      Diese Option wird in einem zuk\u00FCnftigen Release entfernt.\n    --limit-modules <Modulname>[,<Modulname>...]\n                      Grenzt die Gesamtmenge der beobachtbaren Module ein\n    --patch-module <Modul>=<Datei>({0}<Datei>)*\n                       \u00DCberschreibt oder erweitert ein Modul in JAR-Dateien\n                      oder -Verzeichnissen mit \
+Klassen und Ressourcen.\n    --disable-@files  Deaktiviert die weitere Erweiterung von Argumentdateien\n\nDiese zus\u00E4tzlichen Optionen k\u00F6nnen ohne Vorank\u00FCndigung ge\u00E4ndert werden.\n
 
 # Translators please note do not translate the options themselves
 java.launcher.X.macosx.usage=\nDie folgenden Optionen sind f\u00FCr Mac OS X spezifisch:\n    -XstartOnFirstThread\n                      main()-Methode f\u00FCr den ersten (AppKit) Thread ausf\u00FChren\n    -Xdock:name=<application name>\n                      Den im Dock angezeigten Standardanwendungsnamen \u00FCberschreiben\n    -Xdock:icon=<Pfad zu Symboldatei>\n                      Das im Dock angezeigte Standardsymbol \u00FCberschreiben\n\n
@@ -47,6 +46,7 @@
 java.launcher.cls.error4=Fehler: Hauptmethode in Klasse {0} nicht gefunden. Definieren Sie die Hauptmethode als:\n   public static void main(String[] args):\noder eine JavaFX-Anwendung muss {1} erweitern
 java.launcher.cls.error5=Fehler: Zum Ausf\u00FChren dieser Anwendung ben\u00F6tigte JavaFX-Runtime-Komponenten fehlen
 java.launcher.cls.error6=Fehler: Beim Laden der Klasse {0} ist ein LinkageError aufgetreten\n\t{1}
+java.launcher.cls.error7=Fehler: Hauptklasse {0} kann nicht initialisiert werden\nUrsache: {1}: {2}
 java.launcher.jar.error1=Fehler: Beim Versuch, Datei {0} zu \u00F6ffnen, ist ein unerwarteter Fehler aufgetreten
 java.launcher.jar.error2=Manifest in {0} nicht gefunden
 java.launcher.jar.error3=kein Hauptmanifestattribut, in {0}
@@ -55,5 +55,6 @@
 java.launcher.javafx.error1=Fehler: Die JavaFX-Methode launchApplication hat die falsche Signatur, sie\nmuss als statisch deklariert werden und einen Wert vom Typ VOID zur\u00FCckgeben
 java.launcher.module.error1=Modul {0} weist kein MainClass-Attribut auf. Verwenden Sie -m <module>/<main-class>
 java.launcher.module.error2=Fehler: Hauptklasse {0} konnte in Modul {1} nicht gefunden oder geladen werden
-java.launcher.module.error3=Fehler: Hauptklasse {0} kann nicht aus Modul {1} geladen werden\n\t{2}
+java.launcher.module.error3=Fehler: Hauptklasse {0} kann nicht in Modul {1} geladen werden\n\t{2}
 java.launcher.module.error4={0} nicht gefunden
+java.launcher.module.error5=Fehler: Hauptklasse {0} kann nicht in Modul {1} initialisiert werden\nUrsache: {1}: {2}
--- a/src/java.base/share/classes/sun/launcher/resources/launcher_es.properties	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.base/share/classes/sun/launcher/resources/launcher_es.properties	Tue Jan 30 16:41:40 2018 +0100
@@ -26,17 +26,16 @@
 # Translators please note do not translate the options themselves
 java.launcher.opt.header  =   Sintaxis: {0} [opciones] <clase principal> [argumentos...]\n           (para ejecutar una clase)\n   o  {0} [opciones] -jar <archivo jar> [argumentos...]\n           (para ejecutar un archivo jar)\n   o  {0} [opciones] -m <m\u00F3dulo>[/<clase principal>] [argumentos...]\n       {0} [opciones] --module <m\u00F3dulo>[/<clase principal>] [argumentos...]\n           (para ejecutar la clase principal en un m\u00F3dulo)\n\n Argumentos que siguen la clase principal, -jar <archivo jar>, -m o --module\n <m\u00F3dulo>/<clase principal> se transfieren como argumentos a una clase principal.\n\n donde las opciones incluyen:\n\n
 
-java.launcher.opt.datamodel  =\    -d{0}\t  Anticuada, se eliminar\u00E1 en una versi\u00F3n futura\n
 java.launcher.opt.vmselect   =\    {0}\t  para seleccionar la VM "{1}"\n
-java.launcher.opt.hotspot    =\    {0}\t  es un sin\u00F3nimo de la VM "{1}" [anticuada]\n
+java.launcher.opt.hotspot    =\    {0}\t  es un sin\u00F3nimo de la VM "{1}" [en desuso]\n
 
 # Translators please note do not translate the options themselves
-java.launcher.opt.footer = \    -cp <ruta de b\u00FAsqueda de clase de directorios y archivos zip/jar>\n    -classpath <ruta de b\u00FAsqueda de clase de directorios y archivos zip/jar>\n    --class-path <ruta de b\u00FAsqueda de clase de directorios y archivos zip/jar>\n                  Una lista separada por el car\u00E1cter {0}, archivos JAR\n                  y archivos ZIP para buscar archivos de clases.\n    -p <ruta m\u00F3dulo>\n    --module-path <ruta m\u00F3dulo>...\n                  Una lista de directorios separada por el car\u00E1cter {0}, cada directorio\n                  es un directorio de m\u00F3dulos.\n    --upgrade-module-path <ruta m\u00F3dulo>...\n                  Una lista de directorios separada por el car\u00E1cter {0}, cada directorio\n                  es un directorio de m\u00F3dulos que sustituye a\n                  los m\u00F3dulos actualizables en la imagen de tiempo de ejecuci\u00F3n\n    --add-modules <nombre m\u00F3dulo>[,<nombre m\u00F3dulo>...]\n                  m\u00F3dulos de ra\u00EDz que resolver, adem\u00E1s del m\u00F3dulo inicial.\n                  <nombre m\u00F3dulo> tambi\u00E9n puede ser ALL-DEFAULT, ALL-SYSTEM,\n                  ALL-MODULE-PATH.\n    --list-modules\n                  mostrar m\u00F3dulos observables y salir\n    --d <nombre m\u00F3dulo>\n    --describe-module <nombre m\u00F3dulo>\n                  describir un m\u00F3dulo y salir\n    --dry-run     crear VM y cargar la clase principal pero sin ejecutar el m\u00E9todo principal.\n                  La opci\u00F3n --dry-run puede ser \u00FAtil para validar\n                  las opciones de l\u00EDnea de comandos, como la configuraci\u00F3n del sistema de m\u00F3dulos.\n    --validate-modules\n                  validar todos los m\u00F3dulos y salir\n                  La opci\u00F3n --validate-modules puede ser \u00FAtil para encontrar\n                  conflictos y otros errores con m\u00F3dulos en la ruta de m\u00F3dulos.\n    -D<nombre>=<valor>\n                  definir una propiedad de sistema\n    -verbose:[class|module|gc|jni]\n                  activar la salida en modo verbose\n    -version      imprimir versi\u00F3n de producto en el flujo de errores y salir\n    --version     imprimir versi\u00F3n de producto en el flujo de salida y salir\n    -showversion  imprimir versi\u00F3n de producto en el flujo de errores y continuar\n    --show-version\n                  -showversion  imprimir versi\u00F3n de producto en el flujo de salida y continuar\n    --show-module-resolution\n                  mostrar la salida de resoluci\u00F3n de m\u00F3dulo durante el inicio\n    -? -h -help\n                  imprimir este mensaje de ayuda en el flujo de errores\n    --help        imprimir este mensaje de ayuda en el flujo de salida\n    -X            imprimir ayuda de opciones adicionales en el flujo de errores\n    --help-extra  imprimir ayuda de opciones adicionales en el flujo de salida\n    -ea[:<nombre paquete>...|:<nombre clase>]\n    -enableassertions[:<nombre paquete>...|:<nombre clase>]\n                  activar afirmaciones con una granularidad especificada\n    -da[:<nombre paquete>...|:<nombre clase>]\n    -disableassertions[:<nombre paquete>...|:<nombre clase>]\n                  desactivar afirmaciones con una granularidad especificada\n    -esa | -enablesystemassertions\n                  activar afirmaciones del sistema\n    -dsa | -disablesystemassertions\n                  desactivar afirmaciones del sistema\n    -agentlib:<nombre bib>[=<opciones>]\n                  cargar biblioteca de agente nativo <nombre bib>, por ejemplo, -agentlib:jdwp\n                  ver tambi\u00E9n -agentlib:jdwp=help\n    -agentpath:<nombre ruta>[=<opciones>]\n                  cargar biblioteca de agente nativo por nombre completo de ruta\n    -javaagent:<ruta jar>[=<opciones>]\n                  cargar agente de lenguaje de programaci\u00F3n Java, ver java.lang.instrument\n    -splash:<ruta imagen>\n         \
-         mostrar pantalla de presentaci\u00F3n con imagen especificada\n                  Las im\u00E1genes a escala HiDPI est\u00E1n soportadas y se usan autom\u00E1ticamente\n                  si est\u00E1n disponibles. El nombre de archivo de la imagen sin escala, por ejemplo, image.ext,\n                  siempre debe transmitirse como el argumento para la opci\u00F3n -splash.\n                  La imagen a escala m\u00E1s adecuada que se haya proporcionado se escoger\u00E1\n                  autom\u00E1ticamente.\n                  Consulte la documentaci\u00F3n de la API de la pantalla de presentaci\u00F3n para obtener m\u00E1s informaci\u00F3n.\n    @argument files\n                  uno o m\u00E1s archivos de argumentos que contienen opciones\n    -disable-@files\n                  evitar una mayor expansi\u00F3n del archivo de argumentos\nPara especificar un argumento para una opci\u00F3n larga, puede usar --<nombre>=<valor> o\n--<nombre> <valor>.\n
+java.launcher.opt.footer = \    -cp <ruta de b\u00FAsqueda de clase de directorios y archivos zip/jar>\n    -classpath <ruta de b\u00FAsqueda de clase de directorios y archivos zip/jar>\n    --class-path <ruta de b\u00FAsqueda de clase de directorios y archivos zip/jar>\n                  Una lista separada por el car\u00E1cter {0}, archivos JAR\n                  y archivos ZIP para buscar archivos de clases.\n    -p <ruta m\u00F3dulo>\n    --module-path <ruta m\u00F3dulo>...\n                  Una lista de directorios separada por el car\u00E1cter {0}, cada directorio\n                  es un directorio de m\u00F3dulos.\n    --upgrade-module-path <ruta m\u00F3dulo>...\n                  Una lista de directorios separada por el car\u00E1cter {0}, cada directorio\n                  es un directorio de m\u00F3dulos que sustituye a\n                  los m\u00F3dulos actualizables en la imagen de tiempo de ejecuci\u00F3n\n    --add-modules <nombre m\u00F3dulo>[,<nombre m\u00F3dulo>...]\n                  m\u00F3dulos de ra\u00EDz que resolver, adem\u00E1s del m\u00F3dulo inicial.\n                  <nombre m\u00F3dulo> tambi\u00E9n puede ser ALL-DEFAULT, ALL-SYSTEM,\n                  ALL-MODULE-PATH.\n    --list-modules\n                  mostrar m\u00F3dulos observables y salir\n    -d <nombre de m\u00F3dulo>\n    --describe-module <nombre m\u00F3dulo>\n                  describir un m\u00F3dulo y salir\n    --dry-run     crear VM y cargar la clase principal pero sin ejecutar el m\u00E9todo principal.\n                  La opci\u00F3n --dry-run puede ser \u00FAtil para validar\n                  las opciones de l\u00EDnea de comandos, como la configuraci\u00F3n del sistema de m\u00F3dulos.\n    --validate-modules\n                  validar todos los m\u00F3dulos y salir\n                  La opci\u00F3n --validate-modules puede ser \u00FAtil para encontrar\n                  conflictos y otros errores con m\u00F3dulos en la ruta de m\u00F3dulos.\n    -D<nombre>=<valor>\n                  definir una propiedad de sistema\n    -verbose:[class|module|gc|jni]\n                  activar la salida en modo verbose\n    -version      imprimir versi\u00F3n de producto en el flujo de errores y salir\n    --version     imprimir versi\u00F3n de producto en el flujo de salida y salir\n    -showversion  imprimir versi\u00F3n de producto en el flujo de errores y continuar\n    --show-version\n                  -showversion  imprimir versi\u00F3n de producto en el flujo de salida y continuar\n    --show-module-resolution\n                  mostrar la salida de resoluci\u00F3n de m\u00F3dulo durante el inicio\n    -? -h -help\n                  imprimir este mensaje de ayuda en el flujo de errores\n    --help        imprimir este mensaje de ayuda en el flujo de salida\n    -X            imprimir ayuda de opciones adicionales en el flujo de errores\n    --help-extra  imprimir ayuda de opciones adicionales en el flujo de salida\n    -ea[:<nombre paquete>...|:<nombre clase>]\n    -enableassertions[:<nombre paquete>...|:<nombre clase>]\n                  activar afirmaciones con una granularidad especificada\n    -da[:<nombre paquete>...|:<nombre clase>]\n    -disableassertions[:<nombre paquete>...|:<nombre clase>]\n                  desactivar afirmaciones con una granularidad especificada\n    -esa | -enablesystemassertions\n                  activar afirmaciones del sistema\n    -dsa | -disablesystemassertions\n                  desactivar afirmaciones del sistema\n    -agentlib:<nombre bib>[=<opciones>]\n                  cargar biblioteca de agente nativo <nombre bib>, por ejemplo, -agentlib:jdwp\n                  ver tambi\u00E9n -agentlib:jdwp=help\n    -agentpath:<nombre ruta>[=<opciones>]\n                  cargar biblioteca de agente nativo por nombre completo de ruta\n    -javaagent:<ruta jar>[=<opciones>]\n                  cargar agente de lenguaje de programaci\u00F3n Java, ver java.lang.instrument\n    -splash:<ruta imagen>\n       \
+           mostrar pantalla de presentaci\u00F3n con imagen especificada\n                  Las im\u00E1genes a escala HiDPI est\u00E1n soportadas y se usan autom\u00E1ticamente\n                  si est\u00E1n disponibles. El nombre de archivo de la imagen sin escala, por ejemplo, image.ext,\n                  siempre debe transmitirse como el argumento para la opci\u00F3n -splash.\n                  La imagen a escala m\u00E1s adecuada que se haya proporcionado se escoger\u00E1\n                  autom\u00E1ticamente.\n                  Consulte la documentaci\u00F3n de la API de la pantalla de presentaci\u00F3n para obtener m\u00E1s informaci\u00F3n.\n    @argument files\n                  uno o m\u00E1s archivos de argumentos que contienen opciones\n    -disable-@files\n                  evitar una mayor expansi\u00F3n del archivo de argumentos\nPara especificar un argumento para una opci\u00F3n larga, puede usar --<nombre>=<valor> o\n--<nombre> <valor>.\n
 
 # Translators please note do not translate the options themselves
-java.launcher.X.usage=\    -Xbatch           desactivar compilaci\u00F3n de fondo\n    -Xbootclasspath/a:<directorios y archivos zip/jar separados por {0}>\n                      agregar al final de la ruta de la clase de inicializaci\u00F3n de datos\n    -Xcheck:jni       realizar comprobaciones adicionales para las funciones de JNI\n    -Xcomp            fuerza la compilaci\u00F3n de m\u00E9todos en la primera llamada\n    -Xdebug           se proporciona para ofrecer compatibilidad con versiones anteriores\n    -Xdiag            mostrar mensajes de diagn\u00F3stico adicionales\n    -Xfuture          activar las comprobaciones m\u00E1s estrictas, anticip\u00E1ndose al futuro valor por defecto\n    -Xint             solo ejecuci\u00F3n de modo interpretado\n    -Xinternalversion\n                      muestra una informaci\u00F3n de la versi\u00F3n de JVM m\u00E1s detallada que la\n                      opci\u00F3n -version\n    -Xloggc:<archivo>    registrar el estado de GC en un archivo con registros de hora\n    -Xmixed           ejecuci\u00F3n de modo mixto (por defecto)\n    -Xmn<size>        define el tama\u00F1o inicial y m\u00E1ximo (en bytes) de la pila\n                      para la generaci\u00F3n m\u00E1s joven (espacio infantil)\n    -Xms<size>        define el tama\u00F1o inicial de la pila de Java\n    -Xmx<size>        define el tama\u00F1o m\u00E1ximo de la pila de Java\n    -Xnoclassgc       desactivar la recolecci\u00F3n de basura de clases\n    -Xprof            datos de creaci\u00F3n de perfiles de CPU de salida (anticuados)\n    -Xrs              reducir el uso de se\u00F1ales de sistema operativo por parte de Java/VM (consulte la documentaci\u00F3n)\n    -Xshare:auto      usar datos de clase compartidos si es posible (valor por defecto)\n    -Xshare:off       no intentar usar datos de clase compartidos\n    -Xshare:on        es obligatorio el uso de datos de clase compartidos, de lo contrario se producir\u00E1 un fallo.\n    -XshowSettings    mostrar toda la configuraci\u00F3n y continuar\n    -XshowSettings:all\n                      mostrar todos los valores y continuar\n    -XshowSettings:locale\n                      mostrar todos los valores relacionados con la configuraci\u00F3n regional y continuar\n    -XshowSettings:properties\n                      mostrar todos los valores de propiedad y continuar\n    -XshowSettings:vm mostrar todos los valores relacionados con vm y continuar\n    -Xss<size>        definir tama\u00F1o de la pila del thread de Java\n    -Xverify          define el modo del verificador de c\u00F3digo de bytes\n    --add-reads <m\u00F3dulo>=<m\u00F3dulo-destino>(,<m\u00F3dulo-destino>)*\n                      actualiza <m\u00F3dulo> para leer <m\u00F3dulo-destino>, independientement\n                      de la declaraci\u00F3n del m\u00F3dulo. \n                      <m\u00F3dulo-destino> puede ser ALL-UNNAMED para leer todos los\n                      m\u00F3dulos sin nombre.\n    --add-exports <m\u00F3dulo>/<paquete>=<modulo-destino>(,<m\u00F3dulo-destino>)*\n                      actualiza <m\u00F3dulo> para exportar <paquete> en <m\u00F3dulo-destino>,\n                      independientemente de la declaraci\u00F3n del m\u00F3dulo.\n                      <m\u00F3dulo-destino> puede ser ALL-UNNAMED para exportar a todos los\n                      m\u00F3dulos sin nombre.\n    --add-opens <m\u00F3dulo>/<paquete>=<m\u00F3dulo-destino>(,<m\u00F3dulo-destino>)*\n                      actualiza <m\u00F3dulo> para abrir <paquete> en\n                      <m\u00F3dulo-destino>, independientemente de la declaraci\u00F3n del m\u00F3dulo.\n    --limit-modules <nombre \
-m\u00F3dulo>[,<nombre m\u00F3dulo>...]\n                      limitar el universo de m\u00F3dulos observables\n    --patch-module <m\u00F3dulo>=<archivo>({0}<archivo>)*\n                      anular o aumentar un m\u00F3dulo con clases y recursos\n                      en directorios o archivos JAR.\n    --disable-@files  desactivar una mayor expansi\u00F3n del archivo de argumentos\n\nEstas opciones adicionales est\u00E1n sujetas a cambios sin previo aviso.\n
+java.launcher.X.usage=-Xbatch           desactivar compilaci\u00F3n de fondo\n    -Xbootclasspath/a:<directorios y archivos zip/jar separados por {0}>\n                      agregar al final de la ruta de clase de inicializaci\u00F3n de datos\n    -Xcheck:jni       realizar comprobaciones adicionales para las funciones de JNI\n    -Xcomp            fuerza la compilaci\u00F3n de m\u00E9todos en la primera llamada\n    -Xdebug           se proporciona para ofrecer compatibilidad con versiones anteriores\n    -Xdiag            mostrar mensajes de diagn\u00F3stico adicionales\n    -Xfuture          activar las comprobaciones m\u00E1s estrictas, anticip\u00E1ndose al futuro valor por defecto\n    -Xint             solo ejecuci\u00F3n de modo interpretado\n    -Xinternalversionn\n                      muestra informaci\u00F3n de la versi\u00F3n de JVM m\u00E1s detallada que la\n                      opci\u00F3n -version\n    -Xloggc:    registrar el estado de GC en un archivo con registros de hora\n    -Xmixed           ejecuci\u00F3n de modo mixto (por defecto)\n    -Xmn<tama\u00F1o>        define el tama\u00F1o inicial y m\u00E1ximo (en bytes) de la pila\n                      para la generaci\u00F3n m\u00E1s joven (incubadora)\n    -Xms<size>        define el tama\u00F1o inicial de la pila de Java\n    -Xmx<size>        define el tama\u00F1o m\u00E1ximo de la pila de Java\n    -Xnoclassgc       desactivar la recolecci\u00F3n de basura de clases\n    -Xrs              reducir el uso de se\u00F1ales de sistema operativo por parte de Java/VM (consulte la documentaci\u00F3n)\n    -Xshare:auto      usar datos de clase compartidos si es posible (valor por defecto)\n    -Xshare:off       no intentar usar datos de clase compartidos\n    -Xshare:on        es obligatorio el uso de datos de clase compartidos, de lo contrario se producir\u00E1 un fallo.\n    -XshowSettings    mostrar toda la configuraci\u00F3n y continuar\n    -XshowSettings:all\n                      mostrar todos los valores y continuar\n    -XshowSettings:locale\n                      mostrar todos los valores relacionados con la configuraci\u00F3n regional y continuar\n    -XshowSettings:properties\n                      mostrar todos los valores de propiedad y continuar\n    -XshowSettings:vm mostrar todos los valores relacionados con vm y continuar\n    -Xss<tama\u00F1o>        definir tama\u00F1o de la pila del thread de Java\n    -Xverify          define el modo del verificador de c\u00F3digo de bytes\n    --add-reads <m\u00F3dulo>=<m\u00F3dulo-destino>(,<m\u00F3dulo-destino>)*\n                      actualiza <m\u00F3dulo> para leer <m\u00F3dulo-destino>, independientemente\n                      de la declaraci\u00F3n del m\u00F3dulo. \n                      <m\u00F3dulo-destino> puede ser ALL-UNNAMED para leer todos los\n                      m\u00F3dulos sin nombre.\n    --add-exports <m\u00F3dulo>/<paquete>=<m\u00F3dulo-destino>(,<m\u00F3dulo-destino>)*\n                      actualiza <m\u00F3dulo> para exportar <paquete> en <m\u00F3dulo-destino>,\n                      independientemente de la declaraci\u00F3n del m\u00F3dulo.\n                      <m\u00F3dulo-destino> puede ser ALL-UNNAMED para exportar a todos los\n                      m\u00F3dulos sin nombre.\n    --add-opens <m\u00F3dulo>/<paquete>=<m\u00F3dulo-destino>(,<m\u00F3dulo-destino>)*\n                      actualiza <m\u00F3dulo> para abrir <paquete> en\n                      <m\u00F3dulo-destino>, independientemente de la declaraci\u00F3n del m\u00F3dulo.\n    --illegal-access=<valor>\n                      permitir or denegar el acceso a miembros de tipos en m\u00F3dulos con nombre.\n                      por c\u00F3digo en m\u00F3dulos sin nombre.\n                      <value> es "denegar", "permitir", "advertir" o "depurar"\n                      Esta opci\u00F3n se eliminar\u00E1 en la pr\u00F3xima versi\u00F3n.\n    --limit-modules <nombre m\u00F3dulo>[,<nombre m\u00F3dulo>...]\n       \
+               limitar el universo de m\u00F3dulos observables\n    --patch-module <m\u00F3dulo>=({0})*\n\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0 aumentar o anular un m\u00F3dulo con clases y recursos\n                      en directorios o archivos JAR\n\nEstas opciones est\u00E1n sujetas a cambio sin previo aviso.
 
 # Translators please note do not translate the options themselves
 java.launcher.X.macosx.usage=\nLas siguientes opciones son espec\u00EDficas para Mac OS X:\n    -XstartOnFirstThread\n                      ejecutar el m\u00E9todo main() del primer thread (AppKit)\n    -Xdock:name=<application name>\n                      sustituir al nombre por defecto de la aplicaci\u00F3n que se muestra en el Dock\n    -Xdock:icon=<ruta de acceso a archivo de icono>\n                      sustituir al icono por defecto que se muestra en el Dock\n\n
@@ -47,6 +46,7 @@
 java.launcher.cls.error4=Error: no se ha encontrado el m\u00E9todo principal en la clase {0}, defina el m\u00E9todo principal del siguiente modo:\\n   public static void main(String[] args)\\nde lo contrario, se deber\u00E1 ampliar una clase de aplicaci\u00F3n JavaFX {1}
 java.launcher.cls.error5=Error: faltan los componentes de JavaFX runtime y son necesarios para ejecutar esta aplicaci\u00F3n
 java.launcher.cls.error6=Error: Se ha producido un error de enlace al cargar la clase principal {0}\n\t{1}
+java.launcher.cls.error7=Error: no se ha podido inicializar la clase principal {0}\nCausado por: {1}: {2}
 java.launcher.jar.error1=Error: se ha producido un error inesperado al intentar abrir el archivo {0}
 java.launcher.jar.error2=no se ha encontrado el manifiesto en {0}
 java.launcher.jar.error3=no hay ning\u00FAn atributo de manifiesto principal en {0}
@@ -55,5 +55,6 @@
 java.launcher.javafx.error1=Error: el m\u00E9todo launchApplication de JavaFX tiene una firma que no es correcta.\\nSe debe declarar est\u00E1tico y devolver un valor de tipo nulo
 java.launcher.module.error1=el m\u00F3dulo {0} no tiene ning\u00FAn atributo MainClass, utilice -m <m\u00F3dulo>/<clase-principal>
 java.launcher.module.error2=Error: no se ha encontrado o cargado la clase principal {0} en el m\u00F3dulo {1}
-java.launcher.module.error3=Error: No se ha podido cargar la clase principal {0} del m\u00F3dulo {1}\n\t{2}
+java.launcher.module.error3=Error: no se ha podido cargar la clase principal {0} del m\u00F3dulo {1}\n\t{2}
 java.launcher.module.error4=No se ha encontrado {0}
+java.launcher.module.error5=Error: no se ha podido inicializar la clase principal {0} del m\u00F3dulo {1}\nCausado por: {1}: {2}
--- a/src/java.base/share/classes/sun/launcher/resources/launcher_fr.properties	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.base/share/classes/sun/launcher/resources/launcher_fr.properties	Tue Jan 30 16:41:40 2018 +0100
@@ -26,16 +26,16 @@
 # Translators please note do not translate the options themselves
 java.launcher.opt.header  =   Syntaxe : {0} [options] <mainclass> [args...]\n           (pour ex\u00E9cuter une classe)\n   ou  {0} [options] -jar <jarfile> [args...]\n           (pour ex\u00E9cuter un fichier JAR)\n   ou  {0} [options] -m <module>[/<mainclass>] [args...]\n       {0} [options] --module <module>[/<mainclass>] [args...]\n           (pour ex\u00E9cuter la classe principale dans un module)\n\n Les arguments suivant la classe principale -jar <jarfile>, -m ou --module\n <module>/<mainclass> sont transmis en tant qu''arguments \u00E0 la classe principale.\n\n o\u00F9 options comprend les \u00E9l\u00E9ments suivants :\n\n
 
-java.launcher.opt.datamodel  =\    -d{0}\t  En phase d''abandon, sera enlev\u00E9 dans une version future\n
 java.launcher.opt.vmselect   =\    {0}\t  pour s\u00E9lectionner la machine virtuelle "{1}"\n
 java.launcher.opt.hotspot    =\    {0}\t  est un synonyme pour la machine virtuelle "{1}"  [en phase d''abandon]\n
 
 # Translators please note do not translate the options themselves
-java.launcher.opt.footer = \    -cp <chemin de recherche de classe de r\u00E9pertoires et de fichiers ZIP/JAR>\n    -classpath <chemin de recherche de classe de r\u00E9pertoires et de fichiers ZIP/JAR>\n    --class-path <chemin de recherche de classe de r\u00E9pertoires et de fichiers ZIP/JAR>\n                  Liste distincte {0} de r\u00E9pertoires, d''archives JAR\n                  et d'archives ZIP pour rechercher des fichiers de classe.\n    -p <chemin de module>\n    --module-path <chemin de module>...\n                  Liste distincte {0} de r\u00E9pertoires, chaque r\u00E9pertoire\n                  est un r\u00E9pertoire de modules.\n    --upgrade-module-path <chemin de module>...\n                  Liste distincte {0} de r\u00E9pertoires, chaque r\u00E9pertoire\n                  est un r\u00E9pertoire de module qui remplace les modules\n                  pouvant \u00EAtre mis \u00E0 niveau dans l'image d'ex\u00E9cution\n    --add-modules <nom de module>[,<nom de module>...]\n                  modules racine \u00E0 r\u00E9soudre en plus du module initial.\n                  <nom de module> peut \u00E9galement \u00EAtre ALL-DEFAULT, ALL-SYSTEM,\n                  ALL-MODULE-PATH.\n    --list-modules\n                  r\u00E9pertorier les modules observables et quitter\n    --d <nom de module>\n    --describe-module <nom de module>\n                  d\u00E9crire un module et quitter\n    --dry-run     cr\u00E9er une machine virtuelle et charger la classe principale mais ne pas ex\u00E9cuter la m\u00E9thode principale.\n                  L'option--dry-run peut \u00EAtre utile pour la validation des\n                  options de ligne de commande telles que la configuration syst\u00E8me de module.\n    --validate-modules\n                  valider tous les modules et quitter\n                  L'option --validate-modules peut \u00EAtre utile pour la recherche de\n                  conflits et d'autres erreurs avec des modules dans le chemin de module.\n    -D<name>=<value>\n                  d\u00E9finir une propri\u00E9t\u00E9 syst\u00E8me\n    -verbose:[class|module|gc|jni]\n                  activer la sortie en mode verbose\n    -version      afficher la version de produit dans le flux d'erreur et quitter\n    --version     afficher la version de produit dans le flux de sortie et quitter\n    -showversion  afficher la version de produit dans le flux d'erreur et continuer\n    --show-version\n                  afficher la version de produit dans le flux de sortie et continuer\n    --show-module-resolution\n                  afficher la sortie de r\u00E9solution de module lors du d\u00E9marrage\n    -? -h -help\n                  afficher ce message d'aide dans le flux d'erreur\n    --help        afficher ce message d'erreur dans le flux de sortie\n    -X            afficher l'aide sur des options suppl\u00E9mentaires dans le flux d'erreur\n    --help-extra  afficher l'aide sur des options suppl\u00E9mentaires dans le flux de sortie\n    -ea[:<packagename>...|:<classname>]\n    -enableassertions[:<packagename>...|:<classname>]\n                  activer des assertions avec la granularit\u00E9 sp\u00E9cifi\u00E9e\n    -da[:<packagename>...|:<classname>]\n    -disableassertions[:<packagename>...|:<classname>]\n                  d\u00E9sactiver des assertions avec la granularit\u00E9 sp\u00E9cifi\u00E9e\n    -esa | -enablesystemassertions\n                  activer des assertions syst\u00E8me\n    -dsa | -disablesystemassertions\n                  d\u00E9sactiver des assertions syst\u00E8me\n    -agentlib:<libname>[=<options>]\n                  charger la biblioth\u00E8que d'agent natif <libname>, par ex. -agentlib:jdwp\n                  voir \u00E9galement -agentlib:jdwp=help\n    -agentpath:<pathname>[=<options>]\n                  charger la biblioth\u00E8que d'agent natif par nom de chemin complet\n    -javaagent:<jarpath>[=<options>]\n                  charger l'agent de langage de programmation, voir \
+java.launcher.opt.footer = \    -cp <chemin de recherche de classe de r\u00E9pertoires et de fichiers ZIP/JAR>\n    -classpath <chemin de recherche de classe de r\u00E9pertoires et de fichiers ZIP/JAR>\n    --class-path <chemin de recherche de classe de r\u00E9pertoires et de fichiers ZIP/JAR>\n                  Liste distincte {0} de r\u00E9pertoires, d''archives JAR\n                  et d'archives ZIP pour rechercher des fichiers de classe.\n    -p <chemin de module>\n    --module-path <chemin de module>...\n                  Liste distincte {0} de r\u00E9pertoires, chaque r\u00E9pertoire\n                  est un r\u00E9pertoire de modules.\n    --upgrade-module-path <chemin de module>...\n                  Liste distincte {0} de r\u00E9pertoires, chaque r\u00E9pertoire\n                  est un r\u00E9pertoire de module qui remplace les modules\n                  pouvant \u00EAtre mis \u00E0 niveau dans l'image d'ex\u00E9cution\n    --add-modules <nom de module>[,<nom de module>...]\n                  modules racine \u00E0 r\u00E9soudre en plus du module initial.\n                  <nom de module> peut \u00E9galement \u00EAtre ALL-DEFAULT, ALL-SYSTEM,\n                  ALL-MODULE-PATH.\n    --list-modules\n                  r\u00E9pertorier les modules observables et quitter\n    -d <nom de module>\n    --describe-module <nom de module>\n                  d\u00E9crire un module et quitter\n    --dry-run     cr\u00E9er une machine virtuelle et charger la classe principale mais ne pas ex\u00E9cuter la m\u00E9thode principale.\n                  L'option--dry-run peut \u00EAtre utile pour la validation des\n                  options de ligne de commande telles que la configuration syst\u00E8me de module.\n    --validate-modules\n                  valider tous les modules et quitter\n                  L'option --validate-modules peut \u00EAtre utile pour la recherche de\n                  conflits et d'autres erreurs avec des modules dans le chemin de module.\n    -D<name>=<value>\n                  d\u00E9finir une propri\u00E9t\u00E9 syst\u00E8me\n    -verbose:[class|module|gc|jni]\n                  activer la sortie en mode verbose\n    -version      afficher la version de produit dans le flux d'erreur et quitter\n    --version     afficher la version de produit dans le flux de sortie et quitter\n    -showversion  afficher la version de produit dans le flux d'erreur et continuer\n    --show-version\n                  afficher la version de produit dans le flux de sortie et continuer\n    --show-module-resolution\n                  afficher la sortie de r\u00E9solution de module lors du d\u00E9marrage\n    -? -h -help\n                  afficher ce message d'aide dans le flux d'erreur\n    --help        afficher ce message d'erreur dans le flux de sortie\n    -X            afficher l'aide sur des options suppl\u00E9mentaires dans le flux d'erreur\n    --help-extra  afficher l'aide sur des options suppl\u00E9mentaires dans le flux de sortie\n    -ea[:<packagename>...|:<classname>]\n    -enableassertions[:<packagename>...|:<classname>]\n                  activer des assertions avec la granularit\u00E9 sp\u00E9cifi\u00E9e\n    -da[:<packagename>...|:<classname>]\n    -disableassertions[:<packagename>...|:<classname>]\n                  d\u00E9sactiver des assertions avec la granularit\u00E9 sp\u00E9cifi\u00E9e\n    -esa | -enablesystemassertions\n                  activer des assertions syst\u00E8me\n    -dsa | -disablesystemassertions\n                  d\u00E9sactiver des assertions syst\u00E8me\n    -agentlib:<libname>[=<options>]\n                  charger la biblioth\u00E8que d'agent natif <libname>, par ex. -agentlib:jdwp\n                  voir \u00E9galement -agentlib:jdwp=help\n    -agentpath:<pathname>[=<options>]\n                  charger la biblioth\u00E8que d'agent natif par nom de chemin complet\n    -javaagent:<jarpath>[=<options>]\n                  charger l'agent de langage de programmation, voir \
 java.lang.instrument\n    -splash:<imagepath>\n                  afficher l'\u00E9cran d'accueil avec l'image indiqu\u00E9e\n                  Les images redimensionn\u00E9es HiDPI sont automatiquement prises en charge et utilis\u00E9es\n                  si elles sont disponibles. Le nom de fichier d'une image non redimensionn\u00E9e, par ex. image.ext,\n                  doit toujours \u00EAtre transmis comme argument \u00E0 l'option -splash.\n                  L'image redimensionn\u00E9e fournie la plus appropri\u00E9e sera automatiquement\n                  s\u00E9lectionn\u00E9e.\n                  Pour plus d'informations, reportez-vous \u00E0 la documentation relative \u00E0 l'API SplashScreen\n    fichiers @argument\n                  fichiers d'arguments contenant des options\n    -disable-@files\n                  emp\u00EAcher le d\u00E9veloppement suppl\u00E9mentaire de fichiers d'arguments\nAfin d'indiquer un argument pour une option longue, vous pouvez utiliser --<name>=<value> ou\n--<name> <value>.\n
 
 # Translators please note do not translate the options themselves
-java.launcher.X.usage=\n    -Xbatch           d\u00E9sactivation de la compilation en arri\u00E8re-plan\n    -Xbootclasspath/a:<r\u00E9pertoires et fichiers ZIP/JAR s\u00E9par\u00E9s par des {0}>\n                      ajout \u00E0 la fin du chemin de classe bootstrap\n    -Xcheck:jni       ex\u00E9cution de contr\u00F4les suppl\u00E9mentaires pour les fonctions JNI\n    -Xcomp            force la compilation de m\u00E9thodes au premier appel\n    -Xdebug           fourni pour la compatibilit\u00E9 amont\n    -Xdiag            affichage de messages de diagnostic suppl\u00E9mentaires\n    -Xfuture          activation des contr\u00F4les les plus stricts en vue d''anticiper la future valeur par d\u00E9faut\n    -Xint             ex\u00E9cution en mode interpr\u00E9t\u00E9 uniquement\n    -Xinternalversion\n                      affiche des informations de version JVM plus d\u00E9taill\u00E9es que\n                      l''option -version\n    -Xloggc:<file>    journalisation du statut de l''op\u00E9ration de ramasse-miette dans un fichier avec horodatage\n    -Xmixed           ex\u00E9cution en mode mixte (valeur par d\u00E9faut)\n    -Xmn<size>        d\u00E9finit les tailles initiale et maximale (en octets) de la portion de m\u00E9moire\n                      pour la jeune g\u00E9n\u00E9ration (nursery)\n    -Xms<size>        d\u00E9finition de la taille initiale des portions de m\u00E9moire Java\n    -Xmx<size>        d\u00E9finition de la taille maximale des portions de m\u00E9moire Java\n    -Xnoclassgc       d\u00E9sactivation de l''op\u00E9ration de ramasse-miette de la classe\n    -Xprof            sortie des donn\u00E9es de profilage d''UC (en phase d''abandon)\n    -Xrs              r\u00E9duction de l''utilisation des signaux OS par Java/la machine virtuelle (voir documentation)\n    -Xshare:auto      utilisation des donn\u00E9es de classe partag\u00E9es si possible (valeur par d\u00E9faut)\n    -Xshare:off       aucune tentative d''utilisation des donn\u00E9es de classe partag\u00E9es\n    -Xshare:on         utilisation des donn\u00E9es de classe partag\u00E9es obligatoire ou \u00E9chec de l''op\u00E9ration.\n    -XshowSettings    affichage de tous les param\u00E8tres et poursuite de l''op\u00E9ration\n    -XshowSettings:all\n                      affichage de tous les param\u00E8tres et poursuite de l''op\u00E9ration\n    -XshowSettings:locale\n                      affichage de tous les param\u00E8tres d''environnement local et poursuite de l''op\u00E9ration\n    -XshowSettings:properties\n                      affichage de tous les param\u00E8tres de propri\u00E9t\u00E9 et poursuite de l''op\u00E9ration\n    -XshowSettings:vm affichage de tous les param\u00E8tres de machine virtuelle et poursuite de l''op\u00E9ration\n    -Xss<size>        d\u00E9finition de la taille de pile de threads Java\n    -Xverify          d\u00E9finit le mode du v\u00E9rificateur de code ex\u00E9cutable\n    --add-reads <module>=<target-module>(,<target-module>)*\n                      met \u00E0 jour <module> pour lire <target-module>, sans tenir compte\n                      de la d\u00E9claration de module. \n                      <target-module> peut \u00EAtre ALL-UNNAMED pour lire tous les modules\n                      sans nom.\n    --add-exports <module>/<package>=<target-module>(,<target-module>)*\n                      met \u00E0 jour <module> pour exporter <package> vers <target-module>,\n                      sans tenir compte de la d\u00E9claration de module.\n                      <target-module> peut \u00EAtre ALL-UNNAMED pour exporter tous les\n                      modules sans nom.\n    --add-opens <module>/<package>=<target-module>(,<target-module>)*\n                      met \u00E0 jour <module> pour ouvrir <package> dans\n                      <target-module>, sans tenir compte de la d\u00E9claration de module.\n    --limit-modules <nom de module>[,<nom de module>...]\n                      limiter l''univers de modules observables\n    --patch-module <module>=<file>({0}<file>)*\n                      Remplacement ou augmentation d''un module avec des classes et des ressources\n                      dans des fichiers ou des r\u00E9pertoires JAR.\n    --disable-@files  d\u00E9sactivation d''autres d\u00E9veloppements de fichier d''argument\n\nCes options suppl\u00E9mentaires peuvent \u00EAtre modifi\u00E9es sans pr\u00E9avis.\n
+java.launcher.X.usage=\n    -Xbatch           d\u00E9sactivation de la compilation en arri\u00E8re-plan\n    -Xbootclasspath/a :<r\u00E9pertoires et fichiers ZIP/JAR s\u00E9par\u00E9s par des {0}>\n                      ajout \u00E0 la fin du chemin de classe bootstrap\n    -Xcheck:jni       ex\u00E9cution de contr\u00F4les suppl\u00E9mentaires pour les fonctions JNI\n    -Xcomp            force la compilation de m\u00E9thodes au premier appel\n    -Xdebug           fourni pour la compatibilit\u00E9 amont\n    -Xdiag            affichage de messages de diagnostic suppl\u00E9mentaires\n    -Xfuture          activation des contr\u00F4les les plus stricts en vue d''anticiper la future valeur par d\u00E9faut\n    -Xint             ex\u00E9cution en mode interpr\u00E9t\u00E9 uniquement\n    -Xinternalversion\n                      affiche des informations de version JVM plus d\u00E9taill\u00E9es que\n                      l''option -version\n    -Xloggc:<file>    journalisation du statut de l''op\u00E9ration de ramasse-miette dans un fichier avec horodatages\n    -Xmixed           ex\u00E9cution en mode mixte (valeur par d\u00E9faut)\n    -Xmn<size>        d\u00E9finit les tailles initiale et maximale (en octets) de la portion de m\u00E9moire\n                      pour la jeune g\u00E9n\u00E9ration (nursery)\n    -Xms<size>        d\u00E9finition de la taille initiale des portions de m\u00E9moire Java\n    -Xmx<size>        d\u00E9finition de la taille maximale des portions de m\u00E9moire Java\n    -Xnoclassgc       d\u00E9sactivation de l''op\u00E9ration de ramasse-miette de la classe\n    -Xrs               r\u00E9duction de l''utilisation des signaux OS par Java/la machine virtuelle (voir documentation)\n    -Xshare:auto      utilisation des donn\u00E9es de classe partag\u00E9es si possible (valeur par d\u00E9faut)\n    -Xshare:off       aucune tentative d''utilisation des donn\u00E9es de classe partag\u00E9es\n    -Xshare:on        utilisation des donn\u00E9es de classe partag\u00E9es obligatoire ou \u00E9chec de l''op\u00E9ration.\n    -XshowSettings    affichage de tous les param\u00E8tres et poursuite de l''op\u00E9ration\n    -XshowSettings:all\n                      affichage de tous les param\u00E8tres et poursuite de l''op\u00E9ration\n    -XshowSettings:locale\n                       affichage de tous les param\u00E8tres d''environnement local et poursuite de l''op\u00E9ration\n    -XshowSettings:properties\n                       affichage de tous les param\u00E8tres de propri\u00E9t\u00E9 et poursuite de l''op\u00E9ration\n    -XshowSettings:vm affichage de tous les param\u00E8tres de machine virtuelle et poursuite de l''op\u00E9ration\n    -Xss<size>        d\u00E9finition de la taille de pile de thread Java\n    -Xverify          d\u00E9finit le mode du v\u00E9rificateur de code ex\u00E9cutable\n    --add-reads <module>=<target-module>(,<target-module>)*\n                      met \u00E0 jour <module> pour lire <target-module>, sans tenir compte\n                      de la d\u00E9claration de module. \n                      <target-module> peut \u00EAtre ALL-UNNAMED pour lire tous les\n                      modules sans nom.\n    --add-exports <module>/<package>=<target-module>(,<target-module>)*\n                      met \u00E0 jour <module> pour exporter <package> vers <target-module>,\n                      sans tenir compte de la d\u00E9claration de module.\n                      <target-module> peut \u00EAtre ALL-UNNAMED pour effectuer un export vers tous\n                      les modules sans nom.\n    --add-opens <module>/<package>=<target-module>(,<target-module>)*\n                      met \u00E0 jour <module> pour ouvrir <package> vers\n                      <target-module>, sans tenir compte de la d\u00E9claration de module.\n    --illegal-access=<value>\n                      autorise ou refuse l''acc\u00E8s \u00E0 des membres de types dans des modules nomm\u00E9s\n                      par code \
+dans des modules sans nom.\n                      <value> est l''une des valeurs suivantes : "deny", "permit", "warn" ou "debug"\n                      Cette option sera enlev\u00E9e dans une version ult\u00E9rieure.\n    --limit-modules <module name>[,<module name>...]\n                      limite l''univers des modules observables\n    --patch-module <module>=<file>({0}<file>)*\n                      remplace ou augmente un module avec des classes et des ressources\n                      dans des fichiers ou r\u00E9pertoires JAR.\n    --disable-@files  d\u00E9sactive d''autres d\u00E9veloppements de fichier d''argument\n\nCes options suppl\u00E9mentaires peuvent \u00EAtre modifi\u00E9es sans pr\u00E9avis.\n
 
 # Translators please note do not translate the options themselves
 java.launcher.X.macosx.usage=\nLes options suivantes sont propres \u00E0 Mac OS X :\n    -XstartOnFirstThread\n                      ex\u00E9cute la m\u00E9thode main() sur le premier thread (AppKit)\n    -Xdock:name=<nom d'application>\n                      remplace le nom d'application par d\u00E9faut affich\u00E9 dans l'ancrage\n    -Xdock:icon=<chemin vers le fichier d'ic\u00F4ne>\n                      remplace l'ic\u00F4ne par d\u00E9faut affich\u00E9e dans l'ancrage\n\n
@@ -46,6 +46,7 @@
 java.launcher.cls.error4=Erreur : la m\u00E9thode principale est introuvable dans la classe {0}, d\u00E9finissez la m\u00E9thode principale comme suit :\n   public static void main(String[] args)\nou une classe d''applications JavaFX doit \u00E9tendre {1}
 java.launcher.cls.error5=Erreur : des composants d'ex\u00E9cution JavaFX obligatoires pour ex\u00E9cuter cette application sont manquants.
 java.launcher.cls.error6=Erreur : LinkageError lors du chargement de la classe principale {0}\n\t{1}
+java.launcher.cls.error7=Erreur : impossible d''initialiser la classe principale {0}\nCaus\u00E9 par : {1}: {2}
 java.launcher.jar.error1=Erreur : une erreur inattendue est survenue lors de la tentative d''ouverture du fichier {0}
 java.launcher.jar.error2=fichier manifeste introuvable dans {0}
 java.launcher.jar.error3=aucun attribut manifest principal dans {0}
@@ -54,5 +55,6 @@
 java.launcher.javafx.error1=Erreur : la signature de la m\u00E9thode launchApplication JavaFX est incorrecte, la\nm\u00E9thode doit \u00EAtre d\u00E9clar\u00E9e statique et renvoyer une valeur de type void
 java.launcher.module.error1=le module {0} n''a pas d''attribut MainClass, utilisez -m <module>/<main-class>
 java.launcher.module.error2=Erreur : impossible de trouver ou charger la classe principale {0} dans le module {1}
-java.launcher.module.error3=Erreur : impossible de charger la classe principale {0} \u00E0 partir du module {1}\n\t{2}
+java.launcher.module.error3=Erreur : impossible de charger la classe principale {0} dans le module {1}\n\t{2}
 java.launcher.module.error4={0} introuvable
+java.launcher.module.error5=Erreur : impossible d''initialiser la classe principale {0} dans le module {1}\nCaus\u00E9 par : {1}: {2}
--- a/src/java.base/share/classes/sun/launcher/resources/launcher_it.properties	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.base/share/classes/sun/launcher/resources/launcher_it.properties	Tue Jan 30 16:41:40 2018 +0100
@@ -26,17 +26,16 @@
 # Translators please note do not translate the options themselves
 java.launcher.opt.header  =   Uso: {0} [opzioni] <classe principale> [argomenti...]\n           (per eseguire una classe)\n   oppure  {0} [opzioni] -jar <file jar> [argomenti...]\n           (per eseguire un file jar)\n   oppure  {0} [opzioni] -m <modulo>[/<classe principale>] [argomenti...]\n       {0} [opzioni] --module <modulo>[/<classe principale>] [argomenti...]\n           (per eseguire la classe principale in un modulo)\n\n Gli argomenti specificati dopo la classe principale, dopo -jar <file jar>, -m o --module\n <modulo>/<classe principale> vengono passati come argomenti alla classe principale.\n\n dove opzioni include:\n\n
 
-java.launcher.opt.datamodel  =\    -d{0}\t  opzione non pi\u00F9 valida; verr\u00E0 rimossa in una release futura\n
 java.launcher.opt.vmselect   =\    {0}\t  per selezionare la VM "{1}"\n
 java.launcher.opt.hotspot    =\    {0}\t  \u00E8 un sinonimo per la VM "{1}" [non valido]\n
 
 # Translators please note do not translate the options themselves
-java.launcher.opt.footer = \    -cp <classpath di ricerca di directory e file zip/jar>\n    -classpath <classpath di ricerca di directory e file zip/jar>\n    -class-path <classpath di ricerca di directory e file zip/jar>\n                  Una lista separata da {0} di directory, archivi JAR\n                  e archivi ZIP in cui cercare i file di classe.\n    -p <percorso modulo>\n    --module-path <percorso modulo>...\n                  Una lista separata da {0} di directory. Ogni directory\n                  \u00E8 una directory di moduli.\n    --upgrade-module-path <percorso modulo>...\n                  Una lista separata da {0} di directory. Ogni directory\n                  \u00E8 una directory di moduli che sostituiscono i moduli\n                  aggiornabili nell'immagine in fase di esecuzione\n    --add-modules <nome modulo>[,<nome modulo>...]\n                  I moduli radice da risolvere in aggiunta al modulo iniziale.\n                  <nome modulo> pu\u00F2 essere anche ALL-DEFAULT, ALL-SYSTEM,\n                  ALL-MODULE-PATH.\n    --list-modules\n                  Elenca i moduli osservabili ed esce\n    --d <nome modulo>\n    --describe-module <nome modulo>\n                  Descrive un modulo ed esce\n    --dry-run      Crea la VM e carica la classe principale ma non esegue il metodo principale.\n                  L'opzione --dry-run pu\u00F2 essere utile per la convalida delle\n                  opzioni della riga di comando, ad esempio quelle utilizzate per la configurazione del sistema di moduli.\n    --validate-modules\n                  Convalida tutti i moduli ed esce\n                  L'opzione --validate-modules pu\u00F2 essere utile per rilevare\n                  conflitti e altri errori con i moduli nel percorso dei moduli.\n    -D<nome>=<valore>\n                  Imposta una propriet\u00E0 di sistema\n    -verbose:[class|module|gc|jni]\n                  abilitare output descrittivo\n    -version      Visualizza la versione del prodotto nel flusso di errori ed esce\n    -version      Visualizza la versione del prodotto nel flusso di output ed esce\n    -showversion      Visualizza la versione del prodotto nel flusso di errori e continua\n    --show-version\n                  Visualizza la versione del prodotto nel flusso di output e continua\n    --show-module-resolution\n                  Mostra l'output della risoluzione del modulo durante l'avvio\n    -? -h -help\n                  Visualizza questo messaggio della Guida nel flusso di errori\n    --help        Visualizza questo messaggio della Guida nel flusso di output\n    -X            Visualizza la Guida relativa alle opzioni non standard nel flusso di errori\n    --help-extra  Visualizza la Guida relativa alle opzioni non standard nel flusso di output\n    -ea[:<nome package>...|:<nome classe>]\n    -enableassertions[:<nome package>...|:<nome classe>]\n                  Abilita le asserzioni con la granularit\u00E0 specificata\n    -da[:<nome package>...|:<nome classe>]\n    -disableassertions[:<nome package>...|:<nome classe>]\n                  Disabilita le asserzioni con la granularit\u00E0 specificata\n    -esa | -enablesystemassertions\n                  Abilita le asserzioni di sistema\n    -dsa | -disablesystemassertions\n                  Disabilita le asserzioni di sistema\n    -agentlib:<nome libreria>[=<opzioni>]\n                  Carica la libreria agenti nativa <nome libreria>, ad esempio -agentlib:jdwp\n                  Vedere anche -agentlib:jdwp=help\n    -agentpath:<nome percorso>[=<opzioni>]\n                  Carica la libreria agenti nativa con il percorso completo\n    -javaagent:<percorso jar>[=<opzioni>]\n                  Carica l'agente del linguaggio di programmazione Java, vedere java.lang.instrument\n    -splash:<percorso immagine>\n                  Mostra la schermata iniziale con l'immagine specificata\n                  Le immagini ridimensionate HiDPI sono supportate e utilizzate \
+java.launcher.opt.footer = \    -cp <classpath di ricerca di directory e file zip/jar>\n    -classpath <classpath di ricerca di directory e file zip/jar>\n    -class-path <classpath di ricerca di directory e file zip/jar>\n                  Una lista separata da {0} di directory, archivi JAR\n                  e archivi ZIP in cui cercare i file di classe.\n    -p <percorso modulo>\n    --module-path <percorso modulo>...\n                  Una lista separata da {0} di directory. Ogni directory\n                  \u00E8 una directory di moduli.\n    --upgrade-module-path <percorso modulo>...\n                  Una lista separata da {0} di directory. Ogni directory\n                  \u00E8 una directory di moduli che sostituiscono i moduli\n                  aggiornabili nell'immagine in fase di esecuzione\n    --add-modules <nome modulo>[,<nome modulo>...]\n                  I moduli radice da risolvere in aggiunta al modulo iniziale.\n                  <nome modulo> pu\u00F2 essere anche ALL-DEFAULT, ALL-SYSTEM,\n                  ALL-MODULE-PATH.\n    --list-modules\n                  Elenca i moduli osservabili ed esce\n    -d <nome modulo>\n    --describe-module <nome modulo>\n                  Descrive un modulo ed esce\n    --dry-run      Crea la VM e carica la classe principale ma non esegue il metodo principale.\n                  L'opzione --dry-run pu\u00F2 essere utile per la convalida delle\n                  opzioni della riga di comando, ad esempio quelle utilizzate per la configurazione del sistema di moduli.\n    --validate-modules\n                  Convalida tutti i moduli ed esce\n                  L'opzione --validate-modules pu\u00F2 essere utile per rilevare\n                  conflitti e altri errori con i moduli nel percorso dei moduli.\n    -D<nome>=<valore>\n                  Imposta una propriet\u00E0 di sistema\n    -verbose:[class|module|gc|jni]\n                  abilitare output descrittivo\n    -version      Visualizza la versione del prodotto nel flusso di errori ed esce\n    -version      Visualizza la versione del prodotto nel flusso di output ed esce\n    -showversion      Visualizza la versione del prodotto nel flusso di errori e continua\n    --show-version\n                  Visualizza la versione del prodotto nel flusso di output e continua\n    --show-module-resolution\n                  Mostra l'output della risoluzione del modulo durante l'avvio\n    -? -h -help\n                  Visualizza questo messaggio della Guida nel flusso di errori\n    --help        Visualizza questo messaggio della Guida nel flusso di output\n    -X            Visualizza la Guida relativa alle opzioni non standard nel flusso di errori\n    --help-extra  Visualizza la Guida relativa alle opzioni non standard nel flusso di output\n    -ea[:<nome package>...|:<nome classe>]\n    -enableassertions[:<nome package>...|:<nome classe>]\n                  Abilita le asserzioni con la granularit\u00E0 specificata\n    -da[:<nome package>...|:<nome classe>]\n    -disableassertions[:<nome package>...|:<nome classe>]\n                  Disabilita le asserzioni con la granularit\u00E0 specificata\n    -esa | -enablesystemassertions\n                  Abilita le asserzioni di sistema\n    -dsa | -disablesystemassertions\n                  Disabilita le asserzioni di sistema\n    -agentlib:<nome libreria>[=<opzioni>]\n                  Carica la libreria agenti nativa <nome libreria>, ad esempio -agentlib:jdwp\n                  Vedere anche -agentlib:jdwp=help\n    -agentpath:<nome percorso>[=<opzioni>]\n                  Carica la libreria agenti nativa con il percorso completo\n    -javaagent:<percorso jar>[=<opzioni>]\n                  Carica l'agente del linguaggio di programmazione Java, vedere java.lang.instrument\n    -splash:<percorso immagine>\n                  Mostra la schermata iniziale con l'immagine specificata\n                  Le immagini ridimensionate HiDPI sono supportate e utilizzate \
 automaticamente\n                  se disponibili. I nomi file delle immagini non ridimensionate, ad esempio image.ext,\n                  devono essere sempre passati come argomenti all'opzione -splash.\n                  Verr\u00E0 scelta automaticamente l'immagine ridimensionata pi\u00F9 appropriata\n                  fornita.\n                  Per ulteriori informazioni, vedere la documentazione relativa all'API SplashScreen\n    @file argomenti\n                  Uno o pi\u00F9 file argomenti contenenti opzioni\n    -disable-@files\n                  Impedisce l'ulteriore espansione di file argomenti\nPer specificare un argomento per un'opzione lunga, \u00E8 possibile usare --<nome>=<valore> oppure\n--<nome> <valore>.\n
 
 # Translators please note do not translate the options themselves
-java.launcher.X.usage=\n    -Xbatch           Disabilita la compilazione in background.\n    -Xbootclasspath/a:<directory e file zip/jar separati da {0}>\n                      Aggiunge alla fine del classpath di bootstrap.\n   -Xcheck:jni       Esegue controlli aggiuntivi per le funzioni JNI.\n    -Xcomp            Forza la compilazione dei metodi al primo richiamo.\n    -Xdebug           Fornito per la compatibilit\u00E0 con le versioni precedenti.\n    -Xdiag            Mostra ulteriori messaggi diagnostici.\n    -Xfuture          Abilita i controlli pi\u00F9 limitativi anticipando le impostazioni predefinite future.\n    -Xint             Esecuzione solo in modalit\u00E0 convertita.\n    -Xinternalversion\n                      Visualizza informazioni pi\u00F9 dettagliate sulla versione JVM rispetto\n                      all''opzione -version.\n    -Xloggc:<file>    Registra lo stato GC in un file con indicatori orari.\n    -Xmixed           Esecuzione in modalit\u00E0 mista (impostazione predefinita).\n    -Xmn<dimensione>        Imposta le dimensioni iniziale e massima (in byte) dell''heap\n                      per la young generation (nursery).\n    -Xms<dimensione>        Imposta la dimensione heap Java iniziale.\n    -Xmx<dimensione>        Imposta la dimensione heap Java massima.\n    -Xnoclassgc       Disabilta la garbage collection della classe.\n    -Xprof            Visualizza i dati di profilo della CPU (non pi\u00F9 valida).\n    -Xrs              Riduce l''uso di segnali del sistema operativo da Java/VM (vedere la documentazione).\n    -Xshare:auto      Utilizza i dati di classe condivisi se possibile (impostazione predefinita).\n     -Xshare:off       Non tenta di utilizzare i dati di classe condivisi.\n    -Xshare:on        Richiede l''uso dei dati di classe condivisi, altrimenti l''esecuzione non riesce.\n    -XshowSettings    Mostra tutte le impostazioni e continua.\n    -XshowSettings:all\n                      Mostra tutte le impostazioni e continua.\n    -XshowSettings:locale\n                      Mostra tutte le impostazioni correlate alle impostazioni nazionali e continua.\n    -XshowSettings:properties\n                      Mostra tutte le impostazioni delle propriet\u00E0 e continua.\n    -XshowSettings:vm Mostra tutte le impostazioni correlate alla VM e continua.\n    -Xss<dimensione>        Imposta la dimensione dello stack di thread Java.\n     -Xverify          Imposta la modalit\u00E0 del verificatore bytecode.\n    --add-reads:<modulo>=<modulo destinazione>(,<modulo destinazione>)*\n                      Aggiorna <modulo> per leggere <modulo destinazione>, indipendentemente\n                      dalla dichiarazione del modulo.\n                      <modulo destinazione> pu\u00F2 essere ALL-UNNAMED per leggere tutti i\n                      moduli senza nome.\n   -add-exports:<modulo>/<package>=<modulo destinazione>(,<modulo destinazione>)*\n                      Aggiorna <modulo> per esportare <package> in <modulo destinazione>,\n                      indipendentemente dalla dichiarazione del modulo.\n                      <modulo destinazione> pu\u00F2 essere ALL-UNNAMED per esportare tutti i\n                      moduli senza nome.\n    --add-opens <modulo>/<package>=<modulo destinazione>(,<modulo destinazione>)*\n                      Aggiorna <modulo> per aprire <package> in\n                      <modulo destinazione>, indipendentemente dalla dichiarazione del modulo.\n    --limit-modules <nome modulo>[,<nome modulo>...]\n                      Limita l''universo di moduli osservabili\n    -patch-module <modulo>=<file>({0}<file>)*\n                      Sostituisce o migliora un modulo con \
-classi e risorse\n                      in file JAR o directory.\n    --disable-@files  Disabilita l''ulteriore espansione di file argomenti.\n\nQueste opzioni non standard sono soggette a modifiche senza preavviso.\n
+java.launcher.X.usage=\n    -Xbatch           Disabilita la compilazione in background.\n    -Xbootclasspath/a:<directory e file zip/jar separati da {0}>\n                      Aggiunge alla fine del classpath di bootstrap.\n   -Xcheck:jni       Esegue controlli aggiuntivi per le funzioni JNI.\n    -Xcomp            Forza la compilazione dei metodi al primo richiamo.\n    -Xdebug           Fornito per la compatibilit\u00E0 con le versioni precedenti.\n    -Xdiag            Mostra ulteriori messaggi diagnostici.\n    -Xfuture          Abilita i controlli pi\u00F9 limitativi anticipando le impostazioni predefinite future.\n    -Xint             Esecuzione solo in modalit\u00E0 convertita.\n    -Xinternalversion\n                      Visualizza informazioni pi\u00F9 dettagliate sulla versione JVM rispetto\n                      all''opzione -version.\n    -Xloggc:<file>    Registra lo stato GC in un file con indicatori orari.\n    -Xmixed           Esecuzione in modalit\u00E0 mista (impostazione predefinita).\n    -Xmn<size>        Imposta le dimensioni iniziale e massima (in byte) dell''heap\n                      per la young generation (nursery).\n    -Xms<size>        Imposta la dimensione heap Java iniziale.\n    -Xmx<size>        Imposta la dimensione heap Java massima.\n    -Xnoclassgc       Disabilta la garbage collection della classe.\n    -Xrs              Riduce l''uso di segnali del sistema operativo da Java/VM (vedere la documentazione).\n    -Xshare:auto      Utilizza i dati di classe condivisi se possibile (impostazione predefinita).\n     -Xshare:off       Non tenta di utilizzare i dati di classe condivisi.\n    -Xshare:on        Richiede l''uso dei dati di classe condivisi, altrimenti l''esecuzione non riesce.\n    -XshowSettings    Mostra tutte le impostazioni e continua.\n    -XshowSettings:all\n                      Mostra tutte le impostazioni e continua.\n    -XshowSettings:locale\n                      Mostra tutte le impostazioni correlate alle impostazioni nazionali e continua.\n    -XshowSettings:properties\n                      Mostra tutte le impostazioni delle propriet\u00E0 e continua.\n    -XshowSettings:vm Mostra tutte le impostazioni correlate alla VM e continua.\n    -Xss<size>        Imposta la dimensione dello stack di thread Java.\n     -Xverify          Imposta la modalit\u00E0 del verificatore bytecode.\n    --add-reads:<module>=<target-module>(,<target-module>)*\n                      Aggiorna <module> per leggere <target-module>, indipendentemente\n                      dalla dichiarazione del modulo. \n                      <target-module> pu\u00F2 essere ALL-UNNAMED per leggere tutti i\n                      moduli senza nome.\n   -add-exports:<module>/<package>=<target-module>(,<target-module>)*\n                      Aggiorna <module> per esportare <package> in <target-module>,\n                      indipendentemente dalla dichiarazione del modulo.\n                      <target-module> pu\u00F2 essere ALL-UNNAMED per esportare tutti i\n                      moduli senza nome.\n    --add-opens <module>/<package>=<target-module>(,<target-module>)*\n                      Aggiorna <module> per aprire <package> in\n                      <target-module>, indipendentemente dalla dichiarazione del modulo.\n    --illegal-access=<value>\n                      Consente o nega l''accesso ai membri dei tipi nei moduli denominati\n                      mediante codice nei moduli senza nome.\n                      <value> pu\u00F2 essere "deny", "permit", "warn" o "debug".\n                      Questa opzione verr\u00E0 rimossa in una release futura.\n    --limit-modules <module name>[,<module name>...]\n                      Limita l''universo dei moduli osservabili.\n    -patch-module <module>=<file>({0}<file>)*\n                      Sostituisce o migliora un modulo con classi e risorse\n                      in file JAR o directory.\n    --disable-@files  Disabilita l''ulteriore espansione \
+di file argomenti.\n\nQueste opzioni non sono opzioni standard e sono soggette a modifiche senza preavviso.\n
 
 # Translators please note do not translate the options themselves
 java.launcher.X.macosx.usage=\nLe opzioni riportate di seguito sono specifiche del sistema operativo Mac OS X:\n    -XstartOnFirstThread\n                      Esegue il metodo main() sul primo thread (AppKit).\n    -Xdock:name=<nome applicazione>\n                      Sostituisce il nome applicazione predefinito visualizzato nel dock\n    -Xdock:icon=<percorso file icona>\n                      Sostituisce l'icona predefinita visualizzata nel dock\n\n
@@ -47,6 +46,7 @@
 java.launcher.cls.error4=Errore: il metodo principale non \u00E8 stato trovato nella classe {0}. Definire il metodo principale come:\n   public static void main(String[] args)\naltrimenti una classe applicazione JavaFX deve estendere {1}
 java.launcher.cls.error5=Errore: non sono presenti i componenti runtime di JavaFX necessari per eseguire questa applicazione
 java.launcher.cls.error6=Errore: LinkageError durante il caricamento della classe principale {0}\n\t{1}
+java.launcher.cls.error7=Errore: impossibile inizializzare la classe principale {0}\nCausato da: {1}: {2}
 java.launcher.jar.error1=Errore: si \u00E8 verificato un errore imprevisto durante il tentativo di aprire il file {0}
 java.launcher.jar.error2=manifest non trovato in {0}
 java.launcher.jar.error3=nessun attributo manifest principale in {0}
@@ -55,5 +55,6 @@
 java.launcher.javafx.error1=Errore: il metodo JavaFX launchApplication dispone di una firma errata, \nla firma deve essere dichiarata static e restituire un valore di tipo void
 java.launcher.module.error1=il modulo {0} non dispone di un attributo MainClass. Utilizzare -m <module>/<mail-class>
 java.launcher.module.error2=Errore: impossibile trovare o caricare la classe principale {0} nel modulo {1}
-java.launcher.module.error3=Errore: impossibile caricare la classe principale {0} dal modulo {1}\n\t{2}
+java.launcher.module.error3=Errore: impossibile caricare la classe principale {0} nel modulo {1}\n\t{2}
 java.launcher.module.error4={0} non trovato
+java.launcher.module.error5=Errore: impossibile inizializzare la classe principale {0} nel modulo {1}\nCausato da: {1}: {2}
--- a/src/java.base/share/classes/sun/launcher/resources/launcher_ja.properties	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.base/share/classes/sun/launcher/resources/launcher_ja.properties	Tue Jan 30 16:41:40 2018 +0100
@@ -26,18 +26,17 @@
 # Translators please note do not translate the options themselves
 java.launcher.opt.header  =   \u4F7F\u7528\u65B9\u6CD5: {0} [options] <mainclass> [args...]\n           (\u30AF\u30E9\u30B9\u3092\u5B9F\u884C\u3059\u308B\u5834\u5408)\n   \u307E\u305F\u306F  {0} [options] -jar <jarfile> [args...]\n           (jar\u30D5\u30A1\u30A4\u30EB\u3092\u5B9F\u884C\u3059\u308B\u5834\u5408)\n   \u307E\u305F\u306F  {0} [options] -m <module>[/<mainclass>] [args...]\n       {0} [options] --module <module>[/<mainclass>] [args...]\n           (\u30E2\u30B8\u30E5\u30FC\u30EB\u306E\u30E1\u30A4\u30F3\u30FB\u30AF\u30E9\u30B9\u3092\u5B9F\u884C\u3059\u308B\u5834\u5408)\n\n \u30E1\u30A4\u30F3\u30FB\u30AF\u30E9\u30B9-jar <jarfile>\u3001-m\u307E\u305F\u306F--module\n <module>/<mainclass>\u306B\u7D9A\u304F\u5F15\u6570\u306F\u3001\u30E1\u30A4\u30F3\u30FB\u30AF\u30E9\u30B9\u3078\u306E\u5F15\u6570\u3068\u3057\u3066\u6E21\u3055\u308C\u307E\u3059\u3002\n\n \u30AA\u30D7\u30B7\u30E7\u30F3\u306F\u6B21\u306E\u3068\u304A\u308A\u3067\u3059:\n\n
 
-java.launcher.opt.datamodel  =\    -d{0}\t  \u63A8\u5968\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002\u4ECA\u5F8C\u306E\u30EA\u30EA\u30FC\u30B9\u3067\u524A\u9664\u3055\u308C\u308B\u4E88\u5B9A\u3067\u3059\n
 java.launcher.opt.vmselect   =\    {0}\t  "{1}" VM\u3092\u9078\u629E\u3059\u308B\u5834\u5408\n
 java.launcher.opt.hotspot    =\    {0}\t  \u306F"{1}" VM\u306E\u30B7\u30CE\u30CB\u30E0\u3067\u3059  [\u975E\u63A8\u5968]\n
 
 # Translators please note do not translate the options themselves
-java.launcher.opt.footer = \    -cp <\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u304A\u3088\u3073zip/jar\u30D5\u30A1\u30A4\u30EB\u306E\u30AF\u30E9\u30B9\u691C\u7D22\u30D1\u30B9>\n    -classpath <\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u304A\u3088\u3073zip/jar\u30D5\u30A1\u30A4\u30EB\u306E\u30AF\u30E9\u30B9\u691C\u7D22\u30D1\u30B9>\n    --class-path <\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u304A\u3088\u3073zip/jar\u30D5\u30A1\u30A4\u30EB\u306E\u30AF\u30E9\u30B9\u691C\u7D22\u30D1\u30B9>\n                  {0}\u533A\u5207\u308A\u30EA\u30B9\u30C8(\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u3001JAR\u30A2\u30FC\u30AB\u30A4\u30D6\u3001\n                  ZIP\u30A2\u30FC\u30AB\u30A4\u30D6)\u3067\u3001\u30AF\u30E9\u30B9\u30FB\u30D5\u30A1\u30A4\u30EB\u306E\u691C\u7D22\u7528\u3002\n    -p <module path>\n    --module-path <module path>...\n                  \u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306E{0}\u533A\u5207\u308A\u30EA\u30B9\u30C8\u3001\u5404\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\n                  \u306F\u30E2\u30B8\u30E5\u30FC\u30EB\u306E\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u3067\u3059\u3002\n    --upgrade-module-path <module path>...\n                  \u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306E{0}\u533A\u5207\u308A\u30EA\u30B9\u30C8\u3001\u5404\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\n                  \u306F\u3001\u30E9\u30F3\u30BF\u30A4\u30E0\u30FB\u30A4\u30E1\u30FC\u30B8\u5185\u306E\u30A2\u30C3\u30D7\u30B0\u30EC\u30FC\u30C9\u53EF\u80FD\u306A\n                  \u30E2\u30B8\u30E5\u30FC\u30EB\u3092\u7F6E\u63DB\u3059\u308B\u30E2\u30B8\u30E5\u30FC\u30EB\u306E\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u3067\u3059\n    --add-modules <module name>[,<module name>...]\n                  \u521D\u671F\u30E2\u30B8\u30E5\u30FC\u30EB\u306B\u52A0\u3048\u3066\u89E3\u6C7A\u3059\u308B\u30EB\u30FC\u30C8\u30FB\u30E2\u30B8\u30E5\u30FC\u30EB\u3002\n                  <module name>\u306B\u306F\u6B21\u3082\u6307\u5B9A\u3067\u304D\u307E\u3059: ALL-DEFAULT\u3001ALL-SYSTEM\u3001\n                  ALL-MODULE-PATH.\n    --list-modules\n                  \u53C2\u7167\u53EF\u80FD\u306A\u30E2\u30B8\u30E5\u30FC\u30EB\u3092\u30EA\u30B9\u30C8\u3057\u7D42\u4E86\u3057\u307E\u3059\n    --d <module name>\n    --describe-module <module name>\n                  \u30E2\u30B8\u30E5\u30FC\u30EB\u3092\u8AAC\u660E\u3057\u7D42\u4E86\u3057\u307E\u3059\n    --dry-run     VM\u3092\u4F5C\u6210\u3057\u30E1\u30A4\u30F3\u30FB\u30AF\u30E9\u30B9\u3092\u30ED\u30FC\u30C9\u3057\u307E\u3059\u304C\u3001\u30E1\u30A4\u30F3\u30FB\u30E1\u30BD\u30C3\u30C9\u306F\u5B9F\u884C\u3057\u307E\u305B\u3093\u3002\n                  --dry-run\u30AA\u30D7\u30B7\u30E7\u30F3\u306F\u3001\u6B21\u306E\u691C\u8A3C\u306B\u5F79\u7ACB\u3064\u5834\u5408\u304C\u3042\u308A\u307E\u3059:\n                  \u30E2\u30B8\u30E5\u30FC\u30EB\u30FB\u30B7\u30B9\u30C6\u30E0\u69CB\u6210\u306A\u3069\u306E\u30B3\u30DE\u30F3\u30C9\u884C\u30AA\u30D7\u30B7\u30E7\u30F3\u3002\n    --validate-modules\n                  \u3059\u3079\u3066\u306E\u30E2\u30B8\u30E5\u30FC\u30EB\u3092\u691C\u8A3C\u3057\u7D42\u4E86\u3057\u307E\u3059\n                  --validate-modules\u30AA\u30D7\u30B7\u30E7\u30F3\u306F\u3001\u6B21\u306E\u691C\u7D22\u306B\u5F79\u7ACB\u3064\u5834\u5408\u304C\u3042\u308A\u307E\u3059:\n                  \u30E2\u30B8\u30E5\u30FC\u30EB\u30FB\u30D1\u30B9\u4E0A\u306E\u30E2\u30B8\u30E5\u30FC\u30EB\u3067\u306E\u7AF6\u5408\u304A\u3088\u3073\u305D\u306E\u4ED6\u306E\u30A8\u30E9\u30FC\u3002\n    -D<name>=<value>\n                  \u30B7\u30B9\u30C6\u30E0\u30FB\u30D7\u30ED\u30D1\u30C6\u30A3\u3092\u8A2D\u5B9A\u3057\u307E\u3059\n    -verbose:[class|module|gc|jni]\n                  \u8A73\u7D30\u51FA\u529B\u3092\u6709\u52B9\u306B\u3057\u307E\u3059\n    -version      \u88FD\u54C1\u30D0\u30FC\u30B8\u30E7\u30F3\u3092\u30A8\u30E9\u30FC\u30FB\u30B9\u30C8\u30EA\u30FC\u30E0\u306B\u51FA\u529B\u3057\u3066\u7D42\u4E86\u3057\u307E\u3059\n    --version     \
+java.launcher.opt.footer = \    -cp <\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u304A\u3088\u3073zip/jar\u30D5\u30A1\u30A4\u30EB\u306E\u30AF\u30E9\u30B9\u691C\u7D22\u30D1\u30B9>\n    -classpath <\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u304A\u3088\u3073zip/jar\u30D5\u30A1\u30A4\u30EB\u306E\u30AF\u30E9\u30B9\u691C\u7D22\u30D1\u30B9>\n    --class-path <\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u304A\u3088\u3073zip/jar\u30D5\u30A1\u30A4\u30EB\u306E\u30AF\u30E9\u30B9\u691C\u7D22\u30D1\u30B9>\n                  {0}\u533A\u5207\u308A\u30EA\u30B9\u30C8(\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u3001JAR\u30A2\u30FC\u30AB\u30A4\u30D6\u3001\n                  ZIP\u30A2\u30FC\u30AB\u30A4\u30D6)\u3067\u3001\u30AF\u30E9\u30B9\u30FB\u30D5\u30A1\u30A4\u30EB\u306E\u691C\u7D22\u7528\u3002\n    -p <module path>\n    --module-path <module path>...\n                  \u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306E{0}\u533A\u5207\u308A\u30EA\u30B9\u30C8\u3001\u5404\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\n                  \u306F\u30E2\u30B8\u30E5\u30FC\u30EB\u306E\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u3067\u3059\u3002\n    --upgrade-module-path <module path>...\n                  \u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306E{0}\u533A\u5207\u308A\u30EA\u30B9\u30C8\u3001\u5404\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\n                  \u306F\u3001\u30E9\u30F3\u30BF\u30A4\u30E0\u30FB\u30A4\u30E1\u30FC\u30B8\u5185\u306E\u30A2\u30C3\u30D7\u30B0\u30EC\u30FC\u30C9\u53EF\u80FD\u306A\n                  \u30E2\u30B8\u30E5\u30FC\u30EB\u3092\u7F6E\u63DB\u3059\u308B\u30E2\u30B8\u30E5\u30FC\u30EB\u306E\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u3067\u3059\n    --add-modules <module name>[,<module name>...]\n                  \u521D\u671F\u30E2\u30B8\u30E5\u30FC\u30EB\u306B\u52A0\u3048\u3066\u89E3\u6C7A\u3059\u308B\u30EB\u30FC\u30C8\u30FB\u30E2\u30B8\u30E5\u30FC\u30EB\u3002\n                  <module name>\u306B\u306F\u6B21\u3082\u6307\u5B9A\u3067\u304D\u307E\u3059: ALL-DEFAULT\u3001ALL-SYSTEM\u3001\n                  ALL-MODULE-PATH.\n    --list-modules\n                  \u53C2\u7167\u53EF\u80FD\u306A\u30E2\u30B8\u30E5\u30FC\u30EB\u3092\u30EA\u30B9\u30C8\u3057\u7D42\u4E86\u3057\u307E\u3059\n    -d <module name>\n    --describe-module <module name>\n                  \u30E2\u30B8\u30E5\u30FC\u30EB\u3092\u8AAC\u660E\u3057\u7D42\u4E86\u3057\u307E\u3059\n    --dry-run     VM\u3092\u4F5C\u6210\u3057\u30E1\u30A4\u30F3\u30FB\u30AF\u30E9\u30B9\u3092\u30ED\u30FC\u30C9\u3057\u307E\u3059\u304C\u3001\u30E1\u30A4\u30F3\u30FB\u30E1\u30BD\u30C3\u30C9\u306F\u5B9F\u884C\u3057\u307E\u305B\u3093\u3002\n                  --dry-run\u30AA\u30D7\u30B7\u30E7\u30F3\u306F\u3001\u6B21\u306E\u691C\u8A3C\u306B\u5F79\u7ACB\u3064\u5834\u5408\u304C\u3042\u308A\u307E\u3059:\n                  \u30E2\u30B8\u30E5\u30FC\u30EB\u30FB\u30B7\u30B9\u30C6\u30E0\u69CB\u6210\u306A\u3069\u306E\u30B3\u30DE\u30F3\u30C9\u884C\u30AA\u30D7\u30B7\u30E7\u30F3\u3002\n    --validate-modules\n                  \u3059\u3079\u3066\u306E\u30E2\u30B8\u30E5\u30FC\u30EB\u3092\u691C\u8A3C\u3057\u7D42\u4E86\u3057\u307E\u3059\n                  --validate-modules\u30AA\u30D7\u30B7\u30E7\u30F3\u306F\u3001\u6B21\u306E\u691C\u7D22\u306B\u5F79\u7ACB\u3064\u5834\u5408\u304C\u3042\u308A\u307E\u3059:\n                  \u30E2\u30B8\u30E5\u30FC\u30EB\u30FB\u30D1\u30B9\u4E0A\u306E\u30E2\u30B8\u30E5\u30FC\u30EB\u3067\u306E\u7AF6\u5408\u304A\u3088\u3073\u305D\u306E\u4ED6\u306E\u30A8\u30E9\u30FC\u3002\n    -D<name>=<value>\n                  \u30B7\u30B9\u30C6\u30E0\u30FB\u30D7\u30ED\u30D1\u30C6\u30A3\u3092\u8A2D\u5B9A\u3057\u307E\u3059\n    -verbose:[class|module|gc|jni]\n                  \u8A73\u7D30\u51FA\u529B\u3092\u6709\u52B9\u306B\u3057\u307E\u3059\n    -version      \u88FD\u54C1\u30D0\u30FC\u30B8\u30E7\u30F3\u3092\u30A8\u30E9\u30FC\u30FB\u30B9\u30C8\u30EA\u30FC\u30E0\u306B\u51FA\u529B\u3057\u3066\u7D42\u4E86\u3057\u307E\u3059\n    --version     \
 \u88FD\u54C1\u30D0\u30FC\u30B8\u30E7\u30F3\u3092\u51FA\u529B\u30B9\u30C8\u30EA\u30FC\u30E0\u306B\u51FA\u529B\u3057\u3066\u7D42\u4E86\u3057\u307E\u3059\n    -showversion  \u88FD\u54C1\u30D0\u30FC\u30B8\u30E7\u30F3\u3092\u30A8\u30E9\u30FC\u30FB\u30B9\u30C8\u30EA\u30FC\u30E0\u306B\u51FA\u529B\u3057\u3066\u7D9A\u884C\u3057\u307E\u3059\n    --show-version\n                  \u88FD\u54C1\u30D0\u30FC\u30B8\u30E7\u30F3\u3092\u51FA\u529B\u30B9\u30C8\u30EA\u30FC\u30E0\u306B\u51FA\u529B\u3057\u3066\u7D9A\u884C\u3057\u307E\u3059\n    --show-module-resolution\n                  \u8D77\u52D5\u6642\u306B\u30E2\u30B8\u30E5\u30FC\u30EB\u89E3\u6C7A\u51FA\u529B\u3092\u8868\u793A\u3057\u307E\u3059\n    -? -h -help\n                  \u3053\u306E\u30D8\u30EB\u30D7\u30FB\u30E1\u30C3\u30BB\u30FC\u30B8\u3092\u30A8\u30E9\u30FC\u30FB\u30B9\u30C8\u30EA\u30FC\u30E0\u306B\u51FA\u529B\u3057\u307E\u3059\n    --help        \u3053\u306E\u30D8\u30EB\u30D7\u30FB\u30E1\u30C3\u30BB\u30FC\u30B8\u3092\u51FA\u529B\u30B9\u30C8\u30EA\u30FC\u30E0\u306B\u51FA\u529B\u3057\u307E\u3059\n    -X            \u8FFD\u52A0\u30AA\u30D7\u30B7\u30E7\u30F3\u306E\u30D8\u30EB\u30D7\u3092\u30A8\u30E9\u30FC\u30FB\u30B9\u30C8\u30EA\u30FC\u30E0\u306B\u51FA\u529B\u3057\u307E\u3059\n    --help-extra  \u8FFD\u52A0\u30AA\u30D7\u30B7\u30E7\u30F3\u306E\u30D8\u30EB\u30D7\u3092\u51FA\u529B\u30B9\u30C8\u30EA\u30FC\u30E0\u306B\u51FA\u529B\u3057\u307E\u3059\n    -ea[:<packagename>...|:<classname>]\n    -enableassertions[:<packagename>...|:<classname>]\n                  \u6307\u5B9A\u3057\u305F\u7C92\u5EA6\u3067\u30A2\u30B5\u30FC\u30B7\u30E7\u30F3\u3092\u6709\u52B9\u306B\u3057\u307E\u3059\n    -da[:<packagename>...|:<classname>]\n    -disableassertions[:<packagename>...|:<classname>]\n                  \u6307\u5B9A\u3057\u305F\u7C92\u5EA6\u3067\u30A2\u30B5\u30FC\u30B7\u30E7\u30F3\u3092\u7121\u52B9\u306B\u3057\u307E\u3059\n    -esa | -enablesystemassertions\n                  \u30B7\u30B9\u30C6\u30E0\u30FB\u30A2\u30B5\u30FC\u30B7\u30E7\u30F3\u3092\u6709\u52B9\u306B\u3057\u307E\u3059\n    -dsa | -disablesystemassertions\n                  \u30B7\u30B9\u30C6\u30E0\u30FB\u30A2\u30B5\u30FC\u30B7\u30E7\u30F3\u3092\u7121\u52B9\u306B\u3057\u307E\u3059\n    -agentlib:<libname>[=<options>]\n                  \u30CD\u30A4\u30C6\u30A3\u30D6\u30FB\u30A8\u30FC\u30B8\u30A7\u30F3\u30C8\u30FB\u30E9\u30A4\u30D6\u30E9\u30EA<libname>\u3092\u30ED\u30FC\u30C9\u3057\u307E\u3059\u3002\u4F8B: -agentlib:jdwp\n                  -agentlib:jdwp=help\u3082\u53C2\u7167\u3057\u3066\u304F\u3060\u3055\u3044\n    -agentpath:<pathname>[=<options>]\n                  \u30D5\u30EB\u30D1\u30B9\u540D\u3092\u4F7F\u7528\u3057\u3066\u3001\u30CD\u30A4\u30C6\u30A3\u30D6\u30FB\u30A8\u30FC\u30B8\u30A7\u30F3\u30C8\u30FB\u30E9\u30A4\u30D6\u30E9\u30EA\u3092\u30ED\u30FC\u30C9\u3057\u307E\u3059\n    -javaagent:<jarpath>[=<options>]\n                  Java\u30D7\u30ED\u30B0\u30E9\u30DF\u30F3\u30B0\u8A00\u8A9E\u30A8\u30FC\u30B8\u30A7\u30F3\u30C8\u3092\u30ED\u30FC\u30C9\u3057\u307E\u3059\u3002java.lang.instrument\u3092\u53C2\u7167\u3057\u3066\u304F\u3060\u3055\u3044\n    -splash:<imagepath>\n                  \u6307\u5B9A\u3055\u308C\u305F\u30A4\u30E1\u30FC\u30B8\u3092\u542B\u3080\u30B9\u30D7\u30E9\u30C3\u30B7\u30E5\u753B\u9762\u3092\u8868\u793A\u3057\u307E\u3059\n                  HiDPI\u30B9\u30B1\u30FC\u30EB\u306E\u30A4\u30E1\u30FC\u30B8\u304C\u81EA\u52D5\u7684\u306B\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u4F7F\u7528\u3055\u308C\u307E\u3059\n                  (\u53EF\u80FD\u306A\u5834\u5408)\u3002\u30B9\u30B1\u30FC\u30EA\u30F3\u30B0\u3055\u308C\u306A\u3044\u30A4\u30E1\u30FC\u30B8\u306E\u30D5\u30A1\u30A4\u30EB\u540D(image.ext\u306A\u3069)\u3092\n                  \u5F15\u6570\u3068\u3057\u3066-splash\u30AA\u30D7\u30B7\u30E7\u30F3\u306B\u5FC5\u305A\u6E21\u3059\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002\n                  \
 \u6307\u5B9A\u3055\u308C\u305F\u6700\u3082\u9069\u5207\u306A\u30B9\u30B1\u30FC\u30EA\u30F3\u30B0\u6E08\u30A4\u30E1\u30FC\u30B8\u304C\u9078\u629E\u3055\u308C\u307E\u3059\n                  (\u81EA\u52D5\u7684)\u3002\n                  \u8A73\u7D30\u306F\u3001SplashScreen API\u306E\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u3092\u53C2\u7167\u3057\u3066\u304F\u3060\u3055\u3044\n    @argument\u30D5\u30A1\u30A4\u30EB\n                  \u30AA\u30D7\u30B7\u30E7\u30F3\u3092\u542B\u30801\u3064\u4EE5\u4E0A\u306E\u5F15\u6570\u30D5\u30A1\u30A4\u30EB\n    -disable-@files\n                  \u3055\u3089\u306A\u308B\u5F15\u6570\u30D5\u30A1\u30A4\u30EB\u62E1\u5F35\u3092\u7121\u52B9\u306B\u3057\u307E\u3059\n\u9577\u3044\u30AA\u30D7\u30B7\u30E7\u30F3\u306E\u5F15\u6570\u3092\u6307\u5B9A\u3059\u308B\u5834\u5408\u3001--<name>=<value>\u307E\u305F\u306F\n--<name> <value>\u3092\u4F7F\u7528\u3067\u304D\u307E\u3059\u3002\n
 
 # Translators please note do not translate the options themselves
-java.launcher.X.usage=\n    -Xbatch           \u30D0\u30C3\u30AF\u30B0\u30E9\u30A6\u30F3\u30C9\u306E\u30B3\u30F3\u30D1\u30A4\u30EB\u3092\u7121\u52B9\u306B\u3059\u308B\n    -Xbootclasspath/a:<{0}\u3067\u533A\u5207\u3089\u308C\u305F\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u304A\u3088\u3073zip/jar\u30D5\u30A1\u30A4\u30EB>\n                      \u30D6\u30FC\u30C8\u30B9\u30C8\u30E9\u30C3\u30D7\u30FB\u30AF\u30E9\u30B9\u30FB\u30D1\u30B9\u306E\u6700\u5F8C\u306B\u8FFD\u52A0\u3059\u308B\n    -Xcheck:jni       JNI\u95A2\u6570\u306B\u5BFE\u3059\u308B\u8FFD\u52A0\u306E\u30C1\u30A7\u30C3\u30AF\u3092\u5B9F\u884C\u3059\u308B\n    -Xcomp            \u521D\u56DE\u547C\u51FA\u3057\u6642\u306B\u30E1\u30BD\u30C3\u30C9\u306E\u30B3\u30F3\u30D1\u30A4\u30EB\u3092\u5F37\u5236\u3059\u308B\n    -Xdebug           \u4E0B\u4F4D\u4E92\u63DB\u6027\u306E\u305F\u3081\u306B\u63D0\u4F9B\n    -Xdiag            \u8FFD\u52A0\u306E\u8A3A\u65AD\u30E1\u30C3\u30BB\u30FC\u30B8\u3092\u8868\u793A\u3059\u308B\n    -Xfuture          \u5C06\u6765\u306E\u30C7\u30D5\u30A9\u30EB\u30C8\u3092\u898B\u8D8A\u3057\u3066\u3001\u6700\u3082\u53B3\u5BC6\u306A\u30C1\u30A7\u30C3\u30AF\u3092\u6709\u52B9\u306B\u3059\u308B\n    -Xint             \u30A4\u30F3\u30BF\u30D7\u30EA\u30BF\u30FB\u30E2\u30FC\u30C9\u306E\u5B9F\u884C\u306E\u307F\n    -Xinternalversion\n                      -version\u30AA\u30D7\u30B7\u30E7\u30F3\u3088\u308A\u8A73\u7D30\u306AJVM\u30D0\u30FC\u30B8\u30E7\u30F3\u60C5\u5831\u3092\n                       \u8868\u793A\u3059\u308B\n    -Xloggc:<file>    \u30BF\u30A4\u30E0\u30B9\u30BF\u30F3\u30D7\u304C\u4ED8\u3044\u305F\u30D5\u30A1\u30A4\u30EB\u306BGC\u30B9\u30C6\u30FC\u30BF\u30B9\u306E\u30ED\u30B0\u3092\u8A18\u9332\u3059\u308B\n    -Xmixed           \u6DF7\u5408\u30E2\u30FC\u30C9\u306E\u5B9F\u884C(\u30C7\u30D5\u30A9\u30EB\u30C8)\n    -Xmn<size>        \u82E5\u3044\u4E16\u4EE3(\u30CA\u30FC\u30B5\u30EA)\u306E\u30D2\u30FC\u30D7\u306E\u521D\u671F\u304A\u3088\u3073\u6700\u5927\u30B5\u30A4\u30BA(\u30D0\u30A4\u30C8\u5358\u4F4D)\n                      \u3092\u8A2D\u5B9A\u3059\u308B\n    -Xms<size>        Java\u306E\u521D\u671F\u30D2\u30FC\u30D7\u30FB\u30B5\u30A4\u30BA\u3092\u8A2D\u5B9A\u3059\u308B\n    -Xmx<size>        Java\u306E\u6700\u5927\u30D2\u30FC\u30D7\u30FB\u30B5\u30A4\u30BA\u3092\u8A2D\u5B9A\u3059\u308B\n    -Xnoclassgc       \u30AF\u30E9\u30B9\u306E\u30AC\u30D9\u30FC\u30B8\u30FB\u30B3\u30EC\u30AF\u30B7\u30E7\u30F3\u3092\u7121\u52B9\u306B\u3059\u308B\n    -Xprof            CPU\u30D7\u30ED\u30D5\u30A1\u30A4\u30EB\u30FB\u30C7\u30FC\u30BF\u3092\u51FA\u529B\u3059\u308B\n    -Xrs              Java/VM\u306B\u3088\u308BOS\u30B7\u30B0\u30CA\u30EB\u306E\u4F7F\u7528\u3092\u524A\u6E1B\u3059\u308B(\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u3092\u53C2\u7167)\n    -Xshare:auto      \u53EF\u80FD\u3067\u3042\u308C\u3070\u5171\u6709\u30AF\u30E9\u30B9\u306E\u30C7\u30FC\u30BF\u3092\u4F7F\u7528\u3059\u308B(\u30C7\u30D5\u30A9\u30EB\u30C8)\n    -Xshare:off       \u5171\u6709\u30AF\u30E9\u30B9\u306E\u30C7\u30FC\u30BF\u3092\u4F7F\u7528\u3057\u3088\u3046\u3068\u3057\u306A\u3044\n    -Xshare:on        \u5171\u6709\u30AF\u30E9\u30B9\u30FB\u30C7\u30FC\u30BF\u306E\u4F7F\u7528\u3092\u5FC5\u9808\u306B\u3057\u3001\u3067\u304D\u306A\u3051\u308C\u3070\u5931\u6557\u3059\u308B\u3002\n    -XshowSettings    \u3059\u3079\u3066\u306E\u8A2D\u5B9A\u3092\u8868\u793A\u3057\u3066\u7D9A\u884C\u3059\u308B\n    -XshowSettings:all\n                      \u3059\u3079\u3066\u306E\u8A2D\u5B9A\u3092\u8868\u793A\u3057\u3066\u7D9A\u884C\u3059\u308B\n    -XshowSettings:locale\n                      \u3059\u3079\u3066\u306E\u30ED\u30B1\u30FC\u30EB\u95A2\u9023\u306E\u8A2D\u5B9A\u3092\u8868\u793A\u3057\u3066\u7D9A\u884C\u3059\u308B\n    -XshowSettings:properties\n                      \u3059\u3079\u3066\u306E\u30D7\u30ED\u30D1\u30C6\u30A3\u8A2D\u5B9A\u3092\u8868\u793A\u3057\u3066\u7D9A\u884C\u3059\u308B\n    -XshowSettings:vm \u3059\u3079\u3066\u306EVM\u95A2\u9023\u306E\u8A2D\u5B9A\u3092\u8868\u793A\u3057\u3066\u7D9A\u884C\u3059\u308B\n    \
--Xss<size>        Java\u306E\u30B9\u30EC\u30C3\u30C9\u30FB\u30B9\u30BF\u30C3\u30AF\u30FB\u30B5\u30A4\u30BA\u3092\u8A2D\u5B9A\u3059\u308B\n    -Xverify          \u30D0\u30A4\u30C8\u30B3\u30FC\u30C9\u691C\u8A3C\u6A5F\u80FD\u306E\u30E2\u30FC\u30C9\u3092\u8A2D\u5B9A\u3059\u308B\n    --add-reads <module>=<target-module>(,<target-module>)*\n                      \u30E2\u30B8\u30E5\u30FC\u30EB\u5BA3\u8A00\u306B\u95A2\u4FC2\u306A\u304F\u3001<module>\u3092\u66F4\u65B0\u3057\u3066<target-module>\n                      \u3092\u8AAD\u307F\u53D6\u308A\u307E\u3059\u3002 \n                      <target-module>\u3092ALL-UNNAMED\u306B\u8A2D\u5B9A\u3059\u308B\u3068\u3001\u3059\u3079\u3066\u306E\u540D\u524D\u306E\u306A\u3044\u30E2\u30B8\u30E5\u30FC\u30EB\u3092\n                      \u8AAD\u307F\u53D6\u308C\u307E\u3059\u3002\n    --add-exports <module>/<package>=<target-module>(,<target-module>)*\n                      \u30E2\u30B8\u30E5\u30FC\u30EB\u5BA3\u8A00\u306B\u95A2\u4FC2\u306A\u304F\u3001<module>\u3092\u66F4\u65B0\u3057\u3066<package>\u3092<target-module>\u306B\n                      \u30A8\u30AF\u30B9\u30DD\u30FC\u30C8\u3057\u307E\u3059\u3002\n                      <target-module>\u3092ALL-UNNAMED\u306B\u8A2D\u5B9A\u3059\u308B\u3068\u3001\u3059\u3079\u3066\u306E\u540D\u524D\u306E\u306A\u3044\u30E2\u30B8\u30E5\u30FC\u30EB\u306B\n                      \u30A8\u30AF\u30B9\u30DD\u30FC\u30C8\u3067\u304D\u307E\u3059\u3002\n    --add-opens <module>/<package>=<target-module>(,<target-module>)*\n                      \u30E2\u30B8\u30E5\u30FC\u30EB\u5BA3\u8A00\u306B\u95A2\u4FC2\u306A\u304F\u3001<module>\u3092\u66F4\u65B0\u3057\u3066\n                      <package>\u3092<target-module>\u306B\u958B\u304D\u307E\u3059\u3002\n    --limit-modules <module name>[,<module name>...]\n                      \u53C2\u7167\u53EF\u80FD\u306A\u30E2\u30B8\u30E5\u30FC\u30EB\u306E\u9818\u57DF\u3092\u5236\u9650\u3057\u307E\u3059\n    --patch-module <module>=<file>({0}<file>)*\n                      JAR\u30D5\u30A1\u30A4\u30EB\u307E\u305F\u306F\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306E\u30AF\u30E9\u30B9\u304A\u3088\u3073\u30EA\u30BD\u30FC\u30B9\u3067\n                      \u30E2\u30B8\u30E5\u30FC\u30EB\u3092\u30AA\u30FC\u30D0\u30FC\u30E9\u30A4\u30C9\u307E\u305F\u306F\u62E1\u5F35\u3057\u307E\u3059\n    --disable-@files  \u3055\u3089\u306A\u308B\u30D5\u30A1\u30A4\u30EB\u62E1\u5F35\u3092\u7121\u52B9\u306B\u3057\u307E\u3059\n\n\u3053\u308C\u3089\u306E\u8FFD\u52A0\u30AA\u30D7\u30B7\u30E7\u30F3\u306F\u4E88\u544A\u306A\u304F\u5909\u66F4\u3055\u308C\u308B\u5834\u5408\u304C\u3042\u308A\u307E\u3059\u3002\n
+java.launcher.X.usage=\n    -Xbatch           \u30D0\u30C3\u30AF\u30B0\u30E9\u30A6\u30F3\u30C9\u306E\u30B3\u30F3\u30D1\u30A4\u30EB\u3092\u7121\u52B9\u306B\u3059\u308B\n    -Xbootclasspath/a:<{0}\u3067\u533A\u5207\u3089\u308C\u305F\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u304A\u3088\u3073zip/jar\u30D5\u30A1\u30A4\u30EB>\n                      \u30D6\u30FC\u30C8\u30B9\u30C8\u30E9\u30C3\u30D7\u30FB\u30AF\u30E9\u30B9\u30FB\u30D1\u30B9\u306E\u6700\u5F8C\u306B\u8FFD\u52A0\u3059\u308B\n    -Xcheck:jni       JNI\u95A2\u6570\u306B\u5BFE\u3059\u308B\u8FFD\u52A0\u306E\u30C1\u30A7\u30C3\u30AF\u3092\u5B9F\u884C\u3059\u308B\n    -Xcomp            \u521D\u56DE\u547C\u51FA\u3057\u6642\u306B\u30E1\u30BD\u30C3\u30C9\u306E\u30B3\u30F3\u30D1\u30A4\u30EB\u3092\u5F37\u5236\u3059\u308B\n    -Xdebug           \u4E0B\u4F4D\u4E92\u63DB\u6027\u306E\u305F\u3081\u306B\u63D0\u4F9B\n    -Xdiag            \u8FFD\u52A0\u306E\u8A3A\u65AD\u30E1\u30C3\u30BB\u30FC\u30B8\u3092\u8868\u793A\u3059\u308B\n    -Xfuture          \u5C06\u6765\u306E\u30C7\u30D5\u30A9\u30EB\u30C8\u3092\u898B\u8D8A\u3057\u3066\u3001\u6700\u3082\u53B3\u5BC6\u306A\u30C1\u30A7\u30C3\u30AF\u3092\u6709\u52B9\u306B\u3059\u308B\n    -Xint             \u30A4\u30F3\u30BF\u30D7\u30EA\u30BF\u30FB\u30E2\u30FC\u30C9\u306E\u5B9F\u884C\u306E\u307F\n    -Xinternalversion\n                      -version\u30AA\u30D7\u30B7\u30E7\u30F3\u3088\u308A\u8A73\u7D30\u306AJVM\u30D0\u30FC\u30B8\u30E7\u30F3\u60C5\u5831\u3092\n                       \u8868\u793A\u3059\u308B\n    -Xloggc:<file>    \u30BF\u30A4\u30E0\u30B9\u30BF\u30F3\u30D7\u304C\u4ED8\u3044\u305F\u30D5\u30A1\u30A4\u30EB\u306BGC\u30B9\u30C6\u30FC\u30BF\u30B9\u306E\u30ED\u30B0\u3092\u8A18\u9332\u3059\u308B\n    -Xmixed           \u6DF7\u5408\u30E2\u30FC\u30C9\u306E\u5B9F\u884C(\u30C7\u30D5\u30A9\u30EB\u30C8)\n    -Xmn<size>        \u82E5\u3044\u4E16\u4EE3(\u30CA\u30FC\u30B5\u30EA)\u306E\u30D2\u30FC\u30D7\u306E\u521D\u671F\u304A\u3088\u3073\u6700\u5927\u30B5\u30A4\u30BA(\u30D0\u30A4\u30C8\u5358\u4F4D)\n                      \u3092\u8A2D\u5B9A\u3059\u308B\n    -Xms<size>        Java\u306E\u521D\u671F\u30D2\u30FC\u30D7\u30FB\u30B5\u30A4\u30BA\u3092\u8A2D\u5B9A\u3059\u308B\n    -Xmx<size>        Java\u306E\u6700\u5927\u30D2\u30FC\u30D7\u30FB\u30B5\u30A4\u30BA\u3092\u8A2D\u5B9A\u3059\u308B\n    -Xnoclassgc       \u30AF\u30E9\u30B9\u306E\u30AC\u30D9\u30FC\u30B8\u30FB\u30B3\u30EC\u30AF\u30B7\u30E7\u30F3\u3092\u7121\u52B9\u306B\u3059\u308B\n    -Xrs              Java/VM\u306B\u3088\u308BOS\u30B7\u30B0\u30CA\u30EB\u306E\u4F7F\u7528\u3092\u524A\u6E1B\u3059\u308B(\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u3092\u53C2\u7167)\n    -Xshare:auto      \u53EF\u80FD\u3067\u3042\u308C\u3070\u5171\u6709\u30AF\u30E9\u30B9\u306E\u30C7\u30FC\u30BF\u3092\u4F7F\u7528\u3059\u308B(\u30C7\u30D5\u30A9\u30EB\u30C8)\n    -Xshare:off       \u5171\u6709\u30AF\u30E9\u30B9\u306E\u30C7\u30FC\u30BF\u3092\u4F7F\u7528\u3057\u3088\u3046\u3068\u3057\u306A\u3044\n    -Xshare:on        \u5171\u6709\u30AF\u30E9\u30B9\u30FB\u30C7\u30FC\u30BF\u306E\u4F7F\u7528\u3092\u5FC5\u9808\u306B\u3057\u3001\u3067\u304D\u306A\u3051\u308C\u3070\u5931\u6557\u3059\u308B\u3002\n    -XshowSettings    \u3059\u3079\u3066\u306E\u8A2D\u5B9A\u3092\u8868\u793A\u3057\u3066\u7D9A\u884C\u3059\u308B\n    -XshowSettings:all\n                      \u3059\u3079\u3066\u306E\u8A2D\u5B9A\u3092\u8868\u793A\u3057\u3066\u7D9A\u884C\u3059\u308B\n    -XshowSettings:locale\n                      \u3059\u3079\u3066\u306E\u30ED\u30B1\u30FC\u30EB\u95A2\u9023\u306E\u8A2D\u5B9A\u3092\u8868\u793A\u3057\u3066\u7D9A\u884C\u3059\u308B\n    -XshowSettings:properties\n                      \u3059\u3079\u3066\u306E\u30D7\u30ED\u30D1\u30C6\u30A3\u8A2D\u5B9A\u3092\u8868\u793A\u3057\u3066\u7D9A\u884C\u3059\u308B\n    -XshowSettings:vm \u3059\u3079\u3066\u306EVM\u95A2\u9023\u306E\u8A2D\u5B9A\u3092\u8868\u793A\u3057\u3066\u7D9A\u884C\u3059\u308B\n    -Xss<size>        \
+Java\u306E\u30B9\u30EC\u30C3\u30C9\u30FB\u30B9\u30BF\u30C3\u30AF\u30FB\u30B5\u30A4\u30BA\u3092\u8A2D\u5B9A\u3059\u308B\n    -Xverify          \u30D0\u30A4\u30C8\u30B3\u30FC\u30C9\u691C\u8A3C\u6A5F\u80FD\u306E\u30E2\u30FC\u30C9\u3092\u8A2D\u5B9A\u3059\u308B\n    --add-reads <module>=<target-module>(,<target-module>)*\n                      \u30E2\u30B8\u30E5\u30FC\u30EB\u5BA3\u8A00\u306B\u95A2\u4FC2\u306A\u304F\u3001<module>\u3092\u66F4\u65B0\u3057\u3066<target-module>\n                      \u3092\u8AAD\u307F\u53D6\u308A\u307E\u3059\u3002 \n                      <target-module>\u3092ALL-UNNAMED\u306B\u8A2D\u5B9A\u3059\u308B\u3068\u3001\u3059\u3079\u3066\u306E\u540D\u524D\u306E\u306A\u3044\u30E2\u30B8\u30E5\u30FC\u30EB\u3092\n                      \u8AAD\u307F\u53D6\u308C\u307E\u3059\u3002\n    --add-exports <module>/<package>=<target-module>(,<target-module>)*\n                      \u30E2\u30B8\u30E5\u30FC\u30EB\u5BA3\u8A00\u306B\u95A2\u4FC2\u306A\u304F\u3001<module>\u3092\u66F4\u65B0\u3057\u3066<package>\u3092<target-module>\u306B\n                      \u30A8\u30AF\u30B9\u30DD\u30FC\u30C8\u3057\u307E\u3059\u3002\n                      <target-module>\u3092ALL-UNNAMED\u306B\u8A2D\u5B9A\u3059\u308B\u3068\u3001\u3059\u3079\u3066\u306E\u540D\u524D\u306E\u306A\u3044\u30E2\u30B8\u30E5\u30FC\u30EB\u306B\n                      \u30A8\u30AF\u30B9\u30DD\u30FC\u30C8\u3067\u304D\u307E\u3059\u3002\n    --add-opens <module>/<package>=<target-module>(,<target-module>)*\n                      \u30E2\u30B8\u30E5\u30FC\u30EB\u5BA3\u8A00\u306B\u95A2\u4FC2\u306A\u304F\u3001<module>\u3092\u66F4\u65B0\u3057\u3066<package>\u3092\n                      <target-module>\u306B\u958B\u304D\u307E\u3059\u3002\n    --illegal-access=<value>\n                      \u540D\u524D\u306E\u306A\u3044\u30E2\u30B8\u30E5\u30FC\u30EB\u5185\u306E\u30B3\u30FC\u30C9\u306B\u3088\u308B\u3001\u540D\u524D\u306E\u3042\u308B\u30E2\u30B8\u30E5\u30FC\u30EB\u5185\u306E\n                      \u30BF\u30A4\u30D7\u306E\u30E1\u30F3\u30D0\u30FC\u3078\u306E\u30A2\u30AF\u30BB\u30B9\u3092\u8A31\u53EF\u307E\u305F\u306F\u62D2\u5426\u3057\u307E\u3059\u3002\n                      <value>\u306F"deny"\u3001"permit"\u3001"warn"\u3001"debug"\u306E\u3044\u305A\u308C\u304B\u3067\u3059\n                      \u3053\u306E\u30AA\u30D7\u30B7\u30E7\u30F3\u306F\u5C06\u6765\u306E\u30EA\u30EA\u30FC\u30B9\u3067\u524A\u9664\u3055\u308C\u307E\u3059\u3002\n    --limit-modules <module name>[,<module name>...]\n                      \u53C2\u7167\u53EF\u80FD\u306A\u30E2\u30B8\u30E5\u30FC\u30EB\u306E\u9818\u57DF\u3092\u5236\u9650\u3057\u307E\u3059\n    --patch-module <module>=<file>({0}<file>)*\n                      JAR\u30D5\u30A1\u30A4\u30EB\u307E\u305F\u306F\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306E\u30AF\u30E9\u30B9\u304A\u3088\u3073\u30EA\u30BD\u30FC\u30B9\u3067\n                      \u30E2\u30B8\u30E5\u30FC\u30EB\u3092\u30AA\u30FC\u30D0\u30FC\u30E9\u30A4\u30C9\u307E\u305F\u306F\u62E1\u5F35\u3057\u307E\u3059\u3002\n    --disable-@files  \u3055\u3089\u306A\u308B\u30D5\u30A1\u30A4\u30EB\u62E1\u5F35\u3092\u7121\u52B9\u306B\u3057\u307E\u3059\n\n\u3053\u306E\u8FFD\u52A0\u30AA\u30D7\u30B7\u30E7\u30F3\u306F\u4E88\u544A\u306A\u3057\u306B\u5909\u66F4\u3055\u308C\u308B\u3053\u3068\u304C\u3042\u308A\u307E\u3059\u3002\n
 
 # Translators please note do not translate the options themselves
 java.launcher.X.macosx.usage=\n\u6B21\u306E\u30AA\u30D7\u30B7\u30E7\u30F3\u306FMac OS X\u56FA\u6709\u3067\u3059:\n    -XstartOnFirstThread\n                      main()\u30E1\u30BD\u30C3\u30C9\u3092\u6700\u521D(AppKit)\u306E\u30B9\u30EC\u30C3\u30C9\u3067\u5B9F\u884C\u3059\u308B\n    -Xdock:name=<application name>\n                      Dock\u306B\u8868\u793A\u3055\u308C\u308B\u30C7\u30D5\u30A9\u30EB\u30C8\u30FB\u30A2\u30D7\u30EA\u30B1\u30FC\u30B7\u30E7\u30F3\u540D\u3092\u30AA\u30FC\u30D0\u30FC\u30E9\u30A4\u30C9\u3059\u308B\n    -Xdock:icon=<path to icon file>\n                      Dock\u306B\u8868\u793A\u3055\u308C\u308B\u30C7\u30D5\u30A9\u30EB\u30C8\u30FB\u30A2\u30A4\u30B3\u30F3\u3092\u30AA\u30FC\u30D0\u30FC\u30E9\u30A4\u30C9\u3059\u308B\n\n
@@ -48,6 +47,7 @@
 java.launcher.cls.error4=\u30A8\u30E9\u30FC: \u30E1\u30A4\u30F3\u30FB\u30E1\u30BD\u30C3\u30C9\u304C\u30AF\u30E9\u30B9{0}\u3067\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3002\u6B21\u306E\u3088\u3046\u306B\u30E1\u30A4\u30F3\u30FB\u30E1\u30BD\u30C3\u30C9\u3092\u5B9A\u7FA9\u3057\u3066\u304F\u3060\u3055\u3044\u3002\n   public static void main(String[] args)\n\u307E\u305F\u306FJavaFX\u30A2\u30D7\u30EA\u30B1\u30FC\u30B7\u30E7\u30F3\u30FB\u30AF\u30E9\u30B9\u306F{1}\u3092\u62E1\u5F35\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059
 java.launcher.cls.error5=\u30A8\u30E9\u30FC: JavaFX\u30E9\u30F3\u30BF\u30A4\u30E0\u30FB\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u304C\u4E0D\u8DB3\u3057\u3066\u304A\u308A\u3001\u3053\u306E\u30A2\u30D7\u30EA\u30B1\u30FC\u30B7\u30E7\u30F3\u306E\u5B9F\u884C\u306B\u5FC5\u8981\u3067\u3059
 java.launcher.cls.error6=\u30A8\u30E9\u30FC: \u30E1\u30A4\u30F3\u30FB\u30AF\u30E9\u30B9{0}\u306E\u30ED\u30FC\u30C9\u4E2D\u306BLinkageError\u304C\u767A\u751F\u3057\u307E\u3057\u305F\n\t{1}
+java.launcher.cls.error7=\u30A8\u30E9\u30FC: \u30E1\u30A4\u30F3\u30FB\u30AF\u30E9\u30B9{0}\u3092\u521D\u671F\u5316\u3067\u304D\u307E\u305B\u3093\n\u539F\u56E0: {1}: {2}
 java.launcher.jar.error1=\u30A8\u30E9\u30FC: \u30D5\u30A1\u30A4\u30EB{0}\u3092\u958B\u3053\u3046\u3068\u3057\u3066\u3044\u308B\u3068\u304D\u306B\u3001\u4E88\u671F\u3057\u306A\u3044\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F
 java.launcher.jar.error2={0}\u306B\u30DE\u30CB\u30D5\u30A7\u30B9\u30C8\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093
 java.launcher.jar.error3={0}\u306B\u30E1\u30A4\u30F3\u30FB\u30DE\u30CB\u30D5\u30A7\u30B9\u30C8\u5C5E\u6027\u304C\u3042\u308A\u307E\u305B\u3093
@@ -56,5 +56,6 @@
 java.launcher.javafx.error1=\u30A8\u30E9\u30FC: JavaFX launchApplication\u30E1\u30BD\u30C3\u30C9\u306B\u8AA4\u3063\u305F\u30B7\u30B0\u30CD\u30C1\u30E3\u304C\u3042\u308A\u3001\nstatic\u3092\u5BA3\u8A00\u3057\u3066void\u578B\u306E\u5024\u3092\u8FD4\u3059\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059
 java.launcher.module.error1=\u30E2\u30B8\u30E5\u30FC\u30EB{0}\u306BMainClass\u5C5E\u6027\u304C\u3042\u308A\u307E\u305B\u3093\u3002-m <module>/<main-class>\u3092\u4F7F\u7528\u3057\u3066\u304F\u3060\u3055\u3044
 java.launcher.module.error2=\u30A8\u30E9\u30FC: \u30E2\u30B8\u30E5\u30FC\u30EB{1}\u306B\u30E1\u30A4\u30F3\u30FB\u30AF\u30E9\u30B9{0}\u304C\u898B\u3064\u304B\u3089\u306A\u304B\u3063\u305F\u304B\u30ED\u30FC\u30C9\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F
-java.launcher.module.error3=\u30A8\u30E9\u30FC: \u30E2\u30B8\u30E5\u30FC\u30EB{1}\u304B\u3089\u306E\u30E1\u30A4\u30F3\u30FB\u30AF\u30E9\u30B9{0}\u306E\u30ED\u30FC\u30C9\u306B\u5931\u6557\u3057\u307E\u3057\u305F\n\t{2}
+java.launcher.module.error3=\u30A8\u30E9\u30FC: \u30E2\u30B8\u30E5\u30FC\u30EB{1}\u306E\u30E1\u30A4\u30F3\u30FB\u30AF\u30E9\u30B9{0}\u3092\u30ED\u30FC\u30C9\u3067\u304D\u307E\u305B\u3093\n\t{2}
 java.launcher.module.error4={0}\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093
+java.launcher.module.error5=\u30A8\u30E9\u30FC: \u30E2\u30B8\u30E5\u30FC\u30EB{1}\u306E\u30E1\u30A4\u30F3\u30FB\u30AF\u30E9\u30B9{0}\u3092\u521D\u671F\u5316\u3067\u304D\u307E\u305B\u3093\n\u539F\u56E0: {1}: {2}
--- a/src/java.base/share/classes/sun/launcher/resources/launcher_ko.properties	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.base/share/classes/sun/launcher/resources/launcher_ko.properties	Tue Jan 30 16:41:40 2018 +0100
@@ -26,17 +26,16 @@
 # Translators please note do not translate the options themselves
 java.launcher.opt.header  =   \uC0AC\uC6A9\uBC95: {0} [\uC635\uC158] <\uAE30\uBCF8 \uD074\uB798\uC2A4> [args...]\n           (\uD074\uB798\uC2A4 \uC2E4\uD589)\n   \uB610\uB294  {0} [\uC635\uC158] -jar <jar \uD30C\uC77C> [args...]\n           (jar \uD30C\uC77C \uC2E4\uD589)\n   \uB610\uB294  {0} [\uC635\uC158] -m <\uBAA8\uB4C8>[/<\uAE30\uBCF8 \uD074\uB798\uC2A4>] [args...]\n       {0} [\uC635\uC158] --module <\uBAA8\uB4C8>[/<\uAE30\uBCF8 \uD074\uB798\uC2A4>] [args...]\n           (\uBAA8\uB4C8\uC758 \uAE30\uBCF8 \uD074\uB798\uC2A4 \uC2E4\uD589)\n\n \uAE30\uBCF8 \uD074\uB798\uC2A4, -jar <jar \uD30C\uC77C>, -m \uB610\uB294 --module\n <\uBAA8\uB4C8>/<\uAE30\uBCF8 \uD074\uB798\uC2A4> \uB4A4\uC5D0 \uB098\uC624\uB294 \uC778\uC218\uB294 \uAE30\uBCF8 \uD074\uB798\uC2A4\uC5D0 \uC778\uC218\uB85C \uC804\uB2EC\uB429\uB2C8\uB2E4.\n\n \uC774 \uACBD\uC6B0 \uC635\uC158\uC5D0\uB294 \uB2E4\uC74C\uC774 \uD3EC\uD568\uB429\uB2C8\uB2E4.\n\n
 
-java.launcher.opt.datamodel  =\    -d{0}\t  \uB354 \uC774\uC0C1 \uC0AC\uC6A9\uB418\uC9C0 \uC54A\uC74C. \uC774\uD6C4 \uB9B4\uB9AC\uC2A4\uC5D0\uC11C \uC81C\uAC70\uB429\uB2C8\uB2E4.\n
 java.launcher.opt.vmselect   =\    {0}\t  "{1}" VM\uC744 \uC120\uD0DD\uD569\uB2C8\uB2E4.\n
 java.launcher.opt.hotspot    =\    {0}\t  "{1}" VM\uC758 \uB3D9\uC758\uC5B4\uC785\uB2C8\uB2E4[\uC0AC\uC6A9\uB418\uC9C0 \uC54A\uC74C].\n
 
 # Translators please note do not translate the options themselves
-java.launcher.opt.footer = \    -cp <\uB514\uB809\uD1A0\uB9AC \uBC0F zip/jar \uD30C\uC77C\uC758 \uD074\uB798\uC2A4 \uAC80\uC0C9 \uACBD\uB85C>\n    -classpath <\uB514\uB809\uD1A0\uB9AC \uBC0F zip/jar \uD30C\uC77C\uC758 \uD074\uB798\uC2A4 \uAC80\uC0C9 \uACBD\uB85C>\n    --class-path <\uB514\uB809\uD1A0\uB9AC \uBC0F zip/jar \uD30C\uC77C\uC758 \uD074\uB798\uC2A4 \uAC80\uC0C9 \uACBD\uB85C>\n                  \uD074\uB798\uC2A4 \uD30C\uC77C\uC744 \uAC80\uC0C9\uD558\uAE30 \uC704\uD55C \uB514\uB809\uD1A0\uB9AC, JAR \uC544\uCE74\uC774\uBE0C \uBC0F ZIP \uC544\uCE74\uC774\uBE0C\uC758 {0}(\uC73C)\uB85C\n                  \uAD6C\uBD84\uB41C \uBAA9\uB85D\uC785\uB2C8\uB2E4.\n    -p <\uBAA8\uB4C8 \uACBD\uB85C>\n    --module-path <\uBAA8\uB4C8 \uACBD\uB85C>...\n                  \uB514\uB809\uD1A0\uB9AC\uC758 {0}(\uC73C)\uB85C \uAD6C\uBD84\uB41C \uBAA9\uB85D\uC785\uB2C8\uB2E4. \uAC01 \uB514\uB809\uD1A0\uB9AC\uB294\n                  \uBAA8\uB4C8\uC758 \uB514\uB809\uD1A0\uB9AC\uC785\uB2C8\uB2E4.\n    --upgrade-module-path <\uBAA8\uB4C8 \uACBD\uB85C>...\n                  \uB514\uB809\uD1A0\uB9AC\uC758 {0}(\uC73C)\uB85C \uAD6C\uBD84\uB41C \uBAA9\uB85D\uC785\uB2C8\uB2E4. \uAC01 \uB514\uB809\uD1A0\uB9AC\uB294\n                  \uB7F0\uD0C0\uC784 \uC774\uBBF8\uC9C0\uC5D0\uC11C \uC5C5\uADF8\uB808\uC774\uB4DC \uAC00\uB2A5\uD55C \uBAA8\uB4C8\uC744 \uB300\uCCB4\uD558\uB294\n                  \uBAA8\uB4C8\uC758 \uB514\uB809\uD1A0\uB9AC\uC785\uB2C8\uB2E4.\n    --add-modules <\uBAA8\uB4C8 \uC774\uB984>[,<\uBAA8\uB4C8 \uC774\uB984>...]\n                  \uCD08\uAE30 \uBAA8\uB4C8 \uC774\uC678\uC758 \uD574\uACB0\uD560 \uB8E8\uD2B8 \uBAA8\uB4C8\uC785\uB2C8\uB2E4.\n                  <\uBAA8\uB4C8 \uC774\uB984>\uC740 ALL-DEFAULT, ALL-SYSTEM\uC77C \uC218 \uC788\uC2B5\uB2C8\uB2E4.\n                  ALL-MODULE-PATH.\n    --list-modules\n                  \uAD00\uCC30 \uAC00\uB2A5\uD55C \uBAA8\uB4C8\uC744 \uB098\uC5F4\uD558\uACE0 \uC885\uB8CC\uD569\uB2C8\uB2E4.\n    --d <\uBAA8\uB4C8 \uC774\uB984>\n    --describe-module <\uBAA8\uB4C8 \uC774\uB984>\n                  \uBAA8\uB4C8\uC744 \uC124\uBA85\uD558\uACE0 \uC885\uB8CC\uD569\uB2C8\uB2E4.\n    --dry-run     VM\uC744 \uC0DD\uC131\uD558\uACE0 \uAE30\uBCF8 \uD074\uB798\uC2A4\uB97C \uB85C\uB4DC\uD558\uC9C0\uB9CC \uAE30\uBCF8 \uBA54\uC18C\uB4DC\uB97C \uC2E4\uD589\uD558\uC9C0\uB294 \uC54A\uC2B5\uB2C8\uB2E4.\n                  --dry-run \uC635\uC158\uC740 \uBAA8\uB4C8 \uC2DC\uC2A4\uD15C \uAD6C\uC131\uACFC \uAC19\uC740\n                  \uBA85\uB839\uC904 \uC635\uC158 \uAC80\uC99D\uC5D0 \uC720\uC6A9\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.\n    --validate-modules\n                  \uBAA8\uB4E0 \uBAA8\uB4C8\uC744 \uAC80\uC99D\uD558\uACE0 \uC885\uB8CC\uD569\uB2C8\uB2E4.\n                  --validate-modules \uC635\uC158\uC740 \uBAA8\uB4C8 \uACBD\uB85C\uC5D0\uC11C \uBAA8\uB4C8\uC5D0 \uB300\uD55C\n                  \uCDA9\uB3CC \uBC0F \uAE30\uD0C0 \uC624\uB958\uB97C \uCC3E\uB294 \uB370 \uC720\uC6A9\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.\n    -D<\uC774\uB984>=<\uAC12>\n                  \uC2DC\uC2A4\uD15C \uC18D\uC131\uC744 \uC124\uC815\uD569\uB2C8\uB2E4.\n    -verbose:[class|module|gc|jni]\n                  \uC0C1\uC138 \uC815\uBCF4 \uCD9C\uB825\uC744 \uC0AC\uC6A9\uC73C\uB85C \uC124\uC815\n    -version      \uC624\uB958 \uC2A4\uD2B8\uB9BC\uC5D0 \uC81C\uD488 \uBC84\uC804\uC744 \uC778\uC1C4\uD558\uACE0 \uC885\uB8CC\uD569\uB2C8\uB2E4.\n    --version     \uCD9C\uB825 \uC2A4\uD2B8\uB9BC\uC5D0 \uC81C\uD488 \uBC84\uC804\uC744 \uC778\uC1C4\uD558\uACE0 \uC885\uB8CC\uD569\uB2C8\uB2E4.\n    -showversion  \uC624\uB958 \uC2A4\uD2B8\uB9BC\uC5D0 \uC81C\uD488 \uBC84\uC804\uC744 \uC778\uC1C4\uD558\uACE0 \uACC4\uC18D\uD569\uB2C8\uB2E4.\n    --show-version\n                  \uCD9C\uB825 \uC2A4\uD2B8\uB9BC\uC5D0 \uC81C\uD488 \uBC84\uC804\uC744 \uC778\uC1C4\uD558\uACE0 \uACC4\uC18D\uD569\uB2C8\uB2E4.\n    --show-module-resolution\n                  \uC2DC\uC791 \uC911 \uBAA8\uB4C8 \uBD84\uC11D \uCD9C\uB825\uC744 \
+java.launcher.opt.footer = \    -cp <\uB514\uB809\uD1A0\uB9AC \uBC0F zip/jar \uD30C\uC77C\uC758 \uD074\uB798\uC2A4 \uAC80\uC0C9 \uACBD\uB85C>\n    -classpath <\uB514\uB809\uD1A0\uB9AC \uBC0F zip/jar \uD30C\uC77C\uC758 \uD074\uB798\uC2A4 \uAC80\uC0C9 \uACBD\uB85C>\n    --class-path <\uB514\uB809\uD1A0\uB9AC \uBC0F zip/jar \uD30C\uC77C\uC758 \uD074\uB798\uC2A4 \uAC80\uC0C9 \uACBD\uB85C>\n                  \uD074\uB798\uC2A4 \uD30C\uC77C\uC744 \uAC80\uC0C9\uD558\uAE30 \uC704\uD55C \uB514\uB809\uD1A0\uB9AC, JAR \uC544\uCE74\uC774\uBE0C \uBC0F ZIP \uC544\uCE74\uC774\uBE0C\uC758 {0}(\uC73C)\uB85C\n                  \uAD6C\uBD84\uB41C \uBAA9\uB85D\uC785\uB2C8\uB2E4.\n    -p <\uBAA8\uB4C8 \uACBD\uB85C>\n    --module-path <\uBAA8\uB4C8 \uACBD\uB85C>...\n                  \uB514\uB809\uD1A0\uB9AC\uC758 {0}(\uC73C)\uB85C \uAD6C\uBD84\uB41C \uBAA9\uB85D\uC785\uB2C8\uB2E4. \uAC01 \uB514\uB809\uD1A0\uB9AC\uB294\n                  \uBAA8\uB4C8\uC758 \uB514\uB809\uD1A0\uB9AC\uC785\uB2C8\uB2E4.\n    --upgrade-module-path <\uBAA8\uB4C8 \uACBD\uB85C>...\n                  \uB514\uB809\uD1A0\uB9AC\uC758 {0}(\uC73C)\uB85C \uAD6C\uBD84\uB41C \uBAA9\uB85D\uC785\uB2C8\uB2E4. \uAC01 \uB514\uB809\uD1A0\uB9AC\uB294\n                  \uB7F0\uD0C0\uC784 \uC774\uBBF8\uC9C0\uC5D0\uC11C \uC5C5\uADF8\uB808\uC774\uB4DC \uAC00\uB2A5\uD55C \uBAA8\uB4C8\uC744 \uB300\uCCB4\uD558\uB294\n                  \uBAA8\uB4C8\uC758 \uB514\uB809\uD1A0\uB9AC\uC785\uB2C8\uB2E4.\n    --add-modules <\uBAA8\uB4C8 \uC774\uB984>[,<\uBAA8\uB4C8 \uC774\uB984>...]\n                  \uCD08\uAE30 \uBAA8\uB4C8 \uC774\uC678\uC758 \uD574\uACB0\uD560 \uB8E8\uD2B8 \uBAA8\uB4C8\uC785\uB2C8\uB2E4.\n                  <\uBAA8\uB4C8 \uC774\uB984>\uC740 ALL-DEFAULT, ALL-SYSTEM\uC77C \uC218 \uC788\uC2B5\uB2C8\uB2E4.\n                  ALL-MODULE-PATH.\n    --list-modules\n                  \uAD00\uCC30 \uAC00\uB2A5\uD55C \uBAA8\uB4C8\uC744 \uB098\uC5F4\uD558\uACE0 \uC885\uB8CC\uD569\uB2C8\uB2E4.\n    -d <\uBAA8\uB4C8 \uC774\uB984>\n    --describe-module <\uBAA8\uB4C8 \uC774\uB984>\n                  \uBAA8\uB4C8\uC744 \uC124\uBA85\uD558\uACE0 \uC885\uB8CC\uD569\uB2C8\uB2E4.\n    --dry-run     VM\uC744 \uC0DD\uC131\uD558\uACE0 \uAE30\uBCF8 \uD074\uB798\uC2A4\uB97C \uB85C\uB4DC\uD558\uC9C0\uB9CC \uAE30\uBCF8 \uBA54\uC18C\uB4DC\uB97C \uC2E4\uD589\uD558\uC9C0\uB294 \uC54A\uC2B5\uB2C8\uB2E4.\n                  --dry-run \uC635\uC158\uC740 \uBAA8\uB4C8 \uC2DC\uC2A4\uD15C \uAD6C\uC131\uACFC \uAC19\uC740\n                  \uBA85\uB839\uC904 \uC635\uC158 \uAC80\uC99D\uC5D0 \uC720\uC6A9\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.\n    --validate-modules\n                  \uBAA8\uB4E0 \uBAA8\uB4C8\uC744 \uAC80\uC99D\uD558\uACE0 \uC885\uB8CC\uD569\uB2C8\uB2E4.\n                  --validate-modules \uC635\uC158\uC740 \uBAA8\uB4C8 \uACBD\uB85C\uC5D0\uC11C \uBAA8\uB4C8\uC5D0 \uB300\uD55C\n                  \uCDA9\uB3CC \uBC0F \uAE30\uD0C0 \uC624\uB958\uB97C \uCC3E\uB294 \uB370 \uC720\uC6A9\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.\n    -D<\uC774\uB984>=<\uAC12>\n                  \uC2DC\uC2A4\uD15C \uC18D\uC131\uC744 \uC124\uC815\uD569\uB2C8\uB2E4.\n    -verbose:[class|module|gc|jni]\n                  \uC0C1\uC138 \uC815\uBCF4 \uCD9C\uB825\uC744 \uC0AC\uC6A9\uC73C\uB85C \uC124\uC815\n    -version      \uC624\uB958 \uC2A4\uD2B8\uB9BC\uC5D0 \uC81C\uD488 \uBC84\uC804\uC744 \uC778\uC1C4\uD558\uACE0 \uC885\uB8CC\uD569\uB2C8\uB2E4.\n    --version     \uCD9C\uB825 \uC2A4\uD2B8\uB9BC\uC5D0 \uC81C\uD488 \uBC84\uC804\uC744 \uC778\uC1C4\uD558\uACE0 \uC885\uB8CC\uD569\uB2C8\uB2E4.\n    -showversion  \uC624\uB958 \uC2A4\uD2B8\uB9BC\uC5D0 \uC81C\uD488 \uBC84\uC804\uC744 \uC778\uC1C4\uD558\uACE0 \uACC4\uC18D\uD569\uB2C8\uB2E4.\n    --show-version\n                  \uCD9C\uB825 \uC2A4\uD2B8\uB9BC\uC5D0 \uC81C\uD488 \uBC84\uC804\uC744 \uC778\uC1C4\uD558\uACE0 \uACC4\uC18D\uD569\uB2C8\uB2E4.\n    --show-module-resolution\n                  \uC2DC\uC791 \uC911 \uBAA8\uB4C8 \uBD84\uC11D \uCD9C\uB825\uC744 \
 \uD45C\uC2DC\uD569\uB2C8\uB2E4.\n    -? -h -help\n                  \uC624\uB958 \uC2A4\uD2B8\uB9BC\uC5D0 \uC774 \uB3C4\uC6C0\uB9D0 \uBA54\uC2DC\uC9C0\uB97C \uC778\uC1C4\uD569\uB2C8\uB2E4.\n    --help        \uCD9C\uB825 \uC2A4\uD2B8\uB9BC\uC5D0 \uC774 \uB3C4\uC6C0\uB9D0 \uBA54\uC2DC\uC9C0\uB97C \uC778\uC1C4\uD569\uB2C8\uB2E4.\n    -X            \uC624\uB958 \uC2A4\uD2B8\uB9BC\uC5D0 \uCD94\uAC00 \uC635\uC158\uC5D0 \uB300\uD55C \uB3C4\uC6C0\uB9D0\uC744 \uC778\uC1C4\uD569\uB2C8\uB2E4.\n    --help-extra  \uCD9C\uB825 \uC2A4\uD2B8\uB9BC\uC5D0 \uCD94\uAC00 \uC635\uC158\uC5D0 \uB300\uD55C \uB3C4\uC6C0\uB9D0\uC744 \uC778\uC1C4\uD569\uB2C8\uB2E4.\n    -ea[:<\uD328\uD0A4\uC9C0 \uC774\uB984>...|:<\uD074\uB798\uC2A4 \uC774\uB984>]\n    -enableassertions[:<\uD328\uD0A4\uC9C0 \uC774\uB984>...|:<\uD074\uB798\uC2A4 \uC774\uB984>]\n                  \uC138\uBD84\uC131\uC774 \uC9C0\uC815\uB41C \uAC80\uC99D\uC744 \uC0AC\uC6A9\uC73C\uB85C \uC124\uC815\uD569\uB2C8\uB2E4.\n    -da[:<\uD328\uD0A4\uC9C0 \uC774\uB984>...|:<\uD074\uB798\uC2A4 \uC774\uB984>]\n    -disableassertions[:<\uD328\uD0A4\uC9C0 \uC774\uB984>...|:<\uD074\uB798\uC2A4 \uC774\uB984>]\n                  \uC138\uBD84\uC131\uC774 \uC9C0\uC815\uB41C \uAC80\uC99D\uC744 \uC0AC\uC6A9 \uC548\uD568\uC73C\uB85C \uC124\uC815\uD569\uB2C8\uB2E4.\n    -esa | -enablesystemassertions\n                  \uC2DC\uC2A4\uD15C \uAC80\uC99D\uC744 \uC0AC\uC6A9\uC73C\uB85C \uC124\uC815\uD569\uB2C8\uB2E4.\n    -dsa | -disablesystemassertions\n                  \uC2DC\uC2A4\uD15C \uAC80\uC99D\uC744 \uC0AC\uC6A9 \uC548\uD568\uC73C\uB85C \uC124\uC815\uD569\uB2C8\uB2E4.\n    -agentlib:<\uB77C\uC774\uBE0C\uB7EC\uB9AC \uC774\uB984>[=<\uC635\uC158>]\n                  \uACE0\uC720 \uC5D0\uC774\uC804\uD2B8 \uB77C\uC774\uBE0C\uB7EC\uB9AC <\uB77C\uC774\uBE0C\uB7EC\uB9AC \uC774\uB984>\uC744 \uB85C\uB4DC\uD569\uB2C8\uB2E4(\uC608: -agentlib:jdwp).\n                  -agentlib:jdwp=help\uB3C4 \uCC38\uC870\uD558\uC2ED\uC2DC\uC624.\n    -agentpath:<\uACBD\uB85C \uC774\uB984>[=<\uC635\uC158>]\n                  \uC804\uCCB4 \uACBD\uB85C \uC774\uB984\uC744 \uC0AC\uC6A9\uD558\uC5EC \uACE0\uC720 \uC5D0\uC774\uC804\uD2B8 \uB77C\uC774\uBE0C\uB7EC\uB9AC\uB97C \uB85C\uB4DC\uD569\uB2C8\uB2E4.\n    -javaagent:<jar \uACBD\uB85C>[=<\uC635\uC158>]\n                  Java \uD504\uB85C\uADF8\uB798\uBC0D \uC5B8\uC5B4 \uC5D0\uC774\uC804\uD2B8\uB97C \uB85C\uB4DC\uD569\uB2C8\uB2E4. java.lang.instrument\uB97C \uCC38\uC870\uD558\uC2ED\uC2DC\uC624.\n    -splash:<\uC774\uBBF8\uC9C0 \uACBD\uB85C>\n                  \uC774\uBBF8\uC9C0\uAC00 \uC9C0\uC815\uB41C \uC2A4\uD50C\uB798\uC2DC \uD654\uBA74\uC744 \uD45C\uC2DC\uD569\uB2C8\uB2E4.\n                  HiDPI\uB85C \uC870\uC815\uB41C \uC774\uBBF8\uC9C0\uAC00 \uC790\uB3D9\uC73C\uB85C \uC9C0\uC6D0\uB418\uACE0 \uC0AC\uC6A9 \uAC00\uB2A5\uD55C \uACBD\uC6B0\n                  \uC0AC\uC6A9\uB429\uB2C8\uB2E4. \uBBF8\uC870\uC815 \uC774\uBBF8\uC9C0 \uD30C\uC77C \uC774\uB984(\uC608: image.ext)\uC740\n                  \uD56D\uC0C1 -splash \uC635\uC158\uC5D0 \uC778\uC218\uB85C \uC804\uB2EC\uB418\uC5B4\uC57C \uD569\uB2C8\uB2E4.\n                  \uAC00\uC7A5 \uC801\uC808\uD788 \uC870\uC815\uB41C \uC774\uBBF8\uC9C0\uAC00 \uC790\uB3D9\uC73C\uB85C\n                  \uCC44\uD0DD\uB429\uB2C8\uB2E4.\n                  \uC790\uC138\uD55C \uB0B4\uC6A9\uC740 SplashScreen API \uC124\uBA85\uC11C\uB97C \uCC38\uC870\uD558\uC2ED\uC2DC\uC624.\n    @\uC778\uC218 \uD30C\uC77C\n                  -disable-@files \uC635\uC158\uC774 \uD3EC\uD568\uB418\uC5B4 \uC788\uB294 \uD558\uB098 \uC774\uC0C1\uC758\n    \uC778\uC218 \uD30C\uC77C\n                  \uCD94\uAC00 \uC778\uC218 \uD30C\uC77C \uD655\uC7A5\uC744 \uBC29\uC9C0\uD569\uB2C8\uB2E4.\nlong \uC635\uC158\uC5D0 \uB300\uD55C \uC778\uC218\uB97C \uC9C0\uC815\uD558\uB824\uBA74 --<\uC774\uB984>=<\uAC12> \uB610\uB294\n--<\uC774\uB984> <\uAC12>\uC744 \uC0AC\uC6A9\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.\n
 
 # Translators please note do not translate the options themselves
-java.launcher.X.usage=\n    -Xbatch           \uBC31\uADF8\uB77C\uC6B4\uB4DC \uCEF4\uD30C\uC77C\uC744 \uC0AC\uC6A9 \uC548\uD568\uC73C\uB85C \uC124\uC815\uD569\uB2C8\uB2E4.\n    -Xbootclasspath/a:<{0}(\uC73C)\uB85C \uAD6C\uBD84\uB41C \uB514\uB809\uD1A0\uB9AC \uBC0F zip/jar \uD30C\uC77C>\n                      \uBD80\uD2B8\uC2A4\uD2B8\uB7A9 \uD074\uB798\uC2A4 \uACBD\uB85C \uB05D\uC5D0 \uCD94\uAC00\uD569\uB2C8\uB2E4.\n    -Xcheck:jni       JNI \uD568\uC218\uC5D0 \uB300\uD55C \uCD94\uAC00 \uAC80\uC0AC\uB97C \uC218\uD589\uD569\uB2C8\uB2E4.\n    -Xcomp            \uCCAB\uBC88\uC9F8 \uD638\uCD9C\uC5D0\uC11C \uBA54\uC18C\uB4DC \uCEF4\uD30C\uC77C\uC744 \uAC15\uC81C\uD569\uB2C8\uB2E4.\n    -Xdebug           \uC5ED \uD638\uD658\uC131\uC744 \uC704\uD574 \uC81C\uACF5\uB418\uC5C8\uC2B5\uB2C8\uB2E4.\n    -Xdiag            \uCD94\uAC00 \uC9C4\uB2E8 \uBA54\uC2DC\uC9C0\uB97C \uD45C\uC2DC\uD569\uB2C8\uB2E4.\n    -Xfuture          \uBBF8\uB798 \uAE30\uBCF8\uAC12\uC744 \uC608\uCE21\uD558\uC5EC \uAC00\uC7A5 \uC5C4\uACA9\uD55C \uAC80\uC0AC\uB97C \uC0AC\uC6A9\uC73C\uB85C \uC124\uC815\uD569\uB2C8\uB2E4.\n    -Xint             \uD574\uC11D\uB41C \uBAA8\uB4DC\uB9CC \uC2E4\uD589\uD569\uB2C8\uB2E4.\n    -Xinternalversion\n                      -version \uC635\uC158\uBCF4\uB2E4 \uC0C1\uC138\uD55C JVM \uBC84\uC804 \uC815\uBCF4\uB97C \uD45C\uC2DC\uD569\uB2C8\uB2E4.\n    -Xloggc:<\uD30C\uC77C>    \uC2DC\uAC04 \uAE30\uB85D\uACFC \uD568\uAED8 \uD30C\uC77C\uC5D0 GC \uC0C1\uD0DC\uB97C \uAE30\uB85D\uD569\uB2C8\uB2E4.\n    -Xmixed           \uD63C\uD569 \uBAA8\uB4DC\uB97C \uC2E4\uD589\uD569\uB2C8\uB2E4(\uAE30\uBCF8\uAC12).\n    -Xmn<\uD06C\uAE30>        \uC80A\uC740 \uC138\uB300(Nursery)\uB97C \uC704\uD574 \uD799\uC758 \uCD08\uAE30 \uBC0F \uCD5C\uB300\n                      \uD06C\uAE30(\uBC14\uC774\uD2B8)\uB97C \uC124\uC815\uD569\uB2C8\uB2E4.\n    -Xms<\uD06C\uAE30>        \uCD08\uAE30 Java \uD799 \uD06C\uAE30\uB97C \uC124\uC815\uD569\uB2C8\uB2E4.\n    -Xmx<\uD06C\uAE30>        \uCD5C\uB300 Java \uD799 \uD06C\uAE30\uB97C \uC124\uC815\uD569\uB2C8\uB2E4.\n    -Xnoclassgc       \uD074\uB798\uC2A4\uC758 \uBD88\uD544\uC694\uD55C \uC815\uBCF4 \uBAA8\uC74C\uC744 \uC0AC\uC6A9 \uC548\uD568\uC73C\uB85C \uC124\uC815\uD569\uB2C8\uB2E4.\n    -Xprof            CPU \uD504\uB85C\uD30C\uC77C \uC791\uC131 \uB370\uC774\uD130\uB97C \uCD9C\uB825\uD569\uB2C8\uB2E4(\uC0AC\uC6A9\uB418\uC9C0 \uC54A\uC74C).\n    -Xrs              Java/VM\uC5D0 \uC758\uD55C OS \uC2E0\uD638 \uC0AC\uC6A9\uC744 \uC904\uC785\uB2C8\uB2E4(\uC124\uBA85\uC11C \uCC38\uC870).\n    -Xshare:auto      \uAC00\uB2A5\uD55C \uACBD\uC6B0 \uACF5\uC720 \uD074\uB798\uC2A4 \uB370\uC774\uD130\uB97C \uC0AC\uC6A9\uD569\uB2C8\uB2E4(\uAE30\uBCF8\uAC12).\n    -Xshare:off       \uACF5\uC720 \uD074\uB798\uC2A4 \uB370\uC774\uD130 \uC0AC\uC6A9\uC744 \uC2DC\uB3C4\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.\n    -Xshare:on        \uACF5\uC720 \uD074\uB798\uC2A4 \uB370\uC774\uD130\uB97C \uC0AC\uC6A9\uD574\uC57C \uD569\uB2C8\uB2E4. \uADF8\uB807\uC9C0 \uC54A\uC744 \uACBD\uC6B0 \uC2E4\uD328\uD569\uB2C8\uB2E4.\n    -XshowSettings    \uBAA8\uB4E0 \uC124\uC815\uC744 \uD45C\uC2DC\uD55C \uD6C4 \uACC4\uC18D\uD569\uB2C8\uB2E4.\n    -XshowSettings:all\n                      \uBAA8\uB4E0 \uC124\uC815\uC744 \uD45C\uC2DC\uD55C \uD6C4 \uACC4\uC18D\uD569\uB2C8\uB2E4.\n    -XshowSettings:locale\n                      \uBAA8\uB4E0 \uB85C\uCF00\uC77C \uAD00\uB828 \uC124\uC815\uC744 \uD45C\uC2DC\uD55C \uD6C4 \uACC4\uC18D\uD569\uB2C8\uB2E4.\n    -XshowSettings:properties\n                      \uBAA8\uB4E0 \uC18D\uC131 \uC124\uC815\uC744 \uD45C\uC2DC\uD55C \uD6C4 \uACC4\uC18D\uD569\uB2C8\uB2E4.\n    -XshowSettings:vm \uBAA8\uB4E0 VM \uAD00\uB828 \uC124\uC815\uC744 \uD45C\uC2DC\uD55C \uD6C4 \uACC4\uC18D\uD569\uB2C8\uB2E4.\n    -Xss<\uD06C\uAE30>        Java \uC2A4\uB808\uB4DC \uC2A4\uD0DD \uD06C\uAE30\uB97C \uC124\uC815\uD569\uB2C8\uB2E4.\n    -Xverify          \uBC14\uC774\uD2B8\uCF54\uB4DC \uAC80\uC99D\uC790\uC758 \uBAA8\uB4DC\uB97C \uC124\uC815\uD569\uB2C8\uB2E4.\n  \
-  --add-reads <\uBAA8\uB4C8>=<\uB300\uC0C1-\uBAA8\uB4C8>(,<\uB300\uC0C1-\uBAA8\uB4C8>)*\n                      \uBAA8\uB4C8 \uC120\uC5B8\uC5D0 \uAD00\uACC4\uC5C6\uC774 <\uB300\uC0C1-\uBAA8\uB4C8>\uC744 \uC77D\uB3C4\uB85D\n                      <\uBAA8\uB4C8>\uC744 \uC5C5\uB370\uC774\uD2B8\uD569\uB2C8\uB2E4.\n                      <\uB300\uC0C1-\uBAA8\uB4C8>\uC740 \uC774\uB984\uC774 \uC9C0\uC815\uB418\uC9C0 \uC54A\uC740 \uBAA8\uB4E0 \uBAA8\uB4C8\uC744 \uC77D\uC744 \uC218 \uC788\uB294\n                      ALL-UNNAMED\uC77C \uC218 \uC788\uC2B5\uB2C8\uB2E4.\n    --add-exports <\uBAA8\uB4C8>/<\uD328\uD0A4\uC9C0>=<\uB300\uC0C1-\uBAA8\uB4C8>(,<\uB300\uC0C1-\uBAA8\uB4C8>)*\n                      \uBAA8\uB4C8 \uC120\uC5B8\uC5D0 \uAD00\uACC4\uC5C6\uC774 <\uD328\uD0A4\uC9C0>\uB97C <\uB300\uC0C1-\uBAA8\uB4C8>\uB85C \uC775\uC2A4\uD3EC\uD2B8\uD558\uB3C4\uB85D\n                      <\uBAA8\uB4C8>\uC744 \uC5C5\uB370\uC774\uD2B8\uD569\uB2C8\uB2E4.\n                      <\uB300\uC0C1-\uBAA8\uB4C8>\uC740 \uC774\uB984\uC774 \uC9C0\uC815\uB418\uC9C0 \uC54A\uC740 \uBAA8\uB4E0 \uBAA8\uB4C8\uB85C \uC775\uC2A4\uD3EC\uD2B8\uD560 \uC218 \uC788\uB294\n                      ALL-UNNAMED\uC77C \uC218 \uC788\uC2B5\uB2C8\uB2E4.\n    --add-opens <\uBAA8\uB4C8>/<\uD328\uD0A4\uC9C0>=<\uB300\uC0C1-\uBAA8\uB4C8>(,<\uB300\uC0C1-\uBAA8\uB4C8>)*\n                      \uBAA8\uB4C8 \uC120\uC5B8\uC5D0 \uAD00\uACC4\uC5C6\uC774 <\uD328\uD0A4\uC9C0>\uB97C <\uB300\uC0C1-\uBAA8\uB4C8>\uB85C \uC5F4\uB3C4\uB85D\n                      <\uBAA8\uB4C8>\uC744 \uC5C5\uB370\uC774\uD2B8\uD569\uB2C8\uB2E4.\n    --limit-modules <\uBAA8\uB4C8 \uC774\uB984>[,<\uBAA8\uB4C8 \uC774\uB984>...]\n                      \uAD00\uCC30 \uAC00\uB2A5\uD55C \uBAA8\uB4C8\uC758 \uACF5\uC6A9\uC744 \uC81C\uD55C\uD569\uB2C8\uB2E4.\n    --patch-module <\uBAA8\uB4C8>=<\uD30C\uC77C>({0}<\uD30C\uC77C>)*\n                      JAR \uD30C\uC77C \uB610\uB294 \uB514\uB809\uD1A0\uB9AC\uC758 \uD074\uB798\uC2A4\uC640 \uB9AC\uC18C\uC2A4\uB85C\n                      \uBAA8\uB4C8\uC744 \uBB34\uD6A8\uD654\uD558\uAC70\uB098 \uC778\uC218\uD654\uD569\uB2C8\uB2E4.\n    --disable-@files  \uCD94\uAC00 \uC778\uC218 \uD30C\uC77C \uD655\uC7A5\uC744 \uC0AC\uC6A9 \uC548\uD568\uC73C\uB85C \uC124\uC815\uD569\uB2C8\uB2E4.\n\n\uC774\uB7EC\uD55C \uCD94\uAC00 \uC635\uC158\uC740 \uD1B5\uC9C0 \uC5C6\uC774 \uBCC0\uACBD\uB420 \uC218 \uC788\uC2B5\uB2C8\uB2E4.\n
+java.launcher.X.usage=\n    -Xbatch           \uBC31\uADF8\uB77C\uC6B4\uB4DC \uCEF4\uD30C\uC77C\uC744 \uC0AC\uC6A9 \uC548\uD568\uC73C\uB85C \uC124\uC815\uD569\uB2C8\uB2E4.\n    -Xbootclasspath/a:<{0}(\uC73C)\uB85C \uAD6C\uBD84\uB41C \uB514\uB809\uD1A0\uB9AC \uBC0F zip/jar \uD30C\uC77C>\n                      \uBD80\uD2B8\uC2A4\uD2B8\uB7A9 \uD074\uB798\uC2A4 \uACBD\uB85C \uB05D\uC5D0 \uCD94\uAC00\uD569\uB2C8\uB2E4.\n    -Xcheck:jni       JNI \uD568\uC218\uC5D0 \uB300\uD55C \uCD94\uAC00 \uAC80\uC0AC\uB97C \uC218\uD589\uD569\uB2C8\uB2E4.\n    -Xcomp            \uCCAB\uBC88\uC9F8 \uD638\uCD9C\uC5D0\uC11C \uBA54\uC18C\uB4DC \uCEF4\uD30C\uC77C\uC744 \uAC15\uC81C\uD569\uB2C8\uB2E4.\n    -Xdebug           \uC5ED \uD638\uD658\uC131\uC744 \uC704\uD574 \uC81C\uACF5\uB418\uC5C8\uC2B5\uB2C8\uB2E4.\n    -Xdiag            \uCD94\uAC00 \uC9C4\uB2E8 \uBA54\uC2DC\uC9C0\uB97C \uD45C\uC2DC\uD569\uB2C8\uB2E4.\n    -Xfuture          \uBBF8\uB798 \uAE30\uBCF8\uAC12\uC744 \uC608\uCE21\uD558\uC5EC \uAC00\uC7A5 \uC5C4\uACA9\uD55C \uAC80\uC0AC\uB97C \uC0AC\uC6A9\uC73C\uB85C \uC124\uC815\uD569\uB2C8\uB2E4.\n    -Xint             \uD574\uC11D\uB41C \uBAA8\uB4DC\uB9CC \uC2E4\uD589\uD569\uB2C8\uB2E4.\n    -Xinternalversion\n                      -version \uC635\uC158\uBCF4\uB2E4 \uC0C1\uC138\uD55C JVM \uBC84\uC804 \uC815\uBCF4\uB97C\n                      \uD45C\uC2DC\uD569\uB2C8\uB2E4.\n    -Xloggc:<file>    \uC2DC\uAC04\uAE30\uB85D\uACFC \uD568\uAED8 \uD30C\uC77C\uC5D0 GC \uC0C1\uD0DC\uB97C \uAE30\uB85D\uD569\uB2C8\uB2E4.\n    -Xmixed           \uD63C\uD569 \uBAA8\uB4DC\uB97C \uC2E4\uD589\uD569\uB2C8\uB2E4(\uAE30\uBCF8\uAC12).\n    -Xmn<size>        \uC80A\uC740 \uC138\uB300(Nursery)\uB97C \uC704\uD574 \uD799\uC758 \uCD08\uAE30 \uBC0F \uCD5C\uB300\n                      \uD06C\uAE30(\uBC14\uC774\uD2B8)\uB97C \uC124\uC815\uD569\uB2C8\uB2E4.\n    -Xms<size>        \uCD08\uAE30 Java \uD799 \uD06C\uAE30\uB97C \uC124\uC815\uD569\uB2C8\uB2E4.\n    -Xmx<size>        \uCD5C\uB300 Java \uD799 \uD06C\uAE30\uB97C \uC124\uC815\uD569\uB2C8\uB2E4.\n    -Xnoclassgc       \uD074\uB798\uC2A4\uC758 \uBD88\uD544\uC694\uD55C \uC815\uBCF4 \uBAA8\uC74C\uC744 \uC0AC\uC6A9 \uC548\uD568\uC73C\uB85C \uC124\uC815\uD569\uB2C8\uB2E4.\n    -Xrs              Java/VM\uC5D0 \uC758\uD55C OS \uC2E0\uD638 \uC0AC\uC6A9\uC744 \uC904\uC785\uB2C8\uB2E4(\uC124\uBA85\uC11C \uCC38\uC870).\n    -Xshare:auto      \uAC00\uB2A5\uD55C \uACBD\uC6B0 \uACF5\uC720 \uD074\uB798\uC2A4 \uB370\uC774\uD130\uB97C \uC0AC\uC6A9\uD569\uB2C8\uB2E4(\uAE30\uBCF8\uAC12).\n    -Xshare:off       \uACF5\uC720 \uD074\uB798\uC2A4 \uB370\uC774\uD130 \uC0AC\uC6A9\uC744 \uC2DC\uB3C4\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.\n    -Xshare:on        \uACF5\uC720 \uD074\uB798\uC2A4 \uB370\uC774\uD130\uB97C \uC0AC\uC6A9\uD574\uC57C \uD569\uB2C8\uB2E4. \uADF8\uB807\uC9C0 \uC54A\uC744 \uACBD\uC6B0 \uC2E4\uD328\uD569\uB2C8\uB2E4.\n    -XshowSettings    \uBAA8\uB4E0 \uC124\uC815\uC744 \uD45C\uC2DC\uD55C \uD6C4 \uACC4\uC18D\uD569\uB2C8\uB2E4.\n    -XshowSettings:all\n                      \uBAA8\uB4E0 \uC124\uC815\uC744 \uD45C\uC2DC\uD55C \uD6C4 \uACC4\uC18D\uD569\uB2C8\uB2E4.\n    -XshowSettings:locale\n                      \uBAA8\uB4E0 \uB85C\uCF00\uC77C \uAD00\uB828 \uC124\uC815\uC744 \uD45C\uC2DC\uD55C \uD6C4 \uACC4\uC18D\uD569\uB2C8\uB2E4.\n    -XshowSettings:properties\n                      \uBAA8\uB4E0 \uC18D\uC131 \uC124\uC815\uC744 \uD45C\uC2DC\uD55C \uD6C4 \uACC4\uC18D\uD569\uB2C8\uB2E4.\n    -XshowSettings:vm \uBAA8\uB4E0 VM \uAD00\uB828 \uC124\uC815\uC744 \uD45C\uC2DC\uD55C \uD6C4 \uACC4\uC18D\uD569\uB2C8\uB2E4.\n    -Xss<size>        Java \uC2A4\uB808\uB4DC \uC2A4\uD0DD \uD06C\uAE30\uB97C \uC124\uC815\uD569\uB2C8\uB2E4.\n    -Xverify          \uBC14\uC774\uD2B8\uCF54\uB4DC \uAC80\uC99D\uC790\uC758 \uBAA8\uB4DC\uB97C \uC124\uC815\uD569\uB2C8\uB2E4.\n    --add-reads <module>=<target-module>(,<target-module>)*\n                      \uBAA8\uB4C8 \uC120\uC5B8\uC5D0 \uAD00\uACC4\uC5C6\uC774 <target-module>\uC744 \
+\uC77D\uB3C4\uB85D\n                      <module>\uC744 \uC5C5\uB370\uC774\uD2B8\uD569\uB2C8\uB2E4. \n                      <target-module>\uC740 \uC774\uB984\uC774 \uC9C0\uC815\uB418\uC9C0 \uC54A\uC740 \uBAA8\uB4E0 \uBAA8\uB4C8\uC744 \uC77D\uC744 \uC218 \uC788\uB294\n                      ALL-UNNAMED\uC77C \uC218 \uC788\uC2B5\uB2C8\uB2E4.\n    --add-exports <module>/<package>=<target-module>(,<target-module>)*\n\n                      \uBAA8\uB4C8 \uC120\uC5B8\uC5D0 \uAD00\uACC4\uC5C6\uC774 <package>\uB97C <target-module>\uB85C \uC775\uC2A4\uD3EC\uD2B8\uD558\uB3C4\uB85D\n                      <module>\uC744 \uC5C5\uB370\uC774\uD2B8\uD569\uB2C8\uB2E4.\n                      <target-module>\uC740 \uC774\uB984\uC774 \uC9C0\uC815\uB418\uC9C0 \uC54A\uC740 \uBAA8\uB4E0 \uBAA8\uB4C8\uB85C \uC775\uC2A4\uD3EC\uD2B8\uD560 \uC218 \uC788\uB294\n                      ALL-UNNAMED\uC77C \uC218 \uC788\uC2B5\uB2C8\uB2E4.\n    --add-opens <module>/<package>=<target-module>(,<target-module>)*\n                      \uBAA8\uB4C8 \uC120\uC5B8\uC5D0 \uAD00\uACC4\uC5C6\uC774 <package>\uB97C <target-module>\uB85C \uC5F4\uB3C4\uB85D\n                      <module>\uC744 \uC5C5\uB370\uC774\uD2B8\uD569\uB2C8\uB2E4.\n    --illegal-access=<value>\n                      \uC774\uB984\uC774 \uC9C0\uC815\uB418\uC9C0 \uC54A\uC740 \uBAA8\uB4C8\uC758 \uCF54\uB4DC\uB97C \uC0AC\uC6A9\uD558\uC5EC \uC774\uB984\uC774 \uC9C0\uC815\uB41C \uBAA8\uB4C8\uC758 \uC720\uD615 \uBA64\uBC84\uC5D0 \uB300\uD55C\n                      \uC561\uC138\uC2A4 \uAD8C\uD55C\uC744 \uD5C8\uC6A9 \uB610\uB294 \uAC70\uBD80\uD569\uB2C8\uB2E4.\n                      <value>\uB294 "deny", "permit", "warn" \uB610\uB294 "debug" \uC911 \uD558\uB098\uC785\uB2C8\uB2E4.\n                      \uC774 \uC635\uC158\uC740 \uC774\uD6C4 \uB9B4\uB9AC\uC2A4\uC5D0\uC11C \uC81C\uAC70\uB429\uB2C8\uB2E4.\n    --limit-modules <module name>[,<module name>...]\n                      \uAD00\uCC30 \uAC00\uB2A5\uD55C \uBAA8\uB4C8\uC758 \uACF5\uC6A9\uC744 \uC81C\uD55C\uD569\uB2C8\uB2E4.\n    --patch-module <module>=<file>({0}<file>)*\n                      JAR \uD30C\uC77C \uB610\uB294 \uB514\uB809\uD1A0\uB9AC\uC758 \uD074\uB798\uC2A4\uC640 \uB9AC\uC18C\uC2A4\uB85C \uBAA8\uB4C8\uC744\n                      \uBB34\uD6A8\uD654\uD558\uAC70\uB098 \uC778\uC218\uD654\uD569\uB2C8\uB2E4.\n    --disable-@files  \uCD94\uAC00 \uC778\uC218 \uD30C\uC77C \uD655\uC7A5\uC744 \uC0AC\uC6A9 \uC548\uD568\uC73C\uB85C \uC124\uC815\uD569\uB2C8\uB2E4.\n\n\uC774\uB7EC\uD55C \uCD94\uAC00 \uC635\uC158\uC740 \uD1B5\uC9C0 \uC5C6\uC774 \uBCC0\uACBD\uB420 \uC218 \uC788\uC2B5\uB2C8\uB2E4.\n
 
 # Translators please note do not translate the options themselves
 java.launcher.X.macosx.usage=\n\uB2E4\uC74C\uC740 Mac OS X\uC5D0 \uD2B9\uC815\uB41C \uC635\uC158\uC785\uB2C8\uB2E4.\n    -XstartOnFirstThread\n                      \uCCAB\uBC88\uC9F8 (AppKit) \uC2A4\uB808\uB4DC\uC5D0 main() \uBA54\uC18C\uB4DC\uB97C \uC2E4\uD589\uD569\uB2C8\uB2E4.\n    -Xdock:name=<application name>\n                      \uACE0\uC815\uC73C\uB85C \uD45C\uC2DC\uB41C \uAE30\uBCF8 \uC560\uD50C\uB9AC\uCF00\uC774\uC158 \uC774\uB984\uC744 \uBB34\uD6A8\uD654\uD569\uB2C8\uB2E4.\n    -Xdock:icon=<path to icon file>\n                      \uACE0\uC815\uC73C\uB85C \uD45C\uC2DC\uB41C \uAE30\uBCF8 \uC544\uC774\uCF58\uC744 \uBB34\uD6A8\uD654\uD569\uB2C8\uB2E4.\n\n
@@ -45,8 +44,9 @@
 java.launcher.cls.error2=\uC624\uB958: {1} \uD074\uB798\uC2A4\uC5D0\uC11C \uAE30\uBCF8 \uBA54\uC18C\uB4DC\uAC00 {0}\uC774(\uAC00) \uC544\uB2D9\uB2C8\uB2E4. \uB2E4\uC74C \uD615\uC2DD\uC73C\uB85C \uAE30\uBCF8 \uBA54\uC18C\uB4DC\uB97C \uC815\uC758\uD558\uC2ED\uC2DC\uC624.\n   public static void main(String[] args)
 java.launcher.cls.error3=\uC624\uB958: \uAE30\uBCF8 \uBA54\uC18C\uB4DC\uB294 {0} \uD074\uB798\uC2A4\uC5D0\uC11C void \uC720\uD615\uC758 \uAC12\uC744 \uBC18\uD658\uD574\uC57C \uD569\uB2C8\uB2E4. \n\uB2E4\uC74C \uD615\uC2DD\uC73C\uB85C \uAE30\uBCF8 \uBA54\uC18C\uB4DC\uB97C \uC815\uC758\uD558\uC2ED\uC2DC\uC624.\n   public static void main(String[] args)
 java.launcher.cls.error4=\uC624\uB958: {0} \uD074\uB798\uC2A4\uC5D0\uC11C \uAE30\uBCF8 \uBA54\uC18C\uB4DC\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uB2E4\uC74C \uD615\uC2DD\uC73C\uB85C \uAE30\uBCF8 \uBA54\uC18C\uB4DC\uB97C \uC815\uC758\uD558\uC2ED\uC2DC\uC624.\r\n   public static void main(String[] args)\r\n\uB610\uB294 JavaFX \uC560\uD50C\uB9AC\uCF00\uC774\uC158 \uD074\uB798\uC2A4\uB294 {1}\uC744(\uB97C) \uD655\uC7A5\uD574\uC57C \uD569\uB2C8\uB2E4.
-java.launcher.cls.error5=\uC624\uB958: \uC774 \uC560\uD50C\uB9AC\uCF00\uC774\uC158\uC744 \uC2E4\uD589\uD558\uB294 \uB370 \uD544\uC694\uD55C JavaFX \uB7F0\uD0C0\uC784 \uAD6C\uC131 \uC694\uC18C\uAC00 \uB204\uB77D\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
+java.launcher.cls.error5=\uC624\uB958: \uC774 \uC560\uD50C\uB9AC\uCF00\uC774\uC158\uC744 \uC2E4\uD589\uD558\uB294 \uB370 \uD544\uC694\uD55C JavaFX \uB7F0\uD0C0\uC784 \uAD6C\uC131\uC694\uC18C\uAC00 \uB204\uB77D\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
 java.launcher.cls.error6=\uC624\uB958: \uAE30\uBCF8 \uD074\uB798\uC2A4 {0}\uC744(\uB97C) \uB85C\uB4DC\uD558\uB294 \uC911 LinkageError\uAC00 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4.\n\t{1}
+java.launcher.cls.error7=\uC624\uB958: \uAE30\uBCF8 \uD074\uB798\uC2A4 {0}\uC744(\uB97C) \uCD08\uAE30\uD654\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.\n\uC6D0\uC778: {1}: {2}
 java.launcher.jar.error1=\uC624\uB958: {0} \uD30C\uC77C\uC744 \uC5F4\uB824\uACE0 \uC2DC\uB3C4\uD558\uB294 \uC911 \uC608\uC0C1\uCE58 \uC54A\uC740 \uC624\uB958\uAC00 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4.
 java.launcher.jar.error2={0}\uC5D0\uC11C Manifest\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
 java.launcher.jar.error3={0}\uC5D0 \uAE30\uBCF8 Manifest \uC18D\uC131\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.
@@ -55,5 +55,6 @@
 java.launcher.javafx.error1=\uC624\uB958: JavaFX launchApplication \uBA54\uC18C\uB4DC\uC5D0 \uC798\uBABB\uB41C \uC11C\uBA85\uC774 \uC788\uC2B5\uB2C8\uB2E4.\\n\uB530\uB77C\uC11C static\uC73C\uB85C \uC120\uC5B8\uD558\uACE0 void \uC720\uD615\uC758 \uAC12\uC744 \uBC18\uD658\uD574\uC57C \uD569\uB2C8\uB2E4.
 java.launcher.module.error1={0} \uBAA8\uB4C8\uC5D0 MainClass \uC18D\uC131\uC774 \uC5C6\uC2B5\uB2C8\uB2E4. -m <module>/<main-class>\uB97C \uC0AC\uC6A9\uD558\uC2ED\uC2DC\uC624.
 java.launcher.module.error2=\uC624\uB958: {1} \uBAA8\uB4C8\uC758 \uAE30\uBCF8 \uD074\uB798\uC2A4 {0}\uC744(\uB97C) \uCC3E\uAC70\uB098 \uB85C\uB4DC\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-java.launcher.module.error3=\uC624\uB958: {1} \uBAA8\uB4C8\uC5D0\uC11C \uAE30\uBCF8 \uD074\uB798\uC2A4 {0}\uC744(\uB97C) \uB85C\uB4DC\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.\n\t{2}
+java.launcher.module.error3=\uC624\uB958: {1} \uBAA8\uB4C8\uC758 \uAE30\uBCF8 \uD074\uB798\uC2A4 {0}\uC744(\uB97C) \uB85C\uB4DC\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.\n\t{2}
 java.launcher.module.error4={0}\uC744(\uB97C) \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
+java.launcher.module.error5=\uC624\uB958: {1} \uBAA8\uB4C8\uC758 \uAE30\uBCF8 \uD074\uB798\uC2A4 {0}\uC744(\uB97C) \uCD08\uAE30\uD654\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.\n\uC6D0\uC778: {1}: {2}
--- a/src/java.base/share/classes/sun/launcher/resources/launcher_pt_BR.properties	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.base/share/classes/sun/launcher/resources/launcher_pt_BR.properties	Tue Jan 30 16:41:40 2018 +0100
@@ -26,17 +26,16 @@
 # Translators please note do not translate the options themselves
 java.launcher.opt.header  =   Uso: {0} [options] <mainclass> [args...]\n           (para executar uma classe)\n   ou  {0} [options] -jar <jarfile> [args...]\n           (para executar um arquivo jar)\n   ou  {0} [options] -m <module>[/<mainclass>] [args...]\n       {0} [options] --module <module>[/<mainclass>] [args...]\n           (para executar a classe principal em um m\u00F3dulo)\n\n Os argumentos ap\u00F3s a classe principal, -jar <jarfile>, -m ou --module\n <module>/<mainclass> s\u00E3o especificados como os argumentos para a classe principal.\n\n em que as op\u00E7\u00F5es incluem:\n\n
 
-java.launcher.opt.datamodel  =\    -d{0}\t  Obsoleto, ser\u00E1 removido em uma futura release\n
 java.launcher.opt.vmselect   =\    {0}\t  para selecionar a VM "{1}"\n
 java.launcher.opt.hotspot    =\    {0}\t  \u00E9 um sin\u00F4nimo da VM "{1}" [obsoleto]\n
 
 # Translators please note do not translate the options themselves
-java.launcher.opt.footer = \    -cp <caminho de pesquisa de classe de diret\u00F3rios e arquivos zip/jar>\n    -classpath <caminho de pesquisa de classe de diret\u00F3rios e arquivos zip/jar>\n    --class-path <caminho de pesquisa de classe de diret\u00F3rios e arquivos zip/jar>\n                  Uma lista separada por {0} de diret\u00F3rios, arquivos compactados JAR\n                  e arquivos compactados ZIP para procurar arquivos de classe.\n    -p <caminho do m\u00F3dulo>\n    --module-path <caminho do m\u00F3dulo>...\n                  Uma lista separada por {0} de diret\u00F3rios, cada um\n                  sendo um diret\u00F3rio de m\u00F3dulos.\n    --upgrade-module-path <caminho do m\u00F3dulo>...\n                  Uma lista separada por {0} de diret\u00F3rios, cada um\n                  sendo um diret\u00F3rio de m\u00F3dulos que substituem m\u00F3dulos\n                  pass\u00EDveis de upgrade na imagem de runtime\n    --add-modules <nome do m\u00F3dulo>[,<nome do m\u00F3dulo>...]\n                  m\u00F3dulos-raiz a serem resolvidos al\u00E9m do m\u00F3dulo inicial.\n                  <nome do m\u00F3dulo> tamb\u00E9m pode ser ALL-DEFAULT, ALL-SYSTEM,\n                  ALL-MODULE-PATH.\n    --list-modules\n                  lista os m\u00F3dulos observ\u00E1veis e sai\n    --d <nome do m\u00F3dulo>\n    --describe-module <nome do m\u00F3dulo>\n                  descreve um m\u00F3dulo e sai\n    --dry-run     cria VM e carrega classe principal, mas n\u00E3o executa o m\u00E9todo principal.\n                  A op\u00E7\u00E3o --dry-run pode ser \u00FAtil para validar as\n                  op\u00E7\u00F5es de linha de comando como a configura\u00E7\u00E3o do sistema do m\u00F3dulo.\n    --validate-modules\n                  valida todos os m\u00F3dulos e sai\n                  A op\u00E7\u00E3o --validate-modules pode ser \u00FAtil para localizar\n                  conflitos e outros erros com m\u00F3dulos no caminho do m\u00F3dulo.\n    -D<name>=<value>\n                  define uma propriedade de sistema\n    -verbose:[class|module|gc|jni]\n                  ativar sa\u00EDda verbosa\n    -version      imprime a vers\u00E3o do produto no fluxo de erros e sai\n    -version      imprime a vers\u00E3o do produto no fluxo de sa\u00EDda e sai\n    -showversion  imprime a vers\u00E3o do produto no fluxo de erros e continua\n    --show-version\n                  imprime a vers\u00E3o do produto no fluxo de sa\u00EDda e continua\n    --show-module-resolution\n                  mostra a sa\u00EDda da resolu\u00E7\u00E3o do m\u00F3dulo durante a inicializa\u00E7\u00E3o\n    -? -h -help\n                  imprime esta mensagem de ajuda no fluxo de erros\n    --help        imprime esta mensagem de ajuda no fluxo de sa\u00EDda\n    -X            imprime ajuda sobre op\u00E7\u00F5es extras no fluxo de erros\n    --help-extra  imprime ajuda sobre op\u00E7\u00F5es extras no fluxo de sa\u00EDda\n    -ea[:<packagename>...|:<classname>]\n    -enableassertions[:<packagename>...|:<classname>]\n                  ativa asser\u00E7\u00F5es com granularidade especificada\n    -da[:<packagename>...|:<classname>]\n    -disableassertions[:<packagename>...|:<classname>]\n                  desativa asser\u00E7\u00F5es com granularidade especificada\n    -esa | -enablesystemassertions\n                  ativa asser\u00E7\u00F5es de sistema\n    -dsa | -disablesystemassertions\n                  desativa asser\u00E7\u00F5es de sistema\n    -agentlib:<libname>[=<options>]\n                  carrega biblioteca de agente nativo <libname>, por exemplo, -agentlib:jdwp\n                  consulte tamb\u00E9m -agentlib:jdwp=help\n    -agentpath:<pathname>[=<options>]\n                  carrega biblioteca de agente nativo por nome do caminho completo\n    -javaagent:<jarpath>[=<options>]\n                  carrega agente de linguagem de programa\u00E7\u00E3o Java, consulte java.lang.instrument\n    -splash:<imagepath>\n                  \
-mostra a tela inicial com a imagem especificada\n                  Imagens HiDPI dimensionadas s\u00E3o suportadas automaticamente e utilizadas,\n                  se dispon\u00EDveis. O nome do arquivo de imagem n\u00E3o dimensionada, por exemplo, image.ext,\n                  deve ser informado sempre como argumento para a op\u00E7\u00E3o -splash.\n                  A imagem dimensionada mais apropriada fornecida ser\u00E1 selecionada\n                  automaticamente.\n                  Consulte a documenta\u00E7\u00E3o da API de Tela Inicial para obter mais informa\u00E7\u00F5es\n    @arquivos de argumento\n                  Um ou mais arquivos de argumentos que cont\u00EAm op\u00E7\u00F5es\n    -disable-@files\n                  impede expans\u00E3o adicional de arquivo de argumentos\nnPara especificar um argumento para uma op\u00E7\u00E3o longa, voc\u00EA pode usar --<name>=<value> ou\n--<name> <value>.\n
+java.launcher.opt.footer = \    -cp <caminho de pesquisa de classe de diret\u00F3rios e arquivos zip/jar>\n    -classpath <caminho de pesquisa de classe de diret\u00F3rios e arquivos zip/jar>\n    --class-path <caminho de pesquisa de classe de diret\u00F3rios e arquivos zip/jar>\n                  Uma lista separada por {0} de diret\u00F3rios, arquivos compactados JAR\n                  e arquivos compactados ZIP para procurar arquivos de classe.\n    -p <caminho do m\u00F3dulo>\n    --module-path <caminho do m\u00F3dulo>...\n                  Uma lista separada por {0} de diret\u00F3rios, cada um\n                  sendo um diret\u00F3rio de m\u00F3dulos.\n    --upgrade-module-path <caminho do m\u00F3dulo>...\n                  Uma lista separada por {0} de diret\u00F3rios, cada um\n                  sendo um diret\u00F3rio de m\u00F3dulos que substituem m\u00F3dulos\n                  pass\u00EDveis de upgrade na imagem de runtime\n    --add-modules <nome do m\u00F3dulo>[,<nome do m\u00F3dulo>...]\n                  m\u00F3dulos-raiz a serem resolvidos al\u00E9m do m\u00F3dulo inicial.\n                  <nome do m\u00F3dulo> tamb\u00E9m pode ser ALL-DEFAULT, ALL-SYSTEM,\n                  ALL-MODULE-PATH.\n    --list-modules\n                  lista os m\u00F3dulos observ\u00E1veis e sai\n    -d <nome do m\u00F3dulo>\n    --describe-module <nome do m\u00F3dulo>\n                  descreve um m\u00F3dulo e sai\n    --dry-run     cria VM e carrega classe principal, mas n\u00E3o executa o m\u00E9todo principal.\n                  A op\u00E7\u00E3o --dry-run pode ser \u00FAtil para validar as\n                  op\u00E7\u00F5es de linha de comando como a configura\u00E7\u00E3o do sistema do m\u00F3dulo.\n    --validate-modules\n                  valida todos os m\u00F3dulos e sai\n                  A op\u00E7\u00E3o --validate-modules pode ser \u00FAtil para localizar\n                  conflitos e outros erros com m\u00F3dulos no caminho do m\u00F3dulo.\n    -D<name>=<value>\n                  define uma propriedade de sistema\n    -verbose:[class|module|gc|jni]\n                  ativar sa\u00EDda verbosa\n    -version      imprime a vers\u00E3o do produto no fluxo de erros e sai\n    -version      imprime a vers\u00E3o do produto no fluxo de sa\u00EDda e sai\n    -showversion  imprime a vers\u00E3o do produto no fluxo de erros e continua\n    --show-version\n                  imprime a vers\u00E3o do produto no fluxo de sa\u00EDda e continua\n    --show-module-resolution\n                  mostra a sa\u00EDda da resolu\u00E7\u00E3o do m\u00F3dulo durante a inicializa\u00E7\u00E3o\n    -? -h -help\n                  imprime esta mensagem de ajuda no fluxo de erros\n    --help        imprime esta mensagem de ajuda no fluxo de sa\u00EDda\n    -X            imprime ajuda sobre op\u00E7\u00F5es extras no fluxo de erros\n    --help-extra  imprime ajuda sobre op\u00E7\u00F5es extras no fluxo de sa\u00EDda\n    -ea[:<packagename>...|:<classname>]\n    -enableassertions[:<packagename>...|:<classname>]\n                  ativa asser\u00E7\u00F5es com granularidade especificada\n    -da[:<packagename>...|:<classname>]\n    -disableassertions[:<packagename>...|:<classname>]\n                  desativa asser\u00E7\u00F5es com granularidade especificada\n    -esa | -enablesystemassertions\n                  ativa asser\u00E7\u00F5es de sistema\n    -dsa | -disablesystemassertions\n                  desativa asser\u00E7\u00F5es de sistema\n    -agentlib:<libname>[=<options>]\n                  carrega biblioteca de agente nativo <libname>, por exemplo, -agentlib:jdwp\n                  consulte tamb\u00E9m -agentlib:jdwp=help\n    -agentpath:<pathname>[=<options>]\n                  carrega biblioteca de agente nativo por nome do caminho completo\n    -javaagent:<jarpath>[=<options>]\n                  carrega agente de linguagem de programa\u00E7\u00E3o Java, consulte java.lang.instrument\n    -splash:<imagepath>\n                  mostra \
+a tela inicial com a imagem especificada\n                  Imagens HiDPI dimensionadas s\u00E3o suportadas automaticamente e utilizadas,\n                  se dispon\u00EDveis. O nome do arquivo de imagem n\u00E3o dimensionada, por exemplo, image.ext,\n                  deve ser informado sempre como argumento para a op\u00E7\u00E3o -splash.\n                  A imagem dimensionada mais apropriada fornecida ser\u00E1 selecionada\n                  automaticamente.\n                  Consulte a documenta\u00E7\u00E3o da API de Tela Inicial para obter mais informa\u00E7\u00F5es\n    @arquivos de argumento\n                  Um ou mais arquivos de argumentos que cont\u00EAm op\u00E7\u00F5es\n    -disable-@files\n                  impede expans\u00E3o adicional de arquivo de argumentos\nnPara especificar um argumento para uma op\u00E7\u00E3o longa, voc\u00EA pode usar --<name>=<value> ou\n--<name> <value>.\n
 
 # Translators please note do not translate the options themselves
-java.launcher.X.usage=\n    -Xbatch           desativa compila\u00E7\u00E3o em segundo plano\n    -Xbootclasspath/a:<diret\u00F3rios e arquivos zip/jar separados por {0}>\n                      anexa ao final do caminho de classe de bootstrap\n    -Xcheck:jni       executa verifica\u00E7\u00F5es adicionais de fun\u00E7\u00F5es JNI\n    -Xcomp            for\u00E7a a compila\u00E7\u00E3o de m\u00E9todos na primeira chamada\n    -Xdebug           fornecido para compatibilidade reversa\n    -Xdiag            mostra mensagens adicionais de diagn\u00F3stico\n        -Xfuture          ativa verifica\u00E7\u00F5es de n\u00EDvel m\u00E1ximo, antecipando padr\u00E3o futuro\n    -Xint             somente execu\u00E7\u00E3o de modo interpretado\n    -Xinternalversion\n                      exibe informa\u00E7\u00F5es mais detalhadas da vers\u00E3o da JVM do que a\n                      op\u00E7\u00E3o -version\n    -Xloggc:<file>    registra status de GC em um arquivo com timestamps\n    -Xmixed           execu\u00E7\u00E3o em modo misto (padr\u00E3o)\n    -Xmn<size>        define o tamanho inicial e m\u00E1ximo (em bytes) do heap\n                      para a gera\u00E7\u00E3o jovem (infantil)\n    -Xms<size>        define tamanho inicial do heap Java\n    -Xmx<size>        define tamanho m\u00E1ximo do heap Java\n    -Xnoclassgc       desativa coleta de lixo de classe\n    -Xprof            gera dados de perfil de cpu (obsoleto)\n    -Xrs              reduz uso de sinais do SO por Java/VM (ver documenta\u00E7\u00E3o)\n    -Xshare:auto      usa dados de classe compartilhados se poss\u00EDvel (padr\u00E3o)\n    -Xshare:off       n\u00E3o tenta usar dados de classe compartilhados\n    -Xshare:on        exige o uso de dados de classe compartilhados; caso contr\u00E1rio, falhar\u00E1.\n    -XshowSettings    mostra todas as defini\u00E7\u00F5es e continua\n    -XshowSettings:all\n                      mostra todas as defini\u00E7\u00F5es e continua\n    -XshowSettings:locale\n                      mostra todas as defini\u00E7\u00F5es relacionadas \u00E0 configura\u00E7\u00E3o regional e continua\n    -XshowSettings:properties\n                      mostra todas as defini\u00E7\u00F5es de propriedade e continua\n    -XshowSettings:vm mostra todas as defini\u00E7\u00F5es relacionadas a vm e continua\n    -Xss<size>        define o tamanho da pilha de thread java\n    -Xverify          define o modo do verificador de c\u00F3digo de byte\n    --add-reads <module>=<target-module>(,<target-module>)*\n                      atualiza <module> para ler <target-module>, independentemente\n                      da declara\u00E7\u00E3o de m\u00F3dulo. \n                      <target-module> pode ser ALL-UNNAMED para ler todos os m\u00F3dulos\n                      sem nome.\n    --add-exports <module>/<package>=<target-module>(,<target-module>)*\n                      atualiza <module> para exportar <package> para <target-module>,\n                      independentemente da declara\u00E7\u00E3o de m\u00F3dulo.\n                      <target-module> pode ser ALL-UNNAMED para exportar todos os\n                      m\u00F3dulos sem nome.\n    --add-opens <module>/<package>=<target-module>(,<target-module>)*\n                      atualiza <module> para abrir <package> para\n                      <target-module>, independentemente da declara\u00E7\u00E3o de m\u00F3dulo.\n    --limit-modules <module name>[,<module name>...]\n                      limita o universo de m\u00F3dulos observ\u00E1veis\n--patch-module <module>=<file>({0}<file>)*\n                      substitui ou amplia um m\u00F3dulo com classes e recursos\n                      em arquivos ou \
-diret\u00F3rios JAR.\n\nEssas op\u00E7\u00F5es extras est\u00E3o sujeitas a altera\u00E7\u00E3o sem aviso.\n
+java.launcher.X.usage=\n    -Xbatch           desativa a compila\u00E7\u00E3o em segundo plano\n    -Xbootclasspath/a:<diret\u00F3rios e arquivos zip/jar separados por {0}>\n                      anexa ao final do caminho de classe de bootstrap\n    -Xcheck:jni       executa verifica\u00E7\u00F5es adicionais de fun\u00E7\u00F5es JNI\n    -Xcomp            for\u00E7a a compila\u00E7\u00E3o de m\u00E9todos na primeira chamada\n    -Xdebug           fornecido para compatibilidade reversa\n    -Xdiag            mostra mensagens adicionais de diagn\u00F3stico\n        -Xfuture          ativa verifica\u00E7\u00F5es de n\u00EDvel m\u00E1ximo, antecipando padr\u00E3o futuro\n    -Xint             somente execu\u00E7\u00E3o de modo interpretado\n    -Xinternalversion\n                      exibe informa\u00E7\u00F5es mais detalhadas da vers\u00E3o da JVM do que a\n                      op\u00E7\u00E3o -version\n    -Xloggc:<file>    registra o status do GC em um arquivo com timestamps\n    -Xmixed           execu\u00E7\u00E3o em modo misto (padr\u00E3o)\n    -Xmn<size>        define o tamanho inicial e m\u00E1ximo (em bytes) do heap\n                      para a gera\u00E7\u00E3o jovem (infantil)\n    -Xms<size>        define o tamanho inicial do heap Java\n    -Xmx<size>        define o tamanho m\u00E1ximo do heap Java\n    -Xnoclassgc       desativa a coleta de lixo de classe\n    -Xrs              reduz o uso de sinais do SO por Java/VM (consulte a documenta\u00E7\u00E3o)\n    -Xshare:auto      usa dados de classe compartilhados se poss\u00EDvel (padr\u00E3o)\n    -Xshare:off       n\u00E3o tenta usar dados de classe compartilhados\n    -Xshare:on        exige o uso de dados de classe compartilhados; caso contr\u00E1rio, falhar\u00E1.\n    -XshowSettings    mostra todas as defini\u00E7\u00F5es e continua\n    -XshowSettings:all\n                      mostra todas as defini\u00E7\u00F5es e continua\n    -XshowSettings:locale\n                      mostra todas as defini\u00E7\u00F5es relacionadas \u00E0 configura\u00E7\u00E3o regional e continua\n    -XshowSettings:properties\n                      mostra todas as defini\u00E7\u00F5es de propriedade e continua\n    -XshowSettings:vm mostra todas as defini\u00E7\u00F5es relacionadas a vm e continua\n    -Xss<size>        define o tamanho da pilha de thread java\n    -Xverify          define o modo do verificador de c\u00F3digo de byte\n    --add-reads <module>=<target-module>(,<target-module>)*\n                      atualiza <module> para ler <target-module>, independentemente\n                      da declara\u00E7\u00E3o de m\u00F3dulo. \n                      <target-module> pode ser ALL-UNNAMED para ler todos os m\u00F3dulos\n                      sem nome.\n    --add-exports <module>/<package>=<target-module>(,<target-module>)*\n                      atualiza <module> para exportar <package> para <target-module>,\n                      independentemente da declara\u00E7\u00E3o de m\u00F3dulo.\n                      <target-module> pode ser ALL-UNNAMED para exportar para todos os\n                      m\u00F3dulos sem nome.\n    --add-opens <module>/<package>=<target-module>(,<target-module>)*\n                      atualiza <module> para abrir <package> para\n                      <target-module>, independentemente da declara\u00E7\u00E3o de m\u00F3dulo.\n    --illegal-access=<value>\n                      permite ou nega acesso aos membros dos tipos nos m\u00F3dulos com nome\n                     por c\u00F3digo nos m\u00F3dulos sem nomes.\n                      <value> \u00E9 um entre "deny", "permit", "warn" ou "debug"\n                       Esta op\u00E7\u00E3o ser\u00E1 removida em uma futura release.\n    --limit-modules <module name>[,<module name>...]\n                      limita o universo de m\u00F3dulos observ\u00E1veis\n--patch-module <module>=<file>({0}<file>)*\n                      substitui ou amplia um m\u00F3dulo com classes e recursos\n                      \
+em arquivos ou diret\u00F3rios JAR.\n   --disable-@files  desativa uma maior expans\u00E3o do arquivo de argumento\n\nEssas op\u00E7\u00F5es extras est\u00E3o sujeitas a altera\u00E7\u00E3o sem aviso.\n
 
 # Translators please note do not translate the options themselves
 java.launcher.X.macosx.usage=\nAs op\u00E7\u00F5es a seguir s\u00E3o espec\u00EDficas para o Mac OS X:\n    -XstartOnFirstThread\n                      executa o m\u00E9todo main() no primeiro thread (AppKit)\n    -Xdock:name=<nome do aplicativo>\n                      substitui o nome do aplicativo padr\u00E3o exibido no encaixe\n    -Xdock:icon=<caminho para o arquivo do \u00EDcone>\n                      substitui o \u00EDcone exibido no encaixe\n\n
@@ -47,6 +46,7 @@
 java.launcher.cls.error4=Erro: o m\u00E9todo main n\u00E3o foi encontrado na classe {0}; defina o m\u00E9todo main como:\n   public static void main(String[] args)\nou uma classe de aplicativo JavaFX deve expandir {1}
 java.launcher.cls.error5=Erro: os componentes de runtime do JavaFX n\u00E3o foram encontrados. Eles s\u00E3o obrigat\u00F3rios para executar este aplicativo
 java.launcher.cls.error6=Erro: ocorreu LinkageError ao carregar a classe principal {0}\n\t{1}
+java.launcher.cls.error7=Erro: N\u00E3o \u00E9 poss\u00EDvel inicializar a classe principal {0}\nCausado por: {1}: {2}
 java.launcher.jar.error1=Erro: ocorreu um erro inesperado ao tentar abrir o arquivo {0}
 java.launcher.jar.error2=manifesto n\u00E3o encontrado em {0}
 java.launcher.jar.error3=nenhum atributo de manifesto principal em {0}
@@ -55,5 +55,6 @@
 java.launcher.javafx.error1=Erro: O m\u00E9todo launchApplication do JavaFX tem a assinatura errada. Ele\\ndeve ser declarado como est\u00E1tico e retornar um valor do tipo void
 java.launcher.module.error1=o m\u00F3dulo {0} n\u00E3o tem um atributo MainClass, use -m <module>/<main-class>
 java.launcher.module.error2=Erro: N\u00E3o foi poss\u00EDvel localizar nem carregar a classe principal {0} no m\u00F3dulo {1}
-java.launcher.module.error3=Erro: N\u00E3o \u00E9 poss\u00EDvel carregar a classe principal {0} do m\u00F3dulo {1}\n\t{2}
+java.launcher.module.error3=Erro: N\u00E3o \u00E9 poss\u00EDvel carregar a classe principal {0} no m\u00F3dulo {1}\n\t{2}
 java.launcher.module.error4={0} n\u00E3o encontrado.
+java.launcher.module.error5=Erro: N\u00E3o \u00E9 poss\u00EDvel inicializar a classe principal {0} no m\u00F3dulo {1}\nCausado por: {1}: {2}
--- a/src/java.base/share/classes/sun/launcher/resources/launcher_sv.properties	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.base/share/classes/sun/launcher/resources/launcher_sv.properties	Tue Jan 30 16:41:40 2018 +0100
@@ -26,17 +26,16 @@
 # Translators please note do not translate the options themselves
 java.launcher.opt.header  =   Syntax: {0} [options] <huvudklass>[args...]\n           (f\u00F6r att k\u00F6ra en klass)\n   eller  {0} [options] -jar <jar-fil> [args...]\n           (f\u00F6r att k\u00F6ra en jar-fil)\n   eller  {0} [options] -m <modul>[/<huvudklass>] [args...]\n       {0} [options] --module <modul>[/<huvudklass>] [args...]\n           (f\u00F6r att k\u00F6ra huvudklassen i en modul)\n\n Argument som kommer efter huvudklassen, -jar <jar-fil>, -m eller --module\n <modul>/<huvudklass> \u00F6verf\u00F6rs som argument till huvudklassen.\n\n med alternativen:\n\n
 
-java.launcher.opt.datamodel  =\    -d{0}\t  Inaktuellt, tas bort i en framtida utg\u00E5va\n
 java.launcher.opt.vmselect   =\    {0}\t  f\u00F6r att v\u00E4lja "{1}" VM\n
 java.launcher.opt.hotspot    =\    {0}\t  \u00E4r en synonym f\u00F6r "{1}" VM  [inaktuell]\n
 
 # Translators please note do not translate the options themselves
-java.launcher.opt.footer = \    -cp <klass\u00F6kv\u00E4g till kataloger och zip-/jar-filer>\n    -classpath <klass\u00F6kv\u00E4g till kataloger och zip-/jar-filer>\n    --class-path <klass\u00F6kv\u00E4g till kataloger och zip-/jar-filer>\n                  En {0}-avgr\u00E4nsad lista \u00F6ver kataloger, JAR-arkiv\n                  och ZIP-arkiv att s\u00F6ka efter klassfiler i.\n    -p <moduls\u00F6kv\u00E4g>\n    --module-path <moduls\u00F6kv\u00E4g>...\n                  En {0}-avgr\u00E4nsad lista \u00F6ver kataloger, d\u00E4r varje katalog\n                  \u00E4r en katalog \u00F6ver moduler.\n    --upgrade-module-path <moduls\u00F6kv\u00E4g>...\n                  En {0}-avgr\u00E4nsad lista \u00F6ver kataloger, d\u00E4r varje katalog\n                  \u00E4r en katalog \u00F6ver moduler som ers\u00E4tter uppgraderingsbara\n                  moduler i exekveringsavbilden\n    --add-modules <modulnamn>[,<modulnamn>...]\n                  rotmoduler att l\u00F6sa f\u00F6rutom den ursprungliga modulen.\n                  <modulnamn> kan \u00E4ven vara ALL-DEFAULT, ALL-SYSTEM,\n                  ALL-MODULE-PATH.\n    --list-modules\n                  visa observerbara moduler och avsluta\n    --d <modulnamn>\n    --describe-module <modulnamn>\n                  beskriv en modul och avsluta\n    --dry-run     skapa VM och ladda huvudklassen men k\u00F6r inte huvudmetoden.\n                  Alternativet --dry-run kan vara anv\u00E4ndbart f\u00F6r att validera\n                  kommandoradsalternativ, som modulsystemkonfigurationen.\n    --validate-modules\n                  validera alla moduler och avsluta\n                  Alternativet --validate-modules kan vara anv\u00E4ndbart f\u00F6r att hitta\n                  konflikter och andra fel i modulerna p\u00E5 moduls\u00F6kv\u00E4gen.\n    -D<namn>=<v\u00E4rde>\n                  ange en systemegenskap\n    -verbose:[class|module|gc|jni]\n                  aktivera utf\u00F6rliga utdata\n    -version      skriv ut produktversion till felstr\u00F6mmen och avsluta\n    --version     skriv ut produktversion till utdatastr\u00F6mmen och avsluta\n    -showversion  skriv ut produktversion till felstr\u00F6mmen och forts\u00E4tt\n    --show-version\n                  skriv ut produktversion till utdatastr\u00F6mmen och forts\u00E4tt\n    --show-module-resolution\n                  visa modull\u00F6sningsutdata vid start\n    -? -h -help\n                  skriv ut det h\u00E4r hj\u00E4lpmeddelandet till felstr\u00F6mmen\n    --help        skriv ut det h\u00E4r hj\u00E4lpmeddelandet till utdatastr\u00F6mmen\n    -X            skriv ut hj\u00E4lp f\u00F6r extraalternativ till felstr\u00F6mmen\n    --help-extra  skriv ut hj\u00E4lp f\u00F6r extraalternativ till utdatastr\u00F6mmen\n    -ea[:<paketnamn>...|:<klassnamn>]\n    -enableassertions[:<paketnamn>...|:<klassnamn>]\n                  aktivera verifieringar med den angivna detaljgraden\n    -da[:<paketnamn>...|:<klassnamn>]\n    -disableassertions[:<paketnamn>...|:<klassnamn>]\n                  avaktivera verifieringar med den angivna detaljgraden\n    -esa | -enablesystemassertions\n                  aktivera systemverifieringar\n    -dsa | -disablesystemassertions\n                  avaktivera systemverifieringar\n    -agentlib:<biblioteksnamn>[=<alternativ>]\n                  ladda det ursprungliga agentbiblioteket <biblioteksnamn>, t.ex. -agentlib:jdwp\n                  se \u00E4ven -agentlib:jdwp=help\n    -agentpath:<s\u00F6kv\u00E4gsnamn>[=<alternativ>]\n                  ladda det ursprungliga agentbiblioteket med fullst\u00E4ndigt s\u00F6kv\u00E4gsnamn\n    -javaagent:<jar-s\u00F6kv\u00E4g>[=<alternativ>]\n                  ladda Java-programmeringsspr\u00E5ksagenten, se java.lang.instrument\n    -splash:<bilds\u00F6kv\u00E4g>\n                  visa v\u00E4lkomstsk\u00E4rmen med den angivna bilden\n                  HiDPI-skal\u00E4ndrade bilder st\u00F6ds automatiskt och anv\u00E4nds om de \u00E4r\n       \
-           tillg\u00E4ngliga. Filnamnet p\u00E5 den oskal\u00E4ndrade bilden, t.ex. image.ext,\n                  ska alltid \u00F6verf\u00F6ras som argument till alternativet -splash.\n                  Den l\u00E4mpligaste skal\u00E4ndrade bilden v\u00E4ljs\n                  automatiskt.\n                  Mer information finns i dokumentationen f\u00F6r API:t SplashScreen\n    @argument filer\n                  en eller flera argumentfiler som inneh\u00E5ller alternativ\n    -disable-@files\n                  f\u00F6rhindra ytterligare ut\u00F6kning av argumentfiler\nOm du vill ange ett argument f\u00F6r ett l\u00E5ngt alternativ kan du anv\u00E4nda --<namn>=<v\u00E4rde> eller\n--<namn> <v\u00E4rde>.\n
+java.launcher.opt.footer = \    -cp <klass\u00F6kv\u00E4g till kataloger och zip-/jar-filer>\n    -classpath <klass\u00F6kv\u00E4g till kataloger och zip-/jar-filer>\n    --class-path <klass\u00F6kv\u00E4g till kataloger och zip-/jar-filer>\n                  En {0}-avgr\u00E4nsad lista \u00F6ver kataloger, JAR-arkiv\n                  och ZIP-arkiv att s\u00F6ka efter klassfiler i.\n    -p <moduls\u00F6kv\u00E4g>\n    --module-path <moduls\u00F6kv\u00E4g>...\n                  En {0}-avgr\u00E4nsad lista \u00F6ver kataloger, d\u00E4r varje katalog\n                  \u00E4r en katalog \u00F6ver moduler.\n    --upgrade-module-path <moduls\u00F6kv\u00E4g>...\n                  En {0}-avgr\u00E4nsad lista \u00F6ver kataloger, d\u00E4r varje katalog\n                  \u00E4r en katalog \u00F6ver moduler som ers\u00E4tter uppgraderingsbara\n                  moduler i exekveringsavbilden\n    --add-modules <modulnamn>[,<modulnamn>...]\n                  rotmoduler att l\u00F6sa f\u00F6rutom den ursprungliga modulen.\n                  <modulnamn> kan \u00E4ven vara ALL-DEFAULT, ALL-SYSTEM,\n                  ALL-MODULE-PATH.\n    --list-modules\n                  visa observerbara moduler och avsluta\n    -d <modulnamn>\n    --describe-module <modulnamn>\n                  beskriv en modul och avsluta\n    --dry-run     skapa VM och ladda huvudklassen men k\u00F6r inte huvudmetoden.\n                  Alternativet --dry-run kan vara anv\u00E4ndbart f\u00F6r att validera\n                  kommandoradsalternativ, som modulsystemkonfigurationen.\n    --validate-modules\n                  validera alla moduler och avsluta\n                  Alternativet --validate-modules kan vara anv\u00E4ndbart f\u00F6r att hitta\n                  konflikter och andra fel i modulerna p\u00E5 moduls\u00F6kv\u00E4gen.\n    -D<namn>=<v\u00E4rde>\n                  ange en systemegenskap\n    -verbose:[class|module|gc|jni]\n                  aktivera utf\u00F6rliga utdata\n    -version      skriv ut produktversion till felstr\u00F6mmen och avsluta\n    --version     skriv ut produktversion till utdatastr\u00F6mmen och avsluta\n    -showversion  skriv ut produktversion till felstr\u00F6mmen och forts\u00E4tt\n    --show-version\n                  skriv ut produktversion till utdatastr\u00F6mmen och forts\u00E4tt\n    --show-module-resolution\n                  visa modull\u00F6sningsutdata vid start\n    -? -h -help\n                  skriv ut det h\u00E4r hj\u00E4lpmeddelandet till felstr\u00F6mmen\n    --help        skriv ut det h\u00E4r hj\u00E4lpmeddelandet till utdatastr\u00F6mmen\n    -X            skriv ut hj\u00E4lp f\u00F6r extraalternativ till felstr\u00F6mmen\n    --help-extra  skriv ut hj\u00E4lp f\u00F6r extraalternativ till utdatastr\u00F6mmen\n    -ea[:<paketnamn>...|:<klassnamn>]\n    -enableassertions[:<paketnamn>...|:<klassnamn>]\n                  aktivera verifieringar med den angivna detaljgraden\n    -da[:<paketnamn>...|:<klassnamn>]\n    -disableassertions[:<paketnamn>...|:<klassnamn>]\n                  avaktivera verifieringar med den angivna detaljgraden\n    -esa | -enablesystemassertions\n                  aktivera systemverifieringar\n    -dsa | -disablesystemassertions\n                  avaktivera systemverifieringar\n    -agentlib:<biblioteksnamn>[=<alternativ>]\n                  ladda det ursprungliga agentbiblioteket <biblioteksnamn>, t.ex. -agentlib:jdwp\n                  se \u00E4ven -agentlib:jdwp=help\n    -agentpath:<s\u00F6kv\u00E4gsnamn>[=<alternativ>]\n                  ladda det ursprungliga agentbiblioteket med fullst\u00E4ndigt s\u00F6kv\u00E4gsnamn\n    -javaagent:<jar-s\u00F6kv\u00E4g>[=<alternativ>]\n                  ladda Java-programmeringsspr\u00E5ksagenten, se java.lang.instrument\n    -splash:<bilds\u00F6kv\u00E4g>\n                  visa v\u00E4lkomstsk\u00E4rmen med den angivna bilden\n                  HiDPI-skal\u00E4ndrade bilder st\u00F6ds automatiskt och anv\u00E4nds om de \u00E4r\n        \
+          tillg\u00E4ngliga. Filnamnet p\u00E5 den oskal\u00E4ndrade bilden, t.ex. image.ext,\n                  ska alltid \u00F6verf\u00F6ras som argument till alternativet -splash.\n                  Den l\u00E4mpligaste skal\u00E4ndrade bilden v\u00E4ljs\n                  automatiskt.\n                  Mer information finns i dokumentationen f\u00F6r API:t SplashScreen\n    @argument filer\n                  en eller flera argumentfiler som inneh\u00E5ller alternativ\n    -disable-@files\n                  f\u00F6rhindra ytterligare ut\u00F6kning av argumentfiler\nOm du vill ange ett argument f\u00F6r ett l\u00E5ngt alternativ kan du anv\u00E4nda --<namn>=<v\u00E4rde> eller\n--<namn> <v\u00E4rde>.\n
 
 # Translators please note do not translate the options themselves
-java.launcher.X.usage=\n    -Xbatch           avaktivera bakgrundskompilering\n    -Xbootclasspath/a:<kataloger och zip-/jar-filer avgr\u00E4nsade med {0}>\n                      l\u00E4gg till sist i klass\u00F6kv\u00E4gen f\u00F6r programladdning\n    -Xcheck:jni       utf\u00F6r fler kontroller f\u00F6r JNI-funktioner\n    -Xcomp            tvingar kompilering av metoder vid det f\u00F6rsta anropet\n    -Xdebug           tillhandah\u00E5lls f\u00F6r bak\u00E5tkompatibilitet\n    -Xdiag            visa fler diagnostiska meddelanden\n    -Xfuture          aktivera str\u00E4ngaste kontroller, f\u00F6rv\u00E4ntad framtida standard\n    -Xint             endast exekvering i tolkat l\u00E4ge\n    -Xinternalversion\n                      visar mer detaljerad information om JVM-version \u00E4n\n                      alternativet -version\n    -Xloggc:<fil>    logga GC-status till en fil med tidsst\u00E4mplar\n    -Xmixed           exekvering i blandat l\u00E4ge (standard)\n    -Xmn<storlek>     anger ursprunglig och maximal storlek (i byte) f\u00F6r h\u00F6gen f\u00F6r\n                      generationen med nyare objekt (h\u00F6gen f\u00F6r tilldelning av nya objekt)\n    -Xms<storlek>     ange ursprunglig storlek f\u00F6r Java-heap-utrymmet\n    -Xmx<storlek>     ange st\u00F6rsta storlek f\u00F6r Java-heap-utrymmet\n    -Xnoclassgc       avaktivera klasskr\u00E4pinsamling\n    -Xprof            utdata f\u00F6r processorprofilering (inaktuellt)\n    -Xrs              minska operativsystemssignalanv\u00E4ndning f\u00F6r Java/VM (se dokumentationen)\n    -Xshare:auto      anv\u00E4nd delade klassdata om m\u00F6jligt (standard)\n    -Xshare:off       f\u00F6rs\u00F6k inte anv\u00E4nda delade klassdata\n    -Xshare:on        kr\u00E4v anv\u00E4ndning av delade klassdata, utf\u00F6r inte i annat fall.\n    -XshowSettings    visa alla inst\u00E4llningar och forts\u00E4tt\n    -XshowSettings:all\n                      visa alla inst\u00E4llningar och forts\u00E4tt\n    -XshowSettings:locale\n                      visa alla spr\u00E5kkonventionsrelaterade inst\u00E4llningar och forts\u00E4tt\n    -XshowSettings:properties\n                      visa alla egenskapsinst\u00E4llningar och forts\u00E4tt\n    -XshowSettings:vm visa alla vm-relaterade inst\u00E4llningar och forts\u00E4tt\n    -Xss<storlek>     ange storlek f\u00F6r java-tr\u00E5dsstacken\n    -Xverify          anger l\u00E4ge f\u00F6r bytekodverifieraren\n    --add-reads <modul>=<m\u00E5lmodul>(,<m\u00E5lmodul>)*\n                      uppdaterar <modul> f\u00F6r att l\u00E4sa <m\u00E5lmodul>, oavsett\n                      moduldeklarationen. \n                      <m\u00E5lmodul> kan vara ALL-UNNAMED f\u00F6r att l\u00E4sa alla\n                      ej namngivna moduler.\n    --add-exports <modul>/<paket>=<m\u00E5lmodul>(,<m\u00E5lmodul>)*\n                      uppdaterar <modul> f\u00F6r att exportera <paket> till <m\u00E5lmodul>,\n                      oavsett moduldeklarationen.\n                      <m\u00E5lmodul> kan vara ALL-UNNAMED f\u00F6r att exportera till alla\n                      ej namngivna moduler.\n    --add-opens <modul>/<paket>=<m\u00E5lmodul>(,<m\u00E5lmodul>)*\n                      uppdaterar <modul> f\u00F6r att \u00F6ppna <paket> till\n                      <m\u00E5lmodul>, oavsett moduldeklarationen.\n    --limit-modules <modulnamn>[,<modulnamn>...]\n                      begr\u00E4nsar universumet med observerbara moduler\n    --patch-module <modul>=<fil>({0}<fil>)*\n                      \u00E5sidos\u00E4tt eller ut\u00F6ka en modul med klasser och resurser\n                      i JAR-filer eller kataloger.\n    --disable-@files  avaktivera ytterligare \
-argumentfilsut\u00F6kning\n\nDe h\u00E4r extraalternativen kan \u00E4ndras utan f\u00F6reg\u00E5ende meddelande.\n
+java.launcher.X.usage=\n    -Xbatch           avaktivera bakgrundskompilering\n    -Xbootclasspath/a:<kataloger och zip-/jar-filer avgr\u00E4nsade med {0}>\n                      l\u00E4gg till sist i klass\u00F6kv\u00E4gen f\u00F6r programladdning\n    -Xcheck:jni       utf\u00F6r fler kontroller f\u00F6r JNI-funktioner\n    -Xcomp            tvingar kompilering av metoder vid det f\u00F6rsta anropet\n    -Xdebug           tillhandah\u00E5lls f\u00F6r bak\u00E5tkompatibilitet\n    -Xdiag            visa fler diagnostiska meddelanden\n    -Xfuture          aktivera str\u00E4ngaste kontroller, f\u00F6rv\u00E4ntad framtida standard\n    -Xint             endast exekvering i tolkat l\u00E4ge\n    -Xinternalversion\n                      visar mer detaljerad information om JVM-version \u00E4n\n                      med alternativet -version\n    -Xloggc:<fil>     logga GC-status till en fil med tidsst\u00E4mplar\n    -Xmixed           exekvering i blandat l\u00E4ge (standard)\n    -Xmn<storlek>     anger ursprunglig och st\u00F6rsta storlek (i byte) f\u00F6r h\u00F6gen f\u00F6r\n                      generationen med nyare objekt (h\u00F6gen f\u00F6r tilldelning av nya objekt)\n    -Xms<storlek>     ange ursprunglig storlek f\u00F6r Java-heap-utrymmet\n    -Xmx<storlek>     ange st\u00F6rsta storlek f\u00F6r Java-heap-utrymmet\n    -Xnoclassgc       avaktivera klasskr\u00E4pinsamling\n    -Xrs              minska operativsystemssignalanv\u00E4ndning f\u00F6r Java/VM (se dokumentationen)\n    -Xshare:auto      anv\u00E4nd delade klassdata om m\u00F6jligt (standard)\n    -Xshare:off       f\u00F6rs\u00F6k inte anv\u00E4nda delade klassdata\n    -Xshare:on        kr\u00E4v anv\u00E4ndning av delade klassdata, utf\u00F6r inte i annat fall.\n    -XshowSettings    visa alla inst\u00E4llningar och forts\u00E4tt\n    -XshowSettings:all\n                      visa alla inst\u00E4llningar och forts\u00E4tt\n    -XshowSettings:locale\n                      visa alla spr\u00E5kkonventionsrelaterade inst\u00E4llningar och forts\u00E4tt\n    -XshowSettings:properties\n                      visa alla egenskapsinst\u00E4llningar och forts\u00E4tt\n    -XshowSettings:vm visa alla vm-relaterade inst\u00E4llningar och forts\u00E4tt\n    -Xss<storlek>     ange storlek f\u00F6r java-tr\u00E5dsstacken\n    -Xverify          anger l\u00E4ge f\u00F6r bytekodverifieraren\n    --add-reads <modul>=<m\u00E5lmodul>(,<m\u00E5lmodul>)*\n                      uppdaterar <modul> f\u00F6r att l\u00E4sa <m\u00E5lmodul>, oavsett\n                      moduldeklarationen. \n                      <m\u00E5lmodul> kan vara ALL-UNNAMED f\u00F6r att l\u00E4sa alla\n                      ej namngivna moduler.\n    --add-exports <modul>/<paket>=<m\u00E5lmodul>(,<m\u00E5lmodul>)*\n                      uppdaterar <modul> f\u00F6r att exportera <paket> till <m\u00E5lmodul>,\n                      oavsett moduldeklarationen.\n                      <m\u00E5lmodul> kan vara ALL-UNNAMED f\u00F6r att exportera till alla\n                      ej namngivna moduler.\n    --add-opens <modul>/<paket>=<m\u00E5lmodul>(,<m\u00E5lmodul>)*\n                      uppdaterar <modul> f\u00F6r att \u00F6ppna <paket> till\n                      <m\u00E5lmodul>, oavsett moduldeklarationen.\n    --illegal-access=<v\u00E4rde>\n                      till\u00E5t eller neka \u00E5tkomst till medlemmar av typer i namngivna\n                      moduler av kod i ej namngivna moduler.\n                      <v\u00E4rde> \u00E4r "deny", "permit", "warn" eller "debug"\n                      Det h\u00E4r alternativet tas bort i en kommande utg\u00E5va.\n    --limit-modules <modulnamn>[,<modulnamn>...]\n                      begr\u00E4nsar universumet med observerbara moduler\n    --patch-module <modul>=<fil>({0}<fil>)*\n                      \u00E5sidos\u00E4tt eller ut\u00F6ka en modul med klasser och resurser\n                      i JAR-filer eller kataloger.\n    --disable-@files  avaktivera \
+ytterligare argumentfilsut\u00F6kning\n\nDe h\u00E4r extraalternativen kan \u00E4ndras utan f\u00F6reg\u00E5ende meddelande.\n
 
 # Translators please note do not translate the options themselves
 java.launcher.X.macosx.usage=\nF\u00F6ljande alternativ \u00E4r Mac OS X-specifika:\n    -XstartOnFirstThread\n                      k\u00F6r main()-metoden p\u00E5 den f\u00F6rsta (AppKit)-tr\u00E5den\n    -Xdock:name=<applikationsnamn>\n                      \u00E5sidos\u00E4tt det standardapplikationsnamn som visas i dockan\n    -Xdock:icon=<s\u00F6kv\u00E4g till ikonfil>\n                      \u00E5sidos\u00E4tt den standardikon som visas i dockan\n\n
@@ -47,6 +46,7 @@
 java.launcher.cls.error4=Fel: Huvudmetoden finns inte i klassen {0}, definiera huvudmetoden som:\n   public static void main(String[] args)\neller s\u00E5 m\u00E5ste en JavaFX-applikationsklass ut\u00F6ka {1}
 java.launcher.cls.error5=Fel: JavaFX-exekveringskomponenter saknas, och de kr\u00E4vs f\u00F6r att kunna k\u00F6ra den h\u00E4r applikationen
 java.launcher.cls.error6=Fel: LinkageError intr\u00E4ffade vid laddning av huvudklassen {0}\n\t{1}
+java.launcher.cls.error7=Fel: Kan inte initiera huvudklassen {0}\nOrsakades av: {1}: {2}
 java.launcher.jar.error1=Fel: Ett ov\u00E4ntat fel intr\u00E4ffade n\u00E4r filen {0} skulle \u00F6ppnas
 java.launcher.jar.error2=manifest finns inte i {0}
 java.launcher.jar.error3=inget huvudmanifestattribut i {0}
@@ -55,5 +55,6 @@
 java.launcher.javafx.error1=Fel: JavaFX launchApplication-metoden har fel signatur, den \nm\u00E5ste ha deklarerats som statisk och returnera ett v\u00E4rde av typen void
 java.launcher.module.error1=modulen {0} har inget MainClass-attribut, anv\u00E4nd -m <module>/<main-class>
 java.launcher.module.error2=Fel: kunde inte hitta eller ladda huvudklassen {0} i modulen {1}
-java.launcher.module.error3=Fel: kan inte ladda huvudklassen {0} fr\u00E5n modulen {1}\n\t{2}
+java.launcher.module.error3=Fel: Kan inte ladda huvudklassen {0} i modulen {1}\n\t{2}
 java.launcher.module.error4={0} hittades inte
+java.launcher.module.error5=Fel: Kan inte initiera huvudklassen {0} i modulen {1}\nOrsakades av: {1}: {2}
--- a/src/java.base/share/classes/sun/launcher/resources/launcher_zh_CN.properties	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.base/share/classes/sun/launcher/resources/launcher_zh_CN.properties	Tue Jan 30 16:41:40 2018 +0100
@@ -26,17 +26,16 @@
 # Translators please note do not translate the options themselves
 java.launcher.opt.header  =   \u7528\u6CD5: {0} [options] <\u4E3B\u7C7B> [args...]\n           (\u6267\u884C\u7C7B)\n   \u6216  {0} [options] -jar <jar \u6587\u4EF6> [args...]\n           (\u6267\u884C jar \u6587\u4EF6)\n   \u6216  {0} [options] -m <\u6A21\u5757>[/<\u4E3B\u7C7B>] [args...]\n       {0} [options] --module <\u6A21\u5757>[/<\u4E3B\u7C7B>] [args...]\n           (\u6267\u884C\u6A21\u5757\u4E2D\u7684\u4E3B\u7C7B)\n\n \u5C06\u4E3B\u7C7B, -jar <jar \u6587\u4EF6>, -m \u6216 --module\n <\u6A21\u5757>/<\u4E3B\u7C7B> \u540E\u7684\u53C2\u6570\u4F5C\u4E3A\u53C2\u6570\u4F20\u9012\u5230\u4E3B\u7C7B\u3002\n\n \u5176\u4E2D, \u9009\u9879\u5305\u62EC:\n\n
 
-java.launcher.opt.datamodel  =\    -d{0}\t  \u5DF2\u8FC7\u65F6, \u5728\u4EE5\u540E\u7684\u53D1\u884C\u7248\u4E2D\u5C06\u88AB\u5220\u9664\n
 java.launcher.opt.vmselect   =\    {0}\t  \u9009\u62E9 "{1}" VM\n
 java.launcher.opt.hotspot    =\    {0}\t  \u662F "{1}" VM \u7684\u540C\u4E49\u8BCD [\u5DF2\u8FC7\u65F6]\n
 
 # Translators please note do not translate the options themselves
-java.launcher.opt.footer = \    -cp <\u76EE\u5F55\u548C zip/jar \u6587\u4EF6\u7684\u7C7B\u641C\u7D22\u8DEF\u5F84>\n    -classpath <\u76EE\u5F55\u548C zip/jar \u6587\u4EF6\u7684\u7C7B\u641C\u7D22\u8DEF\u5F84>\n    --class-path <\u76EE\u5F55\u548C zip/jar \u6587\u4EF6\u7684\u7C7B\u641C\u7D22\u8DEF\u5F84>\n                  \u4F7F\u7528 {0} \u5206\u9694\u7684, \u7528\u4E8E\u641C\u7D22\u7C7B\u6587\u4EF6\u7684\u76EE\u5F55, JAR \u6863\u6848\n                  \u548C ZIP \u6863\u6848\u5217\u8868\u3002\n    -p <\u6A21\u5757\u8DEF\u5F84>\n    --module-path <\u6A21\u5757\u8DEF\u5F84>...\n                  \u7528 {0} \u5206\u9694\u7684\u76EE\u5F55\u5217\u8868, \u6BCF\u4E2A\u76EE\u5F55\n                  \u90FD\u662F\u4E00\u4E2A\u5305\u542B\u6A21\u5757\u7684\u76EE\u5F55\u3002\n    --upgrade-module-path <\u6A21\u5757\u8DEF\u5F84>...\n                  \u7528 {0} \u5206\u9694\u7684\u76EE\u5F55\u5217\u8868, \u6BCF\u4E2A\u76EE\u5F55\n                  \u90FD\u662F\u4E00\u4E2A\u5305\u542B\u6A21\u5757\u7684\u76EE\u5F55, \u8FD9\u4E9B\u6A21\u5757\n                  \u7528\u4E8E\u66FF\u6362\u8FD0\u884C\u65F6\u6620\u50CF\u4E2D\u7684\u53EF\u5347\u7EA7\u6A21\u5757\n    --add-modules <\u6A21\u5757\u540D\u79F0>[,<\u6A21\u5757\u540D\u79F0>...]\n                  \u9664\u4E86\u521D\u59CB\u6A21\u5757\u4E4B\u5916\u8981\u89E3\u6790\u7684\u6839\u6A21\u5757\u3002\n                  <\u6A21\u5757\u540D\u79F0> \u8FD8\u53EF\u4EE5\u4E3A ALL-DEFAULT, ALL-SYSTEM,\n                  ALL-MODULE-PATH.\n    --list-modules\n                  \u5217\u51FA\u53EF\u89C2\u5BDF\u6A21\u5757\u5E76\u9000\u51FA\n    --d <\u6A21\u5757\u540D\u79F0>\n    --describe-module <\u6A21\u5757\u540D\u79F0>\n                  \u63CF\u8FF0\u6A21\u5757\u5E76\u9000\u51FA\n    --dry-run     \u521B\u5EFA VM \u5E76\u52A0\u8F7D\u4E3B\u7C7B, \u4F46\u4E0D\u6267\u884C main \u65B9\u6CD5\u3002\n                  \u6B64 --dry-run \u9009\u9879\u5BF9\u4E8E\u9A8C\u8BC1\u8BF8\u5982\n                  \u6A21\u5757\u7CFB\u7EDF\u914D\u7F6E\u8FD9\u6837\u7684\u547D\u4EE4\u884C\u9009\u9879\u53EF\u80FD\u975E\u5E38\u6709\u7528\u3002\n    --validate-modules\n                  \u9A8C\u8BC1\u6240\u6709\u6A21\u5757\u5E76\u9000\u51FA\n                  --validate-modules \u9009\u9879\u5BF9\u4E8E\u67E5\u627E\n                  \u6A21\u5757\u8DEF\u5F84\u4E2D\u6A21\u5757\u7684\u51B2\u7A81\u53CA\u5176\u4ED6\u9519\u8BEF\u53EF\u80FD\u975E\u5E38\u6709\u7528\u3002\n    -D<\u540D\u79F0>=<\u503C>\n                  \u8BBE\u7F6E\u7CFB\u7EDF\u5C5E\u6027\n    -verbose:[class|module|gc|jni]\n                  \u542F\u7528\u8BE6\u7EC6\u8F93\u51FA\n    -version      \u5C06\u4EA7\u54C1\u7248\u672C\u8F93\u51FA\u5230\u9519\u8BEF\u6D41\u5E76\u9000\u51FA\n    --version     \u5C06\u4EA7\u54C1\u7248\u672C\u8F93\u51FA\u5230\u8F93\u51FA\u6D41\u5E76\u9000\u51FA\n    -showversion  \u5C06\u4EA7\u54C1\u7248\u672C\u8F93\u51FA\u5230\u9519\u8BEF\u6D41\u5E76\u7EE7\u7EED\n    --show-version\n                  \u5C06\u4EA7\u54C1\u7248\u672C\u8F93\u51FA\u5230\u8F93\u51FA\u6D41\u5E76\u7EE7\u7EED\n    --show-module-resolution\n                  \u5728\u542F\u52A8\u8FC7\u7A0B\u4E2D\u663E\u793A\u6A21\u5757\u89E3\u6790\u8F93\u51FA\n    -? -h -help\n                  \u5C06\u6B64\u5E2E\u52A9\u6D88\u606F\u8F93\u51FA\u5230\u9519\u8BEF\u6D41\n    --help        \u5C06\u6B64\u5E2E\u52A9\u6D88\u606F\u8F93\u51FA\u5230\u8F93\u51FA\u6D41\n    -X            \u5C06\u989D\u5916\u9009\u9879\u7684\u5E2E\u52A9\u8F93\u51FA\u5230\u9519\u8BEF\u6D41\n    --help-extra  \u5C06\u989D\u5916\u9009\u9879\u7684\u5E2E\u52A9\u8F93\u51FA\u5230\u8F93\u51FA\u6D41\n    -ea[:<\u7A0B\u5E8F\u5305\u540D\u79F0>...|:<\u7C7B\u540D>]\n    -enableassertions[:<\u7A0B\u5E8F\u5305\u540D\u79F0>...|:<\u7C7B\u540D>]\n                  \u6309\u6307\u5B9A\u7684\u7C92\u5EA6\u542F\u7528\u65AD\u8A00\n    -da[:<\u7A0B\u5E8F\u5305\u540D\u79F0>...|:<\u7C7B\u540D>]\n    -disableassertions[:<\u7A0B\u5E8F\u5305\u540D\u79F0>...|:<\u7C7B\u540D>]\n                  \
-\u6309\u6307\u5B9A\u7684\u7C92\u5EA6\u7981\u7528\u65AD\u8A00\n    -esa | -enablesystemassertions\n                  \u542F\u7528\u7CFB\u7EDF\u65AD\u8A00\n    -dsa | -disablesystemassertions\n                  \u7981\u7528\u7CFB\u7EDF\u65AD\u8A00\n    -agentlib:<\u5E93\u540D>[=<\u9009\u9879>]\n                  \u52A0\u8F7D\u672C\u673A\u4EE3\u7406\u5E93 <\u5E93\u540D>, \u4F8B\u5982 -agentlib:jdwp\n                  \u53E6\u8BF7\u53C2\u9605 -agentlib:jdwp=help\n    -agentpath:<\u8DEF\u5F84\u540D>[=<\u9009\u9879>]\n                  \u6309\u5B8C\u6574\u8DEF\u5F84\u540D\u52A0\u8F7D\u672C\u673A\u4EE3\u7406\u5E93\n    -javaagent:<jar \u8DEF\u5F84>[=<\u9009\u9879>]\n                  \u52A0\u8F7D Java \u7F16\u7A0B\u8BED\u8A00\u4EE3\u7406, \u8BF7\u53C2\u9605 java.lang.instrument\n    -splash:<\u56FE\u50CF\u8DEF\u5F84>\n                  \u4F7F\u7528\u6307\u5B9A\u7684\u56FE\u50CF\u663E\u793A\u542F\u52A8\u5C4F\u5E55\n                  \u81EA\u52A8\u652F\u6301\u548C\u4F7F\u7528 HiDPI \u7F29\u653E\u56FE\u50CF\n                  (\u5982\u679C\u53EF\u7528)\u3002\u5E94\u59CB\u7EC8\u5C06\u672A\u7F29\u653E\u7684\u56FE\u50CF\u6587\u4EF6\u540D (\u4F8B\u5982, image.ext)\n                  \u4F5C\u4E3A\u53C2\u6570\u4F20\u9012\u7ED9 -splash \u9009\u9879\u3002\n                  \u5C06\u81EA\u52A8\u9009\u53D6\u63D0\u4F9B\u7684\u6700\u5408\u9002\u7684\u7F29\u653E\n                  \u56FE\u50CF\u3002\n                  \u6709\u5173\u8BE6\u7EC6\u4FE1\u606F, \u8BF7\u53C2\u9605 SplashScreen API \u6587\u6863\n    @argument \u6587\u4EF6\n                  \u4E00\u4E2A\u6216\u591A\u4E2A\u5305\u542B\u9009\u9879\u7684\u53C2\u6570\u6587\u4EF6\n    -disable-@files\n                  \u963B\u6B62\u8FDB\u4E00\u6B65\u6269\u5C55\u53C2\u6570\u6587\u4EF6\n\u8981\u4E3A\u957F\u9009\u9879\u6307\u5B9A\u53C2\u6570, \u53EF\u4EE5\u4F7F\u7528 --<\u540D\u79F0>=<\u503C> \u6216\n--<\u540D\u79F0> <\u503C>\u3002\n
+java.launcher.opt.footer = \    -cp <\u76EE\u5F55\u548C zip/jar \u6587\u4EF6\u7684\u7C7B\u641C\u7D22\u8DEF\u5F84>\n    -classpath <\u76EE\u5F55\u548C zip/jar \u6587\u4EF6\u7684\u7C7B\u641C\u7D22\u8DEF\u5F84>\n    --class-path <\u76EE\u5F55\u548C zip/jar \u6587\u4EF6\u7684\u7C7B\u641C\u7D22\u8DEF\u5F84>\n                  \u4F7F\u7528 {0} \u5206\u9694\u7684, \u7528\u4E8E\u641C\u7D22\u7C7B\u6587\u4EF6\u7684\u76EE\u5F55, JAR \u6863\u6848\n                  \u548C ZIP \u6863\u6848\u5217\u8868\u3002\n    -p <\u6A21\u5757\u8DEF\u5F84>\n    --module-path <\u6A21\u5757\u8DEF\u5F84>...\n                  \u7528 {0} \u5206\u9694\u7684\u76EE\u5F55\u5217\u8868, \u6BCF\u4E2A\u76EE\u5F55\n                  \u90FD\u662F\u4E00\u4E2A\u5305\u542B\u6A21\u5757\u7684\u76EE\u5F55\u3002\n    --upgrade-module-path <\u6A21\u5757\u8DEF\u5F84>...\n                  \u7528 {0} \u5206\u9694\u7684\u76EE\u5F55\u5217\u8868, \u6BCF\u4E2A\u76EE\u5F55\n                  \u90FD\u662F\u4E00\u4E2A\u5305\u542B\u6A21\u5757\u7684\u76EE\u5F55, \u8FD9\u4E9B\u6A21\u5757\n                  \u7528\u4E8E\u66FF\u6362\u8FD0\u884C\u65F6\u6620\u50CF\u4E2D\u7684\u53EF\u5347\u7EA7\u6A21\u5757\n    --add-modules <\u6A21\u5757\u540D\u79F0>[,<\u6A21\u5757\u540D\u79F0>...]\n                  \u9664\u4E86\u521D\u59CB\u6A21\u5757\u4E4B\u5916\u8981\u89E3\u6790\u7684\u6839\u6A21\u5757\u3002\n                  <\u6A21\u5757\u540D\u79F0> \u8FD8\u53EF\u4EE5\u4E3A ALL-DEFAULT, ALL-SYSTEM,\n                  ALL-MODULE-PATH.\n    --list-modules\n                  \u5217\u51FA\u53EF\u89C2\u5BDF\u6A21\u5757\u5E76\u9000\u51FA\n    -d <module name>\n    --describe-module <\u6A21\u5757\u540D\u79F0>\n                  \u63CF\u8FF0\u6A21\u5757\u5E76\u9000\u51FA\n    --dry-run     \u521B\u5EFA VM \u5E76\u52A0\u8F7D\u4E3B\u7C7B, \u4F46\u4E0D\u6267\u884C main \u65B9\u6CD5\u3002\n                  \u6B64 --dry-run \u9009\u9879\u5BF9\u4E8E\u9A8C\u8BC1\u8BF8\u5982\n                  \u6A21\u5757\u7CFB\u7EDF\u914D\u7F6E\u8FD9\u6837\u7684\u547D\u4EE4\u884C\u9009\u9879\u53EF\u80FD\u975E\u5E38\u6709\u7528\u3002\n    --validate-modules\n                  \u9A8C\u8BC1\u6240\u6709\u6A21\u5757\u5E76\u9000\u51FA\n                  --validate-modules \u9009\u9879\u5BF9\u4E8E\u67E5\u627E\n                  \u6A21\u5757\u8DEF\u5F84\u4E2D\u6A21\u5757\u7684\u51B2\u7A81\u53CA\u5176\u4ED6\u9519\u8BEF\u53EF\u80FD\u975E\u5E38\u6709\u7528\u3002\n    -D<\u540D\u79F0>=<\u503C>\n                  \u8BBE\u7F6E\u7CFB\u7EDF\u5C5E\u6027\n    -verbose:[class|module|gc|jni]\n                  \u542F\u7528\u8BE6\u7EC6\u8F93\u51FA\n    -version      \u5C06\u4EA7\u54C1\u7248\u672C\u8F93\u51FA\u5230\u9519\u8BEF\u6D41\u5E76\u9000\u51FA\n    --version     \u5C06\u4EA7\u54C1\u7248\u672C\u8F93\u51FA\u5230\u8F93\u51FA\u6D41\u5E76\u9000\u51FA\n    -showversion  \u5C06\u4EA7\u54C1\u7248\u672C\u8F93\u51FA\u5230\u9519\u8BEF\u6D41\u5E76\u7EE7\u7EED\n    --show-version\n                  \u5C06\u4EA7\u54C1\u7248\u672C\u8F93\u51FA\u5230\u8F93\u51FA\u6D41\u5E76\u7EE7\u7EED\n    --show-module-resolution\n                  \u5728\u542F\u52A8\u8FC7\u7A0B\u4E2D\u663E\u793A\u6A21\u5757\u89E3\u6790\u8F93\u51FA\n    -? -h -help\n                  \u5C06\u6B64\u5E2E\u52A9\u6D88\u606F\u8F93\u51FA\u5230\u9519\u8BEF\u6D41\n    --help        \u5C06\u6B64\u5E2E\u52A9\u6D88\u606F\u8F93\u51FA\u5230\u8F93\u51FA\u6D41\n    -X            \u5C06\u989D\u5916\u9009\u9879\u7684\u5E2E\u52A9\u8F93\u51FA\u5230\u9519\u8BEF\u6D41\n    --help-extra  \u5C06\u989D\u5916\u9009\u9879\u7684\u5E2E\u52A9\u8F93\u51FA\u5230\u8F93\u51FA\u6D41\n    -ea[:<\u7A0B\u5E8F\u5305\u540D\u79F0>...|:<\u7C7B\u540D>]\n    -enableassertions[:<\u7A0B\u5E8F\u5305\u540D\u79F0>...|:<\u7C7B\u540D>]\n                  \u6309\u6307\u5B9A\u7684\u7C92\u5EA6\u542F\u7528\u65AD\u8A00\n    -da[:<\u7A0B\u5E8F\u5305\u540D\u79F0>...|:<\u7C7B\u540D>]\n    -disableassertions[:<\u7A0B\u5E8F\u5305\u540D\u79F0>...|:<\u7C7B\u540D>]\n                  \u6309\u6307\u5B9A\u7684\u7C92\u5EA6\u7981\u7528\u65AD\u8A00\n    -esa \
+| -enablesystemassertions\n                  \u542F\u7528\u7CFB\u7EDF\u65AD\u8A00\n    -dsa | -disablesystemassertions\n                  \u7981\u7528\u7CFB\u7EDF\u65AD\u8A00\n    -agentlib:<\u5E93\u540D>[=<\u9009\u9879>]\n                  \u52A0\u8F7D\u672C\u673A\u4EE3\u7406\u5E93 <\u5E93\u540D>, \u4F8B\u5982 -agentlib:jdwp\n                  \u53E6\u8BF7\u53C2\u9605 -agentlib:jdwp=help\n    -agentpath:<\u8DEF\u5F84\u540D>[=<\u9009\u9879>]\n                  \u6309\u5B8C\u6574\u8DEF\u5F84\u540D\u52A0\u8F7D\u672C\u673A\u4EE3\u7406\u5E93\n    -javaagent:<jar \u8DEF\u5F84>[=<\u9009\u9879>]\n                  \u52A0\u8F7D Java \u7F16\u7A0B\u8BED\u8A00\u4EE3\u7406, \u8BF7\u53C2\u9605 java.lang.instrument\n    -splash:<\u56FE\u50CF\u8DEF\u5F84>\n                  \u4F7F\u7528\u6307\u5B9A\u7684\u56FE\u50CF\u663E\u793A\u542F\u52A8\u5C4F\u5E55\n                  \u81EA\u52A8\u652F\u6301\u548C\u4F7F\u7528 HiDPI \u7F29\u653E\u56FE\u50CF\n                  (\u5982\u679C\u53EF\u7528)\u3002\u5E94\u59CB\u7EC8\u5C06\u672A\u7F29\u653E\u7684\u56FE\u50CF\u6587\u4EF6\u540D (\u4F8B\u5982, image.ext)\n                  \u4F5C\u4E3A\u53C2\u6570\u4F20\u9012\u7ED9 -splash \u9009\u9879\u3002\n                  \u5C06\u81EA\u52A8\u9009\u53D6\u63D0\u4F9B\u7684\u6700\u5408\u9002\u7684\u7F29\u653E\n                  \u56FE\u50CF\u3002\n                  \u6709\u5173\u8BE6\u7EC6\u4FE1\u606F, \u8BF7\u53C2\u9605 SplashScreen API \u6587\u6863\n    @argument \u6587\u4EF6\n                  \u4E00\u4E2A\u6216\u591A\u4E2A\u5305\u542B\u9009\u9879\u7684\u53C2\u6570\u6587\u4EF6\n    -disable-@files\n                  \u963B\u6B62\u8FDB\u4E00\u6B65\u6269\u5C55\u53C2\u6570\u6587\u4EF6\n\u8981\u4E3A\u957F\u9009\u9879\u6307\u5B9A\u53C2\u6570, \u53EF\u4EE5\u4F7F\u7528 --<\u540D\u79F0>=<\u503C> \u6216\n--<\u540D\u79F0> <\u503C>\u3002\n
 
 # Translators please note do not translate the options themselves
-java.launcher.X.usage=\n    -Xbatch           \u7981\u7528\u540E\u53F0\u7F16\u8BD1\n    -Xbootclasspath/a:<\u7528 {0} \u5206\u9694\u7684\u76EE\u5F55\u548C zip/jar \u6587\u4EF6>\n                      \u9644\u52A0\u5728\u5F15\u5BFC\u7C7B\u8DEF\u5F84\u672B\u5C3E\n    -Xcheck:jni       \u5BF9 JNI \u51FD\u6570\u6267\u884C\u5176\u4ED6\u68C0\u67E5\n    -Xcomp            \u5728\u9996\u6B21\u8C03\u7528\u65F6\u5F3A\u5236\u4F7F\u7528\u7684\u7F16\u8BD1\u65B9\u6CD5\n    -Xdebug           \u4E3A\u5B9E\u73B0\u5411\u540E\u517C\u5BB9\u800C\u63D0\u4F9B\n    -Xdiag            \u663E\u793A\u9644\u52A0\u8BCA\u65AD\u6D88\u606F\n    -Xfuture          \u542F\u7528\u6700\u4E25\u683C\u7684\u68C0\u67E5, \u9884\u671F\u5C06\u6765\u7684\u9ED8\u8BA4\u503C\n    -Xint             \u4EC5\u89E3\u91CA\u6A21\u5F0F\u6267\u884C\n    -Xinternalversion\n                      \u663E\u793A\u6BD4 -version \u9009\u9879\u66F4\u8BE6\u7EC6\u7684 JVM\n                      \u7248\u672C\u4FE1\u606F\n    -Xloggc:<\u6587\u4EF6>    \u5C06 GC \u72B6\u6001\u8BB0\u5F55\u5728\u6587\u4EF6\u4E2D (\u5E26\u65F6\u95F4\u6233)\n    -Xmixed           \u6DF7\u5408\u6A21\u5F0F\u6267\u884C (\u9ED8\u8BA4\u503C)\n    -Xmn<\u5927\u5C0F>        \u4E3A\u5E74\u8F7B\u4EE3 (\u65B0\u751F\u4EE3) \u8BBE\u7F6E\u521D\u59CB\u548C\u6700\u5927\u5806\u5927\u5C0F\n                      (\u4EE5\u5B57\u8282\u4E3A\u5355\u4F4D)\n    -Xms<\u5927\u5C0F>        \u8BBE\u7F6E\u521D\u59CB Java \u5806\u5927\u5C0F\n    -Xmx<\u5927\u5C0F>        \u8BBE\u7F6E\u6700\u5927 Java \u5806\u5927\u5C0F\n    -Xnoclassgc       \u7981\u7528\u7C7B\u5783\u573E\u6536\u96C6\n    -Xprof            \u8F93\u51FA cpu \u5206\u6790\u6570\u636E (\u5DF2\u8FC7\u65F6)\n    -Xrs              \u51CF\u5C11 Java/VM \u5BF9\u64CD\u4F5C\u7CFB\u7EDF\u4FE1\u53F7\u7684\u4F7F\u7528 (\u8BF7\u53C2\u9605\u6587\u6863)\n    -Xshare:auto      \u5728\u53EF\u80FD\u7684\u60C5\u51B5\u4E0B\u4F7F\u7528\u5171\u4EAB\u7C7B\u6570\u636E (\u9ED8\u8BA4\u503C)\n    -Xshare:off       \u4E0D\u5C1D\u8BD5\u4F7F\u7528\u5171\u4EAB\u7C7B\u6570\u636E\n    -Xshare:on        \u8981\u6C42\u4F7F\u7528\u5171\u4EAB\u7C7B\u6570\u636E, \u5426\u5219\u5C06\u5931\u8D25\u3002\n    -XshowSettings    \u663E\u793A\u6240\u6709\u8BBE\u7F6E\u5E76\u7EE7\u7EED\n    -XshowSettings:all\n                      \u663E\u793A\u6240\u6709\u8BBE\u7F6E\u5E76\u7EE7\u7EED\n    -XshowSettings:locale\n                      \u663E\u793A\u6240\u6709\u4E0E\u533A\u57DF\u8BBE\u7F6E\u76F8\u5173\u7684\u8BBE\u7F6E\u5E76\u7EE7\u7EEDe\n    -XshowSettings:properties\n                      \u663E\u793A\u6240\u6709\u5C5E\u6027\u8BBE\u7F6E\u5E76\u7EE7\u7EED\n    -XshowSettings:vm \u663E\u793A\u6240\u6709\u4E0E vm \u76F8\u5173\u7684\u8BBE\u7F6E\u5E76\u7EE7\u7EED\n    -Xss<\u5927\u5C0F>        \u8BBE\u7F6E Java \u7EBF\u7A0B\u5806\u6808\u5927\u5C0F\n    -Xverify          \u8BBE\u7F6E\u5B57\u8282\u7801\u9A8C\u8BC1\u5668\u7684\u6A21\u5F0F\n    --add-reads <\u6A21\u5757>=<\u76EE\u6807\u6A21\u5757>(,<\u76EE\u6807\u6A21\u5757>)*\n                      \u66F4\u65B0 <\u6A21\u5757> \u4EE5\u8BFB\u53D6 <\u76EE\u6807\u6A21\u5757>,\n                      \u800C\u65E0\u8BBA\u6A21\u5757\u58F0\u660E\u5982\u4F55\u3002\n                      <\u76EE\u6807\u6A21\u5757> \u53EF\u4EE5\u662F ALL-UNNAMED \u4EE5\u8BFB\u53D6\u6240\u6709\u672A\u547D\u540D\n                      \u6A21\u5757\u3002\n    --add-exports <\u6A21\u5757>/<\u7A0B\u5E8F\u5305>=<\u76EE\u6807\u6A21\u5757>(,<\u76EE\u6807\u6A21\u5757>)*\n                      \u66F4\u65B0 <\u6A21\u5757> \u4EE5\u5C06 <\u7A0B\u5E8F\u5305> \u5BFC\u51FA\u5230 <\u76EE\u6807\u6A21\u5757>,\n                      \u800C\u65E0\u8BBA\u6A21\u5757\u58F0\u660E\u5982\u4F55\u3002\n                      <\u76EE\u6807\u6A21\u5757> \u53EF\u4EE5\u662F ALL-UNNAMED \u4EE5\u5BFC\u51FA\u5230\u6240\u6709\n                      \u672A\u547D\u540D\u6A21\u5757\u3002\n    --add-opens <\u6A21\u5757>/<\u7A0B\u5E8F\u5305>=<\u76EE\u6807\u6A21\u5757>(,<\u76EE\u6807\u6A21\u5757>)*\n                      \u66F4\u65B0 <\u6A21\u5757> \
-\u4EE5\u5728 <\u76EE\u6807\u6A21\u5757> \u4E2D\n                      \u6253\u5F00 <\u7A0B\u5E8F\u5305>, \u800C\u65E0\u8BBA\u6A21\u5757\u58F0\u660E\u5982\u4F55\u3002\n    --limit-modules <\u6A21\u5757\u540D\u79F0>[,<\u6A21\u5757\u540D\u79F0>...]\n                      \u9650\u5236\u53EF\u89C2\u5BDF\u6A21\u5757\u7684\u9886\u57DF\n    --patch-module <\u6A21\u5757>=<\u6587\u4EF6>({0}<\u6587\u4EF6>)*\n                      \u4F7F\u7528 JAR \u6587\u4EF6\u6216\u76EE\u5F55\u4E2D\u7684\u7C7B\u548C\u8D44\u6E90\n                      \u8986\u76D6\u6216\u589E\u5F3A\u6A21\u5757\u3002\n    --disable-@files  \u7981\u6B62\u8FDB\u4E00\u6B65\u6269\u5C55\u53C2\u6570\u6587\u4EF6\n\n\u8FD9\u4E9B\u989D\u5916\u9009\u9879\u5982\u6709\u66F4\u6539, \u6055\u4E0D\u53E6\u884C\u901A\u77E5\u3002\n
+java.launcher.X.usage=\n    -Xbatch           \u7981\u7528\u540E\u53F0\u7F16\u8BD1\n    -Xbootclasspath/a:<\u4EE5 {0} \u5206\u9694\u7684\u76EE\u5F55\u548C zip/jar \u6587\u4EF6>\n                      \u9644\u52A0\u5728\u5F15\u5BFC\u7C7B\u8DEF\u5F84\u672B\u5C3E\n    -Xcheck:jni       \u5BF9 JNI \u51FD\u6570\u6267\u884C\u5176\u4ED6\u68C0\u67E5\n    -Xcomp            \u5728\u9996\u6B21\u8C03\u7528\u65F6\u5F3A\u5236\u7F16\u8BD1\u65B9\u6CD5\n    -Xdebug           \u4E3A\u5B9E\u73B0\u5411\u540E\u517C\u5BB9\u800C\u63D0\u4F9B\n    -Xdiag            \u663E\u793A\u9644\u52A0\u8BCA\u65AD\u6D88\u606F\n    -Xfuture          \u542F\u7528\u6700\u4E25\u683C\u7684\u68C0\u67E5, \u9884\u671F\u5C06\u6765\u7684\u9ED8\u8BA4\u503C\n    -Xint             \u4EC5\u89E3\u91CA\u6A21\u5F0F\u6267\u884C\n    -Xinternalversion\n                      \u663E\u793A\u6BD4 -version \u9009\u9879\u66F4\u8BE6\u7EC6\u7684 JVM\n                      \u7248\u672C\u4FE1\u606F\n    -Xloggc:<file>    \u5C06 GC \u72B6\u6001\u8BB0\u5F55\u5728\u6587\u4EF6\u4E2D (\u5E26\u65F6\u95F4\u6233)\n    -Xmixed           \u6DF7\u5408\u6A21\u5F0F\u6267\u884C (\u9ED8\u8BA4\u503C)\n    -Xmn<size>        \u4E3A\u5E74\u8F7B\u4EE3 (\u65B0\u751F\u4EE3) \u8BBE\u7F6E\u521D\u59CB\u548C\u6700\u5927\u5806\u5927\u5C0F\n                      (\u4EE5\u5B57\u8282\u4E3A\u5355\u4F4D)\n    -Xms<size>        \u8BBE\u7F6E\u521D\u59CB Java \u5806\u5927\u5C0F\n    -Xmx<size>        \u8BBE\u7F6E\u6700\u5927 Java \u5806\u5927\u5C0F\n    -Xnoclassgc       \u7981\u7528\u7C7B\u5783\u573E\u6536\u96C6\n    -Xrs              \u51CF\u5C11 Java/VM \u5BF9\u64CD\u4F5C\u7CFB\u7EDF\u4FE1\u53F7\u7684\u4F7F\u7528 (\u8BF7\u53C2\u9605\u6587\u6863)\n    -Xshare:auto      \u5728\u53EF\u80FD\u7684\u60C5\u51B5\u4E0B\u4F7F\u7528\u5171\u4EAB\u7C7B\u6570\u636E (\u9ED8\u8BA4\u503C)\n    -Xshare:off       \u4E0D\u5C1D\u8BD5\u4F7F\u7528\u5171\u4EAB\u7C7B\u6570\u636E\n    -Xshare:on        \u8981\u6C42\u4F7F\u7528\u5171\u4EAB\u7C7B\u6570\u636E, \u5426\u5219\u5C06\u5931\u8D25\u3002\n    -XshowSettings    \u663E\u793A\u6240\u6709\u8BBE\u7F6E\u5E76\u7EE7\u7EED\n    -XshowSettings:all\n                      \u663E\u793A\u6240\u6709\u8BBE\u7F6E\u5E76\u7EE7\u7EED\n    -XshowSettings:locale\n                      \u663E\u793A\u6240\u6709\u4E0E\u533A\u57DF\u8BBE\u7F6E\u76F8\u5173\u7684\u8BBE\u7F6E\u5E76\u7EE7\u7EED\n    -XshowSettings:properties\n                      \u663E\u793A\u6240\u6709\u5C5E\u6027\u8BBE\u7F6E\u5E76\u7EE7\u7EED\n    -XshowSettings:vm \u663E\u793A\u6240\u6709\u4E0E vm \u76F8\u5173\u7684\u8BBE\u7F6E\u5E76\u7EE7\u7EED\n    -Xss<size>        \u8BBE\u7F6E Java \u7EBF\u7A0B\u5806\u6808\u5927\u5C0F\n    -Xverify          \u8BBE\u7F6E\u5B57\u8282\u7801\u9A8C\u8BC1\u5668\u7684\u6A21\u5F0F\n    --add-reads <\u6A21\u5757>=<\u76EE\u6807\u6A21\u5757>(,<\u76EE\u6807\u6A21\u5757>)*\n                      \u66F4\u65B0 <\u6A21\u5757> \u4EE5\u8BFB\u53D6 <\u76EE\u6807\u6A21\u5757>, \u800C\u65E0\u8BBA\n                      \u6A21\u5757\u58F0\u660E\u5982\u4F55\u3002\n                      <\u76EE\u6807\u6A21\u5757> \u53EF\u4EE5\u662F ALL-UNNAMED \u4EE5\u8BFB\u53D6\u6240\u6709\u672A\u547D\u540D\n                      \u6A21\u5757\u3002\n    --add-exports <\u6A21\u5757>/<\u7A0B\u5E8F\u5305>=<\u76EE\u6807\u6A21\u5757>(,<\u76EE\u6807\u6A21\u5757>)*\n                      \u66F4\u65B0 <\u6A21\u5757> \u4EE5\u5C06 <\u7A0B\u5E8F\u5305> \u5BFC\u51FA\u5230 <\u76EE\u6807\u6A21\u5757>,\n                      \u800C\u65E0\u8BBA\u6A21\u5757\u58F0\u660E\u5982\u4F55\u3002\n                      <\u76EE\u6807\u6A21\u5757> \u53EF\u4EE5\u662F ALL-UNNAMED \u4EE5\u5BFC\u51FA\u5230\u6240\u6709\n                      \u672A\u547D\u540D\u6A21\u5757\u3002\n    --add-opens <\u6A21\u5757>/<\u7A0B\u5E8F\u5305>=<\u76EE\u6807\u6A21\u5757>(,<\u76EE\u6807\u6A21\u5757>)*\n                      \u66F4\u65B0 <\u6A21\u5757> \u4EE5\u5728 <\u76EE\u6807\u6A21\u5757> \u4E2D\u6253\u5F00\n                      <\u7A0B\u5E8F\u5305>, \
+\u800C\u65E0\u8BBA\u6A21\u5757\u58F0\u660E\u5982\u4F55\u3002\n    --illegal-access=<\u503C>\n                      \u5141\u8BB8\u6216\u62D2\u7EDD\u901A\u8FC7\u672A\u547D\u540D\u6A21\u5757\u4E2D\u7684\u4EE3\u7801\u5BF9\u547D\u540D\u6A21\u5757\u4E2D\u7684\n                      \u7C7B\u578B\u6210\u5458\u8FDB\u884C\u8BBF\u95EE\u3002\n                      <\u503C> \u4E3A "deny", "permit", "warn" \u6216 "debug" \u4E4B\u4E00\n                      \u6B64\u9009\u9879\u5C06\u5728\u672A\u6765\u53D1\u884C\u7248\u4E2D\u5220\u9664\u3002\n    --limit-modules <\u6A21\u5757\u540D>[,<\u6A21\u5757\u540D>...]\n                      \u9650\u5236\u53EF\u89C2\u5BDF\u6A21\u5757\u7684\u9886\u57DF\n    --patch-module <\u6A21\u5757>=<\u6587\u4EF6>({0}<\u6587\u4EF6>)*\n                      \u4F7F\u7528 JAR \u6587\u4EF6\u6216\u76EE\u5F55\u4E2D\u7684\u7C7B\u548C\u8D44\u6E90\n                      \u8986\u76D6\u6216\u589E\u5F3A\u6A21\u5757\u3002\n    --disable-@files \u7981\u6B62\u8FDB\u4E00\u6B65\u6269\u5C55\u53C2\u6570\u6587\u4EF6\n\n\u8FD9\u4E9B\u989D\u5916\u9009\u9879\u5982\u6709\u66F4\u6539, \u6055\u4E0D\u53E6\u884C\u901A\u77E5\u3002\n
 
 # Translators please note do not translate the options themselves
 java.launcher.X.macosx.usage=\n\u4EE5\u4E0B\u9009\u9879\u4E3A Mac OS X \u7279\u5B9A\u7684\u9009\u9879:\n    -XstartOnFirstThread\n                      \u5728\u7B2C\u4E00\u4E2A (AppKit) \u7EBF\u7A0B\u4E0A\u8FD0\u884C main() \u65B9\u6CD5\n    -Xdock:name=<\u5E94\u7528\u7A0B\u5E8F\u540D\u79F0>\n                      \u8986\u76D6\u505C\u9760\u680F\u4E2D\u663E\u793A\u7684\u9ED8\u8BA4\u5E94\u7528\u7A0B\u5E8F\u540D\u79F0\n    -Xdock:icon=<\u56FE\u6807\u6587\u4EF6\u7684\u8DEF\u5F84>\n                      \u8986\u76D6\u505C\u9760\u680F\u4E2D\u663E\u793A\u7684\u9ED8\u8BA4\u56FE\u6807\n\n
@@ -47,6 +46,7 @@
 java.launcher.cls.error4=\u9519\u8BEF: \u5728\u7C7B {0} \u4E2D\u627E\u4E0D\u5230 main \u65B9\u6CD5, \u8BF7\u5C06 main \u65B9\u6CD5\u5B9A\u4E49\u4E3A:\n   public static void main(String[] args)\n\u5426\u5219 JavaFX \u5E94\u7528\u7A0B\u5E8F\u7C7B\u5FC5\u987B\u6269\u5C55{1}
 java.launcher.cls.error5=\u9519\u8BEF: \u7F3A\u5C11 JavaFX \u8FD0\u884C\u65F6\u7EC4\u4EF6, \u9700\u8981\u4F7F\u7528\u8BE5\u7EC4\u4EF6\u6765\u8FD0\u884C\u6B64\u5E94\u7528\u7A0B\u5E8F
 java.launcher.cls.error6=\u9519\u8BEF: \u52A0\u8F7D\u4E3B\u7C7B {0} \u65F6\u51FA\u73B0 LinkageError\n\t{1}
+java.launcher.cls.error7=\u9519\u8BEF: \u65E0\u6CD5\u521D\u59CB\u5316\u4E3B\u7C7B {0}\n\u539F\u56E0: {1}: {2}
 java.launcher.jar.error1=\u9519\u8BEF: \u5C1D\u8BD5\u6253\u5F00\u6587\u4EF6{0}\u65F6\u51FA\u73B0\u610F\u5916\u9519\u8BEF
 java.launcher.jar.error2=\u5728{0}\u4E2D\u627E\u4E0D\u5230\u6E05\u5355
 java.launcher.jar.error3={0}\u4E2D\u6CA1\u6709\u4E3B\u6E05\u5355\u5C5E\u6027
@@ -55,5 +55,6 @@
 java.launcher.javafx.error1=\u9519\u8BEF: JavaFX launchApplication \u65B9\u6CD5\u5177\u6709\u9519\u8BEF\u7684\u7B7E\u540D, \u5FC5\u987B\n\u5C06\u65B9\u6CD5\u58F0\u660E\u4E3A\u9759\u6001\u65B9\u6CD5\u5E76\u8FD4\u56DE\u7A7A\u7C7B\u578B\u7684\u503C
 java.launcher.module.error1=\u6A21\u5757 {0} \u4E0D\u5177\u6709 MainClass \u5C5E\u6027, \u8BF7\u4F7F\u7528 -m <module>/<main-class>
 java.launcher.module.error2=\u9519\u8BEF: \u5728\u6A21\u5757 {1} \u4E2D\u627E\u4E0D\u5230\u6216\u65E0\u6CD5\u52A0\u8F7D\u4E3B\u7C7B {0}
-java.launcher.module.error3=\u9519\u8BEF: \u65E0\u6CD5\u4ECE\u6A21\u5757 {1} \u52A0\u8F7D\u4E3B\u7C7B {0}\n\t{2}
+java.launcher.module.error3=\u9519\u8BEF: \u65E0\u6CD5\u5C06\u4E3B\u7C7B {0} \u52A0\u8F7D\u5230\u6A21\u5757 {1} \u4E2D\n\t{2}
 java.launcher.module.error4=\u627E\u4E0D\u5230{0}
+java.launcher.module.error5=\u9519\u8BEF: \u65E0\u6CD5\u521D\u59CB\u5316\u6A21\u5757 {1} \u4E2D\u7684\u4E3B\u7C7B {0}\n\u539F\u56E0: {1}: {2}
--- a/src/java.base/share/classes/sun/launcher/resources/launcher_zh_TW.properties	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.base/share/classes/sun/launcher/resources/launcher_zh_TW.properties	Tue Jan 30 16:41:40 2018 +0100
@@ -26,17 +26,16 @@
 # Translators please note do not translate the options themselves
 java.launcher.opt.header  =   \u7528\u6CD5: {0} [options] <mainclass> [args...]\n           (\u7528\u65BC\u57F7\u884C\u985E\u5225)\n   \u6216\u8005  {0} [options] -jar <jarfile> [args...]\n           (\u7528\u65BC\u57F7\u884C jar \u6A94\u6848)\n   \u6216\u8005  {0} [options] -m <module>[/<mainclass>] [args...]\n       {0} [options] --module <module>[/<mainclass>] [args...]\n           (\u7528\u65BC\u57F7\u884C\u6A21\u7D44\u4E2D\u7684\u4E3B\u8981\u985E\u5225)\n\n \u4E3B\u8981\u985E\u5225\u3001-jar <jarfile>\u3001-m \u6216 --module <module>/<mainclass>\n \u4E4B\u5F8C\u7684\u5F15\u6578\u6703\u7576\u6210\u5F15\u6578\u50B3\u9001\u81F3\u4E3B\u8981\u985E\u5225\u3002\n\n \u5176\u4E2D\u9078\u9805\u5305\u62EC:\n\n
 
-java.launcher.opt.datamodel  =\    -d{0}\t  \u5DF2\u4E0D\u518D\u4F7F\u7528\uFF0C\u5C07\u65BC\u672A\u4F86\u7248\u672C\u4E2D\u79FB\u9664\n
 java.launcher.opt.vmselect   =\    {0}\t  \u9078\u53D6 "{1}" VM\n
 java.launcher.opt.hotspot    =\    {0}\t  \u662F "{1}" VM \u7684\u540C\u7FA9\u5B57  [\u5DF2\u4E0D\u518D\u4F7F\u7528]\n
 
 # Translators please note do not translate the options themselves
-java.launcher.opt.footer = \    -cp <\u76EE\u9304\u548C zip/jar \u6A94\u6848\u7684\u985E\u5225\u641C\u5C0B\u8DEF\u5F91>\n    -classpath <\u76EE\u9304\u548C zip/jar \u6A94\u6848\u7684\u985E\u5225\u641C\u5C0B\u8DEF\u5F91>\n    --class-path <\u76EE\u9304\u548C zip/jar \u6A94\u6848\u7684\u985E\u5225\u641C\u5C0B\u8DEF\u5F91>\n                  \u4EE5 {0} \u5340\u9694\u7684\u76EE\u9304\u3001JAR \u5B58\u6A94\n                  \u4EE5\u53CA ZIP \u5B58\u6A94\u6E05\u55AE (\u5C07\u65BC\u5176\u4E2D\u641C\u5C0B\u985E\u5225\u6A94\u6848)\u3002\n    -p <\u6A21\u7D44\u8DEF\u5F91>\n    --module-path <\u6A21\u7D44\u8DEF\u5F91>...\n                  \u4EE5 {0} \u5340\u9694\u7684\u76EE\u9304\u6E05\u55AE\uFF0C\u6BCF\u500B\u76EE\u9304\n                  \u90FD\u662F\u4E00\u500B\u6A21\u7D44\u76EE\u9304\u3002\n    --upgrade-module-path <\u6A21\u7D44\u8DEF\u5F91>...\n                  \u4EE5 {0} \u5340\u9694\u7684\u76EE\u9304\u6E05\u55AE\uFF0C\u6BCF\u500B\u76EE\u9304\n                  \u90FD\u662F\u4E00\u500B\u6A21\u7D44\u76EE\u9304\uFF0C\u7576\u4E2D\u7684\u6A21\u7D44\u53EF\u53D6\u4EE3\u53EF\u5347\u7D1A\n                  \u6A21\u7D44 (\u5728\u7A0B\u5F0F\u5BE6\u969B\u57F7\u884C\u5F71\u50CF\u4E2D)\n    --add-modules <module name>[,<module name>...]\n                  \u9664\u4E86\u8D77\u59CB\u6A21\u7D44\u4E4B\u5916\uFF0C\u8981\u89E3\u6790\u7684\u6839\u6A21\u7D44\u3002\n                  <module name> \u4E5F\u53EF\u4EE5\u662F ALL-DEFAULT\u3001ALL-SYSTEM\u3001\n                  ALL-MODULE-PATH.\n    --list-modules\n                  \u5217\u51FA\u53EF\u76E3\u6E2C\u7684\u6A21\u7D44\u4E26\u7D50\u675F\n    --d <\u6A21\u7D44\u540D\u7A31>\n    --describe-module <\u6A21\u7D44\u540D\u7A31>\n                  \u63CF\u8FF0\u6A21\u7D44\u4E26\u7D50\u675F\n    --dry-run     \u5EFA\u7ACB VM \u4E26\u8F09\u5165\u4E3B\u8981\u985E\u5225\uFF0C\u4F46\u4E0D\u57F7\u884C\u4E3B\u8981\u65B9\u6CD5\u3002\n                  --dry-run \u9078\u9805\u9069\u5408\u7528\u5728\u9A57\u8B49\n                  \u50CF\u6A21\u7D44\u7CFB\u7D71\u7D44\u614B\u7684\u547D\u4EE4\u884C\u9078\u9805\u3002\n    --validate-modules\n                  \u9A57\u8B49\u6240\u6709\u6A21\u7D44\u4E26\u7D50\u675F\n                  --validate-modules \u9078\u9805\u9069\u5408\u7528\u5728\u5C0B\u627E\n                  \u6A21\u7D44\u8DEF\u5F91\u4E0A\u4E4B\u6A21\u7D44\u7684\u885D\u7A81\u548C\u5176\u4ED6\u932F\u8AA4\u3002\n    -D<name>=<value>\n                  \u8A2D\u5B9A\u7CFB\u7D71\u7279\u6027\n    -verbose:[class|module|gc|jni]\n                  \u555F\u7528\u8A73\u7D30\u8CC7\u8A0A\u8F38\u51FA\n    -version      \u5728\u932F\u8AA4\u4E32\u6D41\u5370\u51FA\u7522\u54C1\u7248\u672C\u4E26\u7D50\u675F\n    --version      \u5728\u8F38\u51FA\u4E32\u6D41\u5370\u51FA\u7522\u54C1\u7248\u672C\u4E26\u7D50\u675F\n    -showversion  \u5728\u932F\u8AA4\u4E32\u6D41\u5370\u51FA\u7522\u54C1\u7248\u672C\u4E26\u7E7C\u7E8C\u9032\u884C\u4F5C\u696D\n    --show-version\n                  \u5728\u8F38\u51FA\u4E32\u6D41\u5370\u51FA\u7522\u54C1\u7248\u672C\u4E26\u7E7C\u7E8C\u9032\u884C\u4F5C\u696D\n    --show-module-resolution\n                  \u5728\u555F\u52D5\u6642\u986F\u793A\u6A21\u7D44\u89E3\u6790\u8F38\u51FA\n    -? -h -help\n                  \u5728\u932F\u8AA4\u4E32\u6D41\u5370\u51FA\u6B64\u8AAA\u660E\u8A0A\u606F\n    --help        \u5728\u8F38\u51FA\u4E32\u6D41\u5370\u51FA\u6B64\u8AAA\u660E\u8A0A\u606F\n    -X            \u5728\u932F\u8AA4\u4E32\u6D41\u5370\u51FA\u984D\u5916\u9078\u9805\u7684\u8AAA\u660E\n    --help-extra  \u5728\u8F38\u51FA\u4E32\u6D41\u5370\u51FA\u984D\u5916\u9078\u9805\u7684\u8AAA\u660E\n    -ea[:<packagename>...|:<classname>]\n    -enableassertions[:<packagename>...|:<classname>]\n                  \u555F\u7528\u6307\u5B9A\u4E4B\u8A73\u7D30\u7A0B\u5EA6\u7684\u5BA3\u544A\n    -da[:<packagename>...|:<classname>]\n    -disableassertions[:<packagename>...|:<classname>]\n                  \u505C\u7528\u6307\u5B9A\u4E4B\u8A73\u7D30\u7A0B\u5EA6\u7684\u5BA3\u544A\n    -esa | -enablesystemassertions\n               \
-   \u555F\u7528\u7CFB\u7D71\u5BA3\u544A\n    -dsa | -disablesystemassertions\n                  \u505C\u7528\u7CFB\u7D71\u5BA3\u544A\n    -agentlib:<libname>[=<options>]\n                  \u8F09\u5165\u539F\u751F\u4EE3\u7406\u7A0B\u5F0F\u7A0B\u5F0F\u5EAB <libname>\uFF0C\u4F8B\u5982 -agentlib:jdwp\n                  \u53E6\u8ACB\u53C3\u95B1 -agentlib:jdwp=help\n    -agentpath:<pathname>[=<options>]\n                  \u4F9D\u5B8C\u6574\u8DEF\u5F91\u540D\u7A31\u8F09\u5165\u539F\u751F\u4EE3\u7406\u7A0B\u5F0F\u7A0B\u5F0F\u5EAB\n    -javaagent:<jarpath>[=<options>]\n                  \u8F09\u5165 Java \u7A0B\u5F0F\u8A9E\u8A00\u4EE3\u7406\u7A0B\u5F0F\uFF0C\u8ACB\u53C3\u95B1 java.lang.instrument\n    -splash:<imagepath>\n                  \u986F\u793A\u542B\u6307\u5B9A\u5F71\u50CF\u7684\u8EDF\u9AD4\u8CC7\u8A0A\u756B\u9762\n                  \u7CFB\u7D71\u6703\u81EA\u52D5\u652F\u63F4\u4E26\u4F7F\u7528 HiDPI \u7E2E\u653E\u7684\u5F71\u50CF\n                  (\u82E5\u6709\u7684\u8A71)\u3002\u672A\u7E2E\u653E\u5F71\u50CF\u6A94\u6848\u540D\u7A31 (\u4F8B\u5982 image.ext)\n                  \u61C9\u4E00\u5F8B\u4EE5\u5F15\u6578\u7684\u5F62\u5F0F\u50B3\u9001\u7D66 -splash \u9078\u9805\u3002\n                  \u7CFB\u7D71\u5C07\u6703\u81EA\u52D5\u9078\u64C7\u4F7F\u7528\u6700\u9069\u5408\u7684\u7E2E\u653E\u5F71\u50CF\n                  \u3002\n                  \u8ACB\u53C3\u95B1 SplashScreen API \u6587\u4EF6\u77AD\u89E3\u8A73\u7D30\u8CC7\u8A0A\u3002\n    @argument files\n                  \u4E00\u6216\u591A\u500B\u5305\u542B\u9078\u9805\u7684\u5F15\u6578\u6A94\u6848\n    -disable-@files\n                  \u505C\u7528\u9032\u4E00\u6B65\u7684\u5F15\u6578\u6A94\u6848\u64F4\u5145\n\u82E5\u8981\u6307\u5B9A\u9577\u9078\u9805\u7684\u5F15\u6578\uFF0C\u53EF\u4EE5\u4F7F\u7528 --<name>=<value> \u6216\n--<name> <value>\u3002\n
+java.launcher.opt.footer = \    -cp <\u76EE\u9304\u548C zip/jar \u6A94\u6848\u7684\u985E\u5225\u641C\u5C0B\u8DEF\u5F91>\n    -classpath <\u76EE\u9304\u548C zip/jar \u6A94\u6848\u7684\u985E\u5225\u641C\u5C0B\u8DEF\u5F91>\n    --class-path <\u76EE\u9304\u548C zip/jar \u6A94\u6848\u7684\u985E\u5225\u641C\u5C0B\u8DEF\u5F91>\n                  \u4EE5 {0} \u5340\u9694\u7684\u76EE\u9304\u3001JAR \u5B58\u6A94\n                  \u4EE5\u53CA ZIP \u5B58\u6A94\u6E05\u55AE (\u5C07\u65BC\u5176\u4E2D\u641C\u5C0B\u985E\u5225\u6A94\u6848)\u3002\n    -p <\u6A21\u7D44\u8DEF\u5F91>\n    --module-path <\u6A21\u7D44\u8DEF\u5F91>...\n                  \u4EE5 {0} \u5340\u9694\u7684\u76EE\u9304\u6E05\u55AE\uFF0C\u6BCF\u500B\u76EE\u9304\n                  \u90FD\u662F\u4E00\u500B\u6A21\u7D44\u76EE\u9304\u3002\n    --upgrade-module-path <\u6A21\u7D44\u8DEF\u5F91>...\n                  \u4EE5 {0} \u5340\u9694\u7684\u76EE\u9304\u6E05\u55AE\uFF0C\u6BCF\u500B\u76EE\u9304\n                  \u90FD\u662F\u4E00\u500B\u6A21\u7D44\u76EE\u9304\uFF0C\u7576\u4E2D\u7684\u6A21\u7D44\u53EF\u53D6\u4EE3\u53EF\u5347\u7D1A\n                  \u6A21\u7D44 (\u5728\u7A0B\u5F0F\u5BE6\u969B\u57F7\u884C\u5F71\u50CF\u4E2D)\n    --add-modules <module name>[,<module name>...]\n                  \u9664\u4E86\u8D77\u59CB\u6A21\u7D44\u4E4B\u5916\uFF0C\u8981\u89E3\u6790\u7684\u6839\u6A21\u7D44\u3002\n                  <module name> \u4E5F\u53EF\u4EE5\u662F ALL-DEFAULT\u3001ALL-SYSTEM\u3001\n                  ALL-MODULE-PATH.\n    --list-modules\n                  \u5217\u51FA\u53EF\u76E3\u6E2C\u7684\u6A21\u7D44\u4E26\u7D50\u675F\n    -d <\u6A21\u7D44\u540D\u7A31>\n    --describe-module <\u6A21\u7D44\u540D\u7A31>\n                  \u63CF\u8FF0\u6A21\u7D44\u4E26\u7D50\u675F\n    --dry-run     \u5EFA\u7ACB VM \u4E26\u8F09\u5165\u4E3B\u8981\u985E\u5225\uFF0C\u4F46\u4E0D\u57F7\u884C\u4E3B\u8981\u65B9\u6CD5\u3002\n                  --dry-run \u9078\u9805\u9069\u5408\u7528\u5728\u9A57\u8B49\n                  \u50CF\u6A21\u7D44\u7CFB\u7D71\u7D44\u614B\u7684\u547D\u4EE4\u884C\u9078\u9805\u3002\n    --validate-modules\n                  \u9A57\u8B49\u6240\u6709\u6A21\u7D44\u4E26\u7D50\u675F\n                  --validate-modules \u9078\u9805\u9069\u5408\u7528\u5728\u5C0B\u627E\n                  \u6A21\u7D44\u8DEF\u5F91\u4E0A\u4E4B\u6A21\u7D44\u7684\u885D\u7A81\u548C\u5176\u4ED6\u932F\u8AA4\u3002\n    -D<name>=<value>\n                  \u8A2D\u5B9A\u7CFB\u7D71\u7279\u6027\n    -verbose:[class|module|gc|jni]\n                  \u555F\u7528\u8A73\u7D30\u8CC7\u8A0A\u8F38\u51FA\n    -version      \u5728\u932F\u8AA4\u4E32\u6D41\u5370\u51FA\u7522\u54C1\u7248\u672C\u4E26\u7D50\u675F\n    --version      \u5728\u8F38\u51FA\u4E32\u6D41\u5370\u51FA\u7522\u54C1\u7248\u672C\u4E26\u7D50\u675F\n    -showversion  \u5728\u932F\u8AA4\u4E32\u6D41\u5370\u51FA\u7522\u54C1\u7248\u672C\u4E26\u7E7C\u7E8C\u9032\u884C\u4F5C\u696D\n    --show-version\n                  \u5728\u8F38\u51FA\u4E32\u6D41\u5370\u51FA\u7522\u54C1\u7248\u672C\u4E26\u7E7C\u7E8C\u9032\u884C\u4F5C\u696D\n    --show-module-resolution\n                  \u5728\u555F\u52D5\u6642\u986F\u793A\u6A21\u7D44\u89E3\u6790\u8F38\u51FA\n    -? -h -help\n                  \u5728\u932F\u8AA4\u4E32\u6D41\u5370\u51FA\u6B64\u8AAA\u660E\u8A0A\u606F\n    --help        \u5728\u8F38\u51FA\u4E32\u6D41\u5370\u51FA\u6B64\u8AAA\u660E\u8A0A\u606F\n    -X            \u5728\u932F\u8AA4\u4E32\u6D41\u5370\u51FA\u984D\u5916\u9078\u9805\u7684\u8AAA\u660E\n    --help-extra  \u5728\u8F38\u51FA\u4E32\u6D41\u5370\u51FA\u984D\u5916\u9078\u9805\u7684\u8AAA\u660E\n    -ea[:<packagename>...|:<classname>]\n    -enableassertions[:<packagename>...|:<classname>]\n                  \u555F\u7528\u6307\u5B9A\u4E4B\u8A73\u7D30\u7A0B\u5EA6\u7684\u5BA3\u544A\n    -da[:<packagename>...|:<classname>]\n    -disableassertions[:<packagename>...|:<classname>]\n                  \u505C\u7528\u6307\u5B9A\u4E4B\u8A73\u7D30\u7A0B\u5EA6\u7684\u5BA3\u544A\n    -esa | -enablesystemassertions\n                \
+  \u555F\u7528\u7CFB\u7D71\u5BA3\u544A\n    -dsa | -disablesystemassertions\n                  \u505C\u7528\u7CFB\u7D71\u5BA3\u544A\n    -agentlib:<libname>[=<options>]\n                  \u8F09\u5165\u539F\u751F\u4EE3\u7406\u7A0B\u5F0F\u7A0B\u5F0F\u5EAB <libname>\uFF0C\u4F8B\u5982 -agentlib:jdwp\n                  \u53E6\u8ACB\u53C3\u95B1 -agentlib:jdwp=help\n    -agentpath:<pathname>[=<options>]\n                  \u4F9D\u5B8C\u6574\u8DEF\u5F91\u540D\u7A31\u8F09\u5165\u539F\u751F\u4EE3\u7406\u7A0B\u5F0F\u7A0B\u5F0F\u5EAB\n    -javaagent:<jarpath>[=<options>]\n                  \u8F09\u5165 Java \u7A0B\u5F0F\u8A9E\u8A00\u4EE3\u7406\u7A0B\u5F0F\uFF0C\u8ACB\u53C3\u95B1 java.lang.instrument\n    -splash:<imagepath>\n                  \u986F\u793A\u542B\u6307\u5B9A\u5F71\u50CF\u7684\u8EDF\u9AD4\u8CC7\u8A0A\u756B\u9762\n                  \u7CFB\u7D71\u6703\u81EA\u52D5\u652F\u63F4\u4E26\u4F7F\u7528 HiDPI \u7E2E\u653E\u7684\u5F71\u50CF\n                  (\u82E5\u6709\u7684\u8A71)\u3002\u672A\u7E2E\u653E\u5F71\u50CF\u6A94\u6848\u540D\u7A31 (\u4F8B\u5982 image.ext)\n                  \u61C9\u4E00\u5F8B\u4EE5\u5F15\u6578\u7684\u5F62\u5F0F\u50B3\u9001\u7D66 -splash \u9078\u9805\u3002\n                  \u7CFB\u7D71\u5C07\u6703\u81EA\u52D5\u9078\u64C7\u4F7F\u7528\u6700\u9069\u5408\u7684\u7E2E\u653E\u5F71\u50CF\n                  \u3002\n                  \u8ACB\u53C3\u95B1 SplashScreen API \u6587\u4EF6\u77AD\u89E3\u8A73\u7D30\u8CC7\u8A0A\u3002\n    @argument files\n                  \u4E00\u6216\u591A\u500B\u5305\u542B\u9078\u9805\u7684\u5F15\u6578\u6A94\u6848\n    -disable-@files\n                  \u505C\u7528\u9032\u4E00\u6B65\u7684\u5F15\u6578\u6A94\u6848\u64F4\u5145\n\u82E5\u8981\u6307\u5B9A\u9577\u9078\u9805\u7684\u5F15\u6578\uFF0C\u53EF\u4EE5\u4F7F\u7528 --<name>=<value> \u6216\n--<name> <value>\u3002\n
 
 # Translators please note do not translate the options themselves
-java.launcher.X.usage=\n    -Xbatch           \u505C\u7528\u80CC\u666F\u7DE8\u8B6F\n    -Xbootclasspath/a:<\u4EE5 {0} \u5340\u9694\u7684\u76EE\u9304\u548C zip/jar \u6A94\u6848>\n                      \u9644\u52A0\u81F3\u555F\u52D5\u5B89\u88DD\u985E\u5225\u8DEF\u5F91\u7684\u7D50\u5C3E\n    -Xcheck:jni       \u57F7\u884C\u984D\u5916\u7684 JNI \u51FD\u6578\u6AA2\u67E5\n    -Xcomp            \u5F37\u5236\u7DE8\u8B6F\u7B2C\u4E00\u500B\u547C\u53EB\u7684\u65B9\u6CD5\n    -Xdebug           \u91DD\u5C0D\u56DE\u6EAF\u76F8\u5BB9\u6027\u63D0\u4F9B\n    -Xdiag            \u986F\u793A\u984D\u5916\u7684\u8A3A\u65B7\u8A0A\u606F\n    -Xfuture          \u555F\u7528\u6700\u56B4\u683C\u7684\u6AA2\u67E5\uFF0C\u9810\u5148\u4F5C\u70BA\u5C07\u4F86\u7684\u9810\u8A2D\n    -Xint             \u50C5\u9650\u89E3\u8B6F\u6A21\u5F0F\u57F7\u884C\n    -Xinternalversion\n                      \u986F\u793A\u6BD4 -version \u9078\u9805\u66F4\u70BA\u8A73\u7D30\u7684\n                      JVM \u7248\u672C\u8CC7\u8A0A\n    -Xloggc:<file>    \u5C07 GC \u72C0\u614B\u8A18\u9304\u81F3\u6A94\u6848\u4E14\u9023\u540C\u6642\u6233\n    -Xmixed           \u6DF7\u5408\u6A21\u5F0F\u57F7\u884C (\u9810\u8A2D)\n    -Xmn<size>        \u8A2D\u5B9A\u65B0\u751F\u4EE3 (\u990A\u6210\u5340) \u4E4B\u5806\u96C6\u7684\u8D77\u59CB\u5927\u5C0F\u548C\n                      \u5927\u5C0F\u4E0A\u9650 (\u4F4D\u5143\u7D44)\n    -Xms<size>        \u8A2D\u5B9A\u8D77\u59CB Java \u5806\u96C6\u5927\u5C0F\n    -Xmx<size>        \u8A2D\u5B9A Java \u5806\u96C6\u5927\u5C0F\u4E0A\u9650\n    -Xnoclassgc       \u505C\u7528\u985E\u5225\u8CC7\u6E90\u56DE\u6536\n    -Xprof            \u8F38\u51FA cpu \u5206\u6790\u8CC7\u6599 (\u5DF2\u4E0D\u518D\u4F7F\u7528)\n    -Xrs              \u6E1B\u5C11 Java/VM \u4F7F\u7528\u7684\u4F5C\u696D\u7CFB\u7D71\u4FE1\u865F (\u8ACB\u53C3\u95B1\u6587\u4EF6)\n    -Xshare:auto      \u5728\u53EF\u80FD\u7684\u60C5\u6CC1\u4E0B\u4F7F\u7528\u5171\u7528\u985E\u5225\u8CC7\u6599 (\u9810\u8A2D)\n    -Xshare:off       \u4E0D\u5617\u8A66\u4F7F\u7528\u5171\u7528\u985E\u5225\u8CC7\u6599\n    -Xshare:on        \u9700\u8981\u4F7F\u7528\u5171\u7528\u985E\u5225\u8CC7\u6599\uFF0C\u5426\u5247\u6703\u5931\u6557\u3002\n    -XshowSettings    \u986F\u793A\u6240\u6709\u8A2D\u5B9A\u503C\u4E26\u7E7C\u7E8C\u9032\u884C\u4F5C\u696D\n    -XshowSettings:all\n                      \u986F\u793A\u6240\u6709\u8A2D\u5B9A\u503C\u4E26\u7E7C\u7E8C\u9032\u884C\u4F5C\u696D\n    -XshowSettings:locale\n                      \u986F\u793A\u6240\u6709\u5730\u5340\u8A2D\u5B9A\u76F8\u95DC\u8A2D\u5B9A\u503C\u4E26\u7E7C\u7E8C\u9032\u884C\u4F5C\u696D\n    -XshowSettings:properties\n                      \u986F\u793A\u6240\u6709\u5C6C\u6027\u8A2D\u5B9A\u503C\u4E26\u7E7C\u7E8C\u9032\u884C\u4F5C\u696D\n    -XshowSettings:vm \u986F\u793A\u6240\u6709 VM \u76F8\u95DC\u8A2D\u5B9A\u503C\u4E26\u7E7C\u7E8C\u9032\u884C\u4F5C\u696D\n    -Xss<size>        \u8A2D\u5B9A Java \u57F7\u884C\u7DD2\u5806\u758A\u5927\u5C0F\n    -Xverify          \u8A2D\u5B9A Bytecode \u9A57\u8B49\u7A0B\u5F0F\u7684\u6A21\u5F0F\n    --add-reads <module>=<target-module>(,<target-module>)*\n                      \u66F4\u65B0 <module> \u4EE5\u8B80\u53D6 <target-module>\uFF0C\u4E0D\u8AD6\n                      \u6A21\u7D44\u5BA3\u544A\u70BA\u4F55\u3002\n                      \u53EF\u5C07 <target-module> \u8A2D\u70BA ALL-UNNAMED \u4EE5\u8B80\u53D6\u6240\u6709\u672A\u547D\u540D\u7684\n                      \u6A21\u7D44\u3002\n    --add-exports <module>/<package>=<target-module>(,<target-module>)*\n                      \u66F4\u65B0 <module> \u4EE5\u4FBF\u5C07 <package> \u532F\u51FA\u81F3 <target-module>\uFF0C\n                      \u4E0D\u8AD6\u6A21\u7D44\u5BA3\u544A\u70BA\u4F55\u3002\n                      \u53EF\u5C07 <target-module> \u8A2D\u70BA ALL-UNNAMED \u4EE5\u532F\u51FA\u81F3\u6240\u6709\n                      \u672A\u547D\u540D\u7684\u6A21\u7D44\u3002\n    --add-opens <module>/<package>=<target-module>(,<target-module>)*\n                      \u66F4\u65B0 <module> \
-\u4EE5\u4FBF\u5C07 <package> \u958B\u555F\u81F3\n                      <target-module>\uFF0C\u4E0D\u8AD6\u6A21\u7D44\u5BA3\u544A\u70BA\u4F55\u3002\n    --limit-modules <module name>[,<module name>...]\n                      \u9650\u5236\u53EF\u76E3\u6E2C\u6A21\u7D44\u7684\u7BC4\u570D\n    --patch-module <module>=<file>({0}<file>)*\n                      \u8986\u5BEB\u6216\u52A0\u5F37\u542B\u6709 JAR \u6A94\u6848\u6216\u76EE\u9304\u4E2D\n                      \u985E\u5225\u548C\u8CC7\u6E90\u7684\u6A21\u7D44\u3002\n    --disable-@files  \u505C\u7528\u9032\u4E00\u6B65\u7684\u5F15\u6578\u6A94\u6848\u64F4\u5145\n\n\u4E0A\u8FF0\u7684\u984D\u5916\u9078\u9805\u82E5\u6709\u8B8A\u66F4\u4E0D\u53E6\u884C\u901A\u77E5\u3002\n
+java.launcher.X.usage=\n    -Xbatch           \u505C\u7528\u80CC\u666F\u7DE8\u8B6F\n    -Xbootclasspath/a:<\u4EE5 {0} \u5340\u9694\u7684\u76EE\u9304\u548C zip/jar \u6A94\u6848>\n                      \u9644\u52A0\u81F3\u555F\u52D5\u5B89\u88DD\u985E\u5225\u8DEF\u5F91\u7684\u7D50\u5C3E\n    -Xcheck:jni       \u57F7\u884C\u984D\u5916\u7684 JNI \u51FD\u6578\u6AA2\u67E5\n    -Xcomp            \u5F37\u5236\u7DE8\u8B6F\u7B2C\u4E00\u500B\u547C\u53EB\u7684\u65B9\u6CD5\n    -Xdebug           \u91DD\u5C0D\u56DE\u6EAF\u76F8\u5BB9\u6027\u63D0\u4F9B\n    -Xdiag            \u986F\u793A\u984D\u5916\u7684\u8A3A\u65B7\u8A0A\u606F\n    -Xfuture          \u555F\u7528\u6700\u56B4\u683C\u7684\u6AA2\u67E5\uFF0C\u9810\u5148\u4F5C\u70BA\u5C07\u4F86\u7684\u9810\u8A2D\n    -Xint             \u50C5\u9650\u89E3\u8B6F\u6A21\u5F0F\u57F7\u884C\n    -Xinternalversion\n                      \u986F\u793A\u6BD4 -version \u9078\u9805\u66F4\u70BA\u8A73\u7D30\u7684\n                      JVM \u7248\u672C\u8CC7\u8A0A\n    -Xloggc:<file>    \u9023\u540C\u6642\u6233\u5C07 GC \u72C0\u614B\u8A18\u9304\u81F3\u6A94\u6848\n    -Xmixed           \u6DF7\u5408\u6A21\u5F0F\u57F7\u884C (\u9810\u8A2D)\n    -Xmn<size>        \u8A2D\u5B9A\u65B0\u751F\u4EE3 (\u990A\u6210\u5340) \u4E4B\u5806\u96C6\u7684\u8D77\u59CB\u5927\u5C0F\u548C\n                      \u5927\u5C0F\u4E0A\u9650 (\u4F4D\u5143\u7D44)\n    -Xms<size>        \u8A2D\u5B9A\u8D77\u59CB Java \u5806\u96C6\u5927\u5C0F\n    -Xmx<size>        \u8A2D\u5B9A Java \u5806\u96C6\u5927\u5C0F\u4E0A\u9650\n    -Xnoclassgc       \u505C\u7528\u985E\u5225\u8CC7\u6E90\u56DE\u6536\n    -Xrs              \u6E1B\u5C11 Java/VM \u4F7F\u7528\u7684\u4F5C\u696D\u7CFB\u7D71\u4FE1\u865F (\u8ACB\u53C3\u95B1\u6587\u4EF6)\n    -Xshare:auto      \u5728\u53EF\u80FD\u7684\u60C5\u6CC1\u4E0B\u4F7F\u7528\u5171\u7528\u985E\u5225\u8CC7\u6599 (\u9810\u8A2D)\n    -Xshare:off       \u4E0D\u5617\u8A66\u4F7F\u7528\u5171\u7528\u985E\u5225\u8CC7\u6599\n    -Xshare:on        \u9700\u8981\u4F7F\u7528\u5171\u7528\u985E\u5225\u8CC7\u6599\uFF0C\u5426\u5247\u6703\u5931\u6557\u3002\n    -XshowSettings    \u986F\u793A\u6240\u6709\u8A2D\u5B9A\u503C\u4E26\u7E7C\u7E8C\u9032\u884C\u4F5C\u696D\n    -XshowSettings:all\n                      \u986F\u793A\u6240\u6709\u8A2D\u5B9A\u503C\u4E26\u7E7C\u7E8C\u9032\u884C\u4F5C\u696D\n    -XshowSettings:locale\n                      \u986F\u793A\u6240\u6709\u5730\u5340\u8A2D\u5B9A\u76F8\u95DC\u8A2D\u5B9A\u503C\u4E26\u7E7C\u7E8C\u9032\u884C\u4F5C\u696D\n    -XshowSettings:properties\n                      \u986F\u793A\u6240\u6709\u5C6C\u6027\u8A2D\u5B9A\u503C\u4E26\u7E7C\u7E8C\u9032\u884C\u4F5C\u696D\n    -XshowSettings:vm \u986F\u793A\u6240\u6709 VM \u76F8\u95DC\u8A2D\u5B9A\u503C\u4E26\u7E7C\u7E8C\u9032\u884C\u4F5C\u696D\n    -Xss<size>        \u8A2D\u5B9A Java \u57F7\u884C\u7DD2\u5806\u758A\u5927\u5C0F\n    -Xverify          \u8A2D\u5B9A Bytecode \u9A57\u8B49\u7A0B\u5F0F\u7684\u6A21\u5F0F\n    --add-reads <module>=<target-module>(,<target-module>)*\n                      \u66F4\u65B0 <module> \u4EE5\u8B80\u53D6 <target-module>\uFF0C\u4E0D\u8AD6\n                      \u6A21\u7D44\u5BA3\u544A\u70BA\u4F55\u3002 \n                      \u53EF\u5C07 <target-module> \u8A2D\u70BA ALL-UNNAMED \u4EE5\u8B80\u53D6\u6240\u6709\u672A\u547D\u540D\u7684\n                      \u6A21\u7D44\u3002\n    --add-exports <module>/<package>=<target-module>(,<target-module>)*\n                      \u66F4\u65B0 <module> \u4EE5\u4FBF\u5C07 <package> \u532F\u51FA\u81F3 <target-module>\uFF0C\n                      \u4E0D\u8AD6\u6A21\u7D44\u5BA3\u544A\u70BA\u4F55\u3002\n                      \u53EF\u5C07 <target-module> \u8A2D\u70BA ALL-UNNAMED \u4EE5\u532F\u51FA\u81F3\u6240\u6709\n                      \u672A\u547D\u540D\u7684\u6A21\u7D44\u3002\n    --add-opens <module>/<package>=<target-module>(,<target-module>)*\n                      \u66F4\u65B0 <module> \u4EE5\u4FBF\u5C07 <package> \u958B\u555F\u81F3\n                      \
+<target-module>\uFF0C\u4E0D\u8AD6\u6A21\u7D44\u5BA3\u544A\u70BA\u4F55\u3002\n    --illegal-access=<value>\n                      \u5141\u8A31\u6216\u62D2\u7D55\u672A\u547D\u540D\u6A21\u7D44\u4E2D\u7684\u7A0B\u5F0F\u78BC\u5C0D\u5DF2\u547D\u540D\u6A21\u7D44\u4E2D\u7684\n                      \u985E\u578B\u6210\u54E1\u9032\u884C\u5B58\u53D6\u3002\n                      <value> \u70BA "deny"\u3001"permit"\u3001"warn" \u6216 "debug" \u5176\u4E2D\u4E4B\u4E00\n                      \u6B64\u9078\u9805\u5C07\u5728\u672A\u4F86\u7248\u672C\u4E2D\u79FB\u9664\u3002\n    --limit-modules <module name>[,<module name>...]\n                      \u9650\u5236\u53EF\u76E3\u6E2C\u6A21\u7D44\u7684\u7BC4\u570D\n    --patch-module <module>=<file>({0}<file>)*\n                      \u8986\u5BEB\u6216\u52A0\u5F37\u542B\u6709 JAR \u6A94\u6848\u6216\u76EE\u9304\u4E2D\n                      \u985E\u5225\u548C\u8CC7\u6E90\u7684\u6A21\u7D44\u3002\n    --disable-@files  \u505C\u7528\u9032\u4E00\u6B65\u7684\u5F15\u6578\u6A94\u6848\u64F4\u5145\n\n\u4E0A\u8FF0\u7684\u984D\u5916\u9078\u9805\u82E5\u6709\u8B8A\u66F4\u4E0D\u53E6\u884C\u901A\u77E5\u3002\n
 
 # Translators please note do not translate the options themselves
 java.launcher.X.macosx.usage=\n\u4E0B\u5217\u662F Mac OS X \u7279\u5B9A\u9078\u9805:\n    -XstartOnFirstThread\n                      \u5728\u7B2C\u4E00\u500B (AppKit) \u57F7\u884C\u7DD2\u57F7\u884C main() \u65B9\u6CD5\n    -Xdock:name=<application name>\n                      \u8986\u5BEB\u7D50\u5408\u8AAA\u660E\u756B\u9762\u4E2D\u986F\u793A\u7684\u9810\u8A2D\u61C9\u7528\u7A0B\u5F0F\u540D\u7A31\n    -Xdock:icon=<path to icon file>\n                      \u8986\u5BEB\u7D50\u5408\u8AAA\u660E\u756B\u9762\u4E2D\u986F\u793A\u7684\u9810\u8A2D\u5716\u793A\n\n
@@ -47,6 +46,7 @@
 java.launcher.cls.error4=\u932F\u8AA4: \u5728\u985E\u5225 {0} \u4E2D\u627E\u4E0D\u5230\u4E3B\u8981\u65B9\u6CD5\uFF0C\u8ACB\u5B9A\u7FA9\u4E3B\u8981\u65B9\u6CD5\u70BA:\n   public static void main(String[] args)\n\u6216\u8005 JavaFX \u61C9\u7528\u7A0B\u5F0F\u985E\u5225\u5FC5\u9808\u64F4\u5145 {1}
 java.launcher.cls.error5=\u932F\u8AA4: \u907A\u6F0F\u57F7\u884C\u6B64\u61C9\u7528\u7A0B\u5F0F\u6240\u9700\u7684 JavaFX \u7A0B\u5F0F\u5BE6\u969B\u57F7\u884C\u5143\u4EF6
 java.launcher.cls.error6=\u932F\u8AA4: \u8F09\u5165\u4E3B\u8981\u985E\u5225 {0} \u6642\u767C\u751F LinkageError\n\t{1}
+java.launcher.cls.error7=\u932F\u8AA4: \u7121\u6CD5\u8D77\u59CB\u4E3B\u8981\u985E\u5225 {0}\n\u539F\u56E0: {1}: {2}
 java.launcher.jar.error1=\u932F\u8AA4: \u5617\u8A66\u958B\u555F\u6A94\u6848 {0} \u6642\u767C\u751F\u672A\u9810\u671F\u7684\u932F\u8AA4
 java.launcher.jar.error2=\u5728 {0} \u4E2D\u627E\u4E0D\u5230\u8CC7\u8A0A\u6E05\u55AE
 java.launcher.jar.error3={0} \u4E2D\u6C92\u6709\u4E3B\u8981\u8CC7\u8A0A\u6E05\u55AE\u5C6C\u6027
@@ -55,5 +55,6 @@
 java.launcher.javafx.error1=\u932F\u8AA4: JavaFX launchApplication \u65B9\u6CD5\u7684\u7C3D\u7AE0\u932F\u8AA4\uFF0C\u5B83\n\u5FC5\u9808\u5BA3\u544A\u70BA\u975C\u614B\u4E26\u50B3\u56DE void \u985E\u578B\u7684\u503C
 java.launcher.module.error1=\u6A21\u7D44 {0} \u4E0D\u542B MainClass \u5C6C\u6027\uFF0C\u8ACB\u4F7F\u7528 -m <module>/<main-class>
 java.launcher.module.error2=\u932F\u8AA4: \u627E\u4E0D\u5230\u6216\u7121\u6CD5\u8F09\u5165\u6A21\u7D44 {1} \u4E2D\u7684\u4E3B\u8981\u985E\u5225 {0}
-java.launcher.module.error3=\u932F\u8AA4: \u7121\u6CD5\u5F9E\u6A21\u7D44 {1} \u8F09\u5165\u4E3B\u8981\u985E\u5225 {0}\n\t{2}
+java.launcher.module.error3=\u932F\u8AA4: \u7121\u6CD5\u8F09\u5165\u6A21\u7D44 {1} \u4E2D\u7684\u4E3B\u8981\u985E\u5225 {0}\n\t{2}
 java.launcher.module.error4=\u627E\u4E0D\u5230 {0}
+java.launcher.module.error5=\u932F\u8AA4: \u7121\u6CD5\u8D77\u59CB\u6A21\u7D44 {1} \u4E2D\u7684\u4E3B\u8981\u985E\u5225 {0}\n\u539F\u56E0: {1}: {2}
--- a/src/java.base/share/classes/sun/security/rsa/RSAPublicKeyImpl.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.base/share/classes/sun/security/rsa/RSAPublicKeyImpl.java	Tue Jan 30 16:41:40 2018 +0100
@@ -48,6 +48,7 @@
 public final class RSAPublicKeyImpl extends X509Key implements RSAPublicKey {
 
     private static final long serialVersionUID = 2644735423591199609L;
+    private static final BigInteger THREE = BigInteger.valueOf(3);
 
     private BigInteger n;       // modulus
     private BigInteger e;       // public exponent
@@ -61,6 +62,7 @@
         this.n = n;
         this.e = e;
         RSAKeyFactory.checkRSAProviderKeyLengths(n.bitLength(), e);
+        checkExponentRange();
         // generate the encoding
         algid = RSAPrivateCrtKeyImpl.rsaId;
         try {
@@ -83,6 +85,19 @@
     public RSAPublicKeyImpl(byte[] encoded) throws InvalidKeyException {
         decode(encoded);
         RSAKeyFactory.checkRSAProviderKeyLengths(n.bitLength(), e);
+        checkExponentRange();
+    }
+
+    private void checkExponentRange() throws InvalidKeyException {
+        // the exponent should be smaller than the modulus
+        if (e.compareTo(n) >= 0) {
+            throw new InvalidKeyException("exponent is larger than modulus");
+        }
+
+        // the exponent should be at least 3
+        if (e.compareTo(THREE) < 0) {
+            throw new InvalidKeyException("exponent is smaller than 3");
+        }
     }
 
     // see JCA doc
--- a/src/java.base/share/classes/sun/security/tools/keytool/Main.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.base/share/classes/sun/security/tools/keytool/Main.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -523,9 +523,11 @@
 
             if (c != null) {
                 command = c;
-            } else if (collator.compare(flags, "-help") == 0 ||
-                    collator.compare(flags, "-h") == 0 ||
-                    collator.compare(flags, "-?") == 0) {
+            } else if (collator.compare(flags, "--help") == 0 ||
+                       collator.compare(flags, "-h") == 0 ||
+                       collator.compare(flags, "-?") == 0 ||
+                       // -help: legacy.
+                       collator.compare(flags, "-help") == 0) {
                 help = true;
             } else if (collator.compare(flags, "-conf") == 0) {
                 i++;
@@ -1804,8 +1806,7 @@
             } else if ("RSA".equalsIgnoreCase(keyAlgName)) {
                 keysize = SecurityProviderConstants.DEF_RSA_KEY_SIZE;
             } else if ("DSA".equalsIgnoreCase(keyAlgName)) {
-                // hardcode for now as DEF_DSA_KEY_SIZE is still 1024
-                keysize = 2048; // SecurityProviderConstants.DEF_DSA_KEY_SIZE;
+                keysize = SecurityProviderConstants.DEF_DSA_KEY_SIZE;
             }
         }
 
@@ -4610,6 +4611,8 @@
             }
             System.err.println();
             System.err.println(rb.getString(
+                    "Use.keytool.help.for.all.available.commands"));
+            System.err.println(rb.getString(
                     "Use.keytool.command.name.help.for.usage.of.command.name"));
         }
     }
--- a/src/java.base/share/classes/sun/security/tools/keytool/Resources.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.base/share/classes/sun/security/tools/keytool/Resources.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -45,12 +45,12 @@
         {"option.1.set.twice", "The %s option is specified multiple times. All except the last one will be ignored."},
         {"multiple.commands.1.2", "Only one command is allowed: both %1$s and %2$s were specified."},
         {"Use.keytool.help.for.all.available.commands",
-                 "Use \"keytool -help\" for all available commands"},
+                 "Use \"keytool -?, -h, or --help\" for this help message"},
         {"Key.and.Certificate.Management.Tool",
                  "Key and Certificate Management Tool"},
         {"Commands.", "Commands:"},
         {"Use.keytool.command.name.help.for.usage.of.command.name",
-                "Use \"keytool -command_name -help\" for usage of command_name.\n" +
+                "Use \"keytool -command_name --help\" for usage of command_name.\n" +
                 "Use the -conf <url> option to specify a pre-configured options file."},
         // keytool: help: commands
         {"Generates.a.certificate.request",
@@ -462,7 +462,7 @@
         {"with.weak", "%s (weak)"},
         {"key.bit", "%1$d-bit %2$s key"},
         {"key.bit.weak", "%1$d-bit %2$s key (weak)"},
-        {"unknown.size.1", "unknown size %s key"},
+        {"unknown.size.1", "%s key of unknown size"},
         {".PATTERN.printX509Cert.with.weak",
                 "Owner: {0}\nIssuer: {1}\nSerial number: {2}\nValid from: {3} until: {4}\nCertificate fingerprints:\n\t SHA1: {5}\n\t SHA256: {6}\nSignature algorithm name: {7}\nSubject Public Key Algorithm: {8}\nVersion: {9}"},
         {"PKCS.10.with.weak",
--- a/src/java.base/share/classes/sun/security/tools/keytool/Resources_de.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.base/share/classes/sun/security/tools/keytool/Resources_de.java	Tue Jan 30 16:41:40 2018 +0100
@@ -42,6 +42,8 @@
         // keytool: Help part
         {".OPTION.", " [OPTION]..."},
         {"Options.", "Optionen:"},
+        {"option.1.set.twice", "Die Option %s wurde mehrmals angegeben. Alle Angaben bis auf die letzte werden ignoriert."},
+        {"multiple.commands.1.2", "Nur ein Befehl ist zul\u00E4ssig: Sowohl %1$s als auch %2$s wurden angegeben."},
         {"Use.keytool.help.for.all.available.commands",
                  "\"keytool -help\" f\u00FCr alle verf\u00FCgbaren Befehle verwenden"},
         {"Key.and.Certificate.Management.Tool",
@@ -447,19 +449,24 @@
         {"the.tsa.certificate", "Das TSA-Zertifikat"},
         {"the.input", "Die Eingabe"},
         {"reply", "Antwort"},
-        {"one.in.many", "%s #%d von %d"},
+        {"one.in.many", "%1$s #%2$d von %3$d"},
         {"alias.in.cacerts", "Aussteller <%s> in cacerts"},
         {"alias.in.keystore", "Aussteller <%s>"},
         {"with.weak", "%s (schwach)"},
-        {"key.bit", "%d-Bit-%s-Schl\u00FCssel"},
-        {"key.bit.weak", "%d-Bit-%s-Schl\u00FCssel (schwach)"},
+        {"key.bit", "%1$d-Bit-%2$s-Schl\u00FCssel"},
+        {"key.bit.weak", "%1$d-Bit-%2$s-Schl\u00FCssel (schwach)"},
+        {"unknown.size.1", "unbekannte Gr\u00F6\u00DFe: %s-Schl\u00FCssel"},
         {".PATTERN.printX509Cert.with.weak",
                 "Eigent\u00FCmer: {0}\nAussteller: {1}\nSeriennummer: {2}\nG\u00FCltig von: {3} bis: {4}\nZertifikatsfingerprints:\n\t SHA1: {5}\n\t SHA256: {6}\nSignaturalgorithmusname: {7}\nPublic Key-Algorithmus von Subject: {8}\nVersion: {9}"},
         {"PKCS.10.with.weak",
-                "PKCS #10-Zertifikatsanforderung (Version 1.0)\nSubject: %s\nFormat: %s\nPublic Key: %s\nSignaturalgorithmus: %s\n"},
-        {"verified.by.s.in.s.weak", "Von %s in %s mit %s verifiziert"},
-        {"whose.sigalg.risk", "%s verwendet den Signaturalgorithmus %s. Dies gilt als Sicherheitsrisiko."},
-        {"whose.key.risk", "%s verwendet %s. Dies gilt als Sicherheitsrisiko."},
+                "PKCS #10-Zertifikatsanforderung (Version 1.0)\nSubject: %1$s\nFormat: %2$s\nPublic Key: %3$s\nSignaturalgorithmus: %4$s\n"},
+        {"verified.by.s.in.s.weak", "Von %1$s in %2$s mit %3$s verifiziert"},
+        {"whose.sigalg.risk", "%1$s verwendet den Signaturalgorithmus %2$s. Dies gilt als Sicherheitsrisiko."},
+        {"whose.key.risk", "%1$s verwendet %2$s. Dies gilt als Sicherheitsrisiko."},
+        {"jks.storetype.warning", "Der %1$s-Keystore verwendet ein propriet\u00E4res Format. Es wird empfohlen, auf PKCS12 zu migrieren, das ein Industriestandardformat mit \"keytool -importkeystore -srckeystore %2$s -destkeystore %2$s -deststoretype pkcs12\" ist."},
+        {"migrate.keystore.warning", "\"%1$s\" zu %4$s migriert. Der %2$s-Keystore wurde als \"%3$s\" gesichert."},
+        {"backup.keystore.warning", "Der urspr\u00FCngliche Keystore \"%1$s\" wird als \"%3$s\" gesichert..."},
+        {"importing.keystore.status", "Keystore %1$s wird in %2$s importiert..."},
     };
 
 
--- a/src/java.base/share/classes/sun/security/tools/keytool/Resources_es.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.base/share/classes/sun/security/tools/keytool/Resources_es.java	Tue Jan 30 16:41:40 2018 +0100
@@ -42,6 +42,8 @@
         // keytool: Help part
         {".OPTION.", " [OPTION]..."},
         {"Options.", "Opciones:"},
+        {"option.1.set.twice", "La opci\u00F3n %s se\u00A0ha especificado\u00A0varias veces. Se ignorar\u00E1n todas excepto la \u00FAltima."},
+        {"multiple.commands.1.2", "Solo se permite un comando: se ha especificado tanto %1$s como %2$s"},
         {"Use.keytool.help.for.all.available.commands",
                  "Utilice\"keytool -help\" para todos los comandos disponibles"},
         {"Key.and.Certificate.Management.Tool",
@@ -447,19 +449,24 @@
         {"the.tsa.certificate", "El certificado de TSA"},
         {"the.input", "La entrada"},
         {"reply", "Responder"},
-        {"one.in.many", "%s #%d de %d"},
+        {"one.in.many", "%1$s #%2$d de %3$d"},
         {"alias.in.cacerts", "Emisor <%s> en cacerts"},
         {"alias.in.keystore", "Emisor <%s>"},
         {"with.weak", "%s (d\u00E9bil)"},
-        {"key.bit", "Clave %s de %d bits"},
-        {"key.bit.weak", "Clave %s de %d bits (d\u00E9bil)"},
+        {"key.bit", "Clave %2$s de %1$d bits"},
+        {"key.bit.weak", "Clave %2$s de %1$d bits (d\u00E9bil)"},
+        {"unknown.size.1", "clave %s de tama\u00F1o desconocido"},
         {".PATTERN.printX509Cert.with.weak",
                 "Propietario: {0}\nEmisor: {1}\nN\u00FAmero de serie: {2}\nV\u00E1lido desde: {3} hasta: {4}\nHuellas digitales del certificado:\n\t SHA1: {5}\n\t SHA256: {6}\nNombre del algoritmo de firma: {7}\nAlgoritmo de clave p\u00FAblica de asunto: {8}\nVersi\u00F3n: {9}"},
         {"PKCS.10.with.weak",
-                "Solicitud de certificado PKCS #10 (Versi\u00F3n 1.0)\nAsunto: %s\nFormato: %s\nClave p\u00FAblica:%s\nAlgoritmo de firma: %s\n"},
-        {"verified.by.s.in.s.weak", "Verificado por %s en %s con %s"},
-        {"whose.sigalg.risk", "%s usa el algoritmo de firma %s, lo que se considera un riesgo de seguridad."},
-        {"whose.key.risk", "%s usa %s, lo que se considera un riesgo de seguridad."},
+                "Solicitud de certificado PKCS #10 (Versi\u00F3n 1.0)\nAsunto: %1$s\nFormato: %2$s\nClave p\u00FAblica: %3$s\nAlgoritmo de firma: %4$s\n"},
+        {"verified.by.s.in.s.weak", "Verificado por %1$s en %2$s con %3$s"},
+        {"whose.sigalg.risk", "%1$s utiliza el algoritmo de firma %2$s, lo que se considera un riesgo de seguridad."},
+        {"whose.key.risk", "%1$s utiliza %2$s, lo que se considera riesgo de seguridad."},
+        {"jks.storetype.warning", "El almac\u00E9n de claves %1$s utiliza un formato propietario. Se recomienda migrar a PKCS12, que es un formato est\u00E1ndar del sector que utiliza \"keytool -importkeystore -srckeystore %2$s -destkeystore %2$s -deststoretype pkcs12\"."},
+        {"migrate.keystore.warning", "Se ha migrado \"%1$s\" a %4$s. Se ha realizado la copia de seguridad del almac\u00E9n de claves %2$s como \"%3$s\"."},
+        {"backup.keystore.warning", "La copia de seguridad del almac\u00E9n de claves \"%1$s\" se ha realizado como \"%3$s\"..."},
+        {"importing.keystore.status", "Importando el almac\u00E9n de claves de %1$s a %2$s..."},
     };
 
 
--- a/src/java.base/share/classes/sun/security/tools/keytool/Resources_fr.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.base/share/classes/sun/security/tools/keytool/Resources_fr.java	Tue Jan 30 16:41:40 2018 +0100
@@ -42,6 +42,8 @@
         // keytool: Help part
         {".OPTION.", " [OPTION]..."},
         {"Options.", "Options :"},
+        {"option.1.set.twice", "L'option %s est sp\u00E9cifi\u00E9e plusieurs fois. Toutes les occurrences seront ignor\u00E9es, sauf la derni\u00E8re."},
+        {"multiple.commands.1.2", "Une seule commande est autoris\u00E9e : %1$s et %2$s ont \u00E9t\u00E9 sp\u00E9cifi\u00E9es."},
         {"Use.keytool.help.for.all.available.commands",
                  "Utiliser \"keytool -help\" pour toutes les commandes disponibles"},
         {"Key.and.Certificate.Management.Tool",
@@ -447,19 +449,24 @@
         {"the.tsa.certificate", "Certificat TSA"},
         {"the.input", "Entr\u00E9e"},
         {"reply", "R\u00E9pondre"},
-        {"one.in.many", "%s #%d sur %d"},
+        {"one.in.many", "%1$s #%2$d sur %3$d"},
         {"alias.in.cacerts", "Emetteur <%s> dans les certificats CA"},
         {"alias.in.keystore", "Emetteur <%s>"},
         {"with.weak", "%s (faible)"},
-        {"key.bit", "Cl\u00E9 %s %d bits"},
-        {"key.bit.weak", "Cl\u00E9 %s %d bits (faible)"},
+        {"key.bit", "Cl\u00E9 %2$s %1$d bits"},
+        {"key.bit.weak", "Cl\u00E9 %2$s %1$d bits (faible)"},
+        {"unknown.size.1", "taille de cl\u00E9 %s inconnue"},
         {".PATTERN.printX509Cert.with.weak",
                 "Propri\u00E9taire : {0}\nEmetteur : {1}\nNum\u00E9ro de s\u00E9rie : {2}\nValide du {3} au {4}\nEmpreintes du certificat :\n\t SHA 1: {5}\n\t SHA 256: {6}\nNom de l''algorithme de signature : {7}\nAlgorithme de cl\u00E9 publique du sujet : {8}\nVersion : {9}"},
         {"PKCS.10.with.weak",
-                "Demande de certificat PKCS #10 (version 1.0)\nSujet : %s\nFormat : %s\nCl\u00E9 publique : %s\nAlgorithme de signature : %s\n"},
-        {"verified.by.s.in.s.weak", "V\u00E9rifi\u00E9 par %s dans %s avec un \u00E9l\u00E9ment %s"},
-        {"whose.sigalg.risk", "%s utilise l'algorithme de signature %s, qui repr\u00E9sente un risque pour la s\u00E9curit\u00E9."},
-        {"whose.key.risk", "%s utilise un \u00E9l\u00E9ment %s, qui repr\u00E9sente un risque pour la s\u00E9curit\u00E9."},
+                "Demande de certificat PKCS #10 (version 1.0)\nSujet : %1$s\nFormat : %2$s\nCl\u00E9 publique : %3$s\nAlgorithme de signature : %4$s\n"},
+        {"verified.by.s.in.s.weak", "V\u00E9rifi\u00E9 par %1$s dans %2$s avec un \u00E9l\u00E9ment %3$s"},
+        {"whose.sigalg.risk", "%1$s utilise l'algorithme de signature %2$s, qui repr\u00E9sente un risque pour la s\u00E9curit\u00E9."},
+        {"whose.key.risk", "%1$s utilise un \u00E9l\u00E9ment %2$s, qui repr\u00E9sente un risque pour la s\u00E9curit\u00E9."},
+        {"jks.storetype.warning", "Le fichier de cl\u00E9s %1$s utilise un format propri\u00E9taire. Il est recommand\u00E9 de migrer vers PKCS12, qui est un format standard de l'industrie en utilisant \"keytool -importkeystore -srckeystore %2$s -destkeystore %2$s -deststoretype pkcs12\"."},
+        {"migrate.keystore.warning", "El\u00E9ment \"%1$s\" migr\u00E9 vers %4$s. Le fichier de cl\u00E9s %2$s est sauvegard\u00E9 en tant que \"%3$s\"."},
+        {"backup.keystore.warning", "Le fichier de cl\u00E9s d'origine \"%1$s\" est sauvegard\u00E9 en tant que \"%3$s\"..."},
+        {"importing.keystore.status", "Import du fichier de cl\u00E9s %1$s vers %2$s..."},
     };
 
 
--- a/src/java.base/share/classes/sun/security/tools/keytool/Resources_it.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.base/share/classes/sun/security/tools/keytool/Resources_it.java	Tue Jan 30 16:41:40 2018 +0100
@@ -42,6 +42,8 @@
         // keytool: Help part
         {".OPTION.", " [OPTION]..."},
         {"Options.", "Opzioni:"},
+        {"option.1.set.twice", "L'opzione %s \u00E8 specificata pi\u00F9 volte. Tutte le ricorrenze verranno ignorate tranne l'ultima."},
+        {"multiple.commands.1.2", "\u00C8 consentito un solo comando: \u00E8 stato specificato sia %1$s che %2$s."},
         {"Use.keytool.help.for.all.available.commands",
                  "Utilizzare \"keytool -help\" per visualizzare tutti i comandi disponibili"},
         {"Key.and.Certificate.Management.Tool",
@@ -447,19 +449,24 @@
         {"the.tsa.certificate", "Il certificato TSA"},
         {"the.input", "L'input"},
         {"reply", "Rispondi"},
-        {"one.in.many", "%s #%d di %d"},
+        {"one.in.many", "%1$s #%2$d di %3$d"},
         {"alias.in.cacerts", "Emittente <%s> in cacerts"},
         {"alias.in.keystore", "Emittente <%s>"},
         {"with.weak", "%s (debole)"},
-        {"key.bit", "Chiave %s a %d bit"},
-        {"key.bit.weak", "Chiave %s a %d bit (debole)"},
+        {"key.bit", "Chiave %2$s a %1$d bit"},
+        {"key.bit.weak", "Chiave %2$s a %1$d bit (debole)"},
+        {"unknown.size.1", "chiave %s di dimensione sconosciuta"},
         {".PATTERN.printX509Cert.with.weak",
                 "Proprietario: {0}\nEmittente: {1}\nNumero di serie: {2}\nValido da: {3} a: {4}\nImpronte digitali certificato:\n\t SHA1: {5}\n\t SHA256: {6}\nNome algoritmo firma: {7}\nAlgoritmo di chiave pubblica oggetto: {8}\nVersione: {9}"},
         {"PKCS.10.with.weak",
-                "Richiesta di certificato PKCS #10 (versione 1.0)\nOggetto: %s\nFormato: %s\nChiave pubblica: %s\nAlgoritmo firma: %s\n"},
-        {"verified.by.s.in.s.weak", "Verificato da %s in %s con un %s"},
-        {"whose.sigalg.risk", "%s utilizza l'algoritmo firma %s che \u00E8 considerato un rischio per la sicurezza."},
-        {"whose.key.risk", "%s utilizza un %s che \u00E8 considerato un rischio per la sicurezza."},
+                "Richiesta di certificato PKCS #10 (versione 1.0)\nOggetto: %1$s\nFormato: %2$s\nChiave pubblica: %3$s\nAlgoritmo firma: %4$s\n"},
+        {"verified.by.s.in.s.weak", "Verificato da %1$s in %2$s con un %3$s"},
+        {"whose.sigalg.risk", "%1$s utilizza l'algoritmo firma %2$s che \u00E8 considerato un rischio per la sicurezza."},
+        {"whose.key.risk", "%1$s utilizza un %2$s che \u00E8 considerato un rischio per la sicurezza."},
+        {"jks.storetype.warning", "Il keystore %1$s utilizza un formato proprietario. Si consiglia di eseguire la migrazione a PKCS12, un formato standard di settore, utilizzando il comando \"keytool -importkeystore -srckeystore %2$s -destkeystore %2$s -deststoretype pkcs12\"."},
+        {"migrate.keystore.warning", "Migrazione di \"%1$s\" in %4$s eseguita. Backup del keystore %2$s eseguito con il nome \"%3$s\"."},
+        {"backup.keystore.warning", "Backup del keystore originale \"%1$s\" eseguito con il nome \"%3$s\"..."},
+        {"importing.keystore.status", "Importazione del keystore %1$s in %2$s in corso..."},
     };
 
 
--- a/src/java.base/share/classes/sun/security/tools/keytool/Resources_ja.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.base/share/classes/sun/security/tools/keytool/Resources_ja.java	Tue Jan 30 16:41:40 2018 +0100
@@ -42,6 +42,8 @@
         // keytool: Help part
         {".OPTION.", " [OPTION]..."},
         {"Options.", "\u30AA\u30D7\u30B7\u30E7\u30F3:"},
+        {"option.1.set.twice", "%s\u30AA\u30D7\u30B7\u30E7\u30F3\u304C\u8907\u6570\u56DE\u6307\u5B9A\u3055\u308C\u3066\u3044\u307E\u3059\u3002\u6700\u5F8C\u306E\u3082\u306E\u4EE5\u5916\u306F\u3059\u3079\u3066\u7121\u8996\u3055\u308C\u307E\u3059\u3002"},
+        {"multiple.commands.1.2", "1\u3064\u306E\u30B3\u30DE\u30F3\u30C9\u306E\u307F\u8A31\u53EF\u3055\u308C\u307E\u3059: %1$s\u3068%2$s\u306E\u4E21\u65B9\u304C\u6307\u5B9A\u3055\u308C\u307E\u3057\u305F\u3002"},
         {"Use.keytool.help.for.all.available.commands",
                  "\u4F7F\u7528\u53EF\u80FD\u306A\u3059\u3079\u3066\u306E\u30B3\u30DE\u30F3\u30C9\u306B\u3064\u3044\u3066\u306F\"keytool -help\"\u3092\u4F7F\u7528\u3057\u3066\u304F\u3060\u3055\u3044"},
         {"Key.and.Certificate.Management.Tool",
@@ -371,7 +373,7 @@
                 "\u3053\u306E\u5358\u4F4D\u306B\u8A72\u5F53\u3059\u308B2\u6587\u5B57\u306E\u56FD\u30B3\u30FC\u30C9\u306F\u4F55\u3067\u3059\u304B\u3002"},
         {"Is.name.correct.", "{0}\u3067\u3088\u308D\u3057\u3044\u3067\u3059\u304B\u3002"},
         {"no", "\u3044\u3044\u3048"},
-        {"yes", "yes"},
+        {"yes", "\u306F\u3044"},
         {"y", "y"},
         {".defaultValue.", "  [{0}]:  "},
         {"Alias.alias.has.no.key",
@@ -447,19 +449,24 @@
         {"the.tsa.certificate", "TSA\u8A3C\u660E\u66F8"},
         {"the.input", "\u5165\u529B"},
         {"reply", "\u5FDC\u7B54"},
-        {"one.in.many", "%s #%d / %d"},
+        {"one.in.many", "%1$s #%2$d / %3$d"},
         {"alias.in.cacerts", "cacerts\u5185\u306E\u767A\u884C\u8005<%s>"},
         {"alias.in.keystore", "\u767A\u884C\u8005<%s>"},
         {"with.weak", "%s (\u5F31)"},
-        {"key.bit", "%d\u30D3\u30C3\u30C8%s\u9375"},
-        {"key.bit.weak", "%d\u30D3\u30C3\u30C8%s\u9375(\u5F31)"},
+        {"key.bit", "%1$d\u30D3\u30C3\u30C8%2$s\u9375"},
+        {"key.bit.weak", "%1$d\u30D3\u30C3\u30C8%2$s\u9375(\u5F31)"},
+        {"unknown.size.1", "\u4E0D\u660E\u30B5\u30A4\u30BA\u306E%s\u9375"},
         {".PATTERN.printX509Cert.with.weak",
                 "\u6240\u6709\u8005: {0}\n\u767A\u884C\u8005: {1}\n\u30B7\u30EA\u30A2\u30EB\u756A\u53F7: {2}\n\u6709\u52B9\u671F\u9593\u306E\u958B\u59CB\u65E5: {3}\u7D42\u4E86\u65E5: {4}\n\u8A3C\u660E\u66F8\u306E\u30D5\u30A3\u30F3\u30AC\u30D7\u30EA\u30F3\u30C8:\n\t SHA1: {5}\n\t SHA256: {6}\n\u7F72\u540D\u30A2\u30EB\u30B4\u30EA\u30BA\u30E0\u540D: {7}\n\u30B5\u30D6\u30B8\u30A7\u30AF\u30C8\u516C\u958B\u9375\u30A2\u30EB\u30B4\u30EA\u30BA\u30E0: {8}\n\u30D0\u30FC\u30B8\u30E7\u30F3: {9}"},
         {"PKCS.10.with.weak",
-                "PKCS #10\u8A3C\u660E\u66F8\u30EA\u30AF\u30A8\u30B9\u30C8(\u30D0\u30FC\u30B8\u30E7\u30F31.0)\n\u30B5\u30D6\u30B8\u30A7\u30AF\u30C8: %s\n\u30D5\u30A9\u30FC\u30DE\u30C3\u30C8 %s\n\u516C\u958B\u9375: %s\n\u7F72\u540D\u30A2\u30EB\u30B4\u30EA\u30BA\u30E0: %s\n"},
-        {"verified.by.s.in.s.weak", "%s(%s\u5185)\u306B\u3088\u308A%s\u3067\u691C\u8A3C\u3055\u308C\u307E\u3057\u305F"},
-        {"whose.sigalg.risk", "%s\u306F\u30BB\u30AD\u30E5\u30EA\u30C6\u30A3\u30FB\u30EA\u30B9\u30AF\u3068\u307F\u306A\u3055\u308C\u308B%s\u7F72\u540D\u30A2\u30EB\u30B4\u30EA\u30BA\u30E0\u3092\u4F7F\u7528\u3057\u3066\u3044\u307E\u3059\u3002"},
-        {"whose.key.risk", "%s\u306F\u30BB\u30AD\u30E5\u30EA\u30C6\u30A3\u30FB\u30EA\u30B9\u30AF\u3068\u307F\u306A\u3055\u308C\u308B%s\u3092\u4F7F\u7528\u3057\u3066\u3044\u307E\u3059\u3002"},
+                "PKCS #10\u8A3C\u660E\u66F8\u30EA\u30AF\u30A8\u30B9\u30C8(\u30D0\u30FC\u30B8\u30E7\u30F31.0)\n\u30B5\u30D6\u30B8\u30A7\u30AF\u30C8: %1$s\n\u30D5\u30A9\u30FC\u30DE\u30C3\u30C8: %2$s\n\u516C\u958B\u9375: %3$s\n\u7F72\u540D\u30A2\u30EB\u30B4\u30EA\u30BA\u30E0: %4$s\n"},
+        {"verified.by.s.in.s.weak", "%2$s\u5185\u306E%1$s\u306B\u3088\u308A%3$s\u3067\u691C\u8A3C\u3055\u308C\u307E\u3057\u305F"},
+        {"whose.sigalg.risk", "%1$s\u306F%2$s\u7F72\u540D\u30A2\u30EB\u30B4\u30EA\u30BA\u30E0\u3092\u4F7F\u7528\u3057\u3066\u304A\u308A\u3001\u3053\u308C\u306F\u30BB\u30AD\u30E5\u30EA\u30C6\u30A3\u30FB\u30EA\u30B9\u30AF\u3068\u307F\u306A\u3055\u308C\u307E\u3059\u3002"},
+        {"whose.key.risk", "%1$s\u306F%2$s\u3092\u4F7F\u7528\u3057\u3066\u304A\u308A\u3001\u3053\u308C\u306F\u30BB\u30AD\u30E5\u30EA\u30C6\u30A3\u30FB\u30EA\u30B9\u30AF\u3068\u307F\u306A\u3055\u308C\u307E\u3059\u3002"},
+        {"jks.storetype.warning", "%1$s\u30AD\u30FC\u30B9\u30C8\u30A2\u306F\u72EC\u81EA\u306E\u5F62\u5F0F\u3092\u4F7F\u7528\u3057\u3066\u3044\u307E\u3059\u3002\"keytool -importkeystore -srckeystore %2$s -destkeystore %2$s -deststoretype pkcs12\"\u3092\u4F7F\u7528\u3059\u308B\u696D\u754C\u6A19\u6E96\u306E\u5F62\u5F0F\u3067\u3042\u308BPKCS12\u306B\u79FB\u884C\u3059\u308B\u3053\u3068\u3092\u304A\u85A6\u3081\u3057\u307E\u3059\u3002"},
+        {"migrate.keystore.warning", "\"%1$s\"\u304C%4$s\u306B\u79FB\u884C\u3055\u308C\u307E\u3057\u305F\u3002%2$s\u30AD\u30FC\u30B9\u30C8\u30A2\u306F\"%3$s\"\u3068\u3057\u3066\u30D0\u30C3\u30AF\u30A2\u30C3\u30D7\u3055\u308C\u307E\u3059\u3002"},
+        {"backup.keystore.warning", "\u5143\u306E\u30AD\u30FC\u30B9\u30C8\u30A2\"%1$s\"\u306F\"%3$s\"\u3068\u3057\u3066\u30D0\u30C3\u30AF\u30A2\u30C3\u30D7\u3055\u308C\u307E\u3059..."},
+        {"importing.keystore.status", "\u30AD\u30FC\u30B9\u30C8\u30A2%1$s\u3092%2$s\u306B\u30A4\u30F3\u30DD\u30FC\u30C8\u3057\u3066\u3044\u307E\u3059..."},
     };
 
 
--- a/src/java.base/share/classes/sun/security/tools/keytool/Resources_ko.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.base/share/classes/sun/security/tools/keytool/Resources_ko.java	Tue Jan 30 16:41:40 2018 +0100
@@ -42,6 +42,8 @@
         // keytool: Help part
         {".OPTION.", " [OPTION]..."},
         {"Options.", "\uC635\uC158:"},
+        {"option.1.set.twice", "%s \uC635\uC158\uC774 \uC5EC\uB7EC \uBC88 \uC9C0\uC815\uB418\uC5C8\uC2B5\uB2C8\uB2E4. \uB9C8\uC9C0\uB9C9 \uD56D\uBAA9\uC744 \uC81C\uC678\uD55C \uBAA8\uB4E0 \uD56D\uBAA9\uC774 \uBB34\uC2DC\uB429\uB2C8\uB2E4."},
+        {"multiple.commands.1.2", "\uBA85\uB839\uC740 \uD558\uB098\uB9CC \uD5C8\uC6A9\uB429\uB2C8\uB2E4. %1$s \uBC0F %2$s\uC774(\uAC00) \uBAA8\uB450 \uC9C0\uC815\uB418\uC5C8\uC2B5\uB2C8\uB2E4."},
         {"Use.keytool.help.for.all.available.commands",
                  "\uC0AC\uC6A9 \uAC00\uB2A5\uD55C \uBAA8\uB4E0 \uBA85\uB839\uC5D0 \"keytool -help\" \uC0AC\uC6A9"},
         {"Key.and.Certificate.Management.Tool",
@@ -325,7 +327,7 @@
                 "\uD0A4 \uC800\uC7A5\uC18C\uC5D0 {0,number,integer}\uAC1C\uC758 \uD56D\uBAA9\uC774 \uD3EC\uD568\uB418\uC5B4 \uC788\uC2B5\uB2C8\uB2E4."},
         {"Your.keystore.contains.keyStore.size.entries",
                 "\uD0A4 \uC800\uC7A5\uC18C\uC5D0 {0,number,integer}\uAC1C\uC758 \uD56D\uBAA9\uC774 \uD3EC\uD568\uB418\uC5B4 \uC788\uC2B5\uB2C8\uB2E4."},
-        {"Failed.to.parse.input", "\uC785\uB825\uAC12\uC758 \uAD6C\uBB38\uBD84\uC11D\uC744 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4."},
+        {"Failed.to.parse.input", "\uC785\uB825\uAC12\uC758 \uAD6C\uBB38 \uBD84\uC11D\uC744 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4."},
         {"Empty.input", "\uC785\uB825\uAC12\uC774 \uBE44\uC5B4 \uC788\uC2B5\uB2C8\uB2E4."},
         {"Not.X.509.certificate", "X.509 \uC778\uC99D\uC11C\uAC00 \uC544\uB2D9\uB2C8\uB2E4."},
         {"alias.has.no.public.key", "{0}\uC5D0 \uACF5\uC6A9 \uD0A4\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."},
@@ -447,19 +449,24 @@
         {"the.tsa.certificate", "TSA \uC778\uC99D\uC11C"},
         {"the.input", "\uC785\uB825"},
         {"reply", "\uD68C\uC2E0"},
-        {"one.in.many", "%s #%d/%d"},
+        {"one.in.many", "%1$s #%2$d/%3$d"},
         {"alias.in.cacerts", "cacerts\uC758 <%s> \uBC1C\uD589\uC790"},
         {"alias.in.keystore", "<%s> \uBC1C\uD589\uC790"},
         {"with.weak", "%s(\uC57D\uD568)"},
-        {"key.bit", "%d\uBE44\uD2B8 %s \uD0A4"},
-        {"key.bit.weak", "%d\uBE44\uD2B8 %s \uD0A4(\uC57D\uD568)"},
+        {"key.bit", "%1$d\uBE44\uD2B8 %2$s \uD0A4"},
+        {"key.bit.weak", "%1$d\uBE44\uD2B8 %2$s \uD0A4(\uC57D\uD568)"},
+        {"unknown.size.1", "\uC54C \uC218 \uC5C6\uB294 \uD06C\uAE30 %s \uD0A4"},
         {".PATTERN.printX509Cert.with.weak",
                 "\uC18C\uC720\uC790: {0}\n\uBC1C\uD589\uC790: {1}\n\uC77C\uB828 \uBC88\uD638: {2}\n\uC801\uD569\uD55C \uC2DC\uC791 \uB0A0\uC9DC: {3} \uC885\uB8CC \uB0A0\uC9DC: {4}\n\uC778\uC99D\uC11C \uC9C0\uBB38:\n\t SHA1: {5}\n\t SHA256: {6}\n\uC11C\uBA85 \uC54C\uACE0\uB9AC\uC998 \uC774\uB984: {7}\n\uC8FC\uCCB4 \uACF5\uC6A9 \uD0A4 \uC54C\uACE0\uB9AC\uC998: {8}\n\uBC84\uC804: {9}"},
         {"PKCS.10.with.weak",
-                "PKCS #10 \uC778\uC99D\uC11C \uC694\uCCAD(1.0 \uBC84\uC804)\n\uC81C\uBAA9: %s\n\uD615\uC2DD: %s\n\uACF5\uC6A9 \uD0A4: %s\n\uC11C\uBA85 \uC54C\uACE0\uB9AC\uC998: %s\n"},
-        {"verified.by.s.in.s.weak", "%s\uC774(\uAC00) %s\uC5D0\uC11C %s\uC744(\uB97C) \uC0AC\uC6A9\uD558\uC5EC \uD655\uC778"},
-        {"whose.sigalg.risk", "%s\uC774(\uAC00) \uBCF4\uC548 \uC704\uD5D8\uC73C\uB85C \uAC04\uC8FC\uB418\uB294 %s \uC11C\uBA85 \uC54C\uACE0\uB9AC\uC998\uC744 \uC0AC\uC6A9\uD569\uB2C8\uB2E4."},
-        {"whose.key.risk", "%s\uC774(\uAC00) \uBCF4\uC548 \uC704\uD5D8\uC73C\uB85C \uAC04\uC8FC\uB418\uB294 %s\uC744(\uB97C) \uC0AC\uC6A9\uD569\uB2C8\uB2E4."},
+                "PKCS #10 \uC778\uC99D\uC11C \uC694\uCCAD(1.0 \uBC84\uC804)\n\uC81C\uBAA9: %1$s\n\uD615\uC2DD: %2$s\n\uACF5\uC6A9 \uD0A4: %3$s\n\uC11C\uBA85 \uC54C\uACE0\uB9AC\uC998: %4$s\n"},
+        {"verified.by.s.in.s.weak", "%3$s\uC744(\uB97C) \uD3EC\uD568\uD558\uB294 %2$s\uC758 %1$s\uC5D0 \uC758\uD574 \uD655\uC778\uB428"},
+        {"whose.sigalg.risk", "%1$s\uC774(\uAC00) \uBCF4\uC548 \uC704\uD5D8\uC73C\uB85C \uAC04\uC8FC\uB418\uB294 %2$s \uC11C\uBA85 \uC54C\uACE0\uB9AC\uC998\uC744 \uC0AC\uC6A9\uD569\uB2C8\uB2E4."},
+        {"whose.key.risk", "%1$s\uC774(\uAC00) \uBCF4\uC548 \uC704\uD5D8\uC73C\uB85C \uAC04\uC8FC\uB418\uB294 %2$s\uC744(\uB97C) \uC0AC\uC6A9\uD569\uB2C8\uB2E4."},
+        {"jks.storetype.warning", "%1$s \uD0A4 \uC800\uC7A5\uC18C\uB294 \uACE0\uC720 \uD615\uC2DD\uC744 \uC0AC\uC6A9\uD569\uB2C8\uB2E4. \"keytool -importkeystore -srckeystore %2$s -destkeystore %2$s -deststoretype pkcs12\"\uB97C \uC0AC\uC6A9\uD558\uB294 \uC0B0\uC5C5 \uD45C\uC900 \uD615\uC2DD\uC778 PKCS12\uB85C \uC774\uC804\uD558\uB294 \uAC83\uC774 \uC88B\uC2B5\uB2C8\uB2E4."},
+        {"migrate.keystore.warning", "\"%1$s\"\uC744(\uB97C) %4$s(\uC73C)\uB85C \uC774\uC804\uD588\uC2B5\uB2C8\uB2E4. %2$s \uD0A4 \uC800\uC7A5\uC18C\uAC00 \"%3$s\"(\uC73C)\uB85C \uBC31\uC5C5\uB418\uC5C8\uC2B5\uB2C8\uB2E4."},
+        {"backup.keystore.warning", "\uC6D0\uBCF8 \uD0A4 \uC800\uC7A5\uC18C \"%1$s\"\uC774(\uAC00) \"%3$s\"(\uC73C)\uB85C \uBC31\uC5C5\uB418\uC5C8\uC2B5\uB2C8\uB2E4."},
+        {"importing.keystore.status", "\uD0A4 \uC800\uC7A5\uC18C %1$s\uC744(\uB97C) %2$s(\uC73C)\uB85C \uC784\uD3EC\uD2B8\uD558\uB294 \uC911..."},
     };
 
 
--- a/src/java.base/share/classes/sun/security/tools/keytool/Resources_pt_BR.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.base/share/classes/sun/security/tools/keytool/Resources_pt_BR.java	Tue Jan 30 16:41:40 2018 +0100
@@ -42,6 +42,8 @@
         // keytool: Help part
         {".OPTION.", " [OPTION]..."},
         {"Options.", "Op\u00E7\u00F5es:"},
+        {"option.1.set.twice", "A op\u00E7\u00E3o %s foi especificada v\u00E1rias vezes. Todas, exceto a \u00FAltima, ser\u00E3o ignoradas."},
+        {"multiple.commands.1.2", "Somente um comando \u00E9 permitido: tanto %1$s quanto %2$s foram especificados."},
         {"Use.keytool.help.for.all.available.commands",
                  "Use \"keytool -help\" para todos os comandos dispon\u00EDveis"},
         {"Key.and.Certificate.Management.Tool",
@@ -447,19 +449,24 @@
         {"the.tsa.certificate", "O certificado TSA"},
         {"the.input", "A entrada"},
         {"reply", "Resposta"},
-        {"one.in.many", "%s #%d de %d"},
+        {"one.in.many", "%1$s #%2$d de %3$d"},
         {"alias.in.cacerts", "Emissor <%s> no cacerts"},
         {"alias.in.keystore", "Emissor <%s>"},
         {"with.weak", "%s (fraca)"},
-        {"key.bit", "Chave %s de %d bits"},
-        {"key.bit.weak", "Chave %s de %d bits (fraca)"},
+        {"key.bit", "Chave %2$s de %1$d bits"},
+        {"key.bit.weak", "Chave %2$s de %1$d bits (fraca)"},
+        {"unknown.size.1", "chave de tamanho desconhecido  %s"},
         {".PATTERN.printX509Cert.with.weak",
                 "Propriet\u00E1rio: {0}\nEmissor: {1}\nN\u00FAmero de s\u00E9rie: {2}\nV\u00E1lido de: {3} at\u00E9: {4}\nFingerprints do certificado:\n\t SHA1: {5}\n\t SHA256: {6}\nNome do algoritmo de assinatura: {7}\nAlgoritmo de Chave P\u00FAblica do Assunto: {8}\nVers\u00E3o: {9}"},
         {"PKCS.10.with.weak",
-                "Solicita\u00E7\u00E3o do Certificado PKCS #10 (Vers\u00E3o 1.0)\nAssunto: %s\nFormato: %s\nChave P\u00FAblica: %s\nAlgoritmo de assinatura: %s\n"},
-        {"verified.by.s.in.s.weak", "Verificado por %s em %s com um %s"},
-        {"whose.sigalg.risk", "%s usa o algoritmo de assinatura %s que \u00E9 considerado um risco \u00E0 seguran\u00E7a."},
-        {"whose.key.risk", "%s usa um %s que \u00E9 considerado um risco \u00E0 seguran\u00E7a."},
+                "Solicita\u00E7\u00E3o do Certificado PKCS #10 (Vers\u00E3o 1.0)\nAssunto: %1$s\nFormato: %2$s\nChave P\u00FAblica: %3$s\nAlgoritmo de assinatura: %4$s\n"},
+        {"verified.by.s.in.s.weak", "Verificado por %1$s em %2$s com um %3$s"},
+        {"whose.sigalg.risk", "%1$s usa o algoritmo de assinatura %2$s que \u00E9 considerado um risco \u00E0 seguran\u00E7a."},
+        {"whose.key.risk", "%1$s usa um %2$s que \u00E9 considerado um risco \u00E0 seguran\u00E7a."},
+        {"jks.storetype.warning", "O armazenamento de chaves %1$s usa um formato propriet\u00E1rio. \u00C9 recomendada a migra\u00E7\u00E3o para PKCS12, que \u00E9 um formato de padr\u00E3o industrial que usa \"keytool -importkeystore -srckeystore %2$s -destkeystore %2$s -deststoretype pkcs12\"."},
+        {"migrate.keystore.warning", "\"%1$s\" foi migrado para %4$s. O backup do armazenamento de chaves %2$s \u00E9 feito como \"%3$s\"."},
+        {"backup.keystore.warning", "O backup do armazenamento de chaves original \"%1$s\" \u00E9 feito como \"%3$s\"..."},
+        {"importing.keystore.status", "Importando armazenamento de chaves %1$s to %2$s..."},
     };
 
 
--- a/src/java.base/share/classes/sun/security/tools/keytool/Resources_sv.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.base/share/classes/sun/security/tools/keytool/Resources_sv.java	Tue Jan 30 16:41:40 2018 +0100
@@ -42,6 +42,8 @@
         // keytool: Help part
         {".OPTION.", " [OPTION]..."},
         {"Options.", "Alternativ:"},
+        {"option.1.set.twice", "Du har angett alternativet %s flera g\u00E5nger. Alla f\u00F6rutom det sista ignoreras."},
+        {"multiple.commands.1.2", "Endast ett kommando \u00E4r till\u00E5tet: du har angett b\u00E5de %1$s och %2$s."},
         {"Use.keytool.help.for.all.available.commands",
                  "L\u00E4s \"Hj\u00E4lp - Nyckelverktyg\" f\u00F6r alla tillg\u00E4ngliga kommandon"},
         {"Key.and.Certificate.Management.Tool",
@@ -447,19 +449,24 @@
         {"the.tsa.certificate", "TSA-certifikatet"},
         {"the.input", "Indata"},
         {"reply", "Svar"},
-        {"one.in.many", "%s %d av %d"},
+        {"one.in.many", "%1$s #%2$d av %3$d"},
         {"alias.in.cacerts", "Utf\u00E4rdaren <%s> i cacerts"},
         {"alias.in.keystore", "Utf\u00E4rdaren <%s>"},
         {"with.weak", "%s (svag)"},
-        {"key.bit", "%d-bitars %s-nyckel"},
-        {"key.bit.weak", "%d-bitars %s-nyckel (svag)"},
+        {"key.bit", "%1$d-bitars %2$s-nyckel"},
+        {"key.bit.weak", "%1$d-bitars %2$s-nyckel (svag)"},
+        {"unknown.size.1", "ok\u00E4nd storlek p\u00E5 nyckeln %s"},
         {".PATTERN.printX509Cert.with.weak",
                 "\u00C4gare: {0}\nUtf\u00E4rdare: {1}\nSerienummer: {2}\nGiltigt fr\u00E5n: {3}, till: {4}\nCertifikatfingeravtryck:\n\t SHA1: {5}\n\t SHA256: {6}\nSignaturalgoritmnamn: {7}\nAlgoritm f\u00F6r \u00F6ppen nyckel f\u00F6r \u00E4mne: {8}\nVersion: {9}"},
         {"PKCS.10.with.weak",
-                "PKCS #10-certifikatbeg\u00E4ran (version 1.0)\n\u00C4mne: %s\nFormat: %s\n\u00D6ppen nyckel: %s\nSignaturalgoritm: %s\n"},
-        {"verified.by.s.in.s.weak", "Verifierades av %s i %s med en %s"},
-        {"whose.sigalg.risk", "%s anv\u00E4nder signaturalgoritmen %s, vilket anses utg\u00F6ra en s\u00E4kerhetsrisk."},
-        {"whose.key.risk", "%s anv\u00E4nder en %s, vilket anses utg\u00F6ra en s\u00E4kerhetsrisk."},
+                "PKCS #10-certifikatbeg\u00E4ran (version 1.0)\n\u00C4mne: %1$s\nFormat: %2$s\n\u00D6ppen nyckel: %3$s\nSignaturalgoritm: %4$s\n"},
+        {"verified.by.s.in.s.weak", "Verifierades av %1$s i %2$s med en %3$s"},
+        {"whose.sigalg.risk", "%1$s anv\u00E4nder signaturalgoritmen %2$s, vilket anses utg\u00F6ra en s\u00E4kerhetsrisk."},
+        {"whose.key.risk", "%1$s anv\u00E4nder en %2$s, vilket anses utg\u00F6ra en s\u00E4kerhetsrisk."},
+        {"jks.storetype.warning", "Nyckellagret %1$s anv\u00E4nder ett propriet\u00E4rt format. Du b\u00F6r migrera till PKCS12, som \u00E4r ett branschstandardformat, med \"keytool -importkeystore -srckeystore %2$s -destkeystore %2$s -deststoretype pkcs12\"."},
+        {"migrate.keystore.warning", "Migrerade \"%1$s\" till %4$s. Nyckellagret %2$s s\u00E4kerhetskopierades som \"%3$s\"."},
+        {"backup.keystore.warning", "Det ursprungliga nyckellagret, \"%1$s\", s\u00E4kerhetskopieras som \"%3$s\"..."},
+        {"importing.keystore.status", "Importerar nyckellagret %1$s till %2$s..."},
     };
 
 
--- a/src/java.base/share/classes/sun/security/tools/keytool/Resources_zh_CN.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.base/share/classes/sun/security/tools/keytool/Resources_zh_CN.java	Tue Jan 30 16:41:40 2018 +0100
@@ -42,6 +42,8 @@
         // keytool: Help part
         {".OPTION.", " [OPTION]..."},
         {"Options.", "\u9009\u9879:"},
+        {"option.1.set.twice", "\u591A\u6B21\u6307\u5B9A\u4E86 %s \u9009\u9879\u3002\u9664\u6700\u540E\u4E00\u4E2A\u4E4B\u5916, \u5176\u4F59\u7684\u5C06\u5168\u90E8\u5FFD\u7565\u3002"},
+        {"multiple.commands.1.2", "\u53EA\u5141\u8BB8\u4E00\u4E2A\u547D\u4EE4: \u540C\u65F6\u6307\u5B9A\u4E86 %1$s \u548C %2$s\u3002"},
         {"Use.keytool.help.for.all.available.commands",
                  "\u4F7F\u7528 \"keytool -help\" \u83B7\u53D6\u6240\u6709\u53EF\u7528\u547D\u4EE4"},
         {"Key.and.Certificate.Management.Tool",
@@ -447,19 +449,24 @@
         {"the.tsa.certificate", "TSA \u8BC1\u4E66"},
         {"the.input", "\u8F93\u5165"},
         {"reply", "\u56DE\u590D"},
-        {"one.in.many", "%s #%d/%d"},
+        {"one.in.many", "%1$s #%2$d/%3$d"},
         {"alias.in.cacerts", "cacerts \u4E2D\u7684\u53D1\u5E03\u8005 <%s>"},
         {"alias.in.keystore", "\u53D1\u5E03\u8005 <%s>"},
         {"with.weak", "%s (\u5F31)"},
-        {"key.bit", "%d \u4F4D %s \u5BC6\u94A5"},
-        {"key.bit.weak", "%d \u4F4D %s \u5BC6\u94A5 (\u5F31)"},
+        {"key.bit", "%1$d \u4F4D %2$s \u5BC6\u94A5"},
+        {"key.bit.weak", "%1$d \u4F4D %2$s \u5BC6\u94A5 (\u5F31)"},
+        {"unknown.size.1", "\u672A\u77E5\u5927\u5C0F\u7684 %s \u5BC6\u94A5"},
         {".PATTERN.printX509Cert.with.weak",
                 "\u6240\u6709\u8005: {0}\n\u53D1\u5E03\u8005: {1}\n\u5E8F\u5217\u53F7: {2}\n\u751F\u6548\u65F6\u95F4: {3}, \u5931\u6548\u65F6\u95F4: {4}\n\u8BC1\u4E66\u6307\u7EB9:\n\t SHA1: {5}\n\t SHA256: {6}\n\u7B7E\u540D\u7B97\u6CD5\u540D\u79F0: {7}\n\u4E3B\u4F53\u516C\u5171\u5BC6\u94A5\u7B97\u6CD5: {8}\n\u7248\u672C: {9}"},
         {"PKCS.10.with.weak",
-                "PKCS #10 \u8BC1\u4E66\u8BF7\u6C42 (\u7248\u672C 1.0)\n\u4E3B\u4F53: %s\n\u683C\u5F0F: %s\n\u516C\u5171\u5BC6\u94A5: %s\n\u7B7E\u540D\u7B97\u6CD5: %s\n"},
+                "PKCS #10 \u8BC1\u4E66\u8BF7\u6C42 (\u7248\u672C 1.0)\n\u4E3B\u4F53: %1$s\n\u683C\u5F0F: %2$s\n\u516C\u5171\u5BC6\u94A5: %3$s\n\u7B7E\u540D\u7B97\u6CD5: %4$s\n"},
         {"verified.by.s.in.s.weak", "\u7531 %2$s \u4E2D\u7684 %1$s \u4EE5 %3$s \u9A8C\u8BC1"},
-        {"whose.sigalg.risk", "%s \u4F7F\u7528\u7684 %s \u7B7E\u540D\u7B97\u6CD5\u5B58\u5728\u5B89\u5168\u98CE\u9669\u3002"},
-        {"whose.key.risk", "%s \u4F7F\u7528\u7684 %s \u5B58\u5728\u5B89\u5168\u98CE\u9669\u3002"},
+        {"whose.sigalg.risk", "%1$s \u4F7F\u7528\u7684 %2$s \u7B7E\u540D\u7B97\u6CD5\u5B58\u5728\u5B89\u5168\u98CE\u9669\u3002"},
+        {"whose.key.risk", "%1$s \u4F7F\u7528\u7684 %2$s \u5B58\u5728\u5B89\u5168\u98CE\u9669\u3002"},
+        {"jks.storetype.warning", "%1$s \u5BC6\u94A5\u5E93\u4F7F\u7528\u4E13\u7528\u683C\u5F0F\u3002\u5EFA\u8BAE\u4F7F\u7528 \"keytool -importkeystore -srckeystore %2$s -destkeystore %2$s -deststoretype pkcs12\" \u8FC1\u79FB\u5230\u884C\u4E1A\u6807\u51C6\u683C\u5F0F PKCS12\u3002"},
+        {"migrate.keystore.warning", "\u5DF2\u5C06 \"%1$s\" \u8FC1\u79FB\u5230 %4$s\u3002\u5C06 %2$s \u5BC6\u94A5\u5E93\u4F5C\u4E3A \"%3$s\" \u8FDB\u884C\u4E86\u5907\u4EFD\u3002"},
+        {"backup.keystore.warning", "\u5DF2\u5C06\u539F\u59CB\u5BC6\u94A5\u5E93 \"%1$s\" \u5907\u4EFD\u4E3A \"%3$s\"..."},
+        {"importing.keystore.status", "\u6B63\u5728\u5C06\u5BC6\u94A5\u5E93 %1$s \u5BFC\u5165\u5230 %2$s..."},
     };
 
 
--- a/src/java.base/share/classes/sun/security/tools/keytool/Resources_zh_TW.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.base/share/classes/sun/security/tools/keytool/Resources_zh_TW.java	Tue Jan 30 16:41:40 2018 +0100
@@ -42,6 +42,8 @@
         // keytool: Help part
         {".OPTION.", " [OPTION]..."},
         {"Options.", "\u9078\u9805:"},
+        {"option.1.set.twice", "%s \u9078\u9805\u5DF2\u6307\u5B9A\u591A\u6B21\u3002\u5C07\u5FFD\u7565\u6700\u5F8C\u4E00\u500B\u9078\u9805\u4EE5\u5916\u7684\u5176\u4ED6\u6240\u6709\u9078\u9805\u3002"},
+        {"multiple.commands.1.2", "\u53EA\u5141\u8A31\u4E00\u500B\u547D\u4EE4: \u6307\u5B9A\u4E86 %1$s \u548C %2$s \u5169\u8005\u3002"},
         {"Use.keytool.help.for.all.available.commands",
                  "\u4F7F\u7528 \"keytool -help\" \u53D6\u5F97\u6240\u6709\u53EF\u7528\u7684\u547D\u4EE4"},
         {"Key.and.Certificate.Management.Tool",
@@ -393,7 +395,7 @@
         {".The.integrity.of.the.information.stored.in.your.keystore.",
             "* \u5C1A\u672A\u9A57\u8B49\u5132\u5B58\u65BC\u91D1\u9470\u5132\u5B58\u5EAB\u4E2D\u8CC7\u8A0A  *\n* \u7684\u5B8C\u6574\u6027\uFF01\u82E5\u8981\u9A57\u8B49\u5176\u5B8C\u6574\u6027\uFF0C    *\n* \u60A8\u5FC5\u9808\u63D0\u4F9B\u60A8\u7684\u91D1\u9470\u5132\u5B58\u5EAB\u5BC6\u78BC\u3002  *"},
         {".The.integrity.of.the.information.stored.in.the.srckeystore.",
-            "* \u5C1A\u672A\u9A57\u8B49\u5132\u5B58\u65BC srckeystore \u4E2D\u8CC7\u8A0A *\n* \u7684\u5B8C\u6574\u6027\uFF01\u82E5\u8981\u9A57\u8B49\u5176\u5B8C\u6574\u6027\uFF0C\u60A8    *\n* \u5FC5\u9808\u63D0\u4F9B srckeystore \u5BC6\u78BC\u3002       *"},
+            "* \u5C1A\u672A\u9A57\u8B49\u5132\u5B58\u65BC srckeystore \u4E2D\u8CC7\u8A0A  *\n* \u7684\u5B8C\u6574\u6027\uFF01\u82E5\u8981\u9A57\u8B49\u5176\u5B8C\u6574\u6027\uFF0C\u60A8\u5FC5\u9808 *\n* \u63D0\u4F9B srckeystore \u5BC6\u78BC\u3002            *"},
 
         {"Certificate.reply.does.not.contain.public.key.for.alias.",
                 "\u6191\u8B49\u56DE\u8986\u4E26\u672A\u5305\u542B <{0}> \u7684\u516C\u958B\u91D1\u9470"},
@@ -447,19 +449,24 @@
         {"the.tsa.certificate", "TSA \u6191\u8B49"},
         {"the.input", "\u8F38\u5165"},
         {"reply", "\u56DE\u8986"},
-        {"one.in.many", "%s #%d / %d"},
+        {"one.in.many", "%1$s #%2$d / %3$d"},
         {"alias.in.cacerts", "cacerts \u4E2D\u7684\u767C\u884C\u4EBA <%s>"},
         {"alias.in.keystore", "\u767C\u884C\u4EBA <%s>"},
         {"with.weak", "%s (\u4F4E\u5F37\u5EA6)"},
-        {"key.bit", "%d \u4F4D\u5143\u7684 %s \u91D1\u9470"},
-        {"key.bit.weak", "%d \u4F4D\u5143\u7684 %s \u91D1\u9470 (\u4F4E\u5F37\u5EA6)"},
+        {"key.bit", "%1$d \u4F4D\u5143\u7684 %2$s \u91D1\u9470"},
+        {"key.bit.weak", "%1$d \u4F4D\u5143\u7684 %2$s \u91D1\u9470 (\u4F4E\u5F37\u5EA6)"},
+        {"unknown.size.1", "%s \u91D1\u9470\u5927\u5C0F\u4E0D\u660E"},
         {".PATTERN.printX509Cert.with.weak",
                 "\u64C1\u6709\u8005: {0}\n\u767C\u884C\u4EBA: {1}\n\u5E8F\u865F: {2}\n\u6709\u6548\u671F\u81EA: {3} \u5230: {4}\n\u6191\u8B49\u6307\u7D0B:\n\t SHA1: {5}\n\t SHA256: {6}\n\u7C3D\u7AE0\u6F14\u7B97\u6CD5\u540D\u7A31: {7}\n\u4E3B\u9AD4\u516C\u958B\u91D1\u9470\u6F14\u7B97\u6CD5: {8}\n\u7248\u672C: {9}"},
         {"PKCS.10.with.weak",
-                "PKCS #10 \u6191\u8B49\u8981\u6C42 (\u7248\u672C 1.0)\n\u4E3B\u9AD4: %s\n\u683C\u5F0F: %s\n\u516C\u7528\u91D1\u9470: %s\n\u7C3D\u7AE0\u6F14\u7B97\u6CD5: %s\n"},
+                "PKCS #10 \u6191\u8B49\u8981\u6C42 (\u7248\u672C 1.0)\n\u4E3B\u9AD4: %1$s\n\u683C\u5F0F: %2$s\n\u516C\u7528\u91D1\u9470: %3$s\n\u7C3D\u7AE0\u6F14\u7B97\u6CD5: %4$s\n"},
         {"verified.by.s.in.s.weak", "\u7531 %2$s \u4E2D\u7684 %1$s \u4EE5 %3$s \u9A57\u8B49"},
-        {"whose.sigalg.risk", "%s \u4F7F\u7528\u7684 %s \u7C3D\u7AE0\u6F14\u7B97\u6CD5\u5B58\u5728\u5B89\u5168\u98A8\u96AA\u3002"},
-        {"whose.key.risk", "%s \u4F7F\u7528\u7684 %s \u5B58\u5728\u5B89\u5168\u98A8\u96AA\u3002"},
+        {"whose.sigalg.risk", "%1$s \u4F7F\u7528\u7684 %2$s \u7C3D\u7AE0\u6F14\u7B97\u6CD5\u5B58\u5728\u5B89\u5168\u98A8\u96AA\u3002"},
+        {"whose.key.risk", "%1$s \u4F7F\u7528\u7684 %2$s \u5B58\u5728\u5B89\u5168\u98A8\u96AA\u3002"},
+        {"jks.storetype.warning", "%1$s \u91D1\u9470\u5132\u5B58\u5EAB\u4F7F\u7528\u5C08\u6709\u683C\u5F0F\u3002\u5EFA\u8B70\u60A8\u4F7F\u7528 \"keytool -importkeystore -srckeystore %2$s -destkeystore %2$s -deststoretype pkcs12\" \u79FB\u8F49\u6210\u70BA\u4F7F\u7528 PKCS12 (\u696D\u754C\u6A19\u6E96\u683C\u5F0F)\u3002"},
+        {"migrate.keystore.warning", "\u5DF2\u5C07 \"%1$s\" \u79FB\u8F49\u6210\u70BA %4$s\u3002%2$s \u91D1\u9470\u5132\u5B58\u5EAB\u5DF2\u5099\u4EFD\u70BA \"%3$s\"\u3002"},
+        {"backup.keystore.warning", "\u539F\u59CB\u7684\u91D1\u9470\u5132\u5B58\u5EAB \"%1$s\" \u5DF2\u5099\u4EFD\u70BA \"%3$s\"..."},
+        {"importing.keystore.status", "\u6B63\u5728\u5C07\u91D1\u9470\u5132\u5B58\u5EAB %1$s \u532F\u5165 %2$s..."},
     };
 
 
--- a/src/java.base/share/classes/sun/security/util/DerValue.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.base/share/classes/sun/security/util/DerValue.java	Tue Jan 30 16:41:40 2018 +0100
@@ -490,20 +490,27 @@
      * @return the octet string held in this DER value
      */
     public byte[] getOctetString() throws IOException {
-        byte[] bytes;
 
         if (tag != tag_OctetString && !isConstructed(tag_OctetString)) {
             throw new IOException(
                 "DerValue.getOctetString, not an Octet String: " + tag);
         }
-        bytes = new byte[length];
-        // Note: do not tempt to call buffer.read(bytes) at all. There's a
+        // Note: do not attempt to call buffer.read(bytes) at all. There's a
         // known bug that it returns -1 instead of 0.
         if (length == 0) {
-            return bytes;
+            return new byte[0];
         }
-        if (buffer.read(bytes) != length)
+
+        // Only allocate the array if there are enough bytes available.
+        // This only works for ByteArrayInputStream.
+        // The assignment below ensures that buffer has the required type.
+        ByteArrayInputStream arrayInput = buffer;
+        if (arrayInput.available() < length) {
             throw new IOException("short read on DerValue buffer");
+        }
+        byte[] bytes = new byte[length];
+        arrayInput.read(bytes);
+
         if (isConstructed()) {
             DerInputStream in = new DerInputStream(bytes, 0, bytes.length,
                 buffer.allowBER);
--- a/src/java.base/share/classes/sun/security/util/Resources_de.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.base/share/classes/sun/security/util/Resources_de.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2016, 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
@@ -115,6 +115,7 @@
                 "Substitution f\u00FCr Alias {0} kann nicht ausgef\u00FChrt werden"},
         {"substitution.value.prefix.unsupported",
                 "Substitutionswert {0} nicht unterst\u00FCtzt"},
+        {"SPACE", " "},
         {"LPARAM", "("},
         {"RPARAM", ")"},
         {"type.can.t.be.null","Typ kann nicht null sein"},
--- a/src/java.base/share/classes/sun/security/util/Resources_es.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.base/share/classes/sun/security/util/Resources_es.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2016, 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
@@ -115,6 +115,7 @@
                 "no se puede realizar la sustituci\u00F3n en el alias, {0}"},
         {"substitution.value.prefix.unsupported",
                 "valor de sustituci\u00F3n, {0}, no soportado"},
+        {"SPACE", " "},
         {"LPARAM", "("},
         {"RPARAM", ")"},
         {"type.can.t.be.null","el tipo no puede ser nulo"},
--- a/src/java.base/share/classes/sun/security/util/Resources_fr.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.base/share/classes/sun/security/util/Resources_fr.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2016, 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
@@ -115,6 +115,7 @@
                 "impossible d''effectuer une substitution pour l''alias, {0}"},
         {"substitution.value.prefix.unsupported",
                 "valeur de substitution, {0}, non prise en charge"},
+        {"SPACE", " "},
         {"LPARAM", "("},
         {"RPARAM", ")"},
         {"type.can.t.be.null","le type ne peut \u00EAtre NULL"},
--- a/src/java.base/share/classes/sun/security/util/Resources_it.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.base/share/classes/sun/security/util/Resources_it.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2016, 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
@@ -115,6 +115,7 @@
                 "impossibile eseguire una sostituzione sull''alias, {0}"},
         {"substitution.value.prefix.unsupported",
                 "valore sostituzione, {0}, non supportato"},
+        {"SPACE", " "},
         {"LPARAM", "("},
         {"RPARAM", ")"},
         {"type.can.t.be.null","il tipo non pu\u00F2 essere nullo"},
--- a/src/java.base/share/classes/sun/security/util/Resources_ja.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.base/share/classes/sun/security/util/Resources_ja.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2016, 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
@@ -115,6 +115,7 @@
                 "\u5225\u540D{0}\u306B\u5BFE\u3057\u3066\u7F6E\u63DB\u64CD\u4F5C\u304C\u3067\u304D\u307E\u305B\u3093"},
         {"substitution.value.prefix.unsupported",
                 "\u7F6E\u63DB\u5024{0}\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093"},
+        {"SPACE", " "},
         {"LPARAM", "("},
         {"RPARAM", ")"},
         {"type.can.t.be.null","\u5165\u529B\u3092null\u306B\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093"},
--- a/src/java.base/share/classes/sun/security/util/Resources_ko.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.base/share/classes/sun/security/util/Resources_ko.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2016, 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
@@ -115,6 +115,7 @@
                 "{0} \uBCC4\uCE6D\uC744 \uB300\uCCB4\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."},
         {"substitution.value.prefix.unsupported",
                 "\uB300\uCCB4 \uAC12 {0}\uC740(\uB294) \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."},
+        {"SPACE", " "},
         {"LPARAM", "("},
         {"RPARAM", ")"},
         {"type.can.t.be.null","\uC720\uD615\uC740 \uB110\uC77C \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."},
--- a/src/java.base/share/classes/sun/security/util/Resources_pt_BR.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.base/share/classes/sun/security/util/Resources_pt_BR.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2016, 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
@@ -115,6 +115,7 @@
                 "n\u00E3o \u00E9 poss\u00EDvel realizar a substitui\u00E7\u00E3o no alias, {0}"},
         {"substitution.value.prefix.unsupported",
                 "valor da substitui\u00E7\u00E3o, {0}, n\u00E3o suportado"},
+        {"SPACE", " "},
         {"LPARAM", "("},
         {"RPARAM", ")"},
         {"type.can.t.be.null","o tipo n\u00E3o pode ser nulo"},
--- a/src/java.base/share/classes/sun/security/util/Resources_sv.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.base/share/classes/sun/security/util/Resources_sv.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -36,7 +36,7 @@
 
         // javax.security.auth.PrivateCredentialPermission
         {"invalid.null.input.s.", "ogiltiga null-indata"},
-        {"actions.can.only.be.read.", "funktioner kan endast 'l\u00E4sas'"},
+        {"actions.can.only.be.read.", "\u00E5tg\u00E4rder kan endast 'l\u00E4sas'"},
         {"permission.name.name.syntax.invalid.",
                 "syntaxen f\u00F6r beh\u00F6righetsnamnet [{0}] \u00E4r ogiltig: "},
         {"Credential.Class.not.followed.by.a.Principal.Class.and.Name",
@@ -63,7 +63,7 @@
                 "ogiltigt null-AccessControlContext"},
         {"invalid.null.action.provided", "ogiltig null-funktion"},
         {"invalid.null.Class.provided", "ogiltig null-klass"},
-        {"Subject.", "Subjekt:\n"},
+        {"Subject.", "Innehavare:\n"},
         {".Principal.", "\tIdentitetshavare: "},
         {".Public.Credential.", "\tOffentlig inloggning: "},
         {".Private.Credentials.inaccessible.",
@@ -71,7 +71,7 @@
         {".Private.Credential.", "\tPrivat inloggning: "},
         {".Private.Credential.inaccessible.",
                 "\tPrivat inloggning \u00E4r inte tillg\u00E4nglig\n"},
-        {"Subject.is.read.only", "Subjektet \u00E4r skrivskyddad"},
+        {"Subject.is.read.only", "Innehavare \u00E4r skrivskyddad"},
         {"attempting.to.add.an.object.which.is.not.an.instance.of.java.security.Principal.to.a.Subject.s.Principal.Set",
                 "f\u00F6rs\u00F6k att l\u00E4gga till ett objekt som inte \u00E4r en instans av java.security.Principal till ett subjekts upps\u00E4ttning av identitetshavare"},
         {"attempting.to.add.an.object.which.is.not.an.instance.of.class",
@@ -115,6 +115,7 @@
                 "kan ej ers\u00E4tta alias, {0}"},
         {"substitution.value.prefix.unsupported",
                 "ers\u00E4ttningsv\u00E4rde, {0}, st\u00F6ds ej"},
+        {"SPACE", " "},
         {"LPARAM", "("},
         {"RPARAM", ")"},
         {"type.can.t.be.null","typen kan inte vara null"},
--- a/src/java.base/share/classes/sun/security/util/Resources_zh_CN.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.base/share/classes/sun/security/util/Resources_zh_CN.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2016, 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
@@ -63,7 +63,7 @@
                 "\u63D0\u4F9B\u4E86\u65E0\u6548\u7684\u7A7A AccessControlContext"},
         {"invalid.null.action.provided", "\u63D0\u4F9B\u4E86\u65E0\u6548\u7684\u7A7A\u64CD\u4F5C"},
         {"invalid.null.Class.provided", "\u63D0\u4F9B\u4E86\u65E0\u6548\u7684\u7A7A\u7C7B"},
-        {"Subject.", "\u4E3B\u9898: \n"},
+        {"Subject.", "\u4E3B\u4F53: \n"},
         {".Principal.", "\t\u4E3B\u7528\u6237: "},
         {".Public.Credential.", "\t\u516C\u5171\u8EAB\u4EFD\u8BC1\u660E: "},
         {".Private.Credentials.inaccessible.",
@@ -71,9 +71,9 @@
         {".Private.Credential.", "\t\u4E13\u7528\u8EAB\u4EFD\u8BC1\u660E: "},
         {".Private.Credential.inaccessible.",
                 "\t\u65E0\u6CD5\u8BBF\u95EE\u4E13\u7528\u8EAB\u4EFD\u8BC1\u660E\n"},
-        {"Subject.is.read.only", "\u4E3B\u9898\u4E3A\u53EA\u8BFB"},
+        {"Subject.is.read.only", "\u4E3B\u4F53\u4E3A\u53EA\u8BFB"},
         {"attempting.to.add.an.object.which.is.not.an.instance.of.java.security.Principal.to.a.Subject.s.Principal.Set",
-                "\u6B63\u5728\u5C1D\u8BD5\u5C06\u4E00\u4E2A\u975E java.security.Principal \u5B9E\u4F8B\u7684\u5BF9\u8C61\u6DFB\u52A0\u5230\u4E3B\u9898\u7684\u4E3B\u7528\u6237\u96C6\u4E2D"},
+                "\u6B63\u5728\u5C1D\u8BD5\u5C06\u4E00\u4E2A\u975E java.security.Principal \u5B9E\u4F8B\u7684\u5BF9\u8C61\u6DFB\u52A0\u5230\u4E3B\u4F53\u7684\u4E3B\u7528\u6237\u96C6\u4E2D"},
         {"attempting.to.add.an.object.which.is.not.an.instance.of.class",
                 "\u6B63\u5728\u5C1D\u8BD5\u6DFB\u52A0\u4E00\u4E2A\u975E{0}\u5B9E\u4F8B\u7684\u5BF9\u8C61"},
 
@@ -84,11 +84,11 @@
         {"Invalid.null.input.name", "\u65E0\u6548\u7A7A\u8F93\u5165: \u540D\u79F0"},
         {"No.LoginModules.configured.for.name",
          "\u6CA1\u6709\u4E3A{0}\u914D\u7F6E LoginModules"},
-        {"invalid.null.Subject.provided", "\u63D0\u4F9B\u4E86\u65E0\u6548\u7684\u7A7A\u4E3B\u9898"},
+        {"invalid.null.Subject.provided", "\u63D0\u4F9B\u4E86\u65E0\u6548\u7684\u7A7A\u4E3B\u4F53"},
         {"invalid.null.CallbackHandler.provided",
                 "\u63D0\u4F9B\u4E86\u65E0\u6548\u7684\u7A7A CallbackHandler"},
         {"null.subject.logout.called.before.login",
-                "\u7A7A\u4E3B\u9898 - \u5728\u767B\u5F55\u4E4B\u524D\u8C03\u7528\u4E86\u6CE8\u9500"},
+                "\u7A7A\u4E3B\u4F53 - \u5728\u767B\u5F55\u4E4B\u524D\u8C03\u7528\u4E86\u6CE8\u9500"},
         {"unable.to.instantiate.LoginModule.module.because.it.does.not.provide.a.no.argument.constructor",
                 "\u65E0\u6CD5\u5B9E\u4F8B\u5316 LoginModule, {0}, \u56E0\u4E3A\u5B83\u672A\u63D0\u4F9B\u4E00\u4E2A\u65E0\u53C2\u6570\u6784\u9020\u5668"},
         {"unable.to.instantiate.LoginModule",
@@ -115,6 +115,7 @@
                 "\u65E0\u6CD5\u5728\u522B\u540D {0} \u4E0A\u6267\u884C\u66FF\u4EE3"},
         {"substitution.value.prefix.unsupported",
                 "\u66FF\u4EE3\u503C{0}\u4E0D\u53D7\u652F\u6301"},
+        {"SPACE", " "},
         {"LPARAM", "("},
         {"RPARAM", ")"},
         {"type.can.t.be.null","\u7C7B\u578B\u4E0D\u80FD\u4E3A\u7A7A\u503C"},
--- a/src/java.base/share/classes/sun/security/util/Resources_zh_TW.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.base/share/classes/sun/security/util/Resources_zh_TW.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2016, 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
@@ -115,6 +115,7 @@
                 "\u7121\u6CD5\u5C0D\u5225\u540D\u57F7\u884C\u66FF\u63DB\uFF0C{0}"},
         {"substitution.value.prefix.unsupported",
                 "\u4E0D\u652F\u63F4\u7684\u66FF\u63DB\u503C\uFF0C{0}"},
+        {"SPACE", " "},
         {"LPARAM", "("},
         {"RPARAM", ")"},
         {"type.can.t.be.null","\u8F38\u5165\u4E0D\u80FD\u70BA\u7A7A\u503C"},
--- a/src/java.base/share/classes/sun/security/util/SecurityProviderConstants.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.base/share/classes/sun/security/util/SecurityProviderConstants.java	Tue Jan 30 16:41:40 2018 +0100
@@ -64,7 +64,7 @@
     static {
         String keyLengthStr = GetPropertyAction.privilegedGetProperty
             (KEY_LENGTH_PROP);
-        int dsaKeySize = 1024;
+        int dsaKeySize = 2048;
         int rsaKeySize = 2048;
         int dhKeySize = 2048;
         int ecKeySize = 256;
--- a/src/java.base/share/classes/sun/util/resources/CurrencyNames.properties	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.base/share/classes/sun/util/resources/CurrencyNames.properties	Tue Jan 30 16:41:40 2018 +0100
@@ -226,6 +226,7 @@
 SRG=SRG
 SSP=SSP
 STD=STD
+STN=STN
 SVC=SVC
 SYP=SYP
 SZL=SZL
@@ -294,7 +295,7 @@
 aud=Australian Dollar
 awg=Aruban Florin
 azm=Azerbaijani Manat (1993-2006)
-azn=Azerbaijani Manat
+azn=Azerbaijan Manat
 bam=Bosnia-Herzegovina Convertible Mark
 bbd=Barbadian Dollar
 bdt=Bangladeshi Taka
@@ -380,7 +381,7 @@
 kwd=Kuwaiti Dinar
 kyd=Cayman Islands Dollar
 kzt=Kazakhstani Tenge
-lak=Laotian Kip
+lak=Lao Kip
 lbp=Lebanese Pound
 lkr=Sri Lankan Rupee
 lrd=Liberian Dollar
@@ -418,7 +419,7 @@
 pab=Panamanian Balboa
 pen=Peruvian Sol
 pgk=Papua New Guinean Kina
-php=Philippine Peso
+php=Philippine Piso
 pkr=Pakistani Rupee
 pln=Polish Zloty
 pte=Portuguese Escudo
@@ -446,6 +447,7 @@
 srg=Surinamese Guilder
 ssp=South Sudanese Pound
 std=S\u00e3o Tom\u00e9 and Pr\u00edncipe Dobra
+stn=S\u00e3o Tom\u00e9 and Pr\u00edncipe Dobra
 svc=Salvadoran Col\u00f3n
 syp=Syrian Pound
 szl=Swazi Lilangeni
--- a/src/java.base/share/conf/security/java.security	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.base/share/conf/security/java.security	Tue Jan 30 16:41:40 2018 +0100
@@ -676,7 +676,7 @@
 # Example:
 #   jdk.tls.disabledAlgorithms=MD5, SSLv3, DSA, RSA keySize < 2048
 jdk.tls.disabledAlgorithms=SSLv3, RC4, MD5withRSA, DH keySize < 1024, \
-    EC keySize < 224
+    EC keySize < 224, DES40_CBC, RC4_40
 
 #
 # Legacy algorithms for Secure Socket Layer/Transport Layer Security (SSL/TLS)
@@ -737,8 +737,6 @@
 #
 jdk.tls.legacyAlgorithms= \
         K_NULL, C_NULL, M_NULL, \
-        DHE_DSS_EXPORT, DHE_RSA_EXPORT, DH_anon_EXPORT, DH_DSS_EXPORT, \
-        DH_RSA_EXPORT, RSA_EXPORT, \
         DH_anon, ECDH_anon, \
         RC4_128, RC4_40, DES_CBC, DES40_CBC, \
         3DES_EDE_CBC
@@ -814,14 +812,14 @@
 #     limited:    These policy files contain more restricted cryptographic
 #                 strengths
 #
-# The default setting is determined by the value of the “crypto.policy”
+# The default setting is determined by the value of the "crypto.policy"
 # Security property below. If your country or usage requires the
-# traditional restrictive policy, the “limited” Java cryptographic
+# traditional restrictive policy, the "limited" Java cryptographic
 # policy is still available and may be appropriate for your environment.
 #
 # If you have restrictions that do not fit either use case mentioned
 # above, Java provides the capability to customize these policy files.
-# The “crypto.policy” security property points to a subdirectory
+# The "crypto.policy" security property points to a subdirectory
 # within <java-home>/conf/security/policy/ which can be customized.
 # Please see the <java-home>/conf/security/policy/README.txt file or consult
 # the Java Security Guide/JCA documentation for more information.
@@ -985,3 +983,24 @@
 #    java.rmi.dgc.VMID;\
 #    java.rmi.dgc.Lease;\
 #    maxdepth=5;maxarray=10000
+
+# CORBA ORBIorTypeCheckRegistryFilter
+# Type check enhancement for ORB::string_to_object processing
+#
+# An IOR type check filter, if configured, is used by an ORB during
+# an ORB::string_to_object invocation to check the veracity of the type encoded
+# in the ior string. 
+#
+# The filter pattern consists of a semi-colon separated list of class names.
+# The configured list contains the binary class names of the IDL interface types 
+# corresponding to the IDL stub class to be instantiated.
+# As such, a filter specifies a list of IDL stub classes that will be
+# allowed by an ORB when an ORB::string_to_object is invoked.
+# It is used to specify a white list configuration of acceptable
+# IDL stub types which may be contained in a stringified IOR
+# parameter passed as input to an ORB::string_to_object method.
+#
+# Note: This property is currently used by the JDK Reference implementation.
+# It is not guaranteed to be examined and used by other implementations.
+#
+#com.sun.CORBA.ORBIorTypeCheckRegistryFilter=binary_class_name;binary_class_name
--- a/src/java.base/share/conf/security/policy/README.txt	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.base/share/conf/security/policy/README.txt	Tue Jan 30 16:41:40 2018 +0100
@@ -8,7 +8,7 @@
 Import and export control rules on cryptographic software vary from
 country to country.  The Java Cryptography Extension (JCE) architecture
 allows flexible cryptographic key strength to be configured via the
-jurisdiction policy files which are referenced by the “crypto.policy”
+jurisdiction policy files which are referenced by the "crypto.policy"
 security property in the <java-home>/conf/security/java.security file.
 
 By default, Java provides two different sets of cryptographic policy
@@ -20,8 +20,8 @@
     limited:    These policy files contain more restricted cryptographic
                 strengths
 
-These files reside in <java-home>/conf/security/policy in the “unlimited”
-or “limited” subdirectories respectively.
+These files reside in <java-home>/conf/security/policy in the "unlimited"
+or "limited" subdirectories respectively.
 
 Each subdirectory contains a complete policy configuration,
 and subdirectories can be added/edited/removed to reflect your
--- a/src/java.base/share/legal/asm.md	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.base/share/legal/asm.md	Tue Jan 30 16:41:40 2018 +0100
@@ -1,4 +1,4 @@
-## ASM Bytecode Manipulation Framework v5.1
+## ASM Bytecode Manipulation Framework v6.0
 
 ### ASM License
 <pre>
--- a/src/java.base/share/lib/security/default.policy	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.base/share/lib/security/default.policy	Tue Jan 30 16:41:40 2018 +0100
@@ -124,6 +124,7 @@
     permission java.util.PropertyPermission "sun.security.pkcs11.allowSingleThreadedModules", "read";
     permission java.util.PropertyPermission "os.name", "read";
     permission java.util.PropertyPermission "os.arch", "read";
+    permission java.util.PropertyPermission "jdk.crypto.KeyAgreement.legacyKDF", "read";
     permission java.security.SecurityPermission "putProviderProperty.*";
     permission java.security.SecurityPermission "clearProviderProperties.*";
     permission java.security.SecurityPermission "removeProviderProperty.*";
--- a/src/java.base/share/native/libjava/System.c	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.base/share/native/libjava/System.c	Tue Jan 30 16:41:40 2018 +0100
@@ -108,9 +108,14 @@
         (*env)->DeleteLocalRef(env, jkey);                            \
     } else ((void) 0)
 
-#ifndef VENDOR /* Third party may overwrite this. */
+/* Third party may overwrite these values. */
+#ifndef VENDOR
 #define VENDOR "Oracle Corporation"
+#endif
+#ifndef VENDOR_URL
 #define VENDOR_URL "http://java.oracle.com/"
+#endif
+#ifndef VENDOR_URL_BUG
 #define VENDOR_URL_BUG "http://bugreport.java.com/bugreport/"
 #endif
 
--- a/src/java.base/share/native/libjimage/imageFile.cpp	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.base/share/native/libjimage/imageFile.cpp	Tue Jan 30 16:41:40 2018 +0100
@@ -205,12 +205,19 @@
 // Manage a table of open image files.  This table allows multiple access points
 // to share an open image.
 ImageFileReaderTable::ImageFileReaderTable() : _count(0), _max(_growth) {
-    _table = new ImageFileReader*[_max];
+    _table = static_cast<ImageFileReader**>(calloc(_max, sizeof(ImageFileReader*)));
     assert(_table != NULL && "allocation failed");
 }
 
 ImageFileReaderTable::~ImageFileReaderTable() {
-    delete[] _table;
+    for (u4 i = 0; i < _count; i++) {
+        ImageFileReader* image = _table[i];
+
+        if (image != NULL) {
+            delete image;
+        }
+    }
+    free(_table);
 }
 
 // Add a new image entry to the table.
--- a/src/java.base/share/native/libjimage/imageFile.hpp	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.base/share/native/libjimage/imageFile.hpp	Tue Jan 30 16:41:40 2018 +0100
@@ -402,6 +402,7 @@
 // 'opened' by reference point and decremented when 'closed'.    Use of zero
 // leads the ImageFileReader to be actually closed and discarded.
 class ImageFileReader {
+friend class ImageFileReaderTable;
 private:
     // Manage a number of image files such that an image can be shared across
     // multiple uses (ex. loader.)
--- a/src/java.compiler/share/classes/javax/lang/model/SourceVersion.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.compiler/share/classes/javax/lang/model/SourceVersion.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -230,8 +230,9 @@
      * followed only by characters for which {@link
      * Character#isJavaIdentifierPart(int)} returns {@code true}.
      * This pattern matches regular identifiers, keywords, restricted
-     * keywords, and the literals {@code "true"}, {@code "false"}, and
-     * {@code "null"}.
+     * keywords, and the literals {@code "true"}, {@code "false"},
+     * {@code "null"}, and {@code "var"}.
+     *
      * The method returns {@code false} for all other strings.
      *
      * @param name the string to check
@@ -265,8 +266,9 @@
      * qualified name in the latest source version.  Unlike {@link
      * #isIdentifier isIdentifier}, this method returns {@code false}
      * for keywords, boolean literals, and the null literal.
+     *
      * This method returns {@code true} for <i>restricted
-     * keywords</i>.
+     * keywords</i> and {@code "var"}.
      *
      * @param name the string to check
      * @return {@code true} if this string is a
@@ -283,8 +285,9 @@
      * qualified name in the given source version.  Unlike {@link
      * #isIdentifier isIdentifier}, this method returns {@code false}
      * for keywords, boolean literals, and the null literal.
+     *
      * This method returns {@code true} for <i>restricted
-     * keywords</i>.
+     * keywords</i> and {@code "var"}.
      *
      * @param name the string to check
      * @param version the version to use
@@ -308,7 +311,7 @@
      * Returns whether or not {@code s} is a keyword, boolean literal,
      * or null literal in the latest source version.
      * This method returns {@code false} for <i>restricted
-     * keywords</i>.
+     * keywords</i> and {@code "var"}.
      *
      * @param s the string to check
      * @return {@code true} if {@code s} is a keyword, or boolean
@@ -325,7 +328,7 @@
      * Returns whether or not {@code s} is a keyword, boolean literal,
      * or null literal in the given source version.
      * This method returns {@code false} for <i>restricted
-     * keywords</i>.
+     * keywords</i> and {@code "var"}.
      *
      * @param s the string to check
      * @param version the version to use
--- a/src/java.compiler/share/classes/javax/lang/model/element/ElementVisitor.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.compiler/share/classes/javax/lang/model/element/ElementVisitor.java	Tue Jan 30 16:41:40 2018 +0100
@@ -152,8 +152,8 @@
     /**
      * Visits a module element.
      *
-     * @implSpec Visits a {@code ModuleElement} by calling {@code
-     * visitUnknown(e, p)}.
+     * @implSpec The default implementation visits a {@code
+     * ModuleElement} by calling {@code visitUnknown(e, p)}.
      *
      * @param e  the element to visit
      * @param p  a visitor-specified parameter
--- a/src/java.compiler/share/classes/javax/lang/model/element/ModuleElement.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.compiler/share/classes/javax/lang/model/element/ModuleElement.java	Tue Jan 30 16:41:40 2018 +0100
@@ -201,11 +201,10 @@
          * Visits any directive as if by passing itself to that
          * directive's {@link Directive#accept accept} method and passing
          * {@code null} for the additional parameter.
-         * The invocation {@code v.visit(d)} is equivalent to
-         * {@code d.accept(v, null)}.
+         *
          * @param d  the directive to visit
          * @return a visitor-specified result
-         * @implSpec This implementation is {@code visit(d, null)}
+         * @implSpec The default implementation is {@code d.accept(v, null)}.
          */
         default R visit(Directive d) {
             return d.accept(this, null);
@@ -214,11 +213,11 @@
         /**
          * Visits any directive as if by passing itself to that
          * directive's {@link Directive#accept accept} method.
-         * The invocation {@code v.visit(d, p)} is equivalent to
-         * {@code d.accept(v, p)}.
+         *
          * @param d  the directive to visit
          * @param p  a visitor-specified parameter
          * @return a visitor-specified result
+         * @implSpec The default implementation is {@code d.accept(v, p)}.
          */
         default R visit(Directive d, P p) {
             return d.accept(this, p);
@@ -271,7 +270,7 @@
          * @param p  a visitor-specified parameter
          * @return a visitor-specified result
          * @throws UnknownDirectiveException a visitor implementation may optionally throw this exception
-         * @implSpec This implementation throws {@code new UnknownDirectiveException(d, p)}.
+         * @implSpec The default implementation throws {@code new UnknownDirectiveException(d, p)}.
          */
         default R visitUnknown(Directive d, P p) {
             throw new UnknownDirectiveException(d, p);
--- a/src/java.compiler/share/classes/javax/lang/model/overview.html	Tue Jan 30 16:26:40 2018 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,38 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
-<!--
-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.
--->
-<html>
-<head>
-<title>javax.lang.model</title>
-</head>
-
-<body bgcolor="white">
-
-Packages used to model various aspects of the Java programming language.
-
-@since 1.6
-
-</body>
-</html>
--- a/src/java.compiler/share/classes/javax/tools/ToolProvider.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.compiler/share/classes/javax/tools/ToolProvider.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -25,8 +25,6 @@
 
 package javax.tools;
 
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
 import java.security.AccessController;
 import java.security.PrivilegedAction;
 import java.util.Iterator;
@@ -101,17 +99,6 @@
         return null;
     }
 
-    private static final boolean useLegacy;
-
-    static {
-        Class<?> c = null;
-        try {
-            c = Class.forName("java.lang.Module");
-        } catch (Throwable t) {
-        }
-        useLegacy = (c == null);
-    }
-
     /**
      * Get an instance of a system tool using the service loader.
      * @implNote         By default, this returns the implementation in the specified module.
@@ -126,14 +113,6 @@
      * @return the specified implementation of the tool
      */
     private static <T> T getSystemTool(Class<T> clazz, String moduleName, String className) {
-        if (useLegacy) {
-            try {
-                return Class.forName(className, true, ClassLoader.getSystemClassLoader()).
-                    asSubclass(clazz).getConstructor().newInstance();
-            } catch (ReflectiveOperationException e) {
-                throw new Error(e);
-            }
-        }
 
         try {
             ServiceLoader<T> sl = ServiceLoader.load(clazz, ClassLoader.getSystemClassLoader());
@@ -150,24 +129,16 @@
 
     /**
      * Determine if this is the desired tool instance.
-     * @param <T>        the interface of the tool
-     * @param tool       the instance of the tool
-     * @param moduleName the name of the module containing the desired implementation
+     * @param <T>               the interface of the tool
+     * @param tool              the instance of the tool
+     * @param moduleName        the name of the module containing the desired implementation
      * @return true if and only if the tool matches the specified criteria
      */
     private static <T> boolean matches(T tool, String moduleName) {
         PrivilegedAction<Boolean> pa = () -> {
-            // for now, use reflection to implement
-            //      return moduleName.equals(tool.getClass().getModule().getName());
-            try {
-                Method getModuleMethod = Class.class.getDeclaredMethod("getModule");
-                Object toolModule = getModuleMethod.invoke(tool.getClass());
-                Method getNameMethod = toolModule.getClass().getDeclaredMethod("getName");
-                String toolModuleName = (String) getNameMethod.invoke(toolModule);
-                return moduleName.equals(toolModuleName);
-            } catch (InvocationTargetException | NoSuchMethodException | IllegalAccessException e) {
-                return false;
-            }
+            Module toolModule = tool.getClass().getModule();
+            String toolModuleName = toolModule.getName();
+            return toolModuleName.equals(moduleName);
         };
         return AccessController.doPrivileged(pa);
     }
--- a/src/java.compiler/share/classes/javax/tools/overview.html	Tue Jan 30 16:26:40 2018 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,54 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
-<!--
-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.
--->
-
-<html>
-<head>
-<title>javax.tools</title>
-</head>
-<body>
-
-<p>
-The Java&trade; programming language compiler API is a set of interfaces that describes the
-functions provided by a compiler.  This API has three
-main objectives:
-</p>
-
-<ul>
-
-<li>Allow invocation of a compiler from a program using
-standardized interfaces.</li>
-
-<li>Provide interfaces enabling the compiler to report diagnostics in a
-structured way.</li>
-
-<li>Provide interfaces enabling clients of the compiler to override
-how file objects are found.  "File objects" is a file
-abstraction.</li>
-
-</ul>
-
-</body>
-</html>
--- a/src/java.corba/share/classes/com/sun/corba/se/impl/encoding/BufferManagerWriteGrow.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.corba/share/classes/com/sun/corba/se/impl/encoding/BufferManagerWriteGrow.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 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
@@ -26,11 +26,13 @@
 package com.sun.corba.se.impl.encoding;
 
 import com.sun.corba.se.impl.orbutil.ORBConstants;
+import com.sun.corba.se.impl.orbutil.ORBUtility;
 import com.sun.corba.se.impl.encoding.ByteBufferWithInfo;
 import com.sun.corba.se.impl.encoding.BufferManagerWrite;
 import com.sun.corba.se.pept.encoding.OutputObject;
 import com.sun.corba.se.pept.transport.Connection;
 import com.sun.corba.se.spi.orb.ORB;
+import com.sun.corba.se.spi.orb.ORBData;
 
 public class BufferManagerWriteGrow extends BufferManagerWrite
 {
@@ -48,7 +50,20 @@
      * buffer manager as set in the ORB.
      */
     public int getBufferSize() {
-        return orb.getORBData().getGIOPBufferSize();
+        ORBData orbData = null;
+        int bufferSize = ORBConstants.GIOP_DEFAULT_BUFFER_SIZE;
+        if (orb != null) {
+            orbData = orb.getORBData();
+            if (orbData != null) {
+                bufferSize = orbData.getGIOPBufferSize();
+                dprint("BufferManagerWriteGrow.getBufferSize: bufferSize == " + bufferSize);
+            } else {
+                dprint("BufferManagerWriteGrow.getBufferSize: orbData reference is NULL");
+            }
+        } else {
+            dprint("BufferManagerWriteGrow.getBufferSize: orb reference is NULL");
+        }
+        return bufferSize;
     }
 
     public void overflow (ByteBufferWithInfo bbwi)
@@ -89,4 +104,9 @@
      */
     public void close() {}
 
+    private void dprint(String msg) {
+        if (orb.transportDebugFlag) {
+            ORBUtility.dprint(this, msg);
 }
+    }
+}
--- a/src/java.corba/share/classes/com/sun/corba/se/impl/encoding/CDRInputStream_1_0.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.corba/share/classes/com/sun/corba/se/impl/encoding/CDRInputStream_1_0.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 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
@@ -725,12 +725,14 @@
     //    IDLEntity.class.isAssignableFrom( clz ).
     // 3. If clz is an interface, use it to create the appropriate
     //    stub factory.
+
     public org.omg.CORBA.Object read_Object(Class clz)
     {
         // In any case, we must first read the IOR.
         IOR ior = IORFactories.makeIOR(parent) ;
-        if (ior.isNil())
+        if (ior.isNil()) {
             return null ;
+        }
 
         PresentationManager.StubFactoryFactory sff = ORB.getStubFactoryFactory() ;
         String codeBase = ior.getProfile().getCodebase() ;
@@ -739,6 +741,7 @@
         if (clz == null) {
             RepositoryId rid = RepositoryId.cache.getId( ior.getTypeId() ) ;
             String className = rid.getClassName() ;
+            orb.validateIORClass(className);
             boolean isIDLInterface = rid.isIDLType() ;
 
             if (className == null || className.equals( "" ))
@@ -761,11 +764,9 @@
         } else {
             // clz is an interface class
             boolean isIDL = IDLEntity.class.isAssignableFrom( clz ) ;
-
             stubFactory = sff.createStubFactory( clz.getName(),
                 isIDL, codeBase, clz, clz.getClassLoader() ) ;
         }
-
         return internalIORToObject( ior, stubFactory, orb ) ;
     }
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/java.corba/share/classes/com/sun/corba/se/impl/ior/IORTypeCheckRegistryImpl.java	Tue Jan 30 16:41:40 2018 +0100
@@ -0,0 +1,179 @@
+/*
+ * 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.
+ */
+
+package com.sun.corba.se.impl.ior;
+
+import java.util.Set;
+
+import com.sun.corba.se.impl.orbutil.ORBUtility;
+import com.sun.corba.se.spi.ior.IORTypeCheckRegistry;
+import com.sun.corba.se.spi.orb.ORB;
+
+public class IORTypeCheckRegistryImpl implements IORTypeCheckRegistry {
+
+    private final Set<String> iorTypeNames;
+    private static final Set<String> builtinIorTypeNames;
+    private ORB theOrb;
+
+    static {
+        builtinIorTypeNames = initBuiltinIorTypeNames();
+    }
+
+    public IORTypeCheckRegistryImpl( String filterProperties, ORB orb) {
+        theOrb = orb;
+        iorTypeNames = parseIorClassNameList(filterProperties);
+    }
+
+    /*
+     *
+     * A note on the validation flow:
+     * 1. against the filter class name list
+     * 2. against the builtin class name list
+     */
+
+    @Override
+    public boolean isValidIORType(String iorClassName) {
+        dprintTransport(".isValidIORType : iorClassName == " + iorClassName);
+        return validateIorTypeByName(iorClassName);
+    }
+
+
+    private boolean validateIorTypeByName(String iorClassName) {
+        dprintTransport(".validateIorTypeByName : iorClassName == " + iorClassName);
+        boolean isValidType;
+
+        isValidType = checkIorTypeNames(iorClassName);
+
+        if (!isValidType) {
+            isValidType = checkBuiltinClassNames(iorClassName);
+        }
+
+        dprintTransport(".validateIorTypeByName : isValidType == " + isValidType);
+        return isValidType;
+    }
+
+
+    /*
+     * check if the class name corresponding to an IOR Type name
+     * is in the ior class name list as generated from the filter property.
+     * So if the IOR type is recorded in the registry then allow the creation of the
+     * stub factory and let it resolve and load the class. That is if current
+     * type check deliberation permits.
+     * IOR Type names are configured by the filter property
+     */
+
+    private boolean checkIorTypeNames(
+            String theIorClassName) {
+        return (iorTypeNames != null) && (iorTypeNames.contains(theIorClassName));
+    }
+
+    /*
+     * Check the IOR interface class name against the set of
+     * class names that correspond to the builtin JDK IDL stub classes.
+     */
+
+    private boolean  checkBuiltinClassNames(
+            String theIorClassName) {
+        return builtinIorTypeNames.contains(theIorClassName);
+    }
+
+
+    private Set<String> parseIorClassNameList(String filterProperty) {
+        Set<String> _iorTypeNames = null;
+        if (filterProperty != null) {
+            String[] tempIorClassNames = filterProperty.split(";");
+            _iorTypeNames = Set.<String>of(tempIorClassNames);
+            if (theOrb.orbInitDebugFlag) {
+                dprintConfiguredIorTypeNames();
+            }
+        }
+        return _iorTypeNames;
+    }
+
+
+    private static Set<String> initBuiltinIorTypeNames() {
+        Set<Class<?>> builtInCorbaStubTypes = initBuiltInCorbaStubTypes();
+        String [] tempBuiltinIorTypeNames = new String[builtInCorbaStubTypes.size()];
+        int i = 0;
+        for (Class<?> _stubClass: builtInCorbaStubTypes) {
+            tempBuiltinIorTypeNames[i++] = _stubClass.getName();
+        }
+        return  Set.<String>of(tempBuiltinIorTypeNames);
+    }
+
+    private static Set<Class<?>> initBuiltInCorbaStubTypes() {
+        Class<?> tempBuiltinCorbaStubTypes[] = {
+                com.sun.corba.se.spi.activation.Activator.class,
+                com.sun.corba.se.spi.activation._ActivatorStub.class,
+                com.sun.corba.se.spi.activation._InitialNameServiceStub.class,
+                com.sun.corba.se.spi.activation._LocatorStub.class,
+                com.sun.corba.se.spi.activation._RepositoryStub.class,
+                com.sun.corba.se.spi.activation._ServerManagerStub.class,
+                com.sun.corba.se.spi.activation._ServerStub.class,
+                org.omg.CosNaming.BindingIterator.class,
+                org.omg.CosNaming._BindingIteratorStub.class,
+                org.omg.CosNaming.NamingContextExt.class,
+                org.omg.CosNaming._NamingContextExtStub.class,
+                org.omg.CosNaming.NamingContext.class,
+                org.omg.CosNaming._NamingContextStub.class,
+                org.omg.DynamicAny.DynAnyFactory.class,
+                org.omg.DynamicAny._DynAnyFactoryStub.class,
+                org.omg.DynamicAny.DynAny.class,
+                org.omg.DynamicAny._DynAnyStub.class,
+                org.omg.DynamicAny.DynArray.class,
+                org.omg.DynamicAny._DynArrayStub.class,
+                org.omg.DynamicAny.DynEnum.class,
+                org.omg.DynamicAny._DynEnumStub.class,
+                org.omg.DynamicAny.DynFixed.class,
+                org.omg.DynamicAny._DynFixedStub.class,
+                org.omg.DynamicAny.DynSequence.class,
+                org.omg.DynamicAny._DynSequenceStub.class,
+                org.omg.DynamicAny.DynStruct.class,
+                org.omg.DynamicAny._DynStructStub.class,
+                org.omg.DynamicAny.DynUnion.class,
+                org.omg.DynamicAny._DynUnionStub.class,
+                org.omg.DynamicAny._DynValueStub.class,
+                org.omg.DynamicAny.DynValue.class,
+                org.omg.PortableServer.ServantActivator.class,
+                org.omg.PortableServer._ServantActivatorStub.class,
+                org.omg.PortableServer.ServantLocator.class,
+                org.omg.PortableServer._ServantLocatorStub.class };
+        return Set.<Class<?>>of(tempBuiltinCorbaStubTypes);
+    }
+
+    private void dprintConfiguredIorTypeNames() {
+        if (iorTypeNames != null) {
+            for (String iorTypeName : iorTypeNames) {
+                ORBUtility.dprint(this, ".dprintConfiguredIorTypeNames: " + iorTypeName);
+            }
+        }
+    }
+
+    private void dprintTransport(String msg) {
+        if (theOrb.transportDebugFlag) {
+            ORBUtility.dprint(this, msg);
+        }
+    }
+}
--- a/src/java.corba/share/classes/com/sun/corba/se/impl/orb/ORBImpl.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.corba/share/classes/com/sun/corba/se/impl/orb/ORBImpl.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 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
@@ -54,6 +54,7 @@
 
 import java.security.PrivilegedAction;
 import java.security.AccessController;
+import java.security.Security;
 
 import javax.rmi.CORBA.Util;
 import javax.rmi.CORBA.ValueHandler;
@@ -90,6 +91,7 @@
 import com.sun.corba.se.pept.transport.TransportManager;
 
 import com.sun.corba.se.spi.ior.IOR;
+import com.sun.corba.se.spi.ior.IORTypeCheckRegistry;
 import com.sun.corba.se.spi.ior.IdentifiableFactoryFinder;
 import com.sun.corba.se.spi.ior.TaggedComponentFactoryFinder;
 import com.sun.corba.se.spi.ior.IORFactories;
@@ -124,6 +126,7 @@
 import com.sun.corba.se.spi.transport.CorbaContactInfoListFactory;
 import com.sun.corba.se.spi.transport.CorbaTransportManager;
 import com.sun.corba.se.spi.legacy.connection.LegacyServerSocketManager;
+import com.sun.corba.se.spi.logging.CORBALogDomains;
 import com.sun.corba.se.spi.copyobject.CopierManager;
 import com.sun.corba.se.spi.presentation.rmi.PresentationDefaults;
 import com.sun.corba.se.spi.presentation.rmi.PresentationManager;
@@ -145,6 +148,7 @@
 import com.sun.corba.se.impl.encoding.CachedCodeBase;
 import com.sun.corba.se.impl.interceptors.PIHandlerImpl;
 import com.sun.corba.se.impl.interceptors.PINoOpHandlerImpl;
+import com.sun.corba.se.impl.ior.IORTypeCheckRegistryImpl;
 import com.sun.corba.se.impl.ior.TaggedComponentFactoryFinderImpl;
 import com.sun.corba.se.impl.ior.TaggedProfileFactoryFinderImpl;
 import com.sun.corba.se.impl.ior.TaggedProfileTemplateFactoryFinderImpl;
@@ -226,6 +230,8 @@
 
     private ServiceContextRegistry serviceContextRegistry ;
 
+    private IORTypeCheckRegistry iorTypeCheckRegistry;
+
     // Needed here to implement connect/disconnect
     private TOAFactory toaFactory ;
 
@@ -274,6 +280,8 @@
     // insNamingDelegate.
     private final Object resolverLock = new Object() ;
 
+    private static final String IORTYPECHECKREGISTRY_FILTER_PROPNAME = "com.sun.CORBA.ORBIorTypeCheckRegistryFilter";
+
     private TaggedComponentFactoryFinder taggedComponentFactoryFinder ;
 
     private IdentifiableFactoryFinder taggedProfileFactoryFinder ;
@@ -411,6 +419,39 @@
             };
 
         serviceContextRegistry = new ServiceContextRegistry( this ) ;
+
+    }
+
+
+    private void initIORTypeCheckRegistry() {
+        String filterProps = AccessController
+                .doPrivileged(new PrivilegedAction<String>() {
+                    public String run() {
+                        String props = System
+                                .getProperty(IORTYPECHECKREGISTRY_FILTER_PROPNAME);
+                        if (props == null) {
+                            props = Security
+                                    .getProperty(IORTYPECHECKREGISTRY_FILTER_PROPNAME);
+                        }
+                        return props;
+                    }
+                });
+        if (filterProps != null) {
+            try {
+                iorTypeCheckRegistry = new IORTypeCheckRegistryImpl(filterProps, this);
+            } catch (Exception ex) {
+                throw wrapper.bootstrapException(ex);
+            }
+
+            if (this.orbInitDebugFlag) {
+                dprint(".initIORTypeCheckRegistry, IORTypeCheckRegistryImpl created for properties == "
+                        + filterProps);
+            }
+        } else {
+            if (this.orbInitDebugFlag) {
+                dprint(".initIORTypeCheckRegistry, IORTypeCheckRegistryImpl NOT created for properties == ");
+            }
+        }
     }
 
     protected void setDebugFlags( String[] args )
@@ -494,6 +535,8 @@
         getThreadPoolManager();
 
         super.getByteBufferPool();
+
+        initIORTypeCheckRegistry();
     }
 
     private synchronized POAFactory getPOAFactory()
@@ -2089,6 +2132,17 @@
         }
         return copierManager ;
     }
+
+    @Override
+    public void validateIORClass(String iorClassName) {
+        if (iorTypeCheckRegistry != null) {
+            if (!iorTypeCheckRegistry.isValidIORType(iorClassName)) {
+                throw ORBUtilSystemException.get( this,
+                        CORBALogDomains.OA_IOR ).badStringifiedIor();
+            }
+        }
+    }
+
 } // Class ORBImpl
 
 ////////////////////////////////////////////////////////////////////////
--- a/src/java.corba/share/classes/com/sun/corba/se/impl/orb/ORBSingleton.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.corba/share/classes/com/sun/corba/se/impl/orb/ORBSingleton.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 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
@@ -768,6 +768,13 @@
     public CopierManager getCopierManager() {
         return null ;
     }
+
+    @Override
+    public void validateIORClass(String iorClassName) {
+        getFullORB().validateIORClass(iorClassName);
+
+    }
+
 }
 
 // End of file.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/java.corba/share/classes/com/sun/corba/se/spi/ior/IORTypeCheckRegistry.java	Tue Jan 30 16:41:40 2018 +0100
@@ -0,0 +1,31 @@
+/*
+ * 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.
+ */
+
+package com.sun.corba.se.spi.ior;
+
+public interface IORTypeCheckRegistry {
+    public boolean isValidIORType(String iorClassName);
+}
+
--- a/src/java.corba/share/classes/com/sun/corba/se/spi/orb/ORB.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.corba/share/classes/com/sun/corba/se/spi/orb/ORB.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 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
@@ -121,6 +121,7 @@
     public boolean shutdownDebugFlag = false;
     public boolean giopDebugFlag = false;
     public boolean invocationTimingDebugFlag = false ;
+    public boolean orbInitDebugFlag = false ;
 
     // SystemException log wrappers.  Protected so that they can be used in
     // subclasses.
@@ -487,6 +488,24 @@
     public abstract ThreadPoolManager getThreadPoolManager();
 
     public abstract CopierManager getCopierManager() ;
+
+    /*
+     * This method is called to verify that a stringified IOR passed to
+     * an org.omg.CORBA.ORB::string_to_object method contains a valid and acceptable IOR type.
+     * If an ORB is configured with IOR type checking enabled,
+     * the ORB executes a IOR type registry lookup to
+     * validate that the class name extract from a type id in
+     * a stringified IOR is a known and accepted type.
+     * A CORBA {@code org.omg.CORBA.DATA_CONVERSION} exception will be thrown should the type check fail.
+     *
+     * @param iorClassName
+     *        a string representing the class name corresponding to the type id of an IOR
+     * @throws org.omg.CORBA.DATA_CONVERSION
+     *           exception with an indication that it is a "Bad stringified IOR", which is thrown
+     *           when the type check fails.
+     */
+    public abstract void validateIORClass(String iorClassName);
+
 }
 
 // End of file.
--- a/src/java.desktop/macosx/native/libawt_lwawt/awt/AWTWindow.m	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.desktop/macosx/native/libawt_lwawt/awt/AWTWindow.m	Tue Jan 30 16:41:40 2018 +0100
@@ -954,11 +954,6 @@
     return lastKeyWindow;
 }
 
-- (BOOL)windowShouldZoom:(NSWindow *)window toFrame:(NSRect)newFrame {
-    return !NSEqualSizes(self.nsWindow.frame.size, newFrame.size);
-}
-
-
 @end // AWTWindow
 
 
--- a/src/java.desktop/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageReader.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.desktop/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageReader.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2016, 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
@@ -374,7 +374,10 @@
             // And set current image since we've read it now
             currentImage = 0;
         }
-        if (seekForwardOnly) {
+        // If the image positions list is empty as in the case of a tables-only
+        // stream, then attempting to access the element at index
+        // imagePositions.size() - 1 will cause an IndexOutOfBoundsException.
+        if (seekForwardOnly && !imagePositions.isEmpty()) {
             Long pos = imagePositions.get(imagePositions.size()-1);
             iis.flushBefore(pos.longValue());
         }
@@ -492,6 +495,11 @@
         if (!tablesOnlyChecked) {
             checkTablesOnly();
         }
+        // If the image positions list is empty as in the case of a tables-only
+        // stream, then no image data can be read.
+        if (imagePositions.isEmpty()) {
+            throw new IIOException("No image data present to read");
+        }
         if (imageIndex < imagePositions.size()) {
             iis.seek(imagePositions.get(imageIndex).longValue());
         } else {
--- a/src/java.desktop/share/classes/com/sun/imageio/plugins/png/PNGImageReader.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.desktop/share/classes/com/sun/imageio/plugins/png/PNGImageReader.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -739,6 +739,17 @@
                     // If chunk type is 'IDAT', we've reached the image data.
                     if (imageStartPosition == -1L) {
                         /*
+                         * The PNG specification mandates that if colorType is
+                         * PNG_COLOR_PALETTE then the PLTE chunk should appear
+                         * before the first IDAT chunk.
+                         */
+                        if (colorType == PNG_COLOR_PALETTE &&
+                            !(metadata.PLTE_present))
+                        {
+                            throw new IIOException("Required PLTE chunk"
+                                    + " missing");
+                        }
+                        /*
                          * PNGs may contain multiple IDAT chunks containing
                          * a portion of image data. We store the position of
                          * the first IDAT chunk and continue with iteration
@@ -986,7 +997,9 @@
         }
 
         int inputBands = inputBandsForColorType[metadata.IHDR_colorType];
-        int bytesPerRow = (inputBands*passWidth*metadata.IHDR_bitDepth + 7)/8;
+        int bitsPerRow = Math.
+                multiplyExact((inputBands * metadata.IHDR_bitDepth), passWidth);
+        int bytesPerRow = (bitsPerRow + 7) / 8;
 
         // Read the image row-by-row
         for (int srcY = 0; srcY < passHeight; srcY++) {
@@ -1037,7 +1050,8 @@
         int bytesPerPixel = (bitDepth == 16) ? 2 : 1;
         bytesPerPixel *= inputBands;
 
-        int bytesPerRow = (inputBands*passWidth*bitDepth + 7)/8;
+        int bitsPerRow = Math.multiplyExact((inputBands * bitDepth), passWidth);
+        int bytesPerRow = (bitsPerRow + 7) / 8;
         int eltsPerRow = (bitDepth == 16) ? bytesPerRow/2 : bytesPerRow;
 
         // If no pixels need updating, just skip the input data
--- a/src/java.desktop/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_sv.properties	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.desktop/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_sv.properties	Tue Jan 30 16:41:40 2018 +0100
@@ -66,7 +66,7 @@
 FileChooser.cancelButtonToolTip.textAndMnemonic=Avbryt dialogrutan f\u00F6r filval
 FileChooser.saveButtonToolTip.textAndMnemonic=Spara vald fil
 FileChooser.openButtonToolTip.textAndMnemonic=\u00D6ppna vald fil
-FileChooser.updateButtonToolTip.textAndMnemonic=Uppdatera kataloglistan
+FileChooser.updateButtonToolTip.textAndMnemonic=Uppdatera kataloglista
 FileChooser.helpButtonToolTip.textAndMnemonic=Hj\u00E4lp f\u00F6r val av fil
 FileChooser.directoryOpenButtonToolTip.textAndMnemonic=\u00D6ppna vald katalog
 
--- a/src/java.desktop/share/classes/java/awt/color/ICC_ColorSpace.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.desktop/share/classes/java/awt/color/ICC_ColorSpace.java	Tue Jan 30 16:41:40 2018 +0100
@@ -128,6 +128,18 @@
     }
 
     /**
+     * Validate an ICC_ColorSpace read from an object input stream
+     */
+    private void readObject(java.io.ObjectInputStream s)
+        throws ClassNotFoundException, java.io.IOException {
+
+        s.defaultReadObject();
+        if (thisProfile == null) {
+            thisProfile = ICC_Profile.getInstance(ColorSpace.CS_sRGB);
+        }
+    }
+
+    /**
     * Returns the ICC_Profile for this ICC_ColorSpace.
     * @return the ICC_Profile for this ICC_ColorSpace.
     */
--- a/src/java.desktop/share/classes/java/awt/geom/Path2D.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.desktop/share/classes/java/awt/geom/Path2D.java	Tue Jan 30 16:41:40 2018 +0100
@@ -25,13 +25,14 @@
 
 package java.awt.geom;
 
+import java.awt.Rectangle;
 import java.awt.Shape;
-import java.awt.Rectangle;
-import sun.awt.geom.Curve;
 import java.io.Serializable;
 import java.io.StreamCorruptedException;
 import java.util.Arrays;
 
+import sun.awt.geom.Curve;
+
 /**
  * The {@code Path2D} class provides a simple, yet flexible
  * shape which represents an arbitrary geometric path.
@@ -2625,9 +2626,12 @@
             throw new java.io.InvalidObjectException(iae.getMessage());
         }
 
-        pointTypes = new byte[(nT < 0) ? INIT_SIZE : nT];
-        if (nC < 0) {
-            nC = INIT_SIZE * 2;
+        // Accept the size from the stream only if it is less than INIT_SIZE
+        // otherwise the size will be based on the real data in the stream
+        pointTypes = new byte[(nT < 0 || nT > INIT_SIZE) ? INIT_SIZE : nT];
+        final int initX2 = INIT_SIZE * 2;
+        if (nC < 0 || nC > initX2) {
+            nC = initX2;
         }
         if (storedbl) {
             ((Path2D.Double) this).doubleCoords = new double[nC];
--- a/src/java.desktop/share/classes/java/awt/image/BandedSampleModel.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.desktop/share/classes/java/awt/image/BandedSampleModel.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -185,7 +185,33 @@
     public DataBuffer createDataBuffer() {
         DataBuffer dataBuffer = null;
 
+        // The minimum size required to store samples of one band
         int size = scanlineStride * height;
+
+        if (numBanks == 1) {
+            /*
+             * The sample model contains a single bank of data buffer. Hence
+             * we need to compute the size required to store samples of all
+             * bands including the respective offsets.
+             */
+            int sizePerBand = size;
+            size += bandOffsets[0];
+            for (int index = 1; index < bandOffsets.length; index++) {
+                size += (bandOffsets[index] - size) + sizePerBand;
+            }
+        } else {
+            /*
+             * The sample model contains multiple banks of data buffer where
+             * each bank would correspond to a particular band. Hence we need
+             * to compute only the additional space required for band offsets.
+             */
+            int maxBandOffset = bandOffsets[0];
+            for (int index = 1; index < bandOffsets.length; index++) {
+                maxBandOffset = Math.max(maxBandOffset, bandOffsets[index]);
+            }
+            size += maxBandOffset;
+        }
+
         switch (dataType) {
         case DataBuffer.TYPE_BYTE:
             dataBuffer = new DataBufferByte(size, numBanks);
--- a/src/java.desktop/share/classes/javax/swing/text/DefaultEditorKit.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.desktop/share/classes/javax/swing/text/DefaultEditorKit.java	Tue Jan 30 16:41:40 2018 +0100
@@ -110,7 +110,7 @@
      * @return the command list
      */
     public Action[] getActions() {
-        return defaultActions;
+        return defaultActions.clone();
     }
 
     /**
--- a/src/java.desktop/share/classes/javax/swing/text/html/CSS.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.desktop/share/classes/javax/swing/text/html/CSS.java	Tue Jan 30 16:41:40 2018 +0100
@@ -26,21 +26,27 @@
 
 import java.awt.Color;
 import java.awt.Font;
-import java.awt.GraphicsEnvironment;
-import java.awt.Toolkit;
 import java.awt.HeadlessException;
 import java.awt.Image;
-import java.io.*;
-import java.lang.reflect.Method;
+import java.awt.Toolkit;
+import java.io.IOException;
+import java.io.ObjectInputStream;
+import java.io.Serializable;
+import java.net.MalformedURLException;
 import java.net.URL;
-import java.net.MalformedURLException;
 import java.util.Enumeration;
 import java.util.Hashtable;
 import java.util.Vector;
-import java.util.Locale;
+
 import javax.swing.ImageIcon;
 import javax.swing.SizeRequirements;
-import javax.swing.text.*;
+import javax.swing.text.AttributeSet;
+import javax.swing.text.Element;
+import javax.swing.text.MutableAttributeSet;
+import javax.swing.text.SimpleAttributeSet;
+import javax.swing.text.StyleConstants;
+import javax.swing.text.StyleContext;
+import javax.swing.text.View;
 
 /**
  * Defines a set of
@@ -3568,7 +3574,7 @@
 
         // Reconstruct the hashtable.
         int numValues = s.readInt();
-        valueConvertor = new Hashtable<>(Math.max(1, numValues));
+        valueConvertor = new Hashtable<>();
         while (numValues-- > 0) {
             Object key = s.readObject();
             Object value = s.readObject();
--- a/src/java.desktop/share/classes/javax/swing/tree/VariableHeightLayoutCache.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.desktop/share/classes/javax/swing/tree/VariableHeightLayoutCache.java	Tue Jan 30 16:41:40 2018 +0100
@@ -409,11 +409,10 @@
      */
     public void treeNodesChanged(TreeModelEvent e) {
         if(e != null) {
-            int               changedIndexs[];
-            TreeStateNode     changedNode;
+            int               changedIndexs[]  = e.getChildIndices();
+            TreeStateNode     changedNode = getNodeForPath(
+                    SwingUtilities2.getTreePath(e, getModel()), false, false);
 
-            changedIndexs = e.getChildIndices();
-            changedNode = getNodeForPath(SwingUtilities2.getTreePath(e, getModel()), false, false);
             if(changedNode != null) {
                 Object            changedValue = changedNode.getValue();
 
@@ -421,17 +420,12 @@
                    child indexs that are passed in. */
                 changedNode.updatePreferredSize();
                 if(changedNode.hasBeenExpanded() && changedIndexs != null) {
-                    int                counter;
-                    TreeStateNode      changedChildNode;
-
-                    for(counter = 0; counter < changedIndexs.length;
-                        counter++) {
-                        changedChildNode = (TreeStateNode)changedNode
-                                    .getChildAt(changedIndexs[counter]);
+                    for(int index : changedIndexs) {
+                        TreeStateNode changedChildNode = (TreeStateNode)changedNode
+                                    .getChildAt(index);
                         /* Reset the user object. */
                         changedChildNode.setUserObject
-                                    (treeModel.getChild(changedValue,
-                                                     changedIndexs[counter]));
+                                    (treeModel.getChild(changedValue, index));
                         changedChildNode.updatePreferredSize();
                     }
                 }
@@ -462,34 +456,26 @@
      */
     public void treeNodesInserted(TreeModelEvent e) {
         if(e != null) {
-            int               changedIndexs[];
-            TreeStateNode     changedParentNode;
-
-            changedIndexs = e.getChildIndices();
-            changedParentNode = getNodeForPath(SwingUtilities2.getTreePath(e, getModel()), false, false);
+            int               changedIndexs[] = e.getChildIndices();
+            TreeStateNode     changedParentNode = getNodeForPath(
+                    SwingUtilities2.getTreePath(e, getModel()), false, false);
             /* Only need to update the children if the node has been
                expanded once. */
             // PENDING(scott): make sure childIndexs is sorted!
             if(changedParentNode != null && changedIndexs != null &&
                changedIndexs.length > 0) {
                 if(changedParentNode.hasBeenExpanded()) {
-                    boolean            makeVisible;
-                    int                counter;
-                    Object             changedParent;
-                    TreeStateNode      newNode;
-                    int                oldChildCount = changedParentNode.
-                                          getChildCount();
+                    boolean   makeVisible =((changedParentNode == root &&
+                                            !rootVisible) ||
+                                            (changedParentNode.getRow() != -1 &&
+                                               changedParentNode.isExpanded()));
+                    int  oldChildCount = changedParentNode.getChildCount();
 
-                    changedParent = changedParentNode.getValue();
-                    makeVisible = ((changedParentNode == root &&
-                                    !rootVisible) ||
-                                   (changedParentNode.getRow() != -1 &&
-                                    changedParentNode.isExpanded()));
-                    for(counter = 0;counter < changedIndexs.length;counter++)
+                    for(int index : changedIndexs)
                     {
-                        newNode = this.createNodeAt(changedParentNode,
-                                                    changedIndexs[counter]);
+                        this.createNodeAt(changedParentNode, index);
                     }
+
                     if(oldChildCount == 0) {
                         // Update the size of the parent.
                         changedParentNode.updatePreferredSize();
@@ -643,7 +629,7 @@
                 rebuild(true);
             }
             else if(changedNode != null) {
-                int                              nodeIndex, oldRow;
+                int                              nodeIndex;
                 TreeStateNode                    newNode, parent;
                 boolean                          wasExpanded, wasVisible;
                 int                              newIndex;
@@ -925,24 +911,22 @@
       * row index, the last row index is returned.
       */
     private int getRowContainingYLocation(int location) {
+        final int rows = getRowCount();
+
+        if(rows <= 0)
+            return -1;
         if(isFixedRowHeight()) {
-            if(getRowCount() == 0)
-                return -1;
-            return Math.max(0, Math.min(getRowCount() - 1,
+            return Math.max(0, Math.min(rows - 1,
                                         location / getRowHeight()));
         }
 
-        int                    max, maxY, mid, min, minY;
-        TreeStateNode          node;
+        int max = rows, min = 0, mid = 0;
 
-        if((max = getRowCount()) <= 0)
-            return -1;
-        mid = min = 0;
         while(min < max) {
             mid = (max - min) / 2 + min;
-            node = (TreeStateNode)visibleNodes.elementAt(mid);
-            minY = node.getYOrigin();
-            maxY = minY + node.getPreferredHeight();
+            TreeStateNode node = (TreeStateNode)visibleNodes.elementAt(mid);
+            int minY = node.getYOrigin();
+            int maxY = minY + node.getPreferredHeight();
             if(location < minY) {
                 max = mid - 1;
             }
@@ -954,8 +938,8 @@
         }
         if(min == max) {
             mid = min;
-            if(mid >= getRowCount())
-                mid = getRowCount() - 1;
+            if(mid >= rows)
+                mid = rows - 1;
         }
         return mid;
     }
@@ -1008,9 +992,9 @@
             if(nodeWidth > maxWidth)
                 maxWidth = nodeWidth;
         }
+
         return maxWidth;
     }
-
     /**
       * Responsible for creating a TreeStateNode that will be used
       * to track display information about value.
@@ -1362,17 +1346,11 @@
                                                        isExpanded(),
                                                        boundsBuffer);
 
-            if(bounds == null) {
+            if(bounds == null || bounds.height == 0) {
                 xOrigin = 0;
                 preferredWidth = preferredHeight = 0;
                 updateNodeSizes = true;
-            }
-            else if(bounds.height == 0) {
-                xOrigin = 0;
-                preferredWidth = preferredHeight = 0;
-                updateNodeSizes = true;
-            }
-            else {
+            } else {
                 xOrigin = bounds.x;
                 preferredWidth = bounds.width;
                 if(isFixedRowHeight())
@@ -1477,24 +1455,14 @@
                     Object         realNode = getValue();
                     TreeModel      treeModel = getModel();
                     int            count = treeModel.getChildCount(realNode);
-
+                    int offset = originalRow == -1 ? -1 : originalRow + 1;
                     hasBeenExpanded = true;
-                    if(originalRow == -1) {
-                        for (int i = 0; i < count; i++) {
-                            newNode = createNodeForValue(treeModel.getChild
-                                                            (realNode, i));
-                            this.add(newNode);
-                            newNode.updatePreferredSize(-1);
-                        }
-                    }
-                    else {
-                        int offset = originalRow + 1;
-                        for (int i = 0; i < count; i++) {
-                            newNode = createNodeForValue(treeModel.getChild
-                                                       (realNode, i));
-                            this.add(newNode);
-                            newNode.updatePreferredSize(offset);
-                        }
+
+                    for (int i = 0; i < count; i++) {
+                        newNode = createNodeForValue(treeModel.getChild
+                                                        (realNode, i));
+                        this.add(newNode);
+                        newNode.updatePreferredSize(offset);
                     }
                 }
 
@@ -1502,14 +1470,9 @@
                 Enumeration<TreeNode> cursor = preorderEnumeration();
                 cursor.nextElement(); // don't add me, I'm already in
 
-                int newYOrigin;
+                int newYOrigin = isFixed || (this == root && !isRootVisible()) ?
+                                    0 : getYOrigin() + this.getPreferredHeight();
 
-                if(isFixed)
-                    newYOrigin = 0;
-                else if(this == root && !isRootVisible())
-                    newYOrigin = 0;
-                else
-                    newYOrigin = getYOrigin() + this.getPreferredHeight();
                 TreeStateNode   aNode;
                 if(!isFixed) {
                     while (cursor.hasMoreElements()) {
@@ -1744,14 +1707,10 @@
         protected boolean updateNextIndex() {
             // nextIndex == -1 identifies receiver, make sure is expanded
             // before descend.
-            if(nextIndex == -1 && !parent.isExpanded())
-                return false;
-
-            // Check that it can have kids
-            if(childCount == 0)
-                return false;
-            // Make sure next index not beyond child count.
-            else if(++nextIndex >= childCount)
+            if((nextIndex == -1 && !parent.isExpanded()) ||
+                childCount == 0 || // Check that it can have kids
+                ++nextIndex >= childCount) // Make sure next index not beyond
+                                             // child count.
                 return false;
 
             TreeStateNode       child = (TreeStateNode)parent.
--- a/src/java.desktop/share/classes/sun/applet/resources/MsgAppletViewer_es.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.desktop/share/classes/sun/applet/resources/MsgAppletViewer_es.java	Tue Jan 30 16:41:40 2018 +0100
@@ -73,7 +73,7 @@
             {"appletviewer.parse.warning.embed.requiresheight", "Advertencia: la etiqueta <embed> requiere el atributo height."},
             {"appletviewer.parse.warning.embed.requireswidth", "Advertencia: la etiqueta <embed> requiere el atributo width."},
             {"appletviewer.parse.warning.appnotLongersupported", "Advertencia: la etiqueta <app> ya no est\u00E1 soportada, utilice <applet> en su lugar:"},
-            {"appletviewer.deprecated", "Advertencia: la API de applet y AppletViewer est\u00E1n anticuados."},
+            {"appletviewer.deprecated", "Advertencia: la API de applet y AppletViewer est\u00E1n en desuso."},
             {"appletviewer.usage", "Sintaxis: appletviewer <opciones> url(s)\n\ndonde <opciones> incluye:\n  -encoding <codificaci\u00F3n>    Especificar la codificaci\u00F3n de caracteres utilizada por los archivos HTML\n  -J<indicador de tiempo de ejecuci\u00F3n>        Transferir argumento al int\u00E9rprete de Java\n\nLa opci\u00F3n -J es no est\u00E1ndar y est\u00E1 sujeta a cambios sin previo aviso."},
             {"appletviewer.main.err.unsupportedopt", "Opci\u00F3n no soportada: {0}"},
             {"appletviewer.main.err.unrecognizedarg", "Argumento no reconocido: {0}"},
--- a/src/java.desktop/share/classes/sun/awt/resources/awt_de.properties	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.desktop/share/classes/sun/awt/resources/awt_de.properties	Tue Jan 30 16:41:40 2018 +0100
@@ -44,7 +44,7 @@
 AWT.subtract=NumPad -
 AWT.decimal=NumPad .
 AWT.divide=NumPad /
-AWT.delete=L\u00F6schen
+AWT.delete=Entf
 AWT.numLock=Num
 AWT.scrollLock=Rollen
 AWT.f1=F1
--- a/src/java.desktop/share/native/liblcms/LCMS.c	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.desktop/share/native/liblcms/LCMS.c	Tue Jan 30 16:41:40 2018 +0100
@@ -644,7 +644,12 @@
 {
     jclass clsLcmsProfile;
     jobject cmmProfile;
-    jfieldID fid = (*env)->GetFieldID (env,
+    jfieldID fid;
+
+    if (pf == NULL) {
+        return NULL;
+    }
+    fid = (*env)->GetFieldID (env,
         (*env)->GetObjectClass(env, pf),
         "cmmProfile", "Lsun/java2d/cmm/Profile;");
     if (fid == NULL) {
--- a/src/java.desktop/share/native/libsplashscreen/libpng/pngpriv.h	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.desktop/share/native/libsplashscreen/libpng/pngpriv.h	Tue Jan 30 16:41:40 2018 +0100
@@ -284,11 +284,12 @@
 #  endif
 #endif /* PNG_MIPS_MSA_OPT > 0 */
 
+#ifdef PNG_POWERPC_VSX_API_SUPPORTED
 #if PNG_POWERPC_VSX_OPT > 0
 #  define PNG_FILTER_OPTIMIZATIONS png_init_filter_functions_vsx
 #  define PNG_POWERPC_VSX_IMPLEMENTATION 1
 #endif
-
+#endif
 
 /* Is this a build of a DLL where compilation of the object modules requires
  * different preprocessor settings to those required for a simple library?  If
--- a/src/java.desktop/unix/classes/sun/java2d/xr/XRSolidSrcPict.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.desktop/unix/classes/sun/java2d/xr/XRSolidSrcPict.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2014, 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
@@ -47,7 +47,7 @@
 
     public XRSurfaceData prepareSrcPict(int pixelVal) {
         if(pixelVal != curPixVal) {
-            xrCol.setColorValues(pixelVal, false);
+            xrCol.setColorValues(pixelVal, true);
             con.renderRectangle(srcPict.picture, XRUtils.PictOpSrc, xrCol, 0, 0, 1, 1);
             this.curPixVal = pixelVal;
         }
--- a/src/java.desktop/unix/native/libawt_xawt/awt/gtk2_interface.c	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.desktop/unix/native/libawt_xawt/awt/gtk2_interface.c	Tue Jan 30 16:41:40 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved.
+ * 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
@@ -761,46 +761,41 @@
     }
 
     /*
-     * Strip the AT-SPI GTK_MODULEs if present
+     * Strip the AT-SPI GTK_MODULES if present
      */
     gtk_modules_env = getenv ("GTK_MODULES");
+    if ((gtk_modules_env && strstr(gtk_modules_env, "atk-bridge")) ||
+        (gtk_modules_env && strstr(gtk_modules_env, "gail"))) {
+        /* careful, strtok modifies its args */
+        gchar *tmp_env = strdup(gtk_modules_env);
+        if (tmp_env) {
+            /* the new env will be smaller than the old one */
+            gchar *s, *new_env = SAFE_SIZE_STRUCT_ALLOC(malloc,
+                    sizeof(ENV_PREFIX), 1, strlen (gtk_modules_env));
 
-    if (gtk_modules_env && strstr (gtk_modules_env, "atk-bridge") ||
-        gtk_modules_env && strstr (gtk_modules_env, "gail"))
-    {
-        /* the new env will be smaller than the old one */
-        gchar *s, *new_env = SAFE_SIZE_STRUCT_ALLOC(malloc,
-                sizeof(ENV_PREFIX), 1, strlen (gtk_modules_env));
-
-        if (new_env != NULL )
-        {
-            /* careful, strtok modifies its args */
-            gchar *tmp_env = strdup (gtk_modules_env);
-            strcpy(new_env, ENV_PREFIX);
+            if (new_env) {
+                strcpy(new_env, ENV_PREFIX);
 
-            /* strip out 'atk-bridge' and 'gail' */
-            size_t PREFIX_LENGTH = strlen(ENV_PREFIX);
-            while (s = strtok(tmp_env, ":"))
-            {
-                if ((!strstr (s, "atk-bridge")) && (!strstr (s, "gail")))
-                {
-                    if (strlen (new_env) > PREFIX_LENGTH) {
-                        new_env = strcat (new_env, ":");
+                /* strip out 'atk-bridge' and 'gail' */
+                size_t PREFIX_LENGTH = strlen(ENV_PREFIX);
+                gchar *tmp_ptr = NULL;
+                for (s = strtok_r(tmp_env, ":", &tmp_ptr); s;
+                     s = strtok_r(NULL, ":", &tmp_ptr)) {
+                    if ((!strstr(s, "atk-bridge")) && (!strstr(s, "gail"))) {
+                        if (strlen(new_env) > PREFIX_LENGTH) {
+                            new_env = strcat(new_env, ":");
+                        }
+                        new_env = strcat(new_env, s);
                     }
-                    new_env = strcat(new_env, s);
                 }
-                if (tmp_env)
-                {
-                    free (tmp_env);
-                    tmp_env = NULL; /* next call to strtok arg1==NULL */
+                if (putenv(new_env) != 0) {
+                    /* no free() on success, putenv() doesn't copy string */
+                    free(new_env);
                 }
             }
-            putenv (new_env);
-            free (new_env);
-            free (tmp_env);
+            free(tmp_env);
         }
     }
-
     /*
      * GTK should be initialized with gtk_init_check() before use.
      *
--- a/src/java.desktop/unix/native/libawt_xawt/awt/gtk3_interface.c	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.desktop/unix/native/libawt_xawt/awt/gtk3_interface.c	Tue Jan 30 16:41:40 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved.
+ * 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
@@ -580,42 +580,39 @@
     }
 
     /*
-     * Strip the AT-SPI GTK_MODULEs if present
+     * Strip the AT-SPI GTK_MODULES if present
      */
     gtk_modules_env = getenv ("GTK_MODULES");
-    if (gtk_modules_env && strstr (gtk_modules_env, "atk-bridge") ||
-        gtk_modules_env && strstr (gtk_modules_env, "gail"))
-    {
-        /* the new env will be smaller than the old one */
-        gchar *s, *new_env = SAFE_SIZE_STRUCT_ALLOC(malloc,
-                sizeof(ENV_PREFIX), 1, strlen (gtk_modules_env));
-
-        if (new_env != NULL )
-        {
-            /* careful, strtok modifies its args */
-            gchar *tmp_env = strdup (gtk_modules_env);
-            strcpy(new_env, ENV_PREFIX);
-
-            /* strip out 'atk-bridge' and 'gail' */
-            size_t PREFIX_LENGTH = strlen(ENV_PREFIX);
-            while (s = strtok(tmp_env, ":"))
-            {
-                if ((!strstr (s, "atk-bridge")) && (!strstr (s, "gail")))
-                {
-                    if (strlen (new_env) > PREFIX_LENGTH) {
-                        new_env = strcat (new_env, ":");
+    if ((gtk_modules_env && strstr(gtk_modules_env, "atk-bridge")) ||
+        (gtk_modules_env && strstr(gtk_modules_env, "gail"))) {
+        /* careful, strtok modifies its args */
+        gchar *tmp_env = strdup(gtk_modules_env);
+        if (tmp_env) {
+            /* the new env will be smaller than the old one */
+            gchar *s, *new_env = SAFE_SIZE_STRUCT_ALLOC(malloc,
+                    sizeof(ENV_PREFIX), 1, strlen (gtk_modules_env));
+
+            if (new_env) {
+                strcpy(new_env, ENV_PREFIX);
+
+                /* strip out 'atk-bridge' and 'gail' */
+                size_t PREFIX_LENGTH = strlen(ENV_PREFIX);
+                gchar *tmp_ptr = NULL;
+                for (s = strtok_r(tmp_env, ":", &tmp_ptr); s;
+                     s = strtok_r(NULL, ":", &tmp_ptr)) {
+                    if ((!strstr(s, "atk-bridge")) && (!strstr(s, "gail"))) {
+                        if (strlen(new_env) > PREFIX_LENGTH) {
+                            new_env = strcat(new_env, ":");
+                        }
+                        new_env = strcat(new_env, s);
                     }
-                    new_env = strcat(new_env, s);
                 }
-                if (tmp_env)
-                {
-                    free (tmp_env);
-                    tmp_env = NULL; /* next call to strtok arg1==NULL */
+                if (putenv(new_env) != 0) {
+                    /* no free() on success, putenv() doesn't copy string */
+                    free(new_env);
                 }
             }
-            putenv (new_env);
-            free (new_env);
-            free (tmp_env);
+            free(tmp_env);
         }
     }
     /*
--- a/src/java.desktop/windows/classes/sun/awt/shell/Win32ShellFolderManager2.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.desktop/windows/classes/sun/awt/shell/Win32ShellFolderManager2.java	Tue Jan 30 16:41:40 2018 +0100
@@ -448,7 +448,7 @@
                 Win32ShellFolder2 sf = (Win32ShellFolder2)dir;
 
                 return (sf.isFileSystem() && sf.parent != null &&
-                        sf.parent.equals(Win32ShellFolder2.listRoots()));
+                        sf.parent.equals(getDrives()));
             }
             String path = dir.getPath();
 
--- a/src/java.desktop/windows/native/libawt/java2d/d3d/D3DGraphicsDevice.cpp	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.desktop/windows/native/libawt/java2d/d3d/D3DGraphicsDevice.cpp	Tue Jan 30 16:41:40 2018 +0100
@@ -98,7 +98,7 @@
 
     jstring ret = JNU_NewStringPlatform(env, pAdapterId);
 
-    delete pAdapterId;
+    delete[] pAdapterId;
 
     return ret;
 }
--- a/src/java.desktop/windows/native/libawt/windows/WPrinterJob.cpp	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.desktop/windows/native/libawt/windows/WPrinterJob.cpp	Tue Jan 30 16:41:40 2018 +0100
@@ -508,14 +508,14 @@
           names = env->NewObjectArray(cReturned, cls, NULL);
       }
       if (names == NULL || cls == NULL) {
-          delete buf;
+          delete[] buf;
           return names;
       }
 
       for (int i = 0; i < cReturned; i++) {
           utf_str = JNU_NewStringPlatform(env, buf+(buf_len*i));
             if (utf_str == NULL) {
-                delete buf;
+                delete[] buf;
                 return names;
             }
             env->SetObjectArrayElement(names, i, utf_str);
--- a/src/java.desktop/windows/native/libawt/windows/awt_Palette.cpp	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.desktop/windows/native/libawt/windows/awt_Palette.cpp	Tue Jan 30 16:41:40 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 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
@@ -148,7 +148,7 @@
         pEntry->peFlags = PC_EXPLICIT;
     }
     hPal = ::CreatePalette(pLogPal);
-    delete pLogPal;
+    delete[] pLogPal;
     if ( hPal == 0 ) {
         return 0;
     }
--- a/src/java.desktop/windows/native/libawt/windows/awt_Robot.cpp	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.desktop/windows/native/libawt/windows/awt_Robot.cpp	Tue Jan 30 16:41:40 2018 +0100
@@ -285,7 +285,7 @@
 
     // copy pixels into Java array
     env->SetIntArrayRegion(pixelArray, 0, numPixels, (jint *)pixelData);
-    delete pinfo;
+    delete[] pinfo;
 
     // free all the GDI objects we made
     ::SelectObject(hdcMem, hOldBitmap);
--- a/src/java.logging/share/classes/java/util/logging/LogManager.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.logging/share/classes/java/util/logging/LogManager.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -396,12 +396,6 @@
                         // Create and retain Logger for the root of the namespace.
                         owner.addLogger(root);
 
-                        // For backward compatibility: add any handlers configured using
-                        // ".handlers"
-                        owner.createLoggerHandlers("", ".handlers")
-                                .stream()
-                                .forEach(root::addHandler);
-
                         // Initialize level if not yet initialized
                         if (!root.isLevelInitialized()) {
                             root.setLevel(defaultLevel);
@@ -995,7 +989,8 @@
         }
     }
 
-    private List<Handler> createLoggerHandlers(final String name, final String handlersPropertyName)
+    private List<Handler> createLoggerHandlers(final String name,
+                                               final String handlersPropertyName)
     {
         String names[] = parseClassNames(handlersPropertyName);
         List<Handler> handlers = new ArrayList<>(names.length);
@@ -1198,7 +1193,7 @@
         }
         drainLoggerRefQueueBounded();
         LoggerContext cx = getUserContext();
-        if (cx.addLocalLogger(logger)) {
+        if (cx.addLocalLogger(logger) || forceLoadHandlers(logger)) {
             // Do we have a per logger handler too?
             // Note: this will add a 200ms penalty
             loadLoggerHandlers(logger, name, name + ".handlers");
@@ -1208,6 +1203,26 @@
         }
     }
 
+
+    // Checks whether the given logger is a special logger
+    // that still requires handler initialization.
+    // This method will only return true for the root and
+    // global loggers and only if called by the thread that
+    // performs initialization of the LogManager, during that
+    // initialization. Must only be called by addLogger.
+    @SuppressWarnings("deprecation")
+    private boolean forceLoadHandlers(Logger logger) {
+        // Called just after reading the primordial configuration, in
+        // the same thread that reads it.
+        // The root and global logger would already be present in the context
+        // by this point, but we would not have called loadLoggerHandlers
+        // yet.
+        return (logger == rootLogger ||  logger == Logger.global)
+                && !initializationDone
+                && initializedCalled
+                && configurationLock.isHeldByCurrentThread();
+    }
+
     // Private method to set a level on a logger.
     // If necessary, we raise privilege before doing the call.
     private static void doSetLevel(final Logger logger, final Level level) {
--- a/src/java.naming/share/classes/javax/naming/directory/BasicAttributes.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.naming/share/classes/javax/naming/directory/BasicAttributes.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 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
@@ -302,8 +302,8 @@
         s.defaultReadObject();  // read in the ignoreCase flag
         int n = s.readInt();    // number of attributes
         attrs = (n >= 1)
-            ? new Hashtable<String,Attribute>(n * 2)
-            : new Hashtable<String,Attribute>(2); // can't have initial size of 0 (grrr...)
+                ? new Hashtable<>(1 + (int) (Math.min(768, n) / .75f))
+                : new Hashtable<>(2); // can't have initial size of 0 (grrr...)
         while (--n >= 0) {
             put((Attribute)s.readObject());
         }
--- a/src/java.naming/share/classes/sun/security/provider/certpath/ldap/LDAPCertStore.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.naming/share/classes/sun/security/provider/certpath/ldap/LDAPCertStore.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 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
@@ -136,6 +136,11 @@
                         + params.getClass().getName() + " passed");
         }
 
+        SecurityManager security = System.getSecurityManager();
+        if (security != null) {
+            security.checkConnect(serverName, port);
+        }
+
         Key k = new Key(serverName, port);
         LDAPCertStoreImpl lci = certStoreCache.get(k);
         if (lci == null) {
--- a/src/java.naming/share/classes/sun/security/provider/certpath/ldap/LDAPCertStoreImpl.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.naming/share/classes/sun/security/provider/certpath/ldap/LDAPCertStoreImpl.java	Tue Jan 30 16:41:40 2018 +0100
@@ -26,9 +26,11 @@
 package sun.security.provider.certpath.ldap;
 
 import java.io.ByteArrayInputStream;
-import java.io.IOException;
+import java.net.URI;
 import java.util.*;
+import javax.naming.CompositeName;
 import javax.naming.Context;
+import javax.naming.InvalidNameException;
 import javax.naming.NamingEnumeration;
 import javax.naming.NamingException;
 import javax.naming.NameNotFoundException;
@@ -44,6 +46,7 @@
 import javax.naming.ldap.LdapContext;
 import javax.security.auth.x500.X500Principal;
 
+import com.sun.jndi.ldap.LdapReferralException;
 import sun.security.util.HexDumpEncoder;
 import sun.security.provider.certpath.X509CertificatePair;
 import sun.security.util.Cache;
@@ -181,13 +184,9 @@
         try {
             ctx = new InitialLdapContext(env, null);
             /*
-             * By default, follow referrals unless application has
-             * overridden property in an application resource file.
+             * Always deal with referrals here.
              */
-            Hashtable<?,?> currentEnv = ctx.getEnvironment();
-            if (currentEnv.get(Context.REFERRAL) == null) {
-                ctx.addToEnvironment(Context.REFERRAL, "follow-scheme");
-            }
+            ctx.addToEnvironment(Context.REFERRAL, "throw");
         } catch (NamingException e) {
             if (debug != null) {
                 debug.println("LDAPCertStore.engineInit about to throw "
@@ -223,11 +222,25 @@
         private Map<String, byte[][]> valueMap;
         private final List<String> requestedAttributes;
 
-        LDAPRequest(String name) {
-            this.name = name;
+        LDAPRequest(String name) throws CertStoreException {
+            this.name = checkName(name);
             requestedAttributes = new ArrayList<>(5);
         }
 
+        private String checkName(String name) throws CertStoreException {
+            if (name == null) {
+                throw new CertStoreException("Name absent");
+            }
+            try {
+                if (new CompositeName(name).size() > 1) {
+                    throw new CertStoreException("Invalid name: " + name);
+                }
+            } catch (InvalidNameException ine) {
+                throw new CertStoreException("Invalid name: " + name, ine);
+            }
+            return name;
+        }
+
         String getName() {
             return name;
         }
@@ -242,7 +255,6 @@
         /**
          * Gets one or more binary values from an attribute.
          *
-         * @param name          the location holding the attribute
          * @param attrId                the attribute identifier
          * @return                      an array of binary values (byte arrays)
          * @throws NamingException      if a naming exception occurs
@@ -300,6 +312,39 @@
 
             try {
                 attrs = ctx.getAttributes(name, attrIds);
+            } catch (LdapReferralException lre) {
+                // LdapCtx has a hopCount field to avoid infinite loop
+                while (true) {
+                    try {
+                        String newName = (String) lre.getReferralInfo();
+                        URI newUri = new URI(newName);
+                        if (!newUri.getScheme().equalsIgnoreCase("ldap")) {
+                            throw new IllegalArgumentException("Not LDAP");
+                        }
+                        String newDn = newUri.getPath();
+                        if (newDn != null && newDn.charAt(0) == '/') {
+                            newDn = newDn.substring(1);
+                        }
+                        checkName(newDn);
+                    } catch (Exception e) {
+                        throw new NamingException("Cannot follow referral to "
+                                + lre.getReferralInfo());
+                    }
+                    LdapContext refCtx =
+                            (LdapContext)lre.getReferralContext();
+
+                    // repeat the original operation at the new context
+                    try {
+                        attrs = refCtx.getAttributes(name, attrIds);
+                        break;
+                    } catch (LdapReferralException re) {
+                        lre = re;
+                        continue;
+                    } finally {
+                        // Make sure we close referral context
+                        refCtx.close();
+                    }
+                }
             } catch (CommunicationException ce) {
                 communicationError = true;
                 throw ce;
@@ -513,7 +558,7 @@
      * <code>X509CertSelector</code>), a <code>CertStoreException</code> is
      * thrown.
      *
-     * @param selector a <code>X509CertSelector</code> used to select which
+     * @param xsel a <code>X509CertSelector</code> used to select which
      *  <code>Certificate</code>s should be returned.
      * @return a <code>Collection</code> of <code>X509Certificate</code>s that
      *         match the specified selector
@@ -684,7 +729,7 @@
      * (or the selector is not an <code>X509CRLSelector</code>), a
      * <code>CertStoreException</code> is thrown.
      *
-     * @param selector A <code>X509CRLSelector</code> used to select which
+     * @param xsel A <code>X509CRLSelector</code> used to select which
      *  <code>CRL</code>s should be returned. Specify <code>null</code>
      *  to return all <code>CRL</code>s.
      * @return A <code>Collection</code> of <code>X509CRL</code>s that
--- a/src/java.rmi/share/classes/sun/rmi/registry/RegistryImpl.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.rmi/share/classes/sun/rmi/registry/RegistryImpl.java	Tue Jan 30 16:41:40 2018 +0100
@@ -177,7 +177,7 @@
             }
         } else {
             LiveRef lref = new LiveRef(id, port, csf, ssf);
-            setup(new UnicastServerRef2(lref, RegistryImpl::registryFilter));
+            setup(new UnicastServerRef2(lref, serialFilter));
         }
     }
 
--- a/src/java.rmi/share/classes/sun/rmi/server/resources/rmid.properties	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.rmi/share/classes/sun/rmi/server/resources/rmid.properties	Tue Jan 30 16:41:40 2018 +0100
@@ -1,6 +1,6 @@
 #
 #
-# Copyright (c) 1998, 2005, 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
@@ -50,7 +50,7 @@
 
 # {0} = the (string) illegal argument in question
 rmid.syntax.illegal.option=\
-	illegal option: {0}
+	invalid option: {0}
 
 # {0} = the (string) reason text that came with a thrown exception
 # "Activation.main" should not be translated, because it's a codepoint
--- a/src/java.scripting/share/classes/com/sun/tools/script/shell/Main.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.scripting/share/classes/com/sun/tools/script/shell/Main.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -122,7 +122,11 @@
                     }
                 }
                 continue;
-            } else if (arg.equals("-?") || arg.equals("-help")) {
+            } else if (arg.equals("-?") ||
+                       arg.equals("-h") ||
+                       arg.equals("--help") ||
+                       // -help: legacy.
+                       arg.equals("-help")) {
                 usage(EXIT_SUCCESS);
             } else if (arg.equals("-e")) {
                 seenScript = true;
--- a/src/java.scripting/share/classes/com/sun/tools/script/shell/messages.properties	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.scripting/share/classes/com/sun/tools/script/shell/messages.properties	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -55,8 +55,7 @@
 \  \-f <script file>     Evaluate given script file \n\
 \  \-f -                 Interactive mode, read script from standard input \n\
 \  \                     If this is used, this should be the last -f option \n\
-\  \-help                Print this usage message and exit \n\
-\  \-?                   Print this usage message and exit \n\
+\  \-? -h --help -help   Print this help message and exit \n\
 \  \-q                   List all scripting engines available and exit \n\
 \  \n\
 If [arguments..] are present and if no -e or -f option is used, then first\n\
--- a/src/java.security.jgss/share/classes/javax/security/auth/kerberos/KeyImpl.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.security.jgss/share/classes/javax/security/auth/kerberos/KeyImpl.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 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
@@ -138,6 +138,12 @@
         case EncryptedData.ETYPE_AES256_CTS_HMAC_SHA1_96:
             return "aes256-cts-hmac-sha1-96";
 
+        case EncryptedData.ETYPE_AES128_CTS_HMAC_SHA256_128:
+            return "aes128-cts-hmac-sha256-128";
+
+        case EncryptedData.ETYPE_AES256_CTS_HMAC_SHA384_192:
+            return "aes256-cts-hmac-sha384-192";
+
         case EncryptedData.ETYPE_NULL:
             return "none";
 
--- a/src/java.security.jgss/share/classes/sun/net/www/protocol/http/spnego/NegotiateCallbackHandler.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.security.jgss/share/classes/sun/net/www/protocol/http/spnego/NegotiateCallbackHandler.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved.
+ * 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
@@ -35,6 +35,7 @@
 import javax.security.auth.callback.PasswordCallback;
 import javax.security.auth.callback.UnsupportedCallbackException;
 import sun.net.www.protocol.http.HttpCallerInfo;
+import sun.security.jgss.LoginConfigImpl;
 
 /**
  * @since 1.6
@@ -61,19 +62,28 @@
     private void getAnswer() {
         if (!answered) {
             answered = true;
-            PasswordAuthentication passAuth =
-                    Authenticator.requestPasswordAuthentication(
-                    hci.authenticator,
-                    hci.host, hci.addr, hci.port, hci.protocol,
-                    hci.prompt, hci.scheme, hci.url, hci.authType);
-            /**
-             * To be compatible with existing callback handler implementations,
-             * when the underlying Authenticator is canceled, username and
-             * password are assigned null. No exception is thrown.
-             */
-            if (passAuth != null) {
-                username = passAuth.getUserName();
-                password = passAuth.getPassword();
+            Authenticator auth;
+            if (hci.authenticator != null) {
+                auth = hci.authenticator;
+            } else {
+                auth = LoginConfigImpl.HTTP_USE_GLOBAL_CREDS ?
+                        Authenticator.getDefault() : null;
+            }
+
+            if (auth != null) {
+                PasswordAuthentication passAuth =
+                        auth.requestPasswordAuthenticationInstance(
+                                hci.host, hci.addr, hci.port, hci.protocol,
+                                hci.prompt, hci.scheme, hci.url, hci.authType);
+                /**
+                 * To be compatible with existing callback handler implementations,
+                 * when the underlying Authenticator is canceled, username and
+                 * password are assigned null. No exception is thrown.
+                 */
+                if (passAuth != null) {
+                    username = passAuth.getUserName();
+                    password = passAuth.getPassword();
+                }
             }
         }
     }
--- a/src/java.security.jgss/share/classes/sun/security/jgss/GSSUtil.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.security.jgss/share/classes/sun/security/jgss/GSSUtil.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 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
@@ -270,24 +270,17 @@
      */
     public static boolean useSubjectCredsOnly(GSSCaller caller) {
 
-        // HTTP/SPNEGO doesn't use the standard JAAS framework. Instead, it
-        // uses the java.net.Authenticator style, therefore always return
-        // false here.
+        String propValue = GetPropertyAction.privilegedGetProperty(
+                "javax.security.auth.useSubjectCredsOnly");
+
+        // Invalid values should be ignored and the default assumed.
         if (caller instanceof HttpCaller) {
-            return false;
+            // Default for HTTP/SPNEGO is false.
+            return "true".equalsIgnoreCase(propValue);
+        } else {
+            // Default for JGSS is true.
+            return !("false".equalsIgnoreCase(propValue));
         }
-        /*
-         * Don't use GetBooleanAction because the default value in the JRE
-         * (when this is unset) has to treated as true.
-         */
-        String propValue = AccessController.doPrivileged(
-                new GetPropertyAction("javax.security.auth.useSubjectCredsOnly",
-                "true"));
-        /*
-         * This property has to be explicitly set to "false". Invalid
-         * values should be ignored and the default "true" assumed.
-         */
-        return (!propValue.equalsIgnoreCase("false"));
     }
 
     /**
--- a/src/java.security.jgss/share/classes/sun/security/jgss/LoginConfigImpl.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.security.jgss/share/classes/sun/security/jgss/LoginConfigImpl.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
+ * 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
@@ -29,6 +29,7 @@
 import javax.security.auth.login.AppConfigurationEntry;
 import javax.security.auth.login.Configuration;
 import org.ietf.jgss.Oid;
+import sun.security.action.GetPropertyAction;
 
 /**
  * A Configuration implementation especially designed for JGSS.
@@ -44,6 +45,16 @@
     private static final sun.security.util.Debug debug =
         sun.security.util.Debug.getInstance("gssloginconfig", "\t[GSS LoginConfigImpl]");
 
+    public static final boolean HTTP_USE_GLOBAL_CREDS;
+
+    static {
+        String prop = GetPropertyAction
+                .privilegedGetProperty("http.use.global.creds");
+        //HTTP_USE_GLOBAL_CREDS = "true".equalsIgnoreCase(prop); // default false
+        HTTP_USE_GLOBAL_CREDS = !"false".equalsIgnoreCase(prop); // default true
+    }
+
+
     /**
      * A new instance of LoginConfigImpl must be created for each login request
      * since it's only used by a single (caller, mech) pair
@@ -178,7 +189,11 @@
                 options.put("principal", "*");
                 options.put("isInitiator", "false");
             } else {
-                options.put("useTicketCache", "true");
+                if (caller instanceof HttpCaller && !HTTP_USE_GLOBAL_CREDS) {
+                    options.put("useTicketCache", "false");
+                } else {
+                    options.put("useTicketCache", "true");
+                }
                 options.put("doNotPrompt", "false");
             }
             return new AppConfigurationEntry[] {
--- a/src/java.security.jgss/share/classes/sun/security/jgss/krb5/CipherHelper.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.security.jgss/share/classes/sun/security/jgss/krb5/CipherHelper.java	Tue Jan 30 16:41:40 2018 +0100
@@ -40,6 +40,8 @@
 import java.security.GeneralSecurityException;
 import java.security.NoSuchAlgorithmException;
 import sun.security.krb5.*;
+import sun.security.krb5.internal.crypto.Aes128Sha2;
+import sun.security.krb5.internal.crypto.Aes256Sha2;
 import sun.security.krb5.internal.crypto.Des3;
 import sun.security.krb5.internal.crypto.Aes128;
 import sun.security.krb5.internal.crypto.Aes256;
@@ -101,6 +103,8 @@
 
         case EncryptedData.ETYPE_AES128_CTS_HMAC_SHA1_96:
         case EncryptedData.ETYPE_AES256_CTS_HMAC_SHA1_96:
+        case EncryptedData.ETYPE_AES128_CTS_HMAC_SHA256_128:
+        case EncryptedData.ETYPE_AES256_CTS_HMAC_SHA384_192:
             sgnAlg = -1;
             sealAlg = -1;
             break;
@@ -365,6 +369,33 @@
                 throw ge;
             }
 
+        case EncryptedData.ETYPE_AES128_CTS_HMAC_SHA256_128:
+            try {
+                byte[] answer = Aes128Sha2.calculateChecksum(keybytes, key_usage,
+                        buf, 0, total);
+                return answer;
+            } catch (GeneralSecurityException e) {
+                GSSException ge = new GSSException(GSSException.FAILURE, -1,
+                        "Could not use AES128 signing algorithm - " +
+                                e.getMessage());
+                ge.initCause(e);
+                throw ge;
+            }
+
+        case EncryptedData.ETYPE_AES256_CTS_HMAC_SHA384_192:
+            try {
+                byte[] answer = Aes256Sha2.calculateChecksum(keybytes, key_usage,
+                        buf, 0, total);
+                return answer;
+            } catch (GeneralSecurityException e) {
+                GSSException ge = new GSSException(GSSException.FAILURE, -1,
+                        "Could not use AES256 signing algorithm - " +
+                                e.getMessage());
+                ge.initCause(e);
+                throw ge;
+            }
+
+
         default:
             throw new GSSException(GSSException.FAILURE, -1,
                 "Unsupported encryption type: " + etype);
@@ -517,6 +548,11 @@
         case EncryptedData.ETYPE_AES256_CTS_HMAC_SHA1_96:
             return Aes256.getChecksumLength();
 
+        case EncryptedData.ETYPE_AES128_CTS_HMAC_SHA256_128:
+            return Aes128Sha2.getChecksumLength();
+        case EncryptedData.ETYPE_AES256_CTS_HMAC_SHA384_192:
+            return Aes256Sha2.getChecksumLength();
+
         case EncryptedData.ETYPE_ARCFOUR_HMAC:
             // only first 8 octets of HMAC Sgn_Cksum are used
             return HMAC_CHECKSUM_SIZE;
@@ -574,6 +610,14 @@
                     aes256Decrypt(token, ciphertext, cStart, cLen,
                                 plaintext, pStart, key_usage);
                     break;
+            case EncryptedData.ETYPE_AES128_CTS_HMAC_SHA256_128:
+                    aes128Sha2Decrypt(token, ciphertext, cStart, cLen,
+                            plaintext, pStart, key_usage);
+                    break;
+            case EncryptedData.ETYPE_AES256_CTS_HMAC_SHA384_192:
+                    aes256Sha2Decrypt(token, ciphertext, cStart, cLen,
+                            plaintext, pStart, key_usage);
+                    break;
             default:
                     throw new GSSException(GSSException.FAILURE, -1,
                         "Unsupported etype: " + etype);
@@ -654,6 +698,14 @@
                     aes256Decrypt(token, ciphertext, 0, cLen,
                                 plaintext, pStart, key_usage);
                     break;
+            case EncryptedData.ETYPE_AES128_CTS_HMAC_SHA256_128:
+                    aes128Sha2Decrypt(token, ciphertext, 0, cLen,
+                            plaintext, pStart, key_usage);
+                    break;
+            case EncryptedData.ETYPE_AES256_CTS_HMAC_SHA384_192:
+                    aes256Sha2Decrypt(token, ciphertext, 0, cLen,
+                            plaintext, pStart, key_usage);
+                    break;
             default:
                     throw new GSSException(GSSException.FAILURE, -1,
                         "Unsupported etype: " + etype);
@@ -720,6 +772,12 @@
             case EncryptedData.ETYPE_AES256_CTS_HMAC_SHA1_96:
                 return aes256Encrypt(confounder, tokenHeader,
                             plaintext, start, len, key_usage);
+            case EncryptedData.ETYPE_AES128_CTS_HMAC_SHA256_128:
+                return aes128Sha2Encrypt(confounder, tokenHeader,
+                        plaintext, start, len, key_usage);
+            case EncryptedData.ETYPE_AES256_CTS_HMAC_SHA384_192:
+                return aes256Sha2Encrypt(confounder, tokenHeader,
+                        plaintext, start, len, key_usage);
             default:
                 throw new GSSException(GSSException.FAILURE, -1,
                     "Unsupported etype: " + etype);
@@ -796,6 +854,14 @@
                     ctext = aes256Encrypt(confounder, tokenHeader,
                                 plaintext, pStart, pLen, key_usage);
                     break;
+            case EncryptedData.ETYPE_AES128_CTS_HMAC_SHA256_128:
+                    ctext = aes128Sha2Encrypt(confounder, tokenHeader,
+                            plaintext, pStart, pLen, key_usage);
+                    break;
+            case EncryptedData.ETYPE_AES256_CTS_HMAC_SHA384_192:
+                    ctext = aes256Sha2Encrypt(confounder, tokenHeader,
+                            plaintext, pStart, pLen, key_usage);
+                    break;
             default:
                     throw new GSSException(GSSException.FAILURE, -1,
                         "Unsupported etype: " + etype);
@@ -1317,6 +1383,38 @@
         }
     }
 
+    private byte[] aes128Sha2Encrypt(byte[] confounder, byte[] tokenHeader,
+            byte[] plaintext, int start, int len, int key_usage)
+            throws GSSException {
+
+        // encrypt { AES-plaintext-data | filler | header }
+        // AES-plaintext-data { confounder | plaintext }
+        // WrapToken = { tokenHeader |
+        //      Encrypt (confounder | plaintext | tokenHeader ) | HMAC }
+
+        byte[] all = new byte[confounder.length + len + tokenHeader.length];
+        System.arraycopy(confounder, 0, all, 0, confounder.length);
+        System.arraycopy(plaintext, start, all, confounder.length, len);
+        System.arraycopy(tokenHeader, 0, all, confounder.length+len,
+                tokenHeader.length);
+
+        // Krb5Token.debug("\naes128Sha2Encrypt:" + Krb5Token.getHexBytes(all));
+        try {
+            byte[] answer = Aes128Sha2.encryptRaw(keybytes, key_usage,
+                    ZERO_IV_AES,
+                    all, 0, all.length);
+            // Krb5Token.debug("\naes128Sha2Encrypt encrypted:" +
+            //                  Krb5Token.getHexBytes(answer));
+            return answer;
+        } catch (Exception e) {
+            // GeneralSecurityException, KrbCryptoException
+            GSSException ge = new GSSException(GSSException.FAILURE, -1,
+                    "Could not use Aes128Sha2 Cipher - " + e.getMessage());
+            ge.initCause(e);
+            throw ge;
+        }
+    }
+
     private void aes128Decrypt(WrapToken_v2 token, byte[] ciphertext,
         int cStart, int cLen, byte[] plaintext, int pStart, int key_usage)
         throws GSSException {
@@ -1354,6 +1452,43 @@
         */
     }
 
+    private void aes128Sha2Decrypt(WrapToken_v2 token, byte[] ciphertext,
+            int cStart, int cLen, byte[] plaintext, int pStart, int key_usage)
+            throws GSSException {
+
+        byte[] ptext = null;
+
+        try {
+            ptext = Aes128Sha2.decryptRaw(keybytes, key_usage,
+                    ZERO_IV_AES, ciphertext, cStart, cLen);
+        } catch (GeneralSecurityException e) {
+            GSSException ge = new GSSException(GSSException.FAILURE, -1,
+                    "Could not use AES128Sha2 Cipher - " + e.getMessage());
+            ge.initCause(e);
+            throw ge;
+        }
+
+        /*
+        Krb5Token.debug("\naes128Sha2Decrypt in: " +
+            Krb5Token.getHexBytes(ciphertext, cStart, cLen));
+        Krb5Token.debug("\naes128Sha2Decrypt plain: " +
+            Krb5Token.getHexBytes(ptext));
+        Krb5Token.debug("\naes128Sha2Decrypt ptext: " +
+            Krb5Token.getHexBytes(ptext));
+        */
+
+        // Strip out confounder and token header
+        int len = ptext.length - WrapToken_v2.CONFOUNDER_SIZE -
+                WrapToken_v2.TOKEN_HEADER_SIZE;
+        System.arraycopy(ptext, WrapToken_v2.CONFOUNDER_SIZE,
+                plaintext, pStart, len);
+
+        /*
+        Krb5Token.debug("\naes128Sha2Decrypt plaintext: " +
+            Krb5Token.getHexBytes(plaintext, pStart, len));
+        */
+    }
+
     private byte[] aes256Encrypt(byte[] confounder, byte[] tokenHeader,
         byte[] plaintext, int start, int len, int key_usage)
         throws GSSException {
@@ -1386,6 +1521,38 @@
         }
     }
 
+    private byte[] aes256Sha2Encrypt(byte[] confounder, byte[] tokenHeader,
+            byte[] plaintext, int start, int len, int key_usage)
+            throws GSSException {
+
+        // encrypt { AES-plaintext-data | filler | header }
+        // AES-plaintext-data { confounder | plaintext }
+        // WrapToken = { tokenHeader |
+        //       Encrypt (confounder | plaintext | tokenHeader ) | HMAC }
+
+        byte[] all = new byte[confounder.length + len + tokenHeader.length];
+        System.arraycopy(confounder, 0, all, 0, confounder.length);
+        System.arraycopy(plaintext, start, all, confounder.length, len);
+        System.arraycopy(tokenHeader, 0, all, confounder.length+len,
+                tokenHeader.length);
+
+        // Krb5Token.debug("\naes256Sha2Encrypt:" + Krb5Token.getHexBytes(all));
+
+        try {
+            byte[] answer = Aes256Sha2.encryptRaw(keybytes, key_usage,
+                    ZERO_IV_AES, all, 0, all.length);
+            // Krb5Token.debug("\naes256Sha2Encrypt encrypted:" +
+            //  Krb5Token.getHexBytes(answer));
+            return answer;
+        } catch (Exception e) {
+            // GeneralSecurityException, KrbCryptoException
+            GSSException ge = new GSSException(GSSException.FAILURE, -1,
+                    "Could not use Aes256Sha2 Cipher - " + e.getMessage());
+            ge.initCause(e);
+            throw ge;
+        }
+    }
+
     private void aes256Decrypt(WrapToken_v2 token, byte[] ciphertext,
         int cStart, int cLen, byte[] plaintext, int pStart, int key_usage)
         throws GSSException {
@@ -1423,6 +1590,43 @@
 
     }
 
+    private void aes256Sha2Decrypt(WrapToken_v2 token, byte[] ciphertext,
+            int cStart, int cLen, byte[] plaintext, int pStart, int key_usage)
+            throws GSSException {
+
+        byte[] ptext;
+        try {
+            ptext = Aes256Sha2.decryptRaw(keybytes, key_usage,
+                    ZERO_IV_AES, ciphertext, cStart, cLen);
+        } catch (GeneralSecurityException e) {
+            GSSException ge = new GSSException(GSSException.FAILURE, -1,
+                    "Could not use AES256Sha2 Cipher - " + e.getMessage());
+            ge.initCause(e);
+            throw ge;
+        }
+
+        /*
+        Krb5Token.debug("\naes256Sha2Decrypt in: " +
+            Krb5Token.getHexBytes(ciphertext, cStart, cLen));
+        Krb5Token.debug("\naes256Sha2Decrypt plain: " +
+            Krb5Token.getHexBytes(ptext));
+        Krb5Token.debug("\naes256Sha2Decrypt ptext: " +
+            Krb5Token.getHexBytes(ptext));
+        */
+
+        // Strip out confounder and token header
+        int len = ptext.length - WrapToken_v2.CONFOUNDER_SIZE -
+                WrapToken_v2.TOKEN_HEADER_SIZE;
+        System.arraycopy(ptext, WrapToken_v2.CONFOUNDER_SIZE,
+                plaintext, pStart, len);
+
+        /*
+        Krb5Token.debug("\naes256Sha2Decrypt plaintext: " +
+            Krb5Token.getHexBytes(plaintext, pStart, len));
+        */
+
+    }
+
     /**
      * This class provides a truncated inputstream needed by WrapToken. The
      * truncated inputstream is passed to CipherInputStream. It prevents
--- a/src/java.security.jgss/share/classes/sun/security/krb5/Checksum.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.security.jgss/share/classes/sun/security/krb5/Checksum.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 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
@@ -66,6 +66,10 @@
     public static final int CKSUMTYPE_HMAC_SHA1_96_AES128 = 15;        // 96
     public static final int CKSUMTYPE_HMAC_SHA1_96_AES256 = 16;        // 96
 
+    // rfc8009
+    public static final int CKSUMTYPE_HMAC_SHA256_128_AES128 = 19;        // 96
+    public static final int CKSUMTYPE_HMAC_SHA384_192_AES256 = 20;        // 96
+
     // draft-brezak-win2k-krb-rc4-hmac-04.txt
     public static final int CKSUMTYPE_HMAC_MD5_ARCFOUR = -138;
 
--- a/src/java.security.jgss/share/classes/sun/security/krb5/Config.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.security.jgss/share/classes/sun/security/krb5/Config.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -578,7 +578,8 @@
                             if (Files.isDirectory(p)) continue;
                             String name = p.getFileName().toString();
                             if (name.matches("[a-zA-Z0-9_-]+") ||
-                                    name.endsWith(".conf")) {
+                                    (!name.startsWith(".") &&
+                                            name.endsWith(".conf"))) {
                                 // if dir is absolute, so is p
                                 readConfigFileLines(p, content, dups);
                             }
@@ -1030,11 +1031,19 @@
         } else if (input.startsWith("a") || (input.startsWith("A"))) {
             // AES
             if (input.equalsIgnoreCase("aes128-cts") ||
-                input.equalsIgnoreCase("aes128-cts-hmac-sha1-96")) {
+                    input.equalsIgnoreCase("aes128-sha1") ||
+                    input.equalsIgnoreCase("aes128-cts-hmac-sha1-96")) {
                 result = EncryptedData.ETYPE_AES128_CTS_HMAC_SHA1_96;
             } else if (input.equalsIgnoreCase("aes256-cts") ||
-                input.equalsIgnoreCase("aes256-cts-hmac-sha1-96")) {
+                    input.equalsIgnoreCase("aes256-sha1") ||
+                    input.equalsIgnoreCase("aes256-cts-hmac-sha1-96")) {
                 result = EncryptedData.ETYPE_AES256_CTS_HMAC_SHA1_96;
+            } else if (input.equalsIgnoreCase("aes128-sha2") ||
+                    input.equalsIgnoreCase("aes128-cts-hmac-sha256-128")) {
+                result = EncryptedData.ETYPE_AES128_CTS_HMAC_SHA256_128;
+            } else if (input.equalsIgnoreCase("aes256-sha2") ||
+                    input.equalsIgnoreCase("aes256-cts-hmac-sha384-192")) {
+                result = EncryptedData.ETYPE_AES256_CTS_HMAC_SHA384_192;
             // ARCFOUR-HMAC
             } else if (input.equalsIgnoreCase("arcfour-hmac") ||
                    input.equalsIgnoreCase("arcfour-hmac-md5")) {
@@ -1057,6 +1066,10 @@
             result = Checksum.CKSUMTYPE_HMAC_SHA1_96_AES128;
         } else if (input.equalsIgnoreCase("hmac-sha1-96-aes256")) {
             result = Checksum.CKSUMTYPE_HMAC_SHA1_96_AES256;
+        } else if (input.equalsIgnoreCase("hmac-sha256-128-aes128")) {
+            result = Checksum.CKSUMTYPE_HMAC_SHA256_128_AES128;
+        } else if (input.equalsIgnoreCase("hmac-sha384-192-aes256")) {
+            result = Checksum.CKSUMTYPE_HMAC_SHA384_192_AES256;
         } else if (input.equalsIgnoreCase("hmac-md5-rc4") ||
                 input.equalsIgnoreCase("hmac-md5-arcfour") ||
                 input.equalsIgnoreCase("hmac-md5-enc")) {
--- a/src/java.security.jgss/share/classes/sun/security/krb5/EncryptedData.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.security.jgss/share/classes/sun/security/krb5/EncryptedData.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 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
@@ -79,6 +79,12 @@
     public static final int
          ETYPE_AES256_CTS_HMAC_SHA1_96 = 18; // 16      0           16
 
+    // rfc8009
+    public static final int
+        ETYPE_AES128_CTS_HMAC_SHA256_128 = 19; // 16      0           16
+    public static final int
+        ETYPE_AES256_CTS_HMAC_SHA384_192 = 20; // 16      0           16
+
     /* used by self */
     private EncryptedData() {
     }
--- a/src/java.security.jgss/share/classes/sun/security/krb5/EncryptionKey.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.security.jgss/share/classes/sun/security/krb5/EncryptionKey.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 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
@@ -252,6 +252,12 @@
                 case EncryptedData.ETYPE_AES256_CTS_HMAC_SHA1_96:
                         return Aes256.stringToKey(password, salt, s2kparams);
 
+                case EncryptedData.ETYPE_AES128_CTS_HMAC_SHA256_128:
+                        return Aes128Sha2.stringToKey(password, salt, s2kparams);
+
+                case EncryptedData.ETYPE_AES256_CTS_HMAC_SHA384_192:
+                    return Aes256Sha2.stringToKey(password, salt, s2kparams);
+
                 default:
                         throw new IllegalArgumentException("encryption type " +
                         EType.toString(keyType) + " not supported");
@@ -293,6 +299,15 @@
                 throw new IllegalArgumentException("Algorithm " + algorithm +
                         " not enabled");
             }
+        } else if (algorithm.equalsIgnoreCase("aes128-cts-hmac-sha256-128")) {
+            keyType = EncryptedData.ETYPE_AES128_CTS_HMAC_SHA256_128;
+        } else if (algorithm.equalsIgnoreCase("aes256-cts-hmac-sha384-192")) {
+            keyType = EncryptedData.ETYPE_AES256_CTS_HMAC_SHA384_192;
+            // validate if AES256 is enabled
+            if (!EType.isSupported(keyType)) {
+                throw new IllegalArgumentException("Algorithm " + algorithm +
+                        " not enabled");
+            }
         } else {
             throw new IllegalArgumentException("Algorithm " + algorithm +
                 " not supported");
--- a/src/java.security.jgss/share/classes/sun/security/krb5/KrbTgsReq.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.security.jgss/share/classes/sun/security/krb5/KrbTgsReq.java	Tue Jan 30 16:41:40 2018 +0100
@@ -356,6 +356,8 @@
         case Checksum.CKSUMTYPE_HMAC_MD5_ARCFOUR:
         case Checksum.CKSUMTYPE_HMAC_SHA1_96_AES128:
         case Checksum.CKSUMTYPE_HMAC_SHA1_96_AES256:
+        case Checksum.CKSUMTYPE_HMAC_SHA256_128_AES128:
+        case Checksum.CKSUMTYPE_HMAC_SHA384_192_AES256:
             cksum = new Checksum(Checksum.CKSUMTYPE_DEFAULT, temp, key,
                 KeyUsage.KU_PA_TGS_REQ_CKSUM);
             break;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/java.security.jgss/share/classes/sun/security/krb5/internal/crypto/Aes128CtsHmacSha2EType.java	Tue Jan 30 16:41:40 2018 +0100
@@ -0,0 +1,112 @@
+/*
+ * 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.
+ */
+
+package sun.security.krb5.internal.crypto;
+
+import sun.security.krb5.KrbCryptoException;
+import sun.security.krb5.internal.*;
+import java.security.GeneralSecurityException;
+import sun.security.krb5.EncryptedData;
+import sun.security.krb5.Checksum;
+
+/*
+ * This class encapsulates the encryption type for aes128-cts-hmac-sha256-128
+ */
+
+public final class Aes128CtsHmacSha2EType extends EType {
+
+    public int eType() {
+        return EncryptedData.ETYPE_AES128_CTS_HMAC_SHA256_128;
+    }
+
+    public int minimumPadSize() {
+        return 0;
+    }
+
+    public int confounderSize() {
+        return blockSize();
+    }
+
+    public int checksumType() {
+        return Checksum.CKSUMTYPE_HMAC_SHA256_128_AES128;
+    }
+
+    public int checksumSize() {
+        return Aes128Sha2.getChecksumLength();
+    }
+
+    public int blockSize() {
+        return 16;
+    }
+
+    public int keyType() {
+        return Krb5.KEYTYPE_AES;
+    }
+
+    public int keySize() {
+        return 16; // bytes
+    }
+
+    public byte[] encrypt(byte[] data, byte[] key, int usage)
+        throws KrbCryptoException {
+        byte[] ivec = new byte[blockSize()];
+        return encrypt(data, key, ivec, usage);
+    }
+
+    public byte[] encrypt(byte[] data, byte[] key, byte[] ivec, int usage)
+        throws KrbCryptoException {
+        try {
+            return Aes128Sha2.encrypt(key, usage, ivec, data, 0, data.length);
+        } catch (GeneralSecurityException e) {
+            KrbCryptoException ke = new KrbCryptoException(e.getMessage());
+            ke.initCause(e);
+            throw ke;
+        }
+    }
+
+    public byte[] decrypt(byte[] cipher, byte[] key, int usage)
+        throws KrbApErrException, KrbCryptoException {
+        byte[] ivec = new byte[blockSize()];
+        return decrypt(cipher, key, ivec, usage);
+    }
+
+    public byte[] decrypt(byte[] cipher, byte[] key, byte[] ivec, int usage)
+        throws KrbApErrException, KrbCryptoException {
+        try {
+            return Aes128Sha2.decrypt(key, usage, ivec, cipher, 0, cipher.length);
+        } catch (GeneralSecurityException e) {
+            KrbCryptoException ke = new KrbCryptoException(e.getMessage());
+            ke.initCause(e);
+            throw ke;
+        }
+    }
+
+    // Override default, because our decrypted data does not return confounder
+    // Should eventually get rid of EType.decryptedData and
+    // EncryptedData.decryptedData altogether
+    public byte[] decryptedData(byte[] data) {
+        return data;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/java.security.jgss/share/classes/sun/security/krb5/internal/crypto/Aes128Sha2.java	Tue Jan 30 16:41:40 2018 +0100
@@ -0,0 +1,83 @@
+/*
+ * 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.
+ */
+
+package sun.security.krb5.internal.crypto;
+
+import sun.security.krb5.internal.crypto.dk.AesSha2DkCrypto;
+import sun.security.krb5.KrbCryptoException;
+import java.security.GeneralSecurityException;
+
+/**
+ * Class with static methods for doing aes128-cts-hmac-sha256-128 operations.
+ */
+
+public class Aes128Sha2 {
+    private static final AesSha2DkCrypto CRYPTO = new AesSha2DkCrypto(128);
+
+    private Aes128Sha2() {
+    }
+
+    public static byte[] stringToKey(char[] password, String salt, byte[] params)
+        throws GeneralSecurityException {
+        return CRYPTO.stringToKey(password, salt, params);
+    }
+
+    // in bytes
+    public static int getChecksumLength() {
+        return CRYPTO.getChecksumLength();
+    }
+
+    public static byte[] calculateChecksum(byte[] baseKey, int usage,
+        byte[] input, int start, int len) throws GeneralSecurityException {
+            return CRYPTO.calculateChecksum(baseKey, usage, input, start, len);
+    }
+
+    public static byte[] encrypt(byte[] baseKey, int usage,
+        byte[] ivec, byte[] plaintext, int start, int len)
+        throws GeneralSecurityException, KrbCryptoException {
+            return CRYPTO.encrypt(baseKey, usage, ivec, null /* new_ivec */,
+                plaintext, start, len);
+    }
+
+    /* Encrypt plaintext; do not add confounder, or checksum */
+    public static byte[] encryptRaw(byte[] baseKey, int usage,
+        byte[] ivec, byte[] plaintext, int start, int len)
+        throws GeneralSecurityException, KrbCryptoException {
+        return CRYPTO.encryptRaw(baseKey, usage, ivec, plaintext, start, len);
+    }
+
+    public static byte[] decrypt(byte[] baseKey, int usage, byte[] ivec,
+        byte[] ciphertext, int start, int len)
+        throws GeneralSecurityException {
+        return CRYPTO.decrypt(baseKey, usage, ivec, ciphertext, start, len);
+    }
+
+    /* Decrypt ciphertext; do not remove confounder, or check checksum */
+    public static byte[] decryptRaw(byte[] baseKey, int usage, byte[] ivec,
+        byte[] ciphertext, int start, int len)
+        throws GeneralSecurityException {
+        return CRYPTO.decryptRaw(baseKey, usage, ivec, ciphertext, start, len);
+    }
+};
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/java.security.jgss/share/classes/sun/security/krb5/internal/crypto/Aes256CtsHmacSha2EType.java	Tue Jan 30 16:41:40 2018 +0100
@@ -0,0 +1,112 @@
+/*
+ * 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.
+ */
+
+package sun.security.krb5.internal.crypto;
+
+import sun.security.krb5.KrbCryptoException;
+import sun.security.krb5.internal.*;
+import java.security.GeneralSecurityException;
+import sun.security.krb5.EncryptedData;
+import sun.security.krb5.Checksum;
+
+/*
+ * This class encapsulates the encryption type for aes256-cts-hmac-sha384-192
+ */
+
+public final class Aes256CtsHmacSha2EType extends EType {
+
+    public int eType() {
+        return EncryptedData.ETYPE_AES256_CTS_HMAC_SHA384_192;
+    }
+
+    public int minimumPadSize() {
+        return 0;
+    }
+
+    public int confounderSize() {
+        return blockSize();
+    }
+
+    public int checksumType() {
+        return Checksum.CKSUMTYPE_HMAC_SHA384_192_AES256;
+    }
+
+    public int checksumSize() {
+        return Aes256Sha2.getChecksumLength();
+    }
+
+    public int blockSize() {
+        return 16;
+    }
+
+    public int keyType() {
+        return Krb5.KEYTYPE_AES;
+    }
+
+    public int keySize() {
+        return 32; // bytes
+    }
+
+    public byte[] encrypt(byte[] data, byte[] key, int usage)
+        throws KrbCryptoException {
+        byte[] ivec = new byte[blockSize()];
+        return encrypt(data, key, ivec, usage);
+    }
+
+    public byte[] encrypt(byte[] data, byte[] key, byte[] ivec, int usage)
+        throws KrbCryptoException {
+        try {
+            return Aes256Sha2.encrypt(key, usage, ivec, data, 0, data.length);
+        } catch (GeneralSecurityException e) {
+            KrbCryptoException ke = new KrbCryptoException(e.getMessage());
+            ke.initCause(e);
+            throw ke;
+        }
+    }
+
+    public byte[] decrypt(byte[] cipher, byte[] key, int usage)
+        throws KrbApErrException, KrbCryptoException {
+        byte[] ivec = new byte[blockSize()];
+        return decrypt(cipher, key, ivec, usage);
+    }
+
+    public byte[] decrypt(byte[] cipher, byte[] key, byte[] ivec, int usage)
+        throws KrbApErrException, KrbCryptoException {
+        try {
+            return Aes256Sha2.decrypt(key, usage, ivec, cipher, 0, cipher.length);
+        } catch (GeneralSecurityException e) {
+            KrbCryptoException ke = new KrbCryptoException(e.getMessage());
+            ke.initCause(e);
+            throw ke;
+        }
+    }
+
+    // Override default, because our decrypted data does not return confounder
+    // Should eventually get rid of EType.decryptedData and
+    // EncryptedData.decryptedData altogether
+    public byte[] decryptedData(byte[] data) {
+        return data;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/java.security.jgss/share/classes/sun/security/krb5/internal/crypto/Aes256Sha2.java	Tue Jan 30 16:41:40 2018 +0100
@@ -0,0 +1,86 @@
+/*
+ * 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.
+ */
+
+package sun.security.krb5.internal.crypto;
+
+import sun.security.krb5.internal.crypto.dk.AesSha2DkCrypto;
+import sun.security.krb5.KrbCryptoException;
+import java.security.GeneralSecurityException;
+
+/**
+ * Class with static methods for doing aes256-cts-hmac-sha384-192 operations.
+ */
+
+public class Aes256Sha2 {
+    private static final AesSha2DkCrypto CRYPTO = new AesSha2DkCrypto(256);
+
+    private Aes256Sha2() {
+    }
+
+    public static byte[] stringToKey(char[] password, String salt, byte[] params)
+        throws GeneralSecurityException {
+        return CRYPTO.stringToKey(password, salt, params);
+    }
+
+    // in bytes
+    public static int getChecksumLength() {
+        return CRYPTO.getChecksumLength();
+    }
+
+    public static byte[] calculateChecksum(byte[] baseKey, int usage,
+        byte[] input, int start, int len) throws GeneralSecurityException {
+            return CRYPTO.calculateChecksum(baseKey, usage, input, start, len);
+    }
+
+    public static byte[] encrypt(byte[] baseKey, int usage,
+        byte[] ivec, byte[] plaintext, int start, int len)
+        throws GeneralSecurityException, KrbCryptoException {
+            return CRYPTO.encrypt(baseKey, usage, ivec, null /* new_ivec */,
+                plaintext, start, len);
+    }
+
+    /* Encrypt plaintext; do not add confounder, padding, or checksum */
+    public static byte[] encryptRaw(byte[] baseKey, int usage,
+        byte[] ivec, byte[] plaintext, int start, int len)
+        throws GeneralSecurityException, KrbCryptoException {
+        return CRYPTO.encryptRaw(baseKey, usage, ivec, plaintext, start, len);
+    }
+
+    public static byte[] decrypt(byte[] baseKey, int usage, byte[] ivec,
+        byte[] ciphertext, int start, int len)
+        throws GeneralSecurityException {
+        return CRYPTO.decrypt(baseKey, usage, ivec, ciphertext, start, len);
+    }
+
+    /*
+     * Decrypt ciphertext; do not remove confounder, padding, or check
+     * checksum
+     */
+    public static byte[] decryptRaw(byte[] baseKey, int usage, byte[] ivec,
+        byte[] ciphertext, int start, int len)
+        throws GeneralSecurityException {
+        return CRYPTO.decryptRaw(baseKey, usage, ivec, ciphertext, start, len);
+    }
+};
--- a/src/java.security.jgss/share/classes/sun/security/krb5/internal/crypto/EType.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.security.jgss/share/classes/sun/security/krb5/internal/crypto/EType.java	Tue Jan 30 16:41:40 2018 +0100
@@ -106,7 +106,19 @@
                 "sun.security.krb5.internal.crypto.Aes256CtsHmacSha1EType";
             break;
 
-        case EncryptedData.ETYPE_ARCFOUR_HMAC:
+        case EncryptedData.ETYPE_AES128_CTS_HMAC_SHA256_128:
+            eType = new Aes128CtsHmacSha2EType();
+            eTypeName =
+                    "sun.security.krb5.internal.crypto.Aes128CtsHmacSha2EType";
+            break;
+
+        case EncryptedData.ETYPE_AES256_CTS_HMAC_SHA384_192:
+            eType = new Aes256CtsHmacSha2EType();
+            eTypeName =
+                    "sun.security.krb5.internal.crypto.Aes256CtsHmacSha2EType";
+            break;
+
+            case EncryptedData.ETYPE_ARCFOUR_HMAC:
             eType = new ArcFourHmacEType();
             eTypeName = "sun.security.krb5.internal.crypto.ArcFourHmacEType";
             break;
@@ -189,20 +201,23 @@
     // is set to false.
 
     private static final int[] BUILTIN_ETYPES = new int[] {
-        EncryptedData.ETYPE_AES256_CTS_HMAC_SHA1_96,
-        EncryptedData.ETYPE_AES128_CTS_HMAC_SHA1_96,
-        EncryptedData.ETYPE_DES3_CBC_HMAC_SHA1_KD,
-        EncryptedData.ETYPE_ARCFOUR_HMAC,
-        EncryptedData.ETYPE_DES_CBC_CRC,
-        EncryptedData.ETYPE_DES_CBC_MD5,
+            EncryptedData.ETYPE_AES256_CTS_HMAC_SHA1_96,
+            EncryptedData.ETYPE_AES128_CTS_HMAC_SHA1_96,
+            EncryptedData.ETYPE_AES256_CTS_HMAC_SHA384_192,
+            EncryptedData.ETYPE_AES128_CTS_HMAC_SHA256_128,
+            EncryptedData.ETYPE_DES3_CBC_HMAC_SHA1_KD,
+            EncryptedData.ETYPE_ARCFOUR_HMAC,
+            EncryptedData.ETYPE_DES_CBC_CRC,
+            EncryptedData.ETYPE_DES_CBC_MD5,
     };
 
     private static final int[] BUILTIN_ETYPES_NOAES256 = new int[] {
-        EncryptedData.ETYPE_AES128_CTS_HMAC_SHA1_96,
-        EncryptedData.ETYPE_DES3_CBC_HMAC_SHA1_KD,
-        EncryptedData.ETYPE_ARCFOUR_HMAC,
-        EncryptedData.ETYPE_DES_CBC_CRC,
-        EncryptedData.ETYPE_DES_CBC_MD5,
+            EncryptedData.ETYPE_AES128_CTS_HMAC_SHA1_96,
+            EncryptedData.ETYPE_AES128_CTS_HMAC_SHA256_128,
+            EncryptedData.ETYPE_DES3_CBC_HMAC_SHA1_KD,
+            EncryptedData.ETYPE_ARCFOUR_HMAC,
+            EncryptedData.ETYPE_DES_CBC_CRC,
+            EncryptedData.ETYPE_DES_CBC_MD5,
     };
 
 
@@ -363,7 +378,10 @@
             return "RC4 with HMAC";
         case 24:
             return "RC4 with HMAC EXP";
-
+        case EncryptedData.ETYPE_AES128_CTS_HMAC_SHA256_128:
+            return "AES128 CTS mode with HMAC SHA256-128";
+        case EncryptedData.ETYPE_AES256_CTS_HMAC_SHA384_192:
+            return "AES256 CTS mode with HMAC SHA384-192";
         }
         return "Unknown (" + type + ")";
     }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/java.security.jgss/share/classes/sun/security/krb5/internal/crypto/HmacSha2Aes128CksumType.java	Tue Jan 30 16:41:40 2018 +0100
@@ -0,0 +1,110 @@
+/*
+ * 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.
+ */
+
+package sun.security.krb5.internal.crypto;
+
+import sun.security.krb5.Checksum;
+import sun.security.krb5.KrbCryptoException;
+import sun.security.krb5.internal.*;
+import java.security.GeneralSecurityException;
+
+/*
+ * This class encapsulates the checksum type for aes128-cts-sha256
+ */
+
+public class HmacSha2Aes128CksumType extends CksumType {
+
+    public HmacSha2Aes128CksumType() {
+    }
+
+    public int confounderSize() {
+        return 16;
+    }
+
+    public int cksumType() {
+        return Checksum.CKSUMTYPE_HMAC_SHA256_128_AES128;
+    }
+
+    public boolean isSafe() {
+        return true;
+    }
+
+    public int cksumSize() {
+        return 16;  // bytes
+    }
+
+    public int keyType() {
+        return Krb5.KEYTYPE_AES;
+    }
+
+    public int keySize() {
+        return 16;   // bytes
+    }
+
+    public byte[] calculateChecksum(byte[] data, int size) {
+        return null;
+    }
+
+    /**
+     * Calculates keyed checksum.
+     * @param data the data used to generate the checksum.
+     * @param size length of the data.
+     * @param key the key used to encrypt the checksum.
+     * @return keyed checksum.
+     */
+    public byte[] calculateKeyedChecksum(byte[] data, int size, byte[] key,
+        int usage) throws KrbCryptoException {
+
+         try {
+            return Aes128Sha2.calculateChecksum(key, usage, data, 0, size);
+         } catch (GeneralSecurityException e) {
+            KrbCryptoException ke = new KrbCryptoException(e.getMessage());
+            ke.initCause(e);
+            throw ke;
+         }
+    }
+
+    /**
+     * Verifies keyed checksum.
+     * @param data the data.
+     * @param size the length of data.
+     * @param key the key used to encrypt the checksum.
+     * @param checksum the checksum.
+     * @return true if verification is successful.
+     */
+    public boolean verifyKeyedChecksum(byte[] data, int size,
+        byte[] key, byte[] checksum, int usage) throws KrbCryptoException {
+
+         try {
+            byte[] newCksum = Aes128Sha2.calculateChecksum(key, usage,
+                                                        data, 0, size);
+            return isChecksumEqual(checksum, newCksum);
+         } catch (GeneralSecurityException e) {
+            KrbCryptoException ke = new KrbCryptoException(e.getMessage());
+            ke.initCause(e);
+            throw ke;
+         }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/java.security.jgss/share/classes/sun/security/krb5/internal/crypto/HmacSha2Aes256CksumType.java	Tue Jan 30 16:41:40 2018 +0100
@@ -0,0 +1,110 @@
+/*
+ * 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.
+ */
+
+package sun.security.krb5.internal.crypto;
+
+import sun.security.krb5.Checksum;
+import sun.security.krb5.KrbCryptoException;
+import sun.security.krb5.internal.*;
+import java.security.GeneralSecurityException;
+
+/*
+ * This class encapsulates the checksum type for aes256-cts-sha384
+ */
+
+public class HmacSha2Aes256CksumType extends CksumType {
+
+    public HmacSha2Aes256CksumType() {
+    }
+
+    public int confounderSize() {
+        return 16;
+    }
+
+    public int cksumType() {
+        return Checksum.CKSUMTYPE_HMAC_SHA384_192_AES256;
+    }
+
+    public boolean isSafe() {
+        return true;
+    }
+
+    public int cksumSize() {
+        return 24;  // bytes
+    }
+
+    public int keyType() {
+        return Krb5.KEYTYPE_AES;
+    }
+
+    public int keySize() {
+        return 32;   // bytes
+    }
+
+    public byte[] calculateChecksum(byte[] data, int size) {
+        return null;
+    }
+
+    /**
+     * Calculates keyed checksum.
+     * @param data the data used to generate the checksum.
+     * @param size length of the data.
+     * @param key the key used to encrypt the checksum.
+     * @return keyed checksum.
+     */
+    public byte[] calculateKeyedChecksum(byte[] data, int size, byte[] key,
+        int usage) throws KrbCryptoException {
+
+         try {
+            return Aes256Sha2.calculateChecksum(key, usage, data, 0, size);
+         } catch (GeneralSecurityException e) {
+            KrbCryptoException ke = new KrbCryptoException(e.getMessage());
+            ke.initCause(e);
+            throw ke;
+         }
+    }
+
+    /**
+     * Verifies keyed checksum.
+     * @param data the data.
+     * @param size the length of data.
+     * @param key the key used to encrypt the checksum.
+     * @param checksum the checksum.
+     * @return true if verification is successful.
+     */
+    public boolean verifyKeyedChecksum(byte[] data, int size,
+        byte[] key, byte[] checksum, int usage) throws KrbCryptoException {
+
+         try {
+            byte[] newCksum = Aes256Sha2.calculateChecksum(key, usage, data,
+                                                        0, size);
+            return isChecksumEqual(checksum, newCksum);
+         } catch (GeneralSecurityException e) {
+            KrbCryptoException ke = new KrbCryptoException(e.getMessage());
+            ke.initCause(e);
+            throw ke;
+         }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/java.security.jgss/share/classes/sun/security/krb5/internal/crypto/dk/AesSha2DkCrypto.java	Tue Jan 30 16:41:40 2018 +0100
@@ -0,0 +1,541 @@
+/*
+ * 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.
+ */
+
+/*
+ */
+
+package sun.security.krb5.internal.crypto.dk;
+
+import javax.crypto.Cipher;
+import javax.crypto.Mac;
+import javax.crypto.SecretKeyFactory;
+import javax.crypto.SecretKey;
+import javax.crypto.spec.SecretKeySpec;
+import javax.crypto.spec.IvParameterSpec;
+import javax.crypto.spec.PBEKeySpec;
+import java.security.GeneralSecurityException;
+import sun.security.krb5.KrbCryptoException;
+import sun.security.krb5.Confounder;
+import sun.security.krb5.internal.crypto.KeyUsage;
+import java.util.Arrays;
+
+/**
+ * This class provides the implementation of AES Encryption with
+ * HMAC-SHA2 for Kerberos 5
+ * https://tools.ietf.org/html/rfc8009
+ *
+ * Algorithm profile described in [KCRYPTO]:
+ * +--------------------------------------------------------------------+
+ * |               protocol key format          128- or 256-bit string  |
+ * |                                                                    |
+ * |            string-to-key function          PBKDF2+DK with variable |
+ * |                                          iteration count (see      |
+ * |                                          above)                    |
+ * |                                                                    |
+ * |  default string-to-key parameters          00 00 80 00             |
+ * |                                                                    |
+ * |        key-generation seed length          key size                |
+ * |                                                                    |
+ * |            random-to-key function          identity function       |
+ * |                                                                    |
+ * |                  hash function, H          SHA-256 / SHA-384       |
+ * |                                                                    |
+ * |               HMAC output size, h          16/24 octets            |
+ * |                                                                    |
+ * |             message block size, m          1 octet                 |
+ * |                                                                    |
+ * |  encryption/decryption functions,          AES in CBC-CTS mode     |
+ * |  E and D                                 (cipher block size 16     |
+ * |                                          octets), with next to     |
+ * |                                          last block as CBC-style   |
+ * |                                          ivec                      |
+ * +--------------------------------------------------------------------+
+ *
+ * Supports aes128-cts-hmac-sha256-128 and aes256-cts-hmac-sha384-192
+ */
+
+public class AesSha2DkCrypto extends DkCrypto {
+
+    private static final boolean debug = false;
+
+    private static final int BLOCK_SIZE = 16;
+    private static final int DEFAULT_ITERATION_COUNT = 32768;
+    private static final byte[] ZERO_IV = new byte[] { 0, 0, 0, 0, 0, 0, 0, 0,
+                                                       0, 0, 0, 0, 0, 0, 0, 0 };
+
+    private static final byte[] ETYPE_NAME_128 =
+            "aes128-cts-hmac-sha256-128".getBytes();
+    private static final byte[] ETYPE_NAME_256 =
+            "aes256-cts-hmac-sha384-192".getBytes();
+
+    private final int hashSize;
+    private final int keyLength;
+
+    public AesSha2DkCrypto(int length) {
+        keyLength = length;
+        hashSize = (length == 128?128:192)/8;
+    }
+
+    protected int getKeySeedLength() {
+        return keyLength;   // bits; AES key material
+    }
+
+    public byte[] stringToKey(char[] password, String salt, byte[] s2kparams)
+        throws GeneralSecurityException {
+
+        byte[] saltUtf8 = null;
+        try {
+            saltUtf8 = salt.getBytes("UTF-8");
+            return stringToKey(password, saltUtf8, s2kparams);
+        } catch (Exception e) {
+            return null;
+        } finally {
+            if (saltUtf8 != null) {
+                Arrays.fill(saltUtf8, (byte)0);
+            }
+        }
+    }
+
+    // https://tools.ietf.org/html/rfc8009#section-4
+    private byte[] stringToKey(char[] secret, byte[] salt, byte[] params)
+        throws GeneralSecurityException {
+
+        int iter_count = DEFAULT_ITERATION_COUNT;
+        if (params != null) {
+            if (params.length != 4) {
+                throw new RuntimeException("Invalid parameter to stringToKey");
+            }
+            iter_count = readBigEndian(params, 0, 4);
+        }
+
+        byte[] saltp = new byte[26 + 1 + salt.length];
+        if (keyLength == 128) {
+            System.arraycopy(ETYPE_NAME_128, 0, saltp, 0, 26);
+        } else {
+            System.arraycopy(ETYPE_NAME_256, 0, saltp, 0, 26);
+        }
+        System.arraycopy(salt, 0, saltp, 27, salt.length);
+        byte[] tmpKey = randomToKey(PBKDF2(secret, saltp, iter_count,
+                                        getKeySeedLength()));
+        byte[] result = dk(tmpKey, KERBEROS_CONSTANT);
+        return result;
+    }
+
+    protected byte[] randomToKey(byte[] in) {
+        // simple identity operation
+        return in;
+    }
+
+    /*
+     * https://tools.ietf.org/html/rfc8009#section-3 defines
+     * a new key derivation function:
+     *
+     * KDF-HMAC-SHA2(key, label, k) = k-truncate(K1)
+     * K1 = HMAC-SHA-256(key, 0x00000001 | label | 0x00 | k) or
+     * K1 = HMAC-SHA-384(key, 0x00000001 | label | 0x00 | k)
+     *
+     * where label is constant below.
+     */
+    protected byte[] dr(byte[] key, byte[] constant)
+            throws GeneralSecurityException {
+        byte[] result;
+        byte[] input = new byte[constant.length + 9];
+        // 0x00000001 at the beginning
+        input[3] = 1;
+        // label follows
+        System.arraycopy(constant, 0, input, 4, constant.length);
+        SecretKeySpec tkey = new SecretKeySpec(key, "HMAC");
+        Mac mac = Mac.getInstance(
+                keyLength == 128? "HmacSHA256": "HmacSHA384");
+        mac.init(tkey);
+
+        int k;
+        if (keyLength == 128) {
+            // key length for enc and hmac both 128
+            k = 128;
+        } else {
+            byte last = constant[constant.length-1];
+            if (last == (byte)0x99 || last == (byte)0x55) {
+                // 192 for hmac
+                k = 192;
+            } else {
+                // 256 for enc
+                k = 256;
+            }
+        }
+        // 0x00 and k at the end
+        input[input.length - 1] = (byte)(k);
+        input[input.length - 2] = (byte)(k / 256);
+
+        result = mac.doFinal(input);
+        return Arrays.copyOf(result, k / 8);
+    }
+
+    protected Cipher getCipher(byte[] key, byte[] ivec, int mode)
+        throws GeneralSecurityException {
+
+        // IV
+        if (ivec == null) {
+           ivec = ZERO_IV;
+        }
+        SecretKeySpec secretKey = new SecretKeySpec(key, "AES");
+        Cipher cipher = Cipher.getInstance("AES/CBC/NoPadding");
+        IvParameterSpec encIv = new IvParameterSpec(ivec, 0, ivec.length);
+        cipher.init(mode, secretKey, encIv);
+        return cipher;
+    }
+
+    // get an instance of the AES Cipher in CTS mode
+    public int getChecksumLength() {
+        return hashSize;  // bytes
+    }
+
+    /**
+     * Get the truncated HMAC
+     */
+    protected byte[] getHmac(byte[] key, byte[] msg)
+        throws GeneralSecurityException {
+
+        SecretKey keyKi = new SecretKeySpec(key, "HMAC");
+        Mac m = Mac.getInstance(keyLength == 128 ? "HmacSHA256" : "HmacSHA384");
+        m.init(keyKi);
+
+        // generate hash
+        byte[] hash = m.doFinal(msg);
+
+        // truncate hash
+        byte[] output = new byte[hashSize];
+        System.arraycopy(hash, 0, output, 0, hashSize);
+        return output;
+    }
+
+    private byte[] deriveKey(byte[] baseKey, int usage, byte type)
+            throws GeneralSecurityException {
+        byte[] constant = new byte[5];
+        constant[0] = (byte) ((usage>>24)&0xff);
+        constant[1] = (byte) ((usage>>16)&0xff);
+        constant[2] = (byte) ((usage>>8)&0xff);
+        constant[3] = (byte) (usage&0xff);
+        constant[4] = type;
+        return dk(baseKey, constant);
+    }
+
+    /**
+     * Calculate the checksum
+     */
+    public byte[] calculateChecksum(byte[] baseKey, int usage, byte[] input,
+        int start, int len) throws GeneralSecurityException {
+
+        if (!KeyUsage.isValid(usage)) {
+            throw new GeneralSecurityException("Invalid key usage number: "
+                                                + usage);
+        }
+
+        byte[] Kc = deriveKey(baseKey, usage, (byte) 0x99);  // Checksum key
+        if (debug) {
+            System.err.println("usage: " + usage);
+            traceOutput("input", input, start, Math.min(len, 32));
+            traceOutput("baseKey", baseKey, 0, baseKey.length);
+            traceOutput("Kc", Kc, 0, Kc.length);
+        }
+
+        try {
+            // Generate checksum
+            // H1 = HMAC(Kc, input)
+            byte[] hmac = getHmac(Kc, input);
+            if (debug) {
+                traceOutput("hmac", hmac, 0, hmac.length);
+            }
+            if (hmac.length == getChecksumLength()) {
+                return hmac;
+            } else if (hmac.length > getChecksumLength()) {
+                byte[] buf = new byte[getChecksumLength()];
+                System.arraycopy(hmac, 0, buf, 0, buf.length);
+                return buf;
+            } else {
+                throw new GeneralSecurityException("checksum size too short: " +
+                        hmac.length + "; expecting : " + getChecksumLength());
+            }
+        } finally {
+            Arrays.fill(Kc, 0, Kc.length, (byte)0);
+        }
+    }
+
+    /**
+     * Performs encryption using derived key; adds confounder.
+     */
+    public byte[] encrypt(byte[] baseKey, int usage,
+        byte[] ivec, byte[] new_ivec, byte[] plaintext, int start, int len)
+        throws GeneralSecurityException, KrbCryptoException {
+
+        if (!KeyUsage.isValid(usage)) {
+            throw new GeneralSecurityException("Invalid key usage number: "
+                                                 + usage);
+        }
+        byte[] output = encryptCTS(baseKey, usage, ivec, new_ivec, plaintext,
+                                        start, len, true);
+        return output;
+    }
+
+    /**
+     * Performs encryption using derived key; does not add confounder.
+     */
+    public byte[] encryptRaw(byte[] baseKey, int usage,
+        byte[] ivec, byte[] plaintext, int start, int len)
+        throws GeneralSecurityException, KrbCryptoException {
+
+        if (!KeyUsage.isValid(usage)) {
+            throw new GeneralSecurityException("Invalid key usage number: "
+                                                + usage);
+        }
+        byte[] output = encryptCTS(baseKey, usage, ivec, null, plaintext,
+                                        start, len, false);
+        return output;
+    }
+
+    /**
+     * @param baseKey key from which keys are to be derived using usage
+     * @param ciphertext  E(Ke, conf | plaintext | padding, ivec) | H1[1..h]
+     */
+    public byte[] decrypt(byte[] baseKey, int usage, byte[] ivec,
+        byte[] ciphertext, int start, int len) throws GeneralSecurityException {
+
+        if (!KeyUsage.isValid(usage)) {
+            throw new GeneralSecurityException("Invalid key usage number: "
+                                                + usage);
+        }
+        byte[] output = decryptCTS(baseKey, usage, ivec, ciphertext,
+                                        start, len, true);
+        return output;
+    }
+
+    /**
+     * Decrypts data using specified key and initial vector.
+     * @param baseKey encryption key to use
+     * @param ciphertext  encrypted data to be decrypted
+     * @param usage ignored
+     */
+    public byte[] decryptRaw(byte[] baseKey, int usage, byte[] ivec,
+        byte[] ciphertext, int start, int len)
+        throws GeneralSecurityException {
+
+        if (!KeyUsage.isValid(usage)) {
+            throw new GeneralSecurityException("Invalid key usage number: "
+                                                + usage);
+        }
+        byte[] output = decryptCTS(baseKey, usage, ivec, ciphertext,
+                                        start, len, false);
+        return output;
+    }
+
+    /**
+     * Encrypt AES in CBC-CTS mode using derived keys.
+     */
+    private byte[] encryptCTS(byte[] baseKey, int usage, byte[] ivec,
+        byte[] new_ivec, byte[] plaintext, int start, int len,
+        boolean confounder_exists)
+        throws GeneralSecurityException, KrbCryptoException {
+
+        byte[] Ke = null;
+        byte[] Ki = null;
+
+        if (debug) {
+            System.err.println("usage: " + usage);
+            if (ivec != null) {
+                traceOutput("old_state.ivec", ivec, 0, ivec.length);
+            }
+            traceOutput("plaintext", plaintext, start, Math.min(len, 32));
+            traceOutput("baseKey", baseKey, 0, baseKey.length);
+        }
+
+        try {
+            Ke = deriveKey(baseKey, usage, (byte) 0xaa);  // Encryption key
+
+            byte[] toBeEncrypted = null;
+            if (confounder_exists) {
+                byte[] confounder = Confounder.bytes(BLOCK_SIZE);
+                toBeEncrypted = new byte[confounder.length + len];
+                System.arraycopy(confounder, 0, toBeEncrypted,
+                                        0, confounder.length);
+                System.arraycopy(plaintext, start, toBeEncrypted,
+                                        confounder.length, len);
+            } else {
+                toBeEncrypted = new byte[len];
+                System.arraycopy(plaintext, start, toBeEncrypted, 0, len);
+            }
+
+            // encryptedData + HMAC
+            byte[] output = new byte[toBeEncrypted.length + hashSize];
+
+            // AES in JCE
+            Cipher cipher = Cipher.getInstance("AES/CTS/NoPadding");
+            SecretKeySpec secretKey = new SecretKeySpec(Ke, "AES");
+            IvParameterSpec encIv = new IvParameterSpec(ivec, 0, ivec.length);
+            cipher.init(Cipher.ENCRYPT_MODE, secretKey, encIv);
+            cipher.doFinal(toBeEncrypted, 0, toBeEncrypted.length, output);
+
+            Ki = deriveKey(baseKey, usage, (byte) 0x55);
+            if (debug) {
+                traceOutput("Ki", Ki, 0, Ke.length);
+            }
+
+            // Generate checksum
+            // H = HMAC(Ki, IV | C)
+            byte[] msg = Arrays.copyOf(ivec, ivec.length + toBeEncrypted.length);
+            System.arraycopy(output, 0, msg, ivec.length, toBeEncrypted.length);
+            byte[] hmac = getHmac(Ki, msg);
+
+            // encryptedData + HMAC
+            System.arraycopy(hmac, 0, output, toBeEncrypted.length,
+                                hmac.length);
+            return output;
+        } finally {
+            if (Ke != null) {
+                Arrays.fill(Ke, 0, Ke.length, (byte) 0);
+            }
+            if (Ki != null) {
+                Arrays.fill(Ki, 0, Ki.length, (byte) 0);
+            }
+        }
+    }
+
+    /**
+     * Decrypt AES in CBC-CTS mode using derived keys.
+     */
+    private byte[] decryptCTS(byte[] baseKey, int usage, byte[] ivec,
+        byte[] ciphertext, int start, int len, boolean confounder_exists)
+        throws GeneralSecurityException {
+
+        byte[] Ke = null;
+        byte[] Ki = null;
+
+        try {
+            Ke = deriveKey(baseKey, usage, (byte) 0xaa);  // Encryption key
+
+            if (debug) {
+                System.err.println("usage: " + usage);
+                if (ivec != null) {
+                    traceOutput("old_state.ivec", ivec, 0, ivec.length);
+                }
+                traceOutput("ciphertext", ciphertext, start, Math.min(len, 32));
+                traceOutput("baseKey", baseKey, 0, baseKey.length);
+                traceOutput("Ke", Ke, 0, Ke.length);
+            }
+
+            // Decrypt [confounder | plaintext ] (without checksum)
+
+            // AES in JCE
+            Cipher cipher = Cipher.getInstance("AES/CTS/NoPadding");
+            SecretKeySpec secretKey = new SecretKeySpec(Ke, "AES");
+            IvParameterSpec encIv = new IvParameterSpec(ivec, 0, ivec.length);
+            cipher.init(Cipher.DECRYPT_MODE, secretKey, encIv);
+            byte[] plaintext = cipher.doFinal(ciphertext, start, len-hashSize);
+
+            if (debug) {
+                traceOutput("AES PlainText", plaintext, 0,
+                                Math.min(plaintext.length, 32));
+            }
+
+            Ki = deriveKey(baseKey, usage, (byte) 0x55);  // Integrity key
+            if (debug) {
+                traceOutput("Ki", Ki, 0, Ke.length);
+            }
+
+            // Verify checksum
+            // H = HMAC(Ki, IV | C)
+            byte[] msg = Arrays.copyOf(ivec, ivec.length + len-hashSize);
+            System.arraycopy(ciphertext, start, msg, ivec.length, len-hashSize);
+            byte[] calculatedHmac = getHmac(Ki, msg);
+            int hmacOffset = start + len - hashSize;
+            if (debug) {
+                traceOutput("calculated Hmac", calculatedHmac,
+                                0, calculatedHmac.length);
+                traceOutput("message Hmac", ciphertext, hmacOffset, hashSize);
+            }
+            boolean cksumFailed = false;
+            if (calculatedHmac.length >= hashSize) {
+                for (int i = 0; i < hashSize; i++) {
+                    if (calculatedHmac[i] != ciphertext[hmacOffset+i]) {
+                        cksumFailed = true;
+                        if (debug) {
+                            System.err.println("Checksum failed !");
+                        }
+                        break;
+                    }
+                }
+            }
+            if (cksumFailed) {
+                throw new GeneralSecurityException("Checksum failed");
+            }
+
+            if (confounder_exists) {
+                // Get rid of confounder
+                // [ confounder | plaintext ]
+                byte[] output = new byte[plaintext.length - BLOCK_SIZE];
+                System.arraycopy(plaintext, BLOCK_SIZE, output,
+                                        0, output.length);
+                return output;
+            } else {
+                return plaintext;
+            }
+        } finally {
+            if (Ke != null) {
+                Arrays.fill(Ke, 0, Ke.length, (byte) 0);
+            }
+            if (Ki != null) {
+                Arrays.fill(Ki, 0, Ki.length, (byte) 0);
+            }
+        }
+    }
+
+    /*
+     * Invoke the PKCS#5 PBKDF2 algorithm
+     */
+    private static byte[] PBKDF2(char[] secret, byte[] salt,
+        int count, int keyLength) throws GeneralSecurityException {
+
+        PBEKeySpec keySpec = new PBEKeySpec(secret, salt, count, keyLength);
+        SecretKeyFactory skf =
+                SecretKeyFactory.getInstance(keyLength == 128 ?
+                        "PBKDF2WithHmacSHA256" : "PBKDF2WithHmacSHA384");
+        SecretKey key = skf.generateSecret(keySpec);
+        byte[] result = key.getEncoded();
+
+        return result;
+    }
+
+    public static final int readBigEndian(byte[] data, int pos, int size) {
+        int retVal = 0;
+        int shifter = (size-1)*8;
+        while (size > 0) {
+            retVal += (data[pos] & 0xff) << shifter;
+            shifter -= 8;
+            pos++;
+            size--;
+        }
+        return retVal;
+    }
+
+}
--- a/src/java.security.jgss/share/classes/sun/security/krb5/internal/crypto/dk/DkCrypto.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.security.jgss/share/classes/sun/security/krb5/internal/crypto/dk/DkCrypto.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2004, 2007, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2017, Oracle and/or its affiliates. All rights reserved.
  */
 
 /*
@@ -478,7 +478,7 @@
      *
      * DR(Key, Constant) = k-truncate(K1 | K2 | K3 | K4 ...)
      */
-    private byte[] dr(byte[] key, byte[] constant)
+    protected byte[] dr(byte[] key, byte[] constant)
         throws GeneralSecurityException {
 
         Cipher encCipher = getCipher(key, null, Cipher.ENCRYPT_MODE);
@@ -667,7 +667,7 @@
             new HexDumpEncoder().encodeBuffer(
                 new ByteArrayInputStream(output, offset, len), out);
 
-            System.err.println(traceTag + ":" + out.toString());
+            System.err.println(traceTag + ":\n" + out.toString());
         } catch (Exception e) {
         }
     }
--- a/src/java.security.jgss/share/native/libj2gss/GSSLibStub.c	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.security.jgss/share/native/libj2gss/GSSLibStub.c	Tue Jan 30 16:41:40 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
+ * 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
@@ -830,7 +830,7 @@
 {
   OM_uint32 minor, major;
   gss_cred_id_t credHdl ;
-  gss_ctx_id_t contextHdl;
+  gss_ctx_id_t contextHdl, contextHdlSave;
   gss_name_t targetName;
   gss_OID mech;
   OM_uint32 flags, aFlags;
@@ -847,7 +847,7 @@
   TRACE0("[GSSLibStub_initContext]");
 
   credHdl = (gss_cred_id_t) jlong_to_ptr(pCred);
-  contextHdl = (gss_ctx_id_t) jlong_to_ptr(
+  contextHdl = contextHdlSave = (gss_ctx_id_t) jlong_to_ptr(
     (*env)->GetLongField(env, jcontextSpi, FID_NativeGSSContext_pContext));
   targetName = (gss_name_t) jlong_to_ptr(pName);
   mech = (gss_OID) jlong_to_ptr((*env)->GetLongField(env, jobj, FID_GSSLibStub_pMech));
@@ -882,10 +882,17 @@
   TRACE2("[GSSLibStub_initContext] after: pContext=%ld, outToken len=%ld",
             (long)contextHdl, (long)outToken.length);
 
+  // update context handle with the latest value if changed
+  // this is to work with both MIT and Solaris. Former deletes half-built
+  // context if error occurs
+  if (contextHdl != contextHdlSave) {
+    (*env)->SetLongField(env, jcontextSpi, FID_NativeGSSContext_pContext,
+                         ptr_to_jlong(contextHdl));
+    TRACE1("[GSSLibStub_initContext] set pContext=%ld", (long)contextHdl);
+  }
+
   if (GSS_ERROR(major) == GSS_S_COMPLETE) {
     /* update member values if needed */
-    (*env)->SetLongField(env, jcontextSpi, FID_NativeGSSContext_pContext,
-                        ptr_to_jlong(contextHdl));
     (*env)->SetIntField(env, jcontextSpi, FID_NativeGSSContext_flags, aFlags);
     TRACE1("[GSSLibStub_initContext] set flags=0x%x", aFlags);
 
@@ -939,7 +946,7 @@
 {
   OM_uint32 minor, major;
   OM_uint32 minor2, major2;
-  gss_ctx_id_t contextHdl;
+  gss_ctx_id_t contextHdl, contextHdlSave;
   gss_cred_id_t credHdl;
   gss_buffer_desc inToken;
   gss_channel_bindings_t cb;
@@ -959,7 +966,7 @@
 
   TRACE0("[GSSLibStub_acceptContext]");
 
-  contextHdl = (gss_ctx_id_t)jlong_to_ptr(
+  contextHdl = contextHdlSave = (gss_ctx_id_t)jlong_to_ptr(
     (*env)->GetLongField(env, jcontextSpi, FID_NativeGSSContext_pContext));
   credHdl = (gss_cred_id_t) jlong_to_ptr(pCred);
   initGSSBuffer(env, jinToken, &inToken);
@@ -996,19 +1003,22 @@
   TRACE3("[GSSLibStub_acceptContext] after: pCred=%ld, pContext=%ld, pDelegCred=%ld",
         (long)credHdl, (long)contextHdl, (long) delCred);
 
+  // update context handle with the latest value if changed
+  // this is to work with both MIT and Solaris. Former deletes half-built
+  // context if error occurs
+  if (contextHdl != contextHdlSave) {
+    (*env)->SetLongField(env, jcontextSpi, FID_NativeGSSContext_pContext,
+                         ptr_to_jlong(contextHdl));
+    TRACE1("[GSSLibStub_acceptContext] set pContext=%ld", (long)contextHdl);
+  }
+
   if (GSS_ERROR(major) == GSS_S_COMPLETE) {
     /* update member values if needed */
-    (*env)->SetLongField(env, jcontextSpi, FID_NativeGSSContext_pContext,
-                        ptr_to_jlong(contextHdl));
-    TRACE1("[GSSLibStub_acceptContext] set pContext=%ld",
-            (long)contextHdl);
-
     // WORKAROUND for a Heimdal bug
     if (delCred == GSS_C_NO_CREDENTIAL) {
         aFlags &= 0xfffffffe;
     }
     (*env)->SetIntField(env, jcontextSpi, FID_NativeGSSContext_flags, aFlags);
-
     TRACE1("[GSSLibStub_acceptContext] set flags=0x%x", aFlags);
 
     if (setTarget) {
--- a/src/java.security.jgss/windows/classes/sun/security/krb5/internal/tools/KinitOptions.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.security.jgss/windows/classes/sun/security/krb5/internal/tools/KinitOptions.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2012, 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
@@ -137,7 +137,11 @@
                 lifetime = getTime(Config.duration(args[++i]));
             } else if (args[i].equals("-r")) {
                 renewable_lifetime = getTime(Config.duration(args[++i]));
-            } else if (args[i].equalsIgnoreCase("-help")) {
+            } else if (args[i].equalsIgnoreCase("-?") ||
+                       args[i].equalsIgnoreCase("-h") ||
+                       args[i].equalsIgnoreCase("--help") ||
+                       // -help: legacy.
+                       args[i].equalsIgnoreCase("-help")) {
                 printHelp();
                 System.exit(0);
             } else if (p == null) { // Haven't yet processed a "principal"
--- a/src/java.security.jgss/windows/classes/sun/security/krb5/internal/tools/Klist.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.security.jgss/windows/classes/sun/security/krb5/internal/tools/Klist.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -133,6 +133,12 @@
     void processArgs(String[] args) {
         Character arg;
         for (int i = 0; i < args.length; i++) {
+            if (args[i].equals("-?") ||
+                args[i].equals("-h") ||
+                args[i].equals("--help")) {
+                printHelp();
+                System.exit(0);
+            }
             if ((args[i].length() >= 2) && (args[i].startsWith("-"))) {
                 arg = Character.valueOf(args[i].charAt(1));
                 switch (arg.charValue()) {
@@ -350,7 +356,5 @@
         System.out.println("\t-t \t shows keytab entry timestamps");
         System.out.println("\t-K \t shows keytab entry key value");
         System.out.println("\t-e \t shows keytab entry key type");
-        System.out.println("\nUsage: java sun.security.krb5.tools.Klist " +
-                           "-help for help.");
     }
 }
--- a/src/java.security.jgss/windows/classes/sun/security/krb5/internal/tools/Ktab.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.security.jgss/windows/classes/sun/security/krb5/internal/tools/Ktab.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -72,8 +72,14 @@
      */
     public static void main(String[] args) {
         Ktab ktab = new Ktab();
-        if ((args.length == 1) && (args[0].equalsIgnoreCase("-help"))) {
+        if ((args.length == 1) &&
+            ((args[0].equalsIgnoreCase("-?")) ||
+             (args[0].equalsIgnoreCase("-h")) ||
+             (args[0].equalsIgnoreCase("--help")) ||
+             // -help: legacy.
+             (args[0].equalsIgnoreCase("-help")))) {
             ktab.printHelp();
+            System.exit(0);
             return;
         } else if ((args == null) || (args.length == 0)) {
             ktab.action = 'l';
--- a/src/java.sql.rowset/share/classes/com/sun/rowset/RowSetResourceBundle_sv.properties	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.sql.rowset/share/classes/com/sun/rowset/RowSetResourceBundle_sv.properties	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -122,7 +122,7 @@
 crsreader.caldetected = En kalender har identifierats
 
 #CachedRowSetWriter exceptions
-crswriter.connect = Kan inte uppr\u00E4tta n\u00E5gon anslutning
+crswriter.connect = Kan inte uppr\u00E4tta anslutning
 crswriter.tname = writeData kan inte fastst\u00E4lla tabellnamnet
 crswriter.params1 = Parameterv\u00E4rde1: {0} 
 crswriter.params2 = Parameterv\u00E4rde2: {0} 
@@ -159,8 +159,8 @@
 xmlrch.errupdate = Ett fel intr\u00E4ffade vid konstruktion av uppdateringsrad: {0}
 xmlrch.errupdrow = Ett fel intr\u00E4ffade vid uppdatering av rad: {0}
 xmlrch.chars = tecken:
-xmlrch.badvalue = Felaktigt v\u00E4rde; egenskapen kan inte ha ett tomt v\u00E4rde
-xmlrch.badvalue1 = Felaktigt v\u00E4rde; metadatan kan inte ha ett tomt v\u00E4rde
+xmlrch.badvalue = Felaktigt v\u00E4rde; egenskapen f\u00E5r inte ha v\u00E4rdet null
+xmlrch.badvalue1 = Felaktigt v\u00E4rde; metadata f\u00E5r inte ha v\u00E4rdet null
 xmlrch.warning =  ** Varning! {0}, rad: {1}, URI: {2}
 
 #RIOptimisticProvider Exceptions
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/lib/ExsltDynamic.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/lib/ExsltDynamic.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1,6 +1,5 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -36,6 +35,7 @@
 import com.sun.org.apache.xpath.internal.objects.XNodeSet;
 import com.sun.org.apache.xpath.internal.objects.XNumber;
 import com.sun.org.apache.xpath.internal.objects.XObject;
+import jdk.xml.internal.JdkXmlUtils;
 
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
@@ -410,10 +410,7 @@
         {
           if (lDoc == null)
           {
-            DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
-            dbf.setNamespaceAware(true);
-            DocumentBuilder db = dbf.newDocumentBuilder();
-            lDoc = db.newDocument();
+            lDoc = JdkXmlUtils.getDOMDocument();
           }
 
           Element element = null;
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/lib/ExsltStrings.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/lib/ExsltStrings.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1,6 +1,5 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -22,12 +21,8 @@
 package com.sun.org.apache.xalan.internal.lib;
 
 import java.util.StringTokenizer;
-
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.parsers.FactoryConfigurationError;
-import javax.xml.parsers.ParserConfigurationException;
-
 import com.sun.org.apache.xpath.internal.NodeSet;
+import jdk.xml.internal.JdkXmlUtils;
 
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
@@ -51,7 +46,6 @@
  */
 public class ExsltStrings extends ExsltBase
 {
-   static final String JDK_DEFAULT_DOM = "com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl";
 
   /**
    * The str:align function aligns a string within another string.
@@ -226,7 +220,7 @@
         token = str.substring(fromIndex);
       }
 
-      Document doc = getDocument();
+      Document doc = JdkXmlUtils.getDOMDocument();
       synchronized (doc)
       {
         Element element = doc.createElement("token");
@@ -290,7 +284,7 @@
     {
       StringTokenizer lTokenizer = new StringTokenizer(toTokenize, delims);
 
-      Document doc = getDocument();
+      Document doc = JdkXmlUtils.getDOMDocument();
       synchronized (doc)
       {
         while (lTokenizer.hasMoreTokens())
@@ -306,7 +300,7 @@
     else
     {
 
-      Document doc = getDocument();
+      Document doc = JdkXmlUtils.getDOMDocument();
       synchronized (doc)
       {
         for (int i = 0; i < toTokenize.length(); i++)
@@ -328,23 +322,4 @@
   {
     return tokenize(toTokenize, " \t\n\r");
   }
-
-    /**
-   * @return an instance of DOM Document
-     */
-   private static Document getDocument()
-   {
-        try
-        {
-            if (System.getSecurityManager() == null) {
-                return DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument();
-            } else {
-                return DocumentBuilderFactory.newInstance(JDK_DEFAULT_DOM, null).newDocumentBuilder().newDocument();
-            }
-        }
-        catch(ParserConfigurationException pce)
-        {
-            throw new com.sun.org.apache.xml.internal.utils.WrappedRuntimeException(pce);
-        }
-    }
 }
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/lib/Extensions.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/lib/Extensions.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1,6 +1,5 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -23,14 +22,12 @@
 
 import java.util.StringTokenizer;
 
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.parsers.ParserConfigurationException;
-
 import com.sun.org.apache.xalan.internal.extensions.ExpressionContext;
 import com.sun.org.apache.xpath.internal.NodeSet;
 import com.sun.org.apache.xpath.internal.objects.XBoolean;
 import com.sun.org.apache.xpath.internal.objects.XNumber;
 import com.sun.org.apache.xpath.internal.objects.XObject;
+import jdk.xml.internal.JdkXmlUtils;
 
 import org.w3c.dom.Document;
 import org.w3c.dom.DocumentFragment;
@@ -51,7 +48,6 @@
  */
 public class Extensions
 {
-    static final String JDK_DEFAULT_DOM = "com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl";
   /**
    * Constructor Extensions
    *
@@ -110,7 +106,7 @@
 
       // This no longer will work right since the DTM.
       // Document myDoc = myProcessor.getContextNode().getOwnerDocument();
-      Document myDoc = getDocument();
+      Document myDoc = JdkXmlUtils.getDOMDocument();
 
         Text textNode = myDoc.createTextNode(textNodeValue);
         DocumentFragment docFrag = myDoc.createDocumentFragment();
@@ -236,7 +232,7 @@
   public static NodeList tokenize(String toTokenize, String delims)
   {
 
-    Document doc = getDocument();
+    Document doc = JdkXmlUtils.getDOMDocument();
 
     StringTokenizer lTokenizer = new StringTokenizer(toTokenize, delims);
     NodeSet resultSet = new NodeSet();
@@ -269,23 +265,4 @@
   {
     return tokenize(toTokenize, " \t\n\r");
   }
-
-    /**
-   * @return an instance of DOM Document
-     */
-   private static Document getDocument()
-   {
-        try
-        {
-            if (System.getSecurityManager() == null) {
-                return DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument();
-            } else {
-                return DocumentBuilderFactory.newInstance(JDK_DEFAULT_DOM, null).newDocumentBuilder().newDocument();
-            }
-        }
-        catch(ParserConfigurationException pce)
-        {
-            throw new com.sun.org.apache.xml.internal.utils.WrappedRuntimeException(pce);
-        }
-    }
 }
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_de.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_de.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1422,4 +1422,4 @@
   /** String for use when formatting of the error string failed.   */
   public static final String FORMAT_FAILED = "FORMAT_FAILED";
 
-}
+    }
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_es.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_es.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1421,4 +1421,5 @@
 
   /** String for use when formatting of the error string failed.   */
   public static final String FORMAT_FAILED = "FORMAT_FAILED";
+
     }
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_fr.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_fr.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1421,4 +1421,5 @@
 
   /** String for use when formatting of the error string failed.   */
   public static final String FORMAT_FAILED = "FORMAT_FAILED";
-}
+
+    }
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_it.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_it.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1421,4 +1421,5 @@
 
   /** String for use when formatting of the error string failed.   */
   public static final String FORMAT_FAILED = "FORMAT_FAILED";
-}
+
+    }
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_ja.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_ja.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1421,4 +1421,5 @@
 
   /** String for use when formatting of the error string failed.   */
   public static final String FORMAT_FAILED = "FORMAT_FAILED";
-}
+
+    }
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_ko.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_ko.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1421,4 +1421,5 @@
 
   /** String for use when formatting of the error string failed.   */
   public static final String FORMAT_FAILED = "FORMAT_FAILED";
-}
+
+    }
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_pt_BR.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_pt_BR.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1421,4 +1421,5 @@
 
   /** String for use when formatting of the error string failed.   */
   public static final String FORMAT_FAILED = "FORMAT_FAILED";
-}
+
+    }
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_sv.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_sv.java	Tue Jan 30 16:41:40 2018 +0100
@@ -478,7 +478,7 @@
   {"ER0000" , "{0}" },
 
     { ER_NO_CURLYBRACE,
-      "Fel: Uttryck kan inte inneh\u00E5lla '{'"},
+      "Fel: Uttryck f\u00E5r inte inneh\u00E5lla '{'"},
 
     { ER_ILLEGAL_ATTRIBUTE ,
      "{0} har ett otill\u00E5tet attribut: {1}"},
@@ -1422,4 +1422,4 @@
   /** String for use when formatting of the error string failed.   */
   public static final String FORMAT_FAILED = "FORMAT_FAILED";
 
-}
+    }
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_zh_CN.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_zh_CN.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1421,4 +1421,5 @@
 
   /** String for use when formatting of the error string failed.   */
   public static final String FORMAT_FAILED = "FORMAT_FAILED";
-}
+
+    }
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_zh_TW.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_zh_TW.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1421,4 +1421,5 @@
 
   /** String for use when formatting of the error string failed.   */
   public static final String FORMAT_FAILED = "FORMAT_FAILED";
-}
+
+    }
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/utils/FactoryImpl.java	Tue Jan 30 16:26:40 2018 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,57 +0,0 @@
-/*
- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
- * 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.org.apache.xalan.internal.utils;
-
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.parsers.SAXParserFactory;
-
-/**
- *
- * @author huizhe wang
- */
-public class FactoryImpl {
-
-    static final String DBF = "com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl";
-    static final String SF = "com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl";
-
-    static public DocumentBuilderFactory getDOMFactory(boolean useServicesMechanism) {
-        DocumentBuilderFactory dbf =
-            useServicesMechanism ?
-            DocumentBuilderFactory.newInstance() :
-            DocumentBuilderFactory.newInstance( DBF,
-                FactoryImpl.class.getClassLoader());
-
-        return dbf;
-    }
-    static public SAXParserFactory getSAXFactory(boolean useServicesMechanism) {
-                SAXParserFactory factory =
-                    useServicesMechanism ?
-                    SAXParserFactory.newInstance() :
-                    SAXParserFactory.newInstance(SF,
-                        FactoryImpl.class.getClassLoader());
-                return factory;
-    }
-}
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/Translet.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/Translet.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -49,7 +49,7 @@
     public String[] getUrisArray();
     public int[]    getTypesArray();
     public String[] getNamespaceArray();
-    public boolean useServicesMechnism();
-    public void setServicesMechnism(boolean flag);
+    public boolean overrideDefaultParser();
+    public void setOverrideDefaultParser(boolean flag);
 
 }
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Parser.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Parser.java	Tue Jan 30 16:41:40 2018 +0100
@@ -22,7 +22,6 @@
 
 import com.sun.java_cup.internal.runtime.Symbol;
 import com.sun.org.apache.xalan.internal.XalanConstants;
-import com.sun.org.apache.xalan.internal.utils.FactoryImpl;
 import com.sun.org.apache.xalan.internal.utils.ObjectFactory;
 import com.sun.org.apache.xalan.internal.utils.XMLSecurityManager;
 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.ErrorMsg;
@@ -43,9 +42,6 @@
 import java.util.StringTokenizer;
 import javax.xml.XMLConstants;
 import javax.xml.catalog.CatalogFeatures;
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.parsers.SAXParser;
-import javax.xml.parsers.SAXParserFactory;
 import jdk.xml.internal.JdkXmlFeatures;
 import jdk.xml.internal.JdkXmlUtils;
 import jdk.xml.internal.SecuritySupport;
@@ -56,7 +52,6 @@
 import org.xml.sax.SAXException;
 import org.xml.sax.SAXNotRecognizedException;
 import org.xml.sax.SAXNotSupportedException;
-import org.xml.sax.SAXParseException;
 import org.xml.sax.XMLReader;
 import org.xml.sax.helpers.AttributesImpl;
 
@@ -101,11 +96,11 @@
 
     private int _currentImportPrecedence;
 
-    private boolean _useServicesMechanism = true;
+    private boolean _overrideDefaultParser;
 
-    public Parser(XSLTC xsltc, boolean useServicesMechanism) {
+    public Parser(XSLTC xsltc, boolean useOverrideDefaultParser) {
         _xsltc = xsltc;
-        _useServicesMechanism = useServicesMechanism;
+        _overrideDefaultParser = useOverrideDefaultParser;
     }
 
     public void init() {
@@ -465,56 +460,35 @@
      */
     public SyntaxTreeNode parse(InputSource input) {
         try {
-            // Create a SAX parser and get the XMLReader object it uses
-            final SAXParserFactory factory = FactoryImpl.getSAXFactory(_useServicesMechanism);
-
-            if (_xsltc.isSecureProcessing()) {
-                try {
-                    factory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, true);
-                }
-                catch (SAXException e) {}
-            }
+            final XMLReader reader = JdkXmlUtils.getXMLReader(_overrideDefaultParser,
+                    _xsltc.isSecureProcessing());
 
-            try {
-                factory.setFeature(Constants.NAMESPACE_FEATURE,true);
-            }
-            catch (ParserConfigurationException | SAXNotRecognizedException | SAXNotSupportedException e) {
-                factory.setNamespaceAware(true);
-            }
+            JdkXmlUtils.setXMLReaderPropertyIfSupport(reader, XMLConstants.ACCESS_EXTERNAL_DTD,
+                    _xsltc.getProperty(XMLConstants.ACCESS_EXTERNAL_DTD), true);
 
-            final SAXParser parser = factory.newSAXParser();
-            try {
-                parser.setProperty(XMLConstants.ACCESS_EXTERNAL_DTD,
-                        _xsltc.getProperty(XMLConstants.ACCESS_EXTERNAL_DTD));
-            } catch (SAXNotRecognizedException e) {
-                ErrorMsg err = new ErrorMsg(ErrorMsg.WARNING_MSG,
-                        parser.getClass().getName() + ": " + e.getMessage());
-                reportError(WARNING, err);
-            }
 
             boolean supportCatalog = true;
             boolean useCatalog = _xsltc.getFeature(JdkXmlFeatures.XmlFeature.USE_CATALOG);
             try {
-                factory.setFeature(JdkXmlUtils.USE_CATALOG,useCatalog);
+                reader.setFeature(JdkXmlUtils.USE_CATALOG, useCatalog);
             }
-            catch (ParserConfigurationException | SAXNotRecognizedException | SAXNotSupportedException e) {
+            catch (SAXNotRecognizedException | SAXNotSupportedException e) {
                 supportCatalog = false;
             }
 
             if (supportCatalog && useCatalog) {
                 try {
                     CatalogFeatures cf = (CatalogFeatures)_xsltc.getProperty(JdkXmlFeatures.CATALOG_FEATURES);
-                    if (cf != null) {
-                        for (CatalogFeatures.Feature f : CatalogFeatures.Feature.values()) {
-                            parser.setProperty(f.getPropertyName(), cf.get(f));
+                        if (cf != null) {
+                            for (CatalogFeatures.Feature f : CatalogFeatures.Feature.values()) {
+                                reader.setProperty(f.getPropertyName(), cf.get(f));
+                            }
                         }
-                    }
                 } catch (SAXNotRecognizedException e) {
                     //shall not happen for internal settings
                 }
             }
 
-            final XMLReader reader = parser.getXMLReader();
             String lastProperty = "";
             try {
                 XMLSecurityManager securityManager =
@@ -525,7 +499,7 @@
                 }
                 if (securityManager.printEntityCountInfo()) {
                     lastProperty = XalanConstants.JDK_ENTITY_COUNT_INFO;
-                    parser.setProperty(XalanConstants.JDK_ENTITY_COUNT_INFO, XalanConstants.JDK_YES);
+                    reader.setProperty(XalanConstants.JDK_ENTITY_COUNT_INFO, XalanConstants.JDK_YES);
                 }
             } catch (SAXException se) {
                 XMLSecurityManager.printWarning(reader.getClass().getName(), lastProperty, se);
@@ -537,13 +511,6 @@
 
             return(parse(reader, input));
         }
-        catch (ParserConfigurationException e) {
-            ErrorMsg err = new ErrorMsg(ErrorMsg.SAX_PARSER_CONFIG_ERR);
-            reportError(ERROR, err);
-        }
-        catch (SAXParseException e){
-            reportError(ERROR, new ErrorMsg(e.getMessage(),e.getLineNumber()));
-        }
         catch (SAXException e) {
             reportError(ERROR, new ErrorMsg(e.getMessage()));
         }
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/XSLTC.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/XSLTC.java	Tue Jan 30 16:41:40 2018 +0100
@@ -135,7 +135,7 @@
      */
     private boolean _isSecureProcessing = false;
 
-    private boolean _useServicesMechanism = true;
+    private boolean _overrideDefaultParser;
 
     /**
      * protocols allowed for external references set by the stylesheet processing instruction, Import and Include element.
@@ -175,8 +175,10 @@
     /**
      * XSLTC compiler constructor
      */
-    public XSLTC(boolean useServicesMechanism, JdkXmlFeatures featureManager) {
-        _parser = new Parser(this, useServicesMechanism);
+    public XSLTC(JdkXmlFeatures featureManager) {
+        _overrideDefaultParser = featureManager.getFeature(
+                JdkXmlFeatures.XmlFeature.JDK_OVERRIDE_PARSER);
+        _parser = new Parser(this, _overrideDefaultParser);
         _xmlFeatures = featureManager;
         _extensionClassLoader = null;
         _externalExtensionFunctions = new HashMap<>();
@@ -195,19 +197,6 @@
     public boolean isSecureProcessing() {
         return _isSecureProcessing;
     }
-    /**
-     * Return the state of the services mechanism feature.
-     */
-    public boolean useServicesMechnism() {
-        return _useServicesMechanism;
-    }
-
-    /**
-     * Set the state of the services mechanism feature.
-     */
-    public void setServicesMechnism(boolean flag) {
-        _useServicesMechanism = flag;
-    }
 
      /**
      * Return the value of the specified feature
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_ko.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_ko.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -417,7 +417,7 @@
          * XSLTC to process the XML input document had a configuration problem.
          */
         {ErrorMsg.SAX_PARSER_CONFIG_ERR,
-        "JAXP \uAD6C\uBB38\uBD84\uC11D\uAE30\uAC00 \uC81C\uB300\uB85C \uAD6C\uC131\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4."},
+        "JAXP \uAD6C\uBB38 \uBD84\uC11D\uAE30\uAC00 \uC81C\uB300\uB85C \uAD6C\uC131\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4."},
 
         /*
          * Note to translators:  The substitution text names the internal error
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_sv.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_sv.java	Tue Jan 30 16:41:40 2018 +0100
@@ -409,7 +409,7 @@
          * "<xsl:stylesheet>" is a keyword that should not be translated.
          */
         {ErrorMsg.ILLEGAL_TEXT_NODE_ERR,
-        "Textdata utanf\u00F6r det \u00F6versta elementet <xsl:stylesheet>."},
+        "Textdata utanf\u00F6r toppniv\u00E5elementet <xsl:stylesheet>."},
 
         /*
          * Note to translators:  JAXP is an acronym for the Java API for XML
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/AbstractTranslet.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/AbstractTranslet.java	Tue Jan 30 16:41:40 2018 +0100
@@ -21,7 +21,6 @@
 package com.sun.org.apache.xalan.internal.xsltc.runtime;
 
 import com.sun.org.apache.xalan.internal.XalanConstants;
-import com.sun.org.apache.xalan.internal.utils.FactoryImpl;
 import com.sun.org.apache.xalan.internal.xsltc.DOM;
 import com.sun.org.apache.xalan.internal.xsltc.DOMCache;
 import com.sun.org.apache.xalan.internal.xsltc.DOMEnhancedForDTM;
@@ -45,6 +44,7 @@
 import javax.xml.parsers.DocumentBuilderFactory;
 import javax.xml.parsers.ParserConfigurationException;
 import javax.xml.transform.Templates;
+import jdk.xml.internal.JdkXmlUtils;
 import org.w3c.dom.DOMImplementation;
 import org.w3c.dom.Document;
 
@@ -106,7 +106,7 @@
     // This is the name of the index used for ID attributes
     private final static String ID_INDEX_NAME = "##id";
 
-    private boolean _useServicesMechanism;
+    private boolean _overrideDefaultParser;
 
     // The OutputStream for redirect function
     private FileOutputStream output = null;
@@ -559,7 +559,7 @@
     {
         try {
             final TransletOutputHandlerFactory factory
-                = TransletOutputHandlerFactory.newInstance();
+                = TransletOutputHandlerFactory.newInstance(_overrideDefaultParser);
 
             String dirStr = new File(filename).getParent();
             if ((null != dirStr) && (dirStr.length() > 0)) {
@@ -761,15 +761,15 @@
     /**
      * Return the state of the services mechanism feature.
      */
-    public boolean useServicesMechnism() {
-        return _useServicesMechanism;
+    public boolean overrideDefaultParser() {
+        return _overrideDefaultParser;
     }
 
     /**
      * Set the state of the services mechanism feature.
      */
-    public void setServicesMechnism(boolean flag) {
-        _useServicesMechanism = flag;
+    public void setOverrideDefaultParser(boolean flag) {
+        _overrideDefaultParser = flag;
     }
 
     /**
@@ -795,7 +795,7 @@
         throws ParserConfigurationException
     {
         if (_domImplementation == null) {
-            DocumentBuilderFactory dbf = FactoryImpl.getDOMFactory(_useServicesMechanism);
+            DocumentBuilderFactory dbf = JdkXmlUtils.getDOMFactory(_overrideDefaultParser);
             _domImplementation = dbf.newDocumentBuilder().getDOMImplementation();
         }
         return _domImplementation.createDocument(uri, qname, null);
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/ErrorMessages_ko.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/ErrorMessages_ko.java	Tue Jan 30 16:41:40 2018 +0100
@@ -210,7 +210,7 @@
          * DTD.
          */
         {BasisLibrary.PARSER_DTD_SUPPORT_ERR,
-        "\uC0AC\uC6A9 \uC911\uC778 SAX \uAD6C\uBB38\uBD84\uC11D\uAE30\uAC00 DTD \uC120\uC5B8 \uC774\uBCA4\uD2B8\uB97C \uCC98\uB9AC\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."},
+        "\uC0AC\uC6A9 \uC911\uC778 SAX \uAD6C\uBB38 \uBD84\uC11D\uAE30\uAC00 DTD \uC120\uC5B8 \uC774\uBCA4\uD2B8\uB97C \uCC98\uB9AC\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."},
 
         /*
          * Note to translators:  The following message indicates that the XML
@@ -219,7 +219,7 @@
          * declarations.
          */
         {BasisLibrary.NAMESPACES_SUPPORT_ERR,
-        "\uC0AC\uC6A9 \uC911\uC778 SAX \uAD6C\uBB38\uBD84\uC11D\uAE30\uAC00 XML \uB124\uC784\uC2A4\uD398\uC774\uC2A4\uB97C \uC9C0\uC6D0\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."},
+        "\uC0AC\uC6A9 \uC911\uC778 SAX \uAD6C\uBB38 \uBD84\uC11D\uAE30\uAC00 XML \uB124\uC784\uC2A4\uD398\uC774\uC2A4\uB97C \uC9C0\uC6D0\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."},
 
         /*
          * Note to translators:  The substitution text is the URI that was in
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/output/TransletOutputHandlerFactory.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/output/TransletOutputHandlerFactory.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -70,17 +70,17 @@
     private ContentHandler _handler                 = null;
     private LexicalHandler _lexHandler              = null;
 
-    private boolean _useServicesMechanism;
+    private boolean _overrideDefaultParser;
 
     static public TransletOutputHandlerFactory newInstance() {
         return new TransletOutputHandlerFactory(true);
     }
-    static public TransletOutputHandlerFactory newInstance(boolean useServicesMechanism) {
-        return new TransletOutputHandlerFactory(useServicesMechanism);
+    static public TransletOutputHandlerFactory newInstance(boolean overrideDefaultParser) {
+        return new TransletOutputHandlerFactory(overrideDefaultParser);
     }
 
-    public TransletOutputHandlerFactory(boolean useServicesMechanism) {
-        _useServicesMechanism = useServicesMechanism;
+    public TransletOutputHandlerFactory(boolean overrideDefaultParser) {
+        _overrideDefaultParser = overrideDefaultParser;
     }
     public void setOutputType(int outputType) {
         _outputType = outputType;
@@ -195,7 +195,9 @@
                 return result;
 
             case DOM :
-                _handler = (_node != null) ? new SAX2DOM(_node, _nextSibling, _useServicesMechanism) : new SAX2DOM(_useServicesMechanism);
+                _handler = (_node != null) ?
+                        new SAX2DOM(_node, _nextSibling, _overrideDefaultParser) :
+                        new SAX2DOM(_overrideDefaultParser);
                 _lexHandler = (LexicalHandler) _handler;
                 // falls through
             case STAX :
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/trax/SAX2DOM.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/trax/SAX2DOM.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -25,15 +25,18 @@
 import java.util.ArrayList;
 import java.util.List;
 import java.util.Stack;
-import javax.xml.parsers.DocumentBuilder;
+
 import javax.xml.parsers.DocumentBuilderFactory;
 import javax.xml.parsers.ParserConfigurationException;
+
+import com.sun.org.apache.xalan.internal.xsltc.runtime.Constants;
+import jdk.xml.internal.JdkXmlUtils;
+
 import org.w3c.dom.Comment;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 import org.w3c.dom.Node;
 import org.w3c.dom.ProcessingInstruction;
-import org.w3c.dom.Text;
 import org.xml.sax.Attributes;
 import org.xml.sax.ContentHandler;
 import org.xml.sax.Locator;
@@ -66,16 +69,16 @@
      * synchronization because the Javadoc is not explicit about
      * thread safety.
      */
-    private DocumentBuilderFactory _factory =
-            DocumentBuilderFactory.newInstance();
+    private DocumentBuilderFactory _factory;
     private boolean _internal = true;
 
-    public SAX2DOM(boolean useServicesMechanism) throws ParserConfigurationException {
-        _document = createDocument(useServicesMechanism);
+    public SAX2DOM(boolean overrideDefaultParser) throws ParserConfigurationException {
+        _document = createDocument(overrideDefaultParser);
         _root = _document;
     }
 
-    public SAX2DOM(Node root, Node nextSibling, boolean useServicesMechanism) throws ParserConfigurationException {
+    public SAX2DOM(Node root, Node nextSibling, boolean overrideDefaultParser)
+            throws ParserConfigurationException {
         _root = root;
         if (root instanceof Document) {
           _document = (Document)root;
@@ -84,15 +87,16 @@
           _document = root.getOwnerDocument();
         }
         else {
-          _document = createDocument(useServicesMechanism);
+          _document = createDocument(overrideDefaultParser);
           _root = _document;
         }
 
         _nextSibling = nextSibling;
     }
 
-    public SAX2DOM(Node root, boolean useServicesMechanism) throws ParserConfigurationException {
-        this(root, null, useServicesMechanism);
+    public SAX2DOM(Node root, boolean overrideDefaultParser)
+            throws ParserConfigurationException {
+        this(root, null, overrideDefaultParser);
     }
 
     public Node getDOM() {
@@ -304,18 +308,13 @@
     public void startDTD(String name, String publicId, String systemId)
         throws SAXException {}
 
-    private Document createDocument(boolean useServicesMechanism) throws ParserConfigurationException {
+    private Document createDocument(boolean overrideDefaultParser)
+            throws ParserConfigurationException {
         if (_factory == null) {
-            if (useServicesMechanism) {
-                _factory = DocumentBuilderFactory.newInstance();
-                if (!(_factory instanceof com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl)) {
-                    _internal = false;
-                }
-            } else {
-                _factory = DocumentBuilderFactory.newInstance(
-                  "com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl",
-                  SAX2DOM.class.getClassLoader()
-                  );
+            _factory = JdkXmlUtils.getDOMFactory(overrideDefaultParser);
+            _internal = true;
+            if (!(_factory instanceof com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl)) {
+                _internal = false;
             }
         }
         Document doc;
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/trax/TemplatesHandlerImpl.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/trax/TemplatesHandlerImpl.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -98,7 +98,7 @@
         _tfactory = tfactory;
 
         // Instantiate XSLTC and get reference to parser object
-        XSLTC xsltc = new XSLTC(tfactory.useServicesMechnism(), tfactory.getJdkXmlFeatures());
+        XSLTC xsltc = new XSLTC(tfactory.getJdkXmlFeatures());
         if (tfactory.getFeature(XMLConstants.FEATURE_SECURE_PROCESSING))
             xsltc.setSecureProcessing(true);
 
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/trax/TemplatesImpl.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/trax/TemplatesImpl.java	Tue Jan 30 16:41:40 2018 +0100
@@ -142,9 +142,9 @@
     private transient TransformerFactoryImpl _tfactory = null;
 
     /**
-     * A flag to determine whether the Service Mechanism is used
+     * A flag to determine whether the system-default parser may be overridden
      */
-    private transient boolean _useServicesMechanism;
+    private transient boolean _overrideDefaultParser;
 
     /**
      * protocols allowed for external references set by the stylesheet processing instruction, Import and Include element.
@@ -241,7 +241,7 @@
         _outputProperties = outputProperties;
         _indentNumber = indentNumber;
         _tfactory = tfactory;
-        _useServicesMechanism = tfactory.useServicesMechnism();
+        _overrideDefaultParser = tfactory.overrideDefaultParser();
         _accessExternalStylesheet = (String) tfactory.getAttribute(XMLConstants.ACCESS_EXTERNAL_STYLESHEET);
     }
     /**
@@ -324,8 +324,8 @@
     /**
      * Return the state of the services mechanism feature.
      */
-    public boolean useServicesMechnism() {
-        return _useServicesMechanism;
+    public boolean overrideDefaultParser() {
+        return _overrideDefaultParser;
     }
 
      /**
@@ -556,7 +556,7 @@
                     _class[_transletIndex].getConstructor().newInstance();
             translet.postInitialization();
             translet.setTemplates(this);
-            translet.setServicesMechnism(_useServicesMechanism);
+            translet.setOverrideDefaultParser(_overrideDefaultParser);
             translet.setAllowedProtocols(_accessExternalStylesheet);
             if (_auxClasses != null) {
                 translet.setAuxiliaryClasses(_auxClasses);
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/trax/TrAXFilter.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/trax/TrAXFilter.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -23,11 +23,6 @@
 
 import java.io.IOException;
 
-import javax.xml.XMLConstants;
-import javax.xml.parsers.FactoryConfigurationError;
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.parsers.SAXParser;
-import javax.xml.parsers.SAXParserFactory;
 import javax.xml.transform.ErrorListener;
 import javax.xml.transform.Templates;
 import javax.xml.transform.Transformer;
@@ -35,13 +30,13 @@
 import javax.xml.transform.sax.SAXResult;
 
 import com.sun.org.apache.xml.internal.utils.XMLReaderManager;
+import jdk.xml.internal.JdkXmlUtils;
 
 import org.xml.sax.ContentHandler;
 import org.xml.sax.InputSource;
 import org.xml.sax.SAXException;
 import org.xml.sax.XMLReader;
 import org.xml.sax.helpers.XMLFilterImpl;
-import org.xml.sax.helpers.XMLReaderFactory;
 
 /**
  * skeleton extension of XMLFilterImpl for now.
@@ -53,7 +48,7 @@
     private Templates              _templates;
     private TransformerImpl        _transformer;
     private TransformerHandlerImpl _transformerHandler;
-    private boolean _useServicesMechanism = true;
+    private boolean _overrideDefaultParser;
 
     public TrAXFilter(Templates templates)  throws
         TransformerConfigurationException
@@ -61,7 +56,7 @@
         _templates = templates;
         _transformer = (TransformerImpl) templates.newTransformer();
         _transformerHandler = new TransformerHandlerImpl(_transformer);
-        _useServicesMechanism = _transformer.useServicesMechnism();
+        _overrideDefaultParser = _transformer.overrideDefaultParser();
     }
 
     public Transformer getTransformer() {
@@ -69,36 +64,14 @@
     }
 
     private void createParent() throws SAXException {
-        XMLReader parent = null;
-        try {
-            SAXParserFactory pfactory = SAXParserFactory.newInstance();
-            pfactory.setNamespaceAware(true);
-
-            if (_transformer.isSecureProcessing()) {
-                try {
-                    pfactory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, true);
-                }
-                catch (SAXException e) {}
-            }
-
-            SAXParser saxparser = pfactory.newSAXParser();
-            parent = saxparser.getXMLReader();
-        }
-        catch (ParserConfigurationException e) {
-            throw new SAXException(e);
-        }
-        catch (FactoryConfigurationError e) {
-            throw new SAXException(e.toString());
-        }
-
-        if (parent == null) {
-            parent = XMLReaderFactory.createXMLReader();
-        }
+        XMLReader parent = JdkXmlUtils.getXMLReader(_overrideDefaultParser,
+                _transformer.isSecureProcessing());
 
         // make this XMLReader the parent of this filter
         setParent(parent);
     }
 
+    @Override
     public void parse (InputSource input) throws SAXException, IOException
     {
         XMLReader managedReader = null;
@@ -106,7 +79,7 @@
         try {
             if (getParent() == null) {
                 try {
-                    managedReader = XMLReaderManager.getInstance(_useServicesMechanism)
+                    managedReader = XMLReaderManager.getInstance(_overrideDefaultParser)
                                                     .getXMLReader();
                     setParent(managedReader);
                 } catch (SAXException  e) {
@@ -118,7 +91,7 @@
             getParent().parse(input);
         } finally {
             if (managedReader != null) {
-                XMLReaderManager.getInstance(_useServicesMechanism).releaseXMLReader(managedReader);
+                XMLReaderManager.getInstance(_overrideDefaultParser).releaseXMLReader(managedReader);
             }
         }
     }
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/trax/TransformerFactoryImpl.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/trax/TransformerFactoryImpl.java	Tue Jan 30 16:41:40 2018 +0100
@@ -21,7 +21,6 @@
 package com.sun.org.apache.xalan.internal.xsltc.trax;
 
 import com.sun.org.apache.xalan.internal.XalanConstants;
-import com.sun.org.apache.xalan.internal.utils.FactoryImpl;
 import com.sun.org.apache.xalan.internal.utils.FeaturePropertyBase;
 import com.sun.org.apache.xalan.internal.utils.ObjectFactory;
 import com.sun.org.apache.xalan.internal.utils.XMLSecurityManager;
@@ -55,15 +54,12 @@
 import javax.xml.catalog.CatalogFeatures;
 import javax.xml.catalog.CatalogManager;
 import javax.xml.catalog.CatalogResolver;
-import javax.xml.parsers.SAXParser;
-import javax.xml.parsers.SAXParserFactory;
 import javax.xml.transform.ErrorListener;
 import javax.xml.transform.Source;
 import javax.xml.transform.Templates;
 import javax.xml.transform.Transformer;
 import javax.xml.transform.TransformerConfigurationException;
 import javax.xml.transform.TransformerException;
-import javax.xml.transform.TransformerFactory;
 import javax.xml.transform.URIResolver;
 import javax.xml.transform.dom.DOMResult;
 import javax.xml.transform.dom.DOMSource;
@@ -79,18 +75,17 @@
 import jdk.xml.internal.JdkXmlUtils;
 import jdk.xml.internal.SecuritySupport;
 import org.xml.sax.InputSource;
+import org.xml.sax.SAXException;
 import org.xml.sax.XMLFilter;
 import org.xml.sax.XMLReader;
-import org.xml.sax.helpers.XMLReaderFactory;
 
 /**
- * Implementation of a JAXP1.1 TransformerFactory for Translets.
+ * Implementation of a JAXP TransformerFactory for Translets.
  * @author G. Todd Miller
  * @author Morten Jorgensen
  * @author Santiago Pericas-Geertsen
  * @LastModified: Nov 2017
  */
-@SuppressWarnings("deprecation") //org.xml.sax.helpers.XMLReaderFactory
 public class TransformerFactoryImpl
     extends SAXTransformerFactory implements SourceLoader, ErrorListener
 {
@@ -216,11 +211,11 @@
     private boolean _isSecureMode = false;
 
     /**
-     * Indicates whether implementation parts should use
-     *   service loader (or similar).
-     * Note the default value (false) is the safe option..
+     * Indicates whether 3rd party parser may be used to override the system-default
+     * Note the default value (false) is the safe option.
+     * Note same as the old property useServicesMechanism
      */
-    private boolean _useServicesMechanism;
+    private boolean _overrideDefaultParser;
 
     /**
      * protocols allowed for external references set by the stylesheet
@@ -259,15 +254,6 @@
      * javax.xml.transform.sax.TransformerFactory implementation.
      */
     public TransformerFactoryImpl() {
-        this(true);
-    }
-
-    public static TransformerFactory newTransformerFactoryNoServiceLoader() {
-        return new TransformerFactoryImpl(false);
-    }
-
-    private TransformerFactoryImpl(boolean useServicesMechanism) {
-        this._useServicesMechanism = useServicesMechanism;
 
         if (System.getSecurityManager() != null) {
             _isSecureMode = true;
@@ -275,6 +261,8 @@
         }
 
         _xmlFeatures = new JdkXmlFeatures(!_isNotSecureProcessing);
+        _overrideDefaultParser = _xmlFeatures.getFeature(
+                JdkXmlFeatures.XmlFeature.JDK_OVERRIDE_PARSER);
         _xmlSecurityPropertyMgr = new XMLSecurityPropertyManager();
         _accessExternalDTD = _xmlSecurityPropertyMgr.getValue(
                 Property.ACCESS_EXTERNAL_DTD);
@@ -594,14 +582,20 @@
                         JdkXmlFeatures.State.FSP, false);
             }
         }
-        else if (name.equals(XalanConstants.ORACLE_FEATURE_SERVICE_MECHANISM)) {
-            //in secure mode, let _useServicesMechanism be determined by the constructor
-            if (!_isSecureMode)
-                _useServicesMechanism = value;
-        }
         else {
+            if (name.equals(XalanConstants.ORACLE_FEATURE_SERVICE_MECHANISM)) {
+                // for compatibility, in secure mode, useServicesMechanism is determined by the constructor
+                if (_isSecureMode) {
+                    return;
+                }
+            }
             if (_xmlFeatures != null &&
                     _xmlFeatures.setFeature(name, JdkXmlFeatures.State.APIPROPERTY, value)) {
+                if (name.equals(JdkXmlUtils.OVERRIDE_PARSER) ||
+                        name.equals(JdkXmlFeatures.ORACLE_FEATURE_SERVICE_MECHANISM)) {
+                    _overrideDefaultParser = _xmlFeatures.getFeature(
+                            JdkXmlFeatures.XmlFeature.JDK_OVERRIDE_PARSER);
+                }
                 return;
             }
 
@@ -666,8 +660,8 @@
     /**
      * Return the state of the services mechanism feature.
      */
-    public boolean useServicesMechnism() {
-        return _useServicesMechanism;
+    public boolean overrideDefaultParser() {
+        return _overrideDefaultParser;
     }
 
      /**
@@ -726,10 +720,9 @@
         throws TransformerConfigurationException {
 
         String baseId;
-        XMLReader reader;
+        XMLReader reader = null;
         InputSource isource;
 
-
         /**
          * Fix for bugzilla bug 24187
          */
@@ -748,24 +741,15 @@
                 dom2sax.setContentHandler( _stylesheetPIHandler);
                 dom2sax.parse();
             } else {
+                if (source instanceof SAXSource) {
+                    reader = ((SAXSource)source).getXMLReader();
+                }
                 isource = SAXSource.sourceToInputSource(source);
                 baseId = isource.getSystemId();
 
-                SAXParserFactory factory = FactoryImpl.getSAXFactory(_useServicesMechanism);
-                factory.setNamespaceAware(true);
-
-                if (!_isNotSecureProcessing) {
-                    try {
-                        factory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, true);
-                    }
-                    catch (org.xml.sax.SAXException e) {}
-                }
-
-                SAXParser jaxpParser = factory.newSAXParser();
-
-                reader = jaxpParser.getXMLReader();
                 if (reader == null) {
-                    reader = XMLReaderFactory.createXMLReader();
+                    reader = JdkXmlUtils.getXMLReader(_overrideDefaultParser,
+                            !_isNotSecureProcessing);
                 }
 
                 _stylesheetPIHandler.setBaseId(baseId);
@@ -781,7 +765,7 @@
         } catch (StopParseException e ) {
           // startElement encountered so do not parse further
 
-        } catch (javax.xml.parsers.ParserConfigurationException | org.xml.sax.SAXException | IOException e) {
+        } catch (SAXException | IOException e) {
              throw new TransformerConfigurationException(
              "getAssociatedStylesheets failed", e);
         }
@@ -962,7 +946,7 @@
         }
 
         // Create and initialize a stylesheet compiler
-        final XSLTC xsltc = new XSLTC(_useServicesMechanism, _xmlFeatures);
+        final XSLTC xsltc = new XSLTC(_xmlFeatures);
         if (_debug) xsltc.setDebug(true);
         if (_enableInlining)
                 xsltc.setTemplateInlining(true);
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/trax/TransformerImpl.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/trax/TransformerImpl.java	Tue Jan 30 16:41:40 2018 +0100
@@ -21,7 +21,6 @@
 package com.sun.org.apache.xalan.internal.xsltc.trax;
 
 import com.sun.org.apache.xalan.internal.XalanConstants;
-import com.sun.org.apache.xalan.internal.utils.FactoryImpl;
 import com.sun.org.apache.xalan.internal.utils.XMLSecurityManager;
 import com.sun.org.apache.xalan.internal.xsltc.DOM;
 import com.sun.org.apache.xalan.internal.xsltc.DOMCache;
@@ -102,8 +101,6 @@
 
     private final static String LEXICAL_HANDLER_PROPERTY =
         "http://xml.org/sax/properties/lexical-handler";
-    private static final String NAMESPACE_FEATURE =
-        "http://xml.org/sax/features/namespaces";
 
     /**
      * Namespace prefixes feature for {@link XMLReader}.
@@ -200,15 +197,10 @@
     private boolean _isSecureProcessing = false;
 
     /**
-     * Indicates whether implementation parts should use
-     *   service loader (or similar).
-     * Note the default value (false) is the safe option..
+     * Indicates whether 3rd party parser may be used to override the system-default
      */
-    private boolean _useServicesMechanism;
-    /**
-     * protocols allowed for external references set by the stylesheet processing instruction, Import and Include element.
-     */
-    private String _accessExternalStylesheet = XalanConstants.EXTERNAL_ACCESS_DEFAULT;
+    private boolean _overrideDefaultParser;
+
      /**
      * protocols allowed for external DTD references in source file and/or stylesheet.
      */
@@ -276,11 +268,10 @@
         _propertiesClone = (Properties) _properties.clone();
         _indentNumber = indentNumber;
         _tfactory = tfactory;
-        _useServicesMechanism = _tfactory.useServicesMechnism();
-        _accessExternalStylesheet = (String)_tfactory.getAttribute(XMLConstants.ACCESS_EXTERNAL_STYLESHEET);
+        _overrideDefaultParser = _tfactory.overrideDefaultParser();
         _accessExternalDTD = (String)_tfactory.getAttribute(XMLConstants.ACCESS_EXTERNAL_DTD);
         _securityManager = (XMLSecurityManager)_tfactory.getAttribute(XalanConstants.SECURITY_MANAGER);
-        _readerManager = XMLReaderManager.getInstance(_useServicesMechanism);
+        _readerManager = XMLReaderManager.getInstance(_overrideDefaultParser);
         _readerManager.setProperty(XMLConstants.ACCESS_EXTERNAL_DTD, _accessExternalDTD);
         _readerManager.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, _isSecureProcessing);
         _readerManager.setProperty(XalanConstants.SECURITY_MANAGER, _securityManager);
@@ -317,15 +308,15 @@
     /**
      * Return the state of the services mechanism feature.
      */
-    public boolean useServicesMechnism() {
-        return _useServicesMechanism;
+    public boolean overrideDefaultParser() {
+        return _overrideDefaultParser;
     }
 
     /**
      * Set the state of the services mechanism feature.
      */
-    public void setServicesMechnism(boolean flag) {
-        _useServicesMechanism = flag;
+    public void setOverrideDefaultParser(boolean flag) {
+        _overrideDefaultParser = flag;
     }
 
     /**
@@ -409,7 +400,7 @@
         // Get encoding using getProperty() to use defaults
         _encoding = _properties.getProperty(OutputKeys.ENCODING);
 
-        _tohFactory = TransletOutputHandlerFactory.newInstance(_useServicesMechanism);
+        _tohFactory = TransletOutputHandlerFactory.newInstance(_overrideDefaultParser);
         _tohFactory.setEncoding(_encoding);
         if (_method != null) {
             _tohFactory.setOutputMethod(_method);
@@ -579,7 +570,7 @@
                  if (_dtmManager == null) {
                      _dtmManager =
                          _tfactory.createNewDTMManagerInstance();
-                     _dtmManager.setServicesMechnism(_useServicesMechanism);
+                     _dtmManager.setOverrideDefaultParser(_overrideDefaultParser);
                  }
                  dom = (DOM)_dtmManager.getDTM(source, false, wsfilter, true,
                                               false, false, 0, hasIdCall);
@@ -754,7 +745,7 @@
 
                 boolean supportCatalog = true;
 
-                DocumentBuilderFactory builderF = FactoryImpl.getDOMFactory(_useServicesMechanism);
+                DocumentBuilderFactory builderF = JdkXmlUtils.getDOMFactory(_overrideDefaultParser);
                 try {
                     builderF.setFeature(XMLConstants.USE_CATALOG, _useCatalog);
                 } catch (ParserConfigurationException e) {
--- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/trax/Util.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/trax/Util.java	Tue Jan 30 16:41:40 2018 +0100
@@ -21,7 +21,6 @@
 package com.sun.org.apache.xalan.internal.xsltc.trax;
 
 import com.sun.org.apache.xalan.internal.XalanConstants;
-import com.sun.org.apache.xalan.internal.utils.FactoryImpl;
 import com.sun.org.apache.xalan.internal.utils.XMLSecurityManager;
 import com.sun.org.apache.xalan.internal.xsltc.compiler.XSLTC;
 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.ErrorMsg;
@@ -30,8 +29,6 @@
 import javax.xml.XMLConstants;
 import javax.xml.catalog.CatalogFeatures;
 import javax.xml.catalog.CatalogFeatures.Feature;
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.parsers.SAXParserFactory;
 import javax.xml.stream.XMLEventReader;
 import javax.xml.stream.XMLStreamReader;
 import javax.xml.transform.Source;
@@ -42,13 +39,13 @@
 import javax.xml.transform.stream.StreamSource;
 import jdk.xml.internal.JdkXmlFeatures;
 import jdk.xml.internal.JdkXmlUtils;
+import jdk.xml.internal.SecuritySupport;
 import org.w3c.dom.Document;
 import org.xml.sax.InputSource;
 import org.xml.sax.SAXException;
 import org.xml.sax.SAXNotRecognizedException;
 import org.xml.sax.SAXNotSupportedException;
 import org.xml.sax.XMLReader;
-import org.xml.sax.helpers.XMLReaderFactory;
 
 /**
  * @author Santiago Pericas-Geertsen
@@ -57,6 +54,7 @@
  */
 @SuppressWarnings("deprecation") //org.xml.sax.helpers.XMLReaderFactory
 public final class Util {
+    private static final String property = "org.xml.sax.driver";
 
     public static String baseName(String name) {
         return com.sun.org.apache.xalan.internal.xsltc.compiler.util.Util.baseName(name);
@@ -89,54 +87,18 @@
                 try {
                     XMLReader reader = sax.getXMLReader();
 
-                     /*
-                      * Fix for bug 24695
-                      * According to JAXP 1.2 specification if a SAXSource
-                      * is created using a SAX InputSource the Transformer or
-                      * TransformerFactory creates a reader via the
-                      * XMLReaderFactory if setXMLReader is not used
-                      */
-
                     if (reader == null) {
-                       try {
-                           reader= XMLReaderFactory.createXMLReader();
-                           try {
-                                reader.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING,
-                                            xsltc.isSecureProcessing());
-                           } catch (SAXNotRecognizedException e) {
-                                XMLSecurityManager.printWarning(reader.getClass().getName(),
-                                        XMLConstants.FEATURE_SECURE_PROCESSING, e);
-                           }
-                       } catch (Exception e ) {
-                           try {
-
-                               //Incase there is an exception thrown
-                               // resort to JAXP
-                               SAXParserFactory parserFactory = FactoryImpl.getSAXFactory(xsltc.useServicesMechnism());
-                               parserFactory.setNamespaceAware(true);
-
-                               if (xsltc.isSecureProcessing()) {
-                                  try {
-                                      parserFactory.setFeature(
-                                          XMLConstants.FEATURE_SECURE_PROCESSING, true);
-                                  }
-                                  catch (org.xml.sax.SAXException se) {}
-                               }
-
-                               reader = parserFactory.newSAXParser()
-                                     .getXMLReader();
-
-
-                           } catch (ParserConfigurationException pce ) {
-                               throw new TransformerConfigurationException
-                                 ("ParserConfigurationException" ,pce);
-                           }
-                       }
+                        boolean overrideDefaultParser = xsltc.getFeature(
+                                JdkXmlFeatures.XmlFeature.JDK_OVERRIDE_PARSER);
+                        reader = JdkXmlUtils.getXMLReader(overrideDefaultParser,
+                                xsltc.isSecureProcessing());
+                    } else {
+                        // compatibility for legacy applications
+                        reader.setFeature
+                            (JdkXmlUtils.NAMESPACES_FEATURE,true);
+                        reader.setFeature
+                            (JdkXmlUtils.NAMESPACE_PREFIXES_FEATURE,false);
                     }
-                    reader.setFeature
-                        ("http://xml.org/sax/features/namespaces",true);
-                    reader.setFeature
-                        ("http://xml.org/sax/features/namespace-prefixes",false);
 
                     JdkXmlUtils.setXMLReaderPropertyIfSupport(reader, XMLConstants.ACCESS_EXTERNAL_DTD,
                             xsltc.getProperty(XMLConstants.ACCESS_EXTERNAL_DTD), true);
@@ -192,9 +154,6 @@
                 }catch (SAXNotSupportedException snse ) {
                   throw new TransformerConfigurationException
                        ("SAXNotSupportedException ",snse);
-                }catch (SAXException se ) {
-                  throw new TransformerConfigurationException
-                       ("SAXException ",se);
                 }
 
             }
--- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DOMConfigurationImpl.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DOMConfigurationImpl.java	Tue Jan 30 16:41:40 2018 +0100
@@ -259,7 +259,8 @@
             SEND_PSVI,
             NAMESPACE_GROWTH,
             TOLERATE_DUPLICATES,
-            XMLConstants.USE_CATALOG
+            XMLConstants.USE_CATALOG,
+            JdkXmlUtils.OVERRIDE_PARSER
         };
         addRecognizedFeatures(recognizedFeatures);
 
@@ -273,6 +274,7 @@
         setFeature(SEND_PSVI, true);
         setFeature(NAMESPACE_GROWTH, false);
         setFeature(XMLConstants.USE_CATALOG, JdkXmlUtils.USE_CATALOG_DEFAULT);
+        setFeature(JdkXmlUtils.OVERRIDE_PARSER, JdkXmlUtils.OVERRIDE_PARSER_DEFAULT);
 
         // add default recognized properties
         final String[] recognizedProperties = {
--- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DOMMessages_ko.properties	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DOMMessages_ko.properties	Tue Jan 30 16:41:40 2018 +0100
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2009, 2017, 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
@@ -80,7 +80,7 @@
 jaxp-null-input-source = \uC9C0\uC815\uB41C \uC18C\uC2A4\uB294 \uB110\uC77C \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
 
 #Ranges
-BAD_BOUNDARYPOINTS_ERR = \uBC94\uC704\uC758 \uACBD\uACC4 \uC9C0\uC810\uC774 \uD2B9\uC815 \uC694\uAD6C\uC0AC\uD56D\uC744 \uCDA9\uC871\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
+BAD_BOUNDARYPOINTS_ERR = \uBC94\uC704\uC758 \uACBD\uACC4 \uC9C0\uC810\uC774 \uD2B9\uC815 \uC694\uAD6C \uC0AC\uD56D\uC744 \uCDA9\uC871\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
 INVALID_NODE_TYPE_ERR = \uBC94\uC704\uC758 \uACBD\uACC4 \uC9C0\uC810 \uCEE8\uD14C\uC774\uB108\uAC00 \uBD80\uC801\uD569\uD55C \uC720\uD615\uC758 \uB178\uB4DC \uB610\uB294 \uBD80\uC801\uD569\uD55C \uC720\uD615\uC758 \uC870\uC0C1\uC744 \uAC00\uC9C4 \uB178\uB4DC\uB85C \uC124\uC815\uB418\uACE0 \uC788\uC2B5\uB2C8\uB2E4.
 
 
--- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/SAXMessages_ko.properties	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/SAXMessages_ko.properties	Tue Jan 30 16:41:40 2018 +0100
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2009, 2017, 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
@@ -49,11 +49,11 @@
 property-not-supported = ''{0}'' \uC18D\uC131\uC740 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
 property-not-recognized = ''{0}'' \uC18D\uC131\uC744 \uC778\uC2DD\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
 property-read-only = ''{0}'' \uC18D\uC131\uC740 \uC77D\uAE30 \uC804\uC6A9\uC785\uB2C8\uB2E4.
-property-not-parsing-supported = \uAD6C\uBB38\uBD84\uC11D \uC911 ''{0}'' \uC18D\uC131\uC740 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
+property-not-parsing-supported = \uAD6C\uBB38 \uBD84\uC11D \uC911 ''{0}'' \uC18D\uC131\uC740 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
 dom-node-read-not-supported = DOM \uB178\uB4DC \uC18D\uC131\uC744 \uC77D\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. DOM \uD2B8\uB9AC\uAC00 \uC874\uC7AC\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
 incompatible-class = ''{0}'' \uC18D\uC131\uC5D0 \uB300\uD574 \uC9C0\uC815\uB41C \uAC12\uC758 \uB370\uC774\uD130\uD615\uC744 {1}(\uC73C)\uB85C \uBCC0\uD658\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
 
 start-document-not-called="{0}" \uC18D\uC131\uC740 startDocument \uC774\uBCA4\uD2B8\uAC00 \uBC1C\uC0DD\uB41C \uD6C4 \uD638\uCD9C\uD574\uC57C \uD569\uB2C8\uB2E4.
 nullparameter="{0}"\uC5D0 \uB300\uD55C \uC774\uB984 \uB9E4\uAC1C\uBCC0\uC218\uAC00 \uB110\uC785\uB2C8\uB2E4.
-errorHandlerNotSet=\uACBD\uACE0: \uAC80\uC99D\uC774 \uC124\uC815\uB418\uC5C8\uC9C0\uB9CC org.xml.sax.ErrorHandler\uAC00 \uC801\uC808\uD788 \uC124\uC815\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4. \uAD6C\uBB38\uBD84\uC11D\uAE30\uAC00 \uAE30\uBCF8 ErrorHandler\uB97C \uC0AC\uC6A9\uD558\uC5EC \uCC98\uC74C {0}\uAC1C\uC758 \uC624\uB958\uB97C \uC778\uC1C4\uD569\uB2C8\uB2E4. \uC774 \uC624\uB958\uB97C \uC218\uC815\uD558\uB824\uBA74 ''setErrorHandler'' \uBA54\uC18C\uB4DC\uB97C \uD638\uCD9C\uD558\uC2ED\uC2DC\uC624.
+errorHandlerNotSet=\uACBD\uACE0: \uAC80\uC99D\uC774 \uC124\uC815\uB418\uC5C8\uC9C0\uB9CC org.xml.sax.ErrorHandler\uAC00 \uC801\uC808\uD788 \uC124\uC815\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4. \uAD6C\uBB38 \uBD84\uC11D\uAE30\uAC00 \uAE30\uBCF8 ErrorHandler\uB97C \uC0AC\uC6A9\uD558\uC5EC \uCC98\uC74C {0}\uAC1C\uC758 \uC624\uB958\uB97C \uC778\uC1C4\uD569\uB2C8\uB2E4. \uC774 \uC624\uB958\uB97C \uC218\uC815\uD558\uB824\uBA74 ''setErrorHandler'' \uBA54\uC18C\uB4DC\uB97C \uD638\uCD9C\uD558\uC2ED\uC2DC\uC624.
 errorHandlerDebugMsg=\uC624\uB958: URI = "{0}", \uD589 = "{1}", : {2} 
--- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XIncludeMessages_sv.properties	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XIncludeMessages_sv.properties	Tue Jan 30 16:41:40 2018 +0100
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2009, 2017, 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
@@ -48,8 +48,8 @@
 AcceptLanguageMalformed = Tecken utanf\u00F6r intervallet #x20 till #x7E till\u00E5ts inte i v\u00E4rdet f\u00F6r 'accept-language'-attributet i 'include'-element.
 RootElementRequired = Ett v\u00E4lformulerat dokument kr\u00E4ver ett rotelement.
 MultipleRootElements = Ett v\u00E4lformulerat dokument f\u00E5r inte inneh\u00E5lla flera rotelement.
-ContentIllegalAtTopLevel = Ers\u00E4ttningen av ett 'include'-element som f\u00F6rekommer som dokumentelement i k\u00E4llans informationsupps\u00E4ttning p\u00E5 \u00F6versta niv\u00E5n f\u00E5r inte inneh\u00E5lla tecken.
-UnexpandedEntityReferenceIllegal = Ers\u00E4ttningen av ett 'include'-element som f\u00F6rekommer som dokumentelement i k\u00E4llans informationsupps\u00E4ttning p\u00E5 \u00F6versta niv\u00E5n f\u00E5r inte inneh\u00E5lla ut\u00F6kade enhetsreferenser.
+ContentIllegalAtTopLevel = Ers\u00E4ttningen av ett 'include'-element som f\u00F6rekommer som dokumentelement i k\u00E4llans informationsupps\u00E4ttning p\u00E5 toppniv\u00E5n f\u00E5r inte inneh\u00E5lla tecken.
+UnexpandedEntityReferenceIllegal = Ers\u00E4ttningen av ett 'include'-element som f\u00F6rekommer som dokumentelement i k\u00E4llans informationsupps\u00E4ttning p\u00E5 toppniv\u00E5n f\u00E5r inte inneh\u00E5lla ut\u00F6kade enhetsreferenser.
 HrefFragmentIdentifierIllegal = Fragmentidentifierare f\u00E5r inte anv\u00E4ndas. ''href''-attributv\u00E4rdet ''{0}'' \u00E4r inte till\u00E5tet.
 HrefSyntacticallyInvalid = ''href''-attributv\u00E4rdet ''{0}'' \u00E4r syntaktiskt ogiltigt. Efter till\u00E4mpning av avbrottsregler har v\u00E4rdet varken syntaktiskt korrekt URI eller IRI.
 XPointerStreamability = En xpointer har angetts som pekar till en plats i k\u00E4llans informationsupps\u00E4ttning. Det finns ingen \u00E5tkomst till denna plats p\u00E5 grund av processorns str\u00F6mningsmetod.
--- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages.properties	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages.properties	Tue Jan 30 16:41:40 2018 +0100
@@ -304,4 +304,5 @@
         EntityReplacementLimit=JAXP00010007: The total number of nodes in entity references is \"{0}\" that is over the limit \"{1}\" set by \"{2}\".
 
 # Catalog 09
-        CatalogException=JAXP00090001: The CatalogResolver is enabled with the catalog \"{0}\", but a CatalogException is returned.
\ No newline at end of file
+# Technical term, do not translate: catalog
+        CatalogException=JAXP00090001: The CatalogResolver is enabled with the catalog \"{0}\", but a CatalogException is returned.
--- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_ko.properties	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_ko.properties	Tue Jan 30 16:41:40 2018 +0100
@@ -295,7 +295,7 @@
 
 
 # Implementation limits
-        EntityExpansionLimit=JAXP00010001: \uAD6C\uBB38\uBD84\uC11D\uAE30\uAC00 \uC774 \uBB38\uC11C\uC5D0\uC11C "{0}"\uAC1C\uB97C \uCD08\uACFC\uD558\uB294 \uC5D4\uD2F0\uD2F0 \uD655\uC7A5\uC744 \uBC1C\uACAC\uD588\uC2B5\uB2C8\uB2E4. \uC774\uB294 JDK\uC5D0\uC11C \uC801\uC6A9\uD558\uB294 \uC81C\uD55C\uC785\uB2C8\uB2E4.
+        EntityExpansionLimit=JAXP00010001: \uAD6C\uBB38 \uBD84\uC11D\uAE30\uAC00 \uC774 \uBB38\uC11C\uC5D0\uC11C "{0}"\uAC1C\uB97C \uCD08\uACFC\uD558\uB294 \uC5D4\uD2F0\uD2F0 \uD655\uC7A5\uC744 \uBC1C\uACAC\uD588\uC2B5\uB2C8\uB2E4. \uC774\uB294 JDK\uC5D0\uC11C \uC801\uC6A9\uD558\uB294 \uC81C\uD55C\uC785\uB2C8\uB2E4.
         ElementAttributeLimit=JAXP00010002:  "{0}" \uC694\uC18C\uC5D0 "{1}"\uAC1C\uB97C \uCD08\uACFC\uD558\uB294 \uC18D\uC131\uC774 \uC788\uC2B5\uB2C8\uB2E4. "{1}"\uC740(\uB294) JDK\uC5D0\uC11C \uC801\uC6A9\uD558\uB294 \uC81C\uD55C\uC785\uB2C8\uB2E4.
         MaxEntitySizeLimit=JAXP00010003: "{0}" \uC5D4\uD2F0\uD2F0\uC758 \uAE38\uC774\uAC00 "{3}"\uC5D0\uC11C \uC124\uC815\uB41C "{2}" \uC81C\uD55C\uC744 \uCD08\uACFC\uD558\uB294 "{1}"\uC785\uB2C8\uB2E4.
         TotalEntitySizeLimit=JAXP00010004: \uC5D4\uD2F0\uD2F0\uC758 \uB204\uC801 \uD06C\uAE30\uAC00 "{2}"\uC5D0\uC11C \uC124\uC815\uD55C "{1}" \uC81C\uD55C\uC744 \uCD08\uACFC\uD558\uB294 "{0}"\uC785\uB2C8\uB2E4.
--- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_zh_TW.properties	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_zh_TW.properties	Tue Jan 30 16:41:40 2018 +0100
@@ -300,7 +300,7 @@
         MaxEntitySizeLimit=JAXP00010003: \u5BE6\u9AD4 "{0}" \u7684\u9577\u5EA6\u70BA "{1}"\uFF0C\u8D85\u904E "{3}" \u6240\u8A2D\u5B9A\u7684 "{2}" \u9650\u5236\u3002
         TotalEntitySizeLimit=JAXP00010004: \u5BE6\u9AD4\u7684\u7D2F\u7A4D\u5927\u5C0F\u70BA "{0}"\uFF0C\u8D85\u904E "{2}" \u6240\u8A2D\u5B9A\u7684 "{1}" \u9650\u5236\u3002
         MaxXMLNameLimit=JAXP00010005: \u5BE6\u9AD4 "{0}" \u7684\u9577\u5EA6\u70BA "{1}"\uFF0C\u8D85\u904E "{3}" \u6240\u8A2D\u5B9A\u7684 "{2}" \u9650\u5236\u3002
-        MaxElementDepthLimit=JAXP00010006: \u5143\u7D20 "{0}" \u7684\u6DF1\u5EA6\u70BA "{1}"\uFF0C\u8D85\u904E "{3}" \u8A2D\u5B9A\u7684 "{2}" \u9650\u5236\u3002
+        MaxElementDepthLimit=JAXP00010006: \u5143\u7D20 "{0}" \u7684\u6DF1\u5EA6\u70BA "{1}"\uFF0C\u8D85\u904E "{3}" \u6240\u8A2D\u5B9A\u7684 "{2}" \u9650\u5236\u3002
         EntityReplacementLimit=JAXP00010007: \u5BE6\u9AD4\u53C3\u7167\u4E2D\u7684\u7BC0\u9EDE\u7E3D\u6578\u70BA "{0}"\uFF0C\u8D85\u904E "{2}" \u6240\u8A2D\u5B9A\u7684 "{1}" \u9650\u5236\u3002
 
 # Catalog 09
--- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_ko.properties	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_ko.properties	Tue Jan 30 16:41:40 2018 +0100
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2009, 2017, 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
@@ -312,7 +312,7 @@
         FacetValueFromBase = FacetValueFromBase: ''{0}'' \uC720\uD615\uC758 \uC120\uC5B8\uC5D0\uC11C ''{2}'' \uBA74\uC758 ''{1}'' \uAC12\uC740 \uAE30\uBCF8 \uC720\uD615 ''{3}''\uC758 \uAC12 \uACF5\uBC31\uC5D0\uC11C \uC640\uC57C \uD569\uB2C8\uB2E4.
         FixedFacetValue = FixedFacetValue: {3}\uC758 \uC815\uC758\uC5D0\uC11C ''{0}'' \uBA74\uC5D0 \uB300\uD55C ''{1}'' \uAC12\uC774 \uBD80\uC801\uD569\uD569\uB2C8\uB2E4. ''{0}''\uC5D0 \uB300\uD55C \uAC12\uC774 \uC870\uC0C1 \uC720\uD615 \uC911 \uD558\uB098\uC5D0\uC11C ''{2}''(\uC73C)\uB85C \uC124\uC815\uB418\uC5C8\uC73C\uBA70 '{'fixed'}' = true\uC774\uAE30 \uB54C\uBB38\uC785\uB2C8\uB2E4.
         InvalidRegex = InvalidRegex: \uD328\uD134 \uAC12 ''{0}''\uC740(\uB294) \uC801\uD569\uD55C \uC815\uADDC \uD45C\uD604\uC2DD\uC774 \uC544\uB2D9\uB2C8\uB2E4. ''{2}'' \uC5F4\uC5D0\uC11C ''{1}'' \uC624\uB958\uAC00 \uBCF4\uACE0\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
-        MaxOccurLimit = \uAD6C\uBB38\uBD84\uC11D\uAE30\uC758 \uD604\uC7AC \uAD6C\uC131\uC5D0\uC11C maxOccurs \uC18D\uC131\uAC12\uC744 {0} \uAC12\uBCF4\uB2E4 \uD06C\uAC8C \uC124\uC815\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
+        MaxOccurLimit = \uAD6C\uBB38 \uBD84\uC11D\uAE30\uC758 \uD604\uC7AC \uAD6C\uC131\uC5D0\uC11C maxOccurs \uC18D\uC131\uAC12\uC744 {0} \uAC12\uBCF4\uB2E4 \uD06C\uAC8C \uC124\uC815\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
         PublicSystemOnNotation = PublicSystemOnNotation: \uD558\uB098 \uC774\uC0C1\uC758 ''public''\uACFC ''system''\uC774 ''notation'' \uC694\uC18C\uC5D0 \uB098\uD0C0\uB098\uC57C \uD569\uB2C8\uB2E4.
         SchemaLocation = SchemaLocation: schemaLocation \uAC12 = ''{0}''\uC5D0\uB294 \uC9DD\uC218 \uAC1C\uC758 URI\uAC00 \uC788\uC5B4\uC57C \uD569\uB2C8\uB2E4.
         TargetNamespace.1 = TargetNamespace.1: ''{0}'' \uB124\uC784\uC2A4\uD398\uC774\uC2A4\uAC00 \uD544\uC694\uD558\uC9C0\uB9CC \uC2A4\uD0A4\uB9C8 \uBB38\uC11C\uC758 \uB300\uC0C1 \uB124\uC784\uC2A4\uD398\uC774\uC2A4\uAC00 ''{1}''\uC785\uB2C8\uB2E4.
--- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_sv.properties	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_sv.properties	Tue Jan 30 16:41:40 2018 +0100
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2009, 2017, 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
@@ -43,7 +43,7 @@
         DuplicateUnique = cvc-identity-constraint.4.1: Duplicerat unikt v\u00E4rde [{0}] har deklarerats f\u00F6r identitetsbegr\u00E4nsningen "{2}" f\u00F6r elementet "{1}".
         FieldMultipleMatch = cvc-identity-constraint.3: F\u00E4ltet "{0}" f\u00F6r identitetsbegr\u00E4nsningen "{1}" matchar flera v\u00E4rden inom omfattningen f\u00F6r v\u00E4ljaren. F\u00E4lt m\u00E5ste matcha unika v\u00E4rden.
         FixedDiffersFromActual = Elementets inneh\u00E5ll motsvarar inte v\u00E4rdet av attributet som anges som "fixed" i elementdeklarationen i schemat.
-        KeyMatchesNillable = cvc-identity-constraint.4.2.3: Elementet "{0}" har nyckeln "{1}" som matchar ett element d\u00E4r nillable \u00E4r angett till sant.
+        KeyMatchesNillable = cvc-identity-constraint.4.2.3: Elementet "{0}" har nyckeln "{1}" som matchar ett element d\u00E4r nullbar \u00E4r satt till sant.
         KeyNotEnoughValues = cvc-identity-constraint.4.2.1.b: Inte tillr\u00E4ckligt m\u00E5nga v\u00E4rden har angetts f\u00F6r identitetsbegr\u00E4nsningen <key name="{1}"> som har angetts f\u00F6r elementet "{0}".
         KeyNotFound = cvc-identity-constraint.4.3: Nyckeln ''{0}'' med v\u00E4rdet ''{1}'' hittades inte f\u00F6r identitetsbegr\u00E4nsningen f\u00F6r elementet ''{2}''.
         KeyRefOutOfScope = Fel vid id-begr\u00E4nsning: id-begr\u00E4nsning "{0}" har en nyckelreferens som refererar till nyckel eller unikt v\u00E4rde utanf\u00F6r definitionsomr\u00E5det.
@@ -125,11 +125,11 @@
         src-attribute.4 = src-attribute.4: Attributet ''{0}'' har b\u00E5de ett ''typ''-attribut och en anonym ''simpleType''-underordnad. Endast ett av dessa till\u00E5ts som attribut.
         src-attribute_group.2 = src-attribute_group.2: Snittet mellan jokertecken kan inte uttryckas f\u00F6r attributgruppen ''{0}''.
         src-attribute_group.3 = src-attribute_group.3: Cirkul\u00E4ra definitioner har identifierats f\u00F6r attributgruppen ''{0}''. Rekursivt efterf\u00F6ljande attributgruppreferenser leder s\u00E5 sm\u00E5ningom tillbaka till sig sj\u00E4lv.
-        src-ct.1 = src-ct.1: Fel intr\u00E4ffade vid representationen av definition f\u00F6r typ ''{0}''. Om <complexContent> anv\u00E4nds m\u00E5ste bastyp vara complexType. ''{1}'' \u00E4r simpleType.
-        src-ct.2.1 = src-ct.2.1: Fel intr\u00E4ffade vid representationen av definition f\u00F6r typ ''{0}''. Om <simpleContent> anv\u00E4nds m\u00E5ste bastyp vara complexType vars inneh\u00E5ll \u00E4r enkelt, eller, om det finns en angiven begr\u00E4nsning, komplex typ med blandat inneh\u00E5ll och t\u00F6mningsbar partikel, eller, om det finns ett angivet till\u00E4gg, enkel typ. ''{1}'' uppfyller inget av dessa villkor.
-        src-ct.2.2 = src-ct.2.2: Fel intr\u00E4ffade vid representationen av definition f\u00F6r typ ''{0}''. Om complexType med simpleContent begr\u00E4nsar complexType med blandat inneh\u00E5ll och t\u00F6mningsbar partikel m\u00E5ste det finnas en <simpleType> bland underordnade i <restriction>.
-        src-ct.4 = src-ct.4: Fel intr\u00E4ffade vid representationen av definition f\u00F6r typ ''{0}''. Snittet mellan jokertecken kan inte uttryckas.
-        src-ct.5 = src-ct.5: Fel intr\u00E4ffade vid representationen av definition f\u00F6r typ ''{0}''. Unionen mellan jokertecken kan inte uttryckas.
+        src-ct.1 = src-ct.1: Ett fel intr\u00E4ffade vid representationen av definition f\u00F6r typ ''{0}''. Om <complexContent> anv\u00E4nds m\u00E5ste bastyp vara complexType. ''{1}'' \u00E4r simpleType.
+        src-ct.2.1 = src-ct.2.1: Ett fel intr\u00E4ffade vid representationen av definition f\u00F6r typ ''{0}''. Om <simpleContent> anv\u00E4nds m\u00E5ste bastyp vara complexType vars inneh\u00E5ll \u00E4r enkelt, eller, om det finns en angiven begr\u00E4nsning, komplex typ med blandat inneh\u00E5ll och t\u00F6mningsbar partikel, eller, om det finns ett angivet till\u00E4gg, enkel typ. ''{1}'' uppfyller inget av dessa villkor.
+        src-ct.2.2 = src-ct.2.2: Ett fel intr\u00E4ffade vid representationen av definition f\u00F6r typ ''{0}''. Om complexType med simpleContent begr\u00E4nsar complexType med blandat inneh\u00E5ll och t\u00F6mningsbar partikel m\u00E5ste det finnas en <simpleType> bland underordnade i <restriction>.
+        src-ct.4 = src-ct.4: Ett fel intr\u00E4ffade vid representationen av definition f\u00F6r typ ''{0}''. Snittet mellan jokertecken kan inte uttryckas.
+        src-ct.5 = src-ct.5: Ett fel intr\u00E4ffade vid representationen av definition f\u00F6r typ ''{0}''. Unionen mellan jokertecken kan inte uttryckas.
         src-element.1 = src-element.1: B\u00E5da egenskaperna ''default'' och ''fixed'' kan inte samtidigt ing\u00E5 i elementdeklarationen ''{0}''. Anv\u00E4nd en av dem.
         src-element.2.1 = src-element.2.1: Antingen 'ref' eller 'name' m\u00E5ste anges i den lokala elementdeklarationen.
         src-element.2.2 = src-element.2.2: Eftersom ''{0}'' inneh\u00E5ller ett ''ref''-attribut m\u00E5ste inneh\u00E5llet matcha (annotation?). ''{1}'' hittades dock inte.
--- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_zh_TW.properties	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_zh_TW.properties	Tue Jan 30 16:41:40 2018 +0100
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2009, 2017, 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
@@ -46,8 +46,8 @@
         KeyMatchesNillable = cvc-identity-constraint.4.2.3: \u5143\u7D20 "{0}" \u7684\u91D1\u9470 "{1}" \u7B26\u5408 nillable \u8A2D\u70BA true \u7684\u5143\u7D20\u3002
         KeyNotEnoughValues = cvc-identity-constraint.4.2.1.b: \u672A\u66FF\u91DD\u5C0D\u5143\u7D20 "{0}" \u6307\u5B9A\u7684 <key name="{1}"> \u8B58\u5225\u9650\u5236\u689D\u4EF6\u6307\u5B9A\u8DB3\u5920\u7684\u503C\u3002
         KeyNotFound = cvc-identity-constraint.4.3: \u627E\u4E0D\u5230\u5143\u7D20 ''{2}'' \u8B58\u5225\u9650\u5236\u689D\u4EF6\u4E4B\u503C\u70BA ''{1}'' \u7684\u91D1\u9470 ''{0}''\u3002
-        KeyRefOutOfScope = \u8B58\u5225\u9650\u5236\u689D\u4EF6\u932F\u8AA4: \u8B58\u5225\u9650\u5236\u689D\u4EF6 "{0}" \u5177\u6709\u4E00\u500B keyref\uFF0C\u5B83\u53C3\u7167\u4E86\u7BC4\u570D\u4E4B\u5916\u7684\u7D22\u5F15\u9375\u6216\u552F\u4E00\u503C\u3002
-        KeyRefReferNotFound = \u7D22\u5F15\u9375\u53C3\u7167\u5BA3\u544A "{0}" \u53C3\u7167\u4E86\u540D\u7A31\u70BA "{1}" \u7684\u4E0D\u660E\u7D22\u5F15\u9375\u3002
+        KeyRefOutOfScope = \u8B58\u5225\u9650\u5236\u689D\u4EF6\u932F\u8AA4: \u8B58\u5225\u9650\u5236\u689D\u4EF6 "{0}" \u5177\u6709\u4E00\u500B keyref\uFF0C\u5B83\u53C3\u7167\u4E86\u7BC4\u570D\u4E4B\u5916\u7684\u91D1\u9470\u6216\u552F\u4E00\u503C\u3002
+        KeyRefReferNotFound = \u91D1\u9470\u53C3\u7167\u5BA3\u544A "{0}" \u53C3\u7167\u4E86\u540D\u7A31\u70BA "{1}" \u7684\u4E0D\u660E\u91D1\u9470\u3002
         UnknownField = \u5167\u90E8\u8B58\u5225\u9650\u5236\u689D\u4EF6\u932F\u8AA4; \u66FF\u5143\u7D20 "{1}" \u6307\u5B9A\u4E86\u8B58\u5225\u9650\u5236\u689D\u4EF6 "{2}" \u7684\u4E0D\u660E\u6B04\u4F4D "{0}"\u3002
 
 # Ideally, we should only use the following error keys, not the ones under
--- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/XMLSchemaLoader.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/XMLSchemaLoader.java	Tue Jan 30 16:41:40 2018 +0100
@@ -75,6 +75,7 @@
 import java.util.StringTokenizer;
 import java.util.WeakHashMap;
 import javax.xml.XMLConstants;
+import jdk.xml.internal.JdkXmlFeatures;
 import jdk.xml.internal.JdkXmlUtils;
 import jdk.xml.internal.SecuritySupport;
 import org.w3c.dom.DOMConfiguration;
@@ -160,7 +161,7 @@
     protected static final String SCHEMA_DV_FACTORY =
         Constants.XERCES_PROPERTY_PREFIX + Constants.SCHEMA_DV_FACTORY_PROPERTY;
 
-    protected static final String USE_SERVICE_MECHANISM = Constants.ORACLE_FEATURE_SERVICE_MECHANISM;
+    protected static final String OVERRIDE_PARSER = JdkXmlUtils.OVERRIDE_PARSER;
 
     // recognized features:
     private static final String[] RECOGNIZED_FEATURES = {
@@ -175,7 +176,7 @@
         HONOUR_ALL_SCHEMALOCATIONS,
         NAMESPACE_GROWTH,
         TOLERATE_DUPLICATES,
-        USE_SERVICE_MECHANISM,
+        OVERRIDE_PARSER,
         XMLConstants.USE_CATALOG
     };
 
@@ -313,18 +314,14 @@
      * @param sHandler
      * @param builder
      */
-    XMLSchemaLoader(XMLErrorReporter errorReporter,
-            XSGrammarBucket grammarBucket,
+    XMLSchemaLoader(XMLErrorReporter errorReporter, XSGrammarBucket grammarBucket,
             SubstitutionGroupHandler sHandler, CMBuilder builder) {
         this(null, errorReporter, null, grammarBucket, sHandler, builder);
     }
 
-    XMLSchemaLoader(SymbolTable symbolTable,
-            XMLErrorReporter errorReporter,
-            XMLEntityManager entityResolver,
-            XSGrammarBucket grammarBucket,
-            SubstitutionGroupHandler sHandler,
-            CMBuilder builder) {
+    XMLSchemaLoader(SymbolTable symbolTable, XMLErrorReporter errorReporter,
+            XMLEntityManager entityResolver, XSGrammarBucket grammarBucket,
+            SubstitutionGroupHandler sHandler, CMBuilder builder) {
 
         // store properties and features in configuration
         fLoaderConfig.addRecognizedFeatures(RECOGNIZED_FEATURES);
@@ -1231,7 +1228,7 @@
                 name.equals(HONOUR_ALL_SCHEMALOCATIONS) ||
                 name.equals(NAMESPACE_GROWTH) ||
                 name.equals(TOLERATE_DUPLICATES) ||
-                name.equals(USE_SERVICE_MECHANISM)) {
+                name.equals(OVERRIDE_PARSER)) {
                 return true;
 
             }
@@ -1310,7 +1307,7 @@
             v.add(HONOUR_ALL_SCHEMALOCATIONS);
             v.add(NAMESPACE_GROWTH);
             v.add(TOLERATE_DUPLICATES);
-            v.add(USE_SERVICE_MECHANISM);
+            v.add(OVERRIDE_PARSER);
             fRecognizedParameters = new DOMStringListImpl(v);
         }
         return fRecognizedParameters;
--- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/XMLSchemaValidator.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/XMLSchemaValidator.java	Tue Jan 30 16:41:40 2018 +0100
@@ -265,7 +265,7 @@
     private static final String XML_SECURITY_PROPERTY_MANAGER =
             Constants.XML_SECURITY_PROPERTY_MANAGER;
 
-    protected static final String USE_SERVICE_MECHANISM = Constants.ORACLE_FEATURE_SERVICE_MECHANISM;
+    protected static final String OVERRIDE_PARSER = JdkXmlUtils.OVERRIDE_PARSER;
 
     protected static final String USE_CATALOG = XMLConstants.USE_CATALOG;
 
@@ -291,8 +291,8 @@
             UNPARSED_ENTITY_CHECKING,
             NAMESPACE_GROWTH,
             TOLERATE_DUPLICATES,
-            USE_SERVICE_MECHANISM,
-            USE_CATALOG
+            OVERRIDE_PARSER,
+            USE_CATALOG,
         };
 
     /** Feature defaults. */
@@ -323,7 +323,7 @@
         null,
         null,
         null,
-        Boolean.TRUE,
+        JdkXmlUtils.OVERRIDE_PARSER_DEFAULT,
         JdkXmlUtils.USE_CATALOG_DEFAULT
     };
 
--- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/opti/SchemaParsingConfig.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/opti/SchemaParsingConfig.java	Tue Jan 30 16:41:40 2018 +0100
@@ -304,7 +304,8 @@
             ALLOW_JAVA_ENCODINGS,       CONTINUE_AFTER_FATAL_ERROR,
             LOAD_EXTERNAL_DTD,          NOTIFY_BUILTIN_REFS,
             NOTIFY_CHAR_REFS, GENERATE_SYNTHETIC_ANNOTATIONS,
-            XMLConstants.USE_CATALOG
+            XMLConstants.USE_CATALOG,
+            JdkXmlUtils.OVERRIDE_PARSER
         };
         addRecognizedFeatures(recognizedFeatures);
         fFeatures.put(PARSER_SETTINGS, Boolean.TRUE);
@@ -319,6 +320,7 @@
         fFeatures.put(NOTIFY_CHAR_REFS, Boolean.FALSE);
         fFeatures.put(GENERATE_SYNTHETIC_ANNOTATIONS, Boolean.FALSE);
         fFeatures.put(XMLConstants.USE_CATALOG, JdkXmlUtils.USE_CATALOG_DEFAULT);
+        fFeatures.put(JdkXmlUtils.OVERRIDE_PARSER, JdkXmlUtils.OVERRIDE_PARSER_DEFAULT);
 
         // add default recognized properties
         final String[] recognizedProperties = {
--- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/traversers/XSDHandler.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/traversers/XSDHandler.java	Tue Jan 30 16:41:40 2018 +0100
@@ -115,7 +115,6 @@
 import org.xml.sax.SAXNotRecognizedException;
 import org.xml.sax.SAXParseException;
 import org.xml.sax.XMLReader;
-import org.xml.sax.helpers.XMLReaderFactory;
 
 /**
  * The purpose of this class is to co-ordinate the construction of a
@@ -422,6 +421,8 @@
     private String fPrefer;
     private String fResolve;
 
+    private boolean fOverrideDefaultParser;
+
     //************ Traversers **********
     XSDAttributeGroupTraverser fAttributeGroupTraverser;
     XSDAttributeTraverser fAttributeTraverser;
@@ -2244,7 +2245,8 @@
                 XSDKey key = null;
                 String schemaId = null;
                 if (referType != XSDDescription.CONTEXT_PREPARSE) {
-                    schemaId = XMLEntityManager.expandSystemId(inputSource.getSystemId(), schemaSource.getBaseSystemId(), false);
+                    schemaId = XMLEntityManager.expandSystemId(inputSource.getSystemId(),
+                            schemaSource.getBaseSystemId(), false);
                     key = new XSDKey(schemaId, referType, schemaNamespace);
                     if ((schemaElement = fTraversed.get(key)) != null) {
                         fLastSchemaWasDuplicate = true;
@@ -2260,17 +2262,10 @@
                     catch (SAXException se) {}
                 }
                 else {
+                    parser = JdkXmlUtils.getXMLReader(fOverrideDefaultParser,
+                            fSecurityManager.isSecureProcessing());
+
                     try {
-                        parser = XMLReaderFactory.createXMLReader();
-                    }
-                    // If something went wrong with the factory
-                    // just use our own SAX parser.
-                    catch (SAXException se) {
-                        parser = new SAXParser();
-                    }
-                    try {
-                        parser.setFeature(NAMESPACE_PREFIXES, true);
-                        namespacePrefixes = true;
                         // If this is a Xerces SAX parser set the security manager if there is one
                         if (parser instanceof SAXParser) {
                             if (fSecurityManager != null) {
@@ -3629,6 +3624,9 @@
         fAccessExternalSchema = fSecurityPropertyMgr.getValue(
                 XMLSecurityPropertyManager.Property.ACCESS_EXTERNAL_SCHEMA);
 
+        fOverrideDefaultParser = componentManager.getFeature(JdkXmlUtils.OVERRIDE_PARSER);
+        fSchemaParser.setFeature(JdkXmlUtils.OVERRIDE_PARSER, fOverrideDefaultParser);
+        fEntityManager.setFeature(JdkXmlUtils.OVERRIDE_PARSER, fOverrideDefaultParser);
         // Passing the Catalog settings to the parser
         fUseCatalog = componentManager.getFeature(XMLConstants.USE_CATALOG);
         fSchemaParser.setFeature(XMLConstants.USE_CATALOG, fUseCatalog);
--- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/validation/DOMValidatorHelper.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/validation/DOMValidatorHelper.java	Tue Jan 30 16:41:40 2018 +0100
@@ -45,6 +45,7 @@
 import javax.xml.transform.Source;
 import javax.xml.transform.dom.DOMResult;
 import javax.xml.transform.dom.DOMSource;
+import jdk.xml.internal.JdkXmlUtils;
 import org.w3c.dom.Attr;
 import org.w3c.dom.CDATASection;
 import org.w3c.dom.Comment;
@@ -380,9 +381,8 @@
         }
         if (result.getNode() == null) {
             try {
-                DocumentBuilderFactory factory = fComponentManager.getFeature(Constants.ORACLE_FEATURE_SERVICE_MECHANISM) ?
-                                    DocumentBuilderFactory.newInstance() : new DocumentBuilderFactoryImpl();
-                factory.setNamespaceAware(true);
+                DocumentBuilderFactory factory = JdkXmlUtils.getDOMFactory(
+                        fComponentManager.getFeature(JdkXmlUtils.OVERRIDE_PARSER));
                 DocumentBuilder builder = factory.newDocumentBuilder();
                 result.setNode(builder.newDocument());
             }
--- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/validation/StAXValidatorHelper.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/validation/StAXValidatorHelper.java	Tue Jan 30 16:41:40 2018 +0100
@@ -25,6 +25,7 @@
 
 package com.sun.org.apache.xerces.internal.jaxp.validation;
 
+import com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl;
 import com.sun.org.apache.xerces.internal.impl.Constants;
 import com.sun.org.apache.xerces.internal.utils.XMLSecurityManager;
 import java.io.IOException;
@@ -41,6 +42,7 @@
 import javax.xml.transform.sax.TransformerHandler;
 import javax.xml.transform.stax.StAXResult;
 import javax.xml.transform.stax.StAXSource;
+import jdk.xml.internal.JdkXmlUtils;
 
 import org.xml.sax.SAXException;
 
@@ -50,7 +52,6 @@
  * @author Sunitha Reddy
  */
 public final class StAXValidatorHelper implements ValidatorHelper {
-    private static final String DEFAULT_TRANSFORMER_IMPL = "com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl";
 
     /** Component manager. **/
     private XMLSchemaValidatorComponentManager fComponentManager;
@@ -71,10 +72,11 @@
 
             if( identityTransformer1==null ) {
                 try {
-                    SAXTransformerFactory tf = fComponentManager.getFeature(Constants.ORACLE_FEATURE_SERVICE_MECHANISM) ?
-                                    (SAXTransformerFactory)SAXTransformerFactory.newInstance()
-                                    : (SAXTransformerFactory) TransformerFactory.newInstance(DEFAULT_TRANSFORMER_IMPL, StAXValidatorHelper.class.getClassLoader());
-                    XMLSecurityManager securityManager = (XMLSecurityManager)fComponentManager.getProperty(Constants.SECURITY_MANAGER);
+                    SAXTransformerFactory tf = JdkXmlUtils.getSAXTransformFactory(
+                            fComponentManager.getFeature(JdkXmlUtils.OVERRIDE_PARSER));
+
+                    XMLSecurityManager securityManager =
+                            (XMLSecurityManager)fComponentManager.getProperty(Constants.SECURITY_MANAGER);
                     if (securityManager != null) {
                         for (XMLSecurityManager.Limit limit : XMLSecurityManager.Limit.values()) {
                             if (securityManager.isSet(limit.ordinal())){
--- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/validation/StreamValidatorHelper.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/validation/StreamValidatorHelper.java	Tue Jan 30 16:41:40 2018 +0100
@@ -98,9 +98,6 @@
     private static final String VALIDATION_MANAGER
             = Constants.XERCES_PROPERTY_PREFIX + Constants.VALIDATION_MANAGER_PROPERTY;
 
-    private static final String DEFAULT_TRANSFORMER_IMPL
-            = "com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl";
-
     /**
      * Property id: security manager.
      */
@@ -141,12 +138,9 @@
 
             if (result != null) {
                 try {
-                    SAXTransformerFactory tf = fComponentManager.getFeature(
-                            Constants.ORACLE_FEATURE_SERVICE_MECHANISM) ?
-                            (SAXTransformerFactory) SAXTransformerFactory.newInstance() :
-                            (SAXTransformerFactory) TransformerFactory.newInstance(
-                                    DEFAULT_TRANSFORMER_IMPL,
-                                    StreamValidatorHelper.class.getClassLoader());
+                    SAXTransformerFactory tf = JdkXmlUtils.getSAXTransformFactory(
+                            fComponentManager.getFeature(JdkXmlUtils.OVERRIDE_PARSER));
+
                     identityTransformerHandler = tf.newTransformerHandler();
                 } catch (TransformerConfigurationException e) {
                     throw new TransformerFactoryConfigurationError(e);
--- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/validation/ValidatorHandlerImpl.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/validation/ValidatorHandlerImpl.java	Tue Jan 30 16:41:40 2018 +0100
@@ -675,16 +675,14 @@
                 XMLReader reader = saxSource.getXMLReader();
                 if( reader==null ) {
                     // create one now
-                    SAXParserFactory spf = fComponentManager.getFeature(Constants.ORACLE_FEATURE_SERVICE_MECHANISM) ?
-                                    SAXParserFactory.newInstance() : new SAXParserFactoryImpl();
-                    spf.setNamespaceAware(true);
+                    reader = JdkXmlUtils.getXMLReader(fComponentManager.getFeature(JdkXmlUtils.OVERRIDE_PARSER),
+                            fComponentManager.getFeature(XMLConstants.FEATURE_SECURE_PROCESSING));
+
                     try {
-                        spf.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING,
-                                fComponentManager.getFeature(XMLConstants.FEATURE_SECURE_PROCESSING));
-                        reader = spf.newSAXParser().getXMLReader();
                         // If this is a Xerces SAX parser, set the security manager if there is one
                         if (reader instanceof com.sun.org.apache.xerces.internal.parsers.SAXParser) {
-                           XMLSecurityManager securityManager = (XMLSecurityManager) fComponentManager.getProperty(SECURITY_MANAGER);
+                           XMLSecurityManager securityManager =
+                                   (XMLSecurityManager) fComponentManager.getProperty(SECURITY_MANAGER);
                            if (securityManager != null) {
                                try {
                                    reader.setProperty(SECURITY_MANAGER, securityManager);
--- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/validation/XMLSchemaFactory.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/validation/XMLSchemaFactory.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -51,6 +51,7 @@
 import javax.xml.transform.stream.StreamSource;
 import javax.xml.validation.Schema;
 import javax.xml.validation.SchemaFactory;
+import jdk.xml.internal.JdkXmlFeatures;
 import jdk.xml.internal.JdkXmlUtils;
 import org.w3c.dom.Node;
 import org.w3c.dom.ls.LSResourceResolver;
@@ -127,22 +128,16 @@
     /** Whether or not to allow new schemas to be added to the grammar pool */
     private boolean fUseGrammarPoolOnly;
 
+    private final JdkXmlFeatures fXmlFeatures;
     /**
-     * Indicates whether implementation parts should use
-     *   service loader (or similar).
-     * Note the default value (false) is the safe option..
+     * Indicates whether 3rd party parser may be used to override the system-default
+     * Note the default value (false) is the safe option.
+     * Note same as the old property useServicesMechanism
      */
-    private final boolean fUseServicesMechanism;
+    private final boolean fOverrideDefaultParser;
 
 
     public XMLSchemaFactory() {
-        this(true);
-    }
-    public static XMLSchemaFactory newXMLSchemaFactoryNoServiceLoader() {
-        return new XMLSchemaFactory(false);
-    }
-    private XMLSchemaFactory(boolean useServicesMechanism) {
-        fUseServicesMechanism = useServicesMechanism;
         fErrorHandlerWrapper = new ErrorHandlerWrapper(DraconianErrorHandler.getInstance());
         fDOMEntityResolverWrapper = new DOMEntityResolverWrapper();
         fXMLGrammarPoolWrapper = new XMLGrammarPoolWrapper();
@@ -167,6 +162,10 @@
         }
 
         fXMLSchemaLoader.setProperty(JdkXmlUtils.CDATA_CHUNK_SIZE, JdkXmlUtils.CDATA_CHUNK_SIZE_DEFAULT);
+        fXmlFeatures = new JdkXmlFeatures(fSecurityManager.isSecureProcessing());
+        fOverrideDefaultParser = fXmlFeatures.getFeature(
+                JdkXmlFeatures.XmlFeature.JDK_OVERRIDE_PARSER);
+        fXMLSchemaLoader.setFeature(JdkXmlUtils.OVERRIDE_PARSER, fOverrideDefaultParser);
     }
 
     /**
@@ -363,6 +362,11 @@
         else if (name.equals(USE_GRAMMAR_POOL_ONLY)) {
             return fUseGrammarPoolOnly;
         }
+        /** Check to see if the property is managed by the JdkXmlFeatues **/
+        int index = fXmlFeatures.getIndex(name);
+        if (index > -1) {
+            return fXmlFeatures.getFeature(index);
+        }
         try {
             return fXMLSchemaLoader.getFeature(name);
         }
@@ -452,10 +456,20 @@
             return;
         }
         else if (name.equals(Constants.ORACLE_FEATURE_SERVICE_MECHANISM)) {
-            //in secure mode, let _useServicesMechanism be determined by the constructor
+            //in secure mode, let useServicesMechanism be determined by the constructor
             if (System.getSecurityManager() != null)
                 return;
         }
+
+        if ((fXmlFeatures != null) &&
+                    fXmlFeatures.setFeature(name, JdkXmlFeatures.State.APIPROPERTY, value)) {
+            if (name.equals(JdkXmlUtils.OVERRIDE_PARSER)
+                    || name.equals(Constants.ORACLE_FEATURE_SERVICE_MECHANISM)
+                    || name.equals(JdkXmlUtils.USE_CATALOG)) {
+                fXMLSchemaLoader.setFeature(name, value);
+            }
+            return;
+        }
         try {
             fXMLSchemaLoader.setFeature(name, value);
         }
@@ -528,7 +542,7 @@
     private void propagateFeatures(AbstractXMLSchema schema) {
         schema.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING,
                 (fSecurityManager != null && fSecurityManager.isSecureProcessing()));
-        schema.setFeature(Constants.ORACLE_FEATURE_SERVICE_MECHANISM, fUseServicesMechanism);
+        schema.setFeature(JdkXmlUtils.OVERRIDE_PARSER, fOverrideDefaultParser);
         String[] features = fXMLSchemaLoader.getRecognizedFeatures();
         for (int i = 0; i < features.length; ++i) {
             boolean state = fXMLSchemaLoader.getFeature(features[i]);
--- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/validation/XMLSchemaValidatorComponentManager.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/validation/XMLSchemaValidatorComponentManager.java	Tue Jan 30 16:41:40 2018 +0100
@@ -264,7 +264,8 @@
                 NORMALIZE_DATA,
                 SCHEMA_ELEMENT_DEFAULT,
                 SCHEMA_AUGMENT_PSVI,
-                XMLConstants.USE_CATALOG
+                XMLConstants.USE_CATALOG,
+                JdkXmlUtils.OVERRIDE_PARSER
         };
         addRecognizedFeatures(recognizedFeatures);
         fFeatures.put(DISALLOW_DOCTYPE_DECL_FEATURE, Boolean.FALSE);
@@ -272,6 +273,7 @@
         fFeatures.put(SCHEMA_ELEMENT_DEFAULT, Boolean.FALSE);
         fFeatures.put(SCHEMA_AUGMENT_PSVI, Boolean.TRUE);
         fFeatures.put(XMLConstants.USE_CATALOG, grammarContainer.getFeature(XMLConstants.USE_CATALOG));
+        fFeatures.put(JdkXmlUtils.OVERRIDE_PARSER, grammarContainer.getFeature(JdkXmlUtils.OVERRIDE_PARSER));
 
         addRecognizedParamsAndSetDefaults(fEntityManager, grammarContainer);
         addRecognizedParamsAndSetDefaults(fErrorReporter, grammarContainer);
--- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/parsers/DTDConfiguration.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/parsers/DTDConfiguration.java	Tue Jan 30 16:41:40 2018 +0100
@@ -310,7 +310,8 @@
             //NOTIFY_BUILTIN_REFS,  // from XMLDocumentFragmentScannerImpl
             //NOTIFY_CHAR_REFS,         // from XMLDocumentFragmentScannerImpl
             //WARN_ON_DUPLICATE_ENTITYDEF,  // from XMLEntityManager
-            XMLConstants.USE_CATALOG
+            XMLConstants.USE_CATALOG,
+            JdkXmlUtils.OVERRIDE_PARSER
         };
         addRecognizedFeatures(recognizedFeatures);
 
@@ -324,6 +325,7 @@
         //setFeature(NOTIFY_CHAR_REFS, false);      // from XMLDocumentFragmentScannerImpl
         //setFeature(WARN_ON_DUPLICATE_ENTITYDEF, false);   // from XMLEntityManager
         fFeatures.put(XMLConstants.USE_CATALOG, JdkXmlUtils.USE_CATALOG_DEFAULT);
+        fFeatures.put(JdkXmlUtils.OVERRIDE_PARSER, JdkXmlUtils.OVERRIDE_PARSER_DEFAULT);
 
         // add default recognized properties
         final String[] recognizedProperties = {
--- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/parsers/NonValidatingConfiguration.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/parsers/NonValidatingConfiguration.java	Tue Jan 30 16:41:40 2018 +0100
@@ -294,7 +294,8 @@
             //NOTIFY_BUILTIN_REFS,  // from XMLDocumentFragmentScannerImpl
             //NOTIFY_CHAR_REFS,         // from XMLDocumentFragmentScannerImpl
             //WARN_ON_DUPLICATE_ENTITYDEF   // from XMLEntityManager
-            XMLConstants.USE_CATALOG
+            XMLConstants.USE_CATALOG,
+            JdkXmlUtils.OVERRIDE_PARSER
         };
         addRecognizedFeatures(recognizedFeatures);
 
@@ -310,6 +311,7 @@
         //setFeature(NOTIFY_CHAR_REFS, false);      // from XMLDocumentFragmentScannerImpl
         //setFeature(WARN_ON_DUPLICATE_ENTITYDEF, false);   // from XMLEntityManager
         fFeatures.put(XMLConstants.USE_CATALOG, JdkXmlUtils.USE_CATALOG_DEFAULT);
+        fFeatures.put(JdkXmlUtils.OVERRIDE_PARSER, JdkXmlUtils.OVERRIDE_PARSER_DEFAULT);
 
         // add default recognized properties
         final String[] recognizedProperties = {
--- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/parsers/XML11Configuration.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/parsers/XML11Configuration.java	Tue Jan 30 16:41:40 2018 +0100
@@ -508,7 +508,8 @@
             PARSER_SETTINGS,
             XMLConstants.FEATURE_SECURE_PROCESSING,
             XMLConstants.USE_CATALOG,
-            JdkXmlUtils.RESET_SYMBOL_TABLE
+            JdkXmlUtils.RESET_SYMBOL_TABLE,
+            JdkXmlUtils.OVERRIDE_PARSER
         };
         addRecognizedFeatures(recognizedFeatures);
         // set state for default features
@@ -535,6 +536,7 @@
         fFeatures.put(XMLConstants.FEATURE_SECURE_PROCESSING, Boolean.TRUE);
         fFeatures.put(XMLConstants.USE_CATALOG, JdkXmlUtils.USE_CATALOG_DEFAULT);
         fFeatures.put(JdkXmlUtils.RESET_SYMBOL_TABLE, JdkXmlUtils.RESET_SYMBOL_TABLE_DEFAULT);
+        fFeatures.put(JdkXmlUtils.OVERRIDE_PARSER, JdkXmlUtils.OVERRIDE_PARSER_DEFAULT);
 
         // add default recognized properties
         final String[] recognizedProperties =
--- a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/DTMManager.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/DTMManager.java	Tue Jan 30 16:41:40 2018 +0100
@@ -52,7 +52,7 @@
    */
   protected XMLStringFactory m_xsf = null;
 
-  private boolean _useServicesMechanism;
+  private boolean _overrideDefaultParser;
   /**
    * Default constructor is protected on purpose.
    */
@@ -297,15 +297,15 @@
     /**
      * Return the state of the services mechanism feature.
      */
-    public boolean useServicesMechnism() {
-        return _useServicesMechanism;
+    public boolean overrideDefaultParser() {
+        return _overrideDefaultParser;
     }
 
     /**
      * Set the state of the services mechanism feature.
      */
-    public void setServicesMechnism(boolean flag) {
-        _useServicesMechanism = flag;
+    public void setOverrideDefaultParser(boolean flag) {
+        _overrideDefaultParser = flag;
     }
 
   // -------------------- private methods --------------------
--- a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/DTMManagerDefault.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/DTMManagerDefault.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -20,7 +20,6 @@
 
 package com.sun.org.apache.xml.internal.dtm.ref;
 
-import com.sun.org.apache.xalan.internal.utils.FactoryImpl;
 import javax.xml.parsers.DocumentBuilder;
 import javax.xml.parsers.DocumentBuilderFactory;
 import javax.xml.transform.Source;
@@ -43,6 +42,7 @@
 import com.sun.org.apache.xml.internal.utils.SystemIDResolver;
 import com.sun.org.apache.xml.internal.utils.XMLReaderManager;
 import com.sun.org.apache.xml.internal.utils.XMLStringFactory;
+import jdk.xml.internal.JdkXmlUtils;
 
 import org.w3c.dom.Document;
 import org.w3c.dom.Node;
@@ -606,7 +606,7 @@
       // If user did not supply a reader, ask for one from the reader manager
       if (null == reader) {
         if (m_readerManager == null) {
-            m_readerManager = XMLReaderManager.getInstance(super.useServicesMechnism());
+            m_readerManager = XMLReaderManager.getInstance(super.overrideDefaultParser());
         }
 
         reader = m_readerManager.getXMLReader();
@@ -765,8 +765,7 @@
 
     try
     {
-      DocumentBuilderFactory dbf = FactoryImpl.getDOMFactory(super.useServicesMechnism());
-      dbf.setNamespaceAware(true);
+      DocumentBuilderFactory dbf = JdkXmlUtils.getDOMFactory(super.overrideDefaultParser());
 
       DocumentBuilder db = dbf.newDocumentBuilder();
       Document doc = db.newDocument();
--- a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/res/XMLErrorResources_es.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.xml/share/classes/com/sun/org/apache/xml/internal/res/XMLErrorResources_es.java	Tue Jan 30 16:41:40 2018 +0100
@@ -226,7 +226,7 @@
       "La clonaci\u00F3n del iterador no est\u00E1 soportada"},
 
     { ER_UNKNOWN_AXIS_TYPE,
-      "Tipo transversal de eje desconocido: {0}"},
+      "Tipo de recorrido de eje desconocido: {0}"},
 
     { ER_AXIS_NOT_SUPPORTED,
       "Traverser de eje no soportado: {0}"},
--- a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/res/XMLErrorResources_ko.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.xml/share/classes/com/sun/org/apache/xml/internal/res/XMLErrorResources_ko.java	Tue Jan 30 16:41:40 2018 +0100
@@ -211,10 +211,10 @@
       "Coroutine \uB9E4\uAC1C\uBCC0\uC218 \uC624\uB958({0})"},
 
     { ER_PARSER_DOTERMINATE_ANSWERS,
-      "\n\uC608\uC0C1\uCE58 \uC54A\uC740 \uC624\uB958: \uAD6C\uBB38\uBD84\uC11D\uAE30 doTerminate\uAC00 {0}\uC5D0 \uC751\uB2F5\uD569\uB2C8\uB2E4."},
+      "\n\uC608\uC0C1\uCE58 \uC54A\uC740 \uC624\uB958: \uAD6C\uBB38 \uBD84\uC11D\uAE30 doTerminate\uAC00 {0}\uC5D0 \uC751\uB2F5\uD569\uB2C8\uB2E4."},
 
     { ER_NO_PARSE_CALL_WHILE_PARSING,
-      "\uAD6C\uBB38\uBD84\uC11D \uC911 parse\uB97C \uD638\uCD9C\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."},
+      "\uAD6C\uBB38 \uBD84\uC11D \uC911 parse\uB97C \uD638\uCD9C\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."},
 
     { ER_TYPED_ITERATOR_AXIS_NOT_IMPLEMENTED,
       "\uC624\uB958: {0} \uCD95\uC5D0 \uB300\uD574 \uC785\uB825\uB41C \uC774\uD130\uB808\uC774\uD130\uAC00 \uAD6C\uD604\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4."},
@@ -244,13 +244,13 @@
       "\uB178\uB4DC\uB97C \uD578\uB4E4\uB85C \uBD84\uC11D\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."},
 
     { ER_STARTPARSE_WHILE_PARSING,
-       "\uAD6C\uBB38\uBD84\uC11D \uC911 startParse\uB97C \uD638\uCD9C\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."},
+       "\uAD6C\uBB38 \uBD84\uC11D \uC911 startParse\uB97C \uD638\uCD9C\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."},
 
     { ER_STARTPARSE_NEEDS_SAXPARSER,
        "startParse\uC5D0\uB294 \uB110\uC774 \uC544\uB2CC SAXParser\uAC00 \uD544\uC694\uD569\uB2C8\uB2E4."},
 
     { ER_COULD_NOT_INIT_PARSER,
-       "\uAD6C\uBB38\uBD84\uC11D\uAE30\uB97C \uCD08\uAE30\uD654\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."},
+       "\uAD6C\uBB38 \uBD84\uC11D\uAE30\uB97C \uCD08\uAE30\uD654\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."},
 
     { ER_EXCEPTION_CREATING_POOL,
        "\uD480\uC5D0 \uB300\uD55C \uC0C8 \uC778\uC2A4\uD134\uC2A4\uB97C \uC0DD\uC131\uD558\uB294 \uC911 \uC608\uC678\uC0AC\uD56D\uC774 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4."},
@@ -295,10 +295,10 @@
        "\uBD80\uBD84\uC5D0 \uBD80\uC801\uD569\uD55C \uBB38\uC790\uAC00 \uD3EC\uD568\uB418\uC5B4 \uC788\uC2B5\uB2C8\uB2E4."},
 
     { ER_PARSER_IN_USE,
-      "\uAD6C\uBB38\uBD84\uC11D\uAE30\uAC00 \uC774\uBBF8 \uC0AC\uC6A9\uB418\uACE0 \uC788\uC2B5\uB2C8\uB2E4."},
+      "\uAD6C\uBB38 \uBD84\uC11D\uAE30\uAC00 \uC774\uBBF8 \uC0AC\uC6A9\uB418\uACE0 \uC788\uC2B5\uB2C8\uB2E4."},
 
     { ER_CANNOT_CHANGE_WHILE_PARSING,
-      "\uAD6C\uBB38\uBD84\uC11D \uC911 {0} {1}\uC744(\uB97C) \uBCC0\uACBD\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."},
+      "\uAD6C\uBB38 \uBD84\uC11D \uC911 {0} {1}\uC744(\uB97C) \uBCC0\uACBD\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."},
 
     { ER_SELF_CAUSATION_NOT_PERMITTED,
       "\uC790\uCCB4 \uC778\uACFC \uAD00\uACC4\uB294 \uD5C8\uC6A9\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."},
--- a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/res/XMLErrorResources_zh_TW.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.xml/share/classes/com/sun/org/apache/xml/internal/res/XMLErrorResources_zh_TW.java	Tue Jan 30 16:41:40 2018 +0100
@@ -259,7 +259,7 @@
        "\u8DEF\u5F91\u5305\u542B\u7121\u6548\u7684\u9041\u96E2\u5E8F\u5217"},
 
     { ER_SCHEME_REQUIRED,
-       "\u914D\u7F6E\u662F\u5FC5\u8981\u7684\uFF01"},
+       "\u914D\u7F6E\u662F\u5FC5\u8981\u9805\u76EE\uFF01"},
 
     { ER_NO_SCHEME_IN_URI,
        "\u5728 URI \u4E2D\u627E\u4E0D\u5230\u914D\u7F6E: {0}"},
--- a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/utils/SerializerMessages_zh_TW.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/utils/SerializerMessages_zh_TW.java	Tue Jan 30 16:41:40 2018 +0100
@@ -186,7 +186,7 @@
                 "\u8B66\u544A:  \u8981\u6C42\u7684\u8F38\u51FA\u6587\u4EF6\u7248\u672C\u70BA ''{0}''\u3002\u4E0D\u652F\u63F4\u6B64\u7248\u672C\u7684 XML\u3002\u8F38\u51FA\u6587\u4EF6\u7684\u7248\u672C\u5C07\u6703\u662F ''1.0''\u3002" },
 
             {   MsgKey.ER_SCHEME_REQUIRED,
-                "\u5FC5\u9808\u6709\u914D\u7F6E\uFF01" },
+                "\u914D\u7F6E\u662F\u5FC5\u8981\u9805\u76EE\uFF01" },
 
             /*
              * Note to translators:  The words 'Properties' and
--- a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/AttList.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/AttList.java	Tue Jan 30 16:41:40 2018 +0100
@@ -45,9 +45,7 @@
   /**
    * Constructor AttList
    *
-   *
    * @param attrs List of attributes this will contain
-   * @param dh DOMHelper
    */
   public AttList(NamedNodeMap attrs)
   {
--- a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/XMLReaderManager.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/XMLReaderManager.java	Tue Jan 30 16:41:40 2018 +0100
@@ -21,14 +21,10 @@
 package com.sun.org.apache.xml.internal.utils;
 
 import com.sun.org.apache.xalan.internal.XalanConstants;
-import com.sun.org.apache.xalan.internal.utils.FactoryImpl;
 import com.sun.org.apache.xalan.internal.utils.XMLSecurityManager;
 import java.util.HashMap;
 import javax.xml.XMLConstants;
 import javax.xml.catalog.CatalogFeatures;
-import javax.xml.parsers.FactoryConfigurationError;
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.parsers.SAXParserFactory;
 import jdk.xml.internal.JdkXmlFeatures;
 import jdk.xml.internal.JdkXmlUtils;
 import jdk.xml.internal.SecuritySupport;
@@ -36,7 +32,6 @@
 import org.xml.sax.SAXNotRecognizedException;
 import org.xml.sax.SAXNotSupportedException;
 import org.xml.sax.XMLReader;
-import org.xml.sax.helpers.XMLReaderFactory;
 
 /**
  * Creates XMLReader objects and caches them for re-use.
@@ -44,32 +39,23 @@
  *
  * @LastModified: Sep 2017
  */
-@SuppressWarnings("deprecation") //org.xml.sax.helpers.XMLReaderFactory
 public class XMLReaderManager {
 
-    private static final String NAMESPACES_FEATURE =
-                             "http://xml.org/sax/features/namespaces";
-    private static final String NAMESPACE_PREFIXES_FEATURE =
-                             "http://xml.org/sax/features/namespace-prefixes";
     private static final XMLReaderManager m_singletonManager =
                                                      new XMLReaderManager();
     private static final String property = "org.xml.sax.driver";
-    /**
-     * Parser factory to be used to construct XMLReader objects
-     */
-    private static SAXParserFactory m_parserFactory;
 
     /**
      * Cache of XMLReader objects
      */
-    private ThreadLocal<XMLReader> m_readers;
+    private ThreadLocal<ReaderWrapper> m_readers;
 
     /**
      * Keeps track of whether an XMLReader object is in use.
      */
     private HashMap<XMLReader, Boolean> m_inUse;
 
-    private boolean m_useServicesMechanism = true;
+    private boolean m_overrideDefaultParser;
 
     private boolean _secureProcessing;
      /**
@@ -94,8 +80,8 @@
     /**
      * Retrieves the singleton reader manager
      */
-    public static XMLReaderManager getInstance(boolean useServicesMechanism) {
-        m_singletonManager.setServicesMechnism(useServicesMechanism);
+    public static XMLReaderManager getInstance(boolean overrideDefaultParser) {
+        m_singletonManager.setOverrideDefaultParser(overrideDefaultParser);
         return m_singletonManager;
     }
 
@@ -118,61 +104,30 @@
             m_inUse = new HashMap<>();
         }
 
-        // If the cached reader for this thread is in use, construct a new
-        // one; otherwise, return the cached reader unless it isn't an
-        // instance of the class set in the 'org.xml.sax.driver' property
-        reader = m_readers.get();
-        boolean threadHasReader = (reader != null);
+        /**
+         * Constructs a new XMLReader if:
+         * (1) the cached reader for this thread is in use, or
+         * (2) the requirement for overriding has changed,
+         * (3) the cached reader isn't an instance of the class set in the
+         * 'org.xml.sax.driver' property
+         *
+         * otherwise, returns the cached reader
+         */
+        ReaderWrapper rw = m_readers.get();
+        boolean threadHasReader = (rw != null);
+        reader = threadHasReader ? rw.reader : null;
         String factory = SecuritySupport.getSystemProperty(property);
         if (threadHasReader && m_inUse.get(reader) != Boolean.TRUE &&
+                (rw.overrideDefaultParser == m_overrideDefaultParser) &&
                 ( factory == null || reader.getClass().getName().equals(factory))) {
             m_inUse.put(reader, Boolean.TRUE);
         } else {
-            try {
-                try {
-                    // According to JAXP 1.2 specification, if a SAXSource
-                    // is created using a SAX InputSource the Transformer or
-                    // TransformerFactory creates a reader via the
-                    // XMLReaderFactory if setXMLReader is not used
-                    reader = XMLReaderFactory.createXMLReader();
-                    try {
-                        reader.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, _secureProcessing);
-                    } catch (SAXNotRecognizedException e) {
-                        XMLSecurityManager.printWarning(reader.getClass().getName(),
-                                XMLConstants.FEATURE_SECURE_PROCESSING, e);
-                    }
-                } catch (SAXException e) {
-                   try {
-                        // If unable to create an instance, let's try to use
-                        // the XMLReader from JAXP
-                        if (m_parserFactory == null) {
-                            m_parserFactory = FactoryImpl.getSAXFactory(m_useServicesMechanism);
-                            m_parserFactory.setNamespaceAware(true);
-                        }
-
-                        reader = m_parserFactory.newSAXParser().getXMLReader();
-                   } catch (ParserConfigurationException pce) {
-                       throw pce;   // pass along pce
-                   }
-                }
-                try {
-                    reader.setFeature(NAMESPACES_FEATURE, true);
-                    reader.setFeature(NAMESPACE_PREFIXES_FEATURE, false);
-                } catch (SAXException se) {
-                    // Try to carry on if we've got a parser that
-                    // doesn't know about namespace prefixes.
-                }
-            } catch (ParserConfigurationException ex) {
-                throw new SAXException(ex);
-            } catch (FactoryConfigurationError ex1) {
-                throw new SAXException(ex1.toString());
-            } catch (NoSuchMethodError | AbstractMethodError ex2) {
-            }
+            reader = JdkXmlUtils.getXMLReader(m_overrideDefaultParser, _secureProcessing);
 
             // Cache the XMLReader if this is the first time we've created
             // a reader for this thread.
             if (!threadHasReader) {
-                m_readers.set(reader);
+                m_readers.set(new ReaderWrapper(reader, m_overrideDefaultParser));
                 m_inUse.put(reader, Boolean.TRUE);
             }
         }
@@ -230,22 +185,23 @@
     public synchronized void releaseXMLReader(XMLReader reader) {
         // If the reader that's being released is the cached reader
         // for this thread, remove it from the m_isUse list.
-        if (m_readers.get() == reader && reader != null) {
+        ReaderWrapper rw = m_readers.get();
+        if (rw.reader == reader && reader != null) {
             m_inUse.remove(reader);
         }
     }
     /**
      * Return the state of the services mechanism feature.
      */
-    public boolean useServicesMechnism() {
-        return m_useServicesMechanism;
+    public boolean overrideDefaultParser() {
+        return m_overrideDefaultParser;
     }
 
     /**
      * Set the state of the services mechanism feature.
      */
-    public void setServicesMechnism(boolean flag) {
-        m_useServicesMechanism = flag;
+    public void setOverrideDefaultParser(boolean flag) {
+        m_overrideDefaultParser = flag;
     }
 
     /**
@@ -285,4 +241,14 @@
             _cdataChunkSize = JdkXmlUtils.getValue(value, _cdataChunkSize);
         }
     }
+
+    class ReaderWrapper {
+        XMLReader reader;
+        boolean overrideDefaultParser;
+
+        public ReaderWrapper(XMLReader reader, boolean overrideDefaultParser) {
+            this.reader = reader;
+            this.overrideDefaultParser = overrideDefaultParser;
+        }
+    }
 }
--- a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/CachedXPathAPI.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/CachedXPathAPI.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1,6 +1,5 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -26,6 +25,7 @@
 import com.sun.org.apache.xml.internal.utils.PrefixResolver;
 import com.sun.org.apache.xml.internal.utils.PrefixResolverDefault;
 import com.sun.org.apache.xpath.internal.objects.XObject;
+import jdk.xml.internal.JdkXmlUtils;
 
 import org.w3c.dom.Document;
 import org.w3c.dom.Node;
@@ -73,7 +73,7 @@
    */
   public CachedXPathAPI()
   {
-    xpathSupport = new XPathContext();
+    xpathSupport = new XPathContext(JdkXmlUtils.OVERRIDE_PARSER_DEFAULT);
   }
 
   /**
@@ -328,7 +328,7 @@
     XPath xpath = new XPath(str, null, prefixResolver, XPath.SELECT, null);
 
     // Execute the XPath, and have it return the result
-    XPathContext xpathSupport = new XPathContext();
+    XPathContext xpathSupport = new XPathContext(JdkXmlUtils.OVERRIDE_PARSER_DEFAULT);
     int ctxtNode = xpathSupport.getDTMHandleFromNode(contextNode);
 
     return xpath.execute(xpathSupport, ctxtNode, prefixResolver);
--- a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/XPathAPI.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/XPathAPI.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1,6 +1,5 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -26,6 +25,7 @@
 import com.sun.org.apache.xml.internal.utils.PrefixResolver;
 import com.sun.org.apache.xml.internal.utils.PrefixResolverDefault;
 import com.sun.org.apache.xpath.internal.objects.XObject;
+import jdk.xml.internal.JdkXmlUtils;
 
 import org.w3c.dom.Document;
 import org.w3c.dom.Node;
@@ -221,7 +221,7 @@
     // (Changed from: XPathContext xpathSupport = new XPathContext();
     //    because XPathContext is weak in a number of areas... perhaps
     //    XPathContext should be done away with.)
-    XPathContext xpathSupport = new XPathContext();
+    XPathContext xpathSupport = new XPathContext(JdkXmlUtils.OVERRIDE_PARSER_DEFAULT);
 
     // Create an object to resolve namespace prefixes.
     // XPath namespaces are resolved from the input context node's document element
@@ -276,7 +276,7 @@
     XPath xpath = new XPath(str, null, prefixResolver, XPath.SELECT, null);
 
     // Execute the XPath, and have it return the result
-    XPathContext xpathSupport = new XPathContext();
+    XPathContext xpathSupport = new XPathContext(JdkXmlUtils.OVERRIDE_PARSER_DEFAULT);
     int ctxtNode = xpathSupport.getDTMHandleFromNode(contextNode);
 
     return xpath.execute(xpathSupport, ctxtNode, prefixResolver);
--- a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/XPathContext.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/XPathContext.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -49,6 +49,7 @@
 import javax.xml.transform.ErrorListener;
 import javax.xml.transform.SourceLocator;
 import javax.xml.transform.URIResolver;
+import jdk.xml.internal.JdkXmlUtils;
 import org.xml.sax.XMLReader;
 
 /**
@@ -92,7 +93,7 @@
    */
   private boolean m_isSecureProcessing = false;
 
-  private boolean m_useServicesMechanism = true;
+  private boolean m_overrideDefaultParser;
 
   /**
    * Though XPathContext context extends
@@ -305,11 +306,11 @@
    */
   public XPathContext()
   {
-    this(true);
+    this(false);
   }
 
-  public XPathContext(boolean useServicesMechanism) {
-      init(useServicesMechanism);
+  public XPathContext(boolean overrideDefaultParser) {
+      init(overrideDefaultParser);
   }
   /**
    **This constructor doesn't seem to be used anywhere -- huizhe wang**
@@ -324,15 +325,15 @@
       m_ownerGetErrorListener = m_owner.getClass().getMethod("getErrorListener", new Class<?>[] {});
     }
     catch (NoSuchMethodException nsme) {}
-    init(true);
+    init(false);
   }
 
-  private void init(boolean useServicesMechanism) {
+  private void init(boolean overrideDefaultParser) {
     m_prefixResolvers.push(null);
     m_currentNodes.push(DTM.NULL);
     m_currentExpressionNodes.push(DTM.NULL);
     m_saxLocations.push(null);
-    m_useServicesMechanism = useServicesMechanism;
+    m_overrideDefaultParser = overrideDefaultParser;
     m_dtmManager = DTMManager.newInstance(
                    com.sun.org.apache.xpath.internal.objects.XMLStringFactoryImpl.getFactory()
                    );
@@ -1082,15 +1083,15 @@
     /**
      * Return the state of the services mechanism feature.
      */
-    public boolean useServicesMechnism() {
-        return m_useServicesMechanism;
+    public boolean overrideDefaultParser() {
+        return m_overrideDefaultParser;
     }
 
     /**
      * Set the state of the services mechanism feature.
      */
-    public void setServicesMechnism(boolean flag) {
-        m_useServicesMechanism = flag;
+    public void setOverrideDefaultParser(boolean flag) {
+        m_overrideDefaultParser = flag;
     }
 
     /**
--- a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/jaxp/XPathExpressionImpl.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/jaxp/XPathExpressionImpl.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -31,7 +31,6 @@
 import javax.xml.xpath.XPathVariableResolver;
 import jdk.xml.internal.JdkXmlFeatures;
 import org.w3c.dom.Document;
-import org.w3c.dom.Node;
 import org.xml.sax.InputSource;
 
 /**
@@ -47,8 +46,7 @@
      * from the context.
      */
     protected XPathExpressionImpl() {
-        this(null, null, null, null,
-             false, true, new JdkXmlFeatures(false));
+        this(null, null, null, null, false, new JdkXmlFeatures(false));
     };
 
     protected XPathExpressionImpl(com.sun.org.apache.xpath.internal.XPath xpath,
@@ -56,19 +54,20 @@
             XPathFunctionResolver functionResolver,
             XPathVariableResolver variableResolver) {
         this(xpath, prefixResolver, functionResolver, variableResolver,
-             false, true, new JdkXmlFeatures(false));
+             false, new JdkXmlFeatures(false));
     };
 
     protected XPathExpressionImpl(com.sun.org.apache.xpath.internal.XPath xpath,
             JAXPPrefixResolver prefixResolver,XPathFunctionResolver functionResolver,
             XPathVariableResolver variableResolver, boolean featureSecureProcessing,
-            boolean useServiceMechanism, JdkXmlFeatures featureManager) {
+            JdkXmlFeatures featureManager) {
         this.xpath = xpath;
         this.prefixResolver = prefixResolver;
         this.functionResolver = functionResolver;
         this.variableResolver = variableResolver;
         this.featureSecureProcessing = featureSecureProcessing;
-        this.useServiceMechanism = useServiceMechanism;
+        this.overrideDefaultParser = featureManager.getFeature(
+                JdkXmlFeatures.XmlFeature.JDK_OVERRIDE_PARSER);
         this.featureManager = featureManager;
     };
 
--- a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/jaxp/XPathFactoryImpl.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/jaxp/XPathFactoryImpl.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -60,29 +60,21 @@
          * <p>State of secure mode.</p>
          */
         private boolean _isSecureMode = false;
+
+        /**
+         * XML Features manager
+         */
+        private final JdkXmlFeatures _featureManager;
+
         /**
          * javax.xml.xpath.XPathFactory implementation.
          */
-
-        private boolean _useServicesMechanism = true;
-
-        private final JdkXmlFeatures _featureManager;
-
         public XPathFactoryImpl() {
-            this(true);
-        }
-
-        public static XPathFactory newXPathFactoryNoServiceLoader() {
-            return new XPathFactoryImpl(false);
-        }
-
-        public XPathFactoryImpl(boolean useServicesMechanism) {
             if (System.getSecurityManager() != null) {
                 _isSecureMode = true;
                 _isNotSecureProcessing = false;
             }
             _featureManager = new JdkXmlFeatures(!_isNotSecureProcessing);
-            this._useServicesMechanism = useServicesMechanism;
         }
         /**
          * <p>Is specified object model supported by this
@@ -132,8 +124,7 @@
         public javax.xml.xpath.XPath newXPath() {
             return new com.sun.org.apache.xpath.internal.jaxp.XPathImpl(
                     xPathVariableResolver, xPathFunctionResolver,
-                    !_isNotSecureProcessing, _useServicesMechanism,
-                    _featureManager );
+                    !_isNotSecureProcessing, _featureManager );
         }
 
         /**
@@ -192,10 +183,9 @@
                 return;
             }
             if (name.equals(XalanConstants.ORACLE_FEATURE_SERVICE_MECHANISM)) {
-                //in secure mode, let _useServicesMechanism be determined by the constructor
-                if (!_isSecureMode)
-                    _useServicesMechanism = value;
-                return;
+                // for compatibility, in secure mode, useServicesMechanism is determined by the constructor
+                if (_isSecureMode)
+                    return;
             }
 
             if (_featureManager != null &&
@@ -248,9 +238,6 @@
             if (name.equals(XMLConstants.FEATURE_SECURE_PROCESSING)) {
                 return !_isNotSecureProcessing;
             }
-            if (name.equals(XalanConstants.ORACLE_FEATURE_SERVICE_MECHANISM)) {
-                return _useServicesMechanism;
-            }
 
             /** Check to see if the property is managed by the feature manager **/
             int index = _featureManager.getIndex(name);
--- a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/jaxp/XPathImpl.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/jaxp/XPathImpl.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -54,17 +54,18 @@
     private NamespaceContext namespaceContext=null;
 
     XPathImpl(XPathVariableResolver vr, XPathFunctionResolver fr) {
-        this(vr, fr, false, true, new JdkXmlFeatures(false));
+        this(vr, fr, false, new JdkXmlFeatures(false));
     }
 
     XPathImpl(XPathVariableResolver vr, XPathFunctionResolver fr,
-            boolean featureSecureProcessing, boolean useServiceMechanism,
-            JdkXmlFeatures featureManager) {
+            boolean featureSecureProcessing, JdkXmlFeatures featureManager) {
         this.origVariableResolver = this.variableResolver = vr;
         this.origFunctionResolver = this.functionResolver = fr;
         this.featureSecureProcessing = featureSecureProcessing;
-        this.useServiceMechanism = useServiceMechanism;
         this.featureManager = featureManager;
+        overrideDefaultParser = featureManager.getFeature(
+                JdkXmlFeatures.XmlFeature.JDK_OVERRIDE_PARSER);
+
     }
 
 
@@ -163,7 +164,7 @@
             // Can have errorListener
             XPathExpressionImpl ximpl = new XPathExpressionImpl (xpath,
                     prefixResolver, functionResolver, variableResolver,
-                    featureSecureProcessing, useServiceMechanism, featureManager);
+                    featureSecureProcessing, featureManager);
             return ximpl;
         } catch (TransformerException te) {
             throw new XPathExpressionException (te) ;
--- a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/jaxp/XPathImplUtil.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/jaxp/XPathImplUtil.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 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
@@ -26,7 +26,6 @@
 package com.sun.org.apache.xpath.internal.jaxp;
 
 import com.sun.org.apache.xalan.internal.res.XSLMessages;
-import com.sun.org.apache.xalan.internal.utils.FactoryImpl;
 import com.sun.org.apache.xml.internal.dtm.DTM;
 import com.sun.org.apache.xpath.internal.axes.LocPathIterator;
 import com.sun.org.apache.xpath.internal.objects.XObject;
@@ -43,6 +42,7 @@
 import javax.xml.xpath.XPathNodes;
 import javax.xml.xpath.XPathVariableResolver;
 import jdk.xml.internal.JdkXmlFeatures;
+import jdk.xml.internal.JdkXmlUtils;
 import org.w3c.dom.Document;
 import org.w3c.dom.Node;
 import org.w3c.dom.traversal.NodeIterator;
@@ -57,7 +57,7 @@
     XPathFunctionResolver functionResolver;
     XPathVariableResolver variableResolver;
     JAXPPrefixResolver prefixResolver;
-    boolean useServiceMechanism = true;
+    boolean overrideDefaultParser;
     // By default Extension Functions are allowed in XPath Expressions. If
     // Secure Processing Feature is set on XPathFactory then the invocation of
     // extensions function need to throw XPathFunctionException
@@ -125,9 +125,7 @@
             //
             // so we really have to create a fresh DocumentBuilder every time we need one
             // - KK
-            DocumentBuilderFactory dbf = FactoryImpl.getDOMFactory(useServiceMechanism);
-            dbf.setNamespaceAware(true);
-            dbf.setValidating(false);
+            DocumentBuilderFactory dbf = JdkXmlUtils.getDOMFactory(overrideDefaultParser);
             return dbf.newDocumentBuilder().parse(source);
         } catch (ParserConfigurationException | SAXException | IOException e) {
             throw new XPathExpressionException (e);
--- a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_ko.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_ko.java	Tue Jan 30 16:41:40 2018 +0100
@@ -858,7 +858,7 @@
       "{0}\uC5D0\uC11C URL\uC744 \uC0DD\uC131\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."},
 
   { WG_EXPAND_ENTITIES_NOT_SUPPORTED,
-      "DTM \uAD6C\uBB38\uBD84\uC11D\uAE30\uC5D0 \uB300\uD574\uC11C\uB294 -E \uC635\uC158\uC774 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."},
+      "DTM \uAD6C\uBB38 \uBD84\uC11D\uAE30\uC5D0 \uB300\uD574\uC11C\uB294 -E \uC635\uC158\uC774 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."},
 
   { WG_ILLEGAL_VARIABLE_REFERENCE,
       "\uBCC0\uC218\uC5D0 \uB300\uD574 \uC81C\uACF5\uB41C VariableReference\uAC00 \uCEE8\uD14D\uC2A4\uD2B8\uC5D0\uC11C \uBC97\uC5B4\uB098\uAC70\uB098 \uC815\uC758\uB97C \uD3EC\uD568\uD558\uC9C0 \uC5C6\uC2B5\uB2C8\uB2E4! \uC774\uB984 = {0}"},
@@ -886,9 +886,9 @@
   { "optionMatch", "   [-match \uC77C\uCE58 \uD328\uD134(\uC77C\uCE58 \uC9C4\uB2E8\uC758 \uACBD\uC6B0)]"},
   { "optionAnyExpr", "\uB610\uB294 XPath \uD45C\uD604\uC2DD\uC774 \uC9C4\uB2E8 \uB364\uD504\uB97C \uC218\uD589\uD569\uB2C8\uB2E4."},
   { "noParsermsg1", "XSL \uD504\uB85C\uC138\uC2A4\uB97C \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4."},
-  { "noParsermsg2", "** \uAD6C\uBB38\uBD84\uC11D\uAE30\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC74C **"},
+  { "noParsermsg2", "** \uAD6C\uBB38 \uBD84\uC11D\uAE30\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC74C **"},
   { "noParsermsg3", "\uD074\uB798\uC2A4 \uACBD\uB85C\uB97C \uD655\uC778\uD558\uC2ED\uC2DC\uC624."},
-  { "noParsermsg4", "IBM\uC758 Java\uC6A9 XML \uAD6C\uBB38\uBD84\uC11D\uAE30\uAC00 \uC5C6\uC744 \uACBD\uC6B0 \uB2E4\uC74C \uC704\uCE58\uC5D0\uC11C \uB2E4\uC6B4\uB85C\uB4DC\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4."},
+  { "noParsermsg4", "IBM\uC758 Java\uC6A9 XML \uAD6C\uBB38 \uBD84\uC11D\uAE30\uAC00 \uC5C6\uC744 \uACBD\uC6B0 \uB2E4\uC74C \uC704\uCE58\uC5D0\uC11C \uB2E4\uC6B4\uB85C\uB4DC\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4."},
   { "noParsermsg5", "IBM AlphaWorks: http://www.alphaworks.ibm.com/formula/xml"},
   { "gtone", ">1" },
   { "zero", "0" },
--- a/src/java.xml/share/classes/javax/xml/catalog/CatalogMessages.properties	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.xml/share/classes/javax/xml/catalog/CatalogMessages.properties	Tue Jan 30 16:41:40 2018 +0100
@@ -30,6 +30,7 @@
 CircularReference = JAXP09010001: Circular reference is not allowed: ''{0}''.
 
 # Input or configuration errors
+# Technical term, do not translate: catalog
 InvalidCatalog = JAXP09020001: The document element of a catalog must be catalog.
 InvalidEntryType = JAXP09020002: The entry type ''{0}'' is not valid.
 UriNotAbsolute = JAXP09020003: The specified URI ''{0}'' is not absolute.
@@ -41,12 +42,16 @@
 
 # Parsing errors
 ParserConf = JAXP09030001: Unexpected error while configuring a SAX parser.
+# Technical term, do not translate: catalog
 ParsingFailed = JAXP09030002: Failed to parse the catalog file.
+# Technical term, do not translate: catalog
 NoCatalogFound = JAXP09030003: No Catalog is specified.
 
 
 # Resolving errors
 NoMatchFound = JAXP09040001: No match found for publicId ''{0}'' and systemId ''{1}''.
+# Technical term, do not translate: href, base
 NoMatchURIFound = JAXP09040002: No match found for href ''{0}'' and base ''{1}''.
+# Technical term, do not translate: href, base
 FailedCreatingURI = JAXP09040003: Can not construct URI using href ''{0}'' and base ''{1}''.
 
--- a/src/java.xml/share/classes/javax/xml/catalog/CatalogMessages_ja.properties	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.xml/share/classes/javax/xml/catalog/CatalogMessages_ja.properties	Tue Jan 30 16:41:40 2018 +0100
@@ -30,7 +30,7 @@
 CircularReference = JAXP09010001: \u5FAA\u74B0\u53C2\u7167\u306F\u8A31\u53EF\u3055\u308C\u307E\u305B\u3093: ''{0}''\u3002
 
 # Input or configuration errors
-InvalidCatalog = JAXP09020001: \u30AB\u30BF\u30ED\u30B0\u306E\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u8981\u7D20\u306Fcatalog\u306B\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
+InvalidCatalog = JAXP09020001: \u30AB\u30BF\u30ED\u30B0\u306E\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u8981\u7D20\u306F\u30AB\u30BF\u30ED\u30B0\u306B\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
 InvalidEntryType = JAXP09020002: \u30A8\u30F3\u30C8\u30EA\u30FB\u30BF\u30A4\u30D7''{0}''\u306F\u6709\u52B9\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002
 UriNotAbsolute = JAXP09020003: \u6307\u5B9A\u3055\u308C\u305FURI ''{0}''\u304C\u7D76\u5BFEURI\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002
 UriNotValidUrl = JAXP09020004: \u6307\u5B9A\u3057\u305FURI ''{0}''\u306F\u6709\u52B9\u306AURL\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002
--- a/src/java.xml/share/classes/javax/xml/catalog/CatalogMessages_ko.properties	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.xml/share/classes/javax/xml/catalog/CatalogMessages_ko.properties	Tue Jan 30 16:41:40 2018 +0100
@@ -30,7 +30,7 @@
 CircularReference = JAXP09010001: \uC21C\uD658 \uCC38\uC870\uAC00 \uD5C8\uC6A9\uB418\uC9C0 \uC54A\uC74C: ''{0}''.
 
 # Input or configuration errors
-InvalidCatalog = JAXP09020001: Catalog\uC758 \uBB38\uC11C \uC694\uC18C\uB294 \uCE74\uD0C8\uB85C\uADF8\uC5EC\uC57C \uD569\uB2C8\uB2E4.
+InvalidCatalog = JAXP09020001: Catalog\uC758 \uBB38\uC11C \uC694\uC18C\uB294 catalog\uC5EC\uC57C \uD569\uB2C8\uB2E4.
 InvalidEntryType = JAXP09020002: \uD56D\uBAA9 \uC720\uD615 ''{0}''\uC774(\uAC00) \uBD80\uC801\uD569\uD569\uB2C8\uB2E4.
 UriNotAbsolute = JAXP09020003: \uC9C0\uC815\uB41C URI ''{0}''\uC774(\uAC00) \uC808\uB300 \uACBD\uB85C\uAC00 \uC544\uB2D9\uB2C8\uB2E4.
 UriNotValidUrl = JAXP09020004: \uC9C0\uC815\uB41C URI ''{0}''\uC774(\uAC00) \uBD80\uC801\uD569\uD55C URL\uC785\uB2C8\uB2E4.
--- a/src/java.xml/share/classes/javax/xml/catalog/CatalogMessages_sv.properties	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.xml/share/classes/javax/xml/catalog/CatalogMessages_sv.properties	Tue Jan 30 16:41:40 2018 +0100
@@ -27,10 +27,10 @@
 OtherError = JAXP09000003: Ov\u00E4ntat fel.
 
 # Implementation restriction
-CircularReference = JAXP09010001: Cirkul\u00E4r referens \u00E4r inte till\u00E5ten: ''{0}''.
+CircularReference = JAXP09010001: Cirkelreferens \u00E4r inte till\u00E5ten: ''{0}''.
 
 # Input or configuration errors
-InvalidCatalog = JAXP09020001: Dokumentelementet f\u00F6r en katalog m\u00E5ste vara "catalog".
+InvalidCatalog = JAXP09020001: Dokumentelementet f\u00F6r en katalog m\u00E5ste vara katalog.
 InvalidEntryType = JAXP09020002: Posttypen ''{0}'' \u00E4r inte giltig.
 UriNotAbsolute = JAXP09020003: Den angivna URI:n, ''{0}'', \u00E4r inte absolut.
 UriNotValidUrl = JAXP09020004: Den angivna URI:n, ''{0}'', \u00E4r inte en giltig URL.
--- a/src/java.xml/share/classes/javax/xml/transform/FactoryFinder.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.xml/share/classes/javax/xml/transform/FactoryFinder.java	Tue Jan 30 16:41:40 2018 +0100
@@ -143,10 +143,11 @@
      * @param doFallback True if the current ClassLoader should be tried as
      * a fallback if the class is not found using cl
      *
-     * @param useServicesMechanism True use services mechanism
+     * @param overrideDefaultParser True to allow overriding the system-default
+     * parser.
      */
     static <T> T newInstance(Class<T> type, String className, ClassLoader cl,
-                             boolean doFallback, boolean useServicesMechanism)
+                             boolean doFallback)
         throws TransformerFactoryConfigurationError
     {
         assert type != null;
@@ -165,13 +166,8 @@
             if (!type.isAssignableFrom(providerClass)) {
                 throw new ClassCastException(className + " cannot be cast to " + type.getName());
             }
-            Object instance = null;
-            if (!useServicesMechanism) {
-                instance = newInstanceNoServiceLoader(type, providerClass);
-            }
-            if (instance == null) {
-                instance = providerClass.getConstructor().newInstance();
-            }
+            Object instance = providerClass.getConstructor().newInstance();
+
             final ClassLoader clD = cl;
             dPrint(()->"created new instance of " + providerClass +
                        " using ClassLoader: " + clD);
@@ -188,48 +184,6 @@
     }
 
     /**
-     * Try to construct using newTransformerFactoryNoServiceLoader
-     *   method if available.
-     */
-    private static <T> T newInstanceNoServiceLoader(Class<T> type, Class<?> providerClass) {
-        // Retain maximum compatibility if no security manager.
-        if (System.getSecurityManager() == null) {
-            return null;
-        }
-        try {
-            final Method creationMethod =
-                    providerClass.getDeclaredMethod(
-                        "newTransformerFactoryNoServiceLoader"
-                    );
-            final int modifiers = creationMethod.getModifiers();
-
-            // Do not call the method if it's not public static.
-            if (!Modifier.isPublic(modifiers) || !Modifier.isStatic(modifiers)) {
-                return null;
-            }
-
-            // Only call the method if it's declared to return an instance of
-            // TransformerFactory
-            final Class<?> returnType = creationMethod.getReturnType();
-            if (type.isAssignableFrom(returnType)) {
-                final Object result = creationMethod.invoke(null, (Object[])null);
-                return type.cast(result);
-            } else {
-                // This should not happen, as
-                // TransformerFactoryImpl.newTransformerFactoryNoServiceLoader is
-                // declared to return TransformerFactory.
-                throw new ClassCastException(returnType + " cannot be cast to " + type);
-            }
-        } catch (ClassCastException e) {
-            throw new TransformerFactoryConfigurationError(e, e.getMessage());
-        } catch (NoSuchMethodException exc) {
-            return null;
-        } catch (Exception exc) {
-            return null;
-        }
-    }
-
-    /**
      * Finds the implementation Class object in the specified order.  Main
      * entry point.
      * @return Class object of factory, never null
@@ -255,7 +209,7 @@
             String systemProp = SecuritySupport.getSystemProperty(factoryId);
             if (systemProp != null) {
                 dPrint(()->"found system property, value=" + systemProp);
-                return newInstance(type, systemProp, null, true, true);
+                return newInstance(type, systemProp, null, true);
             }
         }
         catch (SecurityException se) {
@@ -282,7 +236,7 @@
 
             if (factoryClassName != null) {
                 dPrint(()->"found in ${java.home}/conf/jaxp.properties, value=" + factoryClassName);
-                return newInstance(type, factoryClassName, null, true, true);
+                return newInstance(type, factoryClassName, null, true);
             }
         }
         catch (Exception ex) {
@@ -300,7 +254,7 @@
         }
 
         dPrint(()->"loaded from fallback value: " + fallbackClassName);
-        return newInstance(type, fallbackClassName, null, true, true);
+        return newInstance(type, fallbackClassName, null, true);
     }
 
     /*
--- a/src/java.xml/share/classes/javax/xml/transform/TransformerFactory.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.xml/share/classes/javax/xml/transform/TransformerFactory.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 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
@@ -62,7 +62,7 @@
      * @since 9
      */
     public static TransformerFactory newDefaultInstance() {
-        return TransformerFactoryImpl.newTransformerFactoryNoServiceLoader();
+        return new TransformerFactoryImpl();
     }
 
     /**
@@ -170,7 +170,7 @@
 
         //do not fallback if given classloader can't find the class, throw exception
         return  FactoryFinder.newInstance(TransformerFactory.class,
-                    factoryClassName, classLoader, false, false);
+                    factoryClassName, classLoader, false);
     }
     /**
      * Process the {@code Source} into a {@code Transformer}
--- a/src/java.xml/share/classes/javax/xml/validation/SchemaFactory.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.xml/share/classes/javax/xml/validation/SchemaFactory.java	Tue Jan 30 16:41:40 2018 +0100
@@ -139,7 +139,7 @@
      * @since 9
      */
     public static SchemaFactory newDefaultInstance() {
-        return XMLSchemaFactory.newXMLSchemaFactoryNoServiceLoader();
+        return new XMLSchemaFactory();
     }
 
     /**
--- a/src/java.xml/share/classes/javax/xml/validation/SchemaFactoryFinder.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.xml/share/classes/javax/xml/validation/SchemaFactoryFinder.java	Tue Jan 30 16:41:40 2018 +0100
@@ -25,6 +25,7 @@
 
 package javax.xml.validation;
 
+import com.sun.org.apache.xerces.internal.jaxp.validation.XMLSchemaFactory;
 import java.io.File;
 import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
@@ -167,7 +168,7 @@
             String r = SecuritySupport.getSystemProperty(propertyName);
             if(r!=null) {
                 debugPrintln(()->"The value is '"+r+"'");
-                sf = createInstance(r, true);
+                sf = createInstance(r);
                 if(sf!=null)    return sf;
             } else
                 debugPrintln(()->"The property is undefined.");
@@ -201,7 +202,7 @@
             debugPrintln(()->"found " + factoryClassName + " in $java.home/conf/jaxp.properties");
 
             if (factoryClassName != null) {
-                sf = createInstance(factoryClassName, true);
+                sf = createInstance(factoryClassName);
                 if(sf != null){
                     return sf;
                 }
@@ -226,7 +227,7 @@
         // platform default
         if(schemaLanguage.equals("http://www.w3.org/2001/XMLSchema")) {
             debugPrintln(()->"attempting to use the platform default XML Schema validator");
-            return createInstance("com.sun.org.apache.xerces.internal.jaxp.validation.XMLSchemaFactory", true);
+            return new XMLSchemaFactory();
         }
 
         debugPrintln(()->"all things were tried, but none was found. bailing out.");
@@ -273,11 +274,7 @@
      * @return null
      *      if it fails. Error messages will be printed by this method.
      */
-    SchemaFactory createInstance( String className ) {
-        return createInstance( className, false );
-    }
-
-    SchemaFactory createInstance( String className, boolean useServicesMechanism ) {
+    SchemaFactory createInstance(String className) {
         SchemaFactory schemaFactory = null;
 
         debugPrintln(()->"createInstance(" + className + ")");
@@ -296,12 +293,7 @@
                 throw new ClassCastException(clazz.getName()
                             + " cannot be cast to " + SchemaFactory.class);
             }
-            if (!useServicesMechanism) {
-                schemaFactory = newInstanceNoServiceLoader(clazz);
-            }
-            if (schemaFactory == null) {
-                schemaFactory = (SchemaFactory) clazz.getConstructor().newInstance();
-            }
+            schemaFactory = (SchemaFactory) clazz.getConstructor().newInstance();
         } catch (ClassCastException | IllegalAccessException | IllegalArgumentException |
             InstantiationException | InvocationTargetException | NoSuchMethodException |
             SecurityException ex) {
@@ -315,50 +307,6 @@
         return schemaFactory;
     }
 
-    /**
-     * Try to construct using newXMLSchemaFactoryNoServiceLoader
-     *   method if available.
-     */
-    private static SchemaFactory newInstanceNoServiceLoader(
-         Class<?> providerClass
-    ) {
-        // Retain maximum compatibility if no security manager.
-        if (System.getSecurityManager() == null) {
-            return null;
-        }
-        try {
-            final Method creationMethod =
-                providerClass.getDeclaredMethod(
-                    "newXMLSchemaFactoryNoServiceLoader"
-                );
-            final int modifiers = creationMethod.getModifiers();
-
-            // Do not call the method if it's not public static.
-            if (!Modifier.isStatic(modifiers) || !Modifier.isPublic(modifiers)) {
-                return null;
-            }
-
-            // Only calls "newXMLSchemaFactoryNoServiceLoader" if it's
-            // declared to return an instance of SchemaFactory.
-            final Class<?> returnType = creationMethod.getReturnType();
-            if (SERVICE_CLASS.isAssignableFrom(returnType)) {
-                return SERVICE_CLASS.cast(creationMethod.invoke(null, (Object[])null));
-            } else {
-                // Should not happen since
-                // XMLSchemaFactory.newXMLSchemaFactoryNoServiceLoader is
-                // declared to return XMLSchemaFactory.
-                throw new ClassCastException(returnType
-                            + " cannot be cast to " + SERVICE_CLASS);
-            }
-        } catch(ClassCastException e) {
-            throw new SchemaFactoryConfigurationError(e.getMessage(), e);
-        } catch (NoSuchMethodException exc) {
-            return null;
-        } catch (Exception exc) {
-            return null;
-        }
-    }
-
     // Call isSchemaLanguageSupported with initial context.
     private boolean isSchemaLanguageSupportedBy(final SchemaFactory factory,
             final String schemaLanguage,
--- a/src/java.xml/share/classes/javax/xml/xpath/XPathFactory.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.xml/share/classes/javax/xml/xpath/XPathFactory.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 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
@@ -87,7 +87,7 @@
      * @since 9
      */
     public static XPathFactory newDefaultInstance() {
-        return XPathFactoryImpl.newXPathFactoryNoServiceLoader();
+        return new XPathFactoryImpl();
     }
 
     /**
--- a/src/java.xml/share/classes/javax/xml/xpath/XPathFactoryFinder.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.xml/share/classes/javax/xml/xpath/XPathFactoryFinder.java	Tue Jan 30 16:41:40 2018 +0100
@@ -25,10 +25,9 @@
 
 package javax.xml.xpath;
 
+import com.sun.org.apache.xpath.internal.jaxp.XPathFactoryImpl;
 import java.io.File;
 import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.lang.reflect.Modifier;
 import java.security.AccessControlContext;
 import java.security.AccessController;
 import java.security.PrivilegedAction;
@@ -162,7 +161,7 @@
             String r = SecuritySupport.getSystemProperty(propertyName);
             if(r!=null) {
                 debugPrintln(()->"The value is '"+r+"'");
-                xpathFactory = createInstance(r, true);
+                xpathFactory = createInstance(r);
                 if (xpathFactory != null) {
                     return xpathFactory;
                 }
@@ -197,7 +196,7 @@
             debugPrintln(()->"found " + factoryClassName + " in $java.home/conf/jaxp.properties");
 
             if (factoryClassName != null) {
-                xpathFactory = createInstance(factoryClassName, true);
+                xpathFactory = createInstance(factoryClassName);
                 if(xpathFactory != null){
                     return xpathFactory;
                 }
@@ -223,7 +222,7 @@
         // platform default
         if(uri.equals(XPathFactory.DEFAULT_OBJECT_MODEL_URI)) {
             debugPrintln(()->"attempting to use the platform default W3C DOM XPath lib");
-            return createInstance("com.sun.org.apache.xpath.internal.jaxp.XPathFactoryImpl", true);
+            return new XPathFactoryImpl();
         }
 
         debugPrintln(()->"all things were tried, but none was found. bailing out.");
@@ -271,13 +270,7 @@
      * @return null
      *      if it fails. Error messages will be printed by this method.
      */
-    XPathFactory createInstance( String className )
-            throws XPathFactoryConfigurationException
-    {
-        return createInstance( className, false );
-    }
-
-    XPathFactory createInstance( String className, boolean useServicesMechanism  )
+    XPathFactory createInstance(String className)
             throws XPathFactoryConfigurationException
     {
         XPathFactory xPathFactory = null;
@@ -294,12 +287,7 @@
 
         // instantiate Class as a XPathFactory
         try {
-            if (!useServicesMechanism) {
-                xPathFactory = newInstanceNoServiceLoader(clazz);
-            }
-            if (xPathFactory == null) {
-                xPathFactory = (XPathFactory) clazz.getConstructor().newInstance();
-            }
+            xPathFactory = (XPathFactory) clazz.getConstructor().newInstance();
         } catch (ClassCastException | IllegalAccessException | IllegalArgumentException |
             InstantiationException | InvocationTargetException | NoSuchMethodException |
             SecurityException ex) {
@@ -312,50 +300,6 @@
 
         return xPathFactory;
     }
-    /**
-     * Try to construct using newXPathFactoryNoServiceLoader
-     *   method if available.
-     */
-    private static XPathFactory newInstanceNoServiceLoader(
-         Class<?> providerClass
-    ) throws XPathFactoryConfigurationException {
-        // Retain maximum compatibility if no security manager.
-        if (System.getSecurityManager() == null) {
-            return null;
-        }
-        try {
-            Method creationMethod =
-                    providerClass.getDeclaredMethod(
-                        "newXPathFactoryNoServiceLoader"
-                    );
-            final int modifiers = creationMethod.getModifiers();
-
-            // Do not call "newXPathFactoryNoServiceLoader" if it's
-            // not public static.
-            if (!Modifier.isStatic(modifiers) || !Modifier.isPublic(modifiers)) {
-                return null;
-            }
-
-            // Only calls "newXPathFactoryNoServiceLoader" if it's
-            // declared to return an instance of XPathFactory.
-            final Class<?> returnType = creationMethod.getReturnType();
-            if (SERVICE_CLASS.isAssignableFrom(returnType)) {
-                return SERVICE_CLASS.cast(creationMethod.invoke(null, (Object[])null));
-            } else {
-                // Should not happen since
-                // XPathFactoryImpl.newXPathFactoryNoServiceLoader is
-                // declared to return XPathFactory.
-                throw new ClassCastException(returnType
-                            + " cannot be cast to " + SERVICE_CLASS);
-            }
-        } catch (ClassCastException e) {
-            throw new XPathFactoryConfigurationException(e);
-        } catch (NoSuchMethodException exc) {
-            return null;
-        } catch (Exception exc) {
-            return null;
-        }
-    }
 
     // Call isObjectModelSupportedBy with initial context.
     private boolean isObjectModelSupportedBy(final XPathFactory factory,
--- a/src/java.xml/share/classes/jdk/xml/internal/JdkXmlFeatures.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.xml/share/classes/jdk/xml/internal/JdkXmlFeatures.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 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
@@ -26,6 +26,7 @@
 package jdk.xml.internal;
 
 import javax.xml.XMLConstants;
+import static jdk.xml.internal.JdkXmlUtils.OVERRIDE_PARSER;
 import static jdk.xml.internal.JdkXmlUtils.SP_USE_CATALOG;
 import static jdk.xml.internal.JdkXmlUtils.RESET_SYMBOL_TABLE;
 
@@ -36,6 +37,13 @@
 public class JdkXmlFeatures {
     public static final String ORACLE_JAXP_PROPERTY_PREFIX =
         "http://www.oracle.com/xml/jaxp/properties/";
+
+    public static final String XML_FEATURE_MANAGER =
+            ORACLE_JAXP_PROPERTY_PREFIX + "XmlFeatureManager";
+
+    public static final String ORACLE_FEATURE_SERVICE_MECHANISM =
+            "http://www.oracle.com/feature/use-service-mechanism";
+
     /**
      * Feature enableExtensionFunctions
      */
@@ -56,22 +64,37 @@
          * FSP: extension function is enforced by FSP. When FSP is on, extension
          * function is disabled.
          */
-        ENABLE_EXTENSION_FUNCTION(ORACLE_ENABLE_EXTENSION_FUNCTION,
-                SP_ENABLE_EXTENSION_FUNCTION_SPEC, true, false, true, true),
+        ENABLE_EXTENSION_FUNCTION(ORACLE_ENABLE_EXTENSION_FUNCTION, SP_ENABLE_EXTENSION_FUNCTION_SPEC,
+                ORACLE_ENABLE_EXTENSION_FUNCTION, SP_ENABLE_EXTENSION_FUNCTION,
+                true, false, true, true),
         /**
          * The {@link javax.xml.XMLConstants.USE_CATALOG} feature.
          * FSP: USE_CATALOG is not enforced by FSP.
          */
-        USE_CATALOG(PROPERTY_USE_CATALOG, SP_USE_CATALOG, true, false, true, false),
+        USE_CATALOG(PROPERTY_USE_CATALOG, SP_USE_CATALOG,
+                null, null,
+                true, false, true, false),
 
         /**
          * Feature resetSymbolTable
          * FSP: RESET_SYMBOL_TABLE_FEATURE is not enforced by FSP.
          */
-        RESET_SYMBOL_TABLE_FEATURE(RESET_SYMBOL_TABLE, RESET_SYMBOL_TABLE, false, false, true, false);
+        RESET_SYMBOL_TABLE_FEATURE(RESET_SYMBOL_TABLE, RESET_SYMBOL_TABLE,
+                null, null,
+                false, false, true, false),
+
+        /**
+         * Feature overrideDefaultParser
+         * FSP: not enforced by FSP.
+         */
+        JDK_OVERRIDE_PARSER(OVERRIDE_PARSER, OVERRIDE_PARSER,
+                ORACLE_FEATURE_SERVICE_MECHANISM, ORACLE_FEATURE_SERVICE_MECHANISM,
+                false, false, true, false);
 
         private final String name;
         private final String nameSP;
+        private final String nameOld;
+        private final String nameOldSP;
         private final boolean valueDefault;
         private final boolean valueEnforced;
         private final boolean hasSystem;
@@ -81,15 +104,20 @@
          * Constructs an XmlFeature instance.
          * @param name the name of the feature
          * @param nameSP the name of the System Property
+         * @param nameOld the name of the corresponding legacy property
+         * @param nameOldSP the system property of the legacy property
          * @param value the value of the feature
          * @param hasSystem a flag to indicate whether the feature is supported
          * @param enforced a flag indicating whether the feature is
          * FSP (Feature_Secure_Processing) enforced
          * with a System property
          */
-        XmlFeature(String name, String nameSP, boolean value, boolean valueEnforced, boolean hasSystem, boolean enforced) {
+        XmlFeature(String name, String nameSP, String nameOld, String nameOldSP,
+                boolean value, boolean valueEnforced, boolean hasSystem, boolean enforced) {
             this.name = name;
             this.nameSP = nameSP;
+            this.nameOld = nameOld;
+            this.nameOldSP = nameOldSP;
             this.valueDefault = value;
             this.valueEnforced = valueEnforced;
             this.hasSystem = hasSystem;
@@ -103,7 +131,8 @@
          * otherwise
          */
         boolean equalsPropertyName(String propertyName) {
-            return name.equals(propertyName);
+            return name.equals(propertyName) ||
+                    (nameOld != null && nameOld.equals(propertyName));
         }
 
         /**
@@ -125,6 +154,15 @@
         }
 
         /**
+         * Returns the name of the legacy System Property.
+         *
+         * @return the name of the legacy System Property
+         */
+        String systemPropertyOld() {
+            return nameOldSP;
+        }
+
+        /**
          * Returns the default value of the property.
          * @return the default value of the property
          */
@@ -159,30 +197,6 @@
     }
 
     /**
-     * Maps old property names with the new ones. This map is used to keep track of
-     * name changes so that old or incorrect names continue to be supported for compatibility.
-     */
-    public static enum NameMap {
-
-        ENABLE_EXTENSION_FUNCTION(SP_ENABLE_EXTENSION_FUNCTION_SPEC, SP_ENABLE_EXTENSION_FUNCTION);
-
-        final String newName;
-        final String oldName;
-
-        NameMap(String newName, String oldName) {
-            this.newName = newName;
-            this.oldName = oldName;
-        }
-
-        String getOldName(String newName) {
-            if (newName.equals(this.newName)) {
-                return oldName;
-            }
-            return null;
-        }
-    }
-
-    /**
      * States of the settings of a property, in the order: default value, value
      * set by FEATURE_SECURE_PROCESSING, jaxp.properties file, jaxp system
      * properties, and jaxp api properties
@@ -207,12 +221,12 @@
     /**
      * Values of the features
      */
-    private boolean[] featureValues;
+    private final boolean[] featureValues;
 
     /**
      * States of the settings for each property
      */
-    private State[] states;
+    private final State[] states;
 
     /**
      * Flag indicating if secure processing is set
@@ -349,14 +363,11 @@
      */
     private void readSystemProperties() {
         for (XmlFeature feature : XmlFeature.values()) {
-            getSystemProperty(feature, feature.systemProperty());
             if (!getSystemProperty(feature, feature.systemProperty())) {
                 //if system property is not found, try the older form if any
-                for (NameMap nameMap : NameMap.values()) {
-                    String oldName = nameMap.getOldName(feature.systemProperty());
-                    if (oldName != null) {
-                        getSystemProperty(feature, oldName);
-                    }
+                String oldName = feature.systemPropertyOld();
+                if (oldName != null) {
+                    getSystemProperty(feature, oldName);
                 }
             }
         }
@@ -367,6 +378,7 @@
      *
      * @param property the type of the property
      * @param sysPropertyName the name of system property
+     * @return true if the system property is found, false otherwise
      */
     private boolean getSystemProperty(XmlFeature feature, String sysPropertyName) {
         try {
--- a/src/java.xml/share/classes/jdk/xml/internal/JdkXmlUtils.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/java.xml/share/classes/jdk/xml/internal/JdkXmlUtils.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 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
@@ -22,16 +22,26 @@
  * or visit www.oracle.com if you need additional information or have any
  * questions.
  */
-
 package jdk.xml.internal;
 
 import com.sun.org.apache.xalan.internal.utils.XMLSecurityManager;
+import com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl;
+import com.sun.org.apache.xerces.internal.impl.Constants;
+import com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl;
+import com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl;
 import com.sun.org.apache.xerces.internal.util.ParserConfigurationSettings;
 import com.sun.org.apache.xerces.internal.xni.parser.XMLComponentManager;
 import com.sun.org.apache.xerces.internal.xni.parser.XMLConfigurationException;
 import javax.xml.XMLConstants;
 import javax.xml.catalog.CatalogFeatures;
 import javax.xml.catalog.CatalogFeatures.Feature;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.parsers.SAXParserFactory;
+import javax.xml.transform.TransformerConfigurationException;
+import javax.xml.transform.sax.SAXTransformerFactory;
+import org.w3c.dom.Document;
+import org.xml.sax.SAXException;
 import org.xml.sax.SAXNotRecognizedException;
 import org.xml.sax.SAXNotSupportedException;
 import org.xml.sax.XMLReader;
@@ -40,6 +50,18 @@
  * Constants for use across JAXP processors.
  */
 public class JdkXmlUtils {
+    private static final String DOM_FACTORY_ID = "javax.xml.parsers.DocumentBuilderFactory";
+    private static final String SAX_FACTORY_ID = "javax.xml.parsers.SAXParserFactory";
+    private static final String SAX_DRIVER = "org.xml.sax.driver";
+
+    /**
+     * Xerces features
+     */
+    public static final String NAMESPACES_FEATURE =
+        Constants.SAX_FEATURE_PREFIX + Constants.NAMESPACES_FEATURE;
+    public static final String NAMESPACE_PREFIXES_FEATURE =
+        Constants.SAX_FEATURE_PREFIX + Constants.NAMESPACE_PREFIXES_FEATURE;
+
 
     /**
      * Catalog features
@@ -52,12 +74,20 @@
     public final static String CATALOG_RESOLVE = CatalogFeatures.Feature.RESOLVE.getPropertyName();
 
     /**
-     * Reset SymbolTable feature
-     * System property name is identical to feature name
+     * Reset SymbolTable feature System property name is identical to feature
+     * name
      */
     public final static String RESET_SYMBOL_TABLE = "jdk.xml.resetSymbolTable";
 
     /**
+     * jdk.xml.overrideDefaultParser: enables the use of a 3rd party's parser
+     * implementation to override the system-default parser.
+     */
+    public static final String OVERRIDE_PARSER = "jdk.xml.overrideDefaultParser";
+    public static final boolean OVERRIDE_PARSER_DEFAULT = SecuritySupport.getJAXPSystemProperty(
+                    Boolean.class, OVERRIDE_PARSER, "false");
+
+    /**
      * Values for a feature
      */
     public static final String FEATURE_TRUE = "true";
@@ -75,7 +105,6 @@
     public static final boolean RESET_SYMBOL_TABLE_DEFAULT
             = SecuritySupport.getJAXPSystemProperty(Boolean.class, RESET_SYMBOL_TABLE, "false");
 
-
     /**
      * JDK features (will be consolidated in the next major feature revamp
      */
@@ -84,6 +113,11 @@
             = SecuritySupport.getJAXPSystemProperty(Integer.class, CDATA_CHUNK_SIZE, "0");
 
     /**
+     * The system-default factory
+     */
+    private static final SAXParserFactory defaultSAXFactory = getSAXFactory(false);
+
+    /**
      * Returns the value.
      *
      * @param value the specified value
@@ -227,4 +261,153 @@
             }
         }
     }
+
+    /**
+     * Returns an XMLReader instance. If overrideDefaultParser is requested, use
+     * SAXParserFactory or XMLReaderFactory, otherwise use the system-default
+     * SAXParserFactory to locate an XMLReader.
+     *
+     * @param overrideDefaultParser a flag indicating whether a 3rd party's
+     * parser implementation may be used to override the system-default one
+     * @param secureProcessing a flag indicating whether secure processing is
+     * requested
+     * @param useXMLReaderFactory a flag indicating when the XMLReader should be
+     * created using XMLReaderFactory. True is a compatibility mode that honors
+     * the property org.xml.sax.driver (see JDK-6490921).
+     * @return an XMLReader instance
+     */
+    public static XMLReader getXMLReader(boolean overrideDefaultParser,
+            boolean secureProcessing) {
+        SAXParserFactory saxFactory;
+        XMLReader reader = null;
+        String spSAXDriver = SecuritySupport.getSystemProperty(SAX_DRIVER);
+        if (spSAXDriver != null) {
+            reader = getXMLReaderWXMLReaderFactory();
+        } else if (overrideDefaultParser) {
+            reader = getXMLReaderWSAXFactory(overrideDefaultParser);
+        }
+
+        if (reader != null) {
+            if (secureProcessing) {
+                try {
+                    reader.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, secureProcessing);
+                } catch (SAXException e) {
+                    XMLSecurityManager.printWarning(reader.getClass().getName(),
+                            XMLConstants.FEATURE_SECURE_PROCESSING, e);
+                }
+            }
+            try {
+                reader.setFeature(NAMESPACES_FEATURE, true);
+                reader.setFeature(NAMESPACE_PREFIXES_FEATURE, false);
+            } catch (SAXException se) {
+                // older version of a parser
+            }
+            return reader;
+        }
+
+        // use the system-default
+        saxFactory = defaultSAXFactory;
+
+        try {
+            reader = saxFactory.newSAXParser().getXMLReader();
+        } catch (ParserConfigurationException | SAXException ex) {
+            // shall not happen with the system-default reader
+        }
+        return reader;
+    }
+
+    /**
+     * Creates a system-default DOM Document.
+     *
+     * @return a DOM Document instance
+     */
+    public static Document getDOMDocument() {
+        try {
+            DocumentBuilderFactory dbf = JdkXmlUtils.getDOMFactory(false);
+            return dbf.newDocumentBuilder().newDocument();
+        } catch (ParserConfigurationException pce) {
+            // can never happen with the system-default configuration
+        }
+        return null;
+    }
+
+    /**
+     * Returns a DocumentBuilderFactory instance.
+     *
+     * @param overrideDefaultParser a flag indicating whether the system-default
+     * implementation may be overridden. If the system property of the
+     * DOM factory ID is set, override is always allowed.
+     *
+     * @return a DocumentBuilderFactory instance.
+     */
+    public static DocumentBuilderFactory getDOMFactory(boolean overrideDefaultParser) {
+        boolean override = overrideDefaultParser;
+        String spDOMFactory = SecuritySupport.getJAXPSystemProperty(DOM_FACTORY_ID);
+
+        if (spDOMFactory != null && System.getSecurityManager() == null) {
+            override = true;
+        }
+        DocumentBuilderFactory dbf
+                = !override
+                        ? new DocumentBuilderFactoryImpl()
+                        : DocumentBuilderFactory.newInstance();
+        dbf.setNamespaceAware(true);
+        // false is the default setting. This step here is for compatibility
+        dbf.setValidating(false);
+        return dbf;
+    }
+
+    /**
+     * Returns a SAXParserFactory instance.
+     *
+     * @param overrideDefaultParser a flag indicating whether the system-default
+     * implementation may be overridden. If the system property of the
+     * DOM factory ID is set, override is always allowed.
+     *
+     * @return a SAXParserFactory instance.
+     */
+    public static SAXParserFactory getSAXFactory(boolean overrideDefaultParser) {
+        boolean override = overrideDefaultParser;
+        String spSAXFactory = SecuritySupport.getJAXPSystemProperty(SAX_FACTORY_ID);
+        if (spSAXFactory != null && System.getSecurityManager() == null) {
+            override = true;
+        }
+
+        SAXParserFactory factory
+                = !override
+                        ? new SAXParserFactoryImpl()
+                        : SAXParserFactory.newInstance();
+        factory.setNamespaceAware(true);
+        return factory;
+    }
+
+    public static SAXTransformerFactory getSAXTransformFactory(boolean overrideDefaultParser) {
+        SAXTransformerFactory tf = overrideDefaultParser
+                ? (SAXTransformerFactory) SAXTransformerFactory.newInstance()
+                : (SAXTransformerFactory) new TransformerFactoryImpl();
+        try {
+            tf.setFeature(OVERRIDE_PARSER, overrideDefaultParser);
+        } catch (TransformerConfigurationException ex) {
+            // ignore since it'd never happen with the JDK impl.
+        }
+        return tf;
+    }
+
+    private static XMLReader getXMLReaderWSAXFactory(boolean overrideDefaultParser) {
+        SAXParserFactory saxFactory = getSAXFactory(overrideDefaultParser);
+        try {
+            return saxFactory.newSAXParser().getXMLReader();
+        } catch (ParserConfigurationException | SAXException ex) {
+            return getXMLReaderWXMLReaderFactory();
+        }
+    }
+
+    @SuppressWarnings("deprecation")
+    private static XMLReader getXMLReaderWXMLReaderFactory() {
+        try {
+            return org.xml.sax.helpers.XMLReaderFactory.createXMLReader();
+        } catch (SAXException ex1) {
+        }
+        return null;
+    }
 }
--- a/src/jdk.aot/share/classes/jdk.tools.jaotc/src/jdk/tools/jaotc/Options.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/jdk.aot/share/classes/jdk.tools.jaotc/src/jdk/tools/jaotc/Options.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -227,7 +227,7 @@
             task.options.verbose = true;
             task.options.debug = true;
         }
-    }, new Option("  --help                     Print this usage message", false, "--help") {
+    }, new Option("  -? -h --help               Print this help message", false, "--help", "-h", "-?") {
         @Override
         void process(Main task, String opt, String arg) {
             task.options.help = true;
--- a/src/jdk.compiler/share/classes/com/sun/tools/doclint/resources/doclint_ja.properties	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/jdk.compiler/share/classes/com/sun/tools/doclint/resources/doclint_ja.properties	Tue Jan 30 16:41:40 2018 +0100
@@ -45,6 +45,7 @@
 dc.invalid.param = \u7121\u52B9\u306A@param\u306E\u4F7F\u7528
 dc.invalid.provides = \u7121\u52B9\u306A@provides\u306E\u4F7F\u7528
 dc.invalid.return = \u7121\u52B9\u306A@return\u306E\u4F7F\u7528
+dc.invalid.summary = \u7121\u52B9\u306A@summary\u306E\u4F7F\u7528
 dc.invalid.throws = \u7121\u52B9\u306A@throws\u306E\u4F7F\u7528
 dc.invalid.uses = \u7121\u52B9\u306A@uses\u306E\u4F7F\u7528
 dc.invalid.uri = \u7121\u52B9\u306AURI: "{0}"
--- a/src/jdk.compiler/share/classes/com/sun/tools/doclint/resources/doclint_zh_CN.properties	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/jdk.compiler/share/classes/com/sun/tools/doclint/resources/doclint_zh_CN.properties	Tue Jan 30 16:41:40 2018 +0100
@@ -45,6 +45,7 @@
 dc.invalid.param = @param \u7684\u7528\u6CD5\u65E0\u6548
 dc.invalid.provides = @provides \u7684\u7528\u6CD5\u65E0\u6548
 dc.invalid.return = @return \u7684\u7528\u6CD5\u65E0\u6548
+dc.invalid.summary = @summary \u7684\u7528\u6CD5\u65E0\u6548
 dc.invalid.throws = @throws \u7684\u7528\u6CD5\u65E0\u6548
 dc.invalid.uses = @uses \u7684\u7528\u6CD5\u65E0\u6548
 dc.invalid.uri = URI \u65E0\u6548: "{0}"
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/code/ClassFinder.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/code/ClassFinder.java	Tue Jan 30 16:41:40 2018 +0100
@@ -633,6 +633,7 @@
         boolean haveSourcePath = includeSourcePath && fileManager.hasLocation(SOURCE_PATH);
 
         if (verbose && verbosePath) {
+            verbosePath = false; // print once per compile
             if (fileManager instanceof StandardJavaFileManager) {
                 StandardJavaFileManager fm = (StandardJavaFileManager)fileManager;
                 if (haveSourcePath && wantSourceFiles) {
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Type.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Type.java	Tue Jan 30 16:41:40 2018 +0100
@@ -2107,9 +2107,8 @@
                 List<Type> prevBounds = bounds.get(ib);
                 if (bound == qtype) return;
                 for (Type b : prevBounds) {
-                    //check for redundancy - use strict version of isSameType on tvars
-                    //(as the standard version will lead to false positives w.r.t. clones ivars)
-                    if (types.isSameType(b, bound2, true)) return;
+                    //check for redundancy - do not add same bound twice
+                    if (types.isSameType(b, bound2)) return;
                 }
                 bounds.put(ib, prevBounds.prepend(bound2));
                 notifyBoundChange(ib, bound2, false);
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/code/TypeAnnotationPosition.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/code/TypeAnnotationPosition.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -312,6 +312,7 @@
         Assert.check(!hasExceptionIndex(), "exception_index already set");
         Assert.check(exception_index >= 0, "Expected a valid index into exception table");
         this.exception_index = exception_index;
+        this.isValidOffset = true;
     }
 
     public boolean hasCatchType() {
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Types.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Types.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1291,12 +1291,9 @@
      * lists are of different length, return false.
      */
     public boolean isSameTypes(List<Type> ts, List<Type> ss) {
-        return isSameTypes(ts, ss, false);
-    }
-    public boolean isSameTypes(List<Type> ts, List<Type> ss, boolean strict) {
         while (ts.tail != null && ss.tail != null
                /*inlined: ts.nonEmpty() && ss.nonEmpty()*/ &&
-               isSameType(ts.head, ss.head, strict)) {
+               isSameType(ts.head, ss.head)) {
             ts = ts.tail;
             ss = ss.tail;
         }
@@ -1325,15 +1322,15 @@
      * Is t the same type as s?
      */
     public boolean isSameType(Type t, Type s) {
-        return isSameType(t, s, false);
-    }
-    public boolean isSameType(Type t, Type s, boolean strict) {
-        return strict ?
-                isSameTypeStrict.visit(t, s) :
-                isSameTypeLoose.visit(t, s);
+        return isSameTypeVisitor.visit(t, s);
     }
     // where
-        abstract class SameTypeVisitor extends TypeRelation {
+
+        /**
+         * Type-equality relation - type variables are considered
+         * equals if they share the same object identity.
+         */
+        TypeRelation isSameTypeVisitor = new TypeRelation() {
 
             public Boolean visitType(Type t, Type s) {
                 if (t.equalsIgnoreMetadata(s))
@@ -1350,7 +1347,7 @@
                     if (s.hasTag(TYPEVAR)) {
                         //type-substitution does not preserve type-var types
                         //check that type var symbols and bounds are indeed the same
-                        return sameTypeVars((TypeVar)t, (TypeVar)s);
+                        return t == s;
                     }
                     else {
                         //special case for s == ? super X, where upper(s) = u
@@ -1365,8 +1362,6 @@
                 }
             }
 
-            abstract boolean sameTypeVars(TypeVar tv1, TypeVar tv2);
-
             @Override
             public Boolean visitWildcardType(WildcardType t, Type s) {
                 if (!s.hasTag(WILDCARD)) {
@@ -1374,7 +1369,7 @@
                 } else {
                     WildcardType t2 = (WildcardType)s;
                     return (t.kind == t2.kind || (t.isExtendsBound() && s.isExtendsBound())) &&
-                            isSameType(t.type, t2.type, true);
+                            isSameType(t.type, t2.type);
                 }
             }
 
@@ -1411,10 +1406,8 @@
                 }
                 return t.tsym == s.tsym
                     && visit(t.getEnclosingType(), s.getEnclosingType())
-                    && containsTypes(t.getTypeArguments(), s.getTypeArguments());
-            }
-
-            abstract protected boolean containsTypes(List<Type> ts1, List<Type> ts2);
+                    && containsTypeEquivalent(t.getTypeArguments(), s.getTypeArguments());
+            }
 
             @Override
             public Boolean visitArrayType(ArrayType t, Type s) {
@@ -1471,70 +1464,6 @@
             public Boolean visitErrorType(ErrorType t, Type s) {
                 return true;
             }
-        }
-
-        /**
-         * Standard type-equality relation - type variables are considered
-         * equals if they share the same type symbol.
-         */
-        TypeRelation isSameTypeLoose = new LooseSameTypeVisitor();
-
-        private class LooseSameTypeVisitor extends SameTypeVisitor {
-
-            /** cache of the type-variable pairs being (recursively) tested. */
-            private Set<TypePair> cache = new HashSet<>();
-
-            @Override
-            boolean sameTypeVars(TypeVar tv1, TypeVar tv2) {
-                return tv1.tsym == tv2.tsym && checkSameBounds(tv1, tv2);
-            }
-            @Override
-            protected boolean containsTypes(List<Type> ts1, List<Type> ts2) {
-                return containsTypeEquivalent(ts1, ts2);
-            }
-
-            /**
-             * Since type-variable bounds can be recursive, we need to protect against
-             * infinite loops - where the same bounds are checked over and over recursively.
-             */
-            private boolean checkSameBounds(TypeVar tv1, TypeVar tv2) {
-                TypePair p = new TypePair(tv1, tv2, true);
-                if (cache.add(p)) {
-                    try {
-                        return visit(tv1.getUpperBound(), tv2.getUpperBound());
-                    } finally {
-                        cache.remove(p);
-                    }
-                } else {
-                    return false;
-                }
-            }
-        };
-
-        /**
-         * Strict type-equality relation - type variables are considered
-         * equals if they share the same object identity.
-         */
-        TypeRelation isSameTypeStrict = new SameTypeVisitor() {
-            @Override
-            boolean sameTypeVars(TypeVar tv1, TypeVar tv2) {
-                return tv1 == tv2;
-            }
-            @Override
-            protected boolean containsTypes(List<Type> ts1, List<Type> ts2) {
-                return isSameTypes(ts1, ts2, true);
-            }
-
-            @Override
-            public Boolean visitWildcardType(WildcardType t, Type s) {
-                if (!s.hasTag(WILDCARD)) {
-                    return false;
-                } else {
-                    WildcardType t2 = (WildcardType)s;
-                    return t.kind == t2.kind &&
-                            isSameType(t.type, t2.type, true);
-                }
-            }
         };
 
     // </editor-fold>
@@ -3848,17 +3777,11 @@
     // where
         class TypePair {
             final Type t1;
-            final Type t2;
-            boolean strict;
+            final Type t2;;
 
             TypePair(Type t1, Type t2) {
-                this(t1, t2, false);
-            }
-
-            TypePair(Type t1, Type t2, boolean strict) {
                 this.t1 = t1;
                 this.t2 = t2;
-                this.strict = strict;
             }
             @Override
             public int hashCode() {
@@ -3869,8 +3792,8 @@
                 if (!(obj instanceof TypePair))
                     return false;
                 TypePair typePair = (TypePair)obj;
-                return isSameType(t1, typePair.t1, strict)
-                    && isSameType(t2, typePair.t2, strict);
+                return isSameType(t1, typePair.t1)
+                    && isSameType(t2, typePair.t2);
             }
         }
         Set<TypePair> mergeCache = new HashSet<>();
@@ -4460,7 +4383,7 @@
                 Type tmpLower = Si.lower.hasTag(UNDETVAR) ? ((UndetVar)Si.lower).qtype : Si.lower;
                 if (!Si.bound.hasTag(ERROR) &&
                     !Si.lower.hasTag(ERROR) &&
-                    isSameType(tmpBound, tmpLower, false)) {
+                    isSameType(tmpBound, tmpLower)) {
                     currentS.head = Si.bound;
                 }
             }
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/ArgumentAttr.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/ArgumentAttr.java	Tue Jan 30 16:41:40 2018 +0100
@@ -366,7 +366,9 @@
 
         @Override
         Type speculativeType(Symbol msym, MethodResolutionPhase phase) {
-            if (pertinentToApplicability) {
+            if (notPertinentToApplicability.contains(msym)) {
+                return super.speculativeType(msym, phase);
+            } else {
                 for (Map.Entry<ResultInfo, Type> _entry : speculativeTypes.entrySet()) {
                     DeferredAttrContext deferredAttrContext = _entry.getKey().checkContext.deferredAttrContext();
                     if (deferredAttrContext.phase == phase && deferredAttrContext.msym == msym) {
@@ -374,14 +376,14 @@
                     }
                 }
                 return Type.noType;
-            } else {
-                return super.speculativeType(msym, phase);
             }
         }
 
         @Override
         JCTree speculativeTree(DeferredAttrContext deferredAttrContext) {
-            return pertinentToApplicability ? speculativeTree : super.speculativeTree(deferredAttrContext);
+            return notPertinentToApplicability.contains(deferredAttrContext.msym) ?
+                    super.speculativeTree(deferredAttrContext) :
+                    speculativeTree;
         }
 
         /**
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/DeferredAttr.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/DeferredAttr.java	Tue Jan 30 16:41:40 2018 +0100
@@ -200,7 +200,7 @@
         public JCExpression tree;
         Env<AttrContext> env;
         AttrMode mode;
-        boolean pertinentToApplicability = true;
+        Set<Symbol> notPertinentToApplicability = new HashSet<>();
         SpeculativeCache speculativeCache;
 
         DeferredType(JCExpression tree, Env<AttrContext> env) {
@@ -319,7 +319,7 @@
                     resultInfo.checkContext.deferredAttrContext();
             Assert.check(deferredAttrContext != emptyDeferredAttrContext);
             if (deferredStuckPolicy.isStuck()) {
-                pertinentToApplicability = false;
+                notPertinentToApplicability.add(deferredAttrContext.msym);
                 deferredAttrContext.addDeferredAttrNode(this, resultInfo, deferredStuckPolicy);
                 return Type.noType;
             } else {
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Infer.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Infer.java	Tue Jan 30 16:41:40 2018 +0100
@@ -565,7 +565,7 @@
                                             List<Type> argtypes) {
         final Type restype;
 
-        if (spMethod == null || types.isSameType(spMethod.getReturnType(), syms.objectType, true)) {
+        if (spMethod == null || types.isSameType(spMethod.getReturnType(), syms.objectType)) {
             // The return type of the polymorphic signature is polymorphic,
             // and is computed from the enclosing tree E, as follows:
             // if E is a cast, then use the target type of the cast expression
@@ -1227,8 +1227,8 @@
             } else {
                 IncorporationBinaryOp that = (IncorporationBinaryOp)o;
                 return opKind == that.opKind &&
-                        types.isSameType(op1, that.op1, true) &&
-                        types.isSameType(op2, that.op2, true);
+                        types.isSameType(op1, that.op1) &&
+                        types.isSameType(op2, that.op2);
             }
         }
 
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Lower.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Lower.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -3226,7 +3226,7 @@
             JCVariableDecl indexdef = make.VarDef(index, make.Literal(INT, 0));
             indexdef.init.type = indexdef.type = syms.intType.constType(0);
 
-            List<JCStatement> loopinit = List.of(lencachedef, indexdef);
+            List<JCStatement> loopinit = List.of(arraycachedef, lencachedef, indexdef);
             JCBinary cond = makeBinary(LT, make.Ident(index), make.Ident(lencache));
 
             JCExpressionStatement step = make.Exec(makeUnary(PREINC, make.Ident(index)));
@@ -3236,20 +3236,18 @@
                                                     make.Ident(index)).setType(elemtype);
             JCVariableDecl loopvardef = (JCVariableDecl)make.VarDef(tree.var.mods,
                                                   tree.var.name,
-                                                  tree.var.vartype, loopvarinit).setType(tree.var.type);
+                                                  tree.var.vartype,
+                                                  loopvarinit).setType(tree.var.type);
             loopvardef.sym = tree.var.sym;
-
-            JCBlock body = make.Block(0, List.of(loopvardef, tree.body));
-
-            arraycachedef = translate(arraycachedef);
+            JCBlock body = make.
+                Block(0, List.of(loopvardef, tree.body));
+
             result = translate(make.
                                ForLoop(loopinit,
                                        cond,
                                        List.of(step),
                                        body));
             patchTargets(body, tree, result);
-            JCStatement nullAssignToArr = make.Assignment(arraycache, make.Literal(BOT, null).setType(syms.botType));
-            result = make.Block(0, List.of(arraycachedef, (JCStatement)result, nullAssignToArr));
         }
         /** Patch up break and continue targets. */
         private void patchTargets(JCTree body, final JCTree src, final JCTree dest) {
@@ -3303,7 +3301,7 @@
                                             types.erasure(types.asSuper(iterator.type.getReturnType(), syms.iteratorType.tsym)),
                                             currentMethodSym);
 
-            JCStatement init = make.
+             JCStatement init = make.
                 VarDef(itvar, make.App(make.Select(tree.expr, iterator)
                      .setType(types.erasure(iterator.type))));
 
@@ -3328,15 +3326,12 @@
             indexDef.sym = tree.var.sym;
             JCBlock body = make.Block(0, List.of(indexDef, tree.body));
             body.endpos = TreeInfo.endPos(tree.body);
-            init = translate(init);
             result = translate(make.
-                ForLoop(List.nil(),
+                ForLoop(List.of(init),
                         cond,
                         List.nil(),
                         body));
             patchTargets(body, tree, result);
-            JCStatement nullAssignToIterator = make.Assignment(itvar, make.Literal(BOT, null).setType(syms.botType));
-            result = make.Block(0, List.of(init, (JCStatement)result, nullAssignToIterator));
         }
 
     public void visitVarDef(JCVariableDecl tree) {
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/TransTypes.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/TransTypes.java	Tue Jan 30 16:41:40 2018 +0100
@@ -788,7 +788,7 @@
             JCTypeCast typeCast = newExpression.hasTag(Tag.TYPECAST)
                 ? (JCTypeCast) newExpression
                 : null;
-            tree.expr = typeCast != null && types.isSameType(typeCast.type, originalTarget, true)
+            tree.expr = typeCast != null && types.isSameType(typeCast.type, originalTarget)
                 ? typeCast.expr
                 : newExpression;
         }
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Code.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Code.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2015, 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
@@ -2100,15 +2100,19 @@
     }
 
     private void fillLocalVarPosition(LocalVar lv) {
-        if (lv == null || lv.sym == null || !lv.sym.hasTypeAnnotations())
+        if (lv == null || lv.sym == null || lv.sym.isExceptionParameter()|| !lv.sym.hasTypeAnnotations())
             return;
+        LocalVar.Range widestRange = lv.getWidestRange();
         for (Attribute.TypeCompound ta : lv.sym.getRawTypeAttributes()) {
             TypeAnnotationPosition p = ta.position;
-            LocalVar.Range widestRange = lv.getWidestRange();
-            p.lvarOffset = new int[] { (int)widestRange.start_pc };
-            p.lvarLength = new int[] { (int)widestRange.length };
-            p.lvarIndex = new int[] { (int)lv.reg };
-            p.isValidOffset = true;
+            if (widestRange.closed() && widestRange.length > 0) {
+                p.lvarOffset = new int[] { (int)widestRange.start_pc };
+                p.lvarLength = new int[] { (int)widestRange.length };
+                p.lvarIndex = new int[] { (int)lv.reg };
+                p.isValidOffset = true;
+            } else {
+                p.isValidOffset = false;
+            }
         }
     }
 
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/main/Option.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/main/Option.java	Tue Jan 30 16:41:40 2018 +0100
@@ -362,7 +362,7 @@
     },
 
     // Note: -h is already taken for "native header output directory".
-    HELP("--help -help", "opt.help", STANDARD, INFO) {
+    HELP("--help -help -?", "opt.help", STANDARD, INFO) {
         @Override
         public void process(OptionHelper helper, String option) throws InvalidValueException {
             Log log = helper.getLog();
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/parser/JavacParser.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/parser/JavacParser.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -3403,8 +3403,12 @@
     Name typeName() {
         int pos = token.pos;
         Name name = ident();
-        if (isRestrictedLocalVarTypeName(name)) {
-            reportSyntaxError(pos, "var.not.allowed", name);
+        if (name == names.var) {
+            if (Feature.LOCAL_VARIABLE_TYPE_INFERENCE.allowedInSource(source)) {
+                reportSyntaxError(pos, "var.not.allowed", name);
+            } else {
+                warning(pos, "var.not.allowed");
+            }
         }
         return name;
     }
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler.properties	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler.properties	Tue Jan 30 16:41:40 2018 +0100
@@ -1212,6 +1212,9 @@
     ''{0}'' not allowed here\n\
     as of release 10, ''{0}'' is a restricted local variable type and cannot be used for type declarations
 
+compiler.warn.var.not.allowed=\
+    as of release 10, ''var'' is a restricted local variable type and cannot be used for type declarations
+
 # 0: name (variable), 1: message segment
 compiler.err.cant.infer.local.var.type=\
     cannot infer type for local variable {0}\n\
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler_ja.properties	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler_ja.properties	Tue Jan 30 16:41:40 2018 +0100
@@ -28,12 +28,14 @@
 # values.
 # The simple types currently in use are:
 #
+# annotation        annotation compound
 # boolean           true or false
 # diagnostic        a sub-message; see compiler.misc.*
 # fragment          similar to 'message segment', but with more specific type
 # modifier          a Java modifier; e.g. public, private, protected
 # file              a file URL
 # file object       a file URL - similar to 'file' but typically used for source/class files, hence more specific
+# flag              a Flags.Flag instance
 # name              a name, typically a Java identifier
 # number            an integer
 # option name       the name of a command line option
@@ -49,8 +51,9 @@
 #
 # The following compound types are also used:
 #
+# collection of X   a comma-separated collection of items; e.g. collection of type
 # list of X         a comma-separated list of items; e.g. list of type
-# set of X          a comma-separated collection of items; e.g. set of modifier
+# set of X          a comma-separated set of items; e.g. set of modifier
 #
 # These may be composed:
 #
@@ -59,7 +62,7 @@
 # The following type aliases are supported:
 #
 # message segment --> diagnostic or fragment
-# file name --> file or file object
+# file name --> file, path or file object
 #
 # Custom comments are supported in parenthesis i.e.
 #
@@ -83,20 +86,22 @@
 
 compiler.err.abstract.meth.cant.have.body=abstract\u30E1\u30BD\u30C3\u30C9\u304C\u672C\u4F53\u3092\u6301\u3064\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093
 
+# 0: kind name, 1: symbol
 compiler.err.already.annotated={0} {1}\u306F\u6CE8\u91C8\u304C\u4ED8\u3044\u3066\u3044\u307E\u3059
 
-# 0: symbol kind, 1: symbol, 2: symbol kind, 3: symbol
+# 0: kind name, 1: symbol, 2: kind name, 3: symbol
 compiler.err.already.defined={0} {1}\u306F\u3059\u3067\u306B{2} {3}\u3067\u5B9A\u7FA9\u3055\u308C\u3066\u3044\u307E\u3059
 
-# 0: symbol kind, 1: symbol, 2: symbol kind, 3: symbol kind, 4: symbol
+# 0: kind name, 1: symbol, 2: kind name, 3: kind name, 4: symbol
 compiler.err.already.defined.in.clinit={0} {1}\u306F\u3059\u3067\u306B{3} {4}\u306E{2}\u3067\u5B9A\u7FA9\u3055\u308C\u3066\u3044\u307E\u3059
 
-# 0: string
+# 0: symbol
 compiler.err.already.defined.single.import=\u540C\u3058\u5358\u7D14\u540D\u306E\u578B\u304C{0}\u306E\u5358\u4E00\u578B\u30A4\u30F3\u30DD\u30FC\u30C8\u306B\u3088\u3063\u3066\u3059\u3067\u306B\u5B9A\u7FA9\u3055\u308C\u3066\u3044\u307E\u3059
 
-# 0: string
+# 0: symbol
 compiler.err.already.defined.static.single.import=\u540C\u3058\u5358\u7D14\u540D\u306E\u578B\u304C{0}\u306Estatic\u5358\u4E00\u578B\u30A4\u30F3\u30DD\u30FC\u30C8\u306B\u3088\u3063\u3066\u3059\u3067\u306B\u5B9A\u7FA9\u3055\u308C\u3066\u3044\u307E\u3059
 
+# 0: symbol
 compiler.err.already.defined.this.unit={0}\u306F\u30B3\u30F3\u30D1\u30A4\u30EB\u5358\u4F4D\u3067\u5B9A\u7FA9\u3055\u308C\u3066\u3044\u307E\u3059
 
 # 0: type, 1: list of name
@@ -121,6 +126,8 @@
 
 compiler.err.annotation.value.not.allowable.type=\u4F7F\u7528\u3067\u304D\u306A\u3044\u578B\u306E\u6CE8\u91C8\u306E\u5024\u3067\u3059
 
+compiler.err.expression.not.allowable.as.annotation.value=\u5F0F\u304C\u6CE8\u91C8\u306E\u5024\u3068\u3057\u3066\u8A31\u53EF\u3055\u308C\u307E\u305B\u3093
+
 compiler.err.anon.class.impl.intf.no.args=\u540D\u524D\u306E\u306A\u3044\u30AF\u30E9\u30B9\u304C\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u3092\u5B9F\u88C5\u3057\u3066\u3044\u307E\u3059\u3002\u5F15\u6570\u3092\u6301\u3064\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093
 
 compiler.err.anon.class.impl.intf.no.typeargs=\u540D\u524D\u306E\u306A\u3044\u30AF\u30E9\u30B9\u304C\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u3092\u5B9F\u88C5\u3057\u3066\u3044\u307E\u3059\u3002\u578B\u5F15\u6570\u3092\u6301\u3064\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093
@@ -134,6 +141,8 @@
 
 compiler.err.array.dimension.missing=\u914D\u5217\u306E\u5927\u304D\u3055\u304C\u6307\u5B9A\u3055\u308C\u3066\u3044\u307E\u305B\u3093
 
+compiler.err.illegal.array.creation.both.dimension.and.initialization=\u6B21\u5143\u5F0F\u3068\u521D\u671F\u5316\u306E\u4E21\u65B9\u3092\u4F7F\u7528\u3057\u305F\u914D\u5217\u306E\u4F5C\u6210\u306F\u7121\u52B9\u3067\u3059
+
 # 0: type
 compiler.err.array.req.but.found=\u914D\u5217\u304C\u8981\u6C42\u3055\u308C\u307E\u3057\u305F\u304C\u3001{0}\u304C\u898B\u3064\u304B\u308A\u307E\u3057\u305F
 
@@ -159,10 +168,10 @@
 # 0: symbol kind, 1: name, 2: list of type
 compiler.misc.cant.apply.symbols={1}\u306B\u9069\u5207\u306A{0}\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093({2})
 
-# 0: symbol kind, 1: symbol
+# 0: kind name, 1: symbol
 compiler.misc.no.abstracts={0} {1}\u3067\u62BD\u8C61\u30E1\u30BD\u30C3\u30C9\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093
 
-# 0: symbol kind, 1: symbol
+# 0: kind name, 1: symbol
 compiler.misc.incompatible.abstracts={0} {1}\u3067\u8907\u6570\u306E\u30AA\u30FC\u30D0\u30FC\u30E9\u30A4\u30C9\u3057\u306A\u3044\u62BD\u8C61\u30E1\u30BD\u30C3\u30C9\u304C\u898B\u3064\u304B\u308A\u307E\u3057\u305F
 
 compiler.err.bad.functional.intf.anno=\u4E88\u671F\u3057\u306A\u3044@FunctionalInterface\u6CE8\u91C8
@@ -179,10 +188,10 @@
 # 0: symbol, 1: message segment
 compiler.misc.not.a.functional.intf.1={0}\u306F\u6A5F\u80FD\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u3067\u306F\u3042\u308A\u307E\u305B\u3093\n{1}
 
-# 0: symbol, 1: symbol kind, 2: symbol
+# 0: type, 1: kind name, 2: symbol
 compiler.misc.invalid.generic.lambda.target=\u30E9\u30E0\u30C0\u5F0F\u306E\u6A5F\u80FD\u30C7\u30A3\u30B9\u30AF\u30EA\u30D7\u30BF\u304C\u7121\u52B9\u3067\u3059\n{1} {2}\u306E\u30E1\u30BD\u30C3\u30C9{0}\u306F\u6C4E\u7528\u3067\u3059
 
-# 0: symbol kind, 1: symbol
+# 0: kind name, 1: symbol
 compiler.misc.incompatible.descs.in.functional.intf={0} {1}\u3067\u4E0D\u9069\u5408\u306A\u6A5F\u80FD\u30C7\u30A3\u30B9\u30AF\u30EA\u30D7\u30BF\u304C\u898B\u3064\u304B\u308A\u307E\u3057\u305F
 
 # 0: name, 1: list of type, 2: type, 3: list of type
@@ -200,7 +209,7 @@
 # 0: symbol or type
 compiler.misc.not.an.intf.component=\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u30FB\u30BF\u30A4\u30D7{0}\u306F\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u3067\u306F\u3042\u308A\u307E\u305B\u3093
 
-# 0: symbol kind, 1: message segment
+# 0: kind name, 1: message segment
 compiler.err.invalid.mref={0}\u53C2\u7167\u304C\u7121\u52B9\u3067\u3059\n{1}
 
 # 0: symbol kind, 1: message segment
@@ -231,10 +240,12 @@
 
 compiler.err.cant.extend.intf.annotation=@interfaces\u3067\u306F''extends''\u306F\u8A31\u53EF\u3055\u308C\u307E\u305B\u3093
 
+compiler.err.annotation.decl.not.allowed.here=\u3053\u3053\u3067\u306F\u6CE8\u91C8\u578B\u306E\u5BA3\u8A00\u306F\u8A31\u53EF\u3055\u308C\u307E\u305B\u3093
+
 # 0: symbol
 compiler.err.cant.inherit.from.final=final {0}\u304B\u3089\u306F\u7D99\u627F\u3067\u304D\u307E\u305B\u3093
 
-# 0: symbol
+# 0: symbol or string
 compiler.err.cant.ref.before.ctor.called=\u30B9\u30FC\u30D1\u30FC\u30BF\u30A4\u30D7\u306E\u30B3\u30F3\u30B9\u30C8\u30E9\u30AF\u30BF\u306E\u547C\u51FA\u3057\u524D\u306F{0}\u3092\u53C2\u7167\u3067\u304D\u307E\u305B\u3093
 
 compiler.err.cant.select.static.class.from.param.type=\u30D1\u30E9\u30E1\u30FC\u30BF\u306B\u3055\u308C\u305F\u578B\u304B\u3089static\u30AF\u30E9\u30B9\u3092\u9078\u629E\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093
@@ -244,7 +255,7 @@
 
 compiler.err.catch.without.try=''catch''\u3078\u306E''try''\u304C\u3042\u308A\u307E\u305B\u3093
 
-# 0: symbol kind, 1: symbol
+# 0: kind name, 1: symbol
 compiler.err.clash.with.pkg.of.same.name={0} {1}\u306F\u540C\u540D\u306E\u30D1\u30C3\u30B1\u30FC\u30B8\u3068\u7AF6\u5408\u3057\u307E\u3059
 
 compiler.err.class.not.allowed=\u30AF\u30E9\u30B9\u3001\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u307E\u305F\u306F\u5217\u6319\u578B\u306E\u5BA3\u8A00\u3092\u3053\u3053\u3067\u4F7F\u7528\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093
@@ -253,19 +264,19 @@
 
 compiler.err.cont.outside.loop=continue\u304C\u30EB\u30FC\u30D7\u306E\u5916\u306B\u3042\u308A\u307E\u3059
 
-# 0: symbol
+# 0: symbol or type
 compiler.err.cyclic.inheritance={0}\u3092\u542B\u3080\u7D99\u627F\u304C\u30EB\u30FC\u30D7\u3057\u3066\u3044\u307E\u3059
 
 # 0: symbol
 compiler.err.cyclic.annotation.element=\u8981\u7D20{0}\u306E\u578B\u304C\u30EB\u30FC\u30D7\u3057\u3066\u3044\u307E\u3059
 
-# 0: unused
+# 0: symbol
 compiler.err.call.to.super.not.allowed.in.enum.ctor=\u5217\u6319\u578B\u30B3\u30F3\u30B9\u30C8\u30E9\u30AF\u30BF\u3067\u306F\u3001\u30B9\u30FC\u30D1\u30FC\u30AF\u30E9\u30B9\u306E\u547C\u51FA\u3057\u306F\u3067\u304D\u307E\u305B\u3093
 
 # 0: type
 compiler.err.no.superclass={0}\u306B\u306F\u30B9\u30FC\u30D1\u30FC\u30AF\u30E9\u30B9\u304C\u3042\u308A\u307E\u305B\u3093\u3002
 
-# 0: symbol, 1: type, 2: symbol, 3: type, 4: unused
+# 0: symbol, 1: type, 2: symbol, 3: type, 4: type
 compiler.err.concrete.inheritance.conflict={1}\u306E\u30E1\u30BD\u30C3\u30C9{0}\u3068{3}\u306E{2}\u306F\u540C\u3058\u30B7\u30B0\u30CB\u30C1\u30E3\u304B\u3089\u7D99\u627F\u3055\u308C\u3066\u3044\u307E\u3059
 
 compiler.err.default.allowed.in.intf.annotation.member=\u30C7\u30D5\u30A9\u30EB\u30C8\u5024\u306F\u6CE8\u91C8\u578B\u306E\u5BA3\u8A00\u3067\u306E\u307F\u4F7F\u7528\u3067\u304D\u307E\u3059
@@ -279,10 +290,10 @@
 # 0: name, 1: type
 compiler.err.duplicate.annotation.member.value=\u6CE8\u91C8@{1}\u306B\u91CD\u8907\u3057\u305F\u8981\u7D20''{0}''\u304C\u3042\u308A\u307E\u3059\u3002
 
-# 0: name, 1: unused
+# 0: type
 compiler.err.duplicate.annotation.missing.container={0}\u306F\u7E70\u8FD4\u3057\u53EF\u80FD\u306A\u6CE8\u91C8\u578B\u3067\u306F\u3042\u308A\u307E\u305B\u3093
 
-# 0: type, 1: unused
+# 0: symbol
 compiler.err.invalid.repeatable.annotation=\u6CE8\u91C8\u304C\u91CD\u8907\u3057\u3066\u3044\u307E\u3059: {0}\u306F\u7121\u52B9\u306A@Repeatable\u6CE8\u91C8\u3067\u6CE8\u91C8\u4ED8\u3051\u3055\u308C\u3066\u3044\u307E\u3059
 
 # 0: symbol or type
@@ -294,13 +305,13 @@
 # 0: type
 compiler.err.invalid.repeatable.annotation.invalid.value={0}\u306F\u6709\u52B9\u306A@Repeatable\u3067\u306F\u3042\u308A\u307E\u305B\u3093: \u5024\u8981\u7D20\u304C\u7121\u52B9\u3067\u3059
 
-# 0: symbol or type, 1: unused, 2: type
+# 0: symbol or type, 1: type, 2: type
 compiler.err.invalid.repeatable.annotation.value.return=\u5305\u542B\u3059\u308B\u6CE8\u91C8\u578B({0})\u306F\u578B{2}\u306E\u8981\u7D20''value''\u3092\u5BA3\u8A00\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059
 
 # 0: symbol or type, 1: symbol
 compiler.err.invalid.repeatable.annotation.elem.nondefault=\u5305\u542B\u3059\u308B\u6CE8\u91C8\u578B{0}\u306B\u306F\u8981\u7D20{1}\u306E\u30C7\u30D5\u30A9\u30EB\u30C8\u5024\u304C\u6307\u5B9A\u3055\u308C\u3066\u3044\u307E\u305B\u3093
 
-# 0: symbol, 1: unused, 2: symbol, 3: unused
+# 0: symbol, 1: string, 2: symbol, 3: string
 compiler.err.invalid.repeatable.annotation.retention=\u5305\u542B\u3059\u308B\u6CE8\u91C8\u578B({0})\u306E\u4FDD\u6709\u304C\u3001\u7E70\u8FD4\u3057\u53EF\u80FD\u306A\u6CE8\u91C8\u578B({2})\u306E\u4FDD\u6709\u3088\u308A\u77ED\u304F\u306A\u3063\u3066\u3044\u307E\u3059
 
 # 0: symbol, 1: symbol
@@ -390,7 +401,7 @@
 # 0: string, 1: string
 compiler.err.illegal.char.for.encoding=\u3053\u306E\u6587\u5B57(0x{0})\u306F\u3001\u30A8\u30F3\u30B3\u30FC\u30C7\u30A3\u30F3\u30B0{1}\u306B\u30DE\u30C3\u30D7\u3067\u304D\u307E\u305B\u3093
 
-# 0: set of modifier, 1: set of modifier
+# 0: set of flag, 1: set of flag
 compiler.err.illegal.combination.of.modifiers=\u4FEE\u98FE\u5B50{0}\u3068{1}\u306E\u7D44\u5408\u305B\u306F\u4E0D\u6B63\u3067\u3059
 
 compiler.err.illegal.enum.static.ref=\u521D\u671F\u5316\u5B50\u304B\u3089static\u30D5\u30A3\u30FC\u30EB\u30C9\u3078\u306E\u53C2\u7167\u304C\u4E0D\u6B63\u3067\u3059
@@ -399,7 +410,7 @@
 
 compiler.err.illegal.forward.ref=\u524D\u65B9\u53C2\u7167\u304C\u4E0D\u6B63\u3067\u3059
 
-# 0: symbol, 1: string
+# 0: symbol, 1: object
 compiler.err.not.in.profile={0}\u306F\u30D7\u30ED\u30D5\u30A1\u30A4\u30EB''{1}''\u3067\u4F7F\u7528\u3067\u304D\u307E\u305B\u3093
 
 # 0: symbol
@@ -432,6 +443,8 @@
 
 compiler.err.illegal.start.of.type=\u578B\u306E\u958B\u59CB\u304C\u4E0D\u6B63\u3067\u3059
 
+compiler.err.illegal.parenthesized.expression=\u30AB\u30C3\u30B3\u5185\u306E\u5F0F\u304C\u4E0D\u6B63\u3067\u3059
+
 compiler.err.illegal.unicode.esc=Unicode\u30A8\u30B9\u30B1\u30FC\u30D7\u304C\u4E0D\u6B63\u3067\u3059
 
 # 0: symbol
@@ -461,8 +474,7 @@
 
 compiler.err.intf.meth.cant.have.body=\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u62BD\u8C61\u30E1\u30BD\u30C3\u30C9\u304C\u672C\u4F53\u3092\u6301\u3064\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093
 
-# 0: symbol
-compiler.err.invalid.annotation.member.type=\u6CE8\u91C8\u578B\u306E\u8981\u7D20{0}\u306E\u578B\u304C\u7121\u52B9\u3067\u3059
+compiler.err.invalid.annotation.member.type=\u6CE8\u91C8\u578B\u8981\u7D20\u306E\u578B\u304C\u7121\u52B9\u3067\u3059
 
 compiler.err.invalid.binary.number=2\u9032\u6570\u5B57\u306F\u5C11\u306A\u304F\u3068\u30821\u6841\u306E2\u9032\u6570\u3092\u542B\u3080\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059
 
@@ -517,22 +529,25 @@
 
 compiler.err.limit.string=\u5B9A\u6570\u6587\u5B57\u5217\u304C\u9577\u3059\u304E\u307E\u3059
 
+# 0: string
 compiler.err.limit.string.overflow=\u6587\u5B57\u5217"{0}..."\u306EUTF8\u8868\u73FE\u304C\u3001\u5B9A\u6570\u30D7\u30FC\u30EB\u306B\u5BFE\u3057\u3066\u9577\u3059\u304E\u307E\u3059
 
 compiler.err.malformed.fp.lit=\u6D6E\u52D5\u5C0F\u6570\u70B9\u30EA\u30C6\u30E9\u30EB\u304C\u4E0D\u6B63\u3067\u3059
 
 compiler.err.method.does.not.override.superclass=\u30E1\u30BD\u30C3\u30C9\u306F\u30B9\u30FC\u30D1\u30FC\u30BF\u30A4\u30D7\u306E\u30E1\u30BD\u30C3\u30C9\u3092\u30AA\u30FC\u30D0\u30FC\u30E9\u30A4\u30C9\u307E\u305F\u306F\u5B9F\u88C5\u3057\u307E\u305B\u3093
 
+compiler.err.static.methods.cannot.be.annotated.with.override=static\u30E1\u30BD\u30C3\u30C9\u306F@Override\u3067\u6CE8\u91C8\u4ED8\u3051\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093
+
 compiler.err.missing.meth.body.or.decl.abstract=\u30E1\u30BD\u30C3\u30C9\u672C\u4F53\u304C\u306A\u3044\u304B\u3001abstract\u3068\u3057\u3066\u5BA3\u8A00\u3055\u308C\u3066\u3044\u307E\u3059
 
 compiler.err.missing.ret.stmt=return\u6587\u304C\u6307\u5B9A\u3055\u308C\u3066\u3044\u307E\u305B\u3093
 
-# 0: unused
+# 0: type
 compiler.misc.missing.ret.val=\u623B\u308A\u5024\u304C\u3042\u308A\u307E\u305B\u3093
 
 compiler.misc.unexpected.ret.val=\u4E88\u671F\u3057\u306A\u3044\u623B\u308A\u5024
 
-# 0: set of modifier
+# 0: set of flag
 compiler.err.mod.not.allowed.here=\u4FEE\u98FE\u5B50{0}\u3092\u3053\u3053\u3067\u4F7F\u7528\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093
 
 compiler.err.intf.not.allowed.here=\u3053\u3053\u3067\u306F\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u306F\u8A31\u53EF\u3055\u308C\u307E\u305B\u3093
@@ -542,11 +557,11 @@
 # 0: symbol, 1: symbol
 compiler.err.name.clash.same.erasure=\u540D\u524D\u304C\u7AF6\u5408\u3057\u3066\u3044\u307E\u3059\u3002{0}\u3068{1}\u306F\u524A\u9664\u5F8C\u306E\u540D\u524D\u304C\u540C\u3058\u3067\u3059
 
-# 0: symbol, 1: symbol, 2: symbol, 3: symbol, 4: unused, 5: unused
-compiler.err.name.clash.same.erasure.no.override=\u540D\u524D\u304C\u7AF6\u5408\u3057\u3066\u3044\u307E\u3059\u3002{1}\u306E{0}\u3068{3}\u306E{2}\u306F\u307E\u3060\u4ED6\u65B9\u3092\u30AA\u30FC\u30D0\u30FC\u30E9\u30A4\u30C9\u3057\u3066\u3044\u307E\u305B\u3093\u304C\u3001\u524A\u9664\u5F8C\u306E\u540D\u524D\u304C\u540C\u3058\u3067\u3059
-
-# 0: symbol, 1: symbol, 2: symbol, 3: symbol, 4: symbol, 5: symbol
-compiler.err.name.clash.same.erasure.no.override.1=\u540D\u524D\u304C\u7AF6\u5408\u3057\u3066\u3044\u307E\u3059\u3002{1}\u306E{0}\u306E\u3069\u3061\u3089\u3082\u3001\u4ED6\u65B9\u306E\u6700\u521D\u306E\u30E1\u30BD\u30C3\u30C9\u3092\u307E\u3060\u30AA\u30FC\u30D0\u30FC\u30E9\u30A4\u30C9\u3057\u3066\u3044\u307E\u305B\u3093\u304C\u3001\u524A\u9664\u5F8C\u306E\u540D\u524D\u304C\u5225\u306E\u30E1\u30BD\u30C3\u30C9\u3068\u540C\u3058\u30E1\u30BD\u30C3\u30C9\u3092\n\u30AA\u30FC\u30D0\u30FC\u30E9\u30A4\u30C9\u3057\u307E\u3059\u3002\u6700\u521D\u306E\u30E1\u30BD\u30C3\u30C9: {3}\u306E{2}\n2\u756A\u76EE\u306E\u30E1\u30BD\u30C3\u30C9: {5}\u306E{4}
+# 0: name, 1: list of type, 2: symbol, 3: name, 4: list of type, 5: symbol
+compiler.err.name.clash.same.erasure.no.override=\u540D\u524D\u304C\u7AF6\u5408\u3057\u3066\u3044\u307E\u3059\u3002{2}\u306E{0}({1})\u3068{5}\u306E{3}({4})\u306F\u307E\u3060\u4ED6\u65B9\u3092\u30AA\u30FC\u30D0\u30FC\u30E9\u30A4\u30C9\u3057\u3066\u3044\u307E\u305B\u3093\u304C\u3001\u524A\u9664\u5F8C\u306E\u540D\u524D\u304C\u540C\u3058\u3067\u3059
+
+# 0: string, 1: name, 2: name, 3: list of type, 4: symbol, 5: name, 6: list of type, 7: symbol
+compiler.err.name.clash.same.erasure.no.override.1=\u540D\u524D\u304C\u7AF6\u5408\u3057\u3066\u3044\u307E\u3059\u3002{0} {1}\u306F\u307E\u3060\u4ED6\u65B9\u3092\u30AA\u30FC\u30D0\u30FC\u30E9\u30A4\u30C9\u3057\u3066\u3044\u307E\u305B\u3093\u304C\u3001\u524A\u9664\u5F8C\u306E\u540D\u524D\u304C\u540C\u30582\u3064\u306E\u30E1\u30BD\u30C3\u30C9\u304C\u3042\u308A\u307E\u3059\n\u6700\u521D\u306E\u30E1\u30BD\u30C3\u30C9:  {4}\u306E{2}({3})\n2\u756A\u76EE\u306E\u30E1\u30BD\u30C3\u30C9: {7}\u306E{5}({6})
 
 # 0: symbol, 1: symbol, 2: symbol, 3: symbol
 compiler.err.name.clash.same.erasure.no.hide=\u540D\u524D\u304C\u7AF6\u5408\u3057\u3066\u3044\u307E\u3059\u3002{1}\u306E{0}\u3068{3}\u306E{2}\u306F\u307E\u3060\u4ED6\u65B9\u3092\u975E\u8868\u793A\u306B\u3057\u3066\u3044\u307E\u305B\u3093\u304C\u3001\u524A\u9664\u5F8C\u306E\u540D\u524D\u304C\u540C\u3058\u3067\u3059
@@ -564,18 +579,18 @@
 
 compiler.misc.conditional.target.cant.be.void=\u6761\u4EF6\u5F0F\u306E\u30BF\u30FC\u30B2\u30C3\u30C8\u578B\u306Fvoid\u306B\u3067\u304D\u307E\u305B\u3093
 
-# 0: type
+# 0: message segment
 compiler.misc.incompatible.ret.type.in.lambda=\u30E9\u30E0\u30C0\u5F0F\u306E\u623B\u308A\u578B\u304C\u4E0D\u6B63\u3067\u3059\n{0}
 
 compiler.misc.stat.expr.expected=\u30E9\u30E0\u30C0\u30FB\u30DC\u30C7\u30A3\u304Cvoid\u6A5F\u80FD\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u3068\u4E92\u63DB\u6027\u304C\u3042\u308A\u307E\u305B\u3093\n(\u30D6\u30ED\u30C3\u30AF\u306E\u30E9\u30E0\u30C0\u30FB\u30DC\u30C7\u30A3\u306E\u4F7F\u7528\u3092\u691C\u8A0E\u3059\u308B\u304B\u3001\u304B\u308F\u308A\u306B\u6587\u306E\u5F0F\u3092\u4F7F\u7528\u3057\u3066\u304F\u3060\u3055\u3044)
 
-# 0: type
+# 0: message segment
 compiler.misc.incompatible.ret.type.in.mref=\u30E1\u30BD\u30C3\u30C9\u53C2\u7167\u306E\u623B\u308A\u578B\u304C\u4E0D\u6B63\u3067\u3059\n{0}
 
 compiler.err.lambda.body.neither.value.nor.void.compatible=\u30E9\u30E0\u30C0\u30FB\u30DC\u30C7\u30A3\u306F\u5024\u4E92\u63DB\u3067\u3082void\u4E92\u63DB\u3067\u3082\u3042\u308A\u307E\u305B\u3093
 
 # 0: list of type
-compiler.err.incompatible.thrown.types.in.mref=\u30E1\u30BD\u30C3\u30C9\u53C2\u7167\u306E\u30B9\u30ED\u30FC\u3055\u308C\u305F\u30BF\u30A4\u30D7{0}\u306F\u4E0D\u9069\u5408\u3067\u3059
+compiler.err.incompatible.thrown.types.in.mref=\u6A5F\u80FD\u5F0F\u3067\u30B9\u30ED\u30FC\u3055\u308C\u305F\u30BF\u30A4\u30D7{0}\u306F\u4E0D\u9069\u5408\u3067\u3059
 
 compiler.misc.incompatible.arg.types.in.lambda=\u30E9\u30E0\u30C0\u5F0F\u306E\u30D1\u30E9\u30E1\u30FC\u30BF\u578B\u306F\u4E0D\u9069\u5408\u3067\u3059
 
@@ -583,14 +598,17 @@
 
 compiler.err.new.not.allowed.in.annotation=''new''\u306F\u6CE8\u91C8\u306B\u4F7F\u7528\u3067\u304D\u307E\u305B\u3093
 
+# 0: name, 1: type
 compiler.err.no.annotation.member={1}\u306E\u6CE8\u91C8\u30E1\u30F3\u30D0\u30FC{0}\u304C\u3042\u308A\u307E\u305B\u3093
 
+# 0: symbol
 compiler.err.no.encl.instance.of.type.in.scope=\u578B{0}\u306E\u5185\u90E8\u30AF\u30E9\u30B9\u3092\u56F2\u3080\u30A4\u30F3\u30B9\u30BF\u30F3\u30B9\u304C\u30B9\u30B3\u30FC\u30D7\u5185\u306B\u3042\u308A\u307E\u305B\u3093
 
 compiler.err.no.intf.expected.here=\u3053\u3053\u306B\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u306F\u5FC5\u8981\u3042\u308A\u307E\u305B\u3093
 
 compiler.err.no.match.entry={0}\u306F{1}\u306E\u30A8\u30F3\u30C8\u30EA\u306B\u9069\u5408\u3057\u307E\u305B\u3093\u3002{2}\u304C\u5FC5\u8981\u3067\u3059
 
+# 0: type
 compiler.err.not.annotation.type={0}\u306F\u6CE8\u91C8\u578B\u3067\u306F\u3042\u308A\u307E\u305B\u3093
 
 # 0: symbol, 1: symbol, 2: message segment
@@ -691,10 +709,10 @@
 
 # Errors related to annotation processing
 
-# 0: symbol, 1: string, 2: string (stack-trace)
+# 0: symbol, 1: message segment, 2: string (stack-trace)
 compiler.err.proc.cant.access={0}\u306B\u30A2\u30AF\u30BB\u30B9\u3067\u304D\u307E\u305B\u3093\n{1}\n\u8A73\u7D30\u306F\u6B21\u306E\u30B9\u30BF\u30C3\u30AF\u30C8\u30EC\u30FC\u30B9\u3067\u8ABF\u67FB\u3057\u3066\u304F\u3060\u3055\u3044\u3002\n{2}
 
-# 0: symbol, 1: string
+# 0: symbol, 1: message segment
 compiler.err.proc.cant.access.1={0}\u306B\u30A2\u30AF\u30BB\u30B9\u3067\u304D\u307E\u305B\u3093\n{1}
 
 # 0: string
@@ -704,11 +722,17 @@
 # 0: string
 compiler.err.proc.messager={0}
 
-# 0: list of string
+# 0: string
+compiler.misc.exception.message={0}
+
+compiler.misc.user.selected.completion.failure=\u30AF\u30E9\u30B9\u540D\u306B\u3088\u308B\u30E6\u30FC\u30B6\u30FC\u9078\u629E\u306E\u5B8C\u4E86\u306B\u5931\u6557\u3057\u307E\u3057\u305F
+
+# 0: collection of string
 compiler.err.proc.no.explicit.annotation.processing.requested=\u30AF\u30E9\u30B9\u540D''{0}''\u304C\u53D7\u3051\u5165\u308C\u3089\u308C\u308B\u306E\u306F\u3001\u6CE8\u91C8\u51E6\u7406\u304C\u660E\u793A\u7684\u306B\u30EA\u30AF\u30A8\u30B9\u30C8\u3055\u308C\u305F\u5834\u5408\u306E\u307F\u3067\u3059
 
 compiler.err.proc.no.service=\u30B5\u30FC\u30D3\u30B9\u30FB\u30ED\u30FC\u30C0\u30FC\u304C\u4F7F\u7528\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F\u304C\u3001\u6CE8\u91C8\u51E6\u7406\u306B\u5FC5\u8981\u3067\u3059\u3002
 
+# 0: string, 1: string
 compiler.err.proc.processor.bad.option.name=\u30D7\u30ED\u30BB\u30C3\u30B5''{1}''\u306B\u3088\u3063\u3066\u6307\u5B9A\u3055\u308C\u305F\u30AA\u30D7\u30B7\u30E7\u30F3\u540D''{0}''\u304C\u4E0D\u6B63\u3067\u3059
 
 # 0: string
@@ -722,11 +746,12 @@
 
 compiler.err.proc.service.problem=\u30D7\u30ED\u30BB\u30C3\u30B5\u3092\u30ED\u30FC\u30C9\u3059\u308B\u305F\u3081\u306E\u30B5\u30FC\u30D3\u30B9\u30FB\u30ED\u30FC\u30C0\u30FC\u3092\u4F5C\u6210\u4E2D\u306B\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F\u3002
 
+# 0: string
 compiler.err.proc.bad.config.file=\u30B5\u30FC\u30D3\u30B9\u69CB\u6210\u30D5\u30A1\u30A4\u30EB\u304C\u4E0D\u6B63\u3067\u3042\u308B\u304B\u3001\u30D7\u30ED\u30BB\u30C3\u30B5\u30FB\u30AA\u30D6\u30B8\u30A7\u30AF\u30C8\u306E\u69CB\u7BC9\u4E2D\u306B\u4F8B\u5916\u304C\u30B9\u30ED\u30FC\u3055\u308C\u307E\u3057\u305F: {0}
 
 compiler.err.proc.cant.create.loader=\u6CE8\u91C8\u30D7\u30ED\u30BB\u30C3\u30B5\u306E\u30AF\u30E9\u30B9\u30FB\u30ED\u30FC\u30C0\u30FC\u3092\u4F5C\u6210\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F: {0}
 
-# 0: unused
+# 0: symbol
 compiler.err.qualified.new.of.static.class=static\u30AF\u30E9\u30B9\u306Enew\u304C\u4FEE\u98FE\u3055\u308C\u3066\u3044\u307E\u3059
 
 compiler.err.recursive.ctor.invocation=\u30B3\u30F3\u30B9\u30C8\u30E9\u30AF\u30BF\u306E\u547C\u51FA\u3057\u304C\u518D\u5E30\u7684\u3067\u3059
@@ -761,8 +786,10 @@
 # 0: symbol, 1: symbol, 2: symbol
 compiler.err.does.not.override.abstract={0}\u306Fabstract\u3067\u306A\u304F\u3001{2}\u5185\u306Eabstract\u30E1\u30BD\u30C3\u30C9{1}\u3092\u30AA\u30FC\u30D0\u30FC\u30E9\u30A4\u30C9\u3057\u307E\u305B\u3093
 
+# 0: file object
 compiler.err.source.cant.overwrite.input.file=\u30BD\u30FC\u30B9\u306E\u66F8\u8FBC\u307F\u30A8\u30E9\u30FC\u3067\u3059\u3002\u5165\u529B\u30D5\u30A1\u30A4\u30EB{0}\u3092\u4E0A\u66F8\u304D\u3067\u304D\u307E\u305B\u3093
 
+# 0: symbol
 compiler.err.stack.sim.error=\u5185\u90E8\u30A8\u30E9\u30FC: {0}\u3067\u306E\u30B9\u30BF\u30C3\u30AF\u30FB\u30B7\u30DF\u30E5\u30EC\u30FC\u30B7\u30E7\u30F3\u30FB\u30A8\u30E9\u30FC
 
 compiler.err.static.imp.only.classes.and.interfaces=static import\u306F\u30AF\u30E9\u30B9\u3068\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u304B\u3089\u306E\u307F\u3068\u306A\u308A\u307E\u3059
@@ -804,7 +831,7 @@
 # 0: type
 compiler.err.illegal.static.intf.meth.call=static\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u30FB\u30E1\u30BD\u30C3\u30C9\u30FB\u30B3\u30FC\u30EB\u304C\u4E0D\u6B63\u3067\u3059\n\u53D7\u4FE1\u5F0F\u306F\u578B\u4FEE\u98FE\u5B50''{0}''\u3067\u7F6E\u63DB\u3055\u308C\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059
 
-# 0: type, 1: message segment
+# 0: symbol or type, 1: message segment
 compiler.err.illegal.default.super.call=\u30C7\u30D5\u30A9\u30EB\u30C8\u306E\u30B9\u30FC\u30D1\u30FC\u30FB\u30B3\u30FC\u30EB\u306E\u578B\u4FEE\u98FE\u5B50{0}\u304C\u4E0D\u6B63\u3067\u3059\n{1}
 
 # 0: symbol, 1: type
@@ -819,7 +846,7 @@
 
 compiler.err.unclosed.str.lit=\u6587\u5B57\u5217\u30EA\u30C6\u30E9\u30EB\u304C\u9589\u3058\u3089\u308C\u3066\u3044\u307E\u305B\u3093
 
-# 0: name
+# 0: string
 compiler.err.unsupported.encoding=\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u306A\u3044\u30A8\u30F3\u30B3\u30FC\u30C7\u30A3\u30F3\u30B0\u3067\u3059: {0}
 
 compiler.err.io.exception=\u30BD\u30FC\u30B9\u30FB\u30D5\u30A1\u30A4\u30EB\u306E\u8AAD\u53D6\u308A\u30A8\u30E9\u30FC\u3067\u3059: {0}
@@ -827,6 +854,35 @@
 # 0: name
 compiler.err.undef.label=\u30E9\u30D9\u30EB{0}\u306F\u672A\u5B9A\u7FA9\u3067\u3059
 
+# 0: name (type)
+compiler.err.illegal.ref.to.var.type=\u5236\u9650\u3055\u308C\u305F\u578B''{0}''\u3078\u306E\u7121\u52B9\u306A\u53C2\u7167\u3067\u3059
+
+# 0: token
+compiler.err.var.not.allowed=\u3053\u3053\u3067\u306F''{0}''\u306F\u8A31\u53EF\u3055\u308C\u307E\u305B\u3093\n\u30EA\u30EA\u30FC\u30B910\u304B\u3089''{0}''\u306F\u5236\u9650\u3055\u308C\u305F\u30ED\u30FC\u30AB\u30EB\u5909\u6570\u578B\u3067\u3042\u308A\u3001\u578B\u306E\u5BA3\u8A00\u306B\u4F7F\u7528\u3067\u304D\u307E\u305B\u3093
+
+# 0: name (variable), 1: message segment
+compiler.err.cant.infer.local.var.type=\u30ED\u30FC\u30AB\u30EB\u5909\u6570{0}\u306E\u578B\u3092\u63A8\u8AD6\u3067\u304D\u307E\u305B\u3093\n({1})
+
+compiler.err.var.not.allowed.here=\u3053\u3053\u3067\u306F''var''\u306F\u8A31\u53EF\u3055\u308C\u307E\u305B\u3093
+
+compiler.err.var.not.allowed.array=''var''\u306F\u914D\u5217\u306E\u8981\u7D20\u30BF\u30A4\u30D7\u3068\u3057\u3066\u8A31\u53EF\u3055\u308C\u307E\u305B\u3093
+
+compiler.err.var.not.allowed.compound=''var''\u306F\u8907\u5408\u5BA3\u8A00\u3067\u8A31\u53EF\u3055\u308C\u307E\u305B\u3093
+
+compiler.misc.local.cant.infer.null=\u5909\u6570\u521D\u671F\u5316\u5B50\u306F''null''\u3067\u3059
+
+compiler.misc.local.cant.infer.void=\u5909\u6570\u521D\u671F\u5316\u5B50\u306F''void''\u3067\u3059
+
+compiler.misc.local.missing.init=\u521D\u671F\u5316\u5B50\u306A\u3057\u3067\u5909\u6570\u306B''var''\u3092\u4F7F\u7528\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093
+
+compiler.misc.local.lambda.missing.target=\u30E9\u30E0\u30C0\u5F0F\u306B\u306F\u660E\u793A\u7684\u306A\u30BF\u30FC\u30B2\u30C3\u30C8\u578B\u304C\u5FC5\u8981\u3067\u3059
+
+compiler.misc.local.mref.missing.target=\u30E1\u30BD\u30C3\u30C9\u53C2\u7167\u306B\u306F\u660E\u793A\u7684\u306A\u30BF\u30FC\u30B2\u30C3\u30C8\u578B\u304C\u5FC5\u8981\u3067\u3059
+
+compiler.misc.local.array.missing.target=\u914D\u5217\u521D\u671F\u5316\u5B50\u306B\u306F\u660E\u793A\u7684\u306A\u30BF\u30FC\u30B2\u30C3\u30C8\u578B\u304C\u5FC5\u8981\u3067\u3059
+
+compiler.misc.local.self.ref=\u81EA\u5DF1\u53C2\u7167\u5909\u6570\u306B''var''\u3092\u4F7F\u7528\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093
+
 # 0: message segment, 1: unused
 compiler.err.cant.apply.diamond={0}\u306E\u578B\u5F15\u6570\u3092\u63A8\u5B9A\u3067\u304D\u307E\u305B\u3093
 
@@ -944,10 +1000,13 @@
 
 compiler.misc.fatal.err.no.java.lang=\u81F4\u547D\u7684\u30A8\u30E9\u30FC: \u30AF\u30E9\u30B9\u30D1\u30B9\u307E\u305F\u306F\u30D6\u30FC\u30C8\u30FB\u30AF\u30E9\u30B9\u30D1\u30B9\u3067\u30D1\u30C3\u30B1\u30FC\u30B8java.lang\u3092\u691C\u51FA\u3067\u304D\u307E\u305B\u3093
 
+# 0: name
 compiler.misc.fatal.err.cant.locate.meth=\u81F4\u547D\u7684\u30A8\u30E9\u30FC: \u30E1\u30BD\u30C3\u30C9{0}\u3092\u691C\u51FA\u3067\u304D\u307E\u305B\u3093
 
+# 0: name
 compiler.misc.fatal.err.cant.locate.field=\u81F4\u547D\u7684\u30A8\u30E9\u30FC: \u30D5\u30A3\u30FC\u30EB\u30C9{0}\u3092\u691C\u51FA\u3067\u304D\u307E\u305B\u3093
 
+# 0: type
 compiler.misc.fatal.err.cant.locate.ctor=\u81F4\u547D\u7684\u30A8\u30E9\u30FC: {0}\u306E\u30B3\u30F3\u30B9\u30C8\u30E9\u30AF\u30BF\u3092\u691C\u51FA\u3067\u304D\u307E\u305B\u3093
 
 compiler.misc.fatal.err.cant.close=\u81F4\u547D\u7684\u30A8\u30E9\u30FC: \u30B3\u30F3\u30D1\u30A4\u30E9\u30FB\u30EA\u30BD\u30FC\u30B9\u3092\u9589\u3058\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u305B\u3093
@@ -1102,7 +1161,7 @@
 # 0: symbol
 compiler.warn.constant.SVUID=serialVersionUID\u306F\u30AF\u30E9\u30B9{0}\u306E\u5B9A\u6570\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059
 
-# 0: file name
+# 0: path
 compiler.warn.dir.path.element.not.found=\u4E0D\u6B63\u306A\u30D1\u30B9\u8981\u7D20"{0}": \u305D\u306E\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306F\u5B58\u5728\u3057\u307E\u305B\u3093
 
 # 0: file name
@@ -1160,12 +1219,13 @@
 # 0: message segment
 compiler.warn.override.varargs.extra={0}\u3002\u30AA\u30FC\u30D0\u30FC\u30E9\u30A4\u30C9\u3057\u3066\u3044\u308B\u30E1\u30BD\u30C3\u30C9\u306B\u306F''...''\u304C\u3042\u308A\u307E\u305B\u3093
 
+# 0: message segment
 compiler.warn.override.bridge={0}\u3002\u30AA\u30FC\u30D0\u30FC\u30E9\u30A4\u30C9\u3055\u308C\u305F\u30E1\u30BD\u30C3\u30C9\u306F\u30D6\u30EA\u30C3\u30B8\u30FB\u30E1\u30BD\u30C3\u30C9\u3067\u3059
 
 # 0: symbol
 compiler.warn.pkg-info.already.seen=package-info.java\u30D5\u30A1\u30A4\u30EB\u304C\u3059\u3067\u306B\u30D1\u30C3\u30B1\u30FC\u30B8{0}\u7528\u306B\u8868\u793A\u3055\u308C\u3066\u3044\u307E\u3059
 
-# 0: file name
+# 0: path
 compiler.warn.path.element.not.found=\u4E0D\u6B63\u306A\u30D1\u30B9\u8981\u7D20"{0}": \u305D\u306E\u30D5\u30A1\u30A4\u30EB\u307E\u305F\u306F\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306F\u3042\u308A\u307E\u305B\u3093
 
 compiler.warn.possible.fall-through.into.case=case\u306Bfall-through\u3059\u308B\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059
@@ -1210,13 +1270,13 @@
 # 0: string
 compiler.warn.proc.package.does.not.exist=\u30D1\u30C3\u30B1\u30FC\u30B8{0}\u306F\u5B58\u5728\u3057\u307E\u305B\u3093
 
-# 0: name
+# 0: string
 compiler.warn.proc.file.reopening=''{0}''\u7528\u306E\u30D5\u30A1\u30A4\u30EB\u3092\u8907\u6570\u56DE\u4F5C\u6210\u3057\u3088\u3046\u3068\u3057\u3066\u3044\u307E\u3059
 
 # 0: name
 compiler.warn.proc.type.already.exists=\u30BF\u30A4\u30D7''{0}''\u306E\u30D5\u30A1\u30A4\u30EB\u306F\u3059\u3067\u306B\u30BD\u30FC\u30B9\u30FB\u30D1\u30B9\u307E\u305F\u306F\u30AF\u30E9\u30B9\u30D1\u30B9\u306B\u5B58\u5728\u3057\u307E\u3059
 
-# 0: name
+# 0: string
 compiler.warn.proc.type.recreate=\u30BF\u30A4\u30D7''{0}''\u306E\u30D5\u30A1\u30A4\u30EB\u3092\u8907\u6570\u56DE\u4F5C\u6210\u3057\u3088\u3046\u3068\u3057\u3066\u3044\u307E\u3059
 
 # 0: string
@@ -1225,7 +1285,7 @@
 # 0: string, 1: string
 compiler.warn.proc.suspicious.class.name=\u540D\u524D\u304C{1}\u3067\u7D42\u308F\u308B\u578B\u306E\u30D5\u30A1\u30A4\u30EB\u3092\u4F5C\u6210\u3057\u3066\u3044\u307E\u3059: ''{0}''
 
-# 0: name
+# 0: string
 compiler.warn.proc.file.create.last.round=\u6700\u5F8C\u306B\u4F5C\u6210\u3055\u308C\u305F\u30BF\u30A4\u30D7''{0}''\u306E\u30D5\u30A1\u30A4\u30EB\u306F\u6CE8\u91C8\u51E6\u7406\u306B\u6E21\u3055\u308C\u307E\u305B\u3093\u3002
 
 # 0: string, 1: string
@@ -1247,7 +1307,7 @@
 # 0: string
 compiler.warn.proc.messager={0}
 
-# 0: set of name
+# 0: set of string
 compiler.warn.proc.unclosed.type.files=\u30BF\u30A4\u30D7''{0}''\u306E\u30D5\u30A1\u30A4\u30EB\u304C\u9589\u3058\u3089\u308C\u3066\u3044\u307E\u305B\u3093\u3002\u3053\u308C\u3089\u306E\u30BF\u30A4\u30D7\u306F\u6CE8\u91C8\u51E6\u7406\u3055\u308C\u307E\u305B\u3093
 
 # 0: string
@@ -1285,13 +1345,16 @@
 
 compiler.warn.missing.deprecated.annotation=\u63A8\u5968\u3055\u308C\u306A\u3044\u9805\u76EE\u306F@Deprecated\u3067\u6CE8\u91C8\u304C\u4ED8\u3051\u3089\u308C\u3066\u3044\u307E\u305B\u3093
 
-# 0: symbol kind
+# 0: kind name
 compiler.warn.deprecated.annotation.has.no.effect=@Deprecated\u6CE8\u91C8\u306F\u3001\u3053\u306E{0}\u5BA3\u8A00\u306B\u306F\u5F71\u97FF\u3057\u307E\u305B\u3093
 
+# 0: string
 compiler.warn.invalid.path=\u30D5\u30A1\u30A4\u30EB\u540D\u304C\u7121\u52B9\u3067\u3059: {0}
 
+# 0: path
 compiler.warn.invalid.archive.file=\u30D1\u30B9\u4E0A\u306E\u4E88\u671F\u3057\u306A\u3044\u30D5\u30A1\u30A4\u30EB: {0}
 
+# 0: path
 compiler.warn.unexpected.archive.file=\u30A2\u30FC\u30AB\u30A4\u30D6\u30FB\u30D5\u30A1\u30A4\u30EB\u306E\u4E88\u671F\u3057\u306A\u3044\u62E1\u5F35\u5B50: {0}
 
 # 0: path
@@ -1301,22 +1364,25 @@
 
 compiler.warn.empty.if=if\u4EE5\u964D\u304C\u7A7A\u306E\u6587\u3067\u3059
 
+# 0: type, 1: name
 compiler.warn.annotation.method.not.found=\u30BF\u30A4\u30D7''{0}''\u5185\u306B\u6CE8\u91C8\u30E1\u30BD\u30C3\u30C9''{1}()''\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093
 
+# 0: type, 1: name, 2: message segment
 compiler.warn.annotation.method.not.found.reason=\u30BF\u30A4\u30D7''{0}''\u5185\u306B\u6CE8\u91C8\u30E1\u30BD\u30C3\u30C9''{1}()''\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093: {2}
 
-# 0: symbol, 1: name
+# 0: file object, 1: symbol, 2: name
 compiler.warn.unknown.enum.constant=\u4E0D\u660E\u306A\u5217\u6319\u578B\u5B9A\u6570\u3067\u3059{1}.{2}
 
-# 0: symbol, 1: name, 2: message segment
+# 0: file object, 1: symbol, 2: name, 3: message segment
 compiler.warn.unknown.enum.constant.reason=\u4E0D\u660E\u306A\u5217\u6319\u578B\u5B9A\u6570\u3067\u3059{1}.{2}\n\u7406\u7531: {3}
 
 # 0: type, 1: type
 compiler.warn.raw.class.use=raw\u578B\u304C\u898B\u3064\u304B\u308A\u307E\u3057\u305F: {0}\n\u6C4E\u7528\u30AF\u30E9\u30B9{1}\u306E\u578B\u5F15\u6570\u304C\u3042\u308A\u307E\u305B\u3093
 
-# 0: unused, 1: unused
 compiler.warn.diamond.redundant.args=\u65B0\u3057\u3044\u5F0F\u306E\u578B\u5F15\u6570\u304C\u91CD\u8907\u3057\u3066\u3044\u307E\u3059(\u304B\u308F\u308A\u306B\u30C0\u30A4\u30E4\u30E2\u30F3\u30C9\u6F14\u7B97\u5B50\u3092\u4F7F\u7528\u3057\u307E\u3059)\u3002
 
+compiler.warn.local.redundant.type=\u30ED\u30FC\u30AB\u30EB\u5909\u6570\u306E\u578B\u304C\u91CD\u8907\u3057\u3066\u3044\u307E\u3059(\u660E\u793A\u7684\u306A\u578B\u3092''var''\u306B\u7F6E\u304D\u63DB\u3048\u307E\u3059)\u3002
+
 compiler.warn.potential.lambda.found=\u3053\u306E\u533F\u540D\u5185\u90E8\u30AF\u30E9\u30B9\u3092\u30E9\u30E0\u30C0\u5F0F\u306B\u5909\u63DB\u3067\u304D\u307E\u3059\u3002
 
 compiler.warn.method.redundant.typeargs=\u30E1\u30BD\u30C3\u30C9\u547C\u51FA\u3057\u306E\u578B\u5F15\u6570\u304C\u91CD\u8907\u3057\u3066\u3044\u307E\u3059\u3002
@@ -1440,6 +1506,7 @@
 
 compiler.misc.module.info.invalid.super.class=\u7121\u52B9\u306A\u30B9\u30FC\u30D1\u30FC\u30FB\u30AF\u30E9\u30B9\u3092\u542B\u3080module-info
 
+# 0: name
 compiler.misc.class.file.not.found={0}\u306E\u30AF\u30E9\u30B9\u30FB\u30D5\u30A1\u30A4\u30EB\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093
 
 # 0: string (constant value), 1: symbol (constant field), 2: type (field type)
@@ -1460,6 +1527,7 @@
 # 0: name
 compiler.misc.file.doesnt.contain.class=\u30D5\u30A1\u30A4\u30EB\u306B\u30AF\u30E9\u30B9{0}\u304C\u542B\u307E\u308C\u3066\u3044\u307E\u305B\u3093
 
+# 0: symbol
 compiler.misc.file.does.not.contain.package=\u30D5\u30A1\u30A4\u30EB\u306B\u30D1\u30C3\u30B1\u30FC\u30B8{0}\u304C\u542B\u307E\u308C\u3066\u3044\u307E\u305B\u3093
 
 compiler.misc.file.does.not.contain.module=\u30D5\u30A1\u30A4\u30EB\u306B\u30E2\u30B8\u30E5\u30FC\u30EB\u5BA3\u8A00\u304C\u542B\u307E\u308C\u3066\u3044\u307E\u305B\u3093
@@ -1516,12 +1584,12 @@
 # compiler.err.no.elem.type=\
 #     \[\*\] cannot have a type
 
-# 0: type
+# 0: message segment
 compiler.misc.try.not.applicable.to.type=try-with-resource\u306F\u5909\u6570\u578B\u306B\u4F7F\u7528\u3067\u304D\u307E\u305B\u3093\n({0})
 
 #####
 
-# 0: message segment or type, 1: message segment
+# 0: object, 1: message segment
 compiler.err.type.found.req=\u4E88\u671F\u3057\u306A\u3044\u578B\n\u671F\u5F85\u5024: {1}\n\u691C\u51FA\u5024:    {0}
 
 ## The following are all possible strings for the first argument ({0}) of the
@@ -1597,10 +1665,9 @@
 # 0: list of type, 1: message segment
 compiler.misc.diamond.invalid.args={1}\u306B\u3064\u3044\u3066\u63A8\u5B9A\u3055\u308C\u305F\u578B\u5F15\u6570{0}\u306F\u3053\u306E\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u3067\u306F\u8A31\u53EF\u3055\u308C\u307E\u305B\u3093\n\u63A8\u8AD6\u5F15\u6570\u306F\u7F72\u540D\u5C5E\u6027\u306B\u8868\u73FE\u3067\u304D\u307E\u305B\u3093
 
-# 0: unused
+# 0: type
 compiler.misc.diamond.and.explicit.params=\u30B3\u30F3\u30B9\u30C8\u30E9\u30AF\u30BF\u306E\u660E\u793A\u7684\u306A\u578B\u30D1\u30E9\u30E1\u30FC\u30BF\u3067\u306F''<>''\u3092\u4F7F\u7528\u3067\u304D\u307E\u305B\u3093
 
-# 0: unused
 compiler.misc.mref.infer.and.explicit.params=\u30B3\u30F3\u30B9\u30C8\u30E9\u30AF\u30BF\u306E\u660E\u793A\u7684\u306A\u578B\u30D1\u30E9\u30E1\u30FC\u30BF\u3067\u306Fraw\u30B3\u30F3\u30B9\u30C8\u30E9\u30AF\u30BF\u53C2\u7167\u3092\u4F7F\u7528\u3067\u304D\u307E\u305B\u3093
 
 # 0: type, 1: list of type
@@ -1623,7 +1690,7 @@
 compiler.warn.auxiliary.class.accessed.from.outside.of.its.source.file={1}\u306E\u88DC\u52A9\u30AF\u30E9\u30B9{0}\u306B\u30BD\u30FC\u30B9\u30FB\u30D5\u30A1\u30A4\u30EB\u5916\u304B\u3089\u30A2\u30AF\u30BB\u30B9\u3067\u304D\u307E\u305B\u3093
 
 ## The first argument ({0}) is a "kindname".
-# 0: symbol kind, 1: symbol, 2: symbol
+# 0: kind name, 1: symbol, 2: symbol
 compiler.err.abstract.cant.be.accessed.directly=\u62BD\u8C61{0}\u3067\u3042\u308B{1}({2}\u5185)\u306B\u76F4\u63A5\u30A2\u30AF\u30BB\u30B9\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093
 
 ## The first argument ({0}) is a "kindname".
@@ -1641,6 +1708,7 @@
 
 ## Both arguments ({0}, {1}) are "kindname"s.  {0} is a comma-separated list
 ## of kindnames (the list should be identical to that provided in source.
+# 0: set of kind name, 1: set of kind name
 compiler.err.unexpected.type=\u4E88\u671F\u3057\u306A\u3044\u578B\n\u671F\u5F85\u5024: {0}\n\u691C\u51FA\u5024:    {1}
 
 compiler.err.unexpected.lambda=\u3053\u3053\u3067\u306F\u30E9\u30E0\u30C0\u5F0F\u306F\u4E88\u671F\u3055\u308C\u3066\u3044\u307E\u305B\u3093
@@ -1651,32 +1719,32 @@
 ## The second argument {1} is the non-resolved symbol
 ## The third argument {2} is a list of type parameters (non-empty if {1} is a method)
 ## The fourth argument {3} is a list of argument types (non-empty if {1} is a method)
-# 0: symbol kind, 1: name, 2: unused, 3: unused
+# 0: kind name, 1: name, 2: unused, 3: unused
 compiler.err.cant.resolve=\u30B7\u30F3\u30DC\u30EB\u3092\u898B\u3064\u3051\u3089\u308C\u307E\u305B\u3093\n\u30B7\u30F3\u30DC\u30EB: {0} {1}
 
-# 0: symbol kind, 1: name, 2: unused, 3: list of type
+# 0: kind name, 1: name, 2: unused, 3: list of type
 compiler.err.cant.resolve.args=\u30B7\u30F3\u30DC\u30EB\u3092\u898B\u3064\u3051\u3089\u308C\u307E\u305B\u3093\n\u30B7\u30F3\u30DC\u30EB: {0} {1}({3})
 
-# 0: symbol kind, 1: name, 2: list of type, 3: list of type
+# 0: kind name, 1: name, 2: list of type, 3: list of type
 compiler.err.cant.resolve.args.params=\u30B7\u30F3\u30DC\u30EB\u3092\u898B\u3064\u3051\u3089\u308C\u307E\u305B\u3093\n\u30B7\u30F3\u30DC\u30EB: {0} <{2}>{1}({3})
 
 ## arguments from {0} to {3} have the same meaning as above
 ## The fifth argument {4} is a location subdiagnostic (see below)
-# 0: symbol kind, 1: name, 2: unused, 3: unused, 4: message segment
+# 0: kind name, 1: name, 2: unused, 3: unused, 4: message segment
 compiler.err.cant.resolve.location=\u30B7\u30F3\u30DC\u30EB\u3092\u898B\u3064\u3051\u3089\u308C\u307E\u305B\u3093\n\u30B7\u30F3\u30DC\u30EB:   {0} {1}\n\u5834\u6240: {4}
 
-# 0: symbol kind, 1: name, 2: unused, 3: list of type, 4: message segment
+# 0: kind name, 1: name, 2: unused, 3: list of type, 4: message segment
 compiler.err.cant.resolve.location.args=\u30B7\u30F3\u30DC\u30EB\u3092\u898B\u3064\u3051\u3089\u308C\u307E\u305B\u3093\n\u30B7\u30F3\u30DC\u30EB:   {0} {1}({3})\n\u5834\u6240: {4}
 
-# 0: symbol kind, 1: name, 2: list of type, 3: list, 4: message segment
+# 0: kind name, 1: name, 2: list of type, 3: list, 4: message segment
 compiler.err.cant.resolve.location.args.params=\u30B7\u30F3\u30DC\u30EB\u3092\u898B\u3064\u3051\u3089\u308C\u307E\u305B\u3093\n\u30B7\u30F3\u30DC\u30EB:   {0} <{2}>{1}({3})\n\u5834\u6240: {4}
 
 ### Following are replicated/used for method reference diagnostics
 
-# 0: symbol kind, 1: name, 2: unused, 3: list of type, 4: message segment
+# 0: kind name, 1: name, 2: unused, 3: list of type, 4: message segment
 compiler.misc.cant.resolve.location.args=\u30B7\u30F3\u30DC\u30EB\u3092\u898B\u3064\u3051\u3089\u308C\u307E\u305B\u3093\n\u30B7\u30F3\u30DC\u30EB:   {0} {1}({3})\n\u5834\u6240: {4}
 
-# 0: symbol kind, 1: name, 2: list of type, 3: list, 4: message segment
+# 0: kind name, 1: name, 2: list of type, 3: list, 4: message segment
 compiler.misc.cant.resolve.location.args.params=\u30B7\u30F3\u30DC\u30EB\u3092\u898B\u3064\u3051\u3089\u308C\u307E\u305B\u3093\n\u30B7\u30F3\u30DC\u30EB:   {0} <{2}>{1}({3})\n\u5834\u6240: {4}
 
 ##a location subdiagnostic is composed as follows:
@@ -1684,10 +1752,10 @@
 ## The second argument {1} is the location name
 ## The third argument {2} is the location type (only when {1} is a variable name)
 
-# 0: symbol kind, 1: type or symbol, 2: unused
+# 0: kind name, 1: type or symbol, 2: unused
 compiler.misc.location={0} {1}
 
-# 0: symbol kind, 1: symbol, 2: type
+# 0: kind name, 1: symbol, 2: type
 compiler.misc.location.1=\u30BF\u30A4\u30D7{2}\u306E{0} {1}
 
 ## The following are all possible string for "kindname".
@@ -1732,7 +1800,7 @@
 # 0: message segment
 compiler.err.override.static={0}\n\u30AA\u30FC\u30D0\u30FC\u30E9\u30A4\u30C9\u3059\u308B\u30E1\u30BD\u30C3\u30C9\u304Cstatic\u3067\u3059
 
-# 0: message segment, 1: set of modifier
+# 0: message segment, 1: set of flag
 compiler.err.override.meth={0}\n\u30AA\u30FC\u30D0\u30FC\u30E9\u30A4\u30C9\u3055\u308C\u305F\u30E1\u30BD\u30C3\u30C9\u306F{1}\u3067\u3059
 
 # 0: message segment, 1: type
@@ -1740,7 +1808,7 @@
 
 # In the following string {1} is a space separated list of Java Keywords, as
 # they would have been declared in the source code
-# 0: message segment, 1: set of modifier
+# 0: message segment, 1: set of flag or string
 compiler.err.override.weaker.access={0}\n({1})\u3088\u308A\u5F31\u3044\u30A2\u30AF\u30BB\u30B9\u6A29\u9650\u3092\u5272\u308A\u5F53\u3066\u3088\u3046\u3068\u3057\u307E\u3057\u305F
 
 # 0: message segment, 1: type, 2: type
@@ -1787,30 +1855,64 @@
 # 0: symbol, 1: symbol, 2: symbol, 3: symbol
 compiler.misc.varargs.clash.with={1}\u306E{0}\u306F{3}\u306E{2}\u3092\u30AA\u30FC\u30D0\u30FC\u30E9\u30A4\u30C9\u3057\u307E\u3059
 
-# 0: symbol kind, 1: symbol, 2: symbol, 3: message segment
+# 0: kind name, 1: symbol, 2: symbol, 3: message segment
 compiler.misc.inapplicable.method={0} {1}.{2}\u306F\u4F7F\u7528\u3067\u304D\u307E\u305B\u3093\n({3})
 
 ########################################
-# Diagnostics for language feature changes
+# Diagnostics for language feature changes.
+# Such diagnostics have a common template which can be customized by using a feature
+# diagnostic fragment (one of those given below).
 ########################################
 
-# 0: string
-compiler.err.modules.not.supported.in.source=\u30E2\u30B8\u30E5\u30FC\u30EB\u306F-source {0}\u3067\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093\n(\u30E2\u30B8\u30E5\u30FC\u30EB\u3092\u4F7F\u7528\u53EF\u80FD\u306B\u3059\u308B\u306B\u306F\u3001-source 9\u4EE5\u964D\u3092\u4F7F\u7528\u3057\u3066\u304F\u3060\u3055\u3044)
-
-# 0: string
-compiler.misc.diamond.and.anon.class.not.supported.in.source=-source {0}\u3067\u306F\u533F\u540D\u5185\u90E8\u30AF\u30E9\u30B9\u3067''<>''\u3092\u4F7F\u7528\u3067\u304D\u307E\u305B\u3093\n(\u533F\u540D\u5185\u90E8\u30AF\u30E9\u30B9\u3067''<>''\u3092\u4F7F\u7528\u53EF\u80FD\u306B\u3059\u308B\u306B\u306F\u3001-source 9\u4EE5\u964D\u3092\u4F7F\u7528\u3057\u3066\u304F\u3060\u3055\u3044)
-
-# 0: string
-compiler.err.unsupported.binary.lit=2\u9032\u6570\u30EA\u30C6\u30E9\u30EB\u306F-source {0}\u3067\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093\n(2\u9032\u6570\u30EA\u30C6\u30E9\u30EB\u3092\u4F7F\u7528\u53EF\u80FD\u306B\u3059\u308B\u306B\u306F-source 7\u4EE5\u964D\u3092\u4F7F\u7528\u3057\u3066\u304F\u3060\u3055\u3044)
-
-# 0: string
-compiler.err.unsupported.underscore.lit=\u30EA\u30C6\u30E9\u30EB\u5185\u306E\u30A2\u30F3\u30C0\u30FC\u30B9\u30B3\u30A2\u306F-source {0}\u3067\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093\n(\u30EA\u30C6\u30E9\u30EB\u5185\u306E\u30A2\u30F3\u30C0\u30FC\u30B9\u30B3\u30A2\u3092\u4F7F\u7528\u53EF\u80FD\u306B\u3059\u308B\u306B\u306F\u3001-source 7\u4EE5\u964D\u3092\u4F7F\u7528\u3057\u3066\u304F\u3060\u3055\u3044)
-
-# 0: string
-compiler.err.try.with.resources.not.supported.in.source=try-with-resource\u306F-source {0}\u3067\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093\n(try-with-resource\u3092\u4F7F\u7528\u53EF\u80FD\u306B\u3059\u308B\u306B\u306F\u3001-source 7\u4EE5\u964D\u3092\u4F7F\u7528\u3057\u3066\u304F\u3060\u3055\u3044)
-
-# 0: string
-compiler.err.var.in.try.with.resources.not.supported.in.source=try-with-resource\u5185\u306E\u5909\u6570\u306F-source {0}\u3067\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093\n(try-with-resource\u3067\u5909\u6570\u3092\u4F7F\u7528\u53EF\u80FD\u306B\u3059\u308B\u306B\u306F\u3001-source 9\u4EE5\u964D\u3092\u4F7F\u7528\u3057\u3066\u304F\u3060\u3055\u3044)
+# 0: message segment (feature), 1: string (found version), 2: string (expected version)
+compiler.err.feature.not.supported.in.source={0}\u306F-source {1}\u3067\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093\n({0}\u3092\u6709\u52B9\u306B\u3059\u308B\u306B\u306F-source {2}\u4EE5\u4E0A\u3092\u4F7F\u7528\u3057\u3066\u304F\u3060\u3055\u3044)
+
+# 0: message segment (feature), 1: string (found version), 2: string (expected version)
+compiler.err.feature.not.supported.in.source.plural={0}\u306F-source {1}\u3067\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093\n({0}\u3092\u6709\u52B9\u306B\u3059\u308B\u306B\u306F-source {2}\u4EE5\u4E0A\u3092\u4F7F\u7528\u3057\u3066\u304F\u3060\u3055\u3044)
+
+# 0: message segment (feature), 1: string (found version), 2: string (expected version)
+compiler.misc.feature.not.supported.in.source={0}\u306F-source {1}\u3067\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093\n({0}\u3092\u6709\u52B9\u306B\u3059\u308B\u306B\u306F-source {2}\u4EE5\u4E0A\u3092\u4F7F\u7528\u3057\u3066\u304F\u3060\u3055\u3044)
+
+# 0: message segment (feature), 1: string (found version), 2: string (expected version)
+compiler.misc.feature.not.supported.in.source.plural={0}\u306F-source {1}\u3067\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093\n({0}\u3092\u6709\u52B9\u306B\u3059\u308B\u306B\u306F-source {2}\u4EE5\u4E0A\u3092\u4F7F\u7528\u3057\u3066\u304F\u3060\u3055\u3044)
+
+compiler.misc.feature.modules=\u30E2\u30B8\u30E5\u30FC\u30EB
+
+compiler.misc.feature.diamond.and.anon.class=\u533F\u540D\u5185\u90E8\u30AF\u30E9\u30B9\u3067\u306E''<>''
+
+compiler.misc.feature.binary.lit=2\u9032\u6570\u30EA\u30C6\u30E9\u30EB
+
+compiler.misc.feature.underscore.lit=\u30EA\u30C6\u30E9\u30EB\u5185\u306E\u30A2\u30F3\u30C0\u30FC\u30B9\u30B3\u30A2
+
+compiler.misc.feature.try.with.resources=try-with-resources
+
+compiler.misc.feature.var.in.try.with.resources=try-with-resources\u5185\u306E\u5909\u6570
+
+compiler.misc.feature.type.annotations=\u30BF\u30A4\u30D7\u6CE8\u91C8
+
+compiler.misc.feature.annotations.after.type.params=\u30E1\u30BD\u30C3\u30C9\u30FB\u30BF\u30A4\u30D7\u30FB\u30D1\u30E9\u30E1\u30FC\u30BF\u306E\u5F8C\u306E\u6CE8\u91C8
+
+compiler.misc.feature.repeatable.annotations=\u7E70\u8FD4\u3057\u6CE8\u91C8
+
+compiler.misc.feature.diamond=\u30C0\u30A4\u30E4\u30E2\u30F3\u30C9\u6F14\u7B97\u5B50
+
+compiler.misc.feature.multicatch=\u8907\u6570catch\u6587
+
+compiler.misc.feature.string.switch=switch\u5185\u306E\u6587\u5B57\u5217
+
+compiler.misc.feature.lambda=\u30E9\u30E0\u30C0\u5F0F
+
+compiler.misc.feature.method.references=\u30E1\u30BD\u30C3\u30C9\u53C2\u7167
+
+compiler.misc.feature.default.methods=\u30C7\u30D5\u30A9\u30EB\u30C8\u30FB\u30E1\u30BD\u30C3\u30C9
+
+compiler.misc.feature.intersection.types.in.cast=intersection\u578B
+
+compiler.misc.feature.static.intf.methods=static\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u30FB\u30E1\u30BD\u30C3\u30C9
+
+compiler.misc.feature.static.intf.method.invoke=static\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u30FB\u30E1\u30BD\u30C3\u30C9\u547C\u51FA\u3057
+
+compiler.misc.feature.private.intf.methods=private\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u30FB\u30E1\u30BD\u30C3\u30C9
 
 compiler.warn.underscore.as.identifier=\u30EA\u30EA\u30FC\u30B99\u304B\u3089''_''\u306F\u30AD\u30FC\u30EF\u30FC\u30C9\u306A\u306E\u3067\u8B58\u5225\u5B50\u3068\u3057\u3066\u4F7F\u7528\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093
 
@@ -1825,15 +1927,14 @@
 # TODO 308: make a better error message
 compiler.err.this.as.identifier=\u30EA\u30EA\u30FC\u30B98\u304B\u3089''this''\u306F\u53D7\u4FE1\u30BF\u30A4\u30D7\u306E\u30D1\u30E9\u30E1\u30FC\u30BF\u540D\u3068\u3057\u3066\u306E\u307F\u8A31\u53EF\u3055\u308C\u3001\u6700\u521D\u306E\u30D1\u30E9\u30E1\u30FC\u30BF\u306B\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059
 
-# 0: symbol
 compiler.err.receiver.parameter.not.applicable.constructor.toplevel.class=\u53D7\u53D6\u308A\u5074\u30D1\u30E9\u30E1\u30FC\u30BF\u306F\u6700\u4E0A\u4F4D\u30EC\u30D9\u30EB\u30FB\u30AF\u30E9\u30B9\u306E\u30B3\u30F3\u30B9\u30C8\u30E9\u30AF\u30BF\u306B\u9069\u7528\u3067\u304D\u307E\u305B\u3093
 
 # TODO 308: make a better error message
-# 0: symbol
+# 0: annotation
 compiler.err.cant.type.annotate.scoping.1=\u30B9\u30B3\u30FC\u30D7\u30FB\u30B3\u30F3\u30B9\u30C8\u30E9\u30AF\u30C8\u3092\u578B\u4F7F\u7528\u6CE8\u91C8\u3067\u6CE8\u91C8\u4ED8\u3051\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093: {0}
 
 # TODO 308: make a better error message
-# 0: list of symbol
+# 0: list of annotation
 compiler.err.cant.type.annotate.scoping=\u30B9\u30B3\u30FC\u30D7\u30FB\u30B3\u30F3\u30B9\u30C8\u30E9\u30AF\u30C8\u3092\u578B\u4F7F\u7528\u6CE8\u91C8\u3067\u6CE8\u91C8\u4ED8\u3051\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093: {0}
 
 # 0: type, 1: type
@@ -1850,45 +1951,6 @@
 
 compiler.err.no.annotations.on.dot.class=\u6CE8\u91C8\u306F\u30AF\u30E9\u30B9\u30FB\u30EA\u30C6\u30E9\u30EB\u306E\u30BF\u30A4\u30D7\u3067\u8A31\u53EF\u3055\u308C\u307E\u305B\u3093
 
-# 0: string
-compiler.err.type.annotations.not.supported.in.source=\u30BF\u30A4\u30D7\u6CE8\u91C8\u306F-source {0}\u3067\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093\n(\u30BF\u30A4\u30D7\u6CE8\u91C8\u3092\u4F7F\u7528\u53EF\u80FD\u306B\u3059\u308B\u306B\u306F\u3001-source 8\u4EE5\u4E0A\u3092\u4F7F\u7528\u3057\u3066\u304F\u3060\u3055\u3044)
-
-# 0: string
-compiler.err.annotations.after.type.params.not.supported.in.source=\u30E1\u30BD\u30C3\u30C9\u30FB\u30BF\u30A4\u30D7\u30FB\u30D1\u30E9\u30E1\u30FC\u30BF\u306E\u5F8C\u306E\u6CE8\u91C8\u306F-source {0}\u3067\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093\n(\u30E1\u30BD\u30C3\u30C9\u30FB\u30BF\u30A4\u30D7\u30FB\u30D1\u30E9\u30E1\u30FC\u30BF\u306E\u5F8C\u306E\u6CE8\u91C8\u3092\u4F7F\u7528\u53EF\u80FD\u306B\u3059\u308B\u306B\u306F\u3001-source 8\u4EE5\u4E0A\u3092\u4F7F\u7528\u3057\u3066\u304F\u3060\u3055\u3044)
-
-# 0: string
-compiler.err.repeatable.annotations.not.supported.in.source=\u7E70\u8FD4\u3057\u6CE8\u91C8\u306F-source {0}\u3067\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093\n(\u7E70\u8FD4\u3057\u6CE8\u91C8\u3092\u4F7F\u7528\u53EF\u80FD\u306B\u3059\u308B\u306B\u306F\u3001-source 8\u4EE5\u4E0A\u3092\u4F7F\u7528\u3057\u3066\u304F\u3060\u3055\u3044)
-
-# 0: string
-compiler.err.diamond.not.supported.in.source=\u30C0\u30A4\u30E4\u30E2\u30F3\u30C9\u6F14\u7B97\u5B50\u306F-source {0}\u3067\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093\n(\u30C0\u30A4\u30E4\u30E2\u30F3\u30C9\u6F14\u7B97\u5B50\u3092\u4F7F\u7528\u53EF\u80FD\u306B\u3059\u308B\u306B\u306F\u3001-source 7\u4EE5\u964D\u3092\u4F7F\u7528\u3057\u3066\u304F\u3060\u3055\u3044)
-
-# 0: string
-compiler.err.multicatch.not.supported.in.source=\u8907\u6570catch\u6587\u306F-source {0}\u3067\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093\n(\u8907\u6570catch\u6587\u3092\u4F7F\u7528\u53EF\u80FD\u306B\u3059\u308B\u306B\u306F\u3001-source 7\u4EE5\u964D\u3092\u4F7F\u7528\u3057\u3066\u304F\u3060\u3055\u3044)
-
-# 0: string
-compiler.err.string.switch.not.supported.in.source=switch\u5185\u306E\u6587\u5B57\u5217\u306F-source {0}\u3067\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093\n(switch\u5185\u306E\u6587\u5B57\u5217\u3092\u4F7F\u7528\u53EF\u80FD\u306B\u3059\u308B\u306B\u306F\u3001-source 7\u4EE5\u964D\u3092\u4F7F\u7528\u3057\u3066\u304F\u3060\u3055\u3044)
-
-# 0: string
-compiler.err.lambda.not.supported.in.source=\u30E9\u30E0\u30C0\u5F0F\u306F-source {0}\u3067\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093\n(\u30E9\u30E0\u30C0\u5F0F\u3092\u4F7F\u7528\u53EF\u80FD\u306B\u3059\u308B\u306B\u306F\u3001-source 8\u4EE5\u4E0A\u3092\u4F7F\u7528\u3057\u3066\u304F\u3060\u3055\u3044)
-
-# 0: string
-compiler.err.method.references.not.supported.in.source=\u30E1\u30BD\u30C3\u30C9\u53C2\u7167\u306F-source {0}\u3067\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093\n(\u30E1\u30BD\u30C3\u30C9\u53C2\u7167\u3092\u4F7F\u7528\u53EF\u80FD\u306B\u3059\u308B\u306B\u306F\u3001-source 8\u4EE5\u4E0A\u3092\u4F7F\u7528\u3057\u3066\u304F\u3060\u3055\u3044)
-
-# 0: string
-compiler.err.default.methods.not.supported.in.source=\u30C7\u30D5\u30A9\u30EB\u30C8\u30FB\u30E1\u30BD\u30C3\u30C9\u306F-source {0}\u3067\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093\n(\u30C7\u30D5\u30A9\u30EB\u30C8\u30FB\u30E1\u30BD\u30C3\u30C9\u3092\u4F7F\u7528\u53EF\u80FD\u306B\u3059\u308B\u306B\u306F\u3001-source 8\u4EE5\u4E0A\u3092\u4F7F\u7528\u3057\u3066\u304F\u3060\u3055\u3044)
-
-# 0: string
-compiler.err.intersection.types.in.cast.not.supported.in.source=\u30AD\u30E3\u30B9\u30C8\u5185\u306Eintersection\u578B\u306F-source {0}\u3067\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093\n(\u30AD\u30E3\u30B9\u30C8\u5185\u306Eintersection\u578B\u3092\u4F7F\u7528\u53EF\u80FD\u306B\u3059\u308B\u306B\u306F\u3001-source 8\u4EE5\u4E0A\u3092\u4F7F\u7528\u3057\u3066\u304F\u3060\u3055\u3044)
-
-# 0: string
-compiler.err.static.intf.methods.not.supported.in.source=static\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u306F-source {0}\u3067\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093\n(static\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u3092\u4F7F\u7528\u53EF\u80FD\u306B\u3059\u308B\u306B\u306F\u3001-source 8\u4EE5\u4E0A\u3092\u4F7F\u7528\u3057\u3066\u304F\u3060\u3055\u3044)
-
-# 0: string
-compiler.err.static.intf.method.invoke.not.supported.in.source=static\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u30FB\u30E1\u30BD\u30C3\u30C9\u547C\u51FA\u3057\u306F-source {0}\u3067\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093\n(static\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u30FB\u30E1\u30BD\u30C3\u30C9\u547C\u51FA\u3057\u3092\u4F7F\u7528\u53EF\u80FD\u306B\u3059\u308B\u306B\u306F\u3001-source 8\u4EE5\u4E0A\u3092\u4F7F\u7528\u3057\u3066\u304F\u3060\u3055\u3044)
-
-# 0: string
-compiler.err.private.intf.methods.not.supported.in.source=private\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u30FB\u30E1\u30BD\u30C3\u30C9\u306F-source {0}\u3067\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093\n(private\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u30FB\u30E1\u30BD\u30C3\u30C9\u3092\u4F7F\u7528\u53EF\u80FD\u306B\u3059\u308B\u306B\u306F\u3001-source 9\u4EE5\u4E0A\u3092\u4F7F\u7528\u3057\u3066\u304F\u3060\u3055\u3044)
-
 ########################################
 # Diagnostics for verbose resolution
 # used by Resolve (debug only)
@@ -2120,6 +2182,9 @@
 # 0: symbol, 1: name, 2: symbol, 3: symbol
 compiler.err.package.clash.from.requires=\u30E2\u30B8\u30E5\u30FC\u30EB{0}\u306F{2}\u3068{3}\u306E\u4E21\u65B9\u304B\u3089\u30D1\u30C3\u30B1\u30FC\u30B8{1}\u3092\u8AAD\u307F\u53D6\u308A\u307E\u3059
 
+# 0: name, 1: symbol, 2: symbol
+compiler.err.package.clash.from.requires.in.unnamed=\u540D\u524D\u306E\u306A\u3044\u30E2\u30B8\u30E5\uFF0D\u30EB\u306F{1}\u3068{2}\u306E\u4E21\u65B9\u304B\u3089\u30D1\u30C3\u30B1\u30FC\u30B8{0}\u3092\u8AAD\u307F\u53D6\u308A\u307E\u3059
+
 # 0: string
 compiler.err.module.not.found.in.module.source.path=\u30E2\u30B8\u30E5\u30FC\u30EB\u30FB\u30BD\u30FC\u30B9\u30FB\u30D1\u30B9\u306B\u30E2\u30B8\u30E5\u30FC\u30EB{0}\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093
 
@@ -2153,9 +2218,6 @@
 # 0: symbol
 compiler.err.add.reads.with.release=\u30B7\u30B9\u30C6\u30E0\u30FB\u30E2\u30B8\u30E5\u30FC\u30EB{0}\u306E\u8AAD\u53D6\u308A\u30A8\u30C3\u30B8\u306E\u8FFD\u52A0\u306F--release\u3092\u6307\u5B9A\u3057\u3066\u5B9F\u884C\u3067\u304D\u307E\u305B\u3093
 
-# 0: symbol
-compiler.err.patch.module.with.release=\u30B7\u30B9\u30C6\u30E0\u30FB\u30E2\u30B8\u30E5\u30FC\u30EB{0}\u3078\u306E\u30D1\u30C3\u30C1\u9069\u7528\u306F--release\u3092\u6307\u5B9A\u3057\u3066\u5B9F\u884C\u3067\u304D\u307E\u305B\u3093
-
 compiler.warn.addopens.ignored=--add-opens\u306F\u3001\u30B3\u30F3\u30D1\u30A4\u30EB\u6642\u306B\u306F\u7121\u52B9\u3067\u3059
 
 compiler.misc.locn.module_source_path=\u30E2\u30B8\u30E5\u30FC\u30EB\u30FB\u30BD\u30FC\u30B9\u30FB\u30D1\u30B9
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler_zh_CN.properties	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler_zh_CN.properties	Tue Jan 30 16:41:40 2018 +0100
@@ -28,12 +28,14 @@
 # values.
 # The simple types currently in use are:
 #
+# annotation        annotation compound
 # boolean           true or false
 # diagnostic        a sub-message; see compiler.misc.*
 # fragment          similar to 'message segment', but with more specific type
 # modifier          a Java modifier; e.g. public, private, protected
 # file              a file URL
 # file object       a file URL - similar to 'file' but typically used for source/class files, hence more specific
+# flag              a Flags.Flag instance
 # name              a name, typically a Java identifier
 # number            an integer
 # option name       the name of a command line option
@@ -49,8 +51,9 @@
 #
 # The following compound types are also used:
 #
+# collection of X   a comma-separated collection of items; e.g. collection of type
 # list of X         a comma-separated list of items; e.g. list of type
-# set of X          a comma-separated collection of items; e.g. set of modifier
+# set of X          a comma-separated set of items; e.g. set of modifier
 #
 # These may be composed:
 #
@@ -59,7 +62,7 @@
 # The following type aliases are supported:
 #
 # message segment --> diagnostic or fragment
-# file name --> file or file object
+# file name --> file, path or file object
 #
 # Custom comments are supported in parenthesis i.e.
 #
@@ -83,20 +86,22 @@
 
 compiler.err.abstract.meth.cant.have.body=\u62BD\u8C61\u65B9\u6CD5\u4E0D\u80FD\u6709\u4E3B\u4F53
 
+# 0: kind name, 1: symbol
 compiler.err.already.annotated={0} {1}\u5DF2\u8FDB\u884C\u6CE8\u91CA
 
-# 0: symbol kind, 1: symbol, 2: symbol kind, 3: symbol
+# 0: kind name, 1: symbol, 2: kind name, 3: symbol
 compiler.err.already.defined=\u5DF2\u5728{2} {3}\u4E2D\u5B9A\u4E49\u4E86{0} {1}
 
-# 0: symbol kind, 1: symbol, 2: symbol kind, 3: symbol kind, 4: symbol
+# 0: kind name, 1: symbol, 2: kind name, 3: kind name, 4: symbol
 compiler.err.already.defined.in.clinit=\u5DF2\u5728{3} {4}\u7684{2}\u4E2D\u5B9A\u4E49\u4E86{0} {1}
 
-# 0: string
+# 0: symbol
 compiler.err.already.defined.single.import={0}\u7684 single-type-import \u5DF2\u5B9A\u4E49\u5177\u6709\u76F8\u540C\u7B80\u540D\u7684\u7C7B\u578B
 
-# 0: string
+# 0: symbol
 compiler.err.already.defined.static.single.import={0}\u7684\u9759\u6001 single-type-import \u5DF2\u5B9A\u4E49\u5177\u6709\u76F8\u540C\u7B80\u540D\u7684\u7C7B\u578B
 
+# 0: symbol
 compiler.err.already.defined.this.unit=\u5DF2\u5728\u8BE5\u7F16\u8BD1\u5355\u5143\u4E2D\u5B9A\u4E49{0}
 
 # 0: type, 1: list of name
@@ -121,6 +126,8 @@
 
 compiler.err.annotation.value.not.allowable.type=\u6CE8\u91CA\u503C\u4E0D\u662F\u5141\u8BB8\u7684\u7C7B\u578B
 
+compiler.err.expression.not.allowable.as.annotation.value=\u8868\u8FBE\u5F0F\u4E0D\u5141\u8BB8\u7528\u4F5C\u6CE8\u91CA\u503C
+
 compiler.err.anon.class.impl.intf.no.args=\u533F\u540D\u7C7B\u5B9E\u73B0\u63A5\u53E3; \u4E0D\u80FD\u6709\u53C2\u6570
 
 compiler.err.anon.class.impl.intf.no.typeargs=\u533F\u540D\u7C7B\u5B9E\u73B0\u63A5\u53E3; \u4E0D\u80FD\u5177\u6709\u7C7B\u578B\u53C2\u6570
@@ -134,6 +141,8 @@
 
 compiler.err.array.dimension.missing=\u7F3A\u5C11\u6570\u7EC4\u7EF4
 
+compiler.err.illegal.array.creation.both.dimension.and.initialization=\u540C\u65F6\u4F7F\u7528\u7EF4\u8868\u8FBE\u5F0F\u548C\u521D\u59CB\u5316\u521B\u5EFA\u6570\u7EC4\u662F\u975E\u6CD5\u7684
+
 # 0: type
 compiler.err.array.req.but.found=\u9700\u8981\u6570\u7EC4, \u4F46\u627E\u5230{0}
 
@@ -159,10 +168,10 @@
 # 0: symbol kind, 1: name, 2: list of type
 compiler.misc.cant.apply.symbols=\u5BF9\u4E8E{1}({2}), \u627E\u4E0D\u5230\u5408\u9002\u7684{0}
 
-# 0: symbol kind, 1: symbol
+# 0: kind name, 1: symbol
 compiler.misc.no.abstracts=\u5728 {0} {1} \u4E2D\u627E\u4E0D\u5230\u62BD\u8C61\u65B9\u6CD5
 
-# 0: symbol kind, 1: symbol
+# 0: kind name, 1: symbol
 compiler.misc.incompatible.abstracts=\u5728 {0} {1} \u4E2D\u627E\u5230\u591A\u4E2A\u975E\u8986\u76D6\u62BD\u8C61\u65B9\u6CD5
 
 compiler.err.bad.functional.intf.anno=\u610F\u5916\u7684 @FunctionalInterface \u6CE8\u91CA
@@ -179,10 +188,10 @@
 # 0: symbol, 1: message segment
 compiler.misc.not.a.functional.intf.1={0} \u4E0D\u662F\u51FD\u6570\u63A5\u53E3\n{1}
 
-# 0: symbol, 1: symbol kind, 2: symbol
+# 0: type, 1: kind name, 2: symbol
 compiler.misc.invalid.generic.lambda.target=lambda \u8868\u8FBE\u5F0F\u7684\u51FD\u6570\u63CF\u8FF0\u7B26\u65E0\u6548\n{1} {2} \u4E2D\u7684\u65B9\u6CD5 {0} \u4E3A\u6CDB\u578B\u65B9\u6CD5
 
-# 0: symbol kind, 1: symbol
+# 0: kind name, 1: symbol
 compiler.misc.incompatible.descs.in.functional.intf=\u5728 {0} {1} \u4E2D\u627E\u5230\u4E0D\u517C\u5BB9\u7684\u51FD\u6570\u63CF\u8FF0\u7B26
 
 # 0: name, 1: list of type, 2: type, 3: list of type
@@ -200,7 +209,7 @@
 # 0: symbol or type
 compiler.misc.not.an.intf.component=\u7EC4\u4EF6\u7C7B\u578B{0}\u4E0D\u662F\u63A5\u53E3
 
-# 0: symbol kind, 1: message segment
+# 0: kind name, 1: message segment
 compiler.err.invalid.mref={0}\u5F15\u7528\u65E0\u6548\n{1}
 
 # 0: symbol kind, 1: message segment
@@ -231,10 +240,12 @@
 
 compiler.err.cant.extend.intf.annotation=\u5BF9\u4E8E @interfaces, \u4E0D\u5141\u8BB8 ''extends''
 
+compiler.err.annotation.decl.not.allowed.here=\u6B64\u5904\u4E0D\u5141\u8BB8\u6CE8\u91CA\u7C7B\u578B\u58F0\u660E
+
 # 0: symbol
 compiler.err.cant.inherit.from.final=\u65E0\u6CD5\u4ECE\u6700\u7EC8{0}\u8FDB\u884C\u7EE7\u627F
 
-# 0: symbol
+# 0: symbol or string
 compiler.err.cant.ref.before.ctor.called=\u65E0\u6CD5\u5728\u8C03\u7528\u8D85\u7C7B\u578B\u6784\u9020\u5668\u4E4B\u524D\u5F15\u7528{0}
 
 compiler.err.cant.select.static.class.from.param.type=\u65E0\u6CD5\u4ECE\u53C2\u6570\u5316\u7684\u7C7B\u578B\u4E2D\u9009\u62E9\u9759\u6001\u7C7B
@@ -244,7 +255,7 @@
 
 compiler.err.catch.without.try=\u6709 ''catch'', \u4F46\u662F\u6CA1\u6709 ''try''
 
-# 0: symbol kind, 1: symbol
+# 0: kind name, 1: symbol
 compiler.err.clash.with.pkg.of.same.name={0} {1}\u4E0E\u5E26\u6709\u76F8\u540C\u540D\u79F0\u7684\u7A0B\u5E8F\u5305\u51B2\u7A81
 
 compiler.err.class.not.allowed=\u6B64\u5904\u4E0D\u5141\u8BB8\u4F7F\u7528\u7C7B, \u63A5\u53E3\u6216\u679A\u4E3E\u58F0\u660E
@@ -253,19 +264,19 @@
 
 compiler.err.cont.outside.loop=continue \u5728 loop \u5916\u90E8
 
-# 0: symbol
+# 0: symbol or type
 compiler.err.cyclic.inheritance=\u6D89\u53CA{0}\u7684\u5FAA\u73AF\u7EE7\u627F
 
 # 0: symbol
 compiler.err.cyclic.annotation.element=\u5143\u7D20 {0} \u7684\u7C7B\u578B\u4E3A\u5FAA\u73AF
 
-# 0: unused
+# 0: symbol
 compiler.err.call.to.super.not.allowed.in.enum.ctor=\u5728\u679A\u4E3E\u6784\u9020\u5668\u4E2D\u4E0D\u5141\u8BB8\u8C03\u7528\u8D85\u7C7B
 
 # 0: type
 compiler.err.no.superclass={0}\u4E0D\u5177\u6709\u8D85\u7C7B\u3002
 
-# 0: symbol, 1: type, 2: symbol, 3: type, 4: unused
+# 0: symbol, 1: type, 2: symbol, 3: type, 4: type
 compiler.err.concrete.inheritance.conflict={1}\u4E2D\u7684\u65B9\u6CD5{0}\u548C{3}\u4E2D\u7684\u65B9\u6CD5{2}\u662F\u4F7F\u7528\u76F8\u540C\u7684\u7B7E\u540D\u7EE7\u627F\u7684
 
 compiler.err.default.allowed.in.intf.annotation.member=\u6CE8\u91CA\u7C7B\u578B\u58F0\u660E\u4E2D\u4EC5\u5141\u8BB8\u9ED8\u8BA4\u503C
@@ -279,10 +290,10 @@
 # 0: name, 1: type
 compiler.err.duplicate.annotation.member.value=\u6CE8\u91CA@{1}\u4E2D\u7684\u5143\u7D20 ''{0}'' \u91CD\u590D\u3002
 
-# 0: name, 1: unused
+# 0: type
 compiler.err.duplicate.annotation.missing.container={0} \u4E0D\u662F\u53EF\u91CD\u590D\u7684\u6CE8\u91CA\u7C7B\u578B
 
-# 0: type, 1: unused
+# 0: symbol
 compiler.err.invalid.repeatable.annotation=\u6CE8\u91CA\u91CD\u590D: \u4F7F\u7528\u65E0\u6548\u7684 @Repeatable \u6CE8\u91CA\u5BF9{0}\u8FDB\u884C\u4E86\u6CE8\u91CA
 
 # 0: symbol or type
@@ -294,13 +305,13 @@
 # 0: type
 compiler.err.invalid.repeatable.annotation.invalid.value={0}\u4E0D\u662F\u6709\u6548\u7684 @Repeatable: \u503C\u5143\u7D20\u65E0\u6548
 
-# 0: symbol or type, 1: unused, 2: type
+# 0: symbol or type, 1: type, 2: type
 compiler.err.invalid.repeatable.annotation.value.return=\u5305\u542B\u6CE8\u91CA\u7C7B\u578B ({0}) \u5FC5\u987B\u58F0\u660E\u7C7B\u578B{2}\u7684\u540D\u4E3A ''value'' \u7684\u5143\u7D20
 
 # 0: symbol or type, 1: symbol
 compiler.err.invalid.repeatable.annotation.elem.nondefault=\u5BF9\u4E8E\u5143\u7D20 {1}, \u5305\u542B\u6CE8\u91CA\u7C7B\u578B ({0}) \u6CA1\u6709\u9ED8\u8BA4\u503C
 
-# 0: symbol, 1: unused, 2: symbol, 3: unused
+# 0: symbol, 1: string, 2: symbol, 3: string
 compiler.err.invalid.repeatable.annotation.retention=\u5305\u542B\u6CE8\u91CA\u7C7B\u578B ({0}) \u7684\u4FDD\u7559\u671F\u77ED\u4E8E\u53EF\u91CD\u590D\u6CE8\u91CA\u7C7B\u578B ({2}) \u7684\u4FDD\u7559\u671F
 
 # 0: symbol, 1: symbol
@@ -390,7 +401,7 @@
 # 0: string, 1: string
 compiler.err.illegal.char.for.encoding=\u7F16\u7801 {1} \u7684\u4E0D\u53EF\u6620\u5C04\u5B57\u7B26 (0x{0})
 
-# 0: set of modifier, 1: set of modifier
+# 0: set of flag, 1: set of flag
 compiler.err.illegal.combination.of.modifiers=\u975E\u6CD5\u7684\u4FEE\u9970\u7B26\u7EC4\u5408: {0}\u548C{1}
 
 compiler.err.illegal.enum.static.ref=\u521D\u59CB\u5316\u7A0B\u5E8F\u4E2D\u5BF9\u9759\u6001\u5B57\u6BB5\u7684\u5F15\u7528\u4E0D\u5408\u6CD5
@@ -399,7 +410,7 @@
 
 compiler.err.illegal.forward.ref=\u975E\u6CD5\u524D\u5411\u5F15\u7528
 
-# 0: symbol, 1: string
+# 0: symbol, 1: object
 compiler.err.not.in.profile={0}\u5728\u914D\u7F6E\u6587\u4EF6 ''{1}'' \u4E2D\u4E0D\u53EF\u7528
 
 # 0: symbol
@@ -432,6 +443,8 @@
 
 compiler.err.illegal.start.of.type=\u975E\u6CD5\u7684\u7C7B\u578B\u5F00\u59CB
 
+compiler.err.illegal.parenthesized.expression=\u975E\u6CD5\u7684\u542B\u62EC\u53F7\u8868\u8FBE\u5F0F
+
 compiler.err.illegal.unicode.esc=\u975E\u6CD5\u7684 Unicode \u8F6C\u4E49
 
 # 0: symbol
@@ -461,8 +474,7 @@
 
 compiler.err.intf.meth.cant.have.body=\u63A5\u53E3\u62BD\u8C61\u65B9\u6CD5\u4E0D\u80FD\u5E26\u6709\u4E3B\u4F53
 
-# 0: symbol
-compiler.err.invalid.annotation.member.type=\u6CE8\u91CA\u7C7B\u578B\u5143\u7D20 {0} \u7684\u7C7B\u578B\u65E0\u6548
+compiler.err.invalid.annotation.member.type=\u6CE8\u91CA\u7C7B\u578B\u5143\u7D20\u7684\u7C7B\u578B\u65E0\u6548
 
 compiler.err.invalid.binary.number=\u4E8C\u8FDB\u5236\u6570\u5B57\u4E2D\u5FC5\u987B\u5305\u542B\u81F3\u5C11\u4E00\u4E2A\u4E8C\u8FDB\u5236\u6570
 
@@ -517,22 +529,25 @@
 
 compiler.err.limit.string=\u5E38\u91CF\u5B57\u7B26\u4E32\u8FC7\u957F
 
+# 0: string
 compiler.err.limit.string.overflow=\u5BF9\u4E8E\u5E38\u91CF\u6C60\u6765\u8BF4, \u5B57\u7B26\u4E32 "{0}..." \u7684 UTF8 \u8868\u793A\u8FC7\u957F
 
 compiler.err.malformed.fp.lit=\u6D6E\u70B9\u6587\u5B57\u7684\u683C\u5F0F\u9519\u8BEF
 
 compiler.err.method.does.not.override.superclass=\u65B9\u6CD5\u4E0D\u4F1A\u8986\u76D6\u6216\u5B9E\u73B0\u8D85\u7C7B\u578B\u7684\u65B9\u6CD5
 
+compiler.err.static.methods.cannot.be.annotated.with.override=\u4E0D\u80FD\u4F7F\u7528 @Override \u6CE8\u91CA\u9759\u6001\u65B9\u6CD5
+
 compiler.err.missing.meth.body.or.decl.abstract=\u7F3A\u5C11\u65B9\u6CD5\u4E3B\u4F53, \u6216\u58F0\u660E\u62BD\u8C61
 
 compiler.err.missing.ret.stmt=\u7F3A\u5C11\u8FD4\u56DE\u8BED\u53E5
 
-# 0: unused
+# 0: type
 compiler.misc.missing.ret.val=\u7F3A\u5C11\u8FD4\u56DE\u503C
 
 compiler.misc.unexpected.ret.val=\u610F\u5916\u7684\u8FD4\u56DE\u503C
 
-# 0: set of modifier
+# 0: set of flag
 compiler.err.mod.not.allowed.here=\u6B64\u5904\u4E0D\u5141\u8BB8\u4F7F\u7528\u4FEE\u9970\u7B26{0}
 
 compiler.err.intf.not.allowed.here=\u6B64\u5904\u4E0D\u5141\u8BB8\u4F7F\u7528\u63A5\u53E3
@@ -542,11 +557,11 @@
 # 0: symbol, 1: symbol
 compiler.err.name.clash.same.erasure=\u540D\u79F0\u51B2\u7A81: {0}\u548C{1}\u5177\u6709\u76F8\u540C\u7591\u7B26
 
-# 0: symbol, 1: symbol, 2: symbol, 3: symbol, 4: unused, 5: unused
-compiler.err.name.clash.same.erasure.no.override=\u540D\u79F0\u51B2\u7A81: {1}\u4E2D\u7684{0}\u548C{3}\u4E2D\u7684{2}\u5177\u6709\u76F8\u540C\u7591\u7B26, \u4F46\u4E24\u8005\u5747\u4E0D\u8986\u76D6\u5BF9\u65B9
-
-# 0: symbol, 1: symbol, 2: symbol, 3: symbol, 4: symbol, 5: symbol
-compiler.err.name.clash.same.erasure.no.override.1=\u540D\u79F0\u51B2\u7A81: {1} \u4E2D\u7684 {0} \u8986\u76D6\u7684\u65B9\u6CD5\u7684\u7591\u7B26\u4E0E\u53E6\u4E00\u4E2A\u65B9\u6CD5\u7684\u76F8\u540C, \u4F46\u4E24\u8005\u5747\u4E0D\u8986\u76D6\u5BF9\u65B9\n\u7B2C\u4E00\u4E2A\u65B9\u6CD5:  {3} \u4E2D\u7684 {2}\n\u7B2C\u4E8C\u4E2A\u65B9\u6CD5: {5} \u4E2D\u7684 {4}
+# 0: name, 1: list of type, 2: symbol, 3: name, 4: list of type, 5: symbol
+compiler.err.name.clash.same.erasure.no.override=\u540D\u79F0\u51B2\u7A81: {2} \u4E2D\u7684 {0}({1}) \u548C {5} \u4E2D\u7684 {3}({4}) \u5177\u6709\u76F8\u540C\u7591\u7B26, \u4F46\u4E24\u8005\u5747\u4E0D\u8986\u76D6\u5BF9\u65B9
+
+# 0: string, 1: name, 2: name, 3: list of type, 4: symbol, 5: name, 6: list of type, 7: symbol
+compiler.err.name.clash.same.erasure.no.override.1=\u540D\u79F0\u51B2\u7A81: {0} {1} \u7684\u4E24\u79CD\u65B9\u6CD5\u5177\u6709\u76F8\u540C\u7684\u7591\u7B26, \u4F46\u4E24\u8005\u5747\u4E0D\u8986\u76D6\u5BF9\u65B9\n\u7B2C\u4E00\u79CD\u65B9\u6CD5: {4} \u4E2D\u7684 {2}({3})\n\u7B2C\u4E8C\u79CD\u65B9\u6CD5: {7} \u4E2D\u7684 {5}({6})
 
 # 0: symbol, 1: symbol, 2: symbol, 3: symbol
 compiler.err.name.clash.same.erasure.no.hide=\u540D\u79F0\u51B2\u7A81: {1} \u4E2D\u7684 {0} \u548C {3} \u4E2D\u7684 {2} \u5177\u6709\u76F8\u540C\u7591\u7B26, \u4F46\u4E24\u8005\u5747\u4E0D\u9690\u85CF\u5BF9\u65B9
@@ -564,18 +579,18 @@
 
 compiler.misc.conditional.target.cant.be.void=\u6761\u4EF6\u8868\u8FBE\u5F0F\u7684\u76EE\u6807\u7C7B\u578B\u4E0D\u80FD\u4E3A\u7A7A
 
-# 0: type
+# 0: message segment
 compiler.misc.incompatible.ret.type.in.lambda=lambda \u8868\u8FBE\u5F0F\u4E2D\u7684\u8FD4\u56DE\u7C7B\u578B\u9519\u8BEF\n{0}
 
 compiler.misc.stat.expr.expected=lambda \u4E3B\u4F53\u4E0E void \u51FD\u6570\u63A5\u53E3\u4E0D\u517C\u5BB9\n(\u8BF7\u8003\u8651\u4F7F\u7528\u5757 lambda \u4E3B\u4F53, \u6216\u8005\u6539\u4E3A\u4F7F\u7528\u8BED\u53E5\u8868\u8FBE\u5F0F)
 
-# 0: type
+# 0: message segment
 compiler.misc.incompatible.ret.type.in.mref=\u65B9\u6CD5\u5F15\u7528\u4E2D\u7684\u8FD4\u56DE\u7C7B\u578B\u9519\u8BEF\n{0}
 
 compiler.err.lambda.body.neither.value.nor.void.compatible=lambda \u4E3B\u4F53\u4E0D\u662F\u503C, \u4E5F\u4E0D\u4E0E void \u517C\u5BB9
 
 # 0: list of type
-compiler.err.incompatible.thrown.types.in.mref=\u65B9\u6CD5\u5F15\u7528\u4E2D\u629B\u51FA\u7684\u7C7B\u578B{0}\u4E0D\u517C\u5BB9
+compiler.err.incompatible.thrown.types.in.mref=\u51FD\u6570\u8868\u8FBE\u5F0F\u4E2D\u629B\u51FA\u7684\u7C7B\u578B {0} \u4E0D\u517C\u5BB9
 
 compiler.misc.incompatible.arg.types.in.lambda=lambda \u8868\u8FBE\u5F0F\u4E2D\u7684\u53C2\u6570\u7C7B\u578B\u4E0D\u517C\u5BB9
 
@@ -583,14 +598,17 @@
 
 compiler.err.new.not.allowed.in.annotation=\u6CE8\u91CA\u4E2D\u4E0D\u5141\u8BB8\u4F7F\u7528 ''new''
 
+# 0: name, 1: type
 compiler.err.no.annotation.member={1}\u4E2D\u6CA1\u6709\u6CE8\u91CA\u6210\u5458{0}
 
+# 0: symbol
 compiler.err.no.encl.instance.of.type.in.scope=\u4F5C\u7528\u57DF\u4E2D\u6CA1\u6709\u7C7B\u578B\u4E3A{0}\u7684\u5C01\u95ED\u5B9E\u4F8B
 
 compiler.err.no.intf.expected.here=\u6B64\u5904\u4E0D\u9700\u8981\u63A5\u53E3
 
 compiler.err.no.match.entry={0}\u5728{1}\u7684\u6761\u76EE\u4E2D\u6CA1\u6709\u5339\u914D\u9879; \u9700\u8981{2}
 
+# 0: type
 compiler.err.not.annotation.type={0}\u4E0D\u662F\u6CE8\u91CA\u7C7B\u578B
 
 # 0: symbol, 1: symbol, 2: message segment
@@ -691,10 +709,10 @@
 
 # Errors related to annotation processing
 
-# 0: symbol, 1: string, 2: string (stack-trace)
+# 0: symbol, 1: message segment, 2: string (stack-trace)
 compiler.err.proc.cant.access=\u65E0\u6CD5\u8BBF\u95EE{0}\n{1}\n\u6709\u5173\u8BE6\u7EC6\u4FE1\u606F, \u8BF7\u53C2\u9605\u4EE5\u4E0B\u5806\u6808\u8DDF\u8E2A\u3002\n{2}
 
-# 0: symbol, 1: string
+# 0: symbol, 1: message segment
 compiler.err.proc.cant.access.1=\u65E0\u6CD5\u8BBF\u95EE{0}\n{1}
 
 # 0: string
@@ -704,11 +722,17 @@
 # 0: string
 compiler.err.proc.messager={0}
 
-# 0: list of string
+# 0: string
+compiler.misc.exception.message={0}
+
+compiler.misc.user.selected.completion.failure=\u6309\u7C7B\u540D\u5217\u51FA\u7684\u7528\u6237\u9009\u62E9\u8F93\u5165\u63D0\u793A\u5931\u8D25
+
+# 0: collection of string
 compiler.err.proc.no.explicit.annotation.processing.requested=\u4EC5\u5F53\u663E\u5F0F\u8BF7\u6C42\u6CE8\u91CA\u5904\u7406\u65F6\u624D\u63A5\u53D7\u7C7B\u540D\u79F0 ''{0}''
 
 compiler.err.proc.no.service=ServiceLoader \u4E0D\u53EF\u7528, \u4F46\u5B83\u662F\u6CE8\u91CA\u5904\u7406\u6240\u5FC5\u9700\u7684\u3002
 
+# 0: string, 1: string
 compiler.err.proc.processor.bad.option.name=\u5904\u7406\u7A0B\u5E8F ''{1}'' \u63D0\u4F9B\u7684\u9009\u9879\u540D\u79F0 ''{0}'' \u9519\u8BEF
 
 # 0: string
@@ -722,11 +746,12 @@
 
 compiler.err.proc.service.problem=\u521B\u5EFA\u670D\u52A1\u52A0\u8F7D\u5668\u4EE5\u52A0\u8F7D\u5904\u7406\u7A0B\u5E8F\u65F6\u51FA\u9519\u3002
 
+# 0: string
 compiler.err.proc.bad.config.file=\u670D\u52A1\u914D\u7F6E\u6587\u4EF6\u4E0D\u6B63\u786E, \u6216\u6784\u9020\u5904\u7406\u7A0B\u5E8F\u5BF9\u8C61{0}\u65F6\u629B\u51FA\u5F02\u5E38\u9519\u8BEF
 
 compiler.err.proc.cant.create.loader=\u65E0\u6CD5\u4E3A\u6CE8\u91CA\u5904\u7406\u7A0B\u5E8F{0}\u521B\u5EFA\u7C7B\u52A0\u8F7D\u5668
 
-# 0: unused
+# 0: symbol
 compiler.err.qualified.new.of.static.class=\u9650\u5B9A\u7684\u65B0\u9759\u6001\u7C7B
 
 compiler.err.recursive.ctor.invocation=\u9012\u5F52\u6784\u9020\u5668\u8C03\u7528
@@ -744,10 +769,10 @@
 compiler.err.repeated.modifier=\u4FEE\u9970\u7B26\u91CD\u590D
 
 # 0: symbol, 1: set of modifier, 2: symbol
-compiler.err.report.access={0}\u53EF\u4EE5\u5728{2}\u4E2D\u8BBF\u95EE{1}
+compiler.err.report.access={0} \u5728 {2} \u4E2D\u662F {1} \u8BBF\u95EE\u63A7\u5236
 
 # 0: symbol, 1: set of modifier, 2: symbol
-compiler.misc.report.access={0}\u53EF\u4EE5\u5728{2}\u4E2D\u8BBF\u95EE{1}
+compiler.misc.report.access={0} \u5728 {2} \u4E2D\u662F {1} \u8BBF\u95EE\u63A7\u5236
 
 compiler.err.ret.outside.meth=\u8FD4\u56DE\u5916\u90E8\u65B9\u6CD5
 
@@ -761,8 +786,10 @@
 # 0: symbol, 1: symbol, 2: symbol
 compiler.err.does.not.override.abstract={0}\u4E0D\u662F\u62BD\u8C61\u7684, \u5E76\u4E14\u672A\u8986\u76D6{2}\u4E2D\u7684\u62BD\u8C61\u65B9\u6CD5{1}
 
+# 0: file object
 compiler.err.source.cant.overwrite.input.file=\u5199\u5165\u6E90\u65F6\u51FA\u9519; \u65E0\u6CD5\u8986\u76D6\u8F93\u5165\u6587\u4EF6{0}
 
+# 0: symbol
 compiler.err.stack.sim.error=\u5185\u90E8\u9519\u8BEF: {0}\u4E2D\u7684\u5806\u6808 sim \u9519\u8BEF
 
 compiler.err.static.imp.only.classes.and.interfaces=\u4EC5\u4ECE\u7C7B\u548C\u63A5\u53E3\u9759\u6001\u5BFC\u5165
@@ -804,7 +831,7 @@
 # 0: type
 compiler.err.illegal.static.intf.meth.call=\u9759\u6001\u63A5\u53E3\u65B9\u6CD5\u8C03\u7528\u975E\u6CD5\n\u5E94\u5C06\u63A5\u6536\u65B9\u8868\u8FBE\u5F0F\u66FF\u6362\u4E3A\u7C7B\u578B\u9650\u5B9A\u7B26 ''{0}''
 
-# 0: type, 1: message segment
+# 0: symbol or type, 1: message segment
 compiler.err.illegal.default.super.call=\u9ED8\u8BA4\u8D85\u7EA7\u8C03\u7528\u4E2D\u7684\u7C7B\u578B\u9650\u5B9A\u7B26{0}\u9519\u8BEF\n{1}
 
 # 0: symbol, 1: type
@@ -819,7 +846,7 @@
 
 compiler.err.unclosed.str.lit=\u672A\u7ED3\u675F\u7684\u5B57\u7B26\u4E32\u6587\u5B57
 
-# 0: name
+# 0: string
 compiler.err.unsupported.encoding=\u4E0D\u652F\u6301\u7684\u7F16\u7801: {0}
 
 compiler.err.io.exception=\u8BFB\u53D6\u6E90\u6587\u4EF6\u65F6\u51FA\u9519: {0}
@@ -827,6 +854,35 @@
 # 0: name
 compiler.err.undef.label=\u672A\u5B9A\u4E49\u7684\u6807\u7B7E: {0}
 
+# 0: name (type)
+compiler.err.illegal.ref.to.var.type=\u5BF9\u53D7\u9650\u5236\u7C7B\u578B ''{0}'' \u7684\u5F15\u7528\u975E\u6CD5
+
+# 0: token
+compiler.err.var.not.allowed=\u4ECE\u53D1\u884C\u7248 10 \u5F00\u59CB,\n\u6B64\u5904\u4E0D\u5141\u8BB8\u4F7F\u7528 ''{0}'', ''{0}'' \u662F\u53D7\u9650\u5236\u7684\u672C\u5730\u53D8\u91CF\u7C7B\u578B, \u65E0\u6CD5\u7528\u4E8E\u7C7B\u578B\u58F0\u660E
+
+# 0: name (variable), 1: message segment
+compiler.err.cant.infer.local.var.type=\u65E0\u6CD5\u63A8\u65AD\u672C\u5730\u53D8\u91CF {0} \u7684\u7C7B\u578B\n({1})
+
+compiler.err.var.not.allowed.here=\u6B64\u5904\u4E0D\u5141\u8BB8\u4F7F\u7528 ''var''
+
+compiler.err.var.not.allowed.array=''var'' \u4E0D\u5141\u8BB8\u7528\u4F5C\u6570\u7EC4\u7684\u5143\u7D20\u7C7B\u578B
+
+compiler.err.var.not.allowed.compound=''var'' \u4E0D\u5141\u8BB8\u5728\u590D\u5408\u58F0\u660E\u4E2D\u4F7F\u7528
+
+compiler.misc.local.cant.infer.null=\u53D8\u91CF\u521D\u59CB\u5316\u7A0B\u5E8F\u4E3A ''null''
+
+compiler.misc.local.cant.infer.void=\u53D8\u91CF\u521D\u59CB\u5316\u7A0B\u5E8F\u4E3A ''void''
+
+compiler.misc.local.missing.init=\u65E0\u6CD5\u5728\u4E0D\u5E26\u521D\u59CB\u5316\u7A0B\u5E8F\u7684\u53D8\u91CF\u4E0A\u4F7F\u7528 ''var''
+
+compiler.misc.local.lambda.missing.target=lambda \u8868\u8FBE\u5F0F\u9700\u8981\u663E\u5F0F\u76EE\u6807\u7C7B\u578B
+
+compiler.misc.local.mref.missing.target=\u65B9\u6CD5\u5F15\u7528\u9700\u8981\u663E\u5F0F\u76EE\u6807\u7C7B\u578B
+
+compiler.misc.local.array.missing.target=\u6570\u7EC4\u521D\u59CB\u5316\u7A0B\u5E8F\u9700\u8981\u663E\u5F0F\u76EE\u6807\u7C7B\u578B
+
+compiler.misc.local.self.ref=\u65E0\u6CD5\u5728\u81EA\u5F15\u7528\u53D8\u91CF\u4E0A\u4F7F\u7528 ''var''
+
 # 0: message segment, 1: unused
 compiler.err.cant.apply.diamond=\u65E0\u6CD5\u63A8\u65AD{0}\u7684\u7C7B\u578B\u53C2\u6570
 
@@ -944,10 +1000,13 @@
 
 compiler.misc.fatal.err.no.java.lang=\u81F4\u547D\u9519\u8BEF: \u5728\u7C7B\u8DEF\u5F84\u6216\u5F15\u5BFC\u7C7B\u8DEF\u5F84\u4E2D\u627E\u4E0D\u5230\u7A0B\u5E8F\u5305 java.lang
 
+# 0: name
 compiler.misc.fatal.err.cant.locate.meth=\u81F4\u547D\u9519\u8BEF: \u627E\u4E0D\u5230\u65B9\u6CD5{0}
 
+# 0: name
 compiler.misc.fatal.err.cant.locate.field=\u81F4\u547D\u9519\u8BEF: \u627E\u4E0D\u5230\u5B57\u6BB5{0}
 
+# 0: type
 compiler.misc.fatal.err.cant.locate.ctor=\u81F4\u547D\u9519\u8BEF: \u627E\u4E0D\u5230{0}\u7684\u6784\u9020\u5668
 
 compiler.misc.fatal.err.cant.close=\u81F4\u547D\u9519\u8BEF: \u65E0\u6CD5\u5173\u95ED\u7F16\u8BD1\u5668\u8D44\u6E90
@@ -1061,10 +1120,10 @@
 compiler.misc.verbose.checking.attribution=[\u6B63\u5728\u68C0\u67E5{0}]
 
 # 0: string
-compiler.misc.verbose.parsing.done=[\u89E3\u6790\u5DF2\u5B8C\u6210, \u7528\u65F6 {0} \u6BEB\u79D2]
+compiler.misc.verbose.parsing.done=[\u8BED\u6CD5\u5206\u6790\u5DF2\u5B8C\u6210, \u7528\u65F6 {0} \u6BEB\u79D2]
 
 # 0: file name
-compiler.misc.verbose.parsing.started=[\u89E3\u6790\u5F00\u59CB\u65F6\u95F4 {0}]
+compiler.misc.verbose.parsing.started=[\u8BED\u6CD5\u5206\u6790\u5F00\u59CB\u65F6\u95F4 {0}]
 
 # 0: string
 compiler.misc.verbose.total=[\u5171 {0} \u6BEB\u79D2]
@@ -1102,7 +1161,7 @@
 # 0: symbol
 compiler.warn.constant.SVUID=serialVersionUID \u5728\u7C7B{0}\u4E2D\u5FC5\u987B\u662F\u5E38\u91CF
 
-# 0: file name
+# 0: path
 compiler.warn.dir.path.element.not.found=\u9519\u8BEF\u7684\u8DEF\u5F84\u5143\u7D20 "{0}": \u6CA1\u6709\u8FD9\u79CD\u76EE\u5F55
 
 # 0: file name
@@ -1160,12 +1219,13 @@
 # 0: message segment
 compiler.warn.override.varargs.extra={0}; \u8986\u76D6\u7684\u65B9\u6CD5\u7F3A\u5C11 ''...''
 
+# 0: message segment
 compiler.warn.override.bridge={0}; \u88AB\u8986\u76D6\u7684\u65B9\u6CD5\u4E3A bridge \u65B9\u6CD5
 
 # 0: symbol
 compiler.warn.pkg-info.already.seen=\u5DF2\u627E\u5230\u7A0B\u5E8F\u5305{0}\u7684 package-info.java \u6587\u4EF6
 
-# 0: file name
+# 0: path
 compiler.warn.path.element.not.found=\u9519\u8BEF\u7684\u8DEF\u5F84\u5143\u7D20 "{0}": \u6CA1\u6709\u8FD9\u79CD\u6587\u4EF6\u6216\u76EE\u5F55
 
 compiler.warn.possible.fall-through.into.case=\u53EF\u80FD\u65E0\u6CD5\u5B9E\u73B0 case
@@ -1210,13 +1270,13 @@
 # 0: string
 compiler.warn.proc.package.does.not.exist=\u7A0B\u5E8F\u5305{0}\u4E0D\u5B58\u5728
 
-# 0: name
+# 0: string
 compiler.warn.proc.file.reopening=\u5C1D\u8BD5\u591A\u6B21\u4E3A ''{0}'' \u521B\u5EFA\u6587\u4EF6
 
 # 0: name
 compiler.warn.proc.type.already.exists=\u7C7B\u578B ''{0}'' \u7684\u6587\u4EF6\u5DF2\u7ECF\u5B58\u5728\u4E8E\u6E90\u8DEF\u5F84\u6216\u7C7B\u8DEF\u5F84\u4E2D
 
-# 0: name
+# 0: string
 compiler.warn.proc.type.recreate=\u5C1D\u8BD5\u591A\u6B21\u521B\u5EFA\u7C7B\u578B ''{0}'' \u7684\u6587\u4EF6
 
 # 0: string
@@ -1225,7 +1285,7 @@
 # 0: string, 1: string
 compiler.warn.proc.suspicious.class.name=\u6B63\u5728\u4E3A\u540D\u79F0\u4EE5{1}\u7ED3\u5C3E\u7684\u7C7B\u578B\u521B\u5EFA\u6587\u4EF6: ''{0}''
 
-# 0: name
+# 0: string
 compiler.warn.proc.file.create.last.round=\u5C06\u4E0D\u5BF9\u5728\u6700\u540E\u4E00\u4E2A\u5FAA\u73AF\u4E2D\u521B\u5EFA\u7684\u7C7B\u578B\u4E3A ''{0}'' \u7684\u6587\u4EF6\u8FDB\u884C\u6CE8\u91CA\u5904\u7406\u3002
 
 # 0: string, 1: string
@@ -1247,7 +1307,7 @@
 # 0: string
 compiler.warn.proc.messager={0}
 
-# 0: set of name
+# 0: set of string
 compiler.warn.proc.unclosed.type.files=\u7C7B\u578B ''{0}'' \u7684\u6587\u4EF6\u672A\u5173\u95ED; \u5C06\u4E0D\u9488\u5BF9\u8FD9\u4E9B\u7C7B\u578B\u8FDB\u884C\u6CE8\u91CA\u5904\u7406
 
 # 0: string
@@ -1285,13 +1345,16 @@
 
 compiler.warn.missing.deprecated.annotation=\u672A\u4F7F\u7528 @Deprecated \u5BF9\u5DF2\u8FC7\u65F6\u7684\u9879\u76EE\u8FDB\u884C\u6CE8\u91CA
 
-# 0: symbol kind
+# 0: kind name
 compiler.warn.deprecated.annotation.has.no.effect=@Deprecated \u6CE8\u91CA\u5BF9\u6B64 {0} \u58F0\u660E\u6CA1\u6709\u4EFB\u4F55\u6548\u679C
 
+# 0: string
 compiler.warn.invalid.path=\u65E0\u6548\u6587\u4EF6\u540D: {0}
 
+# 0: path
 compiler.warn.invalid.archive.file=\u4EE5\u4E0B\u8DEF\u5F84\u4E2D\u5B58\u5728\u610F\u5916\u7684\u6587\u4EF6: {0}
 
+# 0: path
 compiler.warn.unexpected.archive.file=\u4EE5\u4E0B\u6863\u6848\u6587\u4EF6\u5B58\u5728\u610F\u5916\u7684\u6269\u5C55\u540D: {0}
 
 # 0: path
@@ -1301,22 +1364,25 @@
 
 compiler.warn.empty.if=if \u4E4B\u540E\u6CA1\u6709\u8BED\u53E5
 
+# 0: type, 1: name
 compiler.warn.annotation.method.not.found=\u65E0\u6CD5\u627E\u5230\u7C7B\u578B ''{0}'' \u7684\u6CE8\u91CA\u65B9\u6CD5 ''{1}()''
 
+# 0: type, 1: name, 2: message segment
 compiler.warn.annotation.method.not.found.reason=\u65E0\u6CD5\u627E\u5230\u7C7B\u578B ''{0}'' \u7684\u6CE8\u91CA\u65B9\u6CD5 ''{1}()'': {2}
 
-# 0: symbol, 1: name
+# 0: file object, 1: symbol, 2: name
 compiler.warn.unknown.enum.constant=\u672A\u77E5\u7684\u679A\u4E3E\u5E38\u91CF {1}.{2}
 
-# 0: symbol, 1: name, 2: message segment
+# 0: file object, 1: symbol, 2: name, 3: message segment
 compiler.warn.unknown.enum.constant.reason=\u672A\u77E5\u7684\u679A\u4E3E\u5E38\u91CF {1}.{2}\n\u539F\u56E0: {3}
 
 # 0: type, 1: type
 compiler.warn.raw.class.use=\u627E\u5230\u539F\u59CB\u7C7B\u578B: {0}\n\u7F3A\u5C11\u6CDB\u578B\u7C7B{1}\u7684\u7C7B\u578B\u53C2\u6570
 
-# 0: unused, 1: unused
 compiler.warn.diamond.redundant.args=\u65B0\u8868\u8FBE\u5F0F\u4E2D\u5B58\u5728\u5197\u4F59\u7C7B\u578B\u53C2\u6570 (\u6539\u7528 diamond \u8FD0\u7B97\u7B26)\u3002
 
+compiler.warn.local.redundant.type=\u672C\u5730\u53D8\u91CF\u7684\u5197\u4F59\u7C7B\u578B (\u4F7F\u7528 ''var'' \u66FF\u6362\u663E\u5F0F\u7C7B\u578B)\u3002
+
 compiler.warn.potential.lambda.found=\u53EF\u5C06\u6B64\u533F\u540D\u5185\u90E8\u7C7B\u521B\u5EFA\u8F6C\u6362\u4E3A lambda \u8868\u8FBE\u5F0F\u3002
 
 compiler.warn.method.redundant.typeargs=\u65B9\u6CD5\u8C03\u7528\u4E2D\u5B58\u5728\u5197\u4F59\u7C7B\u578B\u53C2\u6570\u3002
@@ -1370,7 +1436,7 @@
 # 0: token, 1: token, 2: token
 compiler.err.expected3=\u9700\u8981{0}, {1}\u6216{2}
 
-compiler.err.premature.eof=\u8FDB\u884C\u89E3\u6790\u65F6\u5DF2\u5230\u8FBE\u6587\u4EF6\u7ED3\u5C3E
+compiler.err.premature.eof=\u8FDB\u884C\u8BED\u6CD5\u5206\u6790\u65F6\u5DF2\u5230\u8FBE\u6587\u4EF6\u7ED3\u5C3E
 
 ## The following are related in form, but do not easily fit the above paradigm.
 compiler.err.expected.module=\u9700\u8981 ''module''
@@ -1440,6 +1506,7 @@
 
 compiler.misc.module.info.invalid.super.class=\u5E26\u6709\u65E0\u6548\u8D85\u7C7B\u7684 module-info
 
+# 0: name
 compiler.misc.class.file.not.found=\u627E\u4E0D\u5230{0}\u7684\u7C7B\u6587\u4EF6
 
 # 0: string (constant value), 1: symbol (constant field), 2: type (field type)
@@ -1460,6 +1527,7 @@
 # 0: name
 compiler.misc.file.doesnt.contain.class=\u6587\u4EF6\u4E0D\u5305\u542B\u7C7B{0}
 
+# 0: symbol
 compiler.misc.file.does.not.contain.package=\u6587\u4EF6\u4E0D\u5305\u542B\u7A0B\u5E8F\u5305{0}
 
 compiler.misc.file.does.not.contain.module=\u6587\u4EF6\u4E0D\u5305\u542B\u6A21\u5757\u58F0\u660E
@@ -1516,12 +1584,12 @@
 # compiler.err.no.elem.type=\
 #     \[\*\] cannot have a type
 
-# 0: type
+# 0: message segment
 compiler.misc.try.not.applicable.to.type=try-with-resources \u4E0D\u9002\u7528\u4E8E\u53D8\u91CF\u7C7B\u578B\n({0})
 
 #####
 
-# 0: message segment or type, 1: message segment
+# 0: object, 1: message segment
 compiler.err.type.found.req=\u610F\u5916\u7684\u7C7B\u578B\n\u9700\u8981: {1}\n\u627E\u5230:    {0}
 
 ## The following are all possible strings for the first argument ({0}) of the
@@ -1597,10 +1665,9 @@
 # 0: list of type, 1: message segment
 compiler.misc.diamond.invalid.args=\u6B64\u4E0A\u4E0B\u6587\u4E2D\u4E0D\u5141\u8BB8\u4F7F\u7528\u4E3A{1}\u63A8\u65AD\u7684\u7C7B\u578B\u53C2\u6570{0}\n\u63A8\u65AD\u53C2\u6570\u5728\u7B7E\u540D\u5C5E\u6027\u4E2D\u65E0\u6CD5\u8868\u8FBE
 
-# 0: unused
+# 0: type
 compiler.misc.diamond.and.explicit.params=\u4E0D\u80FD\u5C06 ''<>'' \u4E0E\u6784\u9020\u5668\u7684\u663E\u5F0F\u7C7B\u578B\u53C2\u6570\u4E00\u8D77\u4F7F\u7528
 
-# 0: unused
 compiler.misc.mref.infer.and.explicit.params=\u4E0D\u80FD\u5C06\u539F\u59CB\u6784\u9020\u5668\u5F15\u7528\u4E0E\u6784\u9020\u5668\u7684\u663E\u5F0F\u7C7B\u578B\u53C2\u6570\u4E00\u8D77\u4F7F\u7528
 
 # 0: type, 1: list of type
@@ -1623,7 +1690,7 @@
 compiler.warn.auxiliary.class.accessed.from.outside.of.its.source.file={1} \u4E2D\u7684\u8F85\u52A9\u7C7B{0}\u4E0D\u5E94\u4ECE\u5176\u81EA\u8EAB\u7684\u6E90\u6587\u4EF6\u4EE5\u5916\u8BBF\u95EE
 
 ## The first argument ({0}) is a "kindname".
-# 0: symbol kind, 1: symbol, 2: symbol
+# 0: kind name, 1: symbol, 2: symbol
 compiler.err.abstract.cant.be.accessed.directly=\u65E0\u6CD5\u76F4\u63A5\u8BBF\u95EE{2}\u4E2D\u7684\u62BD\u8C61{0} {1}
 
 ## The first argument ({0}) is a "kindname".
@@ -1641,6 +1708,7 @@
 
 ## Both arguments ({0}, {1}) are "kindname"s.  {0} is a comma-separated list
 ## of kindnames (the list should be identical to that provided in source.
+# 0: set of kind name, 1: set of kind name
 compiler.err.unexpected.type=\u610F\u5916\u7684\u7C7B\u578B\n\u9700\u8981: {0}\n\u627E\u5230:    {1}
 
 compiler.err.unexpected.lambda=\u6B64\u5904\u4E0D\u5E94\u4E3A lambda \u8868\u8FBE\u5F0F
@@ -1651,32 +1719,32 @@
 ## The second argument {1} is the non-resolved symbol
 ## The third argument {2} is a list of type parameters (non-empty if {1} is a method)
 ## The fourth argument {3} is a list of argument types (non-empty if {1} is a method)
-# 0: symbol kind, 1: name, 2: unused, 3: unused
+# 0: kind name, 1: name, 2: unused, 3: unused
 compiler.err.cant.resolve=\u627E\u4E0D\u5230\u7B26\u53F7\n\u7B26\u53F7: {0} {1}
 
-# 0: symbol kind, 1: name, 2: unused, 3: list of type
+# 0: kind name, 1: name, 2: unused, 3: list of type
 compiler.err.cant.resolve.args=\u627E\u4E0D\u5230\u7B26\u53F7\n\u7B26\u53F7: {0} {1}({3})
 
-# 0: symbol kind, 1: name, 2: list of type, 3: list of type
+# 0: kind name, 1: name, 2: list of type, 3: list of type
 compiler.err.cant.resolve.args.params=\u627E\u4E0D\u5230\u7B26\u53F7\n\u7B26\u53F7: {0} <{2}>{1}({3})
 
 ## arguments from {0} to {3} have the same meaning as above
 ## The fifth argument {4} is a location subdiagnostic (see below)
-# 0: symbol kind, 1: name, 2: unused, 3: unused, 4: message segment
+# 0: kind name, 1: name, 2: unused, 3: unused, 4: message segment
 compiler.err.cant.resolve.location=\u627E\u4E0D\u5230\u7B26\u53F7\n\u7B26\u53F7:   {0} {1}\n\u4F4D\u7F6E: {4}
 
-# 0: symbol kind, 1: name, 2: unused, 3: list of type, 4: message segment
+# 0: kind name, 1: name, 2: unused, 3: list of type, 4: message segment
 compiler.err.cant.resolve.location.args=\u627E\u4E0D\u5230\u7B26\u53F7\n\u7B26\u53F7:   {0} {1}({3})\n\u4F4D\u7F6E: {4}
 
-# 0: symbol kind, 1: name, 2: list of type, 3: list, 4: message segment
+# 0: kind name, 1: name, 2: list of type, 3: list, 4: message segment
 compiler.err.cant.resolve.location.args.params=\u627E\u4E0D\u5230\u7B26\u53F7\n\u7B26\u53F7:   {0} <{2}>{1}({3})\n\u4F4D\u7F6E: {4}
 
 ### Following are replicated/used for method reference diagnostics
 
-# 0: symbol kind, 1: name, 2: unused, 3: list of type, 4: message segment
+# 0: kind name, 1: name, 2: unused, 3: list of type, 4: message segment
 compiler.misc.cant.resolve.location.args=\u627E\u4E0D\u5230\u7B26\u53F7\n\u7B26\u53F7:   {0} {1}({3})\n\u4F4D\u7F6E: {4}
 
-# 0: symbol kind, 1: name, 2: list of type, 3: list, 4: message segment
+# 0: kind name, 1: name, 2: list of type, 3: list, 4: message segment
 compiler.misc.cant.resolve.location.args.params=\u627E\u4E0D\u5230\u7B26\u53F7\n\u7B26\u53F7:   {0} <{2}>{1}({3})\n\u4F4D\u7F6E: {4}
 
 ##a location subdiagnostic is composed as follows:
@@ -1684,10 +1752,10 @@
 ## The second argument {1} is the location name
 ## The third argument {2} is the location type (only when {1} is a variable name)
 
-# 0: symbol kind, 1: type or symbol, 2: unused
+# 0: kind name, 1: type or symbol, 2: unused
 compiler.misc.location={0} {1}
 
-# 0: symbol kind, 1: symbol, 2: type
+# 0: kind name, 1: symbol, 2: type
 compiler.misc.location.1=\u7C7B\u578B\u4E3A{2}\u7684{0} {1}
 
 ## The following are all possible string for "kindname".
@@ -1732,7 +1800,7 @@
 # 0: message segment
 compiler.err.override.static={0}\n\u8986\u76D6\u7684\u65B9\u6CD5\u4E3A static
 
-# 0: message segment, 1: set of modifier
+# 0: message segment, 1: set of flag
 compiler.err.override.meth={0}\n\u88AB\u8986\u76D6\u7684\u65B9\u6CD5\u4E3A{1}
 
 # 0: message segment, 1: type
@@ -1740,7 +1808,7 @@
 
 # In the following string {1} is a space separated list of Java Keywords, as
 # they would have been declared in the source code
-# 0: message segment, 1: set of modifier
+# 0: message segment, 1: set of flag or string
 compiler.err.override.weaker.access={0}\n\u6B63\u5728\u5C1D\u8BD5\u5206\u914D\u66F4\u4F4E\u7684\u8BBF\u95EE\u6743\u9650; \u4EE5\u524D\u4E3A{1}
 
 # 0: message segment, 1: type, 2: type
@@ -1787,30 +1855,64 @@
 # 0: symbol, 1: symbol, 2: symbol, 3: symbol
 compiler.misc.varargs.clash.with={1}\u4E2D\u7684{0}\u8986\u76D6\u4E86{3}\u4E2D\u7684{2}
 
-# 0: symbol kind, 1: symbol, 2: symbol, 3: message segment
+# 0: kind name, 1: symbol, 2: symbol, 3: message segment
 compiler.misc.inapplicable.method={0} {1}.{2}\u4E0D\u9002\u7528\n({3})
 
 ########################################
-# Diagnostics for language feature changes
+# Diagnostics for language feature changes.
+# Such diagnostics have a common template which can be customized by using a feature
+# diagnostic fragment (one of those given below).
 ########################################
 
-# 0: string
-compiler.err.modules.not.supported.in.source=-source {0} \u4E2D\u4E0D\u652F\u6301\u6A21\u5757\n(\u8BF7\u4F7F\u7528 -source 9 \u6216\u66F4\u9AD8\u7248\u672C\u4EE5\u542F\u7528\u6A21\u5757)
-
-# 0: string
-compiler.misc.diamond.and.anon.class.not.supported.in.source=\u5728 -source {0} \u4E2D\u65E0\u6CD5\u4F7F\u7528\u5E26\u6709\u533F\u540D\u5185\u90E8\u7C7B\u7684 ''<>''\n(\u8BF7\u4F7F\u7528 -source 9 \u6216\u66F4\u9AD8\u7248\u672C\u4EE5\u5141\u8BB8\u5E26\u6709\u533F\u540D\u5185\u90E8\u7C7B\u7684 ''<>'')
-
-# 0: string
-compiler.err.unsupported.binary.lit=-source {0} \u4E2D\u4E0D\u652F\u6301\u4E8C\u8FDB\u5236\u6587\u5B57\n(\u8BF7\u4F7F\u7528 -source 7 \u6216\u66F4\u9AD8\u7248\u672C\u4EE5\u542F\u7528\u4E8C\u8FDB\u5236\u6587\u5B57)
-
-# 0: string
-compiler.err.unsupported.underscore.lit=-source {0} \u4E2D\u4E0D\u652F\u6301\u6587\u5B57\u4E2D\u5B58\u5728\u4E0B\u5212\u7EBF\n(\u8BF7\u4F7F\u7528 -source 7 \u6216\u66F4\u9AD8\u7248\u672C\u4EE5\u5141\u8BB8\u6587\u5B57\u4E2D\u5B58\u5728\u4E0B\u5212\u7EBF)
-
-# 0: string
-compiler.err.try.with.resources.not.supported.in.source=-source {0} \u4E2D\u4E0D\u652F\u6301 try-with-resources\n(\u8BF7\u4F7F\u7528 -source 7 \u6216\u66F4\u9AD8\u7248\u672C\u4EE5\u542F\u7528 try-with-resources)
-
-# 0: string
-compiler.err.var.in.try.with.resources.not.supported.in.source=-source {0} \u4E2D\u4E0D\u652F\u6301\u5728 try-with-resources \u4F7F\u7528\u53D8\u91CF\n(\u8BF7\u4F7F\u7528 -source 9 \u6216\u66F4\u9AD8\u7248\u672C\u4EE5\u5141\u8BB8\u5728 try-with-resources \u4E2D\u4F7F\u7528\u53D8\u91CF)
+# 0: message segment (feature), 1: string (found version), 2: string (expected version)
+compiler.err.feature.not.supported.in.source=-source {1} \u4E2D\u4E0D\u652F\u6301 {0}\n(\u8BF7\u4F7F\u7528 -source {2} \u6216\u66F4\u9AD8\u7248\u672C\u4EE5\u542F\u7528 {0})
+
+# 0: message segment (feature), 1: string (found version), 2: string (expected version)
+compiler.err.feature.not.supported.in.source.plural=-source {1} \u4E2D\u4E0D\u652F\u6301 {0}\n(\u8BF7\u4F7F\u7528 -source {2} \u6216\u66F4\u9AD8\u7248\u672C\u4EE5\u542F\u7528 {0})
+
+# 0: message segment (feature), 1: string (found version), 2: string (expected version)
+compiler.misc.feature.not.supported.in.source=-source {1} \u4E2D\u4E0D\u652F\u6301 {0}\n(\u8BF7\u4F7F\u7528 -source {2} \u6216\u66F4\u9AD8\u7248\u672C\u4EE5\u542F\u7528 {0})
+
+# 0: message segment (feature), 1: string (found version), 2: string (expected version)
+compiler.misc.feature.not.supported.in.source.plural=-source {1} \u4E2D\u4E0D\u652F\u6301 {0}\n(\u8BF7\u4F7F\u7528 -source {2} \u6216\u66F4\u9AD8\u7248\u672C\u4EE5\u542F\u7528 {0})
+
+compiler.misc.feature.modules=\u6A21\u5757
+
+compiler.misc.feature.diamond.and.anon.class=''<>'' \u5177\u6709\u533F\u540D\u7684\u5185\u90E8\u7C7B
+
+compiler.misc.feature.binary.lit=\u4E8C\u8FDB\u5236\u6587\u5B57
+
+compiler.misc.feature.underscore.lit=\u6587\u5B57\u4E2D\u7684\u4E0B\u5212\u7EBF
+
+compiler.misc.feature.try.with.resources=try-with-resources
+
+compiler.misc.feature.var.in.try.with.resources=try-with-resources \u4E2D\u7684\u53D8\u91CF
+
+compiler.misc.feature.type.annotations=\u7C7B\u578B\u6CE8\u91CA
+
+compiler.misc.feature.annotations.after.type.params=\u5728\u65B9\u6CD5\u7C7B\u578B\u53C2\u6570\u4E4B\u540E\u7684\u6CE8\u91CA
+
+compiler.misc.feature.repeatable.annotations=\u91CD\u590D\u7684\u6CE8\u91CA
+
+compiler.misc.feature.diamond=diamond \u8FD0\u7B97\u7B26
+
+compiler.misc.feature.multicatch=multi-catch \u8BED\u53E5
+
+compiler.misc.feature.string.switch=switch \u4E2D\u7684\u5B57\u7B26\u4E32
+
+compiler.misc.feature.lambda=lambda \u8868\u8FBE\u5F0F
+
+compiler.misc.feature.method.references=\u65B9\u6CD5\u5F15\u7528
+
+compiler.misc.feature.default.methods=\u9ED8\u8BA4\u65B9\u6CD5
+
+compiler.misc.feature.intersection.types.in.cast=\u4EA4\u53C9\u7C7B\u578B
+
+compiler.misc.feature.static.intf.methods=\u9759\u6001\u63A5\u53E3\u65B9\u6CD5
+
+compiler.misc.feature.static.intf.method.invoke=\u9759\u6001\u63A5\u53E3\u65B9\u6CD5\u8C03\u7528
+
+compiler.misc.feature.private.intf.methods=\u79C1\u6709\u63A5\u53E3\u65B9\u6CD5
 
 compiler.warn.underscore.as.identifier=\u4ECE\u53D1\u884C\u7248 9 \u5F00\u59CB, ''_'' \u4E3A\u5173\u952E\u5B57, \u4E0D\u80FD\u7528\u4F5C\u6807\u8BC6\u7B26
 
@@ -1825,15 +1927,14 @@
 # TODO 308: make a better error message
 compiler.err.this.as.identifier=\u4ECE\u53D1\u884C\u7248 8 \u5F00\u59CB, ''this'' \u53EA\u80FD\u4F5C\u4E3A\u63A5\u6536\u65B9\u7C7B\u578B\u7684\u53C2\u6570\u540D, \u8BE5\u53C2\u6570\u5FC5\u987B\u4E3A\u7B2C\u4E00\u4E2A\u53C2\u6570
 
-# 0: symbol
 compiler.err.receiver.parameter.not.applicable.constructor.toplevel.class=\u63A5\u6536\u65B9\u53C2\u6570\u4E0D\u9002\u7528\u4E8E\u9876\u5C42\u7C7B\u7684\u6784\u9020\u5668
 
 # TODO 308: make a better error message
-# 0: symbol
+# 0: annotation
 compiler.err.cant.type.annotate.scoping.1=\u65E0\u6CD5\u4F7F\u7528 type-use \u6CE8\u91CA {0} \u6765\u6CE8\u91CA\u786E\u5B9A\u4F5C\u7528\u57DF\u7ED3\u6784
 
 # TODO 308: make a better error message
-# 0: list of symbol
+# 0: list of annotation
 compiler.err.cant.type.annotate.scoping=\u65E0\u6CD5\u4F7F\u7528 type-use \u6CE8\u91CA {0} \u6765\u6CE8\u91CA\u786E\u5B9A\u4F5C\u7528\u57DF\u7ED3\u6784
 
 # 0: type, 1: type
@@ -1850,45 +1951,6 @@
 
 compiler.err.no.annotations.on.dot.class=\u7C7B\u6587\u5B57\u7C7B\u578B\u4E2D\u4E0D\u5141\u8BB8\u4F7F\u7528\u4EFB\u4F55\u6CE8\u91CA
 
-# 0: string
-compiler.err.type.annotations.not.supported.in.source=-source {0} \u4E2D\u4E0D\u652F\u6301\u7C7B\u578B\u6CE8\u91CA\n(\u8BF7\u4F7F\u7528 -source 8 \u6216\u66F4\u9AD8\u7248\u672C\u4EE5\u542F\u7528\u7C7B\u578B\u6CE8\u91CA)
-
-# 0: string
-compiler.err.annotations.after.type.params.not.supported.in.source=-source {0} \u4E2D\u4E0D\u652F\u6301\u65B9\u6CD5\u7C7B\u578B\u53C2\u6570\u540E\u7684\u6CE8\u91CA\n(\u8BF7\u4F7F\u7528 -source 8 \u6216\u66F4\u9AD8\u7248\u672C\u4EE5\u542F\u7528\u65B9\u6CD5\u7C7B\u578B\u53C2\u6570\u540E\u7684\u6CE8\u91CA)
-
-# 0: string
-compiler.err.repeatable.annotations.not.supported.in.source=-source {0}\u4E2D\u4E0D\u652F\u6301\u91CD\u590D\u6CE8\u91CA\n(\u8BF7\u4F7F\u7528 -source 8 \u6216\u66F4\u9AD8\u7248\u672C\u4EE5\u542F\u7528\u91CD\u590D\u6CE8\u91CA)
-
-# 0: string
-compiler.err.diamond.not.supported.in.source=-source {0} \u4E2D\u4E0D\u652F\u6301 diamond \u8FD0\u7B97\u7B26\n(\u8BF7\u4F7F\u7528 -source 7 \u6216\u66F4\u9AD8\u7248\u672C\u4EE5\u542F\u7528 diamond \u8FD0\u7B97\u7B26)
-
-# 0: string
-compiler.err.multicatch.not.supported.in.source=-source {0} \u4E2D\u4E0D\u652F\u6301 multi-catch \u8BED\u53E5\n(\u8BF7\u4F7F\u7528 -source 7 \u6216\u66F4\u9AD8\u7248\u672C\u4EE5\u542F\u7528 multi-catch \u8BED\u53E5)
-
-# 0: string
-compiler.err.string.switch.not.supported.in.source=-source {0} \u4E2D\u4E0D\u652F\u6301 switch \u4E2D\u5B58\u5728\u5B57\u7B26\u4E32\n(\u8BF7\u4F7F\u7528 -source 7 \u6216\u66F4\u9AD8\u7248\u672C\u4EE5\u5141\u8BB8 switch \u4E2D\u5B58\u5728\u5B57\u7B26\u4E32)
-
-# 0: string
-compiler.err.lambda.not.supported.in.source=-source {0} \u4E2D\u4E0D\u652F\u6301 lambda \u8868\u8FBE\u5F0F\n(\u8BF7\u4F7F\u7528 -source 8 \u6216\u66F4\u9AD8\u7248\u672C\u4EE5\u542F\u7528 lambda \u8868\u8FBE\u5F0F)
-
-# 0: string
-compiler.err.method.references.not.supported.in.source=-source {0} \u4E2D\u4E0D\u652F\u6301\u65B9\u6CD5\u5F15\u7528\n(\u8BF7\u4F7F\u7528 -source 8 \u6216\u66F4\u9AD8\u7248\u672C\u4EE5\u542F\u7528\u65B9\u6CD5\u5F15\u7528)
-
-# 0: string
-compiler.err.default.methods.not.supported.in.source=-source {0} \u4E2D\u4E0D\u652F\u6301\u9ED8\u8BA4\u65B9\u6CD5\n(\u8BF7\u4F7F\u7528 -source 8 \u6216\u66F4\u9AD8\u7248\u672C\u4EE5\u542F\u7528\u9ED8\u8BA4\u65B9\u6CD5)
-
-# 0: string
-compiler.err.intersection.types.in.cast.not.supported.in.source=-source {0} \u4E2D\u4E0D\u652F\u6301\u8F6C\u6362\u4E2D\u7684\u4EA4\u53C9\u7C7B\u578B\n(\u8BF7\u4F7F\u7528 -source 8 \u6216\u66F4\u9AD8\u7248\u672C\u4EE5\u542F\u7528\u8F6C\u6362\u4E2D\u7684\u4EA4\u53C9\u7C7B\u578B)
-
-# 0: string
-compiler.err.static.intf.methods.not.supported.in.source=-source {0} \u4E2D\u4E0D\u652F\u6301\u9759\u6001\u63A5\u53E3\u65B9\u6CD5\n(\u8BF7\u4F7F\u7528 -source 8 \u6216\u66F4\u9AD8\u7248\u672C\u4EE5\u542F\u7528\u9759\u6001\u63A5\u53E3\u65B9\u6CD5)
-
-# 0: string
-compiler.err.static.intf.method.invoke.not.supported.in.source=-source {0} \u4E2D\u4E0D\u652F\u6301\u9759\u6001\u63A5\u53E3\u65B9\u6CD5\u8C03\u7528\n(\u8BF7\u4F7F\u7528 -source 8 \u6216\u66F4\u9AD8\u7248\u672C\u4EE5\u542F\u7528\u9759\u6001\u63A5\u53E3\u65B9\u6CD5\u8C03\u7528)
-
-# 0: string
-compiler.err.private.intf.methods.not.supported.in.source=-source {0} \u4E2D\u4E0D\u652F\u6301\u79C1\u6709\u63A5\u53E3\u65B9\u6CD5\n(\u8BF7\u4F7F\u7528 -source 9 \u6216\u66F4\u9AD8\u7248\u672C\u4EE5\u542F\u7528\u79C1\u6709\u63A5\u53E3\u65B9\u6CD5)
-
 ########################################
 # Diagnostics for verbose resolution
 # used by Resolve (debug only)
@@ -2120,6 +2182,9 @@
 # 0: symbol, 1: name, 2: symbol, 3: symbol
 compiler.err.package.clash.from.requires=\u6A21\u5757 {0} \u540C\u65F6\u4ECE {2} \u548C {3} \u8BFB\u53D6\u7A0B\u5E8F\u5305 {1}
 
+# 0: name, 1: symbol, 2: symbol
+compiler.err.package.clash.from.requires.in.unnamed=\u672A\u547D\u540D\u7684\u6A21\u5757\u540C\u65F6\u4ECE {1} \u548C {2} \u8BFB\u53D6\u7A0B\u5E8F\u5305 {0}
+
 # 0: string
 compiler.err.module.not.found.in.module.source.path=\u5728\u6A21\u5757\u6E90\u8DEF\u5F84\u4E2D\u627E\u4E0D\u5230\u6A21\u5757 {0}
 
@@ -2153,9 +2218,6 @@
 # 0: symbol
 compiler.err.add.reads.with.release=\u4E0D\u5141\u8BB8\u5728\u4F7F\u7528 --release \u65F6\u4E3A\u7CFB\u7EDF\u6A21\u5757 {0} \u6DFB\u52A0\u8BFB\u53D6\u7EF4\u8FB9:
 
-# 0: symbol
-compiler.err.patch.module.with.release=\u4E0D\u5141\u8BB8\u5728\u4F7F\u7528 --release \u65F6\u4E3A\u7CFB\u7EDF\u6A21\u5757 {0} \u6253\u8865\u4E01
-
 compiler.warn.addopens.ignored=--add-opens \u5728\u7F16\u8BD1\u65F6\u6CA1\u6709\u4EFB\u4F55\u6548\u679C
 
 compiler.misc.locn.module_source_path=\u6A21\u5757\u6E90\u8DEF\u5F84
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/javac_ja.properties	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/javac_ja.properties	Tue Jan 30 16:41:40 2018 +0100
@@ -215,6 +215,8 @@
 javac.err.file.not.directory=\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u3067\u306F\u3042\u308A\u307E\u305B\u3093: {0}
 javac.err.file.not.file=\u30D5\u30A1\u30A4\u30EB\u3067\u306F\u3042\u308A\u307E\u305B\u3093: {0}
 javac.err.cannot.access.runtime.env=\u5B9F\u884C\u6642\u74B0\u5883\u306B\u30A2\u30AF\u30BB\u30B9\u3067\u304D\u307E\u305B\u3093
+javac.err.two.class.loaders.1=javac\u304C\u8907\u6570\u306E\u30AF\u30E9\u30B9\u30FB\u30ED\u30FC\u30C0\u30FC\u9593\u3067\u5206\u5272\u3055\u308C\u3066\u3044\u307E\u3059: \u69CB\u6210\u3092\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044
+javac.err.two.class.loaders.2=javac\u304C\u8907\u6570\u306E\u30AF\u30E9\u30B9\u30FB\u30ED\u30FC\u30C0\u30FC\u9593\u3067\u5206\u5272\u3055\u308C\u3066\u3044\u307E\u3059:\n\u30AF\u30E9\u30B9\u306E\u53D6\u5F97\u5143\u30D5\u30A1\u30A4\u30EB: {0}\njavac\u306E\u53D6\u5F97\u5143: {1}
 javac.err.bad.value.for.option={0}\u30AA\u30D7\u30B7\u30E7\u30F3\u306E\u5024\u304C\u4E0D\u6B63\u3067\u3059: ''{1}''
 javac.err.no.value.for.option={0}\u30AA\u30D7\u30B7\u30E7\u30F3\u306E\u5024\u304C\u3042\u308A\u307E\u305B\u3093
 javac.err.repeated.value.for.patch.module={0}\u306B\u5BFE\u3057\u3066--patch-module\u304C\u8907\u6570\u56DE\u6307\u5B9A\u3055\u308C\u3066\u3044\u307E\u3059
@@ -245,5 +247,3 @@
 javac.err.release.bootclasspath.conflict=\u30AA\u30D7\u30B7\u30E7\u30F3{0}\u306F--release\u3068\u4E00\u7DD2\u306B\u4F7F\u7528\u3067\u304D\u307E\u305B\u3093
 
 javac.err.unsupported.release.version=\u30EA\u30EA\u30FC\u30B9\u30FB\u30D0\u30FC\u30B8\u30E7\u30F3{0}\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093
-
-javac.err.release.not.standard.file.manager=--release\u30AA\u30D7\u30B7\u30E7\u30F3\u304C\u6307\u5B9A\u3055\u308C\u3066\u3044\u307E\u3059\u304C\u3001\u6307\u5B9A\u3055\u308C\u305FJavaFileManager\u306FStandardJavaFileManager\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/javac_zh_CN.properties	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/javac_zh_CN.properties	Tue Jan 30 16:41:40 2018 +0100
@@ -215,6 +215,8 @@
 javac.err.file.not.directory=\u4E0D\u662F\u76EE\u5F55: {0}
 javac.err.file.not.file=\u4E0D\u662F\u6587\u4EF6: {0}
 javac.err.cannot.access.runtime.env=\u65E0\u6CD5\u8BBF\u95EE\u8FD0\u884C\u65F6\u73AF\u5883
+javac.err.two.class.loaders.1=javac \u5728\u591A\u4E2A\u7C7B\u52A0\u8F7D\u5668\u4E4B\u95F4\u62C6\u5206: \u8BF7\u68C0\u67E5\u914D\u7F6E
+javac.err.two.class.loaders.2=javac \u5728\u591A\u4E2A\u7C7B\u52A0\u8F7D\u5668\u4E4B\u95F4\u62C6\u5206:\n\u4E00\u4E2A\u7C7B\u6765\u81EA\u6587\u4EF6: {0}\n\u800C javac \u6765\u81EA {1}
 javac.err.bad.value.for.option={0} \u9009\u9879\u7684\u503C\u9519\u8BEF: ''{1}''
 javac.err.no.value.for.option={0} \u9009\u9879\u6CA1\u6709\u503C
 javac.err.repeated.value.for.patch.module=\u4E3A {0} \u591A\u6B21\u6307\u5B9A\u4E86 --patch-module
@@ -245,5 +247,3 @@
 javac.err.release.bootclasspath.conflict=\u9009\u9879 {0} \u4E0D\u80FD\u4E0E --release \u4E00\u8D77\u4F7F\u7528
 
 javac.err.unsupported.release.version=\u4E0D\u652F\u6301\u53D1\u884C\u7248\u672C {0}
-
-javac.err.release.not.standard.file.manager=\u6307\u5B9A\u4E86 --release \u9009\u9879, \u4F46\u63D0\u4F9B\u7684 JavaFileManager \u4E0D\u662F StandardJavaFileManager\u3002
--- a/src/jdk.compiler/share/classes/sun/tools/serialver/resources/serialver_zh_CN.properties	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/jdk.compiler/share/classes/sun/tools/serialver/resources/serialver_zh_CN.properties	Tue Jan 30 16:41:40 2018 +0100
@@ -1,6 +1,6 @@
 NotSerializable=\u7C7B{0}\u65E0\u6CD5\u5E8F\u5217\u5316\u3002
 ClassNotFound=\u627E\u4E0D\u5230\u7C7B{0}\u3002
-error.parsing.classpath=\u5BF9\u7C7B\u8DEF\u5F84 {0} \u8FDB\u884C\u89E3\u6790\u65F6\u51FA\u9519\u3002
+error.parsing.classpath=\u5BF9\u7C7B\u8DEF\u5F84 {0} \u8FDB\u884C\u8BED\u6CD5\u5206\u6790\u65F6\u51FA\u9519\u3002
 error.missing.classpath=\u7F3A\u5C11 -classpath \u9009\u9879\u7684\u53C2\u6570
 invalid.flag=\u65E0\u6548\u6807\u8BB0{0}\u3002
 usage=\u7528\u6CD5: serialver [-classpath classpath] [classname...]
--- a/src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/P11KeyAgreement.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/P11KeyAgreement.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 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
@@ -69,6 +69,17 @@
     // KeyAgreement from SunJCE as fallback for > 2 party agreement
     private KeyAgreement multiPartyAgreement;
 
+    private static class AllowKDF {
+
+        private static final boolean VALUE = getValue();
+
+        private static boolean getValue() {
+            return AccessController.doPrivileged(
+                (PrivilegedAction<Boolean>)
+                () -> Boolean.getBoolean("jdk.crypto.KeyAgreement.legacyKDF"));
+        }
+    }
+
     P11KeyAgreement(Token token, String algorithm, long mechanism) {
         super();
         this.token = token;
@@ -260,6 +271,7 @@
         if (algorithm == null) {
             throw new NoSuchAlgorithmException("Algorithm must not be null");
         }
+
         if (algorithm.equals("TlsPremasterSecret")) {
             // For now, only perform native derivation for TlsPremasterSecret
             // as that is required for FIPS compliance.
@@ -268,6 +280,14 @@
             // (bug not yet filed).
             return nativeGenerateSecret(algorithm);
         }
+
+        if (!algorithm.equalsIgnoreCase("TlsPremasterSecret") &&
+            !AllowKDF.VALUE) {
+
+            throw new NoSuchAlgorithmException("Unsupported secret key "
+                                               + "algorithm: " + algorithm);
+        }
+
         byte[] secret = engineGenerateSecret();
         // Maintain compatibility for SunJCE:
         // verify secret length is sensible for algorithm / truncate
--- a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/oops/CompiledICHolder.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/oops/CompiledICHolder.java	Tue Jan 30 16:41:40 2018 +0100
@@ -40,10 +40,10 @@
   }
 
   private static synchronized void initialize(TypeDataBase db) throws WrongTypeException {
-    Type type    = db.lookupType("CompiledICHolder");
-    holderMethod = new MetadataField(type.getAddressField("_holder_method"), 0);
-    holderKlass  = new MetadataField(type.getAddressField("_holder_klass"), 0);
-    headerSize   = type.getSize();
+    Type type      = db.lookupType("CompiledICHolder");
+    holderMetadata = new MetadataField(type.getAddressField("_holder_metadata"), 0);
+    holderKlass    = new MetadataField(type.getAddressField("_holder_klass"), 0);
+    headerSize     = type.getSize();
   }
 
   public CompiledICHolder(Address addr) {
@@ -55,12 +55,12 @@
   private static long headerSize;
 
   // Fields
-  private static MetadataField holderMethod;
+  private static MetadataField holderMetadata;
   private static MetadataField holderKlass;
 
   // Accessors for declared fields
-  public Method getHolderMethod() { return (Method) holderMethod.getValue(this); }
-  public Klass  getHolderKlass()  { return (Klass)  holderKlass.getValue(this); }
+  public Metadata getHolderMetadata() { return (Metadata) holderMetadata.getValue(this); }
+  public Klass    getHolderKlass()    { return (Klass)    holderKlass.getValue(this); }
 
   public void printValueOn(PrintStream tty) {
     tty.print("CompiledICHolder");
--- a/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/Http1HeaderParser.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/Http1HeaderParser.java	Tue Jan 30 16:41:40 2018 +0100
@@ -213,9 +213,9 @@
         assert state == State.HEADER_FOUND_CR || state == State.HEADER_FOUND_LF;
         char c = (char)input.get();
         if (c == LF && state == State.HEADER_FOUND_CR) {
-            String headerString = sb.toString();
-            sb = new StringBuilder();
-            addHeaderFromString(headerString);
+            // header value will be flushed by
+            // resumeOrSecondCR if next line does not
+            // begin by SP or HT
             state = State.HEADER_FOUND_CR_LF;
         } else if (c == SP || c == HT) {
             sb.append(SP); // parity with MessageHeaders
@@ -229,11 +229,28 @@
 
     private void resumeOrSecondCR(ByteBuffer input) {
         assert state == State.HEADER_FOUND_CR_LF;
-        assert sb.length() == 0;
         char c = (char)input.get();
         if (c == CR) {
+            if (sb.length() > 0) {
+                // no continuation line - flush
+                // previous header value.
+                String headerString = sb.toString();
+                sb = new StringBuilder();
+                addHeaderFromString(headerString);
+            }
             state = State.HEADER_FOUND_CR_LF_CR;
+        } else if (c == SP || c == HT) {
+            assert sb.length() != 0;
+            sb.append(SP); // continuation line
+            state = State.HEADER;
         } else {
+            if (sb.length() > 0) {
+                // no continuation line - flush
+                // previous header value.
+                String headerString = sb.toString();
+                sb = new StringBuilder();
+                addHeaderFromString(headerString);
+            }
             sb.append(c);
             state = State.HEADER;
         }
--- a/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/Http2Connection.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/Http2Connection.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -558,6 +558,15 @@
     }
 
     /**
+     * Streams initiated by a client MUST use odd-numbered stream
+     * identifiers; those initiated by the server MUST use even-numbered
+     * stream identifiers.
+     */
+    private static final boolean isSeverInitiatedStream(int streamid) {
+        return (streamid & 0x1) == 0;
+    }
+
+    /**
      * Handles stream 0 (common) frames that apply to whole connection and passes
      * other stream specific frames to that Stream object.
      *
@@ -602,10 +611,19 @@
                     decodeHeaders((HeaderFrame) frame, decoder);
                 }
 
-                int sid = frame.streamid();
-                if (sid >= nextstreamid && !(frame instanceof ResetFrame)) {
-                    // otherwise the stream has already been reset/closed
-                    resetStream(streamid, ResetFrame.PROTOCOL_ERROR);
+                if (!(frame instanceof ResetFrame)) {
+                    if (isSeverInitiatedStream(streamid)) {
+                        if (streamid < nextPushStream) {
+                            // trailing data on a cancelled push promise stream,
+                            // reset will already have been sent, ignore
+                            Log.logTrace("Ignoring cancelled push promise frame " + frame);
+                        } else {
+                            resetStream(streamid, ResetFrame.PROTOCOL_ERROR);
+                        }
+                    } else if (streamid >= nextstreamid) {
+                        // otherwise the stream has already been reset/closed
+                        resetStream(streamid, ResetFrame.PROTOCOL_ERROR);
+                    }
                 }
                 return;
             }
--- a/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/Stream.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/Stream.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -428,9 +428,10 @@
             Log.logRequest("PUSH_PROMISE: " + pushReq.toString());
         }
         PushGroup<?,T> pushGroup = exchange.getPushGroup();
-        if (pushGroup == null || pushGroup.noMorePushes()) {
-            cancelImpl(new IllegalStateException("unexpected push promise"
-                + " on stream " + streamid));
+        if (pushGroup == null) {
+            Log.logTrace("Rejecting push promise stream " + streamid);
+            connection.resetStream(pushStream.streamid, ResetFrame.REFUSED_STREAM);
+            pushStream.close();
             return;
         }
 
--- a/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotMetaAccessProvider.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotMetaAccessProvider.java	Tue Jan 30 16:41:40 2018 +0100
@@ -34,7 +34,6 @@
 import java.util.Objects;
 
 import jdk.vm.ci.code.CodeUtil;
-import jdk.vm.ci.code.TargetDescription;
 import jdk.vm.ci.common.JVMCIError;
 import jdk.vm.ci.meta.DeoptimizationAction;
 import jdk.vm.ci.meta.DeoptimizationReason;
@@ -284,11 +283,9 @@
                     ResolvedJavaType elementType = lookupJavaType.getComponentType();
                     JavaKind elementKind = elementType.getJavaKind();
                     final int headerSize = getArrayBaseOffset(elementKind);
-                    TargetDescription target = runtime.getHostJVMCIBackend().getTarget();
                     int sizeOfElement = getArrayIndexScale(elementKind);
-                    int alignment = target.wordSize;
                     int log2ElementSize = CodeUtil.log2(sizeOfElement);
-                    return computeArrayAllocationSize(length, alignment, headerSize, log2ElementSize);
+                    return computeArrayAllocationSize(length, headerSize, log2ElementSize);
                 }
                 return lookupJavaType.instanceSize();
             }
@@ -303,11 +300,13 @@
      * alignment requirements.
      *
      * @param length the number of elements in the array
-     * @param alignment the object alignment requirement
      * @param headerSize the size of the array header
      * @param log2ElementSize log2 of the size of an element in the array
+     * @return the size of the memory chunk
      */
-    public static int computeArrayAllocationSize(int length, int alignment, int headerSize, int log2ElementSize) {
+    public int computeArrayAllocationSize(int length, int headerSize, int log2ElementSize) {
+        HotSpotVMConfig config = runtime.getConfig();
+        int alignment = config.objectAlignment;
         int size = (length << log2ElementSize) + headerSize + (alignment - 1);
         int mask = ~(alignment - 1);
         return size & mask;
--- a/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotVMConfig.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotVMConfig.java	Tue Jan 30 16:41:40 2018 +0100
@@ -68,6 +68,8 @@
 
     final boolean useCompressedOops = getFlag("UseCompressedOops", Boolean.class);
 
+    final int objectAlignment = getFlag("ObjectAlignmentInBytes", Integer.class);
+
     final int prototypeMarkWordOffset = getFieldOffset("Klass::_prototype_header", Integer.class, "markOop");
     final int subklassOffset = getFieldOffset("Klass::_subklass", Integer.class, "Klass*");
     final int nextSiblingOffset = getFieldOffset("Klass::_next_sibling", Integer.class, "Klass*");
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/HotSpotReplacementsUtil.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/HotSpotReplacementsUtil.java	Tue Jan 30 16:41:40 2018 +0100
@@ -566,6 +566,28 @@
     }
 
     @Fold
+    public static int objectAlignment(@InjectedParameter GraalHotSpotVMConfig config) {
+        return config.objectAlignment;
+    }
+
+    /**
+     * Computes the size of the memory chunk allocated for an array. This size accounts for the
+     * array header size, body size and any padding after the last element to satisfy object
+     * alignment requirements.
+     *
+     * @param length the number of elements in the array
+     * @param headerSize the size of the array header
+     * @param log2ElementSize log2 of the size of an element in the array
+     * @return the size of the memory chunk
+     */
+    public static int arrayAllocationSize(int length, int headerSize, int log2ElementSize) {
+        int alignment = objectAlignment(INJECTED_VMCONFIG);
+        int size = (length << log2ElementSize) + headerSize + (alignment - 1);
+        int mask = ~(alignment - 1);
+        return size & mask;
+    }
+
+    @Fold
     public static int instanceHeaderSize(@InjectedParameter GraalHotSpotVMConfig config) {
         return config.useCompressedClassPointers ? (2 * wordSize()) - 4 : 2 * wordSize();
     }
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/NewObjectSnippets.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/NewObjectSnippets.java	Tue Jan 30 16:41:40 2018 +0100
@@ -23,7 +23,6 @@
 package org.graalvm.compiler.hotspot.replacements;
 
 import static jdk.vm.ci.hotspot.HotSpotJVMCIRuntimeProvider.getArrayBaseOffset;
-import static jdk.vm.ci.hotspot.HotSpotMetaAccessProvider.computeArrayAllocationSize;
 import static org.graalvm.compiler.core.common.GraalOptions.GeneratePIC;
 import static org.graalvm.compiler.core.common.calc.UnsignedMath.belowThan;
 import static org.graalvm.compiler.hotspot.GraalHotSpotVMConfig.INJECTED_VMCONFIG;
@@ -33,6 +32,7 @@
 import static org.graalvm.compiler.hotspot.replacements.HotSpotReplacementsUtil.PROTOTYPE_MARK_WORD_LOCATION;
 import static org.graalvm.compiler.hotspot.replacements.HotSpotReplacementsUtil.TLAB_END_LOCATION;
 import static org.graalvm.compiler.hotspot.replacements.HotSpotReplacementsUtil.TLAB_TOP_LOCATION;
+import static org.graalvm.compiler.hotspot.replacements.HotSpotReplacementsUtil.arrayAllocationSize;
 import static org.graalvm.compiler.hotspot.replacements.HotSpotReplacementsUtil.arrayKlassOffset;
 import static org.graalvm.compiler.hotspot.replacements.HotSpotReplacementsUtil.arrayLengthOffset;
 import static org.graalvm.compiler.hotspot.replacements.HotSpotReplacementsUtil.config;
@@ -52,7 +52,6 @@
 import static org.graalvm.compiler.hotspot.replacements.HotSpotReplacementsUtil.useBiasedLocking;
 import static org.graalvm.compiler.hotspot.replacements.HotSpotReplacementsUtil.useTLAB;
 import static org.graalvm.compiler.hotspot.replacements.HotSpotReplacementsUtil.verifyOop;
-import static org.graalvm.compiler.hotspot.replacements.HotSpotReplacementsUtil.wordSize;
 import static org.graalvm.compiler.hotspot.replacements.HotSpotReplacementsUtil.writeTlabTop;
 import static org.graalvm.compiler.hotspot.replacements.HotspotSnippetsOptions.ProfileAllocations;
 import static org.graalvm.compiler.hotspot.replacements.HotspotSnippetsOptions.ProfileAllocationsContext;
@@ -315,8 +314,7 @@
     private static Object allocateArrayImpl(KlassPointer hub, int length, Word prototypeMarkWord, int headerSize, int log2ElementSize, boolean fillContents, Register threadRegister,
                     boolean maybeUnroll, String typeContext, boolean skipNegativeCheck, OptionValues options, Counters counters) {
         Object result;
-        int alignment = wordSize();
-        int allocationSize = computeArrayAllocationSize(length, alignment, headerSize, log2ElementSize);
+        int allocationSize = arrayAllocationSize(length, headerSize, log2ElementSize);
         Word thread = registerAsWord(threadRegister);
         Word top = readTlabTop(thread);
         Word end = readTlabEnd(thread);
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/NewArrayStub.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/NewArrayStub.java	Tue Jan 30 16:41:40 2018 +0100
@@ -23,6 +23,7 @@
 package org.graalvm.compiler.hotspot.stubs;
 
 import static org.graalvm.compiler.hotspot.GraalHotSpotVMConfig.INJECTED_VMCONFIG;
+import static org.graalvm.compiler.hotspot.replacements.HotSpotReplacementsUtil.arrayAllocationSize;
 import static org.graalvm.compiler.hotspot.replacements.HotSpotReplacementsUtil.arrayPrototypeMarkWord;
 import static org.graalvm.compiler.hotspot.replacements.HotSpotReplacementsUtil.getAndClearObjectResult;
 import static org.graalvm.compiler.hotspot.replacements.HotSpotReplacementsUtil.layoutHelperElementTypeMask;
@@ -34,7 +35,6 @@
 import static org.graalvm.compiler.hotspot.replacements.HotSpotReplacementsUtil.readLayoutHelper;
 import static org.graalvm.compiler.hotspot.replacements.HotSpotReplacementsUtil.registerAsWord;
 import static org.graalvm.compiler.hotspot.replacements.HotSpotReplacementsUtil.useCMSIncrementalMode;
-import static org.graalvm.compiler.hotspot.replacements.HotSpotReplacementsUtil.wordSize;
 import static org.graalvm.compiler.hotspot.replacements.NewObjectSnippets.MAX_ARRAY_FAST_PATH_ALLOCATION_LENGTH;
 import static org.graalvm.compiler.hotspot.replacements.NewObjectSnippets.formatArray;
 import static org.graalvm.compiler.hotspot.stubs.NewInstanceStub.refillAllocate;
@@ -42,7 +42,6 @@
 import static org.graalvm.compiler.hotspot.stubs.StubUtil.newDescriptor;
 import static org.graalvm.compiler.hotspot.stubs.StubUtil.printf;
 import static org.graalvm.compiler.hotspot.stubs.StubUtil.verifyObject;
-import static jdk.vm.ci.hotspot.HotSpotMetaAccessProvider.computeArrayAllocationSize;
 
 import org.graalvm.compiler.api.replacements.Fold;
 import org.graalvm.compiler.api.replacements.Snippet;
@@ -112,7 +111,7 @@
         int log2ElementSize = (layoutHelper >> layoutHelperLog2ElementSizeShift(INJECTED_VMCONFIG)) & layoutHelperLog2ElementSizeMask(INJECTED_VMCONFIG);
         int headerSize = (layoutHelper >> layoutHelperHeaderSizeShift(INJECTED_VMCONFIG)) & layoutHelperHeaderSizeMask(INJECTED_VMCONFIG);
         int elementKind = (layoutHelper >> layoutHelperElementTypeShift(INJECTED_VMCONFIG)) & layoutHelperElementTypeMask(INJECTED_VMCONFIG);
-        int sizeInBytes = computeArrayAllocationSize(length, wordSize(), headerSize, log2ElementSize);
+        int sizeInBytes = arrayAllocationSize(length, headerSize, log2ElementSize);
         if (logging(options)) {
             printf("newArray: element kind %d\n", elementKind);
             printf("newArray: array length %d\n", length);
--- a/src/jdk.jartool/share/classes/sun/security/tools/jarsigner/Main.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/jdk.jartool/share/classes/sun/security/tools/jarsigner/Main.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -457,9 +457,11 @@
                 showcerts = true;
             } else if (collator.compare(flags, "-strict") ==0) {
                 strict = true;
-            } else if (collator.compare(flags, "-h") == 0 ||
-                        collator.compare(flags, "-?") == 0 ||
-                        collator.compare(flags, "-help") == 0) {
+            } else if (collator.compare(flags, "-?") == 0 ||
+                       collator.compare(flags, "-h") == 0 ||
+                       collator.compare(flags, "--help") == 0 ||
+                       // -help: legacy.
+                       collator.compare(flags, "-help") == 0) {
                 fullusage();
             } else {
                 System.err.println(
@@ -648,6 +650,9 @@
         System.out.println(rb.getString
                 (".conf.url.specify.a.pre.configured.options.file"));
         System.out.println();
+        System.out.println(rb.getString
+                (".print.this.help.message"));
+        System.out.println();
 
         System.exit(0);
     }
--- a/src/jdk.jartool/share/classes/sun/security/tools/jarsigner/Resources.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/jdk.jartool/share/classes/sun/security/tools/jarsigner/Resources.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -118,8 +118,10 @@
                 "[-strict]                   treat warnings as errors"},
         {".conf.url.specify.a.pre.configured.options.file",
                 "[-conf <url>]               specify a pre-configured options file"},
+        {".print.this.help.message",
+                "[-? -h --help]              Print this help message"},
         {"Option.lacks.argument", "Option lacks argument"},
-        {"Please.type.jarsigner.help.for.usage", "Please type jarsigner -help for usage"},
+        {"Please.type.jarsigner.help.for.usage", "Please type jarsigner --help for usage"},
         {"Please.specify.jarfile.name", "Please specify jarfile name"},
         {"Please.specify.alias.name", "Please specify alias name"},
         {"Only.one.alias.can.be.specified", "Only one alias can be specified"},
--- a/src/jdk.jartool/share/classes/sun/security/tools/jarsigner/Resources_ja.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/jdk.jartool/share/classes/sun/security/tools/jarsigner/Resources_ja.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2016, 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
@@ -75,7 +75,7 @@
         {".digestalg.algorithm.name.of.digest.algorithm",
                 "[-digestalg <algorithm>]    \u30C0\u30A4\u30B8\u30A7\u30B9\u30C8\u30FB\u30A2\u30EB\u30B4\u30EA\u30BA\u30E0\u306E\u540D\u524D"},
         {".sigalg.algorithm.name.of.signature.algorithm",
-                "[-sigalg <algorithm>]       \u7F72\u540D\u30A2\u30EB\u30B4\u30EA\u30BA\u30E0\u306E\u540D\u524D"},
+                "[-sigalg <algorithm>]       \u30B7\u30B0\u30CD\u30C1\u30E3\u30FB\u30A2\u30EB\u30B4\u30EA\u30BA\u30E0\u306E\u540D\u524D"},
         {".verify.verify.a.signed.JAR.file",
                 "[-verify]                   \u7F72\u540D\u4ED8\u304DJAR\u30D5\u30A1\u30A4\u30EB\u306E\u691C\u8A3C"},
         {".verbose.suboptions.verbose.output.when.signing.verifying.",
@@ -97,7 +97,7 @@
         {".altsignerpath.pathlist.location.of.an.alternative.signing.mechanism",
                 "[-altsignerpath <pathlist>] \u4EE3\u66FF\u7F72\u540D\u30E1\u30AB\u30CB\u30BA\u30E0\u306E\u5834\u6240\n                            (\u3053\u306E\u30AA\u30D7\u30B7\u30E7\u30F3\u306F\u975E\u63A8\u5968\u306B\u306A\u308A\u307E\u3057\u305F\u3002)"},
         {".internalsf.include.the.SF.file.inside.the.signature.block",
-                "[-internalsf]               \u7F72\u540D\u30D6\u30ED\u30C3\u30AF\u306B.SF\u30D5\u30A1\u30A4\u30EB\u3092\u542B\u3081\u308B"},
+                "[-internalsf]               \u30B7\u30B0\u30CD\u30C1\u30E3\u30FB\u30D6\u30ED\u30C3\u30AF\u306B.SF\u30D5\u30A1\u30A4\u30EB\u3092\u542B\u3081\u308B"},
         {".sectionsonly.don.t.compute.hash.of.entire.manifest",
                 "[-sectionsonly]             \u30DE\u30CB\u30D5\u30A7\u30B9\u30C8\u5168\u4F53\u306E\u30CF\u30C3\u30B7\u30E5\u306F\u8A08\u7B97\u3057\u306A\u3044"},
         {".protected.keystore.has.protected.authentication.path",
@@ -130,7 +130,7 @@
         {"k", "k"},
         {".and.d.more.", "(\u4ED6\u306B\u3082%d\u500B)"},
         {".s.signature.was.verified.",
-                "  s=\u7F72\u540D\u304C\u691C\u8A3C\u3055\u308C\u307E\u3057\u305F "},
+                "  s=\u30B7\u30B0\u30CD\u30C1\u30E3\u304C\u691C\u8A3C\u3055\u308C\u307E\u3057\u305F "},
         {".m.entry.is.listed.in.manifest",
                 "  m=\u30A8\u30F3\u30C8\u30EA\u304C\u30DE\u30CB\u30D5\u30A7\u30B9\u30C8\u5185\u306B\u30EA\u30B9\u30C8\u3055\u308C\u307E\u3059"},
         {".k.at.least.one.certificate.was.found.in.keystore",
@@ -138,7 +138,7 @@
         {".X.not.signed.by.specified.alias.es.",
                 "  X =\u6307\u5B9A\u3057\u305F\u5225\u540D\u3067\u7F72\u540D\u3055\u308C\u3066\u3044\u307E\u305B\u3093"},
         {"no.manifest.", "\u30DE\u30CB\u30D5\u30A7\u30B9\u30C8\u306F\u5B58\u5728\u3057\u307E\u305B\u3093\u3002"},
-        {".Signature.related.entries.","(\u7F72\u540D\u95A2\u9023\u30A8\u30F3\u30C8\u30EA)"},
+        {".Signature.related.entries.","(\u30B7\u30B0\u30CD\u30C1\u30E3\u95A2\u9023\u30A8\u30F3\u30C8\u30EA)"},
         {".Unsigned.entries.", "(\u7F72\u540D\u306A\u3057\u306E\u30A8\u30F3\u30C8\u30EA)"},
         {"jar.is.unsigned",
                 "jar\u306F\u7F72\u540D\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002"},
@@ -162,10 +162,11 @@
         {"with.weak", "%s (\u5F31)"},
         {"key.bit", "%d\u30D3\u30C3\u30C8\u9375"},
         {"key.bit.weak", "%d\u30D3\u30C3\u30C8\u9375(\u5F31)"},
+        {"unknown.size", "\u4E0D\u660E\u30B5\u30A4\u30BA"},
 
         {"jarsigner.", "jarsigner: "},
         {"signature.filename.must.consist.of.the.following.characters.A.Z.0.9.or.",
-                "\u7F72\u540D\u306E\u30D5\u30A1\u30A4\u30EB\u540D\u306B\u4F7F\u7528\u3067\u304D\u308B\u6587\u5B57\u306F\u3001A-Z\u30010-9\u3001_\u3001- \u306E\u307F\u3067\u3059\u3002"},
+                "\u30B7\u30B0\u30CD\u30C1\u30E3\u306E\u30D5\u30A1\u30A4\u30EB\u540D\u306B\u4F7F\u7528\u3067\u304D\u308B\u6587\u5B57\u306F\u3001A-Z\u30010-9\u3001_\u3001- \u306E\u307F\u3067\u3059\u3002"},
         {"unable.to.open.jar.file.", "\u6B21\u306Ejar\u30D5\u30A1\u30A4\u30EB\u3092\u958B\u304F\u3053\u3068\u304C\u3067\u304D\u307E\u305B\u3093: "},
         {"unable.to.create.", "\u4F5C\u6210\u3067\u304D\u307E\u305B\u3093: "},
         {".adding.", "   \u8FFD\u52A0\u4E2D: "},
@@ -204,9 +205,10 @@
         {"certificate.is.not.valid.until",
                 "\u8A3C\u660E\u66F8\u306F{0}\u307E\u3067\u6709\u52B9\u3067\u306F\u3042\u308A\u307E\u305B\u3093"},
         {"certificate.will.expire.on", "\u8A3C\u660E\u66F8\u306F{0}\u306B\u5931\u52B9\u3057\u307E\u3059"},
-        {".CertPath.not.validated.", "[CertPath\u304C\u691C\u8A3C\u3055\u308C\u3066\u3044\u307E\u305B\u3093: "},
+        {".Invalid.certificate.chain.", "[\u7121\u52B9\u306A\u8A3C\u660E\u66F8\u30C1\u30A7\u30FC\u30F3: "},
+        {".Invalid.TSA.certificate.chain.", "[\u7121\u52B9\u306ATSA\u8A3C\u660E\u66F8\u30C1\u30A7\u30FC\u30F3: "},
         {"requesting.a.signature.timestamp",
-                "\u7F72\u540D\u30BF\u30A4\u30E0\u30B9\u30BF\u30F3\u30D7\u306E\u30EA\u30AF\u30A8\u30B9\u30C8"},
+                "\u30B7\u30B0\u30CD\u30C1\u30E3\u30FB\u30BF\u30A4\u30E0\u30B9\u30BF\u30F3\u30D7\u306E\u30EA\u30AF\u30A8\u30B9\u30C8"},
         {"TSA.location.", "TSA\u306E\u5834\u6240: "},
         {"TSA.certificate.", "TSA\u8A3C\u660E\u66F8: "},
         {"no.response.from.the.Timestamping.Authority.",
@@ -219,6 +221,8 @@
         {"entry.was.signed.on", "\u30A8\u30F3\u30C8\u30EA\u306F{0}\u306B\u7F72\u540D\u3055\u308C\u307E\u3057\u305F"},
         {"Warning.", "\u8B66\u544A: "},
         {"Error.", "\u30A8\u30E9\u30FC: "},
+        {"...Signer", ">>> \u7F72\u540D\u8005"},
+        {"...TSA", ">>> TSA"},
         {"This.jar.contains.unsigned.entries.which.have.not.been.integrity.checked.",
                 "\u3053\u306Ejar\u306B\u306F\u3001\u6574\u5408\u6027\u30C1\u30A7\u30C3\u30AF\u3092\u3057\u3066\u3044\u306A\u3044\u7F72\u540D\u306A\u3057\u306E\u30A8\u30F3\u30C8\u30EA\u304C\u542B\u307E\u308C\u3066\u3044\u307E\u3059\u3002 "},
         {"This.jar.contains.entries.whose.signer.certificate.has.expired.",
@@ -253,20 +257,26 @@
                  "\u3053\u306Ejar\u306B\u306F\u3001\u7F72\u540D\u8005\u8A3C\u660E\u66F8\u306ENetscapeCertType\u62E1\u5F35\u6A5F\u80FD\u304C\u30B3\u30FC\u30C9\u7F72\u540D\u3092\u8A31\u53EF\u3057\u306A\u3044\u30A8\u30F3\u30C8\u30EA\u304C\u542B\u307E\u308C\u3066\u3044\u307E\u3059\u3002"},
         {".{0}.extension.does.not.support.code.signing.",
                  "[{0}\u62E1\u5F35\u6A5F\u80FD\u306F\u30B3\u30FC\u30C9\u7F72\u540D\u3092\u30B5\u30DD\u30FC\u30C8\u3057\u3066\u3044\u307E\u305B\u3093]"},
-        {"The.signer.s.certificate.chain.is.not.validated.reason.1",
-                "\u7F72\u540D\u8005\u306E\u8A3C\u660E\u66F8\u30C1\u30A7\u30FC\u30F3\u304C\u307E\u3060\u691C\u8A3C\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002\u7406\u7531: %s"},
+        {"The.signer.s.certificate.chain.is.invalid.reason.1",
+                "\u7F72\u540D\u8005\u306E\u8A3C\u660E\u66F8\u30C1\u30A7\u30FC\u30F3\u304C\u7121\u52B9\u3067\u3059\u3002\u7406\u7531: %s"},
+        {"The.tsa.certificate.chain.is.invalid.reason.1",
+                "TSA\u8A3C\u660E\u66F8\u30C1\u30A7\u30FC\u30F3\u304C\u7121\u52B9\u3067\u3059\u3002\u7406\u7531: %s"},
         {"The.signer.s.certificate.is.self.signed.",
                 "\u7F72\u540D\u8005\u306E\u8A3C\u660E\u66F8\u306F\u81EA\u5DF1\u7F72\u540D\u3055\u308C\u3066\u3044\u307E\u3059\u3002"},
         {"The.1.algorithm.specified.for.the.2.option.is.considered.a.security.risk.",
                 "%1$s\u30A2\u30EB\u30B4\u30EA\u30BA\u30E0(%2$s\u30AA\u30D7\u30B7\u30E7\u30F3\u306B\u6307\u5B9A)\u306F\u3001\u30BB\u30AD\u30E5\u30EA\u30C6\u30A3\u30FB\u30EA\u30B9\u30AF\u3068\u307F\u306A\u3055\u308C\u307E\u3059\u3002"},
         {"The.1.signing.key.has.a.keysize.of.2.which.is.considered.a.security.risk.",
-                "%s\u7F72\u540D\u9375\u306B\u306F\u3001\u30BB\u30AD\u30E5\u30EA\u30C6\u30A3\u30FB\u30EA\u30B9\u30AF\u3068\u307F\u306A\u3055\u308C\u308B%d\u306E\u9375\u30B5\u30A4\u30BA\u304C\u3042\u308A\u307E\u3059\u3002"},
-        {"This.jar.contains.entries.whose.certificate.chain.is.not.validated.reason.1",
-                 "\u3053\u306Ejar\u306B\u306F\u3001\u8A3C\u660E\u66F8\u30C1\u30A7\u30FC\u30F3\u304C\u307E\u3060\u691C\u8A3C\u3055\u308C\u3066\u3044\u306A\u3044\u30A8\u30F3\u30C8\u30EA\u304C\u542B\u307E\u308C\u3066\u3044\u307E\u3059\u3002\u7406\u7531: %s"},
+                "%1$s\u7F72\u540D\u9375\u306B\u306F\u3001\u30BB\u30AD\u30E5\u30EA\u30C6\u30A3\u30FB\u30EA\u30B9\u30AF\u3068\u307F\u306A\u3055\u308C\u308B%2$d\u306E\u9375\u30B5\u30A4\u30BA\u304C\u3042\u308A\u307E\u3059\u3002"},
+        {"This.jar.contains.entries.whose.certificate.chain.is.invalid.reason.1",
+                 "\u3053\u306Ejar\u306B\u306F\u3001\u8A3C\u660E\u66F8\u30C1\u30A7\u30FC\u30F3\u304C\u7121\u52B9\u306A\u30A8\u30F3\u30C8\u30EA\u304C\u542B\u307E\u308C\u3066\u3044\u307E\u3059\u3002\u7406\u7531: %s"},
+        {"This.jar.contains.entries.whose.tsa.certificate.chain.is.invalid.reason.1",
+                "\u3053\u306Ejar\u306B\u306F\u3001TSA\u8A3C\u660E\u66F8\u30C1\u30A7\u30FC\u30F3\u304C\u7121\u52B9\u306A\u30A8\u30F3\u30C8\u30EA\u304C\u542B\u307E\u308C\u3066\u3044\u307E\u3059\u3002\u7406\u7531: %s"},
         {"no.timestamp.signing",
                 "-tsa\u307E\u305F\u306F-tsacert\u304C\u6307\u5B9A\u3055\u308C\u3066\u3044\u306A\u3044\u305F\u3081\u3001\u3053\u306Ejar\u306B\u306F\u30BF\u30A4\u30E0\u30B9\u30BF\u30F3\u30D7\u304C\u4ED8\u52A0\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002\u30BF\u30A4\u30E0\u30B9\u30BF\u30F3\u30D7\u304C\u306A\u3044\u3068\u3001\u7F72\u540D\u8005\u8A3C\u660E\u66F8\u306E\u6709\u52B9\u671F\u9650(%1$tY-%1$tm-%1$td)\u5F8C\u306B\u3001\u30E6\u30FC\u30B6\u30FC\u306F\u3053\u306Ejar\u3092\u691C\u8A3C\u3067\u304D\u306A\u3044\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059\u3002"},
         {"no.timestamp.verifying",
                 "\u3053\u306Ejar\u306B\u306F\u3001\u30BF\u30A4\u30E0\u30B9\u30BF\u30F3\u30D7\u304C\u306A\u3044\u7F72\u540D\u304C\u542B\u307E\u308C\u3066\u3044\u307E\u3059\u3002\u30BF\u30A4\u30E0\u30B9\u30BF\u30F3\u30D7\u304C\u306A\u3044\u3068\u3001\u3044\u305A\u308C\u304B\u306E\u7F72\u540D\u8005\u8A3C\u660E\u66F8\u306E\u6709\u52B9\u671F\u9650\u5F8C\u306B(\u65E9\u3051\u308C\u3070%1$tY-%1$tm-%1$td)\u30E6\u30FC\u30B6\u30FC\u306F\u3053\u306Ejar\u3092\u691C\u8A3C\u3067\u304D\u306A\u3044\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059\u3002"},
+        {"bad.timestamp.verifying",
+                "\u3053\u306Ejar\u306B\u306F\u3001\u7121\u52B9\u306A\u30BF\u30A4\u30E0\u30B9\u30BF\u30F3\u30D7\u306E\u3042\u308B\u7F72\u540D\u304C\u542B\u307E\u308C\u3066\u3044\u307E\u3059\u3002\u6709\u52B9\u306A\u30BF\u30A4\u30E0\u30B9\u30BF\u30F3\u30D7\u304C\u306A\u3044\u3068\u3001\u3044\u305A\u308C\u304B\u306E\u7F72\u540D\u8005\u8A3C\u660E\u66F8\u306E\u6709\u52B9\u671F\u9650\u5F8C\u306B(\u65E9\u3051\u308C\u3070%1$tY-%1$tm-%1$td)\u30E6\u30FC\u30B6\u30FC\u306F\u3053\u306Ejar\u3092\u691C\u8A3C\u3067\u304D\u306A\u3044\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059\u3002\n\u8A73\u7D30\u306F\u3001-J-Djava.security.debug=jar\u3092\u6307\u5B9A\u3057\u3066jarsigner\u3092\u518D\u5B9F\u884C\u3057\u3066\u304F\u3060\u3055\u3044\u3002"},
         {"Unknown.password.type.", "\u4E0D\u660E\u306A\u30D1\u30B9\u30EF\u30FC\u30C9\u30FB\u30BF\u30A4\u30D7: "},
         {"Cannot.find.environment.variable.",
                 "\u74B0\u5883\u5909\u6570\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093: "},
--- a/src/jdk.jartool/share/classes/sun/security/tools/jarsigner/Resources_zh_CN.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/jdk.jartool/share/classes/sun/security/tools/jarsigner/Resources_zh_CN.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2016, 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
@@ -162,6 +162,7 @@
         {"with.weak", "%s (\u5F31)"},
         {"key.bit", "%d \u4F4D\u5BC6\u94A5"},
         {"key.bit.weak", "%d \u4F4D\u5BC6\u94A5 (\u5F31)"},
+        {"unknown.size", "\u672A\u77E5\u5927\u5C0F"},
 
         {"jarsigner.", "jarsigner: "},
         {"signature.filename.must.consist.of.the.following.characters.A.Z.0.9.or.",
@@ -204,7 +205,8 @@
         {"certificate.is.not.valid.until",
                 "\u76F4\u5230{0}, \u8BC1\u4E66\u624D\u6709\u6548"},
         {"certificate.will.expire.on", "\u8BC1\u4E66\u5C06\u5728{0}\u5230\u671F"},
-        {".CertPath.not.validated.", "[CertPath \u672A\u9A8C\u8BC1: "},
+        {".Invalid.certificate.chain.", "[\u65E0\u6548\u7684\u8BC1\u4E66\u94FE: "},
+        {".Invalid.TSA.certificate.chain.", "[\u65E0\u6548 TSA \u7684\u8BC1\u4E66\u94FE: "},
         {"requesting.a.signature.timestamp",
                 "\u6B63\u5728\u8BF7\u6C42\u7B7E\u540D\u65F6\u95F4\u6233"},
         {"TSA.location.", "TSA \u4F4D\u7F6E: "},
@@ -219,6 +221,8 @@
         {"entry.was.signed.on", "\u6761\u76EE\u7684\u7B7E\u540D\u65E5\u671F\u4E3A {0}"},
         {"Warning.", "\u8B66\u544A: "},
         {"Error.", "\u9519\u8BEF: "},
+        {"...Signer", ">>> \u7B7E\u540D\u8005"},
+        {"...TSA", ">>> TSA"},
         {"This.jar.contains.unsigned.entries.which.have.not.been.integrity.checked.",
                 "\u6B64 jar \u5305\u542B\u5C1A\u672A\u8FDB\u884C\u5B8C\u6574\u6027\u68C0\u67E5\u7684\u672A\u7B7E\u540D\u6761\u76EE\u3002 "},
         {"This.jar.contains.entries.whose.signer.certificate.has.expired.",
@@ -253,20 +257,26 @@
                  "\u6B64 jar \u5305\u542B\u7531\u4E8E\u7B7E\u540D\u8005\u8BC1\u4E66\u7684 NetscapeCertType \u6269\u5C55\u800C\u65E0\u6CD5\u8FDB\u884C\u4EE3\u7801\u7B7E\u540D\u7684\u6761\u76EE\u3002"},
         {".{0}.extension.does.not.support.code.signing.",
                  "[{0} \u6269\u5C55\u4E0D\u652F\u6301\u4EE3\u7801\u7B7E\u540D]"},
-        {"The.signer.s.certificate.chain.is.not.validated.reason.1",
-                "\u7B7E\u540D\u8005\u8BC1\u4E66\u94FE\u672A\u7ECF\u8FC7\u9A8C\u8BC1\u3002\u539F\u56E0: %s"},
+        {"The.signer.s.certificate.chain.is.invalid.reason.1",
+                "\u7B7E\u540D\u8005\u8BC1\u4E66\u94FE\u65E0\u6548\u3002\u539F\u56E0: %s"},
+        {"The.tsa.certificate.chain.is.invalid.reason.1",
+                "TSA \u8BC1\u4E66\u94FE\u65E0\u6548\u3002\u539F\u56E0: %s"},
         {"The.signer.s.certificate.is.self.signed.",
                 "\u7B7E\u540D\u8005\u8BC1\u4E66\u4E3A\u81EA\u7B7E\u540D\u8BC1\u4E66\u3002"},
         {"The.1.algorithm.specified.for.the.2.option.is.considered.a.security.risk.",
                 "\u4E3A %2$s \u9009\u9879\u6307\u5B9A\u7684 %1$s \u7B97\u6CD5\u88AB\u89C6\u4E3A\u5B58\u5728\u5B89\u5168\u98CE\u9669\u3002"},
         {"The.1.signing.key.has.a.keysize.of.2.which.is.considered.a.security.risk.",
-                "%s \u7B7E\u540D\u5BC6\u94A5\u7684\u5BC6\u94A5\u5927\u5C0F\u4E3A %d, \u8FD9\u88AB\u89C6\u4E3A\u5B58\u5728\u5B89\u5168\u98CE\u9669\u3002"},
-        {"This.jar.contains.entries.whose.certificate.chain.is.not.validated.reason.1",
-                 "\u6B64 jar \u5305\u542B\u5176\u8BC1\u4E66\u94FE\u672A\u7ECF\u8FC7\u9A8C\u8BC1\u7684\u6761\u76EE\u3002\u539F\u56E0: %s"},
+                "%1$s \u7B7E\u540D\u5BC6\u94A5\u7684\u5BC6\u94A5\u5927\u5C0F\u4E3A %2$d, \u8FD9\u88AB\u89C6\u4E3A\u5B58\u5728\u5B89\u5168\u98CE\u9669\u3002"},
+        {"This.jar.contains.entries.whose.certificate.chain.is.invalid.reason.1",
+                 "\u6B64 jar \u5305\u542B\u5176\u8BC1\u4E66\u94FE\u65E0\u6548\u7684\u6761\u76EE\u3002\u539F\u56E0: %s"},
+        {"This.jar.contains.entries.whose.tsa.certificate.chain.is.invalid.reason.1",
+                "\u6B64 jar \u5305\u542B\u5176 TSA \u8BC1\u4E66\u94FE\u65E0\u6548\u7684\u6761\u76EE\u3002\u539F\u56E0: %s"},
         {"no.timestamp.signing",
                 "\u672A\u63D0\u4F9B -tsa \u6216 -tsacert, \u6B64 jar \u6CA1\u6709\u65F6\u95F4\u6233\u3002\u5982\u679C\u6CA1\u6709\u65F6\u95F4\u6233, \u5219\u5728\u7B7E\u540D\u8005\u8BC1\u4E66\u7684\u5230\u671F\u65E5\u671F (%1$tY-%1$tm-%1$td) \u4E4B\u540E, \u7528\u6237\u53EF\u80FD\u65E0\u6CD5\u9A8C\u8BC1\u6B64 jar\u3002"},
         {"no.timestamp.verifying",
                 "\u6B64 jar \u5305\u542B\u7684\u7B7E\u540D\u6CA1\u6709\u65F6\u95F4\u6233\u3002\u5982\u679C\u6CA1\u6709\u65F6\u95F4\u6233, \u5219\u5728\u5176\u4E2D\u4EFB\u4E00\u7B7E\u540D\u8005\u8BC1\u4E66\u5230\u671F (\u6700\u65E9\u4E3A %1$tY-%1$tm-%1$td) \u4E4B\u540E, \u7528\u6237\u53EF\u80FD\u65E0\u6CD5\u9A8C\u8BC1\u6B64 jar\u3002"},
+        {"bad.timestamp.verifying",
+                "\u6B64 jar \u5305\u542B\u5E26\u6709\u65E0\u6548\u65F6\u95F4\u6233\u7684\u7B7E\u540D\u3002\u5982\u679C\u6CA1\u6709\u6709\u6548\u65F6\u95F4\u6233, \u5219\u5728\u5176\u4E2D\u4EFB\u4E00\u7B7E\u540D\u8005\u8BC1\u4E66\u5230\u671F (\u6700\u65E9\u4E3A %1$tY-%1$tm-%1$td) \u4E4B\u540E, \u7528\u6237\u53EF\u80FD\u65E0\u6CD5\u9A8C\u8BC1\u6B64 jar\u3002\n\u6709\u5173\u8BE6\u7EC6\u4FE1\u606F, \u8BF7\u4F7F\u7528 -J-Djava.security.debug=jar \u91CD\u65B0\u8FD0\u884C jarsigner\u3002"},
         {"Unknown.password.type.", "\u672A\u77E5\u53E3\u4EE4\u7C7B\u578B: "},
         {"Cannot.find.environment.variable.",
                 "\u627E\u4E0D\u5230\u73AF\u5883\u53D8\u91CF: "},
--- a/src/jdk.jartool/share/classes/sun/tools/jar/GNUStyleOptions.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/jdk.jartool/share/classes/sun/tools/jar/GNUStyleOptions.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -200,7 +200,7 @@
             },
 
             // Other options
-            new Option(true, true, OptionType.OTHER, "--help", "-h") {
+            new Option(true, true, OptionType.OTHER, "--help", "-h", "-?") {
                 void process(Main jartool, String opt, String arg) throws BadArgs {
                     if (jartool.info == null) {
                         if (arg == null) {
--- a/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar.properties	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar.properties	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -286,7 +286,7 @@
 main.help.opt.other=\
 \ Other options:\n
 main.help.opt.other.help=\
-\  -h, --help[:compat]        Give this, or optionally the compatibility, help
+\  -?, -h, --help[:compat]    Give this, or optionally the compatibility, help
 main.help.opt.other.help-extra=\
 \      --help-extra           Give help on extra options
 main.help.opt.other.version=\
--- a/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_es.properties	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_es.properties	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -34,7 +34,7 @@
 error.bad.uflag=El indicador 'u' necesita la especificaci\u00F3n de archivos de manifiesto, de entrada o indicador 'e'.
 error.bad.eflag=El indicador 'e' y el manifiesto con el atributo 'Main-Class' no pueden especificarse \na la vez.
 error.bad.dflag=La opci\u00F3n '-d, --describe-module'  no requiere especificar archivos de entrada
-error.bad.reason=Motivo err\u00F3neo: {0}, debe ser anticuado, anticuado para eliminaci\u00F3n o incubando
+error.bad.reason=Motivo err\u00F3neo: {0}, debe ser en desuso, en desuso para eliminaci\u00F3n o incubando
 error.nosuch.fileordir={0} : no existe tal archivo o directorio
 error.write.file=Error al escribir un archivo jar existente
 error.create.dir={0} : no se ha podido crear el directorio
@@ -115,7 +115,7 @@
 main.help.opt.create.update.hash-modules=\      --hash-modules=PATTERN Calcular y registrar los hash de m\u00F3dulos\n                             que coinciden con el patr\u00F3n proporcionado y que dependen\n                             directa o indirectamente de la creaci\u00F3n de un archivo jar modular\n                             o de la actualizaci\u00F3n de un archivo jar no modular
 main.help.opt.create.update.module-path=\  -p, --module-path          Ubicaci\u00F3n de la dependencia de m\u00F3dulo para generar\n                             el hash
 main.help.opt.create.update.do-not-resolve-by-default=\      --do-not-resolve-by-default  Excluir del conjunto de m\u00F3dulos ra\u00EDz por defecto
-main.help.opt.create.update.warn-if-resolved=\      --warn-if-resolved     Indicaci\u00F3n para que una herramienta emita una advertencia si el m\u00F3dulo\n                             se ha resuelto. Anticuado, anticuado para eliminaci\u00F3n\n                             o incubando
+main.help.opt.create.update.warn-if-resolved=\      --warn-if-resolved     Indicaci\u00F3n para que una herramienta emita una advertencia si el m\u00F3dulo\n                             se ha resuelto. En desuso, en desuso para eliminaci\u00F3n\n                             o incubando
 main.help.opt.create.update.index=\ Modificadores de operaci\u00F3n v\u00E1lidos solo en el modo de creaci\u00F3n, actualizaci\u00F3n y generaci\u00F3n de \u00EDndice:\n
 main.help.opt.create.update.index.no-compress=\  -0, --no-compress          Solo almacenar; no usar compresi\u00F3n ZIP
 main.help.opt.other=\ Otras opciones:\n
--- a/src/jdk.javadoc/share/classes/com/sun/tools/javadoc/main/ToolOption.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/jdk.javadoc/share/classes/com/sun/tools/javadoc/main/ToolOption.java	Tue Jan 30 16:41:40 2018 +0100
@@ -212,6 +212,13 @@
         }
     },
 
+    ADD_OPENS("--add-opens", true) {
+        @Override
+        public void process(Helper helper, String arg) throws InvalidValueException {
+            Option.ADD_OPENS.process(helper.getOptionHelper(), opt, arg);
+        }
+    },
+
     // ----- doclet options -----
 
     DOCLET("-doclet", true), // handled in setDocletInvoker
--- a/src/jdk.javadoc/share/classes/com/sun/tools/javadoc/resources/javadoc.properties	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/jdk.javadoc/share/classes/com/sun/tools/javadoc/resources/javadoc.properties	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -34,7 +34,7 @@
 \  -protected                       Show protected/public classes and members (default)\n\
 \  -package                         Show package/protected/public classes and members\n\
 \  -private                         Show all classes and members\n\
-\  -help                            Display command line options and exit\n\
+\  --help                           Display command line options and exit\n\
 \  -doclet <class>                  Generate output via alternate doclet\n\
 \  -docletpath <path>               Specify where to find doclet class files\n\
 \  --module-source-path <path>      Specify where to find input source files for multiple modules\n\
--- a/src/jdk.javadoc/share/classes/com/sun/tools/javadoc/resources/javadoc_zh_CN.properties	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/jdk.javadoc/share/classes/com/sun/tools/javadoc/resources/javadoc_zh_CN.properties	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -62,15 +62,14 @@
 main.doclet_method_not_accessible=\u5728 doclet \u7C7B{0}\u4E2D, \u65E0\u6CD5\u8BBF\u95EE\u65B9\u6CD5{1}
 main.internal_error_exception_thrown=\u5185\u90E8\u9519\u8BEF: \u5728 doclet \u7C7B{0}\u4E2D, \u65B9\u6CD5{1}\u5DF2\u629B\u51FA\u5F02\u5E38\u9519\u8BEF{2}
 main.exception_thrown=\u5728 doclet \u7C7B{0}\u4E2D, \u65B9\u6CD5{1}\u5DF2\u629B\u51FA\u5F02\u5E38\u9519\u8BEF{2}
-main.illegal_locale_name=\u533A\u57DF\u8BBE\u7F6E\u4E0D\u53EF\u7528: {0}
-main.malformed_locale_name=\u683C\u5F0F\u9519\u8BEF\u7684\u533A\u57DF\u8BBE\u7F6E\u540D\u79F0: {0}
+main.illegal_locale_name=\u8BED\u8A00\u73AF\u5883\u4E0D\u53EF\u7528: {0}
+main.malformed_locale_name=\u683C\u5F0F\u9519\u8BEF\u7684\u8BED\u8A00\u73AF\u5883\u540D\u79F0: {0}
 main.file_not_found=\u627E\u4E0D\u5230\u6587\u4EF6: "{0}"
 main.file_ignored=\u5DF2\u5FFD\u7565\u6587\u4EF6: "{0}" (\u5C1A\u4E0D\u652F\u6301)
 main.illegal_class_name=\u975E\u6CD5\u7C7B\u540D: "{0}"
 main.illegal_package_name=\u975E\u6CD5\u7684\u7A0B\u5E8F\u5305\u540D\u79F0: "{0}"
 main.release.bootclasspath.conflict=\u9009\u9879{0}\u65E0\u6CD5\u4E0E -release \u4E00\u8D77\u4F7F\u7528
 main.unsupported.release.version=\u4E0D\u652F\u6301\u53D1\u884C\u7248\u672C {0}
-main.release.not.standard.file.manager=\u6307\u5B9A\u4E86 -release \u9009\u9879, \u4F46\u63D0\u4F9B\u7684 JavaFileManager \u4E0D\u662F StandardJavaFileManager\u3002
 main.option.invalid.value={0}
 tag.illegal_char_in_arr_dim=\u6807\u8BB0{0}: \u6570\u7EC4\u7EF4\u4E2D\u6709\u8BED\u6CD5\u9519\u8BEF, \u65B9\u6CD5\u53C2\u6570: {1}
 tag.illegal_see_tag=\u6807\u8BB0{0}: \u65B9\u6CD5\u53C2\u6570\u4E2D\u6709\u8BED\u6CD5\u9519\u8BEF: {1}
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AbstractExecutableMemberWriter.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AbstractExecutableMemberWriter.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -358,6 +358,6 @@
             }
         }
         buf.append(")");
-        return foundTypeVariable ? configuration.links.getName(buf.toString()) : null;
+        return foundTypeVariable ? writer.links.getName(buf.toString()) : null;
     }
 }
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AbstractMemberWriter.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AbstractMemberWriter.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -90,7 +90,7 @@
         this.utils = configuration.utils;
         this.contents = configuration.contents;
         this.resources = configuration.resources;
-        this.links = configuration.links;
+        this.links = writer.links;
     }
 
     public AbstractMemberWriter(SubWriterHolderWriter writer) {
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AnnotationTypeFieldWriterImpl.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AnnotationTypeFieldWriterImpl.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2017, 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
@@ -27,8 +27,6 @@
 
 import jdk.javadoc.internal.doclets.formats.html.markup.Table;
 
-import java.util.Arrays;
-
 import javax.lang.model.element.Element;
 import javax.lang.model.element.ExecutableElement;
 import javax.lang.model.element.TypeElement;
@@ -292,7 +290,7 @@
      */
     protected Content getNavSummaryLink(TypeElement typeElement, boolean link) {
         if (link) {
-            return Links.createLink(
+            return links.createLink(
                     SectionName.ANNOTATION_TYPE_FIELD_SUMMARY,
                     contents.navField);
         } else {
@@ -305,7 +303,7 @@
      */
     protected void addNavDetailLink(boolean link, Content liNav) {
         if (link) {
-            liNav.addContent(Links.createLink(
+            liNav.addContent(links.createLink(
                     SectionName.ANNOTATION_TYPE_FIELD_DETAIL,
                     contents.navField));
         } else {
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AnnotationTypeOptionalMemberWriterImpl.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AnnotationTypeOptionalMemberWriterImpl.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -159,7 +159,7 @@
     @Override
     protected Content getNavSummaryLink(TypeElement typeElement, boolean link) {
         if (link) {
-            return Links.createLink(
+            return links.createLink(
                     SectionName.ANNOTATION_TYPE_OPTIONAL_ELEMENT_SUMMARY,
                     contents.navAnnotationTypeOptionalMember);
         } else {
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AnnotationTypeRequiredMemberWriterImpl.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AnnotationTypeRequiredMemberWriterImpl.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -27,9 +27,6 @@
 
 import jdk.javadoc.internal.doclets.formats.html.markup.Table;
 
-import java.util.Arrays;
-import java.util.List;
-
 import javax.lang.model.element.Element;
 import javax.lang.model.element.ExecutableElement;
 import javax.lang.model.element.TypeElement;
@@ -308,7 +305,7 @@
      */
     protected Content getNavSummaryLink(TypeElement typeElement, boolean link) {
         if (link) {
-            return Links.createLink(
+            return links.createLink(
                     SectionName.ANNOTATION_TYPE_REQUIRED_ELEMENT_SUMMARY,
                     contents.navAnnotationTypeRequiredMember);
         } else {
@@ -321,7 +318,7 @@
      */
     protected void addNavDetailLink(boolean link, Content liNav) {
         if (link) {
-            liNav.addContent(Links.createLink(
+            liNav.addContent(links.createLink(
                     SectionName.ANNOTATION_TYPE_ELEMENT_DETAIL,
                     contents.navAnnotationTypeMember));
         } else {
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AnnotationTypeWriterImpl.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AnnotationTypeWriterImpl.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -109,7 +109,7 @@
      */
     @Override
     protected Content getNavLinkPackage() {
-        Content linkContent = Links.createLink(DocPaths.PACKAGE_SUMMARY,
+        Content linkContent = links.createLink(DocPaths.PACKAGE_SUMMARY,
                 contents.packageLabel);
         Content li = HtmlTree.LI(linkContent);
         return li;
@@ -133,7 +133,7 @@
      */
     @Override
     protected Content getNavLinkClassUse() {
-        Content linkContent = Links.createLink(DocPaths.CLASS_USE.resolve(filename), contents.useLabel);
+        Content linkContent = links.createLink(DocPaths.CLASS_USE.resolve(filename), contents.useLabel);
         Content li = HtmlTree.LI(linkContent);
         return li;
     }
@@ -347,7 +347,7 @@
      */
     @Override
     protected Content getNavLinkTree() {
-        Content treeLinkContent = Links.createLink(DocPaths.PACKAGE_TREE,
+        Content treeLinkContent = links.createLink(DocPaths.PACKAGE_TREE,
                 contents.treeLabel, "", "");
         Content li = HtmlTree.LI(treeLinkContent);
         return li;
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ClassUseWriter.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ClassUseWriter.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -515,7 +515,7 @@
      */
     protected Content getNavLinkPackage() {
         Content linkContent =
-                Links.createLink(DocPath.parent.resolve(DocPaths.PACKAGE_SUMMARY), contents.packageLabel);
+                links.createLink(DocPath.parent.resolve(DocPaths.PACKAGE_SUMMARY), contents.packageLabel);
         Content li = HtmlTree.LI(linkContent);
         return li;
     }
@@ -550,8 +550,8 @@
      */
     protected Content getNavLinkTree() {
         Content linkContent = utils.isEnclosingPackageIncluded(typeElement)
-                ? Links.createLink(DocPath.parent.resolve(DocPaths.PACKAGE_TREE), contents.treeLabel)
-                : Links.createLink(pathToRoot.resolve(DocPaths.OVERVIEW_TREE), contents.treeLabel);
+                ? links.createLink(DocPath.parent.resolve(DocPaths.PACKAGE_TREE), contents.treeLabel)
+                : links.createLink(pathToRoot.resolve(DocPaths.OVERVIEW_TREE), contents.treeLabel);
         Content li = HtmlTree.LI(linkContent);
         return li;
     }
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ClassWriterImpl.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ClassWriterImpl.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -120,7 +120,7 @@
      */
     @Override
     protected Content getNavLinkPackage() {
-        Content linkContent = Links.createLink(DocPaths.PACKAGE_SUMMARY,
+        Content linkContent = links.createLink(DocPaths.PACKAGE_SUMMARY,
                 contents.packageLabel);
         Content li = HtmlTree.LI(linkContent);
         return li;
@@ -144,7 +144,7 @@
      */
     @Override
     protected Content getNavLinkClassUse() {
-        Content linkContent = Links.createLink(DocPaths.CLASS_USE.resolve(filename), contents.useLabel);
+        Content linkContent = links.createLink(DocPaths.CLASS_USE.resolve(filename), contents.useLabel);
         Content li = HtmlTree.LI(linkContent);
         return li;
     }
@@ -660,7 +660,7 @@
      */
     @Override
     protected Content getNavLinkTree() {
-        Content treeLinkContent = Links.createLink(DocPaths.PACKAGE_TREE,
+        Content treeLinkContent = links.createLink(DocPaths.PACKAGE_TREE,
                 contents.treeLabel, "", "");
         Content li = HtmlTree.LI(treeLinkContent);
         return li;
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ConstantsSummaryWriterImpl.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ConstantsSummaryWriterImpl.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -135,13 +135,13 @@
         //add link to summary
         Content link;
         if (pkg.isUnnamed()) {
-            link = Links.createLink(SectionName.UNNAMED_PACKAGE_ANCHOR,
+            link = links.createLink(SectionName.UNNAMED_PACKAGE_ANCHOR,
                     contents.defaultPackageLabel, "", "");
         } else {
             String parsedPackageName = utils.parsePackageName(pkg);
             Content packageNameContent = getPackageLabel(parsedPackageName);
             packageNameContent.addContent(".*");
-            link = Links.createLink(DocLink.fragment(parsedPackageName),
+            link = links.createLink(DocLink.fragment(parsedPackageName),
                     packageNameContent, "", "");
             PackageElement abbrevPkg = configuration.workArounds.getAbbreviatedPackageElement(pkg);
             printedPackageHeaders.add(abbrevPkg);
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ConstructorWriterImpl.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ConstructorWriterImpl.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -300,7 +300,7 @@
     @Override
     protected Content getNavSummaryLink(TypeElement typeElement, boolean link) {
         if (link) {
-            return Links.createLink(SectionName.CONSTRUCTOR_SUMMARY,
+            return links.createLink(SectionName.CONSTRUCTOR_SUMMARY,
                     contents.navConstructor);
         } else {
             return contents.navConstructor;
@@ -313,7 +313,7 @@
     @Override
     protected void addNavDetailLink(boolean link, Content liNav) {
         if (link) {
-            liNav.addContent(Links.createLink(
+            liNav.addContent(links.createLink(
                     SectionName.CONSTRUCTOR_DETAIL,
                     contents.navConstructor));
         } else {
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/DocFilesHandlerImpl.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/DocFilesHandlerImpl.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -25,10 +25,17 @@
 
 package jdk.javadoc.internal.doclets.formats.html;
 
+import com.sun.source.doctree.AttributeTree;
+import com.sun.source.doctree.AttributeTree.ValueKind;
+import com.sun.source.doctree.DocRootTree;
 import com.sun.source.doctree.DocTree;
 import com.sun.source.doctree.EndElementTree;
+import com.sun.source.doctree.LinkTree;
 import com.sun.source.doctree.StartElementTree;
 import com.sun.source.doctree.TextTree;
+import com.sun.source.util.SimpleDocTreeVisitor;
+import com.sun.tools.doclint.HtmlTag;
+import com.sun.tools.doclint.HtmlTag.Attr;
 import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTree;
 import jdk.javadoc.internal.doclets.toolkit.Content;
 import jdk.javadoc.internal.doclets.toolkit.DocFileElement;
@@ -123,13 +130,14 @@
                     configuration.messages.warning("doclet.Copy_Overwrite_warning",
                             srcfile.getPath(), dstdir.getPath());
                 } else {
+                    if (Utils.toLowerCase(srcfile.getPath()).endsWith(".html")) {
+                        if (handleHtmlFile(srcfile, dstDocPath)) {
+                            continue;
+                        }
+                    }
                     configuration.messages.notice("doclet.Copying_File_0_To_Dir_1",
                             srcfile.getPath(), dstdir.getPath());
-                    if (Utils.toLowerCase(srcfile.getPath()).endsWith(".html")) {
-                        handleHtmlFile(srcfile, dstDocPath);
-                    } else {
-                        destfile.copyFile(srcfile);
-                    }
+                    destfile.copyFile(srcfile);
                 }
             } else if (srcfile.isDirectory()) {
                 if (configuration.copydocfilesubdirs
@@ -141,19 +149,23 @@
         }
     }
 
-    private void handleHtmlFile(DocFile srcfile, DocPath dstPath) throws DocFileIOException {
+    private boolean handleHtmlFile(DocFile srcfile, DocPath dstPath) throws DocFileIOException {
+        Utils utils = configuration.utils;
+        FileObject fileObject = srcfile.getFileObject();
+        DocFileElement dfElement = new DocFileElement(element, fileObject);
+
+        if (shouldPassThrough(utils.getPreamble(dfElement))) {
+            return false;
+        }
+
         DocPath dfilePath = dstPath.resolve(srcfile.getName());
         HtmlDocletWriter docletWriter = new DocFileWriter(configuration, dfilePath, element);
-
-        Utils utils = configuration.utils;
+        configuration.messages.notice("doclet.Generating_0", docletWriter.filename);
 
-        FileObject fileObject = srcfile.getFileObject();
-        DocFileElement dfElement = new DocFileElement(element, fileObject);
         String title = getWindowTitle(docletWriter, dfElement).trim();
         HtmlTree htmlContent = docletWriter.getBody(true, title);
         docletWriter.addTop(htmlContent);
         docletWriter.addNavLinks(true, htmlContent);
-
         List<? extends DocTree> fullBody = utils.getFullBody(dfElement);
         Content bodyContent = docletWriter.commentTagsToContent(null, dfElement, fullBody, false);
 
@@ -163,6 +175,69 @@
         docletWriter.addNavLinks(false, htmlContent);
         docletWriter.addBottom(htmlContent);
         docletWriter.printHtmlDocument(Collections.emptyList(), false, htmlContent);
+        return true;
+    }
+
+
+    private boolean shouldPassThrough(List<? extends DocTree> dtrees) {
+        SimpleDocTreeVisitor<Boolean, Boolean> check = new SimpleDocTreeVisitor<Boolean, Boolean>() {
+            @Override
+            public Boolean visitStartElement(StartElementTree node, Boolean p) {
+                if (Utils.toLowerCase(node.getName().toString()).equals((Attr.STYLE.getText()))) {
+                    return true;
+                }
+                if (Utils.toLowerCase(node.getName().toString()).equals(HtmlTag.LINK.getText())) {
+                    for (DocTree dt : node.getAttributes()) {
+                        if (this.visit(dt, true))
+                            return true;
+                    }
+                }
+                return false;
+            }
+
+            @Override
+            public Boolean visitAttribute(AttributeTree node, Boolean p) {
+                if (p == null || p == false) {
+                    return false;
+                }
+                if (Utils.toLowerCase(node.getName().toString()).equals("rel")) {
+                    for (DocTree dt :  node.getValue()) {
+                        Boolean found = new SimpleDocTreeVisitor<Boolean, ValueKind>() {
+
+                            @Override
+                            public Boolean visitText(TextTree node, ValueKind valueKind) {
+                                switch (valueKind) {
+                                    case EMPTY:
+                                        return false;
+                                    default:
+                                        return Utils.toLowerCase(node.getBody()).equals("stylesheet");
+                                }
+                            }
+
+                            @Override
+                            protected Boolean defaultAction(DocTree node, ValueKind valueKind) {
+                                return false;
+                            }
+
+                        }.visit(dt, node.getValueKind());
+
+                        if (found)
+                            return true;
+                    }
+                }
+                return false;
+            }
+
+            @Override
+            protected Boolean defaultAction(DocTree node, Boolean p) {
+                return false;
+            }
+        };
+        for (DocTree dt : dtrees) {
+            if (check.visit(dt, false))
+                return true;
+        }
+        return false;
     }
 
     private String getWindowTitle(HtmlDocletWriter docletWriter, Element element) {
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/EnumConstantWriterImpl.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/EnumConstantWriterImpl.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -281,7 +281,7 @@
     protected Content getNavSummaryLink(TypeElement typeElement, boolean link) {
         if (link) {
             if (typeElement == null) {
-                return Links.createLink(SectionName.ENUM_CONSTANT_SUMMARY,
+                return links.createLink(SectionName.ENUM_CONSTANT_SUMMARY,
                         contents.navEnum);
             } else {
                 return links.createLink(
@@ -299,7 +299,7 @@
     @Override
     protected void addNavDetailLink(boolean link, Content liNav) {
         if (link) {
-            liNav.addContent(Links.createLink(
+            liNav.addContent(links.createLink(
                     SectionName.ENUM_CONSTANT_DETAIL,
                     contents.navEnum));
         } else {
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/FieldWriterImpl.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/FieldWriterImpl.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -310,7 +310,7 @@
     protected Content getNavSummaryLink(TypeElement typeElement, boolean link) {
         if (link) {
             if (typeElement == null) {
-                return Links.createLink(
+                return links.createLink(
                         SectionName.FIELD_SUMMARY,
                         contents.navField);
             } else {
@@ -329,7 +329,7 @@
     @Override
     protected void addNavDetailLink(boolean link, Content liNav) {
         if (link) {
-            liNav.addContent(Links.createLink(
+            liNav.addContent(links.createLink(
                     SectionName.FIELD_DETAIL,
                     contents.navField));
         } else {
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HelpWriter.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HelpWriter.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -29,7 +29,6 @@
 import jdk.javadoc.internal.doclets.formats.html.markup.HtmlStyle;
 import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTag;
 import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTree;
-import jdk.javadoc.internal.doclets.formats.html.markup.Links;
 import jdk.javadoc.internal.doclets.formats.html.markup.StringContent;
 import jdk.javadoc.internal.doclets.toolkit.Content;
 import jdk.javadoc.internal.doclets.toolkit.util.DocFileIOException;
@@ -54,6 +53,7 @@
 
     /**
      * Constructor to construct HelpWriter object.
+     * @param configuration the configuration
      * @param filename File to be generated.
      */
     public HelpWriter(HtmlConfiguration configuration,
@@ -67,6 +67,7 @@
      * will get generated if and only if "-helpfile" and "-nohelp" is not used
      * on the command line.
      *
+     * @param configuration the configuration
      * @throws DocFileIOException if there is a problem while generating the documentation
      */
     public static void generate(HtmlConfiguration configuration) throws DocFileIOException {
@@ -133,7 +134,7 @@
                     ? HtmlTree.SECTION(overviewHeading)
                     : HtmlTree.LI(HtmlStyle.blockList, overviewHeading);
             Content line3 = contents.getContent("doclet.Help_line_3",
-                    Links.createLink(DocPaths.overviewSummary(configuration.frames),
+                    links.createLink(DocPaths.overviewSummary(configuration.frames),
                     configuration.getText("doclet.Overview")));
             Content overviewPara = HtmlTree.P(line3);
             htmlTree.addContent(overviewPara);
@@ -283,7 +284,7 @@
                     ? HtmlTree.SECTION(treeHead)
                     : HtmlTree.LI(HtmlStyle.blockList, treeHead);
             Content line17 = contents.getContent("doclet.Help_line_17_with_tree_link",
-                    Links.createLink(DocPaths.OVERVIEW_TREE,
+                    links.createLink(DocPaths.OVERVIEW_TREE,
                     configuration.getText("doclet.Class_Hierarchy")),
                     HtmlTree.CODE(new StringContent("java.lang.Object")));
             Content treePara = HtmlTree.P(line17);
@@ -308,7 +309,7 @@
                     ? HtmlTree.SECTION(dHead)
                     : HtmlTree.LI(HtmlStyle.blockList, dHead);
             Content line20 = contents.getContent("doclet.Help_line_20_with_deprecated_api_link",
-                    Links.createLink(DocPaths.DEPRECATED_LIST,
+                    links.createLink(DocPaths.DEPRECATED_LIST,
                     configuration.getText("doclet.Deprecated_API")));
             Content dPara = HtmlTree.P(line20);
             htmlTree.addContent(dPara);
@@ -321,10 +322,10 @@
         if (configuration.createindex) {
             Content indexlink;
             if (configuration.splitindex) {
-                indexlink = Links.createLink(DocPaths.INDEX_FILES.resolve(DocPaths.indexN(1)),
+                indexlink = links.createLink(DocPaths.INDEX_FILES.resolve(DocPaths.indexN(1)),
                         configuration.getText("doclet.Index"));
             } else {
-                indexlink = Links.createLink(DocPaths.INDEX_ALL,
+                indexlink = links.createLink(DocPaths.INDEX_ALL,
                         configuration.getText("doclet.Index"));
             }
             Content indexHead = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING,
@@ -378,7 +379,7 @@
                 ? HtmlTree.SECTION(allclassesHead)
                 : HtmlTree.LI(HtmlStyle.blockList, allclassesHead);
         Content line27 = contents.getContent("doclet.Help_line_27",
-                Links.createLink(DocPaths.AllClasses(configuration.frames),
+                links.createLink(DocPaths.AllClasses(configuration.frames),
                 resources.getText("doclet.All_Classes")));
         Content allclassesPara = HtmlTree.P(line27);
         htmlTree.addContent(allclassesPara);
@@ -406,7 +407,7 @@
                 ? HtmlTree.SECTION(constHead)
                 : HtmlTree.LI(HtmlStyle.blockList, constHead);
         Content line29 = contents.getContent("doclet.Help_line_29",
-                Links.createLink(DocPaths.CONSTANT_VALUES,
+                links.createLink(DocPaths.CONSTANT_VALUES,
                 resources.getText("doclet.Constants_Summary")));
         Content constPara = HtmlTree.P(line29);
         htmlTree.addContent(constPara);
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlConfiguration.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlConfiguration.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -204,9 +204,10 @@
     public boolean frames = true;
 
     /**
-     * This is the HTML version of the generated pages. HTML 4.01 is the default output version.
+     * This is the HTML version of the generated pages.
+     * The default value is determined later.
      */
-    public HtmlVersion htmlVersion = HtmlVersion.HTML4;
+    public HtmlVersion htmlVersion = null;
 
     /**
      * Collected set of doclint options
@@ -244,8 +245,6 @@
 
     protected final Messages messages;
 
-    protected Links links;
-
     /**
      * Creates an object to hold the configuration for a doclet.
      *
@@ -298,6 +297,12 @@
         if (!generalValidOptions()) {
             return false;
         }
+
+        if (htmlVersion == null) {
+            reporter.print(WARNING, getText("doclet.HTML_version_not_specified", helpfile));
+            htmlVersion = HtmlVersion.HTML4;
+        }
+
         // check if helpfile exists
         if (!helpfile.isEmpty()) {
             DocFile help = DocFile.createFileForInput(this, helpfile);
@@ -356,7 +361,6 @@
         setTopFile(docEnv);
         workArounds.initDocLint(doclintOpts.values(), tagletManager.getCustomTagNames(),
                 Utils.toLowerCase(htmlVersion.name()));
-        links = new Links(htmlVersion);
         return true;
     }
 
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlDocletWriter.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlDocletWriter.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -197,7 +197,7 @@
         this.contents = configuration.contents;
         this.messages = configuration.messages;
         this.resources = configuration.resources;
-        this.links = configuration.links;
+        this.links = new Links(path, configuration.htmlVersion);
         this.utils = configuration.utils;
         this.path = path;
         this.pathToRoot = path.parent().invert();
@@ -371,7 +371,7 @@
      */
     public Content getTargetPackageLink(PackageElement pkg, String target,
             Content label) {
-        return Links.createLink(pathString(pkg, DocPaths.PACKAGE_SUMMARY), label, "", target);
+        return links.createLink(pathString(pkg, DocPaths.PACKAGE_SUMMARY), label, "", target);
     }
 
     /**
@@ -385,7 +385,7 @@
      */
     public Content getTargetModulePackageLink(PackageElement pkg, String target,
             Content label, ModuleElement mdle) {
-        return Links.createLink(pathString(pkg, DocPaths.PACKAGE_SUMMARY),
+        return links.createLink(pathString(pkg, DocPaths.PACKAGE_SUMMARY),
                 label, "", target);
     }
 
@@ -398,7 +398,7 @@
      * @return a content for the target module link
      */
     public Content getTargetModuleLink(String target, Content label, ModuleElement mdle) {
-        return Links.createLink(pathToRoot.resolve(
+        return links.createLink(pathToRoot.resolve(
                 DocPaths.moduleSummary(mdle)), label, "", target);
     }
 
@@ -509,7 +509,7 @@
                 //WCAG - Hyperlinks should contain text or an image with alt text - for AT tools
                 navDiv.addContent(a);
                 Content skipLinkContent = HtmlTree.DIV(HtmlStyle.skipNav,
-                        Links.createLink(SectionName.SKIP_NAVBAR_TOP, skipNavLinks,
+                        links.createLink(SectionName.SKIP_NAVBAR_TOP, skipNavLinks,
                         skipNavLinks.toString(), ""));
                 navDiv.addContent(skipLinkContent);
             } else {
@@ -519,7 +519,7 @@
                 Content a = links.createAnchor(SectionName.NAVBAR_BOTTOM);
                 navDiv.addContent(a);
                 Content skipLinkContent = HtmlTree.DIV(HtmlStyle.skipNav,
-                        Links.createLink(SectionName.SKIP_NAVBAR_BOTTOM, skipNavLinks,
+                        links.createLink(SectionName.SKIP_NAVBAR_BOTTOM, skipNavLinks,
                         skipNavLinks.toString(), ""));
                 navDiv.addContent(skipLinkContent);
             }
@@ -651,7 +651,7 @@
      * @return a content tree for the link
      */
     protected Content getNavLinkContents() {
-        Content linkContent = Links.createLink(pathToRoot.resolve(DocPaths.overviewSummary(configuration.frames)),
+        Content linkContent = links.createLink(pathToRoot.resolve(DocPaths.overviewSummary(configuration.frames)),
                 contents.overviewLabel, "", "");
         Content li = HtmlTree.LI(linkContent);
         return li;
@@ -720,7 +720,7 @@
     public Content getNavLinkPrevious(DocPath prev) {
         Content li;
         if (prev != null) {
-            li = HtmlTree.LI(Links.createLink(prev, contents.prevLabel, "", ""));
+            li = HtmlTree.LI(links.createLink(prev, contents.prevLabel, "", ""));
         }
         else
             li = HtmlTree.LI(contents.prevLabel);
@@ -737,7 +737,7 @@
     public Content getNavLinkNext(DocPath next) {
         Content li;
         if (next != null) {
-            li = HtmlTree.LI(Links.createLink(next, contents.nextLabel, "", ""));
+            li = HtmlTree.LI(links.createLink(next, contents.nextLabel, "", ""));
         }
         else
             li = HtmlTree.LI(contents.nextLabel);
@@ -752,7 +752,7 @@
      */
     protected Content getNavShowLists(DocPath link) {
         DocLink dl = new DocLink(link, path.getPath(), null);
-        Content framesContent = Links.createLink(dl, contents.framesLabel, "", "_top");
+        Content framesContent = links.createLink(dl, contents.framesLabel, "", "_top");
         Content li = HtmlTree.LI(framesContent);
         return li;
     }
@@ -773,7 +773,7 @@
      * @return a content tree for the link
      */
     protected Content getNavHideLists(DocPath link) {
-        Content noFramesContent = Links.createLink(link, contents.noFramesLabel, "", "_top");
+        Content noFramesContent = links.createLink(link, contents.noFramesLabel, "", "_top");
         Content li = HtmlTree.LI(noFramesContent);
         return li;
     }
@@ -791,7 +791,7 @@
         DocPath docPath = packages.size() == 1 && configuration.getSpecifiedTypeElements().isEmpty()
                 ? pathString(packages.get(0), DocPaths.PACKAGE_TREE)
                 : pathToRoot.resolve(DocPaths.OVERVIEW_TREE);
-        return HtmlTree.LI(Links.createLink(docPath, contents.treeLabel, "", ""));
+        return HtmlTree.LI(links.createLink(docPath, contents.treeLabel, "", ""));
     }
 
     /**
@@ -801,7 +801,7 @@
      * @return a content tree for the link
      */
     protected Content getNavLinkMainTree(String label) {
-        Content mainTreeContent = Links.createLink(pathToRoot.resolve(DocPaths.OVERVIEW_TREE),
+        Content mainTreeContent = links.createLink(pathToRoot.resolve(DocPaths.OVERVIEW_TREE),
                 new StringContent(label));
         Content li = HtmlTree.LI(mainTreeContent);
         return li;
@@ -823,7 +823,7 @@
      * @return a content tree for the link
      */
     protected Content getNavLinkDeprecated() {
-        Content linkContent = Links.createLink(pathToRoot.resolve(DocPaths.DEPRECATED_LIST),
+        Content linkContent = links.createLink(pathToRoot.resolve(DocPaths.DEPRECATED_LIST),
                 contents.deprecatedLabel, "", "");
         Content li = HtmlTree.LI(linkContent);
         return li;
@@ -837,7 +837,7 @@
      * @return a content tree for the link
      */
     protected Content getNavLinkClassIndex() {
-        Content allClassesContent = Links.createLink(pathToRoot.resolve(
+        Content allClassesContent = links.createLink(pathToRoot.resolve(
                 DocPaths.AllClasses(configuration.frames)),
                 contents.allClassesLabel, "", "");
         Content li = HtmlTree.LI(allClassesContent);
@@ -850,7 +850,7 @@
      * @return a content tree for the link
      */
     protected Content getNavLinkIndex() {
-        Content linkContent = Links.createLink(pathToRoot.resolve(
+        Content linkContent = links.createLink(pathToRoot.resolve(
                 (configuration.splitindex
                     ? DocPaths.INDEX_FILES.resolve(DocPaths.indexN(1))
                     : DocPaths.INDEX_ALL)),
@@ -875,7 +875,7 @@
             DocFile file = DocFile.createFileForInput(configuration, helpfile);
             helpfilenm = DocPath.create(file.getName());
         }
-        Content linkContent = Links.createLink(pathToRoot.resolve(helpfilenm),
+        Content linkContent = links.createLink(pathToRoot.resolve(helpfilenm),
                 contents.helpLabel, "", "");
         Content li = HtmlTree.LI(linkContent);
         return li;
@@ -999,12 +999,12 @@
             }
         }
         if (included || packageElement == null) {
-            return Links.createLink(pathString(packageElement, DocPaths.PACKAGE_SUMMARY),
+            return links.createLink(pathString(packageElement, DocPaths.PACKAGE_SUMMARY),
                     label);
         } else {
             DocLink crossPkgLink = getCrossPackageLink(utils.getPackageName(packageElement));
             if (crossPkgLink != null) {
-                return Links.createLink(crossPkgLink, label);
+                return links.createLink(crossPkgLink, label);
             } else {
                 return label;
             }
@@ -1021,7 +1021,7 @@
     public Content getModuleLink(ModuleElement mdle, Content label) {
         boolean included = utils.isIncluded(mdle);
         return (included)
-                ? Links.createLink(pathToRoot.resolve(DocPaths.moduleSummary(mdle)), label, "", "")
+                ? links.createLink(pathToRoot.resolve(DocPaths.moduleSummary(mdle)), label, "", "")
                 : label;
     }
 
@@ -1051,7 +1051,7 @@
         DocPath href = pathToRoot
                 .resolve(DocPaths.SOURCE_OUTPUT)
                 .resolve(DocPath.forClass(utils, te));
-        Content linkContent = Links.createLink(href
+        Content linkContent = links.createLink(href
                 .fragment(SourceToHTMLConverter.getAnchorName(utils, typeElement)), label, "", "");
         htmltree.addContent(linkContent);
     }
@@ -1115,7 +1115,7 @@
                 */
                 DocLink link = configuration.extern.getExternalLink(packageName, pathToRoot,
                                 className + ".html", refMemName);
-                return Links.createLink(link,
+                return links.createLink(link,
                     (label == null) || label.isEmpty() ? defaultLabel : label,
                     strong,
                     resources.getText("doclet.Href_Class_Or_Interface_Title", packageName),
@@ -1422,7 +1422,7 @@
                         ? getCrossModuleLink(refClassName) : getCrossPackageLink(refClassName);
                 if (elementCrossLink != null) {
                     // Element cross link found
-                    return Links.createLink(elementCrossLink,
+                    return links.createLink(elementCrossLink,
                             (label.isEmpty() ? text : label), true);
                 } else if ((classCrossLink = getCrossClassLink(refClassName,
                         refMemName, label, false, !isLinkPlain)) != null) {
@@ -1752,8 +1752,9 @@
                     result.addContent(sb);
                     Content docRootContent = new ContentBuilder();
 
+                    boolean isHRef = inAnAtag() && node.getName().toString().equalsIgnoreCase("href");
                     for (DocTree dt : node.getValue()) {
-                        if (utils.isText(dt) && inAnAtag()) {
+                        if (utils.isText(dt) && isHRef) {
                             String text = ((TextTree) dt).getBody();
                             if (text.startsWith("/..") && !configuration.docrootparent.isEmpty()) {
                                 result.addContent(configuration.docrootparent);
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/LinkFactoryImpl.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/LinkFactoryImpl.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -33,7 +33,6 @@
 import javax.lang.model.type.TypeMirror;
 
 import jdk.javadoc.internal.doclets.formats.html.markup.ContentBuilder;
-import jdk.javadoc.internal.doclets.formats.html.markup.Links;
 import jdk.javadoc.internal.doclets.toolkit.BaseConfiguration;
 import jdk.javadoc.internal.doclets.toolkit.Content;
 import jdk.javadoc.internal.doclets.toolkit.util.DocPath;
@@ -93,7 +92,7 @@
                 DocPath filename = getPath(classLinkInfo);
                 if (linkInfo.linkToSelf ||
                                 !(DocPath.forName(utils, typeElement)).equals(m_writer.filename)) {
-                        link.addContent(Links.createLink(
+                        link.addContent(m_writer.links.createLink(
                                 filename.fragment(classLinkInfo.where),
                                 label,
                                 classLinkInfo.isStrong,
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/MethodWriterImpl.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/MethodWriterImpl.java	Tue Jan 30 16:41:40 2018 +0100
@@ -432,7 +432,7 @@
     protected Content getNavSummaryLink(TypeElement typeElement, boolean link) {
         if (link) {
             if (typeElement == null) {
-                return Links.createLink(
+                return links.createLink(
                         SectionName.METHOD_SUMMARY,
                         contents.navMethod);
             } else {
@@ -451,7 +451,7 @@
     @Override
     protected void addNavDetailLink(boolean link, Content liNav) {
         if (link) {
-            liNav.addContent(Links.createLink(
+            liNav.addContent(links.createLink(
                     SectionName.METHOD_DETAIL, contents.navMethod));
         } else {
             liNav.addContent(contents.navMethod);
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ModuleFrameWriter.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ModuleFrameWriter.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -101,7 +101,7 @@
                 ? HtmlTree.MAIN()
                 : body;
         Content heading = HtmlTree.HEADING(HtmlConstants.TITLE_HEADING, HtmlStyle.bar,
-                Links.createLink(DocPaths.moduleSummary(moduleElement), mdlLabel, "", "classFrame"));
+                mdlgen.links.createLink(DocPaths.moduleSummary(moduleElement), mdlLabel, "", "classFrame"));
         htmlTree.addContent(heading);
         HtmlTree div = new HtmlTree(HtmlTag.DIV);
         div.setStyle(HtmlStyle.indexContainer);
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ModuleIndexFrameWriter.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ModuleIndexFrameWriter.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2017, 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
@@ -152,7 +152,7 @@
      * @param ul the Content object to which the all classes link should be added
      */
     protected void addAllClassesLink(Content ul) {
-        Content linkContent = Links.createLink(DocPaths.ALLCLASSES_FRAME,
+        Content linkContent = links.createLink(DocPaths.ALLCLASSES_FRAME,
                 contents.allClassesLabel, "", "packageFrame");
         Content li = HtmlTree.LI(linkContent);
         ul.addContent(li);
@@ -165,7 +165,7 @@
      * @param ul the Content object to which the all packages link should be added
      */
     protected void addAllPackagesLink(Content ul) {
-        Content linkContent = Links.createLink(DocPaths.OVERVIEW_FRAME,
+        Content linkContent = links.createLink(DocPaths.OVERVIEW_FRAME,
                 contents.allPackagesLabel, "", "packageListFrame");
         Content li = HtmlTree.LI(linkContent);
         ul.addContent(li);
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ModulePackageIndexFrameWriter.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ModulePackageIndexFrameWriter.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2017, 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
@@ -143,12 +143,12 @@
         Content pkgLabel;
         if (!pkg.isUnnamed()) {
             pkgLabel = getPackageLabel(utils.getPackageName(pkg));
-            packageLinkContent = Links.createLink(pathString(pkg,
+            packageLinkContent = links.createLink(pathString(pkg,
                      DocPaths.PACKAGE_FRAME), pkgLabel, "",
                     "packageFrame");
         } else {
             pkgLabel = new StringContent("<unnamed package>");
-            packageLinkContent = Links.createLink(DocPaths.PACKAGE_FRAME,
+            packageLinkContent = links.createLink(DocPaths.PACKAGE_FRAME,
                     pkgLabel, "", "packageFrame");
         }
         Content li = HtmlTree.LI(packageLinkContent);
@@ -189,7 +189,7 @@
      * @param ul the Content object to which the all classes link should be added
      */
     protected void addAllClassesLink(Content ul) {
-        Content linkContent = Links.createLink(DocPaths.ALLCLASSES_FRAME,
+        Content linkContent = links.createLink(DocPaths.ALLCLASSES_FRAME,
                 contents.allClassesLabel, "", "packageFrame");
         Content li = HtmlTree.LI(linkContent);
         ul.addContent(li);
@@ -202,7 +202,7 @@
      * @param ul the Content object to which the all packages link should be added
      */
     protected void addAllPackagesLink(Content ul) {
-        Content linkContent = Links.createLink(DocPaths.OVERVIEW_FRAME,
+        Content linkContent = links.createLink(DocPaths.OVERVIEW_FRAME,
                 contents.allPackagesLabel, "", "packageListFrame");
         Content li = HtmlTree.LI(linkContent);
         ul.addContent(li);
@@ -215,7 +215,7 @@
      * @param ul the Content object to which the all modules link should be added
      */
     protected void addAllModulesLink(Content ul) {
-        Content linkContent = Links.createLink(DocPaths.MODULE_OVERVIEW_FRAME,
+        Content linkContent = links.createLink(DocPaths.MODULE_OVERVIEW_FRAME,
                 contents.allModulesLabel, "", "packageListFrame");
         Content li = HtmlTree.LI(linkContent);
         ul.addContent(li);
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ModuleWriterImpl.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ModuleWriterImpl.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -951,20 +951,20 @@
         Content ulNav = HtmlTree.UL(HtmlStyle.subNavList, li);
         Content liNav = new HtmlTree(HtmlTag.LI);
         liNav.addContent(!utils.getFullBody(mdle).isEmpty() && !configuration.nocomment
-                ? Links.createLink(SectionName.MODULE_DESCRIPTION, contents.navModuleDescription)
+                ? links.createLink(SectionName.MODULE_DESCRIPTION, contents.navModuleDescription)
                 : contents.navModuleDescription);
         addNavGap(liNav);
         liNav.addContent((display(requires) || display(indirectModules))
-                ? Links.createLink(SectionName.MODULES, contents.navModules)
+                ? links.createLink(SectionName.MODULES, contents.navModules)
                 : contents.navModules);
         addNavGap(liNav);
         liNav.addContent((display(packages)
                 || display(indirectPackages) || display(indirectOpenPackages))
-                ? Links.createLink(SectionName.PACKAGES, contents.navPackages)
+                ? links.createLink(SectionName.PACKAGES, contents.navPackages)
                 : contents.navPackages);
         addNavGap(liNav);
         liNav.addContent((displayServices(uses, usesTrees) || displayServices(provides.keySet(), providesTrees))
-                ? Links.createLink(SectionName.SERVICES, contents.navServices)
+                ? links.createLink(SectionName.SERVICES, contents.navServices)
                 : contents.navServices);
         ulNav.addContent(liNav);
         return ulNav;
@@ -1056,7 +1056,7 @@
         if (prevModule == null) {
             li = HtmlTree.LI(contents.prevModuleLabel);
         } else {
-            li = HtmlTree.LI(Links.createLink(pathToRoot.resolve(DocPaths.moduleSummary(
+            li = HtmlTree.LI(links.createLink(pathToRoot.resolve(DocPaths.moduleSummary(
                     prevModule)), contents.prevModuleLabel, "", ""));
         }
         return li;
@@ -1073,7 +1073,7 @@
         if (nextModule == null) {
             li = HtmlTree.LI(contents.nextModuleLabel);
         } else {
-            li = HtmlTree.LI(Links.createLink(pathToRoot.resolve(DocPaths.moduleSummary(
+            li = HtmlTree.LI(links.createLink(pathToRoot.resolve(DocPaths.moduleSummary(
                     nextModule)), contents.nextModuleLabel, "", ""));
         }
         return li;
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/NestedClassWriterImpl.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/NestedClassWriterImpl.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -213,7 +213,7 @@
     protected Content getNavSummaryLink(TypeElement typeElement, boolean link) {
         if (link) {
             if (typeElement == null) {
-                return Links.createLink(
+                return links.createLink(
                         SectionName.NESTED_CLASS_SUMMARY,
                         contents.navNested);
             } else {
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/PackageIndexFrameWriter.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/PackageIndexFrameWriter.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -25,8 +25,6 @@
 
 package jdk.javadoc.internal.doclets.formats.html;
 
-import java.util.Collection;
-
 import javax.lang.model.element.PackageElement;
 
 import jdk.javadoc.internal.doclets.formats.html.markup.HtmlConstants;
@@ -110,11 +108,11 @@
         Content packageLabel;
         if (pe.isUnnamed()) {
             packageLabel = new StringContent("<unnamed package>");
-            packageLinkContent = Links.createLink(DocPaths.PACKAGE_FRAME,
+            packageLinkContent = links.createLink(DocPaths.PACKAGE_FRAME,
                     packageLabel, "", "packageFrame");
         } else {
             packageLabel = getPackageLabel(pe.getQualifiedName());
-            packageLinkContent = Links.createLink(pathString(pe,
+            packageLinkContent = links.createLink(pathString(pe,
                      DocPaths.PACKAGE_FRAME), packageLabel, "",
                     "packageFrame");
         }
@@ -153,7 +151,7 @@
      */
     @Override
     protected void addAllClassesLink(Content ul) {
-        Content linkContent = Links.createLink(DocPaths.ALLCLASSES_FRAME,
+        Content linkContent = links.createLink(DocPaths.ALLCLASSES_FRAME,
                 contents.allClassesLabel, "", "packageFrame");
         Content li = HtmlTree.LI(linkContent);
         ul.addContent(li);
@@ -167,7 +165,7 @@
      */
     @Override
     protected void addAllModulesLink(Content ul) {
-        Content linkContent = Links.createLink(DocPaths.MODULE_OVERVIEW_FRAME,
+        Content linkContent = links.createLink(DocPaths.MODULE_OVERVIEW_FRAME,
                 contents.allModulesLabel, "", "packageListFrame");
         Content li = HtmlTree.LI(linkContent);
         ul.addContent(li);
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/PackageTreeWriter.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/PackageTreeWriter.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -232,7 +232,7 @@
      */
     @Override
     protected Content getNavLinkPackage() {
-        Content linkContent = Links.createLink(DocPaths.PACKAGE_SUMMARY,
+        Content linkContent = links.createLink(DocPaths.PACKAGE_SUMMARY,
                 contents.packageLabel);
         Content li = HtmlTree.LI(linkContent);
         return li;
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/PackageUseWriter.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/PackageUseWriter.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -223,7 +223,7 @@
                 DocPath dp = pathString(te,
                         DocPaths.CLASS_USE.resolve(DocPath.forName(utils, te)));
                 Content stringContent = new StringContent(utils.getSimpleName(te));
-                Content typeContent = Links.createLink(dp.fragment(getPackageAnchorName(usingPackage)),
+                Content typeContent = links.createLink(dp.fragment(getPackageAnchorName(usingPackage)),
                         stringContent);
                 Content summary = new ContentBuilder();
                 addIndexComment(te, summary);
@@ -288,7 +288,7 @@
      */
     @Override
     protected Content getNavLinkPackage() {
-        Content linkContent = Links.createLink(DocPaths.PACKAGE_SUMMARY,
+        Content linkContent = links.createLink(DocPaths.PACKAGE_SUMMARY,
                 contents.packageLabel);
         Content li = HtmlTree.LI(linkContent);
         return li;
@@ -312,7 +312,7 @@
      */
     @Override
     protected Content getNavLinkTree() {
-        Content linkContent = Links.createLink(DocPaths.PACKAGE_TREE,
+        Content linkContent = links.createLink(DocPaths.PACKAGE_TREE,
                 contents.treeLabel);
         Content li = HtmlTree.LI(linkContent);
         return li;
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/PackageWriterImpl.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/PackageWriterImpl.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -385,7 +385,7 @@
      */
     @Override
     protected Content getNavLinkClassUse() {
-        Content useLink = Links.createLink(DocPaths.PACKAGE_USE,
+        Content useLink = links.createLink(DocPaths.PACKAGE_USE,
                 contents.useLabel, "", "");
         Content li = HtmlTree.LI(useLink);
         return li;
@@ -403,7 +403,7 @@
             li = HtmlTree.LI(contents.prevPackageLabel);
         } else {
             DocPath p = DocPath.relativePath(packageElement, prev);
-            li = HtmlTree.LI(Links.createLink(p.resolve(DocPaths.PACKAGE_SUMMARY),
+            li = HtmlTree.LI(links.createLink(p.resolve(DocPaths.PACKAGE_SUMMARY),
                 contents.prevPackageLabel, "", ""));
         }
         return li;
@@ -421,7 +421,7 @@
             li = HtmlTree.LI(contents.nextPackageLabel);
         } else {
             DocPath p = DocPath.relativePath(packageElement, next);
-            li = HtmlTree.LI(Links.createLink(p.resolve(DocPaths.PACKAGE_SUMMARY),
+            li = HtmlTree.LI(links.createLink(p.resolve(DocPaths.PACKAGE_SUMMARY),
                 contents.nextPackageLabel, "", ""));
         }
         return li;
@@ -435,7 +435,7 @@
      */
     @Override
     protected Content getNavLinkTree() {
-        Content useLink = Links.createLink(DocPaths.PACKAGE_TREE,
+        Content useLink = links.createLink(DocPaths.PACKAGE_TREE,
                 contents.treeLabel, "", "");
         Content li = HtmlTree.LI(useLink);
         return li;
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/PropertyWriterImpl.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/PropertyWriterImpl.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -332,7 +332,7 @@
     protected Content getNavSummaryLink(TypeElement typeElement, boolean link) {
         if (link) {
             if (typeElement == null) {
-                return Links.createLink(
+                return links.createLink(
                         SectionName.PROPERTY_SUMMARY,
                         contents.navProperty);
             } else {
@@ -351,7 +351,7 @@
     @Override
     protected void addNavDetailLink(boolean link, Content liNav) {
         if (link) {
-            liNav.addContent(Links.createLink(
+            liNav.addContent(links.createLink(
                     SectionName.PROPERTY_DETAIL,
                     contents.navProperty));
         } else {
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/SplitIndexWriter.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/SplitIndexWriter.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -177,7 +177,7 @@
     protected void addLinksForIndexes(Content contentTree) {
         for (int i = 0; i < indexElements.size(); i++) {
             int j = i + 1;
-            contentTree.addContent(Links.createLink(DocPaths.indexN(j),
+            contentTree.addContent(links.createLink(DocPaths.indexN(j),
                     new StringContent(indexElements.get(i).toString())));
             contentTree.addContent(Contents.SPACE);
         }
@@ -195,7 +195,7 @@
             return HtmlTree.LI(prevletterLabel);
         }
         else {
-            Content prevLink = Links.createLink(DocPaths.indexN(prev),
+            Content prevLink = links.createLink(DocPaths.indexN(prev),
                     prevletterLabel);
             return HtmlTree.LI(prevLink);
         }
@@ -213,7 +213,7 @@
             return HtmlTree.LI(nextletterLabel);
         }
         else {
-            Content nextLink = Links.createLink(DocPaths.indexN(next),
+            Content nextLink = links.createLink(DocPaths.indexN(next),
                     nextletterLabel);
             return HtmlTree.LI(nextLink);
         }
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/TagletWriterImpl.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/TagletWriterImpl.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -106,7 +106,7 @@
         }
         String desc = ch.getText(itt.getDescription());
 
-        String anchorName = configuration.links.getName(tagText);
+        String anchorName = htmlWriter.links.getName(tagText);
         Content result = HtmlTree.A_ID(HtmlStyle.searchTagResult, anchorName, new StringContent(tagText));
         if (configuration.createindex && !tagText.isEmpty()) {
             SearchIndexItem si = new SearchIndexItem();
@@ -288,7 +288,7 @@
                     ((ClassWriterImpl) htmlWriter).getTypeElement().getQualifiedName() + "." +
                     utils.getSimpleName(holder);
             DocLink link = constantsPath.fragment(whichConstant);
-            body.addContent(Links.createLink(link,
+            body.addContent(htmlWriter.links.createLink(link,
                     new StringContent(configuration.getText("doclet.Constants_Summary"))));
         }
         if (utils.isClass(holder) && utils.isSerializable((TypeElement)holder)) {
@@ -298,7 +298,7 @@
                 appendSeparatorIfNotEmpty(body);
                 DocPath serialPath = htmlWriter.pathToRoot.resolve(DocPaths.SERIALIZED_FORM);
                 DocLink link = serialPath.fragment(utils.getFullyQualifiedName(holder));
-                body.addContent(Links.createLink(link,
+                body.addContent(htmlWriter.links.createLink(link,
                         new StringContent(configuration.getText("doclet.Serialized_Form"))));
             }
         }
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/TreeWriter.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/TreeWriter.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -162,7 +162,7 @@
                     continue;
                 }
                 DocPath link = pathString(pkg, DocPaths.PACKAGE_TREE);
-                Content li = HtmlTree.LI(Links.createLink(link,
+                Content li = HtmlTree.LI(links.createLink(link,
                         new StringContent(utils.getPackageName(pkg))));
                 if (i < packages.size() - 1) {
                     li.addContent(", ");
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/markup/Links.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/markup/Links.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -46,17 +46,20 @@
  */
 public class Links {
 
+    private final DocPath file;
     private final HtmlVersion version;
 
     /**
-     * Creates a {@code Links} object for a specific HTML version.
+     * Creates a {@code Links} object for a specific file, to be written in a specific HTML version.
      * The version is used by the {@link #getName(String) getName} method
      * to help determine valid HTML names (ids), and to determine whether
      * to use an {@code id} or {@code name} attribute when creating anchors.
      *
+     * @param file the file
      * @param version the HTML version
      */
-    public Links(HtmlVersion version) {
+    public Links(DocPath file, HtmlVersion version) {
+        this.file = file;
         this.version = version;
     }
 
@@ -118,7 +121,7 @@
      */
     public Content createLink(String where, Content label) {
         DocLink l = DocLink.fragment(getName(where));
-        return Links.createLink(l, label, "", "");
+        return createLink(l, label, "", "");
     }
 
     /**
@@ -128,9 +131,9 @@
      * @param label         the content for the link
      * @return a content tree for the link
      */
-    public static Content createLink(SectionName sectionName, Content label) {
+    public Content createLink(SectionName sectionName, Content label) {
         DocLink l =  DocLink.fragment(sectionName.getName());
-        return Links.createLink(l, label, "", "");
+        return createLink(l, label, "", "");
     }
 
     /**
@@ -145,7 +148,7 @@
      */
     public Content createLink(SectionName sectionName, String where, Content label) {
         DocLink l =  DocLink.fragment(sectionName.getName() + getName(where));
-        return Links.createLink(l, label, "", "");
+        return createLink(l, label, "", "");
     }
 
     /**
@@ -157,7 +160,7 @@
      * @param target    the target for the link, or null
      * @return a content tree for the link
      */
-    public static Content createLink(SectionName sectionName, Content label, String title, String target) {
+    public Content createLink(SectionName sectionName, Content label, String title, String target) {
         DocLink l = DocLink.fragment(sectionName.getName());
         return createLink(l, label, title, target);
     }
@@ -169,8 +172,8 @@
      * @param label  the content for the link
      * @return a content tree for the link
      */
-    public static Content createLink(DocPath path, String label) {
-        return Links.createLink(path, new StringContent(label), false, "", "");
+    public Content createLink(DocPath path, String label) {
+        return createLink(path, new StringContent(label), false, "", "");
     }
 
     /**
@@ -180,8 +183,8 @@
      * @param label  the content for the link
      * @return a content tree for the link
      */
-    public static Content createLink(DocPath path, Content label) {
-        return Links.createLink(path, label, "", "");
+    public Content createLink(DocPath path, Content label) {
+        return createLink(path, label, "", "");
     }
 
     /**
@@ -196,7 +199,7 @@
      * @param target    the target for the link, or null
      * @return a content tree for the link
      */
-    public static Content createLink(DocPath path, Content label, boolean strong,
+    public Content createLink(DocPath path, Content label, boolean strong,
             String title, String target) {
         return createLink(new DocLink(path), label, strong, title, target);
     }
@@ -210,8 +213,8 @@
      * @param target    the target for the link, or null
      * @return a content tree for the link
      */
-    public static Content createLink(DocPath path, Content label, String title, String target) {
-        return Links.createLink(new DocLink(path), label, title, target);
+    public Content createLink(DocPath path, Content label, String title, String target) {
+        return createLink(new DocLink(path), label, title, target);
     }
 
     /**
@@ -221,8 +224,8 @@
      * @param label     the content for the link
      * @return a content tree for the link
      */
-    public static Content createLink(DocLink link, Content label) {
-        return Links.createLink(link, label, "", "");
+    public Content createLink(DocLink link, Content label) {
+        return createLink(link, label, "", "");
     }
 
     /**
@@ -234,8 +237,8 @@
      * @param target    the target for the link, or null
      * @return a content tree for the link
      */
-    public static Content createLink(DocLink link, Content label, String title, String target) {
-        HtmlTree anchor = HtmlTree.A(link.toString(), label);
+    public Content createLink(DocLink link, Content label, String title, String target) {
+        HtmlTree anchor = HtmlTree.A(link.relativizeAgainst(file).toString(), label);
         if (title != null && title.length() != 0) {
             anchor.addAttr(HtmlAttr.TITLE, title);
         }
@@ -257,7 +260,7 @@
      * @param target    the target for the link, or null
      * @return a content tree for the link
      */
-    public static Content createLink(DocLink link, Content label, boolean strong,
+    public Content createLink(DocLink link, Content label, boolean strong,
             String title, String target) {
         return createLink(link, label, strong, title, target, false);
     }
@@ -275,13 +278,13 @@
      * @param isExternal is the link external to the generated documentation
      * @return a content tree for the link
      */
-    public static Content createLink(DocLink link, Content label, boolean strong,
+    public Content createLink(DocLink link, Content label, boolean strong,
             String title, String target, boolean isExternal) {
         Content body = label;
         if (strong) {
             body = HtmlTree.SPAN(HtmlStyle.typeNameLink, body);
         }
-        HtmlTree l = HtmlTree.A(link.toString(), body);
+        HtmlTree l = HtmlTree.A(link.relativizeAgainst(file).toString(), body);
         if (title != null && title.length() != 0) {
             l.addAttr(HtmlAttr.TITLE, title);
         }
@@ -302,13 +305,12 @@
      * @param isExternal is the link external to the generated documentation
      * @return a content tree for the link
      */
-    public static Content createLink(DocLink link, Content label, boolean isExternal) {
-        HtmlTree anchor = HtmlTree.A(link.toString(), label);
+    public Content createLink(DocLink link, Content label, boolean isExternal) {
+        HtmlTree anchor = HtmlTree.A(link.relativizeAgainst(file).toString(), label);
         anchor.setStyle(HtmlStyle.externalLink);
         return anchor;
     }
 
-
     /**
      * Converts a name to a valid HTML name (id).
      * This depends on the HTML version specified when the {@code Links} object was created.
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/resources/standard.properties	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/resources/standard.properties	Tue Jan 30 16:41:40 2018 +0100
@@ -384,3 +384,11 @@
     name prefix followed by .*, which expands to all sub-packages\n\
     of the given package. Prefix the package specifier with - to\n\
     disable checks for the specified packages.
+
+# L10N: do not localize the option names -html4 and -html5
+doclet.HTML_version_not_specified=\
+    You have not specified the version of HTML to use.\n\
+    The default is currently HTML 4.01, but this will change to HTML5\n\
+    in a future release. To suppress this warning, please specify the\n\
+    version of HTML used in your documentation comments and to be\n\
+    generated by this doclet, using the -html4 or -html5 options.
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/resources/standard_ja.properties	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/resources/standard_ja.properties	Tue Jan 30 16:41:40 2018 +0100
@@ -74,34 +74,12 @@
 doclet.see.class_or_package_not_accessible=\u30BF\u30B0{0}: \u53C2\u7167\u306B\u30A2\u30AF\u30BB\u30B9\u3067\u304D\u307E\u305B\u3093: {1}
 doclet.tag.invalid_usage=\u30BF\u30B0{0}\u306E\u4F7F\u7528\u65B9\u6CD5\u304C\u7121\u52B9\u3067\u3059
 doclet.Deprecated_API=\u63A8\u5968\u3055\u308C\u3066\u3044\u306A\u3044API
-doclet.Deprecated_For_Removal=\u524A\u9664\u4E88\u5B9A\u306E\u975E\u63A8\u5968
-doclet.Deprecated_Modules=\u975E\u63A8\u5968\u30E2\u30B8\u30E5\u30FC\u30EB
-doclet.Deprecated_Packages=\u63A8\u5968\u3055\u308C\u3066\u3044\u306A\u3044\u30D1\u30C3\u30B1\u30FC\u30B8
-doclet.Deprecated_Classes=\u63A8\u5968\u3055\u308C\u3066\u3044\u306A\u3044\u30AF\u30E9\u30B9
-doclet.Deprecated_Enums=\u63A8\u5968\u3055\u308C\u3066\u3044\u306A\u3044\u5217\u6319\u578B
-doclet.Deprecated_Interfaces=\u63A8\u5968\u3055\u308C\u3066\u3044\u306A\u3044\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9
-doclet.Deprecated_Exceptions=\u63A8\u5968\u3055\u308C\u3066\u3044\u306A\u3044\u4F8B\u5916
-doclet.Deprecated_Annotation_Types=\u63A8\u5968\u3055\u308C\u3066\u3044\u306A\u3044\u6CE8\u91C8\u578B
-doclet.Deprecated_Errors=\u63A8\u5968\u3055\u308C\u3066\u3044\u306A\u3044\u30A8\u30E9\u30FC
-doclet.Deprecated_Fields=\u63A8\u5968\u3055\u308C\u3066\u3044\u306A\u3044\u30D5\u30A3\u30FC\u30EB\u30C9
-doclet.Deprecated_Constructors=\u63A8\u5968\u3055\u308C\u3066\u3044\u306A\u3044\u30B3\u30F3\u30B9\u30C8\u30E9\u30AF\u30BF
-doclet.Deprecated_Methods=\u63A8\u5968\u3055\u308C\u3066\u3044\u306A\u3044\u30E1\u30BD\u30C3\u30C9
-doclet.Deprecated_Enum_Constants=\u63A8\u5968\u3055\u308C\u3066\u3044\u306A\u3044\u5217\u6319\u578B\u5B9A\u6570
-doclet.Deprecated_Annotation_Type_Members=\u63A8\u5968\u3055\u308C\u3066\u3044\u306A\u3044\u6CE8\u91C8\u578B\u306E\u8981\u7D20
-doclet.deprecated_for_removal=\u524A\u9664\u4E88\u5B9A\u306E\u975E\u63A8\u5968
-doclet.deprecated_modules=\u975E\u63A8\u5968\u30E2\u30B8\u30E5\u30FC\u30EB
-doclet.deprecated_packages=\u63A8\u5968\u3055\u308C\u3066\u3044\u306A\u3044\u30D1\u30C3\u30B1\u30FC\u30B8
-doclet.deprecated_classes=\u63A8\u5968\u3055\u308C\u3066\u3044\u306A\u3044\u30AF\u30E9\u30B9
-doclet.deprecated_enums=\u63A8\u5968\u3055\u308C\u3066\u3044\u306A\u3044\u5217\u6319\u578B
-doclet.deprecated_interfaces=\u63A8\u5968\u3055\u308C\u3066\u3044\u306A\u3044\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9
-doclet.deprecated_exceptions=\u63A8\u5968\u3055\u308C\u3066\u3044\u306A\u3044\u4F8B\u5916
-doclet.deprecated_annotation_types=\u63A8\u5968\u3055\u308C\u3066\u3044\u306A\u3044\u6CE8\u91C8\u578B
-doclet.deprecated_errors=\u63A8\u5968\u3055\u308C\u3066\u3044\u306A\u3044\u30A8\u30E9\u30FC
-doclet.deprecated_fields=\u63A8\u5968\u3055\u308C\u3066\u3044\u306A\u3044\u30D5\u30A3\u30FC\u30EB\u30C9
-doclet.deprecated_constructors=\u63A8\u5968\u3055\u308C\u3066\u3044\u306A\u3044\u30B3\u30F3\u30B9\u30C8\u30E9\u30AF\u30BF
-doclet.deprecated_methods=\u63A8\u5968\u3055\u308C\u3066\u3044\u306A\u3044\u30E1\u30BD\u30C3\u30C9
-doclet.deprecated_enum_constants=\u63A8\u5968\u3055\u308C\u3066\u3044\u306A\u3044\u5217\u6319\u578B\u5B9A\u6570
-doclet.deprecated_annotation_type_members=\u63A8\u5968\u3055\u308C\u3066\u3044\u306A\u3044\u6CE8\u91C8\u578B\u306E\u8981\u7D20
+doclet.For_Removal=\u524A\u9664\u7528
+doclet.Annotation_Types=\u6CE8\u91C8\u578B
+doclet.Annotation_Type_Members=\u6CE8\u91C8\u578B\u8981\u7D20
+doclet.for_removal=\u524A\u9664\u7528
+doclet.annotation_types=\u6CE8\u91C8\u578B
+doclet.annotation_type_members=\u6CE8\u91C8\u578B\u8981\u7D20
 doclet.Generated_Docs_Untitled=\u751F\u6210\u3055\u308C\u305F\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8(\u30BF\u30A4\u30C8\u30EB\u306A\u3057)
 doclet.Other_Packages=\u305D\u306E\u4ED6\u306E\u30D1\u30C3\u30B1\u30FC\u30B8
 doclet.Description=\u8AAC\u660E
@@ -192,11 +170,13 @@
 doclet.Window_ClassUse_Header={0} {1}\u306E\u4F7F\u7528
 doclet.ClassUse_Title={0}\u306E\u4F7F\u7528
 doclet.navClassUse=\u4F7F\u7528
-doclet.Error_in_packagelist=-group\u30AA\u30D7\u30B7\u30E7\u30F3\u306E\u4F7F\u7528\u65B9\u6CD5\u306E\u30A8\u30E9\u30FC: {0} {1}
-doclet.Groupname_already_used=-group\u30AA\u30D7\u30B7\u30E7\u30F3\u306B\u304A\u3044\u3066\u3001\u3059\u3067\u306B\u30B0\u30EB\u30FC\u30D7\u540D\u304C\u4F7F\u7528\u3055\u308C\u3066\u3044\u307E\u3059: {0}
-doclet.Same_package_name_used=\u30D1\u30C3\u30B1\u30FC\u30B8\u540D\u5F62\u5F0F\u304C2\u56DE\u4F7F\u7528\u3055\u308C\u3066\u3044\u307E\u3059: {0}
+doclet.Error_in_grouplist=-group\u30AA\u30D7\u30B7\u30E7\u30F3\u304C\u7121\u52B9\u3067\u3059: {0} {1}
+doclet.Groupname_already_used=-group\u30AA\u30D7\u30B7\u30E7\u30F3\u3067\u3001\u30B0\u30EB\u30FC\u30D7\u540D\u304C\u3059\u3067\u306B\u4F7F\u7528\u3055\u308C\u3066\u3044\u307E\u3059: {0}
+doclet.Same_element_name_used=\u8981\u7D20\u540D\u307E\u305F\u306F\u30D1\u30BF\u30FC\u30F3\u304C2\u56DE\u4F7F\u7528\u3055\u308C\u3066\u3044\u307E\u3059: {0}
 
 # option specifiers
+doclet.usage.add-stylesheet.parameters=<file>
+doclet.usage.add-stylesheet.description=\u751F\u6210\u3055\u308C\u305F\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u306E\u8FFD\u52A0\u30B9\u30BF\u30A4\u30EB\u30B7\u30FC\u30C8\u30FB\u30D5\u30A1\u30A4\u30EB
 doclet.usage.d.parameters=<directory>
 doclet.usage.d.description=\u51FA\u529B\u30D5\u30A1\u30A4\u30EB\u306E\u8EE2\u9001\u5148\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA
 
@@ -244,8 +224,8 @@
 doclet.usage.excludedocfilessubdir.parameters=<name>:..
 doclet.usage.excludedocfilessubdir.description=\u6307\u5B9A\u3055\u308C\u305F\u540D\u524D\u306Edoc-files\u30B5\u30D6\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u3092\u3059\u3079\u3066\u9664\u5916\u3057\u307E\u3059
 
-doclet.usage.group.parameters=<name> <p1>:<p2>..
-doclet.usage.group.description=\u6307\u5B9A\u3059\u308B\u30D1\u30C3\u30B1\u30FC\u30B8\u3092\u6982\u8981\u30DA\u30FC\u30B8\u306B\u304A\u3044\u3066\u30B0\u30EB\u30FC\u30D7\u5316\u3057\u307E\u3059
+doclet.usage.group.parameters=<name> <g1>:<g2>...
+doclet.usage.group.description=\u6307\u5B9A\u3059\u308B\u8981\u7D20\u3092\u6982\u8981\u30DA\u30FC\u30B8\u306B\u304A\u3044\u3066\u30B0\u30EB\u30FC\u30D7\u5316\u3057\u307E\u3059
 
 doclet.usage.nocomment.description=\u8A18\u8FF0\u304A\u3088\u3073\u30BF\u30B0\u3092\u6291\u5236\u3057\u3066\u5BA3\u8A00\u306E\u307F\u3092\u751F\u6210\u3057\u307E\u3059
 
@@ -294,8 +274,8 @@
 
 doclet.usage.keywords.description=HTML\u306Emeta\u30BF\u30B0\u306B\u3001\u30D1\u30C3\u30B1\u30FC\u30B8\u3001\u30AF\u30E9\u30B9\u304A\u3088\u3073\u30E1\u30F3\u30D0\u30FC\u306E\u60C5\u5831\u3092\u542B\u3081\u307E\u3059
 
-doclet.usage.stylesheetfile.parameters=<path>
-doclet.usage.stylesheetfile.description=\u751F\u6210\u3055\u308C\u305F\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u306E\u30B9\u30BF\u30A4\u30EB\u5909\u66F4\u7528\u30D5\u30A1\u30A4\u30EB
+doclet.usage.main-stylesheet.parameters=<file>
+doclet.usage.main-stylesheet.description=\u751F\u6210\u3055\u308C\u305F\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u306E\u30B9\u30BF\u30A4\u30EB\u5909\u66F4\u7528\u30D5\u30A1\u30A4\u30EB
 
 doclet.usage.docencoding.parameters=<name>
 doclet.usage.docencoding.description=\u51FA\u529B\u306E\u6587\u5B57\u30A8\u30F3\u30B3\u30FC\u30C7\u30A3\u30F3\u30B0\u3092\u6307\u5B9A\u3057\u307E\u3059
@@ -304,6 +284,10 @@
 
 doclet.usage.no-frames.description=\u751F\u6210\u3055\u308C\u305F\u51FA\u529B\u3067\u30D5\u30EC\u30FC\u30E0\u306E\u4F7F\u7528\u3092\u7121\u52B9\u306B\u3057\u307E\u3059
 
+doclet.usage.override-methods.parameters=(\u8A73\u7D30|\u8981\u7D04)
+
+doclet.usage.override-methods.description=\u30AA\u30FC\u30D0\u30FC\u30E9\u30A4\u30C9\u3055\u308C\u305F\u30E1\u30BD\u30C3\u30C9\u3092\u8A73\u7D30\u307E\u305F\u306F\u8981\u7D04\u30BB\u30AF\u30B7\u30E7\u30F3\u3067\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u5316\u3057\u307E\u3059
+
 doclet.usage.allow-script-in-comments.description=\u30AA\u30D7\u30B7\u30E7\u30F3\u304A\u3088\u3073\u30B3\u30E1\u30F3\u30C8\u3067JavaScript\u3092\u8A31\u53EF\u3057\u307E\u3059
 
 doclet.usage.xdocrootparent.parameters=<url>
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/resources/standard_zh_CN.properties	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/resources/standard_zh_CN.properties	Tue Jan 30 16:41:40 2018 +0100
@@ -74,34 +74,12 @@
 doclet.see.class_or_package_not_accessible=\u6807\u8BB0{0}: \u65E0\u6CD5\u8BBF\u95EE\u5F15\u7528: {1}
 doclet.tag.invalid_usage=\u6807\u8BB0 {0} \u7684\u7528\u6CD5\u65E0\u6548
 doclet.Deprecated_API=\u5DF2\u8FC7\u65F6\u7684 API
-doclet.Deprecated_For_Removal=\u5DF2\u8FC7\u65F6, \u5F85\u5220\u9664
-doclet.Deprecated_Modules=\u5DF2\u8FC7\u65F6\u6A21\u5757
-doclet.Deprecated_Packages=\u5DF2\u8FC7\u65F6\u7A0B\u5E8F\u5305
-doclet.Deprecated_Classes=\u5DF2\u8FC7\u65F6\u7684\u7C7B
-doclet.Deprecated_Enums=\u5DF2\u8FC7\u65F6\u7684\u679A\u4E3E
-doclet.Deprecated_Interfaces=\u5DF2\u8FC7\u65F6\u7684\u63A5\u53E3
-doclet.Deprecated_Exceptions=\u5DF2\u8FC7\u65F6\u7684\u5F02\u5E38\u9519\u8BEF
-doclet.Deprecated_Annotation_Types=\u5DF2\u8FC7\u65F6\u7684\u6CE8\u91CA\u7C7B\u578B
-doclet.Deprecated_Errors=\u5DF2\u8FC7\u65F6\u7684\u9519\u8BEF
-doclet.Deprecated_Fields=\u5DF2\u8FC7\u65F6\u7684\u5B57\u6BB5
-doclet.Deprecated_Constructors=\u5DF2\u8FC7\u65F6\u7684\u6784\u9020\u5668
-doclet.Deprecated_Methods=\u5DF2\u8FC7\u65F6\u7684\u65B9\u6CD5
-doclet.Deprecated_Enum_Constants=\u5DF2\u8FC7\u65F6\u7684\u679A\u4E3E\u5E38\u91CF
-doclet.Deprecated_Annotation_Type_Members=\u5DF2\u8FC7\u65F6\u7684\u6CE8\u91CA\u7C7B\u578B\u5143\u7D20
-doclet.deprecated_for_removal=\u5DF2\u8FC7\u65F6, \u5F85\u5220\u9664
-doclet.deprecated_modules=\u5DF2\u8FC7\u65F6\u6A21\u5757
-doclet.deprecated_packages=\u5DF2\u8FC7\u65F6\u7A0B\u5E8F\u5305
-doclet.deprecated_classes=\u5DF2\u8FC7\u65F6\u7684\u7C7B
-doclet.deprecated_enums=\u5DF2\u8FC7\u65F6\u7684\u679A\u4E3E
-doclet.deprecated_interfaces=\u5DF2\u8FC7\u65F6\u7684\u63A5\u53E3
-doclet.deprecated_exceptions=\u5DF2\u8FC7\u65F6\u7684\u5F02\u5E38\u9519\u8BEF
-doclet.deprecated_annotation_types=\u5DF2\u8FC7\u65F6\u7684\u6CE8\u91CA\u7C7B\u578B
-doclet.deprecated_errors=\u5DF2\u8FC7\u65F6\u7684\u9519\u8BEF
-doclet.deprecated_fields=\u5DF2\u8FC7\u65F6\u7684\u5B57\u6BB5
-doclet.deprecated_constructors=\u5DF2\u8FC7\u65F6\u7684\u6784\u9020\u5668
-doclet.deprecated_methods=\u5DF2\u8FC7\u65F6\u7684\u65B9\u6CD5
-doclet.deprecated_enum_constants=\u5DF2\u8FC7\u65F6\u7684\u679A\u4E3E\u5E38\u91CF
-doclet.deprecated_annotation_type_members=\u5DF2\u8FC7\u65F6\u7684\u6CE8\u91CA\u7C7B\u578B\u5143\u7D20
+doclet.For_Removal=\u5F85\u5220\u9664
+doclet.Annotation_Types=\u6CE8\u91CA\u7C7B\u578B
+doclet.Annotation_Type_Members=\u6CE8\u91CA\u7C7B\u578B\u5143\u7D20
+doclet.for_removal=\u5F85\u5220\u9664
+doclet.annotation_types=\u6CE8\u91CA\u7C7B\u578B
+doclet.annotation_type_members=\u6CE8\u91CA\u7C7B\u578B\u5143\u7D20
 doclet.Generated_Docs_Untitled=\u751F\u6210\u7684\u6587\u6863 (\u65E0\u6807\u9898)
 doclet.Other_Packages=\u5176\u4ED6\u7A0B\u5E8F\u5305
 doclet.Description=\u8BF4\u660E
@@ -192,11 +170,13 @@
 doclet.Window_ClassUse_Header={0} {1}\u7684\u4F7F\u7528
 doclet.ClassUse_Title={0}\u7684\u4F7F\u7528
 doclet.navClassUse=\u4F7F\u7528
-doclet.Error_in_packagelist=\u4F7F\u7528 -group \u9009\u9879\u65F6\u51FA\u9519: {0} {1}
-doclet.Groupname_already_used=\u5728 -group \u9009\u9879\u4E2D, groupname \u5DF2\u4F7F\u7528: {0}
-doclet.Same_package_name_used=\u7A0B\u5E8F\u5305\u540D\u79F0\u5F62\u5F0F\u4F7F\u7528\u4E86\u4E24\u6B21: {0}
+doclet.Error_in_grouplist=\u9519\u8BEF\u7684 -group \u9009\u9879: {0} {1}
+doclet.Groupname_already_used=\u5728 -group \u9009\u9879\u4E2D, \u7EC4\u540D\u5DF2\u4F7F\u7528: {0}
+doclet.Same_element_name_used=\u5143\u7D20\u540D\u79F0\u6216\u6A21\u5F0F\u4F7F\u7528\u4E86\u4E24\u6B21: {0}
 
 # option specifiers
+doclet.usage.add-stylesheet.parameters=<file>
+doclet.usage.add-stylesheet.description=\u7528\u4E8E\u6240\u751F\u6210\u6587\u6863\u7684\u5176\u4ED6\u6837\u5F0F\u8868\u6587\u4EF6
 doclet.usage.d.parameters=<directory>
 doclet.usage.d.description=\u8F93\u51FA\u6587\u4EF6\u7684\u76EE\u6807\u76EE\u5F55
 
@@ -244,8 +224,8 @@
 doclet.usage.excludedocfilessubdir.parameters=<name>:..
 doclet.usage.excludedocfilessubdir.description=\u6392\u9664\u5177\u6709\u7ED9\u5B9A\u540D\u79F0\u7684\u6240\u6709\u6587\u6863\u6587\u4EF6\u5B50\u76EE\u5F55
 
-doclet.usage.group.parameters=<name> <p1>:<p2>..
-doclet.usage.group.description=\u5C06\u6307\u5B9A\u7684\u7A0B\u5E8F\u5305\u5728\u6982\u89C8\u9875\u9762\u4E0A\u5206\u7EC4\u5728\u4E00\u8D77
+doclet.usage.group.parameters=<name> <g1>:<g2>...
+doclet.usage.group.description=\u5C06\u6307\u5B9A\u7684\u5143\u7D20\u5728\u6982\u89C8\u9875\u9762\u4E0A\u5206\u7EC4\u5728\u4E00\u8D77
 
 doclet.usage.nocomment.description=\u4E0D\u751F\u6210\u8BF4\u660E\u548C\u6807\u8BB0, \u53EA\u751F\u6210\u58F0\u660E
 
@@ -294,8 +274,8 @@
 
 doclet.usage.keywords.description=\u968F\u7A0B\u5E8F\u5305, \u7C7B\u548C\u6210\u5458\u4FE1\u606F\u4E00\u8D77\u9644\u5E26 HTML \u5143\u6807\u8BB0
 
-doclet.usage.stylesheetfile.parameters=<path>
-doclet.usage.stylesheetfile.description=\u7528\u4E8E\u66F4\u6539\u751F\u6210\u6587\u6863\u7684\u6837\u5F0F\u7684\u6587\u4EF6
+doclet.usage.main-stylesheet.parameters=<file>
+doclet.usage.main-stylesheet.description=\u7528\u4E8E\u66F4\u6539\u751F\u6210\u6587\u6863\u7684\u6837\u5F0F\u7684\u6587\u4EF6
 
 doclet.usage.docencoding.parameters=<name>
 doclet.usage.docencoding.description=\u6307\u5B9A\u8F93\u51FA\u7684\u5B57\u7B26\u7F16\u7801
@@ -304,6 +284,10 @@
 
 doclet.usage.no-frames.description=\u7981\u6B62\u5728\u751F\u6210\u7684\u8F93\u51FA\u4E2D\u4F7F\u7528\u5E27
 
+doclet.usage.override-methods.parameters=(detail|summary)
+
+doclet.usage.override-methods.description=\u5728\u8BE6\u7EC6\u8D44\u6599\u90E8\u5206\u6216\u6982\u8981\u90E8\u5206\u4E2D\u7684\u6587\u6863\u8986\u76D6\u65B9\u6CD5
+
 doclet.usage.allow-script-in-comments.description=\u5141\u8BB8\u5728\u9009\u9879\u548C\u6CE8\u91CA\u4E2D\u4F7F\u7528 JavaScript
 
 doclet.usage.xdocrootparent.parameters=<url>
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/resources/doclets_ja.properties	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/resources/doclets_ja.properties	Tue Jan 30 16:41:40 2018 +0100
@@ -11,11 +11,10 @@
 doclet.Class_0_extends_implements_serializable=Class {0} extends {1} implements Serializable
 doclet.Option_conflict=\u30AA\u30D7\u30B7\u30E7\u30F3{0}\u304C{1}\u3068\u77DB\u76FE\u3057\u307E\u3059
 doclet.Option_reuse=\u30AA\u30D7\u30B7\u30E7\u30F3\u304C\u518D\u4F7F\u7528\u3055\u308C\u3066\u3044\u307E\u3059: {0}
+doclet.Option_invalid={1}\u30AA\u30D7\u30B7\u30E7\u30F3\u306E\u5F15\u6570{0}\u304C\u7121\u52B9\u3067\u3059
 doclet.Option_doclint_no_qualifiers=\u30A2\u30AF\u30BB\u30B9\u4FEE\u98FE\u5B50\u306F-Xdoclint\u306E\u5F15\u6570\u306B\u4F7F\u7528\u3067\u304D\u307E\u305B\u3093
 doclet.Option_doclint_invalid_arg=-Xdoclint\u30AA\u30D7\u30B7\u30E7\u30F3\u306E\u5F15\u6570\u304C\u7121\u52B9\u3067\u3059
 doclet.Option_doclint_package_invalid_arg=-Xdoclint/package\u30AA\u30D7\u30B7\u30E7\u30F3\u306E\u5F15\u6570\u304C\u7121\u52B9\u3067\u3059
-doclet.builder.exception.in.component=\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u306E\u69CB\u7BC9\u4E2D\u306B\u4F8B\u5916\u304C\u767A\u751F\u3057\u307E\u3057\u305F: {0}\n\t({1})
-doclet.builder.unknown.component=doclet\u30D3\u30EB\u30C9\u30FB\u30D5\u30A1\u30A4\u30EB\u3067\u4E0D\u660E\u306A\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u304C\u53C2\u7167\u3055\u308C\u3066\u3044\u307E\u3059: {0}
 doclet.error.initializing.dest.dir=\u8EE2\u9001\u5148\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306E\u521D\u671F\u5316\u4E2D\u306B\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F: {0}
 doclet.exception.read.file=\u30D5\u30A1\u30A4\u30EB\u306E\u8AAD\u53D6\u308A\u4E2D\u306B\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F: {0}\n\t({1})
 doclet.exception.write.file=\u30D5\u30A1\u30A4\u30EB\u306E\u66F8\u8FBC\u307F\u4E2D\u306B\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F: {0}\n\t({1})
@@ -37,8 +36,11 @@
 doclet.JavaScript_in_comment=\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u30FB\u30B3\u30E1\u30F3\u30C8\u306BJavaScript\u304C\u898B\u3064\u304B\u308A\u307E\u3057\u305F\u3002\n--allow-script-in-comments\u3092\u4F7F\u7528\u3057\u3066\u3001JavaScript\u306E\u4F7F\u7528\u3092\u8A31\u53EF\u3057\u3066\u304F\u3060\u3055\u3044\u3002
 doclet.JavaScript_in_option=\u30AA\u30D7\u30B7\u30E7\u30F3{0}\u306BJavaScript\u304C\u542B\u307E\u308C\u3066\u3044\u307E\u3059\u3002\n--allow-script-in-comments\u3092\u4F7F\u7528\u3057\u3066\u3001JavaScript\u306E\u4F7F\u7528\u3092\u8A31\u53EF\u3057\u3066\u304F\u3060\u3055\u3044\u3002
 doclet.Packages=\u30D1\u30C3\u30B1\u30FC\u30B8
+doclet.All_Packages=\u3059\u3079\u3066\u306E\u30D1\u30C3\u30B1\u30FC\u30B8
 doclet.Modules=\u30E2\u30B8\u30E5\u30FC\u30EB
+doclet.All_Modules=\u3059\u3079\u3066\u306E\u30E2\u30B8\u30E5\u30FC\u30EB
 doclet.Other_Packages=\u305D\u306E\u4ED6\u306E\u30D1\u30C3\u30B1\u30FC\u30B8
+doclet.Other_Modules=\u305D\u306E\u4ED6\u306E\u30E2\u30B8\u30E5\u30FC\u30EB
 doclet.Notice_taglet_registered=\u767B\u9332\u3055\u308C\u305F\u30BF\u30B0\u30EC\u30C3\u30C8{0} ...
 doclet.Notice_taglet_unseen=\u6CE8\u610F: \u975E\u8868\u793A\u306E\u30AB\u30B9\u30BF\u30E0\u30FB\u30BF\u30B0: {0}
 doclet.Notice_taglet_overriden=\u6CE8\u610F: \u6A19\u6E96\u30BF\u30B0\u3092\u30AA\u30FC\u30D0\u30FC\u30E9\u30A4\u30C9\u3059\u308B\u30AB\u30B9\u30BF\u30E0\u30FB\u30BF\u30B0: {0}
@@ -134,15 +136,25 @@
 doclet.Exception=\u4F8B\u5916
 doclet.exception=\u4F8B\u5916
 doclet.exceptions=\u4F8B\u5916
+doclet.ExportedTo=\u30E2\u30B8\u30E5\u30FC\u30EB\u306B\u30A8\u30AF\u30B9\u30DD\u30FC\u30C8
+doclet.OpenedTo=\u30E2\u30B8\u30E5\u30FC\u30EB\u306B\u30AA\u30FC\u30D7\u30F3
 doclet.Package_private=(package private)
 doclet.Nested_Classes_Interfaces_Inherited_From_Class=\u30AF\u30E9\u30B9\u304B\u3089\u7D99\u627F\u3055\u308C\u305F\u30CD\u30B9\u30C8\u3055\u308C\u305F\u30AF\u30E9\u30B9/\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9
-doclet.Nested_Classes_Interface_Inherited_From_Interface=\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u304B\u3089\u7D99\u627F\u3055\u308C\u305F\u30CD\u30B9\u30C8\u3055\u308C\u305F\u30AF\u30E9\u30B9/\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9
+doclet.Nested_Classes_Interfaces_Inherited_From_Interface=\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u304B\u3089\u7D99\u627F\u3055\u308C\u305F\u30CD\u30B9\u30C8\u3055\u308C\u305F\u30AF\u30E9\u30B9/\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9
+doclet.Nested_Classes_Interfaces_Declared_In_Class=\u30AF\u30E9\u30B9\u3067\u5BA3\u8A00\u3055\u308C\u305F\u30CD\u30B9\u30C8\u3055\u308C\u305F\u30AF\u30E9\u30B9/\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9
+doclet.Nested_Classes_Interfaces_Declared_In_Interface=\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u3067\u5BA3\u8A00\u3055\u308C\u305F\u30CD\u30B9\u30C8\u3055\u308C\u305F\u30AF\u30E9\u30B9/\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9
 doclet.Methods_Inherited_From_Class=\u30AF\u30E9\u30B9\u304B\u3089\u7D99\u627F\u3055\u308C\u305F\u30E1\u30BD\u30C3\u30C9
 doclet.Methods_Inherited_From_Interface=\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u304B\u3089\u7D99\u627F\u3055\u308C\u305F\u30E1\u30BD\u30C3\u30C9
+doclet.Methods_Declared_In_Class=\u30AF\u30E9\u30B9\u3067\u5BA3\u8A00\u3055\u308C\u305F\u30E1\u30BD\u30C3\u30C9
+doclet.Methods_Declared_In_Interface=\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u3067\u5BA3\u8A00\u3055\u308C\u305F\u30E1\u30BD\u30C3\u30C9
 doclet.Fields_Inherited_From_Class=\u30AF\u30E9\u30B9\u304B\u3089\u7D99\u627F\u3055\u308C\u305F\u30D5\u30A3\u30FC\u30EB\u30C9
 doclet.Fields_Inherited_From_Interface=\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u304B\u3089\u7D99\u627F\u3055\u308C\u305F\u30D5\u30A3\u30FC\u30EB\u30C9
+doclet.Fields_Declared_In_Class=\u30AF\u30E9\u30B9\u3067\u5BA3\u8A00\u3055\u308C\u305F\u30D5\u30A3\u30FC\u30EB\u30C9
+doclet.Fields_Declared_In_Interface=\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u3067\u5BA3\u8A00\u3055\u308C\u305F\u30D5\u30A3\u30FC\u30EB\u30C9
 doclet.Properties_Inherited_From_Class=\u30AF\u30E9\u30B9\u304B\u3089\u7D99\u627F\u3055\u308C\u305F\u30D7\u30ED\u30D1\u30C6\u30A3
 doclet.Properties_Inherited_From_Interface=\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u304B\u3089\u7D99\u627F\u3055\u308C\u305F\u30D7\u30ED\u30D1\u30C6\u30A3
+doclet.Properties_Declared_In_Class=\u30AF\u30E9\u30B9\u3067\u5BA3\u8A00\u3055\u308C\u305F\u30D7\u30ED\u30D1\u30C6\u30A3
+doclet.Properties_Declared_In_Interface=\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u3067\u5BA3\u8A00\u3055\u308C\u305F\u30D7\u30ED\u30D1\u30C6\u30A3
 doclet.Annotation_Type_Member_Detail=\u8981\u7D20\u306E\u8A73\u7D30
 doclet.Enum_Constant_Detail=\u5217\u6319\u578B\u5B9A\u6570\u306E\u8A73\u7D30
 doclet.Constants_Summary=\u5B9A\u6570\u30D5\u30A3\u30FC\u30EB\u30C9\u5024
@@ -190,6 +202,7 @@
 doclet.subinterfaces=\u30B5\u30D6\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9
 doclet.Modifier=\u4FEE\u98FE\u5B50
 doclet.Type=\u30BF\u30A4\u30D7
+doclet.Modifier_and_Type=\u4FEE\u98FE\u5B50\u3068\u30BF\u30A4\u30D7
 doclet.Implementation=\u5B9F\u88C5:
 doclet.Types=\u30BF\u30A4\u30D7
 doclet.Members=\u30E1\u30F3\u30D0\u30FC
@@ -207,7 +220,6 @@
 doclet.Description=\u8AAC\u660E
 doclet.ConstantField=\u5B9A\u6570\u30D5\u30A3\u30FC\u30EB\u30C9
 doclet.Value=\u5024
-doclet.0_and_1={0}\u3068{1}
 
 #Documentation for Enums
 doclet.enum_values_doc.fullbody=\u3053\u306E\u5217\u6319\u578B\u306E\u5B9A\u6570\u3092\u542B\u3080\u914D\u5217\u3092\u5BA3\u8A00\u3055\u308C\u3066\u3044\u308B\u9806\u5E8F\u3067\u8FD4\u3057\u307E\u3059\u3002\n\u3053\u306E\u30E1\u30BD\u30C3\u30C9\u306F\u6B21\u306E\u3088\u3046\u306B\u3057\u3066\u5B9A\u6570\u3092\u53CD\u5FA9\u3059\u308B\u305F\u3081\u306B\n\u4F7F\u7528\u3067\u304D\u307E\u3059:\n<pre>\nfor ({0} c : {0}.values())\n&nbsp;   System.out.println(c);\n</pre>
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/resources/doclets_zh_CN.properties	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/resources/doclets_zh_CN.properties	Tue Jan 30 16:41:40 2018 +0100
@@ -11,11 +11,10 @@
 doclet.Class_0_extends_implements_serializable=\u7C7B{0}\u6269\u5C55{1}\u5B9E\u73B0\u53EF\u5E8F\u5217\u5316
 doclet.Option_conflict=\u9009\u9879{0}\u4E0E{1}\u51B2\u7A81
 doclet.Option_reuse=\u91CD\u590D\u4F7F\u7528\u7684\u9009\u9879: {0}
+doclet.Option_invalid={1} \u9009\u9879\u7684 {0} \u53C2\u6570\u65E0\u6548
 doclet.Option_doclint_no_qualifiers=-Xdoclint \u53C2\u6570\u4E0D\u5141\u8BB8\u4F7F\u7528\u8BBF\u95EE\u9650\u5B9A\u7B26
 doclet.Option_doclint_invalid_arg=-Xdoclint \u9009\u9879\u7684\u53C2\u6570\u65E0\u6548
 doclet.Option_doclint_package_invalid_arg=-Xdoclint/package \u9009\u9879\u7684\u53C2\u6570\u65E0\u6548
-doclet.builder.exception.in.component=\u6784\u5EFA\u7EC4\u4EF6\u65F6\u51FA\u73B0\u5F02\u5E38\u9519\u8BEF: {0}\n\t({1})
-doclet.builder.unknown.component=doclet \u5DE5\u4F5C\u7248\u672C\u6587\u4EF6\u4E2D\u5F15\u7528\u7684\u7EC4\u4EF6\u672A\u77E5: {0}
 doclet.error.initializing.dest.dir=\u521D\u59CB\u5316\u76EE\u6807\u76EE\u5F55\u65F6\u51FA\u9519: {0}
 doclet.exception.read.file=\u8BFB\u53D6\u6587\u4EF6\u65F6\u51FA\u9519: {0}\n\t({1})
 doclet.exception.write.file=\u5199\u5165\u6587\u4EF6\u65F6\u51FA\u9519: {0}\n\t({1})
@@ -37,8 +36,11 @@
 doclet.JavaScript_in_comment=\u6587\u6863\u6CE8\u91CA\u4E2D\u53D1\u73B0 JavaScript\u3002\n\u4F7F\u7528 --allow-script-in-comments \u53EF\u5141\u8BB8\u4F7F\u7528 JavaScript\u3002
 doclet.JavaScript_in_option=\u9009\u9879 {0} \u5305\u542B JavaScript\u3002\n\u4F7F\u7528 --allow-script-in-comments \u53EF\u5141\u8BB8\u4F7F\u7528 JavaScript\u3002
 doclet.Packages=\u7A0B\u5E8F\u5305
+doclet.All_Packages=\u6240\u6709\u7A0B\u5E8F\u5305
 doclet.Modules=\u6A21\u5757
+doclet.All_Modules=\u5168\u90E8\u6A21\u5757
 doclet.Other_Packages=\u5176\u4ED6\u7A0B\u5E8F\u5305
+doclet.Other_Modules=\u5176\u4ED6\u6A21\u5757
 doclet.Notice_taglet_registered=\u6CE8\u518C\u7684 Taglet {0}...
 doclet.Notice_taglet_unseen=\u6CE8: \u627E\u4E0D\u5230\u7684\u5B9A\u5236\u6807\u8BB0: {0}
 doclet.Notice_taglet_overriden=\u6CE8: \u8986\u76D6\u6807\u51C6\u6807\u8BB0\u7684\u5B9A\u5236\u6807\u8BB0: {0}
@@ -134,15 +136,25 @@
 doclet.Exception=\u5F02\u5E38\u9519\u8BEF
 doclet.exception=\u5F02\u5E38\u9519\u8BEF
 doclet.exceptions=\u5F02\u5E38\u9519\u8BEF
+doclet.ExportedTo=\u5DF2\u5BFC\u51FA\u5230\u6A21\u5757
+doclet.OpenedTo=\u5DF2\u6253\u5F00\u5230\u6A21\u5757
 doclet.Package_private=(\u4E13\u7528\u7A0B\u5E8F\u5305)
 doclet.Nested_Classes_Interfaces_Inherited_From_Class=\u4ECE\u7C7B\u7EE7\u627F\u7684\u5D4C\u5957\u7C7B/\u63A5\u53E3
-doclet.Nested_Classes_Interface_Inherited_From_Interface=\u4ECE\u63A5\u53E3\u7EE7\u627F\u7684\u5D4C\u5957\u7C7B/\u63A5\u53E3
+doclet.Nested_Classes_Interfaces_Inherited_From_Interface=\u4ECE\u63A5\u53E3\u7EE7\u627F\u7684\u5D4C\u5957\u7C7B/\u63A5\u53E3
+doclet.Nested_Classes_Interfaces_Declared_In_Class=\u5728\u7C7B\u4E2D\u58F0\u660E\u7684\u5D4C\u5957\u7C7B/\u63A5\u53E3
+doclet.Nested_Classes_Interfaces_Declared_In_Interface=\u5728\u63A5\u53E3\u4E2D\u58F0\u660E\u7684\u5D4C\u5957\u7C7B/\u63A5\u53E3
 doclet.Methods_Inherited_From_Class=\u4ECE\u7C7B\u7EE7\u627F\u7684\u65B9\u6CD5
 doclet.Methods_Inherited_From_Interface=\u4ECE\u63A5\u53E3\u7EE7\u627F\u7684\u65B9\u6CD5
+doclet.Methods_Declared_In_Class=\u5728\u7C7B\u4E2D\u58F0\u660E\u7684\u65B9\u6CD5
+doclet.Methods_Declared_In_Interface=\u5728\u63A5\u53E3\u4E2D\u58F0\u660E\u7684\u65B9\u6CD5
 doclet.Fields_Inherited_From_Class=\u4ECE\u7C7B\u7EE7\u627F\u7684\u5B57\u6BB5
 doclet.Fields_Inherited_From_Interface=\u4ECE\u63A5\u53E3\u7EE7\u627F\u7684\u5B57\u6BB5
+doclet.Fields_Declared_In_Class=\u5728\u7C7B\u4E2D\u58F0\u660E\u7684\u5B57\u6BB5
+doclet.Fields_Declared_In_Interface=\u5728\u63A5\u53E3\u4E2D\u58F0\u660E\u7684\u5B57\u6BB5
 doclet.Properties_Inherited_From_Class=\u4ECE\u7C7B\u7EE7\u627F\u7684\u5C5E\u6027
 doclet.Properties_Inherited_From_Interface=\u4ECE\u63A5\u53E3\u7EE7\u627F\u7684\u5C5E\u6027
+doclet.Properties_Declared_In_Class=\u5728\u7C7B\u4E2D\u58F0\u660E\u7684\u5C5E\u6027
+doclet.Properties_Declared_In_Interface=\u5728\u63A5\u53E3\u4E2D\u58F0\u660E\u7684\u5C5E\u6027
 doclet.Annotation_Type_Member_Detail=\u5143\u7D20\u8BE6\u7EC6\u8D44\u6599
 doclet.Enum_Constant_Detail=\u679A\u4E3E\u5E38\u91CF\u8BE6\u7EC6\u8D44\u6599
 doclet.Constants_Summary=\u5E38\u91CF\u5B57\u6BB5\u503C
@@ -190,6 +202,7 @@
 doclet.subinterfaces=\u5B50\u63A5\u53E3
 doclet.Modifier=\u9650\u5B9A\u7B26
 doclet.Type=\u7C7B\u578B
+doclet.Modifier_and_Type=\u4FEE\u9970\u7B26\u548C\u7C7B\u578B
 doclet.Implementation=\u5B9E\u73B0:
 doclet.Types=\u7C7B\u578B
 doclet.Members=\u6210\u5458
@@ -207,7 +220,6 @@
 doclet.Description=\u8BF4\u660E
 doclet.ConstantField=\u5E38\u91CF\u5B57\u6BB5
 doclet.Value=\u503C
-doclet.0_and_1={0}\u548C{1}
 
 #Documentation for Enums
 doclet.enum_values_doc.fullbody=\u6309\u7167\u58F0\u660E\u8BE5\u679A\u4E3E\u7C7B\u578B\u7684\u5E38\u91CF\u7684\u987A\u5E8F, \u8FD4\u56DE\n\u5305\u542B\u8FD9\u4E9B\u5E38\u91CF\u7684\u6570\u7EC4\u3002\u8BE5\u65B9\u6CD5\u53EF\u7528\u4E8E\u8FED\u4EE3\n\u5E38\u91CF, \u5982\u4E0B\u6240\u793A:\n<pre>\nfor ({0} c : {0}.values())\n&nbsp;   System.out.println(c);\n</pre>
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/DocLink.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/DocLink.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -39,51 +39,101 @@
  *
  */
 public class DocLink {
-    final String path;
+    final DocPath path;
     final String query;
     final String fragment;
 
-    /** Create a DocLink representing the URI {@code #fragment}. */
+    /**
+     * Creates a DocLink representing the URI {@code #fragment}.
+     * @param fragment the fragment
+     * @return the DocLink
+     */
     public static DocLink fragment(String fragment) {
-        return new DocLink((String) null, (String) null, fragment);
-    }
-
-    /** Create a DocLink representing the URI {@code path}. */
-    public DocLink(DocPath path) {
-        this(path.getPath(), null, null);
+        return new DocLink((DocPath) null, (String) null, fragment);
     }
 
     /**
-     * Create a DocLink representing the URI {@code path?query#fragment}.
-     * query and fragment may be null.
+     * Creates a DocLink representing the URI {@code path}.
+     * @param path the path
      */
-    public DocLink(DocPath path, String query, String fragment) {
-        this(path.getPath(), query, fragment);
+    public DocLink(DocPath path) {
+        this(path, null, null);
     }
 
     /**
-     * Create a DocLink representing the URI {@code path?query#fragment}.
+     * Creates a DocLink representing the URI {@code path?query#fragment}.
      * Any of the component parts may be null.
+     * @param path the path
+     * @param query the query
+     * @param fragment the fragment
      */
-    public DocLink(String path, String query, String fragment) {
+    public DocLink(DocPath path, String query, String fragment) {
         this.path = path;
         this.query = query;
         this.fragment = fragment;
     }
 
     /**
-     * Return the link in the form "path?query#fragment", omitting any empty
+     * Creates a DocLink representing the URI {@code path?query#fragment}.
+     * Any of the component parts may be null.
+     * @param path the path
+     * @param query the query
+     * @param fragment the fragment
+     */
+    public DocLink(String path, String query, String fragment) {
+        this(DocPath.create(path), query, fragment);
+    }
+
+    /**
+     * Creates a DocLink formed by relativizing the path against a given base.
+     * @param base the base
+     * @return the DocLink
+     */
+    public DocLink relativizeAgainst(DocPath base) {
+        if (base.isEmpty() || path == null) {
+            return this;
+        }
+
+        // The following guards against the (ugly) use-case of using DocPath to contain a URL
+        if (isAbsoluteURL(path)) {
+            return this;
+        }
+
+        DocPath newPath = base.relativize(path);
+        // avoid generating an empty link by using the basename of the path if necessary
+        if (newPath.isEmpty() && isEmpty(query) && isEmpty(fragment)) {
+            newPath = path.basename();
+        }
+        return new DocLink(newPath, query, fragment);
+    }
+
+    // return true if the path begins <letters>://
+    private boolean isAbsoluteURL(DocPath path) {
+        String s = path.getPath();
+        for (int i = 0; i < s.length(); i++) {
+            char c = s.charAt(i);
+            if (Character.isLetter(c)) {
+                continue;
+            }
+            return (c == ':' && i + 2 < s.length() && s.charAt(i + 1)== '/' && s.charAt(i + 2)== '/');
+        }
+        return false;
+    }
+
+    /**
+     * Returns the link in the form "path?query#fragment", omitting any empty
      * components.
+     * @return the string
      */
     @Override
     public String toString() {
         // common fast path
         if (path != null && isEmpty(query) && isEmpty(fragment))
-            return path;
+            return path.getPath();
 
         StringBuilder sb = new StringBuilder();
         if (path != null)
-            sb.append(path);
+            sb.append(path.getPath());
         if (!isEmpty(query))
             sb.append("?").append(query);
         if (!isEmpty(fragment))
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/DocPath.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/DocPath.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -25,6 +25,11 @@
 
 package jdk.javadoc.internal.doclets.toolkit.util;
 
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+
 import javax.lang.model.element.ModuleElement;
 import javax.lang.model.element.PackageElement;
 import javax.lang.model.element.TypeElement;
@@ -48,16 +53,21 @@
     public static final DocPath parent = new DocPath("..");
 
     /**
-     * Create a path from a string.
+     * Creates a path from a string.
+     * @param p the string
+     * @return the path
      */
     public static DocPath create(String p) {
         return (p == null) || p.isEmpty() ? empty : new DocPath(p);
     }
 
     /**
-     * Return the path for a class.
+     * Returns the path for a class.
      * For example, if the class is java.lang.Object,
      * the path is java/lang/Object.html.
+     * @param utils utility class for handling type elements
+     * @param typeElement the type element
+     * @return the path
      */
     public static DocPath forClass(Utils utils, TypeElement typeElement) {
         return (typeElement == null)
@@ -66,14 +76,24 @@
     }
 
     /**
-     * Return the path for the simple name of the class.
+     * Returns the path for the simple name of a class.
      * For example, if the class is java.lang.Object,
      * the path is Object.html.
+     * @param utils utility class for handling type elements
+     * @param typeElement the type element
+     * @return the path
      */
     public static DocPath forName(Utils utils, TypeElement typeElement) {
         return (typeElement == null) ? empty : new DocPath(utils.getSimpleName(typeElement) + ".html");
     }
 
+    /**
+     * Returns the path for the name of a module.
+     * For example, if the module is java.base,
+     * the path is java.base.
+     * @param mdle the module element
+     * @return the path
+     */
     public static DocPath forModule(ModuleElement mdle) {
         return mdle == null || mdle.isUnnamed()
                 ? empty
@@ -81,18 +101,23 @@
     }
 
     /**
-     * Return the path for the package of a class.
+     * Returns the path for the package of a class.
      * For example, if the class is java.lang.Object,
      * the path is java/lang.
+     * @param utils utility class for handling type elements
+     * @param typeElement the type element
+     * @return the path
      */
     public static DocPath forPackage(Utils utils, TypeElement typeElement) {
         return (typeElement == null) ? empty : forPackage(utils.containingPackage(typeElement));
     }
 
     /**
-     * Return the path for a package.
+     * Returns the path for a package.
      * For example, if the package is java.lang,
      * the path is java/lang.
+     * @param pkgElement the package element
+     * @return the path
      */
     public static DocPath forPackage(PackageElement pkgElement) {
         return pkgElement == null || pkgElement.isUnnamed()
@@ -101,9 +126,11 @@
     }
 
     /**
-     * Return the inverse path for a package.
+     * Returns the inverse path for a package.
      * For example, if the package is java.lang,
      * the inverse path is ../...
+     * @param pkgElement the package element
+     * @return the path
      */
     public static DocPath forRoot(PackageElement pkgElement) {
         String name = (pkgElement == null || pkgElement.isUnnamed())
@@ -113,7 +140,10 @@
     }
 
     /**
-     * Return the relative path from one package to another.
+     * Returns the relative path from one package to another.
+     * @param from the initial package
+     * @param to the target package
+     * @return the path
      */
     public static DocPath relativePath(PackageElement from, PackageElement to) {
         return forRoot(from).resolve(forPackage(to));
@@ -146,7 +176,9 @@
     }
 
     /**
-     * Return the path formed by appending the specified string to the current path.
+     * Returns the path formed by appending the specified string to the current path.
+     * @param p the string
+     * @return the path
      */
     public DocPath resolve(String p) {
         if (p == null || p.isEmpty())
@@ -157,7 +189,9 @@
     }
 
     /**
-     * Return the path by appending the specified path to the current path.
+     * Returns the path by appending the specified path to the current path.
+     * @param p the path
+     * @return the path
      */
     public DocPath resolve(DocPath p) {
         if (p == null || p.isEmpty())
@@ -170,28 +204,121 @@
     /**
      * Return the inverse path for this path.
      * For example, if the path is a/b/c, the inverse path is ../../..
+     * @return the path
      */
     public DocPath invert() {
         return new DocPath(path.replaceAll("[^/]+", ".."));
     }
 
     /**
+     * Returns the path formed by eliminating empty components,
+     * '.' components, and redundant name/.. components.
+     * @return the path
+     */
+    public DocPath normalize() {
+        return path.isEmpty()
+                ? this
+                : new DocPath(String.join("/", normalize(path)));
+    }
+
+    private static List<String> normalize(String path) {
+        return normalize(Arrays.asList(path.split("/")));
+    }
+
+    private static List<String> normalize(List<String> parts) {
+        if (parts.stream().noneMatch(s -> s.isEmpty() || s.equals(".") || s.equals(".."))) {
+            return parts;
+        }
+        List<String> normalized = new ArrayList<>();
+        for (String part : parts) {
+            switch (part) {
+                case "":
+                case ".":
+                    break;
+                case "..":
+                    int n = normalized.size();
+                    if (n > 0 && !normalized.get(n - 1).equals("..")) {
+                        normalized.remove(n - 1);
+                    } else {
+                        normalized.add(part);
+                    }
+                    break;
+                default:
+                    normalized.add(part);
+            }
+        }
+        return normalized;
+    }
+
+    /**
+     * Normalize and relativize a path against this path,
+     * assuming that this path is for a file (not a directory),
+     * in which the other path will appear.
+     *
+     * @param other the path to be relativized.
+     * @return the simplified path
+     */
+    public DocPath relativize(DocPath other) {
+        if (other == null || other.path.isEmpty()) {
+            return this;
+        }
+
+        if (path.isEmpty()) {
+            return other;
+        }
+
+        List<String> originParts = normalize(path);
+        int sep = path.lastIndexOf("/");
+        List<String> destParts = sep == -1
+                ? normalize(other.path)
+                : normalize(path.substring(0, sep + 1) + other.path);
+        int common = 0;
+        while (common < originParts.size()
+                && common < destParts.size()
+                && originParts.get(common).equals(destParts.get(common))) {
+            common++;
+        }
+
+        List<String> newParts;
+        if (common == originParts.size()) {
+            newParts = destParts.subList(common, destParts.size());
+        } else {
+            newParts = new ArrayList<>();
+            newParts.addAll(Collections.nCopies(originParts.size() - common - 1, ".."));
+            newParts.addAll(destParts.subList(common, destParts.size()));
+        }
+        return new DocPath(String.join("/", newParts));
+    }
+
+    /**
      * Return true if this path is empty.
+     * @return true if this path is empty
      */
     public boolean isEmpty() {
         return path.isEmpty();
     }
 
+    /**
+     * Creates a DocLink formed from this path and a fragment identifier.
+     * @param fragment the fragment
+     * @return the link
+     */
     public DocLink fragment(String fragment) {
         return new DocLink(path, null, fragment);
     }
 
+    /**
+     * Creates a DocLink formed from this path and a query string.
+     * @param query the query string
+     * @return the link
+     */
     public DocLink query(String query) {
         return new DocLink(path, query, null);
     }
 
     /**
-     * Return this path as a string.
+     * Returns this path as a string.
+     * @return the path
      */
     // This is provided instead of using toString() to help catch
     // unintended use of toString() in string concatenation sequences.
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/Extern.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/Extern.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -180,10 +180,11 @@
         if (fnd == null)
             return null;
 
+        // The following is somewhat questionable since we are using DocPath
+        // to contain external URLs!
         DocPath p = fnd.relative ?
                 relativepath.resolve(fnd.path).resolve(filename) :
                 DocPath.create(fnd.path).resolve(filename);
-
         return new DocLink(p, "is-external=true", memberName);
     }
 
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/ToolOption.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/ToolOption.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -189,6 +189,13 @@
         }
     },
 
+    ADD_OPENS("--add-opens", HIDDEN, true) {
+        @Override
+        public void process(Helper helper, String arg) throws InvalidValueException {
+            Option.ADD_OPENS.process(helper.getOptionHelper(), primaryName, arg);
+        }
+    },
+
     // ----- doclet options -----
 
     DOCLET("-doclet", STANDARD, true), // handled in setDocletInvoker
@@ -339,7 +346,7 @@
 
     // ----- help options -----
 
-    HELP("--help -help", STANDARD) {
+    HELP("--help -help -? -h", STANDARD) {
         @Override
         public void process(Helper helper) throws OptionException {
             throw new OptionException(OK, helper::usage);
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/resources/javadoc_ja.properties	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/resources/javadoc_ja.properties	Tue Jan 30 16:41:40 2018 +0100
@@ -118,6 +118,8 @@
 
 main.opt.quiet.desc=\u72B6\u614B\u30E1\u30C3\u30BB\u30FC\u30B8\u3092\u8868\u793A\u3057\u306A\u3044
 
+main.opt.version.desc=\u30D0\u30FC\u30B8\u30E7\u30F3\u60C5\u5831\u3092\u51FA\u529B\u3059\u308B
+
 main.opt.J.arg=<flag>
 main.opt.J.desc=<flag>\u3092\u5B9F\u884C\u30B7\u30B9\u30C6\u30E0\u306B\u76F4\u63A5\u6E21\u3059
 
@@ -193,3 +195,5 @@
 javadoc.warning.msg={0}: \u8B66\u544A - {1}
 javadoc.note.msg = {1}
 javadoc.note.pos.msg= {0}: {1}
+javadoc.version={0} {1}
+javadoc.fullversion={0}\u30D5\u30EB\u30FB\u30D0\u30FC\u30B8\u30E7\u30F3"{1}"
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/resources/javadoc_zh_CN.properties	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/resources/javadoc_zh_CN.properties	Tue Jan 30 16:41:40 2018 +0100
@@ -118,6 +118,8 @@
 
 main.opt.quiet.desc=\u4E0D\u663E\u793A\u72B6\u6001\u6D88\u606F
 
+main.opt.version.desc=\u8F93\u51FA\u7248\u672C\u4FE1\u606F
+
 main.opt.J.arg=<\u6807\u8BB0>
 main.opt.J.desc=\u76F4\u63A5\u5C06 <\u6807\u8BB0> \u4F20\u9012\u7ED9\u8FD0\u884C\u65F6\u7CFB\u7EDF
 
@@ -172,8 +174,8 @@
 main.doclet_no_classloader_found=\u65E0\u6CD5\u83B7\u53D6\u7C7B\u52A0\u8F7D\u5668\u6765\u52A0\u8F7D {0}
 main.could_not_instantiate_class=\u65E0\u6CD5\u5B9E\u4F8B\u5316\u7C7B {0}
 main.doclet_class_not_found=\u627E\u4E0D\u5230 doclet \u7C7B{0}
-main.illegal_locale_name=\u533A\u57DF\u8BBE\u7F6E\u4E0D\u53EF\u7528: {0}
-main.malformed_locale_name=\u683C\u5F0F\u9519\u8BEF\u7684\u533A\u57DF\u8BBE\u7F6E\u540D\u79F0: {0}
+main.illegal_locale_name=\u8BED\u8A00\u73AF\u5883\u4E0D\u53EF\u7528: {0}
+main.malformed_locale_name=\u683C\u5F0F\u9519\u8BEF\u7684\u8BED\u8A00\u73AF\u5883\u540D\u79F0: {0}
 main.file_not_found=\u627E\u4E0D\u5230\u6587\u4EF6: "{0}"
 main.illegal_class_name=\u975E\u6CD5\u7C7B\u540D: "{0}"
 main.illegal_package_name=\u975E\u6CD5\u7684\u7A0B\u5E8F\u5305\u540D\u79F0: "{0}"
@@ -184,7 +186,7 @@
 main.internal.error=\u51FA\u73B0\u5185\u90E8\u9519\u8BEF
 main.unexpected.exception=\u6355\u83B7\u5230\u610F\u5916\u7684\u5F02\u5E38\u9519\u8BEF: {0}
 doclet.internal.report.bug=\u5982\u679C\u5728 Bug Database (http://bugs.java.com) \u4E2D\u6CA1\u6709\u627E\u5230\u91CD\u590D\u9879, \n\u8BF7\u901A\u8FC7 Java Bug \u62A5\u544A\u9875 (http://bugreport.java.com) \u9488\u5BF9\u8BE5 \njavadoc \u5DE5\u5177\u5EFA\u7ACB Bug\u3002\u8BF7\u5728\u62A5\u544A\u4E2D\u9644\u4E0A\u9519\u8BEF\u6D88\u606F\u548C\u4EE5\u4E0B\u8BCA\u65AD\u4FE1\u606F\u3002\u8C22\u8C22\u3002
-main.legacy_api=\u5DF2\u8BA1\u5212\u5728\u672A\u6765\u7684 JDK \u53D1\u884C\u7248\u4E2D\u5220\u9664\u7A0B\u5E8F\u5305\ncom.sun.javadoc, com.sun.tools.doclets\n\u53CA\u5176\u5B9E\u73B0\u4E2D\u7684\u65E7 Doclet \u548C Taglet API\u3002\n\u8FD9\u4E9B\u7EC4\u4EF6\u5728 jdk.javadoc.doclet \u4E2D\u5DF2\u7531\u65B0 API \u53D6\u4EE3\u3002\n\u5F3A\u70C8\u5EFA\u8BAE\u7528\u6237\u79FB\u690D\u5230\u65B0 API\u3002\n
+main.legacy_api=\u5DF2\u8BA1\u5212\u5728\u672A\u6765\u7684 JDK \u53D1\u884C\u7248\u4E2D\u5220\u9664\u7A0B\u5E8F\u5305\ncom.sun.javadoc, com.sun.tools.doclets\n\u53CA\u5176\u5B9E\u73B0\u4E2D\u7684\u65E7 Doclet \u548C Taglet API\u3002\n\u8FD9\u4E9B\u7EC4\u4EF6\u5728 jdk.javadoc.doclet \u4E2D\u5DF2\u7531\u65B0 API \u53D6\u4EE3\u3002\n\u5F3A\u70C8\u5EFA\u8BAE\u7528\u6237\u8FC1\u79FB\u5230\u65B0 API\u3002\n
 
 javadoc.class_not_found=\u627E\u4E0D\u5230\u7C7B{0}\u3002
 javadoc.error=\u9519\u8BEF
@@ -193,3 +195,5 @@
 javadoc.warning.msg={0}: \u8B66\u544A - {1}
 javadoc.note.msg = {1}
 javadoc.note.pos.msg= {0}: {1}
+javadoc.version={0} {1}
+javadoc.fullversion={0}\u5B8C\u6574\u7248\u672C "{1}"
--- a/src/jdk.jcmd/share/classes/sun/tools/jcmd/Arguments.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/jdk.jcmd/share/classes/sun/tools/jcmd/Arguments.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -50,7 +50,11 @@
             return;
         }
 
-        if (args[0].equals("-h") || args[0].equals("-help") ) {
+        if (args[0].equals("-?") ||
+            args[0].equals("-h") ||
+            args[0].equals("--help") ||
+            // -help: legacy.
+            args[0].equals("-help")) {
             showUsage = true;
             return;
         }
@@ -116,6 +120,6 @@
         System.out.println("  PerfCounter.print display the counters exposed by this process  ");
         System.out.println("  -f  read and execute commands from the file                     ");
         System.out.println("  -l  list JVM processes on the local machine                     ");
-        System.out.println("  -h  this help                                                   ");
+        System.out.println("  -? -h --help print this help message                            ");
     }
 }
--- a/src/jdk.jcmd/share/classes/sun/tools/jcmd/JCmd.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/jdk.jcmd/share/classes/sun/tools/jcmd/JCmd.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2014, 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
@@ -62,7 +62,7 @@
 
         if (arg.isShowUsage()) {
             Arguments.usage();
-            System.exit(1);
+            System.exit(0);
         }
 
         ProcessArgumentMatcher ap = null;
--- a/src/jdk.jcmd/share/classes/sun/tools/jinfo/JInfo.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/jdk.jcmd/share/classes/sun/tools/jinfo/JInfo.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006, 2014, 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
@@ -63,7 +63,11 @@
 
             optionCount++;
 
-            if (arg.equals("-help") || arg.equals("-h")) {
+            if (arg.equals("-?") ||
+                arg.equals("-h") ||
+                arg.equals("--help") ||
+                // -help: legacy.
+                arg.equals("-help")) {
                 usage(0);
             }
 
@@ -255,7 +259,7 @@
         System.err.println("    -flags               to print VM flags");
         System.err.println("    -sysprops            to print Java system properties");
         System.err.println("    <no option>          to print both VM flags and system properties");
-        System.err.println("    -h | -help           to print this help message");
+        System.err.println("    -? | -h | --help | -help to print this help message");
         System.exit(exit);
     }
 }
--- a/src/jdk.jcmd/share/classes/sun/tools/jmap/JMap.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/jdk.jcmd/share/classes/sun/tools/jmap/JMap.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -64,7 +64,11 @@
             if (!arg.startsWith("-")) {
                 break;
             }
-            if (arg.equals("-help") || arg.equals("-h")) {
+            if (arg.equals("-?") ||
+                arg.equals("-h") ||
+                arg.equals("--help") ||
+                // -help: legacy. Undocumented.
+                arg.equals("-help")) {
                 usage(0);
             } else {
                 if (option != null) {
@@ -247,6 +251,8 @@
         System.err.println("        if the \"live\" suboption is specified, only count live objects");
         System.err.println("    jmap -dump:<dump-options> <pid>");
         System.err.println("        to connect to running process and dump java heap");
+        System.err.println("    jmap -? -h --help");
+        System.err.println("        to print this help message");
         System.err.println("");
         System.err.println("    dump-options:");
         System.err.println("      live         dump only live objects; if not specified,");
--- a/src/jdk.jcmd/share/classes/sun/tools/jps/Arguments.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/jdk.jcmd/share/classes/sun/tools/jps/Arguments.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2004, 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
@@ -52,11 +52,12 @@
     private HostIdentifier hostId;
 
     public static void printUsage(PrintStream ps) {
-      ps.println("usage: jps [-help]");
+      ps.println("usage: jps [--help]");
       ps.println("       jps [-q] [-mlvV] [<hostid>]");
       ps.println();
       ps.println("Definitions:");
       ps.println("    <hostid>:      <hostname>[:<port>]");
+      ps.println("    -? -h --help -help: Print this help message and exit.");
     }
 
     public Arguments(String[] args) throws IllegalArgumentException {
@@ -64,7 +65,10 @@
 
         if (args.length == 1) {
             if ((args[0].compareTo("-?") == 0)
-                    || (args[0].compareTo("-help")== 0)) {
+                || (args[0].compareTo("-h")== 0)
+                || (args[0].compareTo("--help")== 0)
+                // -help: legacy.
+                || (args[0].compareTo("-help")== 0)) {
               help = true;
               return;
             }
--- a/src/jdk.jcmd/share/classes/sun/tools/jstack/JStack.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/jdk.jcmd/share/classes/sun/tools/jstack/JStack.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -56,7 +56,11 @@
             if (!arg.startsWith("-")) {
                 break;
             }
-            if (arg.equals("-help") || arg.equals("-h")) {
+            if (arg.equals("-?")     ||
+                arg.equals("-h")     ||
+                arg.equals("--help") ||
+                // -help: legacy.
+                arg.equals("-help")) {
                 usage(0);
             }
             else {
@@ -171,7 +175,7 @@
         System.err.println("");
         System.err.println("Options:");
         System.err.println("    -l  long listing. Prints additional information about locks");
-        System.err.println("    -h or -help to print this help message");
+        System.err.println("    -? -h --help -help to print this help message");
         System.exit(exit);
     }
 }
--- a/src/jdk.jcmd/share/classes/sun/tools/jstat/Arguments.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/jdk.jcmd/share/classes/sun/tools/jstat/Arguments.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -73,7 +73,7 @@
     private VmIdentifier vmId;
 
     public static void printUsage(PrintStream ps) {
-        ps.println("Usage: jstat -help|-options");
+        ps.println("Usage: jstat --help|-options");
         ps.println("       jstat -<option> [-t] [-h<lines>] <vmid> [<interval> [<count>]]");
         ps.println();
         ps.println("Definitions:");
@@ -93,6 +93,8 @@
         ps.println("                milliseconds(\"ms\") or seconds(\"s\"). The default units are \"ms\".");
         ps.println("  <count>       Number of samples to take before terminating.");
         ps.println("  -J<flag>      Pass <flag> directly to the runtime system.");
+        ps.println("  -? -h --help  Prints this help message.");
+        ps.println("  -help         Prints this help message.");
 
         // undocumented options:
         //   -list [<vmid>]  - list counter names
@@ -103,6 +105,7 @@
         //   -v              - verbose output  (-snap)
         //   -constants      - output constants with -name output
         //   -strings        - output strings with -name output
+        //   -help           - same as -? ...
     }
 
     private static int toMillis(String s) throws IllegalArgumentException {
@@ -147,6 +150,9 @@
         }
 
         if ((args[0].compareTo("-?") == 0)
+                || (args[0].compareTo("-h") == 0)
+                || (args[0].compareTo("--help") == 0)
+                // -help: legacy.
                 || (args[0].compareTo("-help") == 0)) {
             help = true;
             return;
--- a/src/jdk.jdeps/share/classes/com/sun/tools/javap/JavapTask.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/jdk.jdeps/share/classes/com/sun/tools/javap/JavapTask.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -123,7 +123,7 @@
 
     static final Option[] recognizedOptions = {
 
-        new Option(false, "-help", "--help", "-?") {
+        new Option(false, "-help", "--help", "-?", "-h") {
             @Override
             void process(JavapTask task, String opt, String arg) {
                 task.options.help = true;
--- a/src/jdk.jdeps/share/classes/com/sun/tools/javap/overview.html	Tue Jan 30 16:26:40 2018 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,10 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-  <head>
-    <title>javap: class file disassembler</title>
-    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-  </head>
-  <body>
-  Javap is a class file disassembler.
-  </body>
-</html>
--- a/src/jdk.jdeps/share/classes/com/sun/tools/javap/resources/javap.properties	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/jdk.jdeps/share/classes/com/sun/tools/javap/resources/javap.properties	Tue Jan 30 16:41:40 2018 +0100
@@ -24,7 +24,7 @@
 
 main.usage.summary=\
 Usage: {0} <options> <classes>\n\
-use -help for a list of possible options
+use --help for a list of possible options
 
 warn.prefix=Warning:
 warn.unexpected.class=File {0} does not contain class {1}
@@ -33,7 +33,7 @@
 
 main.usage.summary=\
 Usage: {0} <options> <classes>\n\
-use -help for a list of possible options
+use --help for a list of possible options
 
 main.usage=\
 Usage: {0} <options> <classes>\n\
@@ -41,7 +41,7 @@
 
 
 main.opt.help=\
-\  -help  --help  -?                Print this usage message
+\  -? -h --help -help               Print this help message
 
 main.opt.version=\
 \  -version                         Version information
--- a/src/jdk.jdeps/share/classes/com/sun/tools/jdeprscan/Main.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/jdk.jdeps/share/classes/com/sun/tools/jdeprscan/Main.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -506,10 +506,11 @@
                             return false;
                         case "--help":
                         case "-h":
+                        case "-?":
                             out.println(Messages.get("main.usage"));
                             out.println();
                             out.println(Messages.get("main.help"));
-                            return false;
+                            return true;
                         case "-l":
                         case "--list":
                             require(scanMode == ScanMode.ARGS);
--- a/src/jdk.jdeps/share/classes/com/sun/tools/jdeprscan/resources/jdeprscan.properties	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/jdk.jdeps/share/classes/com/sun/tools/jdeprscan/resources/jdeprscan.properties	Tue Jan 30 16:41:40 2018 +0100
@@ -2,14 +2,14 @@
 Usage: jdeprscan [options] '{dir|jar|class}' ...\n\
 \n\
 options:\n\
-\       --class-path PATH\n\
-\       --for-removal\n\
-\       --full-version\n\
-\  -h   --help\n\
-\  -l   --list\n\
-\       --release 6|7|8|9|10\n\
-\  -v   --verbose\n\
-\       --version
+\        --class-path PATH\n\
+\        --for-removal\n\
+\        --full-version\n\
+\  -? -h --help\n\
+\  -l    --list\n\
+\        --release 6|7|8|9|10\n\
+\  -v    --verbose\n\
+\        --version
 
 main.help=\
 Scans each argument for usages of deprecated APIs. An argument\n\
@@ -28,7 +28,7 @@
 \n\
 The --full-version option prints out the full version string of the tool.\n\
 \n\
-The --help option prints out a full help message.\n\
+The --help (-? -h) option prints out a full help message.\n\
 \n\
 The --list (-l) option prints out the set of deprecated APIs. No scanning is done,\n\
 so no directory, jar, or class arguments should be provided.\n\
--- a/src/jdk.jdeps/share/classes/com/sun/tools/jdeprscan/resources/jdeprscan_ja.properties	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/jdk.jdeps/share/classes/com/sun/tools/jdeprscan/resources/jdeprscan_ja.properties	Tue Jan 30 16:41:40 2018 +0100
@@ -1,4 +1,4 @@
-main.usage=\u4F7F\u7528\u65B9\u6CD5: jdeprscan [options] '{dir|jar|class}' ...\n\n\u30AA\u30D7\u30B7\u30E7\u30F3:\n       --class-path PATH\n       --for-removal\n       --full-version\n  -h   --help\n  -l   --list\n       --release 6|7|8|9\n  -v   --verbose\n       --version
+main.usage=\u4F7F\u7528\u65B9\u6CD5: jdeprscan [options] '{dir|jar|class}' ...\n\n\u30AA\u30D7\u30B7\u30E7\u30F3:\n       --class-path PATH\n       --for-removal\n       --full-version\n  -h   --help\n  -l   --list\n       --release 6|7|8|9|10\n  -v   --verbose\n       --version
 
 main.help=\u975E\u63A8\u5968API\u306E\u4F7F\u7528\u306B\u3064\u3044\u3066\u5404\u5F15\u6570\u3092\u30B9\u30AD\u30E3\u30F3\u3057\u307E\u3059\u3002\u5F15\u6570\u306B\u306F\u3001\n\u30D1\u30C3\u30B1\u30FC\u30B8\u968E\u5C64\u306E\u30EB\u30FC\u30C8\u3092\u6307\u5B9A\u3059\u308B\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u3001JAR\u30D5\u30A1\u30A4\u30EB\u3001\n\u30AF\u30E9\u30B9\u30FB\u30D5\u30A1\u30A4\u30EB\u307E\u305F\u306F\u30AF\u30E9\u30B9\u540D\u3092\u4F7F\u7528\u3067\u304D\u307E\u3059\u3002\u30AF\u30E9\u30B9\u540D\u306F\u3001\n\u5B8C\u5168\u4FEE\u98FE\u30AF\u30E9\u30B9\u540D\u3092\u4F7F\u7528\u3057\u3066\u6307\u5B9A\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002\u30CD\u30B9\u30C8\u3055\u308C\u305F\n\u30AF\u30E9\u30B9\u306F$\u3067\u533A\u5207\u308A\u307E\u3059\u3002\u4F8B:\n\n    java.lang.Thread$State\n\n--class-path\u30AA\u30D7\u30B7\u30E7\u30F3\u306F\u3001\u4F9D\u5B58\u3059\u308B\u30AF\u30E9\u30B9\u306E\u89E3\u6C7A\u306E\u305F\u3081\u306E\n\u691C\u7D22\u30D1\u30B9\u3092\u6307\u5B9A\u3057\u307E\u3059\u3002\n\n--for-removal\u30AA\u30D7\u30B7\u30E7\u30F3\u306F\u3001\u30B9\u30AD\u30E3\u30F3\u3068\u30EA\u30B9\u30C8\u5316\u3092\u524A\u9664\u4E88\u5B9A\u3067\u975E\u63A8\u5968\u306EAPI\u306B\n\u9650\u5B9A\u3057\u307E\u3059\u3002\u30EA\u30EA\u30FC\u30B9\u5024\u304C6\u30017\u307E\u305F\u306F8\u306E\u5834\u5408\u306F\u4F7F\u7528\u3067\u304D\u307E\u305B\u3093\u3002\n\n--full-version\u30AA\u30D7\u30B7\u30E7\u30F3\u306F\u30C4\u30FC\u30EB\u306E\u30D0\u30FC\u30B8\u30E7\u30F3\u6587\u5B57\u5217\u306E\u5168\u4F53\u3092\u51FA\u529B\u3057\u307E\u3059\u3002\n\n--help\u30AA\u30D7\u30B7\u30E7\u30F3\u306F\u3001\u30D8\u30EB\u30D7\u30FB\u30E1\u30C3\u30BB\u30FC\u30B8\u5168\u4F53\u3092\u51FA\u529B\u3057\u307E\u3059\u3002\n\n--list (-l)\u30AA\u30D7\u30B7\u30E7\u30F3\u306F\u975E\u63A8\u5968API\u30BB\u30C3\u30C8\u3092\u51FA\u529B\u3057\u307E\u3059\u3002\u30B9\u30AD\u30E3\u30F3\u306F\u884C\u308F\u308C\u306A\u3044\n\u305F\u3081\u3001\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u3001JAR\u307E\u305F\u306F\u30AF\u30E9\u30B9\u5F15\u6570\u3092\u6307\u5B9A\u3059\u308B\u5FC5\u8981\u306F\u3042\u308A\u307E\u305B\u3093\u3002\n\n--release\u30AA\u30D7\u30B7\u30E7\u30F3\u306F\u3001\u30B9\u30AD\u30E3\u30F3\u3059\u308B\u975E\u63A8\u5968API\u306E\u30BB\u30C3\u30C8\u3092\u63D0\u4F9B\u3059\u308BJava SE\n\u30EA\u30EA\u30FC\u30B9\u3092\u6307\u5B9A\u3057\u307E\u3059\u3002\n\n--verbose (-v)\u30AA\u30D7\u30B7\u30E7\u30F3\u3092\u4F7F\u7528\u3059\u308B\u3068\u3001\u51E6\u7406\u4E2D\u306B\u8FFD\u52A0\u306E\u30E1\u30C3\u30BB\u30FC\u30B8\u3092\u51FA\u529B\u3067\u304D\u307E\u3059\u3002\n\n--version\u30AA\u30D7\u30B7\u30E7\u30F3\u306F\u3001\u7C21\u7565\u5316\u3055\u308C\u305F\u30C4\u30FC\u30EB\u306E\u30D0\u30FC\u30B8\u30E7\u30F3\u6587\u5B57\u5217\u3092\u51FA\u529B\u3057\u307E\u3059\u3002
 
--- a/src/jdk.jdeps/share/classes/com/sun/tools/jdeprscan/resources/jdeprscan_zh_CN.properties	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/jdk.jdeps/share/classes/com/sun/tools/jdeprscan/resources/jdeprscan_zh_CN.properties	Tue Jan 30 16:41:40 2018 +0100
@@ -1,4 +1,4 @@
-main.usage=\u7528\u6CD5: jdeprscan [\u9009\u9879] '{dir|jar|class}' ...\n\n\u9009\u9879:\n       --class-path PATH\n       --for-removal\n       --full-version\n  -h   --help\n  -l   --list\n       --release 6|7|8|9\n  -v   --verbose\n       --version
+main.usage=\u7528\u6CD5: jdeprscan [\u9009\u9879] '{dir|jar|class}' ...\n\n\u9009\u9879:\n       --class-path PATH\n       --for-removal\n       --full-version\n  -h   --help\n  -l   --list\n       --release 6|7|8|9|10\n  -v   --verbose\n       --version
 
 main.help=\u626B\u63CF\u6BCF\u4E2A\u53C2\u6570\u4EE5\u4E86\u89E3\u662F\u5426\u4F7F\u7528\u4E86\u8FC7\u65F6\u7684 API\u3002\n\u53C2\u6570\u53EF\u4EE5\u662F\u6307\u5B9A\u7A0B\u5E8F\u5305\u5206\u5C42\u7ED3\u6784, JAR \u6587\u4EF6, \n\u7C7B\u6587\u4EF6\u6216\u7C7B\u540D\u7684\u6839\u7684\u76EE\u5F55\u3002\u7C7B\u540D\u5FC5\u987B\n\u4F7F\u7528\u5168\u9650\u5B9A\u7C7B\u540D\u6307\u5B9A, \u5E76\u4F7F\u7528 $ \u5206\u9694\u7B26\n\u6307\u5B9A\u5D4C\u5957\u7C7B, \u4F8B\u5982,\n\n    java.lang.Thread$State\n\n--class-path \u9009\u9879\u63D0\u4F9B\u4E86\u7528\u4E8E\u89E3\u6790\u4ECE\u5C5E\u7C7B\u7684\n\u641C\u7D22\u8DEF\u5F84\u3002\n\n--for-removal \u9009\u9879\u9650\u5236\u626B\u63CF\u6216\u5217\u51FA\u5DF2\u8FC7\u65F6\u5E76\u5F85\u5220\u9664\n\u7684 API\u3002\u4E0D\u80FD\u4E0E\u53D1\u884C\u7248\u503C 6, 7 \u6216 8 \u4E00\u8D77\u4F7F\u7528\u3002\n\n--full-version \u9009\u9879\u8F93\u51FA\u5DE5\u5177\u7684\u5B8C\u6574\u7248\u672C\u5B57\u7B26\u4E32\u3002\n\n--help \u9009\u9879\u8F93\u51FA\u5B8C\u6574\u7684\u5E2E\u52A9\u6D88\u606F\u3002\n\n--list (-l) \u9009\u9879\u8F93\u51FA\u4E00\u7EC4\u5DF2\u8FC7\u65F6\u7684 API\u3002\u4E0D\u6267\u884C\u626B\u63CF, \n\u56E0\u6B64\u4E0D\u5E94\u63D0\u4F9B\u4EFB\u4F55\u76EE\u5F55, jar \u6216\u7C7B\u53C2\u6570\u3002\n\n--release \u9009\u9879\u6307\u5B9A\u63D0\u4F9B\u8981\u626B\u63CF\u7684\u5DF2\u8FC7\u65F6 API \u96C6\n\u7684 Java SE \u53D1\u884C\u7248\u3002\n\n--verbose (-v) \u9009\u9879\u5728\u5904\u7406\u671F\u95F4\u542F\u7528\u9644\u52A0\u6D88\u606F\u8F93\u51FA\u3002\n\n--version \u9009\u9879\u8F93\u51FA\u5DE5\u5177\u7684\u7F29\u5199\u7248\u672C\u5B57\u7B26\u4E32\u3002
 
--- a/src/jdk.jdeps/share/classes/com/sun/tools/jdeps/JdepsTask.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/jdk.jdeps/share/classes/com/sun/tools/jdeps/JdepsTask.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -1144,7 +1144,7 @@
         for (Option o : recognizedOptions) {
             String name = o.aliases[0].substring(1); // there must always be at least one name
             name = name.charAt(0) == '-' ? name.substring(1) : name;
-            if (o.isHidden() || name.equals("h") || name.startsWith("filter:")) {
+            if (o.isHidden() || name.startsWith("filter:")) {
                 continue;
             }
             log.println(getMessage("main.opt." + name));
--- a/src/jdk.jdeps/share/classes/com/sun/tools/jdeps/resources/jdeps.properties	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/jdk.jdeps/share/classes/com/sun/tools/jdeps/resources/jdeps.properties	Tue Jan 30 16:41:40 2018 +0100
@@ -1,6 +1,6 @@
 main.usage.summary=\
 Usage: {0} <options> <path ...>]\n\
-use -h, -?, -help, or --help for a list of possible options
+use --help for a list of possible options
 
 main.usage=\
 Usage: {0} <options> <path ...>]\n\
@@ -12,8 +12,7 @@
 warn.prefix=Warning:
 
 main.opt.h=\
-\  -h -? -help\n\
-\  --help                        Print this usage message
+\  -h -? --help                  Print this help message
 
 main.opt.version=\
 \  -version --version            Version information
--- a/src/jdk.jdeps/share/classes/com/sun/tools/jdeps/resources/jdeps_ja.properties	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/jdk.jdeps/share/classes/com/sun/tools/jdeps/resources/jdeps_ja.properties	Tue Jan 30 16:41:40 2018 +0100
@@ -34,8 +34,6 @@
 
 main.opt.add-modules=\  --add-modules <module-name>[,<module-name>...]\n                                \u5206\u6790\u7528\u306B\u30E2\u30B8\u30E5\u30FC\u30EB\u3092\u30EB\u30FC\u30C8\u30FB\u30BB\u30C3\u30C8\u306B\u8FFD\u52A0\u3057\u307E\u3059
 
-main.opt.m=\  -m <module-name>\n  --module <module-name>        \u5206\u6790\u7528\u306B\u30EB\u30FC\u30C8\u30FB\u30E2\u30B8\u30E5\u30FC\u30EB\u3092\u6307\u5B9A\u3057\u307E\u3059
-
 main.opt.R=\  -R       -recursive           \u3059\u3079\u3066\u306E\u30E9\u30F3\u30BF\u30A4\u30E0\u4F9D\u5B58\u6027\u3092\u518D\u5E30\u7684\u306B\u30C8\u30E9\u30D0\u30FC\u30B9\u3057\u307E\u3059\u3002\n                                -R\u30AA\u30D7\u30B7\u30E7\u30F3\u306F-filter:none\u3092\u610F\u5473\u3057\u307E\u3059\u3002-p\u3001-e\u3001-f\n                                \u30AA\u30D7\u30B7\u30E7\u30F3\u304C\u6307\u5B9A\u3055\u308C\u3066\u3044\u308B\u5834\u5408\u3001\u4E00\u81F4\u3059\u308B\u4F9D\u5B58\u6027\u306E\u307F\n                                \u5206\u6790\u3055\u308C\u307E\u3059\u3002
 
 main.opt.I=\  -I       --inverse            \u4ED6\u306E\u6307\u5B9A\u306E\u30AA\u30D7\u30B7\u30E7\u30F3\u3054\u3068\u306B\u4F9D\u5B58\u6027\u3092\u5206\u6790\u3057\u3001\n                                \u4E00\u81F4\u3059\u308B\u30CE\u30FC\u30C9\u306B\u76F4\u63A5\u304A\u3088\u3073\u9593\u63A5\u7684\u306B\u4F9D\u5B58\u3059\u308B\n                                \u3059\u3079\u3066\u306E\u30A2\u30FC\u30C6\u30A3\u30D5\u30A1\u30AF\u30C8\u3092\u691C\u51FA\u3057\u307E\u3059\u3002\n                                \u3053\u308C\u306F\u3001\u30B3\u30F3\u30D1\u30A4\u30EB\u6642\u306E\u8868\u793A\u5206\u6790\n                                \u304A\u3088\u3073\u51FA\u529B\u4F9D\u5B58\u6027\u30B5\u30DE\u30EA\u30FC\u306E\u9006\u306B\u76F8\u5F53\u3057\u307E\u3059\u3002\n                                \u3053\u306E\u30AA\u30D7\u30B7\u30E7\u30F3\u306F--require\u3001--package\u307E\u305F\u306F--regex\u30AA\u30D7\u30B7\u30E7\u30F3\u3068\n                                \u4E00\u7DD2\u306B\u4F7F\u7528\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
@@ -44,24 +42,27 @@
 
 main.opt.apionly=\  -apionly\n  --api-only                    \u5206\u6790\u3092API\u3001\u3064\u307E\u308A\u3001\u30D1\u30D6\u30EA\u30C3\u30AF\u30FB\u30AF\u30E9\u30B9\u306E\n                                \u30D1\u30D6\u30EA\u30C3\u30AF\u30FB\u30E1\u30F3\u30D0\u30FC\u304A\u3088\u3073\u4FDD\u8B77\u3055\u308C\u305F\u30E1\u30F3\u30D0\u30FC\u306E\n                                \u7F72\u540D\u306B\u304A\u3051\u308B\u4F9D\u5B58\u6027(\u30D5\u30A3\u30FC\u30EB\u30C9\u30FB\u30BF\u30A4\u30D7\u3001\u30E1\u30BD\u30C3\u30C9\u30FB\n                                \u30D1\u30E9\u30E1\u30FC\u30BF\u30FB\u30BF\u30A4\u30D7\u3001\u623B\u3055\u308C\u305F\u30BF\u30A4\u30D7\u3001\u30C1\u30A7\u30C3\u30AF\u3055\u308C\u305F\n                                \u4F8B\u5916\u30BF\u30A4\u30D7\u306A\u3069)\u306B\u5236\u9650\u3057\u307E\u3059\u3002
 
+main.opt.m=\n\u30E2\u30B8\u30E5\u30FC\u30EB\u4F9D\u5B58\u6027\u306E\u5206\u6790\u30AA\u30D7\u30B7\u30E7\u30F3:\n  -m <module-name>\n  --module <module-name>        \u5206\u6790\u7528\u306B\u30EB\u30FC\u30C8\u30FB\u30E2\u30B8\u30E5\u30FC\u30EB\u3092\u6307\u5B9A\u3057\u307E\u3059
+
 main.opt.generate-module-info=\  --generate-module-info <dir>  \u6307\u5B9A\u3057\u305F\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306Bmodule-info.java\u3092\u751F\u6210\u3057\u307E\u3059\u3002\n                                \u6307\u5B9A\u3057\u305FJAR\u30D5\u30A1\u30A4\u30EB\u3092\u5206\u6790\u3057\u307E\u3059\u3002\n                                \u3053\u306E\u30AA\u30D7\u30B7\u30E7\u30F3\u306F--dot-output\u307E\u305F\u306F--class-path\n                                \u3068\u4E00\u7DD2\u306B\u4F7F\u7528\u3067\u304D\u307E\u305B\u3093\u3002\u30AA\u30FC\u30D7\u30F3\u30FB\u30E2\u30B8\u30E5\u30FC\u30EB\u306B\u306F\n                                --generate-open-module\u30AA\u30D7\u30B7\u30E7\u30F3\u3092\u4F7F\u7528\u3057\u3066\u304F\u3060\u3055\u3044\u3002
 
 main.opt.generate-open-module=\  --generate-open-module <dir>  \u6307\u5B9A\u3057\u305F\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306B\u3001\u6307\u5B9A\u3057\u305F\n                                JAR\u30D5\u30A1\u30A4\u30EB\u306Emodule-info.java\u3092\u30AA\u30FC\u30D7\u30F3\u30FB\u30E2\u30B8\u30E5\u30FC\u30EB\u3068\u3057\u3066\n                                \u751F\u6210\u3057\u307E\u3059\u3002\u3053\u306E\u30AA\u30D7\u30B7\u30E7\u30F3\u306F--dot-output\n                                \u307E\u305F\u306F--class-path\u3068\u4E00\u7DD2\u306B\u4F7F\u7528\u3067\u304D\u307E\u305B\u3093\u3002
 
 main.opt.check=\  --check <module-name>[,<module-name>...\n                                \u6307\u5B9A\u3057\u305F\u30E2\u30B8\u30E5\u30FC\u30EB\u306E\u4F9D\u5B58\u6027\u3092\u5206\u6790\u3057\u307E\u3059\n                                \u30E2\u30B8\u30E5\u30FC\u30EB\u30FB\u30C7\u30A3\u30B9\u30AF\u30EA\u30D7\u30BF\u3001\u5206\u6790\u5F8C\u306E\u7D50\u679C\u30E2\u30B8\u30E5\u30FC\u30EB\u4F9D\u5B58\u6027\n                                \u304A\u3088\u3073\u9077\u79FB\u524A\u6E1B\u5F8C\u306E\u30B0\u30E9\u30D5\u3092\n                                \u51FA\u529B\u3057\u307E\u3059\u3002\n                                \u672A\u4F7F\u7528\u306E\u4FEE\u98FE\u3055\u308C\u305F\u30A8\u30AF\u30B9\u30DD\u30FC\u30C8\u3082\u8B58\u5225\u3057\u307E\u3059\u3002
 
-
 main.opt.dotoutput=\  -dotoutput <dir>\n  --dot-output <dir>            DOT\u30D5\u30A1\u30A4\u30EB\u51FA\u529B\u306E\u5B9B\u5148\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA
 
 main.opt.jdkinternals=\  -jdkinternals\n  --jdk-internals               JDK\u5185\u90E8API\u306E\u30AF\u30E9\u30B9\u30EC\u30D9\u30EB\u306E\u4F9D\u5B58\u6027\u3092\u691C\u51FA\u3057\u307E\u3059\u3002\n                                \u30C7\u30D5\u30A9\u30EB\u30C8\u3067\u306F\u3001-include\u30AA\u30D7\u30B7\u30E7\u30F3\u3092\u6307\u5B9A\u3057\u306A\u3044\u3068\u3001\n                                --class-path\u306E\u3059\u3079\u3066\u306E\u30AF\u30E9\u30B9\u3068\u5165\u529B\u30D5\u30A1\u30A4\u30EB\u3092\u5206\u6790\u3057\u307E\u3059\u3002\n                                \u3053\u306E\u30AA\u30D7\u30B7\u30E7\u30F3\u306F-p\u3001-e\u304A\u3088\u3073-s\u30AA\u30D7\u30B7\u30E7\u30F3\u3068\u4E00\u7DD2\u306B\n                                \u4F7F\u7528\u3067\u304D\u307E\u305B\u3093\u3002\n                                \u8B66\u544A: JDK\u5185\u90E8API\u306F\u3001\u30A2\u30AF\u30BB\u30B9\u3067\u304D\u306A\u304F\u306A\u308A\u307E\u3059\u3002
 
-main.opt.list-deps=\  --list-deps                   \u4F9D\u5B58\u95A2\u4FC2\u3068JDK\u5185\u90E8API\u306E\u4F7F\u7528\u3092\n                                \u30EA\u30B9\u30C8\u3057\u307E\u3059\u3002
+main.opt.list-deps=\  --list-deps                   \u30E2\u30B8\u30E5\u30FC\u30EB\u4F9D\u5B58\u6027\u3092\u30EA\u30B9\u30C8\u3057\u307E\u3059\u3002\u53C2\u7167\u3055\u308C\u3066\u3044\u308B\n                                \u5834\u5408\u3001\u4EFB\u610F\u306EJDK\u5185\u90E8API\u30D1\u30C3\u30B1\u30FC\u30B8\u3082\u51FA\u529B\u3057\u307E\u3059\u3002\n                                \u3053\u306E\u30AA\u30D7\u30B7\u30E7\u30F3\u3067\u306F\u3001\u30AF\u30E9\u30B9\u30D1\u30B9\u306E\u4F9D\u5B58\u6027\u3084\u898B\u3064\u3051\u3089\u308C\u306A\u3044\n                                \u4F9D\u5B58\u6027\u306F\u8868\u793A\u3055\u308C\u307E\u305B\u3093\u3002
 
-main.opt.list-reduced-deps=\  --list-reduced-deps           --list-deps\u3068\u540C\u3058\u3067\u3059\u304C\u3001\u30E2\u30B8\u30E5\u30FC\u30EB\u30FB\u30B0\u30E9\u30D5\n                                \u304B\u3089\u542B\u610F\u3055\u308C\u305F\u8AAD\u53D6\u308A\u30A8\u30C3\u30B8\u3092\u30EA\u30B9\u30C8\u3057\u307E\u305B\u3093\n                                \u30E2\u30B8\u30E5\u30FC\u30EBM1\u304CM2\u3068M3\u306B\u4F9D\u5B58\u3057\u3066\u304A\u308A\u3001\n                                M2\u304CM3\u4E0A\u3067requires public\u3067\u3042\u308B\u5834\u5408\u3001M3\u3092\u8AAD\u307F\u53D6\u308BM1\u306F\n                                \u542B\u610F\u3055\u308C\u3066\u304A\u308A\u3001\u30E2\u30B8\u30E5\u30FC\u30EB\u30FB\u30B0\u30E9\u30D5\u304B\u3089\u524A\u9664\u3055\u308C\u307E\u3059\u3002
+main.opt.list-reduced-deps=\  --list-reduced-deps           --list-deps\u3068\u540C\u3058\u3067\u3059\u304C\u3001\u30E2\u30B8\u30E5\u30FC\u30EB\u30FB\u30B0\u30E9\u30D5\n                                \u304B\u3089\u542B\u610F\u3055\u308C\u305F\u8AAD\u53D6\u308A\u30A8\u30C3\u30B8\u3092\u30EA\u30B9\u30C8\u3057\u307E\u305B\u3093\u3002\n                                \u30E2\u30B8\u30E5\u30FC\u30EBM1\u304CM2\u3092\u8AAD\u307F\u53D6\u308A\u3001M2\u304CM3\u3067\u306E\u63A8\u79FB\u3092\n                                \u5FC5\u8981\u3068\u3059\u308B\u5834\u5408\u3001M3\u3092\u8AAD\u307F\u53D6\u308BM1\u306F\u542B\u610F\u3055\u308C\u3066\u304A\u308A\u3001\n                                \u30B0\u30E9\u30D5\u306B\u306F\u8868\u793A\u3055\u308C\u307E\u305B\u3093\u3002
+
+main.opt.print-module-deps=\  --print-module-deps           \u30E2\u30B8\u30E5\u30FC\u30EB\u4F9D\u5B58\u6027\u306E\u30AB\u30F3\u30DE\u533A\u5207\u308A\u30EA\u30B9\u30C8\n                                \u3092\u51FA\u529B\u3059\u308B--list-reduced-deps\u3068\u540C\u3058\u3067\u3059\u3002\n                                \u3053\u306E\u51FA\u529B\u306F\u3001\u3053\u308C\u3089\u306E\u30E2\u30B8\u30E5\u30FC\u30EB\u3068\u305D\u306E\u63A8\u79FB\u7684\u306A\n                                \u4F9D\u5B58\u6027\u3092\u542B\u3080\u30AB\u30B9\u30BF\u30E0\u30FB\u30A4\u30E1\u30FC\u30B8\u3092\u4F5C\u6210\u3059\u308B\u305F\u3081\u306B\n                                jlink --add-modules\u3067\u4F7F\u7528\u3067\u304D\u307E\u3059\u3002
 
 main.opt.depth=\  -depth=<depth>                \u63A8\u79FB\u7684\u306A\u4F9D\u5B58\u6027\u5206\u6790\u306E\u6DF1\u3055\u3092\n                                \u6307\u5B9A\u3057\u307E\u3059
 
-main.opt.q=\  -q       -quiet               --generate-module-info\u51FA\u529B\u3067\n                                 \u6B20\u843D\u3057\u3066\u3044\u308B\u4F9D\u5B58\u6027\u3092\u8868\u793A\u3057\u307E\u305B\u3093\u3002
+main.opt.q=\  -q       -quiet               \u8B66\u544A\u30E1\u30C3\u30BB\u30FC\u30B8\u3092\u8868\u793A\u3057\u306A\u3044\u3088\u3046\u306B\u3057\u307E\u3059
 
 main.opt.multi-release=\  --multi-release <version>     \u30DE\u30EB\u30C1\u30EA\u30EA\u30FC\u30B9jar\u30D5\u30A1\u30A4\u30EB\u3092\u51E6\u7406\u3059\u308B\u969B\u306E\u30D0\u30FC\u30B8\u30E7\u30F3\u3092\n                                \u6307\u5B9A\u3057\u307E\u3059\u3002<version>\u306F\u30019\u307E\u305F\u306F\u30D9\u30FC\u30B9\u4EE5\u4E0A\u306E\n                                \u6574\u6570\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
 
@@ -87,10 +88,9 @@
 err.multirelease.jar.malformed=\u4E0D\u6B63\u306A\u30DE\u30EB\u30C1\u30EA\u30EA\u30FC\u30B9jar\u3001{0}\u3001\u4E0D\u6B63\u306A\u30A8\u30F3\u30C8\u30EA: {1}
 warn.invalid.arg=\u30D1\u30B9\u304C\u5B58\u5728\u3057\u307E\u305B\u3093: {0}
 warn.skipped.entry={0}
-warn.split.package=\u30D1\u30C3\u30B1\u30FC\u30B8{0}\u306F{1} {2}\u3067\u5B9A\u7FA9\u3055\u308C\u3066\u3044\u307E\u3059
+warn.split.package=\u5206\u5272\u30D1\u30C3\u30B1\u30FC\u30B8: {0} {1}
 warn.replace.useJDKInternals=JDK\u5185\u90E8API\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u304A\u3089\u305A\u3001JDK\u5B9F\u88C5\u5C02\u7528\u3067\u3059\u304C\u3001\u4E92\u63DB\u6027\u306A\u3057\u3067\n\u524A\u9664\u307E\u305F\u306F\u5909\u66F4\u3055\u308C\u308B\u5834\u5408\u304C\u3042\u308A\u3001\u30A2\u30D7\u30EA\u30B1\u30FC\u30B7\u30E7\u30F3\u3092\u4E2D\u65AD\u3055\u305B\u308B\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059\u3002\nJDK\u5185\u90E8API\u306E\u4F9D\u5B58\u6027\u3092\u524A\u9664\u3059\u308B\u3088\u3046\u30B3\u30FC\u30C9\u3092\u5909\u66F4\u3057\u3066\u304F\u3060\u3055\u3044\u3002\nJDK\u5185\u90E8API\u306E\u7F6E\u63DB\u306B\u95A2\u3059\u308B\u6700\u65B0\u306E\u66F4\u65B0\u306B\u3064\u3044\u3066\u306F\u3001\u6B21\u3092\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044:\n{0}
 
-split.package=\u5206\u5272\u30D1\u30C3\u30B1\u30FC\u30B8: {0} {1}\n
 inverse.transitive.dependencies.on={0}\u4E0A\u3067\u63A8\u79FB\u7684\u306A\u4F9D\u5B58\u6027\u3092\u9006\u8EE2\u3057\u307E\u3059
 inverse.transitive.dependencies.matching={0}\u306B\u4E00\u81F4\u3059\u308B\u63A8\u79FB\u7684\u306A\u4F9D\u5B58\u6027\u3092\u9006\u8EE2\u3057\u307E\u3059
 internal.api.column.header=JDK\u5185\u90E8API
--- a/src/jdk.jdeps/share/classes/com/sun/tools/jdeps/resources/jdeps_zh_CN.properties	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/jdk.jdeps/share/classes/com/sun/tools/jdeps/resources/jdeps_zh_CN.properties	Tue Jan 30 16:41:40 2018 +0100
@@ -34,8 +34,6 @@
 
 main.opt.add-modules=\  --add-modules <\u6A21\u5757\u540D\u79F0>[,<\u6A21\u5757\u540D\u79F0>...]\n                                \u5C06\u6A21\u5757\u6DFB\u52A0\u5230\u6839\u96C6\u4EE5\u8FDB\u884C\u5206\u6790
 
-main.opt.m=\  -m <\u6A21\u5757\u540D\u79F0>\n  --module <\u6A21\u5757\u540D\u79F0>        \u6307\u5B9A\u7528\u4E8E\u5206\u6790\u7684\u6839\u6A21\u5757
-
 main.opt.R=\  -R       -recursive           \u9012\u5F52\u904D\u5386\u6240\u6709\u8FD0\u884C\u65F6\u88AB\u4F9D\u8D56\u5BF9\u8C61\u3002\n                                -R \u9009\u9879\u8868\u793A -filter:none\u3002\u5982\u679C\n                                \u6307\u5B9A\u4E86 -p, -e, -f \u9009\u9879, \u5219\u53EA\u5206\u6790\n                                \u5339\u914D\u7684\u88AB\u4F9D\u8D56\u5BF9\u8C61\u3002
 
 main.opt.I=\  -I       --inverse            \u6839\u636E\u5176\u4ED6\u6307\u5B9A\u9009\u9879\u5206\u6790\u88AB\u4F9D\u8D56\u5BF9\u8C61,\n                                \u7136\u540E\u67E5\u627E\u76F4\u63A5\u548C\u95F4\u63A5\u4F9D\u8D56\u4E8E\u5339\u914D\n                                \u8282\u70B9\u7684\u6240\u6709 Artifact\u3002\n                                \u8FD9\u76F8\u5F53\u4E8E\u7F16\u8BD1\u65F6\u89C6\u56FE\u5206\u6790\u7684\n                                \u9006\u5411, \u8F93\u51FA\u88AB\u4F9D\u8D56\u5BF9\u8C61\u6982\u8981\u3002\n                                \u6B64\u9009\u9879\u5FC5\u987B\u4E0E --require, \n                                --package \u6216 --regex \u9009\u9879\u4E00\u8D77\u4F7F\u7528\u3002
@@ -44,24 +42,27 @@
 
 main.opt.apionly=\  -apionly\n  --api-only                    \u901A\u8FC7\u516C\u5171\u7C7B (\u5305\u62EC\u5B57\u6BB5\u7C7B\u578B, \u65B9\u6CD5\n                                \u53C2\u6570\u7C7B\u578B, \u8FD4\u56DE\u7C7B\u578B, \u53D7\u63A7\u5F02\u5E38\u9519\u8BEF\n                                \u7C7B\u578B\u7B49) \u7684\u516C\u5171\u548C\u53D7\u4FDD\u62A4\u6210\u5458\u7684\u7B7E\u540D\n                                \u9650\u5236\u5BF9 API (\u5373\u88AB\u4F9D\u8D56\u5BF9\u8C61)\n                                \u8FDB\u884C\u5206\u6790\u3002
 
+main.opt.m=\n\u6A21\u5757\u88AB\u4F9D\u8D56\u5BF9\u8C61\u5206\u6790\u9009\u9879:\n  -m <\u6A21\u5757\u540D\u79F0>\n  --module <\u6A21\u5757\u540D\u79F0>        \u6307\u5B9A\u7528\u4E8E\u5206\u6790\u7684\u6839\u6A21\u5757
+
 main.opt.generate-module-info=\  --generate-module-info <\u76EE\u5F55> \u5728\u6307\u5B9A\u76EE\u5F55\u4E0B\u751F\u6210 module-info.java\u3002\n                                \u5C06\u5206\u6790\u6307\u5B9A\u7684 JAR \u6587\u4EF6\u3002\n                                \u6B64\u9009\u9879\u4E0D\u80FD\u4E0E --dot-output \n                                \u6216 --class-path \u4E00\u8D77\u4F7F\u7528\u3002\u5BF9\u6253\u5F00\u7684\n                                \u6A21\u5757\u4F7F\u7528 --generate-open-module \u9009\u9879\u3002
 
 main.opt.generate-open-module=\  --generate-open-module <dir>  \u4EE5\u6253\u5F00\u6A21\u5757\u7684\u65B9\u5F0F\u4E3A\u6307\u5B9A\u76EE\u5F55\u4E0B\u7684\n                                \u6307\u5B9A JAR \u6587\u4EF6\u751F\u6210 module-info.java\u3002\n                                \u6B64\u9009\u9879\u4E0D\u80FD\u4E0E --dot-output \u6216\n                                --class-path \u4E00\u8D77\u4F7F\u7528\u3002
 
 main.opt.check=\  --check <\u6A21\u5757\u540D\u79F0>[,<\u6A21\u5757\u540D\u79F0>...\n                                \u5206\u6790\u6307\u5B9A\u6A21\u5757\u7684\u88AB\u4F9D\u8D56\u5BF9\u8C61\n                                \u5B83\u8F93\u51FA\u6A21\u5757\u63CF\u8FF0\u7B26, \u5206\u6790\u4E4B\u540E\n                                \u751F\u6210\u7684\u6A21\u5757\u88AB\u4F9D\u8D56\u5BF9\u8C61\u4EE5\u53CA\n                                \u8F6C\u6362\u51CF\u5C11\u4E4B\u540E\u7684\u56FE\u5F62\u3002\u5B83\u8FD8\n                                \u6307\u793A\u4EFB\u4F55\u672A\u4F7F\u7528\u7684\u5408\u683C\u5BFC\u51FA\u3002
 
-
 main.opt.dotoutput=\  -dotoutput <\u76EE\u5F55>\n  --dot-output <\u76EE\u5F55>            DOT \u6587\u4EF6\u8F93\u51FA\u7684\u76EE\u6807\u76EE\u5F55
 
 main.opt.jdkinternals=\  -jdkinternals\n  --jdk-internals               \u5728 JDK \u5185\u90E8 API \u4E0A\u67E5\u627E\u7C7B\u7EA7\u522B\u7684\u88AB\u4F9D\u8D56\u5BF9\u8C61\u3002\n                                \u9664\u975E\u6307\u5B9A\u4E86 -include \u9009\u9879, \u5426\u5219\u9ED8\u8BA4\u60C5\u51B5\u4E0B,\n                                \u5B83\u5206\u6790 --class-path \u4E0A\u7684\u6240\u6709\u7C7B\u548C\u8F93\u5165\u6587\u4EF6\u3002\n                                \u6B64\u9009\u9879\u4E0D\u80FD\u4E0E -p, -e \u548C -s \u9009\u9879\n                                \u4E00\u8D77\u4F7F\u7528\u3002\n                                \u8B66\u544A: \u65E0\u6CD5\u8BBF\u95EE JDK \u5185\u90E8 API\u3002
 
-main.opt.list-deps=\  --list-deps                   \u5217\u51FA JDK \u5185\u90E8 API \u7684\n                                \u88AB\u4F9D\u8D56\u5BF9\u8C61\u548C\u4F7F\u7528\u60C5\u51B5\u3002
+main.opt.list-deps=\  --list-deps                   \u5217\u51FA\u6A21\u5757\u88AB\u4F9D\u8D56\u5BF9\u8C61\u3002\u5B83\u8FD8\u4F1A\u8F93\u51FA\n                                \u4EFB\u610F JDK \u5185\u90E8 API \u7A0B\u5E8F\u5305 (\u5982\u679C\u5F15\u7528)\u3002\n                                \u6B64\u9009\u9879\u4E0D\u663E\u793A\u7C7B\u8DEF\u5F84\u4E0A\u6216\u672A\u627E\u5230\u7684\n                                \u88AB\u4F9D\u8D56\u5BF9\u8C61\u3002
 
-main.opt.list-reduced-deps=\  --list-reduced-deps           \u4E0E --list-deps \u76F8\u540C, \u4E0D\u5217\u51FA\n                                \u6A21\u5757\u56FE\u4E2D\u7684\u9690\u5F0F\u8BFB\u53D6\u7EF4\u8FB9\u3002\n                                \u5982\u679C\u6A21\u5757 M1 \u4F9D\u8D56\u4E8E M2 \u548C M3,\n                                M2 \u8981\u6C42\u5728 M3 \u4E0A\u662F\u516C\u5171\u7684, \u5219 M1 \u8BFB\u53D6 M3 \n                                \u7684\u64CD\u4F5C\u662F\u9690\u5F0F\u7684, \u5E76\u4E14\u4F1A\u4ECE\u6A21\u5757\u56FE\u4E2D\u5220\u9664\u3002
+main.opt.list-reduced-deps=\  --list-reduced-deps           \u4E0E --list-deps \u76F8\u540C, \u4E0D\u5217\u51FA\n                                \u6A21\u5757\u56FE\u4E2D\u7684\u9690\u5F0F\u8BFB\u53D6\u7EF4\u8FB9\u3002\n                                \u5982\u679C\u6A21\u5757 M1 \u8BFB\u53D6 M2, \u5E76\u4E14 M2 \u9700\u8981\n                                M3 \u4E0A\u7684\u8FC7\u6E21, \u5219 M1 \u9690\u5F0F\u8BFB\u53D6 M3\n                                \u5E76\u4E14\u4E0D\u5728\u56FE\u4E2D\u663E\u793A\u3002
+
+main.opt.print-module-deps=\  --print-module-deps           \u4E0E --list-reduced-deps \u76F8\u540C, \u8F93\u51FA\n                                \u9017\u53F7\u5206\u9694\u7684\u6A21\u5757\u88AB\u4F9D\u8D56\u5BF9\u8C61\u5217\u8868\u3002\n                                \u6B64\u8F93\u51FA\u53EF\u7531 jlink --add-modules\n                                \u7528\u4E8E\u521B\u5EFA\u5B9A\u5236\u6620\u50CF, \u5176\u4E2D\u5305\u542B\n                                \u8FD9\u4E9B\u6A21\u5757\u53CA\u5176\u8FC7\u6E21\u88AB\u4F9D\u8D56\u5BF9\u8C61\u3002
 
 main.opt.depth=\  -depth=<\u6DF1\u5EA6>                 \u6307\u5B9A\u8FC7\u6E21\u88AB\u4F9D\u8D56\u5BF9\u8C61\u5206\u6790\n                                \u7684\u6DF1\u5EA6
 
-main.opt.q=\  -q       -quiet               \u5728 --generate-module-info \u8F93\u51FA\u4E2D\n                                \u4E0D\u663E\u793A\u7F3A\u5C11\u7684\u88AB\u4F9D\u8D56\u5BF9\u8C61\u3002
+main.opt.q=\  -q       -quiet               \u9690\u85CF\u8B66\u544A\u6D88\u606F
 
 main.opt.multi-release=\  --multi-release <\u7248\u672C>        \u6307\u5B9A\u5904\u7406\u591A\u53D1\u884C\u7248 jar \u6587\u4EF6\u65F6\u7684\n                                \u7248\u672C\u3002<\u7248\u672C> \u5E94\u4E3A\u5927\u4E8E\u7B49\u4E8E 9 \n                                \u7684\u6574\u6570\u6216\u57FA\u6570\u3002
 
@@ -87,10 +88,9 @@
 err.multirelease.jar.malformed=\u683C\u5F0F\u9519\u8BEF\u7684\u591A\u53D1\u884C\u7248 jar, {0}, \u9519\u8BEF\u6761\u76EE: {1}
 warn.invalid.arg=\u8DEF\u5F84\u4E0D\u5B58\u5728: {0}
 warn.skipped.entry={0}
-warn.split.package=\u5DF2\u5728{1} {2}\u4E2D\u5B9A\u4E49\u7A0B\u5E8F\u5305{0}
+warn.split.package=\u62C6\u5206\u7A0B\u5E8F\u5305: {0} {1}
 warn.replace.useJDKInternals=\u4E0D\u652F\u6301 JDK \u5185\u90E8 API, \u5B83\u4EEC\u4E13\u7528\u4E8E\u901A\u8FC7\u4E0D\u517C\u5BB9\u65B9\u5F0F\u6765\n\u5220\u9664\u6216\u66F4\u6539\u7684 JDK \u5B9E\u73B0, \u53EF\u80FD\u4F1A\u635F\u574F\u60A8\u7684\u5E94\u7528\u7A0B\u5E8F\u3002\n\u8BF7\u4FEE\u6539\u60A8\u7684\u4EE3\u7801, \u6D88\u9664\u4E0E\u4EFB\u4F55 JDK \u5185\u90E8 API \u7684\u76F8\u5173\u6027\u3002\n\u6709\u5173 JDK \u5185\u90E8 API \u66FF\u6362\u7684\u6700\u65B0\u66F4\u65B0, \u8BF7\u67E5\u770B:\n{0}
 
-split.package=\u62C6\u5206\u7A0B\u5E8F\u5305: {0} {1}\n
 inverse.transitive.dependencies.on={0} \u7684\u9006\u5411\u8FC7\u6E21\u88AB\u4F9D\u8D56\u5BF9\u8C61
 inverse.transitive.dependencies.matching=\u4E0E {0} \u5339\u914D\u7684\u9006\u5411\u8FC7\u6E21\u88AB\u4F9D\u8D56\u5BF9\u8C61
 internal.api.column.header=JDK \u5185\u90E8 API
--- a/src/jdk.jdi/share/classes/com/sun/tools/example/debug/tty/TTY.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/jdk.jdi/share/classes/com/sun/tools/example/debug/tty/TTY.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -791,7 +791,7 @@
     private static void usage() {
         MessageOutput.println("zz usage text", new Object [] {progname,
                                                      File.pathSeparator});
-        System.exit(1);
+        System.exit(0);
     }
 
     static void usageError(String messageKey) {
@@ -1007,7 +1007,11 @@
                     return;
                 }
                 connectSpec = argv[++i];
-            } else if (token.equals("-help")) {
+            } else if (token.equals("-?") ||
+                       token.equals("-h") ||
+                       token.equals("--help") ||
+                       // -help: legacy.
+                       token.equals("-help")) {
                 usage();
             } else if (token.equals("-version")) {
                 Commands evaluator = new Commands();
--- a/src/jdk.jdi/share/classes/com/sun/tools/example/debug/tty/TTYResources.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/jdk.jdi/share/classes/com/sun/tools/example/debug/tty/TTYResources.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2011, 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
@@ -426,7 +426,7 @@
              "Usage: {0} <options> <class> <arguments>\n" +
              "\n" +
              "where options include:\n" +
-             "    -help             print out this message and exit\n" +
+             "    -? -h --help -help print this help message and exit\n" +
              "    -sourcepath <directories separated by \"{1}\">\n" +
              "                      directories in which to look for source files\n" +
              "    -attach <address>\n" +
--- a/src/jdk.jdi/share/classes/com/sun/tools/example/debug/tty/TTYResources_zh_CN.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/jdk.jdi/share/classes/com/sun/tools/example/debug/tty/TTYResources_zh_CN.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -239,7 +239,7 @@
         {"operation not yet supported", "\u5C1A\u4E0D\u652F\u6301\u8BE5\u64CD\u4F5C"},
         {"Owned by:", "  \u62E5\u6709\u8005: {0}, \u6761\u76EE\u8BA1\u6570: {1,number,integer}"},
         {"Owned monitor:", "  \u62E5\u6709\u7684\u76D1\u89C6\u5668: {0}"},
-        {"Parse exception:", "\u89E3\u6790\u5F02\u5E38\u9519\u8BEF: {0}"},
+        {"Parse exception:", "\u8BED\u6CD5\u5206\u6790\u5F02\u5E38\u9519\u8BEF: {0}"},
         {"printbreakpointcommandusage", "\u7528\u6CD5: {0} <class>:<line_number> \u6216\n       {1} <class>.<method_name>[(argument_type,...)]"},
         {"Removed:", "\u5DF2\u5220\u9664: {0}"},
         {"Requested stack frame is no longer active:", "\u8BF7\u6C42\u7684\u5806\u6808\u5E27\u4E0D\u518D\u6709\u6548: {0,number,integer}"},
--- a/src/jdk.jdi/share/classes/com/sun/tools/jdi/InvokableTypeImpl.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/jdk.jdi/share/classes/com/sun/tools/jdi/InvokableTypeImpl.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -77,9 +77,6 @@
      * a member of this type, if the size of the argument list
      * does not match the number of declared arguments for the method, or
      * if the method is not static or is a static initializer.
-     * @throws InvalidTypeException if any argument in the
-     * argument list is not assignable to the corresponding method argument
-     * type.
      * @throws ClassNotLoadedException if any argument type has not yet been loaded
      * through the appropriate class loader.
      * @throws IncompatibleThreadStateException if the specified thread has not
--- a/src/jdk.jlink/share/classes/jdk/tools/jimage/JImageTask.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/jdk.jlink/share/classes/jdk/tools/jimage/JImageTask.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -70,7 +70,7 @@
 
         new Option<JImageTask>(false, (task, option, arg) -> {
             task.options.help = true;
-        }, "--help", "-h"),
+        }, "--help", "-h", "-?"),
 
         new Option<JImageTask>(false, (task, option, arg) -> {
             task.options.verbose = true;
--- a/src/jdk.jlink/share/classes/jdk/tools/jimage/resources/jimage.properties	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/jdk.jlink/share/classes/jdk/tools/jimage/resources/jimage.properties	Tue Jan 30 16:41:40 2018 +0100
@@ -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,23 +60,23 @@
 warn.prefix=Warning:
 
 main.opt.dir=\
-\       --dir                        Target directory for extract directive
+\          --dir                        Target directory for extract directive
 
 main.opt.include=\
-\       --include <pattern-list>     Pattern list for filtering entries.
+\          --include <pattern-list>     Pattern list for filtering entries.
 
 main.opt.full-version=\
-\       --full-version               Print full version information
+\          --full-version               Print full version information
 
 main.opt.help=\
-\  -h,  --help                       Print usage message
+\  -?, -h, --help                       Print this help message
 
 main.opt.verbose=\
-\       --verbose                    Listing prints entry size and offset\n\
-\                                    attributes
+\          --verbose                    Listing prints entry size and offset\n\
+\                                       attributes
 
 main.opt.version=\
-\       --version                    Print version information
+\          --version                    Print version information
 
 main.command.files=\
 \       @<filename>                  Read options from file
--- a/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/JlinkTask.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/JlinkTask.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -88,7 +88,7 @@
     private static final Option<?>[] recognizedOptions = {
         new Option<JlinkTask>(false, (task, opt, arg) -> {
             task.options.help = true;
-        }, "--help", "-h"),
+        }, "--help", "-h", "-?"),
         new Option<JlinkTask>(true, (task, opt, arg) -> {
             // if used multiple times, the last one wins!
             // So, clear previous values, if any.
--- a/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/TaskHelper.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/TaskHelper.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -101,6 +101,7 @@
         final boolean hidden;
         final String name;
         final String shortname;
+        final String shortname2;
         final boolean terminalOption;
 
         public Option(boolean hasArg,
@@ -108,6 +109,7 @@
                       boolean hidden,
                       String name,
                       String shortname,
+                      String shortname2,
                       boolean isTerminal)
         {
             if (!name.startsWith("--")) {
@@ -122,19 +124,33 @@
             this.hidden = hidden;
             this.name = name;
             this.shortname = shortname;
+            this.shortname2 = shortname2;
             this.terminalOption = isTerminal;
         }
+        public Option(boolean hasArg,
+                      Processing<T> processing,
+                      boolean hidden,
+                      String name,
+                      String shortname,
+                      boolean isTerminal)
+        {
+            this(hasArg, processing, false, name, shortname, "", isTerminal);
+        }
 
         public Option(boolean hasArg, Processing<T> processing, String name, String shortname, boolean isTerminal) {
-            this(hasArg, processing, false, name, shortname, isTerminal);
+            this(hasArg, processing, false, name, shortname, "", isTerminal);
+        }
+
+        public Option(boolean hasArg, Processing<T> processing, String name, String shortname, String shortname2) {
+            this(hasArg, processing, false, name, shortname, shortname2, false);
         }
 
         public Option(boolean hasArg, Processing<T> processing, String name, String shortname) {
-            this(hasArg, processing, false, name, shortname, false);
+            this(hasArg, processing, false, name, shortname, "", false);
         }
 
         public Option(boolean hasArg, Processing<T> processing, boolean hidden, String name) {
-            this(hasArg, processing, hidden, name, "", false);
+            this(hasArg, processing, hidden, name, "", "", false);
         }
 
         public Option(boolean hasArg, Processing<T> processing, String name) {
@@ -152,6 +168,7 @@
         public boolean matches(String opt) {
             return opt.equals(name) ||
                    opt.equals(shortname) ||
+                   opt.equals(shortname2) ||
                    hasArg && opt.startsWith("--") && opt.startsWith(name + "=");
          }
 
--- a/src/jdk.jlink/share/classes/jdk/tools/jlink/resources/jlink.properties	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/jdk.jlink/share/classes/jdk/tools/jlink/resources/jlink.properties	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -32,7 +32,7 @@
 \Possible options include:
 
 main.opt.help=\
-\  -h, --help                            Print this help message
+\  -h, --help, -?                        Print this help message
 
 main.opt.version=\
 \      --version                         Version information
--- a/src/jdk.jlink/share/classes/jdk/tools/jlink/resources/jlink_ja.properties	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/jdk.jlink/share/classes/jdk/tools/jlink/resources/jlink_ja.properties	Tue Jan 30 16:41:40 2018 +0100
@@ -64,6 +64,9 @@
 error.prefix=\u30A8\u30E9\u30FC:
 warn.prefix=\u8B66\u544A:
 
+err.empty.module.path=\u7A7A\u306E\u30E2\u30B8\u30E5\u30FC\u30EB\u30FB\u30D1\u30B9
+err.jlink.version.mismatch=jlink\u30D0\u30FC\u30B8\u30E7\u30F3{0}.{1}\u304C\u30BF\u30FC\u30B2\u30C3\u30C8\u306Ejava.base\u30D0\u30FC\u30B8\u30E7\u30F3{2}.{3}\u3068\u4E00\u81F4\u3057\u307E\u305B\u3093
+err.automatic.module:jlink\u3067\u306F\u81EA\u52D5\u30E2\u30B8\u30E5\u30FC\u30EB\u306F\u4F7F\u7528\u3067\u304D\u307E\u305B\u3093: {1}\u304B\u3089\u306E{0}
 err.unknown.byte.order:\u4E0D\u660E\u306A\u30D0\u30A4\u30C8\u9806{0}
 err.launcher.main.class.empty:\u8D77\u52D5\u30C4\u30FC\u30EB\u306E\u30E1\u30A4\u30F3\u30FB\u30AF\u30E9\u30B9\u540D\u306F\u7A7A\u306B\u3067\u304D\u307E\u305B\u3093: {0}
 err.launcher.module.name.empty:\u8D77\u52D5\u30C4\u30FC\u30EB\u306E\u30E2\u30B8\u30E5\u30FC\u30EB\u540D\u306F\u7A7A\u306B\u3067\u304D\u307E\u305B\u3093: {0}
@@ -89,6 +92,8 @@
 err.config.defaults=\u30D7\u30ED\u30D1\u30C6\u30A3{0}\u304C\u69CB\u6210\u306B\u3042\u308A\u307E\u305B\u3093
 err.config.defaults.value=\u30C7\u30D5\u30A9\u30EB\u30C8\u30FB\u30D7\u30ED\u30D1\u30C6\u30A3\u306E\u5024\u304C\u9593\u9055\u3063\u3066\u3044\u307E\u3059: {0}
 err.bom.generation=bom\u30D5\u30A1\u30A4\u30EB\u306E\u751F\u6210\u306B\u5931\u6557\u3057\u307E\u3057\u305F: {0}
+err.not.a.module.directory=\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA{0}\u306B\u306F\u3001module-info.class\u30D5\u30A1\u30A4\u30EB\u304C\u542B\u307E\u308C\u307E\u305B\u3093
+err.cannot.read.module.info={0}\u304B\u3089\u30E2\u30B8\u30E5\u30FC\u30EB\u30FB\u30C7\u30A3\u30B9\u30AF\u30EA\u30D7\u30BF\u3092\u8AAD\u307F\u53D6\u308C\u307E\u305B\u3093
 err.not.modular.format=\u9078\u629E\u3057\u305F\u30E2\u30B8\u30E5\u30FC\u30EB{0} ({1})\u304Cjmod\u307E\u305F\u306F\u30E2\u30B8\u30E5\u30E9JAR\u5F62\u5F0F\u3067\u306F\u3042\u308A\u307E\u305B\u3093
 err.signing=\u7F72\u540D\u6E08\u30E2\u30B8\u30E5\u30E9JAR {0}\u306F\u73FE\u5728\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u306A\u3044\u305F\u3081\u3001\u30A8\u30E9\u30FC\u3092\u6291\u6B62\u3059\u308B\u306B\u306F--ignore-signing-information\u3092\u4F7F\u7528\u3057\u307E\u3059
 warn.signing=\u8B66\u544A: \u7F72\u540D\u6E08\u30E2\u30B8\u30E5\u30E9JAR {0}\u306F\u73FE\u5728\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093
--- a/src/jdk.jlink/share/classes/jdk/tools/jlink/resources/jlink_zh_CN.properties	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/jdk.jlink/share/classes/jdk/tools/jlink/resources/jlink_zh_CN.properties	Tue Jan 30 16:41:40 2018 +0100
@@ -64,6 +64,9 @@
 error.prefix=\u9519\u8BEF:
 warn.prefix=\u8B66\u544A:
 
+err.empty.module.path=\u7A7A\u6A21\u5757\u8DEF\u5F84
+err.jlink.version.mismatch=jlink \u7248\u672C {0}.{1} \u4E0E\u76EE\u6807 java.base \u7248\u672C {2}.{3} \u4E0D\u5339\u914D
+err.automatic.module:\u81EA\u52A8\u6A21\u5757\u4E0D\u80FD\u7528\u4E8E\u6765\u81EA {1} \u7684 jlink: {0}
 err.unknown.byte.order:\u672A\u77E5\u7684\u5B57\u8282\u987A\u5E8F {0}
 err.launcher.main.class.empty:\u542F\u52A8\u7A0B\u5E8F\u4E3B\u7C7B\u540D\u4E0D\u80FD\u4E3A\u7A7A: {0}
 err.launcher.module.name.empty:\u542F\u52A8\u7A0B\u5E8F\u6A21\u5757\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A: {0}
@@ -89,6 +92,8 @@
 err.config.defaults=\u914D\u7F6E\u4E2D\u7F3A\u5C11\u5C5E\u6027 {0}
 err.config.defaults.value=\u9ED8\u8BA4\u5C5E\u6027\u4E2D\u7684\u503C\u9519\u8BEF: {0}
 err.bom.generation=\u672A\u80FD\u751F\u6210 bom \u6587\u4EF6: {0}
+err.not.a.module.directory=\u76EE\u5F55 {0} \u4E0B\u4E0D\u5305\u542B module-info.class \u6587\u4EF6
+err.cannot.read.module.info=\u65E0\u6CD5\u4ECE {0} \u8BFB\u53D6\u6A21\u5757\u63CF\u8FF0\u7B26
 err.not.modular.format=\u9009\u5B9A\u6A21\u5757 {0} ({1}) \u672A\u4F7F\u7528 jmod \u6216\u6A21\u5757\u5316 JAR \u683C\u5F0F
 err.signing=\u5F53\u524D\u4E0D\u652F\u6301\u5DF2\u7B7E\u540D\u6A21\u5757\u5316 JAR {0}, \u4F7F\u7528 --ignore-signing-information \u53EF\u9690\u85CF\u9519\u8BEF
 warn.signing=\u8B66\u544A: \u5F53\u524D\u4E0D\u652F\u6301\u5DF2\u7B7E\u540D\u6A21\u5757\u5316 JAR {0}
--- a/src/jdk.jlink/share/classes/jdk/tools/jmod/JmodTask.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/jdk.jlink/share/classes/jdk/tools/jmod/JmodTask.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -1309,7 +1309,7 @@
                         .withValuesConvertedBy(new PatternConverter());
 
         OptionSpec<Void> help
-                = parser.acceptsAll(Set.of("h", "help"), getMessage("main.opt.help"))
+                = parser.acceptsAll(Set.of("h", "help", "?"), getMessage("main.opt.help"))
                         .forHelp();
 
         OptionSpec<Void> helpExtra
--- a/src/jdk.jlink/share/classes/jdk/tools/jmod/resources/jmod.properties	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/jdk.jlink/share/classes/jdk/tools/jmod/resources/jmod.properties	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -46,7 +46,7 @@
 main.opt.mode.hash=\
 \hash      - Records hashes of tied modules.
 
-main.opt.help=Print this usage message
+main.opt.help=Print this help message
 main.opt.help-extra=Print help on extra options
 main.opt.version=Version information
 main.opt.class-path=Application jar files|dir containing classes
--- a/src/jdk.jshell/share/classes/jdk/internal/jshell/tool/JShellTool.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/jdk.jshell/share/classes/jdk/internal/jshell/tool/JShellTool.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -515,7 +515,7 @@
         private final OptionSpecBuilder argV = parser.accepts("v");
         private final OptionSpec<String> argR = parser.accepts("R").withRequiredArg();
         private final OptionSpec<String> argC = parser.accepts("C").withRequiredArg();
-        private final OptionSpecBuilder argHelp = parser.acceptsAll(asList("h", "help"));
+        private final OptionSpecBuilder argHelp = parser.acceptsAll(asList("?", "h", "help"));
         private final OptionSpecBuilder argVersion = parser.accepts("version");
         private final OptionSpecBuilder argFullVersion = parser.accepts("full-version");
         private final OptionSpecBuilder argShowVersion = parser.accepts("show-version");
--- a/src/jdk.jshell/share/classes/jdk/internal/jshell/tool/resources/l10n.properties	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/jdk.jshell/share/classes/jdk/internal/jshell/tool/resources/l10n.properties	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -216,7 +216,7 @@
 \                            Use one -C for each compiler flag or flag argument\n\
 \    --version             Print version information and exit\n\
 \    --show-version        Print version information and continue\n\
-\    --help                Print this synopsis of standard options and exit\n\
+\    --help, -?, -h        Print this synopsis of standard options and exit\n\
 \    --help-extra, -X      Print help on non-standard options and exit\n\
 \n\
 A file argument may be a file name, or one of the predefined file names: DEFAULT,\n\
--- a/src/jdk.jshell/share/classes/jdk/internal/jshell/tool/resources/l10n_ja.properties	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/jdk.jshell/share/classes/jdk/internal/jshell/tool/resources/l10n_ja.properties	Tue Jan 30 16:41:40 2018 +0100
@@ -31,7 +31,8 @@
 jshell.err.opt.feedback.one = \u30D5\u30A3\u30FC\u30C9\u30D0\u30C3\u30AF\u30FB\u30AA\u30D7\u30B7\u30E7\u30F3(--feedback\u3001-q\u3001-s\u307E\u305F\u306F-v)\u306F1\u3064\u306E\u307F\u4F7F\u7528\u3067\u304D\u307E\u3059\u3002
 jshell.err.opt.unknown = \u4E0D\u660E\u306A\u30AA\u30D7\u30B7\u30E7\u30F3: {0}
 
-jshell.msg.terminated =\u72B6\u614B\u30A8\u30F3\u30B8\u30F3\u304C\u7D42\u4E86\u3057\u307E\u3057\u305F\u3002\n\u6B21\u3092\u6307\u5B9A\u3057\u3066\u5B9A\u7FA9\u3092\u5FA9\u5143\u3057\u3066\u304F\u3060\u3055\u3044: /reload -restore
+jshell.msg.terminated = \u72B6\u614B\u30A8\u30F3\u30B8\u30F3\u304C\u7D42\u4E86\u3057\u307E\u3057\u305F\u3002
+jshell.msg.terminated.restore = \u6B21\u3092\u6307\u5B9A\u3057\u3066\u5B9A\u7FA9\u3092\u5FA9\u5143\u3057\u3066\u304F\u3060\u3055\u3044: /reload -restore
 
 jshell.msg.use.one.of = \u6B21\u306E\u3044\u305A\u308C\u304B\u3092\u4F7F\u7528\u3057\u307E\u3059: {0}
 jshell.msg.see.classes.etc = /types\u3001/methods\u3001/vars\u307E\u305F\u306F/list\u3092\u53C2\u7167\u3057\u3066\u304F\u3060\u3055\u3044
@@ -46,7 +47,7 @@
 jshell.err.startup.unexpected.exception = \u8D77\u52D5\u306E\u8AAD\u53D6\u308A\u4E2D\u306B\u4E88\u671F\u3057\u306A\u3044\u4F8B\u5916\u304C\u767A\u751F\u3057\u307E\u3057\u305F: {0}
 jshell.err.unexpected.exception = \u4E88\u671F\u3057\u306A\u3044\u4F8B\u5916: {0}
 
-jshell.err.no.such.command.or.snippet.id = \u6307\u5B9A\u3055\u308C\u305F\u30B3\u30DE\u30F3\u30C9\u307E\u305F\u306F\u30B9\u30CB\u30DA\u30C3\u30C8ID\u306F\u5B58\u5728\u3057\u307E\u305B\u3093: {0}
+jshell.err.invalid.command = \u7121\u52B9\u306A\u30B3\u30DE\u30F3\u30C9: {0}
 jshell.err.command.ambiguous = \u30B3\u30DE\u30F3\u30C9: ''{0}''\u306F\u3042\u3044\u307E\u3044\u3067\u3059: {1}
 jshell.msg.set.restore = \u65B0\u3057\u3044\u30AA\u30D7\u30B7\u30E7\u30F3\u306E\u8A2D\u5B9A\u3068\u72B6\u614B\u306E\u5FA9\u5143\u3002
 jshell.msg.set.editor.set = \u30A8\u30C7\u30A3\u30BF\u306F\u6B21\u306B\u8A2D\u5B9A\u3055\u308C\u3066\u3044\u307E\u3059: {0}
@@ -91,12 +92,20 @@
 jshell.msg.help.begin =Java\u8A00\u8A9E\u306E\u5F0F\u3001\u6587\u307E\u305F\u306F\u5BA3\u8A00\u3092\u5165\u529B\u3057\u307E\u3059\u3002\n\u307E\u305F\u306F\u3001\u6B21\u306E\u30B3\u30DE\u30F3\u30C9\u306E\u3044\u305A\u308C\u304B\u3092\u5165\u529B\u3057\u307E\u3059:\n
 jshell.msg.help.subject =\n\u8A73\u7D30\u306F\u3001''/help''\u306E\u5F8C\u306B\u30B3\u30DE\u30F3\u30C9\u307E\u305F\u306F\u30B5\u30D6\u30B8\u30A7\u30AF\u30C8\u306E\u540D\u524D\u3092\u7D9A\u3051\u3066\n\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044\u3002\n\u305F\u3068\u3048\u3070\u3001''/help /list''\u307E\u305F\u306F''/help intro''\u306A\u3069\u3067\u3059\u3002\u30B5\u30D6\u30B8\u30A7\u30AF\u30C8:\n\n
 
+jshell.err.no.snippet.with.id = ID: {0}\u306E\u30B9\u30CB\u30DA\u30C3\u30C8\u306F\u5B58\u5728\u3057\u307E\u305B\u3093
+jshell.err.end.snippet.range.less.than.start = \u30B9\u30CB\u30DA\u30C3\u30C8\u306E\u7BC4\u56F2\u306E\u7D42\u4E86\u70B9\u304C\u958B\u59CB\u70B9\u3088\u308A\u5C0F\u3055\u304F\u306A\u3063\u3066\u3044\u307E\u3059: {0} - {1}
+jshell.err.range.requires.id = \u30B9\u30CB\u30DA\u30C3\u30C8\u306E\u7BC4\u56F2\u306B\u306F\u30B9\u30CB\u30DA\u30C3\u30C8ID\u304C\u5FC5\u8981\u3067\u3059: {0}
+
+jshell.err.exit.not.expression = /exit\u306E\u5F15\u6570\u306F\u3001\u6709\u52B9\u306A\u6574\u6570\u5F0F\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002\u3053\u308C\u306F\u5F0F\u3067\u306F\u3042\u308A\u307E\u305B\u3093: {0}
+jshell.err.exit.bad.type = /exit\u306E\u5F15\u6570\u306F\u3001\u6709\u52B9\u306A\u6574\u6570\u5F0F\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002\u30BF\u30A4\u30D7\u306F{1}\u3067\u3059: {0}
+jshell.err.exit.bad.value = /exit\u306E\u5F15\u6570\u306B\u4E0D\u6B63\u306A\u5024\u306E{1}\u304C\u3042\u308A\u307E\u3059: {0}
+
 jshell.err.drop.arg =/drop\u5F15\u6570\u306B\u306F\u3001\u524A\u9664\u3059\u308B\u30A4\u30F3\u30DD\u30FC\u30C8\u3001\u5909\u6570\u3001\u30E1\u30BD\u30C3\u30C9\u307E\u305F\u306F\u30AF\u30E9\u30B9\u3092\u6307\u5B9A\u3057\u3066\u304F\u3060\u3055\u3044\u3002\nID\u307E\u305F\u306F\u540D\u524D\u3067\u6307\u5B9A\u3057\u307E\u3059\u3002ID\u3092\u53C2\u7167\u3059\u308B\u306B\u306F/list\u3092\u4F7F\u7528\u3057\u307E\u3059\u3002\u3059\u3079\u3066\u306E\u72B6\u614B\u3092\u30EA\u30BB\u30C3\u30C8\u3059\u308B\u306B\u306F/reset\u3092\u4F7F\u7528\u3057\u307E\u3059\u3002
-jshell.err.drop.ambiguous = \u5F15\u6570\u304C\u3001\u8907\u6570\u306E\u30A4\u30F3\u30DD\u30FC\u30C8\u3001\u5909\u6570\u3001\u30E1\u30BD\u30C3\u30C9\u307E\u305F\u306F\u30AF\u30E9\u30B9\u3092\u53C2\u7167\u3057\u3066\u3044\u307E\u3059\u3002
 jshell.err.failed = \u5931\u6557\u3057\u307E\u3057\u305F\u3002
 jshell.msg.native.method = Native\u30E1\u30BD\u30C3\u30C9
 jshell.msg.unknown.source = \u4E0D\u660E\u306A\u30BD\u30FC\u30B9
 jshell.msg.goodbye = \u7D42\u4E86\u3057\u307E\u3059
+jshell.msg.goodbye.value = \u7D42\u4E86\u3057\u307E\u3059({0})
 
 jshell.msg.help.for.help = \u30D8\u30EB\u30D7\u3092\u53C2\u7167\u3059\u308B\u306B\u306F\u3001/help\u3068\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044\u3002
 
@@ -153,29 +162,36 @@
 jshell.console.do.nothing = \u4F55\u3082\u3057\u306A\u3044
 jshell.console.choice = \u9078\u629E: 
 jshell.console.create.variable = \u5909\u6570\u306E\u4F5C\u6210
+jshell.console.create.method = \u30E1\u30BD\u30C3\u30C9\u306E\u4F5C\u6210
 jshell.console.resolvable = \n\u8B58\u5225\u5B50\u306F\u3053\u306E\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u3067\u89E3\u6C7A\u3067\u304D\u307E\u3059\u3002
 jshell.console.no.candidate = \n\u30A4\u30F3\u30DD\u30FC\u30C8\u3059\u308B\u5019\u88DC\u306E\u5B8C\u5168\u4FEE\u98FE\u3055\u308C\u305F\u540D\u524D\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3002
 jshell.console.incomplete = \n\u7D50\u679C\u304C\u4E0D\u5B8C\u5168\u3067\u3042\u308B\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059\u3002\u7D50\u679C\u3092\u5B8C\u5168\u306B\u3059\u308B\u306B\u306F\u3001\u5F8C\u3067\u518D\u8A66\u884C\u3057\u3066\u304F\u3060\u3055\u3044\u3002
-
+jshell.console.erroneous = \n\u4E0D\u5B8C\u5168\u307E\u305F\u306F\u30A8\u30E9\u30FC\u3002\u5358\u4E00\u306E\u6709\u52B9\u306A\u5F0F\u307E\u305F\u306F\u6587\u3067[Shift]-[Tab] m\u3092\u7D9A\u884C\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
+jshell.console.exprstmt = \n\u5358\u4E00\u306E\u6709\u52B9\u306A\u5F0F\u307E\u305F\u306F\u6587\u3067[Shift]-[Tab] m\u3092\u7D9A\u884C\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
+jshell.console.empty = \n\u7A7A\u306E\u30A8\u30F3\u30C8\u30EA\u3002\u5358\u4E00\u306E\u6709\u52B9\u306A\u5F0F\u307E\u305F\u306F\u6587\u3067[Shift]-[Tab] m\u3092\u7D9A\u884C\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
 
-help.usage = \u4F7F\u7528\u65B9\u6CD5:   jshell <options> <load files>\n\u4F7F\u7528\u53EF\u80FD\u306A\u30AA\u30D7\u30B7\u30E7\u30F3\u306B\u306F\u6B21\u306E\u3082\u306E\u304C\u3042\u308A\u307E\u3059:\n    --class-path <path>   \u30E6\u30FC\u30B6\u30FC\u30FB\u30AF\u30E9\u30B9\u30FB\u30D5\u30A1\u30A4\u30EB\u306E\u3042\u308B\u5834\u6240\u3092\u6307\u5B9A\u3057\u307E\u3059\n    --module-path <path>  \u30A2\u30D7\u30EA\u30B1\u30FC\u30B7\u30E7\u30F3\u30FB\u30E2\u30B8\u30E5\u30FC\u30EB\u306E\u3042\u308B\u5834\u6240\u3092\u6307\u5B9A\u3057\u307E\u3059\n    --add-modules <module>(,<module>)*\n                          \u89E3\u6C7A\u3059\u308B\u30E2\u30B8\u30E5\u30FC\u30EB\u3001\u307E\u305F\u306F<module>\u304CALL-MODULE-PATH\n                           \u3067\u3042\u308B\u5834\u5408\u306F\u30E2\u30B8\u30E5\u30FC\u30EB\u30FB\u30D1\u30B9\u306E\u3059\u3079\u3066\u306E\u30E2\u30B8\u30E5\u30FC\u30EB\u3092\u6307\u5B9A\u3057\u307E\u3059\n    --startup <file>      \u8D77\u52D5\u5B9A\u7FA9\u306E\u4EE3\u66FF\u3068\u3057\u3066\u5B9F\u884C\u3055\u308C\u307E\u3059\n    --no-startup          \u8D77\u52D5\u5B9A\u7FA9\u3092\u5B9F\u884C\u3057\u307E\u305B\u3093\n    --feedback <mode>     \u521D\u671F\u30D5\u30A3\u30FC\u30C9\u30D0\u30C3\u30AF\u30FB\u30E2\u30FC\u30C9\u3092\u6307\u5B9A\u3057\u307E\u3059\u3002\u30E2\u30FC\u30C9\u306F\n                           \u4E8B\u524D\u306B\u5B9A\u7FA9\u3055\u308C\u3066\u3044\u308B(silent\u3001concise\u3001normal\u307E\u305F\u306Fverbose)\u304B\u3001\n                           \u4E8B\u524D\u306B\u30E6\u30FC\u30B6\u30FC\u304C\u5B9A\u7FA9\u3067\u304D\u307E\u3059\n    -q                    \u7C21\u6F54\u306A\u30D5\u30A3\u30FC\u30C9\u30D0\u30C3\u30AF\u3002--feedback concise\u3068\u540C\u3058\n    -s                    \u975E\u5E38\u306B\u7C21\u6F54\u306A\u30D5\u30A3\u30FC\u30C9\u30D0\u30C3\u30AF\u3002--feedback silent\u3068\u540C\u3058\n    -v                    \u8A73\u7D30\u306A\u30D5\u30A3\u30FC\u30C9\u30D0\u30C3\u30AF\u3002--feedback verbose\u3068\u540C\u3058\n    -J<flag>              <flag>\u3092\u5B9F\u884C\u6642\u30B7\u30B9\u30C6\u30E0\u306B\u76F4\u63A5\u6E21\u3057\u307E\u3059\u3002\n                            \u5B9F\u884C\u6642\u30D5\u30E9\u30B0\u307E\u305F\u306F\u30D5\u30E9\u30B0\u5F15\u6570\u3054\u3068\u306B1\u3064\u306E-J\u3092\u4F7F\u7528\u3057\u307E\u3059\n    -R<flag>              <flag>\u3092\u30EA\u30E2\u30FC\u30C8\u5B9F\u884C\u6642\u30B7\u30B9\u30C6\u30E0\u306B\u6E21\u3057\u307E\u3059\u3002\n                            \u30EA\u30E2\u30FC\u30C8\u30FB\u30D5\u30E9\u30B0\u307E\u305F\u306F\u30D5\u30E9\u30B0\u5F15\u6570\u3054\u3068\u306B1\u3064\u306E-R\u3092\u4F7F\u7528\u3057\u307E\u3059\n    -C<flag>              <flag>\u3092\u30B3\u30F3\u30D1\u30A4\u30E9\u306B\u6E21\u3057\u307E\u3059\u3002\n                            \u30B3\u30F3\u30D1\u30A4\u30E9\u30FB\u30D5\u30E9\u30B0\u307E\u305F\u306F\u30D5\u30E9\u30B0\u5F15\u6570\u3054\u3068\u306B1\u3064\u306E-C\u3092\u4F7F\u7528\u3057\u307E\u3059\n    --version             \u30D0\u30FC\u30B8\u30E7\u30F3\u60C5\u5831\u3092\u51FA\u529B\u3057\u7D42\u4E86\u3057\u307E\u3059\n    --show-version        \u30D0\u30FC\u30B8\u30E7\u30F3\u60C5\u5831\u3092\u51FA\u529B\u3057\u7D9A\u884C\u3057\u307E\u3059\n    --help                \u6A19\u6E96\u30AA\u30D7\u30B7\u30E7\u30F3\u306E\u3053\u306E\u6982\u8981\u3092\u51FA\u529B\u3057\u7D42\u4E86\u3057\u307E\u3059\n    --help-extra, -X      \u975E\u6A19\u6E96\u30AA\u30D7\u30B7\u30E7\u30F3\u306E\u30D8\u30EB\u30D7\u3092\u51FA\u529B\u3057\u7D42\u4E86\u3057\u307E\u3059\n
+jshell.fix.wrong.shortcut =[Shift]-[Tab]\u306E\u5F8C\u306E\u6587\u5B57\u304C\u4E88\u671F\u3057\u306A\u3044\u6587\u5B57\u3067\u3059\u3002\n\u81EA\u52D5\u30A4\u30F3\u30DD\u30FC\u30C8\u306B\u306F"i"\u3001\u5909\u6570\u306E\u4F5C\u6210\u306B\u306F"v"\u3001\u30E1\u30BD\u30C3\u30C9\u306E\u4F5C\u6210\u306B\u306F"m"\u3092\u4F7F\u7528\u3057\u3066\u304F\u3060\u3055\u3044\u3002\n\u8A73\u7D30\u306F\u6B21\u3092\u53C2\u7167\u3057\u3066\u304F\u3060\u3055\u3044:\n/help shortcuts
+
+help.usage = \u4F7F\u7528\u65B9\u6CD5:   jshell <option>... <load file>...\n\u4F7F\u7528\u53EF\u80FD\u306A\u30AA\u30D7\u30B7\u30E7\u30F3\u306B\u306F\u6B21\u306E\u3082\u306E\u304C\u3042\u308A\u307E\u3059:\n    --class-path <path>   \u30E6\u30FC\u30B6\u30FC\u30FB\u30AF\u30E9\u30B9\u30FB\u30D5\u30A1\u30A4\u30EB\u306E\u3042\u308B\u5834\u6240\u3092\u6307\u5B9A\u3057\u307E\u3059\n    --module-path <path>  \u30A2\u30D7\u30EA\u30B1\u30FC\u30B7\u30E7\u30F3\u30FB\u30E2\u30B8\u30E5\u30FC\u30EB\u306E\u3042\u308B\u5834\u6240\u3092\u6307\u5B9A\u3057\u307E\u3059\n    --add-modules <module>(,<module>)*\n                          \u89E3\u6C7A\u3059\u308B\u30E2\u30B8\u30E5\u30FC\u30EB\u3001\u307E\u305F\u306F<module>\u304CALL-MODULE-PATH\n                            \u3067\u3042\u308B\u5834\u5408\u306F\u30E2\u30B8\u30E5\u30FC\u30EB\u30FB\u30D1\u30B9\u306E\u3059\u3079\u3066\u306E\u30E2\u30B8\u30E5\u30FC\u30EB\u3092\u6307\u5B9A\u3057\u307E\u3059\n    --startup <file>      \u8D77\u52D5\u5B9A\u7FA9\u306E\u4EE3\u66FF\u3068\u3057\u3066\u5B9F\u884C\u3055\u308C\u307E\u3059\n    --no-startup          \u8D77\u52D5\u5B9A\u7FA9\u3092\u5B9F\u884C\u3057\u307E\u305B\u3093\n    --feedback <mode>     \u521D\u671F\u30D5\u30A3\u30FC\u30C9\u30D0\u30C3\u30AF\u30FB\u30E2\u30FC\u30C9\u3092\u6307\u5B9A\u3057\u307E\u3059\u3002\u30E2\u30FC\u30C9\u306F\n                            \u4E8B\u524D\u306B\u5B9A\u7FA9\u3055\u308C\u3066\u3044\u308B(silent\u3001concise\u3001normal\u307E\u305F\u306Fverbose)\u304B\u3001\n                            \u4E8B\u524D\u306B\u30E6\u30FC\u30B6\u30FC\u304C\u5B9A\u7FA9\u3067\u304D\u307E\u3059\n    -q                    \u7C21\u6F54\u306A\u30D5\u30A3\u30FC\u30C9\u30D0\u30C3\u30AF\u3002--feedback concise\u3068\u540C\u3058\n    -s                    \u975E\u5E38\u306B\u7C21\u6F54\u306A\u30D5\u30A3\u30FC\u30C9\u30D0\u30C3\u30AF\u3002--feedback silent\u3068\u540C\u3058\n    -v                    \u8A73\u7D30\u306A\u30D5\u30A3\u30FC\u30C9\u30D0\u30C3\u30AF\u3002--feedback verbose\u3068\u540C\u3058\n    -J<flag>              <flag>\u3092\u5B9F\u884C\u6642\u30B7\u30B9\u30C6\u30E0\u306B\u76F4\u63A5\u6E21\u3057\u307E\u3059\u3002\n                            \u5B9F\u884C\u6642\u30D5\u30E9\u30B0\u307E\u305F\u306F\u30D5\u30E9\u30B0\u5F15\u6570\u3054\u3068\u306B1\u3064\u306E-J\u3092\u4F7F\u7528\u3057\u307E\u3059\n    -R<flag>              <flag>\u3092\u30EA\u30E2\u30FC\u30C8\u5B9F\u884C\u6642\u30B7\u30B9\u30C6\u30E0\u306B\u6E21\u3057\u307E\u3059\u3002\n                            \u30EA\u30E2\u30FC\u30C8\u30FB\u30D5\u30E9\u30B0\u307E\u305F\u306F\u30D5\u30E9\u30B0\u5F15\u6570\u3054\u3068\u306B1\u3064\u306E-R\u3092\u4F7F\u7528\u3057\u307E\u3059\n    -C<flag>              <flag>\u3092\u30B3\u30F3\u30D1\u30A4\u30E9\u306B\u6E21\u3057\u307E\u3059\u3002\n                            \u30B3\u30F3\u30D1\u30A4\u30E9\u30FB\u30D5\u30E9\u30B0\u307E\u305F\u306F\u30D5\u30E9\u30B0\u5F15\u6570\u3054\u3068\u306B1\u3064\u306E-C\u3092\u4F7F\u7528\u3057\u307E\u3059\n    --version             \u30D0\u30FC\u30B8\u30E7\u30F3\u60C5\u5831\u3092\u51FA\u529B\u3057\u7D42\u4E86\u3057\u307E\u3059\n    --show-version        \u30D0\u30FC\u30B8\u30E7\u30F3\u60C5\u5831\u3092\u51FA\u529B\u3057\u7D9A\u884C\u3057\u307E\u3059\n    --help                \u6A19\u6E96\u30AA\u30D7\u30B7\u30E7\u30F3\u306E\u3053\u306E\u6982\u8981\u3092\u51FA\u529B\u3057\u7D42\u4E86\u3057\u307E\u3059\n    --help-extra, -X      \
+\u975E\u6A19\u6E96\u30AA\u30D7\u30B7\u30E7\u30F3\u306E\u30D8\u30EB\u30D7\u3092\u51FA\u529B\u3057\u7D42\u4E86\u3057\u307E\u3059\n\u30D5\u30A1\u30A4\u30EB\u5F15\u6570\u306B\u306F\u3001\u30D5\u30A1\u30A4\u30EB\u540D\u304B\u3001\u307E\u305F\u306F\u4E8B\u524D\u5B9A\u7FA9\u3055\u308C\u305F\u30D5\u30A1\u30A4\u30EB\u540D(DEFAULT\u3001\nPRINTING\u307E\u305F\u306FJAVASE)\u306E1\u3064\u3092\u6307\u5B9A\u3067\u304D\u307E\u3059\u3002\n\u30ED\u30FC\u30C9\u30FB\u30D5\u30A1\u30A4\u30EB\u3067\u3082\u3001\u5BFE\u8A71\u578BI/O\u3092\u4F7F\u7528\u305B\u305A\u306B\u3001"-"\u3092\u6307\u5B9A\u3057\u3066\u6A19\u6E96\u5165\u529B\u3092\u793A\u3059\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002\n
+
 help.usage.x = \    --add-exports <module>/<package>   \u6307\u5B9A\u3057\u305F\u30E2\u30B8\u30E5\u30FC\u30EB\u56FA\u6709\u30D1\u30C3\u30B1\u30FC\u30B8\u3092\u30B9\u30CB\u30DA\u30C3\u30C8\u306B\u30A8\u30AF\u30B9\u30DD\u30FC\u30C8\u3057\u307E\u3059\n    --execution <spec>                 \u4EE3\u66FF\u5B9F\u884C\u30A8\u30F3\u30B8\u30F3\u3092\u6307\u5B9A\u3057\u307E\u3059\u3002\n                                         \u3053\u3053\u3067\u3001<spec>\u306FExecutionControl spec\u3067\u3059\u3002\n                                         spec\u306E\u69CB\u6587\u306B\u3064\u3044\u3066\u306F\u3001\u30D1\u30C3\u30B1\u30FC\u30B8jdk.jshell.spi\u306E\n                                         \u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u3092\u53C2\u7167\u3057\u3066\u304F\u3060\u3055\u3044\u3002\n    \n\u3053\u308C\u3089\u306F\u975E\u6A19\u6E96\u30AA\u30D7\u30B7\u30E7\u30F3\u3067\u3042\u308A\u4E88\u544A\u306A\u3057\u306B\u5909\u66F4\u3055\u308C\u308B\u3053\u3068\u304C\u3042\u308A\u307E\u3059\u3002\n
 
 help.list.summary = \u5165\u529B\u3057\u305F\u30BD\u30FC\u30B9\u3092\u30EA\u30B9\u30C8\u3057\u307E\u3059
 help.list.args = [<name or id>|-all|-start]
-help.list =\u30B9\u30CB\u30DA\u30C3\u30C8ID\u304C\u4ED8\u304F\u30B9\u30CB\u30DA\u30C3\u30C8\u306E\u30BD\u30FC\u30B9\u3092\u8868\u793A\u3057\u307E\u3059\u3002\n\n/list\n\t\u5165\u529B\u3057\u305F\u3001\u307E\u305F\u306F/open\u3067\u8AAD\u307F\u53D6\u3063\u305F\u30B3\u30FC\u30C9\u306E\u73FE\u5728\u30A2\u30AF\u30C6\u30A3\u30D6\u306A\u30B9\u30CB\u30DA\u30C3\u30C8\u3092\u30EA\u30B9\u30C8\u3057\u307E\u3059\n\n/list -start\n\t\u81EA\u52D5\u7684\u306B\u8A55\u4FA1\u3055\u308C\u305F\u8D77\u52D5\u30B9\u30CB\u30DA\u30C3\u30C8\u3092\u30EA\u30B9\u30C8\u3057\u307E\u3059\n\n/list -all\n\t\u5931\u6557\u3001\u30AA\u30FC\u30D0\u30FC\u30E9\u30A4\u30C9\u6E08\u3001\u524A\u9664\u6E08\u304A\u3088\u3073\u8D77\u52D5\u3092\u542B\u3080\u3059\u3079\u3066\u306E\u30B9\u30CB\u30DA\u30C3\u30C8\u3092\u30EA\u30B9\u30C8\u3057\u307E\u3059\n\n/list <name>\n\t\u6307\u5B9A\u3057\u305F\u540D\u524D\u306E\u30B9\u30CB\u30DA\u30C3\u30C8\u3092\u30EA\u30B9\u30C8\u3057\u307E\u3059(\u30A2\u30AF\u30C6\u30A3\u30D6\u306A\u30B9\u30CB\u30DA\u30C3\u30C8\u306E\u30D7\u30EA\u30D5\u30A1\u30EC\u30F3\u30B9)\n\n/list <id>\n\t\u6307\u5B9A\u3057\u305F\u30B9\u30CB\u30DA\u30C3\u30C8ID\u306E\u30B9\u30CB\u30DA\u30C3\u30C8\u3092\u30EA\u30B9\u30C8\u3057\u307E\u3059
+help.list =\u30B9\u30CB\u30DA\u30C3\u30C8ID\u304C\u4ED8\u304F\u30B9\u30CB\u30DA\u30C3\u30C8\u306E\u30BD\u30FC\u30B9\u3092\u8868\u793A\u3057\u307E\u3059\u3002\n\n/list\n\t\u5165\u529B\u3057\u305F\u3001\u307E\u305F\u306F/open\u3067\u8AAD\u307F\u53D6\u3063\u305F\u30B3\u30FC\u30C9\u306E\u73FE\u5728\u30A2\u30AF\u30C6\u30A3\u30D6\u306A\u30B9\u30CB\u30DA\u30C3\u30C8\u3092\u30EA\u30B9\u30C8\u3057\u307E\u3059\n\n/list -start\n\t\u81EA\u52D5\u7684\u306B\u8A55\u4FA1\u3055\u308C\u305F\u8D77\u52D5\u30B9\u30CB\u30DA\u30C3\u30C8\u3092\u30EA\u30B9\u30C8\u3057\u307E\u3059\n\n/list -all\n\t\u5931\u6557\u3001\u30AA\u30FC\u30D0\u30FC\u30E9\u30A4\u30C9\u6E08\u3001\u524A\u9664\u6E08\u304A\u3088\u3073\u8D77\u52D5\u3092\u542B\u3080\u3059\u3079\u3066\u306E\u30B9\u30CB\u30DA\u30C3\u30C8\u3092\u30EA\u30B9\u30C8\u3057\u307E\u3059\n\n/list <name>\n\t\u6307\u5B9A\u3057\u305F\u540D\u524D\u306E\u30B9\u30CB\u30DA\u30C3\u30C8\u3092\u30EA\u30B9\u30C8\u3057\u307E\u3059(\u30A2\u30AF\u30C6\u30A3\u30D6\u306A\u30B9\u30CB\u30DA\u30C3\u30C8\u306E\u30D7\u30EA\u30D5\u30A1\u30EC\u30F3\u30B9)\n\n/list <id>\n\t\u6307\u5B9A\u3057\u305F\u30B9\u30CB\u30DA\u30C3\u30C8ID\u306E\u30B9\u30CB\u30DA\u30C3\u30C8\u3092\u30EA\u30B9\u30C8\u3057\u307E\u3059\n\n/list <id> <id>...\n\t\u6307\u5B9A\u3057\u305F\u8907\u6570\u306E\u30B9\u30CB\u30DA\u30C3\u30C8ID\u306E\u30B9\u30CB\u30DA\u30C3\u30C8\u3092\u30EA\u30B9\u30C8\u3057\u307E\u3059\n\n/list <id>-<id>\n\t\u30B9\u30CB\u30DA\u30C3\u30C8ID\u306E\u7BC4\u56F2\u5185\u306E\u30B9\u30CB\u30DA\u30C3\u30C8\u3092\u30EA\u30B9\u30C8\u3057\u307E\u3059
 
 help.edit.summary = \u540D\u524D\u307E\u305F\u306FID\u3067\u53C2\u7167\u3055\u308C\u308B\u30BD\u30FC\u30B9\u30FB\u30A8\u30F3\u30C8\u30EA\u3092\u7DE8\u96C6\u3057\u307E\u3059
 help.edit.args = <name or id>
-help.edit =\u5916\u90E8\u30A8\u30C7\u30A3\u30BF\u3067\u30B9\u30CB\u30DA\u30C3\u30C8\u307E\u305F\u306F\u30BD\u30FC\u30B9\u306E\u30B9\u30CB\u30DA\u30C3\u30C8\u3092\u7DE8\u96C6\u3057\u307E\u3059\u3002\n\u4F7F\u7528\u3059\u308B\u30A8\u30C7\u30A3\u30BF\u306F/set editor\u3067\u8A2D\u5B9A\u3055\u308C\u307E\u3059\u3002\n\u30A8\u30C7\u30A3\u30BF\u304C\u8A2D\u5B9A\u3055\u308C\u3066\u3044\u306A\u3044\u5834\u5408\u3001\u7C21\u6613\u30A8\u30C7\u30A3\u30BF\u304C\u8D77\u52D5\u3055\u308C\u307E\u3059\u3002\n\n/edit <name>\n\t\u6307\u5B9A\u3057\u305F\u540D\u524D\u306E\u30B9\u30CB\u30DA\u30C3\u30C8\u3092\u7DE8\u96C6\u3057\u307E\u3059(\u30A2\u30AF\u30C6\u30A3\u30D6\u306A\u30B9\u30CB\u30DA\u30C3\u30C8\u306E\u30D7\u30EA\u30D5\u30A1\u30EC\u30F3\u30B9)\n\n/edit <id>\n\t\u6307\u5B9A\u3057\u305F\u30B9\u30CB\u30DA\u30C3\u30C8ID\u306E\u30B9\u30CB\u30DA\u30C3\u30C8\u3092\u7DE8\u96C6\u3057\u307E\u3059\n\n/edit\n\t\u5165\u529B\u3057\u305F\u3001\u307E\u305F\u306F/open\u3067\u8AAD\u307F\u53D6\u3089\u308C\u305F\u30B3\u30FC\u30C9\u306E\u73FE\u5728\u30A2\u30AF\u30C6\u30A3\u30D6\u306A\u30B9\u30CB\u30DA\u30C3\u30C8\u3092\u7DE8\u96C6\u3057\u307E\u3059
+help.edit =\u5916\u90E8\u30A8\u30C7\u30A3\u30BF\u3067\u30B9\u30CB\u30DA\u30C3\u30C8\u307E\u305F\u306F\u30BD\u30FC\u30B9\u306E\u30B9\u30CB\u30DA\u30C3\u30C8\u3092\u7DE8\u96C6\u3057\u307E\u3059\u3002\n\u4F7F\u7528\u3059\u308B\u30A8\u30C7\u30A3\u30BF\u306F/set editor\u3067\u8A2D\u5B9A\u3055\u308C\u307E\u3059\u3002\n\u30A8\u30C7\u30A3\u30BF\u304C\u8A2D\u5B9A\u3055\u308C\u3066\u3044\u306A\u3044\u5834\u5408\u3001\u7C21\u6613\u30A8\u30C7\u30A3\u30BF\u304C\u8D77\u52D5\u3055\u308C\u307E\u3059\u3002\n\n/edit <name>\n\t\u6307\u5B9A\u3057\u305F\u540D\u524D\u306E\u30B9\u30CB\u30DA\u30C3\u30C8\u3092\u7DE8\u96C6\u3057\u307E\u3059(\u30A2\u30AF\u30C6\u30A3\u30D6\u306A\u30B9\u30CB\u30DA\u30C3\u30C8\u306E\u30D7\u30EA\u30D5\u30A1\u30EC\u30F3\u30B9)\n\n/edit <id>\n\t\u6307\u5B9A\u3057\u305F\u30B9\u30CB\u30DA\u30C3\u30C8ID\u306E\u30B9\u30CB\u30DA\u30C3\u30C8\u3092\u7DE8\u96C6\u3057\u307E\u3059\n\n/edit <id> <id>...\n\t\u6307\u5B9A\u3057\u305F\u8907\u6570\u306E\u30B9\u30CB\u30DA\u30C3\u30C8ID\u306E\u30B9\u30CB\u30DA\u30C3\u30C8\u3092\u7DE8\u96C6\u3057\u307E\u3059\n\n/edit <id>-<id>\n\t\u30B9\u30CB\u30DA\u30C3\u30C8ID\u306E\u7BC4\u56F2\u5185\u306E\u30B9\u30CB\u30DA\u30C3\u30C8\u3092\u7DE8\u96C6\u3057\u307E\u3059\n\n/edit -start\n\t\u81EA\u52D5\u7684\u306B\u8A55\u4FA1\u3055\u308C\u305F\u8D77\u52D5\u30B9\u30CB\u30DA\u30C3\u30C8\u3092\u7DE8\u96C6\u3057\u307E\u3059\u3002\u306A\u3093\u3089\u304B\u306E\u5909\u66F4\u304C\u3053\u306E\u30BB\u30C3\u30B7\u30E7\u30F3\n\t\u3067\u767A\u751F\u3057\u3066\u3082\u3001\u8D77\u52D5\u8A2D\u5B9A\u306B\u306F\u5F71\u97FF\u3042\u308A\u307E\u305B\u3093\n\n/edit -all\n\t\u5931\u6557\u3001\u30AA\u30FC\u30D0\u30FC\u30E9\u30A4\u30C9\u6E08\u3001\u524A\u9664\u6E08\u304A\u3088\u3073\u8D77\u52D5\u3092\u542B\u3080\u3059\u3079\u3066\u306E\u30B9\u30CB\u30DA\u30C3\u30C8\u3092\u7DE8\u96C6\u3057\u307E\u3059\n\n/edit\n\t\u5165\u529B\u3057\u305F\u3001\u307E\u305F\u306F/open\u3067\u8AAD\u307F\u53D6\u3063\u305F\u30B3\u30FC\u30C9\u306E\u73FE\u5728\u30A2\u30AF\u30C6\u30A3\u30D6\u306A\u30B9\u30CB\u30DA\u30C3\u30C8\u3092\u7DE8\u96C6\u3057\u307E\u3059
 
 help.drop.summary = \u540D\u524D\u307E\u305F\u306FID\u3067\u53C2\u7167\u3055\u308C\u308B\u30BD\u30FC\u30B9\u30FB\u30A8\u30F3\u30C8\u30EA\u3092\u524A\u9664\u3057\u307E\u3059
 help.drop.args = <name or id>
-help.drop =\u30B9\u30CB\u30DA\u30C3\u30C8\u3092\u524A\u9664\u3057\u307E\u3059 -- \u975E\u30A2\u30AF\u30C6\u30A3\u30D6\u306B\u3057\u307E\u3059\u3002\n\n/drop <name>\n\t\u6307\u5B9A\u3057\u305F\u540D\u524D\u306E\u30B9\u30CB\u30DA\u30C3\u30C8\u3092\u524A\u9664\u3057\u307E\u3059\n\n/drop <id>\n\t\u6307\u5B9A\u3057\u305F\u30B9\u30CB\u30DA\u30C3\u30C8ID\u306E\u30B9\u30CB\u30DA\u30C3\u30C8\u3092\u524A\u9664\u3057\u307E\u3059
+help.drop =\u30B9\u30CB\u30DA\u30C3\u30C8\u3092\u524A\u9664\u3057\u307E\u3059 -- \u975E\u30A2\u30AF\u30C6\u30A3\u30D6\u306B\u3057\u307E\u3059\u3002\n\n/drop <name>\n\t\u6307\u5B9A\u3057\u305F\u540D\u524D\u306E\u30B9\u30CB\u30DA\u30C3\u30C8\u3092\u524A\u9664\u3057\u307E\u3059\n\n/drop <id>\n\t\u6307\u5B9A\u3057\u305F\u30B9\u30CB\u30DA\u30C3\u30C8ID\u306E\u30B9\u30CB\u30DA\u30C3\u30C8\u3092\u524A\u9664\u3057\u307E\u3059\n\n/drop <id> <id>...\n\t\u6307\u5B9A\u3057\u305F\u8907\u6570\u306E\u30B9\u30CB\u30DA\u30C3\u30C8ID\u306E\u30B9\u30CB\u30DA\u30C3\u30C8\u3092\u524A\u9664\u3057\u307E\u3059\n\n/drop <id>-<id>\n\t\u30B9\u30CB\u30DA\u30C3\u30C8ID\u306E\u7BC4\u56F2\u5185\u306E\u30B9\u30CB\u30DA\u30C3\u30C8\u3092\u524A\u9664\u3057\u307E\u3059
 
 help.save.summary = \u30D5\u30A1\u30A4\u30EB\u306B\u30B9\u30CB\u30DA\u30C3\u30C8\u30FB\u30BD\u30FC\u30B9\u3092\u4FDD\u5B58\u3057\u307E\u3059\u3002
 help.save.args = [-all|-history|-start] <file>
-help.save =\u6307\u5B9A\u3057\u305F\u30B9\u30CB\u30DA\u30C3\u30C8\u307E\u305F\u306F\u30B3\u30DE\u30F3\u30C9(\u3042\u308B\u3044\u306F\u305D\u306E\u4E21\u65B9)\u3092\u6307\u5B9A\u3057\u305F\u30D5\u30A1\u30A4\u30EB\u306B\u4FDD\u5B58\u3057\u307E\u3059\u3002\n\n/save <file>\n\t\u73FE\u5728\u30A2\u30AF\u30C6\u30A3\u30D6\u306A\u30B9\u30CB\u30DA\u30C3\u30C8\u306E\u30BD\u30FC\u30B9\u3092\u30D5\u30A1\u30A4\u30EB\u306B\u4FDD\u5B58\u3057\u307E\u3059\u3002\n\n/save -all  <file>\n\t\u3059\u3079\u3066\u306E\u30B9\u30CB\u30DA\u30C3\u30C8\u306E\u30BD\u30FC\u30B9\u3092\u30D5\u30A1\u30A4\u30EB\u306B\u4FDD\u5B58\u3057\u307E\u3059\u3002\n\t\u30AA\u30FC\u30D0\u30FC\u30E9\u30A4\u30C9\u6E08\u3001\u5931\u6557\u304A\u3088\u3073\u8D77\u52D5\u30B3\u30FC\u30C9\u3092\u542B\u3080\u30BD\u30FC\u30B9\u304C\u542B\u307E\u308C\u307E\u3059\u3002\n\n/save -history  <file>\n\tjshell\u306E\u8D77\u52D5\u4EE5\u964D\u5165\u529B\u3055\u308C\u305F\u3001\u3059\u3079\u3066\u306E\u30B3\u30DE\u30F3\u30C9\u304A\u3088\u3073\u30B9\u30CB\u30DA\u30C3\u30C8\u306E\u9806\u6B21\u5C65\u6B74\u3092\u4FDD\u5B58\u3057\u307E\u3059\u3002\n\n/save -start  <file>\n\t\u73FE\u5728\u306E\u8D77\u52D5\u5B9A\u7FA9\u3092\u30D5\u30A1\u30A4\u30EB\u306B\u4FDD\u5B58\u3057\u307E\u3059\u3002
+help.save =\u6307\u5B9A\u3057\u305F\u30B9\u30CB\u30DA\u30C3\u30C8\u307E\u305F\u306F\u30B3\u30DE\u30F3\u30C9(\u3042\u308B\u3044\u306F\u305D\u306E\u4E21\u65B9)\u3092\u6307\u5B9A\u3057\u305F\u30D5\u30A1\u30A4\u30EB\u306B\u4FDD\u5B58\u3057\u307E\u3059\u3002\n\n/save <file>\n\t\u73FE\u5728\u30A2\u30AF\u30C6\u30A3\u30D6\u306A\u30B9\u30CB\u30DA\u30C3\u30C8\u306E\u30BD\u30FC\u30B9\u3092\u30D5\u30A1\u30A4\u30EB\u306B\u4FDD\u5B58\u3057\u307E\u3059\u3002\n\n/save -all <file>\n\t\u3059\u3079\u3066\u306E\u30B9\u30CB\u30DA\u30C3\u30C8\u306E\u30BD\u30FC\u30B9\u3092\u30D5\u30A1\u30A4\u30EB\u306B\u4FDD\u5B58\u3057\u307E\u3059\u3002\n\t\u30AA\u30FC\u30D0\u30FC\u30E9\u30A4\u30C9\u6E08\u3001\u5931\u6557\u304A\u3088\u3073\u8D77\u52D5\u30B3\u30FC\u30C9\u3092\u542B\u3080\u30BD\u30FC\u30B9\u304C\u542B\u307E\u308C\u307E\u3059\u3002\n\n/save -history <file>\n\tjshell\u306E\u8D77\u52D5\u4EE5\u964D\u5165\u529B\u3055\u308C\u305F\u3001\u3059\u3079\u3066\u306E\u30B3\u30DE\u30F3\u30C9\u304A\u3088\u3073\u30B9\u30CB\u30DA\u30C3\u30C8\u306E\u9806\u6B21\u5C65\u6B74\u3092\u4FDD\u5B58\u3057\u307E\u3059\u3002\n\n/save -start <file>\n\t\u73FE\u5728\u306E\u8D77\u52D5\u5B9A\u7FA9\u3092\u30D5\u30A1\u30A4\u30EB\u306B\u4FDD\u5B58\u3057\u307E\u3059\u3002\n\n/save <id> <file>\n\t\u6307\u5B9A\u3057\u305F\u30B9\u30CB\u30DA\u30C3\u30C8ID\u306E\u30B9\u30CB\u30DA\u30C3\u30C8\u3092\u4FDD\u5B58\u3057\u307E\u3059\n\n/save <id> <id>... <file>\n\t\u6307\u5B9A\u3057\u305F\u8907\u6570\u306E\u30B9\u30CB\u30DA\u30C3\u30C8ID\u306E\u30B9\u30CB\u30DA\u30C3\u30C8\u3092\u4FDD\u5B58\u3057\u307E\u3059\n\n/save <id>-<id> <file>\n\t\u30B9\u30CB\u30DA\u30C3\u30C8ID\u306E\u7BC4\u56F2\u5185\u306E\u30B9\u30CB\u30DA\u30C3\u30C8\u3092\u4FDD\u5B58\u3057\u307E\u3059
 
 help.open.summary = \u30BD\u30FC\u30B9\u306E\u5165\u529B\u3068\u3057\u3066\u30D5\u30A1\u30A4\u30EB\u3092\u958B\u304D\u307E\u3059
 help.open.args = <file>
@@ -183,23 +199,23 @@
 
 help.vars.summary = \u5BA3\u8A00\u3055\u308C\u305F\u5909\u6570\u304A\u3088\u3073\u305D\u306E\u5024\u3092\u30EA\u30B9\u30C8\u3057\u307E\u3059
 help.vars.args = [<name or id>|-all|-start]
-help.vars =jshell\u5909\u6570\u306E\u578B\u3001\u540D\u524D\u304A\u3088\u3073\u5024\u3092\u30EA\u30B9\u30C8\u3057\u307E\u3059\u3002\n\n/vars\n\t\u73FE\u5728\u30A2\u30AF\u30C6\u30A3\u30D6\u306Ajshell\u5909\u6570\u306E\u578B\u3001\u540D\u524D\u304A\u3088\u3073\u5024\u3092\u30EA\u30B9\u30C8\u3057\u307E\u3059\n\n/vars <name>\n\t\u6307\u5B9A\u3057\u305F\u540D\u524D\u306Ejshell\u5909\u6570\u3092\u30EA\u30B9\u30C8\u3057\u307E\u3059(\u30A2\u30AF\u30C6\u30A3\u30D6\u306A\u5909\u6570\u306E\u30D7\u30EA\u30D5\u30A1\u30EC\u30F3\u30B9)\n\n/vars <id>\n\t\u6307\u5B9A\u3057\u305F\u30B9\u30CB\u30DA\u30C3\u30C8ID\u306Ejshell\u5909\u6570\u3092\u30EA\u30B9\u30C8\u3057\u307E\u3059\n\n/vars -start\n\t\u81EA\u52D5\u7684\u306B\u8FFD\u52A0\u3055\u308C\u305F\u8D77\u52D5jshell\u5909\u6570\u3092\u30EA\u30B9\u30C8\u3057\u307E\u3059\n\n/vars -all\n\t\u5931\u6557\u3001\u4E0A\u66F8\u304D\u6E08\u3001\u524A\u9664\u6E08\u304A\u3088\u3073\u8D77\u52D5\u3092\u542B\u3080\u3059\u3079\u3066\u306Ejshell\u5909\u6570\u3092\u30EA\u30B9\u30C8\u3057\u307E\u3059
+help.vars =jshell\u5909\u6570\u306E\u578B\u3001\u540D\u524D\u304A\u3088\u3073\u5024\u3092\u30EA\u30B9\u30C8\u3057\u307E\u3059\u3002\n\n/vars\n\t\u73FE\u5728\u30A2\u30AF\u30C6\u30A3\u30D6\u306Ajshell\u5909\u6570\u306E\u578B\u3001\u540D\u524D\u304A\u3088\u3073\u5024\u3092\u30EA\u30B9\u30C8\u3057\u307E\u3059\n\n/vars <name>\n\t\u6307\u5B9A\u3057\u305F\u540D\u524D\u306Ejshell\u5909\u6570\u3092\u30EA\u30B9\u30C8\u3057\u307E\u3059(\u30A2\u30AF\u30C6\u30A3\u30D6\u306A\u5909\u6570\u306E\u30D7\u30EA\u30D5\u30A1\u30EC\u30F3\u30B9)\n\n/vars <id>\n\t\u6307\u5B9A\u3057\u305F\u30B9\u30CB\u30DA\u30C3\u30C8ID\u306Ejshell\u5909\u6570\u3092\u30EA\u30B9\u30C8\u3057\u307E\u3059\n\n/vars <id> <id>... <file>\n\t\u6307\u5B9A\u3057\u305F\u8907\u6570\u306E\u30B9\u30CB\u30DA\u30C3\u30C8ID\u306Ejshell\u5909\u6570\u3092\u30EA\u30B9\u30C8\u3057\u307E\u3059\n\n/vars <id>-<id> <file>\n\t\u30B9\u30CB\u30DA\u30C3\u30C8ID\u306E\u7BC4\u56F2\u5185\u306Ejshell\u5909\u6570\u3092\u30EA\u30B9\u30C8\u3057\u307E\u3059\n\n/vars -start\n\t\u81EA\u52D5\u7684\u306B\u8FFD\u52A0\u3055\u308C\u305F\u8D77\u52D5jshell\u5909\u6570\u3092\u30EA\u30B9\u30C8\u3057\u307E\u3059\n\n/vars -all\n\t\u5931\u6557\u3001\u4E0A\u66F8\u304D\u6E08\u3001\u524A\u9664\u6E08\u304A\u3088\u3073\u8D77\u52D5\u3092\u542B\u3080\u3059\u3079\u3066\u306Ejshell\u5909\u6570\u3092\u30EA\u30B9\u30C8\u3057\u307E\u3059
 
 help.methods.summary = \u5BA3\u8A00\u3055\u308C\u305F\u30E1\u30BD\u30C3\u30C9\u304A\u3088\u3073\u305D\u306E\u7F72\u540D\u3092\u30EA\u30B9\u30C8\u3057\u307E\u3059
 help.methods.args = [<name or id>|-all|-start]
-help.methods =jshell\u30E1\u30BD\u30C3\u30C9\u306E\u540D\u524D\u3001\u30D1\u30E9\u30E1\u30FC\u30BF\u578B\u304A\u3088\u3073\u623B\u308A\u578B\u3092\u30EA\u30B9\u30C8\u3057\u307E\u3059\u3002\n\n/methods\n\t\u73FE\u5728\u30A2\u30AF\u30C6\u30A3\u30D6\u306Ajshell\u30E1\u30BD\u30C3\u30C9\u306E\u540D\u524D\u3001\u30D1\u30E9\u30E1\u30FC\u30BF\u578B\u304A\u3088\u3073\u623B\u308A\u578B\u3092\u30EA\u30B9\u30C8\u3057\u307E\u3059\n\n/methods <name>\n\t\u6307\u5B9A\u3057\u305F\u540D\u524D\u306Ejshell\u30E1\u30BD\u30C3\u30C9\u3092\u30EA\u30B9\u30C8\u3057\u307E\u3059(\u30A2\u30AF\u30C6\u30A3\u30D6\u306A\u30E1\u30BD\u30C3\u30C9\u306E\u30D7\u30EA\u30D5\u30A1\u30EC\u30F3\u30B9)\n\n/methods <id>\n\t\u6307\u5B9A\u3057\u305F\u30B9\u30CB\u30DA\u30C3\u30C8ID\u306Ejshell\u30E1\u30BD\u30C3\u30C9\u3092\u30EA\u30B9\u30C8\u3057\u307E\u3059\n\n/methods -start\n\t\u81EA\u52D5\u7684\u306B\u8FFD\u52A0\u3055\u308C\u305F\u8D77\u52D5jshell\u30E1\u30BD\u30C3\u30C9\u3092\u30EA\u30B9\u30C8\u3057\u307E\u3059\n\n/methods -all\n\t\u5931\u6557\u3001\u4E0A\u66F8\u304D\u6E08\u3001\u524A\u9664\u6E08\u304A\u3088\u3073\u8D77\u52D5\u3092\u542B\u3080\u3059\u3079\u3066\u306E\u30B9\u30CB\u30DA\u30C3\u30C8\u3092\u30EA\u30B9\u30C8\u3057\u307E\u3059
+help.methods =jshell\u30E1\u30BD\u30C3\u30C9\u306E\u540D\u524D\u3001\u30D1\u30E9\u30E1\u30FC\u30BF\u578B\u304A\u3088\u3073\u623B\u308A\u578B\u3092\u30EA\u30B9\u30C8\u3057\u307E\u3059\u3002\n\n/methods\n\t\u73FE\u5728\u30A2\u30AF\u30C6\u30A3\u30D6\u306Ajshell\u30E1\u30BD\u30C3\u30C9\u306E\u540D\u524D\u3001\u30D1\u30E9\u30E1\u30FC\u30BF\u578B\u304A\u3088\u3073\u623B\u308A\u578B\u3092\u30EA\u30B9\u30C8\u3057\u307E\u3059\n\n/methods <name>\n\t\u6307\u5B9A\u3057\u305F\u540D\u524D\u306Ejshell\u30E1\u30BD\u30C3\u30C9\u3092\u30EA\u30B9\u30C8\u3057\u307E\u3059(\u30A2\u30AF\u30C6\u30A3\u30D6\u306A\u30E1\u30BD\u30C3\u30C9\u306E\u30D7\u30EA\u30D5\u30A1\u30EC\u30F3\u30B9)\n\n/methods <id>\n\t\u6307\u5B9A\u3057\u305F\u30B9\u30CB\u30DA\u30C3\u30C8ID\u306Ejshell\u30E1\u30BD\u30C3\u30C9\u3092\u30EA\u30B9\u30C8\u3057\u307E\u3059\n\n/methods <id> <id>... <file>\n\t\u6307\u5B9A\u3057\u305F\u8907\u6570\u306E\u30B9\u30CB\u30DA\u30C3\u30C8ID\u306Ejshell\u30E1\u30BD\u30C3\u30C9\u3092\u30EA\u30B9\u30C8\u3057\u307E\u3059\n\n/methods <id>-<id> <file>\n\t\u30B9\u30CB\u30DA\u30C3\u30C8ID\u306E\u7BC4\u56F2\u5185\u306Ejshell\u30E1\u30BD\u30C3\u30C9\u3092\u30EA\u30B9\u30C8\u3057\u307E\u3059\n\n/methods -start\n\t\u81EA\u52D5\u7684\u306B\u8FFD\u52A0\u3055\u308C\u305F\u8D77\u52D5jshell\u30E1\u30BD\u30C3\u30C9\u3092\u30EA\u30B9\u30C8\u3057\u307E\u3059\n\n/methods -all\n\t\u5931\u6557\u3001\u4E0A\u66F8\u304D\u6E08\u3001\u524A\u9664\u6E08\u304A\u3088\u3073\u8D77\u52D5\u3092\u542B\u3080\u3059\u3079\u3066\u306E\u30B9\u30CB\u30DA\u30C3\u30C8\u3092\u30EA\u30B9\u30C8\u3057\u307E\u3059
 
 help.types.summary = \u5BA3\u8A00\u3055\u308C\u305F\u578B\u3092\u30EA\u30B9\u30C8\u3057\u307E\u3059
 help.types.args =[<name or id>|-all|-start]
-help.types =jshell\u30AF\u30E9\u30B9\u3001\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u304A\u3088\u3073\u5217\u6319\u578B\u3092\u30EA\u30B9\u30C8\u3057\u307E\u3059\u3002\n\n/types\n\t\u73FE\u5728\u30A2\u30AF\u30C6\u30A3\u30D6\u306Ajshell\u30AF\u30E9\u30B9\u3001\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u304A\u3088\u3073\u5217\u6319\u578B\u3092\u30EA\u30B9\u30C8\u3057\u307E\u3059\u3002\n\n/types <name>\n\t\u6307\u5B9A\u3057\u305F\u540D\u524D\u306Ejshell\u578B\u3092\u30EA\u30B9\u30C8\u3057\u307E\u3059(\u30A2\u30AF\u30C6\u30A3\u30D6\u306A\u578B\u306E\u30D7\u30EA\u30D5\u30A1\u30EC\u30F3\u30B9)\n\n/types <id>\n\t\u6307\u5B9A\u3057\u305F\u30B9\u30CB\u30DA\u30C3\u30C8ID\u306Ejshell\u578B\u3092\u30EA\u30B9\u30C8\u3057\u307E\u3059\n\n/types -start\n\t\u81EA\u52D5\u7684\u306B\u8FFD\u52A0\u3055\u308C\u305F\u8D77\u52D5jshell\u578B\u3092\u30EA\u30B9\u30C8\u3057\u307E\u3059\n\n/types -all\n\t\u5931\u6557\u3001\u4E0A\u66F8\u304D\u6E08\u3001\u524A\u9664\u6E08\u304A\u3088\u3073\u8D77\u52D5\u3092\u542B\u3080\u3059\u3079\u3066\u306Ejshell\u578B\u3092\u30EA\u30B9\u30C8\u3057\u307E\u3059
+help.types =jshell\u30AF\u30E9\u30B9\u3001\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u304A\u3088\u3073\u5217\u6319\u578B\u3092\u30EA\u30B9\u30C8\u3057\u307E\u3059\u3002\n\n/types\n\t\u73FE\u5728\u30A2\u30AF\u30C6\u30A3\u30D6\u306Ajshell\u30AF\u30E9\u30B9\u3001\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u304A\u3088\u3073\u5217\u6319\u578B\u3092\u30EA\u30B9\u30C8\u3057\u307E\u3059\u3002\n\n/types <name>\n\t\u6307\u5B9A\u3057\u305F\u540D\u524D\u306Ejshell\u578B\u3092\u30EA\u30B9\u30C8\u3057\u307E\u3059(\u30A2\u30AF\u30C6\u30A3\u30D6\u306A\u578B\u306E\u30D7\u30EA\u30D5\u30A1\u30EC\u30F3\u30B9)\n\n/types <id>\n\t\u6307\u5B9A\u3057\u305F\u30B9\u30CB\u30DA\u30C3\u30C8ID\u306Ejshell\u578B\u3092\u30EA\u30B9\u30C8\u3057\u307E\u3059\n\n/types <id> <id>... <file>\n\t\u6307\u5B9A\u3057\u305F\u8907\u6570\u306E\u30B9\u30CB\u30DA\u30C3\u30C8ID\u306Ejshell\u578B\u3092\u30EA\u30B9\u30C8\u3057\u307E\u3059\n\n/types <id>-<id> <file>\n\t\u30B9\u30CB\u30DA\u30C3\u30C8ID\u306E\u7BC4\u56F2\u5185\u306Ejshell\u578B\u3092\u30EA\u30B9\u30C8\u3057\u307E\u3059\n\n/types -start\n\t\u81EA\u52D5\u7684\u306B\u8FFD\u52A0\u3055\u308C\u305F\u8D77\u52D5jshell\u578B\u3092\u30EA\u30B9\u30C8\u3057\u307E\u3059\n\n/types -all\n\t\u5931\u6557\u3001\u4E0A\u66F8\u304D\u6E08\u3001\u524A\u9664\u6E08\u304A\u3088\u3073\u8D77\u52D5\u3092\u542B\u3080\u3059\u3079\u3066\u306Ejshell\u578B\u3092\u30EA\u30B9\u30C8\u3057\u307E\u3059
 
 help.imports.summary = \u30A4\u30F3\u30DD\u30FC\u30C8\u3055\u308C\u305F\u30A2\u30A4\u30C6\u30E0\u3092\u30EA\u30B9\u30C8\u3057\u307E\u3059
 help.imports.args =
 help.imports =\u73FE\u5728\u30A2\u30AF\u30C6\u30A3\u30D6\u306Ajshell\u306E\u30A4\u30F3\u30DD\u30FC\u30C8\u3092\u30EA\u30B9\u30C8\u3057\u307E\u3059\u3002
 
 help.exit.summary = exit jshell
-help.exit.args =
-help.exit =jshell\u30C4\u30FC\u30EB\u3092\u7D42\u4E86\u3057\u307E\u3059\u3002\u4F5C\u696D\u306F\u4FDD\u5B58\u3055\u308C\u307E\u305B\u3093\u3002\n\u3053\u306E\u30B3\u30DE\u30F3\u30C9\u3092\u4F7F\u7528\u3059\u308B\u524D\u306B\u3059\u3079\u3066\u306E\u4F5C\u696D\u3092\u4FDD\u5B58\u3057\u3066\u304F\u3060\u3055\u3044
+help.exit.args =[<integer-expression-snippet>]
+help.exit =jshell\u30C4\u30FC\u30EB\u3092\u7D42\u4E86\u3057\u307E\u3059\u3002\u4F5C\u696D\u306F\u4FDD\u5B58\u3055\u308C\u307E\u305B\u3093\u3002\n\u3053\u306E\u30B3\u30DE\u30F3\u30C9\u3092\u4F7F\u7528\u3059\u308B\u524D\u306B\u3059\u3079\u3066\u306E\u4F5C\u696D\u3092\u4FDD\u5B58\u3057\u3066\u304F\u3060\u3055\u3044\n\n/exit\n\tjshell\u30C4\u30FC\u30EB\u3092\u7D42\u4E86\u3057\u307E\u3059\u3002\u7D42\u4E86\u30B9\u30C6\u30FC\u30BF\u30B9\u306F\u30BC\u30ED\u3067\u3059\u3002\n\n/exit <integer-expression-snippet>\n\t\u30B9\u30CB\u30DA\u30C3\u30C8\u3092\u8A55\u4FA1\u3057\u307E\u3059\u3002\u30B9\u30CB\u30DA\u30C3\u30C8\u304C\u5931\u6557\u3059\u308B\u304B\u3001\u6574\u6570\u5F0F\u3067\u306F\u306A\u3044\u5834\u5408\u3001\n\t\u30A8\u30E9\u30FC\u304C\u8868\u793A\u3055\u308C\u307E\u3059\u3002\u305D\u308C\u4EE5\u5916\u306E\u5834\u5408\u3001jshell\u30C4\u30FC\u30EB\u306F\u3001\n\t\u7D42\u4E86\u30B9\u30C6\u30FC\u30BF\u30B9\u3068\u3057\u3066\u5F0F\u306E\u5024\u3068\u3068\u3082\u306B\u7D42\u4E86\u3057\u307E\u3059
 
 help.reset.summary = reset jshell
 help.reset.args = [-class-path <path>] [-module-path <path>] [-add-modules <modules>]...
@@ -207,7 +223,7 @@
 
 help.reload.summary = \u30EA\u30BB\u30C3\u30C8\u3057\u3066\u95A2\u9023\u3059\u308B\u5C65\u6B74\u3092\u30EA\u30D7\u30EC\u30A4\u3057\u307E\u3059 -- \u73FE\u5728\u307E\u305F\u306F\u4EE5\u524D(-restore)
 help.reload.args = [-restore] [-quiet] [-class-path <path>] [-module-path <path>]...
-help.reload =jshell\u30C4\u30FC\u30EB\u30FB\u30B3\u30FC\u30C9\u304A\u3088\u3073\u5B9F\u884C\u72B6\u614B\u3092\u30EA\u30BB\u30C3\u30C8\u3057\u3001\u5404\u6709\u52B9\u30B9\u30CB\u30DA\u30C3\u30C8\n\u304A\u3088\u3073\u4EFB\u610F\u306E/drop\u30B3\u30DE\u30F3\u30C9\u3092\u5165\u529B\u3055\u308C\u305F\u9806\u756A\u3067\u30EA\u30D7\u30EC\u30A4\u3057\u307E\u3059\u3002\n\n/reload\n\t\u30EA\u30BB\u30C3\u30C8\u3055\u308C\u3001jshell\u304C\u5165\u529B\u3055\u308C\u305F\u3001\u3042\u308B\u3044\u306F/reset\u307E\u305F\u306F\n\t/reload\u30B3\u30DE\u30F3\u30C9\u304C\u5B9F\u884C\u3055\u308C\u305F(\u6700\u65B0\u306E\u3044\u305A\u308C\u304B)\u4EE5\u964D\u306E\u6709\u52B9\u306A\u5C65\u6B74\u304C\n\t\u30EA\u30D7\u30EC\u30A4\u3055\u308C\u307E\u3059\u3002\n\n/reload -restore\n\t\u30EA\u30BB\u30C3\u30C8\u3055\u308C\u3001jshell\u304C\u5165\u529B\u3055\u308C\u305F\u3001\u3042\u308B\u3044\u306F/reset\u307E\u305F\u306F/reload\u30B3\u30DE\u30F3\u30C9\u304C\n\t\u5B9F\u884C\u3055\u308C\u305F\u4EE5\u524D\u3068\u6700\u65B0\u306E\u6642\u9593\u306E\u9593\u306E\u6709\u52B9\u306A\u5C65\u6B74\u304C\u30EA\u30D7\u30EC\u30A4\u3055\u308C\u307E\u3059\u3002\n\t\u305D\u306E\u305F\u3081\u3001\u3053\u308C\u306F\u4EE5\u524D\u306Ejshell\u30C4\u30FC\u30EB\u30FB\u30BB\u30C3\u30B7\u30E7\u30F3\u306E\u5FA9\u5143\u306B\n\t\u4F7F\u7528\u3067\u304D\u307E\u3059\u3002\n\n/reload [-restore] -quiet\n\t'-quiet'\u5F15\u6570\u3092\u6307\u5B9A\u3059\u308B\u3068\u3001\u30EA\u30D7\u30EC\u30A4\u304C\u8868\u793A\u3055\u308C\u307E\u305B\u3093\u3002\u30A8\u30E9\u30FC\u306F\u8868\u793A\u3055\u308C\u307E\u3059\u3002\n\n\u4E0A\u306E\u5404\u3005\u306F\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u30FB\u30AA\u30D7\u30B7\u30E7\u30F3\u3092\u53D7\u3051\u5165\u308C\u307E\u3059\u3002\u6B21\u3092\u53C2\u7167\u3057\u3066\u304F\u3060\u3055\u3044:\n\n\t/help context\n\n\u4F8B:\n\n\t/reload -add-modules com.greetings -restore
+help.reload =jshell\u30C4\u30FC\u30EB\u30FB\u30B3\u30FC\u30C9\u304A\u3088\u3073\u5B9F\u884C\u72B6\u614B\u3092\u30EA\u30BB\u30C3\u30C8\u3057\u3001\u5404\u6709\u52B9\u30B9\u30CB\u30DA\u30C3\u30C8\n\u304A\u3088\u3073\u4EFB\u610F\u306E/drop\u30B3\u30DE\u30F3\u30C9\u3092\u5165\u529B\u3055\u308C\u305F\u9806\u756A\u3067\u30EA\u30D7\u30EC\u30A4\u3057\u307E\u3059\u3002\n\n/reload\n\t\u30EA\u30BB\u30C3\u30C8\u3055\u308C\u3001jshell\u304C\u5165\u529B\u3055\u308C\u305F\u3001\u3042\u308B\u3044\u306F/reset\u307E\u305F\u306F\n\t/reload\u30B3\u30DE\u30F3\u30C9\u304C\u5B9F\u884C\u3055\u308C\u305F(\u6700\u65B0\u306E\u3044\u305A\u308C\u304B)\u4EE5\u964D\u306E\u6709\u52B9\u306A\u5C65\u6B74\u304C\n\t\u30EA\u30D7\u30EC\u30A4\u3055\u308C\u307E\u3059\u3002\n\n/reload -restore\n\t\u30EA\u30BB\u30C3\u30C8\u3055\u308C\u3001jshell\u304C\u5165\u529B\u3055\u308C\u305F\u3001\u3042\u308B\u3044\u306F/reset\u3001/reload\u307E\u305F\u306F/env\u30B3\u30DE\u30F3\u30C9\n\t\u304C\u5B9F\u884C\u3055\u308C\u305F\u4EE5\u524D\u3068\u6700\u65B0\u306E\u6642\u9593\u306E\u9593\u306E\u6709\u52B9\u306A\u5C65\u6B74\u304C\u30EA\u30D7\u30EC\u30A4\u3055\u308C\u307E\u3059\u3002\n\t\u305D\u306E\u305F\u3081\u3001\u3053\u308C\u306F\u4EE5\u524D\u306Ejshell\u30C4\u30FC\u30EB\u30FB\u30BB\u30C3\u30B7\u30E7\u30F3\u306E\u5FA9\u5143\u306B\n\t\u4F7F\u7528\u3067\u304D\u307E\u3059\u3002\n\n/reload [-restore] -quiet\n\t'-quiet'\u5F15\u6570\u3092\u6307\u5B9A\u3059\u308B\u3068\u3001\u30EA\u30D7\u30EC\u30A4\u304C\u8868\u793A\u3055\u308C\u307E\u305B\u3093\u3002\u30A8\u30E9\u30FC\u306F\u8868\u793A\u3055\u308C\u307E\u3059\u3002\n\n\u4E0A\u306E\u5404\u3005\u306F\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u30FB\u30AA\u30D7\u30B7\u30E7\u30F3\u3092\u53D7\u3051\u5165\u308C\u307E\u3059\u3002\u6B21\u3092\u53C2\u7167\u3057\u3066\u304F\u3060\u3055\u3044:\n\n\t/help context\n\n\u4F8B:\n\n\t/reload -add-modules com.greetings -restore
 
 help.env.summary = \u8A55\u4FA1\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u3092\u8868\u793A\u307E\u305F\u306F\u5909\u66F4\u3057\u307E\u3059
 help.env.args = [-class-path <path>] [-module-path <path>] [-add-modules <modules>] ...
@@ -233,15 +249,15 @@
 help.quest.args = [<command>|<subject>]
 help.quest =jshell\u306B\u95A2\u3059\u308B\u60C5\u5831\u3092\u8868\u793A\u3057\u307E\u3059(/help\u306E\u7701\u7565\u5F62)\u3002\n/?\n\t\u30B3\u30DE\u30F3\u30C9\u304A\u3088\u3073\u30D8\u30EB\u30D7\u306E\u30B5\u30D6\u30B8\u30A7\u30AF\u30C8\u306E\u30EA\u30B9\u30C8\u3092\u8868\u793A\u3057\u307E\u3059\u3002\n/? <command>\n\t\u6307\u5B9A\u3057\u305F\u30B3\u30DE\u30F3\u30C9\u306B\u95A2\u3059\u308B\u60C5\u5831\u3092\u8868\u793A\u3057\u307E\u3059\u3002\u30B9\u30E9\u30C3\u30B7\u30E5\u3092\u542B\u3081\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002\n\t\u5FC5\u8981\u306A\u306E\u306F\u30B3\u30DE\u30F3\u30C9\u306E\u6700\u521D\u306E\u6570\u6587\u5B57\u306E\u307F\u3067\u3059 -- \u8907\u6570\u4E00\u81F4\u3059\u308B\u5834\u5408\u306F\n\t\u305D\u308C\u305E\u308C\u8868\u793A\u3055\u308C\u307E\u3059\u3002\u4F8B:  /help /li\n/? <subject>\n\t\u6307\u5B9A\u3057\u305F\u30D8\u30EB\u30D7\u306E\u30B5\u30D6\u30B8\u30A7\u30AF\u30C8\u306B\u95A2\u3059\u308B\u60C5\u5831\u3092\u8868\u793A\u3057\u307E\u3059\u3002\u4F8B: /? intro
 
-help.bang.summary = \u6700\u5F8C\u306E\u30B9\u30CB\u30DA\u30C3\u30C8\u3092\u518D\u5B9F\u884C\u3057\u307E\u3059
+help.bang.summary = \u6700\u5F8C\u306E\u30B9\u30CB\u30DA\u30C3\u30C8\u3092\u518D\u5B9F\u884C\u3057\u307E\u3059 -- /help rerun\u3092\u53C2\u7167\u3057\u3066\u304F\u3060\u3055\u3044
 help.bang.args =
 help.bang =\u6700\u5F8C\u306B\u5165\u529B\u3057\u305F\u30B9\u30CB\u30DA\u30C3\u30C8\u3092\u518D\u8A55\u4FA1\u3057\u307E\u3059\u3002
 
-help.id.summary = ID\u3067\u30B9\u30CB\u30DA\u30C3\u30C8\u3092\u518D\u5B9F\u884C\u3057\u307E\u3059
+help.id.summary = ID\u307E\u305F\u306FID\u7BC4\u56F2\u3067\u30B9\u30CB\u30DA\u30C3\u30C8\u3092\u518D\u5B9F\u884C\u3057\u307E\u3059 -- /help rerun\u3092\u53C2\u7167\u3057\u3066\u304F\u3060\u3055\u3044
 help.id.args =
-help.id =ID\u3067\u6307\u5B9A\u3055\u308C\u305F\u30B9\u30CB\u30DA\u30C3\u30C8\u3092\u518D\u8A55\u4FA1\u3057\u307E\u3059\u3002
+help.id =/<id> <id> <id>\n\n/<id>-<id>\n\nID\u307E\u305F\u306FID\u7BC4\u56F2\u3067\u6307\u5B9A\u3055\u308C\u305F\u30B9\u30CB\u30DA\u30C3\u30C8\u3092\u518D\u8A55\u4FA1\u3057\u307E\u3059\u3002\nID\u7BC4\u56F2\u306F\u3001\u30CF\u30A4\u30D5\u30F3\u3067\u533A\u5207\u3089\u308C\u305F2\u3064\u306EID\u3067\u8868\u73FE\u3055\u308C\u307E\u3059(\u4F8B: 3-17)\n\u8D77\u52D5\u30B9\u30CB\u30DA\u30C3\u30C8\u304A\u3088\u3073\u30A8\u30E9\u30FC\u30FB\u30B9\u30CB\u30DA\u30C3\u30C8\u3092\u4F7F\u7528\u3067\u304D\u307E\u3059(\u4F8B: s3-s9\u307E\u305F\u306Fe1-e4)\n\u4EFB\u610F\u306E\u6570\u306EID\u307E\u305F\u306FID\u7BC4\u56F2\u3092\u4F7F\u7528\u3067\u304D\u307E\u3059(\u4F8B: /3-7 s4 14-16 e2)
 
-help.previous.summary = n\u56DE\u524D\u306E\u30B9\u30CB\u30DA\u30C3\u30C8\u3092\u518D\u5B9F\u884C\u3057\u307E\u3059
+help.previous.summary = n\u56DE\u524D\u306E\u30B9\u30CB\u30DA\u30C3\u30C8\u3092\u518D\u5B9F\u884C\u3057\u307E\u3059 -- /help rerun\u3092\u53C2\u7167\u3057\u3066\u304F\u3060\u3055\u3044
 help.previous.args =
 help.previous =n\u56DE\u524D\u306B\u5165\u529B\u3057\u305F\u30B9\u30CB\u30DA\u30C3\u30C8\u3092\u518D\u8A55\u4FA1\u3057\u307E\u3059\u3002
 
@@ -249,33 +265,48 @@
 help.intro =jshell\u30C4\u30FC\u30EB\u3092\u4F7F\u7528\u3059\u308B\u3068\u3001Java\u30B3\u30FC\u30C9\u3092\u5B9F\u884C\u3057\u3066\u5373\u5EA7\u306B\u7D50\u679C\u3092\u53D6\u5F97\u3067\u304D\u307E\u3059\u3002\nint x = 8\u306A\u3069\u306EJava\u5B9A\u7FA9(\u5909\u6570\u3001\u30E1\u30BD\u30C3\u30C9\u3001\u30AF\u30E9\u30B9\u306A\u3069)\u3001\nx + x\u306A\u3069\u306EJava\u5F0F\u307E\u305F\u306FJava\u6587\u3092\u5165\u529B\u3057\u305F\u308A\u3001\n\u30A4\u30F3\u30DD\u30FC\u30C8\u3057\u305F\u308A\u3067\u304D\u307E\u3059\u3002\n\u3053\u308C\u3089\u306EJava\u30B3\u30FC\u30C9\u306E\u5C0F\u3055\u306A\u30C1\u30E3\u30F3\u30AF\u3092\u300C\u30B9\u30CB\u30DA\u30C3\u30C8\u300D\u3068\u547C\u3073\u307E\u3059\u3002\n\n\u307E\u305F\u3001/list\u306A\u3069\u306E\u5B9F\u884C\u3059\u308B\u5185\u5BB9\u3092\u7406\u89E3\u304A\u3088\u3073\u5236\u5FA1\u3067\u304D\u308Bjshell\u30B3\u30DE\u30F3\u30C9\u3082\n\u3042\u308A\u307E\u3059\n\n\u30B3\u30DE\u30F3\u30C9\u306E\u30EA\u30B9\u30C8\u3092\u53C2\u7167\u3059\u308B\u5834\u5408: /help
 
 help.shortcuts.summary = \u30B9\u30CB\u30DA\u30C3\u30C8\u304A\u3088\u3073\u30B3\u30DE\u30F3\u30C9\u306E\u88DC\u5B8C\u3001\u60C5\u5831\u30A2\u30AF\u30BB\u30B9\u3001\u304A\u3088\u3073\u81EA\u52D5\u30B3\u30FC\u30C9\u751F\u6210\n\u306E\u30AD\u30FC\u30B9\u30C8\u30ED\u30FC\u30AF\u306E\u8AAC\u660E
-help.shortcuts =\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u308B\u30B7\u30E7\u30FC\u30C8\u30AB\u30C3\u30C8\u306F\u6B21\u306E\u3068\u304A\u308A\u3067\u3059:\n\n<tab>\n\t\tJava\u8B58\u5225\u5B50\u3001jshell\u30B3\u30DE\u30F3\u30C9\u3001\u5834\u5408\u306B\u3088\u3063\u3066\u306F\n\t\tjshell\u30B3\u30DE\u30F3\u30C9\u5F15\u6570\u306E\u6700\u521D\u306E\u6570\u6587\u5B57\u3092\u5165\u529B\u3057\u305F\u5F8C\u306B\u3001\n\t\t<tab>\u30AD\u30FC\u3092\u62BC\u3059\u3068\u3001\u5165\u529B\u304C\u88DC\u5B8C\u3055\u308C\u307E\u3059\u3002\n\t\t\u88DC\u5B8C\u7D50\u679C\u304C\u8907\u6570\u3042\u308B\u5834\u5408\u3001\u4F7F\u7528\u53EF\u80FD\u306A\u88DC\u5B8C\u7D50\u679C\u304C\u8868\u793A\u3055\u308C\u307E\u3059\u3002\n\t\t\u4F7F\u7528\u53EF\u80FD\u306A\u5834\u5408\u3001\u5FC5\u8981\u306B\u5FDC\u3058\u3066\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u304C\u8868\u793A\u3055\u308C\u307E\u3059\u3002\n\nShift-<tab> v\n\t\t\u5B8C\u5168\u306A\u5F0F\u306E\u5F8C\u306B\u3001<shift>\u3092\u62BC\u3057\u306A\u304C\u3089<tab>\u3092\u62BC\u3057\u3001\u6B21\u306B\u96E2\u3057\u3066\n\t\t[v]\u3092\u62BC\u3059\u3068\u3001\u30BF\u30A4\u30D7\u304C\u5F0F\u306E\u30BF\u30A4\u30D7\u306B\u57FA\u3065\u304F\u5909\u6570\u306E\u5BA3\u8A00\u306B\n\t\t\u5F0F\u304C\u5909\u63DB\u3055\u308C\u307E\u3059\u3002\n\nShift-<tab> i\n\t\t\u89E3\u6C7A\u3067\u304D\u306A\u3044\u8B58\u5225\u5B50\u306E\u5F8C\u306B\u3001<shift>\u3092\u62BC\u3057\u306A\u304C\u3089<tab>\u3092\u62BC\u3057\u3001\u6B21\u306B\u96E2\u3057\u3066\n\t\t[i]\u3092\u62BC\u3059\u3068\u3001jshell\u306B\u3088\u3063\u3066\u3001\u4F7F\u7528\u53EF\u80FD\u306A\u30A4\u30F3\u30DD\u30FC\u30C8\u304C\u63D0\u793A\u3055\u308C\u3001\n\t\t\u3053\u308C\u306B\u3088\u3063\u3066\u3001\u6307\u5B9A\u3055\u308C\u305F\u30AF\u30E9\u30B9\u30D1\u30B9\u306E\u5185\u5BB9\u306B\u57FA\u3065\u3044\u3066\u8B58\u5225\u5B50\u304C\u89E3\u6C7A\u3055\u308C\u307E\u3059\u3002
+help.shortcuts =\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u308B\u30B7\u30E7\u30FC\u30C8\u30AB\u30C3\u30C8\u306F\u6B21\u306E\u3068\u304A\u308A\u3067\u3059:\n\n<tab>\n\t\tJava\u8B58\u5225\u5B50\u3001jshell\u30B3\u30DE\u30F3\u30C9\u3001\u5834\u5408\u306B\u3088\u3063\u3066\u306F\n\t\tjshell\u30B3\u30DE\u30F3\u30C9\u5F15\u6570\u306E\u6700\u521D\u306E\u6570\u6587\u5B57\u3092\u5165\u529B\u3057\u305F\u5F8C\u306B\u3001\n\t\t<tab>\u30AD\u30FC\u3092\u62BC\u3059\u3068\u3001\u5165\u529B\u304C\u88DC\u5B8C\u3055\u308C\u307E\u3059\u3002\n\t\t\u88DC\u5B8C\u7D50\u679C\u304C\u8907\u6570\u3042\u308B\u5834\u5408\u3001\u4F7F\u7528\u53EF\u80FD\u306A\u88DC\u5B8C\u7D50\u679C\u304C\u8868\u793A\u3055\u308C\u307E\u3059\u3002\n\t\t\u4F7F\u7528\u53EF\u80FD\u306A\u5834\u5408\u3001\u5FC5\u8981\u306B\u5FDC\u3058\u3066\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u304C\u8868\u793A\u3055\u308C\u307E\u3059\u3002\n\nShift-<tab> v\n\t\t\u5B8C\u5168\u306A\u5F0F\u306E\u5F8C\u306B\u3001<shift>\u3092\u62BC\u3057\u306A\u304C\u3089<tab>\u3092\u62BC\u3057\u3001\u6B21\u306B\u96E2\u3057\u3066\n\t\t[v]\u3092\u62BC\u3059\u3068\u3001\u30BF\u30A4\u30D7\u304C\u5F0F\u306E\u30BF\u30A4\u30D7\u306B\u57FA\u3065\u304F\u5909\u6570\u306E\u5BA3\u8A00\u306B\n\t\t\u5F0F\u304C\u5909\u63DB\u3055\u308C\u307E\u3059\u3002\n\nShift-<tab> m\n\t\t\u5B8C\u5168\u306A\u5F0F\u307E\u305F\u306F\u6587\u306E\u5F8C\u306B\u3001<shift>\u3092\u62BC\u3057\u306A\u304C\u3089<tab>\u3092\u62BC\u3057\u3001\n\t\t\u6B21\u306B\u96E2\u3057\u3066[m]\u3092\u62BC\u3059\u3068\u3001\u5F0F\u307E\u305F\u306F\u6587\u304C\u30E1\u30BD\u30C3\u30C9\u5BA3\u8A00\u306B\n\t\t\u5909\u63DB\u3055\u308C\u307E\u3059\u3002\u5F0F\u306E\u5834\u5408\u3001\u623B\u308A\u578B\u306F\u3001\n\t\t\u5F0F\u306E\u30BF\u30A4\u30D7\u306B\u57FA\u3065\u304D\u307E\u3059\u3002\n\nShift-<tab> i\n\t\t\u89E3\u6C7A\u3067\u304D\u306A\u3044\u8B58\u5225\u5B50\u306E\u5F8C\u306B\u3001<shift>\u3092\u62BC\u3057\u306A\u304C\u3089<tab>\u3092\u62BC\u3057\u3001\u6B21\u306B\u96E2\u3057\u3066\n\t\t[i]\u3092\u62BC\u3059\u3068\u3001jshell\u306B\u3088\u3063\u3066\u3001\u4F7F\u7528\u53EF\u80FD\u306A\u30A4\u30F3\u30DD\u30FC\u30C8\u304C\u63D0\u793A\u3055\u308C\u3001\n\t\t\u3053\u308C\u306B\u3088\u3063\u3066\u3001\u6307\u5B9A\u3055\u308C\u305F\u30AF\u30E9\u30B9\u30D1\u30B9\u306E\u5185\u5BB9\u306B\u57FA\u3065\u3044\u3066\u8B58\u5225\u5B50\u304C\u89E3\u6C7A\u3055\u308C\u307E\u3059\u3002
 
-help.context.summary = /env /reload\u304A\u3088\u3073/reset\u306E\u8A55\u4FA1\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u30FB\u30AA\u30D7\u30B7\u30E7\u30F3
+help.context.summary = /env /reload\u304A\u3088\u3073/reset\u306E\u8A55\u4FA1\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u30FB\u30AA\u30D7\u30B7\u30E7\u30F3\u306E\u8AAC\u660E
 help.context =\u8A55\u4FA1\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u3092\u30AA\u30D7\u30B7\u30E7\u30F3\u3067\u69CB\u6210\u3057\u307E\u3059\u3002\u3053\u308C\u3089\u306F\u3001jshell\u8D77\u52D5\u6642\u306B\n\u30B3\u30DE\u30F3\u30C9\u30E9\u30A4\u30F3\u3067\u3001\u307E\u305F\u306F\u30B3\u30DE\u30F3\u30C9/env\u3001/reload\u307E\u305F\u306F/reset\u3067\u518D\u8D77\u52D5\u3059\u308B\n\u3053\u3068\u306B\u3088\u308A\u6307\u5B9A\u3067\u304D\u307E\u3059\u3002\n\n\u30AA\u30D7\u30B7\u30E7\u30F3\u306F\u6B21\u306E\u3068\u304A\u308A\u3067\u3059:\n\t--class-path <class search path of directories and zip/jar files>\n\t\t\u30AF\u30E9\u30B9\u30FB\u30D5\u30A1\u30A4\u30EB\u3092\u691C\u7D22\u3059\u308B\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u3001\n\t\tJAR\u30A2\u30FC\u30AB\u30A4\u30D6\u3001ZIP\u30A2\u30FC\u30AB\u30A4\u30D6\u306E\u30EA\u30B9\u30C8\u3002\n\t\t\u30EA\u30B9\u30C8\u306F\u30D1\u30B9\u533A\u5207\u308A\u6587\u5B57\u3067\u533A\u5207\u308A\u307E\u3059\n\t\t(UNIX/Linux/Mac\u3067\u306F\u300C:\u300D\u3001Windows\u3067\u306F\u300C;\u300D)\u3002\n\t--module-path <module path>...\n\t\t\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306E\u30EA\u30B9\u30C8\u3002\u5404\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306F\n\t\t\u30E2\u30B8\u30E5\u30FC\u30EB\u306E\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u3067\u3059\u3002\n\t\t\u30EA\u30B9\u30C8\u306F\u30D1\u30B9\u533A\u5207\u308A\u6587\u5B57\u3067\u533A\u5207\u308A\u307E\u3059\n\t\t(UNIX/Linux/Mac\u3067\u306F\u300C:\u300D\u3001Windows\u3067\u306F\u300C;\u300D)\u3002\n\t--add-modules <modulename>[,<modulename>...]\n\t\t\u521D\u671F\u30E2\u30B8\u30E5\u30FC\u30EB\u306B\u52A0\u3048\u3066\u89E3\u6C7A\u3059\u308B\u30EB\u30FC\u30C8\u30FB\u30E2\u30B8\u30E5\u30FC\u30EB\u3002\n\t\t<modulename>\u306B\u306F\u3001ALL-DEFAULT\u3001ALL-SYSTEM\u3001\n\t\tALL-MODULE-PATH\u3082\u4F7F\u7528\u3067\u304D\u307E\u3059\u3002\n\t--add-exports <module>/<package>=<target-module>(,<target-module>)*\n\t\t\u30E2\u30B8\u30E5\u30FC\u30EB\u5BA3\u8A00\u306B\u95A2\u4FC2\u306A\u304F\u3001<module>\u3092\u66F4\u65B0\u3057\u3066\n\t\t<package>\u3092<target-module>\u306B\u30A8\u30AF\u30B9\u30DD\u30FC\u30C8\u3057\u307E\u3059\u3002\n\t\t<target-module>\u3092ALL-UNNAMED\u306B\u8A2D\u5B9A\u3059\u308B\u3068\u3001\u3059\u3079\u3066\u306E\u540D\u524D\u306E\u306A\u3044\u30E2\u30B8\u30E5\u30FC\u30EB\u306B\n\t\t\u30A8\u30AF\u30B9\u30DD\u30FC\u30C8\u3057\u307E\u3059\u3002jshell\u3067\u306F\u3001<target-module>\u3092\u6307\u5B9A\u3057\u306A\u3044\u5834\u5408(\u300C=\u300D\u306A\u3057)\u3001\n\t\tALL-UNNAMED\u3092\u4F7F\u7528\u3057\u307E\u3059\u3002\n\n\u30B3\u30DE\u30F3\u30C9\u30E9\u30A4\u30F3\u3067\u306F\u3001\u3053\u308C\u3089\u306E\u30AA\u30D7\u30B7\u30E7\u30F3\u306B\u306F2\u3064\u306E\u30C0\u30C3\u30B7\u30E5\u304C\u5FC5\u8981\u3067\u3059\u3002\u4F8B: --module-path\njshell\u30B3\u30DE\u30F3\u30C9\u3067\u306F\u3001\u30C0\u30C3\u30B7\u30E5\u306F1\u3064\u3067\u30822\u3064\u3067\u3082\u304B\u307E\u3044\u307E\u305B\u3093\u3002\u4F8B: -module-path\n
+help.rerun.summary = \u524D\u306B\u5165\u529B\u3057\u305F\u30B9\u30CB\u30DA\u30C3\u30C8\u3092\u518D\u8A55\u4FA1\u3059\u308B\u65B9\u6CD5\u306E\u8AAC\u660E
+help.rerun =\u524D\u306B\u5165\u529B\u3057\u305F\u30B9\u30CB\u30DA\u30C3\u30C8\u3092\u518D\u8A55\u4FA1\u3059\u308B\u65B9\u6CD5\u306F4\u3064\u3042\u308A\u307E\u3059\u3002\n\u6700\u5F8C\u306E\u30B9\u30CB\u30DA\u30C3\u30C8\u306F\u3001/!\u3092\u4F7F\u7528\u3057\u3066\u518D\u8A55\u4FA1\u3067\u304D\u307E\u3059\nn\u56DE\u524D\u306E\u30B9\u30CB\u30DA\u30C3\u30C8\u306F\u3001\u30B9\u30E9\u30C3\u30B7\u30E5\u3068\u30DE\u30A4\u30CA\u30B9\u304A\u3088\u3073n\u306E\u6570\u5B57\u3067\u518D\u8A55\u4FA1\u3067\u304D\u307E\u3059(\u4F8B: /-4)\n\u6B21\u306B\u4F8B\u3092\u793A\u3057\u307E\u3059\u3002\n\n\tjshell> 2 + 2\n\t$1 ==> 4\n\n\tjshell> /!\n\t2 + 2\n\t$2 ==> 4\n\n\tjshell> int z\n\tz ==> 0\n\n\tjshell> /-1\n\tint z;\n\tz ==> 0\n\n\tjshell> /-4\n\t2 + 2\n\t$5 ==> 4\n\n\u518D\u8A55\u4FA1\u3059\u308B\u30B9\u30CB\u30DA\u30C3\u30C8\u306F\u3001\u30B9\u30CB\u30DA\u30C3\u30C8ID\u307E\u305F\u306FID\u7BC4\u56F2\u3067\u6307\u5B9A\u3067\u304D\u307E\u3059\u3002\nID\u7BC4\u56F2\u306F\u3001\u30CF\u30A4\u30D5\u30F3\u3067\u533A\u5207\u3089\u308C\u305F2\u3064\u306EID\u3067\u8868\u73FE\u3055\u308C\u307E\u3059(\u4F8B: 3-17)\n\u8D77\u52D5\u30B9\u30CB\u30DA\u30C3\u30C8\u304A\u3088\u3073\u30A8\u30E9\u30FC\u30FB\u30B9\u30CB\u30DA\u30C3\u30C8\u3092\u4F7F\u7528\u3067\u304D\u307E\u3059(\u4F8B: s3-s9\u307E\u305F\u306Fe1-e4)\n\u4EFB\u610F\u306E\u6570\u306EID\u307E\u305F\u306FID\u7BC4\u56F2\u3092\u4F7F\u7528\u3067\u304D\u307E\u3059(\u4F8B: /3-7 s4 14-16 e2)\n\n\u307E\u305F\u3001[Ctrl]-[R]\u3092\u62BC\u3057\u3066\u304B\u3089\u691C\u7D22\u6587\u5B57\u5217\u3092\u5165\u529B\u3059\u308B\u3068\u3001\u5C65\u6B74\u3092\u3055\u304B\u306E\u307C\u3063\u3066\u691C\u7D22\u3067\u304D\u307E\u3059\u3002
+
 help.set._retain = '-retain'\u30AA\u30D7\u30B7\u30E7\u30F3\u306B\u3088\u308A\u3001\u5C06\u6765\u306E\u30BB\u30C3\u30B7\u30E7\u30F3\u3067\u4F7F\u7528\u3059\u308B\u305F\u3081\u306B\u8A2D\u5B9A\u3092\u4FDD\u5B58\u3057\u307E\u3059\u3002\n-retain\u30AA\u30D7\u30B7\u30E7\u30F3\u306F\u3001/set\u306E\u6B21\u306E\u5F62\u5F0F\u3067\u4F7F\u7528\u3067\u304D\u307E\u3059:\n\n\t/set editor -retain\n\t/set start -retain\n\t/set feedback -retain\n\t/set mode -retain\n\n\u8A73\u7D30\u306F\u3001\u3053\u308C\u3089\u306E\u30B3\u30DE\u30F3\u30C9\u3092\u53C2\u7167\u3057\u3066\u304F\u3060\u3055\u3044 -- \u4F8B: /help /set editor
 
+help.set.format.summary = \u30B9\u30CB\u30DA\u30C3\u30C8\u30FB\u30A4\u30D9\u30F3\u30C8\u3092\u30EC\u30DD\u30FC\u30C8\u3059\u308B\u30D5\u30A9\u30FC\u30DE\u30C3\u30C8\u3092\u8A2D\u5B9A\u3057\u307E\u3059\u3002
+
 help.set.format = \u30B9\u30CB\u30DA\u30C3\u30C8\u30FB\u30A4\u30D9\u30F3\u30C8\u3092\u30EC\u30DD\u30FC\u30C8\u3059\u308B\u30D5\u30A9\u30FC\u30DE\u30C3\u30C8\u3092\u8A2D\u5B9A\u3057\u307E\u3059:\n\n\t/set format <mode> <field> "<format>" <selector>...\n\n\u30D5\u30A9\u30FC\u30DE\u30C3\u30C8\u8A2D\u5B9A\u3092\u8868\u793A\u3057\u307E\u3059:\n\n\t/set format [<mode> [<field>]]\n\n<mode>\u306F\u4E8B\u524D\u306B\u5B9A\u7FA9\u3055\u308C\u305F\u30D5\u30A3\u30FC\u30C9\u30D0\u30C3\u30AF\u30FB\u30E2\u30FC\u30C9\u306E\u540D\u524D\u3067\u3059 -- '/help /set mode'\u3092\u53C2\u7167\u3057\u3066\u304F\u3060\u3055\u3044\u3002\n<field>\u306F\u5B9A\u7FA9\u3059\u308B\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u56FA\u6709\u306E\u30D5\u30A9\u30FC\u30DE\u30C3\u30C8\u306E\u540D\u524D\u3067\u3059\u3002\n<format>\u306F\u5F15\u7528\u7B26\u306B\u56F2\u307E\u308C\u305F\u6587\u5B57\u5217\u3067\u3001\u6B21\u306E\u5834\u5408\u306E\u30D5\u30A3\u30FC\u30EB\u30C9\u306E\u5024\u3067\u3059: \n\u30BB\u30EC\u30AF\u30BF\u304C\u4E00\u81F4\u3059\u308B(\u307E\u305F\u306F\u30BB\u30EC\u30AF\u30BF\u304C\u306A\u3044)\u3002\u30D5\u30A9\u30FC\u30DE\u30C3\u30C8\u304C\u4F7F\u7528\u3055\u308C\u308B\u5834\u5408\u3001\n\u4E2D\u30AB\u30C3\u30B3\u3067\u56F2\u307E\u308C\u3066\u3044\u308B\u30D5\u30A3\u30FC\u30EB\u30C9\u540D\u304C\u305D\u306E\u3068\u304D\u306E\u30D5\u30A3\u30FC\u30EB\u30C9\u306E\u5024\u3067\u7F6E\u63DB\u3055\u308C\u307E\u3059\n\u3053\u308C\u3089\u306E\u30D5\u30A3\u30FC\u30EB\u30C9\u306F\u3001\u3053\u306E\u30B3\u30DE\u30F3\u30C9\u3067\u4E8B\u524D\u306B\u5B9A\u7FA9\u3055\u308C\u3066\u3044\u308B\u5834\u5408\u3082\u3001\n\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u306B\u56FA\u6709\u306E\u3053\u308C\u3089\u306E\u4E8B\u524D\u5B9A\u7FA9\u6E08\u30D5\u30A3\u30FC\u30EB\u30C9\u306E\u3044\u305A\u308C\u304B\u3067\u3042\u308B\u5834\u5408\u3082\u3042\u308A\u307E\u3059:\n\t{name}       == \u540D\u524D\u3001\u4F8B: \u5909\u6570\u540D\u3001 ...\n\t{type}       == \u30BF\u30A4\u30D7\u540D\u3002\u5909\u6570\u307E\u305F\u306F\u5F0F\u306E\u30BF\u30A4\u30D7\u3001\n\t\t\t\u30E1\u30BD\u30C3\u30C9\u306E\u30D1\u30E9\u30E1\u30FC\u30BF\u30FB\u30BF\u30A4\u30D7\n\t{value}      == \u5F0F\u307E\u305F\u306F\u5909\u6570\u306E\u521D\u671F\u5316\u306E\u7D50\u679C\u5024\n\t{unresolved} == \u672A\u89E3\u6C7A\u306E\u53C2\u7167\u306E\u30EA\u30B9\u30C8\n\t{errors}     == \u30EA\u30AB\u30D0\u30EA\u53EF\u80FD\u306A\u30A8\u30E9\u30FC\u306E\u30EA\u30B9\u30C8(\u51E6\u7406\u6642-\n\t\t\t"display"\u30D5\u30A3\u30FC\u30EB\u30C9\u306E\u307F)\n\t{err}        == \u672A\u30D5\u30A9\u30FC\u30DE\u30C3\u30C8\u30FB\u30A8\u30E9\u30FC\u884C(\u51E6\u7406\u6642-\n\t\t\t"errorline"\u30D5\u30A3\u30FC\u30EB\u30C9\u306E\u307F)\n\u6B21\u306E\u30D5\u30A3\u30FC\u30EB\u30C9\u306F\u30C4\u30FC\u30EB\u306B\u3088\u3063\u3066\u30A2\u30AF\u30BB\u30B9\u3055\u308C\u3001\u8868\u793A\u3055\u308C\u308B\u30D5\u30A3\u30FC\u30C9\u30D0\u30C3\u30AF\u3092\u6C7A\u5B9A\u3057\u307E\u3059:\n\t{display}    == \u30B9\u30CB\u30DA\u30C3\u30C8\u30FB\u30A4\u30D9\u30F3\u30C8\u306B\u5BFE\u3057\u3066\u8868\u793A\u3055\u308C\u308B\u30E1\u30C3\u30BB\u30FC\u30B8\n\t{errorline}  == \u300Cerrors\u300D\u30D5\u30A3\u30FC\u30EB\u30C9\u5185\u306E\u30A8\u30E9\u30FC\u884C\u306E\u30D5\u30A9\u30FC\u30DE\u30C3\u30C8\n\t{pre}        == \u30D5\u30A3\u30FC\u30C9\u30D0\u30C3\u30AF\u63A5\u982D\u8F9E(\u30B3\u30DE\u30F3\u30C9\u30FB\u30D5\u30A3\u30FC\u30C9\u30D0\u30C3\u30AF\u3092\u958B\u59CB\u3059\u308B)\n\t{post}       == \u30D5\u30A3\u30FC\u30C9\u30D0\u30C3\u30AF\u63A5\u5C3E\u8F9E(\u30B3\u30DE\u30F3\u30C9\u30FB\u30D5\u30A3\u30FC\u30C9\u30D0\u30C3\u30AF\u3092\u7D42\u4E86\u3059\u308B)\n\t{errorpre}   == \u30A8\u30E9\u30FC\u63A5\u982D\u8F9E(\u30A8\u30E9\u30FC\u30FB\u30D5\u30A3\u30FC\u30C9\u30D0\u30C3\u30AF\u3092\u958B\u59CB\u3059\u308B)\n\t{errorpost}  == \
 \u30A8\u30E9\u30FC\u63A5\u5C3E\u8F9E(\u30A8\u30E9\u30FC\u30FB\u30D5\u30A3\u30FC\u30C9\u30D0\u30C3\u30AF\u3092\u7D42\u4E86\u3059\u308B)\n\u3053\u308C\u3089\u306E\u30D5\u30A3\u30FC\u30EB\u30C9\u306B\u306F\u30C7\u30D5\u30A9\u30EB\u30C8\u306E\u8A2D\u5B9A\u304C\u3042\u308A\u307E\u3059(\u30AA\u30FC\u30D0\u30FC\u30E9\u30A4\u30C9\u3055\u308C\u308B\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059)\u3002\n<selector>\u306F\u30D5\u30A9\u30FC\u30DE\u30C3\u30C8\u304C\u9069\u7528\u3055\u308C\u308B\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u3067\u3059\u3002\n\u30BB\u30EC\u30AF\u30BF\u69CB\u9020\u306F\u30BB\u30EC\u30AF\u30BF\u7A2E\u985E\u30EA\u30B9\u30C8\u306E\u30CF\u30A4\u30D5\u30F3\u533A\u5207\u308A\u30EA\u30B9\u30C8\u3067\u3059\u3002\n\u30BB\u30EC\u30AF\u30BF\u7A2E\u985E\u30EA\u30B9\u30C8\u306F\u30011\u3064\u306E\u30BB\u30EC\u30AF\u30BF\u7A2E\u985E\u306E\u5024\u306E\u30AB\u30F3\u30DE\u533A\u5207\u308A\u30EA\u30B9\u30C8\u3067\u3059\u3002\n\u30BB\u30EC\u30AF\u30BF\u306F\u5404\u30BB\u30EC\u30AF\u30BF\u7A2E\u985E\u30EA\u30B9\u30C8\u304C\u4E00\u81F4\u3059\u308C\u3070\u4E00\u81F4\u3068\u306A\u308A\u307E\u3059\u3002\u30BB\u30EC\u30AF\u30BF\u7A2E\u985E\u30EA\u30B9\u30C8\u306F\n\u3044\u305A\u308C\u304B\u306E\u5024\u304C\u4E00\u81F4\u3059\u308C\u3070\u4E00\u81F4\u3068\u306A\u308A\u307E\u3059\u3002\n\n\u30B1\u30FC\u30B9\u30FB\u30BB\u30EC\u30AF\u30BF\u7A2E\u985E\u306F\u3001\u30B9\u30CB\u30DA\u30C3\u30C8\u306E\u7A2E\u985E\u3092\u793A\u3057\u307E\u3059\u3002\u5024\u306F\u6B21\u306E\u3068\u304A\u308A\u3067\u3059:\n\timport     -- \u30A4\u30F3\u30DD\u30FC\u30C8\u5BA3\u8A00\n\tclass      -- \u30AF\u30E9\u30B9\u5BA3\u8A00\n\tinterface  -- \u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u5BA3\u8A00\n\tenum       -- \u5217\u6319\u578B\u306E\u5BA3\u8A00\n\tannotation -- \u6CE8\u91C8\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u5BA3\u8A00\n\tmethod     -- \u30E1\u30BD\u30C3\u30C9\u5BA3\u8A00 -- \u6CE8\u610F: {type}==parameter-types\n\tvardecl    -- \u521D\u671F\u5316\u3057\u306A\u3044\u5909\u6570\u5BA3\u8A00\n\tvarinit    -- \u521D\u671F\u5316\u3059\u308B\u5909\u6570\u5BA3\u8A00\n\texpression -- \u5F0F -- \u6CE8\u610F: {name}==scratch-variable-name\n\tvarvalue   -- \u5909\u6570\u5024\u5F0F\n\tassignment -- \u5909\u6570\u3092\u5272\u308A\u5F53\u3066\u307E\u3059\n\tstatement  -- \u6587\n\u30A2\u30AF\u30B7\u30E7\u30F3\u30FB\u30BB\u30EC\u30AF\u30BF\u7A2E\u985E\u306F\u3001\u30B9\u30CB\u30DA\u30C3\u30C8\u306B\u767A\u751F\u3057\u305F\u5185\u5BB9\u3092\u793A\u3057\u307E\u3059\u3002\u5024\u306F\u6B21\u306E\u3068\u304A\u308A\u3067\u3059:\n\tadded     -- \u30B9\u30CB\u30DA\u30C3\u30C8\u304C\u8FFD\u52A0\u3055\u308C\u307E\u3057\u305F\n\tmodified  -- \u65E2\u5B58\u306E\u30B9\u30CB\u30DA\u30C3\u30C8\u304C\u5909\u66F4\u3055\u308C\u307E\u3057\u305F\n\treplaced  -- \u65E2\u5B58\u306E\u30B9\u30CB\u30DA\u30C3\u30C8\u304C\u65B0\u898F\u30B9\u30CB\u30DA\u30C3\u30C8\u3067\u7F6E\u63DB\u3055\u308C\u307E\u3057\u305F\n\toverwrote -- \u65E2\u5B58\u306E\u30B9\u30CB\u30DA\u30C3\u30C8\u304C\u30AA\u30FC\u30D0\u30FC\u30E9\u30A4\u30C9\u3055\u308C\u307E\u3057\u305F\n\tdropped   -- \u30B9\u30CB\u30DA\u30C3\u30C8\u304C\u524A\u9664\u3055\u308C\u307E\u3057\u305F\n\tused      -- \u4F7F\u7528\u3067\u304D\u306A\u3044\u3068\u304D\u306B\u30B9\u30CB\u30DA\u30C3\u30C8\u304C\u4F7F\u7528\u3055\u308C\u307E\u3057\u305F\n\u767A\u751F\u6642\u30BB\u30EC\u30AF\u30BF\u7A2E\u985E\u306F\u3001\u3053\u308C\u304C\u76F4\u63A5\u307E\u305F\u306F\u9593\u63A5\u30A2\u30AF\u30B7\u30E7\u30F3\u3067\u3042\u308B\u304B\u3092\u793A\u3057\u307E\u3059\u3002\u5024\u306F\u6B21\u306E\u3068\u304A\u308A\u3067\u3059:\n\tprimary -- \u5165\u529B\u3057\u305F\u30B9\u30CB\u30DA\u30C3\u30C8\n\tupdate  -- \u4F9D\u5B58\u30B9\u30CB\u30DA\u30C3\u30C8\u3078\u306E\u66F4\u65B0\n\u89E3\u6C7A\u72B6\u614B\u30BB\u30EC\u30AF\u30BF\u7A2E\u985E\u306F\u3001\u30B9\u30CB\u30DA\u30C3\u30C8\u306E\u89E3\u6C7A/\u5B9A\u7FA9\u306E\u72B6\u614B\u3092\u793A\u3057\u307E\u3059\u3002\u5024\u306F\u6B21\u306E\u3068\u304A\u308A\u3067\u3059:\n\tok         -- \
-\u6B63\u3057\u304F\u89E3\u6C7A\u3055\u308C\u307E\u3057\u305F\n\tdefined    -- \u5FA9\u5143\u53EF\u80FD\u3067\u672A\u89E3\u6C7A\u306E\u53C2\u7167\u306B\u3082\u304B\u304B\u308F\u3089\u305A\u5B9A\u7FA9\u3055\u308C\u307E\u3057\u305F\n\tnotdefined -- \u5FA9\u5143\u53EF\u80FD\u3067\u672A\u89E3\u6C7A\u306E\u53C2\u7167\u306E\u305F\u3081\u5B9A\u7FA9\u3055\u308C\u307E\u305B\u3093\n\u672A\u89E3\u6C7A\u6570\u30BB\u30EC\u30AF\u30BF\u7A2E\u985E\u306F\u3001\u672A\u89E3\u6C7A\u306E\u53C2\u7167\u306E\u6570\u3092\u793A\u3057\u307E\u3059\u3002\u5024\u306F\u6B21\u306E\u3068\u304A\u308A\u3067\u3059:\n\tunresolved0 -- \u672A\u89E3\u6C7A\u306E\u540D\u524D\u306F\u3042\u308A\u307E\u305B\u3093\n\tunresolved1 -- 1\u3064\u306E\u540D\u524D\u304C\u89E3\u6C7A\u3055\u308C\u3066\u3044\u307E\u305B\u3093\n\tunresolved2 -- 2\u3064\u4EE5\u4E0A\u306E\u540D\u524D\u304C\u89E3\u6C7A\u3055\u308C\u3066\u3044\u307E\u305B\u3093\n\u30A8\u30E9\u30FC\u6570\u30BB\u30EC\u30AF\u30BF\u7A2E\u985E\u306F\u3001\u30A8\u30E9\u30FC\u306E\u6570\u3092\u793A\u3057\u307E\u3059\u3002\u5024\u306F\u6B21\u306E\u3068\u304A\u308A\u3067\u3059:\n\terror0 -- \u30A8\u30E9\u30FC\u306A\u3057\n\terror1 -- 1\u3064\u306E\u30A8\u30E9\u30FC\n\terror2 -- 2\u3064\u4EE5\u4E0A\u306E\u30A8\u30E9\u30FC\n\n\u4F8B:\n\t/set format myformat action 'Created' added-primary\n\t/set format myformat action 'Update replaced' replaced-update\n\t/set format myformat display '{pre}{action} class {name}{post}' class-ok\n\t/set format myformat display '{pre}{action} \u5909\u6570 {name}\u3001null\u306B\u30EA\u30BB\u30C3\u30C8\u3055\u308C\u307E\u3057\u305F{post}' replaced-vardecl,varinit-ok-update\n\n\u30D5\u30A3\u30FC\u30EB\u30C9\u306B\u5BFE\u3059\u308B\u5F8C\u7D9A\u306E\u30BB\u30EC\u30AF\u30BF\u306B\u3088\u308A\u3001\u4EE5\u524D\u306B\u4F7F\u7528\u3055\u308C\u305F\u30BB\u30EC\u30AF\u30C8\u306E\u4E00\u90E8\u307E\u305F\u306F\u3059\u3079\u3066\u304C\u30AA\u30FC\u30D0\u30FC\u30E9\u30A4\u30C9\u3055\u308C\u308B\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059 -- \u6700\u5F8C\u306E\u30BB\u30EC\u30AF\u30BF\u304C\u6709\u52B9\u306B\u306A\u308A\u307E\u3059\n\n<format>\u306E\u306A\u3044\u5F62\u5F0F\u306F\u3001\u73FE\u5728\u306E\u30D5\u30A9\u30FC\u30DE\u30C3\u30C8\u8A2D\u5B9A\u3092\u8868\u793A\u3057\u307E\u3059\u3002\n<mode>\u304C\u6307\u5B9A\u3055\u308C\u3066\u3044\u308B\u5834\u5408\u3001\u305D\u306E\u30E2\u30FC\u30C9\u306E\u30D5\u30A9\u30FC\u30DE\u30C3\u30C8\u8A2D\u5B9A\u306E\u307F\u304C\u8868\u793A\u3055\u308C\u307E\u3059\u3002\n<mode>\u3068<field>\u306E\u4E21\u65B9\u304C\u6307\u5B9A\u3055\u308C\u3066\u3044\u308B\u5834\u5408\u3001\n\u305D\u306E\u30E2\u30FC\u30C9\u304A\u3088\u3073\u30D5\u30A3\u30FC\u30EB\u30C9\u306E\u30D5\u30A9\u30FC\u30DE\u30C3\u30C8\u8A2D\u5B9A\u306E\u307F\u304C\u8868\u793A\u3055\u308C\u307E\u3059\u3002\u4F8B:\n\t/set format myformat\n\u30E2\u30FC\u30C9myformat\u306E\u30D5\u30A9\u30FC\u30DE\u30C3\u30C8\u8A2D\u5B9A\u3092\u8868\u793A\u3057\u307E\u3059\n
+\u6B63\u3057\u304F\u89E3\u6C7A\u3055\u308C\u307E\u3057\u305F\n\tdefined    -- \u5FA9\u5143\u53EF\u80FD\u3067\u672A\u89E3\u6C7A\u306E\u53C2\u7167\u306B\u3082\u304B\u304B\u308F\u3089\u305A\u5B9A\u7FA9\u3055\u308C\u307E\u3057\u305F\n\tnotdefined -- \u5FA9\u5143\u53EF\u80FD\u3067\u672A\u89E3\u6C7A\u306E\u53C2\u7167\u306E\u305F\u3081\u5B9A\u7FA9\u3055\u308C\u307E\u305B\u3093\n\u672A\u89E3\u6C7A\u6570\u30BB\u30EC\u30AF\u30BF\u7A2E\u985E\u306F\u3001\u672A\u89E3\u6C7A\u306E\u53C2\u7167\u306E\u6570\u3092\u793A\u3057\u307E\u3059\u3002\u5024\u306F\u6B21\u306E\u3068\u304A\u308A\u3067\u3059:\n\tunresolved0 -- \u672A\u89E3\u6C7A\u306E\u540D\u524D\u306F\u3042\u308A\u307E\u305B\u3093\n\tunresolved1 -- 1\u3064\u306E\u540D\u524D\u304C\u89E3\u6C7A\u3055\u308C\u3066\u3044\u307E\u305B\u3093\n\tunresolved2 -- 2\u3064\u4EE5\u4E0A\u306E\u540D\u524D\u304C\u89E3\u6C7A\u3055\u308C\u3066\u3044\u307E\u305B\u3093\n\u30A8\u30E9\u30FC\u6570\u30BB\u30EC\u30AF\u30BF\u7A2E\u985E\u306F\u3001\u30A8\u30E9\u30FC\u306E\u6570\u3092\u793A\u3057\u307E\u3059\u3002\u5024\u306F\u6B21\u306E\u3068\u304A\u308A\u3067\u3059:\n\terror0 -- \u30A8\u30E9\u30FC\u306A\u3057\n\terror1 -- 1\u3064\u306E\u30A8\u30E9\u30FC\n\terror2 -- 2\u3064\u4EE5\u4E0A\u306E\u30A8\u30E9\u30FC\n\n\u4F8B:\n\t/set format mymode action '\u6B21\u3092\u4F5C\u6210\u3057\u307E\u3057\u305F:' added-primary\n\t/set format mymode action '\u6B21\u3092\u66F4\u65B0/\u7F6E\u63DB\u3057\u307E\u3057\u305F:' replaced-update\n\t/set format mymode display '{pre}{action} \u30AF\u30E9\u30B9 {name}{post}' class-ok\n\t/set format mymode display '{pre}{action} \u5909\u6570 {name}\u3001null\u306B\u30EA\u30BB\u30C3\u30C8\u3055\u308C\u307E\u3057\u305F{post}' replaced-vardecl,varinit-ok-update\n\n\u30D5\u30A3\u30FC\u30EB\u30C9\u306B\u5BFE\u3059\u308B\u5F8C\u7D9A\u306E\u30BB\u30EC\u30AF\u30BF\u306B\u3088\u308A\u3001\u4EE5\u524D\u306B\u4F7F\u7528\u3055\u308C\u305F\u30BB\u30EC\u30AF\u30C8\u306E\u4E00\u90E8\u307E\u305F\u306F\u3059\u3079\u3066\u304C\u30AA\u30FC\u30D0\u30FC\u30E9\u30A4\u30C9\u3055\u308C\u308B\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059 -- \u6700\u5F8C\u306E\u30BB\u30EC\u30AF\u30BF\u304C\u6709\u52B9\u306B\u306A\u308A\u307E\u3059\n\n<format>\u306E\u306A\u3044\u5F62\u5F0F\u306F\u3001\u73FE\u5728\u306E\u30D5\u30A9\u30FC\u30DE\u30C3\u30C8\u8A2D\u5B9A\u3092\u8868\u793A\u3057\u307E\u3059\u3002\n<mode>\u304C\u6307\u5B9A\u3055\u308C\u3066\u3044\u308B\u5834\u5408\u3001\u305D\u306E\u30E2\u30FC\u30C9\u306E\u30D5\u30A9\u30FC\u30DE\u30C3\u30C8\u8A2D\u5B9A\u306E\u307F\u304C\u8868\u793A\u3055\u308C\u307E\u3059\u3002\n<mode>\u3068<field>\u306E\u4E21\u65B9\u304C\u6307\u5B9A\u3055\u308C\u3066\u3044\u308B\u5834\u5408\u3001\n\u305D\u306E\u30E2\u30FC\u30C9\u304A\u3088\u3073\u30D5\u30A3\u30FC\u30EB\u30C9\u306E\u30D5\u30A9\u30FC\u30DE\u30C3\u30C8\u8A2D\u5B9A\u306E\u307F\u304C\u8868\u793A\u3055\u308C\u307E\u3059\u3002\u4F8B:\n\t/set format mymode\n\u30E2\u30FC\u30C9mymode\u306E\u30D5\u30A9\u30FC\u30DE\u30C3\u30C8\u8A2D\u5B9A\u3092\u8868\u793A\u3057\u307E\u3059\n
+
+help.set.truncation.summary = \u8868\u793A\u3055\u308C\u308B\u5024\u306E\u6700\u5927\u9577\u3092\u8A2D\u5B9A\u3057\u307E\u3059\u3002
 
-help.set.truncation = \u8868\u793A\u3055\u308C\u308B\u5024\u306E\u6700\u5927\u9577\u3092\u8A2D\u5B9A\u3057\u307E\u3059:\n\n\t/set truncation <mode> <length> <selector>...\n\n\u73FE\u5728\u306E\u5207\u6368\u3066\u8A2D\u5B9A\u3092\u8868\u793A\u3057\u307E\u3059:\n\n\t/set truncation [<mode>]\n\n<mode>\u306F\u4E8B\u524D\u306B\u5B9A\u7FA9\u3055\u308C\u305F\u30D5\u30A3\u30FC\u30C9\u30D0\u30C3\u30AF\u30FB\u30E2\u30FC\u30C9\u306E\u540D\u524D\u3067\u3059 -- '/help /set mode'\u3092\u53C2\u7167\u3057\u3066\u304F\u3060\u3055\u3044\u3002\n<length>\u306F\u6700\u5927\u9577\u3092\u8868\u3059\u7B26\u53F7\u306A\u3057\u6574\u6570\u3067\u3059\u3002\n<selector>\u306F\u3001\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u306B\u3088\u3063\u3066\u5207\u6368\u3066\u9577\u306E\u5024\u3092\u5FAE\u8ABF\u6574\u3059\u308B\u5834\u5408\u306B\u306E\u307F\n\u5FC5\u8981\u3067\u3059\u3002<selector>\u306F\u3001\u5207\u6368\u3066\u304C\u9069\u7528\u3055\u308C\u308B\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u3067\u3059\u3002\n\u30BB\u30EC\u30AF\u30BF\u69CB\u9020\u306F\u3001\u30BB\u30EC\u30AF\u30BF\u7A2E\u985E\u30EA\u30B9\u30C8\u306E\u30CF\u30A4\u30D5\u30F3\u533A\u5207\u308A\u306E\u30EA\u30B9\u30C8\u3067\u3059\u3002\n\u30BB\u30EC\u30AF\u30BF\u7A2E\u985E\u30EA\u30B9\u30C8\u306F\u30011\u3064\u306E\u30BB\u30EC\u30AF\u30BF\u7A2E\u985E\u306E\u5024\u306E\u30AB\u30F3\u30DE\u533A\u5207\u308A\u306E\u30EA\u30B9\u30C8\u3067\u3059\u3002\n\u30BB\u30EC\u30AF\u30BF\u306F\u5404\u30BB\u30EC\u30AF\u30BF\u7A2E\u985E\u30EA\u30B9\u30C8\u304C\u4E00\u81F4\u3059\u308C\u3070\u4E00\u81F4\u3068\u306A\u308A\u307E\u3059\u3002\u30BB\u30EC\u30AF\u30BF\u7A2E\u985E\u30EA\u30B9\u30C8\u306F\n\u3044\u305A\u308C\u304B\u306E\u5024\u304C\u4E00\u81F4\u3059\u308C\u3070\u4E00\u81F4\u3068\u306A\u308A\u307E\u3059\u3002\n\n\u6B21\u306B\u793A\u3059\u306E\u306F\u3001\u5207\u6368\u3066\u306B\u95A2\u9023\u3059\u308B\u30BB\u30EC\u30AF\u30BF\u7A2E\u985E\u3067\u3059\u3002\n\n\u30B1\u30FC\u30B9\u30FB\u30BB\u30EC\u30AF\u30BF\u7A2E\u985E\u306F\u3001\u30B9\u30CB\u30DA\u30C3\u30C8\u306E\u7A2E\u985E\u3092\u793A\u3057\u307E\u3059\u3002\u5024\u306F\u6B21\u306E\u3068\u304A\u308A\u3067\u3059:\n\tvardecl    -- \u521D\u671F\u5316\u3057\u306A\u3044\u5909\u6570\u5BA3\u8A00\n\tvarinit    -- \u521D\u671F\u5316\u3059\u308B\u5909\u6570\u5BA3\u8A00\n\texpression -- \u5F0F -- \u6CE8\u610F: {name}==scratch-variable-name\n\tvarvalue   -- \u5909\u6570\u5024\u5F0F\n\tassignment -- \u5909\u6570\u3092\u5272\u308A\u5F53\u3066\u307E\u3059\n\t\u30A2\u30AF\u30B7\u30E7\u30F3\u30FB\u30BB\u30EC\u30AF\u30BF\u7A2E\u985E\u306F\u3001\u30B9\u30CB\u30DA\u30C3\u30C8\u306B\u767A\u751F\u3057\u305F\u5185\u5BB9\u3092\u793A\u3057\u307E\u3059\u3002\u5024\u306F\u6B21\u306E\u3068\u304A\u308A\u3067\u3059:\n\tadded     -- \u30B9\u30CB\u30DA\u30C3\u30C8\u304C\u8FFD\u52A0\u3055\u308C\u307E\u3057\u305F\n\tmodified  -- \u65E2\u5B58\u306E\u30B9\u30CB\u30DA\u30C3\u30C8\u304C\u5909\u66F4\u3055\u308C\u307E\u3057\u305F\n\treplaced  -- \u65E2\u5B58\u306E\u30B9\u30CB\u30DA\u30C3\u30C8\u304C\u65B0\u898F\u30B9\u30CB\u30DA\u30C3\u30C8\u3067\u7F6E\u63DB\u3055\u308C\u307E\u3057\u305F\n\u4F8B:\n\t/set trunc mymode 80\n\t/set truncation mymode 45 expression\n\t/set truncation mymode 0 vardecl-modified,replaced\n\n\u30D5\u30A3\u30FC\u30EB\u30C9\u306B\u5BFE\u3059\u308B\u5F8C\u7D9A\u306E\u30BB\u30EC\u30AF\u30BF\u306B\u3088\u308A\u3001\u4EE5\u524D\u306B\u4F7F\u7528\u3055\u308C\u305F\u30BB\u30EC\u30AF\u30BF\u306E\u4E00\u90E8\u307E\u305F\u306F\u3059\u3079\u3066\u304C\u4E0A\u66F8\u304D\u3055\u308C\u308B\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059 -- \u6700\u5F8C\u306E\u30BB\u30EC\u30AF\u30BF\u304C\u6709\u52B9\u306B\u306A\u308A\u307E\u3059\n\n<length>\u306E\u306A\u3044\u5F62\u5F0F\u306F\u3001\u5207\u6368\u3066\u8A2D\u5B9A\u3092\u8868\u793A\u3057\u307E\u3059\u3002\n<mode>\u304C\u6307\u5B9A\u3055\u308C\u3066\u3044\u308B\u5834\u5408\u3001\u305D\u306E\u30E2\u30FC\u30C9\u306E\u5207\u6368\u3066\u8A2D\u5B9A\u306E\u307F\u304C\u8868\u793A\u3055\u308C\u307E\u3059\u3002\n\u4F8B:\n\t/set truncation \
-myformat\n\u30E2\u30FC\u30C9myformat\u306E\u5207\u6368\u3066\u8A2D\u5B9A\u3092\u8868\u793A\u3057\u307E\u3059\n
+help.set.truncation = \u8868\u793A\u3055\u308C\u308B\u5024\u306E\u6700\u5927\u9577\u3092\u8A2D\u5B9A\u3057\u307E\u3059:\n\n\t/set truncation <mode> <length> <selector>...\n\n\u73FE\u5728\u306E\u5207\u6368\u3066\u8A2D\u5B9A\u3092\u8868\u793A\u3057\u307E\u3059:\n\n\t/set truncation [<mode>]\n\n<mode>\u306F\u4E8B\u524D\u306B\u5B9A\u7FA9\u3055\u308C\u305F\u30D5\u30A3\u30FC\u30C9\u30D0\u30C3\u30AF\u30FB\u30E2\u30FC\u30C9\u306E\u540D\u524D\u3067\u3059 -- '/help /set mode'\u3092\u53C2\u7167\u3057\u3066\u304F\u3060\u3055\u3044\u3002\n<length>\u306F\u6700\u5927\u9577\u3092\u8868\u3059\u7B26\u53F7\u306A\u3057\u6574\u6570\u3067\u3059\u3002\n<selector>\u306F\u3001\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u306B\u3088\u3063\u3066\u5207\u6368\u3066\u9577\u306E\u5024\u3092\u5FAE\u8ABF\u6574\u3059\u308B\u5834\u5408\u306B\u306E\u307F\n\u5FC5\u8981\u3067\u3059\u3002<selector>\u306F\u3001\u5207\u6368\u3066\u304C\u9069\u7528\u3055\u308C\u308B\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u3067\u3059\u3002\n\u30BB\u30EC\u30AF\u30BF\u69CB\u9020\u306F\u3001\u30BB\u30EC\u30AF\u30BF\u7A2E\u985E\u30EA\u30B9\u30C8\u306E\u30CF\u30A4\u30D5\u30F3\u533A\u5207\u308A\u306E\u30EA\u30B9\u30C8\u3067\u3059\u3002\n\u30BB\u30EC\u30AF\u30BF\u7A2E\u985E\u30EA\u30B9\u30C8\u306F\u30011\u3064\u306E\u30BB\u30EC\u30AF\u30BF\u7A2E\u985E\u306E\u5024\u306E\u30AB\u30F3\u30DE\u533A\u5207\u308A\u306E\u30EA\u30B9\u30C8\u3067\u3059\u3002\n\u30BB\u30EC\u30AF\u30BF\u306F\u5404\u30BB\u30EC\u30AF\u30BF\u7A2E\u985E\u30EA\u30B9\u30C8\u304C\u4E00\u81F4\u3059\u308C\u3070\u4E00\u81F4\u3068\u306A\u308A\u307E\u3059\u3002\u30BB\u30EC\u30AF\u30BF\u7A2E\u985E\u30EA\u30B9\u30C8\u306F\n\u3044\u305A\u308C\u304B\u306E\u5024\u304C\u4E00\u81F4\u3059\u308C\u3070\u4E00\u81F4\u3068\u306A\u308A\u307E\u3059\u3002\n\n\u6B21\u306B\u793A\u3059\u306E\u306F\u3001\u5207\u6368\u3066\u306B\u95A2\u9023\u3059\u308B\u30BB\u30EC\u30AF\u30BF\u7A2E\u985E\u3067\u3059\u3002\n\n\u30B1\u30FC\u30B9\u30FB\u30BB\u30EC\u30AF\u30BF\u7A2E\u985E\u306F\u3001\u30B9\u30CB\u30DA\u30C3\u30C8\u306E\u7A2E\u985E\u3092\u793A\u3057\u307E\u3059\u3002\u5024\u306F\u6B21\u306E\u3068\u304A\u308A\u3067\u3059:\n\tvardecl    -- \u521D\u671F\u5316\u3057\u306A\u3044\u5909\u6570\u5BA3\u8A00\n\tvarinit    -- \u521D\u671F\u5316\u3059\u308B\u5909\u6570\u5BA3\u8A00\n\texpression -- \u5F0F -- \u6CE8\u610F: {name}==scratch-variable-name\n\tvarvalue   -- \u5909\u6570\u5024\u5F0F\n\tassignment -- \u5909\u6570\u3092\u5272\u308A\u5F53\u3066\u307E\u3059\n\u30A2\u30AF\u30B7\u30E7\u30F3\u30FB\u30BB\u30EC\u30AF\u30BF\u7A2E\u985E\u306F\u3001\u30B9\u30CB\u30DA\u30C3\u30C8\u306B\u767A\u751F\u3057\u305F\u5185\u5BB9\u3092\u793A\u3057\u307E\u3059\u3002\u5024\u306F\u6B21\u306E\u3068\u304A\u308A\u3067\u3059:\n\tadded     -- \u30B9\u30CB\u30DA\u30C3\u30C8\u304C\u8FFD\u52A0\u3055\u308C\u307E\u3057\u305F\n\tmodified  -- \u65E2\u5B58\u306E\u30B9\u30CB\u30DA\u30C3\u30C8\u304C\u5909\u66F4\u3055\u308C\u307E\u3057\u305F\n\treplaced  -- \u65E2\u5B58\u306E\u30B9\u30CB\u30DA\u30C3\u30C8\u304C\u65B0\u898F\u30B9\u30CB\u30DA\u30C3\u30C8\u3067\u7F6E\u63DB\u3055\u308C\u307E\u3057\u305F\n\u4F8B:\n\t/set trunc mymode 80\n\t/set truncation mymode 45 expression\n\t/set truncation mymode 0 vardecl-modified,replaced\n\n\u30D5\u30A3\u30FC\u30EB\u30C9\u306B\u5BFE\u3059\u308B\u5F8C\u7D9A\u306E\u30BB\u30EC\u30AF\u30BF\u306B\u3088\u308A\u3001\u4EE5\u524D\u306B\u4F7F\u7528\u3055\u308C\u305F\u30BB\u30EC\u30AF\u30BF\u306E\u4E00\u90E8\u307E\u305F\u306F\u3059\u3079\u3066\u304C\u4E0A\u66F8\u304D\u3055\u308C\u308B\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059 -- \u6700\u5F8C\u306E\u30BB\u30EC\u30AF\u30BF\u304C\u6709\u52B9\u306B\u306A\u308A\u307E\u3059\n\n<length>\u306E\u306A\u3044\u5F62\u5F0F\u306F\u3001\u5207\u6368\u3066\u8A2D\u5B9A\u3092\u8868\u793A\u3057\u307E\u3059\u3002\n<mode>\u304C\u6307\u5B9A\u3055\u308C\u3066\u3044\u308B\u5834\u5408\u3001\u305D\u306E\u30E2\u30FC\u30C9\u306E\u5207\u6368\u3066\u8A2D\u5B9A\u306E\u307F\u304C\u8868\u793A\u3055\u308C\u307E\u3059\u3002\n\u4F8B:\n\t/set truncation \
+mymode\n\u30E2\u30FC\u30C9mymode\u306E\u5207\u6368\u3066\u8A2D\u5B9A\u3092\u8868\u793A\u3057\u307E\u3059\n
+
+help.set.feedback.summary = \u5165\u529B\u3057\u305F\u30B9\u30CB\u30DA\u30C3\u30C8\u304A\u3088\u3073\u30B3\u30DE\u30F3\u30C9\u306B\u5BFE\u3057\u3066\u8868\u793A\u3055\u308C\u308B\u30D5\u30A3\u30FC\u30C9\u30D0\u30C3\u30AF\u3092\u793A\u3059\u3001\u30D5\u30A3\u30FC\u30C9\u30D0\u30C3\u30AF\u30FB\u30E2\u30FC\u30C9\u3092\u8A2D\u5B9A\u3057\u307E\u3059\u3002
 
 help.set.feedback = \u5165\u529B\u3057\u305F\u30B9\u30CB\u30DA\u30C3\u30C8\u304A\u3088\u3073\u30B3\u30DE\u30F3\u30C9\u306B\u5BFE\u3057\u3066\u8868\u793A\u3055\u308C\u308B\u30D5\u30A3\u30FC\u30C9\u30D0\u30C3\u30AF\u3092\u793A\u3059\u3001\u30D5\u30A3\u30FC\u30C9\u30D0\u30C3\u30AF\u30FB\u30E2\u30FC\u30C9\u3092\u8A2D\u5B9A\u3057\u307E\u3059:\n\n\t/set feedback [-retain] <mode>\n\n\u5C06\u6765\u306E\u30BB\u30C3\u30B7\u30E7\u30F3\u306E\u305F\u3081\u306B\u73FE\u5728\u306E\u30D5\u30A3\u30FC\u30C9\u30D0\u30C3\u30AF\u30FB\u30E2\u30FC\u30C9\u3092\u4FDD\u6301\u3057\u307E\u3059:\n\n\t/set feedback -retain\n\n\u30D5\u30A3\u30FC\u30C9\u30D0\u30C3\u30AF\u30FB\u30E2\u30FC\u30C9\u3092\u8868\u793A\u3057\u3001\u4F7F\u7528\u53EF\u80FD\u306A\u30E2\u30FC\u30C9\u3092\u30EA\u30B9\u30C8\u3057\u307E\u3059:\n\n\t/set feedback\n\n<mode>\u306F\u4E8B\u524D\u306B\u5B9A\u7FA9\u3055\u308C\u305F\u30D5\u30A3\u30FC\u30C9\u30D0\u30C3\u30AF\u30FB\u30E2\u30FC\u30C9\u306E\u540D\u524D\u3067\u3059\u3002\n\u4E00\u610F\u306B\u3059\u308B\u305F\u3081\u306B\u5FC5\u8981\u306A\u6587\u5B57\u3092\u4F7F\u7528\u3067\u304D\u307E\u3059\u3002\n\u30E6\u30FC\u30B6\u30FC\u5B9A\u7FA9\u30E2\u30FC\u30C9\u306F\u8FFD\u52A0\u3067\u304D\u307E\u3059\u3002'/help /set mode'\u3092\u53C2\u7167\u3057\u3066\u304F\u3060\u3055\u3044\n\n-retain\u30AA\u30D7\u30B7\u30E7\u30F3\u304C\u4F7F\u7528\u3055\u308C\u3066\u3044\u308B\u5834\u5408\u3001\u8A2D\u5B9A\u306Fjshell\u30C4\u30FC\u30EB\u306E\u3053\u306E\u5B9F\u884C\u3068\u5C06\u6765\u306E\n\u5B9F\u884C\u3067\u4F7F\u7528\u3055\u308C\u307E\u3059\u3002\n\n<mode>\u307E\u305F\u306F-retain\u306E\u306A\u3044\u5F62\u5F0F\u306F\u3001\u73FE\u5728\u306E\u30D5\u30A3\u30FC\u30C9\u30D0\u30C3\u30AF\u30FB\u30E2\u30FC\u30C9\u304A\u3088\u3073\u4F7F\u7528\u53EF\u80FD\u306A\u30E2\u30FC\u30C9\u3092\u8868\u793A\u3057\u307E\u3059\u3002\n
 
-help.set.mode = \u30E6\u30FC\u30B6\u30FC\u5B9A\u7FA9\u30D5\u30A3\u30FC\u30C9\u30D0\u30C3\u30AF\u30FB\u30E2\u30FC\u30C9\u3092\u4F5C\u6210\u3057\u307E\u3059\u3002\u5FC5\u8981\u306B\u5FDC\u3058\u3066\u65E2\u5B58\u306E\u30E2\u30FC\u30C9\u304B\u3089\u30B3\u30D4\u30FC\u3057\u307E\u3059:\n\n\t/set mode <new-mode> [<old-mode>] (-command|-quiet)\n\n\u5C06\u6765\u306E\u30BB\u30C3\u30B7\u30E7\u30F3\u306E\u305F\u3081\u306B\u30E6\u30FC\u30B6\u30FC\u5B9A\u7FA9\u30D5\u30A3\u30FC\u30C9\u30D0\u30C3\u30AF\u30FB\u30E2\u30FC\u30C9\u3092\u4FDD\u6301\u3057\u307E\u3059:\n\n\t/set mode -retain <mode>\n\n\u30E6\u30FC\u30B6\u30FC\u5B9A\u7FA9\u30D5\u30A3\u30FC\u30C9\u30D0\u30C3\u30AF\u30FB\u30E2\u30FC\u30C9\u3092\u524A\u9664\u3057\u307E\u3059:\n\n\t/set mode -delete [-retain] <mode>\n\n\u30D5\u30A3\u30FC\u30C9\u30D0\u30C3\u30AF\u30FB\u30E2\u30FC\u30C9\u8A2D\u5B9A\u3092\u8868\u793A\u3057\u307E\u3059:\n\n\t/set mode [<mode>]\n\n<new-mode>\u306F\u4F5C\u6210\u3059\u308B\u30E2\u30FC\u30C9\u306E\u540D\u524D\u3067\u3059\u3002\n<old-mode>\u306F\u65E2\u5B58\u306E\u30D5\u30A3\u30FC\u30C9\u30D0\u30C3\u30AF\u30FB\u30E2\u30FC\u30C9\u306E\u540D\u524D\u3067\u3059\u3002\n<mode>\u306F\u65E2\u5B58\u306E\u30D5\u30A3\u30FC\u30C9\u30D0\u30C3\u30AF\u30FB\u30E2\u30FC\u30C9\u306E\u540D\u524D\u3067\u3059\u3002\n\n<old-mode>\u304C\u5B58\u5728\u3059\u308B\u5834\u5408\u3001\u305D\u306E\u8A2D\u5B9A\u304C\u65B0\u898F\u30E2\u30FC\u30C9\u306B\u30B3\u30D4\u30FC\u3055\u308C\u307E\u3059\u3002\n\n\u5165\u529B\u3055\u308C\u305F\u30B9\u30CB\u30DA\u30C3\u30C8\u306B\u30E2\u30FC\u30C9\u304C\u63D0\u4F9B\u3059\u308B\u30D5\u30A3\u30FC\u30C9\u30D0\u30C3\u30AF\u306F\u3001'/set format'\u8A2D\u5B9A\u306B\u3088\u3063\u3066\n\u6C7A\u5B9A\u3055\u308C\u307E\u3059\u3002\u305F\u3060\u3057\u3001\u5165\u529B\u3055\u308C\u305F\u30B3\u30DE\u30F3\u30C9\u306E\u5834\u5408\u3001\u30E2\u30FC\u30C9\u4F5C\u6210\u6642\u306B\n\u4F7F\u7528\u3055\u308C\u305F\u30AA\u30D7\u30B7\u30E7\u30F3\u306B\u5F93\u3063\u3066\u3001\u30D5\u30A3\u30FC\u30C9\u30D0\u30C3\u30AF\u306F\u30AA\u30F3\u307E\u305F\u306F\u30AA\u30D5\u306E\u3044\u305A\u308C\u304B\u306B\u306A\u308A\u307E\u3059\u3002\n\u30AA\u30D7\u30B7\u30E7\u30F3'-command'\u307E\u305F\u306F\u30AA\u30D7\u30B7\u30E7\u30F3'-quiet'\u306E\u3044\u305A\u308C\u304B\u3092\u6307\u5B9A\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002\n'-command'\u304C\u4F7F\u7528\u3055\u308C\u3066\u3044\u308B\u5834\u5408\u3001\u65B0\u898F\u30E2\u30FC\u30C9\u306E\u5834\u5408\u3001\u60C5\u5831/\u691C\u8A3C\u4E2D\u306E\u30B3\u30DE\u30F3\u30C9\u30FB\u30D5\u30A3\u30FC\u30C9\u30D0\u30C3\u30AF\u304C\u8868\u793A\u3055\u308C\u307E\u3059\u3002\n'-quiet'\u304C\u4F7F\u7528\u3055\u308C\u3066\u3044\u308B\u5834\u5408\u3001\u5FC5\u8981\u306A\u30D5\u30A3\u30FC\u30C9\u30D0\u30C3\u30AF(\u30A8\u30E9\u30FC\u306A\u3069)\u306E\u307F\u8868\u793A\u3055\u308C\u307E\u3059\u3002\n\n\u65B0\u898F\u30E2\u30FC\u30C9\u3092\u4F5C\u6210\u3057\u305F\u3089\u3001'/set format'\u3001'/set prompt'\u304A\u3088\u3073'/set truncation'\u3092\u4F7F\u7528\u3057\u3066\n\u69CB\u6210\u3057\u307E\u3059\u3002\u65B0\u898F\u30E2\u30FC\u30C9\u3092\u4F7F\u7528\u3059\u308B\u306B\u306F\u3001'/set \
-feedback'\u3092\u4F7F\u7528\u3057\u307E\u3059\u3002\n\n'-retain'\u30AA\u30D7\u30B7\u30E7\u30F3\u304C\u4F7F\u7528\u3055\u308C\u3066\u3044\u308B\u5834\u5408('-delete'\u30AA\u30D7\u30B7\u30E7\u30F3\u306A\u3057)\u3001\n\u30E2\u30FC\u30C9(\u73FE\u5728\u306E\u30D7\u30ED\u30F3\u30D7\u30C8\u3001\u30D5\u30A9\u30FC\u30DE\u30C3\u30C8\u304A\u3088\u3073\u5207\u6368\u3066\u8A2D\u5B9A\u3092\u542B\u3080)\u306F\u3001\u5C06\u6765\u306E\u5B9F\u884C\u3067\n\u4F7F\u7528\u3067\u304D\u308B\u3088\u3046\u306Bjshell\u30C4\u30FC\u30EB\u306B\u683C\u7D0D\u3055\u308C\u307E\u3059\u3002retain\u304C\u4F7F\u7528\u3055\u308C\u3066\u3044\u306A\u3044\u5834\u5408\u3001\n\u30E2\u30FC\u30C9\u306F\u73FE\u5728\u306E\u30BB\u30C3\u30B7\u30E7\u30F3\u3067\u306E\u307F\u5B9A\u7FA9\u3055\u308C\u307E\u3059\u3002\u30E2\u30FC\u30C9\u306E\u8A2D\u5B9A\u3092\u66F4\u65B0\u3057\u305F\u5F8C\u3001\n\u30BB\u30C3\u30B7\u30E7\u30F3\u9593\u3067\u66F4\u65B0\u3092\u4FDD\u5B58\u3059\u308B\u306B\u306F\u3001\u30E2\u30FC\u30C9\u3092\u518D\u5EA6\u4FDD\u6301\u3057\u307E\u3059\u3002\n\n'-delete'\u30AA\u30D7\u30B7\u30E7\u30F3\u306E\u307F\u304C\u4F7F\u7528\u3055\u308C\u3066\u3044\u308B\u5834\u5408\u3001\u30E2\u30FC\u30C9\u306F\u73FE\u5728\u306E\u30BB\u30C3\u30B7\u30E7\u30F3\u304B\u3089\u524A\u9664\u3055\u308C\u307E\u3059\u3002\n'-retain'\u3068'-delete'\u30AA\u30D7\u30B7\u30E7\u30F3\u306E\u4E21\u65B9\u304C\u4F7F\u7528\u3055\u308C\u3066\u3044\u308B\u5834\u5408\u3001\u30E2\u30FC\u30C9\u306F\u73FE\u5728\u3068\u5C06\u6765\u306E\u30BB\u30C3\u30B7\u30E7\u30F3\u304B\u3089\n\u524A\u9664\u3055\u308C\u307E\u3059\u3002\n\n\u30AA\u30D7\u30B7\u30E7\u30F3\u306E\u306A\u3044\u5F62\u5F0F\u306F\u3001\u30E2\u30FC\u30C9\u8A2D\u5B9A\u3092\u8868\u793A\u3057\u307E\u3059\u3002\n<mode>\u304C\u6307\u5B9A\u3055\u308C\u3066\u3044\u308B\u5834\u5408\u3001\u305D\u306E\u30E2\u30FC\u30C9\u306E\u30E2\u30FC\u30C9\u8A2D\u5B9A\u306E\u307F\u304C\u8868\u793A\u3055\u308C\u307E\u3059\u3002\n\u6CE8\u610F: \u30E2\u30FC\u30C9\u306E\u8A2D\u5B9A\u306B\u306F\u3001\u30D7\u30ED\u30F3\u30D7\u30C8\u3001\u30D5\u30A9\u30FC\u30DE\u30C3\u30C8\u304A\u3088\u3073\u5207\u6368\u3066\u306E\u8A2D\u5B9A\u304C\n\u542B\u307E\u308C\u307E\u3059\u3002\n\u4F8B:\n\t/set mode myformat\n\n\u30E2\u30FC\u30C9myformat\u306E\u30E2\u30FC\u30C9\u3001\u30D7\u30ED\u30F3\u30D7\u30C8\u3001\u30D5\u30A9\u30FC\u30DE\u30C3\u30C8\u304A\u3088\u3073\u5207\u6368\u3066\u8A2D\u5B9A\u3092\u8868\u793A\u3057\u307E\u3059
+help.set.mode.summary = \u30E6\u30FC\u30B6\u30FC\u5B9A\u7FA9\u30D5\u30A3\u30FC\u30C9\u30D0\u30C3\u30AF\u30FB\u30E2\u30FC\u30C9\u3092\u4F5C\u6210\u3057\u307E\u3059\u3002\u5FC5\u8981\u306B\u5FDC\u3058\u3066\u65E2\u5B58\u306E\u30E2\u30FC\u30C9\u304B\u3089\u30B3\u30D4\u30FC\u3057\u307E\u3059\u3002
+
+help.set.mode = \u30E6\u30FC\u30B6\u30FC\u5B9A\u7FA9\u30D5\u30A3\u30FC\u30C9\u30D0\u30C3\u30AF\u30FB\u30E2\u30FC\u30C9\u3092\u4F5C\u6210\u3057\u307E\u3059\u3002\u5FC5\u8981\u306B\u5FDC\u3058\u3066\u65E2\u5B58\u306E\u30E2\u30FC\u30C9\u304B\u3089\u30B3\u30D4\u30FC\u3057\u307E\u3059:\n\n\t/set mode <new-mode> [<old-mode>] (-command|-quiet)\n\n\u5C06\u6765\u306E\u30BB\u30C3\u30B7\u30E7\u30F3\u306E\u305F\u3081\u306B\u30E6\u30FC\u30B6\u30FC\u5B9A\u7FA9\u30D5\u30A3\u30FC\u30C9\u30D0\u30C3\u30AF\u30FB\u30E2\u30FC\u30C9\u3092\u4FDD\u6301\u3057\u307E\u3059:\n\n\t/set mode -retain <mode>\n\n\u30E6\u30FC\u30B6\u30FC\u5B9A\u7FA9\u30D5\u30A3\u30FC\u30C9\u30D0\u30C3\u30AF\u30FB\u30E2\u30FC\u30C9\u3092\u524A\u9664\u3057\u307E\u3059:\n\n\t/set mode -delete [-retain] <mode>\n\n\u30D5\u30A3\u30FC\u30C9\u30D0\u30C3\u30AF\u30FB\u30E2\u30FC\u30C9\u8A2D\u5B9A\u3092\u8868\u793A\u3057\u307E\u3059:\n\n\t/set mode [<mode>]\n\n<new-mode>\u306F\u4F5C\u6210\u3059\u308B\u30E2\u30FC\u30C9\u306E\u540D\u524D\u3067\u3059\u3002\n<old-mode>\u306F\u65E2\u5B58\u306E\u30D5\u30A3\u30FC\u30C9\u30D0\u30C3\u30AF\u30FB\u30E2\u30FC\u30C9\u306E\u540D\u524D\u3067\u3059\u3002\n<mode>\u306F\u65E2\u5B58\u306E\u30D5\u30A3\u30FC\u30C9\u30D0\u30C3\u30AF\u30FB\u30E2\u30FC\u30C9\u306E\u540D\u524D\u3067\u3059\u3002\n\n<old-mode>\u304C\u5B58\u5728\u3059\u308B\u5834\u5408\u3001\u305D\u306E\u8A2D\u5B9A\u304C\u65B0\u898F\u30E2\u30FC\u30C9\u306B\u30B3\u30D4\u30FC\u3055\u308C\u307E\u3059\u3002\n\n\u5165\u529B\u3055\u308C\u305F\u30B9\u30CB\u30DA\u30C3\u30C8\u306B\u30E2\u30FC\u30C9\u304C\u63D0\u4F9B\u3059\u308B\u30D5\u30A3\u30FC\u30C9\u30D0\u30C3\u30AF\u306F\u3001'/set format'\u8A2D\u5B9A\u306B\u3088\u3063\u3066\n\u6C7A\u5B9A\u3055\u308C\u307E\u3059\u3002\u305F\u3060\u3057\u3001\u5165\u529B\u3055\u308C\u305F\u30B3\u30DE\u30F3\u30C9\u306E\u5834\u5408\u3001\u30E2\u30FC\u30C9\u4F5C\u6210\u6642\u306B\n\u4F7F\u7528\u3055\u308C\u305F\u30AA\u30D7\u30B7\u30E7\u30F3\u306B\u5F93\u3063\u3066\u3001\u30D5\u30A3\u30FC\u30C9\u30D0\u30C3\u30AF\u306F\u30AA\u30F3\u307E\u305F\u306F\u30AA\u30D5\u306E\u3044\u305A\u308C\u304B\u306B\u306A\u308A\u307E\u3059\u3002\n\u30AA\u30D7\u30B7\u30E7\u30F3'-command'\u307E\u305F\u306F\u30AA\u30D7\u30B7\u30E7\u30F3'-quiet'\u306E\u3044\u305A\u308C\u304B\u3092\u6307\u5B9A\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002\n'-command'\u304C\u4F7F\u7528\u3055\u308C\u3066\u3044\u308B\u5834\u5408\u3001\u65B0\u898F\u30E2\u30FC\u30C9\u3067\u306F\u3001\u60C5\u5831/\u691C\u8A3C\u4E2D\u306E\u30B3\u30DE\u30F3\u30C9\u30FB\u30D5\u30A3\u30FC\u30C9\u30D0\u30C3\u30AF\u304C\u8868\u793A\u3055\u308C\u307E\u3059\u3002\n'-quiet'\u304C\u4F7F\u7528\u3055\u308C\u3066\u3044\u308B\u5834\u5408\u3001\u5FC5\u8981\u306A\u30D5\u30A3\u30FC\u30C9\u30D0\u30C3\u30AF(\u30A8\u30E9\u30FC\u306A\u3069)\u306E\u307F\u8868\u793A\u3055\u308C\u307E\u3059\u3002\n\n\u65B0\u898F\u30E2\u30FC\u30C9\u3092\u4F5C\u6210\u3057\u305F\u3089\u3001'/set format'\u3001'/set prompt'\u304A\u3088\u3073'/set truncation'\u3092\u4F7F\u7528\u3057\u3066\n\u69CB\u6210\u3057\u307E\u3059\u3002\u65B0\u898F\u30E2\u30FC\u30C9\u3092\u4F7F\u7528\u3059\u308B\u306B\u306F\u3001'/set \
+feedback'\u3092\u4F7F\u7528\u3057\u307E\u3059\u3002\n\n'-retain'\u30AA\u30D7\u30B7\u30E7\u30F3\u304C\u4F7F\u7528\u3055\u308C\u3066\u3044\u308B\u5834\u5408('-delete'\u30AA\u30D7\u30B7\u30E7\u30F3\u306A\u3057)\u3001\n\u30E2\u30FC\u30C9(\u73FE\u5728\u306E\u30D7\u30ED\u30F3\u30D7\u30C8\u3001\u30D5\u30A9\u30FC\u30DE\u30C3\u30C8\u304A\u3088\u3073\u5207\u6368\u3066\u8A2D\u5B9A\u3092\u542B\u3080)\u306F\u3001\u5C06\u6765\u306E\u5B9F\u884C\u3067\n\u4F7F\u7528\u3067\u304D\u308B\u3088\u3046\u306Bjshell\u30C4\u30FC\u30EB\u306B\u683C\u7D0D\u3055\u308C\u307E\u3059\u3002retain\u304C\u4F7F\u7528\u3055\u308C\u3066\u3044\u306A\u3044\u5834\u5408\u3001\n\u30E2\u30FC\u30C9\u306F\u73FE\u5728\u306E\u30BB\u30C3\u30B7\u30E7\u30F3\u3067\u306E\u307F\u5B9A\u7FA9\u3055\u308C\u307E\u3059\u3002\u30E2\u30FC\u30C9\u306E\u8A2D\u5B9A\u3092\u66F4\u65B0\u3057\u305F\u5F8C\u3001\n\u30BB\u30C3\u30B7\u30E7\u30F3\u9593\u3067\u66F4\u65B0\u3092\u4FDD\u5B58\u3059\u308B\u306B\u306F\u3001\u30E2\u30FC\u30C9\u3092\u518D\u5EA6\u4FDD\u6301\u3057\u307E\u3059\u3002\n\n'-delete'\u30AA\u30D7\u30B7\u30E7\u30F3\u306E\u307F\u304C\u4F7F\u7528\u3055\u308C\u3066\u3044\u308B\u5834\u5408\u3001\u30E2\u30FC\u30C9\u306F\u73FE\u5728\u306E\u30BB\u30C3\u30B7\u30E7\u30F3\u304B\u3089\u524A\u9664\u3055\u308C\u307E\u3059\u3002\n'-retain'\u3068'-delete'\u30AA\u30D7\u30B7\u30E7\u30F3\u306E\u4E21\u65B9\u304C\u4F7F\u7528\u3055\u308C\u3066\u3044\u308B\u5834\u5408\u3001\u30E2\u30FC\u30C9\u306F\u73FE\u5728\u3068\u5C06\u6765\u306E\u30BB\u30C3\u30B7\u30E7\u30F3\u304B\u3089\n\u524A\u9664\u3055\u308C\u307E\u3059\u3002\n\n\u30AA\u30D7\u30B7\u30E7\u30F3\u306E\u306A\u3044\u5F62\u5F0F\u306F\u3001\u30E2\u30FC\u30C9\u8A2D\u5B9A\u3092\u8868\u793A\u3057\u307E\u3059\u3002\n<mode>\u304C\u6307\u5B9A\u3055\u308C\u3066\u3044\u308B\u5834\u5408\u3001\u305D\u306E\u30E2\u30FC\u30C9\u306E\u30E2\u30FC\u30C9\u8A2D\u5B9A\u306E\u307F\u304C\u8868\u793A\u3055\u308C\u307E\u3059\u3002\n\u6CE8\u610F: \u30E2\u30FC\u30C9\u306E\u8A2D\u5B9A\u306B\u306F\u3001\u30D7\u30ED\u30F3\u30D7\u30C8\u3001\u30D5\u30A9\u30FC\u30DE\u30C3\u30C8\u304A\u3088\u3073\u5207\u6368\u3066\u306E\u8A2D\u5B9A\u304C\n\u542B\u307E\u308C\u307E\u3059\u3002\n\u4F8B:\n\t/set mode mymode\n\n\u30E2\u30FC\u30C9mymode\u306E\u30E2\u30FC\u30C9\u3001\u30D7\u30ED\u30F3\u30D7\u30C8\u3001\u30D5\u30A9\u30FC\u30DE\u30C3\u30C8\u304A\u3088\u3073\u5207\u6368\u3066\u8A2D\u5B9A\u3092\u8868\u793A\u3057\u307E\u3059
 
-help.set.prompt = \u30D7\u30ED\u30F3\u30D7\u30C8\u3092\u8A2D\u5B9A\u3057\u307E\u3059\u3002\u6A19\u6E96\u30D7\u30ED\u30F3\u30D7\u30C8\u3068\u7D9A\u884C\u30D7\u30ED\u30F3\u30D7\u30C8\u306E\u4E21\u65B9\u3092\u8A2D\u5B9A\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059:\n\n\t/set prompt <mode> "<prompt>" "<continuation-prompt>"\n\n\u6A19\u6E96\u30D7\u30ED\u30F3\u30D7\u30C8\u3068\u7D9A\u884C\u30D7\u30ED\u30F3\u30D7\u30C8\u3092\u8868\u793A\u3057\u307E\u3059:\n\n\t/set prompt [<mode>]\n\n<mode>\u306F\u4E8B\u524D\u306B\u5B9A\u7FA9\u3055\u308C\u305F\u30D5\u30A3\u30FC\u30C9\u30D0\u30C3\u30AF\u30FB\u30E2\u30FC\u30C9\u306E\u540D\u524D\u3067\u3059\u3002\n<prompt>\u304A\u3088\u3073<continuation-prompt>\u306F\u5165\u529B\u30D7\u30ED\u30F3\u30D7\u30C8\u3068\u3057\u3066\u51FA\u529B\u3055\u308C\u308B\u5F15\u7528\u7B26\u3067\u56F2\u307E\u308C\u305F\u6587\u5B57\u5217\u3067\u3059\u3002\n\u30AA\u30D7\u30B7\u30E7\u30F3\u3067\u3001\u4E21\u65B9\u3068\u3082\u3001\u6B21\u306E\u30B9\u30CB\u30DA\u30C3\u30C8ID\u3067\u7F6E\u304D\u63DB\u3048\u3089\u308C\u308B'%%s'\u3092\u542B\u3080\u3053\u3068\u304C\u3067\u304D\u307E\u3059 --\n\u5165\u529B\u3057\u305F\u5185\u5BB9\u304C\u305D\u306EID\u306B\u5272\u308A\u5F53\u3066\u3089\u308C\u306A\u3044\u5834\u5408\u304C\u3042\u308A\u307E\u3059\u3002\u305F\u3068\u3048\u3070\u3001\u30A8\u30E9\u30FC\u307E\u305F\u306F\u30B3\u30DE\u30F3\u30C9\u3067\u3042\u308B\u5834\u5408\u306A\u3069\u3067\u3059\u3002\n\u7D9A\u884C\u30D7\u30ED\u30F3\u30D7\u30C8\u306F\u8907\u6570\u884C\u30B9\u30CB\u30DA\u30C3\u30C8\u306E2\u884C\u76EE\u4EE5\u964D\u3067\u4F7F\u7528\u3055\u308C\u307E\u3059\u3002\n\n<prompt>\u306E\u306A\u3044\u5F62\u5F0F\u306F\u3001\u73FE\u5728\u8A2D\u5B9A\u3055\u308C\u3066\u3044\u308B\u30D7\u30ED\u30F3\u30D7\u30C8\u3092\u8868\u793A\u3057\u307E\u3059\u3002\n<mode>\u304C\u6307\u5B9A\u3055\u308C\u3066\u3044\u308B\u5834\u5408\u3001\u305D\u306E\u30E2\u30FC\u30C9\u306E\u30D7\u30ED\u30F3\u30D7\u30C8\u306E\u307F\u304C\u8868\u793A\u3055\u308C\u307E\u3059\u3002\n\u4F8B:\n\t/set prompt myformat\n\u30E2\u30FC\u30C9myformat\u306B\u8A2D\u5B9A\u3055\u308C\u3066\u3044\u308B\u30D7\u30ED\u30F3\u30D7\u30C8\u3092\u8868\u793A\u3057\u307E\u3059\n
+help.set.prompt.summary = \u30D7\u30ED\u30F3\u30D7\u30C8\u3092\u8A2D\u5B9A\u3057\u307E\u3059\u3002
+
+help.set.prompt = \u30D7\u30ED\u30F3\u30D7\u30C8\u3092\u8A2D\u5B9A\u3057\u307E\u3059\u3002\u6A19\u6E96\u30D7\u30ED\u30F3\u30D7\u30C8\u3068\u7D9A\u884C\u30D7\u30ED\u30F3\u30D7\u30C8\u306E\u4E21\u65B9\u3092\u8A2D\u5B9A\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059:\n\n\t/set prompt <mode> "<prompt>" "<continuation-prompt>"\n\n\u6A19\u6E96\u30D7\u30ED\u30F3\u30D7\u30C8\u3068\u7D9A\u884C\u30D7\u30ED\u30F3\u30D7\u30C8\u3092\u8868\u793A\u3057\u307E\u3059:\n\n\t/set prompt [<mode>]\n\n<mode>\u306F\u4E8B\u524D\u306B\u5B9A\u7FA9\u3055\u308C\u305F\u30D5\u30A3\u30FC\u30C9\u30D0\u30C3\u30AF\u30FB\u30E2\u30FC\u30C9\u306E\u540D\u524D\u3067\u3059\u3002\n<prompt>\u304A\u3088\u3073<continuation-prompt>\u306F\u5165\u529B\u30D7\u30ED\u30F3\u30D7\u30C8\u3068\u3057\u3066\u51FA\u529B\u3055\u308C\u308B\u5F15\u7528\u7B26\u3067\u56F2\u307E\u308C\u305F\u6587\u5B57\u5217\u3067\u3059\u3002\n\u30AA\u30D7\u30B7\u30E7\u30F3\u3067\u3001\u4E21\u65B9\u3068\u3082\u3001\u6B21\u306E\u30B9\u30CB\u30DA\u30C3\u30C8ID\u3067\u7F6E\u304D\u63DB\u3048\u3089\u308C\u308B'%%s'\u3092\u542B\u3080\u3053\u3068\u304C\u3067\u304D\u307E\u3059 --\n\u5165\u529B\u3057\u305F\u5185\u5BB9\u304C\u305D\u306EID\u306B\u5272\u308A\u5F53\u3066\u3089\u308C\u306A\u3044\u5834\u5408\u304C\u3042\u308A\u307E\u3059\u3002\u305F\u3068\u3048\u3070\u3001\u30A8\u30E9\u30FC\u307E\u305F\u306F\u30B3\u30DE\u30F3\u30C9\u3067\u3042\u308B\u5834\u5408\u306A\u3069\u3067\u3059\u3002\n\u7D9A\u884C\u30D7\u30ED\u30F3\u30D7\u30C8\u306F\u8907\u6570\u884C\u30B9\u30CB\u30DA\u30C3\u30C8\u306E2\u884C\u76EE\u4EE5\u964D\u3067\u4F7F\u7528\u3055\u308C\u307E\u3059\u3002\n\n<prompt>\u306E\u306A\u3044\u5F62\u5F0F\u306F\u3001\u73FE\u5728\u8A2D\u5B9A\u3055\u308C\u3066\u3044\u308B\u30D7\u30ED\u30F3\u30D7\u30C8\u3092\u8868\u793A\u3057\u307E\u3059\u3002\n<mode>\u304C\u6307\u5B9A\u3055\u308C\u3066\u3044\u308B\u5834\u5408\u3001\u305D\u306E\u30E2\u30FC\u30C9\u306E\u30D7\u30ED\u30F3\u30D7\u30C8\u306E\u307F\u304C\u8868\u793A\u3055\u308C\u307E\u3059\u3002\n\u4F8B:\n\t/set prompt mymode\n\u30E2\u30FC\u30C9mymode\u306B\u8A2D\u5B9A\u3055\u308C\u3066\u3044\u308B\u30D7\u30ED\u30F3\u30D7\u30C8\u3092\u8868\u793A\u3057\u307E\u3059\n
+
+help.set.editor.summary =/edit\u30B3\u30DE\u30F3\u30C9\u3067\u8D77\u52D5\u3059\u308B\u30B3\u30DE\u30F3\u30C9\u3092\u6307\u5B9A\u3057\u307E\u3059\u3002
 
 help.set.editor =/edit\u30B3\u30DE\u30F3\u30C9\u3067\u8D77\u52D5\u3059\u308B\u30B3\u30DE\u30F3\u30C9\u3092\u6307\u5B9A\u3057\u307E\u3059:\n\n\t/set editor [-retain] [-wait] <command>\n\n\t/set editor [-retain] -default\n\n\t/set editor [-retain] -delete\n\n\u5C06\u6765\u306E\u30BB\u30C3\u30B7\u30E7\u30F3\u306E\u305F\u3081\u306B\u73FE\u5728\u306E\u30A8\u30C7\u30A3\u30BF\u8A2D\u5B9A\u3092\u4FDD\u6301\u3057\u307E\u3059:\n\n\t/set editor -retain\n\n/edit\u30B3\u30DE\u30F3\u30C9\u3067\u8D77\u52D5\u3059\u308B\u30B3\u30DE\u30F3\u30C9\u3092\u8868\u793A\u3057\u307E\u3059:\n\n\t/set editor\n\n<command>\u306F\u30AA\u30DA\u30EC\u30FC\u30C6\u30A3\u30F3\u30B0\u30FB\u30B7\u30B9\u30C6\u30E0\u4F9D\u5B58\u6587\u5B57\u5217\u3067\u3059\u3002\n<command>\u306B\u306F\u30B9\u30DA\u30FC\u30B9\u3067\u533A\u5207\u3089\u308C\u305F\u5F15\u6570(\u30D5\u30E9\u30B0\u306A\u3069)\u304C\u542B\u307E\u308C\u308B\u3053\u3068\u304C\u3042\u308A\u307E\u3059\n\n-default\u30AA\u30D7\u30B7\u30E7\u30F3\u3092\u6307\u5B9A\u3059\u308B\u3068\u3001\u30C7\u30D5\u30A9\u30EB\u30C8\u306E\u7D44\u8FBC\u307F\u30A8\u30C7\u30A3\u30BF\u304C\u4F7F\u7528\u3055\u308C\u307E\u3059\u3002\n\n-delete\u30AA\u30D7\u30B7\u30E7\u30F3\u3092\u6307\u5B9A\u3059\u308B\u3068\u3001\u4EE5\u524D\u306E\u8A2D\u5B9A\u306F\u7121\u8996\u3055\u308C\u307E\u3059 -- \u30A8\u30C7\u30A3\u30BF\n\u8A2D\u5B9A\u306F\u3001jshell\u30C4\u30FC\u30EB\u306E\u8D77\u52D5\u6642\u306B\u521D\u671F\u5316\u3055\u308C\u307E\u3059\u3002\u5177\u4F53\u7684\u306B\u306F\u3001\u4FDD\u6301\u3055\u308C\u305F\u8A2D\u5B9A\u304C\n\u5B58\u5728\u3059\u308B\u5834\u5408\u3001(\u4FDD\u6301\u3055\u308C\u305F\u8A2D\u5B9A\u3092\u524A\u9664\u3059\u308B-retain\u3068-delete\u306E\u4E21\u65B9\u304C\u6307\u5B9A\u3055\u308C\u3066\n\u3044\u306A\u3051\u308C\u3070)\u305D\u308C\u304C\u4F7F\u7528\u3055\u308C\u3001\u6B21\u306E\u74B0\u5883\u5909\u6570\u306E\u3044\u305A\u308C\u304B\u304C\u8A2D\u5B9A\u3055\u308C\u3066\u3044\u308B\u5834\u5408\u3001\n\u305D\u308C\u304C(\u305D\u306E\u9806\u5E8F\u3067)\u4F7F\u7528\u3055\u308C\u307E\u3059: JSHELLEDITOR\u3001VISUAL\u307E\u305F\u306FEDITOR\u3002\n\u305D\u308C\u4EE5\u5916\u306E\u5834\u5408\u3001\u30C7\u30D5\u30A9\u30EB\u30C8\u306E\u7D44\u8FBC\u307F\u30A8\u30C7\u30A3\u30BF\u304C\u4F7F\u7528\u3055\u308C\u307E\u3059\u3002\n\n<command>\u304C\u6307\u5B9A\u3055\u308C\u3066\u3044\u308B\u5834\u5408\u3001\u305D\u308C\u304C\u5916\u90E8\u30A8\u30C7\u30A3\u30BF\u3068\u3057\u3066\u4F7F\u7528\u3055\u308C\u307E\u3059\u3002<command>\u306F\u3001\n\u30D7\u30ED\u30B0\u30E9\u30E0\u3068\u30BC\u30ED\u500B\u4EE5\u4E0A\u306E\u30D7\u30ED\u30B0\u30E9\u30E0\u5F15\u6570\u3067\u69CB\u6210\u3055\u308C\u307E\u3059\u3002<command>\u304C\u4F7F\u7528\u3055\u308C\u308B\u5834\u5408\u3001\n\u7DE8\u96C6\u5BFE\u8C61\u306E\u4E00\u6642\u30D5\u30A1\u30A4\u30EB\u304C\u6700\u5F8C\u306E\u5F15\u6570\u3068\u3057\u3066\u8FFD\u52A0\u3055\u308C\u307E\u3059\u3002\n\u901A\u5E38\u3001\u7DE8\u96C6\u30E2\u30FC\u30C9\u306F\u5916\u90E8\u30A8\u30C7\u30A3\u30BF\u304C\u7D42\u4E86\u3059\u308B\u307E\u3067\u7D99\u7D9A\u3057\u307E\u3059\u3002\u4E00\u90E8\u306E\u5916\u90E8\u30A8\u30C7\u30A3\u30BF\u306F\u3001\n\u305F\u3068\u3048\u3070\u7DE8\u96C6\u30A6\u30A3\u30F3\u30C9\u30A6\u304C\u7D42\u4E86\u3059\u308B\u3068\u5373\u5EA7\u306B\u7D42\u4E86\u3059\u308B\u305F\u3081\u3001\u5916\u90E8\u30A8\u30C7\u30A3\u30BF\u30FB\u30D5\u30E9\u30B0\u3092\u4F7F\u7528\u3057\u3066\n\u5373\u6642\u306E\u7D42\u4E86\u3092\u56DE\u907F\u3059\u308B\u304B\u3001-wait\u30AA\u30D7\u30B7\u30E7\u30F3\u3092\u4F7F\u7528\u3057\u3066\u3001\u7DE8\u96C6\u30E2\u30FC\u30C9\u304C\u7D42\u4E86\u3059\u308B\u30BF\u30A4\u30DF\u30F3\u30B0\u3092\n\u6307\u5B9A\u3059\u308B\u3088\u3046\u30E6\u30FC\u30B6\u30FC\u306B\u8981\u6C42\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002\n\n\u6CE8\u610F: \
 \u7DE8\u96C6\u30E2\u30FC\u30C9\u4E2D\u3001\u30B3\u30DE\u30F3\u30C9\u5165\u529B\u306F\u8868\u793A\u3055\u308C\u307E\u305B\u3093\u3002\u7DE8\u96C6\u30E2\u30FC\u30C9\u306E\u7D42\u4E86\u5F8C\u3001\u7DE8\u96C6\u3055\u308C\u305F\n\u30B9\u30CB\u30DA\u30C3\u30C8\u306E\u5909\u66F4\u5185\u5BB9\u306F\u8868\u793A\u3055\u308C\u307E\u305B\u3093\u3002\n\n-retain\u30AA\u30D7\u30B7\u30E7\u30F3\u304C\u4F7F\u7528\u3055\u308C\u3066\u3044\u308B\u5834\u5408\u3001\u8A2D\u5B9A\u306Fjshell\u30C4\u30FC\u30EB\u306E\u3053\u306E\u5B9F\u884C\u3068\u5C06\u6765\u306E\n\u5B9F\u884C\u3067\u4F7F\u7528\u3055\u308C\u307E\u3059\u3002\n\n<command>\u307E\u305F\u306F\u30AA\u30D7\u30B7\u30E7\u30F3\u306E\u306A\u3044\u5F62\u5F0F\u306F\u3001\u30A8\u30C7\u30A3\u30BF\u8A2D\u5B9A\u3092\u8868\u793A\u3057\u307E\u3059\u3002\n
 
+help.set.start.summary =\u8D77\u52D5\u69CB\u6210\u3092\u8A2D\u5B9A\u3057\u307E\u3059\u3002
+
 help.set.start =\u8D77\u52D5\u69CB\u6210\u3092\u8A2D\u5B9A\u3057\u307E\u3059 -- \u8D77\u52D5\u6642\u306B\u8AAD\u307F\u53D6\u3089\u308C\u308B\u30B9\u30CB\u30DA\u30C3\u30C8\u304A\u3088\u3073\u30B3\u30DE\u30F3\u30C9\u306E\u30B7\u30FC\u30B1\u30F3\u30B9:\n\n\t/set start [-retain] <file>...\n\n\t/set start [-retain] -default\n\n\t/set start [-retain] -none\n\n\u5C06\u6765\u306E\u30BB\u30C3\u30B7\u30E7\u30F3\u306E\u305F\u3081\u306B\u8D77\u52D5\u69CB\u6210\u3092\u4FDD\u6301\u3057\u307E\u3059:\n\n\t/set start -retain\n\n\u8D77\u52D5\u8A2D\u5B9A\u3092\u8868\u793A\u3057\u307E\u3059:\n\n\t/set start\n\n\u3053\u306E\u30BB\u30C3\u30B7\u30E7\u30F3\u3067/reset\u3001/reload\u307E\u305F\u306F/env\u30B3\u30DE\u30F3\u30C9\u304C\u4F7F\u7528\u3055\u308C\u308B\u5834\u5408\u3001\n\u6307\u5B9A\u3057\u305F<file>\u306E\u5185\u5BB9\u304C\u3001\u4F7F\u7528\u3055\u308C\u308B\u8D77\u52D5\u30B9\u30CB\u30DA\u30C3\u30C8\u304A\u3088\u3073\u30B3\u30DE\u30F3\u30C9\u306B\u306A\u308A\u307E\u3059\u3002\n\u304B\u308F\u308A\u306B-default\u30AA\u30D7\u30B7\u30E7\u30F3\u3092\u6307\u5B9A\u3059\u308B\u3068\u3001\u4E8B\u524D\u306B\u5B9A\u7FA9\u3055\u308C\u305F\u8D77\u52D5\u30A4\u30F3\u30DD\u30FC\u30C8\u30FB\u30B9\u30CB\u30DA\u30C3\u30C8\u304C\n\u4F7F\u7528\u3055\u308C\u307E\u3059\u3002\n-none\u30AA\u30D7\u30B7\u30E7\u30F3\u3092\u4F7F\u7528\u3059\u308B\u3068\u3001\u8D77\u52D5\u304C\u7A7A\u306B\u306A\u308A\u307E\u3059 -- \u8D77\u52D5\u30B9\u30CB\u30DA\u30C3\u30C8\u307E\u305F\u306F\n\u30B3\u30DE\u30F3\u30C9\u304C\u4F7F\u7528\u3055\u308C\u307E\u305B\u3093\u3002\n\u3053\u306E\u30B3\u30DE\u30F3\u30C9\u306F\u8D77\u52D5\u8A2D\u5B9A\u3092\u30C6\u30B9\u30C8\u3059\u308B\u306E\u306B\u6709\u52B9\u3067\u3059\u3002jshell\u30C4\u30FC\u30EB\u306E\u4ECA\u5F8C\u306E\u5B9F\u884C\u306E\u305F\u3081\u306B\n\u305D\u308C\u3089\u3092\u4FDD\u6301\u3059\u308B\u306B\u306F\u3001\u6B21\u306E\u30B3\u30DE\u30F3\u30C9\u3092\u4F7F\u7528\u3057\u307E\u3059:\n\t/set start -retain\n\n-retain\u30AA\u30D7\u30B7\u30E7\u30F3\u304C\u4F7F\u7528\u3055\u308C\u3066\u3044\u308B\u5834\u5408\u3001\u8A2D\u5B9A\u306Fjshell\u30C4\u30FC\u30EB\u306E\u3053\u306E\u5B9F\u884C\u3068\u5C06\u6765\u306E\n\u5B9F\u884C\u3067\u4F7F\u7528\u3055\u308C\u307E\u3059\u3002\n\n<file>\u307E\u305F\u306F\u30AA\u30D7\u30B7\u30E7\u30F3\u306E\u306A\u3044\u5F62\u5F0F\u306F\u3001\u8D77\u52D5\u8A2D\u5B9A\u3092\u8868\u793A\u3057\u307E\u3059\u3002\n\u6CE8\u610F: \u8D77\u52D5\u304C\u6700\u5F8C\u306B\u30D5\u30A1\u30A4\u30EB\u304B\u3089\u8A2D\u5B9A\u3055\u308C\u3066\u3044\u308B\u5834\u5408\u3001\u3053\u308C\u306F'set start'\u30B3\u30DE\u30F3\u30C9\u304A\u3088\u3073\n\u305D\u306E\u30D5\u30A1\u30A4\u30EB\u306E\u5185\u5BB9\u3068\u3068\u3082\u306B\u8868\u793A\u3055\u308C\u307E\u3059\u3002\n\n<file>\u306F\u30AA\u30DA\u30EC\u30FC\u30C6\u30A3\u30F3\u30B0\u30FB\u30B7\u30B9\u30C6\u30E0\u306E\u30D5\u30A1\u30A4\u30EB\u540D\u304B\u3001\u4E8B\u524D\u5B9A\u7FA9\u3055\u308C\u305F\n\u8D77\u52D5\u30D5\u30A1\u30A4\u30EB\u540D\u306E\u3044\u305A\u308C\u304B(DEFAULT\u3001PRINTING\u307E\u305F\u306FJAVASE)\u306B\u306A\u308A\u307E\u3059\u3002\n\u3053\u308C\u3089\u306F\u3001\u305D\u308C\u305E\u308C\u30C7\u30D5\u30A9\u30EB\u30C8\u30FB\u30A4\u30F3\u30DD\u30FC\u30C8\u30FB\u30B9\u30CB\u30DA\u30C3\u30C8(-default\u3067\u4F7F\u7528)\u3001print()\u3001\nprintln()\u304A\u3088\u3073printf()\u30E1\u30BD\u30C3\u30C9\u30FB\u30B9\u30CB\u30DA\u30C3\u30C8\u306E\u5B9A\u7FA9\u3001\u307E\u305F\u306F\u3059\u3079\u3066\u306EJava SE\u30D1\u30C3\u30B1\u30FC\u30B8\u306E\n\u30A4\u30F3\u30DD\u30FC\u30C8\u3067\u3059\u3002\n\u8907\u6570\u306E<file>\u3092\u6307\u5B9A\u3067\u304D\u307E\u3059\u3002\u4F8B\u3092\u6B21\u306B\u793A\u3057\u307E\u3059:\n\n\t/set start -retain DEFAULT PRINTING
 
 startup.feedback = /set mode verbose -command    \n\n/set prompt verbose '\\njshell> '   '   ...> '    \n\n/set format verbose pre '|  '    \n/set format verbose post '%n'    \n/set format verbose errorpre '|  '    \n/set format verbose errorpost '%n'    \n\n/set format verbose errorline '{post}{pre}    {err}'    \n\n/set format verbose action '\u6B21\u3092\u4F5C\u6210\u3057\u307E\u3057\u305F:' added-primary    \n/set format verbose action '\u6B21\u3092\u5909\u66F4\u3057\u307E\u3057\u305F:' modified-primary    \n/set format verbose action '\u6B21\u3092\u7F6E\u63DB\u3057\u307E\u3057\u305F:' replaced-primary    \n/set format verbose action '\u6B21\u3092\u4E0A\u66F8\u304D\u3057\u307E\u3057\u305F:' overwrote-primary    \n/set format verbose action '\u6B21\u3092\u524A\u9664\u3057\u307E\u3057\u305F:' dropped-primary    \n/set format verbose action '  \u6B21\u3092\u66F4\u65B0/\u4F5C\u6210\u3057\u307E\u3057\u305F:' added-update    \n/set format verbose action '  \u6B21\u3092\u66F4\u65B0/\u5909\u66F4\u3057\u307E\u3057\u305F:' modified-update    \n/set format verbose action '  \u6B21\u3092\u66F4\u65B0/\u7F6E\u63DB\u3057\u307E\u3057\u305F:' replaced-update    \n/set format verbose action '  \u6B21\u3092\u66F4\u65B0/\u4E0A\u66F8\u304D\u3057\u307E\u3057\u305F:' overwrote-update    \n/set format verbose action '  \u6B21\u3092\u66F4\u65B0/\u524A\u9664\u3057\u307E\u3057\u305F:' dropped-update    \n\n/set format verbose until '\u307E\u3067\u3001\u30A4\u30F3\u30B9\u30BF\u30F3\u30B9\u5316\u3067\u304D\u306A\u3044\u304B\u3001\u305D\u306E\u30E1\u30BD\u30C3\u30C9\u3092\u8D77\u52D5\u3067\u304D\u307E\u305B\u3093'   defined-class-primary    \n/set format verbose until '\u307E\u3067\u3001\u305D\u306E\u30E1\u30BD\u30C3\u30C9\u3092\u8D77\u52D5\u3067\u304D\u307E\u305B\u3093'                      defined-interface-primary    \n/set format verbose until '\u307E\u3067\u3001\u4F7F\u7528\u3067\u304D\u307E\u305B\u3093'                                  defined-enum,annotation-primary    \n/set format verbose until '\u307E\u3067\u3001\u8D77\u52D5\u3067\u304D\u307E\u305B\u3093'                               defined-method-primary    \n/set format verbose until '\u307E\u3067\u3001\u53C2\u7167\u3067\u304D\u307E\u305B\u3093'                            notdefined-primary    \n/set format verbose until '\u307E\u3067\u3001\u30A4\u30F3\u30B9\u30BF\u30F3\u30B9\u5316\u3067\u304D\u306A\u3044\u304B\u3001\u305D\u306E\u30E1\u30BD\u30C3\u30C9\u3092\u8D77\u52D5\u3067\u304D\u307E\u305B\u3093'          defined-class-update    \n/set format verbose until '\u307E\u3067\u3001\u305D\u306E\u30E1\u30BD\u30C3\u30C9\u3092\u8D77\u52D5\u3067\u304D\u307E\u305B\u3093'                              defined-interface-update    \n/set format verbose until '\u307E\u3067\u3001\u8D77\u52D5\u3067\u304D\u307E\u305B\u3093'                                      defined-method-update    \n/set format verbose until '\u307E\u3067\u3001\u53C2\u7167\u3067\u304D\u307E\u305B\u3093'                                   notdefined-update    \n\n/set format verbose unrerr '\u3002\u3057\u304B\u3057\u3001{unresolved}\u304C\u5BA3\u8A00\u3055\u308C\u308B'                                           unresolved1-error0    \n/set format verbose unrerr '\u3002\u3057\u304B\u3057\u3001{unresolved}\u304C\u5BA3\u8A00\u3055\u308C\u308B'                                          unresolved2-error0    \n/set format verbose unrerr '\u3002\u3057\u304B\u3057\u3001\u3053\u306E\u30A8\u30E9\u30FC({errors})\u304C\u4FEE\u6B63\u3055\u308C\u308B'                                 unresolved0-error1    \n/set format verbose unrerr '\u3002\u3057\u304B\u3057\u3001{unresolved}\u304C\u5BA3\u8A00\u3055\u308C\u3001\u3053\u306E\u30A8\u30E9\u30FC({errors})\u304C\u4FEE\u6B63\u3055\u308C\u308B'     unresolved1-error1    \n/set format verbose unrerr '\u3002\u3057\u304B\u3057\u3001{unresolved}\u304C\u5BA3\u8A00\u3055\u308C\u3001\u3053\u306E\u30A8\u30E9\u30FC({errors})\u304C\u4FEE\u6B63\u3055\u308C\u308B'    unresolved2-error1    \n/set format verbose unrerr \
 '\u3002\u3057\u304B\u3057\u3001\u3053\u308C\u3089\u306E\u30A8\u30E9\u30FC({errors})\u304C\u4FEE\u6B63\u3055\u308C\u308B'                              unresolved0-error2    \n/set format verbose unrerr '\u3002\u3057\u304B\u3057\u3001{unresolved}\u304C\u5BA3\u8A00\u3055\u308C\u3001\u3053\u308C\u3089\u306E\u30A8\u30E9\u30FC({errors})\u304C\u4FEE\u6B63\u3055\u308C\u308B'  unresolved1-error2    \n/set format verbose unrerr '\u3002\u3057\u304B\u3057\u3001{unresolved}\u304C\u5BA3\u8A00\u3055\u308C\u3001\u3053\u308C\u3089\u306E\u30A8\u30E9\u30FC({errors})\u304C\u4FEE\u6B63\u3055\u308C\u308B' unresolved2-error2    \n\n/set format verbose resolve '{unrerr}{until}'                                                   defined,notdefined-added,modified,replaced,used    \n\n/set format verbose typeKind '\u30AF\u30E9\u30B9'                  class    \n/set format verbose typeKind '\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9'              interface    \n/set format verbose typeKind '\u5217\u6319\u578B'                   enum    \n/set format verbose typeKind '\u6CE8\u91C8\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9'   annotation    \n\n/set format verbose result '{name} ==> {value}{post}'                                        added,modified,replaced-ok-primary    \n\n/set format verbose display '{result}{pre}\u30B9\u30AF\u30E9\u30C3\u30C1\u5909\u6570{name} : {type}\u304C\u4F5C\u6210\u3055\u308C\u307E\u3057\u305F{post}'    expression-added,modified,replaced-primary    \n/set format verbose display '{result}{pre}{name} : {type}\u306E\u5024{post}'                    varvalue-added,modified,replaced-primary    \n/set format verbose display '{result}{pre}{name} : {type}\u306B\u5272\u308A\u5F53\u3066\u3089\u308C\u307E\u3057\u305F{post}'                 assignment-primary    \n/set format verbose display '{result}{pre}{action} \u5909\u6570 {name} : {type}{resolve}{post}'  varinit,vardecl    \n/set format verbose display '{pre}{action} \u5909\u6570 {name}{resolve}{post}'                   vardecl,varinit-notdefined    \n/set format verbose display '{pre}{action} \u5909\u6570 {name}{post}'                            dropped-vardecl,varinit,expression    \n/set format verbose display '{pre}{action} \u5909\u6570 {name}\u3002null\u306B\u30EA\u30BB\u30C3\u30C8\u3057\u307E\u3057\u305F{post}'             replaced-vardecl,varinit-ok-update    \n\n/set format verbose display '{pre}{action} {typeKind} {name}{resolve}{post}'                 class,interface,enum,annotation    \n/set format verbose display '{pre}{action} \u30E1\u30BD\u30C3\u30C9 {name}({type}){resolve}{post}' method    \n\n/set format verbose display '{pre}{typeKind} {name}\u3092\u4F7F\u7528\u3057\u3088\u3046\u3068\u3057\u307E\u3057\u305F{resolve}{post}'         used-class,interface,enum,annotation    \n/set format verbose display '{pre}\u30E1\u30BD\u30C3\u30C9{name}({type})\u3092\u547C\u3073\u51FA\u305D\u3046\u3068\u3057\u307E\u3057\u305F{resolve}{post}'    used-method    \n\n/set truncation verbose 80\n/set truncation verbose 1000                                                                  varvalue,expression\n\n/set mode normal -command verbose    \n/set format normal display ''                                                               added,modified,replaced,overwrote,dropped-update    \n/set format normal display '{pre}{action} \u5909\u6570 {name}\u3001null\u306B\u30EA\u30BB\u30C3\u30C8\u3055\u308C\u307E\u3057\u305F{post}' replaced-vardecl,varinit-ok-update    \n/set format normal display '{result}'                                                       added,modified,replaced-expression,varvalue,assignment,varinit,vardecl-ok-primary    \n/set mode concise -quiet normal    \n\n/set prompt concise 'jshell> '   '   ...> '    \n\n/set format concise display ''                                                              class,interface,enum,annotation,method,assignment,varinit,vardecl-ok    \n\n/set feedback normal    \n\n/set mode silent -quiet    \n/set prompt silent '-> ' '>> '    \
 \n/set truncation silent 80\n/set truncation silent 1000                                                                  varvalue,expression\n/set format silent pre '|  '    \n/set format silent post '%n'    \n/set format silent errorpre '|  '    \n/set format silent errorpost '%n'    \n/set format silent display ''    \n
-
-jshell.fix.wrong.shortcut =[Shift]-[Tab]\u306E\u5F8C\u306E\u6587\u5B57\u304C\u4E88\u671F\u3057\u306A\u3044\u6587\u5B57\u3067\u3059\u3002\u81EA\u52D5\u30A4\u30F3\u30DD\u30FC\u30C8\u306B\u306F"i"\u3001\u5909\u6570\u306E\u4F5C\u6210\u306B\u306F"v"\u3092\u4F7F\u7528\u3057\u3066\u304F\u3060\u3055\u3044\u3002\u8A73\u7D30\u306F\u6B21\u3092\u53C2\u7167\u3057\u3066\u304F\u3060\u3055\u3044:\n/help shortcuts
--- a/src/jdk.jshell/share/classes/jdk/internal/jshell/tool/resources/l10n_zh_CN.properties	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/jdk.jshell/share/classes/jdk/internal/jshell/tool/resources/l10n_zh_CN.properties	Tue Jan 30 16:41:40 2018 +0100
@@ -31,7 +31,8 @@
 jshell.err.opt.feedback.one = \u53EA\u80FD\u4F7F\u7528\u4E00\u4E2A\u53CD\u9988\u9009\u9879 (--feedback, -q, -s \u6216 -v)\u3002
 jshell.err.opt.unknown = \u672A\u77E5\u9009\u9879: {0}
 
-jshell.msg.terminated =\u72B6\u6001\u5F15\u64CE\u5DF2\u7EC8\u6B62\u3002\n\u4F7F\u7528 /reload -restore \u53EF\u8FD8\u539F\u5B9A\u4E49
+jshell.msg.terminated = \u72B6\u6001\u5F15\u64CE\u5DF2\u7EC8\u6B62\u3002
+jshell.msg.terminated.restore = \u4F7F\u7528 /reload -restore \u53EF\u8FD8\u539F\u5B9A\u4E49
 
 jshell.msg.use.one.of = \u4F7F\u7528\u4EE5\u4E0B\u4E4B\u4E00: {0}
 jshell.msg.see.classes.etc = \u8BF7\u53C2\u9605 /types, /methods, /vars \u6216 /list
@@ -46,7 +47,7 @@
 jshell.err.startup.unexpected.exception = \u8BFB\u53D6\u542F\u52A8\u65F6\u51FA\u73B0\u610F\u5916\u7684\u5F02\u5E38\u9519\u8BEF: {0}
 jshell.err.unexpected.exception = \u610F\u5916\u5F02\u5E38\u9519\u8BEF: {0}
 
-jshell.err.no.such.command.or.snippet.id = \u6CA1\u6709\u8FD9\u6837\u7684\u547D\u4EE4\u6216\u7247\u6BB5 id: {0}
+jshell.err.invalid.command = \u65E0\u6548\u7684\u547D\u4EE4: {0}
 jshell.err.command.ambiguous = \u547D\u4EE4 ''{0}'' \u4E0D\u660E\u786E: {1}
 jshell.msg.set.restore = \u6B63\u5728\u8BBE\u7F6E\u65B0\u9009\u9879\u5E76\u8FD8\u539F\u72B6\u6001\u3002
 jshell.msg.set.editor.set = \u7F16\u8F91\u5668\u8BBE\u7F6E\u4E3A: {0}
@@ -91,12 +92,20 @@
 jshell.msg.help.begin =\u952E\u5165 Java \u8BED\u8A00\u8868\u8FBE\u5F0F, \u8BED\u53E5\u6216\u58F0\u660E\u3002\n\u6216\u8005\u952E\u5165\u4EE5\u4E0B\u547D\u4EE4\u4E4B\u4E00:\n
 jshell.msg.help.subject =\n\u6709\u5173\u8BE6\u7EC6\u4FE1\u606F, \u8BF7\u952E\u5165 ''/help'', \u540E\u8DDF\n\u547D\u4EE4\u6216\u4E3B\u9898\u7684\u540D\u79F0\u3002\n\u4F8B\u5982 ''/help /list'' \u6216 ''/help intro''\u3002\u4E3B\u9898:\n\n
 
+jshell.err.no.snippet.with.id = \u6CA1\u6709\u7247\u6BB5\u5177\u6709 ID: {0}
+jshell.err.end.snippet.range.less.than.start = \u7247\u6BB5\u8303\u56F4\u7684\u7ED3\u675F\u503C\u5C0F\u4E8E\u5F00\u59CB\u503C: {0} - {1}
+jshell.err.range.requires.id = \u7247\u6BB5\u8303\u56F4\u9700\u8981\u7247\u6BB5 ID: {0}
+
+jshell.err.exit.not.expression = /exit \u7684\u53C2\u6570\u5FC5\u987B\u662F\u6709\u6548\u7684\u6574\u6570\u8868\u8FBE\u5F0F, \u8FD9\u4E0D\u662F\u8868\u8FBE\u5F0F: {0}
+jshell.err.exit.bad.type = /exit \u7684\u53C2\u6570\u5FC5\u987B\u662F\u6709\u6548\u7684\u6574\u6570\u8868\u8FBE\u5F0F, \u7C7B\u578B\u4E3A {1}: {0}
+jshell.err.exit.bad.value = /exit \u7684\u53C2\u6570\u5177\u6709\u9519\u8BEF\u503C {1}: {0}
+
 jshell.err.drop.arg =\u5728 /drop \u53C2\u6570\u4E2D, \u8BF7\u6307\u5B9A\u8981\u5220\u9664\u7684\u5BFC\u5165, \u53D8\u91CF, \u65B9\u6CD5\u6216\u7C7B\u3002\n\u6309 id \u6216\u540D\u79F0\u6307\u5B9A\u3002\u4F7F\u7528 /list \u53EF\u67E5\u770B id\u3002\u4F7F\u7528 /reset \u53EF\u91CD\u7F6E\u6240\u6709\u72B6\u6001\u3002
-jshell.err.drop.ambiguous = \u53C2\u6570\u5F15\u7528\u4E86\u591A\u4E2A\u5BFC\u5165, \u53D8\u91CF, \u65B9\u6CD5\u6216\u7C7B\u3002
 jshell.err.failed = \u5931\u8D25\u3002
 jshell.msg.native.method = \u672C\u673A\u65B9\u6CD5
 jshell.msg.unknown.source = \u672A\u77E5\u6E90
 jshell.msg.goodbye = \u518D\u89C1
+jshell.msg.goodbye.value = \u518D\u89C1 ({0})
 
 jshell.msg.help.for.help = \u952E\u5165 /help \u4EE5\u83B7\u53D6\u5E2E\u52A9\u4FE1\u606F\u3002
 
@@ -153,29 +162,35 @@
 jshell.console.do.nothing = \u4E0D\u6267\u884C\u4EFB\u4F55\u64CD\u4F5C
 jshell.console.choice = \u9009\u9879: 
 jshell.console.create.variable = \u521B\u5EFA\u53D8\u91CF
+jshell.console.create.method = \u521B\u5EFA\u65B9\u6CD5
 jshell.console.resolvable = \n\u6807\u8BC6\u7B26\u53EF\u5728\u6B64\u4E0A\u4E0B\u6587\u4E2D\u89E3\u6790\u3002
 jshell.console.no.candidate = \n\u6CA1\u6709\u627E\u5230\u53EF\u5BFC\u5165\u7684\u5019\u9009\u5168\u9650\u5B9A\u540D\u79F0\u3002
 jshell.console.incomplete = \n\u7ED3\u679C\u53EF\u80FD\u4E0D\u5B8C\u6574; \u8BF7\u7A0D\u5019\u91CD\u8BD5\u4EE5\u83B7\u53D6\u5B8C\u6574\u7ED3\u679C\u3002
-
+jshell.console.erroneous = \n\u4E0D\u5B8C\u6574\u6216\u9519\u8BEF\u3002Shift-<tab> m \u540E\u5FC5\u987B\u4E3A\u5355\u4E2A\u6709\u6548\u7684\u8868\u8FBE\u5F0F\u6216\u8BED\u53E5\u3002
+jshell.console.exprstmt = \nShift-<tab> m \u540E\u5FC5\u987B\u4E3A\u5355\u4E2A\u6709\u6548\u7684\u8868\u8FBE\u5F0F\u6216\u8BED\u53E5\u3002
+jshell.console.empty = \n\u7A7A\u6761\u76EE\u3002Shift-<tab> m \u540E\u5FC5\u987B\u4E3A\u5355\u4E2A\u6709\u6548\u7684\u8868\u8FBE\u5F0F\u6216\u8BED\u53E5\u3002
 
-help.usage = \u7528\u6CD5:   jshell <\u9009\u9879> <\u52A0\u8F7D\u6587\u4EF6>\n\u5176\u4E2D, \u53EF\u80FD\u7684\u9009\u9879\u5305\u62EC:\n    --class-path <\u8DEF\u5F84>   \u6307\u5B9A\u67E5\u627E\u7528\u6237\u7C7B\u6587\u4EF6\u7684\u4F4D\u7F6E\n    --module-path <\u8DEF\u5F84>  \u6307\u5B9A\u67E5\u627E\u5E94\u7528\u7A0B\u5E8F\u6A21\u5757\u7684\u4F4D\u7F6E\n    --add-modules <\u6A21\u5757>(,<\u6A21\u5757>)*\n                          \u6307\u5B9A\u8981\u89E3\u6790\u7684\u6A21\u5757; \u5982\u679C <\u6A21\u5757> \n                          \u4E3A ALL-MODULE-PATH, \u5219\u4E3A\u6A21\u5757\u8DEF\u5F84\u4E2D\u7684\u6240\u6709\u6A21\u5757\n    --startup <\u6587\u4EF6>      \u5BF9\u542F\u52A8\u5B9A\u4E49\u6267\u884C\u5355\u6B21\u66FF\u6362\n    --no-startup          \u4E0D\u8FD0\u884C\u542F\u52A8\u5B9A\u4E49\n    --feedback <\u6A21\u5F0F>     \u6307\u5B9A\u521D\u59CB\u53CD\u9988\u6A21\u5F0F\u3002\u8BE5\u6A21\u5F0F\u53EF\u4EE5\u662F\n                            \u9884\u5B9A\u4E49\u7684 (silent, concise, normal \u6216 verbose),\n                            \u4E5F\u53EF\u662F\u4EE5\u524D\u7528\u6237\u5B9A\u4E49\u7684\n    -q                    \u65E0\u63D0\u793A\u53CD\u9988\u3002\u7B49\u540C\u4E8E: --feedback concise\n    -s                    \u771F\u6B63\u65E0\u63D0\u793A\u53CD\u9988\u3002\u7B49\u540C\u4E8E: --feedback silent\n    -v                    \u8BE6\u7EC6\u53CD\u9988\u3002\u7B49\u540C\u4E8E: --feedback verbose\n    -J<\u6807\u8BB0>              \u76F4\u63A5\u5C06 <\u6807\u8BB0> \u4F20\u9012\u5230\u8FD0\u884C\u65F6\u7CFB\u7EDF\u3002\n                            \u4E3A\u6BCF\u4E2A\u8FD0\u884C\u65F6\u6807\u8BB0\u6216\u6807\u8BB0\u53C2\u6570\u4F7F\u7528\u4E00\u4E2A -J\n    -R<\u6807\u8BB0>              \u5C06 <\u6807\u8BB0> \u4F20\u9012\u5230\u8FDC\u7A0B\u8FD0\u884C\u65F6\u7CFB\u7EDF\u3002\n                            \u4E3A\u6BCF\u4E2A\u8FDC\u7A0B\u6807\u8BB0\u6216\u6807\u8BB0\u53C2\u6570\u4F7F\u7528\u4E00\u4E2A -R\n    -C<\u6807\u8BB0>              \u5C06 <\u6807\u8BB0> \u4F20\u9012\u5230\u7F16\u8BD1\u5668\u3002\n                            \u4E3A\u6BCF\u4E2A\u7F16\u8BD1\u5668\u6807\u8BB0\u6216\u6807\u8BB0\u53C2\u6570\u4F7F\u7528\u4E00\u4E2A -C\n    --version             \u8F93\u51FA\u7248\u672C\u4FE1\u606F\u5E76\u9000\u51FA\n    --show-version        \u8F93\u51FA\u7248\u672C\u4FE1\u606F\u5E76\u7EE7\u7EED\n    --help                \u8F93\u51FA\u6807\u51C6\u9009\u9879\u7684\u6B64\u63D0\u8981\u5E76\u9000\u51FA\n    --help-extra, -X      \u8F93\u51FA\u975E\u6807\u51C6\u9009\u9879\u7684\u5E2E\u52A9\u5E76\u9000\u51FA\n
+jshell.fix.wrong.shortcut =Shift-Tab \u540E\u51FA\u73B0\u610F\u5916\u7684\u5B57\u7B26\u3002\n\u4F7F\u7528 "i" \u8868\u793A\u81EA\u52A8\u5BFC\u5165, \u4F7F\u7528 "v" \u8868\u793A\u53D8\u91CF\u521B\u5EFA, \u4F7F\u7528 "i" \u8868\u793A\u65B9\u6CD5\u521B\u5EFA\u3002\n\u6709\u5173\u8BE6\u7EC6\u4FE1\u606F, \u8BF7\u53C2\u9605:\n /help \u5FEB\u6377\u65B9\u5F0F
+
+help.usage = \u7528\u6CD5:   jshell <\u9009\u9879>... <\u52A0\u8F7D\u6587\u4EF6>...\n\u5176\u4E2D, \u53EF\u80FD\u7684\u9009\u9879\u5305\u62EC:\n    --class-path <\u8DEF\u5F84>   \u6307\u5B9A\u67E5\u627E\u7528\u6237\u7C7B\u6587\u4EF6\u7684\u4F4D\u7F6E\n    --module-path <\u8DEF\u5F84>  \u6307\u5B9A\u67E5\u627E\u5E94\u7528\u7A0B\u5E8F\u6A21\u5757\u7684\u4F4D\u7F6E\n    --add-modules <\u6A21\u5757>(,<\u6A21\u5757>)*\n                          \u6307\u5B9A\u8981\u89E3\u6790\u7684\u6A21\u5757; \u5982\u679C <\u6A21\u5757> \n                          \u4E3A ALL-MODULE-PATH, \u5219\u4E3A\u6A21\u5757\u8DEF\u5F84\u4E2D\u7684\u6240\u6709\u6A21\u5757\n    --startup <\u6587\u4EF6>      \u5BF9\u542F\u52A8\u5B9A\u4E49\u6267\u884C\u5355\u6B21\u66FF\u6362\n    --no-startup          \u4E0D\u8FD0\u884C\u542F\u52A8\u5B9A\u4E49\n    --feedback <\u6A21\u5F0F>     \u6307\u5B9A\u521D\u59CB\u53CD\u9988\u6A21\u5F0F\u3002\u8BE5\u6A21\u5F0F\u53EF\u4EE5\u662F\n                            \u9884\u5B9A\u4E49\u7684 (silent, concise, normal \u6216 verbose),\n                            \u4E5F\u53EF\u662F\u4EE5\u524D\u7528\u6237\u5B9A\u4E49\u7684\n    -q                    \u65E0\u63D0\u793A\u53CD\u9988\u3002\u7B49\u540C\u4E8E: --feedback concise\n    -s                    \u771F\u6B63\u65E0\u63D0\u793A\u53CD\u9988\u3002\u7B49\u540C\u4E8E: --feedback silent\n    -v                    \u8BE6\u7EC6\u53CD\u9988\u3002\u7B49\u540C\u4E8E: --feedback verbose\n    -J<\u6807\u8BB0>              \u76F4\u63A5\u5C06 <\u6807\u8BB0> \u4F20\u9012\u5230\u8FD0\u884C\u65F6\u7CFB\u7EDF\u3002\n                            \u4E3A\u6BCF\u4E2A\u8FD0\u884C\u65F6\u6807\u8BB0\u6216\u6807\u8BB0\u53C2\u6570\u4F7F\u7528\u4E00\u4E2A -J\n    -R<\u6807\u8BB0>              \u5C06 <\u6807\u8BB0> \u4F20\u9012\u5230\u8FDC\u7A0B\u8FD0\u884C\u65F6\u7CFB\u7EDF\u3002\n                            \u4E3A\u6BCF\u4E2A\u8FDC\u7A0B\u6807\u8BB0\u6216\u6807\u8BB0\u53C2\u6570\u4F7F\u7528\u4E00\u4E2A -R\n    -C<\u6807\u8BB0>              \u5C06 <\u6807\u8BB0> \u4F20\u9012\u5230\u7F16\u8BD1\u5668\u3002\n                            \u4E3A\u6BCF\u4E2A\u7F16\u8BD1\u5668\u6807\u8BB0\u6216\u6807\u8BB0\u53C2\u6570\u4F7F\u7528\u4E00\u4E2A -C\n    --version             \u8F93\u51FA\u7248\u672C\u4FE1\u606F\u5E76\u9000\u51FA\n    --show-version        \u8F93\u51FA\u7248\u672C\u4FE1\u606F\u5E76\u7EE7\u7EED\n    --help                \u8F93\u51FA\u6807\u51C6\u9009\u9879\u7684\u6B64\u63D0\u8981\u5E76\u9000\u51FA\n    --help-extra, -X      \u8F93\u51FA\u975E\u6807\u51C6\u9009\u9879\u7684\u5E2E\u52A9\u5E76\u9000\u51FA\n\u6587\u4EF6\u53C2\u6570\u53EF\u4EE5\u662F\u6587\u4EF6\u540D, \u6216\u8005\u662F\u9884\u5B9A\u4E49\u7684\u6587\u4EF6\u540D\u4E4B\u4E00: DEFAULT,\nPRINTING \u6216 JAVASE\u3002\n\u52A0\u8F7D\u6587\u4EF6\u4E5F\u53EF\u4EE5\u662F "-", \u7528\u4E8E\u6307\u793A\u6807\u51C6\u8F93\u5165, \u65E0\u4EA4\u4E92\u5F0F I/O\u3002\n
+
 help.usage.x = \    --add-exports <\u6A21\u5757>/<\u7A0B\u5E8F\u5305>      \u5C06\u6307\u5B9A\u7684\u6A21\u5757\u4E13\u7528\u7A0B\u5E8F\u5305\u5BFC\u51FA\u5230\u7247\u6BB5\n    --execution <\u89C4\u8303>                 \u6307\u5B9A\u66FF\u4EE3\u6267\u884C\u5F15\u64CE\u3002\n                                         \u5176\u4E2D <\u89C4\u8303> \u662F ExecutionControl \u89C4\u8303\u3002\n                                         \u6709\u5173\u89C4\u8303\u7684\u8BED\u6CD5, \u8BF7\u53C2\u9605\u7A0B\u5E8F\u5305\n                                         jdk.jshell.spi \u7684\u6587\u6863\n    \n\u8FD9\u4E9B\u9009\u9879\u662F\u975E\u6807\u51C6\u9009\u9879, \u5982\u6709\u66F4\u6539, \u6055\u4E0D\u53E6\u884C\u901A\u77E5\u3002\n
 
 help.list.summary = \u5217\u51FA\u60A8\u952E\u5165\u7684\u6E90
 help.list.args = [<\u540D\u79F0\u6216 id>|-all|-start]
-help.list =\u663E\u793A\u524D\u9762\u5E26\u6709\u7247\u6BB5 ID \u7684\u7247\u6BB5\u6E90\u3002\n\n/list\n\t\u5217\u51FA\u60A8\u952E\u5165\u7684\u6216\u4F7F\u7528 /open \u8BFB\u53D6\u7684\u5F53\u524D\u6D3B\u52A8\u7684\u4EE3\u7801\u7247\u6BB5\n\n/list -start\n\t\u5217\u51FA\u81EA\u52A8\u8BC4\u4F30\u7684\u542F\u52A8\u7247\u6BB5\n\n/list -all\n\t\u5217\u51FA\u6240\u6709\u7247\u6BB5, \u5305\u62EC\u5931\u8D25\u7684\u7247\u6BB5, \u8986\u76D6\u7684\u7247\u6BB5, \u5220\u9664\u7684\u7247\u6BB5\u548C\u542F\u52A8\u7247\u6BB5\n\n/list <\u540D\u79F0>\n\t\u5217\u51FA\u5177\u6709\u6307\u5B9A\u540D\u79F0\u7684\u7247\u6BB5 (\u7279\u522B\u662F\u6D3B\u52A8\u7247\u6BB5)\n\n/list <id>\n\t\u5217\u51FA\u5177\u6709\u6307\u5B9A\u7247\u6BB5 ID \u7684\u7247\u6BB5
+help.list =\u663E\u793A\u524D\u9762\u5E26\u6709\u7247\u6BB5 ID \u7684\u7247\u6BB5\u6E90\u3002\n\n/list\n\t\u5217\u51FA\u60A8\u952E\u5165\u7684\u6216\u4F7F\u7528 /open \u8BFB\u53D6\u7684\u5F53\u524D\u6D3B\u52A8\u7684\u4EE3\u7801\u7247\u6BB5\n\n/list -start\n\t\u5217\u51FA\u81EA\u52A8\u8BC4\u4F30\u7684\u542F\u52A8\u7247\u6BB5\n\n/list -all\n\t\u5217\u51FA\u6240\u6709\u7247\u6BB5, \u5305\u62EC\u5931\u8D25\u7684\u7247\u6BB5, \u8986\u76D6\u7684\u7247\u6BB5, \u5220\u9664\u7684\u7247\u6BB5\u548C\u542F\u52A8\u7247\u6BB5\n\n/list <\u540D\u79F0>\n\t\u5217\u51FA\u5177\u6709\u6307\u5B9A\u540D\u79F0\u7684\u7247\u6BB5 (\u7279\u522B\u662F\u6D3B\u52A8\u7247\u6BB5)\n\n/list <id>\n\t\u5217\u51FA\u5177\u6709\u6307\u5B9A\u7247\u6BB5 ID \u7684\u7247\u6BB5\n\n/list <id> <id>...\n\t\u5217\u51FA\u5177\u6709\u591A\u4E2A\u6307\u5B9A\u7247\u6BB5 ID \u7684\u591A\u4E2A\u7247\u6BB5\n\n/list <id>-<id>\n\t\u5217\u51FA\u5728\u7247\u6BB5 ID \u8303\u56F4\u5185\u7684\u7247\u6BB5
 
 help.edit.summary = \u7F16\u8F91\u6309\u540D\u79F0\u6216 id \u5F15\u7528\u7684\u6E90\u6761\u76EE
 help.edit.args = <\u540D\u79F0\u6216 id>
-help.edit =\u5728\u5916\u90E8\u7F16\u8F91\u5668\u4E2D\u7F16\u8F91\u6E90\u7684\u7247\u6BB5\u3002\n\u4F7F\u7528 /set editor \u53EF\u4EE5\u8BBE\u7F6E\u8981\u4F7F\u7528\u7684\u7F16\u8F91\u5668\u3002\n\u5982\u679C\u5C1A\u672A\u8BBE\u7F6E\u7F16\u8F91\u5668, \u5219\u5C06\u542F\u52A8\u4E00\u4E2A\u7B80\u5355\u7684\u7F16\u8F91\u5668\u3002\n\n/edit <\u540D\u79F0>\n\t\u7F16\u8F91\u5177\u6709\u6307\u5B9A\u540D\u79F0\u7684\u7247\u6BB5 (\u7279\u522B\u662F\u6D3B\u52A8\u7247\u6BB5)\n\n/edit <id>\n\t\u7F16\u8F91\u5177\u6709\u6307\u5B9A\u7247\u6BB5 id \u7684\u7247\u6BB5\n\n/edit\n\t\u7F16\u8F91\u60A8\u952E\u5165\u6216\u4F7F\u7528 /open \u8BFB\u53D6\u7684\u5F53\u524D\u6D3B\u52A8\u7684\u4EE3\u7801\u7247\u6BB5
+help.edit =\u5728\u5916\u90E8\u7F16\u8F91\u5668\u4E2D\u7F16\u8F91\u6E90\u7684\u7247\u6BB5\u3002\n\u4F7F\u7528 /set editor \u53EF\u4EE5\u8BBE\u7F6E\u8981\u4F7F\u7528\u7684\u7F16\u8F91\u5668\u3002\n\u5982\u679C\u5C1A\u672A\u8BBE\u7F6E\u7F16\u8F91\u5668, \u5219\u5C06\u542F\u52A8\u4E00\u4E2A\u7B80\u5355\u7684\u7F16\u8F91\u5668\u3002\n\n/edit <\u540D\u79F0>\n\t\u7F16\u8F91\u5177\u6709\u6307\u5B9A\u540D\u79F0\u7684\u7247\u6BB5 (\u7279\u522B\u662F\u6D3B\u52A8\u7247\u6BB5)\n\n/edit <id>\n\t\u7F16\u8F91\u5177\u6709\u6307\u5B9A\u7247\u6BB5 id \u7684\u7247\u6BB5\n\n/edit <id> <id>...\n\t\u7F16\u8F91\u5177\u6709\u591A\u4E2A\u6307\u5B9A\u7247\u6BB5 ID \u7684\u591A\u4E2A\u7247\u6BB5\n\n/edit <id>-<id>\n\t\u7F16\u8F91\u5728\u7247\u6BB5 ID \u8303\u56F4\u5185\u7684\u7247\u6BB5\n\n/edit -start\n\t\u7F16\u8F91\u81EA\u52A8\u8BC4\u4F30\u7684\u542F\u52A8\u7247\u6BB5\u3002\u4EFB\u4F55\u66F4\u6539\u4FDD\u6301\u5728\n\t\u6B64\u4F1A\u8BDD\u4E2D, \u4E0D\u5F71\u54CD\u542F\u52A8\u8BBE\u7F6E\n\n/edit -all\n\t\u7F16\u8F91\u6240\u6709\u7247\u6BB5, \u5305\u62EC\u5931\u8D25\u7684\u7247\u6BB5, \u8986\u76D6\u7684\u7247\u6BB5, \u5220\u9664\u7684\u7247\u6BB5\u548C\u542F\u52A8\u7247\u6BB5\n\n/edit\n\t\u7F16\u8F91\u60A8\u952E\u5165\u6216\u4F7F\u7528 /open \u8BFB\u53D6\u7684\u5F53\u524D\u6D3B\u52A8\u7684\u4EE3\u7801\u7247\u6BB5
 
 help.drop.summary = \u5220\u9664\u6309\u540D\u79F0\u6216 id \u5F15\u7528\u7684\u6E90\u6761\u76EE
 help.drop.args = <\u540D\u79F0\u6216 id>
-help.drop =\u5220\u9664\u7247\u6BB5 -- \u4F7F\u7247\u6BB5\u5904\u4E8E\u4E0D\u6D3B\u52A8\u72B6\u6001\u3002\n\n/drop <name>\n\t\u5220\u9664\u5177\u6709\u6307\u5B9A\u540D\u79F0\u7684\u7247\u6BB5\n\n/drop <id>\n\t\u5220\u9664\u5177\u6709\u6307\u5B9A\u7247\u6BB5 id \u7684\u7247\u6BB5
+help.drop =\u5220\u9664\u7247\u6BB5 -- \u4F7F\u7247\u6BB5\u5904\u4E8E\u4E0D\u6D3B\u52A8\u72B6\u6001\u3002\n\n/drop <name>\n\t\u5220\u9664\u5177\u6709\u6307\u5B9A\u540D\u79F0\u7684\u7247\u6BB5\n\n/drop <id>\n\t\u5220\u9664\u5177\u6709\u6307\u5B9A\u7247\u6BB5 id \u7684\u7247\u6BB5\n\n/drop <id> <id>...\n\t\u5220\u9664\u5177\u6709\u591A\u4E2A\u6307\u5B9A\u7247\u6BB5 ID \u7684\u591A\u4E2A\u7247\u6BB5\n\n/drop <id>-<id>\n\t\u5220\u9664\u5728\u7247\u6BB5 ID \u8303\u56F4\u5185\u7684\u7247\u6BB5
 
 help.save.summary = \u5C06\u7247\u6BB5\u6E90\u4FDD\u5B58\u5230\u6587\u4EF6\u3002
 help.save.args = [-all|-history|-start] <\u6587\u4EF6>
-help.save =\u5C06\u6307\u5B9A\u7684\u7247\u6BB5\u548C/\u6216\u547D\u4EE4\u4FDD\u5B58\u5230\u6307\u5B9A\u6587\u4EF6\u3002\n\n/save <\u6587\u4EF6>\n\t\u5C06\u5F53\u524D\u6D3B\u52A8\u7247\u6BB5\u7684\u6E90\u4FDD\u5B58\u5230\u6587\u4EF6\u3002\n\n/save -all <\u6587\u4EF6>\n\t\u5C06\u6240\u6709\u7247\u6BB5\u7684\u6E90\u4FDD\u5B58\u5230\u6587\u4EF6\u3002\n\t\u8FD9\u5305\u62EC\u8986\u76D6\u7684\u6E90, \u5931\u8D25\u7684\u6E90\u4EE5\u53CA\u542F\u52A8\u4EE3\u7801\u3002\n\n/save -history <\u6587\u4EF6>\n\t\u4FDD\u5B58\u81EA\u542F\u52A8 jshell \u4EE5\u6765\u8F93\u5165\u7684\u6240\u6709\u547D\u4EE4\u548C\u7247\u6BB5\u7684\u987A\u5E8F\u5386\u53F2\u8BB0\u5F55\u3002\n\n/save -start <\u6587\u4EF6>\n\t\u5C06\u5F53\u524D\u542F\u52A8\u5B9A\u4E49\u4FDD\u5B58\u5230\u6587\u4EF6\u3002
+help.save =\u5C06\u6307\u5B9A\u7684\u7247\u6BB5\u548C/\u6216\u547D\u4EE4\u4FDD\u5B58\u5230\u6307\u5B9A\u6587\u4EF6\u3002\n\n/save <\u6587\u4EF6>\n\t\u5C06\u5F53\u524D\u6D3B\u52A8\u7247\u6BB5\u7684\u6E90\u4FDD\u5B58\u5230\u6587\u4EF6\u3002\n\n/save -all <\u6587\u4EF6>\n\t\u5C06\u6240\u6709\u7247\u6BB5\u7684\u6E90\u4FDD\u5B58\u5230\u6587\u4EF6\u3002\n\t\u8FD9\u5305\u62EC\u8986\u76D6\u7684\u6E90, \u5931\u8D25\u7684\u6E90\u4EE5\u53CA\u542F\u52A8\u4EE3\u7801\u3002\n\n/save -history <\u6587\u4EF6>\n\t\u4FDD\u5B58\u81EA\u542F\u52A8 jshell \u4EE5\u6765\u8F93\u5165\u7684\u6240\u6709\u547D\u4EE4\u548C\u7247\u6BB5\u7684\u987A\u5E8F\u5386\u53F2\u8BB0\u5F55\u3002\n\n/save -start <\u6587\u4EF6>\n\t\u5C06\u5F53\u524D\u542F\u52A8\u5B9A\u4E49\u4FDD\u5B58\u5230\u6587\u4EF6\u3002\n\n/save <id> <\u6587\u4EF6>\n\t\u4FDD\u5B58\u5177\u6709\u6307\u5B9A\u7247\u6BB5 ID \u7684\u7247\u6BB5\n\n/save <id> <id>... <\u6587\u4EF6>\n\t\u4FDD\u5B58\u5177\u6709\u591A\u4E2A\u6307\u5B9A\u7247\u6BB5 ID \u7684\u591A\u4E2A\u7247\u6BB5\n\n/save <id>-<id> <\u6587\u4EF6>\n\t\u4FDD\u5B58\u5728\u7247\u6BB5 ID \u8303\u56F4\u5185\u7684\u7247\u6BB5
 
 help.open.summary = \u6253\u5F00\u6587\u4EF6\u4F5C\u4E3A\u6E90\u8F93\u5165
 help.open.args = <file>
@@ -183,23 +198,23 @@
 
 help.vars.summary = \u5217\u51FA\u5DF2\u58F0\u660E\u53D8\u91CF\u53CA\u5176\u503C
 help.vars.args = [<\u540D\u79F0\u6216 id>|-all|-start]
-help.vars =\u5217\u51FA jshell \u53D8\u91CF\u7684\u7C7B\u578B, \u540D\u79F0\u548C\u503C\u3002\n\n/vars\n\t\u5217\u51FA\u5F53\u524D\u6D3B\u52A8\u7684 jshell \u53D8\u91CF\u7684\u7C7B\u578B, \u540D\u79F0\u548C\u503C\n\n/vars <\u540D\u79F0>\n\t\u5217\u51FA\u5177\u6709\u6307\u5B9A\u540D\u79F0\u7684 jshell \u53D8\u91CF (\u7279\u522B\u662F\u6D3B\u52A8\u53D8\u91CF)\n\n/vars <id>\n\t\u5217\u51FA\u5177\u6709\u6307\u5B9A\u7247\u6BB5 ID \u7684 jshell \u53D8\u91CF\n\n/vars -start\n\t\u5217\u51FA\u81EA\u52A8\u6DFB\u52A0\u7684\u542F\u52A8 jshell \u53D8\u91CF\n\n/vars -all\n\t\u5217\u51FA\u6240\u6709 jshell \u53D8\u91CF, \u5305\u62EC\u5DF2\u5931\u8D25\u53D8\u91CF, \u5DF2\u8986\u76D6\u53D8\u91CF, \u5DF2\u5220\u9664\u53D8\u91CF\u548C\u542F\u52A8\u53D8\u91CF
+help.vars =\u5217\u51FA jshell \u53D8\u91CF\u7684\u7C7B\u578B, \u540D\u79F0\u548C\u503C\u3002\n\n/vars\n\t\u5217\u51FA\u5F53\u524D\u6D3B\u52A8\u7684 jshell \u53D8\u91CF\u7684\u7C7B\u578B, \u540D\u79F0\u548C\u503C\n\n/vars <\u540D\u79F0>\n\t\u5217\u51FA\u5177\u6709\u6307\u5B9A\u540D\u79F0\u7684 jshell \u53D8\u91CF (\u7279\u522B\u662F\u6D3B\u52A8\u53D8\u91CF)\n\n/vars <id>\n\t\u5217\u51FA\u5177\u6709\u6307\u5B9A\u7247\u6BB5 ID \u7684 jshell \u53D8\u91CF\n\n/vars <id> <id>... <\u6587\u4EF6>\n\t\u5217\u51FA\u5177\u6709\u591A\u4E2A\u6307\u5B9A\u7247\u6BB5 ID \u7684\u591A\u4E2A jshell \u53D8\u91CF\n\n/vars <id>-<id> <\u6587\u4EF6>\n\t\u5217\u51FA\u5728\u7247\u6BB5 ID \u8303\u56F4\u5185\u7684 jshell \u53D8\u91CF\n\n/vars -start\n\t\u5217\u51FA\u81EA\u52A8\u6DFB\u52A0\u7684\u542F\u52A8 jshell \u53D8\u91CF\n\n/vars -all\n\t\u5217\u51FA\u6240\u6709 jshell \u53D8\u91CF, \u5305\u62EC\u5DF2\u5931\u8D25\u53D8\u91CF, \u5DF2\u8986\u76D6\u53D8\u91CF, \u5DF2\u5220\u9664\u53D8\u91CF\u548C\u542F\u52A8\u53D8\u91CF
 
 help.methods.summary = \u5217\u51FA\u5DF2\u58F0\u660E\u65B9\u6CD5\u53CA\u5176\u7B7E\u540D
 help.methods.args = [<\u540D\u79F0\u6216 id>|-all|-start]
-help.methods =\u5217\u51FA jshell \u65B9\u6CD5\u7684\u540D\u79F0, \u53C2\u6570\u7C7B\u578B\u4EE5\u53CA\u8FD4\u56DE\u7C7B\u578B\u3002\n\n/methods\n\t\u5217\u51FA\u5F53\u524D\u6D3B\u52A8 jshell \u65B9\u6CD5\u540D\u79F0, \u53C2\u6570\u7C7B\u578B\u548C\u8FD4\u56DE\u7C7B\u578B\n\n/methods <\u540D\u79F0>\n\t\u5217\u51FA\u5177\u6709\u6307\u5B9A\u540D\u79F0\u7684 jshell \u65B9\u6CD5 (\u7279\u522B\u662F\u6D3B\u52A8\u65B9\u6CD5)\n\n/methods <id>\n\t\u5217\u51FA\u5177\u6709\u6307\u5B9A\u7247\u6BB5 ID \u7684 jshell \u65B9\u6CD5\n\n/methods -start\n\t\u5217\u51FA\u81EA\u52A8\u6DFB\u52A0\u7684\u542F\u52A8 jshell \u65B9\u6CD5\n\n/methods -all\n\t\u5217\u51FA\u6240\u6709\u7247\u6BB5, \u5305\u62EC\u5DF2\u5931\u8D25\u7247\u6BB5, \u5DF2\u8986\u76D6\u7247\u6BB5, \u5DF2\u5220\u9664\u7247\u6BB5\u548C\u542F\u52A8\u7247\u6BB5
+help.methods =\u5217\u51FA jshell \u65B9\u6CD5\u7684\u540D\u79F0, \u53C2\u6570\u7C7B\u578B\u4EE5\u53CA\u8FD4\u56DE\u7C7B\u578B\u3002\n\n/methods\n\t\u5217\u51FA\u5F53\u524D\u6D3B\u52A8 jshell \u65B9\u6CD5\u540D\u79F0, \u53C2\u6570\u7C7B\u578B\u548C\u8FD4\u56DE\u7C7B\u578B\n\n/methods <\u540D\u79F0>\n\t\u5217\u51FA\u5177\u6709\u6307\u5B9A\u540D\u79F0\u7684 jshell \u65B9\u6CD5 (\u7279\u522B\u662F\u6D3B\u52A8\u65B9\u6CD5)\n\n/methods <id>\n\t\u5217\u51FA\u5177\u6709\u6307\u5B9A\u7247\u6BB5 ID \u7684 jshell \u65B9\u6CD5\n\n/methods <id> <id>... <\u6587\u4EF6>\n\t\u5217\u51FA\u5177\u6709\u591A\u4E2A\u6307\u5B9A\u7247\u6BB5 ID \u7684\u591A\u4E2A jshell \u65B9\u6CD5\n\n/methods <id>-<id> <file>\n\t\u5217\u51FA\u5728\u7247\u6BB5 ID \u8303\u56F4\u5185\u7684 jshell \u65B9\u6CD5\n\n/methods -start\n\t\u5217\u51FA\u81EA\u52A8\u6DFB\u52A0\u7684\u542F\u52A8 jshell \u65B9\u6CD5\n\n/methods -all\n\t\u5217\u51FA\u6240\u6709\u7247\u6BB5, \u5305\u62EC\u5DF2\u5931\u8D25\u7247\u6BB5, \u5DF2\u8986\u76D6\u7247\u6BB5, \u5DF2\u5220\u9664\u7247\u6BB5\u548C\u542F\u52A8\u7247\u6BB5
 
 help.types.summary = \u5217\u51FA\u5DF2\u58F0\u660E\u7684\u7C7B\u578B
 help.types.args =[<\u540D\u79F0\u6216 id>|-all|-start]
-help.types =\u5217\u51FA jshell \u7C7B, \u63A5\u53E3\u548C\u679A\u4E3E\u3002\n\n/types\n\t\u5217\u51FA\u5F53\u524D\u6D3B\u52A8 jshell \u7C7B, \u63A5\u53E3\u548C\u679A\u4E3E\u3002\n\n/types <\u540D\u79F0>\n\t\u5217\u51FA\u5177\u6709\u6307\u5B9A\u540D\u79F0\u7684 jshell \u7C7B\u578B (\u7279\u522B\u662F\u6D3B\u52A8\u7C7B\u578B)\n\n/types <id>\n\t\u5217\u51FA\u5177\u6709\u6307\u5B9A\u7247\u6BB5 ID \u7684 jshell \u7C7B\u578B\n\n/types -start\n\t\u5217\u51FA\u81EA\u52A8\u6DFB\u52A0\u7684\u542F\u52A8 jshell \u7C7B\u578B\n\n/types -all\n\t\u5217\u51FA\u6240\u6709 jshell \u7C7B\u578B, \u5305\u62EC\u5DF2\u5931\u8D25, \u5DF2\u8986\u76D6, \u5DF2\u5220\u9664\u548C\u542F\u52A8\u7C7B\u578B
+help.types =\u5217\u51FA jshell \u7C7B, \u63A5\u53E3\u548C\u679A\u4E3E\u3002\n\n/types\n\t\u5217\u51FA\u5F53\u524D\u6D3B\u52A8 jshell \u7C7B, \u63A5\u53E3\u548C\u679A\u4E3E\u3002\n\n/types <\u540D\u79F0>\n\t\u5217\u51FA\u5177\u6709\u6307\u5B9A\u540D\u79F0\u7684 jshell \u7C7B\u578B (\u7279\u522B\u662F\u6D3B\u52A8\u7C7B\u578B)\n\n/types <id>\n\t\u5217\u51FA\u5177\u6709\u6307\u5B9A\u7247\u6BB5 ID \u7684 jshell \u7C7B\u578B\n\n/types <id> <id>... <\u6587\u4EF6>\n\t\u5217\u51FA\u5177\u6709\u591A\u4E2A\u6307\u5B9A\u7247\u6BB5 ID \u7684\u591A\u4E2A jshell \u7C7B\u578B\n\n/types <id>-<id> <\u6587\u4EF6>\n\t\u5217\u51FA\u5728\u7247\u6BB5 ID \u8303\u56F4\u5185\u7684 jshell \u7C7B\u578B\n\n/types -start\n\t\u5217\u51FA\u81EA\u52A8\u6DFB\u52A0\u7684\u542F\u52A8 jshell \u7C7B\u578B\n\n/types -all\n\t\u5217\u51FA\u6240\u6709 jshell \u7C7B\u578B, \u5305\u62EC\u5DF2\u5931\u8D25, \u5DF2\u8986\u76D6, \u5DF2\u5220\u9664\u548C\u542F\u52A8\u7C7B\u578B
 
 help.imports.summary = \u5217\u51FA\u5BFC\u5165\u7684\u9879
 help.imports.args =
 help.imports =\u5217\u51FA\u5F53\u524D\u6D3B\u52A8\u7684 jshell \u5BFC\u5165\u3002
 
 help.exit.summary = \u9000\u51FA jshell
-help.exit.args =
-help.exit =\u9000\u51FA jshell \u5DE5\u5177\u3002\u4E0D\u4FDD\u5B58\u5DE5\u4F5C\u3002\n\u5728\u4F7F\u7528\u6B64\u547D\u4EE4\u524D\u5E94\u8BE5\u5148\u4FDD\u5B58\u4EFB\u4F55\u5DE5\u4F5C
+help.exit.args =[<integer-expression-snippet>]
+help.exit =\u9000\u51FA jshell \u5DE5\u5177\u3002\u4E0D\u4FDD\u5B58\u5DE5\u4F5C\u3002\n\u5728\u4F7F\u7528\u6B64\u547D\u4EE4\u524D\u5E94\u8BE5\u5148\u4FDD\u5B58\u4EFB\u4F55\u5DE5\u4F5C\n\n/exit\n\t\u9000\u51FA jshell \u5DE5\u5177\u3002\u9000\u51FA\u72B6\u6001\u4E3A\u96F6\u3002\n\n/exit <integer-expression-snippet>\n\t\u8BC4\u4F30\u7247\u6BB5\u3002\u5982\u679C\u7247\u6BB5\u5931\u8D25\u6216\u8005\u4E0D\u662F\u6574\u6570\u8868\u8FBE\u5F0F,\n\t\u5219\u663E\u793A\u9519\u8BEF\u3002\u5426\u5219\u9000\u51FA jshell \u5DE5\u5177, \u5E76\u5C06\n\t\u8868\u8FBE\u5F0F\u7684\u503C\u4F5C\u4E3A\u9000\u51FA\u72B6\u6001
 
 help.reset.summary = \u91CD\u542F jshell
 help.reset.args = [-class-path <\u8DEF\u5F84>] [-module-path <\u8DEF\u5F84>] [-add-modules <\u6A21\u5757>]...
@@ -207,7 +222,7 @@
 
 help.reload.summary = \u91CD\u7F6E\u548C\u91CD\u653E\u76F8\u5173\u5386\u53F2\u8BB0\u5F55 -- \u5F53\u524D\u5386\u53F2\u8BB0\u5F55\u6216\u4E0A\u4E00\u4E2A\u5386\u53F2\u8BB0\u5F55 (-restore)
 help.reload.args = [-restore] [-quiet] [-class-path <\u8DEF\u5F84>] [-module-path <\u8DEF\u5F84>]...
-help.reload =\u91CD\u7F6E jshell \u5DE5\u5177\u4EE3\u7801\u548C\u6267\u884C\u72B6\u6001, \u7136\u540E\u6309\u7167\u5404\u6709\u6548\u7247\u6BB5\u548C\n\u4EFB\u4F55 /drop \u6216 /classpath \u547D\u4EE4\u7684\u8F93\u5165\u987A\u5E8F\u91CD\u653E\u5B83\u4EEC\u3002\n\n/reload\n\t\u91CD\u7F6E\u548C\u91CD\u653E\u81EA\u8FDB\u5165 jshell \u4EE5\u6765\u7684\u6709\u6548\u5386\u53F2\u8BB0\u5F55, \n\t\u6216\u8005\u6267\u884C /reset \u6216 /reload \u547D\u4EE4\u4E2D\u6700\u65B0\u7684\u90A3\u4E2A\n\t\u547D\u4EE4\u3002\n\n/reload -restore\n\t\u91CD\u7F6E\u5E76\u91CD\u653E\u4E0A\u4E00\u6B21\u8FDB\u5165 jshell \u4E0E\u6700\u8FD1\u8FDB\u5165 jshell\n\t\u4E4B\u95F4\u7684\u6709\u6548\u5386\u53F2\u8BB0\u5F55, \u6216\u8005\u6267\u884C /reset \u6216 /reload\n\t\u547D\u4EE4\u3002\u8FD9\u8FDB\u800C\u53EF\u7528\u4E8E\u8FD8\u539F\u4E0A\u4E00\u4E2A\n\tjshell \u5DE5\u5177\u4F1A\u8BDD\u3002\n\n/reload [-restore] -quiet\n\t\u4F7F\u7528 '-quiet' \u53C2\u6570\u65F6, \u4E0D\u663E\u793A\u91CD\u653E\u3002\u5C06\u663E\u793A\u9519\u8BEF\u3002\n\n\u4E0A\u9762\u6BCF\u4E2A\u547D\u4EE4\u90FD\u63A5\u53D7\u4E0A\u4E0B\u6587\u9009\u9879, \u8BF7\u53C2\u9605:\n\n\t/help context\n\n\u4F8B\u5982:\n\n\t/reload -add-modules com.greetings -restore
+help.reload =\u91CD\u7F6E jshell \u5DE5\u5177\u4EE3\u7801\u548C\u6267\u884C\u72B6\u6001, \u7136\u540E\u6309\u7167\u5404\u6709\u6548\u7247\u6BB5\u548C\n\u4EFB\u4F55 /drop \u547D\u4EE4\u7684\u8F93\u5165\u987A\u5E8F\u91CD\u653E\u5B83\u4EEC\u3002\n\n/reload\n\t\u91CD\u7F6E\u548C\u91CD\u653E\u81EA\u8FDB\u5165 jshell \u4EE5\u6765\u7684\u6709\u6548\u5386\u53F2\u8BB0\u5F55, \n\t\u6216\u8005\u6267\u884C /reset \u6216 /reload \u547D\u4EE4\u4E2D\u6700\u65B0\u7684\u90A3\u4E2A\n\t\u547D\u4EE4\u3002\n\n/reload -restore\n\t\u91CD\u7F6E\u5E76\u91CD\u653E\u4E0A\u4E00\u6B21\u8FDB\u5165 jshell \u4E0E\u6700\u8FD1\u8FDB\u5165 jshell\n\t\u4E4B\u95F4\u7684\u6709\u6548\u5386\u53F2\u8BB0\u5F55, \u6216\u8005\u6267\u884C /reset, /reload\n\t\u6216 /env \u547D\u4EE4\u3002\u8FD9\u8FDB\u800C\u53EF\u7528\u4E8E\u8FD8\u539F\u4E0A\u4E00\u4E2A\n\tjshell \u5DE5\u5177\u4F1A\u8BDD\u3002\n\n/reload [-restore] -quiet\n\t\u4F7F\u7528 '-quiet' \u53C2\u6570\u65F6, \u4E0D\u663E\u793A\u91CD\u653E\u3002\u5C06\u663E\u793A\u9519\u8BEF\u3002\n\n\u4E0A\u9762\u6BCF\u4E2A\u547D\u4EE4\u90FD\u63A5\u53D7\u4E0A\u4E0B\u6587\u9009\u9879, \u8BF7\u53C2\u9605:\n\n\t/help context\n\n\u4F8B\u5982:\n\n\t/reload -add-modules com.greetings -restore
 
 help.env.summary = \u67E5\u770B\u6216\u66F4\u6539\u8BC4\u4F30\u4E0A\u4E0B\u6587
 help.env.args = [-class-path <\u8DEF\u5F84>] [-module-path <\u8DEF\u5F84>] [-add-modules <\u6A21\u5757>] ...
@@ -233,15 +248,15 @@
 help.quest.args = [<command>|<subject>]
 help.quest =\u663E\u793A\u6709\u5173 jshell \u7684\u4FE1\u606F (\u5BF9 /help \u4F7F\u7528\u7F29\u5199\u5F62\u5F0F)\u3002\n/?\n\t\u663E\u793A\u547D\u4EE4\u548C\u5E2E\u52A9\u4E3B\u9898\u7684\u5217\u8868\u3002\n/? <\u547D\u4EE4>\n\t\u663E\u793A\u6709\u5173\u6307\u5B9A\u547D\u4EE4\u7684\u4FE1\u606F\u3002\u5FC5\u987B\u5305\u542B\u659C\u6760\u3002\n\t\u53EA\u9700\u8981\u547D\u4EE4\u7684\u524D\u51E0\u4E2A\u5B57\u6BCD -- \u5982\u679C\u6709\u591A\u4E2A\n\t\u5339\u914D\u9879, \u5219\u5C06\u663E\u793A\u6240\u6709\u5B57\u6BCD\u3002\u793A\u4F8B: /? /li\n/? <\u4E3B\u9898>\n\t\u663E\u793A\u6709\u5173\u6307\u5B9A\u5E2E\u52A9\u4E3B\u9898\u7684\u4FE1\u606F\u3002\u793A\u4F8B: /? intro
 
-help.bang.summary = \u91CD\u65B0\u8FD0\u884C\u4E0A\u4E00\u4E2A\u7247\u6BB5
+help.bang.summary = \u91CD\u65B0\u8FD0\u884C\u4E0A\u4E00\u4E2A\u7247\u6BB5 -- \u8BF7\u53C2\u9605 /help rerun
 help.bang.args =
 help.bang =\u91CD\u65B0\u8BC4\u4F30\u6700\u8FD1\u8F93\u5165\u7684\u7247\u6BB5\u3002
 
-help.id.summary = \u6309 id \u91CD\u65B0\u8FD0\u884C\u7247\u6BB5
+help.id.summary = \u6309 ID \u6216 ID \u8303\u56F4\u91CD\u65B0\u8FD0\u884C\u7247\u6BB5 -- \u8BF7\u53C2\u9605 /help rerun
 help.id.args =
-help.id =\u91CD\u65B0\u8BC4\u4F30\u7531 id \u6267\u884C\u7684\u7247\u6BB5\u3002
+help.id =/<id> <id> <id>\n\n/<id>-<id>\n\n\u91CD\u65B0\u8BC4\u4F30\u6309 ID \u6216 ID \u8303\u56F4\u6307\u5B9A\u7684\u7247\u6BB5\u3002\nID \u8303\u56F4\u4EE5\u901A\u8FC7\u8FDE\u5B57\u7B26\u5206\u9694\u7684\u4E24\u4E2A ID \u8868\u793A, \u4F8B\u5982, e.g.:  3-17\n\u53EF\u80FD\u4F1A\u4F7F\u7528\u542F\u52A8\u548C\u9519\u8BEF\u7247\u6BB5, \u4F8B\u5982:  s3-s9    \u6216   e1-e4\n\u53EF\u4EE5\u4F7F\u7528\u4EFB\u610F\u6570\u91CF\u7684 ID \u6216 ID \u8303\u56F4, \u4F8B\u5982:  /3-7 s4 14-16 e2
 
-help.previous.summary = \u91CD\u65B0\u8FD0\u884C\u524D\u9762\u7684\u7B2C n \u4E2A\u7247\u6BB5
+help.previous.summary = \u91CD\u65B0\u8FD0\u884C\u4EE5\u524D\u7684\u7B2C n \u4E2A\u7247\u6BB5 -- \u8BF7\u53C2\u9605 /help rerun
 help.previous.args =
 help.previous =\u91CD\u65B0\u8BC4\u4F30\u6700\u8FD1\u8F93\u5165\u7684\u7B2C n \u4E2A\u7247\u6BB5\u3002
 
@@ -249,28 +264,43 @@
 help.intro =\u4F7F\u7528 jshell \u5DE5\u5177\u53EF\u4EE5\u6267\u884C Java \u4EE3\u7801, \u4ECE\u800C\u7ACB\u5373\u83B7\u53D6\u7ED3\u679C\u3002\n\u60A8\u53EF\u4EE5\u8F93\u5165 Java \u5B9A\u4E49 (\u53D8\u91CF, \u65B9\u6CD5, \u7C7B, \u7B49\u7B49), \u4F8B\u5982:  int x = 8\n\u6216 Java \u8868\u8FBE\u5F0F, \u4F8B\u5982:  x + x\n\u6216 Java \u8BED\u53E5\u6216\u5BFC\u5165\u3002\n\u8FD9\u4E9B\u5C0F\u5757\u7684 Java \u4EE3\u7801\u79F0\u4E3A '\u7247\u6BB5'\u3002\n\n\u8FD9\u4E9B jshell \u547D\u4EE4\u8FD8\u53EF\u4EE5\u8BA9\u60A8\u4E86\u89E3\u548C\n\u63A7\u5236\u60A8\u6B63\u5728\u6267\u884C\u7684\u64CD\u4F5C, \u4F8B\u5982:  /list\n\n\u6709\u5173\u547D\u4EE4\u7684\u5217\u8868, \u8BF7\u6267\u884C: /help
 
 help.shortcuts.summary = \u7247\u6BB5\u548C\u547D\u4EE4\u8F93\u5165\u63D0\u793A, \u4FE1\u606F\u8BBF\u95EE\u4EE5\u53CA\n\u81EA\u52A8\u4EE3\u7801\u751F\u6210\u7684\u6309\u952E\u8BF4\u660E
-help.shortcuts =\u652F\u6301\u7684\u5FEB\u6377\u65B9\u5F0F\u5305\u62EC:\n\n<tab>\n\t\t\u5728\u8F93\u5165 Java \u6807\u8BC6\u7B26, jshell \u547D\u4EE4\u6216 jshell\n\t\t\u547D\u4EE4\u53C2\u6570 (\u5728\u67D0\u4E9B\u60C5\u51B5\u4E0B) \u7684\u524D\u51E0\u4E2A\u5B57\u6BCD\u540E,\n\t\t\u6309 <tab> \u952E\u53EF\u4EE5\u5B8C\u6210\u8F93\u5165\u3002\n\t\t\u5982\u679C\u6709\u591A\u4E2A\u8F93\u5165\u63D0\u793A, \u5219\u5C06\u663E\u793A\u53EF\u80FD\u7684\u8F93\u5165\u63D0\u793A\u3002\n\t\t\u5C06\u663E\u793A\u53EF\u7528\u7684\u9002\u7528\u6587\u6863\u3002\n\nShift-<tab> v\n\t\t\u5728\u5B8C\u6574\u7684\u8868\u8FBE\u5F0F\u540E\u9762, \u6309\u4F4F <tab> \u7684\u540C\u65F6\u6309\u4E0B <shift>,\n\t\t\u7136\u540E\u91CA\u653E\u5E76\u6309 "v", \u6B64\u65F6\u8868\u8FBE\u5F0F\u5C06\u8F6C\u6362\u4E3A\n\t\t\u5176\u7C7B\u578B\u57FA\u4E8E\u8868\u8FBE\u5F0F\u7C7B\u578B\u7684\u53D8\u91CF\u58F0\u660E\u3002\n\nShift-<tab> i\n\t\t\u5728\u4E0D\u53EF\u89E3\u6790\u7684\u6807\u8BC6\u7B26\u540E\u9762, \u6309\u4F4F <tab> \u7684\u540C\u65F6\u6309\u4E0B <shift>,\n\t\t\u7136\u540E\u91CA\u653E\u5E76\u6309 "i", \u6B64\u65F6 jshell \u5C06\u4F1A\u5EFA\u8BAE\u53EF\u80FD\u7684\u5BFC\u5165\u9879,\n\t\t\u8FD9\u5C06\u57FA\u4E8E\u6307\u5B9A\u7C7B\u8DEF\u5F84\u7684\u5185\u5BB9\u89E3\u6790\u6807\u8BC6\u7B26\u3002
+help.shortcuts =\u652F\u6301\u7684\u5FEB\u6377\u65B9\u5F0F\u5305\u62EC:\n\n<tab>\n\t\t\u5728\u8F93\u5165 Java \u6807\u8BC6\u7B26, jshell \u547D\u4EE4\u6216 jshell\n\t\t\u547D\u4EE4\u53C2\u6570 (\u5728\u67D0\u4E9B\u60C5\u51B5\u4E0B) \u7684\u524D\u51E0\u4E2A\u5B57\u6BCD\u540E,\n\t\t\u6309 <tab> \u952E\u53EF\u4EE5\u5B8C\u6210\u8F93\u5165\u3002\n\t\t\u5982\u679C\u6709\u591A\u4E2A\u8F93\u5165\u63D0\u793A, \u5219\u5C06\u663E\u793A\u53EF\u80FD\u7684\u8F93\u5165\u63D0\u793A\u3002\n\t\t\u5C06\u663E\u793A\u53EF\u7528\u7684\u9002\u7528\u6587\u6863\u3002\n\nShift-<tab> v\n\t\t\u5728\u5B8C\u6574\u7684\u8868\u8FBE\u5F0F\u540E\u9762, \u6309\u4F4F <tab> \u7684\u540C\u65F6\u6309\u4E0B <shift>,\n\t\t\u7136\u540E\u91CA\u653E\u5E76\u6309 "v", \u6B64\u65F6\u8868\u8FBE\u5F0F\u5C06\u8F6C\u6362\u4E3A\n\t\t\u5176\u7C7B\u578B\u57FA\u4E8E\u8868\u8FBE\u5F0F\u7C7B\u578B\u7684\u53D8\u91CF\u58F0\u660E\u3002\n\nShift-<tab> m\n\t\t\u5B8C\u6210\u8868\u8FBE\u5F0F\u6216\u8BED\u53E5\u4E4B\u540E, \u6309\u4F4F <tab> \u7684\u540C\u65F6\u6309\u4F4F <shift>,\n\t\t\u7136\u540E\u91CA\u653E\u5E76\u6309\u4F4F "m", \u5219\u8868\u8FBE\u5F0F\u6216\u8BED\u53E5\u5C06\u8F6C\u6362\u4E3A\n\t\t\u65B9\u6CD5\u58F0\u660E\u3002\u5982\u679C\u662F\u8868\u8FBE\u5F0F, \u5219\u8FD4\u56DE\u7C7B\u578B\u57FA\u4E8E\u8868\u8FBE\u5F0F\u7684\n\t\t\u7C7B\u578B\u3002\n\nShift-<tab> i\n\t\t\u5728\u4E0D\u53EF\u89E3\u6790\u7684\u6807\u8BC6\u7B26\u540E\u9762, \u6309\u4F4F <tab> \u7684\u540C\u65F6\u6309\u4E0B <shift>,\n\t\t\u7136\u540E\u91CA\u653E\u5E76\u6309 "i", \u6B64\u65F6 jshell \u5C06\u4F1A\u5EFA\u8BAE\u53EF\u80FD\u7684\u5BFC\u5165\u9879,\n\t\t\u8FD9\u5C06\u57FA\u4E8E\u6307\u5B9A\u7C7B\u8DEF\u5F84\u7684\u5185\u5BB9\u89E3\u6790\u6807\u8BC6\u7B26\u3002
 
-help.context.summary = /env /reload \u548C /reset \u7684\u8BC4\u4F30\u4E0A\u4E0B\u6587\u9009\u9879
+help.context.summary = /env /reload \u548C /reset \u7684\u8BC4\u4F30\u4E0A\u4E0B\u6587\u9009\u9879\u7684\u8BF4\u660E
 help.context =\u8FD9\u4E9B\u9009\u9879\u7528\u4E8E\u914D\u7F6E\u8BC4\u4F30\u4E0A\u4E0B\u6587, \u5B83\u4EEC\u53EF\u4EE5\u5728\u542F\u52A8\njshell \u65F6\u6307\u5B9A: \u5728\u547D\u4EE4\u884C\u4E0A, \u6216\u8005\u4F7F\u7528\u547D\u4EE4 /env,\n/reload \u6216 /reset \u91CD\u65B0\u542F\u52A8\u65F6\u3002\n\n\u5B83\u4EEC\u662F:\n\t--class-path <\u76EE\u5F55\u548C zip/jar \u6587\u4EF6\u7684\u7C7B\u641C\u7D22\u8DEF\u5F84>\n\t\t\u7528\u4E8E\u641C\u7D22\u7C7B\u6587\u4EF6\u7684\u76EE\u5F55, JAR \n\t\t\u6863\u6848\u548C ZIP \u6863\u6848\u7684\u5217\u8868\u3002\n\t\t\u8BE5\u5217\u8868\u4F7F\u7528\u8DEF\u5F84\u5206\u9694\u7B26\u5206\u9694\n\t\t(\u5728 unix/linux/mac \u4E0A\u4F7F\u7528 :, \u5728 Windows \u4E0A\u4F7F\u7528 ;)\u3002\n\t--module-path <\u6A21\u5757\u8DEF\u5F84>...\n\t\t\u76EE\u5F55\u5217\u8868, \u5176\u4E2D\u6BCF\u4E2A\u76EE\u5F55\n\t\t\u90FD\u662F\u4E00\u4E2A\u5305\u542B\u6A21\u5757\u7684\u76EE\u5F55\u3002\n\t\t\u8BE5\u5217\u8868\u4F7F\u7528\u8DEF\u5F84\u5206\u9694\u7B26\u5206\u9694\n\t\t(\u5728 unix/linux/mac \u4E0A\u4F7F\u7528 :, \u5728 Windows \u4E0A\u4F7F\u7528 ;)\u3002\n\t--add-modules <\u6A21\u5757\u540D\u79F0>[,<\u6A21\u5757\u540D\u79F0>...]\n\t\t\u9664\u4E86\u521D\u59CB\u6A21\u5757\u4E4B\u5916\u8981\u89E3\u6790\u7684\u6839\u6A21\u5757\u3002\n\t\t<\u6A21\u5757\u540D\u79F0> \u8FD8\u53EF\u4EE5\u662F ALL-DEFAULT, ALL-SYSTEM,\n\t\tALL-MODULE-PATH\u3002\n\t--add-exports <\u6A21\u5757>/<\u7A0B\u5E8F\u5305>=<\u76EE\u6807\u6A21\u5757>(,<\u76EE\u6807\u6A21\u5757>)*\n\t\t\u66F4\u65B0 <\u6A21\u5757> \u4EE5\u5C06 <\u7A0B\u5E8F\u5305> \u5BFC\u51FA\u5230 <\u76EE\u6807\u6A21\u5757>,\n\t\t\u800C\u65E0\u8BBA\u6A21\u5757\u58F0\u660E\u5982\u4F55\u3002\n\t\t<\u76EE\u6807\u6A21\u5757> \u53EF\u4EE5\u662F ALL-UNNAMED \u4EE5\u5BFC\u51FA\u5230\u5168\u90E8\n\t\t\u672A\u547D\u540D\u6A21\u5757\u3002\u5728 jshell \u4E2D, \u5982\u679C\u672A\u6307\u5B9A \n\t\t<\u76EE\u6807\u6A21\u5757> (no =), \u5219\u4F7F\u7528 ALL-UNNAMED\u3002\n\n\u5728\u547D\u4EE4\u884C\u4E0A, \u8FD9\u4E9B\u9009\u9879\u5FC5\u987B\u6709\u4E24\u4E2A\u77ED\u5212\u7EBF, \u4F8B\u5982: --module-path\n\u5728 jshell \u547D\u4EE4\u4E0A, \u5B83\u4EEC\u53EF\u4EE5\u6709\u4E00\u4E2A\u6216\u4E24\u4E2A\u77ED\u5212\u7EBF, \u4F8B\u5982: -module-path\n
+help.rerun.summary = \u91CD\u65B0\u8BC4\u4F30\u4EE5\u524D\u8F93\u5165\u7247\u6BB5\u7684\u65B9\u6CD5\u7684\u8BF4\u660E
+help.rerun =\u91CD\u65B0\u4EE5\u524D\u8F93\u5165\u7684\u7247\u6BB5\u6709\u56DB\u79CD\u65B9\u6CD5\u3002\n\u91CD\u65B0\u8BC4\u4F30\u4E0A\u4E00\u4E2A\u7247\u6BB5\u4F7F\u7528\u7684\u65B9\u6CD5\u4E3A: /!\n\u53EF\u4EE5\u4F7F\u7528\u659C\u6760\u52A0\u51CF\u53F7\u52A0\u6570\u5B57 n \u6765\u91CD\u65B0\u8BC4\u4F30\u4E4B\u524D\u7684\u7B2C n \u4E2A\u7247\u6BB5, \u4F8B\u5982: /-4\n\u4F8B\u5982:\n\n\tjshell> 2 + 2\n\t$1 ==> 4\n\n\tjshell> /!\n\t2 + 2\n\t$2 ==> 4\n\n\tjshell> int z\n\tz ==> 0\n\n\tjshell> /-1\n\tint z;\n\tz ==> 0\n\n\tjshell> /-4\n\t2 + 2\n\t$5 ==> 4\n\n\u53EF\u4EE5\u4F7F\u7528\u7247\u6BB5 ID \u6216 ID \u8303\u56F4\u6307\u5B9A\u8981\u91CD\u65B0\u8BC4\u4F30\u7684\u7247\u6BB5\u3002\nID \u8303\u56F4\u4EE5\u901A\u8FC7\u8FDE\u5B57\u7B26\u5206\u9694\u7684\u4E24\u4E2A ID \u8868\u793A, \u4F8B\u5982: 3-17\n\u53EF\u80FD\u4F7F\u7528\u542F\u52A8\u548C\u9519\u8BEF\u7247\u6BB5, \u4F8B\u5982: s3-s9    \u6216   e1-e4\n\u53EF\u4EE5\u4F7F\u7528\u4EFB\u610F\u6570\u91CF\u7684 ID \u6216 ID \u8303\u56F4, \u4F8B\u5982: /3-7 s4 14-16 e2\n\n\u6700\u540E, \u53EF\u4EE5\u901A\u8FC7\u8F93\u5165 ctrl-R \u540E\u8DDF\u8981\u641C\u7D22\u7684\u5B57\u7B26\u4E32, \u901A\u8FC7\u5386\u53F2\u8BB0\u5F55\u5411\u540E\u641C\u7D22\u3002
+
 help.set._retain = '-retain' \u9009\u9879\u4FDD\u5B58\u8BBE\u7F6E\u4EE5\u4FBF\u5728\u5C06\u6765\u4F1A\u8BDD\u4E2D\u4F7F\u7528\u3002\n\u53EF\u4EE5\u5728 /set \u7684\u4EE5\u4E0B\u683C\u5F0F\u4E2D\u4F7F\u7528 -retain \u9009\u9879:\n\n\t/set editor -retain\n\t/set start -retain\n\t/set feedback -retain\n\t/set mode -retain\n\n\u6709\u5173\u8BE6\u7EC6\u4FE1\u606F, \u8BF7\u53C2\u9605\u8FD9\u4E9B\u547D\u4EE4 -- \u4F8B\u5982, /help /set editor
 
+help.set.format.summary = \u8BBE\u7F6E\u7528\u4E8E\u62A5\u544A\u7247\u6BB5\u4E8B\u4EF6\u7684\u683C\u5F0F\u3002
+
 help.set.format = \u8BBE\u7F6E\u7528\u4E8E\u62A5\u544A\u7247\u6BB5\u4E8B\u4EF6\u7684\u683C\u5F0F\uFF1A\n\n\t/set format <\u6A21\u5F0F> <\u5B57\u6BB5> "<\u683C\u5F0F>" <\u9009\u62E9\u5668>...\n\n\u663E\u793A\u683C\u5F0F\u8BBE\u7F6E:\n\n\t/set format [<\u6A21\u5F0F> [<\u5B57\u6BB5>]]\n\n\u5176\u4E2D <\u6A21\u5F0F> \u662F\u4EE5\u524D\u5B9A\u4E49\u7684\u53CD\u9988\u6A21\u5F0F\u7684\u540D\u79F0 -- \u8BF7\u53C2\u9605 '/help /set mode'\u3002\n\u5176\u4E2D <\u5B57\u6BB5> \u662F\u8981\u5B9A\u4E49\u7684\u4E0A\u4E0B\u6587\u7279\u5B9A\u683C\u5F0F\u7684\u540D\u79F0\u3002\n\u5176\u4E2D <\u683C\u5F0F> \u662F\u4E00\u4E2A\u5E26\u5F15\u53F7\u7684\u5B57\u7B26\u4E32, \u8BE5\u5B57\u7B26\u4E32\u5C06\u4E3A\n\u5B57\u6BB5\u7684\u503C (\u5982\u679C\u9009\u62E9\u5668\u5339\u914D, \u6216\u8005\u6CA1\u6709\u4EFB\u4F55\u9009\u62E9\u5668)\u3002\n\u5728\u4F7F\u7528\u683C\u5F0F\u65F6, \u7528\u5927\u62EC\u53F7\u62EC\u8D77\u7684\u5B57\u6BB5\u540D\u5C06\u4F1A\u5728\u76F8\u5E94\u65F6\u95F4\n\u4F7F\u7528\u5B57\u6BB5\u503C\u66FF\u6362\u3002\u8FD9\u4E9B\u5B57\u6BB5\u53EF\u80FD\u5DF2\u4F7F\u7528\u6B64\u547D\u4EE4\u5B9A\u4E49, \n\u4E5F\u53EF\u80FD\u662F\u7279\u5B9A\u4E8E\u4E0A\u4E0B\u6587\u7684\u4EE5\u4E0B\u9884\u5B9A\u4E49\u5B57\u6BB5\u4E4B\u4E00:\n\t{name}       == \u540D\u79F0, \u4F8B\u5982: \u53D8\u91CF\u7684\u540D\u79F0, ...\n\t{type}       == \u7C7B\u578B\u540D\u79F0\u3002\u53D8\u91CF\u6216\u8868\u8FBE\u5F0F\u7684\u7C7B\u578B,\n\t\t\t\u65B9\u6CD5\u7684\u53C2\u6570\u7C7B\u578B\n\t{value}      == \u8868\u8FBE\u5F0F\u6216\u53D8\u91CF\u521D\u59CB\u5316\u7684\u7ED3\u679C\u503C\n\t{unresolved} == \u672A\u89E3\u6790\u5F15\u7528\u7684\u5217\u8868\n\t{errors}     == \u53EF\u6062\u590D\u9519\u8BEF\u7684\u5217\u8868 (\u53EA\u5728\u5904\u7406\n\t\t\t"display" \u5B57\u6BB5\u671F\u95F4)\n\t{err}        == \u65E0\u683C\u5F0F\u7684\u9519\u8BEF\u884C (\u53EA\u5728\u5904\u7406\n\t\t\t"errorline" \u5B57\u6BB5\u671F\u95F4)\n\u8BE5\u5DE5\u5177\u8BBF\u95EE\u4EE5\u4E0B\u5B57\u6BB5\u6765\u786E\u5B9A\u6240\u663E\u793A\u7684\u53CD\u9988:\n\t{display}    == \u4E3A\u7247\u6BB5\u4E8B\u4EF6\u663E\u793A\u7684\u6D88\u606F\n\t{errorline}  == "errors" \u5B57\u6BB5\u4E2D\u7684\u4E00\u4E2A\u9519\u8BEF\u884C\u7684\u683C\u5F0F\n\t{pre}        == \u53CD\u9988\u524D\u7F00 (\u4F5C\u4E3A\u547D\u4EE4\u53CD\u9988\u7684\u5F00\u5934)\n\t{post}       == \u53CD\u9988\u540E\u7F00 (\u4F5C\u4E3A\u547D\u4EE4\u53CD\u9988\u7684\u7ED3\u5C3E)\n\t{errorpre}   == \u9519\u8BEF\u524D\u7F00 (\u4F5C\u4E3A\u9519\u8BEF\u53CD\u9988\u7684\u5F00\u5934)\n\t{errorpost}  == \u9519\u8BEF\u540E\u7F00 (\u4F5C\u4E3A\u9519\u8BEF\u53CD\u9988\u7684\u7ED3\u5C3E)\n\u8FD9\u4E9B\u5B57\u6BB5\u5177\u6709\u9ED8\u8BA4\u8BBE\u7F6E (\u53EF\u8986\u76D6)\u3002\n\u5176\u4E2D <selector> \u662F\u5E94\u7528\u683C\u5F0F\u7684\u4E0A\u4E0B\u6587\u3002\n\u9009\u62E9\u5668\u7ED3\u6784\u662F\u4E00\u4E2A\u7531\u9009\u62E9\u5668\u7C7B\u578B\u5217\u8868\u6784\u6210\u7684\u5217\u8868, \u4F7F\u7528\u8FDE\u5B57\u7B26\u5206\u9694\u3002\n\u9009\u62E9\u5668\u7C7B\u578B\u5217\u8868\u662F\u5355\u4E2A\u9009\u62E9\u5668\u7C7B\u578B\u7684\u503C\u7684\u5217\u8868, \u4F7F\u7528\u9017\u53F7\u5206\u9694\u3002\n\u5982\u679C\u6BCF\u4E2A\u9009\u62E9\u5668\u7C7B\u578B\u5217\u8868\u5339\u914D, \u5219\u9009\u62E9\u5668\u5339\u914D; \u5982\u679C\u5176\u4E2D\u67D0\u4E2A\u503C\n\u5339\u914D, \u5219\u9009\u62E9\u5668\u7C7B\u578B\u5217\u8868\u5339\u914D\u3002\n\ncase \u9009\u62E9\u5668\u7C7B\u578B\u63CF\u8FF0\u4E86\u7247\u6BB5\u7684\u7C7B\u578B\u3002\u503C\u5305\u62EC:\n\timport     -- \u5BFC\u5165\u58F0\u660E\n\tclass      -- \u7C7B\u58F0\u660E\n\tinterface  -- \u63A5\u53E3\u58F0\u660E\n\tenum       -- \u679A\u4E3E\u58F0\u660E\n\tannotation -- \u6CE8\u91CA\u63A5\u53E3\u58F0\u660E\n\tmethod     -- \u65B9\u6CD5\u58F0\u660E -- \u6CE8: {type}==parameter-types\n\tvardecl    -- \u4E0D\u5E26\u521D\u59CB\u5316\u7684\u53D8\u91CF\u58F0\u660E\n\tvardecl    -- \u5E26\u521D\u59CB\u5316\u7684\u53D8\u91CF\u58F0\u660E\n\texpression -- \u8868\u8FBE\u5F0F -- \u6CE8: \
-{name}==scratch-variable-name\n\tvarvalue   -- \u53D8\u91CF\u503C\u8868\u8FBE\u5F0F\n\tassignment -- \u5206\u914D\u53D8\u91CF\n\tstatement  -- \u8BED\u53E5\n\u64CD\u4F5C\u9009\u62E9\u5668\u7C7B\u578B\u63CF\u8FF0\u4E86\u5BF9\u7247\u6BB5\u6267\u884C\u7684\u64CD\u4F5C\u3002\u503C\u5305\u62EC:\n\tadded     -- \u7247\u6BB5\u5DF2\u6DFB\u52A0\n\tmodified  -- \u73B0\u6709\u7247\u6BB5\u5DF2\u4FEE\u6539\n\treplaced  -- \u73B0\u6709\u7247\u6BB5\u5DF2\u66FF\u6362\u4E3A\u65B0\u7247\u6BB5\n\toverwrote -- \u73B0\u6709\u7247\u6BB5\u5DF2\u8986\u76D6\n\tdropped   -- \u7247\u6BB5\u5DF2\u5220\u9664\n\tused      -- \u7247\u6BB5\u5728\u4E0D\u80FD\u4F7F\u7528\u7684\u65F6\u5019\u5DF2\u88AB\u4F7F\u7528\nwhen-did-it-occur \u9009\u62E9\u5668\u7C7B\u578B\u63CF\u8FF0\u4E86\u8FD9\u662F\u76F4\u63A5\u64CD\u4F5C\u8FD8\u662F\u95F4\u63A5\u64CD\u4F5C\u3002\u503C\u5305\u62EC:\n\tprimary -- \u8F93\u5165\u7684\u7247\u6BB5\n\tupdate  -- \u5BF9\u76F8\u5173\u7247\u6BB5\u7684\u66F4\u65B0\nresolution-state \u9009\u62E9\u5668\u7C7B\u578B\u63CF\u8FF0\u4E86\u7247\u6BB5\u7684\u89E3\u6790/\u5B9A\u4E49\u72B6\u6001\u3002\u503C\u5305\u62EC:\n\tok         -- \u5DF2\u6B63\u786E\u89E3\u6790\n\tdefined    -- \u5DF2\u5B9A\u4E49, \u4F46\u5B58\u5728\u53EF\u6062\u590D\u7684\u672A\u89E3\u6790\u5F15\u7528\n\tnotdefined -- \u7531\u4E8E\u5B58\u5728\u53EF\u6062\u590D\u7684\u672A\u89E3\u6790\u5F15\u7528\u800C\u672A\u5B9A\u4E49\nunresolved-count \u9009\u62E9\u5668\u7C7B\u578B\u63CF\u8FF0\u4E86\u672A\u89E3\u6790\u5F15\u7528\u7684\u6570\u91CF\u3002\u503C\u5305\u62EC:\n\tunresolved0 -- \u4E0D\u5B58\u5728\u672A\u89E3\u6790\u7684\u540D\u79F0\n\tunresolved1 -- \u4E00\u4E2A\u540D\u79F0\u672A\u89E3\u6790\n\tunresolved2 -- \u4E24\u4E2A\u6216\u66F4\u591A\u540D\u79F0\u672A\u89E3\u6790\nerrors-count \u9009\u62E9\u5668\u7C7B\u578B\u63CF\u8FF0\u4E86\u9519\u8BEF\u7684\u6570\u91CF\u3002\u503C\u5305\u62EC:\n\terror0 -- \u65E0\u9519\u8BEF\n\terror1 -- \u4E00\u4E2A\u9519\u8BEF\n\terror2 -- \u4E24\u4E2A\u6216\u66F4\u591A\u9519\u8BEF\n\n\u793A\u4F8B:\n\t/set format myformat action '\u5DF2\u521B\u5EFA' added-primary\n\t/set format myformat action '\u66F4\u65B0\u5DF2\u66FF\u6362' replaced-update\n\t/set format myformat display '{pre}{action} \u7C7B {name}{post}' class-ok\n\t/set format myformat display '{pre}{action} \u53D8\u91CF {name}, \u91CD\u7F6E\u4E3A\u7A7A\u503C{post}' replaced-vardecl,varinit-ok-update\n\n\u8BF7\u6CE8\u610F, \u67D0\u4E2A\u5B57\u6BB5\u7684\u540E\u7EED\u9009\u62E9\u5668\u53EF\u80FD\u4F1A\u8986\u76D6\u90E8\u5206\u6216\u5168\u90E8\u4EE5\u524D\u4F7F\u7528\u7684\u9009\u62E9\u5668 -- \u91C7\u7528\u6700\u540E\u4E00\u4E2A\u9009\u62E9\u5668\n\n\u4E0D\u5E26 <\u683C\u5F0F> \u7684\u683C\u5F0F\u663E\u793A\u5F53\u524D\u683C\u5F0F\u8BBE\u7F6E\u3002\n\u6307\u5B9A <\u6A21\u5F0F> \u65F6, \u5C06\u4EC5\u663E\u793A\u8BE5\u6A21\u5F0F\u7684\u683C\u5F0F\u8BBE\u7F6E\u3002\n\u540C\u65F6\u6307\u5B9A <\u6A21\u5F0F> \u548C <\u5B57\u6BB5> \u65F6, \u5C06\u4EC5\u663E\u793A\u8BE5\u6A21\u5F0F\u548C\u5B57\u6BB5\u7684\n\u683C\u5F0F\u8BBE\u7F6E\u3002\u793A\u4F8B:\n\t/set format myformat\n\u663E\u793A\u6A21\u5F0F myformat \u7684\u683C\u5F0F\u8BBE\u7F6E\n
+{name}==scratch-variable-name\n\tvarvalue   -- \u53D8\u91CF\u503C\u8868\u8FBE\u5F0F\n\tassignment -- \u5206\u914D\u53D8\u91CF\n\tstatement  -- \u8BED\u53E5\n\u64CD\u4F5C\u9009\u62E9\u5668\u7C7B\u578B\u63CF\u8FF0\u4E86\u5BF9\u7247\u6BB5\u6267\u884C\u7684\u64CD\u4F5C\u3002\u503C\u5305\u62EC:\n\tadded     -- \u7247\u6BB5\u5DF2\u6DFB\u52A0\n\tmodified  -- \u73B0\u6709\u7247\u6BB5\u5DF2\u4FEE\u6539\n\treplaced  -- \u73B0\u6709\u7247\u6BB5\u5DF2\u66FF\u6362\u4E3A\u65B0\u7247\u6BB5\n\toverwrote -- \u73B0\u6709\u7247\u6BB5\u5DF2\u8986\u76D6\n\tdropped   -- \u7247\u6BB5\u5DF2\u5220\u9664\n\tused      -- \u7247\u6BB5\u5728\u4E0D\u80FD\u4F7F\u7528\u7684\u65F6\u5019\u5DF2\u88AB\u4F7F\u7528\nwhen-did-it-occur \u9009\u62E9\u5668\u7C7B\u578B\u63CF\u8FF0\u4E86\u8FD9\u662F\u76F4\u63A5\u64CD\u4F5C\u8FD8\u662F\u95F4\u63A5\u64CD\u4F5C\u3002\u503C\u5305\u62EC:\n\tprimary -- \u8F93\u5165\u7684\u7247\u6BB5\n\tupdate  -- \u5BF9\u76F8\u5173\u7247\u6BB5\u7684\u66F4\u65B0\nresolution-state \u9009\u62E9\u5668\u7C7B\u578B\u63CF\u8FF0\u4E86\u7247\u6BB5\u7684\u89E3\u6790/\u5B9A\u4E49\u72B6\u6001\u3002\u503C\u5305\u62EC:\n\tok         -- \u5DF2\u6B63\u786E\u89E3\u6790\n\tdefined    -- \u5DF2\u5B9A\u4E49, \u4F46\u5B58\u5728\u53EF\u6062\u590D\u7684\u672A\u89E3\u6790\u5F15\u7528\n\tnotdefined -- \u7531\u4E8E\u5B58\u5728\u53EF\u6062\u590D\u7684\u672A\u89E3\u6790\u5F15\u7528\u800C\u672A\u5B9A\u4E49\nunresolved-count \u9009\u62E9\u5668\u7C7B\u578B\u63CF\u8FF0\u4E86\u672A\u89E3\u6790\u5F15\u7528\u7684\u6570\u91CF\u3002\u503C\u5305\u62EC:\n\tunresolved0 -- \u4E0D\u5B58\u5728\u672A\u89E3\u6790\u7684\u540D\u79F0\n\tunresolved1 -- \u4E00\u4E2A\u540D\u79F0\u672A\u89E3\u6790\n\tunresolved2 -- \u4E24\u4E2A\u6216\u66F4\u591A\u540D\u79F0\u672A\u89E3\u6790\nerrors-count \u9009\u62E9\u5668\u7C7B\u578B\u63CF\u8FF0\u4E86\u9519\u8BEF\u7684\u6570\u91CF\u3002\u503C\u5305\u62EC:\n\terror0 -- \u65E0\u9519\u8BEF\n\terror1 -- \u4E00\u4E2A\u9519\u8BEF\n\terror2 -- \u4E24\u4E2A\u6216\u66F4\u591A\u9519\u8BEF\n\n\u793A\u4F8B:\n\t/set format mymode action '\u5DF2\u521B\u5EFA' added-primary\n\t/set format mymode action '\u66F4\u65B0\u5DF2\u66FF\u6362' replaced-update\n\t/set format mymode display '{pre}{action} \u7C7B {name}{post}' class-ok\n\t/set format mymode display '{pre}{action} \u53D8\u91CF {name}, \u91CD\u7F6E\u4E3A\u7A7A\u503C{post}' replaced-vardecl,varinit-ok-update\n\n\u8BF7\u6CE8\u610F, \u67D0\u4E2A\u5B57\u6BB5\u7684\u540E\u7EED\u9009\u62E9\u5668\u53EF\u80FD\u4F1A\u8986\u76D6\u90E8\u5206\u6216\u5168\u90E8\u4EE5\u524D\u4F7F\u7528\u7684\u9009\u62E9\u5668 -- \u91C7\u7528\u6700\u540E\u4E00\u4E2A\u9009\u62E9\u5668\n\n\u4E0D\u5E26 <\u683C\u5F0F> \u7684\u683C\u5F0F\u663E\u793A\u5F53\u524D\u683C\u5F0F\u8BBE\u7F6E\u3002\n\u6307\u5B9A <\u6A21\u5F0F> \u65F6, \u5C06\u4EC5\u663E\u793A\u8BE5\u6A21\u5F0F\u7684\u683C\u5F0F\u8BBE\u7F6E\u3002\n\u540C\u65F6\u6307\u5B9A <\u6A21\u5F0F> \u548C <\u5B57\u6BB5> \u65F6, \u5C06\u4EC5\u663E\u793A\u8BE5\u6A21\u5F0F\u548C\u5B57\u6BB5\u7684\n\u683C\u5F0F\u8BBE\u7F6E\u3002\u793A\u4F8B:\n\t/set format mymode\n\u663E\u793A\u6A21\u5F0F mymode \u7684\u683C\u5F0F\u8BBE\u7F6E\n
+
+help.set.truncation.summary = \u8BBE\u7F6E\u663E\u793A\u503C\u7684\u6700\u5927\u957F\u5EA6\u3002
 
-help.set.truncation = \u8BBE\u7F6E\u663E\u793A\u503C\u7684\u6700\u5927\u957F\u5EA6:\n\n\t/set truncation <\u6A21\u5F0F> <\u957F\u5EA6> <\u9009\u62E9\u5668>...\n\n\u663E\u793A\u5F53\u524D\u622A\u65AD\u8BBE\u7F6E:\n\n\t/set truncation [<\u6A21\u5F0F>]\n\n\u5176\u4E2D <\u6A21\u5F0F> \u662F\u4EE5\u524D\u5B9A\u4E49\u7684\u53CD\u9988\u6A21\u5F0F\u540D\u79F0 -- \u8BF7\u53C2\u9605 '/help /set mode'\u3002\n\u800C <\u957F\u5EA6> \u662F\u65E0\u7B26\u53F7\u6574\u6570, \u8868\u793A\u6700\u5927\u957F\u5EA6\u3002\n<\u9009\u62E9\u5668> \u53EA\u6709\u5728\u60A8\u5E0C\u671B\u6839\u636E\u4E0A\u4E0B\u6587\u5FAE\u8C03\u503C\u622A\u65AD\u957F\u5EA6\u65F6\u624D\u9700\u8981,\n<\u9009\u62E9\u5668> \u662F\u5728\u5176\u4E2D\u5E94\u7528\u622A\u65AD\u7684\u4E0A\u4E0B\u6587\u3002\n\u9009\u62E9\u5668\u7ED3\u6784\u662F\u4E00\u4E2A\u8FDE\u5B57\u7B26\u5206\u9694\u7684\u9009\u62E9\u5668\u7C7B\u578B\u5217\u8868\u3002\n\u9009\u62E9\u5668\u7C7B\u578B\u5217\u8868\u662F\u4E00\u4E2A\u5305\u542B\u67D0\u79CD\u9009\u62E9\u5668\u7C7B\u578B\u7684\u503C\u7684\u9017\u53F7\u5206\u9694\u5217\u8868\u3002\n\u9009\u62E9\u5668\u5728\u6240\u6709\u9009\u62E9\u5668\u7C7B\u578B\u5217\u8868\u5339\u914D\u65F6\u5339\u914D; \u9009\u62E9\u5668\u7C7B\u578B\u5217\u8868\n\u5219\u5728\u5176\u4E2D\u4E00\u4E2A\u503C\u5339\u914D\u65F6\u5339\u914D\u3002\n\n\u4E0B\u9762\u662F\u7528\u4E8E\u622A\u65AD\u7684\u76F8\u5173\u9009\u62E9\u5668\u7C7B\u578B\u3002\n\ncase \u9009\u62E9\u5668\u7C7B\u578B\u63CF\u8FF0\u4E86\u7247\u6BB5\u7684\u7C7B\u578B\u3002\u503C\u5305\u62EC:\n\tvardecl    -- \u4E0D\u5E26\u521D\u59CB\u5316\u7684\u53D8\u91CF\u58F0\u660E\n\tvarinit    -- \u5E26\u521D\u59CB\u5316\u7684\u53D8\u91CF\u58F0\u660E\n\texpression -- \u8868\u8FBE\u5F0F -- \u6CE8: {name}==\u6682\u5B58\u53D8\u91CF\u540D\u79F0\n\tvarvalue   -- \u53D8\u91CF\u503C\u8868\u8FBE\u5F0F\n\tassignment -- \u5206\u914D\u53D8\u91CF\n\t\u64CD\u4F5C\u9009\u62E9\u5668\u7C7B\u578B\u63CF\u8FF0\u4E86\u5BF9\u7247\u6BB5\u6267\u884C\u7684\u64CD\u4F5C\u3002\u503C\u5305\u62EC:\n\tadded     -- \u7247\u6BB5\u5DF2\u6DFB\u52A0\n\tmodified  -- \u73B0\u6709\u7247\u6BB5\u5DF2\u4FEE\u6539\n\treplaced  -- \u73B0\u6709\u7247\u6BB5\u5DF2\u66FF\u6362\u4E3A\u65B0\u7247\u6BB5\n\u793A\u4F8B:\n\t/set trunc mymode 80\n\t/set truncation mymode 45 expression\n\t/set truncation mymode 0 vardecl-modified,replaced\n\n\u8BF7\u6CE8\u610F, \u67D0\u4E2A\u5B57\u6BB5\u7684\u540E\u7EED\u9009\u62E9\u5668\u53EF\u80FD\u4F1A\u8986\u76D6\u90E8\u5206\u6216\u5168\u90E8\u4EE5\u524D\u4F7F\u7528\u7684\u9009\u62E9\u5668 -- \u91C7\u7528\u6700\u540E\u4E00\u4E2A\u9009\u62E9\u5668\n\n\u4E0D\u5E26 <\u957F\u5EA6> \u7684\u683C\u5F0F\u663E\u793A\u622A\u65AD\u8BBE\u7F6E\u3002\n\u6307\u5B9A <\u6A21\u5F0F> \u65F6, \u5C06\u4EC5\u663E\u793A\u8BE5\u6A21\u5F0F\u7684\u622A\u65AD\u8BBE\u7F6E\u3002\n\u793A\u4F8B:\n\t/set truncation myformat\n\u663E\u793A\u6A21\u5F0F myformat \u7684\u622A\u65AD\u8BBE\u7F6E\n
+help.set.truncation = \u8BBE\u7F6E\u663E\u793A\u503C\u7684\u6700\u5927\u957F\u5EA6:\n\n\t/set truncation <\u6A21\u5F0F> <\u957F\u5EA6> <\u9009\u62E9\u5668>...\n\n\u663E\u793A\u5F53\u524D\u622A\u65AD\u8BBE\u7F6E:\n\n\t/set truncation [<\u6A21\u5F0F>]\n\n\u5176\u4E2D <\u6A21\u5F0F> \u662F\u4EE5\u524D\u5B9A\u4E49\u7684\u53CD\u9988\u6A21\u5F0F\u540D\u79F0 -- \u8BF7\u53C2\u9605 '/help /set mode'\u3002\n\u800C <\u957F\u5EA6> \u662F\u65E0\u7B26\u53F7\u6574\u6570, \u8868\u793A\u6700\u5927\u957F\u5EA6\u3002\n<\u9009\u62E9\u5668> \u53EA\u6709\u5728\u60A8\u5E0C\u671B\u6839\u636E\u4E0A\u4E0B\u6587\u5FAE\u8C03\u503C\u622A\u65AD\u957F\u5EA6\u65F6\u624D\u9700\u8981,\n<\u9009\u62E9\u5668> \u662F\u5728\u5176\u4E2D\u5E94\u7528\u622A\u65AD\u7684\u4E0A\u4E0B\u6587\u3002\n\u9009\u62E9\u5668\u7ED3\u6784\u662F\u4E00\u4E2A\u8FDE\u5B57\u7B26\u5206\u9694\u7684\u9009\u62E9\u5668\u7C7B\u578B\u5217\u8868\u3002\n\u9009\u62E9\u5668\u7C7B\u578B\u5217\u8868\u662F\u4E00\u4E2A\u5305\u542B\u67D0\u79CD\u9009\u62E9\u5668\u7C7B\u578B\u7684\u503C\u7684\u9017\u53F7\u5206\u9694\u5217\u8868\u3002\n\u9009\u62E9\u5668\u5728\u6240\u6709\u9009\u62E9\u5668\u7C7B\u578B\u5217\u8868\u5339\u914D\u65F6\u5339\u914D; \u9009\u62E9\u5668\u7C7B\u578B\u5217\u8868\n\u5219\u5728\u5176\u4E2D\u4E00\u4E2A\u503C\u5339\u914D\u65F6\u5339\u914D\u3002\n\n\u4E0B\u9762\u662F\u7528\u4E8E\u622A\u65AD\u7684\u76F8\u5173\u9009\u62E9\u5668\u7C7B\u578B\u3002\n\ncase \u9009\u62E9\u5668\u7C7B\u578B\u63CF\u8FF0\u4E86\u7247\u6BB5\u7684\u7C7B\u578B\u3002\u503C\u5305\u62EC:\n\tvardecl    -- \u4E0D\u5E26\u521D\u59CB\u5316\u7684\u53D8\u91CF\u58F0\u660E\n\tvarinit    -- \u5E26\u521D\u59CB\u5316\u7684\u53D8\u91CF\u58F0\u660E\n\texpression -- \u8868\u8FBE\u5F0F -- \u6CE8: {name}==\u6682\u5B58\u53D8\u91CF\u540D\u79F0\n\tvarvalue   -- \u53D8\u91CF\u503C\u8868\u8FBE\u5F0F\n\tassignment -- \u5206\u914D\u53D8\u91CF\n\t\u64CD\u4F5C\u9009\u62E9\u5668\u7C7B\u578B\u63CF\u8FF0\u4E86\u5BF9\u7247\u6BB5\u6267\u884C\u7684\u64CD\u4F5C\u3002\u503C\u5305\u62EC:\n\tadded     -- \u7247\u6BB5\u5DF2\u6DFB\u52A0\n\tmodified  -- \u73B0\u6709\u7247\u6BB5\u5DF2\u4FEE\u6539\n\treplaced  -- \u73B0\u6709\u7247\u6BB5\u5DF2\u66FF\u6362\u4E3A\u65B0\u7247\u6BB5\n\u793A\u4F8B:\n\t/set trunc mymode 80\n\t/set truncation mymode 45 expression\n\t/set truncation mymode 0 vardecl-modified,replaced\n\n\u8BF7\u6CE8\u610F, \u67D0\u4E2A\u5B57\u6BB5\u7684\u540E\u7EED\u9009\u62E9\u5668\u53EF\u80FD\u4F1A\u8986\u76D6\u90E8\u5206\u6216\u5168\u90E8\u4EE5\u524D\u4F7F\u7528\u7684\u9009\u62E9\u5668 -- \u91C7\u7528\u6700\u540E\u4E00\u4E2A\u9009\u62E9\u5668\n\n\u4E0D\u5E26 <\u957F\u5EA6> \u7684\u683C\u5F0F\u663E\u793A\u622A\u65AD\u8BBE\u7F6E\u3002\n\u6307\u5B9A <\u6A21\u5F0F> \u65F6, \u5C06\u4EC5\u663E\u793A\u8BE5\u6A21\u5F0F\u7684\u622A\u65AD\u8BBE\u7F6E\u3002\n\u793A\u4F8B:\n\t/set truncation mymode\n\u663E\u793A\u6A21\u5F0F mymode \u7684\u622A\u65AD\u8BBE\u7F6E\n
+
+help.set.feedback.summary = \u8BBE\u7F6E\u7528\u4E8E\u63CF\u8FF0\u4E3A\u6240\u8F93\u5165\u7247\u6BB5\u548C\u547D\u4EE4\u663E\u793A\u7684\u53CD\u9988\u7684\u53CD\u9988\u6A21\u5F0F\u3002
 
 help.set.feedback = \u8BBE\u7F6E\u53CD\u9988\u6A21\u5F0F, \u8BE5\u6A21\u5F0F\u63CF\u8FF0\u4E3A\u6240\u8F93\u5165\u7684\u7247\u6BB5\u548C\u547D\u4EE4\u663E\u793A\u7684\u53CD\u9988:\n\n\t/set feedback [-retain] <\u6A21\u5F0F>\n\n\u4FDD\u7559\u5F53\u524D\u53CD\u9988\u6A21\u5F0F\u4EE5\u4FBF\u5728\u5C06\u6765\u4F1A\u8BDD\u4E2D\u4F7F\u7528:\n\n\t/set feedback -retain\n\n\u663E\u793A\u53CD\u9988\u6A21\u5F0F\u5E76\u5217\u51FA\u53EF\u7528\u6A21\u5F0F:\n\n\t/set feedback\n\n\u5176\u4E2D <\u6A21\u5F0F> \u662F\u4EE5\u524D\u5B9A\u4E49\u7684\u53CD\u9988\u6A21\u5F0F\u540D\u79F0\u3002\n\u60A8\u53EF\u4EE5\u4F7F\u7528\u8DB3\u591F\u591A\u7684\u5B57\u6BCD\u6765\u63D0\u4F9B\u552F\u4E00\u7684\u540D\u79F0\u3002\n\u53EF\u4EE5\u6DFB\u52A0\u7528\u6237\u5B9A\u4E49\u7684\u6A21\u5F0F, \u5177\u4F53\u8BF7\u53C2\u9605 '/help /set mode'\n\n\u4F7F\u7528 -retain \u9009\u9879\u65F6, \u5C06\u5728\u672C\u6B21\u8FD0\u884C\u548C\u5C06\u6765\u8FD0\u884C jshell \u5DE5\u5177\u65F6\n\u4F7F\u7528\u6B64\u8BBE\u7F6E\u3002\n\n\u4E0D\u5E26 <\u6A21\u5F0F> \u7684\u683C\u5F0F\u6216 -retain \u663E\u793A\u5F53\u524D\u53CD\u9988\u6A21\u5F0F\u548C\u53EF\u7528\u6A21\u5F0F\u3002\n
 
-help.set.mode = \u521B\u5EFA\u7528\u6237\u5B9A\u4E49\u7684\u53CD\u9988\u6A21\u5F0F, \u4E5F\u53EF\u4EE5\u9009\u62E9\u4ECE\u73B0\u6709\u6A21\u5F0F\u590D\u5236:\n\n\t/set mode <\u65B0\u6A21\u5F0F> [<\u65E7\u6A21\u5F0F>] (-command|-quiet)\n\n\u4FDD\u7559\u7528\u6237\u5B9A\u4E49\u7684\u53CD\u9988\u6A21\u5F0F\u4EE5\u4FBF\u5728\u5C06\u6765\u4F1A\u8BDD\u4E2D\u4F7F\u7528:\n\n\t/set mode -retain <\u6A21\u5F0F>\n\n\u5220\u9664\u7528\u6237\u5B9A\u4E49\u7684\u53CD\u9988\u6A21\u5F0F:\n\n\t/set mode -delete [-retain] <\u6A21\u5F0F>\n\n\u663E\u793A\u53CD\u9988\u6A21\u5F0F\u8BBE\u7F6E:\n\n\t/set mode [<\u6A21\u5F0F>]\n\n\u5176\u4E2D <\u65B0\u6A21\u5F0F> \u662F\u60A8\u5E0C\u671B\u521B\u5EFA\u7684\u6A21\u5F0F\u7684\u540D\u79F0\u3002\n\u5176\u4E2D <\u65E7\u6A21\u5F0F> \u662F\u73B0\u6709\u53CD\u9988\u6A21\u5F0F\u7684\u540D\u79F0\u3002\n\u5176\u4E2D <\u6A21\u5F0F> \u662F\u73B0\u6709\u53CD\u9988\u6A21\u5F0F\u7684\u540D\u79F0\u3002\n\n\u5982\u679C\u5B58\u5728 <\u65E7\u6A21\u5F0F>, \u5176\u8BBE\u7F6E\u5C06\u4F1A\u590D\u5236\u5230\u65B0\u6A21\u5F0F\u3002\n\n\u6A21\u5F0F\u4E3A\u6240\u8F93\u5165\u7247\u6BB5\u63D0\u4F9B\u7684\u53CD\u9988\u7531 '/set format' \u8BBE\u7F6E\u786E\u5B9A\u3002\n\u4E0D\u8FC7, \u5BF9\u4E8E\u8F93\u5165\u7684\u547D\u4EE4, \u53CD\u9988\u7684\u542F\u7528\u6216\u7981\u7528\u662F\u6839\u636E\u521B\u5EFA\u6A21\u5F0F\u65F6\n\u4F7F\u7528\u7684\u9009\u9879\u786E\u5B9A\u7684\u3002\u5FC5\u987B\u6307\u5B9A\u9009\u9879 '-command' \u6216\n\u9009\u9879 '-quiet'\u3002\u5982\u679C\u4F7F\u7528 '-command', \u5219\u5728\u65B0\u6A21\u5F0F\n\u4E0B\u65F6\u4F1A\u663E\u793A\u4FE1\u606F\u6027\u548C\u9A8C\u8BC1\u547D\u4EE4\u53CD\u9988\u3002\u5982\u679C\u4F7F\u7528 '-quiet',\n\u5219\u547D\u4EE4\u53EA\u63D0\u4F9B\u57FA\u672C\u53CD\u9988 (\u4F8B\u5982, \u9519\u8BEF)\u3002\n\n\u4E00\u65E6\u521B\u5EFA\u65B0\u6A21\u5F0F, \u5373\u53EF\u4F7F\u7528 '/set format', '/set prompt' \u548C '/set truncation'\n\u8FDB\u884C\u914D\u7F6E\u3002\u4F7F\u7528 '/set feedback' \u53EF\u4F7F\u7528\u65B0\u6A21\u5F0F\u3002\n\n\u4F7F\u7528 -retain \u9009\u9879 (\u4E0D\u5E26 '-delete' \u9009\u9879) \u65F6, \u5C06\u5B58\u50A8\n\u6A21\u5F0F (\u5305\u62EC\u5176\u5F53\u524D\u63D0\u793A, \u683C\u5F0F\u548C\u622A\u65AD\u8BBE\u7F6E) \u4EE5\u4FBF\u5728\u5C06\u6765\u8FD0\u884C\njshell \u5DE5\u5177\u65F6\u4F7F\u7528\u3002\u5982\u679C\u4E0D\u4F7F\u7528 retain, \u5219\u4EC5\u5728\u5F53\u524D\u4F1A\u8BDD\n\u4E2D\u5B9A\u4E49\u6A21\u5F0F\u3002\u5728\u66F4\u65B0\u6A21\u5F0F\u7684\u8BBE\u7F6E\u4E4B\u540E, \u518D\u6B21\u4FDD\u7559\u6A21\u5F0F\u4EE5\u4FBF\u5728\n\u5404\u4E2A\u4F1A\u8BDD\u4E4B\u95F4\u4FDD\u7559\u66F4\u65B0\u3002\n\n\u4EC5\u4F7F\u7528 '-delete' \u9009\u9879\u65F6, \u5C06\u4ECE\u5F53\u524D\u4F1A\u8BDD\u4E2D\u5220\u9664\u6A21\u5F0F\u3002\n\u540C\u65F6\u4F7F\u7528 '-retain' \u548C '-delete' \u65F6, \u5C06\u4ECE\u5F53\u524D\u4F1A\u8BDD\u548C\n\u5C06\u6765\u4F1A\u8BDD\u4E2D\u5220\u9664\u6A21\u5F0F\u3002\n\n\u4F7F\u7528\u4E0D\u5E26\u9009\u9879\u7684\u683C\u5F0F\u65F6, \u5C06\u663E\u793A\u6A21\u5F0F\u8BBE\u7F6E\u3002\n\u6307\u5B9A <\u6A21\u5F0F> \u65F6, \u5C06\u4EC5\u663E\u793A\u8BE5\u6A21\u5F0F\u7684\u6A21\u5F0F\u8BBE\u7F6E\u3002\n\u6CE8: \u6A21\u5F0F\u8BBE\u7F6E\u5305\u62EC\u63D0\u793A, \u683C\u5F0F\u548C\u622A\u65AD\u7684\n\u8BBE\u7F6E\u3002\n\u793A\u4F8B:\n\t/set mode myformat\n\n\u663E\u793A\u6A21\u5F0F myformat \u7684\u6A21\u5F0F, \u63D0\u793A, \u683C\u5F0F\u548C\u622A\u65AD\u8BBE\u7F6E
+help.set.mode.summary = \u521B\u5EFA\u7528\u6237\u5B9A\u4E49\u7684\u53CD\u9988\u6A21\u5F0F, \u53EF\u4EE5\u9009\u62E9\u4ECE\u73B0\u6709\u6A21\u5F0F\u590D\u5236\u3002
+
+help.set.mode = \u521B\u5EFA\u7528\u6237\u5B9A\u4E49\u7684\u53CD\u9988\u6A21\u5F0F, \u4E5F\u53EF\u4EE5\u9009\u62E9\u4ECE\u73B0\u6709\u6A21\u5F0F\u590D\u5236:\n\n\t/set mode <\u65B0\u6A21\u5F0F> [<\u65E7\u6A21\u5F0F>] (-command|-quiet)\n\n\u4FDD\u7559\u7528\u6237\u5B9A\u4E49\u7684\u53CD\u9988\u6A21\u5F0F\u4EE5\u4FBF\u5728\u5C06\u6765\u4F1A\u8BDD\u4E2D\u4F7F\u7528:\n\n\t/set mode -retain <\u6A21\u5F0F>\n\n\u5220\u9664\u7528\u6237\u5B9A\u4E49\u7684\u53CD\u9988\u6A21\u5F0F:\n\n\t/set mode -delete [-retain] <\u6A21\u5F0F>\n\n\u663E\u793A\u53CD\u9988\u6A21\u5F0F\u8BBE\u7F6E:\n\n\t/set mode [<\u6A21\u5F0F>]\n\n\u5176\u4E2D <\u65B0\u6A21\u5F0F> \u662F\u60A8\u5E0C\u671B\u521B\u5EFA\u7684\u6A21\u5F0F\u7684\u540D\u79F0\u3002\n\u5176\u4E2D <\u65E7\u6A21\u5F0F> \u662F\u73B0\u6709\u53CD\u9988\u6A21\u5F0F\u7684\u540D\u79F0\u3002\n\u5176\u4E2D <\u6A21\u5F0F> \u662F\u73B0\u6709\u53CD\u9988\u6A21\u5F0F\u7684\u540D\u79F0\u3002\n\n\u5982\u679C\u5B58\u5728 <\u65E7\u6A21\u5F0F>, \u5176\u8BBE\u7F6E\u5C06\u4F1A\u590D\u5236\u5230\u65B0\u6A21\u5F0F\u3002\n\n\u6A21\u5F0F\u4E3A\u6240\u8F93\u5165\u7247\u6BB5\u63D0\u4F9B\u7684\u53CD\u9988\u7531 '/set format' \u8BBE\u7F6E\u786E\u5B9A\u3002\n\u4E0D\u8FC7, \u5BF9\u4E8E\u8F93\u5165\u7684\u547D\u4EE4, \u53CD\u9988\u7684\u542F\u7528\u6216\u7981\u7528\u662F\u6839\u636E\u521B\u5EFA\u6A21\u5F0F\u65F6\n\u4F7F\u7528\u7684\u9009\u9879\u786E\u5B9A\u7684\u3002\u5FC5\u987B\u6307\u5B9A\u9009\u9879 '-command' \u6216\n\u9009\u9879 '-quiet'\u3002\u5982\u679C\u4F7F\u7528 '-command', \u5219\u5728\u65B0\u6A21\u5F0F\n\u4E0B\u65F6\u4F1A\u663E\u793A\u4FE1\u606F\u6027\u548C\u9A8C\u8BC1\u547D\u4EE4\u53CD\u9988\u3002\u5982\u679C\u4F7F\u7528 '-quiet',\n\u5219\u547D\u4EE4\u53EA\u63D0\u4F9B\u57FA\u672C\u53CD\u9988 (\u4F8B\u5982, \u9519\u8BEF)\u3002\n\n\u4E00\u65E6\u521B\u5EFA\u65B0\u6A21\u5F0F, \u5373\u53EF\u4F7F\u7528 '/set format', '/set prompt' \u548C '/set truncation'\n\u8FDB\u884C\u914D\u7F6E\u3002\u4F7F\u7528 '/set feedback' \u53EF\u4F7F\u7528\u65B0\u6A21\u5F0F\u3002\n\n\u4F7F\u7528 -retain \u9009\u9879 (\u4E0D\u5E26 '-delete' \u9009\u9879) \u65F6, \u5C06\u5B58\u50A8\n\u6A21\u5F0F (\u5305\u62EC\u5176\u5F53\u524D\u63D0\u793A, \u683C\u5F0F\u548C\u622A\u65AD\u8BBE\u7F6E) \u4EE5\u4FBF\u5728\u5C06\u6765\u8FD0\u884C\njshell \u5DE5\u5177\u65F6\u4F7F\u7528\u3002\u5982\u679C\u4E0D\u4F7F\u7528 retain, \u5219\u4EC5\u5728\u5F53\u524D\u4F1A\u8BDD\n\u4E2D\u5B9A\u4E49\u6A21\u5F0F\u3002\u5728\u66F4\u65B0\u6A21\u5F0F\u7684\u8BBE\u7F6E\u4E4B\u540E, \u518D\u6B21\u4FDD\u7559\u6A21\u5F0F\u4EE5\u4FBF\u5728\n\u5404\u4E2A\u4F1A\u8BDD\u4E4B\u95F4\u4FDD\u7559\u66F4\u65B0\u3002\n\n\u4EC5\u4F7F\u7528 '-delete' \u9009\u9879\u65F6, \u5C06\u4ECE\u5F53\u524D\u4F1A\u8BDD\u4E2D\u5220\u9664\u6A21\u5F0F\u3002\n\u540C\u65F6\u4F7F\u7528 '-retain' \u548C '-delete' \u65F6, \u5C06\u4ECE\u5F53\u524D\u4F1A\u8BDD\u548C\n\u5C06\u6765\u4F1A\u8BDD\u4E2D\u5220\u9664\u6A21\u5F0F\u3002\n\n\u4F7F\u7528\u4E0D\u5E26\u9009\u9879\u7684\u683C\u5F0F\u65F6, \u5C06\u663E\u793A\u6A21\u5F0F\u8BBE\u7F6E\u3002\n\u6307\u5B9A <\u6A21\u5F0F> \u65F6, \u5C06\u4EC5\u663E\u793A\u8BE5\u6A21\u5F0F\u7684\u6A21\u5F0F\u8BBE\u7F6E\u3002\n\u6CE8: \u6A21\u5F0F\u8BBE\u7F6E\u5305\u62EC\u63D0\u793A, \u683C\u5F0F\u548C\u622A\u65AD\u7684\n\u8BBE\u7F6E\u3002\n\u793A\u4F8B:\n\t/set mode mymode\n\n\u663E\u793A\u6A21\u5F0F mymode \u7684\u6A21\u5F0F, \u63D0\u793A, \u683C\u5F0F\u548C\u622A\u65AD\u8BBE\u7F6E
 
-help.set.prompt = \u8BBE\u7F6E\u63D0\u793A\u3002\u5FC5\u987B\u540C\u65F6\u8BBE\u7F6E\u6B63\u5E38\u63D0\u793A\u548C\u66F4\u591A\u63D0\u793A:\n\n\t/set prompt <\u6A21\u5F0F> "<\u63D0\u793A>" "<\u66F4\u591A\u63D0\u793A>"\n\n\u663E\u793A\u6B63\u5E38\u63D0\u793A\u548C\u66F4\u591A\u63D0\u793A:\n\n\t/set prompt [<\u6A21\u5F0F>]\n\n\u5176\u4E2D <\u6A21\u5F0F> \u662F\u4EE5\u524D\u5B9A\u4E49\u7684\u53CD\u9988\u6A21\u5F0F\u540D\u79F0\u3002\n\u800C <\u63D0\u793A> \u548C <\u66F4\u591A\u63D0\u793A> \u662F\u4F5C\u4E3A\u8F93\u5165\u63D0\u793A\u8F93\u51FA\u7684\u5E26\u5F15\u53F7\u7684\u5B57\u7B26\u4E32;\n\u5B83\u4EEC\u5747\u53EF\u9009\u62E9\u6027\u5730\u5305\u542B '%%s', \u8BE5\u53D8\u91CF\u5C06\u88AB\u66FF\u6362\u4E3A\u4E0B\u4E00\u4E2A\u7247\u6BB5 ID --\n\u8BF7\u6CE8\u610F, \u53EF\u80FD\u65E0\u6CD5\u5411\u6240\u8F93\u5165\u5185\u5BB9\u5206\u914D\u8BE5 ID, \u4F8B\u5982\u8FD9\u53EF\u80FD\u662F\u4E00\u4E2A\u9519\u8BEF\u6216\u547D\u4EE4\u3002\n\u66F4\u591A\u63D0\u793A\u5728\u591A\u884C\u7247\u6BB5\u7684\u7B2C\u4E8C\u884C\u4EE5\u53CA\u540E\u7EED\u884C\u4E0A\u4F7F\u7528\u3002\n\n\u4E0D\u5E26 <\u63D0\u793A> \u7684\u683C\u5F0F\u663E\u793A\u5F53\u524D\u8BBE\u7F6E\u7684\u63D0\u793A\u3002\n\u6307\u5B9A <\u6A21\u5F0F> \u65F6, \u5C06\u4EC5\u663E\u793A\u8BE5\u6A21\u5F0F\u7684\u63D0\u793A\u3002\n\u793A\u4F8B:\n\t/set prompt myformat\n\u663E\u793A\u4E3A\u6A21\u5F0F myformat \u8BBE\u7F6E\u7684\u63D0\u793A\n
+help.set.prompt.summary = \u8BBE\u7F6E\u63D0\u793A\u3002
+
+help.set.prompt = \u8BBE\u7F6E\u63D0\u793A\u3002\u5FC5\u987B\u540C\u65F6\u8BBE\u7F6E\u6B63\u5E38\u63D0\u793A\u548C\u66F4\u591A\u63D0\u793A:\n\n\t/set prompt <\u6A21\u5F0F> "<\u63D0\u793A>" "<\u66F4\u591A\u63D0\u793A>"\n\n\u663E\u793A\u6B63\u5E38\u63D0\u793A\u548C\u66F4\u591A\u63D0\u793A:\n\n\t/set prompt [<\u6A21\u5F0F>]\n\n\u5176\u4E2D <\u6A21\u5F0F> \u662F\u4EE5\u524D\u5B9A\u4E49\u7684\u53CD\u9988\u6A21\u5F0F\u540D\u79F0\u3002\n\u800C <\u63D0\u793A> \u548C <\u66F4\u591A\u63D0\u793A> \u662F\u4F5C\u4E3A\u8F93\u5165\u63D0\u793A\u8F93\u51FA\u7684\u5E26\u5F15\u53F7\u7684\u5B57\u7B26\u4E32;\n\u5B83\u4EEC\u5747\u53EF\u9009\u62E9\u6027\u5730\u5305\u542B '%%s', \u8BE5\u53D8\u91CF\u5C06\u88AB\u66FF\u6362\u4E3A\u4E0B\u4E00\u4E2A\u7247\u6BB5 ID --\n\u8BF7\u6CE8\u610F, \u53EF\u80FD\u65E0\u6CD5\u5411\u6240\u8F93\u5165\u5185\u5BB9\u5206\u914D\u8BE5 ID, \u4F8B\u5982\u8FD9\u53EF\u80FD\u662F\u4E00\u4E2A\u9519\u8BEF\u6216\u547D\u4EE4\u3002\n\u66F4\u591A\u63D0\u793A\u5728\u591A\u884C\u7247\u6BB5\u7684\u7B2C\u4E8C\u884C\u4EE5\u53CA\u540E\u7EED\u884C\u4E0A\u4F7F\u7528\u3002\n\n\u4E0D\u5E26 <\u63D0\u793A> \u7684\u683C\u5F0F\u663E\u793A\u5F53\u524D\u8BBE\u7F6E\u7684\u63D0\u793A\u3002\n\u6307\u5B9A <\u6A21\u5F0F> \u65F6, \u5C06\u4EC5\u663E\u793A\u8BE5\u6A21\u5F0F\u7684\u63D0\u793A\u3002\n\u793A\u4F8B:\n\t/set prompt mymode\n\u663E\u793A\u4E3A\u6A21\u5F0F mymode \u8BBE\u7F6E\u7684\u63D0\u793A\n
+
+help.set.editor.summary =\u6307\u5B9A\u4E3A /edit \u547D\u4EE4\u542F\u52A8\u7684\u547D\u4EE4\u3002
 
 help.set.editor =\u6307\u5B9A\u8981\u4E3A /edit \u547D\u4EE4\u542F\u52A8\u7684\u547D\u4EE4:\n\n\t/set editor [-retain] [-wait] <\u547D\u4EE4>\n\n\t/set editor [-retain] -default\n\n\t/set editor [-retain] -delete\n\n\u4FDD\u7559\u5F53\u524D\u7F16\u8F91\u5668\u8BBE\u7F6E\u4EE5\u4FBF\u5728\u5C06\u6765\u4F1A\u8BDD\u4E2D\u4F7F\u7528:\n\n\t/set editor -retain\n\n\u663E\u793A\u8981\u4E3A /edit \u547D\u4EE4\u542F\u52A8\u7684\u547D\u4EE4:\n\n\t/set editor\n\n<\u547D\u4EE4> \u662F\u4E0E\u64CD\u4F5C\u7CFB\u7EDF\u76F8\u5173\u7684\u5B57\u7B26\u4E32\u3002\n<\u547D\u4EE4> \u53EF\u4EE5\u5305\u542B\u7528\u7A7A\u683C\u5206\u9694\u7684\u53C2\u6570 (\u4F8B\u5982\u6807\u8BB0)\n\n\u5982\u679C\u6307\u5B9A\u4E86 -default \u9009\u9879, \u5C06\u4F7F\u7528\u5185\u7F6E\u9ED8\u8BA4\u7F16\u8F91\u5668\u3002\n\n\u5982\u679C\u6307\u5B9A\u4E86 -delete \u9009\u9879, \u5C06\u5FFD\u7565\u4EE5\u524D\u7684\u8BBE\u7F6E -- \u542F\u52A8\njshell \u5DE5\u5177\u65F6\u5C06\u521D\u59CB\u5316\u7F16\u8F91\u5668\u8BBE\u7F6E\u3002\u5177\u4F53\u6765\u8BF4, \u5982\u679C\u5B58\u5728\n\u4FDD\u7559\u7684\u8BBE\u7F6E, \u5C06\u4F7F\u7528\u4FDD\u7559\u7684\u8BBE\u7F6E (\u9664\u975E\u540C\u65F6\u6307\u5B9A -retain \u548C -delete --\n\u8FD9\u5C06\u5220\u9664\u4FDD\u7559\u7684\u8BBE\u7F6E), \u5982\u679C\u8BBE\u7F6E\u4E86\u4EE5\u4E0B\u67D0\u4E2A\u73AF\u5883\u53D8\u91CF, \n\u5C06\u4F7F\u7528\u5B83: JSHELLEDITOR, VISUAL \u6216 EDITOR (\u6309\u6B64\u987A\u5E8F)\u3002\u5426\u5219\u5C06\u4F7F\u7528\n\u5185\u7F6E\u9ED8\u8BA4\u7F16\u8F91\u5668\u3002\n\n\u5982\u679C\u6307\u5B9A\u4E86 <\u547D\u4EE4>, \u5B83\u5C06\u7528\u4F5C\u5916\u90E8\u7F16\u8F91\u5668\u3002<\u547D\u4EE4>\n\u7531\u7A0B\u5E8F\u53CA\u96F6\u4E2A\u6216\u591A\u4E2A\u7A0B\u5E8F\u53C2\u6570\u7EC4\u6210\u3002\u4F7F\u7528 <\u547D\u4EE4>\n\u65F6, \u8981\u7F16\u8F91\u7684\u4E34\u65F6\u6587\u4EF6\u5C06\u4F5C\u4E3A\u6700\u540E\u4E00\u4E2A\u53C2\u6570\u9644\u52A0\u3002\n\u901A\u5E38, \u7F16\u8F91\u6A21\u5F0F\u5C06\u6301\u7EED\u5230\u9000\u51FA\u5916\u90E8\u7F16\u8F91\u5668\u4E3A\u6B62\u3002\u67D0\u4E9B\u5916\u90E8\u7F16\u8F91\u5668\n\u5C06\u7ACB\u5373\u9000\u51FA (\u4F8B\u5982, \u5982\u679C\u9000\u51FA\u7F16\u8F91\u7A97\u53E3), \u5E94\u4F7F\u7528\u5916\u90E8\u7F16\u8F91\u5668\n\u6807\u8BB0\u963B\u6B62\u7ACB\u5373\u9000\u51FA, \u6216\u8005\u4F7F\u7528 -wait \u9009\u9879\n\u63D0\u793A\u7528\u6237\u6307\u793A\u4F55\u65F6\u5E94\u7ED3\u675F\u7F16\u8F91\u6A21\u5F0F\u3002\n\n\u6CE8: \u5728\u7F16\u8F91\u6A21\u5F0F\u4E0B, \u4E0D\u4F1A\u663E\u793A\u4EFB\u4F55\u547D\u4EE4\u8F93\u5165\u3002\u9000\u51FA\u7F16\u8F91\u6A21\u5F0F\u540E, \n\u5C06\u4E0D\u4F1A\u663E\u793A\u5BF9\u7F16\u8F91\u7684\u7247\u6BB5\u6240\u505A\u7684\u4EFB\u4F55\u66F4\u6539\u3002\n\n\u4F7F\u7528 -retain \u9009\u9879\u65F6, \u5C06\u5728\u672C\u6B21\u8FD0\u884C\u548C\u5C06\u6765\u8FD0\u884C jshell \u5DE5\u5177\u65F6\n\u4F7F\u7528\u8BE5\u8BBE\u7F6E\u3002\n\n\u4E0D\u5E26 <\u547D\u4EE4> \u6216\u9009\u9879\u7684\u683C\u5F0F\u663E\u793A\u7F16\u8F91\u5668\u8BBE\u7F6E\u3002\n
 
+help.set.start.summary =\u8BBE\u7F6E\u542F\u52A8\u914D\u7F6E\u3002
+
 help.set.start =\u8BBE\u7F6E\u542F\u52A8\u914D\u7F6E -- \u542F\u52A8\u65F6\u8BFB\u53D6\u7684\u7247\u6BB5\u548C\u547D\u4EE4\u5E8F\u5217:\n\n\t/set start [-retain] <\u6587\u4EF6>...\n\n\t/set start [-retain] -default\n\n\t/set start [-retain] -none\n\n\u4FDD\u7559\u542F\u52A8\u914D\u7F6E\u4EE5\u4FBF\u5728\u5C06\u6765\u4F1A\u8BDD\u4E2D\u4F7F\u7528:\n\n\t/set start -retain\n\n\u663E\u793A\u542F\u52A8\u8BBE\u7F6E:\n\n\t/set start\n\n\u5728\u6B64\u4F1A\u8BDD\u4E2D\u4F7F\u7528 /reset, /reload \u6216 /env \u547D\u4EE4\u65F6,\n\u6307\u5B9A <\u6587\u4EF6> \u7684\u5185\u5BB9\u5C06\u6210\u4E3A\u4F7F\u7528\u7684\u542F\u52A8\u7247\u6BB5\u548C\u547D\u4EE4\u3002\n\u5982\u679C\u6539\u4E3A\u6307\u5B9A -default \u9009\u9879, \u5219\u5C06\u4F7F\u7528\u9884\u5B9A\u4E49\u7684\n\u542F\u52A8\u5BFC\u5165\u7247\u6BB5\u3002\n\u5982\u679C\u4F7F\u7528 -none \u9009\u9879, \u5219\u542F\u52A8\u8BBE\u7F6E\u5C06\u4E3A\u7A7A -- \u5C06\u4E0D\u4F7F\u7528\n\u542F\u52A8\u7247\u6BB5\u6216\u547D\u4EE4\n\u6B64\u547D\u4EE4\u5BF9\u4E8E\u6D4B\u8BD5\u542F\u52A8\u8BBE\u7F6E\u975E\u5E38\u6709\u7528\u3002\u8981\u4FDD\u7559\u8FD9\u4E9B\u5185\u5BB9\n\u4EE5\u4FBF\u5C06\u6765\u8FD0\u884C jshell \u5DE5\u5177\u65F6\u4F7F\u7528, \u8BF7\u4F7F\u7528\u547D\u4EE4:\n\t/set start -retain\n\n\u4F7F\u7528 -retain \u9009\u9879\u65F6, \u5C06\u5728\u672C\u6B21\u8FD0\u884C\u548C\u5C06\u6765\n\u8FD0\u884C jshell \u5DE5\u5177\u65F6\u4F7F\u7528\u8BE5\u8BBE\u7F6E\u3002\n\n\u4E0D\u5E26 <\u6587\u4EF6> \u6216\u9009\u9879\u7684\u683C\u5F0F\u663E\u793A\u542F\u52A8\u8BBE\u7F6E\u3002\n\u6CE8: \u5982\u679C\u542F\u52A8\u8BBE\u7F6E\u6700\u540E\u4E00\u6B21\u662F\u4ECE\u6587\u4EF6\u8BBE\u7F6E\u7684, \u5219\u4F1A\u968F\n'set start' \u547D\u4EE4 (\u540E\u8DDF\u6587\u4EF6\u5185\u5BB9) \u4E00\u8D77\u663E\u793A\u6B64\u5185\u5BB9\u3002\n\n<\u6587\u4EF6> \u53EF\u4EE5\u662F\u64CD\u4F5C\u7CFB\u7EDF\u6587\u4EF6\u540D, \u4E5F\u53EF\u662F\u9884\u5B9A\u4E49\u7684\n\u542F\u52A8\u6587\u4EF6\u540D\u4E4B\u4E00: DEFAULT, PRINTING, \u6216 JAVASE\u3002\n\u8FD9\u4E9B\u9879\u7684\u8BF4\u660E\u5206\u522B\u5982\u4E0B: \u9ED8\u8BA4\u5BFC\u5165\u7247\u6BB5 (\u5982 -default \u6240\u4F7F\u7528\u7684),\nprint(), println() \u548C printf() \u65B9\u6CD5\u7247\u6BB5\u7684\u5B9A\u4E49, \u6216\n\u6240\u6709 Java SE \u7A0B\u5E8F\u5305\u7684\u5BFC\u5165\u9879\u3002\n\u53EF\u4EE5\u6307\u5B9A\u591A\u4E2A <\u6587\u4EF6>, \u4F8B\u5982:\n\n\t/set start -retain DEFAULT PRINTING
 
 startup.feedback = /set mode verbose -command    \n\n/set prompt verbose '\\njshell> '   '   ...> '    \n\n/set format verbose pre '|  '    \n/set format verbose post '%n'    \n/set format verbose errorpre '|  '    \n/set format verbose errorpost '%n'    \n\n/set format verbose errorline '{post}{pre}    {err}'    \n\n/set format verbose action '\u5DF2\u521B\u5EFA' added-primary    \n/set format verbose action '\u5DF2\u4FEE\u6539' modified-primary    \n/set format verbose action '\u5DF2\u66FF\u6362' replaced-primary    \n/set format verbose action '\u5DF2\u8986\u76D6' overwrote-primary    \n/set format verbose action '\u5DF2\u5220\u9664' dropped-primary    \n/set format verbose action '  \u66F4\u65B0\u5DF2\u521B\u5EFA' added-update    \n/set format verbose action '  \u66F4\u65B0\u5DF2\u4FEE\u6539' modified-update    \n/set format verbose action '  \u66F4\u65B0\u5DF2\u66FF\u6362' replaced-update    \n/set format verbose action '  \u66F4\u65B0\u5DF2\u8986\u76D6' overwrote-update    \n/set format verbose action '  \u66F4\u65B0\u5DF2\u5220\u9664' dropped-update    \n\n/set format verbose until ', \u4E0D\u8FC7, \u5B83\u65E0\u6CD5\u5B9E\u4F8B\u5316\u6216\u8005\u5176\u65B9\u6CD5\u65E0\u6CD5\u8C03\u7528, \u76F4\u81F3'   defined-class-primary    \n/set format verbose until ', \u4E0D\u8FC7, \u5176\u65B9\u6CD5\u65E0\u6CD5\u8C03\u7528, \u76F4\u81F3'                      defined-interface-primary    \n/set format verbose until ', \u4E0D\u8FC7, \u5B83\u65E0\u6CD5\u4F7F\u7528, \u76F4\u81F3'                                  defined-enum,annotation-primary    \n/set format verbose until ', \u4E0D\u8FC7, \u5B83\u65E0\u6CD5\u8C03\u7528, \u76F4\u81F3'                               defined-method-primary    \n/set format verbose until ', \u4E0D\u8FC7, \u5B83\u65E0\u6CD5\u5F15\u7528, \u76F4\u81F3'                            notdefined-primary    \n/set format verbose until ' \u5B83\u65E0\u6CD5\u5B9E\u4F8B\u5316\u6216\u8005\u5176\u65B9\u6CD5\u65E0\u6CD5\u8C03\u7528, \u76F4\u81F3'          defined-class-update    \n/set format verbose until ' \u5176\u65B9\u6CD5\u65E0\u6CD5\u8C03\u7528, \u76F4\u81F3'                              defined-interface-update    \n/set format verbose until ' \u5B83\u65E0\u6CD5\u8C03\u7528, \u76F4\u81F3'                                      defined-method-update    \n/set format verbose until ' \u5B83\u65E0\u6CD5\u5F15\u7528, \u76F4\u81F3'                                   notdefined-update    \n\n/set format verbose unrerr '{unresolved} \u5DF2\u58F0\u660E'                                           unresolved1-error0    \n/set format verbose unrerr '{unresolved} \u5DF2\u58F0\u660E'                                          unresolved2-error0    \n/set format verbose unrerr ' \u6B64\u9519\u8BEF\u5DF2\u66F4\u6B63: {errors}'                                 unresolved0-error1    \n/set format verbose unrerr '{unresolved} \u5DF2\u58F0\u660E, \u5E76\u4E14\u6B64\u9519\u8BEF\u5DF2\u66F4\u6B63: {errors}'     unresolved1-error1    \n/set format verbose unrerr '{unresolved} \u5DF2\u58F0\u660E, \u5E76\u4E14\u6B64\u9519\u8BEF\u5DF2\u66F4\u6B63: {errors}'    unresolved2-error1    \n/set format verbose unrerr ' \u8FD9\u4E9B\u9519\u8BEF\u5DF2\u66F4\u6B63: {errors}'                              unresolved0-error2    \n/set format verbose unrerr '{unresolved} \u5DF2\u58F0\u660E\u5E76\u4E14\u8FD9\u4E9B\u9519\u8BEF\u5DF2\u66F4\u6B63: {errors}'  unresolved1-error2    \n/set format verbose unrerr '{unresolved} \u5DF2\u58F0\u660E\u5E76\u4E14\u8FD9\u4E9B\u9519\u8BEF\u5DF2\u66F4\u6B63: {errors}' unresolved2-error2    \n\n/set format verbose resolve '{until}{unrerr}'                                                   defined,notdefined-added,modified,replaced,used    \n\n/set format verbose typeKind '\u7C7B'                  class    \n/set format verbose typeKind '\u63A5\u53E3'              interface    \n/set format verbose typeKind '\u679A\u4E3E'                   enum    \n/set format verbose typeKind '\u6CE8\u91CA\u63A5\u53E3'   annotation    \
 \n\n/set format verbose result '{name} ==> {value}{post}'                                        added,modified,replaced-ok-primary    \n\n/set format verbose display '{result}{pre}\u5DF2\u521B\u5EFA\u6682\u5B58\u53D8\u91CF {name} : {type}{post}'    expression-added,modified,replaced-primary    \n/set format verbose display '{result}{pre}{name} \u7684\u503C: {type}{post}'                    varvalue-added,modified,replaced-primary    \n/set format verbose display '{result}{pre}\u5DF2\u5206\u914D\u7ED9 {name} : {type}{post}'                 assignment-primary    \n/set format verbose display '{result}{pre}{action} \u53D8\u91CF {name} : {type}{resolve}{post}'  varinit,vardecl    \n/set format verbose display '{pre}{action} \u53D8\u91CF {name}{resolve}{post}'                   vardecl,varinit-notdefined    \n/set format verbose display '{pre}{action} \u53D8\u91CF {name}{post}'                            dropped-vardecl,varinit,expression    \n/set format verbose display '{pre}{action} \u53D8\u91CF {name}, \u91CD\u7F6E\u4E3A\u7A7A\u503C{post}'             replaced-vardecl,varinit-ok-update    \n\n/set format verbose display '{pre}{action} {typeKind} {name}{resolve}{post}'                 class,interface,enum,annotation    \n/set format verbose display '{pre}{action} \u65B9\u6CD5 {name}({type}){resolve}{post}'             method    \n\n/set format verbose display '{pre}\u5DF2\u5C1D\u8BD5\u4F7F\u7528 {typeKind} {name}{resolve}{post}'         used-class,interface,enum,annotation    \n/set format verbose display '{pre}\u5DF2\u5C1D\u8BD5\u8C03\u7528\u65B9\u6CD5 {name}({type}){resolve}{post}'    used-method    \n\n/set truncation verbose 80\n/set truncation verbose 1000                                                                  varvalue,expression\n\n/set mode normal -command verbose    \n/set format normal display ''                                                               added,modified,replaced,overwrote,dropped-update    \n/set format normal display '{pre}{action} \u53D8\u91CF {name}, \u91CD\u7F6E\u4E3A\u7A7A\u503C{post}'             replaced-vardecl,varinit-ok-update    \n/set format normal display '{result}'                                                       added,modified,replaced-expression,varvalue,assignment,varinit,vardecl-ok-primary    \n/set mode concise -quiet normal    \n\n/set prompt concise 'jshell> '   '   ...> '    \n\n/set format concise display ''                                                              class,interface,enum,annotation,method,assignment,varinit,vardecl-ok    \n\n/set feedback normal    \n\n/set mode silent -quiet    \n/set prompt silent '-> ' '>> '    \n/set truncation silent 80\n/set truncation silent 1000                                                                  varvalue,expression\n/set format silent pre '|  '    \n/set format silent post '%n'    \n/set format silent errorpre '|  '    \n/set format silent errorpost '%n'    \n/set format silent display ''    \n
-
-jshell.fix.wrong.shortcut =Shift-Tab \u540E\u51FA\u73B0\u610F\u5916\u7684\u5B57\u7B26\u3002\u4F7F\u7528 "i" \u8868\u793A\u81EA\u52A8\u5BFC\u5165, \u4F7F\u7528 "v" \u8868\u793A\u53D8\u91CF\u521B\u5EFA\u3002\u6709\u5173\u8BE6\u7EC6\u4FE1\u606F, \u8BF7\u53C2\u9605:\n/help \u5FEB\u6377\u65B9\u5F0F
--- a/src/jdk.jshell/share/classes/jdk/jshell/Eval.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/jdk.jshell/share/classes/jdk/jshell/Eval.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -36,6 +36,7 @@
 import com.sun.source.tree.ArrayTypeTree;
 import com.sun.source.tree.AssignmentTree;
 import com.sun.source.tree.ClassTree;
+import com.sun.source.tree.ExpressionStatementTree;
 import com.sun.source.tree.ExpressionTree;
 import com.sun.source.tree.IdentifierTree;
 import com.sun.source.tree.MethodTree;
@@ -43,6 +44,7 @@
 import com.sun.source.tree.NewClassTree;
 import com.sun.source.tree.Tree;
 import com.sun.source.tree.VariableTree;
+import com.sun.source.util.TreeScanner;
 import com.sun.tools.javac.tree.JCTree;
 import com.sun.tools.javac.tree.Pretty;
 import java.io.IOException;
@@ -52,6 +54,8 @@
 import java.util.LinkedHashSet;
 import java.util.Set;
 import jdk.jshell.ExpressionToTypeInfo.ExpressionInfo;
+import jdk.jshell.ExpressionToTypeInfo.ExpressionInfo.AnonymousDescription;
+import jdk.jshell.ExpressionToTypeInfo.ExpressionInfo.AnonymousDescription.VariableDesc;
 import jdk.jshell.Key.ErroneousKey;
 import jdk.jshell.Key.MethodKey;
 import jdk.jshell.Key.TypeDeclKey;
@@ -60,6 +64,7 @@
 import jdk.jshell.TaskFactory.AnalyzeTask;
 import jdk.jshell.TaskFactory.BaseTask;
 import jdk.jshell.TaskFactory.ParseTask;
+import jdk.jshell.Util.Pair;
 import jdk.jshell.Wrap.CompoundWrap;
 import jdk.jshell.Wrap.Range;
 import jdk.jshell.Snippet.Status;
@@ -74,6 +79,7 @@
 import static java.util.stream.Collectors.toList;
 import static java.util.stream.Collectors.toSet;
 import static java.util.Collections.singletonList;
+import com.sun.tools.javac.code.Symbol.TypeSymbol;
 import static jdk.internal.jshell.debug.InternalDebugControl.DBG_GEN;
 import static jdk.jshell.Util.DOIT_METHOD_NAME;
 import static jdk.jshell.Util.PREFIX_PATTERN;
@@ -98,6 +104,11 @@
 
     private int varNumber = 0;
 
+    /* The number of anonymous innerclasses seen so far. Used to generate unique
+     * names of these classes.
+     */
+    private int anonCount = 0;
+
     private final JShell state;
 
     // The set of names of methods on Object
@@ -203,7 +214,7 @@
                 case VARIABLE:
                     return processVariables(userSource, units, compileSourceInt, pt);
                 case EXPRESSION_STATEMENT:
-                    return processExpression(userSource, compileSourceInt);
+                    return processExpression(userSource, unitTree, compileSourceInt, pt);
                 case CLASS:
                     return processClass(userSource, unitTree, compileSourceInt, SubKind.CLASS_SUBKIND, pt);
                 case ENUM:
@@ -285,15 +296,19 @@
             String name = vt.getName().toString();
             String typeName;
             String fullTypeName;
+            String displayType;
+            boolean hasEnhancedType = false;
             TreeDependencyScanner tds = new TreeDependencyScanner();
             Wrap typeWrap;
             Wrap anonDeclareWrap = null;
             Wrap winit = null;
+            boolean enhancedDesugaring = false;
+            Set<String> anonymousClasses = Collections.emptySet();
             StringBuilder sbBrackets = new StringBuilder();
             Tree baseType = vt.getType();
             if (baseType != null) {
                 tds.scan(baseType); // Not dependent on initializer
-                fullTypeName = typeName = EvalPretty.prettyExpr((JCTree) vt.getType(), false);
+                fullTypeName = displayType = typeName = EvalPretty.prettyExpr((JCTree) vt.getType(), false);
                 while (baseType instanceof ArrayTypeTree) {
                     //TODO handle annotations too
                     baseType = ((ArrayTypeTree) baseType).getType();
@@ -311,83 +326,27 @@
                     Range rinit = dis.treeToRange(init);
                     String initCode = rinit.part(compileSource);
                     ExpressionInfo ei =
-                            ExpressionToTypeInfo.localVariableTypeForInitializer(initCode, state);
-                    typeName = ei == null ? "java.lang.Object" : ei.typeName;
-                    fullTypeName = ei == null ? "java.lang.Object" : ei.fullTypeName;
-                    if (ei != null && init.getKind() == Tree.Kind.NEW_CLASS &&
-                        ((NewClassTree) init).getClassBody() != null) {
-                        NewClassTree nct = (NewClassTree) init;
-                        StringBuilder constructor = new StringBuilder();
-                        constructor.append(fullTypeName).append("(");
-                        String sep = "";
-                        if (ei.enclosingInstanceType != null) {
-                            constructor.append(ei.enclosingInstanceType);
-                            constructor.append(" encl");
-                            sep = ", ";
-                        }
-                        int idx = 0;
-                        for (String type : ei.parameterTypes) {
-                            constructor.append(sep);
-                            constructor.append(type);
-                            constructor.append(" ");
-                            constructor.append("arg" + idx++);
-                            sep = ", ";
-                        }
-                        if (ei.enclosingInstanceType != null) {
-                            constructor.append(") { encl.super (");
-                        } else {
-                            constructor.append(") { super (");
-                        }
-                        sep = "";
-                        for (int i = 0; i < idx; i++) {
-                            constructor.append(sep);
-                            constructor.append("arg" + i++);
-                            sep = ", ";
-                        }
-                        constructor.append("); }");
-                        List<? extends Tree> members = nct.getClassBody().getMembers();
-                        Range bodyRange = dis.treeListToRange(members);
-                        Wrap bodyWrap;
+                            ExpressionToTypeInfo.localVariableTypeForInitializer(initCode, state, false);
+                    if (ei != null) {
+                        typeName = ei.declareTypeName;
+                        fullTypeName = ei.fullTypeName;
+                        displayType = ei.displayTypeName;
+
+                        hasEnhancedType = !typeName.equals(fullTypeName);
 
-                        if (bodyRange != null) {
-                            bodyWrap = Wrap.rangeWrap(compileSource, bodyRange);
-                        } else {
-                            bodyWrap = Wrap.simpleWrap(" ");
-                        }
-
-                        Range argRange = dis.treeListToRange(nct.getArguments());
-                        Wrap argWrap;
-
-                        if (argRange != null) {
-                            argWrap = Wrap.rangeWrap(compileSource, argRange);
-                        } else {
-                            argWrap = Wrap.simpleWrap(" ");
-                        }
+                        enhancedDesugaring = !ei.isPrimitiveType;
 
-                        if (ei.enclosingInstanceType != null) {
-                            Range enclosingRanges =
-                                    dis.treeToRange(nct.getEnclosingExpression());
-                            Wrap enclosingWrap = Wrap.rangeWrap(compileSource, enclosingRanges);
-                            argWrap = argRange != null ? new CompoundWrap(enclosingWrap,
-                                                                          Wrap.simpleWrap(","),
-                                                                          argWrap)
-                                                       : enclosingWrap;
-                        }
-                        Wrap hwrap = Wrap.simpleWrap("public static class " + fullTypeName +
-                                                     (ei.isClass ? " extends " : " implements ") +
-                                                     typeName + " { " + constructor);
-                        anonDeclareWrap = new CompoundWrap(hwrap, bodyWrap, Wrap.simpleWrap("}"));
-                        winit = new CompoundWrap("new " + fullTypeName + "(", argWrap, ")");
-
-                        String superType = typeName;
-
-                        typeName = fullTypeName;
-                        fullTypeName = ei.isClass ? "<anonymous class extending " + superType + ">"
-                                                  : "<anonymous class implementing " + superType + ">";
+                        Pair<Wrap, Wrap> anonymous2Member =
+                                anonymous2Member(ei, compileSource, rinit, dis, init);
+                        anonDeclareWrap = anonymous2Member.first;
+                        winit = anonymous2Member.second;
+                        anonymousClasses = ei.anonymousClasses.stream().map(ad -> ad.declareTypeName).collect(Collectors.toSet());
+                    } else {
+                        displayType = fullTypeName = typeName = "java.lang.Object";
                     }
                     tds.scan(init);
                 } else {
-                    fullTypeName = typeName = "java.lang.Object";
+                    displayType = fullTypeName = typeName = "java.lang.Object";
                 }
                 typeWrap = Wrap.identityWrap(typeName);
             }
@@ -411,17 +370,193 @@
             int nameEnd = nameStart + name.length();
             Range rname = new Range(nameStart, nameEnd);
             Wrap guts = Wrap.varWrap(compileSource, typeWrap, sbBrackets.toString(), rname,
-                                     winit, anonDeclareWrap);
-                        DiagList modDiag = modifierDiagnostics(vt.getModifiers(), dis, true);
+                                     winit, enhancedDesugaring, anonDeclareWrap);
+            DiagList modDiag = modifierDiagnostics(vt.getModifiers(), dis, true);
             Snippet snip = new VarSnippet(state.keyMap.keyForVariable(name), userSource, guts,
-                    name, subkind, fullTypeName,
+                    name, subkind, displayType, hasEnhancedType ? fullTypeName : null, anonymousClasses,
                     tds.declareReferences(), modDiag);
             snippets.add(snip);
         }
         return snippets;
     }
 
-    private List<Snippet> processExpression(String userSource, String compileSource) {
+    /**Convert anonymous classes in "init" to member classes, based
+     * on the additional information from ExpressionInfo.anonymousClasses.
+     *
+     * This means:
+     * -if the code in the anonymous class captures any variables from the
+     *  enclosing context, create fields for them
+     * -creating an explicit constructor that:
+     * --if the new class expression has a base/enclosing expression, make it an
+     *   explicit constructor parameter "encl" and use "encl.super" when invoking
+     *   the supertype constructor
+     * --if the (used) supertype constructor has any parameters, declare them
+     *   as explicit parameters of the constructor, and pass them to the super
+     *   constructor
+     * --if the code in the anonymous class captures any variables from the
+     *   enclosing context, make them an explicit paramters of the constructor
+     *   and assign to respective fields.
+     * --if there are any explicit fields with initializers in the anonymous class,
+     *   move the initializers at the end of the constructor (after the captured fields
+     *   are assigned, so that the initializers of these fields can use them).
+     * -from the captured variables fields, constructor, and existing members
+     *  (with cleared field initializers), create an explicit class that extends or
+     *  implements the supertype of the anonymous class.
+     *
+     * This method returns two wraps: the first contains the class declarations for the
+     * converted classes, the first one should be used instead of "init" in the variable
+     * declaration.
+     */
+    private Pair<Wrap, Wrap> anonymous2Member(ExpressionInfo ei,
+                                              String compileSource,
+                                              Range rinit,
+                                              TreeDissector dis,
+                                              Tree init) {
+        List<Wrap> anonymousDeclarations = new ArrayList<>();
+        List<Wrap> partitionedInit = new ArrayList<>();
+        int lastPos = rinit.begin;
+        com.sun.tools.javac.util.List<NewClassTree> toConvert =
+                ExpressionToTypeInfo.listAnonymousClassesToConvert(init);
+        com.sun.tools.javac.util.List<AnonymousDescription> descriptions =
+                ei.anonymousClasses;
+        while (toConvert.nonEmpty() && descriptions.nonEmpty()) {
+            NewClassTree node = toConvert.head;
+            AnonymousDescription ad = descriptions.head;
+
+            toConvert = toConvert.tail;
+            descriptions = descriptions.tail;
+
+            List<Object> classBodyParts = new ArrayList<>();
+            //declarations of the captured variables:
+            for (VariableDesc vd : ad.capturedVariables) {
+                classBodyParts.add(vd.type + " " + vd.name + ";\n");
+            }
+
+            List<Object> constructorParts = new ArrayList<>();
+            constructorParts.add(ad.declareTypeName + "(");
+            String sep = "";
+            //add the parameter for the base/enclosing expression, if any:
+            if (ad.enclosingInstanceType != null) {
+                constructorParts.add(ad.enclosingInstanceType + " encl");
+                sep = ", ";
+            }
+            int idx = 0;
+            //add parameters of the super constructor, if any:
+            for (String type : ad.parameterTypes) {
+                constructorParts.add(sep);
+                constructorParts.add(type + " " + "arg" + idx++);
+                sep = ", ";
+            }
+            //add parameters for the captured variables:
+            for (VariableDesc vd : ad.capturedVariables) {
+                constructorParts.add(sep);
+                constructorParts.add(vd.type + " " + "cap$" + vd.name);
+                sep = ", ";
+            }
+            //construct super constructor call:
+            if (ad.enclosingInstanceType != null) {
+                //if there's an enclosing instance, call super on it:
+                constructorParts.add(") { encl.super (");
+            } else {
+                constructorParts.add(") { super (");
+            }
+            sep = "";
+            for (int i = 0; i < idx; i++) {
+                constructorParts.add(sep);
+                constructorParts.add("arg" + i);
+                sep = ", ";
+            }
+            constructorParts.add(");");
+            //initialize the captured variables:
+            for (VariableDesc vd : ad.capturedVariables) {
+                constructorParts.add("this." + vd.name + " = " + "cap$" + vd.name + ";\n");
+            }
+            List<? extends Tree> members =
+                    node.getClassBody().getMembers();
+            for (Tree member : members) {
+                if (member.getKind() == Tree.Kind.VARIABLE) {
+                    VariableTree vt = (VariableTree) member;
+
+                    if (vt.getInitializer() != null) {
+                        //for variables with initializer, explicitly move the initializer
+                        //to the constructor after the captured variables as assigned
+                        //(the initializers would otherwise run too early):
+                        Range wholeVar = dis.treeToRange(vt);
+                        int name = ((JCTree) vt).pos;
+                        classBodyParts.add(new CompoundWrap(Wrap.rangeWrap(compileSource,
+                                                                      new Range(wholeVar.begin, name)),
+                                                       vt.getName().toString(),
+                                                       ";\n"));
+                        constructorParts.add(Wrap.rangeWrap(compileSource,
+                                                            new Range(name, wholeVar.end)));
+                        continue;
+                    }
+                }
+                classBodyParts.add(Wrap.rangeWrap(compileSource,
+                                             dis.treeToRange(member)));
+            }
+
+            constructorParts.add("}");
+
+            //construct the member class:
+            classBodyParts.add(new CompoundWrap(constructorParts.toArray()));
+
+            Wrap classBodyWrap = new CompoundWrap(classBodyParts.toArray());
+
+            anonymousDeclarations.add(new CompoundWrap("public static class ", ad.declareTypeName,
+                                         (ad.isClass ? " extends " : " implements "),
+                                         ad.superTypeName, " { ", classBodyWrap, "}"));
+
+            //change the new class expression to use the newly created member type:
+            Range argRange = dis.treeListToRange(node.getArguments());
+            Wrap argWrap;
+
+            if (argRange != null) {
+                argWrap = Wrap.rangeWrap(compileSource, argRange);
+            } else {
+                argWrap = Wrap.simpleWrap(" ");
+            }
+
+            if (ad.enclosingInstanceType != null) {
+                //if there's an enclosing expression, set it as the first parameter:
+                Range enclosingRanges =
+                        dis.treeToRange(node.getEnclosingExpression());
+                Wrap enclosingWrap = Wrap.rangeWrap(compileSource, enclosingRanges);
+                argWrap = argRange != null ? new CompoundWrap(enclosingWrap,
+                                                              Wrap.simpleWrap(","),
+                                                              argWrap)
+                                           : enclosingWrap;
+            }
+
+            Range current = dis.treeToRange(node);
+            String capturedArgs;
+            if (!ad.capturedVariables.isEmpty()) {
+                capturedArgs = (ad.parameterTypes.isEmpty() ? "" : ", ") +
+                               ad.capturedVariables.stream()
+                                                   .map(vd -> vd.name)
+                                                   .collect(Collectors.joining(","));
+            } else {
+                capturedArgs = "";
+            }
+            if (lastPos < current.begin)
+                partitionedInit.add(Wrap.rangeWrap(compileSource,
+                                                   new Range(lastPos, current.begin)));
+            partitionedInit.add(new CompoundWrap("new " + ad.declareTypeName + "(",
+                                                 argWrap,
+                                                 capturedArgs,
+                                                 ")"));
+            lastPos = current.end;
+        }
+
+        if (lastPos < rinit.end)
+            partitionedInit.add(Wrap.rangeWrap(compileSource, new Range(lastPos, rinit.end)));
+
+        return new Pair<>(new CompoundWrap(anonymousDeclarations.toArray()),
+                          new CompoundWrap(partitionedInit.toArray()));
+    }
+
+    private List<Snippet> processExpression(String userSource, Tree tree, String compileSource, ParseTask pt) {
+        ExpressionStatementTree expr = (ExpressionStatementTree) tree;
         String name = null;
         ExpressionInfo ei = ExpressionToTypeInfo.expressionInfo(compileSource, state);
         ExpressionTree assignVar;
@@ -453,10 +588,31 @@
                         name = "$" + ++varNumber;
                     }
                 }
-                guts = Wrap.tempVarWrap(compileSource, ei.accessibleTypeName, name);
+                TreeDissector dis = TreeDissector.createByFirstClass(pt);
+                ExpressionInfo varEI =
+                        ExpressionToTypeInfo.localVariableTypeForInitializer(compileSource, state, true);
+                String declareTypeName;
+                String fullTypeName;
+                String displayTypeName;
+                Set<String> anonymousClasses;
+                if (varEI != null) {
+                    declareTypeName = varEI.declareTypeName;
+                    fullTypeName = varEI.fullTypeName;
+                    displayTypeName = varEI.displayTypeName;
+
+                    Pair<Wrap, Wrap> anonymous2Member =
+                            anonymous2Member(varEI, compileSource, new Range(0, compileSource.length()), dis, expr.getExpression());
+                    guts = Wrap.tempVarWrap(anonymous2Member.second.wrapped(), declareTypeName, name, anonymous2Member.first);
+                    anonymousClasses = varEI.anonymousClasses.stream().map(ad -> ad.declareTypeName).collect(Collectors.toSet());
+                } else {
+                    declareTypeName = ei.accessibleTypeName;
+                    displayTypeName = fullTypeName = typeName;
+                    guts = Wrap.tempVarWrap(compileSource, declareTypeName, name, null);
+                    anonymousClasses = Collections.emptySet();
+                }
                 Collection<String> declareReferences = null; //TODO
                 snip = new VarSnippet(state.keyMap.keyForVariable(name), userSource, guts,
-                        name, SubKind.TEMP_VAR_EXPRESSION_SUBKIND, typeName, declareReferences, null);
+                        name, SubKind.TEMP_VAR_EXPRESSION_SUBKIND, displayTypeName, fullTypeName, anonymousClasses, declareReferences, null);
             } else {
                 guts = Wrap.methodReturnWrap(compileSource);
                 snip = new ExpressionSnippet(state.keyMap.keyForExpression(name, typeName), userSource, guts,
@@ -1059,4 +1215,7 @@
                 : new DiagList(new ModifierDiagnostic(list, fatal));
     }
 
+    String computeDeclareName(TypeSymbol ts) {
+        return Util.JSHELL_ANONYMOUS + "$" + Long.toUnsignedString(anonCount++);
+    }
 }
--- a/src/jdk.jshell/share/classes/jdk/jshell/ExpressionToTypeInfo.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/jdk.jshell/share/classes/jdk/jshell/ExpressionToTypeInfo.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -25,12 +25,21 @@
 
 package jdk.jshell;
 
+import java.util.EnumSet;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+import java.util.function.Function;
+import javax.lang.model.element.Element;
+import javax.lang.model.element.ElementKind;
+import javax.lang.model.element.VariableElement;
 import com.sun.source.tree.ReturnTree;
 import com.sun.source.tree.ClassTree;
 import com.sun.source.tree.CompilationUnitTree;
 import com.sun.source.tree.ConditionalExpressionTree;
-import com.sun.source.tree.ExpressionStatementTree;
 import com.sun.source.tree.ExpressionTree;
+import com.sun.source.tree.IdentifierTree;
 import com.sun.source.tree.MethodInvocationTree;
 import com.sun.source.tree.MethodTree;
 import com.sun.source.tree.NewClassTree;
@@ -39,13 +48,21 @@
 import com.sun.source.tree.VariableTree;
 import com.sun.source.util.TreePath;
 import com.sun.source.util.TreePathScanner;
+import com.sun.source.util.TreeScanner;
 import com.sun.tools.javac.code.Flags;
 import com.sun.tools.javac.code.Symbol;
+import com.sun.tools.javac.code.Symbol.TypeSymbol;
 import com.sun.tools.javac.code.Symtab;
 import com.sun.tools.javac.code.Type;
 import com.sun.tools.javac.code.Types;
+import com.sun.tools.javac.tree.JCTree.JCClassDecl;
+import com.sun.tools.javac.tree.TreeInfo;
 import com.sun.tools.javac.util.List;
+import com.sun.tools.javac.util.ListBuffer;
+import jdk.jshell.ExpressionToTypeInfo.ExpressionInfo.AnonymousDescription;
+import jdk.jshell.ExpressionToTypeInfo.ExpressionInfo.AnonymousDescription.VariableDesc;
 import jdk.jshell.TaskFactory.AnalyzeTask;
+import jdk.jshell.TypePrinter.AnonymousTypeKind;
 
 /**
  * Compute information about an expression string, particularly its type name.
@@ -57,26 +74,75 @@
     final AnalyzeTask at;
     final CompilationUnitTree cu;
     final JShell state;
+    final boolean computeEnhancedInfo;
+    final boolean enhancedTypesAccessible;
     final Symtab syms;
     final Types types;
+    final Map<TypeSymbol, String> anon2Name = new HashMap<>();
 
-    private ExpressionToTypeInfo(AnalyzeTask at, CompilationUnitTree cu, JShell state) {
+    private ExpressionToTypeInfo(AnalyzeTask at, CompilationUnitTree cu, JShell state,
+                                 boolean computeEnhancedInfo, boolean enhancedTypesAccessible) {
         this.at = at;
         this.cu = cu;
         this.state = state;
+        this.computeEnhancedInfo = computeEnhancedInfo;
+        this.enhancedTypesAccessible = enhancedTypesAccessible;
         this.syms = Symtab.instance(at.context);
         this.types = Types.instance(at.context);
     }
 
     public static class ExpressionInfo {
         ExpressionTree tree;
+        boolean isPrimitiveType;
         String typeName;
         String accessibleTypeName;
+        /* In result of localVariableTypeForInitializer, the type that should be used
+         * as a declaration type of the field. This does not include intersection types,
+         * but does contain references to anonymous types converted to member types.
+         */
+        String declareTypeName;
+        /* In result of localVariableTypeForInitializer, the apparent/infered type of
+         * the variable. This includes intersection types, and references to anonymous
+         * types converted to member types.
+         */
         String fullTypeName;
-        List<String> parameterTypes;
-        String enclosingInstanceType;
-        boolean isClass;
+        /* In result of localVariableTypeForInitializer, the human readable type of
+         * the variable. This includes intersection types, and human readable descriptions
+         * of anonymous types.
+         */
+        String displayTypeName;
         boolean isNonVoid;
+        /* In result of localVariableTypeForInitializer, description of important anonymous
+         * classes.
+         */
+        List<AnonymousDescription> anonymousClasses = List.nil();
+
+        /* A description of an anonymous class. */
+        static class AnonymousDescription {
+            /* Parameter types of the invoked super constructor.*/
+            List<String> parameterTypes;
+            /* Type of the base/enclosing expression, if any.*/
+            String enclosingInstanceType;
+            /* The denotable name of the supertype.*/
+            String superTypeName;
+            /* The human-readable name of this class.*/
+            String declareTypeName;
+            /* If the supertype of this anonymous is a class. */
+            boolean isClass;
+            /* Variables captured by this anonymous class*/
+            List<VariableDesc> capturedVariables;
+
+            static class VariableDesc {
+                String type;
+                String name;
+
+                public VariableDesc(String type, String name) {
+                    this.type = type;
+                    this.name = name;
+                }
+
+            }
+        }
     }
 
     // return mechanism and other general structure from TreePath.getPath()
@@ -173,7 +239,7 @@
                 if (at.hasErrors() || cu == null) {
                     return null;
                 }
-                return new ExpressionToTypeInfo(at, cu, state).typeOfExpression();
+                return new ExpressionToTypeInfo(at, cu, state, false, false).typeOfExpression();
             });
         } catch (Exception ex) {
             return null;
@@ -187,7 +253,7 @@
      * @param state a JShell instance
      * @return type information
      */
-    public static ExpressionInfo localVariableTypeForInitializer(String code, JShell state) {
+    public static ExpressionInfo localVariableTypeForInitializer(String code, JShell state, boolean onlyAccessible) {
         if (code == null || code.isEmpty()) {
             return null;
         }
@@ -198,13 +264,37 @@
                 if (at.hasErrors() || cu == null) {
                     return null;
                 }
-                return new ExpressionToTypeInfo(at, cu, state).typeOfExpression();
+                return new ExpressionToTypeInfo(at, cu, state, true, onlyAccessible)
+                        .typeOfExpression();
             });
         } catch (Exception ex) {
             return null;
         }
     }
 
+    /**List (in a stable order) all NewClassTree instances under {@code from} that should be
+     * converted to member classes
+     *
+     * @param from tree to inspect
+     * @return NewClassTree instances that should be converted to member classes
+     */
+    public static List<NewClassTree> listAnonymousClassesToConvert(Tree from) {
+        ListBuffer<NewClassTree> classes = new ListBuffer<>();
+
+        new TreeScanner<Void, Void>() {
+            @Override
+            public Void visitNewClass(NewClassTree node, Void p) {
+                if (node.getClassBody() != null) {
+                    classes.append(node);
+                    return null;
+                }
+                return super.visitNewClass(node, p);
+            }
+        }.scan(from, null);
+
+        return classes.toList();
+    }
+
     private ExpressionInfo typeOfExpression() {
         return treeToInfo(findExpressionPath());
     }
@@ -256,23 +346,31 @@
      * @return the type, if it is accessible, otherwise a superclass or
      * interface which is
      */
-    private Type findAccessibleSupertype(Type type) {
+    private List<Type> findAccessibleSupertypes(Type type) {
+        List<Type> accessible = List.nil();
+        Type accessibleSuper = syms.objectType;
         // Iterate up the superclasses, see if any are accessible
         for (Type sup = type; !types.isSameType(sup, syms.objectType); sup = supertype(sup)) {
             if (isAccessible(sup)) {
-                return sup;
+                accessible = accessible.prepend(sup);
+                accessibleSuper = sup;
+                break;
             }
         }
-        // Failing superclasses, look through superclasses for accessible interfaces
-        for (Type sup = type; !types.isSameType(sup, syms.objectType); sup = supertype(sup)) {
+        // then look through superclasses for accessible interfaces
+        for (Type sup = type; !types.isSameType(sup, accessibleSuper); sup = supertype(sup)) {
             for (Type itf : types.interfaces(sup)) {
                 if (isAccessible(itf)) {
-                    return itf;
+                    accessible = accessible.prepend(itf);
                 }
             }
         }
-        // Punt, return Object which is the supertype of everything
-        return syms.objectType;
+        if (accessible.isEmpty()) {
+            // Punt, use Object which is the supertype of everything
+            accessible = accessible.prepend(syms.objectType);
+        }
+
+        return accessible.reverse();
     }
 
     private ExpressionInfo treeToInfo(TreePath tp) {
@@ -298,48 +396,125 @@
                             break;
                         default: {
                             ei.isNonVoid = true;
-                            ei.typeName = varTypeName(type, false);
-                            ei.accessibleTypeName = varTypeName(findAccessibleSupertype(type), false);
-                            ei.fullTypeName = varTypeName(type, true);
+                            ei.isPrimitiveType = type.isPrimitive();
+                            ei.typeName = varTypeName(type, false, AnonymousTypeKind.SUPER);
+                            List<Type> accessibleTypes = findAccessibleSupertypes(type);
+                            ei.accessibleTypeName =
+                                    varTypeName(accessibleTypes.head, false, AnonymousTypeKind.SUPER);
+                            if (computeEnhancedInfo) {
+                                Type accessibleType = accessibleTypes.size() == 1 ? accessibleTypes.head
+                                            : types.makeIntersectionType(accessibleTypes);
+                                ei.declareTypeName =
+                                        varTypeName(accessibleType, false, AnonymousTypeKind.DECLARE);
+                                ei.fullTypeName =
+                                        varTypeName(enhancedTypesAccessible ? accessibleType : type,
+                                                    true, AnonymousTypeKind.DECLARE);
+                                ei.displayTypeName =
+                                        varTypeName(type, true, AnonymousTypeKind.DISPLAY);
+                            }
                             break;
                         }
                     }
                 }
-                if (tree.getKind() == Tree.Kind.VARIABLE) {
+                if (tree.getKind() == Tree.Kind.VARIABLE && computeEnhancedInfo) {
                     Tree init = ((VariableTree) tree).getInitializer();
-                    if (init.getKind() == Tree.Kind.NEW_CLASS &&
-                        ((NewClassTree) init).getClassBody() != null) {
-                        NewClassTree nct = (NewClassTree) init;
-                        ClassTree clazz = nct.getClassBody();
-                        MethodTree constructor = (MethodTree) clazz.getMembers().get(0);
-                        ExpressionStatementTree superCallStatement =
-                                (ExpressionStatementTree) constructor.getBody().getStatements().get(0);
+                    for (NewClassTree node : listAnonymousClassesToConvert(init)) {
+                        Set<VariableElement> captured = capturedVariables(at,
+                                                                          tp.getCompilationUnit(),
+                                                                          node);
+                        JCClassDecl clazz = (JCClassDecl) node.getClassBody();
                         MethodInvocationTree superCall =
-                                (MethodInvocationTree) superCallStatement.getExpression();
-                        TreePath superCallPath =
-                                at.trees().getPath(tp.getCompilationUnit(), superCall.getMethodSelect());
+                                clazz.getMembers()
+                                     .stream()
+                                     .map(TreeInfo::firstConstructorCall)
+                                     .findAny()
+                                     .get();
+                        TreePath superCallPath
+                                = at.trees().
+                                        getPath(tp.getCompilationUnit(), superCall.
+                                                getMethodSelect());
                         Type constrType = pathToType(superCallPath);
-                        ei.parameterTypes = constrType.getParameterTypes()
-                                                      .stream()
-                                                      .map(t -> varTypeName(t, false))
-                                                      .collect(List.collector());
-                        if (nct.getEnclosingExpression() != null) {
-                            TreePath enclPath = new TreePath(tp, nct.getEnclosingExpression());
-                            ei.enclosingInstanceType = varTypeName(pathToType(enclPath), false);
+                        AnonymousDescription desc = new AnonymousDescription();
+                        desc.parameterTypes = constrType.getParameterTypes().
+                                stream().
+                                map(t -> varTypeName(t, false, AnonymousTypeKind.DECLARE)).
+                                collect(List.collector());
+                        if (node.getEnclosingExpression() != null) {
+                            TreePath enclPath = new TreePath(tp,
+                                                             node.getEnclosingExpression());
+                            desc.enclosingInstanceType = varTypeName(pathToType(enclPath),
+                                                                     false,
+                                                                     AnonymousTypeKind.DECLARE);
                         }
-                        ei.isClass = at.task.getTypes().directSupertypes(type).size() == 1;
+                        TreePath currentPath = at.trees()
+                                                 .getPath(tp.getCompilationUnit(),
+                                                          node);
+                        Type nodeType = pathToType(currentPath, node);
+                        desc.superTypeName = varTypeName(nodeType,
+                                                         false,
+                                                         AnonymousTypeKind.SUPER);
+                        desc.declareTypeName = varTypeName(nodeType,
+                                                           true, AnonymousTypeKind.DECLARE);
+                        desc.capturedVariables =
+                                captured.stream()
+                                        .map(ve -> new VariableDesc(varTypeName((Type) ve.asType(),
+                                                                                false,
+                                                                                AnonymousTypeKind.DECLARE),
+                                                                    ve.getSimpleName().toString()))
+                                        .collect(List.collector());
+
+                        desc.isClass = at.task.getTypes().directSupertypes(nodeType).size() == 1;
+                        ei.anonymousClasses = ei.anonymousClasses.prepend(desc);
                     }
+                    ei.anonymousClasses = ei.anonymousClasses.reverse();
                 }
                 return ei;
             }
         }
         return null;
     }
+    //where:
+        private static Set<VariableElement> capturedVariables(AnalyzeTask at,
+                                                              CompilationUnitTree topLevel,
+                                                              Tree tree) {
+            Set<VariableElement> capturedVars = new HashSet<>();
+            new TreeScanner<Void, Void>() {
+                Set<VariableElement> declaredLocalVars = new HashSet<>();
+                @Override
+                public Void visitVariable(VariableTree node, Void p) {
+                    TreePath currentPath = at.trees()
+                                             .getPath(topLevel, node);
+                    declaredLocalVars.add((VariableElement) at.trees().getElement(currentPath));
+                    return super.visitVariable(node, p);
+                }
 
-    private String varTypeName(Type type, boolean printIntersectionTypes) {
+                @Override
+                public Void visitIdentifier(IdentifierTree node, Void p) {
+                    TreePath currentPath = at.trees()
+                                             .getPath(topLevel, node);
+                    Element el = at.trees().getElement(currentPath);
+                    if (el != null &&
+                        LOCAL_VARIABLES.contains(el.getKind()) &&
+                        !declaredLocalVars.contains(el)) {
+                        capturedVars.add((VariableElement) el);
+                    }
+                    return super.visitIdentifier(node, p);
+                }
+            }.scan(tree, null);
+
+            return capturedVars;
+        }
+        private static final Set<ElementKind> LOCAL_VARIABLES =
+                EnumSet.of(ElementKind.EXCEPTION_PARAMETER, ElementKind.LOCAL_VARIABLE,
+                           ElementKind.PARAMETER, ElementKind.RESOURCE_VARIABLE);
+
+    private String varTypeName(Type type, boolean printIntersectionTypes, AnonymousTypeKind anonymousTypesKind) {
         try {
+            Function<TypeSymbol, String> anonymousClass2DeclareName =
+                    cs -> anon2Name.computeIfAbsent(cs, state.eval::computeDeclareName);
             TypePrinter tp = new TypePrinter(at.messages(),
-                    state.maps::fullClassNameAndPackageToClass, printIntersectionTypes);
+                    state.maps::fullClassNameAndPackageToClass, anonymousClass2DeclareName,
+                    printIntersectionTypes, anonymousTypesKind);
             List<Type> captures = types.captures(type);
             String res = tp.toString(types.upward(type, captures));
 
--- a/src/jdk.jshell/share/classes/jdk/jshell/TaskFactory.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/jdk.jshell/share/classes/jdk/jshell/TaskFactory.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -61,24 +61,33 @@
 import java.lang.Runtime.Version;
 import java.nio.CharBuffer;
 import java.util.function.BiFunction;
+import com.sun.source.tree.ClassTree;
 import com.sun.source.tree.Tree.Kind;
 import com.sun.source.util.TaskEvent;
 import com.sun.source.util.TaskListener;
 import com.sun.tools.javac.api.JavacTaskPool;
 import com.sun.tools.javac.code.ClassFinder;
 import com.sun.tools.javac.code.Kinds;
+import com.sun.tools.javac.code.Symbol;
 import com.sun.tools.javac.code.Symbol.ClassSymbol;
 import com.sun.tools.javac.code.Symbol.PackageSymbol;
+import com.sun.tools.javac.code.Symbol.TypeSymbol;
 import com.sun.tools.javac.code.Symbol.VarSymbol;
 import com.sun.tools.javac.code.Symtab;
+import com.sun.tools.javac.code.Type;
 import com.sun.tools.javac.comp.Attr;
+import com.sun.tools.javac.comp.AttrContext;
+import com.sun.tools.javac.comp.Enter;
+import com.sun.tools.javac.comp.Env;
+import com.sun.tools.javac.comp.Resolve;
 import com.sun.tools.javac.parser.Parser;
 import com.sun.tools.javac.parser.ParserFactory;
-import com.sun.tools.javac.tree.JCTree.JCClassDecl;
 import com.sun.tools.javac.tree.JCTree.JCCompilationUnit;
 import com.sun.tools.javac.tree.JCTree.JCExpression;
 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.util.Context.Factory;
 import com.sun.tools.javac.util.Log;
 import com.sun.tools.javac.util.Log.DiscardDiagnosticHandler;
 import com.sun.tools.javac.util.Names;
@@ -197,6 +206,7 @@
                                          compilationUnits, task -> {
                  JavacTaskImpl jti = (JavacTaskImpl) task;
                  Context context = jti.getContext();
+                 DisableAccessibilityResolve.preRegister(context);
                  jti.addTaskListener(new TaskListenerImpl(context, state));
                  try {
                      return worker.withTask(creator.apply(jti, diagnostics));
@@ -578,10 +588,25 @@
         }
     }
 
+    /**The variable types inferred for "var"s may be non-denotable.
+     * jshell desugars these variables into fields, and fields must have
+     * a denotable type. So these fields are declared with some simpler denotable
+     * type, and the listener here enhances the types of the fields to be the full
+     * inferred types. This is mainly when the inferred type contains:
+     * -intersection types (e.g. <Z extends Runnable&CharSequence> Z get() {...} var z = get();)
+     * -types that are inaccessible at the given place
+     *
+     * This type enhancement does not need to do anything about anonymous classes, as these
+     * are desugared into member classes.
+     */
     private static final class TaskListenerImpl implements TaskListener {
 
         private final Context context;
         private final JShell state;
+        /* Keep the original (declaration) types of the fields that were enhanced.
+         * The declaration types need to be put back before writing the fields
+         * into classfiles.*/
+        private final Map<VarSymbol, Type> var2OriginalType = new HashMap<>();
 
         public TaskListenerImpl(Context context, JShell state) {
             this.context = context;
@@ -589,43 +614,85 @@
         }
 
         @Override
+        public void started(TaskEvent e) {
+            if (e.getKind() != TaskEvent.Kind.GENERATE)
+                return ;
+            //clear enhanced types in fields we are about to write to the classfiles:
+            for (Tree clazz : e.getCompilationUnit().getTypeDecls()) {
+                ClassTree ct = (ClassTree) clazz;
+
+                for (Tree member : ct.getMembers()) {
+                    if (member.getKind() != Tree.Kind.VARIABLE)
+                        continue;
+                    VarSymbol vsym = ((JCVariableDecl) member).sym;
+                    Type original = var2OriginalType.remove(vsym);
+                    if (original != null) {
+                        vsym.type = original;
+                    }
+                }
+            }
+        }
+
+        private boolean variablesSet = false;
+
+        @Override
         public void finished(TaskEvent e) {
-            if (e.getKind() != TaskEvent.Kind.ENTER)
+            if (e.getKind() != TaskEvent.Kind.ENTER || variablesSet)
                 return ;
             state.maps
                  .snippetList()
                  .stream()
                  .filter(s -> s.status() == Status.VALID)
                  .filter(s -> s.kind() == Snippet.Kind.VAR)
-                 .filter(s -> s.subKind() == Snippet.SubKind.VAR_DECLARATION_WITH_INITIALIZER_SUBKIND)
-                 .forEach(s -> setVariableType((JCCompilationUnit) e.getCompilationUnit(), (VarSnippet) s));
+                 .filter(s -> s.subKind() == Snippet.SubKind.VAR_DECLARATION_WITH_INITIALIZER_SUBKIND ||
+                              s.subKind() == Snippet.SubKind.TEMP_VAR_EXPRESSION_SUBKIND)
+                 .forEach(s -> setVariableType((VarSnippet) s));
+            variablesSet = true;
         }
 
-        private void setVariableType(JCCompilationUnit root, VarSnippet s) {
+        /* If the snippet contain enhanced types, enhance the type of
+         * the variable from snippet s to be the enhanced type.
+         */
+        private void setVariableType(VarSnippet s) {
+            String typeName = s.fullTypeName;
+
+            if (typeName == null)
+                return ;
+
             Symtab syms = Symtab.instance(context);
             Names names = Names.instance(context);
             Log log  = Log.instance(context);
             ParserFactory parserFactory = ParserFactory.instance(context);
             Attr attr = Attr.instance(context);
+            Enter enter = Enter.instance(context);
+            DisableAccessibilityResolve rs = (DisableAccessibilityResolve) Resolve.instance(context);
 
+            //find the variable:
             ClassSymbol clazz = syms.getClass(syms.unnamedModule, names.fromString(s.classFullName()));
             if (clazz == null || !clazz.isCompleted())
                 return;
             VarSymbol field = (VarSymbol) clazz.members().findFirst(names.fromString(s.name()), sym -> sym.kind == Kinds.Kind.VAR);
-            if (field != null) {
+
+            if (field != null && !var2OriginalType.containsKey(field)) {
+                //if it was not enhanced yet:
+                //ignore any errors:
                 JavaFileObject prev = log.useSource(null);
                 DiscardDiagnosticHandler h = new DiscardDiagnosticHandler(log);
                 try {
-                    String typeName = s.typeName();
+                    //parse the type as a cast, i.e. "(<typeName>) x". This is to support
+                    //intersection types:
                     CharBuffer buf = CharBuffer.wrap(("(" + typeName +")x\u0000").toCharArray(), 0, typeName.length() + 3);
                     Parser parser = parserFactory.newParser(buf, false, false, false);
                     JCExpression expr = parser.parseExpression();
                     if (expr.hasTag(Tag.TYPECAST)) {
+                        //if parsed OK, attribute and set the type:
+                        var2OriginalType.put(field, field.type);
+
                         JCTypeCast tree = (JCTypeCast) expr;
-                        if (tree.clazz.hasTag(Tag.TYPEINTERSECTION)) {
+                        rs.runWithoutAccessChecks(() -> {
                             field.type = attr.attribType(tree.clazz,
-                                                         ((JCClassDecl) root.getTypeDecls().head).sym);
-                        }
+                                                         enter.getEnvs().iterator().next().enclClass.sym);
+                        });
                     }
                 } finally {
                     log.popDiagnosticHandler(h);
@@ -635,4 +702,48 @@
         }
     }
 
+    private static final class DisableAccessibilityResolve extends Resolve {
+
+        public static void preRegister(Context context) {
+            if (context.get(Marker.class) == null) {
+                context.put(resolveKey, ((Factory<Resolve>) c -> new DisableAccessibilityResolve(c)));
+                context.put(Marker.class, new Marker());
+            }
+        }
+
+        private boolean noAccessChecks;
+
+        public DisableAccessibilityResolve(Context context) {
+            super(context);
+        }
+
+        /**Run the given Runnable with all access checks disabled.
+         *
+         * @param r Runnnable to run
+         */
+        public void runWithoutAccessChecks(Runnable r) {
+            boolean prevNoAccessCheckes = noAccessChecks;
+            try {
+                noAccessChecks = true;
+                r.run();
+            } finally {
+                noAccessChecks = prevNoAccessCheckes;
+            }
+        }
+
+        @Override
+        public boolean isAccessible(Env<AttrContext> env, TypeSymbol c, boolean checkInner) {
+            if (noAccessChecks) return true;
+            return super.isAccessible(env, c, checkInner);
+        }
+
+        @Override
+        public boolean isAccessible(Env<AttrContext> env, Type site, Symbol sym, boolean checkInner) {
+            if (noAccessChecks) return true;
+            return super.isAccessible(env, site, sym, checkInner);
+        }
+
+        private static final class Marker {}
+    }
+
 }
--- a/src/jdk.jshell/share/classes/jdk/jshell/TreeDissector.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/jdk.jshell/share/classes/jdk/jshell/TreeDissector.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, 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,6 +48,7 @@
 import java.util.function.Predicate;
 import java.util.stream.Stream;
 import javax.lang.model.type.TypeMirror;
+import jdk.jshell.TypePrinter.AnonymousTypeKind;
 import jdk.jshell.Util.Pair;
 
 /**
@@ -227,7 +228,7 @@
         Type typeImpl = (Type) type;
         try {
             TypePrinter tp = new TypePrinter(at.messages(),
-                    state.maps::fullClassNameAndPackageToClass, true);
+                    state.maps::fullClassNameAndPackageToClass, true, AnonymousTypeKind.DISPLAY);
             return tp.toString(typeImpl);
         } catch (Exception ex) {
             return null;
--- a/src/jdk.jshell/share/classes/jdk/jshell/TypePrinter.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/jdk.jshell/share/classes/jdk/jshell/TypePrinter.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -30,14 +30,17 @@
 import com.sun.tools.javac.code.Symbol;
 import com.sun.tools.javac.code.Symbol.ClassSymbol;
 import com.sun.tools.javac.code.Symbol.PackageSymbol;
+import com.sun.tools.javac.code.Symbol.TypeSymbol;
 import com.sun.tools.javac.code.Type;
 import com.sun.tools.javac.code.Type.ClassType;
 import com.sun.tools.javac.code.Type.IntersectionClassType;
 import com.sun.tools.javac.util.JavacMessages;
 import java.util.Locale;
 import java.util.function.BinaryOperator;
+import java.util.function.Function;
 import java.util.stream.Collectors;
 
+
 /**
  * Print types in source form.
  */
@@ -47,14 +50,44 @@
 
     private final JavacMessages messages;
     private final BinaryOperator<String> fullClassNameAndPackageToClass;
-    private final boolean printEnhancedTypes;
+    private final Function<TypeSymbol, String> anonymousToName;
+    private final boolean printIntersectionTypes;
+    private final AnonymousTypeKind anonymousTypesKind;
 
+    /**Create a TypePrinter.
+     *
+     * @param messages javac's messages
+     * @param fullClassNameAndPackageToClass convertor to convert full class names to
+     *                                       simple class names.
+     * @param printIntersectionTypes whether intersection types should be printed
+     * @param anonymousTypesKind how the anonymous types should be printed
+     */
     TypePrinter(JavacMessages messages,
                 BinaryOperator<String> fullClassNameAndPackageToClass,
-                boolean printEnhancedTypes) {
+                boolean printIntersectionTypes, AnonymousTypeKind anonymousTypesKind) {
+        this(messages, fullClassNameAndPackageToClass, cs -> cs.flatName().toString(),
+             printIntersectionTypes, anonymousTypesKind);
+    }
+
+    /**Create a TypePrinter.
+     *
+     * @param messages javac's messages
+     * @param fullClassNameAndPackageToClass convertor to convert full class names to
+     *                                       simple class names.
+     * @param anonymousToName convertor from anonymous classes to name that should be printed
+     *                        if anonymousTypesKind == AnonymousTypeKind.DECLARE
+     * @param printIntersectionTypes whether intersection types should be printed
+     * @param anonymousTypesKind how the anonymous types should be printed
+     */
+    TypePrinter(JavacMessages messages,
+                BinaryOperator<String> fullClassNameAndPackageToClass,
+                Function<TypeSymbol, String> anonymousToName,
+                boolean printIntersectionTypes, AnonymousTypeKind anonymousTypesKind) {
         this.messages = messages;
         this.fullClassNameAndPackageToClass = fullClassNameAndPackageToClass;
-        this.printEnhancedTypes = printEnhancedTypes;
+        this.anonymousToName = anonymousToName;
+        this.printIntersectionTypes = printIntersectionTypes;
+        this.anonymousTypesKind = anonymousTypesKind;
     }
 
     String toString(Type t) {
@@ -96,9 +129,9 @@
      */
     @Override
     protected String className(ClassType t, boolean longform, Locale locale) {
-        Symbol sym = t.tsym;
+        TypeSymbol sym = t.tsym;
         if (sym.name.length() == 0 && (sym.flags() & COMPOUND) != 0) {
-            if (printEnhancedTypes) {
+            if (printIntersectionTypes) {
                 return ((IntersectionClassType) t).getExplicitComponents()
                                                   .stream()
                                                   .map(i -> visit(i, locale))
@@ -107,18 +140,26 @@
                 return OBJECT;
             }
         } else if (sym.name.length() == 0) {
-            if (printEnhancedTypes) {
-                return t.tsym.flatName().toString().substring(t.tsym.outermostClass().flatName().length());
+            if (anonymousTypesKind == AnonymousTypeKind.DECLARE) {
+                return anonymousToName.apply(sym);
             }
             // Anonymous
             String s;
+            boolean isClass;
             ClassType norm = (ClassType) t.tsym.type;
             if (norm == null) {
                 s = OBJECT;
+                isClass = true;
             } else if (norm.interfaces_field != null && norm.interfaces_field.nonEmpty()) {
                 s = visit(norm.interfaces_field.head, locale);
+                isClass = false;
             } else {
                 s = visit(norm.supertype_field, locale);
+                isClass = true;
+            }
+            if (anonymousTypesKind == AnonymousTypeKind.DISPLAY) {
+                s = isClass ? "<anonymous class extending " + s + ">"
+                            : "<anonymous class implementing " + s + ">";
             }
             return s;
         } else if (longform) {
@@ -152,4 +193,14 @@
                 : s.fullname.toString();
     }
 
+    /** Specifies how the anonymous classes should be handled. */
+    public enum AnonymousTypeKind {
+        /* The anonymous class is printed as the name of its supertype. */
+        SUPER,
+        /* The anonymous class is printed as converted by the anonymousToName
+         * convertor. */
+        DECLARE,
+        /* The anonymous class is printed in a human readable form. */
+        DISPLAY;
+    }
 }
--- a/src/jdk.jshell/share/classes/jdk/jshell/Util.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/jdk.jshell/share/classes/jdk/jshell/Util.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -56,6 +56,11 @@
     static final String DOIT_METHOD_NAME = "do_it$";
 
     /**
+     * The prefix for all anonymous classes upgraded to member classes.
+     */
+    static final String JSHELL_ANONYMOUS = "$JShell$anonymous$";
+
+    /**
      * A pattern matching the full or simple class name of a wrapper class.
      */
     static final Pattern PREFIX_PATTERN = Pattern.compile(
--- a/src/jdk.jshell/share/classes/jdk/jshell/VarSnippet.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/jdk.jshell/share/classes/jdk/jshell/VarSnippet.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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,6 +26,8 @@
 package jdk.jshell;
 
 import java.util.Collection;
+import java.util.Set;
+import java.util.stream.Collectors;
 import jdk.jshell.Key.VarKey;
 
 /**
@@ -41,15 +43,30 @@
  */
 public class VarSnippet extends DeclarationSnippet {
 
+    /**A human readable type of the variable. May include intersection types
+     * and human readable description of anonymous classes.
+     */
     final String typeName;
 
+    /**The full type inferred for "var" variables. May include intersection types
+     * and inaccessible types. {@literal null} if enhancing the type is not necessary.
+     */
+    final String fullTypeName;
+
+    /**The anonymous class declared in the initializer of the "var" variable.
+     * These are automatically statically imported when the field is imported.
+     */
+    final Set<String> anonymousClasses;
+
      VarSnippet(VarKey key, String userSource, Wrap guts,
-            String name, SubKind subkind, String typeName,
-            Collection<String> declareReferences,
+            String name, SubKind subkind, String typeName, String fullTypeName,
+            Set<String> anonymousClasses, Collection<String> declareReferences,
             DiagList syntheticDiags) {
         super(key, userSource, guts, name, subkind, null, declareReferences,
                 null, syntheticDiags);
         this.typeName = typeName;
+        this.fullTypeName = fullTypeName;
+        this.anonymousClasses = anonymousClasses;
     }
 
     /**
@@ -59,4 +76,13 @@
     public String typeName() {
         return typeName;
     }
+
+    @Override
+    String importLine(JShell state) {
+        return "import static " + classFullName() + "." + name() + ";\n" +
+               anonymousClasses.stream()
+                               .map(c -> "import static " + classFullName() + "." + c + ";\n")
+                               .collect(Collectors.joining());
+    }
+
 }
--- a/src/jdk.jshell/share/classes/jdk/jshell/Wrap.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/jdk.jshell/share/classes/jdk/jshell/Wrap.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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,9 @@
 
 package jdk.jshell;
 
+import java.util.ArrayList;
 import java.util.Arrays;
+import java.util.List;
 import static java.util.stream.Collectors.joining;
 import static jdk.jshell.Util.DOIT_METHOD_NAME;
 
@@ -66,37 +68,76 @@
         return "\n" + indent(n);
     }
 
-    /**
+    /**Create a stub of a compilable representation of a variable snippet.
+     * The variable is always represented by a field. If the variable
+     * in the snippet has an initializer, the field is initialized by
+     * calling the DOIT_METHOD_NAME method.
      *
-     * @param in
-     * @param rname
-     * @param rinit Initializer or null
-     * @param rdecl Type name and name
-     * @return
+     * In some cases, the real inferred type of the variable may be non-denotable
+     * (e.g. intersection types). The declared type of the field must always
+     * be denotable (i.e. such that it can be written into the classfile), but
+     * if the real type is potentially non-denotable, the {@code enhanced} parameter
+     * must be true.
+     *
+     * @param source the snippet's masked source code
+     * @param wtype variable's denotable type suitable for field declaration
+     * @param brackets any [] that should be appended to the type
+     * @param rname range in source that denotes the name of the
+     * @param winit Initializer or null
+     * @param enhanced if the real inferred type of the variable is potentially
+     *                 non-denotable, this must be true
+     * @return a Wrap that declares the given variable, potentially with
+     *         an initialization method
      */
     public static Wrap varWrap(String source, Wrap wtype, String brackets,
-                               Range rname, Wrap winit, Wrap anonDeclareWrap) {
+                               Range rname, Wrap winit, boolean enhanced,
+                               Wrap anonDeclareWrap) {
         RangeWrap wname = new RangeWrap(source, rname);
-        Wrap wVarDecl = new VarDeclareWrap(wtype, brackets, wname);
+        List<Object> components = new ArrayList<>();
+        components.add(new VarDeclareWrap(wtype, brackets, wname));
         Wrap wmeth;
 
         if (winit == null) {
             wmeth = new CompoundWrap(new NoWrap(" "), "   return null;\n");
         } else {
-        // int x = y
-            // int x_ = y; return x = x_;
-            // decl + "_ = " + init ; + "return " + name + "=" + name + "_ ;"
-            wmeth = new CompoundWrap(
-                    wtype, brackets + " ", wname, "_ =\n        ", winit, semi(winit),
-                    "        return ", wname, " = ", wname, "_;\n"
-            );
+            // int x = y
+            if (enhanced) {
+                // private static <Z> Z do_itAux() {
+                //     wtype x_ = y;
+                //     @SuppressWarnings("unchecked")
+                //     Z x__ = (Z) x_;
+                //     return x__;
+                // }
+                // in do_it method:
+                //return do_itAux();
+                Wrap waux = new CompoundWrap(
+                        "    private static <Z> Z ", DOIT_METHOD_NAME + "Aux", "() throws Throwable {\n",
+                        wtype, brackets + " ", wname, "_ =\n        ", winit, semi(winit),
+                        "        @SuppressWarnings(\"unchecked\") Z ", wname, "__ = (Z)", wname, "_;\n",
+                        "        return ", wname, "__;\n",
+                        "}"
+                );
+                components.add(waux);
+                wmeth = new CompoundWrap(
+                        "        return ", wname, " = ", DOIT_METHOD_NAME + "Aux", "();\n"
+                );
+            } else {
+                // int x_ = y; return x = x_;
+                // decl + "_ = " + init ; + "return " + name + "= " + name + "_ ;"
+                wmeth = new CompoundWrap(
+                        wtype, brackets + " ", wname, "_ =\n        ", winit, semi(winit),
+                        "        return ", wname, " = ", wname, "_;\n"
+                );
+            }
         }
-        Wrap wInitMeth = new DoitMethodWrap(wmeth);
-        return anonDeclareWrap != null ? new CompoundWrap(wVarDecl, wInitMeth, anonDeclareWrap)
-                                       : new CompoundWrap(wVarDecl, wInitMeth);
+        components.add(new DoitMethodWrap(wmeth));
+        if (anonDeclareWrap != null) {
+            components.add(anonDeclareWrap);
+        }
+        return new CompoundWrap(components.toArray());
     }
 
-    public static Wrap tempVarWrap(String source, String typename, String name) {
+    public static Wrap tempVarWrap(String source, String typename, String name, Wrap anonDeclareWrap) {
         RangeWrap winit = new NoWrap(source);
         // y
         // return $1 = y;
@@ -105,7 +146,8 @@
         Wrap wInitMeth = new DoitMethodWrap(wmeth);
 
         String varDecl = "    public static\n    " + typename + " " + name + ";\n";
-        return new CompoundWrap(varDecl, wInitMeth);
+        return anonDeclareWrap != null ? new CompoundWrap(varDecl, wInitMeth, anonDeclareWrap)
+                                       : new CompoundWrap(varDecl, wInitMeth);
     }
 
     public static Wrap simpleWrap(String source) {
--- a/src/jdk.jshell/share/classes/jdk/jshell/resources/l10n_ja.properties	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/jdk.jshell/share/classes/jdk/jshell/resources/l10n_ja.properties	Tue Jan 30 16:41:40 2018 +0100
@@ -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,8 +27,9 @@
 jshell.diag.modifier.plural.ignore = \u4FEE\u98FE\u5B50{0}\u306F\u3001\u30C8\u30C3\u30D7\u30FB\u30EC\u30D9\u30EB\u5BA3\u8A00\u3067\u4F7F\u7528\u3067\u304D\u307E\u305B\u3093\u3002\u7121\u8996\u3055\u308C\u307E\u3059
 jshell.diag.modifier.single.fatal = \u4FEE\u98FE\u5B50{0}\u306F\u3001\u30C8\u30C3\u30D7\u30FB\u30EC\u30D9\u30EB\u5BA3\u8A00\u3067\u4F7F\u7528\u3067\u304D\u307E\u305B\u3093
 jshell.diag.modifier.single.ignore = \u4FEE\u98FE\u5B50{0}\u306F\u3001\u30C8\u30C3\u30D7\u30FB\u30EC\u30D9\u30EB\u5BA3\u8A00\u3067\u4F7F\u7528\u3067\u304D\u307E\u305B\u3093\u3002\u7121\u8996\u3055\u308C\u307E\u3059
+jshell.diag.object.method.fatal = JShell\u30E1\u30BD\u30C3\u30C9\u540D\u3092\u30AA\u30D6\u30B8\u30A7\u30AF\u30C8\u30FB\u30E1\u30BD\u30C3\u30C9\u3068\u540C\u4E00\u306B\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093: {0}
 
 jshell.exc.null = \u30B9\u30CB\u30DA\u30C3\u30C8\u306Fnull\u306B\u3067\u304D\u307E\u305B\u3093
-jshell.exc.alien = \u3053\u306EJShell\u304B\u3089\u306E\u30B9\u30CB\u30DA\u30C3\u30C8\u3067\u306F\u3042\u308A\u307E\u305B\u3093
+jshell.exc.alien = \u3053\u306EJShell\u304B\u3089\u306E\u30B9\u30CB\u30DA\u30C3\u30C8\u3067\u306F\u3042\u308A\u307E\u305B\u3093: {0}
 jshell.exc.closed = JShell ({0})\u306F\u30AF\u30ED\u30FC\u30BA\u3055\u308C\u307E\u3057\u305F\u3002
 jshell.exc.var.not.valid = varValue() {0}\u306E\u30B9\u30CB\u30DA\u30C3\u30C8\u30FB\u30D1\u30E9\u30E1\u30FC\u30BF\u306FVALID\u306B\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u304C\u3001{1}\u3067\u3059
--- a/src/jdk.jshell/share/classes/jdk/jshell/resources/l10n_zh_CN.properties	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/jdk.jshell/share/classes/jdk/jshell/resources/l10n_zh_CN.properties	Tue Jan 30 16:41:40 2018 +0100
@@ -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,8 +27,9 @@
 jshell.diag.modifier.plural.ignore = \u4FEE\u9970\u7B26 {0} \u4E0D\u5141\u8BB8\u5728\u9876\u7EA7\u58F0\u660E\u4E2D\u4F7F\u7528, \u5DF2\u5FFD\u7565
 jshell.diag.modifier.single.fatal = \u4FEE\u9970\u7B26 {0} \u4E0D\u5141\u8BB8\u5728\u9876\u7EA7\u58F0\u660E\u4E2D\u4F7F\u7528
 jshell.diag.modifier.single.ignore = \u4FEE\u9970\u7B26 {0} \u4E0D\u5141\u8BB8\u5728\u9876\u7EA7\u58F0\u660E\u4E2D\u4F7F\u7528, \u5DF2\u5FFD\u7565
+jshell.diag.object.method.fatal = JShell \u65B9\u6CD5\u540D\u79F0\u4E0D\u80FD\u4E0E Object \u65B9\u6CD5\u5339\u914D: {0}
 
 jshell.exc.null = \u7247\u6BB5\u4E0D\u80FD\u4E3A\u7A7A\u503C
-jshell.exc.alien = \u7247\u6BB5\u4E0D\u6765\u81EA\u4E8E\u6B64 JShell
+jshell.exc.alien = \u7247\u6BB5\u5E76\u975E\u6765\u81EA\u4E8E\u6B64 JShell: {0}
 jshell.exc.closed = JShell ({0}) \u5DF2\u5173\u95ED\u3002
 jshell.exc.var.not.valid = varValue() {0} \u7684\u7247\u6BB5\u53C2\u6570\u5FC5\u987B\u4E3A VALID, \u8BE5\u53C2\u6570\u4E3A: {1}
--- a/src/jdk.jstatd/share/classes/sun/tools/jstatd/Jstatd.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/jdk.jstatd/share/classes/sun/tools/jstatd/Jstatd.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2004, 2015, 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
@@ -47,7 +47,8 @@
     private static boolean startRegistry = true;
 
     private static void printUsage() {
-        System.err.println("usage: jstatd [-nr] [-p port] [-n rminame]");
+        System.err.println("usage: jstatd [-nr] [-p port] [-n rminame]\n" +
+                           "       jstatd -?|-h|--help");
     }
 
     static void bind(String name, RemoteHostImpl remoteHost)
@@ -78,7 +79,12 @@
         for ( ; (argc < args.length) && (args[argc].startsWith("-")); argc++) {
             String arg = args[argc];
 
-            if (arg.compareTo("-nr") == 0) {
+            if (arg.compareTo("-?") == 0 ||
+                arg.compareTo("-h") == 0 ||
+                arg.compareTo("--help") == 0) {
+                printUsage();
+                System.exit(0);
+            } else if (arg.compareTo("-nr") == 0) {
                 startRegistry = false;
             } else if (arg.startsWith("-p")) {
                 if (arg.compareTo("-p") != 0) {
--- a/src/jdk.management.agent/share/classes/sun/management/jmxremote/SingleEntryRegistry.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/jdk.management.agent/share/classes/sun/management/jmxremote/SingleEntryRegistry.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 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
@@ -46,7 +46,7 @@
 public class SingleEntryRegistry extends RegistryImpl {
     SingleEntryRegistry(int port, String name, Remote object)
             throws RemoteException {
-        super(port);
+        super(port, null, null, SingleEntryRegistry::singleRegistryFilter);
         this.name = name;
         this.object = object;
     }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.naming.dns/share/classes/com/sun/jndi/dns/DNSDatagramSocketFactory.java	Tue Jan 30 16:41:40 2018 +0100
@@ -0,0 +1,246 @@
+/*
+ * 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.
+ */
+package com.sun.jndi.dns;
+
+import java.io.IOException;
+import java.net.DatagramSocket;
+import java.net.ProtocolFamily;
+import java.net.SocketException;
+import java.net.InetSocketAddress;
+import java.nio.channels.DatagramChannel;
+import java.util.Objects;
+import java.util.Random;
+
+class DNSDatagramSocketFactory {
+    static final int DEVIATION = 3;
+    static final int THRESHOLD = 6;
+    static final int BIT_DEVIATION = 2;
+    static final int HISTORY = 32;
+    static final int MAX_RANDOM_TRIES = 5;
+    /**
+     * The dynamic allocation port range (aka ephemeral ports), as configured
+     * on the system. Use nested class for lazy evaluation.
+     */
+    static final class EphemeralPortRange {
+        private EphemeralPortRange() {}
+        static final int LOWER = sun.net.PortConfig.getLower();
+        static final int UPPER = sun.net.PortConfig.getUpper();
+        static final int RANGE = UPPER - LOWER + 1;
+    }
+
+    // Records a subset of max {@code capacity} previously used ports
+    static final class PortHistory {
+        final int capacity;
+        final int[] ports;
+        final Random random;
+        int index;
+        PortHistory(int capacity, Random random) {
+            this.random = random;
+            this.capacity = capacity;
+            this.ports = new int[capacity];
+        }
+        // returns true if the history contains the specified port.
+        public boolean contains(int port) {
+            int p = 0;
+            for (int i=0; i<capacity; i++) {
+                if ((p = ports[i]) == 0 || p == port) break;
+            }
+            return p == port;
+        }
+        // Adds the port to the history - doesn't check whether the port
+        // is already present. Always adds the port and always return true.
+        public boolean add(int port) {
+            if (ports[index] != 0) { // at max capacity
+                // remove one port at random and store the new port there
+                ports[random.nextInt(capacity)] = port;
+            } else { // there's a free slot
+                ports[index] = port;
+            }
+            if (++index == capacity) index = 0;
+            return true;
+        }
+        // Adds the port to the history if not already present.
+        // Return true if the port was added, false if the port was already
+        // present.
+        public boolean offer(int port) {
+            if (contains(port)) return false;
+            else return add(port);
+        }
+    }
+
+    int lastport = 0;
+    int suitablePortCount;
+    int unsuitablePortCount;
+    final ProtocolFamily family; // null (default) means dual stack
+    final int thresholdCount; // decision point
+    final int deviation;
+    final Random random;
+    final PortHistory history;
+
+    DNSDatagramSocketFactory() {
+        this(new Random());
+    }
+
+    DNSDatagramSocketFactory(Random random) {
+        this(Objects.requireNonNull(random), null, DEVIATION, THRESHOLD);
+    }
+    DNSDatagramSocketFactory(Random random,
+                             ProtocolFamily family,
+                             int deviation,
+                             int threshold) {
+        this.random = Objects.requireNonNull(random);
+        this.history = new PortHistory(HISTORY, random);
+        this.family = family;
+        this.deviation = Math.max(1, deviation);
+        this.thresholdCount = Math.max(2, threshold);
+    }
+
+    /**
+     * Opens a datagram socket listening to the wildcard address on a
+     * random port. If the underlying OS supports UDP port randomization
+     * out of the box (if binding a socket to port 0 binds it to a random
+     * port) then the underlying OS implementation is used. Otherwise, this
+     * method will allocate and bind a socket on a randomly selected ephemeral
+     * port in the dynamic range.
+     * @return A new DatagramSocket bound to a random port.
+     * @throws SocketException if the socket cannot be created.
+     */
+    public synchronized DatagramSocket open() throws SocketException {
+        int lastseen = lastport;
+        DatagramSocket s;
+
+        boolean thresholdCrossed = unsuitablePortCount > thresholdCount;
+        if (thresholdCrossed) {
+            // Underlying stack does not support random UDP port out of the box.
+            // Use our own algorithm to allocate a random UDP port
+            s = openRandom();
+            if (s != null) return s;
+
+            // couldn't allocate a random port: reset all counters and fall
+            // through.
+            unsuitablePortCount = 0; suitablePortCount = 0; lastseen = 0;
+        }
+
+        // Allocate an ephemeral port (port 0)
+        s = openDefault();
+        lastport = s.getLocalPort();
+        if (lastseen == 0) {
+            history.offer(lastport);
+            return s;
+        }
+
+        thresholdCrossed = suitablePortCount > thresholdCount;
+        boolean farEnough = Integer.bitCount(lastseen ^ lastport) > BIT_DEVIATION
+                            && Math.abs(lastport - lastseen) > deviation;
+        boolean recycled = history.contains(lastport);
+        boolean suitable = (thresholdCrossed || farEnough && !recycled);
+        if (suitable && !recycled) history.add(lastport);
+
+        if (suitable) {
+            if (!thresholdCrossed) {
+                suitablePortCount++;
+            } else if (!farEnough || recycled) {
+                unsuitablePortCount = 1;
+                suitablePortCount = thresholdCount/2;
+            }
+            // Either the underlying stack supports random UDP port allocation,
+            // or the new port is sufficiently distant from last port to make
+            // it look like it is. Let's use it.
+            return s;
+        }
+
+        // Undecided... the new port was too close. Let's allocate a random
+        // port using our own algorithm
+        assert !thresholdCrossed;
+        DatagramSocket ss = openRandom();
+        if (ss == null) return s;
+        unsuitablePortCount++;
+        s.close();
+        return ss;
+    }
+
+    private DatagramSocket openDefault() throws SocketException {
+        if (family != null) {
+            try {
+                DatagramChannel c = DatagramChannel.open(family);
+                try {
+                    DatagramSocket s = c.socket();
+                    s.bind(null);
+                    return s;
+                } catch (Throwable x) {
+                    c.close();
+                    throw x;
+                }
+            } catch (SocketException x) {
+                throw x;
+            } catch (IOException x) {
+                SocketException e = new SocketException(x.getMessage());
+                e.initCause(x);
+                throw e;
+            }
+        }
+        return new DatagramSocket();
+    }
+
+    synchronized boolean isUsingNativePortRandomization() {
+        return  unsuitablePortCount <= thresholdCount
+                && suitablePortCount > thresholdCount;
+    }
+
+    synchronized boolean isUsingJavaPortRandomization() {
+        return unsuitablePortCount > thresholdCount ;
+    }
+
+    synchronized boolean isUndecided() {
+        return !isUsingJavaPortRandomization()
+                && !isUsingNativePortRandomization();
+    }
+
+    private DatagramSocket openRandom() {
+        int maxtries = MAX_RANDOM_TRIES;
+        while (maxtries-- > 0) {
+            int port = EphemeralPortRange.LOWER
+                    + random.nextInt(EphemeralPortRange.RANGE);
+            try {
+                if (family != null) {
+                    DatagramChannel c = DatagramChannel.open(family);
+                    try {
+                        DatagramSocket s = c.socket();
+                        s.bind(new InetSocketAddress(port));
+                        return s;
+                    } catch (Throwable x) {
+                        c.close();
+                        throw x;
+                    }
+                }
+                return new DatagramSocket(port);
+            } catch (IOException x) {
+                // try again until maxtries == 0;
+            }
+        }
+        return null;
+    }
+
+}
--- a/src/jdk.naming.dns/share/classes/com/sun/jndi/dns/DnsClient.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/jdk.naming.dns/share/classes/com/sun/jndi/dns/DnsClient.java	Tue Jan 30 16:41:40 2018 +0100
@@ -85,7 +85,9 @@
     private int timeout;                // initial timeout on UDP queries in ms
     private int retries;                // number of UDP retries
 
-    private DatagramSocket udpSocket;
+    private final Object udpSocketLock = new Object();
+    private static final DNSDatagramSocketFactory factory =
+            new DNSDatagramSocketFactory(random);
 
     // Requests sent
     private Map<Integer, ResourceRecord> reqs;
@@ -105,14 +107,6 @@
             throws NamingException {
         this.timeout = timeout;
         this.retries = retries;
-        try {
-            udpSocket = new DatagramSocket();
-        } catch (java.net.SocketException e) {
-            NamingException ne = new ConfigurationException();
-            ne.setRootCause(e);
-            throw ne;
-        }
-
         this.servers = new InetAddress[servers.length];
         serverPorts = new int[servers.length];
 
@@ -142,6 +136,16 @@
         resps = Collections.synchronizedMap(new HashMap<Integer, byte[]>());
     }
 
+    DatagramSocket getDatagramSocket() throws NamingException {
+        try {
+            return factory.open();
+        } catch (java.net.SocketException e) {
+            NamingException ne = new ConfigurationException();
+            ne.setRootCause(e);
+            throw ne;
+        }
+    }
+
     @SuppressWarnings("deprecation")
     protected void finalize() {
         close();
@@ -151,7 +155,6 @@
     private Object queuesLock = new Object();
 
     public void close() {
-        udpSocket.close();
         synchronized (queuesLock) {
             reqs.clear();
             resps.clear();
@@ -393,43 +396,45 @@
 
         int minTimeout = 50; // msec after which there are no retries.
 
-        synchronized (udpSocket) {
-            DatagramPacket opkt = new DatagramPacket(
-                    pkt.getData(), pkt.length(), server, port);
-            DatagramPacket ipkt = new DatagramPacket(new byte[8000], 8000);
-            // Packets may only be sent to or received from this server address
-            udpSocket.connect(server, port);
-            int pktTimeout = (timeout * (1 << retry));
-            try {
-                udpSocket.send(opkt);
+        synchronized (udpSocketLock) {
+            try (DatagramSocket udpSocket = getDatagramSocket()) {
+                DatagramPacket opkt = new DatagramPacket(
+                        pkt.getData(), pkt.length(), server, port);
+                DatagramPacket ipkt = new DatagramPacket(new byte[8000], 8000);
+                // Packets may only be sent to or received from this server address
+                udpSocket.connect(server, port);
+                int pktTimeout = (timeout * (1 << retry));
+                try {
+                    udpSocket.send(opkt);
 
-                // timeout remaining after successive 'receive()'
-                int timeoutLeft = pktTimeout;
-                int cnt = 0;
-                do {
-                    if (debug) {
-                       cnt++;
-                        dprint("Trying RECEIVE(" +
-                                cnt + ") retry(" + (retry + 1) +
-                                ") for:" + xid  + "    sock-timeout:" +
-                                timeoutLeft + " ms.");
-                    }
-                    udpSocket.setSoTimeout(timeoutLeft);
-                    long start = System.currentTimeMillis();
-                    udpSocket.receive(ipkt);
-                    long end = System.currentTimeMillis();
+                    // timeout remaining after successive 'receive()'
+                    int timeoutLeft = pktTimeout;
+                    int cnt = 0;
+                    do {
+                        if (debug) {
+                           cnt++;
+                            dprint("Trying RECEIVE(" +
+                                    cnt + ") retry(" + (retry + 1) +
+                                    ") for:" + xid  + "    sock-timeout:" +
+                                    timeoutLeft + " ms.");
+                        }
+                        udpSocket.setSoTimeout(timeoutLeft);
+                        long start = System.currentTimeMillis();
+                        udpSocket.receive(ipkt);
+                        long end = System.currentTimeMillis();
 
-                    byte[] data = ipkt.getData();
-                    if (isMatchResponse(data, xid)) {
-                        return data;
-                    }
-                    timeoutLeft = pktTimeout - ((int) (end - start));
-                } while (timeoutLeft > minTimeout);
+                        byte[] data = ipkt.getData();
+                        if (isMatchResponse(data, xid)) {
+                            return data;
+                        }
+                        timeoutLeft = pktTimeout - ((int) (end - start));
+                    } while (timeoutLeft > minTimeout);
 
-            } finally {
-                udpSocket.disconnect();
+                } finally {
+                    udpSocket.disconnect();
+                }
+                return null; // no matching packet received within the timeout
             }
-            return null; // no matching packet received within the timeout
         }
     }
 
--- a/src/jdk.naming.dns/share/classes/com/sun/jndi/dns/ResourceRecord.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/jdk.naming.dns/share/classes/com/sun/jndi/dns/ResourceRecord.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 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
@@ -355,8 +355,19 @@
                     pos += typeAndLen;
                 } else if ((typeAndLen & 0xC0) == 0xC0) { // name compression
                     ++level;
-                    endPos = pos + 2;
+                    // cater for the case where the name pointed to is itself
+                    // compressed: we don't want endPos to be reset by the second
+                    // compression level.
+                    int ppos = pos;
+                    if (endPos == -1) endPos = pos + 2;
                     pos = getUShort(pos) & 0x3FFF;
+                    if (debug) {
+                        dprint("decode: name compression at " + ppos
+                                + " -> " + pos + " endPos=" + endPos);
+                        assert endPos > 0;
+                        assert pos < ppos;
+                        assert pos >= Header.HEADER_SIZE;
+                    }
                 } else
                     throw new IOException("Invalid label type: " + typeAndLen);
             }
@@ -405,6 +416,11 @@
             }
         }
         // Unknown RR type/class
+        if (debug) {
+            dprint("Unknown RR type for RR data: " + rrtype + " rdlen=" + rdlen
+                   + ", pos=" + pos +", msglen=" + msg.length + ", remaining="
+                   + (msg.length-pos));
+        }
         byte[] rd = new byte[rdlen];
         System.arraycopy(msg, pos, rd, 0, rdlen);
         return rd;
@@ -613,4 +629,15 @@
 
         return sb.toString();
     }
+
+    //-------------------------------------------------------------------------
+
+    private static final boolean debug = false;
+
+    private static void dprint(String mess) {
+        if (debug) {
+            System.err.println("DNS: " + mess);
+        }
+    }
+
 }
--- a/src/jdk.pack/share/native/unpack200/main.cpp	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/jdk.pack/share/native/unpack200/main.cpp	Tue Jan 30 16:41:40 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2016, 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
@@ -153,7 +153,7 @@
     "  -q, --quiet                   set verbosity to lowest level\n" \
     "  -l{F}, --log-file={F}         output to the given log file,\n" \
     "                                or '-' for standard output (default)\n" \
-    "  -?, -h, --help                print this message\n" \
+    "  -?, -h, --help                print this help message\n" \
     "  -V, --version                 print program version\n" \
     "\n" \
     "Exit Status:\n" \
@@ -313,7 +313,7 @@
     case 'h':
     case '?':
       usage(&u, argv[0], true);
-      exit(1);
+      exit(0);
 
     default:
       const char* inenv = isenvarg? " in ${UNPACK200_FLAGS}": "";
--- a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/IRTranslator.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/IRTranslator.java	Tue Jan 30 16:41:40 2018 +0100
@@ -473,9 +473,9 @@
     @Override
     public boolean enterClassNode(final ClassNode classNode) {
         assert !classNode.isStatement(): "should not reach here for class declaration";
-
+        final IdentNode className = classNode.getIdent();
         curExpr = new ClassExpressionTreeImpl(classNode,
-            translateIdent(classNode.getIdent()),
+            className != null? translateIdent(className) : null,
             translateExpr(classNode.getClassHeritage()),
             translateProperty(classNode.getConstructor()),
             translateProperties(classNode.getClassElements()));
--- a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/CodeGenerator.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/CodeGenerator.java	Tue Jan 30 16:41:40 2018 +0100
@@ -2680,9 +2680,8 @@
             return false;
         }
 
-        if(isDeoptimizedExpression(lhs)) {
-            // This is actually related to "lhs.getType().isPrimitive()" above: any expression being deoptimized in
-            // the current chain of rest-of compilations used to have a type narrower than Object (so it was primitive).
+        if(containsOptimisticExpression(lhs)) {
+            // Any optimistic expression within lhs could be deoptimized and trigger a rest-of compilation.
             // We must not perform undefined check specialization for them, as then we'd violate the basic rule of
             // "Thou shalt not alter the stack shape between a deoptimized method and any of its (transitive) rest-ofs."
             return false;
@@ -2749,11 +2748,10 @@
             return false;
         }
 
-        if(isDeoptimizedExpression(lhs)) {
-            // This is actually related to "!lhs.getType().isObject()" above: any expression being deoptimized in
-            // the current chain of rest-of compilations used to have a type narrower than Object. We must not
-            // perform null check specialization for them, as then we'd no longer be loading aconst_null on stack
-            // and thus violate the basic rule of "Thou shalt not alter the stack shape between a deoptimized
+        if(containsOptimisticExpression(lhs)) {
+            // Any optimistic expression within lhs could be deoptimized and trigger a rest-of compilation.
+            // We must not perform null check specialization for them, as then we'd no longer be loading aconst_null
+            // on stack and thus violate the basic rule of "Thou shalt not alter the stack shape between a deoptimized
             // method and any of its (transitive) rest-ofs."
             // NOTE also that if we had a representation for well-known constants (e.g. null, 0, 1, -1, etc.) in
             // Label$Stack.localLoads then this wouldn't be an issue, as we would never (somewhat ridiculously)
@@ -2818,12 +2816,14 @@
     }
 
     /**
-     * Was this expression or any of its subexpressions deoptimized in the current recompilation chain of rest-of methods?
+     * Is this expression or any of its subexpressions optimistic? This includes formerly optimistic
+     * expressions that have been deoptimized in a subsequent compilation.
+     *
      * @param rootExpr the expression being tested
-     * @return true if the expression or any of its subexpressions was deoptimized in the current recompilation chain.
+     * @return true if the expression or any of its subexpressions is optimistic in the current compilation.
      */
-    private boolean isDeoptimizedExpression(final Expression rootExpr) {
-        if(!isRestOf()) {
+    private boolean containsOptimisticExpression(final Expression rootExpr) {
+        if(!useOptimisticTypes()) {
             return false;
         }
         return new Supplier<Boolean>() {
@@ -2839,7 +2839,7 @@
                     public boolean enterDefault(final Node node) {
                         if(!contains && node instanceof Optimistic) {
                             final int pp = ((Optimistic)node).getProgramPoint();
-                            contains = isValid(pp) && isContinuationEntryPoint(pp);
+                            contains = isValid(pp);
                         }
                         return !contains;
                     }
--- a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/linker/JavaAdapterBytecodeGenerator.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/linker/JavaAdapterBytecodeGenerator.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1083,7 +1083,7 @@
 
         // Simply invoke super.finalize()
         mv.visitVarInsn(ALOAD, 0);
-        mv.checkcast(Type.getType(generatedClassName));
+        mv.checkcast(Type.getType('L' + generatedClassName + ';'));
         mv.invokespecial(superClassName, "finalize", VOID_METHOD_DESCRIPTOR, false);
 
         mv.visitInsn(RETURN);
--- a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/resources/Options.properties	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/resources/Options.properties	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -66,9 +66,9 @@
 ## At least short_name or name needs to be in place for an argument descriptor to be valid.
 
 nashorn.option.help = {                       \
-    name="-help",                             \
+    name="--help",                            \
     short_name="-h",                          \
-    desc="Print help for command line flags." \
+    desc="Print this help message."           \
 }
 
 nashorn.option.xhelp = {                               \
--- a/src/jdk.security.auth/share/classes/com/sun/security/auth/module/LdapLoginModule.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/src/jdk.security.auth/share/classes/com/sun/security/auth/module/LdapLoginModule.java	Tue Jan 30 16:41:40 2018 +0100
@@ -737,7 +737,8 @@
 
         if (authFirst || authOnly) {
 
-            String id = replaceUsernameToken(identityMatcher, authcIdentity);
+            String id =
+                replaceUsernameToken(identityMatcher, authcIdentity, username);
 
             // Prepare to bind using user's username and password
             ldapEnvironment.put(Context.SECURITY_CREDENTIALS, password);
@@ -864,8 +865,13 @@
         }
 
         try {
-            NamingEnumeration<SearchResult> results = ctx.search("",
-                replaceUsernameToken(filterMatcher, userFilter), constraints);
+            // Sanitize username and substitute into LDAP filter
+            String canonicalUserFilter =
+                replaceUsernameToken(filterMatcher, userFilter,
+                    escapeUsernameChars());
+
+            NamingEnumeration<SearchResult> results =
+                ctx.search("", canonicalUserFilter, constraints);
 
             // Extract the distinguished name of the user's entry
             // (Use the first entry if more than one is returned)
@@ -913,12 +919,61 @@
     }
 
     /**
+     * Modify the supplied username to encode characters that must be escaped
+     * according to RFC 4515: LDAP: String Representation of Search Filters.
+     *
+     * The following characters are encoded as a backslash "\" (ASCII 0x5c)
+     * followed by the two hexadecimal digits representing the value of the
+     * escaped character:
+     *     '*' (ASCII 0x2a)
+     *     '(' (ASCII 0x28)
+     *     ')' (ASCII 0x29)
+     *     '\' (ASCII 0x5c)
+     *     '\0'(ASCII 0x00)
+     *
+     * @return the modified username with its characters escaped as needed
+     */
+    private String escapeUsernameChars() {
+        int len = username.length();
+        StringBuilder escapedUsername = new StringBuilder(len + 16);
+
+        for (int i = 0; i < len; i++) {
+            char c = username.charAt(i);
+            switch (c) {
+            case '*':
+                escapedUsername.append("\\\\2A");
+                break;
+            case '(':
+                escapedUsername.append("\\\\28");
+                break;
+            case ')':
+                escapedUsername.append("\\\\29");
+                break;
+            case '\\':
+                escapedUsername.append("\\\\5C");
+                break;
+            case '\0':
+                escapedUsername.append("\\\\00");
+                break;
+            default:
+                escapedUsername.append(c);
+            }
+        }
+
+        return escapedUsername.toString();
+    }
+
+
+    /**
      * Replace the username token
      *
+     * @param matcher the replacement pattern
      * @param string the target string
+     * @param username the supplied username
      * @return the modified string
      */
-    private String replaceUsernameToken(Matcher matcher, String string) {
+    private String replaceUsernameToken(Matcher matcher, String string,
+        String username) {
         return matcher != null ? matcher.replaceAll(username) : string;
     }
 
--- a/test/TestCommon.gmk	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/TestCommon.gmk	Tue Jan 30 16:41:40 2018 +0100
@@ -332,9 +332,45 @@
   TEST_SELECTION = $(TESTDIRS)
 endif
 
-ifdef CONCURRENCY
-  JTREG_BASIC_OPTIONS += -concurrency:$(CONCURRENCY)
+ifeq ($(UNAME_S), SunOS)
+  NUM_CORES := $(shell LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line)
+endif
+ifeq ($(UNAME_S), Linux)
+  NUM_CORES := $(shell cat /proc/cpuinfo  | grep -c processor)
+endif
+ifeq ($(UNAME_S), Darwin)
+  NUM_CORES := $(shell /usr/sbin/sysctl -n hw.ncpu)
+endif
+ifeq ($(findstring CYGWIN,$(UNAME_S)), CYGWIN)
+  ifneq ($(NUMBER_OF_PROCESSORS), )
+    NUM_CORES := $(NUMBER_OF_PROCESSORS)
+  else
+    ifneq ($(HOTSPOT_BUILD_JOBS), )
+      NUM_CORES := $(HOTSPOT_BUILD_JOBS)
+    else
+      NUM_CORES := 1 # fallback
+    endif
+  endif
 endif
+
+ifndef CONCURRENCY_FACTOR
+  CONCURRENCY_FACTOR = 1
+endif
+
+# Concurrency based on min(cores / 2, 12) * CONCURRENCY_FACTOR
+CONCURRENCY := $(shell awk \
+  'BEGIN { \
+    c = $(NUM_CORES) / 2; \
+    if (c > 12) c = 12; \
+    c = c * $(CONCURRENCY_FACTOR); \
+    if (c < 1) c = 1; \
+    printf "%.0f", c; \
+  }')
+JTREG_BASIC_OPTIONS += -concurrency:$(CONCURRENCY)
+
+# Make sure MaxRAMPercentage is high enough to not cause OOM or swapping since we may end up with a lot of JVM's
+JTREG_BASIC_OPTIONS += -vmoption:-XX:MaxRAMPercentage=$(shell expr 25 / $(CONCURRENCY))
+
 ifdef EXTRA_JTREG_OPTIONS
   JTREG_BASIC_OPTIONS += $(EXTRA_JTREG_OPTIONS)
 endif
--- a/test/failure_handler/src/share/classes/jdk/test/failurehandler/jtreg/OS.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/failure_handler/src/share/classes/jdk/test/failurehandler/jtreg/OS.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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,9 @@
     }
 
     private OS(String name) {
-        if (name.startsWith("Linux")) {
+        if (name.startsWith("AIX")) {
+            family = "aix";
+        } else if (name.startsWith("Linux")) {
             family = "linux";
         } else if (name.startsWith("Mac") || name.startsWith("Darwin")) {
             family = "mac";
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/gtest/code/test_vtableStub.cpp	Tue Jan 30 16:41:40 2018 +0100
@@ -0,0 +1,52 @@
+/*
+ * 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.
+ *
+ * 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 "precompiled.hpp"
+#include "code/vtableStubs.hpp"
+#include "runtime/interfaceSupport.hpp"
+#include "unittest.hpp"
+
+TEST_VM(code, vtableStubs) {
+  // Should be in VM to use locks
+  ThreadInVMfromNative ThreadInVMfromNative(JavaThread::current());
+
+  VtableStubs::find_vtable_stub(0); // min vtable index
+  for (int i = 0; i < 15; i++) {
+    VtableStubs::find_vtable_stub((1 << i) - 1);
+    VtableStubs::find_vtable_stub((1 << i));
+  }
+  VtableStubs::find_vtable_stub((1 << 15) - 1); // max vtable index
+}
+
+TEST_VM(code, itableStubs) {
+  // Should be in VM to use locks
+  ThreadInVMfromNative ThreadInVMfromNative(JavaThread::current());
+
+  VtableStubs::find_itable_stub(0); // min itable index
+  for (int i = 0; i < 15; i++) {
+    VtableStubs::find_itable_stub((1 << i) - 1);
+    VtableStubs::find_itable_stub((1 << i));
+  }
+  VtableStubs::find_itable_stub((1 << 15) - 1); // max itable index
+}
--- a/test/hotspot/jtreg/Makefile	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/hotspot/jtreg/Makefile	Tue Jan 30 16:41:40 2018 +0100
@@ -38,47 +38,6 @@
 
 IGNORE_MARKED_TESTS := true
 
-# Get OS name from uname (Cygwin inexplicably adds _NT-5.1)
-UNAME_S := $(shell uname -s | cut -f1 -d_)
-
-ifeq ($(UNAME_S), SunOS)
-  NUM_CORES := $(shell LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line)
-endif
-ifeq ($(UNAME_S), Linux)
-  NUM_CORES := $(shell cat /proc/cpuinfo  | grep -c processor)
-endif
-ifeq ($(UNAME_S), Darwin)
-  NUM_CORES := $(shell /usr/sbin/sysctl -n hw.ncpu)
-endif
-ifeq ($(findstring CYGWIN,$(UNAME_S)), CYGWIN)
-  ifneq ($(NUMBER_OF_PROCESSORS), )
-    NUM_CORES := $(NUMBER_OF_PROCESSORS)
-  else
-    ifneq ($(HOTSPOT_BUILD_JOBS), )
-      NUM_CORES := $(HOTSPOT_BUILD_JOBS)
-    else
-      NUM_CORES := 1 # fallback
-    endif
-  endif
-endif
-
-ifndef CONCURRENCY_FACTOR
-  CONCURRENCY_FACTOR = 1
-endif
-
-# Concurrency based on min(cores / 2, 12) * CONCURRENCY_FACTOR
-CONCURRENCY := $(shell awk \
-  'BEGIN { \
-    c = $(NUM_CORES) / 2; \
-    if (c > 12) c = 12; \
-    c = c * $(CONCURRENCY_FACTOR); \
-    if (c < 1) c = 1; \
-    printf "%.0f", c; \
-  }')
-
-# Make sure MaxRAMPercentage is high enough to not cause OOM or swapping since we may end up with a lot of JVM's
-JTREG_BASIC_OPTIONS += -vmoption:-XX:MaxRAMPercentage=$(shell expr 25 / $(CONCURRENCY))
-
 # Include the common base file with most of the logic
 include ../../TestCommon.gmk
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/compiler/loopstripmining/BackedgeNodeWithOutOfLoopControl.java	Tue Jan 30 16:41:40 2018 +0100
@@ -0,0 +1,53 @@
+/*
+ * Copyright (c) 2018, Red Hat, Inc. All rights reserved.
+ * 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 8194914
+ * @summary "node not on backedge" assert in OuterStripMinedLoopNode::adjust_strip_mined_loop
+ *
+ * @run main/othervm -XX:-TieredCompilation -XX:+IgnoreUnrecognizedVMOptions -XX:-BackgroundCompilation -XX:+UseCountedLoopSafepoints -XX:LoopStripMiningIter=1000 BackedgeNodeWithOutOfLoopControl
+ *
+ */
+
+public class BackedgeNodeWithOutOfLoopControl {
+
+  public static void accessArrayVariables(int[] array, int i) {
+    for (int j = 0; j < 100000; j++) {
+      array[i-2]++;
+      array[i-1]++;
+    }
+  }
+
+  public void test() {
+    int[] array = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
+    for (int i = 0; i < 2000; i++) {
+        accessArrayVariables(array, 5);
+    }
+  }
+
+  public static void main(String [] args) {
+      BackedgeNodeWithOutOfLoopControl aa = new BackedgeNodeWithOutOfLoopControl();
+      aa.test();
+  }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/compiler/loopstripmining/LimitSharedwithOutOfLoopTest.java	Tue Jan 30 16:41:40 2018 +0100
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 2018, Red Hat, Inc. All rights reserved.
+ * 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 8193597
+ * @summary limit test is shared with out of loop if
+ *
+ * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:-BackgroundCompilation -XX:LoopUnrollLimit=0 -XX:+UseCountedLoopSafepoints -XX:LoopStripMiningIter=1000 LimitSharedwithOutOfLoopTest
+ *
+ */
+
+public class LimitSharedwithOutOfLoopTest {
+    public static void main(String[] args) {
+        boolean[] array1 = new boolean[2001];
+        boolean[] array2 = new boolean[2001];
+        boolean[] array3 = new boolean[2001];
+        array2[1000] = true;
+        array3[2000] = true;
+        for (int i = 0; i < 20_000; i++) {
+            if (test(2000, array1)) {
+                throw new RuntimeException("bad return");
+            }
+            if (!test(2000, array2)) {
+                throw new RuntimeException("bad return");
+            }
+            if (test(2000, array3)) {
+                throw new RuntimeException("bad return");
+            }
+        }
+    }
+
+    static volatile boolean barrier;
+
+    private static boolean test(int limit, boolean[] array) {
+        for (int i = 0; i < limit;) {
+            i++;
+            if (array[i]) {
+                // Same test as end of loop test. When loop is strip
+                // mined, this must not become the end of inner loop
+                // test.
+                if (i < limit) {
+                    return true;
+                }
+                return false;
+            }
+            barrier = true;
+        }
+        return false;
+    }
+}
--- a/test/hotspot/jtreg/compiler/tiered/LevelTransitionTest.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/hotspot/jtreg/compiler/tiered/LevelTransitionTest.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -29,6 +29,7 @@
  *          java.management
  *
  * @build sun.hotspot.WhiteBox
+ *        compiler.tiered.LevelTransitionTest
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm/timeout=240 -Xmixed -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/gc/g1/TestConcurrentSystemGC.java	Tue Jan 30 16:41:40 2018 +0100
@@ -0,0 +1,54 @@
+/*
+ * 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 TestConcurrentSystemGC
+ * @bug 8195158
+ * @summary Test that a System.gc() with -XX:+ExplicitGCInvokesConcurrent
+ *          is *not* upgraded to STW full GC
+ * @key gc
+ * @requires vm.gc.G1
+ * @library /test/lib
+ * @modules java.base/jdk.internal.misc
+ *          java.management
+ * @run main/othervm -XX:+UseG1GC -XX:+ExplicitGCInvokesConcurrent -Xmx8m -Xms8m -XX:G1HeapRegionSize=1m TestConcurrentSystemGC
+ */
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class TestConcurrentSystemGC {
+    public static List<char[]> memory;
+    public static void main(String[] args) throws Exception {
+        memory = new ArrayList<>();
+        try {
+            while (true) {
+                memory.add(new char[1024 * 128]);
+                System.gc(); // should not trigger any assertions
+            }
+        } catch (OutOfMemoryError e) {
+            memory = null;
+            System.gc();
+        }
+    }
+}
--- a/test/hotspot/jtreg/runtime/6981737/Test6981737.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/hotspot/jtreg/runtime/6981737/Test6981737.java	Tue Jan 30 16:41:40 2018 +0100
@@ -41,8 +41,6 @@
         int major_version = Runtime.version().major();
         String vm_spec_version_re = Integer.toString(major_version);
 
-        verifyProperty("java.vendor", vendor_re);
-        verifyProperty("java.vm.vendor", vendor_re);
         verifyProperty("java.vm.specification.vendor", vendor_re);
         verifyProperty("java.specification.vendor", vendor_re);
         verifyProperty("java.vm.specification.version", vm_spec_version_re);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/runtime/RedefineTests/RedefineInterfaceCall.java	Tue Jan 30 16:41:40 2018 +0100
@@ -0,0 +1,83 @@
+/*
+ * 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.
+ *
+ * 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 8174962
+ * @summary Redefine class with interface method call
+ * @library /test/lib
+ * @modules java.base/jdk.internal.misc
+ * @modules java.compiler
+ *          java.instrument
+ *          jdk.jartool/sun.tools.jar
+ * @run main RedefineClassHelper
+ * @run main/othervm -javaagent:redefineagent.jar -Xlog:redefine+class+update*=trace RedefineInterfaceCall
+ */
+
+import static jdk.test.lib.Asserts.assertEquals;
+
+interface I1 { default int m() { return 0; } }
+interface I2 extends I1 {}
+
+public class RedefineInterfaceCall {
+
+    public static class C implements I2 {
+        public int test(I2 i) {
+            return i.m(); // invokeinterface cpCacheEntry
+        }
+    }
+
+    static String newI1 =
+      "interface I1 { default int m() { return 1; } }";
+
+    static String newC =
+        "public class RedefineInterfaceCall$C implements I2 { " +
+        "  public int test(I2 i) { " +
+        "    return i.m(); " +
+        "  } " +
+        "} ";
+
+    static int test(I2 i) {
+        return i.m(); // invokeinterface cpCacheEntry
+    }
+
+    public static void main(String[] args) throws Exception {
+        C c = new C();
+
+        assertEquals(test(c),   0);
+        assertEquals(c.test(c), 0);
+
+        RedefineClassHelper.redefineClass(C.class, newC);
+
+        assertEquals(c.test(c), 0);
+
+        RedefineClassHelper.redefineClass(I1.class, newI1);
+
+        assertEquals(test(c),   1);
+        assertEquals(c.test(c), 1);
+
+        RedefineClassHelper.redefineClass(C.class, newC);
+
+        assertEquals(c.test(c), 1);
+    }
+}
--- a/test/hotspot/jtreg/runtime/SharedArchiveFile/serviceability/transformRelatedClasses/TransformTestCommon.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/hotspot/jtreg/runtime/SharedArchiveFile/serviceability/transformRelatedClasses/TransformTestCommon.java	Tue Jan 30 16:41:40 2018 +0100
@@ -63,8 +63,8 @@
                                             String parent, String child)
         throws Exception {
 
-        String parentSharedMatch = parent + " source: shared objects file";
-        String childSharedMatch =  child +  " source: shared objects file";
+        String parentSharedMatch = " " + parent + " source: shared objects file";
+        String childSharedMatch =  " " + child +  " source: shared objects file";
 
         if (entry.isParentExpectedShared)
             out.shouldContain(parentSharedMatch);
--- a/test/hotspot/jtreg/runtime/appcds/TestCommon.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/hotspot/jtreg/runtime/appcds/TestCommon.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -23,6 +23,7 @@
  */
 
 import jdk.test.lib.Utils;
+import jdk.test.lib.BuildHelper;
 import jdk.test.lib.JDKToolFinder;
 import jdk.test.lib.Platform;
 import jdk.test.lib.cds.CDSOptions;
@@ -107,6 +108,19 @@
         return createArchive(opts);
     }
 
+    // If you use -XX:+UseAppCDS or -XX:-UseAppCDS in your JVM command-line, call this method
+    // to wrap the arguments. On commercial builds, -XX:+UnlockCommercialFeatures will be
+    // prepended to the command-line. See JDK-8193664.
+    public static String[] makeCommandLineForAppCDS(String... args) throws Exception {
+        if (BuildHelper.isCommercialBuild()) {
+            String[] newArgs = new String[args.length + 1];
+            newArgs[0] = "-XX:+UnlockCommercialFeatures";
+            System.arraycopy(args, 0, newArgs, 1, args.length);
+            return newArgs;
+        } else {
+            return args;
+        }
+    }
 
     // Create AppCDS archive using appcds options
     public static OutputAnalyzer createArchive(AppCDSOptions opts)
@@ -139,7 +153,7 @@
         for (String s : opts.suffix) cmd.add(s);
 
         String[] cmdLine = cmd.toArray(new String[cmd.size()]);
-        ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(true, cmdLine);
+        ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(true, makeCommandLineForAppCDS(cmdLine));
         return executeAndLog(pb, "dump");
     }
 
@@ -166,7 +180,7 @@
         for (String s : opts.suffix) cmd.add(s);
 
         String[] cmdLine = cmd.toArray(new String[cmd.size()]);
-        ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(true, cmdLine);
+        ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(true, makeCommandLineForAppCDS(cmdLine));
         return executeAndLog(pb, "exec");
     }
 
--- a/test/hotspot/jtreg/runtime/appcds/UseAppCDS.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/hotspot/jtreg/runtime/appcds/UseAppCDS.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -121,14 +121,14 @@
 
     static void dumpLoadedClasses(boolean useAppCDS, String[] expectedClasses,
                                   String[] unexpectedClasses) throws Exception {
-        ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
-            true,
+        ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(true,
+          TestCommon.makeCommandLineForAppCDS(
             "-XX:DumpLoadedClassList=" + CLASSLIST_FILE,
             "-cp",
             TESTJAR,
             useAppCDS ? "-XX:+UseAppCDS" : "-XX:-UseAppCDS",
             TESTNAME,
-            TEST_OUT);
+            TEST_OUT));
 
         OutputAnalyzer output = TestCommon.executeAndLog(pb, "dump-loaded-classes")
             .shouldHaveExitValue(0).shouldContain(TEST_OUT);
@@ -151,8 +151,8 @@
 
     static void dumpArchive(boolean useAppCDS, String[] expectedClasses,
                             String[] unexpectedClasses) throws Exception {
-        ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
-            true,
+        ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(true,
+          TestCommon.makeCommandLineForAppCDS(
             useAppCDS ? "-XX:-UnlockDiagnosticVMOptions" :
                         "-XX:+UnlockDiagnosticVMOptions",
             "-cp",
@@ -161,7 +161,7 @@
             "-XX:SharedClassListFile=" + CLASSLIST_FILE,
             "-XX:SharedArchiveFile=" + ARCHIVE_FILE,
             "-Xlog:cds",
-            "-Xshare:dump");
+            "-Xshare:dump"));
 
         OutputAnalyzer output = TestCommon.executeAndLog(pb, "dump-archive")
             .shouldHaveExitValue(0);
@@ -178,8 +178,8 @@
 
     static void useArchive(boolean useAppCDS, String[] expectedClasses,
                            String[] unexpectedClasses) throws Exception {
-        ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
-            true,
+        ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(true,
+          TestCommon.makeCommandLineForAppCDS(
             useAppCDS ? "-XX:-UnlockDiagnosticVMOptions" :
                         "-XX:+UnlockDiagnosticVMOptions",
             "-cp",
@@ -189,7 +189,7 @@
             "-verbose:class",
             "-Xshare:on",
             TESTNAME,
-            TEST_OUT );
+            TEST_OUT));
 
         OutputAnalyzer output = TestCommon.executeAndLog(pb, "use-archive");
         if (CDSTestUtils.isUnableToMap(output))
--- a/test/hotspot/jtreg/runtime/appcds/sharedStrings/SharedStringsBasic.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/hotspot/jtreg/runtime/appcds/sharedStrings/SharedStringsBasic.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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,6 +50,7 @@
             TestCommon.getSourceFile("SharedStringsBasic.txt").toString();
 
         ProcessBuilder dumpPb = ProcessTools.createJavaProcessBuilder(true,
+          TestCommon.makeCommandLineForAppCDS(
             "-XX:+UseAppCDS",
             "-XX:+UseCompressedOops",
             "-XX:+UseG1GC",
@@ -57,13 +58,14 @@
             "-XX:SharedArchiveConfigFile=" + sharedArchiveConfigFile,
             "-XX:SharedArchiveFile=./SharedStringsBasic.jsa",
             "-Xshare:dump",
-            "-Xlog:cds,cds+hashtables");
+            "-Xlog:cds,cds+hashtables"));
 
         TestCommon.executeAndLog(dumpPb, "dump")
             .shouldContain("Shared string table stats")
             .shouldHaveExitValue(0);
 
         ProcessBuilder runPb = ProcessTools.createJavaProcessBuilder(true,
+          TestCommon.makeCommandLineForAppCDS(
             "-XX:+UseAppCDS",
             "-XX:+UseCompressedOops",
             "-XX:+UseG1GC",
@@ -71,7 +73,7 @@
             "-XX:SharedArchiveFile=./SharedStringsBasic.jsa",
             "-Xshare:auto",
             "-showversion",
-            "HelloString");
+            "HelloString"));
 
         TestCommon.executeAndLog(runPb, "run").shouldHaveExitValue(0);
     }
--- a/test/hotspot/jtreg/runtime/appcds/sharedStrings/SysDictCrash.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/hotspot/jtreg/runtime/appcds/sharedStrings/SysDictCrash.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -42,21 +42,23 @@
         // SharedBaseAddress=0 puts the archive at a very high address on solaris,
         // which provokes the crash.
         ProcessBuilder dumpPb = ProcessTools.createJavaProcessBuilder(true,
+          TestCommon.makeCommandLineForAppCDS(
             "-XX:+UseG1GC", "-XX:MaxRAMPercentage=12.5",
             "-XX:+UseAppCDS",
             "-cp", ".",
             "-XX:SharedBaseAddress=0", "-XX:SharedArchiveFile=./SysDictCrash.jsa",
             "-Xshare:dump",
-            "-showversion", "-Xlog:cds,cds+hashtables");
+            "-showversion", "-Xlog:cds,cds+hashtables"));
 
         TestCommon.checkDump(TestCommon.executeAndLog(dumpPb, "dump"));
 
         ProcessBuilder runPb = ProcessTools.createJavaProcessBuilder(true,
+          TestCommon.makeCommandLineForAppCDS(
             "-XX:+UseG1GC", "-XX:MaxRAMPercentage=12.5",
             "-XX:+UseAppCDS",
             "-XX:SharedArchiveFile=./SysDictCrash.jsa",
             "-Xshare:on",
-            "-version");
+            "-version"));
 
         TestCommon.checkExec(TestCommon.executeAndLog(runPb, "exec"));
     }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/runtime/invokedynamic/MethodHandleConstantHelper.jasm	Tue Jan 30 16:41:40 2018 +0100
@@ -0,0 +1,57 @@
+/*
+ * 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.
+ *
+ * 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 runtime/invokedynamic;
+
+super public class MethodHandleConstantHelper
+    version 51:0
+{
+
+static Field "testField":"I";
+
+static Method "testMethod":"()V"
+{
+    return;
+}
+
+public static Method "testMethodSignatureResolutionFailure":"()V"
+    stack 1 locals 1
+{
+          ldc MethodHandle REF_invokeStatic:
+                  MethodHandleConstantHelper.testMethod:
+                  "(LNotExist;)V";
+
+          return;
+}
+
+public static Method "testFieldSignatureResolutionFailure":"()V"
+    stack 1 locals 1
+{
+          ldc MethodHandle REF_getField:
+                  MethodHandleConstantHelper.testField:
+                  "LNotExist;";
+
+          return;
+}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/runtime/invokedynamic/MethodHandleConstantTest.java	Tue Jan 30 16:41:40 2018 +0100
@@ -0,0 +1,69 @@
+/*
+ * 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.
+ *
+ * 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 8188145
+ * @compile MethodHandleConstantHelper.jasm
+ * @run main runtime.invokedynamic.MethodHandleConstantTest
+ */
+package runtime.invokedynamic;
+
+import java.lang.invoke.*;
+
+public class MethodHandleConstantTest {
+    static final MethodHandles.Lookup LOOKUP = MethodHandles.lookup();
+    static final MethodType TEST_MT = MethodType.methodType(void.class);
+    static final Class<?> TEST_CLASS;
+
+    static {
+       try {
+          TEST_CLASS = Class.forName("runtime.invokedynamic.MethodHandleConstantHelper");
+       } catch (ClassNotFoundException e) {
+           throw new Error(e);
+       }
+    }
+
+    static void test(String testName, Class<? extends Throwable> expectedError) {
+        System.out.print(testName);
+        try {
+            LOOKUP.findStatic(TEST_CLASS, testName, TEST_MT).invokeExact();
+        } catch (Throwable e) {
+            if (expectedError.isInstance(e)) {
+                // expected
+            } else {
+                e.printStackTrace();
+                String msg = String.format("%s: wrong exception: %s, but %s expected",
+                                           testName, e.getClass().getName(), expectedError.getName());
+                throw new AssertionError(msg);
+            }
+        }
+        System.out.println(": PASSED");
+    }
+
+    public static void main(String[] args) throws Throwable {
+        test("testMethodSignatureResolutionFailure", NoSuchMethodError.class);
+        test("testFieldSignatureResolutionFailure",  NoSuchFieldError.class);
+    }
+}
--- a/test/hotspot/jtreg/runtime/logging/OsCpuLoggingTest.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/hotspot/jtreg/runtime/logging/OsCpuLoggingTest.java	Tue Jan 30 16:41:40 2018 +0100
@@ -40,10 +40,7 @@
 public class OsCpuLoggingTest {
 
     static void analyzeOutputForOsLog(OutputAnalyzer output) throws Exception {
-        // Aix has it's own logging
-        if (!Platform.isAix()) {
-            output.shouldContain("SafePoint Polling address");
-        }
+        output.shouldContain("SafePoint Polling address");
         output.shouldHaveExitValue(0);
     }
 
@@ -58,7 +55,10 @@
         OutputAnalyzer output = new OutputAnalyzer(pb.start());
         analyzeOutputForOsCpuLog(output);
 
-        pb = ProcessTools.createJavaProcessBuilder("-Xlog:os", "-version");
+        // PPC64 only uses polling pages when UseSIGTRAP is off.
+        pb = (Platform.isPPC() && Platform.is64bit())
+             ? ProcessTools.createJavaProcessBuilder("-Xlog:os", "-XX:-UseSIGTRAP", "-version")
+             : ProcessTools.createJavaProcessBuilder("-Xlog:os", "-version");
         output = new OutputAnalyzer(pb.start());
         analyzeOutputForOsLog(output);
     }
--- a/test/hotspot/jtreg/serviceability/sa/JhsdbThreadInfoTest.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/hotspot/jtreg/serviceability/sa/JhsdbThreadInfoTest.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -21,6 +21,11 @@
  * questions.
  */
 
+import java.util.Arrays;
+import java.util.List;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
 import jdk.test.lib.apps.LingeredApp;
 import jdk.test.lib.JDKToolLauncher;
 import jdk.test.lib.Platform;
@@ -69,7 +74,18 @@
             out.shouldMatch("   JavaThread state: _thread_.+");
 
             out.shouldNotContain("   java.lang.Thread.State: UNKNOWN");
-            out.stderrShouldBeEmpty();
+
+            // stderr should be empty except for VM warnings.
+            if (!out.getStderr().isEmpty()) {
+                List<String> lines = Arrays.asList(out.getStderr().split("(\\r\\n|\\n|\\r)"));
+                Pattern p = Pattern.compile(".*VM warning.*");
+                for (String line : lines) {
+                    Matcher m = p.matcher(line);
+                    if (!m.matches()) {
+                        throw new RuntimeException("Stderr has output other than VM warnings");
+                    }
+                }
+            }
 
             System.out.println("Test Completed");
         } catch (InterruptedException ie) {
--- a/test/hotspot/jtreg/serviceability/sa/TestJhsdbJstackLock.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/hotspot/jtreg/serviceability/sa/TestJhsdbJstackLock.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -24,7 +24,11 @@
 import java.io.IOException;
 import java.io.OutputStream;
 import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.List;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
 import jdk.test.lib.apps.LingeredApp;
 import jdk.test.lib.Asserts;
 import jdk.test.lib.JDKToolLauncher;
@@ -76,7 +80,19 @@
             out.shouldMatch("^\\s+- waiting to lock <0x[0-9a-f]+> \\(a java\\.lang\\.Class for LingeredAppWithLock\\)$");
             out.shouldMatch("^\\s+- locked <0x[0-9a-f]+> \\(a java\\.lang\\.Thread\\)$");
             out.shouldMatch("^\\s+- locked <0x[0-9a-f]+> \\(a java\\.lang\\.Class for int\\)$");
-            out.stderrShouldBeEmpty();
+
+            // stderr should be empty except for VM warnings.
+            if (!out.getStderr().isEmpty()) {
+                List<String> lines = Arrays.asList(out.getStderr().split("(\\r\\n|\\n|\\r)"));
+                Pattern p = Pattern.compile(".*VM warning.*");
+                for (String line : lines) {
+                    Matcher m = p.matcher(line);
+                    if (!m.matches()) {
+                        throw new RuntimeException("Stderr has output other than VM warnings");
+                    }
+                }
+            }
+
 
             System.out.println("Test Completed");
         } finally {
--- a/test/jaxp/javax/xml/jaxp/unittest/common/Bug6941169Test.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jaxp/javax/xml/jaxp/unittest/common/Bug6941169Test.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 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
@@ -364,6 +364,14 @@
 
     @Test
     public void testXPath_DOM_withServiceMech() {
+        /**
+         * This is in conflict with the test testXPath_DOM_withSM where the system
+         * default parser is used when the security manager is present. The test
+         * is therefore skipped when the security manager is present.
+         */
+        if (System.getSecurityManager() != null) {
+            return;
+        }
         final String XPATH_EXPRESSION = "/fooTest";
         System.out.println("Evaluate DOM Source;  Service mechnism is on by default;  It would try to use MyDOMFactoryImpl:");
         InputStream input = getClass().getResourceAsStream("Bug6941169.xml");
--- a/test/jdk/ProblemList.txt	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/ProblemList.txt	Tue Jan 30 16:41:40 2018 +0100
@@ -1,6 +1,6 @@
 ###########################################################################
 #
-# Copyright (c) 2009, 2017, 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
@@ -197,7 +197,6 @@
 com/sun/management/OperatingSystemMXBean/GetProcessCpuLoad.java 8030957 aix-all
 com/sun/management/OperatingSystemMXBean/GetSystemCpuLoad.java  8030957 aix-all
 sun/management/HotspotRuntimeMBean/GetSafepointSyncTime.java    8174734 generic-all
-sun/management/jdp/JdpOffTest.java                              8175542 generic-all
 
 ############################################################################
 
@@ -255,7 +254,8 @@
 # jdk_security
 
 sun/security/pkcs11/ec/TestKeyFactory.java                      8026976 generic-all
-sun/security/pkcs11/KeyStore/SecretKeysBasic.sh                 8186098 linux-all
+sun/security/pkcs11/Secmod/AddTrustedCert.java                  8180837 generic-all
+sun/security/pkcs11/tls/TestKeyMaterial.java                    8180837 generic-all
 
 sun/security/tools/keytool/ListKeychainStore.sh                 8156889 macosx-all
 
@@ -266,7 +266,7 @@
 
 sun/security/krb5/auto/UnboundSSL.java                          8180265 windows-all
 sun/security/provider/KeyStore/DKSTest.sh                       8180266 windows-all
-sun/security/ssl/X509KeyManager/PreferredKey.java               8176354 generic-all
+sun/security/ssl/X509KeyManager/PreferredKey.java               8190333 generic-all
 
 ############################################################################
 
@@ -351,26 +351,24 @@
 
 # svc_tools
 
-sun/tools/jcmd/TestJcmdSanity.java                              8031482 windows-all
-
 sun/tools/jstat/jstatClassloadOutput1.sh                        8173942 generic-all
 
 sun/jvmstat/monitor/MonitoredVm/MonitorVmStartTerminate.java    8057732 generic-all
 
-com/sun/tools/attach/StartManagementAgent.java                  8179700 generic-all
-
 ############################################################################
 
 # jdk_other
 
 com/sun/jndi/ldap/DeadSSLLdapTimeoutTest.java                   8169942 linux-i586,macosx-all,windows-x64
 
-javax/rmi/PortableRemoteObject/8146975/RmiIiopReturnValueTest.java 8169737 generic-all
- 
-org/omg/CORBA/OrbPropertiesTest.java			        8175177 generic-all
+com/sun/jndi/ldap/LdapTimeoutTest.java                          8151678 linux-all
 
-javax/rmi/PortableRemoteObject/ConcurrentHashMapTest.java       8080643 generic-all
+javax/rmi/PortableRemoteObject/8146975/RmiIiopReturnValueTest.java 8194663 generic-all
+ 
+org/omg/CORBA/OrbPropertiesTest.java			        8194663 generic-all
 
-javax/rmi/ssl/SSLSocketParametersTest.sh                        8162906 generic-all
+javax/rmi/PortableRemoteObject/ConcurrentHashMapTest.java       8194663 generic-all
+
+javax/rmi/ssl/SSLSocketParametersTest.sh                        8194663 generic-all
 
 ############################################################################
--- a/test/jdk/com/sun/crypto/provider/KeyAgreement/DHGenSecretKey.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/com/sun/crypto/provider/KeyAgreement/DHGenSecretKey.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2007, Oracle and/or its affiliates. All rights reserved.
+ * 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
@@ -27,6 +27,7 @@
  * @summary Verify that DHKeyAgreement can generate secret key
  * objects for AES algorithm
  * @author Valerie Peng
+ * @run main/othervm -Djdk.crypto.KeyAgreement.legacyKDF=true DHGenSecretKey
  */
 import java.security.*;
 import java.security.interfaces.*;
--- a/test/jdk/com/sun/crypto/provider/KeyAgreement/DHKeyAgreement2.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/com/sun/crypto/provider/KeyAgreement/DHKeyAgreement2.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 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
@@ -26,6 +26,7 @@
  * @bug 7146728
  * @summary DHKeyAgreement2
  * @author Jan Luehe
+ * @run main/othervm -Djdk.crypto.KeyAgreement.legacyKDF=true DHKeyAgreement2
  */
 
 import java.io.*;
--- a/test/jdk/com/sun/crypto/provider/KeyAgreement/SameDHKeyStressTest.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/com/sun/crypto/provider/KeyAgreement/SameDHKeyStressTest.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 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
@@ -26,7 +26,7 @@
  * @bug 8048819
  * @summary This test stressful verifies the assertion of "The secret keys generated
  * by all involved parties should be the same." for javax.crypto.KeyAgreement
- * @run main SameDHKeyStressTest
+ * @run main/othervm -Djdk.crypto.KeyAgreement.legacyKDF=true SameDHKeyStressTest
  */
 import java.security.AlgorithmParameterGenerator;
 import java.security.InvalidAlgorithmParameterException;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/java/awt/Color/XRenderTranslucentColorDrawTest.java	Tue Jan 30 16:41:40 2018 +0100
@@ -0,0 +1,80 @@
+/*
+ * 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      8176795
+ * @summary  Test verifies that we get proper color when we draw translucent
+ *           color over an opaque color using X Render extension in Linux.
+ * @requires (os.family == "linux")
+ * @run      main XRenderTranslucentColorDrawTest -Dsun.java2d.xrender=true
+ */
+
+import java.awt.Color;
+import java.awt.Graphics2D;
+import java.awt.GraphicsConfiguration;
+import java.awt.GraphicsDevice;
+import java.awt.GraphicsEnvironment;
+import java.awt.image.BufferedImage;
+import java.awt.image.VolatileImage;
+
+public class XRenderTranslucentColorDrawTest {
+
+    public static void main(String[] args) throws Exception {
+        GraphicsEnvironment env = GraphicsEnvironment.
+                getLocalGraphicsEnvironment();
+        GraphicsConfiguration translucentGC = null;
+        SCREENS: for (GraphicsDevice screen : env.getScreenDevices()) {
+            for (GraphicsConfiguration gc : screen.getConfigurations()) {
+                if (gc.isTranslucencyCapable()) {
+                    translucentGC = gc;
+                    break SCREENS;
+                }
+            }
+        }
+        if (translucentGC == null) {
+            throw new RuntimeException("No suitable gc found.");
+        }
+        int width = 10;
+        int height = 10;
+        VolatileImage image = translucentGC.
+                createCompatibleVolatileImage(width, height);
+        Graphics2D g = image.createGraphics();
+        // draw opaque black color
+        g.setColor(new Color(0xff000000, true));
+        g.fillRect(0, 0, width, height);
+        // draw translucent white color over opaque black color
+        g.setColor(new Color(0x80ffffff, true));
+        g.fillRect(0, 0, width, height);
+        g.dispose();
+        // Get snapshot of VolatileImage to pick color and verify the same
+        BufferedImage snapshot = image.getSnapshot();
+        int argb = snapshot.getRGB(width / 2, height / 2);
+        // we expect the resultant rgb hex value to be ff808080
+        if (!(Integer.toHexString(argb).equals("ff808080"))) {
+            throw new RuntimeException("Using X Render extension for drawing"
+                    + " translucent color is not giving expected results.");
+        }
+    }
+}
+
--- a/test/jdk/java/awt/Dialog/NestedDialogs/Modal/NestedModalDialogTest.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/awt/Dialog/NestedDialogs/Modal/NestedModalDialogTest.java	Tue Jan 30 16:41:40 2018 +0100
@@ -22,7 +22,8 @@
  */
 
 /**
- * @test 8155740
+ * @test
+ * @bug 8155740
  * @key headful
  * @summary See <rdar://problem/3429130>: Events: actionPerformed() method not
  *          called when it is button is clicked (system load related)
--- a/test/jdk/java/awt/Dialog/NestedDialogs/Modeless/NestedModelessDialogTest.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/awt/Dialog/NestedDialogs/Modeless/NestedModelessDialogTest.java	Tue Jan 30 16:41:40 2018 +0100
@@ -22,7 +22,8 @@
  */
 
 /**
- * @test 8155740
+ * @test
+ * @bug 8155740
  * @key headful
  * @summary See <rdar://problem/3429130>: Events: actionPerformed() method not
  *              called when it is button is clicked (system load related)
--- a/test/jdk/java/awt/FontClass/CreateFont/fileaccess/TestFontFile.sh	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/awt/FontClass/CreateFont/fileaccess/TestFontFile.sh	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -46,7 +46,7 @@
 # set platform-dependent variables
 OS=`uname -s`
 case "$OS" in
-  SunOS | Linux | Darwin )
+  AIX | Darwin | Linux | SunOS )
     NULL=/dev/null
     PS=":"
     FS="/"
--- a/test/jdk/java/awt/JAWT/JAWT.sh	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/awt/JAWT/JAWT.sh	Tue Jan 30 16:41:40 2018 +0100
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-# 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
@@ -62,6 +62,10 @@
 	MAKE="make"
 	LD_LIBRARY_PATH="."
     ;;
+  AIX )
+      echo "Test passed. Not supported on AIX."
+      exit 0
+    ;;
   SunOS )
     NULL=/dev/null
     PS=":"
--- a/test/jdk/java/awt/Robot/ModifierRobotKey/ModifierRobotKeyTest.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/awt/Robot/ModifierRobotKey/ModifierRobotKeyTest.java	Tue Jan 30 16:41:40 2018 +0100
@@ -36,7 +36,8 @@
 import static jdk.testlibrary.Asserts.assertTrue;
 
 /*
- * @test 8155742
+ * @test
+ * @bug 8155742
  * @key headful
  * @summary Make sure that modifier key mask is set when robot press
  *          some key with one or more modifiers.
--- a/test/jdk/java/awt/Toolkit/AutoShutdown/EventQueuePush/EventQueuePushAutoshutdown.sh	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/awt/Toolkit/AutoShutdown/EventQueuePush/EventQueuePushAutoshutdown.sh	Tue Jan 30 16:41:40 2018 +0100
@@ -1,7 +1,7 @@
 #!/bin/ksh -p
 
 #
-# 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
@@ -60,7 +60,7 @@
 # The beginning of the script proper
 OS=`uname -s`
 case "$OS" in
-   SunOS | Linux | Darwin | CYGWIN* )
+   AIX | CYGWIN* | Darwin | Linux | SunOS )
       FILESEP="/"
       ;;
 
--- a/test/jdk/java/awt/Toolkit/Headless/WrappedToolkitTest/WrappedToolkitTest.sh	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/awt/Toolkit/Headless/WrappedToolkitTest/WrappedToolkitTest.sh	Tue Jan 30 16:41:40 2018 +0100
@@ -1,7 +1,7 @@
 #!/bin/ksh -p
 
 #
-# Copyright (c) 2012, 2014, 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
@@ -59,7 +59,7 @@
 # Checking for proper OS
 OS=`uname -s`
 case "$OS" in
-   SunOS | Linux | Darwin | CYGWIN* )
+   AIX | CYGWIN* | Darwin | Linux | SunOS )
       FILESEP="/"
       ;;
     
@@ -172,7 +172,7 @@
     fi
     ;;
 
-  SunOS | Linux )
+  AIX | Linux | SunOS )
     ${TESTJAVA}/bin/java ${TESTVMOPTS} -Djava.awt.headless=true \
                          --add-opens java.desktop/sun.awt=ALL-UNNAMED \
                          --add-opens java.desktop/sun.awt.X11=ALL-UNNAMED ${CP} \
--- a/test/jdk/java/awt/TrayIcon/TrayIconMouseTest/TrayIconMouseTest.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/awt/TrayIcon/TrayIconMouseTest/TrayIconMouseTest.java	Tue Jan 30 16:41:40 2018 +0100
@@ -29,7 +29,8 @@
 import java.awt.image.BufferedImage;
 
 /*
- * @test 6384991
+ * @test
+ * @bug 6384991
  * @summary Check if ActionEvent is triggered by a TrayIcon when
  *          it is double clicked with mouse button 1 on windows
  *          or single clicked with button 3 on Mac OS X
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/java/awt/Window/WindowResizing/DoubleClickTitleBarTest.java	Tue Jan 30 16:41:40 2018 +0100
@@ -0,0 +1,138 @@
+/*
+ * 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.
+ *
+ * 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 8190192
+ * @requires os.family=="mac"
+ * @summary Double click on the title bar no longer repositions the window
+ * @run main DoubleClickTitleBarTest
+ */
+
+import javax.swing.JFrame;
+import javax.swing.SwingUtilities;
+import java.awt.Robot;
+import java.awt.Point;
+import java.awt.event.InputEvent;
+import java.awt.AWTException;
+import java.awt.event.WindowAdapter;
+import java.awt.event.WindowEvent;
+import java.awt.event.WindowStateListener;
+
+public class DoubleClickTitleBarTest {
+    private static Point position = null;
+    private static JFrame frame = null;
+    private static boolean windowMinimizedState = false, windowMaximizedState = false;
+    //offset from top left to some place on title bar
+    final private static int X_OFFSET = 100, Y_OFFSET = 7;
+
+    public static void main(String[] args) throws Exception {
+        try {
+            SwingUtilities.invokeAndWait(new Runnable() {
+                @Override
+                public void run() {
+                    doTest();
+                }
+            });
+
+            Robot robot = new Robot();
+            robot.delay(500);
+
+            SwingUtilities.invokeAndWait(new Runnable() {
+                @Override
+                public void run() {
+                    position = frame.getLocationOnScreen();
+                }
+            });
+
+            //offset from the top left
+            robot.mouseMove(position.x + X_OFFSET,
+                                position.y + Y_OFFSET);
+
+            //do resize
+            robot.mousePress(InputEvent.BUTTON1_DOWN_MASK);
+            robot.mouseMove(frame.getLocationOnScreen().x + 200,
+                                frame.getLocationOnScreen().y + 200);
+            robot.mouseRelease(InputEvent.BUTTON1_DOWN_MASK);
+            robot.delay(500);
+
+            SwingUtilities.invokeAndWait(new Runnable() {
+                @Override
+                public void run() {
+                    position = frame.getLocationOnScreen();
+                }
+            });
+
+            //after resize, do offset from top left
+            robot.mouseMove(position.x + X_OFFSET,
+                                position.y + Y_OFFSET);
+            robot.mousePress(InputEvent.BUTTON1_DOWN_MASK);
+            robot.mouseRelease(InputEvent.BUTTON1_DOWN_MASK);
+            robot.mousePress(InputEvent.BUTTON1_DOWN_MASK);
+            robot.mouseRelease(InputEvent.BUTTON1_DOWN_MASK);
+
+            //wait till maximizing the window
+            robot.delay(1000);
+
+            if(!(windowMinimizedState && windowMaximizedState)) {
+                throw new RuntimeException("Test failed:");
+            }
+        } finally {
+            if(frame != null) {
+                frame.dispose();
+            }
+        }
+    }
+
+    private static void doTest() {
+        frame = new JFrame();
+        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
+        frame.pack();
+
+        WindowStateListener listener = new WindowAdapter() {
+            public void windowStateChanged(WindowEvent evt) {
+                int oldState = evt.getOldState();
+                int newState = evt.getNewState();
+
+                if((oldState & JFrame.MAXIMIZED_BOTH) != 0 &&
+                    (newState & JFrame.MAXIMIZED_BOTH) == 0) {
+                    windowMinimizedState = true;
+                }
+                else if(windowMinimizedState &&
+                         (oldState & JFrame.MAXIMIZED_BOTH) == 0 &&
+                         (newState & JFrame.MAXIMIZED_BOTH) != 0) {
+                    windowMaximizedState = true;
+                }
+            }
+        };
+
+        frame.addWindowStateListener(listener);
+        frame.setSize(200, 200);
+        frame.setLocation(100, 100);
+        frame.setExtendedState(JFrame.MAXIMIZED_BOTH);
+        frame.setResizable(true);
+        frame.setVisible(true);
+    }
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/java/awt/image/BandedSampleModel/BandedSampleModelSizeTest.java	Tue Jan 30 16:41:40 2018 +0100
@@ -0,0 +1,139 @@
+/*
+ * 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 8194489
+ * @summary The test checks whether BandedSampleModel computes appropriate
+ *          size for allocating memory in DataBuffer.
+ * @run main BandedSampleModelSizeTest
+ */
+import java.awt.image.BandedSampleModel;
+import java.awt.image.DataBuffer;
+import java.util.Arrays;
+
+public class BandedSampleModelSizeTest {
+    // Constants
+    private static final int TEST_NUM_BANDS = 3;
+    private static final int TEST_SRC_IMG_DIM = 10;
+
+    // Required sample models
+    private static BandedSampleModel singleBankModel = null;
+    private static BandedSampleModel multiBankModel = null;
+
+    private static void initTest() {
+        int[] bandOffsets = new int[TEST_NUM_BANDS];
+        int[] bankIndices = new int[TEST_NUM_BANDS];
+
+        /*
+         * Create a BandedSampleModel to store samples of all bands in one
+         * bank of DataBuffer.
+         */
+        bandOffsets[0] = 0;
+        bandOffsets[1] = 120;
+        bandOffsets[2] = 240;
+        bankIndices[0] = 0;
+        bankIndices[1] = 0;
+        bankIndices[2] = 0;
+
+        singleBankModel = new BandedSampleModel(DataBuffer.TYPE_BYTE,
+                TEST_SRC_IMG_DIM, TEST_SRC_IMG_DIM, TEST_SRC_IMG_DIM,
+                bankIndices, bandOffsets);
+
+        /*
+         * Create a BandedSampleModel to store samples of all bands in
+         * different banks of DataBuffer.
+         */
+        bandOffsets[0] = 0;
+        bandOffsets[1] = 20;
+        bandOffsets[2] = 40;
+        bankIndices[0] = 0;
+        bankIndices[1] = 1;
+        bankIndices[2] = 2;
+
+        multiBankModel = new BandedSampleModel(DataBuffer.TYPE_BYTE,
+                TEST_SRC_IMG_DIM, TEST_SRC_IMG_DIM, TEST_SRC_IMG_DIM,
+                bankIndices, bandOffsets);
+    }
+
+    private static void testSingleBankModel() {
+        int[] srcSamples = new int[TEST_NUM_BANDS];
+        int[] resSamples = new int[TEST_NUM_BANDS];
+
+        // Create image buffer for the requried sample model
+        DataBuffer imgBuffer = singleBankModel.createDataBuffer();
+
+        // Test the sample model by setting a pixel value & inspecting the same.
+        Arrays.fill(srcSamples, 125);
+        singleBankModel.setPixel(0, 0, srcSamples, imgBuffer);
+        singleBankModel.getPixel(0, 0, resSamples, imgBuffer);
+        if (!Arrays.equals(srcSamples, resSamples)) {
+            throw new RuntimeException("Test Failed. Incorrect samples found"
+                    + " in the image");
+        }
+
+        Arrays.fill(srcSamples, 250);
+        singleBankModel.setPixel(9, 9, srcSamples, imgBuffer);
+        singleBankModel.getPixel(9, 9, resSamples, imgBuffer);
+        if (!Arrays.equals(srcSamples, resSamples)) {
+            throw new RuntimeException("Test Failed. Incorrect samples found"
+                    + " in the image");
+        }
+    }
+
+    private static void testMultiBankModel() {
+        int[] srcSamples = new int[TEST_NUM_BANDS];
+        int[] resSamples = new int[TEST_NUM_BANDS];
+
+        // Create image buffer for the required sample model
+        DataBuffer imgBuffer = multiBankModel.createDataBuffer();
+
+        // Test the sample model by setting a pixel value & inspecting the same.
+        Arrays.fill(srcSamples, 125);
+        multiBankModel.setPixel(0, 0, srcSamples, imgBuffer);
+        multiBankModel.getPixel(0, 0, resSamples, imgBuffer);
+        if (!Arrays.equals(srcSamples, resSamples)) {
+            throw new RuntimeException("Test Failed. Incorrect samples found"
+                    + " in the image");
+        }
+
+        Arrays.fill(srcSamples, 250);
+        multiBankModel.setPixel(9, 9, srcSamples, imgBuffer);
+        multiBankModel.getPixel(9, 9, resSamples, imgBuffer);
+        if (!Arrays.equals(srcSamples, resSamples)) {
+            throw new RuntimeException("Test Failed. Incorrect samples found"
+                    + " in the image");
+        }
+    }
+
+    public static void main(String args[]) {
+        // Initialize the test
+        initTest();
+
+        // Test banded sample model with single bank of data buffer
+        testSingleBankModel();
+
+        // Test banded sample model with multiple banks of data buffer
+        testMultiBankModel();
+    }
+}
--- a/test/jdk/java/io/FileInputStream/UnreferencedFISClosesFd.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/io/FileInputStream/UnreferencedFISClosesFd.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -35,6 +35,8 @@
 import java.io.FileInputStream;
 import java.io.FileNotFoundException;
 import java.io.IOException;
+import java.lang.management.ManagementFactory;
+import java.lang.management.OperatingSystemMXBean;
 import java.lang.ref.Reference;
 import java.lang.ref.ReferenceQueue;
 import java.lang.ref.WeakReference;
@@ -42,6 +44,7 @@
 import java.util.HashSet;
 import java.util.concurrent.atomic.AtomicInteger;
 
+import com.sun.management.UnixOperatingSystemMXBean;
 
 /**
  * Tests for FIS unreferenced.
@@ -136,6 +139,9 @@
 
         String name = inFile.getPath();
 
+        long fdCount0 = getFdCount();
+        System.out.printf("initial count of open file descriptors: %d%n", fdCount0);
+
         int failCount = 0;
         failCount += test(new FileInputStream(name), CleanupType.CLEANER);
 
@@ -150,6 +156,22 @@
         if (failCount > 0) {
             throw new AssertionError("Failed test count: " + failCount);
         }
+
+        // Check the final count of open file descriptors
+        long fdCount = getFdCount();
+        System.out.printf("final count of open file descriptors: %d%n", fdCount);
+        if (fdCount != fdCount0) {
+            throw new AssertionError("raw fd count wrong: expected: " + fdCount0
+                    + ", actual: " + fdCount);
+        }
+    }
+
+    // Get the count of open file descriptors, or -1 if not available
+    private static long getFdCount() {
+        OperatingSystemMXBean mxBean = ManagementFactory.getOperatingSystemMXBean();
+        return  (mxBean instanceof UnixOperatingSystemMXBean)
+                ? ((UnixOperatingSystemMXBean) mxBean).getOpenFileDescriptorCount()
+                : -1L;
     }
 
     private static int test(FileInputStream fis, CleanupType cleanType) throws Exception {
--- a/test/jdk/java/io/FileOutputStream/UnreferencedFOSClosesFd.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/io/FileOutputStream/UnreferencedFOSClosesFd.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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,15 +30,22 @@
  * the specification.
  * @run main/othervm UnreferencedFOSClosesFd
  */
-import java.io.*;
+import java.io.File;
+import java.io.FileDescriptor;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.lang.management.ManagementFactory;
+import java.lang.management.OperatingSystemMXBean;
 import java.lang.ref.Reference;
 import java.lang.ref.ReferenceQueue;
 import java.lang.ref.WeakReference;
 import java.lang.reflect.Field;
 import java.util.HashSet;
-import java.util.concurrent.atomic.AtomicBoolean;
 import java.util.concurrent.atomic.AtomicInteger;
 
+import com.sun.management.UnixOperatingSystemMXBean;
+
 public class UnreferencedFOSClosesFd {
 
     enum CleanupType {
@@ -118,12 +125,17 @@
      */
     public static void main(String argv[]) throws Exception {
 
+
+
         File inFile = new File(System.getProperty("test.dir", "."), FILE_NAME);
         inFile.createNewFile();
         inFile.deleteOnExit();
 
         String name = inFile.getPath();
 
+        long fdCount0 = getFdCount();
+        System.out.printf("initial count of open file descriptors: %d%n", fdCount0);
+
         int failCount = 0;
         failCount += test(new FileOutputStream(name), CleanupType.CLEANER);
 
@@ -138,8 +150,23 @@
         if (failCount > 0) {
             throw new AssertionError("Failed test count: " + failCount);
         }
+
+        // Check the final count of open file descriptors
+        long fdCount = getFdCount();
+        System.out.printf("final count of open file descriptors: %d%n", fdCount);
+        if (fdCount != fdCount0) {
+            throw new AssertionError("raw fd count wrong: expected: " + fdCount0
+            + ", actual: " + fdCount);
+        }
     }
 
+    // Get the count of open file descriptors, or -1 if not available
+    private static long getFdCount() {
+        OperatingSystemMXBean mxBean = ManagementFactory.getOperatingSystemMXBean();
+        return  (mxBean instanceof UnixOperatingSystemMXBean)
+                ? ((UnixOperatingSystemMXBean) mxBean).getOpenFileDescriptorCount()
+                : -1L;
+    }
 
     private static int test(FileOutputStream fos, CleanupType cleanType) throws Exception {
 
--- a/test/jdk/java/io/RandomAccessFile/UnreferencedRAFClosesFd.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/io/RandomAccessFile/UnreferencedRAFClosesFd.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -23,9 +23,10 @@
 
 import java.io.File;
 import java.io.FileDescriptor;
-import java.io.FileOutputStream;
 import java.io.FileNotFoundException;
 import java.io.RandomAccessFile;
+import java.lang.management.ManagementFactory;
+import java.lang.management.OperatingSystemMXBean;
 import java.lang.ref.Cleaner;
 import java.lang.ref.Reference;
 import java.lang.ref.ReferenceQueue;
@@ -33,6 +34,8 @@
 import java.lang.reflect.Field;
 import java.util.HashSet;
 
+import com.sun.management.UnixOperatingSystemMXBean;
+
 /**
  * @test
  * @bug 8080225
@@ -51,6 +54,9 @@
         inFile.createNewFile();
         inFile.deleteOnExit();
 
+        long fdCount0 = getFdCount();
+        System.out.printf("initial count of open file descriptors: %d%n", fdCount0);
+
         String name = inFile.getPath();
         RandomAccessFile raf;
         try {
@@ -92,5 +98,22 @@
         Reference.reachabilityFence(fd);
         Reference.reachabilityFence(raf);
         Reference.reachabilityFence(pending);
+
+        // Check the final count of open file descriptors
+        long fdCount = getFdCount();
+        System.out.printf("final count of open file descriptors: %d%n", fdCount);
+        if (fdCount != fdCount0) {
+            throw new AssertionError("raw fd count wrong: expected: " + fdCount0
+                    + ", actual: " + fdCount);
+        }
+    }
+
+
+    // Get the count of open file descriptors, or -1 if not available
+    private static long getFdCount() {
+        OperatingSystemMXBean mxBean = ManagementFactory.getOperatingSystemMXBean();
+        return  (mxBean instanceof UnixOperatingSystemMXBean)
+                ? ((UnixOperatingSystemMXBean) mxBean).getOpenFileDescriptorCount()
+                : -1L;
     }
 }
--- a/test/jdk/java/lang/Runtime/Version/Basic.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/lang/Runtime/Version/Basic.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -24,7 +24,7 @@
 /*
  * @test
  * @summary Unit test for java.lang.Runtime.Version
- * @bug 8072379 8144062 8161236 8160956
+ * @bug 8072379 8144062 8161236 8160956 8194879
  */
 
 import java.lang.Runtime.Version;
@@ -115,6 +115,7 @@
         tryCatch("9-pre+-opt", IAE);
         tryCatch("1.4142+-",   IAE);
         tryCatch("2.9979+-%",  IAE);
+        tryCatch("10--ea",     IAE);
 
         //// Test for Runtime.version()
         testVersion();
--- a/test/jdk/java/lang/StackWalker/SecurityExceptions.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/lang/StackWalker/SecurityExceptions.java	Tue Jan 30 16:41:40 2018 +0100
@@ -22,7 +22,8 @@
  */
 
 /*
- * @test 8020968
+ * @test
+ * @bug 8020968
  * @summary Test security permission check
  * @run main/othervm/java.security.policy=noperms.policy SecurityExceptions true
  * @run main/othervm/java.security.policy=stackwalk.policy SecurityExceptions false
--- a/test/jdk/java/lang/System/LoggerFinder/internal/SystemLoggerInPlatformLoader/SystemLoggerInPlatformLoader.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/lang/System/LoggerFinder/internal/SystemLoggerInPlatformLoader/SystemLoggerInPlatformLoader.java	Tue Jan 30 16:41:40 2018 +0100
@@ -31,7 +31,8 @@
 import java.lang.reflect.Method;
 
 /*
- * @test 8163162
+ * @test
+ * @bug 8163162
  * @summary Checks that LazyLoggers are returned for System.Logger instances
  *          created by modules in the platform class loader.
  * @modules java.base/java.lang:open
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/java/lang/invoke/FilterArgumentsTest.java	Tue Jan 30 16:41:40 2018 +0100
@@ -0,0 +1,132 @@
+/*
+ * 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 8194554
+ * @run testng/othervm test.java.lang.invoke.FilterArgumentsTest
+ */
+
+package test.java.lang.invoke;
+
+import java.lang.invoke.MethodHandle;
+import java.lang.invoke.MethodHandles;
+import java.util.ArrayList;
+import java.util.List;
+
+import static java.lang.invoke.MethodHandles.*;
+import static java.lang.invoke.MethodType.methodType;
+
+import org.testng.annotations.*;
+import static org.testng.Assert.*;
+
+public class FilterArgumentsTest {
+
+    @Test
+    public static void testFilterA_B_C() throws Throwable {
+        FilterTest test = new FilterTest(
+            filterArguments(MH_TEST, 0, MH_FILTER_A, MH_FILTER_B, MH_FILTER_C));
+        test.run(List.of("A", "B", "C"));
+    }
+
+    @Test
+    public static void testFilterA_B() throws Throwable {
+        FilterTest test = new FilterTest(
+            filterArguments(MH_TEST, 0, MH_FILTER_A, MH_FILTER_B));
+        test.run(List.of("A", "B"));
+    }
+
+    @Test
+    public static void testFilterB_C() throws Throwable {
+        FilterTest test = new FilterTest(
+            filterArguments(MH_TEST, 1, MH_FILTER_B, MH_FILTER_C));
+        test.run(List.of("B", "C"));
+    }
+
+    @Test
+    public static void testFilterB() throws Throwable {
+        FilterTest test = new FilterTest(filterArguments(MH_TEST, 1, MH_FILTER_B));
+        test.run(List.of("B"));
+    }
+
+    @Test
+    public static void testFilterC() throws Throwable {
+        FilterTest test = new FilterTest(filterArguments(MH_TEST, 2, MH_FILTER_C));
+        test.run(List.of("C"));
+    }
+
+    static class FilterTest {
+        static List<String> filters = new ArrayList<>();
+
+        final MethodHandle mh;
+        FilterTest(MethodHandle mh) {
+            this.mh = mh;
+        }
+
+        void run(List<String> expected) throws Throwable {
+            filters.clear();
+            assertEquals("x-0-z", (String)mh.invokeExact("x", 0, 'z'));
+            assertEquals(expected, filters);
+        }
+
+        static String filterA(String s) {
+            filters.add("A");
+            return s;
+        }
+
+        static int filterB(int value) {
+            filters.add("B");
+            return value;
+        }
+
+        static char filterC(char c) {
+            filters.add("C");
+            return c;
+        }
+
+        static String test(String s, int i, char c) {
+            return s + "-" + i + "-" + c;
+        }
+    }
+
+    static final MethodHandle MH_TEST;
+    static final MethodHandle MH_FILTER_A;
+    static final MethodHandle MH_FILTER_B;
+    static final MethodHandle MH_FILTER_C;
+    static final Lookup LOOKUP = MethodHandles.lookup();
+
+    static {
+        try {
+            MH_TEST = LOOKUP.findStatic(FilterTest.class, "test",
+                methodType(String.class, String.class, int.class, char.class));
+            MH_FILTER_A = LOOKUP.findStatic(FilterTest.class, "filterA",
+                methodType(String.class, String.class));
+            MH_FILTER_B = LOOKUP.findStatic(FilterTest.class, "filterB",
+                methodType(int.class, int.class));
+            MH_FILTER_C = LOOKUP.findStatic(FilterTest.class, "filterC",
+                methodType(char.class, char.class));
+        } catch (Exception e) {
+            throw new RuntimeException(e);
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/java/net/Inet6Address/serialize/Inet6AddressSerTest.java	Tue Jan 30 16:41:40 2018 +0100
@@ -0,0 +1,95 @@
+/*
+ * 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.
+ */
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.DataOutputStream;
+import java.io.IOException;
+import java.io.InvalidObjectException;
+import java.io.ObjectInputStream;
+import java.io.ObjectStreamConstants;
+import static java.io.ObjectStreamConstants.STREAM_MAGIC;
+import static java.io.ObjectStreamConstants.TC_CLASSDESC;
+import static java.io.ObjectStreamConstants.TC_ENDBLOCKDATA;
+import static java.io.ObjectStreamConstants.TC_NULL;
+import static java.io.ObjectStreamConstants.TC_OBJECT;
+import java.net.Inet6Address;
+/**
+ * @test
+ * @bug 8194676
+ * @summary NullPointerException is thrown if ipaddress is not set.
+ * @run main Inet6AddressSerTest
+ */
+public class Inet6AddressSerTest implements ObjectStreamConstants {
+
+    static class PayloadTest {
+
+        private static byte[] serialize(String className) throws IOException {
+            try (ByteArrayOutputStream baos = new ByteArrayOutputStream();
+                    DataOutputStream dos = new DataOutputStream(baos)) {
+                // stream headers
+                dos.writeShort(STREAM_MAGIC);
+                dos.writeShort(5); // version
+
+                // Inet6Address
+                dos.writeByte(TC_OBJECT);
+                dos.writeByte(TC_CLASSDESC);
+                dos.writeUTF(className);
+                dos.writeLong(6880410070516793377L);
+                dos.writeByte(2);
+                dos.writeShort(0);
+                dos.writeByte(TC_ENDBLOCKDATA);
+                dos.writeByte(TC_NULL);
+                return baos.toByteArray();
+            }
+        }
+
+        private static Object deserialize(final byte[] buffer)
+                throws IOException, ClassNotFoundException {
+            try (ObjectInputStream ois = new ObjectInputStream(new ByteArrayInputStream(buffer))) {
+                return ois.readObject();
+            }
+        }
+
+        void test(String className) throws IOException, ClassNotFoundException {
+            deserialize(serialize(className));
+        }
+    }
+
+    public static void main(String[] args) throws IOException, ClassNotFoundException {
+        try {
+            new PayloadTest().test(Inet6Address.class.getName());
+            throw new RuntimeException("Expected exception not raised");
+        } catch (InvalidObjectException ioe) {
+            if (ioe.getMessage().contains("invalid address length")) {
+                System.out.println(String.format("Got expected exception: %s", ioe));
+            } else {
+                throw new RuntimeException("Expected exception not raised");
+            }
+        } catch (RuntimeException re) {
+            throw new RuntimeException("Expected exception not raised");
+        }
+    }
+}
--- a/test/jdk/java/net/httpclient/HeadersTest1.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/net/httpclient/HeadersTest1.java	Tue Jan 30 16:41:40 2018 +0100
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug 8153142
+ * @bug 8153142 8195138
  * @modules jdk.incubator.httpclient
  *          jdk.httpserver
  * @run testng/othervm HeadersTest1
@@ -113,8 +113,16 @@
             }
 
             // toString
-            hd.toString().toLowerCase().contains("content-length");
-            hd.toString().toLowerCase().contains("x-foo-response");
+            assertTrue(hd.toString().toLowerCase().contains("content-length"));
+            assertTrue(hd.toString().toLowerCase().contains("x-foo-response"));
+            assertTrue(hd.toString().toLowerCase().contains("x-multi-line-response"));
+
+            // multi-line
+            List<String> multiline = hd.allValues("x-multi-line-response");
+            assertTrue(multiline.get(0).startsWith("Custom "));
+            assertTrue(multiline.get(0).contains(" foo=\"bar\""));
+            assertTrue(multiline.get(0).contains(" bar=\"foo\""));
+            assertTrue(multiline.get(0).contains(" foobar=\"barfoo\""));
         } finally {
             server.stop(0);
             e.shutdownNow();
@@ -138,6 +146,9 @@
             Headers h = he.getResponseHeaders();
             h.add("X-Foo-Response", "resp1");
             h.add("X-Foo-Response", "resp2");
+            h.add("X-multi-line-response", "Custom foo=\"bar\","
+                    + "\r\n    bar=\"foo\","
+                    + "\r\n    foobar=\"barfoo\"");
             he.sendResponseHeaders(200, RESPONSE.length());
             OutputStream os = he.getResponseBody();
             os.write(RESPONSE.getBytes(US_ASCII));
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/java/net/httpclient/http2/ImplicitPushCancel.java	Tue Jan 30 16:41:40 2018 +0100
@@ -0,0 +1,176 @@
+/*
+ * 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
+ * @library /lib/testlibrary server
+ * @build jdk.testlibrary.SimpleSSLContext
+ * @modules java.base/sun.net.www.http
+ *          jdk.incubator.httpclient/jdk.incubator.http.internal.common
+ *          jdk.incubator.httpclient/jdk.incubator.http.internal.frame
+ *          jdk.incubator.httpclient/jdk.incubator.http.internal.hpack
+ * @run testng/othervm -Djdk.internal.httpclient.debug=true -Djdk.httpclient.HttpClient.log=errors,requests,responses,trace ImplicitPushCancel
+ */
+
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.net.URI;
+import java.util.Map;
+import java.util.Objects;
+import java.util.Optional;
+import jdk.incubator.http.HttpClient;
+import jdk.incubator.http.HttpRequest;
+import jdk.incubator.http.HttpResponse;
+import jdk.incubator.http.HttpResponse.BodyHandler;
+import jdk.incubator.http.MultiMapResult;
+import jdk.incubator.http.internal.common.HttpHeadersImpl;
+import org.testng.annotations.AfterTest;
+import org.testng.annotations.BeforeTest;
+import org.testng.annotations.Test;
+import static java.nio.charset.StandardCharsets.UTF_8;
+import static org.testng.Assert.assertEquals;
+
+public class ImplicitPushCancel {
+
+    static Map<String,String> PUSH_PROMISES = Map.of(
+            "/x/y/z/1", "the first push promise body",
+            "/x/y/z/2", "the second push promise body",
+            "/x/y/z/3", "the third push promise body",
+            "/x/y/z/4", "the fourth push promise body",
+            "/x/y/z/5", "the fifth push promise body",
+            "/x/y/z/6", "the sixth push promise body",
+            "/x/y/z/7", "the seventh push promise body",
+            "/x/y/z/8", "the eight push promise body",
+            "/x/y/z/9", "the ninth push promise body"
+    );
+    static final String MAIN_RESPONSE_BODY = "the main response body";
+
+    Http2TestServer server;
+    URI uri;
+
+    @BeforeTest
+    public void setup() throws Exception {
+        server = new Http2TestServer(false, 0);
+        Http2Handler handler = new ServerPushHandler(MAIN_RESPONSE_BODY,
+                                                     PUSH_PROMISES);
+        server.addHandler(handler, "/");
+        server.start();
+        int port = server.getAddress().getPort();
+        System.err.println("Server listening on port " + port);
+        uri = new URI("http://127.0.0.1:" + port + "/foo/a/b/c");
+    }
+
+    @AfterTest
+    public void teardown() {
+        server.stop();
+    }
+
+    static final <T> HttpResponse<T> assert200ResponseCode(HttpResponse<T> response) {
+        assertEquals(response.statusCode(), 200);
+        return response;
+    }
+
+    /*
+     * With a handler not capable of accepting push promises, then all push
+     * promises should be rejected / cancelled, without interfering with the
+     * main response.
+     */
+    @Test
+    public void test() throws Exception {
+        HttpClient client = HttpClient.newHttpClient();
+
+        client.sendAsync(HttpRequest.newBuilder(uri).build(), BodyHandler.asString())
+                .thenApply(ImplicitPushCancel::assert200ResponseCode)
+                .thenApply(HttpResponse::body)
+                .thenAccept(body -> body.equals(MAIN_RESPONSE_BODY))
+                .join();
+
+        MultiMapResult<String> map = client.sendAsync(
+                HttpRequest.newBuilder(uri).build(),
+                HttpResponse.MultiSubscriber.asMap(
+                       (req) -> Optional.of(HttpResponse.BodyHandler.asString()))
+                ).join();
+
+        map.entrySet().stream().forEach(e -> System.out.println(e.getKey() + ":" + e.getValue().join().body()));
+
+        map.entrySet().stream().forEach(entry -> {
+            HttpRequest request = entry.getKey();
+            HttpResponse<String> response = entry.getValue().join();
+            assertEquals(response.statusCode(), 200);
+            if (PUSH_PROMISES.containsKey(request.uri().getPath())) {
+                assertEquals(response.body(), PUSH_PROMISES.get(request.uri().getPath()));
+            } else {
+                assertEquals(response.body(), MAIN_RESPONSE_BODY);
+            }
+
+        } );
+    }
+
+    // --- server push handler ---
+    static class ServerPushHandler implements Http2Handler {
+
+        private final String mainResponseBody;
+        private final Map<String,String> promises;
+
+        public ServerPushHandler(String mainResponseBody,
+                                 Map<String,String> promises)
+            throws Exception
+        {
+            Objects.requireNonNull(promises);
+            this.mainResponseBody = mainResponseBody;
+            this.promises = promises;
+        }
+
+        public void handle(Http2TestExchange exchange) throws IOException {
+            System.err.println("Server: handle " + exchange);
+            try (InputStream is = exchange.getRequestBody()) {
+                is.readAllBytes();
+            }
+
+            if (exchange.serverPushAllowed()) {
+                pushPromises(exchange);
+            }
+
+            // response data for the main response
+            try (OutputStream os = exchange.getResponseBody()) {
+                byte[] bytes = mainResponseBody.getBytes(UTF_8);
+                exchange.sendResponseHeaders(200, bytes.length);
+                os.write(bytes);
+            }
+        }
+
+        private void pushPromises(Http2TestExchange exchange) throws IOException {
+            URI requestURI = exchange.getRequestURI();
+            for (Map.Entry<String,String> promise : promises.entrySet()) {
+                URI uri = requestURI.resolve(promise.getKey());
+                InputStream is = new ByteArrayInputStream(promise.getValue().getBytes(UTF_8));
+                HttpHeadersImpl headers = new HttpHeadersImpl();
+                exchange.serverPush(uri, headers, is);
+            }
+            System.err.println("Server: All pushes sent");
+        }
+    }
+}
+
--- a/test/jdk/java/net/httpclient/http2/server/Http2TestServerConnection.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/net/httpclient/http2/server/Http2TestServerConnection.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -643,11 +643,21 @@
                             // This should mean depending on what the
                             // handler is doing: either an EOF on read
                             // or an IOException if writing the response.
-                            q.orderlyClose();
-                            BodyOutputStream oq = outStreams.get(stream);
-                            if (oq != null)
-                                oq.closeInternal();
-
+                            if (q != null) {
+                                q.orderlyClose();
+                                BodyOutputStream oq = outStreams.get(stream);
+                                if (oq != null)
+                                    oq.closeInternal();
+                            } else if (pushStreams.contains(stream)) {
+                                // we could interrupt the pushStream's output
+                                // but the continuation, even after a reset
+                                // should be handle gracefully by the client
+                                // anyway.
+                            } else {
+                                System.err.println("TestServer: Unexpected frame on: " + stream);
+                                System.err.println(frame);
+                                throw new IOException("Unexpected frame");
+                            }
                         } else {
                             q.put(frame);
                         }
--- a/test/jdk/java/net/httpclient/whitebox/Http1HeaderParserTestDriver.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/net/httpclient/whitebox/Http1HeaderParserTestDriver.java	Tue Jan 30 16:41:40 2018 +0100
@@ -23,6 +23,7 @@
 
 /*
  * @test
+ * @bug 8195138
  * @modules jdk.incubator.httpclient
  * @run testng jdk.incubator.httpclient/jdk.incubator.http.Http1HeaderParserTest
  */
--- a/test/jdk/java/net/httpclient/whitebox/jdk.incubator.httpclient/jdk/incubator/http/Http1HeaderParserTest.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/net/httpclient/whitebox/jdk.incubator.httpclient/jdk/incubator/http/Http1HeaderParserTest.java	Tue Jan 30 16:41:40 2018 +0100
@@ -175,8 +175,15 @@
               " \t \t charset=UTF-8\r\n" +          // mix of preceding SP and HT
               "Connection: keep-alive\r\n\r\n" +
               "XXYYZZAABBCCDDEEFFGGHHII",
+
+              "HTTP/1.1 401 Unauthorized\r\n" +
+              "WWW-Authenticate: Digest realm=\"wally land\","
+                      +"$NEWLINE    domain=/,"
+                      +"$NEWLINE nonce=\"2B7F3A2B\","
+                      +"$NEWLINE\tqop=\"auth\"\r\n\r\n",
+
            };
-        for (String newLineChar : new String[] { "\n", "\r" }) {
+        for (String newLineChar : new String[] { "\n", "\r", "\r\n" }) {
             for (String template : foldingTemplate)
                 responses.add(template.replace("$NEWLINE", newLineChar));
         }
@@ -331,7 +338,7 @@
                     assertEquals(values.size(), otherValues.size(),
                                  format("%s. Expected list size %d, actual size %s",
                                         msg, values.size(), otherValues.size()));
-                    if (!values.containsAll(otherValues) && otherValues.containsAll(values))
+                    if (!(values.containsAll(otherValues) && otherValues.containsAll(values)))
                         assertTrue(false, format("Lists are unequal [%s] [%s]", values, otherValues));
                     break;
                 }
--- a/test/jdk/java/rmi/testlibrary/RMID.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/rmi/testlibrary/RMID.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -44,11 +44,12 @@
     private static final long TIMEOUT_DESTROY_MS  = 10_000L;
     private static final long STARTTIME_MS        = 15_000L;
     private static final long POLLTIME_MS         = 100L;
+    private static final long TIMEOUT_BASE        = 240_000L;
 
     // when restart rmid, it may take more time than usual because of
     // "port in use" by a possible interloper (check JDK-8168975),
-    // so need to set a longer timeout for restart.
-    private static long restartTimeout;
+    // so need to set a longer timeout than STARTTIME_MS for restart.
+    private static final long RESTART_TIMEOUT = (long)(TIMEOUT_BASE * 0.9);
     // Same reason to inheritedChannel in RMIDSelectorProvider.
     // Put it here rather than in RMIDSelectorProvider to adjust
     // both timeout values together.
@@ -264,8 +265,7 @@
     {
         super(classname, options, args, out, err);
         this.port = port;
-        long waitTime = (long)(240_000 * TestLibrary.getTimeoutFactor());
-        restartTimeout = (long)(waitTime * 0.9);
+        long waitTime = (long)(TIMEOUT_BASE * TestLibrary.getTimeoutFactor());
         inheritedChannelTimeout = (long)(waitTime * 0.8);
     }
 
@@ -406,7 +406,7 @@
         options = makeOptions(port, true, true);
         args = makeArgs();
 
-        start(restartTimeout);
+        start(RESTART_TIMEOUT);
     }
 
     /**
--- a/test/jdk/java/rmi/testlibrary/TestLibrary.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/rmi/testlibrary/TestLibrary.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2015, 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
@@ -186,9 +186,7 @@
      * Maximum timeout (before multipliers are applied) is one hour.
      */
     public static long computeDeadline(long timestamp, long timeout) {
-        final long MAX_TIMEOUT_MS = 3_600_000L;
-
-        if (timeout < 0L || timeout > MAX_TIMEOUT_MS) {
+        if (timeout < 0L) {
             throw new IllegalArgumentException("timeout " + timeout + "ms out of range");
         }
 
--- a/test/jdk/java/security/cert/PKIXBuilderParameters/InvalidParameters.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/security/cert/PKIXBuilderParameters/InvalidParameters.java	Tue Jan 30 16:41:40 2018 +0100
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @test 4422738
+ * @bug 4422738
  * @compile InvalidParameters.java
  * @run main InvalidParameters
  * @summary Make sure PKIXBuilderParameters(Set) detects invalid
--- a/test/jdk/java/security/cert/PKIXParameters/InvalidParameters.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/security/cert/PKIXParameters/InvalidParameters.java	Tue Jan 30 16:41:40 2018 +0100
@@ -23,7 +23,7 @@
 
 /**
  * @test
- * @test 4422738
+ * @bug 4422738
  * @compile InvalidParameters.java
  * @run main InvalidParameters
  * @summary Make sure PKIXParameters(Set) and setTrustAnchors() detects invalid
--- a/test/jdk/java/time/test/java/time/TestLocalDate.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/time/test/java/time/TestLocalDate.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -67,6 +67,7 @@
 import java.time.LocalDate;
 import java.time.Month;
 import java.time.temporal.ChronoUnit;
+import java.time.temporal.IsoFields;
 
 import org.testng.annotations.BeforeMethod;
 import org.testng.annotations.DataProvider;
@@ -444,4 +445,40 @@
         }
     }
 
+    @DataProvider(name="quarterYearsToAdd")
+    Object[][] provider_quarterYearsToAdd() {
+        return new Object[][] {
+            {Long.valueOf(-1000000000)},
+            {Long.valueOf(-256)},
+            {Long.valueOf(-255)},
+            {Long.valueOf(-1)},
+            {Long.valueOf(0)},
+            {Long.valueOf(1)},
+            {Long.valueOf(255)},
+            {Long.valueOf(256)},
+            {Long.valueOf(1000000000)},
+        };
+    }
+
+    @Test(dataProvider="quarterYearsToAdd")
+    public void test_plus_QuarterYears(long quarterYears) {
+        LocalDate t0 = TEST_2007_07_15
+                .plus(quarterYears, IsoFields.QUARTER_YEARS);
+        LocalDate t1 = TEST_2007_07_15
+                .plus(quarterYears, ChronoUnit.MONTHS)
+                .plus(quarterYears, ChronoUnit.MONTHS)
+                .plus(quarterYears, ChronoUnit.MONTHS);
+        assertEquals(t0, t1);
+    }
+
+    @Test(dataProvider="quarterYearsToAdd")
+    public void test_minus_QuarterYears(long quarterYears) {
+        LocalDate t0 = TEST_2007_07_15
+                .minus(quarterYears, IsoFields.QUARTER_YEARS);
+        LocalDate t1 = TEST_2007_07_15
+                .minus(quarterYears, ChronoUnit.MONTHS)
+                .minus(quarterYears, ChronoUnit.MONTHS)
+                .minus(quarterYears, ChronoUnit.MONTHS);
+        assertEquals(t0, t1);
+    }
 }
--- a/test/jdk/java/util/AbstractCollection/ToString.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/AbstractCollection/ToString.java	Tue Jan 30 16:41:40 2018 +0100
@@ -29,8 +29,13 @@
  * @author Josh Bloch, Martin Buchholz
  */
 
-import java.util.*;
-import java.util.concurrent.*;
+import java.util.AbstractCollection;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.LinkedHashSet;
+import java.util.Vector;
+import java.util.concurrent.CopyOnWriteArrayList;
+import java.util.concurrent.CopyOnWriteArraySet;
 
 public class ToString {
     private static void realMain(String[] args) {
--- a/test/jdk/java/util/AbstractList/CheckForComodification.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/AbstractList/CheckForComodification.java	Tue Jan 30 16:41:40 2018 +0100
@@ -30,7 +30,9 @@
  * @ignore Bug fix temporarily removed as it uncovered other bugs (4992226)
  */
 
-import java.util.*;
+import java.util.ArrayList;
+import java.util.ConcurrentModificationException;
+import java.util.List;
 
 public class CheckForComodification {
     private static final int LENGTH = 10;
--- a/test/jdk/java/util/AbstractList/FailFastIterator.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/AbstractList/FailFastIterator.java	Tue Jan 30 16:41:40 2018 +0100
@@ -28,7 +28,10 @@
  *          *after* the set/add/remove operations were performed.
  */
 
-import java.util.*;
+import java.util.ArrayList;
+import java.util.ConcurrentModificationException;
+import java.util.List;
+import java.util.ListIterator;
 
 public class FailFastIterator {
     public static void main(String[] args) throws Exception {
--- a/test/jdk/java/util/AbstractList/HasNextAfterException.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/AbstractList/HasNextAfterException.java	Tue Jan 30 16:41:40 2018 +0100
@@ -30,7 +30,10 @@
  * @author Konstantin Kladko
  */
 
-import java.util.*;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.ListIterator;
+import java.util.NoSuchElementException;
 
 public class HasNextAfterException {
     public static void main(String[] args) {
--- a/test/jdk/java/util/AbstractMap/AbstractMapClone.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/AbstractMap/AbstractMapClone.java	Tue Jan 30 16:41:40 2018 +0100
@@ -30,7 +30,10 @@
  * @author Konstantin Kladko
  */
 
-import java.util.*;
+import java.util.AbstractMap;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Set;
 
 public class AbstractMapClone extends AbstractMap implements Cloneable {
 
--- a/test/jdk/java/util/AbstractMap/Equals.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/AbstractMap/Equals.java	Tue Jan 30 16:41:40 2018 +0100
@@ -21,7 +21,12 @@
  * questions.
  */
 
-import java.util.*;
+import java.util.HashMap;
+import java.util.Hashtable;
+import java.util.Map;
+import java.util.Set;
+import java.util.TreeMap;
+import java.util.TreeSet;
 
 /**
  * @test
--- a/test/jdk/java/util/AbstractMap/SimpleEntries.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/AbstractMap/SimpleEntries.java	Tue Jan 30 16:41:40 2018 +0100
@@ -28,9 +28,10 @@
  * @author Martin Buchholz
  */
 
-import java.util.*;
-import java.util.concurrent.*;
-import static java.util.AbstractMap.*;
+import java.util.Map;
+
+import static java.util.AbstractMap.SimpleEntry;
+import static java.util.AbstractMap.SimpleImmutableEntry;
 
 public class SimpleEntries {
     private static String k = "foo";
--- a/test/jdk/java/util/AbstractMap/ToString.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/AbstractMap/ToString.java	Tue Jan 30 16:41:40 2018 +0100
@@ -29,7 +29,8 @@
  * @author Josh Bloch
  */
 
-import java.util.*;
+import java.util.LinkedHashMap;
+import java.util.Map;
 
 public class ToString {
     public static void main(String[] args) {
--- a/test/jdk/java/util/AbstractSequentialList/AddAll.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/AbstractSequentialList/AddAll.java	Tue Jan 30 16:41:40 2018 +0100
@@ -27,7 +27,11 @@
  * @summary AddAll(int, Collection) intersperses the Collection with this List.
  */
 
-import java.util.*;
+import java.util.AbstractSequentialList;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.util.ListIterator;
 
 public class AddAll {
     public static void main(String[] args) throws Exception {
--- a/test/jdk/java/util/ArrayList/AddAll.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/ArrayList/AddAll.java	Tue Jan 30 16:41:40 2018 +0100
@@ -28,7 +28,12 @@
  * @author  Josh Bloch
  */
 
-import java.util.*;
+import java.util.ArrayList;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import java.util.Vector;
+import java.util.WeakHashMap;
 
 public class AddAll {
     public static void main(String[] args) {
--- a/test/jdk/java/util/ArrayList/Bug6533203.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/ArrayList/Bug6533203.java	Tue Jan 30 16:41:40 2018 +0100
@@ -27,7 +27,9 @@
  * @summary AbstractList.ListItr.add might corrupt iterator state if enclosing add throws
  */
 
-import java.util.*;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.ListIterator;
 
 @SuppressWarnings({"serial","unchecked"})
 public class Bug6533203 {
--- a/test/jdk/java/util/ArrayList/IteratorMicroBenchmark.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/ArrayList/IteratorMicroBenchmark.java	Tue Jan 30 16:41:40 2018 +0100
@@ -27,9 +27,12 @@
  * @run main IteratorMicroBenchmark iterations=1 size=8 warmup=0
  */
 
+import static java.util.stream.Collectors.toList;
+
 import java.lang.ref.WeakReference;
 import java.util.ArrayDeque;
 import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.Enumeration;
 import java.util.Iterator;
 import java.util.List;
@@ -165,16 +168,11 @@
     }
 
     private static Job[] filter(Pattern filter, Job[] jobs) {
-        if (filter == null) return jobs;
-        Job[] newJobs = new Job[jobs.length];
-        int n = 0;
-        for (Job job : jobs)
-            if (filter.matcher(job.name()).find())
-                newJobs[n++] = job;
-        // Arrays.copyOf not available in JDK 5
-        Job[] ret = new Job[n];
-        System.arraycopy(newJobs, 0, ret, 0, n);
-        return ret;
+        return (filter == null) ? jobs
+            : Arrays.stream(jobs)
+            .filter(job -> filter.matcher(job.name()).find())
+            .collect(toList())
+            .toArray(new Job[0]);
     }
 
     private static void deoptimize(int sum) {
--- a/test/jdk/java/util/ArrayList/RangeCheckMicroBenchmark.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/ArrayList/RangeCheckMicroBenchmark.java	Tue Jan 30 16:41:40 2018 +0100
@@ -32,9 +32,14 @@
  * @author Martin Buchholz
  */
 
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Random;
+import java.util.concurrent.CountDownLatch;
 import java.util.regex.Pattern;
-import java.util.concurrent.CountDownLatch;
+
+import static java.util.stream.Collectors.toList;
 
 public class RangeCheckMicroBenchmark {
     abstract static class Job {
@@ -133,16 +138,11 @@
     }
 
     private static Job[] filter(Pattern filter, Job[] jobs) {
-        if (filter == null) return jobs;
-        Job[] newJobs = new Job[jobs.length];
-        int n = 0;
-        for (Job job : jobs)
-            if (filter.matcher(job.name()).find())
-                newJobs[n++] = job;
-        // Arrays.copyOf not available in JDK 5
-        Job[] ret = new Job[n];
-        System.arraycopy(newJobs, 0, ret, 0, n);
-        return ret;
+        return (filter == null) ? jobs
+            : Arrays.stream(jobs)
+            .filter(job -> filter.matcher(job.name()).find())
+            .collect(toList())
+            .toArray(new Job[0]);
     }
 
     private static void deoptimize(ArrayList<Integer> list) {
--- a/test/jdk/java/util/Arrays/StreamAndSpliterator.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/Arrays/StreamAndSpliterator.java	Tue Jan 30 16:41:40 2018 +0100
@@ -22,7 +22,8 @@
  */
 
 /**
- * @test 8037857
+ * @test
+ * @bug 8037857
  * @summary tests for stream and spliterator factory methods
  * @run testng StreamAndSpliterator
  */
--- a/test/jdk/java/util/Arrays/largeMemory/ParallelPrefix.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/Arrays/largeMemory/ParallelPrefix.java	Tue Jan 30 16:41:40 2018 +0100
@@ -22,7 +22,8 @@
  */
 
 /**
- * @test 8014076 8025067
+ * @test
+ * @bug 8014076 8025067
  * @summary unit test for Arrays.ParallelPrefix().
  * @author Tristan Yan
  * @modules java.management jdk.management
--- a/test/jdk/java/util/Base64/TestBase64.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/Base64/TestBase64.java	Tue Jan 30 16:41:40 2018 +0100
@@ -22,8 +22,9 @@
  */
 
 /**
- * @test 4235519 8004212 8005394 8007298 8006295 8006315 8006530 8007379 8008925
- *       8014217 8025003 8026330 8028397 8129544 8165243
+ * @test
+ * @bug 4235519 8004212 8005394 8007298 8006295 8006315 8006530 8007379 8008925
+ *      8014217 8025003 8026330 8028397 8129544 8165243
  * @summary tests java.util.Base64
  * @library /test/lib
  * @build jdk.test.lib.RandomFactory
--- a/test/jdk/java/util/Base64/TestBase64Golden.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/Base64/TestBase64Golden.java	Tue Jan 30 16:41:40 2018 +0100
@@ -22,7 +22,8 @@
  */
 
 /*
- * @test 4235519
+ * @test
+ * @bug 4235519
  * @author Eric Wang <yiming.wang@oracle.com>
  * @summary tests java.util.Base64
  */
--- a/test/jdk/java/util/Collection/BiggernYours.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/Collection/BiggernYours.java	Tue Jan 30 16:41:40 2018 +0100
@@ -28,9 +28,27 @@
  * @author Martin Buchholz
  */
 
-import java.io.*;
-import java.util.*;
-import java.util.concurrent.*;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Map;
+import java.util.NavigableMap;
+import java.util.NavigableSet;
+import java.util.Objects;
+import java.util.Random;
+import java.util.Set;
+import java.util.TreeSet;
+import java.util.concurrent.ArrayBlockingQueue;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.ConcurrentLinkedDeque;
+import java.util.concurrent.ConcurrentLinkedQueue;
+import java.util.concurrent.ConcurrentSkipListMap;
+import java.util.concurrent.ConcurrentSkipListSet;
+import java.util.concurrent.CopyOnWriteArrayList;
+import java.util.concurrent.CopyOnWriteArraySet;
+import java.util.concurrent.LinkedBlockingDeque;
+import java.util.concurrent.LinkedBlockingQueue;
+import java.util.concurrent.LinkedTransferQueue;
+import java.util.concurrent.PriorityBlockingQueue;
 
 @SuppressWarnings("unchecked")
 public class BiggernYours {
@@ -152,7 +170,7 @@
     static int randomize(int size) { return rnd.nextInt(size + 2); }
 
     @SuppressWarnings("serial")
-    private static void realMain(String[] args) throws Throwable {
+    private static void realMain(String[] args) {
         testNavigableMaps(
             new ConcurrentSkipListMap(),
             new ConcurrentSkipListMap() {
@@ -232,7 +250,7 @@
     static void arrayEqual(Object[] x, Object[] y) {
         if (x == null ? y == null : Arrays.equals(x, y)) pass();
         else fail(Arrays.toString(x) + " not equal to " + Arrays.toString(y));}
-    public static void main(String[] args) throws Throwable {
+    public static void main(String[] args) {
         try {realMain(args);} catch (Throwable t) {unexpected(t);}
         System.out.printf("%nPassed = %d, failed = %d%n%n", passed, failed);
         if (failed > 0) throw new AssertionError("Some tests failed");}
--- a/test/jdk/java/util/Collection/HotPotatoes.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/Collection/HotPotatoes.java	Tue Jan 30 16:41:40 2018 +0100
@@ -28,9 +28,16 @@
  * @author Martin Buchholz
  */
 
-import java.lang.reflect.*;
-import java.util.*;
-import java.util.concurrent.*;
+import java.lang.reflect.Constructor;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.List;
+import java.util.PriorityQueue;
+import java.util.Vector;
+import java.util.concurrent.CopyOnWriteArrayList;
+import java.util.concurrent.PriorityBlockingQueue;
 
 @SuppressWarnings("unchecked")
 public class HotPotatoes {
--- a/test/jdk/java/util/Collection/IteratorAtEnd.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/Collection/IteratorAtEnd.java	Tue Jan 30 16:41:40 2018 +0100
@@ -28,8 +28,34 @@
  * @author Martin Buchholz
  */
 
-import java.util.*;
-import java.util.concurrent.*;
+import java.util.ArrayDeque;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Hashtable;
+import java.util.IdentityHashMap;
+import java.util.Iterator;
+import java.util.LinkedHashMap;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.ListIterator;
+import java.util.Map;
+import java.util.NoSuchElementException;
+import java.util.PriorityQueue;
+import java.util.TreeMap;
+import java.util.TreeSet;
+import java.util.Vector;
+import java.util.WeakHashMap;
+import java.util.concurrent.ArrayBlockingQueue;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.ConcurrentLinkedDeque;
+import java.util.concurrent.ConcurrentLinkedQueue;
+import java.util.concurrent.ConcurrentSkipListMap;
+import java.util.concurrent.ConcurrentSkipListSet;
+import java.util.concurrent.CopyOnWriteArrayList;
+import java.util.concurrent.CopyOnWriteArraySet;
+import java.util.concurrent.LinkedBlockingQueue;
+import java.util.concurrent.LinkedTransferQueue;
 
 @SuppressWarnings("unchecked")
 public class IteratorAtEnd {
--- a/test/jdk/java/util/Collection/IteratorMicroBenchmark.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/Collection/IteratorMicroBenchmark.java	Tue Jan 30 16:41:40 2018 +0100
@@ -28,10 +28,10 @@
  */
 
 import static java.util.stream.Collectors.summingInt;
+import static java.util.stream.Collectors.toList;
 
 import java.lang.ref.WeakReference;
 import java.util.ArrayDeque;
-import java.util.Arrays;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Collections;
@@ -205,12 +205,10 @@
     }
 
     private static List<Job> filter(Pattern filter, List<Job> jobs) {
-        if (filter == null) return jobs;
-        ArrayList<Job> newJobs = new ArrayList<>();
-        for (Job job : jobs)
-            if (filter.matcher(job.name()).find())
-                newJobs.add(job);
-        return newJobs;
+        return (filter == null) ? jobs
+            : jobs.stream()
+            .filter(job -> filter.matcher(job.name()).find())
+            .collect(toList());
     }
 
     private static void deoptimize(int sum) {
@@ -270,24 +268,24 @@
             abq.add(abq.remove());
         }
 
-        ArrayList<Job> jobs = new ArrayList<>(Arrays.asList());
+        ArrayList<Job> jobs = new ArrayList<>();
 
-        List.of(al, ad, abq,
-                new LinkedList<>(al),
-                new PriorityQueue<>(al),
-                new Vector<>(al),
-                new ConcurrentLinkedQueue<>(al),
-                new ConcurrentLinkedDeque<>(al),
-                new LinkedBlockingQueue<>(al),
-                new LinkedBlockingDeque<>(al),
-                new LinkedTransferQueue<>(al),
-                new PriorityBlockingQueue<>(al))
-            .stream()
-            .forEach(x -> {
-                         jobs.addAll(collectionJobs(x));
-                         if (x instanceof Deque)
-                             jobs.addAll(dequeJobs((Deque<Integer>)x));
-                     });
+        List.<Collection<Integer>>of(
+            al, ad, abq,
+            new LinkedList<>(al),
+            new PriorityQueue<>(al),
+            new Vector<>(al),
+            new ConcurrentLinkedQueue<>(al),
+            new ConcurrentLinkedDeque<>(al),
+            new LinkedBlockingQueue<>(al),
+            new LinkedBlockingDeque<>(al),
+            new LinkedTransferQueue<>(al),
+            new PriorityBlockingQueue<>(al)).forEach(
+                x -> {
+                    jobs.addAll(collectionJobs(x));
+                    if (x instanceof Deque)
+                        jobs.addAll(dequeJobs((Deque<Integer>)x));
+                });
 
         if (reverse) Collections.reverse(jobs);
         if (shuffle) Collections.shuffle(jobs);
--- a/test/jdk/java/util/Collection/RemoveMicroBenchmark.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/Collection/RemoveMicroBenchmark.java	Tue Jan 30 16:41:40 2018 +0100
@@ -27,6 +27,8 @@
  * @run main RemoveMicroBenchmark iterations=1 size=8 warmup=0
  */
 
+import static java.util.stream.Collectors.toList;
+
 import java.lang.ref.WeakReference;
 import java.util.ArrayDeque;
 import java.util.ArrayList;
@@ -202,12 +204,10 @@
     }
 
     private static List<Job> filter(Pattern filter, List<Job> jobs) {
-        if (filter == null) return jobs;
-        ArrayList<Job> newJobs = new ArrayList<>();
-        for (Job job : jobs)
-            if (filter.matcher(job.name()).find())
-                newJobs.add(job);
-        return newJobs;
+        return (filter == null) ? jobs
+            : jobs.stream()
+            .filter(job -> filter.matcher(job.name()).find())
+            .collect(toList());
     }
 
     private static void deoptimize(int sum) {
@@ -271,8 +271,7 @@
             new LinkedBlockingQueue<>(),
             new LinkedBlockingDeque<>(),
             new LinkedTransferQueue<>(),
-            new PriorityBlockingQueue<>())
-            .stream().forEach(
+            new PriorityBlockingQueue<>()).forEach(
                 x -> {
                     String klazz = x.getClass().getSimpleName();
                     jobs.addAll(collectionJobs(klazz, () -> x, al));
--- a/test/jdk/java/util/Collections/AddAll.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/Collections/AddAll.java	Tue Jan 30 16:41:40 2018 +0100
@@ -29,7 +29,15 @@
  * @key randomness
  */
 
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.LinkedHashSet;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Random;
 
 public class AddAll {
     static final int N = 100;
--- a/test/jdk/java/util/Collections/BigBinarySearch.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/Collections/BigBinarySearch.java	Tue Jan 30 16:41:40 2018 +0100
@@ -28,7 +28,13 @@
  * @author Martin Buchholz
  */
 
-import java.util.*;
+import java.util.AbstractList;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.RandomAccess;
 
 public class BigBinarySearch {
 
--- a/test/jdk/java/util/Collections/BinarySearchNullComparator.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/Collections/BinarySearchNullComparator.java	Tue Jan 30 16:41:40 2018 +0100
@@ -27,7 +27,9 @@
  * @summary Test Collections.binarySearch() with a null comparator
  */
 
-import java.util.*;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
 
 public class BinarySearchNullComparator {
     public static void main(String[] args) throws Exception {
--- a/test/jdk/java/util/Collections/CheckedIdentityMap.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/Collections/CheckedIdentityMap.java	Tue Jan 30 16:41:40 2018 +0100
@@ -28,14 +28,15 @@
  * @summary Checked collections with underlying maps with identity comparisons
  */
 
-import java.util.*;
-import static java.util.Collections.*;
+import org.testng.annotations.Test;
 
+import java.util.IdentityHashMap;
+import java.util.Map;
+
+import static java.util.Collections.checkedMap;
 import static org.testng.Assert.assertEquals;
 import static org.testng.Assert.assertNotEquals;
 
-import org.testng.annotations.Test;
-
 public class CheckedIdentityMap {
 
     @Test
--- a/test/jdk/java/util/Collections/CheckedListBash.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/Collections/CheckedListBash.java	Tue Jan 30 16:41:40 2018 +0100
@@ -29,7 +29,13 @@
  * @key randomness
  */
 
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+import java.util.ListIterator;
+import java.util.Random;
 
 public class CheckedListBash {
     static Random rnd = new Random();
--- a/test/jdk/java/util/Collections/CheckedMapBash.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/Collections/CheckedMapBash.java	Tue Jan 30 16:41:40 2018 +0100
@@ -30,10 +30,20 @@
  * @key randomness
  */
 
-import java.util.*;
+import org.testng.annotations.DataProvider;
+import org.testng.annotations.Test;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Random;
+import java.util.Set;
+import java.util.TreeMap;
 import java.util.function.Supplier;
-import org.testng.annotations.Test;
-import org.testng.annotations.DataProvider;
 
 import static org.testng.Assert.fail;
 
--- a/test/jdk/java/util/Collections/CheckedNull.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/Collections/CheckedNull.java	Tue Jan 30 16:41:40 2018 +0100
@@ -27,8 +27,18 @@
  * @summary Test behavior of nulls in checked collections
  */
 
-import java.util.*;
-import static java.util.Collections.*;
+import java.util.AbstractMap;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.TreeSet;
+
+import static java.util.Collections.singleton;
+import static java.util.Collections.singletonMap;
 
 @SuppressWarnings({"unchecked","serial"})
 public class CheckedNull {
--- a/test/jdk/java/util/Collections/CheckedSetBash.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/Collections/CheckedSetBash.java	Tue Jan 30 16:41:40 2018 +0100
@@ -30,13 +30,23 @@
  * @key randomness
  */
 
-import java.util.*;
-import java.util.function.Supplier;
+import org.testng.annotations.DataProvider;
 import org.testng.annotations.Test;
-import org.testng.annotations.DataProvider;
 
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Random;
+import java.util.Set;
+import java.util.TreeSet;
+import java.util.function.Supplier;
+
+import static org.testng.Assert.assertTrue;
 import static org.testng.Assert.fail;
-import static org.testng.Assert.assertTrue;
 
 public class CheckedSetBash {
     static final int numItr = 100;
--- a/test/jdk/java/util/Collections/Disjoint.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/Collections/Disjoint.java	Tue Jan 30 16:41:40 2018 +0100
@@ -29,7 +29,11 @@
  * @key randomness
  */
 
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Random;
 
 public class Disjoint {
     static final int N = 20;
--- a/test/jdk/java/util/Collections/EmptyCollectionSerialization.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/Collections/EmptyCollectionSerialization.java	Tue Jan 30 16:41:40 2018 +0100
@@ -29,14 +29,22 @@
  * @run testng EmptyCollectionSerialization
  */
 
-import java.util.*;
-import java.util.function.Supplier;
-import java.io.*;
+import org.testng.annotations.DataProvider;
 import org.testng.annotations.Test;
-import org.testng.annotations.DataProvider;
 
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.InputStream;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.function.Supplier;
+
+import static org.testng.Assert.assertSame;
 import static org.testng.Assert.fail;
-import static org.testng.Assert.assertSame;
 
 public class EmptyCollectionSerialization {
     private static Object patheticDeepCopy(Object o) throws Exception {
--- a/test/jdk/java/util/Collections/EmptyIterator.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/Collections/EmptyIterator.java	Tue Jan 30 16:41:40 2018 +0100
@@ -27,10 +27,25 @@
  * @summary Test empty iterators, enumerations, and collections
  */
 
-import static java.util.Collections.*;
-import java.util.*;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Enumeration;
+import java.util.Hashtable;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.NoSuchElementException;
 import java.util.concurrent.SynchronousQueue;
 
+import static java.util.Collections.emptyEnumeration;
+import static java.util.Collections.emptyIterator;
+import static java.util.Collections.emptyList;
+import static java.util.Collections.emptyListIterator;
+import static java.util.Collections.emptyMap;
+import static java.util.Collections.emptySet;
+import static java.util.Collections.nCopies;
+import static java.util.Collections.unmodifiableMap;
+
 public class EmptyIterator {
 
     void test(String[] args) throws Throwable {
--- a/test/jdk/java/util/Collections/EmptyNavigableMap.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/Collections/EmptyNavigableMap.java	Tue Jan 30 16:41:40 2018 +0100
@@ -27,6 +27,12 @@
  * @summary Unit test for Collections.emptyNavigableMap
  * @run testng EmptyNavigableMap
  */
+
+import org.testng.Assert;
+import org.testng.Assert.ThrowingRunnable;
+import org.testng.annotations.DataProvider;
+import org.testng.annotations.Test;
+
 import java.math.BigInteger;
 import java.util.Arrays;
 import java.util.Collection;
@@ -37,13 +43,8 @@
 import java.util.SortedMap;
 import java.util.TreeMap;
 
-import org.testng.Assert;
-import org.testng.Assert.ThrowingRunnable;
-import org.testng.annotations.Test;
-import org.testng.annotations.DataProvider;
-
+import static org.testng.Assert.assertFalse;
 import static org.testng.Assert.assertTrue;
-import static org.testng.Assert.assertFalse;
 
 public class EmptyNavigableMap {
 
@@ -124,10 +125,9 @@
      */
     @Test(dataProvider = "NavigableMap<?,?>", dataProviderClass = EmptyNavigableMap.class)
     public void testContainsRequiresComparable(String description, NavigableMap<?,?> navigableMap) {
-        assertThrowsCCE(() -> {
-            navigableMap.containsKey(new Object());
-        },
-            description + ": Compareable should be required");
+        assertThrowsCCE(
+            () -> navigableMap.containsKey(new Object()),
+            description + ": Comparable should be required");
     }
 
     /**
@@ -252,9 +252,7 @@
         Object last = (BigInteger.ZERO == first) ? BigInteger.TEN : BigInteger.ZERO;
 
             assertThrowsIAE(
-                () -> {
-                    navigableMap.subMap(last, true, first, false);
-                },
+                () -> navigableMap.subMap(last, true, first, false),
                 description + ": Must throw IllegalArgumentException when fromElement is not less than toElement.");
 
         navigableMap.subMap(first, true, last, false);
@@ -273,9 +271,8 @@
         // slightly smaller
         NavigableMap ns = subMap.subMap(first, false, last, false);
         // slight expansion
-        assertThrowsIAE(() -> {
-            ns.subMap(first, true, last, true);
-        },
+        assertThrowsIAE(
+            () -> ns.subMap(first, true, last, true),
             description + ": Expansion should not be allowed");
 
         // much smaller
@@ -293,9 +290,8 @@
         NavigableMap ns = subMap.headMap(BigInteger.ONE, false);
 
         // slight expansion
-        assertThrowsIAE(() -> {
-            ns.headMap(BigInteger.ONE, true);
-        },
+        assertThrowsIAE(
+            () -> ns.headMap(BigInteger.ONE, true),
             description + ": Expansion should not be allowed");
 
         // much smaller
@@ -313,9 +309,8 @@
         NavigableMap ns = subMap.tailMap(BigInteger.ONE, false);
 
         // slight expansion
-        assertThrowsIAE(() -> {
-            ns.tailMap(BigInteger.ONE, true);
-        },
+        assertThrowsIAE(
+            () -> ns.tailMap(BigInteger.ONE, true),
             description + ": Expansion should not be allowed");
 
         // much smaller
@@ -327,14 +322,12 @@
      */
     @Test(dataProvider = "NavigableMap<?,?>", dataProviderClass = EmptyNavigableMap.class)
     public void testTailMap(String description, NavigableMap navigableMap) {
-        assertThrowsNPE(() -> {
-            navigableMap.tailMap(null);
-        },
+        assertThrowsNPE(
+            () -> navigableMap.tailMap(null),
             description + ": Must throw NullPointerException for null element");
 
-        assertThrowsCCE(() -> {
-            navigableMap.tailMap(new Object());
-        },
+        assertThrowsCCE(
+            () -> navigableMap.tailMap(new Object()),
             description);
 
         NavigableMap ss = navigableMap.tailMap("1", true);
--- a/test/jdk/java/util/Collections/EmptyNavigableSet.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/Collections/EmptyNavigableSet.java	Tue Jan 30 16:41:40 2018 +0100
@@ -27,22 +27,23 @@
  * @summary Unit test for Collections.emptyNavigableSet
  * @run testng EmptyNavigableSet
  */
+
+import org.testng.Assert;
+import org.testng.Assert.ThrowingRunnable;
+import org.testng.annotations.DataProvider;
+import org.testng.annotations.Test;
+
 import java.math.BigInteger;
 import java.util.Arrays;
 import java.util.Collection;
 import java.util.Collections;
 import java.util.Comparator;
 import java.util.Iterator;
+import java.util.NavigableSet;
 import java.util.NoSuchElementException;
-import java.util.NavigableSet;
 import java.util.SortedSet;
 import java.util.TreeSet;
 
-import org.testng.Assert;
-import org.testng.Assert.ThrowingRunnable;
-import org.testng.annotations.Test;
-import org.testng.annotations.DataProvider;
-
 import static org.testng.Assert.assertFalse;
 import static org.testng.Assert.assertSame;
 import static org.testng.Assert.assertTrue;
@@ -130,10 +131,9 @@
      */
     @Test(dataProvider = "NavigableSet<?>", dataProviderClass = EmptyNavigableSet.class)
     public void testContainsRequiresComparable(String description, NavigableSet<?> navigableSet) {
-        assertThrowsCCE(() -> {
-            navigableSet.contains(new Object());
-        },
-            description + ": Compareable should be required");
+        assertThrowsCCE(
+            () -> navigableSet.contains(new Object()),
+            description + ": Comparable should be required");
     }
 
     /**
@@ -182,9 +182,7 @@
      */
     @Test(dataProvider = "NavigableSet<?>", dataProviderClass = EmptyNavigableSet.class)
     public void testFirst(String description, NavigableSet<?> navigableSet) {
-        assertThrowsNSEE(() -> {
-            navigableSet.first();
-        }, description);
+        assertThrowsNSEE(navigableSet::first, description);
     }
 
     /**
@@ -210,9 +208,7 @@
      */
     @Test(dataProvider = "NavigableSet<?>", dataProviderClass = EmptyNavigableSet.class)
     public void testLast(String description, NavigableSet<?> navigableSet) {
-        assertThrowsNSEE(() -> {
-            navigableSet.last();
-        }, description);
+        assertThrowsNSEE(navigableSet::last, description);
     }
 
     /**
@@ -277,9 +273,7 @@
         Object last = (BigInteger.ZERO == first) ? BigInteger.TEN : BigInteger.ZERO;
 
             assertThrowsIAE(
-                () -> {
-                    navigableSet.subSet(last, true, first, false);
-                },
+                () -> navigableSet.subSet(last, true, first, false),
                 description
                 + ": Must throw IllegalArgumentException when fromElement is not less than toElement.");
 
@@ -299,9 +293,8 @@
         // slightly smaller
         NavigableSet ns = subSet.subSet(first, false, last, false);
         // slight expansion
-        assertThrowsIAE(() -> {
-            ns.subSet(first, true, last, true);
-        },
+        assertThrowsIAE(
+            () -> ns.subSet(first, true, last, true),
             description + ": Expansion should not be allowed");
 
         // much smaller
@@ -319,9 +312,8 @@
         NavigableSet ns = subSet.headSet(BigInteger.ONE, false);
 
         // slight expansion
-        assertThrowsIAE(() -> {
-            ns.headSet(BigInteger.ONE, true);
-        },
+        assertThrowsIAE(
+            () -> ns.headSet(BigInteger.ONE, true),
             description + ": Expansion should not be allowed");
 
         // much smaller
@@ -339,9 +331,8 @@
         NavigableSet ns = subSet.tailSet(BigInteger.ONE, false);
 
         // slight expansion
-        assertThrowsIAE(() -> {
-            ns.tailSet(BigInteger.ONE, true);
-        },
+        assertThrowsIAE(
+            () -> ns.tailSet(BigInteger.ONE, true),
             description + ": Expansion should not be allowed");
 
         // much smaller
@@ -353,14 +344,13 @@
      */
     @Test(dataProvider = "NavigableSet<?>", dataProviderClass = EmptyNavigableSet.class)
     public void testTailSet(String description, NavigableSet navigableSet) {
-        assertThrowsNPE(() -> {
-            navigableSet.tailSet(null);
-        },
+        assertThrowsNPE(
+            () -> navigableSet.tailSet(null),
             description + ": Must throw NullPointerException for null element");
 
-        assertThrowsCCE(() -> {
-            navigableSet.tailSet(new Object());
-        }, description);
+        assertThrowsCCE(
+            () -> navigableSet.tailSet(new Object()),
+            description);
 
         NavigableSet ss = navigableSet.tailSet("1", true);
 
--- a/test/jdk/java/util/Collections/Enum.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/Collections/Enum.java	Tue Jan 30 16:41:40 2018 +0100
@@ -27,7 +27,9 @@
  * @summary Basic test for new Enumeration -> List converter
  */
 
-import java.util.*;
+import java.util.Collections;
+import java.util.List;
+import java.util.Vector;
 
 public class Enum {
     public static void main(String[] args) throws Exception {
--- a/test/jdk/java/util/Collections/FindSubList.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/Collections/FindSubList.java	Tue Jan 30 16:41:40 2018 +0100
@@ -27,7 +27,12 @@
  * @summary Basic test for Collections.indexOfSubList/lastIndexOfSubList
  */
 
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Vector;
 
 public class FindSubList {
     public static void main(String[] args) throws Exception {
--- a/test/jdk/java/util/Collections/Frequency.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/Collections/Frequency.java	Tue Jan 30 16:41:40 2018 +0100
@@ -28,7 +28,10 @@
  * @author  Josh Bloch
  */
 
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.LinkedList;
+import java.util.List;
 
 public class Frequency {
     static final int N = 100;
--- a/test/jdk/java/util/Collections/MinMax.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/Collections/MinMax.java	Tue Jan 30 16:41:40 2018 +0100
@@ -29,7 +29,9 @@
  * @author Josh Bloch
  */
 
-import java.util.*;
+import java.util.Collections;
+import java.util.LinkedHashSet;
+import java.util.Set;
 
 public class MinMax {
     public static void main(String[] args) {
--- a/test/jdk/java/util/Collections/NCopies.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/Collections/NCopies.java	Tue Jan 30 16:41:40 2018 +0100
@@ -28,8 +28,8 @@
  * @author  Martin Buchholz
  */
 
-import java.util.*;
-import java.util.concurrent.*;
+import java.util.Collections;
+import java.util.List;
 
 public class NCopies {
     static volatile int passed = 0, failed = 0;
--- a/test/jdk/java/util/Collections/NullComparator.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/Collections/NullComparator.java	Tue Jan 30 16:41:40 2018 +0100
@@ -27,7 +27,10 @@
  * @summary A null Comparator is now specified to indicate natural ordering.
  */
 
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
 
 public class NullComparator {
     public static void main(String[] args) throws Exception {
--- a/test/jdk/java/util/Collections/RacingCollections.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/Collections/RacingCollections.java	Tue Jan 30 16:41:40 2018 +0100
@@ -28,9 +28,46 @@
  * @author Martin Buchholz
  */
 
-import static java.util.Collections.*;
-import java.util.*;
-import java.util.concurrent.*;
+import java.util.ArrayDeque;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.Deque;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Hashtable;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import java.util.Queue;
+import java.util.Set;
+import java.util.TreeMap;
+import java.util.TreeSet;
+import java.util.Vector;
+import java.util.concurrent.ArrayBlockingQueue;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.ConcurrentLinkedDeque;
+import java.util.concurrent.ConcurrentLinkedQueue;
+import java.util.concurrent.ConcurrentSkipListMap;
+import java.util.concurrent.ConcurrentSkipListSet;
+import java.util.concurrent.CopyOnWriteArrayList;
+import java.util.concurrent.CopyOnWriteArraySet;
+import java.util.concurrent.LinkedBlockingDeque;
+import java.util.concurrent.LinkedBlockingQueue;
+import java.util.concurrent.LinkedTransferQueue;
+
+import static java.util.Collections.asLifoQueue;
+import static java.util.Collections.checkedList;
+import static java.util.Collections.checkedMap;
+import static java.util.Collections.checkedSet;
+import static java.util.Collections.newSetFromMap;
+import static java.util.Collections.synchronizedList;
+import static java.util.Collections.synchronizedMap;
+import static java.util.Collections.synchronizedSet;
+import static java.util.Collections.unmodifiableList;
+import static java.util.Collections.unmodifiableMap;
+import static java.util.Collections.unmodifiableSet;
 
 public class RacingCollections {
     /**
--- a/test/jdk/java/util/Collections/ReplaceAll.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/Collections/ReplaceAll.java	Tue Jan 30 16:41:40 2018 +0100
@@ -27,7 +27,11 @@
  * @summary Basic test for new replaceAll algorithm
  */
 
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Vector;
 
 public class ReplaceAll {
     static final int SIZE = 20;
--- a/test/jdk/java/util/Collections/ReverseOrder.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/Collections/ReverseOrder.java	Tue Jan 30 16:41:40 2018 +0100
@@ -28,8 +28,14 @@
  * @author Josh Bloch
  */
 
-import java.util.*;
-import java.io.*;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.List;
 
 public class ReverseOrder {
     static byte[] serialBytes(Object o) {
--- a/test/jdk/java/util/Collections/ReverseOrder2.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/Collections/ReverseOrder2.java	Tue Jan 30 16:41:40 2018 +0100
@@ -28,8 +28,17 @@
  * @author  Josh Bloch, Martin Buchholz
  */
 
-import java.util.*;
-import java.io.*;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.LinkedList;
+import java.util.List;
 
 public class ReverseOrder2 {
     static final int N = 100;
--- a/test/jdk/java/util/Collections/Rotate.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/Collections/Rotate.java	Tue Jan 30 16:41:40 2018 +0100
@@ -28,7 +28,12 @@
  * @key randomness
  */
 
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Random;
+import java.util.Vector;
 
 public class Rotate {
     // Should have lots of distinct factors and be > ROTATE_THRESHOLD
--- a/test/jdk/java/util/Collections/RotateEmpty.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/Collections/RotateEmpty.java	Tue Jan 30 16:41:40 2018 +0100
@@ -27,7 +27,9 @@
  * @summary Collections.rotate(...) returns ArithmeticException
  */
 
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
 
 public class RotateEmpty {
 
--- a/test/jdk/java/util/Collections/Ser.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/Collections/Ser.java	Tue Jan 30 16:41:40 2018 +0100
@@ -28,8 +28,13 @@
  *          nCopies and singleton were spec'd to be serializable, but weren't.
  */
 
-import java.io.*;
-import java.util.*;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
+import java.util.Collections;
+import java.util.List;
+import java.util.Set;
 
 public class Ser {
     public static void main(String[] args) throws Exception {
--- a/test/jdk/java/util/Collections/SetFromMap.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/Collections/SetFromMap.java	Tue Jan 30 16:41:40 2018 +0100
@@ -28,7 +28,10 @@
  * @author Martin Buchholz
  */
 
-import java.util.*;
+import java.util.Collections;
+import java.util.IdentityHashMap;
+import java.util.Map;
+import java.util.Set;
 
 public class SetFromMap {
     static volatile int passed = 0, failed = 0;
--- a/test/jdk/java/util/Collections/Swap.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/Collections/Swap.java	Tue Jan 30 16:41:40 2018 +0100
@@ -28,7 +28,9 @@
  * @author  Josh Bloch
  */
 
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
 
 public class Swap {
     static final int SIZE = 100;
--- a/test/jdk/java/util/Collections/T5078378.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/Collections/T5078378.java	Tue Jan 30 16:41:40 2018 +0100
@@ -21,7 +21,7 @@
  * questions.
  */
 
-/**
+/*
  * @test
  * @bug 5078378
  * @summary REGRESSION: Some calls to Collections.binarySearch no longer compile
@@ -30,7 +30,9 @@
  * @compile T5078378.java
  * @compile/fail -Xlint:unchecked -Werror T5078378.java
  */
-import java.util.*;
+
+import java.util.Collections;
+import java.util.List;
 
 class T5078378 {
     public static boolean contains(List l, Object o) {
--- a/test/jdk/java/util/Collections/T6433170.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/Collections/T6433170.java	Tue Jan 30 16:41:40 2018 +0100
@@ -27,8 +27,16 @@
  * @summary CheckedCollection.addAll should be all-or-nothing
  */
 
-import java.util.*;
-import static java.util.Collections.*;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Vector;
+
+import static java.util.Collections.checkedCollection;
+import static java.util.Collections.checkedList;
+import static java.util.Collections.checkedSet;
 
 @SuppressWarnings("unchecked")
 public class T6433170 {
--- a/test/jdk/java/util/Collections/ViewSynch.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/Collections/ViewSynch.java	Tue Jan 30 16:41:40 2018 +0100
@@ -29,7 +29,11 @@
  *          (Got that?)
  */
 
-import java.util.*;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Map;
+import java.util.SortedMap;
+import java.util.TreeMap;
 
 public class ViewSynch {
     static final Integer ZERO = new Integer(0);
--- a/test/jdk/java/util/Collections/WrappedNull.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/Collections/WrappedNull.java	Tue Jan 30 16:41:40 2018 +0100
@@ -28,7 +28,16 @@
  *          rather than later
  */
 
-import java.util.*;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.SortedMap;
+import java.util.SortedSet;
+import java.util.TreeMap;
+import java.util.TreeSet;
 
 public class WrappedNull {
     public static void main(String[] args) throws Exception {
--- a/test/jdk/java/util/Currency/ValidateISO4217.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/Currency/ValidateISO4217.java	Tue Jan 30 16:41:40 2018 +0100
@@ -23,7 +23,7 @@
 /*
  * @test
  * @bug 4691089 4819436 4942982 5104960 6544471 6627549 7066203 7195759
- *      8039317 8074350 8074351 8145952
+ *      8039317 8074350 8074351 8145952 8187946
  * @summary Validate ISO 4217 data for Currency class.
  * @modules java.base/java.util:open
  *          jdk.localedata
@@ -95,7 +95,11 @@
 
     /* Codes that are obsolete, do not have related country */
     static final String otherCodes =
-        "ADP-AFA-ATS-AYM-AZM-BEF-BGL-BOV-BYB-BYR-CHE-CHW-CLF-COU-CUC-CYP-DEM-EEK-ESP-FIM-FRF-GHC-GRD-GWP-IEP-ITL-LUF-MGF-MTL-MXV-MZM-NLG-PTE-ROL-RUR-SDD-SIT-SKK-SRG-TMM-TPE-TRL-VEF-UYI-USN-USS-VEB-XAG-XAU-XBA-XBB-XBC-XBD-XDR-XFO-XFU-XPD-XPT-XSU-XTS-XUA-XXX-YUM-ZMK-ZWD-ZWN-ZWR";
+        "ADP-AFA-ATS-AYM-AZM-BEF-BGL-BOV-BYB-BYR-CHE-CHW-CLF-COU-CUC-CYP-"
+        + "DEM-EEK-ESP-FIM-FRF-GHC-GRD-GWP-IEP-ITL-LUF-MGF-MTL-MXV-MZM-NLG-"
+        + "PTE-ROL-RUR-SDD-SIT-SKK-SRG-STD-TMM-TPE-TRL-VEF-UYI-USN-USS-VEB-"
+        + "XAG-XAU-XBA-XBB-XBC-XBD-XDR-XFO-XFU-XPD-XPT-XSU-XTS-XUA-XXX-"
+        + "YUM-ZMK-ZWD-ZWN-ZWR";
 
     static boolean err = false;
 
--- a/test/jdk/java/util/Currency/tablea1.txt	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/Currency/tablea1.txt	Tue Jan 30 16:41:40 2018 +0100
@@ -1,12 +1,12 @@
 #
 #
-# Amendments up until ISO 4217 AMENDMENT NUMBER 162
-#   (As of 30 Auguest 2016)
+# Amendments up until ISO 4217 AMENDMENT NUMBER 164
+#   (As of 22 September 2017)
 #
 
 # Version
 FILEVERSION=3
-DATAVERSION=162
+DATAVERSION=164
 
 # ISO 4217 currency data
 AF	AFN	971	2
@@ -210,7 +210,7 @@
 VC	XCD	951	2
 WS	WST	882	2
 SM	EUR	978	2
-ST	STD	678	2
+ST	STN	930	2
 SA	SAR	682	2
 SN	XOF	952	0
 # MA 134
--- a/test/jdk/java/util/HashMap/KeySetRemove.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/HashMap/KeySetRemove.java	Tue Jan 30 16:41:40 2018 +0100
@@ -28,7 +28,9 @@
  *          false if the Map previously mapped k to null.
  */
 
-import java.util.*;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.TreeMap;
 
 public class KeySetRemove {
     public static void main(String[] args) throws Exception {
--- a/test/jdk/java/util/HashMap/SetValue.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/HashMap/SetValue.java	Tue Jan 30 16:41:40 2018 +0100
@@ -28,7 +28,8 @@
  * @author jbloch
  */
 
-import java.util.*;
+import java.util.HashMap;
+import java.util.Map;
 
 public class SetValue {
     static final String key      = "key";
--- a/test/jdk/java/util/HashMap/ToString.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/HashMap/ToString.java	Tue Jan 30 16:41:40 2018 +0100
@@ -28,7 +28,8 @@
  *          contained null keys or values.
  */
 
-import java.util.*;
+import java.util.HashMap;
+import java.util.Map;
 
 public class ToString {
     public static void main(String[] args) throws Exception {
--- a/test/jdk/java/util/Hashtable/EqualsCast.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/Hashtable/EqualsCast.java	Tue Jan 30 16:41:40 2018 +0100
@@ -29,8 +29,8 @@
  *          unnecessarily.  (java.security.Provider tickled this sensitivity.)
  */
 
-import java.util.*;
 import java.security.Provider;
+import java.util.Map;
 
 public class EqualsCast {
     public static void main(String[] args) throws Exception {
--- a/test/jdk/java/util/Hashtable/HashCode.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/Hashtable/HashCode.java	Tue Jan 30 16:41:40 2018 +0100
@@ -28,7 +28,8 @@
  * @author Josh Bloch
  */
 
-import java.util.*;
+import java.util.Hashtable;
+import java.util.Map;
 
 public class HashCode {
     public static void main(String[] args) throws Exception {
--- a/test/jdk/java/util/Hashtable/IllegalLoadFactor.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/Hashtable/IllegalLoadFactor.java	Tue Jan 30 16:41:40 2018 +0100
@@ -26,7 +26,12 @@
    @summary Test for an illegalargumentexception on loadFactor
 */
 
-import java.util.*;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Hashtable;
+import java.util.Map;
+import java.util.Set;
+import java.util.WeakHashMap;
 
 /**
  * This class tests to see if creating a hash table with an
--- a/test/jdk/java/util/Hashtable/ReadObject.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/Hashtable/ReadObject.java	Tue Jan 30 16:41:40 2018 +0100
@@ -21,18 +21,18 @@
  * questions.
  */
 
-/**
+/*
  * @test
  * @bug 4652911
  * @summary test Hashtable readObject for invocation of overridable put method
  */
-import java.util.Hashtable;
 
+import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
+import java.io.ObjectInputStream;
 import java.io.ObjectOutputStream;
-import java.io.ByteArrayInputStream;
-import java.io.ObjectInputStream;
 import java.io.Serializable;
+import java.util.Hashtable;
 
 /**
  * Class that extends Hashtable to demonstrate bug when
@@ -52,7 +52,7 @@
         Object getValue() {
             return mValue;
         }
-    };
+    }
 
     public Object get(Object key) {
         ValueWrapper valueWrapper = (ValueWrapper)super.get(key);
--- a/test/jdk/java/util/Hashtable/SelfRef.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/Hashtable/SelfRef.java	Tue Jan 30 16:41:40 2018 +0100
@@ -29,8 +29,11 @@
  * @author Josh Bloch, Martin Buchholz
  */
 
-import java.util.*;
-import java.util.concurrent.*;
+import java.util.HashMap;
+import java.util.Hashtable;
+import java.util.LinkedHashMap;
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
 
 public class SelfRef {
     public static void main(String[] args) {
--- a/test/jdk/java/util/IdentityHashMap/ToArray.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/IdentityHashMap/ToArray.java	Tue Jan 30 16:41:40 2018 +0100
@@ -28,7 +28,11 @@
  * @author  Josh Bloch, Martin Buchholz
  */
 
-import java.util.*;
+import java.util.ArrayList;
+import java.util.IdentityHashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
 
 public class ToArray {
     public static void main(String[] args) {
--- a/test/jdk/java/util/IdentityHashMap/ToString.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/IdentityHashMap/ToString.java	Tue Jan 30 16:41:40 2018 +0100
@@ -28,7 +28,10 @@
  * @author  Josh Bloch
  */
 
-import java.util.*;
+import java.util.IdentityHashMap;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Set;
 
 public class ToString {
     public static void main(String[] args) {
--- a/test/jdk/java/util/LinkedHashMap/Basic.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/LinkedHashMap/Basic.java	Tue Jan 30 16:41:40 2018 +0100
@@ -27,9 +27,21 @@
  * @summary Basic test for LinkedHashMap.  (Based on MapBash)
  */
 
-import java.util.*;
-import java.util.function.*;
-import java.io.*;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+import java.util.Random;
+import java.util.Set;
+import java.util.function.BiFunction;
 
 public class Basic {
     static final Random rnd = new Random(666);
--- a/test/jdk/java/util/LinkedHashMap/Cache.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/LinkedHashMap/Cache.java	Tue Jan 30 16:41:40 2018 +0100
@@ -27,7 +27,8 @@
  * @summary Basic test of removeEldestElement method.
  */
 
-import java.util.*;
+import java.util.LinkedHashMap;
+import java.util.Map;
 
 public class Cache {
     private static final int MAP_SIZE = 10;
--- a/test/jdk/java/util/LinkedHashMap/EmptyMapIterator.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/LinkedHashMap/EmptyMapIterator.java	Tue Jan 30 16:41:40 2018 +0100
@@ -27,12 +27,14 @@
  * @summary iterators on collection views of empty map weren't fail-fast.
  */
 
-import java.util.*;
+import java.util.ConcurrentModificationException;
+import java.util.HashMap;
+import java.util.Iterator;
 
 public class EmptyMapIterator {
     public static void main(String[] args) throws Exception {
         HashMap map = new HashMap();
-        Iterator iter = iter = map.entrySet().iterator();
+        Iterator iter = map.entrySet().iterator();
         map.put("key", "value");
 
         try {
--- a/test/jdk/java/util/LinkedHashSet/Basic.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/LinkedHashSet/Basic.java	Tue Jan 30 16:41:40 2018 +0100
@@ -27,8 +27,15 @@
  * @summary Basic test for LinkedHashSet.  (Based on SetBash)
  */
 
-import java.util.*;
-import java.io.*;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
+import java.util.Arrays;
+import java.util.Iterator;
+import java.util.LinkedHashSet;
+import java.util.Random;
+import java.util.Set;
 
 public class Basic {
     static Random rnd = new Random(666);
--- a/test/jdk/java/util/LinkedList/AddAll.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/LinkedList/AddAll.java	Tue Jan 30 16:41:40 2018 +0100
@@ -27,7 +27,10 @@
  * @summary AddAll was prepending instead of appending!
  */
 
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.LinkedList;
+import java.util.List;
 
 public class AddAll {
     public static void main(String[] args) throws Exception {
--- a/test/jdk/java/util/LinkedList/Clone.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/LinkedList/Clone.java	Tue Jan 30 16:41:40 2018 +0100
@@ -29,7 +29,9 @@
  *          TreeMap.
  */
 
-import java.util.*;
+import java.util.LinkedList;
+import java.util.TreeMap;
+import java.util.TreeSet;
 
 public class Clone {
     public static void main(String[] args) {
--- a/test/jdk/java/util/LinkedList/ComodifiedRemove.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/LinkedList/ComodifiedRemove.java	Tue Jan 30 16:41:40 2018 +0100
@@ -29,9 +29,10 @@
  * @author Konstantin Kladko
  */
 
-import java.util.*;
+import java.util.ConcurrentModificationException;
+import java.util.LinkedList;
+import java.util.List;
 import java.util.ListIterator;
-import java.util.ConcurrentModificationException;
 
 public class ComodifiedRemove {
     public static
--- a/test/jdk/java/util/List/LockStep.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/List/LockStep.java	Tue Jan 30 16:41:40 2018 +0100
@@ -29,10 +29,23 @@
  * @key randomness
  */
 
-import java.io.*;
-import java.util.*;
-import java.util.concurrent.*;
-import static java.util.Collections.*;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.ConcurrentModificationException;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.ListIterator;
+import java.util.Random;
+import java.util.Vector;
 
 @SuppressWarnings("unchecked")
 public class LockStep {
--- a/test/jdk/java/util/Map/Defaults.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/Map/Defaults.java	Tue Jan 30 16:41:40 2018 +0100
@@ -28,6 +28,11 @@
  * @author Mike Duigou
  * @run testng Defaults
  */
+
+import org.testng.Assert.ThrowingRunnable;
+import org.testng.annotations.DataProvider;
+import org.testng.annotations.Test;
+
 import java.util.AbstractMap;
 import java.util.AbstractSet;
 import java.util.ArrayList;
@@ -36,36 +41,31 @@
 import java.util.Collections;
 import java.util.EnumMap;
 import java.util.HashMap;
+import java.util.HashSet;
 import java.util.Hashtable;
-import java.util.HashSet;
 import java.util.IdentityHashMap;
 import java.util.Iterator;
 import java.util.LinkedHashMap;
 import java.util.Map;
+import java.util.Set;
 import java.util.TreeMap;
-import java.util.Set;
 import java.util.WeakHashMap;
+import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.ConcurrentMap;
-import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.ConcurrentSkipListMap;
 import java.util.concurrent.atomic.AtomicBoolean;
 import java.util.function.BiFunction;
 import java.util.function.Function;
 import java.util.function.Supplier;
 
-import org.testng.Assert.ThrowingRunnable;
-import org.testng.annotations.Test;
-import org.testng.annotations.DataProvider;
-
 import static java.util.Objects.requireNonNull;
-
-import static org.testng.Assert.fail;
 import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertTrue;
 import static org.testng.Assert.assertFalse;
 import static org.testng.Assert.assertNull;
 import static org.testng.Assert.assertSame;
 import static org.testng.Assert.assertThrows;
+import static org.testng.Assert.assertTrue;
+import static org.testng.Assert.fail;
 
 public class Defaults {
 
@@ -730,7 +730,7 @@
         e90, e91, e92, e93, e94, e95, e96, e97, e98, e99,
         EXTRA_KEY;
         public static final int SIZE = values().length;
-    };
+    }
     private static final int TEST_SIZE = IntegerEnum.SIZE - 1;
     /**
      * Realized keys ensure that there is always a hard ref to all test objects.
--- a/test/jdk/java/util/Map/Get.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/Map/Get.java	Tue Jan 30 16:41:40 2018 +0100
@@ -28,10 +28,18 @@
  * @author Martin Buchholz
  */
 
-import java.io.*;
-import java.util.*;
-import java.util.concurrent.*;
-import java.util.concurrent.atomic.*;
+import java.util.HashMap;
+import java.util.Hashtable;
+import java.util.IdentityHashMap;
+import java.util.LinkedHashMap;
+import java.util.Map;
+import java.util.Objects;
+import java.util.SortedMap;
+import java.util.TreeMap;
+import java.util.WeakHashMap;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.ConcurrentMap;
+import java.util.concurrent.ConcurrentSkipListMap;
 
 public class Get {
 
--- a/test/jdk/java/util/Map/LockStep.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/Map/LockStep.java	Tue Jan 30 16:41:40 2018 +0100
@@ -28,8 +28,20 @@
  * @key randomness
  */
 
-import java.util.*;
-import java.util.concurrent.*;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Hashtable;
+import java.util.IdentityHashMap;
+import java.util.Iterator;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Random;
+import java.util.TreeMap;
+import java.util.WeakHashMap;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.ConcurrentSkipListMap;
 
 /**
  * Based on the strange scenario required to reproduce
--- a/test/jdk/java/util/NavigableMap/LockStep.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/NavigableMap/LockStep.java	Tue Jan 30 16:41:40 2018 +0100
@@ -32,10 +32,35 @@
  * @key randomness
  */
 
-import java.io.*;
-import java.util.*;
-import java.util.concurrent.*;
-import static java.util.Collections.*;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.NotSerializableException;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
+import java.io.Serializable;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.NavigableMap;
+import java.util.NavigableSet;
+import java.util.NoSuchElementException;
+import java.util.Random;
+import java.util.Set;
+import java.util.TreeMap;
+import java.util.TreeSet;
+import java.util.concurrent.ConcurrentSkipListMap;
+import java.util.concurrent.ConcurrentSkipListSet;
+
+import static java.util.Collections.reverseOrder;
+import static java.util.Collections.singleton;
+import static java.util.Collections.singletonMap;
 
 @SuppressWarnings("unchecked")
 public class LockStep {
--- a/test/jdk/java/util/PriorityQueue/AddNonComparable.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/PriorityQueue/AddNonComparable.java	Tue Jan 30 16:41:40 2018 +0100
@@ -27,6 +27,8 @@
  * @run testng AddNonComparable
  */
 
+import org.testng.annotations.Test;
+
 import java.util.PriorityQueue;
 import java.util.Queue;
 import java.util.SortedMap;
@@ -39,8 +41,8 @@
 import java.util.function.BiConsumer;
 import java.util.function.Supplier;
 
-import static org.testng.Assert.*;
-import org.testng.annotations.Test;
+import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.assertTrue;
 
 public class AddNonComparable {
 
--- a/test/jdk/java/util/PriorityQueue/NoNulls.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/PriorityQueue/NoNulls.java	Tue Jan 30 16:41:40 2018 +0100
@@ -38,8 +38,8 @@
  */
 
 import java.util.ArrayList;
+import java.util.Collection;
 import java.util.Comparator;
-import java.util.Collection;
 import java.util.PriorityQueue;
 import java.util.SortedSet;
 import java.util.TreeSet;
--- a/test/jdk/java/util/PriorityQueue/PriorityQueueSort.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/PriorityQueue/PriorityQueueSort.java	Tue Jan 30 16:41:40 2018 +0100
@@ -42,18 +42,14 @@
 import java.util.Comparator;
 import java.util.Iterator;
 import java.util.List;
+import java.util.PriorityQueue;
 import java.util.Queue;
-import java.util.PriorityQueue;
 
 public class PriorityQueueSort {
 
     static class MyComparator implements Comparator<Integer> {
         public int compare(Integer x, Integer y) {
-            int i = x.intValue();
-            int j = y.intValue();
-            if (i < j) return -1;
-            if (i > j) return 1;
-            return 0;
+            return Integer.compare(x.intValue(), y.intValue());
         }
     }
 
--- a/test/jdk/java/util/PriorityQueue/RemoveContains.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/PriorityQueue/RemoveContains.java	Tue Jan 30 16:41:40 2018 +0100
@@ -37,8 +37,8 @@
 import java.util.concurrent.ArrayBlockingQueue;
 import java.util.concurrent.LinkedBlockingDeque;
 import java.util.concurrent.LinkedBlockingQueue;
+import java.util.concurrent.LinkedTransferQueue;
 import java.util.concurrent.PriorityBlockingQueue;
-import java.util.concurrent.LinkedTransferQueue;
 
 public class RemoveContains {
     static volatile int passed = 0, failed = 0;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/java/util/Properties/BlankLines.java	Tue Jan 30 16:41:40 2018 +0100
@@ -0,0 +1,76 @@
+/*
+ * 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 4218776
+ * @summary Test loading of properties files with blank lines
+ */
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Properties;
+
+/**
+ * This class tests to see if a properties object correctly handles blank
+ * lines in a properties file
+ */
+public class BlankLines {
+    public static void main(String []args)
+    {
+        try {
+            // create test file
+            File file = new File("test.properties");
+
+            // write a single space to the test file
+            FileOutputStream fos = new FileOutputStream(file);
+            fos.write(' ');
+            fos.close();
+
+            // test empty properties
+            Properties prop1 = new Properties();
+
+            // now load the file we just created, into a
+            // properties object.
+            // the properties object should have no elements,
+            // but due to a bug, it has an empty key/value.
+            // key = "", value = ""
+            Properties prop2 = new Properties();
+            InputStream is = new FileInputStream(file);
+            try {
+                prop2.load(is);
+            } finally {
+                is.close();
+            }
+            if (!prop1.equals(prop2))
+                throw new RuntimeException("Incorrect properties loading.");
+
+            // cleanup
+            file.delete();
+        }
+        catch(IOException e) {}
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/java/util/Properties/CloseXMLStream.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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.
+ *
+ * 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 6270682
+ * @summary Test the input stream is closed after loadtoXML returns.
+ */
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.util.Properties;
+
+public class CloseXMLStream {
+    public static void main(String[] args) throws Throwable {
+        class ExpectedClosingException extends RuntimeException {};
+        Properties props = new Properties();
+        ByteArrayOutputStream out = new ByteArrayOutputStream();
+        props.storeToXML(out, null);
+        ByteArrayInputStream in = new ByteArrayInputStream(out.toByteArray()) {
+            public void close() {
+                throw new ExpectedClosingException();
+            }
+        };
+        try {
+            props.loadFromXML(in);
+            throw new Exception("Failed: loadFromXML does not close the is!");
+        } catch (ExpectedClosingException ex) { /*OK*/ }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/java/util/Properties/EscapeSpace.java	Tue Jan 30 16:41:40 2018 +0100
@@ -0,0 +1,142 @@
+/*
+ * 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 4219644
+ * @summary Escaping of spaces required only for leading spaces in the value
+ *          part of the property.
+ */
+
+import java.io.BufferedInputStream;
+import java.io.BufferedOutputStream;
+import java.io.ByteArrayInputStream;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.util.Properties;
+
+public class EscapeSpace {
+
+    static String props =
+        "key1=\\ \\ Value1, has leading and trailing spaces\\  \n" +
+        "key2=Value2,\\ does not have\\ leading or trailing\\ spaces\n" +
+        "key3=Value3,has,no,spaces\n" +
+        "key4=Value4, does not have leading spaces\\  \n" +
+        "key5=\\t\\ \\ Value5, has leading tab and no trailing spaces\n" +
+        "key6=\\ \\ Value6,doesnothaveembeddedspaces\\ \\ \n" +
+        "\\ key1\\ test\\ =key1, has leading and trailing spaces  \n" +
+        "key2\\ test=key2, does not have leading or trailing spaces\n" +
+        "key3test=key3,has,no,spaces\n" +
+        "key4\\ test\\ =key4, does not have leading spaces  \n" +
+        "\\t\\ key5\\ test=key5, has leading tab and no trailing spaces\n" +
+        "\\ \\ key6\\ \\ =\\  key6,doesnothaveembeddedspaces  ";
+    static void load(Properties p, String file) throws Exception
+    {
+        FileInputStream     fis = null;
+        BufferedInputStream bis = null;
+
+        try {
+            fis = new FileInputStream(file);
+            bis = new BufferedInputStream( fis );
+
+            p.load(bis);
+        }
+        catch (IOException e) {
+            throw new RuntimeException(e.getMessage());
+        } finally {
+            if (fis != null)
+                fis.close();
+        }
+    }
+
+    static void store(Properties p, String file) throws Exception
+    {
+
+        FileOutputStream     fos = null;
+        BufferedOutputStream bos = null;
+
+        try {
+            fos = new FileOutputStream(file);
+            bos = new BufferedOutputStream( fos );
+
+            p.store( bos, "Omitting escape characters for non leading space \" \" in properties");
+        }
+        catch (IOException e) {
+            throw new RuntimeException(e.getMessage());
+        } finally {
+            if (fos != null)
+                fos.close();
+        }
+    }
+
+    public static void main( String args[] ) throws Exception
+    {
+        ByteArrayInputStream bais = new ByteArrayInputStream(props.getBytes());
+        Properties props0 = new Properties();
+        // Load properties with escape character '\' before space characters
+        try {
+            props0.load(bais);
+        } catch (IOException e) {
+            throw new RuntimeException(e.getMessage());
+        }
+
+        Properties props1 = new Properties();
+        /*
+         * Put the same properties, but without the escape char for space in
+         * value part.
+         */
+        props1.put( "key1", "  Value1, has leading and trailing spaces  " );
+        props1.put( "key2",
+            "Value2, does not have leading or trailing spaces" );
+        props1.put( "key3", "Value3,has,no,spaces" );
+        props1.put( "key4", "Value4, does not have leading spaces  " );
+        props1.put( "key5",
+            "\t  Value5, has leading tab and no trailing spaces" );
+        props1.put( "key6", "  Value6,doesnothaveembeddedspaces  " );
+        props1.put( " key1 test ", "key1, has leading and trailing spaces  " );
+        props1.put( "key2 test",
+            "key2, does not have leading or trailing spaces" );
+        props1.put( "key3test", "key3,has,no,spaces" );
+        props1.put( "key4 test ", "key4, does not have leading spaces  " );
+        props1.put( "\t key5 test",
+            "key5, has leading tab and no trailing spaces" );
+        props1.put( "  key6  ", "  key6,doesnothaveembeddedspaces  " );
+
+        // Check if both the properties match
+        if (!props0.equals(props1))
+            throw new RuntimeException("Test failed");
+
+
+        // Also store the new properties to a file
+        store(props1, "out1.props");
+
+        Properties props2 = new Properties();
+        // Reread the properties from the file
+        load(props2, "out1.props");
+
+        // Make sure that the properties match
+        if (!props1.equals(props2))
+            throw new RuntimeException("Test failed");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/java/util/Properties/GenerifiedUses.java	Tue Jan 30 16:41:40 2018 +0100
@@ -0,0 +1,64 @@
+/*
+ * 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 5060820 5054615 5056707 5061476
+ * @modules java.desktop
+ *          java.naming
+ * @compile GenerifiedUses.java
+ */
+
+import java.awt.image.CropImageFilter;
+import java.awt.image.ImageFilter;
+import java.awt.image.PixelGrabber;
+import java.awt.image.ReplicateScaleFilter;
+import java.util.Properties;
+import javax.naming.InitialContext;
+import javax.naming.directory.InitialDirContext;
+import javax.naming.spi.NamingManager;
+
+public class GenerifiedUses {
+
+    static void foo() throws Exception {
+
+        Properties props = new Properties();
+
+        // 5060820
+        new InitialDirContext(props);
+
+        // 5054615
+        new InitialContext(props);
+
+        // 5056707
+        NamingManager.getObjectInstance(null, null, null, props);
+
+        // 5061476
+        new CropImageFilter(0, 0, 0, 0).setProperties(props);
+        new ImageFilter().setProperties(props);
+        new PixelGrabber(null, 0, 0, 0, 0, false).setProperties(props);
+        new ReplicateScaleFilter(1, 1).setProperties(props);
+
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/java/util/Properties/LoadParsing.java	Tue Jan 30 16:41:40 2018 +0100
@@ -0,0 +1,62 @@
+/*
+ * 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 4115936 4385195 4972297
+ * @summary checks for processing errors in properties.load
+ */
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.util.Properties;
+
+public class LoadParsing {
+    public static void main(String[] argv) throws Exception {
+        File f = new File(System.getProperty("test.src", "."), "input.txt");
+        FileInputStream myIn = new FileInputStream(f);
+        Properties myProps = new Properties();
+        int size = 0;
+        try {
+            myProps.load(myIn);
+        } finally {
+            myIn.close();
+        }
+
+        if (!myProps.getProperty("key1").equals("value1"))
+            throw new RuntimeException("Bad comment parsing");
+        if (!myProps.getProperty("key2").equals("abc\\defg\\"))
+            throw new RuntimeException("Bad slash parsing");
+        if (!myProps.getProperty("key3").equals("value3"))
+            throw new RuntimeException("Adds spaces to key");
+        if (!myProps.getProperty("key4").equals(":value4"))
+            throw new RuntimeException("Bad separator parsing");
+        if (myProps.getProperty("#") != null)
+            throw new RuntimeException(
+                "Does not recognize comments with leading spaces");
+        if ((size=myProps.size()) != 4)
+            throw new RuntimeException(
+                 "Wrong number of keys in Properties; expected 4, got " +
+                size + ".");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/java/util/Properties/LoadParsing2.java	Tue Jan 30 16:41:40 2018 +0100
@@ -0,0 +1,143 @@
+/*
+ * 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 4881291 4094886
+ * @summary checks for processing errors in properties.load
+ */
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.util.Properties;
+
+public class LoadParsing2 {
+    public static void main(String[] argv) throws Exception {
+        for (int i = 0; i < dfiles.length; i++) {
+            test(dfiles[i], keys[i], values[i], true);
+            test(dfiles[i], keys[i], values[i], false);
+        }
+    }
+
+    private static Properties getLoadedProperties(InputStream is,
+                                                  boolean doStream)
+        throws Exception
+    {
+        Properties props = new Properties();
+        if (doStream)
+            props.load(is);
+        else
+            props.load(new InputStreamReader(is, "UTF-8"));
+        return props;
+    }
+
+    private static void test(String fnData,
+                             String[] keys,
+                             String[] values,
+                             boolean doStream)
+        throws Exception
+    {
+        File f = new File(System.getProperty("test.src", "."), fnData);
+        FileInputStream myIn = new FileInputStream(f);
+        Properties myProps = getLoadedProperties(myIn, doStream);
+        for (int i = 0; i < keys.length; i++) {
+            if (!myProps.getProperty(keys[i]).equals(values[i])) {
+                throw new RuntimeException("Test1: Bad parsing at " + i);
+            }
+        }
+    }
+
+    static String[] keys1 = {
+        "\\",
+        "\\:key12",
+        "key16 b",
+        "key14_asdfa",
+        "\\\\",
+        "key8notassign",
+        "key17",
+        "key15",
+        "keyabcdef",
+        "key13dialog.3",
+        "key7",
+        "key6",
+        "key5",
+        "key3",
+        "key2",
+        "key1",
+        "key9 Term",
+        "key0"
+    };
+
+    static String[] keys2 = {
+        "key1",
+        "key2"
+    };
+
+    static String[] keys3 = {
+        "key1",
+        "key2"
+    };
+
+    static String[] values1 = {
+        "key10=bar",
+        "bar2",
+        " abcdef",
+        "",
+        "key11=bar2",
+        "abcdef",
+        "#barbaz",
+        " abcdef",
+        "",
+        "",
+        "Symbol,SYMBOL_CHARSET ",
+        "WingDings,SYMBOL_CHARSET \\abc",
+        "==Arial,ANSI_CHARSET",
+        "",
+        "= abcde",
+        "value1",
+        "ABCDE",
+        "abcd"
+    };
+
+    static String[] values2 = {
+        "-monotype-timesnewroman-regular-r---*-%d-*-*-p-*-iso8859-1serif.1a-monotype-timesnewroman-regular-r-normal--*-%d-*-*-p-*-iso8859-2serif.2a-b&h-LucidaBrightLat4-Normal-r-normal--*-%d-*-*-p-*-iso8859-4serif.3a-monotype-times-regular-r-normal--*-%d-*-*-p-*-iso8859-5serif.4a-monotype-timesnewromangreek-regular-r-normal--*-%d-*-*-p-*-iso8859-7serif.5a-monotype-times-regular-r-normal--*-%d-*-*-p-*-iso8859-9serif.6a-monotype-times-regular-r-normal--*-%d-*-*-p-*-iso8859-15serif.7a-hanyi-ming-medium-r-normal--*-%d-*-*-m-*-big5-1serif.8a-sun-song-medium-r-normal--*-%d-*-*-c-*-gb2312.1980-0serif.9a-ricoh-hgminchol-medium-r-normal--*-%d-*-*-m-*-jisx0201.1976-0serif.10a-ricoh-hgminchol-medium-r-normal--*-%d-*-*-m-*-jisx0208.1983-0serif.11a-ricoh-heiseimin-w3-r-normal--*-%d-*-*-m-*-jisx0212.1990-0serif.12a-hanyang-myeongjo-medium-r-normal--*-%d-*-*-m-*-ksc5601.1992-3serif.13a-urw-itczapfdingbats-medium-r-normal--*-%d-*-*-p-*-sun-fontspecificserif.14a-*-symbol-medium-r-normal--*-%d-*-*-p-*-sun-fontspecificbserif.italic.0=-monotype-timesbnewbroman-regular-i---*-%d-*-*-p-*-iso8859-1bserif.italic.1=-monotype-timesbnewbroman-regular-i-normal-italic-*-%d-*-*-p-*-iso8859-2",
+        "-b&h-LucidaBrightLat4-normal-i-normal-Italic-*-%d-*-*-p-*-iso8859-4"
+    };
+
+    static String[] values3 = {
+        "-monotype-times new roman-regular-r---*-%d-*-*-p-*-iso8859-1, -monotype-times new roman-regular-r-normal--*-%d-*-*-p-*-iso8859-2, -b&h-LucidaBrightLat4-Normal-r-normal--*-%d-*-*-p-*-iso8859-4, -monotype-times-regular-r-normal--*-%d-*-*-p-*-iso8859-5, -monotype-times new roman greek-regular-r-normal--*-%d-*-*-p-*-iso8859-7, -monotype-times-regular-r-normal--*-%d-*-*-p-*-iso8859-9, -monotype-times-regular-r-normal--*-%d-*-*-p-*-iso8859-15, -hanyi-ming-medium-r-normal--*-%d-*-*-m-*-big5-1, -sun-song-medium-r-normal--*-%d-*-*-c-*-gb2312.1980-0, -ricoh-hg gothic b-medium-r-normal--*-%d-*-*-m-*-jisx0201.1976-0, -ricoh-hg gothic b-medium-r-normal-*-*-%d-*-*-m-*-jisx0208.1983-0, -ricoh-heiseimin-w3-r-normal--*-%d-*-*-m-*-jisx0212.1990-0, -hanyang-myeongjo-medium-r-normal--*-%d-*-*-m-*-ksc5601.1992-3",
+        "-monotype-times new roman-regular-i---*-%d-*-*-p-*-iso8859-1, -monotype-times new roman-regular-i-normal-italic-*-%d-*-*-p-*-iso8859-2, -b&h-LucidaBrightLat4-normal-i-normal-Italic-*-%d-*-*-p-*-iso8859-4, -monotype-times-regular-i-normal-italic-*-%d-*-*-p-*-iso8859-5, -monotype-times new roman greek-regular-i-normal--*-%d-*-*-p-*-iso8859-7, -monotype-times-regular-i-normal-italic-*-%d-*-*-p-*-iso8859-9, -monotype-times-regular-i-normal--*-%d-*-*-p-*-iso8859-15, -hanyi-ming-medium-r-normal--*-%d-*-*-m-*-big5-1, -sun-song-medium-r-normal--*-%d-*-*-c-*-gb2312.1980-0, -ricoh-hg gothic b-medium-r-normal--*-%d-*-*-m-*-jisx0201.1976-0, -ricoh-hg gothic b-medium-r-normal-*-*-%d-*-*-m-*-jisx0208.1983-0, -ricoh-heiseimin-w3-r-normal--*-%d-*-*-m-*-jisx0212.1990-0, -hanyang-myeongjo-medium-r-normal--*-%d-*-*-m-*-ksc5601.1992-3"
+    };
+
+    static String[][] keys = {keys1, keys1, keys2, keys2, keys3};
+    static String[][] values = {values1, values1, values2, values2, values3};
+    static String[] dfiles = {
+        "testData1",
+        "testData1.dos",
+        "testData2",
+        "testData2.dos",
+        "testData3.dos"
+    };
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/java/util/Properties/LoadSeparators.java	Tue Jan 30 16:41:40 2018 +0100
@@ -0,0 +1,76 @@
+/*
+ * 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 4192678
+ * @summary Test loading of values that are key value separators
+ */
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.util.Properties;
+
+/**
+ * This class tests to see if a properties object can successfully save and
+ * load properties with a non-escaped value that is also a key value separator
+ *
+ */
+public class LoadSeparators {
+    public static void main(String[] argv) throws Exception {
+        try {
+            // Destroy old test file if any
+            // Create a properties file
+            File propFile = new File("testout");
+            propFile.delete();
+
+            // Create a properties file
+            FileOutputStream myOut = new FileOutputStream(propFile);
+            String testProperty = "Test3==";
+            myOut.write(testProperty.getBytes());
+            myOut.close();
+
+            // Load the properties set
+            FileInputStream myIn = new FileInputStream("testout");
+            Properties myNewProps = new Properties();
+            try {
+                myNewProps.load(myIn);
+            } finally {
+                myIn.close();
+            }
+
+            // Read in the test property
+            String equalSign = myNewProps.getProperty("Test3");
+
+            // Clean up
+            propFile.delete();
+
+            if (!equalSign.equals("="))
+                throw new Exception("Cannot read key-value separators.");
+        } catch (IOException e) {
+            System.err.println(e);
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/java/util/Properties/PropertiesTest.java	Tue Jan 30 16:41:40 2018 +0100
@@ -0,0 +1,494 @@
+/*
+ * 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 tests the load and store methods of Properties class
+ * @author Xueming Shen
+ * @bug 4094886
+ * @modules jdk.charsets
+ * @key randomness
+ */
+
+import java.io.BufferedReader;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.OutputStream;
+import java.io.OutputStreamWriter;
+import java.io.Reader;
+import java.io.Writer;
+import java.util.Properties;
+import java.util.Random;
+
+public class PropertiesTest {
+
+    private static boolean failure = false;
+    private static int failCount = 0;
+
+    /**
+     * Main to interpret arguments and run several tests.
+     *
+     */
+    public static void main(String[] args) throws Exception {
+        BlankLines();
+        EscapeSpace();
+        LoadParsing();
+        SaveEncoding();
+        SaveLoadBasher();
+        SaveSeparator();
+        SaveClose();
+        SaveComments();
+        UnicodeEscape();
+
+        if (failure)
+            throw new RuntimeException("Failure in Properties testing.");
+        else
+            System.err.println("OKAY: All tests passed.");
+    }
+
+    private static void report(String testName) {
+        int spacesToAdd = 30 - testName.length();
+        StringBuffer paddedNameBuffer = new StringBuffer(testName);
+        for (int i=0; i<spacesToAdd; i++)
+            paddedNameBuffer.append(" ");
+        String paddedName = paddedNameBuffer.toString();
+        System.err.println(paddedName + ": " +
+                           (failCount==0 ? "Passed":"Failed("+failCount+")"));
+        if (failCount > 0)
+            failure = true;
+        failCount = 0;
+    }
+
+    private static void check(Properties prop1, Properties prop2) {
+        if (!prop1.equals(prop2))
+            failCount++;
+    }
+
+    private static Reader getReader(String src, String csn)
+        throws Exception {
+        return new InputStreamReader(
+                   new ByteArrayInputStream(src.getBytes()),
+                   csn);
+    }
+
+    private static OutputStream getFOS(String name)
+        throws Exception
+    {
+        return new FileOutputStream(name);
+    }
+
+    private static Writer getFOSW(String name, String csn)
+        throws Exception
+    {
+        return new OutputStreamWriter(
+                   new FileOutputStream(name),
+                   csn);
+    }
+
+    private static Reader getReader(byte[] src, String csn)
+        throws Exception {
+        return new InputStreamReader(new ByteArrayInputStream(src), csn);
+    }
+
+    private static InputStream getInputStream(String src) {
+        return new ByteArrayInputStream(src.getBytes());
+    }
+
+    private static InputStream getInputStream(byte[] src) {
+        return new ByteArrayInputStream(src);
+    }
+
+    private static void BlankLines() throws Exception {
+        // write a single space to the output stream
+        ByteArrayOutputStream baos = new ByteArrayOutputStream();
+        baos.write(' ');
+        // test empty properties
+        Properties prop1 = new Properties();
+
+        // now load the file we just created, into a properties object.
+        // the properties object should have no elements, but due to a
+        // bug, it has an empty key/value. key = "", value = ""
+        Properties prop2 = new Properties();
+        prop2.load(getInputStream(baos.toByteArray()));
+        check(prop1, prop2);
+
+        // test reader
+        prop2 = new Properties();
+        prop2.load(getReader(baos.toByteArray(), "UTF-8"));
+        check(prop1, prop2);
+
+        report("BlinkLine");
+    }
+
+    private static void EscapeSpace() throws Exception {
+        String propsCases =
+            "key1=\\ \\ Value\\u4e001, has leading and trailing spaces\\  \n" +
+            "key2=Value\\u4e002,\\ does not have\\ leading or trailing\\ spaces\n" +
+            "key3=Value\\u4e003,has,no,spaces\n" +
+            "key4=Value\\u4e004, does not have leading spaces\\  \n" +
+            "key5=\\t\\ \\ Value\\u4e005, has leading tab and no trailing spaces\n" +
+            "key6=\\ \\ Value\\u4e006,doesnothaveembeddedspaces\\ \\ \n" +
+            "\\ key1\\ test\\ =key1, has leading and trailing spaces  \n" +
+            "key2\\ test=key2, does not have leading or trailing spaces\n" +
+            "key3test=key3,has,no,spaces\n" +
+            "key4\\ test\\ =key4, does not have leading spaces  \n" +
+            "\\t\\ key5\\ test=key5, has leading tab and no trailing spaces\n" +
+            "\\ \\ key6\\ \\ =\\  key6,doesnothaveembeddedspaces  ";
+
+        // Put the same properties, but without the escape char for space in
+        // value part.
+        Properties props = new Properties();
+        props.put("key1", "  Value\u4e001, has leading and trailing spaces  ");
+        props.put("key2", "Value\u4e002, does not have leading or trailing spaces");
+        props.put("key3", "Value\u4e003,has,no,spaces");
+        props.put("key4", "Value\u4e004, does not have leading spaces  ");
+        props.put("key5", "\t  Value\u4e005, has leading tab and no trailing spaces");
+        props.put("key6", "  Value\u4e006,doesnothaveembeddedspaces  ");
+        props.put(" key1 test ", "key1, has leading and trailing spaces  ");
+        props.put("key2 test", "key2, does not have leading or trailing spaces");
+        props.put("key3test", "key3,has,no,spaces");
+        props.put("key4 test ", "key4, does not have leading spaces  ");
+        props.put("\t key5 test", "key5, has leading tab and no trailing spaces");
+        props.put("  key6  ", "  key6,doesnothaveembeddedspaces  ");
+
+        // Load properties with escape character '\' before space characters
+        Properties props1 = new Properties();
+        props1.load(getInputStream(propsCases));
+        check(props1, props);
+
+        // Test Reader
+        props1 = new Properties();
+        props1.load(getReader(propsCases, "UTF-8"));
+        check(props1, props);
+
+        // Also store the new properties to a storage
+        ByteArrayOutputStream baos = new ByteArrayOutputStream();
+        props.store(baos, "EscapeSpace Test");
+
+        props1 = new Properties();
+        props1.load(getInputStream(baos.toByteArray()));
+        check(props1, props);
+
+        // Reader should work as well
+        props1 = new Properties();
+        props1.load(getReader(baos.toByteArray(), "UTF-8"));
+        check(props1, props);
+
+        // Try Writer
+        baos = new ByteArrayOutputStream();
+        props.store(new OutputStreamWriter(baos, "UTF-8"),
+                     "EscapeSpace Test");
+
+        props1 = new Properties();
+        props1.load(getReader(baos.toByteArray(), "UTF-8"));
+        check(props1, props);
+
+        report("EscapeSpace");
+    }
+
+    private static void LoadParsing() throws Exception {
+        File f = new File(System.getProperty("test.src", "."), "input.txt");
+        FileInputStream myIn = new FileInputStream(f);
+        Properties myProps = new Properties();
+        int size = 0;
+        try {
+            myProps.load(myIn);
+        } finally {
+            myIn.close();
+        }
+
+        if (!myProps.getProperty("key1").equals("value1")      || // comment
+            !myProps.getProperty("key2").equals("abc\\defg\\") || // slash
+            !myProps.getProperty("key3").equals("value3")      || // spaces in key
+            !myProps.getProperty("key4").equals(":value4")     || // separator
+            // Does not recognize comments with leading spaces
+            (myProps.getProperty("#") != null)                 ||
+            // Wrong number of keys in Properties
+            ((size=myProps.size()) != 4))
+            failCount++;
+        report("LoadParsing");
+    }
+
+    private static void SaveEncoding() throws Exception {
+        // Create a properties object to save
+        Properties props = new Properties();
+        props.put("signal", "val\u0019");
+        props.put("ABC 10", "value0");
+        props.put("\uff10test", "value\u0020");
+        props.put("key with spaces", "value with spaces");
+        props.put("key with space and Chinese_\u4e00", "valueWithChinese_\u4e00");
+        props.put(" special#=key ", "value3");
+
+        // Save the properties and check output
+        ByteArrayOutputStream baos = new ByteArrayOutputStream();
+        props.store(baos,"A test");
+
+        // Read properties file and verify \u0019
+        BufferedReader in = new BufferedReader(
+                                new InputStreamReader(
+                                    new ByteArrayInputStream(
+                                        baos.toByteArray())));
+        String firstLine = "foo";
+        while (!firstLine.startsWith("signal"))
+            firstLine = in.readLine();
+        if (firstLine.length() != 16)
+            failCount++;
+
+        // Load the properties set
+        Properties newProps = new Properties();
+        newProps.load(getInputStream(baos.toByteArray()));
+        check(newProps, props);
+
+        // Store(Writer)/Load(Reader)
+        baos = new ByteArrayOutputStream();
+        props.store(new OutputStreamWriter(baos, "EUC_JP"), "A test");
+        newProps = new Properties();
+        newProps.load(getReader(baos.toByteArray(), "EUC_JP"));
+        check(newProps, props);
+
+        report("SaveEncoding");
+    }
+
+   /**
+    * This class tests to see if a properties object
+    * can successfully save and load properties
+    * using character encoding
+    */
+    private static void SaveLoadBasher() throws Exception {
+        String keyValueSeparators = "=: \t\r\n\f#!\\";
+
+        Properties originalProps = new Properties();
+        Properties loadedProps = new Properties();
+
+        // Generate a unicode key and value
+        Random generator = new Random();
+        int achar=0;
+        StringBuffer aKeyBuffer = new StringBuffer(120);
+        StringBuffer aValueBuffer = new StringBuffer(120);
+        String aKey;
+        String aValue;
+        int maxKeyLen = 100;
+        int maxValueLen = 100;
+        int maxPropsNum = 300;
+        for (int x=0; x<maxPropsNum; x++) {
+            for(int y=0; y<maxKeyLen; y++) {
+                achar = generator.nextInt();
+                char test;
+                if(achar < 99999) {
+                    test = (char)(achar);
+                }
+                else {
+                    int zz = achar % 10;
+                    test = keyValueSeparators.charAt(zz);
+                }
+                if (Character.isHighSurrogate(test)) {
+                    aKeyBuffer.append(test);
+                    aKeyBuffer.append('\udc00');
+                    y++;
+                } else if (Character.isLowSurrogate(test)) {
+                    aKeyBuffer.append('\ud800');
+                    aKeyBuffer.append(test);
+                    y++;
+                } else
+                    aKeyBuffer.append(test);
+            }
+            aKey = aKeyBuffer.toString();
+            for(int y=0; y<maxValueLen; y++) {
+                achar = generator.nextInt();
+                char test = (char)(achar);
+                if (Character.isHighSurrogate(test)) {
+                    aKeyBuffer.append(test);
+                    aKeyBuffer.append('\udc00');
+                    y++;
+                } else if (Character.isLowSurrogate(test)) {
+                    aKeyBuffer.append('\ud800');
+                    aKeyBuffer.append(test);
+                    y++;
+                } else {
+                    aValueBuffer.append(test);
+                }
+            }
+            aValue = aValueBuffer.toString();
+
+            // Attempt to add to original
+            try {
+                originalProps.put(aKey, aValue);
+            }
+            catch (IllegalArgumentException e) {
+                System.err.println("disallowing...");
+            }
+            aKeyBuffer.setLength(0);
+            aValueBuffer.setLength(0);
+        }
+
+        // Store(OutputStream)/Load(InputStream)
+        ByteArrayOutputStream baos = new ByteArrayOutputStream();
+        originalProps.store(baos, "test properties");
+        loadedProps.load(getInputStream(baos.toByteArray()));
+        check(loadedProps, originalProps);
+
+        // Store(Writer)/Load(Reader)
+        baos = new ByteArrayOutputStream();
+        originalProps.store(new OutputStreamWriter(baos, "UTF-8"),
+                            "test properties");
+        loadedProps.load(getReader(baos.toByteArray(), "UTF-8"));
+        check(loadedProps, originalProps);
+
+        report("SaveLoadBasher");
+    }
+
+
+    /* Note: this regression test only detects incorrect line
+     * separator on platform running the test
+     */
+    private static void SaveSeparator() throws Exception {
+        ByteArrayOutputStream baos = new ByteArrayOutputStream();
+        Properties props = new Properties();
+        props.store(baos, "A test");
+
+        // Examine the result to verify that line.separator was used
+        String theSeparator = System.getProperty("line.separator");
+        String content = baos.toString();
+        if (!content.endsWith(theSeparator))
+            failCount++;
+
+        // store(Writer)
+        baos = new ByteArrayOutputStream();
+        props.store(new OutputStreamWriter(baos, "UTF-8"), "A test");
+        content = baos.toString();
+        if (!content.endsWith(theSeparator))
+            failCount++;
+
+        report("SaveSeparator");
+    }
+
+    // Ensure that the save method doesn't close its output stream
+    private static void SaveClose() throws Exception {
+        Properties p = new Properties();
+        p.put("Foo", "Bar");
+        class MyOS extends ByteArrayOutputStream {
+            boolean closed = false;
+            public void close() throws IOException {
+                this.closed = true;
+            }
+        }
+        MyOS myos = new MyOS();
+        p.store(myos, "Test");
+        if (myos.closed)
+            failCount++;
+
+        p.store(new OutputStreamWriter(myos, "UTF-8"), "Test");
+        if (myos.closed)
+            failCount++;
+
+        report ("SaveClose");
+    }
+
+    private static void UnicodeEscape() throws Exception {
+        ByteArrayOutputStream baos = new ByteArrayOutputStream();
+        OutputStreamWriter osw = new OutputStreamWriter(baos);
+        osw.write("a=b\nb=\\u0\n");
+        osw.close();
+        Properties props = new Properties();
+        boolean failed = true;
+        try {
+            props.load(getInputStream(baos.toByteArray()));
+        } catch (IllegalArgumentException iae) {
+            failed = false;
+        }
+        if (failed)
+            failCount++;
+
+        failed = true;
+        props = new Properties();
+        try {
+            props.load(getReader(baos.toByteArray(), "UTF-8"));
+        } catch (IllegalArgumentException iae) {
+            failed = false;
+        }
+        if (failed)
+            failCount++;
+        report("UnicodeEscape");
+    }
+
+    private static void SaveComments() throws Exception {
+        String ls = System.getProperty("line.separator");
+        String[] input = new String[] {
+          "Comments with \u4e2d\u6587\u6c49\u5b57 included",
+          "Comments with \n Second comments line",
+          "Comments with \n# Second comments line",
+          "Comments with \n! Second comments line",
+          "Comments with last character is \n",
+          "Comments with last character is \r\n",
+          "Comments with last two characters are \n\n",
+          "Comments with last four characters are \r\n\r\n",
+          "Comments with \nkey4=value4",
+          "Comments with \n#key4=value4"};
+
+        String[] output = new String[] {
+          "#Comments with \\u4E2D\\u6587\\u6C49\\u5B57 included" + ls,
+          "#Comments with " + ls + "# Second comments line" + ls,
+          "#Comments with " + ls + "# Second comments line" + ls,
+          "#Comments with " + ls + "! Second comments line" + ls,
+          "#Comments with last character is " + ls+"#"+ls,
+          "#Comments with last character is " + ls+"#"+ls,
+          "#Comments with last two characters are " + ls+"#"+ls+"#"+ls,
+          "#Comments with last four characters are " + ls+"#"+ls+"#"+ls};
+
+        Properties props = new Properties();
+        ByteArrayOutputStream baos;
+        int i = 0;
+        for (i = 0; i < output.length; i++) {
+            baos = new ByteArrayOutputStream();
+            props.store(baos, input[i]);
+            String result = baos.toString("iso8859-1");
+            if (result.indexOf(output[i]) == -1) {
+                failCount++;
+            }
+        }
+        props.put("key1", "value1");
+        props.put("key2", "value2");
+        props.put("key3", "value3");
+        for (; i < input.length; i++) {
+            baos = new ByteArrayOutputStream();
+            props.store(baos, input[i]);
+            Properties propsNew = new Properties();
+            propsNew.load(getInputStream(baos.toByteArray()));
+            check(propsNew, props);
+
+            baos = new ByteArrayOutputStream();
+            props.store(new OutputStreamWriter(baos, "UTF-8"),
+                        input[i]);
+            propsNew = new Properties();
+            propsNew.load(getReader(baos.toByteArray(), "UTF-8"));
+            check(propsNew, props);
+        }
+        report("SaveComments");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/java/util/Properties/Save.java	Tue Jan 30 16:41:40 2018 +0100
@@ -0,0 +1,74 @@
+/*
+ * 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 4034428
+ * @summary Test for leading space in values output from properties
+ */
+
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.util.Properties;
+
+/**
+ * This class tests to see if the properties object saves
+ * leading space in the value of a property as it should
+ * do according to the JLS
+ */
+public class Save {
+
+    public static void main(String argv[]) {
+        int testSucceeded=0;
+        FileOutputStream myOutput;
+
+        // create a properties object to save
+        Properties myProperties = new Properties();
+        String value = "   spacesfirst";
+        myProperties.put("atest", value);
+
+        try {
+            // save the object and check output
+            myOutput = new FileOutputStream("testout");
+            myProperties.store(myOutput,"A test");
+            myOutput.close();
+
+            //load the properties set
+            FileInputStream myIn = new FileInputStream("testout");
+            Properties myNewProps = new Properties();
+            try {
+                myNewProps.load(myIn);
+            } finally {
+                myIn.close();
+            }
+
+            //check the results
+            String newValue = (String) myNewProps.get("atest");
+            if (!newValue.equals(value))
+                throw new RuntimeException(
+                    "Properties does not save leading spaces in values correctly.");
+         } catch (IOException e) { //do nothing
+         }
+     }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/java/util/Properties/SaveClose.java	Tue Jan 30 16:41:40 2018 +0100
@@ -0,0 +1,64 @@
+/*
+ * 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 4095273
+ * @summary Ensure that the save method doesn't close its output stream
+ * @author Mark Reinhold
+ */
+
+import java.util.Properties;
+import java.io.OutputStream;
+import java.io.FilterOutputStream;
+import java.io.IOException;
+
+
+public class SaveClose {
+
+
+    static class O extends FilterOutputStream {
+
+        boolean closed = false;
+
+        O(OutputStream o) {
+            super(o);
+        }
+
+        public void close() throws IOException {
+            this.closed = true;
+        }
+
+    }
+
+
+    public static void main(String argv[]) throws Exception {
+        Properties p = new Properties();
+        p.put("Foo", "Bar");
+        O o = new O(System.err);
+        p.store(o, "Test");
+        if (o.closed)
+            throw new Exception("Properties.save closed its output stream");
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/java/util/Properties/SaveComments.java	Tue Jan 30 16:41:40 2018 +0100
@@ -0,0 +1,97 @@
+/*
+ * 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 5087448
+ * @summary Verify that property.save saves comments correctly
+ */
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.util.Properties;
+
+public class SaveComments {
+
+    public static void main(String[] argv) throws IOException {
+        String ls = System.getProperty("line.separator");
+        String[] input = new String[] {
+          "Comments with \u4e2d\u6587\u6c49\u5b57 included",
+          "Comments with \n Second comments line",
+          "Comments with \n# Second comments line",
+          "Comments with \n! Second comments line",
+          "Comments with last character is \n",
+          "Comments with last character is \r\n",
+          "Comments with last two characters are \n\n",
+          "Comments with last four characters are \r\n\r\n",
+          "Comments with \nkey4=value4",
+          "Comments with \n#key4=value4"};
+
+        String[] output = new String[] {
+          "#Comments with \\u4E2D\\u6587\\u6C49\\u5B57 included" + ls,
+          "#Comments with " + ls + "# Second comments line" + ls,
+          "#Comments with " + ls + "# Second comments line" + ls,
+          "#Comments with " + ls + "! Second comments line" + ls,
+          "#Comments with last character is " + ls+"#"+ls,
+          "#Comments with last character is " + ls+"#"+ls,
+          "#Comments with last two characters are " + ls+"#"+ls+"#"+ls,
+          "#Comments with last four characters are " + ls+"#"+ls+"#"+ls};
+
+        Properties props = new Properties();
+        boolean failed = false;
+        int i = 0;
+        for (i = 0; i < output.length; i++) {
+            ByteArrayOutputStream baos = new ByteArrayOutputStream(200);
+            props.store(baos, input[i]);
+            String result = baos.toString("iso8859-1");
+            if (result.indexOf(output[i]) == -1) {
+                System.out.println("Wrong \"store()\" output:");
+                System.out.println(result);
+                failed = true;
+            }
+        }
+
+        props.put("key1", "value1");
+        props.put("key2", "value2");
+        props.put("key3", "value3");
+        for (; i < input.length; i++) {
+            ByteArrayOutputStream baos = new ByteArrayOutputStream(200);
+            props.store(baos, input[i]);
+            Properties propsNew = new Properties();
+            propsNew.load(new ByteArrayInputStream(baos.toByteArray()));
+            /*
+            Set<Map.Entry<Object, Object>> kvsetNew = propsNew.entrySet();
+            Set<Map.Entry<Object, Object>> kvset = props.entrySet();
+            if (!kvsetNew.containsAll(kvset) || !kvset.containsAll(kvsetNew)) {
+            */
+            if (!props.equals (propsNew)) {
+                System.out.println("Wrong output:");
+                System.out.println(baos.toString("iso8859-1"));
+                failed = true;
+            }
+        }
+        if (failed)
+            throw new RuntimeException("Incorrect Properties Comment Output.");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/java/util/Properties/SaveEncoding.java	Tue Jan 30 16:41:40 2018 +0100
@@ -0,0 +1,94 @@
+/*
+ * 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 4026910 4011163 4077980 4096786 4213537
+  * @summary Test for saving and loading encoded keys and values
+  */
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.util.Properties;
+
+/**
+ * This class tests to see if the properties object saves
+ * and loads keys and values properly
+ */
+public class SaveEncoding {
+
+    public static void main(String argv[]) {
+        int testSucceeded=0;
+        FileOutputStream myOutput;
+
+        // Create a properties object to save
+        Properties myProperties = new Properties();
+        myProperties.put("signal", "val\u0019");
+        myProperties.put("ABC 10", "value0");
+        myProperties.put("\uff10test", "value\u0020");
+        myProperties.put("key with spaces", "value with spaces");
+        myProperties.put(" special#=key ", "value3");
+
+        try {
+            // Destroy old test file if any
+            File myFile = new File("testout");
+            myFile.delete();
+
+            // Save the object and check output
+            myOutput = new FileOutputStream("testout");
+            myProperties.store(myOutput,"A test");
+            myOutput.close();
+
+            // Read properties file and verify \u0019
+            FileInputStream inFile = new FileInputStream("testout");
+            BufferedReader in = new BufferedReader(
+                                new InputStreamReader(inFile));
+            String firstLine = "foo";
+            while (!firstLine.startsWith("signal"))
+                firstLine = in.readLine();
+            inFile.close();
+            if (firstLine.length() != 16)
+                throw new RuntimeException(
+                    "Incorrect storage of values < 32.");
+
+            // Load the properties set
+            FileInputStream myIn = new FileInputStream("testout");
+            Properties myNewProps = new Properties();
+            try {
+                myNewProps.load(myIn);
+            } finally {
+                myIn.close();
+            }
+
+            // Check the results
+            if (!myNewProps.equals(myProperties))
+                throw new RuntimeException(
+                    "Properties is not character encoding safe.");
+        } catch (IOException e) { // Do nothing
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/java/util/Properties/SaveLoadBasher.java	Tue Jan 30 16:41:40 2018 +0100
@@ -0,0 +1,117 @@
+/*
+ * 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 4077980 4011163 4096786 4075955
+ * @summary Test properties save and load methods
+ * @key randomness
+ */
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.util.Properties;
+import java.util.Random;
+
+/**
+ * This class tests to see if a properties object
+ * can successfully save and load properties
+ * using character encoding
+ */
+public class SaveLoadBasher {
+
+    private static String keyValueSeparators = "=: \t\r\n\f#!\\";
+
+    public static void main(String[] args) throws Exception {
+
+        Properties originalProps = new Properties();
+        Properties loadedProps = new Properties();
+
+        // Generate a unicode key and value
+        Random generator = new Random();
+        int achar=0;
+        StringBuffer aKeyBuffer = new StringBuffer(120);
+        StringBuffer aValueBuffer = new StringBuffer(120);
+        String aKey;
+        String aValue;
+        for (int x=0; x<300; x++) {
+            for(int y=0; y<100; y++) {
+                achar = generator.nextInt();
+                char test;
+                if(achar < 99999) {
+                    test = (char)(achar);
+                }
+                else {
+                    int zz = achar % 10;
+                    test = keyValueSeparators.charAt(zz);
+                }
+                aKeyBuffer.append(test);
+            }
+            aKey = aKeyBuffer.toString();
+            for(int y=0; y<100; y++) {
+                achar = generator.nextInt();
+                char test = (char)(achar);
+                aValueBuffer.append(test);
+            }
+            aValue = aValueBuffer.toString();
+
+            // Attempt to add to original
+            try {
+                originalProps.put(aKey, aValue);
+            }
+            catch (IllegalArgumentException e) {
+                System.err.println("disallowing...");
+            }
+            aKeyBuffer.setLength(0);
+            aValueBuffer.setLength(0);
+        }
+
+        // Destroy old test file if it exists
+        File oldTestFile = new File("props3");
+        oldTestFile.delete();
+
+        // Save original
+        System.out.println("Saving...");
+        OutputStream out = new FileOutputStream("props3");
+        originalProps.store(out, "test properties");
+        out.close();
+
+        // Load in the set
+        System.out.println("Loading...");
+        InputStream in = new FileInputStream("props3");
+        try {
+            loadedProps.load(in);
+        } finally {
+            in.close();
+        }
+
+        // Compare results
+        if (!originalProps.equals(loadedProps))
+           throw new RuntimeException("Properties load and save failed");
+
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/java/util/Properties/SaveSeparator.java	Tue Jan 30 16:41:40 2018 +0100
@@ -0,0 +1,52 @@
+/*
+ * 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 4062657
+ * @summary Verify that property.save uses local lineseparator
+ */
+
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.util.Properties;
+
+/* Note: this regression test only detects incorrect line
+ * separator on platform running the test
+ */
+
+public class SaveSeparator {
+
+    public static void main(String[] argv) throws IOException {
+        // Save a property set
+        Properties myProps = new Properties();
+        ByteArrayOutputStream myOut = new ByteArrayOutputStream(40);
+        myProps.store(myOut, "A test");
+
+        // Examine the result to verify that line.separator was used
+        String theSeparator = System.getProperty("line.separator");
+        String content = myOut.toString();
+        if (!content.endsWith(theSeparator))
+            throw new RuntimeException("Incorrect Properties line separator.");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/java/util/Properties/StoreDeadlock.java	Tue Jan 30 16:41:40 2018 +0100
@@ -0,0 +1,65 @@
+/*
+ * 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 6199320
+ * @summary Properties.store() causes deadlock when concurrently calling TimeZone apis
+ * @run main/timeout=20 StoreDeadlock
+ * @author Xueming Shen
+ */
+
+import java.io.IOException;
+import java.util.Properties;
+import java.util.TimeZone;
+
+public class StoreDeadlock {
+    public StoreDeadlock() {
+        Properties sysproperty = System.getProperties();
+        Thread1 t1 = new Thread1(sysproperty);
+        Thread2 t2 = new Thread2();
+        t1.start();
+        t2.start();
+    }
+    public static void main(String[] args) {
+        StoreDeadlock deadlock = new StoreDeadlock();
+    }
+    class Thread1 extends Thread {
+        Properties sp;
+        public Thread1(Properties p) {
+            sp = p;
+        }
+        public void run() {
+            try {
+                sp.store(System.out, null);
+            } catch (IOException e) {
+                System.out.println("IOException : " + e);
+            }
+        }
+    }
+    class Thread2 extends Thread {
+        public void run() {
+            System.out.println("tz=" + TimeZone.getTimeZone("PST"));
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/java/util/Properties/StringPropertyNames.java	Tue Jan 30 16:41:40 2018 +0100
@@ -0,0 +1,173 @@
+/*
+ * 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     6253413 8059361
+ * @summary Test for Properties.stringPropertyNames() if the system
+ *          properties contain another list of properties as the defaults.
+ * @author  Mandy Chung
+ *
+ * @run build StringPropertyNames
+ * @run main  StringPropertyNames
+ */
+
+import java.util.Properties;
+import java.util.Enumeration;
+import java.util.Iterator;
+import java.util.Set;
+
+public class StringPropertyNames {
+    private static int NUM_SHARE_PROPS = 2;
+    private static int NUM_PROPS1 = 3;
+    private static int NUM_PROPS2 = 5;
+    private static String KEY = "good.property.";
+    private static String VALUE = "good.value.";
+    public static void main(String[] argv) throws Exception {
+        Properties props1 = new Properties();
+        Properties props2 = new Properties(props1);
+
+        // add several new properties
+        for (int i = 0; i < NUM_PROPS1; i++) {
+            props1.put(KEY + "1." + i, VALUE + "1." + i);
+        }
+        for (int i = 0; i < NUM_PROPS2; i++) {
+            props2.put(KEY + "2." + i, VALUE + "2." + i);
+        }
+
+        // add the same properties in both props1 and props2
+        for (int i = 0; i < NUM_SHARE_PROPS; i++) {
+            props1.put(KEY + i, VALUE + "1." + i);
+            props2.put(KEY + i, VALUE + "2." + i);
+        }
+        checkProperties(props1,
+                        NUM_PROPS1 + NUM_SHARE_PROPS, // size of props1
+                        NUM_PROPS1 + NUM_SHARE_PROPS, // num of string keys
+                        NUM_PROPS1 + NUM_SHARE_PROPS, // num of keys in propertyName(),
+                        false);
+        checkProperties(props2,
+                        NUM_PROPS2 + NUM_SHARE_PROPS, // size of props2
+                        NUM_PROPS1 + NUM_PROPS2 + NUM_SHARE_PROPS, // num of string keys
+                        NUM_PROPS1 + NUM_PROPS2 + NUM_SHARE_PROPS, // num of keys in propertyName(),
+                        false);
+
+        // Add non-String value
+        props1.put(KEY + "9", new Integer(4));
+        checkProperties(props1,
+                        NUM_PROPS1 + NUM_SHARE_PROPS + 1, // size of props1
+                        NUM_PROPS1 + NUM_SHARE_PROPS, // num of string keys
+                        NUM_PROPS1 + NUM_SHARE_PROPS + 1, // num of keys in propertyName(),
+                        false);
+        checkProperties(props2,
+                        NUM_PROPS2 + NUM_SHARE_PROPS, // size of props2
+                        NUM_PROPS1 + NUM_PROPS2 + NUM_SHARE_PROPS, // num of string keys
+                        NUM_PROPS1 + NUM_PROPS2 + NUM_SHARE_PROPS + 1, // num of keys in propertyName(),
+                        false);
+        Object v = props1.remove(KEY + "9");
+        if (v == null) {
+            throw new RuntimeException("Test Failed: " +
+                "Key " + KEY + "9" + " not found");
+        }
+
+        // Add a non-String key
+        props1.put(new Integer(5), "good.value.5");
+        props2.put(new Object(), new Object());
+        checkProperties(props1,
+                        NUM_PROPS1 + NUM_SHARE_PROPS + 1, // size of props1
+                        NUM_PROPS1 + NUM_SHARE_PROPS, // num of string keys
+                        NUM_PROPS1 + NUM_SHARE_PROPS + 1, // num of keys in propertyName(),
+                        true);
+        checkProperties(props2,
+                        NUM_PROPS2 + NUM_SHARE_PROPS + 1, // size of props2
+                        NUM_PROPS1 + NUM_PROPS2 + NUM_SHARE_PROPS, // num of string keys
+                        NUM_PROPS1 + NUM_PROPS2 + NUM_SHARE_PROPS + 2, // num of keys in propertyName(),
+                        true);
+        System.out.println("Test passed.");
+    }
+
+    private static void checkProperties(Properties props,
+                                        int propSize,
+                                        int numStringKeys,
+                                        int enumerateSize,
+                                        boolean hasNonStringKeys) {
+        // check the size of the properties
+        if (props.size() != propSize) {
+            throw new RuntimeException("Test Failed: " +
+                "Expected number of properties = " +
+                propSize + " but found = " + props.size());
+        }
+
+        // check the number of properties whose key and value
+        // are both strings
+        Set<String> keys = props.stringPropertyNames();
+        if (keys.size() != numStringKeys) {
+            throw new RuntimeException("Test Failed: " +
+                "Expected number of String keys = " +
+                numStringKeys + " but found = " + keys.size());
+        }
+        boolean cceThrown = false;
+        try {
+            // check the number of properties whose key are strings
+            // but its value can be anything in the current impl
+            int count = 0;
+            Enumeration<?> e = props.propertyNames();
+            for (;e.hasMoreElements(); e.nextElement()) {
+                count++;
+            }
+            if (count != enumerateSize) {
+                throw new RuntimeException("Test Failed: " +
+                    "Expected number of enumerated keys = " +
+                    enumerateSize + " but found = " + count);
+            }
+        } catch (ClassCastException e) {
+            if (!hasNonStringKeys) {
+                RuntimeException re = new RuntimeException("Test Failed: " +
+                    "ClassCastException is expected not to be thrown");
+                re.initCause(e);
+                throw re;
+            }
+            cceThrown = true;
+        }
+
+        if ((hasNonStringKeys && !cceThrown)) {
+            throw new RuntimeException("Test Failed: " +
+                "ClassCastException is expected to be thrown");
+        }
+
+        // make sure the set cannot be modified
+        try {
+            keys.add("xyzzy");
+            throw new RuntimeException("Test Failed: " +
+                "add() should have thrown UnsupportedOperationException");
+        } catch (UnsupportedOperationException ignore) { }
+
+        Iterator<String> it = keys.iterator();
+        if (it.hasNext()) {
+            try {
+                keys.remove(it.next());
+                throw new RuntimeException("Test Failed: " +
+                    "remove() should have thrown UnsupportedOperationException");
+            } catch (UnsupportedOperationException ignore) { }
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/java/util/Properties/UnicodeEscape.java	Tue Jan 30 16:41:40 2018 +0100
@@ -0,0 +1,59 @@
+/*
+ * 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 4792682
+ * @summary Test for correct exception with a short unicode escape
+*/
+
+import java.io.FileInputStream;
+import java.io.FileWriter;
+import java.io.InputStream;
+import java.util.Properties;
+
+public class UnicodeEscape {
+
+    public static void main(String argv[]) throws Exception {
+        save();
+        load();
+    }
+
+    private static void save() throws Exception {
+        FileWriter out = new FileWriter("a.properties");
+        out.write("a=b\nb=\\u0\n");
+        out.close();
+    }
+
+    private static void load() throws Exception {
+        Properties properties = new Properties();
+        InputStream in = new FileInputStream("a.properties");
+        try {
+            properties.load(in);
+        } catch (IllegalArgumentException iae) {
+            // Correct result
+        } finally {
+            in.close();
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/java/util/Properties/XMLSaveLoadBasher.java	Tue Jan 30 16:41:40 2018 +0100
@@ -0,0 +1,123 @@
+/*
+ * 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 4749531 5015114 5055738
+ * @summary Test properties XML save and load methods
+ * @key randomness
+ */
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.util.Properties;
+import java.util.Random;
+
+/**
+ * This class tests to see if a properties object
+ * can successfully save and load properties in XML
+ */
+public class XMLSaveLoadBasher {
+
+    private static final int MAX_KEY_SIZE = 120;
+    private static final int MIN_KEY_SIZE = 1;
+    private static final int MAX_VALUE_SIZE = 120;
+    private static final int MIN_VALUE_SIZE = 0;
+
+    public static void main(String[] args) throws Exception {
+        testSaveLoad("UTF-8", "test save");
+        testSaveLoad("UTF-8", null);
+        testSaveLoad("ISO-8859-1", "test save");
+        testSaveLoad("KOI8-R", "test save");
+    }
+
+    private static void testSaveLoad(String encoding, String comment)
+        throws Exception
+    {
+        Properties originalProps = new Properties();
+        Properties loadedProps = new Properties();
+
+        // Generate a unicode key and value
+        Random generator = new Random();
+
+        for (int x=0; x<10; x++) {
+            String aKey;
+            String aValue;
+
+            // Assumes MAX_KEY_SIZE >> MIN_KEY_SIZE
+            int keyLen = generator.nextInt(MAX_KEY_SIZE - MIN_KEY_SIZE + 1) +
+                         MIN_KEY_SIZE;
+            int valLen = generator.nextInt(
+                MAX_VALUE_SIZE - MIN_VALUE_SIZE + 1) + MIN_VALUE_SIZE;
+
+            StringBuffer aKeyBuffer = new StringBuffer(keyLen);
+            StringBuffer aValueBuffer = new StringBuffer(valLen);
+
+            for(int y=0; y<keyLen; y++) {
+                char test = (char)(generator.nextInt(6527) + 32);
+                aKeyBuffer.append(test);
+            }
+            aKey = aKeyBuffer.toString();
+
+            for(int y=0; y<valLen; y++) {
+                char test = (char)(generator.nextInt(6527) + 32);
+                aValueBuffer.append(test);
+            }
+            aValue = aValueBuffer.toString();
+
+            // Attempt to add to original
+            try {
+                originalProps.setProperty(aKey, aValue);
+            } catch (IllegalArgumentException e) {
+                System.err.println("disallowing...");
+            }
+        }
+
+        //originalProps.put("squid", "kraken");
+        //originalProps.put("demon", "furnace");
+
+        // Destroy old test file if it exists
+        File oldTestFile = new File("props3");
+        oldTestFile.delete();
+
+        // Save original
+        System.err.println("Saving...");
+        try (OutputStream out = new FileOutputStream("props3")) {
+            originalProps.storeToXML(out, comment, encoding);
+        }
+
+        // Load in the set
+        System.err.println("Loading...");
+        try (InputStream in = new FileInputStream("props3")) {
+            loadedProps.loadFromXML(in);
+        }
+
+        // Compare results
+        if (!originalProps.equals(loadedProps))
+           throw new RuntimeException("Properties load and save failed");
+
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/java/util/Properties/input.txt	Tue Jan 30 16:41:40 2018 +0100
@@ -0,0 +1,10 @@
+# this input file is used for the LoadParsing.java test
+# comment ending with slash \
+key1 = value1
+key2 = abc\\\
+def\
+g\\
+   key3 =   value3
+key4 = :value4
+ # comment with leading space
+#key = comment without line terminator
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/java/util/Properties/testData1	Tue Jan 30 16:41:40 2018 +0100
@@ -0,0 +1,35 @@
+# testcases
+key0=abcd\
+
+\
+key1=value1
+
+key2 \= abcde
+key3
+
+   #key4=abcde
+key5 ===Arial,ANSI_CHARSET
+key6= WingDings,SYMBOL_CHARSET \\\
+ abc
+key7 Symbol,SYMBOL_CHARSET \
+
+	keyabcdef
+
+key8notassign   abcdef
+key9\ Term=ABCDE
+
+\\:key10=bar
+
+\\\\:key11=bar2
+
+\\\:key12=bar2
+
+key13dialog.3=
+key14_asdfa    
+key15  \ abcdef
+key16\ b=  \ abcdef
+key17=\
+#bar\
+baz
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/java/util/Properties/testData1.dos	Tue Jan 30 16:41:40 2018 +0100
@@ -0,0 +1,35 @@
+# testcases
+key0=abcd\
+
+\
+key1=value1
+
+key2 \= abcde
+key3
+
+   #key4=abcde
+key5 ===Arial,ANSI_CHARSET
+key6= WingDings,SYMBOL_CHARSET \\\
+ abc
+key7 Symbol,SYMBOL_CHARSET \
+
+	keyabcdef
+
+key8notassign   abcdef
+key9\ Term=ABCDE
+
+\\:key10=bar
+
+\\\\:key11=bar2
+
+\\\:key12=bar2
+
+key13dialog.3=
+key14_asdfa    
+key15  \ abcdef
+key16\ b=  \ abcdef
+key17=\
+#bar\
+baz
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/java/util/Properties/testData2	Tue Jan 30 16:41:40 2018 +0100
@@ -0,0 +1,4 @@
+#
+key1=-monotype-timesnewroman-regular-r---*-%d-*-*-p-*-iso8859-1serif.1a-monotype-timesnewroman-regular-r-normal--*-%d-*-*-p-*-iso8859-2serif.2a-b&h-LucidaBrightLat4-Normal-r-normal--*-%d-*-*-p-*-iso8859-4serif.3a-monotype-times-regular-r-normal--*-%d-*-*-p-*-iso8859-5serif.4a-monotype-timesnewromangreek-regular-r-normal--*-%d-*-*-p-*-iso8859-7serif.5a-monotype-times-regular-r-normal--*-%d-*-*-p-*-iso8859-9serif.6a-monotype-times-regular-r-normal--*-%d-*-*-p-*-iso8859-15serif.7a-hanyi-ming-medium-r-normal--*-%d-*-*-m-*-big5-1serif.8a-sun-song-medium-r-normal--*-%d-*-*-c-*-gb2312.1980-0serif.9a-ricoh-hgminchol-medium-r-normal--*-%d-*-*-m-*-jisx0201.1976-0serif.10a-ricoh-hgminchol-medium-r-normal--*-%d-*-*-m-*-jisx0208.1983-0serif.11a-ricoh-heiseimin-w3-r-normal--*-%d-*-*-m-*-jisx0212.1990-0serif.12a-hanyang-myeongjo-medium-r-normal--*-%d-*-*-m-*-ksc5601.1992-3serif.13a-urw-itczapfdingbats-medium-r-normal--*-%d-*-*-p-*-sun-fontspecificserif.14a-*-symbol-medium-r-normal--*-%d-*-*-p-*-sun-fontspecificbserif.italic.0=-monotype-timesbnewbroman-regular-i---*-%d-*-*-p-*-iso8859-1bserif.italic.1=-monotype-timesbnewbroman-regular-i-normal-italic-*-%d-*-*-p-*-iso8859-2
+
+key2=-b&h-LucidaBrightLat4-normal-i-normal-Italic-*-%d-*-*-p-*-iso8859-4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/java/util/Properties/testData2.dos	Tue Jan 30 16:41:40 2018 +0100
@@ -0,0 +1,4 @@
+#
+key1=-monotype-timesnewroman-regular-r---*-%d-*-*-p-*-iso8859-1serif.1a-monotype-timesnewroman-regular-r-normal--*-%d-*-*-p-*-iso8859-2serif.2a-b&h-LucidaBrightLat4-Normal-r-normal--*-%d-*-*-p-*-iso8859-4serif.3a-monotype-times-regular-r-normal--*-%d-*-*-p-*-iso8859-5serif.4a-monotype-timesnewromangreek-regular-r-normal--*-%d-*-*-p-*-iso8859-7serif.5a-monotype-times-regular-r-normal--*-%d-*-*-p-*-iso8859-9serif.6a-monotype-times-regular-r-normal--*-%d-*-*-p-*-iso8859-15serif.7a-hanyi-ming-medium-r-normal--*-%d-*-*-m-*-big5-1serif.8a-sun-song-medium-r-normal--*-%d-*-*-c-*-gb2312.1980-0serif.9a-ricoh-hgminchol-medium-r-normal--*-%d-*-*-m-*-jisx0201.1976-0serif.10a-ricoh-hgminchol-medium-r-normal--*-%d-*-*-m-*-jisx0208.1983-0serif.11a-ricoh-heiseimin-w3-r-normal--*-%d-*-*-m-*-jisx0212.1990-0serif.12a-hanyang-myeongjo-medium-r-normal--*-%d-*-*-m-*-ksc5601.1992-3serif.13a-urw-itczapfdingbats-medium-r-normal--*-%d-*-*-p-*-sun-fontspecificserif.14a-*-symbol-medium-r-normal--*-%d-*-*-p-*-sun-fontspecificbserif.italic.0=-monotype-timesbnewbroman-regular-i---*-%d-*-*-p-*-iso8859-1bserif.italic.1=-monotype-timesbnewbroman-regular-i-normal-italic-*-%d-*-*-p-*-iso8859-2
+
+key2=-b&h-LucidaBrightLat4-normal-i-normal-Italic-*-%d-*-*-p-*-iso8859-4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/java/util/Properties/testData3.dos	Tue Jan 30 16:41:40 2018 +0100
@@ -0,0 +1,29 @@
+key1=\
+-monotype-times new roman-regular-r---*-%d-*-*-p-*-iso8859-1, \
+-monotype-times new roman-regular-r-normal--*-%d-*-*-p-*-iso8859-2, \
+-b&h-LucidaBrightLat4-Normal-r-normal--*-%d-*-*-p-*-iso8859-4, \
+-monotype-times-regular-r-normal--*-%d-*-*-p-*-iso8859-5, \
+-monotype-times new roman greek-regular-r-normal--*-%d-*-*-p-*-iso8859-7, \
+-monotype-times-regular-r-normal--*-%d-*-*-p-*-iso8859-9, \
+-monotype-times-regular-r-normal--*-%d-*-*-p-*-iso8859-15, \
+-hanyi-ming-medium-r-normal--*-%d-*-*-m-*-big5-1, \
+-sun-song-medium-r-normal--*-%d-*-*-c-*-gb2312.1980-0, \
+-ricoh-hg gothic b-medium-r-normal--*-%d-*-*-m-*-jisx0201.1976-0, \
+-ricoh-hg gothic b-medium-r-normal-*-*-%d-*-*-m-*-jisx0208.1983-0, \
+-ricoh-heiseimin-w3-r-normal--*-%d-*-*-m-*-jisx0212.1990-0, \
+-hanyang-myeongjo-medium-r-normal--*-%d-*-*-m-*-ksc5601.1992-3
+
+key2=\
+-monotype-times new roman-regular-i---*-%d-*-*-p-*-iso8859-1, \
+-monotype-times new roman-regular-i-normal-italic-*-%d-*-*-p-*-iso8859-2, \
+-b&h-LucidaBrightLat4-normal-i-normal-Italic-*-%d-*-*-p-*-iso8859-4, \
+-monotype-times-regular-i-normal-italic-*-%d-*-*-p-*-iso8859-5, \
+-monotype-times new roman greek-regular-i-normal--*-%d-*-*-p-*-iso8859-7, \
+-monotype-times-regular-i-normal-italic-*-%d-*-*-p-*-iso8859-9, \
+-monotype-times-regular-i-normal--*-%d-*-*-p-*-iso8859-15, \
+-hanyi-ming-medium-r-normal--*-%d-*-*-m-*-big5-1, \
+-sun-song-medium-r-normal--*-%d-*-*-c-*-gb2312.1980-0, \
+-ricoh-hg gothic b-medium-r-normal--*-%d-*-*-m-*-jisx0201.1976-0, \
+-ricoh-hg gothic b-medium-r-normal-*-*-%d-*-*-m-*-jisx0208.1983-0, \
+-ricoh-heiseimin-w3-r-normal--*-%d-*-*-m-*-jisx0212.1990-0, \
+-hanyang-myeongjo-medium-r-normal--*-%d-*-*-m-*-ksc5601.1992-3
--- a/test/jdk/java/util/Random/NextBytes.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/Random/NextBytes.java	Tue Jan 30 16:41:40 2018 +0100
@@ -28,7 +28,8 @@
  * @author Martin Buchholz
  */
 
-import java.util.*;
+import java.util.Arrays;
+import java.util.Random;
 
 public class NextBytes {
     private static void realMain(String[] args) throws Throwable {
--- a/test/jdk/java/util/TimSort/SortPerf.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/TimSort/SortPerf.java	Tue Jan 30 16:41:40 2018 +0100
@@ -21,8 +21,6 @@
  * questions.
  */
 
-import java.util.Arrays;
-
 public class SortPerf {
     private static final int NUM_SETS = 5;
     private static final int[] lengths = { 10, 100, 1000, 10000, 1000000 };
--- a/test/jdk/java/util/TreeMap/ContainsValue.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/TreeMap/ContainsValue.java	Tue Jan 30 16:41:40 2018 +0100
@@ -27,7 +27,8 @@
  * @summary TreeMap.containsValue throws NullPointerExc for empty TreeMap
  */
 
-import java.util.*;
+import java.util.Map;
+import java.util.TreeMap;
 
 public class ContainsValue {
     public static void main(String[] args) {
--- a/test/jdk/java/util/TreeMap/HeadTailTypeError.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/TreeMap/HeadTailTypeError.java	Tue Jan 30 16:41:40 2018 +0100
@@ -28,7 +28,10 @@
  *          valid range in the backing array
  */
 
-import java.util.*;
+import java.util.SortedMap;
+import java.util.SortedSet;
+import java.util.TreeMap;
+import java.util.TreeSet;
 
 public class HeadTailTypeError {
     public static void main(String[] args) throws Exception {
--- a/test/jdk/java/util/TreeMap/NullAtEnd.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/TreeMap/NullAtEnd.java	Tue Jan 30 16:41:40 2018 +0100
@@ -28,8 +28,9 @@
  * @author  Martin Buchholz
  */
 
-import java.util.*;
-import java.util.concurrent.*;
+import java.util.Comparator;
+import java.util.SortedMap;
+import java.util.TreeMap;
 
 public class NullAtEnd {
     static volatile int passed = 0, failed = 0;
--- a/test/jdk/java/util/TreeMap/NullPermissiveComparator.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/TreeMap/NullPermissiveComparator.java	Tue Jan 30 16:41:40 2018 +0100
@@ -28,10 +28,9 @@
  * @author Martin Buchholz
  */
 
-import java.util.*;
-import java.util.concurrent.*;
-import java.util.concurrent.atomic.*;
-import java.lang.reflect.*;
+import java.util.Comparator;
+import java.util.Map;
+import java.util.TreeMap;
 
 @SuppressWarnings("unchecked")
 public class NullPermissiveComparator {
--- a/test/jdk/java/util/TreeMap/SubMap.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/TreeMap/SubMap.java	Tue Jan 30 16:41:40 2018 +0100
@@ -27,7 +27,11 @@
  * @summary The firstKey and lastKey
  */
 
-import java.util.*;
+import java.util.NoSuchElementException;
+import java.util.SortedMap;
+import java.util.SortedSet;
+import java.util.TreeMap;
+import java.util.TreeSet;
 
 public class SubMap {
     public static void main(String[] args) throws Exception {
--- a/test/jdk/java/util/TreeMap/SubMapClear.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/TreeMap/SubMapClear.java	Tue Jan 30 16:41:40 2018 +0100
@@ -29,7 +29,9 @@
  * @author  Josh Bloch
  */
 
-import java.util.*;
+import java.util.Set;
+import java.util.SortedSet;
+import java.util.TreeSet;
 
 public class SubMapClear {
     public static void main(String[] args) {
--- a/test/jdk/java/util/Vector/ComodifiedRemoveAllElements.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/Vector/ComodifiedRemoveAllElements.java	Tue Jan 30 16:41:40 2018 +0100
@@ -29,7 +29,9 @@
  * @author Konstantin Kladko
  */
 
-import java.util.*;
+import java.util.ConcurrentModificationException;
+import java.util.Iterator;
+import java.util.Vector;
 
 public class ComodifiedRemoveAllElements {
     public static void main(String[] args) {
--- a/test/jdk/java/util/Vector/CopyInto.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/Vector/CopyInto.java	Tue Jan 30 16:41:40 2018 +0100
@@ -28,10 +28,7 @@
  * @author Martin Buchholz
  */
 
-import java.io.*;
-import java.util.*;
-import java.util.concurrent.*;
-import java.util.concurrent.atomic.*;
+import java.util.Vector;
 
 public class CopyInto {
     private static void realMain(String[] args) throws Throwable {
--- a/test/jdk/java/util/Vector/IllegalConstructorArgs.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/Vector/IllegalConstructorArgs.java	Tue Jan 30 16:41:40 2018 +0100
@@ -27,7 +27,7 @@
  * @summary Test for illegal argument exception
  */
 
-import java.util.*;
+import java.util.Vector;
 
 /**
  * This is a simple test class created to check for
--- a/test/jdk/java/util/Vector/LastIndexOf.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/Vector/LastIndexOf.java	Tue Jan 30 16:41:40 2018 +0100
@@ -28,7 +28,7 @@
  *          valid range in the backing array
  */
 
-import java.util.*;
+import java.util.Vector;
 
 public class LastIndexOf {
     public static void main(String[] args) throws Exception {
--- a/test/jdk/java/util/Vector/SyncLastIndexOf.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/Vector/SyncLastIndexOf.java	Tue Jan 30 16:41:40 2018 +0100
@@ -27,7 +27,8 @@
  * @summary Vector's lastIndexOf(Object) was lacking synchronization
  * @author Konstantin Kladko
  */
-import java.util.*;
+
+import java.util.Vector;
 
 public class SyncLastIndexOf {
 
--- a/test/jdk/java/util/WeakHashMap/GCDuringIteration.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/WeakHashMap/GCDuringIteration.java	Tue Jan 30 16:41:40 2018 +0100
@@ -32,7 +32,7 @@
  * @key randomness
  */
 
-import static java.util.concurrent.TimeUnit.SECONDS;
+import jdk.test.lib.RandomFactory;
 
 import java.lang.ref.WeakReference;
 import java.util.Arrays;
@@ -43,7 +43,8 @@
 import java.util.WeakHashMap;
 import java.util.concurrent.CountDownLatch;
 import java.util.function.BooleanSupplier;
-import jdk.test.lib.RandomFactory;
+
+import static java.util.concurrent.TimeUnit.SECONDS;
 
 public class GCDuringIteration {
 
--- a/test/jdk/java/util/WeakHashMap/Iteration.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/WeakHashMap/Iteration.java	Tue Jan 30 16:41:40 2018 +0100
@@ -28,7 +28,9 @@
  * @author  Josh Bloch
  */
 
-import java.util.*;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.WeakHashMap;
 
 public class Iteration {
     public static void main(String[] args) {
--- a/test/jdk/java/util/WeakHashMap/ZeroInitCap.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/WeakHashMap/ZeroInitCap.java	Tue Jan 30 16:41:40 2018 +0100
@@ -21,7 +21,8 @@
  * questions.
  */
 
-import java.util.*;
+import java.util.Map;
+import java.util.WeakHashMap;
 
 /*
  * @test
--- a/test/jdk/java/util/concurrent/ArrayBlockingQueue/WhiteBox.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/concurrent/ArrayBlockingQueue/WhiteBox.java	Tue Jan 30 16:41:40 2018 +0100
@@ -39,7 +39,7 @@
  */
 
 import static org.testng.Assert.*;
-import org.testng.annotations.DataProvider;
+
 import org.testng.annotations.Test;
 
 import java.lang.ref.WeakReference;
--- a/test/jdk/java/util/concurrent/BlockingQueue/DrainToFails.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/concurrent/BlockingQueue/DrainToFails.java	Tue Jan 30 16:41:40 2018 +0100
@@ -78,9 +78,7 @@
             pseudodelay = i;
         }
         public int compareTo(PDelay other) {
-            int a = this.pseudodelay;
-            int b = other.pseudodelay;
-            return (a < b) ? -1 : (a > b) ? 1 : 0;
+            return Integer.compare(this.pseudodelay, other.pseudodelay);
         }
         public int compareTo(Delayed y) {
             return compareTo((PDelay)y);
--- a/test/jdk/java/util/concurrent/BlockingQueue/LoopHelpers.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/concurrent/BlockingQueue/LoopHelpers.java	Tue Jan 30 16:41:40 2018 +0100
@@ -95,7 +95,7 @@
         String num = Long.toString(n);
         if (num.length() >= field.length())
             return num;
-        StringBuffer b = new StringBuffer(field);
+        StringBuilder b = new StringBuilder(field);
         b.replace(b.length()-num.length(), b.length(), num);
         return b.toString();
     }
--- a/test/jdk/java/util/concurrent/BlockingQueue/OfferDrainToLoops.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/concurrent/BlockingQueue/OfferDrainToLoops.java	Tue Jan 30 16:41:40 2018 +0100
@@ -79,7 +79,7 @@
         final long timeoutMillis = 10L * 1000L;
         final SplittableRandom rnd = new SplittableRandom();
 
-        /** Poor man's bounded buffer. */
+        // Poor man's bounded buffer.
         final AtomicLong approximateCount = new AtomicLong(0L);
 
         abstract class CheckedThread extends Thread {
--- a/test/jdk/java/util/concurrent/CompletableFuture/Basic.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/concurrent/CompletableFuture/Basic.java	Tue Jan 30 16:41:40 2018 +0100
@@ -151,11 +151,11 @@
         // runAsync tests
         //----------------------------------------------------------------
         try {
-            CompletableFuture<Void> cf = runAsync(() -> { });
+            CompletableFuture<Void> cf = runAsync(() -> {});
             checkCompletedNormally(cf, cf.join());
-            cf = runAsync(() -> { }, commonPool());
+            cf = runAsync(() -> {}, commonPool());
             checkCompletedNormally(cf, cf.join());
-            cf = runAsync(() -> { }, executor);
+            cf = runAsync(() -> {}, executor);
             checkCompletedNormally(cf, cf.join());
             cf = runAsync(() -> { throw new RuntimeException(); });
             checkCompletedExceptionally(cf);
@@ -200,32 +200,32 @@
         try {
             CompletableFuture<Integer> cf2;
             CompletableFuture<String> cf1 = supplyAsync(() -> "a test string");
-            cf2 = cf1.thenApply((x) -> { if (x.equals("a test string")) return 1; else return 0; });
+            cf2 = cf1.thenApply(x -> x.equals("a test string") ? 1 : 0);
             checkCompletedNormally(cf1, "a test string");
             checkCompletedNormally(cf2, 1);
 
             cf1 = supplyAsync(() -> "a test string");
-            cf2 = cf1.thenApplyAsync((x) -> { if (x.equals("a test string")) return 1; else return 0; });
+            cf2 = cf1.thenApplyAsync(x -> x.equals("a test string") ? 1 : 0);
             checkCompletedNormally(cf1, "a test string");
             checkCompletedNormally(cf2, 1);
 
             cf1 = supplyAsync(() -> "a test string");
-            cf2 = cf1.thenApplyAsync((x) -> { if (x.equals("a test string")) return 1; else return 0; }, executor);
+            cf2 = cf1.thenApplyAsync(x -> x.equals("a test string") ? 1 : 0, executor);
             checkCompletedNormally(cf1, "a test string");
             checkCompletedNormally(cf2, 1);
 
             cf1 = supplyAsync(() -> { throw new RuntimeException(); });
-            cf2 = cf1.thenApply((x) -> { return 0; } );
+            cf2 = cf1.thenApply(x -> 0);
             checkCompletedExceptionally(cf1);
             checkCompletedExceptionally(cf2);
 
             cf1 = supplyAsync(() -> { throw new RuntimeException(); });
-            cf2 = cf1.thenApplyAsync((x) -> { return 0; } );
+            cf2 = cf1.thenApplyAsync(x -> 0);
             checkCompletedExceptionally(cf1);
             checkCompletedExceptionally(cf2);
 
             cf1 = supplyAsync(() -> { throw new RuntimeException(); });
-            cf2 = cf1.thenApplyAsync((x) -> { return 0; }, executor);
+            cf2 = cf1.thenApplyAsync(x -> 0, executor);
             checkCompletedExceptionally(cf1);
             checkCompletedExceptionally(cf2);
         } catch (Throwable t) { unexpected(t); }
@@ -237,40 +237,40 @@
             CompletableFuture<Void> cf2;
             int before = atomicInt.get();
             CompletableFuture<String> cf1 = supplyAsync(() -> "a test string");
-            cf2 = cf1.thenAccept((x) -> { if (x.equals("a test string")) { atomicInt.incrementAndGet(); return; } throw new RuntimeException(); });
+            cf2 = cf1.thenAccept(x -> { if (x.equals("a test string")) { atomicInt.incrementAndGet(); return; } throw new RuntimeException(); });
             checkCompletedNormally(cf1, "a test string");
             checkCompletedNormally(cf2, null);
             check(atomicInt.get() == (before + 1));
 
             before = atomicInt.get();
             cf1 = supplyAsync(() -> "a test string");
-            cf2 = cf1.thenAcceptAsync((x) -> { if (x.equals("a test string")) { atomicInt.incrementAndGet(); return; } throw new RuntimeException(); });
+            cf2 = cf1.thenAcceptAsync(x -> { if (x.equals("a test string")) { atomicInt.incrementAndGet(); return; } throw new RuntimeException(); });
             checkCompletedNormally(cf1, "a test string");
             checkCompletedNormally(cf2, null);
             check(atomicInt.get() == (before + 1));
 
             before = atomicInt.get();
             cf1 = supplyAsync(() -> "a test string");
-            cf2 = cf1.thenAcceptAsync((x) -> { if (x.equals("a test string")) { atomicInt.incrementAndGet(); return; } throw new RuntimeException(); }, executor);
+            cf2 = cf1.thenAcceptAsync(x -> { if (x.equals("a test string")) { atomicInt.incrementAndGet(); return; } throw new RuntimeException(); }, executor);
             checkCompletedNormally(cf1, "a test string");
             checkCompletedNormally(cf2, null);
             check(atomicInt.get() == (before + 1));
 
             before = atomicInt.get();
             cf1 = supplyAsync(() -> { throw new RuntimeException(); });
-            cf2 = cf1.thenAccept((x) -> { atomicInt.incrementAndGet(); } );
+            cf2 = cf1.thenAccept(x -> atomicInt.incrementAndGet());
             checkCompletedExceptionally(cf1);
             checkCompletedExceptionally(cf2);
             check(atomicInt.get() == before);
 
             cf1 = supplyAsync(() -> { throw new RuntimeException(); });
-            cf2 = cf1.thenAcceptAsync((x) -> { atomicInt.incrementAndGet(); } );
+            cf2 = cf1.thenAcceptAsync(x -> atomicInt.incrementAndGet());
             checkCompletedExceptionally(cf1);
             checkCompletedExceptionally(cf2);
             check(atomicInt.get() == before);
 
             cf1 = supplyAsync(() -> { throw new RuntimeException(); });
-            cf2 = cf1.thenAcceptAsync((x) -> { atomicInt.incrementAndGet(); }, executor );
+            cf2 = cf1.thenAcceptAsync(x -> atomicInt.incrementAndGet(), executor );
             checkCompletedExceptionally(cf1);
             checkCompletedExceptionally(cf2);
             check(atomicInt.get() == before);
@@ -283,40 +283,40 @@
             CompletableFuture<Void> cf2;
             int before = atomicInt.get();
             CompletableFuture<String> cf1 = supplyAsync(() -> "a test string");
-            cf2 = cf1.thenRun(() -> { atomicInt.incrementAndGet(); });
+            cf2 = cf1.thenRun(() -> atomicInt.incrementAndGet());
             checkCompletedNormally(cf1, "a test string");
             checkCompletedNormally(cf2, null);
             check(atomicInt.get() == (before + 1));
 
             before = atomicInt.get();
             cf1 = supplyAsync(() -> "a test string");
-            cf2 = cf1.thenRunAsync(() -> { atomicInt.incrementAndGet(); });
+            cf2 = cf1.thenRunAsync(() -> atomicInt.incrementAndGet());
             checkCompletedNormally(cf1, "a test string");
             checkCompletedNormally(cf2, null);
             check(atomicInt.get() == (before + 1));
 
             before = atomicInt.get();
             cf1 = supplyAsync(() -> "a test string");
-            cf2 = cf1.thenRunAsync(() -> { atomicInt.incrementAndGet(); }, executor);
+            cf2 = cf1.thenRunAsync(() -> atomicInt.incrementAndGet(), executor);
             checkCompletedNormally(cf1, "a test string");
             checkCompletedNormally(cf2, null);
             check(atomicInt.get() == (before + 1));
 
             before = atomicInt.get();
             cf1 = supplyAsync(() -> { throw new RuntimeException(); });
-            cf2 = cf1.thenRun(() -> { atomicInt.incrementAndGet(); });
+            cf2 = cf1.thenRun(() -> atomicInt.incrementAndGet());
             checkCompletedExceptionally(cf1);
             checkCompletedExceptionally(cf2);
             check(atomicInt.get() == before);
 
             cf1 = supplyAsync(() -> { throw new RuntimeException(); });
-            cf2 = cf1.thenRunAsync(() -> { atomicInt.incrementAndGet(); });
+            cf2 = cf1.thenRunAsync(() -> atomicInt.incrementAndGet());
             checkCompletedExceptionally(cf1);
             checkCompletedExceptionally(cf2);
             check(atomicInt.get() == before);
 
             cf1 = supplyAsync(() -> { throw new RuntimeException(); });
-            cf2 = cf1.thenRunAsync(() -> { atomicInt.incrementAndGet(); }, executor);
+            cf2 = cf1.thenRunAsync(() -> atomicInt.incrementAndGet(), executor);
             checkCompletedExceptionally(cf1);
             checkCompletedExceptionally(cf2);
             check(atomicInt.get() == before);
@@ -329,42 +329,42 @@
             CompletableFuture<Integer> cf3;
             CompletableFuture<Integer> cf1 = supplyAsync(() -> 1);
             CompletableFuture<Integer> cf2 = supplyAsync(() -> 1);
-            cf3 = cf1.thenCombine(cf2, (x, y) -> { return x + y; });
+            cf3 = cf1.thenCombine(cf2, (x, y) -> x + y);
             checkCompletedNormally(cf1, 1);
             checkCompletedNormally(cf2, 1);
             checkCompletedNormally(cf3, 2);
 
             cf1 = supplyAsync(() -> 1);
             cf2 = supplyAsync(() -> 1);
-            cf3 = cf1.thenCombineAsync(cf2, (x, y) -> { return x + y; });
+            cf3 = cf1.thenCombineAsync(cf2, (x, y) -> x + y);
             checkCompletedNormally(cf1, 1);
             checkCompletedNormally(cf2, 1);
             checkCompletedNormally(cf3, 2);
 
             cf1 = supplyAsync(() -> 1);
             cf2 = supplyAsync(() -> 1);
-            cf3 = cf1.thenCombineAsync(cf2, (x, y) -> { return x + y; }, executor);
+            cf3 = cf1.thenCombineAsync(cf2, (x, y) -> x + y, executor);
             checkCompletedNormally(cf1, 1);
             checkCompletedNormally(cf2, 1);
             checkCompletedNormally(cf3, 2);
 
             cf1 = supplyAsync(() -> { throw new RuntimeException(); });
             cf2 = supplyAsync(() -> 1);
-            cf3 = cf1.thenCombine(cf2, (x, y) -> { return 0; });
+            cf3 = cf1.thenCombine(cf2, (x, y) -> 0);
             checkCompletedExceptionally(cf1);
             checkCompletedNormally(cf2, 1);
             checkCompletedExceptionally(cf3);
 
             cf1 = supplyAsync(() -> 1);
             cf2 = supplyAsync(() -> { throw new RuntimeException(); });
-            cf3 = cf1.thenCombineAsync(cf2, (x, y) -> { return 0; });
+            cf3 = cf1.thenCombineAsync(cf2, (x, y) -> 0);
             checkCompletedNormally(cf1, 1);
             checkCompletedExceptionally(cf2);
             checkCompletedExceptionally(cf3);
 
             cf1 = supplyAsync(() -> { throw new RuntimeException(); });
             cf2 = supplyAsync(() -> { throw new RuntimeException(); });
-            cf3 = cf1.thenCombineAsync(cf2, (x, y) -> { return 0; }, executor);
+            cf3 = cf1.thenCombineAsync(cf2, (x, y) -> 0, executor);
             checkCompletedExceptionally(cf1);
             checkCompletedExceptionally(cf2);
             checkCompletedExceptionally(cf3);
@@ -405,7 +405,7 @@
             before = atomicInt.get();
             cf1 = supplyAsync(() -> { throw new RuntimeException(); });
             cf2 = supplyAsync(() -> 1);
-            cf3 = cf1.thenAcceptBoth(cf2, (x, y) -> { atomicInt.incrementAndGet(); });
+            cf3 = cf1.thenAcceptBoth(cf2, (x, y) -> atomicInt.incrementAndGet());
             checkCompletedExceptionally(cf1);
             checkCompletedNormally(cf2, 1);
             checkCompletedExceptionally(cf3);
@@ -413,7 +413,7 @@
 
             cf1 = supplyAsync(() -> 1);
             cf2 = supplyAsync(() -> { throw new RuntimeException(); });
-            cf3 = cf1.thenAcceptBothAsync(cf2, (x, y) -> { atomicInt.incrementAndGet(); });
+            cf3 = cf1.thenAcceptBothAsync(cf2, (x, y) -> atomicInt.incrementAndGet());
             checkCompletedNormally(cf1, 1);
             checkCompletedExceptionally(cf2);
             checkCompletedExceptionally(cf3);
@@ -421,7 +421,7 @@
 
             cf1 = supplyAsync(() -> { throw new RuntimeException(); });
             cf2 = supplyAsync(() -> { throw new RuntimeException(); });
-            cf3 = cf1.thenAcceptBothAsync(cf2, (x, y) -> { atomicInt.incrementAndGet(); }, executor);
+            cf3 = cf1.thenAcceptBothAsync(cf2, (x, y) -> atomicInt.incrementAndGet(), executor);
             checkCompletedExceptionally(cf1);
             checkCompletedExceptionally(cf2);
             checkCompletedExceptionally(cf3);
@@ -463,7 +463,7 @@
             before = atomicInt.get();
             CompletableFuture<Integer> cf4 = supplyAsync(() -> { throw new RuntimeException(); });
             CompletableFuture<Integer> cf5 = supplyAsync(() -> 1);
-            cf3 = cf5.runAfterBothAsync(cf4, () -> { atomicInt.incrementAndGet(); }, executor);
+            cf3 = cf5.runAfterBothAsync(cf4, () -> atomicInt.incrementAndGet(), executor);
             checkCompletedExceptionally(cf4);
             checkCompletedNormally(cf5, 1);
             checkCompletedExceptionally(cf3);
@@ -472,7 +472,7 @@
             before = atomicInt.get();
             cf4 = supplyAsync(() -> 1);
             cf5 = supplyAsync(() -> { throw new RuntimeException(); });
-            cf3 = cf5.runAfterBothAsync(cf4, () -> { atomicInt.incrementAndGet(); });
+            cf3 = cf5.runAfterBothAsync(cf4, () -> atomicInt.incrementAndGet());
             checkCompletedNormally(cf4, 1);
             checkCompletedExceptionally(cf5);
             checkCompletedExceptionally(cf3);
@@ -481,7 +481,7 @@
             before = atomicInt.get();
             cf4 = supplyAsync(() -> { throw new RuntimeException(); });
             cf5 = supplyAsync(() -> { throw new RuntimeException(); });
-            cf3 = cf5.runAfterBoth(cf4, () -> { atomicInt.incrementAndGet(); });
+            cf3 = cf5.runAfterBoth(cf4, () -> atomicInt.incrementAndGet());
             checkCompletedExceptionally(cf4);
             checkCompletedExceptionally(cf5);
             checkCompletedExceptionally(cf3);
@@ -495,46 +495,46 @@
             CompletableFuture<Integer> cf3;
             CompletableFuture<Integer> cf1 = supplyAsync(() -> 1);
             CompletableFuture<Integer> cf2 = supplyAsync(() -> 2);
-            cf3 = cf1.applyToEither(cf2, (x) -> { check(x == 1 || x == 2); return x; });
+            cf3 = cf1.applyToEither(cf2, x -> { check(x == 1 || x == 2); return x; });
             checkCompletedNormally(cf3, new Object[] {1, 2});
             check(cf1.isDone() || cf2.isDone());
 
             cf1 = supplyAsync(() -> 1);
             cf2 = supplyAsync(() -> 2);
-            cf3 = cf1.applyToEitherAsync(cf2, (x) -> { check(x == 1 || x == 2); return x; });
+            cf3 = cf1.applyToEitherAsync(cf2, x -> { check(x == 1 || x == 2); return x; });
             checkCompletedNormally(cf3, new Object[] {1, 2});
             check(cf1.isDone() || cf2.isDone());
 
             cf1 = supplyAsync(() -> 1);
             cf2 = supplyAsync(() -> 2);
-            cf3 = cf1.applyToEitherAsync(cf2, (x) -> { check(x == 1 || x == 2); return x; }, executor);
+            cf3 = cf1.applyToEitherAsync(cf2, x -> { check(x == 1 || x == 2); return x; }, executor);
             checkCompletedNormally(cf3, new Object[] {1, 2});
             check(cf1.isDone() || cf2.isDone());
 
             cf1 = supplyAsync(() -> { throw new RuntimeException(); });
             cf2 = supplyAsync(() -> 2);
-            cf3 = cf1.applyToEither(cf2, (x) -> { check(x == 2); return x; });
+            cf3 = cf1.applyToEither(cf2, x -> { check(x == 2); return x; });
             try { check(cf3.join() == 2); } catch (CompletionException x) { pass(); }
             check(cf3.isDone());
             check(cf1.isDone() || cf2.isDone());
 
             cf1 = supplyAsync(() -> 1);
             cf2 = supplyAsync(() -> { throw new RuntimeException(); });
-            cf3 = cf1.applyToEitherAsync(cf2, (x) -> { check(x == 1); return x; });
+            cf3 = cf1.applyToEitherAsync(cf2, x -> { check(x == 1); return x; });
             try { check(cf3.join() == 1); } catch (CompletionException x) { pass(); }
             check(cf3.isDone());
             check(cf1.isDone() || cf2.isDone());
 
             cf1 = supplyAsync(() -> { throw new RuntimeException(); });
             cf2 = supplyAsync(() -> { throw new RuntimeException(); });
-            cf3 = cf1.applyToEitherAsync(cf2, (x) -> { fail(); return x; });
+            cf3 = cf1.applyToEitherAsync(cf2, x -> { fail(); return x; });
             checkCompletedExceptionally(cf3);
             check(cf1.isDone() || cf2.isDone());
 
             final Phaser cf3Done = new Phaser(2);
             cf1 = supplyAsync(() -> { cf3Done.arriveAndAwaitAdvance(); return 1; });
             cf2 = supplyAsync(() -> 2);
-            cf3 = cf1.applyToEither(cf2, (x) -> { check(x == 2); return x; });
+            cf3 = cf1.applyToEither(cf2, x -> { check(x == 2); return x; });
             checkCompletedNormally(cf3, 2);
             checkCompletedNormally(cf2, 2);
             check(!cf1.isDone());
@@ -544,7 +544,7 @@
 
             cf1 = supplyAsync(() -> 1);
             cf2 = supplyAsync(() -> { cf3Done.arriveAndAwaitAdvance(); return 2; });
-            cf3 = cf1.applyToEitherAsync(cf2, (x) -> { check(x == 1); return x; });
+            cf3 = cf1.applyToEitherAsync(cf2, x -> { check(x == 1); return x; });
             checkCompletedNormally(cf3, 1);
             checkCompletedNormally(cf1, 1);
             check(!cf2.isDone());
@@ -561,7 +561,7 @@
             int before = atomicInt.get();
             CompletableFuture<Integer> cf1 = supplyAsync(() -> 1);
             CompletableFuture<Integer> cf2 = supplyAsync(() -> 2);
-            cf3 = cf1.acceptEither(cf2, (x) -> { check(x == 1 || x == 2); atomicInt.incrementAndGet(); });
+            cf3 = cf1.acceptEither(cf2, x -> { check(x == 1 || x == 2); atomicInt.incrementAndGet(); });
             checkCompletedNormally(cf3, null);
             check(cf1.isDone() || cf2.isDone());
             check(atomicInt.get() == (before + 1));
@@ -569,7 +569,7 @@
             before = atomicInt.get();
             cf1 = supplyAsync(() -> 1);
             cf2 = supplyAsync(() -> 2);
-            cf3 = cf1.acceptEitherAsync(cf2, (x) -> { check(x == 1 || x == 2); atomicInt.incrementAndGet(); });
+            cf3 = cf1.acceptEitherAsync(cf2, x -> { check(x == 1 || x == 2); atomicInt.incrementAndGet(); });
             checkCompletedNormally(cf3, null);
             check(cf1.isDone() || cf2.isDone());
             check(atomicInt.get() == (before + 1));
@@ -577,35 +577,35 @@
             before = atomicInt.get();
             cf1 = supplyAsync(() -> 1);
             cf2 = supplyAsync(() -> 2);
-            cf3 = cf2.acceptEitherAsync(cf1, (x) -> { check(x == 1 || x == 2); atomicInt.incrementAndGet(); }, executor);
+            cf3 = cf2.acceptEitherAsync(cf1, x -> { check(x == 1 || x == 2); atomicInt.incrementAndGet(); }, executor);
             checkCompletedNormally(cf3, null);
             check(cf1.isDone() || cf2.isDone());
             check(atomicInt.get() == (before + 1));
 
             cf1 = supplyAsync(() -> { throw new RuntimeException(); });
             cf2 = supplyAsync(() -> 2);
-            cf3 = cf2.acceptEitherAsync(cf1, (x) -> { check(x == 2); }, executor);
+            cf3 = cf2.acceptEitherAsync(cf1, x -> { check(x == 2); }, executor);
             try { check(cf3.join() == null); } catch (CompletionException x) { pass(); }
             check(cf3.isDone());
             check(cf1.isDone() || cf2.isDone());
 
             cf1 = supplyAsync(() -> 1);
             cf2 = supplyAsync(() -> { throw new RuntimeException(); });
-            cf3 = cf2.acceptEitherAsync(cf1, (x) -> { check(x == 1); });
+            cf3 = cf2.acceptEitherAsync(cf1, x -> { check(x == 1); });
             try { check(cf3.join() == null); } catch (CompletionException x) { pass(); }
             check(cf3.isDone());
             check(cf1.isDone() || cf2.isDone());
 
             cf1 = supplyAsync(() -> { throw new RuntimeException(); });
             cf2 = supplyAsync(() -> { throw new RuntimeException(); });
-            cf3 = cf2.acceptEitherAsync(cf1, (x) -> { fail(); });
+            cf3 = cf2.acceptEitherAsync(cf1, x -> { fail(); });
             checkCompletedExceptionally(cf3);
             check(cf1.isDone() || cf2.isDone());
 
             final Phaser cf3Done = new Phaser(2);
             cf1 = supplyAsync(() -> { cf3Done.arriveAndAwaitAdvance(); return 1; });
             cf2 = supplyAsync(() -> 2);
-            cf3 = cf1.acceptEither(cf2, (x) -> { check(x == 2); });
+            cf3 = cf1.acceptEither(cf2, x -> { check(x == 2); });
             checkCompletedNormally(cf3, null);
             checkCompletedNormally(cf2, 2);
             check(!cf1.isDone());
@@ -615,7 +615,7 @@
 
             cf1 = supplyAsync(() -> 1);
             cf2 = supplyAsync(() -> { cf3Done.arriveAndAwaitAdvance(); return 2; });
-            cf3 = cf1.acceptEitherAsync(cf2, (x) -> { check(x == 1); });
+            cf3 = cf1.acceptEitherAsync(cf2, x -> { check(x == 1); });
             checkCompletedNormally(cf3, null);
             checkCompletedNormally(cf1, 1);
             check(!cf2.isDone());
@@ -630,33 +630,33 @@
         try {
             CompletableFuture<Void> cf3;
             int before = atomicInt.get();
-            CompletableFuture<Void> cf1 = runAsync(() -> { });
-            CompletableFuture<Void> cf2 = runAsync(() -> { });
-            cf3 = cf1.runAfterEither(cf2, () -> { atomicInt.incrementAndGet(); });
+            CompletableFuture<Void> cf1 = runAsync(() -> {});
+            CompletableFuture<Void> cf2 = runAsync(() -> {});
+            cf3 = cf1.runAfterEither(cf2, () -> atomicInt.incrementAndGet());
             checkCompletedNormally(cf3, null);
             check(cf1.isDone() || cf2.isDone());
             check(atomicInt.get() == (before + 1));
 
             before = atomicInt.get();
-            cf1 = runAsync(() -> { });
-            cf2 = runAsync(() -> { });
-            cf3 = cf1.runAfterEitherAsync(cf2, () -> { atomicInt.incrementAndGet(); });
+            cf1 = runAsync(() -> {});
+            cf2 = runAsync(() -> {});
+            cf3 = cf1.runAfterEitherAsync(cf2, () -> atomicInt.incrementAndGet());
             checkCompletedNormally(cf3, null);
             check(cf1.isDone() || cf2.isDone());
             check(atomicInt.get() == (before + 1));
 
             before = atomicInt.get();
-            cf1 = runAsync(() -> { });
-            cf2 = runAsync(() -> { });
-            cf3 = cf2.runAfterEitherAsync(cf1, () -> { atomicInt.incrementAndGet(); }, executor);
+            cf1 = runAsync(() -> {});
+            cf2 = runAsync(() -> {});
+            cf3 = cf2.runAfterEitherAsync(cf1, () -> atomicInt.incrementAndGet(), executor);
             checkCompletedNormally(cf3, null);
             check(cf1.isDone() || cf2.isDone());
             check(atomicInt.get() == (before + 1));
 
             before = atomicInt.get();
             cf1 = runAsync(() -> { throw new RuntimeException(); });
-            cf2 = runAsync(() -> { });
-            cf3 = cf2.runAfterEither(cf1, () -> { atomicInt.incrementAndGet(); });
+            cf2 = runAsync(() -> {});
+            cf3 = cf2.runAfterEither(cf1, () -> atomicInt.incrementAndGet());
             try {
                 check(cf3.join() == null);
                 check(atomicInt.get() == (before + 1));
@@ -665,9 +665,9 @@
             check(cf1.isDone() || cf2.isDone());
 
             before = atomicInt.get();
-            cf1 = runAsync(() -> { });
+            cf1 = runAsync(() -> {});
             cf2 = runAsync(() -> { throw new RuntimeException(); });
-            cf3 = cf1.runAfterEitherAsync(cf2, () -> { atomicInt.incrementAndGet(); });
+            cf3 = cf1.runAfterEitherAsync(cf2, () -> atomicInt.incrementAndGet());
             try {
                 check(cf3.join() == null);
                 check(atomicInt.get() == (before + 1));
@@ -678,16 +678,16 @@
             before = atomicInt.get();
             cf1 = runAsync(() -> { throw new RuntimeException(); });
             cf2 = runAsync(() -> { throw new RuntimeException(); });
-            cf3 = cf2.runAfterEitherAsync(cf1, () -> { atomicInt.incrementAndGet(); }, executor);
+            cf3 = cf2.runAfterEitherAsync(cf1, () -> atomicInt.incrementAndGet(), executor);
             checkCompletedExceptionally(cf3);
             check(cf1.isDone() || cf2.isDone());
             check(atomicInt.get() == before);
 
             final Phaser cf3Done = new Phaser(2);
             before = atomicInt.get();
-            cf1 = runAsync(() -> { cf3Done.arriveAndAwaitAdvance(); });
-            cf2 = runAsync(() -> { });
-            cf3 = cf1.runAfterEither(cf2, () -> { atomicInt.incrementAndGet(); });
+            cf1 = runAsync(() -> cf3Done.arriveAndAwaitAdvance());
+            cf2 = runAsync(() -> {});
+            cf3 = cf1.runAfterEither(cf2, () -> atomicInt.incrementAndGet());
             checkCompletedNormally(cf3, null);
             checkCompletedNormally(cf2, null);
             check(!cf1.isDone());
@@ -697,9 +697,9 @@
             checkCompletedNormally(cf3, null);
 
             before = atomicInt.get();
-            cf1 = runAsync(() -> { });
-            cf2 = runAsync(() -> { cf3Done.arriveAndAwaitAdvance(); });
-            cf3 = cf1.runAfterEitherAsync(cf2, () -> { atomicInt.incrementAndGet(); });
+            cf1 = runAsync(() -> {});
+            cf2 = runAsync(() -> cf3Done.arriveAndAwaitAdvance());
+            cf3 = cf1.runAfterEitherAsync(cf2, () -> atomicInt.incrementAndGet());
             checkCompletedNormally(cf3, null);
             checkCompletedNormally(cf1, null);
             check(!cf2.isDone());
@@ -715,35 +715,35 @@
         try {
             CompletableFuture<Integer> cf2;
             CompletableFuture<Integer> cf1 = supplyAsync(() -> 1);
-            cf2 = cf1.thenCompose((x) -> { check(x ==1); return CompletableFuture.completedFuture(2); });
+            cf2 = cf1.thenCompose(x -> { check(x == 1); return CompletableFuture.completedFuture(2); });
             checkCompletedNormally(cf1, 1);
             checkCompletedNormally(cf2, 2);
 
             cf1 = supplyAsync(() -> 1);
-            cf2 = cf1.thenComposeAsync((x) -> { check(x ==1); return CompletableFuture.completedFuture(2); });
+            cf2 = cf1.thenComposeAsync(x -> { check(x == 1); return CompletableFuture.completedFuture(2); });
             checkCompletedNormally(cf1, 1);
             checkCompletedNormally(cf2, 2);
 
             cf1 = supplyAsync(() -> 1);
-            cf2 = cf1.thenComposeAsync((x) -> { check(x ==1); return CompletableFuture.completedFuture(2); }, executor);
+            cf2 = cf1.thenComposeAsync(x -> { check(x == 1); return CompletableFuture.completedFuture(2); }, executor);
             checkCompletedNormally(cf1, 1);
             checkCompletedNormally(cf2, 2);
 
             int before = atomicInt.get();
             cf1 = supplyAsync(() -> { throw new RuntimeException(); });
-            cf2 = cf1.thenCompose((x) -> { atomicInt.incrementAndGet(); return CompletableFuture.completedFuture(2); });
+            cf2 = cf1.thenCompose(x -> { atomicInt.incrementAndGet(); return CompletableFuture.completedFuture(2); });
             checkCompletedExceptionally(cf1);
             checkCompletedExceptionally(cf2);
             check(atomicInt.get() == before);
 
             cf1 = supplyAsync(() -> { throw new RuntimeException(); });
-            cf2 = cf1.thenComposeAsync((x) -> { atomicInt.incrementAndGet(); return CompletableFuture.completedFuture(2); });
+            cf2 = cf1.thenComposeAsync(x -> { atomicInt.incrementAndGet(); return CompletableFuture.completedFuture(2); });
             checkCompletedExceptionally(cf1);
             checkCompletedExceptionally(cf2);
             check(atomicInt.get() == before);
 
             cf1 = supplyAsync(() -> 1);
-            cf2 = cf1.thenComposeAsync((x) -> { throw new RuntimeException(); }, executor);
+            cf2 = cf1.thenComposeAsync(x -> { throw new RuntimeException(); }, executor);
             checkCompletedNormally(cf1, 1);
             checkCompletedExceptionally(cf2);
         } catch (Throwable t) { unexpected(t); }
@@ -787,13 +787,13 @@
         try {
             CompletableFuture<Integer> cf2;
             CompletableFuture<Integer> cf1 = supplyAsync(() -> 1);
-            cf2 = cf1.exceptionally((t) -> { fail("function should never be called"); return 2;});
+            cf2 = cf1.exceptionally(t -> { fail("function should never be called"); return 2;});
             checkCompletedNormally(cf1, 1);
             checkCompletedNormally(cf2, 1);
 
             final RuntimeException t = new RuntimeException();
             cf1 = supplyAsync(() -> { throw t; });
-            cf2 = cf1.exceptionally((x) -> { check(x.getCause() == t); return 2;});
+            cf2 = cf1.exceptionally(x -> { check(x.getCause() == t); return 2;});
             checkCompletedExceptionally(cf1);
             checkCompletedNormally(cf2, 2);
         } catch (Throwable t) { unexpected(t); }
--- a/test/jdk/java/util/concurrent/ConcurrentHashMap/LoopHelpers.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/concurrent/ConcurrentHashMap/LoopHelpers.java	Tue Jan 30 16:41:40 2018 +0100
@@ -95,7 +95,7 @@
         String num = Long.toString(n);
         if (num.length() >= field.length())
             return num;
-        StringBuffer b = new StringBuffer(field);
+        StringBuilder b = new StringBuilder(field);
         b.replace(b.length()-num.length(), b.length(), num);
         return b.toString();
     }
--- a/test/jdk/java/util/concurrent/ConcurrentHashMap/MapCheck.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/concurrent/ConcurrentHashMap/MapCheck.java	Tue Jan 30 16:41:40 2018 +0100
@@ -109,14 +109,12 @@
 
     static Map newMap(Class cl) {
         try {
-            Map m = (Map)cl.newInstance();
-            return m;
+            return (Map)cl.newInstance();
         } catch (Exception e) {
             throw new RuntimeException("Can't instantiate " + cl + ": " + e);
         }
     }
 
-
     static void runTest(Map s, Object[] key) {
         shuffle(key);
         int size = key.length;
@@ -137,7 +135,6 @@
         //        System.gc();
     }
 
-
     static void t1(String nm, int n, Map s, Object[] key, int expect) {
         int sum = 0;
         int iters = 4;
--- a/test/jdk/java/util/concurrent/ConcurrentLinkedQueue/WhiteBox.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/concurrent/ConcurrentLinkedQueue/WhiteBox.java	Tue Jan 30 16:41:40 2018 +0100
@@ -55,7 +55,6 @@
 import java.util.concurrent.ThreadLocalRandom;
 import static java.util.stream.Collectors.toList;
 import java.util.function.Consumer;
-import java.util.function.Function;
 
 @Test
 public class WhiteBox {
--- a/test/jdk/java/util/concurrent/ConcurrentQueues/LoopHelpers.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/concurrent/ConcurrentQueues/LoopHelpers.java	Tue Jan 30 16:41:40 2018 +0100
@@ -95,7 +95,7 @@
         String num = Long.toString(n);
         if (num.length() >= field.length())
             return num;
-        StringBuffer b = new StringBuffer(field);
+        StringBuilder b = new StringBuilder(field);
         b.replace(b.length()-num.length(), b.length(), num);
         return b.toString();
     }
--- a/test/jdk/java/util/concurrent/ConcurrentQueues/OfferRemoveLoops.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/concurrent/ConcurrentQueues/OfferRemoveLoops.java	Tue Jan 30 16:41:40 2018 +0100
@@ -81,7 +81,7 @@
         final CountDownLatch done = new CountDownLatch(3);
         final SplittableRandom rnd = new SplittableRandom();
 
-        /** Poor man's bounded buffer; prevents unbounded queue expansion. */
+        // Poor man's bounded buffer; prevents unbounded queue expansion.
         final Semaphore offers = new Semaphore(maxQueueSize);
 
         abstract class CheckedThread extends Thread {
--- a/test/jdk/java/util/concurrent/Exchanger/LoopHelpers.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/concurrent/Exchanger/LoopHelpers.java	Tue Jan 30 16:41:40 2018 +0100
@@ -95,7 +95,7 @@
         String num = Long.toString(n);
         if (num.length() >= field.length())
             return num;
-        StringBuffer b = new StringBuffer(field);
+        StringBuilder b = new StringBuilder(field);
         b.replace(b.length()-num.length(), b.length(), num);
         return b.toString();
     }
--- a/test/jdk/java/util/concurrent/ExecutorCompletionService/ExecutorCompletionServiceLoops.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/concurrent/ExecutorCompletionService/ExecutorCompletionServiceLoops.java	Tue Jan 30 16:41:40 2018 +0100
@@ -52,7 +52,7 @@
     static final ExecutorService pool =
         Executors.newFixedThreadPool(POOLSIZE);
     static final ExecutorCompletionService<Integer> ecs =
-        new ExecutorCompletionService<Integer>(pool);
+        new ExecutorCompletionService<>(pool);
     static boolean print = false;
 
     public static void main(String[] args) throws Exception {
--- a/test/jdk/java/util/concurrent/ExecutorCompletionService/LoopHelpers.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/concurrent/ExecutorCompletionService/LoopHelpers.java	Tue Jan 30 16:41:40 2018 +0100
@@ -95,7 +95,7 @@
         String num = Long.toString(n);
         if (num.length() >= field.length())
             return num;
-        StringBuffer b = new StringBuffer(field);
+        StringBuilder b = new StringBuilder(field);
         b.replace(b.length()-num.length(), b.length(), num);
         return b.toString();
     }
--- a/test/jdk/java/util/concurrent/FutureTask/BlockingTaskExecutor.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/concurrent/FutureTask/BlockingTaskExecutor.java	Tue Jan 30 16:41:40 2018 +0100
@@ -26,21 +26,25 @@
  * @bug 6431315
  * @summary ExecutorService.invokeAll might hang
  * @author Martin Buchholz
+ * @library /lib/testlibrary/
  */
 
+import static java.util.concurrent.TimeUnit.MILLISECONDS;
+
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.concurrent.Callable;
 import java.util.concurrent.ExecutorService;
 import java.util.concurrent.Executors;
 import java.util.concurrent.RejectedExecutionException;
-import java.util.concurrent.TimeUnit;
+import jdk.testlibrary.Utils;
 
 /**
  * Adapted from Doug Lea, which was...
  * adapted from a posting by Tom Sugden tom at epcc.ed.ac.uk
  */
 public class BlockingTaskExecutor {
+    static final long LONG_DELAY_MS = Utils.adjustTimeout(10_000);
 
     static void realMain(String[] args) throws Throwable {
         for (int i = 1; i <= 100; i++) {
@@ -75,15 +79,19 @@
         // are blocked.  This should cause the tasks to be
         // interrupted.
         executor.shutdownNow();
-        if (! executor.awaitTermination(5L, TimeUnit.SECONDS))
-            throw new Error("Executor stuck");
+        if (! executor.awaitTermination(LONG_DELAY_MS, MILLISECONDS))
+            throw new Error(
+                String.format("Executor termination timed out after %d ms",
+                              LONG_DELAY_MS));
 
         // Wait for the invocation thread to complete.
-        thread.join(5000);
+        thread.join(LONG_DELAY_MS);
         if (thread.isAlive()) {
             thread.interrupt();
-            thread.join(5000);
-            throw new Error("invokeAll stuck");
+            thread.join(LONG_DELAY_MS);
+            throw new Error(
+                String.format("invokeAll timed out after %d ms",
+                              LONG_DELAY_MS));
         }
     }
 
--- a/test/jdk/java/util/concurrent/FutureTask/ExplicitSet.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/concurrent/FutureTask/ExplicitSet.java	Tue Jan 30 16:41:40 2018 +0100
@@ -60,7 +60,7 @@
                     public Boolean call() {
                         fail("The task should never be run!");
                         return null;
-                    };
+                    }
                 });
         }
 
--- a/test/jdk/java/util/concurrent/FutureTask/LoopHelpers.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/concurrent/FutureTask/LoopHelpers.java	Tue Jan 30 16:41:40 2018 +0100
@@ -95,7 +95,7 @@
         String num = Long.toString(n);
         if (num.length() >= field.length())
             return num;
-        StringBuffer b = new StringBuffer(field);
+        StringBuilder b = new StringBuilder(field);
         b.replace(b.length()-num.length(), b.length(), num);
         return b.toString();
     }
--- a/test/jdk/java/util/concurrent/FutureTask/NegativeTimeout.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/concurrent/FutureTask/NegativeTimeout.java	Tue Jan 30 16:41:40 2018 +0100
@@ -38,7 +38,7 @@
 
 public class NegativeTimeout {
     public static void main(String[] args) throws Exception {
-        FutureTask<Void> task = new FutureTask<>( () -> { return null; } );
+        FutureTask<Void> task = new FutureTask<>(() -> null);
         try {
             task.get(Long.MIN_VALUE, TimeUnit.NANOSECONDS);
         } catch (TimeoutException success) {}
--- a/test/jdk/java/util/concurrent/LinkedTransferQueue/WhiteBox.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/concurrent/LinkedTransferQueue/WhiteBox.java	Tue Jan 30 16:41:40 2018 +0100
@@ -56,7 +56,6 @@
 import java.util.concurrent.TimeUnit;
 import static java.util.stream.Collectors.toList;
 import java.util.function.Consumer;
-import java.util.function.Function;
 
 @Test
 public class WhiteBox {
--- a/test/jdk/java/util/concurrent/atomic/AtomicUpdaters.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/concurrent/atomic/AtomicUpdaters.java	Tue Jan 30 16:41:40 2018 +0100
@@ -89,9 +89,9 @@
 
             // Would like to test a public volatile in a class in another
             // package - but of course there aren't any
-            new Config(AtomicInteger.class, "value", "private", hasSM ? false : true, false, "private int field of class in different package", TYPE.INT),
-            new Config(AtomicLong.class, "value", "private", hasSM ? false : true, false, "private long field of class in different package", TYPE.LONG),
-            new Config(AtomicReference.class, "value", "private", hasSM ? false : true, false, "private reference field of class in different package", TYPE.REF),
+            new Config(AtomicInteger.class, "value", "private", !hasSM, false, "private int field of class in different package", TYPE.INT),
+            new Config(AtomicLong.class, "value", "private", !hasSM, false, "private long field of class in different package", TYPE.LONG),
+            new Config(AtomicReference.class, "value", "private", !hasSM, false, "private reference field of class in different package", TYPE.REF),
         };
     }
 
--- a/test/jdk/java/util/concurrent/locks/Lock/LoopHelpers.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/concurrent/locks/Lock/LoopHelpers.java	Tue Jan 30 16:41:40 2018 +0100
@@ -95,7 +95,7 @@
         String num = Long.toString(n);
         if (num.length() >= field.length())
             return num;
-        StringBuffer b = new StringBuffer(field);
+        StringBuilder b = new StringBuilder(field);
         b.replace(b.length()-num.length(), b.length(), num);
         return b.toString();
     }
--- a/test/jdk/java/util/concurrent/locks/ReentrantLock/LoopHelpers.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/concurrent/locks/ReentrantLock/LoopHelpers.java	Tue Jan 30 16:41:40 2018 +0100
@@ -95,7 +95,7 @@
         String num = Long.toString(n);
         if (num.length() >= field.length())
             return num;
-        StringBuffer b = new StringBuffer(field);
+        StringBuilder b = new StringBuilder(field);
         b.replace(b.length()-num.length(), b.length(), num);
         return b.toString();
     }
--- a/test/jdk/java/util/concurrent/locks/ReentrantReadWriteLock/LoopHelpers.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/concurrent/locks/ReentrantReadWriteLock/LoopHelpers.java	Tue Jan 30 16:41:40 2018 +0100
@@ -95,7 +95,7 @@
         String num = Long.toString(n);
         if (num.length() >= field.length())
             return num;
-        StringBuffer b = new StringBuffer(field);
+        StringBuilder b = new StringBuilder(field);
         b.replace(b.length()-num.length(), b.length(), num);
         return b.toString();
     }
--- a/test/jdk/java/util/concurrent/tck/AbstractQueueTest.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/concurrent/tck/AbstractQueueTest.java	Tue Jan 30 16:41:40 2018 +0100
@@ -80,7 +80,7 @@
     }
 
     /**
-     * add throws IllegalStateException true if offer fails
+     * add throws IllegalStateException if offer fails
      */
     public void testAddF() {
         Fail q = new Fail();
@@ -106,7 +106,7 @@
      */
     public void testRemoveS() {
         Succeed q = new Succeed();
-        q.remove();
+        assertSame(one, q.remove());
     }
 
     /**
@@ -125,7 +125,7 @@
      */
     public void testElementS() {
         Succeed q = new Succeed();
-        q.element();
+        assertSame(one, q.element());
     }
 
     /**
--- a/test/jdk/java/util/concurrent/tck/AbstractQueuedSynchronizerTest.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/concurrent/tck/AbstractQueuedSynchronizerTest.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1289,11 +1289,10 @@
     }
 
     /**
-     * Disabled demo test for (unfixed as of 2017-11)
      * JDK-8191483: AbstractQueuedSynchronizer cancel/cancel race
      * ant -Djsr166.tckTestClass=AbstractQueuedSynchronizerTest -Djsr166.methodFilter=testCancelCancelRace -Djsr166.runsPerTest=100 tck
      */
-    public void DISABLED_testCancelCancelRace() throws InterruptedException {
+    public void testCancelCancelRace() throws InterruptedException {
         class Sync extends AbstractQueuedSynchronizer {
             protected boolean tryAcquire(int acquires) {
                 return !hasQueuedPredecessors() && compareAndSetState(0, 1);
--- a/test/jdk/java/util/concurrent/tck/ArrayDeque8Test.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/concurrent/tck/ArrayDeque8Test.java	Tue Jan 30 16:41:40 2018 +0100
@@ -110,14 +110,13 @@
             assertEquals((Integer) 1, q.peekLast());
             assertEquals(maxArraySize - 1, q.size());
 
-            ArrayDeque qq = q;
             ArrayDeque smallish = new ArrayDeque(
                 Collections.nCopies(Integer.MAX_VALUE - q.size() + 1, e));
             assertThrows(
                 IllegalStateException.class,
-                () -> qq.addAll(qq),
-                () -> qq.addAll(smallish),
-                () -> smallish.addAll(qq));
+                () -> q.addAll(q),
+                () -> q.addAll(smallish),
+                () -> smallish.addAll(q));
         }
     }
 
--- a/test/jdk/java/util/concurrent/tck/AtomicReferenceArrayTest.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/concurrent/tck/AtomicReferenceArrayTest.java	Tue Jan 30 16:41:40 2018 +0100
@@ -84,7 +84,7 @@
      */
     public void testConstructorSubClassArray() {
         Integer[] a = { two, one, three, four, seven };
-        AtomicReferenceArray<Number> aa = new AtomicReferenceArray<Number>(a);
+        AtomicReferenceArray<Number> aa = new AtomicReferenceArray<>(a);
         assertEquals(a.length, aa.length());
         for (int i = 0; i < a.length; i++) {
             assertSame(a[i], aa.get(i));
--- a/test/jdk/java/util/concurrent/tck/BlockingQueueTest.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/concurrent/tck/BlockingQueueTest.java	Tue Jan 30 16:41:40 2018 +0100
@@ -216,18 +216,20 @@
     public void testDrainToNonPositiveMaxElements() {
         final BlockingQueue q = emptyCollection();
         final int[] ns = { 0, -1, -42, Integer.MIN_VALUE };
-        for (int n : ns)
-            assertEquals(0, q.drainTo(new ArrayList(), n));
+        final ArrayList sink = new ArrayList();
+        for (int n : ns) {
+            assertEquals(0, q.drainTo(sink, n));
+            assertTrue(sink.isEmpty());
+        }
         if (q.remainingCapacity() > 0) {
             // Not SynchronousQueue, that is
             Object one = makeElement(1);
             q.add(one);
-            ArrayList c = new ArrayList();
             for (int n : ns)
-                assertEquals(0, q.drainTo(new ArrayList(), n));
+                assertEquals(0, q.drainTo(sink, n));
             assertEquals(1, q.size());
             assertSame(one, q.poll());
-            assertTrue(c.isEmpty());
+            assertTrue(sink.isEmpty());
         }
     }
 
--- a/test/jdk/java/util/concurrent/tck/CompletableFutureTest.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/concurrent/tck/CompletableFutureTest.java	Tue Jan 30 16:41:40 2018 +0100
@@ -357,7 +357,7 @@
      * toString indicates current completion state
      */
     public void testToString_incomplete() {
-        CompletableFuture<String> f = new CompletableFuture<String>();
+        CompletableFuture<String> f = new CompletableFuture<>();
         assertTrue(f.toString().matches(".*\\[.*Not completed.*\\]"));
         if (testImplementationDetails)
             assertEquals(identityString(f) + "[Not completed]",
@@ -365,7 +365,7 @@
     }
 
     public void testToString_normal() {
-        CompletableFuture<String> f = new CompletableFuture<String>();
+        CompletableFuture<String> f = new CompletableFuture<>();
         assertTrue(f.complete("foo"));
         assertTrue(f.toString().matches(".*\\[.*Completed normally.*\\]"));
         if (testImplementationDetails)
@@ -374,7 +374,7 @@
     }
 
     public void testToString_exception() {
-        CompletableFuture<String> f = new CompletableFuture<String>();
+        CompletableFuture<String> f = new CompletableFuture<>();
         assertTrue(f.completeExceptionally(new IndexOutOfBoundsException()));
         assertTrue(f.toString().matches(".*\\[.*Completed exceptionally.*\\]"));
         if (testImplementationDetails)
@@ -384,7 +384,7 @@
 
     public void testToString_cancelled() {
         for (boolean mayInterruptIfRunning : new boolean[] { true, false }) {
-            CompletableFuture<String> f = new CompletableFuture<String>();
+            CompletableFuture<String> f = new CompletableFuture<>();
             assertTrue(f.cancel(mayInterruptIfRunning));
             assertTrue(f.toString().matches(".*\\[.*Completed exceptionally.*\\]"));
             if (testImplementationDetails)
--- a/test/jdk/java/util/concurrent/tck/ConcurrentHashMap8Test.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/concurrent/tck/ConcurrentHashMap8Test.java	Tue Jan 30 16:41:40 2018 +0100
@@ -212,7 +212,7 @@
      */
     public void testReplaceAll() {
         ConcurrentHashMap<Integer, String> map = map5();
-        map.replaceAll((x, y) -> { return x > 3 ? "Z" : y; });
+        map.replaceAll((x, y) -> (x > 3) ? "Z" : y);
         assertEquals("A", map.get(one));
         assertEquals("B", map.get(two));
         assertEquals("C", map.get(three));
--- a/test/jdk/java/util/concurrent/tck/ConcurrentHashMapTest.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/concurrent/tck/ConcurrentHashMapTest.java	Tue Jan 30 16:41:40 2018 +0100
@@ -83,17 +83,12 @@
         return map;
     }
 
-    /** Re-implement Integer.compare for old java versions */
-    static int compare(int x, int y) {
-        return (x < y) ? -1 : (x > y) ? 1 : 0;
-    }
-
     // classes for testing Comparable fallbacks
     static class BI implements Comparable<BI> {
         private final int value;
         BI(int value) { this.value = value; }
         public int compareTo(BI other) {
-            return compare(value, other.value);
+            return Integer.compare(value, other.value);
         }
         public boolean equals(Object x) {
             return (x instanceof BI) && ((BI)x).value == value;
@@ -127,7 +122,7 @@
                     break;
             }
             if (r == 0)
-                r = compare(size(), other.size());
+                r = Integer.compare(size(), other.size());
             return r;
         }
         private static final long serialVersionUID = 0;
@@ -155,8 +150,7 @@
      */
     public void testComparableFamily() {
         int size = 500;         // makes measured test run time -> 60ms
-        ConcurrentHashMap<BI, Boolean> m =
-            new ConcurrentHashMap<BI, Boolean>();
+        ConcurrentHashMap<BI, Boolean> m = new ConcurrentHashMap<>();
         for (int i = 0; i < size; i++) {
             assertNull(m.put(new CI(i), true));
         }
@@ -172,13 +166,12 @@
      */
     public void testGenericComparable() {
         int size = 120;         // makes measured test run time -> 60ms
-        ConcurrentHashMap<Object, Boolean> m =
-            new ConcurrentHashMap<Object, Boolean>();
+        ConcurrentHashMap<Object, Boolean> m = new ConcurrentHashMap<>();
         for (int i = 0; i < size; i++) {
             BI bi = new BI(i);
             BS bs = new BS(String.valueOf(i));
-            LexicographicList<BI> bis = new LexicographicList<BI>(bi);
-            LexicographicList<BS> bss = new LexicographicList<BS>(bs);
+            LexicographicList<BI> bis = new LexicographicList<>(bi);
+            LexicographicList<BS> bss = new LexicographicList<>(bs);
             assertNull(m.putIfAbsent(bis, true));
             assertTrue(m.containsKey(bis));
             if (m.putIfAbsent(bss, true) == null)
@@ -197,14 +190,13 @@
      */
     public void testGenericComparable2() {
         int size = 500;         // makes measured test run time -> 60ms
-        ConcurrentHashMap<Object, Boolean> m =
-            new ConcurrentHashMap<Object, Boolean>();
+        ConcurrentHashMap<Object, Boolean> m = new ConcurrentHashMap<>();
         for (int i = 0; i < size; i++) {
             m.put(Collections.singletonList(new BI(i)), true);
         }
 
         for (int i = 0; i < size; i++) {
-            LexicographicList<BI> bis = new LexicographicList<BI>(new BI(i));
+            LexicographicList<BI> bis = new LexicographicList<>(new BI(i));
             assertTrue(m.containsKey(bis));
         }
     }
@@ -215,8 +207,7 @@
      */
     public void testMixedComparable() {
         int size = 1200;        // makes measured test run time -> 35ms
-        ConcurrentHashMap<Object, Object> map =
-            new ConcurrentHashMap<Object, Object>();
+        ConcurrentHashMap<Object, Object> map = new ConcurrentHashMap<>();
         Random rng = new Random();
         for (int i = 0; i < size; i++) {
             Object x;
--- a/test/jdk/java/util/concurrent/tck/ConcurrentSkipListSetTest.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/concurrent/tck/ConcurrentSkipListSetTest.java	Tue Jan 30 16:41:40 2018 +0100
@@ -65,8 +65,7 @@
      * Integers 0 ... n - 1.
      */
     private static ConcurrentSkipListSet<Integer> populatedSet(int n) {
-        ConcurrentSkipListSet<Integer> q =
-            new ConcurrentSkipListSet<Integer>();
+        ConcurrentSkipListSet<Integer> q = new ConcurrentSkipListSet<>();
         assertTrue(q.isEmpty());
         for (int i = n - 1; i >= 0; i -= 2)
             assertTrue(q.add(new Integer(i)));
--- a/test/jdk/java/util/concurrent/tck/ConcurrentSkipListSubSetTest.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/concurrent/tck/ConcurrentSkipListSubSetTest.java	Tue Jan 30 16:41:40 2018 +0100
@@ -60,8 +60,7 @@
      * Integers 0 ... n - 1.
      */
     private static NavigableSet<Integer> populatedSet(int n) {
-        ConcurrentSkipListSet<Integer> q =
-            new ConcurrentSkipListSet<Integer>();
+        ConcurrentSkipListSet<Integer> q = new ConcurrentSkipListSet<>();
         assertTrue(q.isEmpty());
 
         for (int i = n - 1; i >= 0; i -= 2)
--- a/test/jdk/java/util/concurrent/tck/CopyOnWriteArrayListTest.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/concurrent/tck/CopyOnWriteArrayListTest.java	Tue Jan 30 16:41:40 2018 +0100
@@ -83,8 +83,8 @@
     static CopyOnWriteArrayList<Integer> populatedArray(Integer[] elements) {
         CopyOnWriteArrayList<Integer> a = new CopyOnWriteArrayList<>();
         assertTrue(a.isEmpty());
-        for (int i = 0; i < elements.length; i++)
-            a.add(elements[i]);
+        for (Integer element : elements)
+            a.add(element);
         assertFalse(a.isEmpty());
         assertEquals(elements.length, a.size());
         return a;
--- a/test/jdk/java/util/concurrent/tck/CyclicBarrierTest.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/concurrent/tck/CyclicBarrierTest.java	Tue Jan 30 16:41:40 2018 +0100
@@ -335,8 +335,7 @@
                         c.await();
                         shouldThrow();
                     }
-                    catch (BrokenBarrierException ok) {}
-                    catch (InterruptedException ok) {}
+                    catch (BrokenBarrierException | InterruptedException ok) {}
                 }}});
 
         for (int i = 0; i < 4; i++) {
--- a/test/jdk/java/util/concurrent/tck/ForkJoinPool8Test.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/concurrent/tck/ForkJoinPool8Test.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1557,7 +1557,7 @@
      * timeout elapsed
      */
     public void testAwaitQuiescence2() throws Exception {
-        /**
+        /*
          * """It is possible to disable or limit the use of threads in the
          * common pool by setting the parallelism property to zero. However
          * doing so may cause unjoined tasks to never be executed."""
--- a/test/jdk/java/util/concurrent/tck/FutureTaskTest.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/concurrent/tck/FutureTaskTest.java	Tue Jan 30 16:41:40 2018 +0100
@@ -865,7 +865,7 @@
      * toString indicates current completion state
      */
     public void testToString_incomplete() {
-        FutureTask<String> f = new FutureTask<String>(() -> "");
+        FutureTask<String> f = new FutureTask<>(() -> "");
         assertTrue(f.toString().matches(".*\\[.*Not completed.*\\]"));
         if (testImplementationDetails)
             assertTrue(f.toString().startsWith(
@@ -873,7 +873,7 @@
     }
 
     public void testToString_normal() {
-        FutureTask<String> f = new FutureTask<String>(() -> "");
+        FutureTask<String> f = new FutureTask<>(() -> "");
         f.run();
         assertTrue(f.toString().matches(".*\\[.*Completed normally.*\\]"));
         if (testImplementationDetails)
@@ -882,7 +882,7 @@
     }
 
     public void testToString_exception() {
-        FutureTask<String> f = new FutureTask<String>(
+        FutureTask<String> f = new FutureTask<>(
                 () -> { throw new ArithmeticException(); });
         f.run();
         assertTrue(f.toString().matches(".*\\[.*Completed exceptionally.*\\]"));
@@ -893,7 +893,7 @@
 
     public void testToString_cancelled() {
         for (boolean mayInterruptIfRunning : new boolean[] { true, false }) {
-            FutureTask<String> f = new FutureTask<String>(() -> "");
+            FutureTask<String> f = new FutureTask<>(() -> "");
             assertTrue(f.cancel(mayInterruptIfRunning));
             assertTrue(f.toString().matches(".*\\[.*Cancelled.*\\]"));
             if (testImplementationDetails)
--- a/test/jdk/java/util/concurrent/tck/JSR166TestCase.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/concurrent/tck/JSR166TestCase.java	Tue Jan 30 16:41:40 2018 +0100
@@ -472,18 +472,11 @@
         }
     }
 
-    public static boolean atLeastJava6() { return JAVA_CLASS_VERSION >= 50.0; }
-    public static boolean atLeastJava7() { return JAVA_CLASS_VERSION >= 51.0; }
-    public static boolean atLeastJava8() { return JAVA_CLASS_VERSION >= 52.0; }
-    public static boolean atLeastJava9() {
-        return JAVA_CLASS_VERSION >= 53.0
-            // As of 2015-09, java9 still uses 52.0 class file version
-            || JAVA_SPECIFICATION_VERSION.matches("^(1\\.)?(9|[0-9][0-9])$");
-    }
-    public static boolean atLeastJava10() {
-        return JAVA_CLASS_VERSION >= 54.0
-            || JAVA_SPECIFICATION_VERSION.matches("^(1\\.)?[0-9][0-9]$");
-    }
+    public static boolean atLeastJava6()  { return JAVA_CLASS_VERSION >= 50.0; }
+    public static boolean atLeastJava7()  { return JAVA_CLASS_VERSION >= 51.0; }
+    public static boolean atLeastJava8()  { return JAVA_CLASS_VERSION >= 52.0; }
+    public static boolean atLeastJava9()  { return JAVA_CLASS_VERSION >= 53.0; }
+    public static boolean atLeastJava10() { return JAVA_CLASS_VERSION >= 54.0; }
 
     /**
      * Collects all JSR166 unit tests as one suite.
--- a/test/jdk/java/util/concurrent/tck/LinkedBlockingQueueTest.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/concurrent/tck/LinkedBlockingQueueTest.java	Tue Jan 30 16:41:40 2018 +0100
@@ -86,8 +86,7 @@
      * Integers 0 ... n - 1.
      */
     private static LinkedBlockingQueue<Integer> populatedQueue(int n) {
-        LinkedBlockingQueue<Integer> q =
-            new LinkedBlockingQueue<Integer>(n);
+        LinkedBlockingQueue<Integer> q = new LinkedBlockingQueue<>(n);
         assertTrue(q.isEmpty());
         for (int i = 0; i < n; i++)
             assertTrue(q.offer(new Integer(i)));
--- a/test/jdk/java/util/concurrent/tck/MapTest.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/concurrent/tck/MapTest.java	Tue Jan 30 16:41:40 2018 +0100
@@ -129,7 +129,7 @@
         final Object v2 = (permitsNullValues && rnd.nextBoolean() && v1 != null)
             ? null : impl.makeValue(2);
 
-        /** If true, always lands in first bucket in hash tables. */
+        // If true, always lands in first bucket in hash tables.
         final boolean poorHash = rnd.nextBoolean();
         class Key implements Comparable<Key> {
             final int i;
--- a/test/jdk/java/util/concurrent/tck/RecursiveActionTest.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/concurrent/tck/RecursiveActionTest.java	Tue Jan 30 16:41:40 2018 +0100
@@ -352,8 +352,7 @@
      * succeeds in the presence of interrupts
      */
     public void testJoinIgnoresInterruptsOutsideForkJoinPool() {
-        final SynchronousQueue<FibAction[]> sq =
-            new SynchronousQueue<FibAction[]>();
+        final SynchronousQueue<FibAction[]> sq = new SynchronousQueue<>();
         RecursiveAction a = new CheckedRecursiveAction() {
             protected void realCompute() throws InterruptedException {
                 FibAction[] fibActions = new FibAction[6];
--- a/test/jdk/java/util/concurrent/tck/ScheduledExecutorSubclassTest.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/concurrent/tck/ScheduledExecutorSubclassTest.java	Tue Jan 30 16:41:40 2018 +0100
@@ -872,7 +872,7 @@
         immediates.forEach(
             f -> assertTrue(((ScheduledFuture)f).getDelay(NANOSECONDS) <= 0L));
 
-        Stream.of(immediates, delayeds, periodics).flatMap(c -> c.stream())
+        Stream.of(immediates, delayeds, periodics).flatMap(Collection::stream)
             .forEach(f -> assertFalse(f.isDone()));
 
         try { p.shutdown(); } catch (SecurityException ok) { return; }
@@ -926,7 +926,7 @@
 
         assertTrue(q.isEmpty());
 
-        Stream.of(immediates, delayeds, periodics).flatMap(c -> c.stream())
+        Stream.of(immediates, delayeds, periodics).flatMap(Collection::stream)
             .forEach(f -> assertTrue(f.isDone()));
 
         for (Future<?> f : immediates) assertNull(f.get());
--- a/test/jdk/java/util/concurrent/tck/ScheduledExecutorTest.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/concurrent/tck/ScheduledExecutorTest.java	Tue Jan 30 16:41:40 2018 +0100
@@ -831,7 +831,7 @@
         immediates.forEach(
             f -> assertTrue(((ScheduledFuture)f).getDelay(NANOSECONDS) <= 0L));
 
-        Stream.of(immediates, delayeds, periodics).flatMap(c -> c.stream())
+        Stream.of(immediates, delayeds, periodics).flatMap(Collection::stream)
             .forEach(f -> assertFalse(f.isDone()));
 
         try { p.shutdown(); } catch (SecurityException ok) { return; }
@@ -885,7 +885,7 @@
 
         assertTrue(q.isEmpty());
 
-        Stream.of(immediates, delayeds, periodics).flatMap(c -> c.stream())
+        Stream.of(immediates, delayeds, periodics).flatMap(Collection::stream)
             .forEach(f -> assertTrue(f.isDone()));
 
         for (Future<?> f : immediates) assertNull(f.get());
--- a/test/jdk/java/util/concurrent/tck/SubmissionPublisherTest.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/concurrent/tck/SubmissionPublisherTest.java	Tue Jan 30 16:41:40 2018 +0100
@@ -431,7 +431,7 @@
      */
     public void testCancel() {
         SubmissionPublisher<Integer> p =
-            new SubmissionPublisher<Integer>(basicExecutor, 4); // must be < 20
+            new SubmissionPublisher<>(basicExecutor, 4); // must be < 20
         TestSubscriber s1 = new TestSubscriber();
         TestSubscriber s2 = new TestSubscriber();
         p.subscribe(s1);
@@ -1012,6 +1012,7 @@
      * cvs update -D '2017-11-25' src/main/java/util/concurrent/SubmissionPublisher.java && ant -Djsr166.expensiveTests=true -Djsr166.tckTestClass=SubmissionPublisherTest -Djsr166.methodFilter=testMissedSignal tck; cvs update -A src/main/java/util/concurrent/SubmissionPublisher.java
      */
     public void testMissedSignal_8187947() throws Exception {
+        if (!atLeastJava9()) return; // backport to jdk8 too hard
         final int N = expensiveTests ? (1 << 20) : (1 << 10);
         final CountDownLatch finished = new CountDownLatch(1);
         final SubmissionPublisher<Boolean> pub = new SubmissionPublisher<>();
--- a/test/jdk/java/util/concurrent/tck/ThreadLocalRandomTest.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/concurrent/tck/ThreadLocalRandomTest.java	Tue Jan 30 16:41:40 2018 +0100
@@ -382,7 +382,7 @@
         // Don't use main thread's ThreadLocalRandom - it is likely to
         // be polluted by previous tests.
         final AtomicReference<ThreadLocalRandom> threadLocalRandom =
-            new AtomicReference<ThreadLocalRandom>();
+            new AtomicReference<>();
         final AtomicLong rand = new AtomicLong();
 
         long firstRand = 0;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/java/util/logging/LogManager/Configuration/rootLoggerHandlers/BadRootLoggerHandlers.java	Tue Jan 30 16:41:40 2018 +0100
@@ -0,0 +1,304 @@
+/*
+ * 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.
+ */
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.io.PrintStream;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.nio.file.StandardCopyOption;
+import java.util.Collections;
+import java.util.Enumeration;
+import java.util.List;
+import java.util.Objects;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.ConcurrentMap;
+import java.util.logging.Handler;
+import java.util.logging.Level;
+import java.util.logging.LogManager;
+import java.util.logging.Logger;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+
+/**
+ * @test
+ * @bug 8191033
+ * @build custom.DotHandler custom.Handler
+ * @run main/othervm -Dlogging.properties=badlogging.properties -Dclz=1custom.DotHandler BadRootLoggerHandlers CUSTOM
+ * @run main/othervm -Dlogging.properties=badlogging.properties -Dclz=1custom.DotHandler BadRootLoggerHandlers DEFAULT
+ * @run main/othervm -Dlogging.properties=badglobal.properties -Dclz=1custom.GlobalHandler BadRootLoggerHandlers CUSTOM
+ * @run main/othervm -Dlogging.properties=badglobal.properties -Dclz=1custom.GlobalHandler BadRootLoggerHandlers DEFAULT
+ * @run main/othervm/java.security.policy==test.policy -Dlogging.properties=badlogging.properties -Dclz=1custom.DotHandler BadRootLoggerHandlers CUSTOM
+ * @run main/othervm/java.security.policy==test.policy  -Dlogging.properties=badlogging.properties -Dclz=1custom.DotHandler BadRootLoggerHandlers DEFAULT
+ * @run main/othervm/java.security.policy==test.policy  -Dlogging.properties=badglobal.properties -Dclz=1custom.GlobalHandler BadRootLoggerHandlers CUSTOM
+ * @run main/othervm/java.security.policy==test.policy  -Dlogging.properties=badglobal.properties -Dclz=1custom.GlobalHandler BadRootLoggerHandlers DEFAULT
+ * @author danielfuchs
+ */
+public class BadRootLoggerHandlers {
+
+    public static final Path SRC_DIR =
+            Paths.get(System.getProperty("test.src", "src"));
+    public static final Path USER_DIR =
+            Paths.get(System.getProperty("user.dir", "."));
+    public static final Path CONFIG_FILE = Paths.get(
+            Objects.requireNonNull(System.getProperty("logging.properties")));
+    public static final String BAD_HANDLER_NAME =
+            Objects.requireNonNull(System.getProperty("clz"));
+
+    static enum TESTS { CUSTOM, DEFAULT}
+    public static final class CustomLogManager extends LogManager {
+        final ConcurrentMap<String, Logger> loggers = new ConcurrentHashMap<>();
+        @Override
+        public boolean addLogger(Logger logger) {
+            return loggers.putIfAbsent(logger.getName(), logger) == null;
+        }
+
+        @Override
+        public Enumeration<String> getLoggerNames() {
+            return Collections.enumeration(loggers.keySet());
+        }
+
+        @Override
+        public Logger getLogger(String name) {
+            return loggers.get(name);
+        }
+    }
+
+    public static class SystemErr extends OutputStream {
+        final ByteArrayOutputStream baos = new ByteArrayOutputStream();
+        final OutputStream wrapped;
+        public SystemErr(OutputStream out) {
+            this.wrapped = out;
+        }
+
+        @Override
+        public void write(int b) throws IOException {
+            baos.write(b);
+            wrapped.write(b);
+        }
+
+        public void close() throws IOException {
+            flush();
+            super.close();
+        }
+
+        public void flush() throws IOException {
+            super.flush();
+            wrapped.flush();
+        }
+
+    }
+
+    // Uncomment this to run the test on Java 8. Java 8 does not have
+    // List.of(...)
+    //    static final class List {
+    //        static <T> java.util.List<T> of(T... items) {
+    //            return Collections.unmodifiableList(Arrays.asList(items));
+    //        }
+    //    }
+
+    public static void main(String[] args) throws IOException {
+        Path initialProps = SRC_DIR.resolve(CONFIG_FILE);
+        Path loggingProps = USER_DIR.resolve(CONFIG_FILE);
+        if (args.length != 1) {
+            throw new IllegalArgumentException("expected (only) one of " + List.of(TESTS.values()));
+        }
+
+        TESTS test = TESTS.valueOf(args[0]);
+        System.setProperty("java.util.logging.config.file", loggingProps.toString());
+        if (test == TESTS.CUSTOM) {
+            System.setProperty("java.util.logging.manager", CustomLogManager.class.getName());
+        }
+
+        Files.copy(initialProps, loggingProps, StandardCopyOption.REPLACE_EXISTING);
+
+        SystemErr err = new SystemErr(System.err);
+        System.setErr(new PrintStream(err));
+
+        System.out.println("Root level is: " + Logger.getLogger("").getLevel());
+        if (Logger.getLogger("").getLevel() != Level.INFO) {
+            throw new RuntimeException("Expected root level INFO, got: "
+                                        + Logger.getLogger("").getLevel());
+        }
+
+        Class<? extends LogManager> logManagerClass =
+                LogManager.getLogManager().getClass();
+        Class<? extends LogManager> expectedClass =
+                test == TESTS.CUSTOM ? CustomLogManager.class : LogManager.class;
+        if (logManagerClass != expectedClass) {
+            throw new RuntimeException("Bad class for log manager: " + logManagerClass
+                                        + " expected " + expectedClass + " for " + test);
+        }
+
+        if (test == TESTS.DEFAULT) {
+            // Verify that we have two handlers. One was configured with
+            // handlers=custom.Handler, the other with
+            // .handlers=custom.DotHandler
+            // Verify that exactly one of the two handlers is a custom.Handler
+            // Verify that exactly one of the two handlers is a custom.DotHandler
+            // Verify that the two handlers have an id of '1'
+            checkHandlers(Logger.getLogger(""),
+                    Logger.getLogger("").getHandlers(),
+                    1L,
+                    custom.Handler.class,
+                    custom.DotHandler.class);
+        } else {
+            // Verify that we have one handler, configured with
+            // handlers=custom.Handler.
+            // Verify that it is a custom.Handler
+            // Verify that the handler have an id of '1'
+            checkHandlers(Logger.getLogger(""),
+                    Logger.getLogger("").getHandlers(),
+                    1L,
+                    custom.Handler.class);
+
+        }
+
+        // DEFAULT: The log message "hi" should appear twice on the console.
+        // CUSTOM: The log message "hi" should appear twice on the console.
+        // We don't check that. This is just for log analysis in case
+        // of test failure.
+        Logger.getAnonymousLogger().info("hi (" + test +")");
+
+        // Change the root logger level to FINE in the properties file
+        // and reload the configuration.
+        Files.write(loggingProps,
+                Files.lines(initialProps)
+                        .map((s) -> s.replace("INFO", "FINE"))
+                        .collect(Collectors.toList()));
+        LogManager.getLogManager().readConfiguration();
+
+        System.out.println("Root level is: " + Logger.getLogger("").getLevel());
+        if (Logger.getLogger("").getLevel() != Level.FINE) {
+            throw new RuntimeException("Expected root level FINE, got: "
+                    + Logger.getLogger("").getLevel());
+        }
+
+        // Verify that we have now only one handler, configured with
+        // handlers=custom.Handler, and that the other configured with
+        // .handlers=custom.DotHandler was ignored.
+        // Verify that the handler is a custom.Handler
+        // Verify that the handler has an id of '2'
+        checkHandlers(Logger.getLogger(""),
+                Logger.getLogger("").getHandlers(),
+                2L,
+                custom.Handler.class);
+
+        // The log message "there" should appear only once on the console.
+        // We don't check that. This is just for log analysis in case
+        // of test failure.
+        Logger.getAnonymousLogger().info("there!");
+
+        // Change the root logger level to FINER in the properties file
+        // and reload the configuration.
+        Files.write(loggingProps,
+                Files.lines(initialProps)
+                        .map((s) -> s.replace("INFO", "FINER"))
+                        .collect(Collectors.toList()));
+        LogManager.getLogManager().readConfiguration();
+
+        System.out.println("Root level is: " + Logger.getLogger("").getLevel());
+        if (Logger.getLogger("").getLevel() != Level.FINER) {
+            throw new RuntimeException("Expected root level FINER, got: "
+                    + Logger.getLogger("").getLevel());
+        }
+
+        // Verify that we have only one handler, configured with
+        // handlers=custom.Handler, and that the other configured with
+        // .handlers=custom.DotHandler was ignored.
+        // Verify that the handler is a custom.Handler
+        // Verify that the handler has an id of '3'
+        checkHandlers(Logger.getLogger(""),
+                Logger.getLogger("").getHandlers(),
+                3L,
+                custom.Handler.class);
+
+        // The log message "done" should appear only once on the console.
+        // We don't check that. This is just for log analysis in case
+        // of test failure.
+        Logger.getAnonymousLogger().info("done!");
+
+        byte[] errBytes = err.baos.toByteArray();
+        String errText = new String(errBytes);
+        switch(test) {
+            case CUSTOM:
+                if (errText.contains("java.lang.ClassNotFoundException: "
+                        + BAD_HANDLER_NAME)) {
+                    throw new RuntimeException("Error message found on System.err");
+                }
+                System.out.println("OK: ClassNotFoundException error message not found for " + test);
+                break;
+            case DEFAULT:
+                if (!errText.contains("java.lang.ClassNotFoundException: "
+                        + BAD_HANDLER_NAME)) {
+                    throw new RuntimeException("Error message not found on System.err");
+                }
+                System.err.println("OK: ClassNotFoundException error message found for " + test);
+                break;
+            default:
+                throw new InternalError("unknown test case: " + test);
+        }
+    }
+
+    static void checkHandlers(Logger logger, Handler[] handlers, Long expectedID, Class<?>... clz) {
+        // Verify that we have the expected number of handlers.
+        if (Stream.of(handlers).count() != clz.length) {
+            throw new RuntimeException("Expected " + clz.length + " handlers, got: "
+                    + List.of(logger.getHandlers()));
+        }
+        for (Class<?> cl : clz) {
+            // Verify that the handlers are of the expected class.
+            // For each class, we should have exactly one handler
+            // of that class.
+            if (Stream.of(handlers)
+                    .map(Object::getClass)
+                    .filter(cl::equals)
+                    .count() != 1) {
+                throw new RuntimeException("Expected one " + cl +", got: "
+                        + List.of(logger.getHandlers()));
+            }
+        }
+        // Verify that all handlers have the expected ID
+        if (Stream.of(logger.getHandlers())
+                .map(BadRootLoggerHandlers::getId)
+                .filter(expectedID::equals)
+                .count() != clz.length) {
+            throw new RuntimeException("Expected ids to be " + expectedID + ", got: "
+                    + List.of(logger.getHandlers()));
+        }
+    }
+
+    static long getId(Handler h) {
+        if (h instanceof custom.Handler) {
+            return ((custom.Handler)h).id;
+        }
+        if (h instanceof custom.DotHandler) {
+            return ((custom.DotHandler)h).id;
+        }
+        if (h instanceof custom.GlobalHandler) {
+            return ((custom.GlobalHandler)h).id;
+        }
+        return -1;
+    }
+}
--- a/test/jdk/java/util/logging/LogManager/Configuration/rootLoggerHandlers/RootLoggerHandlers.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/logging/LogManager/Configuration/rootLoggerHandlers/RootLoggerHandlers.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -24,7 +24,7 @@
 import java.nio.file.Files;
 import java.nio.file.Path;
 import java.nio.file.Paths;
-import java.util.Arrays;
+import java.nio.file.StandardCopyOption;
 import java.util.Collections;
 import java.util.List;
 import java.util.logging.Handler;
@@ -39,6 +39,7 @@
  * @bug 8191033
  * @build custom.DotHandler custom.Handler
  * @run main/othervm RootLoggerHandlers
+ * @run main/othervm/java.security.policy==test.policy RootLoggerHandlers
  * @author danielfuchs
  */
 public class RootLoggerHandlers {
@@ -61,7 +62,7 @@
         Path initialProps = SRC_DIR.resolve(CONFIG_FILE);
         Path loggingProps = USER_DIR.resolve(CONFIG_FILE);
         System.setProperty("java.util.logging.config.file", loggingProps.toString());
-        Files.copy(initialProps, loggingProps);
+        Files.copy(initialProps, loggingProps, StandardCopyOption.REPLACE_EXISTING);
         System.out.println("Root level is: " + Logger.getLogger("").getLevel());
         if (Logger.getLogger("").getLevel() != Level.INFO) {
             throw new RuntimeException("Expected root level INFO, got: "
@@ -73,10 +74,15 @@
         // Verify that exactly one of the two handlers is a custom.Handler
         // Verify that exactly one of the two handlers is a custom.DotHandler
         // Verify that the two handlers has an id of '1'
-        checkHandlers(Logger.getLogger("").getHandlers(),
+        checkHandlers(Logger.getLogger(""),
+                Logger.getLogger("").getHandlers(),
                 1L,
                 custom.Handler.class,
                 custom.DotHandler.class);
+        checkHandlers(Logger.getLogger("global"),
+                Logger.getGlobal().getHandlers(),
+                1L,
+                custom.GlobalHandler.class);
 
         // The log message "hi" should appear twice on the console.
         // We don't check that. This is just for log analysis in case
@@ -102,9 +108,13 @@
         // .handlers=custom.DotHandler was ignored.
         // Verify that the handler is a custom.Handler
         // Verify that the handler has an id of '2'
-        checkHandlers(Logger.getLogger("").getHandlers(),
+        checkHandlers(Logger.getLogger(""),
+                Logger.getLogger("").getHandlers(),
                 2L,
                 custom.Handler.class);
+        checkHandlers(Logger.getGlobal(),
+                Logger.getGlobal().getHandlers(),
+                1L);
 
         // The log message "there" should appear only once on the console.
         // We don't check that. This is just for log analysis in case
@@ -130,9 +140,45 @@
         // .handlers=custom.DotHandler was ignored.
         // Verify that the handler is a custom.Handler
         // Verify that the handler has an id of '3'
-        checkHandlers(Logger.getLogger("").getHandlers(),
+        checkHandlers(Logger.getLogger(""),
+                Logger.getLogger("").getHandlers(),
                 3L,
                 custom.Handler.class);
+        checkHandlers(Logger.getGlobal(),
+                Logger.getGlobal().getHandlers(),
+                1L);
+
+        LogManager.getLogManager().reset();
+        LogManager.getLogManager().updateConfiguration((s) -> (o,n) -> n);
+        // Verify that we have only one handler, configured with
+        // handlers=custom.Handler, and that the other configured with
+        // .handlers=custom.DotHandler was ignored.
+        // Verify that the handler is a custom.Handler
+        // Verify that the handler has an id of '4'
+        checkHandlers(Logger.getLogger(""),
+                Logger.getLogger("").getHandlers(),
+                4L,
+                custom.Handler.class);
+        checkHandlers(Logger.getGlobal(),
+                Logger.getGlobal().getHandlers(),
+                2L,
+                custom.GlobalHandler.class);
+
+        LogManager.getLogManager().updateConfiguration((s) -> (o,n) -> n);
+        // Verify that we have only one handler, configured with
+        // handlers=custom.Handler, and that the other configured with
+        // .handlers=custom.DotHandler was ignored.
+        // Verify that the handler is a custom.Handler
+        // Verify that the handler has an id of '4'
+        checkHandlers(Logger.getLogger(""),
+                Logger.getLogger("").getHandlers(),
+                4L,
+                custom.Handler.class);
+        checkHandlers(Logger.getGlobal(),
+                Logger.getGlobal().getHandlers(),
+                2L,
+                custom.GlobalHandler.class);
+
 
         // The log message "done" should appear only once on the console.
         // We don't check that. This is just for log analysis in case
@@ -140,11 +186,11 @@
         Logger.getAnonymousLogger().info("done!");
     }
 
-    static void checkHandlers(Handler[] handlers, Long expectedID, Class<?>... clz) {
+    static void checkHandlers(Logger logger, Handler[] handlers, Long expectedID, Class<?>... clz) {
         // Verify that we have the expected number of handlers.
         if (Stream.of(handlers).count() != clz.length) {
             throw new RuntimeException("Expected " + clz.length + " handlers, got: "
-                    + List.of(Logger.getLogger("").getHandlers()));
+                    + List.of(logger.getHandlers()));
         }
         for (Class<?> cl : clz) {
             // Verify that the handlers are of the expected class.
@@ -155,16 +201,16 @@
                     .filter(cl::equals)
                     .count() != 1) {
                 throw new RuntimeException("Expected one " + cl +", got: "
-                        + List.of(Logger.getLogger("").getHandlers()));
+                        + List.of(logger.getHandlers()));
             }
         }
         // Verify that all handlers have the expected ID
-        if (Stream.of(Logger.getLogger("").getHandlers())
+        if (Stream.of(logger.getHandlers())
                 .map(RootLoggerHandlers::getId)
                 .filter(expectedID::equals)
                 .count() != clz.length) {
             throw new RuntimeException("Expected ids to be " + expectedID + ", got: "
-                    + List.of(Logger.getLogger("").getHandlers()));
+                    + List.of(logger.getHandlers()));
         }
     }
 
@@ -175,6 +221,9 @@
         if (h instanceof custom.DotHandler) {
             return ((custom.DotHandler)h).id;
         }
+        if (h instanceof custom.GlobalHandler) {
+            return ((custom.GlobalHandler)h).id;
+        }
         return -1;
     }
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/java/util/logging/LogManager/Configuration/rootLoggerHandlers/badglobal.properties	Tue Jan 30 16:41:40 2018 +0100
@@ -0,0 +1,19 @@
+############################################################
+#  	Global properties
+############################################################
+
+# "handlers" specifies a comma separated list of log Handler
+# classes.  These handlers will be installed during VM startup.
+#handlers= java.util.logging.ConsoleHandler
+handlers= custom.Handler
+.handlers= custom.DotHandler
+global.handlers = 1custom.GlobalHandler, custom.GlobalHandler
+
+# Default global logging level.
+.level= INFO
+
+# Other configuration
+custom.Handler.level=ALL
+custom.DotHandler.level=ALL
+java.util.logging.SimpleFormatter.format=%4$s [%1$tc]: %2$s: %5$s%n
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/java/util/logging/LogManager/Configuration/rootLoggerHandlers/badlogging.properties	Tue Jan 30 16:41:40 2018 +0100
@@ -0,0 +1,18 @@
+############################################################
+#  	Global properties
+############################################################
+
+# "handlers" specifies a comma separated list of log Handler
+# classes.  These handlers will be installed during VM startup.
+#handlers= java.util.logging.ConsoleHandler
+handlers= custom.Handler
+.handlers= 1custom.DotHandler,custom.DotHandler
+
+# Default global logging level.
+.level= INFO
+
+# Other configuration
+custom.Handler.level=ALL
+custom.DotHandler.level=ALL
+java.util.logging.SimpleFormatter.format=%4$s [%1$tc]: %2$s: %5$s%n
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/java/util/logging/LogManager/Configuration/rootLoggerHandlers/custom/GlobalHandler.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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.
+ *
+ * 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 custom;
+
+import java.util.concurrent.atomic.AtomicLong;
+
+/**
+ *
+ * @author danielfuchs
+ */
+public class GlobalHandler extends java.util.logging.ConsoleHandler {
+
+    public static final AtomicLong IDS = new AtomicLong();
+    public final long id = IDS.incrementAndGet();
+    public GlobalHandler() {
+        System.out.println("GlobalHandler(" + id + ") created");
+        //new Exception("GlobalHandler").printStackTrace();
+    }
+
+    @Override
+    public void close() {
+        System.out.println("GlobalHandler(" + id + ") closed");
+        super.close();
+    }
+
+    @Override
+    public String toString() {
+        return this.getClass().getName() + '(' + id + ')';
+    }
+}
--- a/test/jdk/java/util/logging/LogManager/Configuration/rootLoggerHandlers/logging.properties	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/logging/LogManager/Configuration/rootLoggerHandlers/logging.properties	Tue Jan 30 16:41:40 2018 +0100
@@ -7,6 +7,7 @@
 #handlers= java.util.logging.ConsoleHandler
 handlers= custom.Handler
 .handlers= custom.DotHandler
+global.handlers= custom.GlobalHandler
 
 # Default global logging level.
 .level= INFO
@@ -14,5 +15,6 @@
 # Other configuration
 custom.Handler.level=ALL
 custom.DotHandler.level=ALL
+custom.GlobalHandler.level=ALL
 java.util.logging.SimpleFormatter.format=%4$s [%1$tc]: %2$s: %5$s%n
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/java/util/logging/LogManager/Configuration/rootLoggerHandlers/test.policy	Tue Jan 30 16:41:40 2018 +0100
@@ -0,0 +1,13 @@
+grant {
+    // permissions for RootLoggerHandlers
+    permission java.util.PropertyPermission "*", "read";
+    permission java.util.PropertyPermission "java.util.logging.config.file", "write";
+    permission java.io.FilePermission "<<ALL FILES>>", "read,write,delete";
+    permission java.util.logging.LoggingPermission "control";
+
+    // additional permissions for BadRootLoggerHandlers
+    permission java.util.PropertyPermission "java.util.logging.manager", "write";
+    permission java.lang.RuntimePermission "setIO";
+    permission java.lang.RuntimePermission "shutdownHooks";
+    permission java.lang.RuntimePermission "setContextClassLoader";
+};
--- a/test/jdk/java/util/logging/LogManager/LinkageErrorTest.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/logging/LogManager/LinkageErrorTest.java	Tue Jan 30 16:41:40 2018 +0100
@@ -28,7 +28,8 @@
 import java.util.logging.Logger;
 
 /**
- * @test 8152515
+ * @test
+ * @bug 8152515
  * @summary Checks that LinkageError are ignored when closing handlers
  *          during Shutdown.
  * @build LinkageErrorTest
--- a/test/jdk/java/util/stream/test/org/openjdk/tests/java/util/stream/FlatMapOpTest.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/java/util/stream/test/org/openjdk/tests/java/util/stream/FlatMapOpTest.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 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
@@ -24,7 +24,7 @@
 /*
  * @test
  * @summary flat-map operations
- * @bug 8044047 8076458
+ * @bug 8044047 8076458 8075939
  */
 
 package org.openjdk.tests.java.util.stream;
@@ -54,6 +54,7 @@
 @Test
 public class FlatMapOpTest extends OpTestCase {
 
+    @Test
     public void testNullMapper() {
         checkNPE(() -> Stream.of(1).flatMap(null));
         checkNPE(() -> IntStream.of(1).flatMap(null));
@@ -64,6 +65,7 @@
     static final Function<Integer, Stream<Integer>> integerRangeMapper
             = e -> IntStream.range(0, e).boxed();
 
+    @Test
     public void testFlatMap() {
         String[] stringsArray = {"hello", "there", "", "yada"};
         Stream<String> strings = Arrays.asList(stringsArray).stream();
@@ -149,11 +151,24 @@
         exerciseOps(data, s -> s.flatMap((Integer e) -> IntStream.range(0, e).boxed().limit(10)));
     }
 
+    @Test
+    public void testOpsShortCircuit() {
+        AtomicInteger count = new AtomicInteger();
+        Stream.of(0).flatMap(i -> IntStream.range(0, 100).boxed()).
+                peek(i -> count.incrementAndGet()).
+                limit(10).toArray();
+        assertEquals(count.get(), 10);
+    }
+
     //
 
     @Test(dataProvider = "IntStreamTestData", dataProviderClass = IntStreamTestDataProvider.class)
     public void testIntOps(String name, TestData.OfInt data) {
-        Collection<Integer> result = exerciseOps(data, s -> s.flatMap(i -> Collections.singleton(i).stream().mapToInt(j -> j)));
+        Collection<Integer> result = exerciseOps(data, s -> s.flatMap(IntStream::of));
+        assertEquals(data.size(), result.size());
+        assertContents(data, result);
+
+        result = exerciseOps(data, s -> s.boxed().flatMapToInt(IntStream::of));
         assertEquals(data.size(), result.size());
         assertContents(data, result);
 
@@ -165,13 +180,35 @@
     public void testIntOpsX(String name, TestData.OfInt data) {
         exerciseOps(data, s -> s.flatMap(e -> IntStream.range(0, e)));
         exerciseOps(data, s -> s.flatMap(e -> IntStream.range(0, e).limit(10)));
+
+        exerciseOps(data, s -> s.boxed().flatMapToInt(e -> IntStream.range(0, e)));
+        exerciseOps(data, s -> s.boxed().flatMapToInt(e -> IntStream.range(0, e).limit(10)));
+    }
+
+    @Test
+    public void testIntOpsShortCircuit() {
+        AtomicInteger count = new AtomicInteger();
+        IntStream.of(0).flatMap(i -> IntStream.range(0, 100)).
+                peek(i -> count.incrementAndGet()).
+                limit(10).toArray();
+        assertEquals(count.get(), 10);
+
+        count.set(0);
+        Stream.of(0).flatMapToInt(i -> IntStream.range(0, 100)).
+                peek(i -> count.incrementAndGet()).
+                limit(10).toArray();
+        assertEquals(count.get(), 10);
     }
 
     //
 
     @Test(dataProvider = "LongStreamTestData", dataProviderClass = LongStreamTestDataProvider.class)
     public void testLongOps(String name, TestData.OfLong data) {
-        Collection<Long> result = exerciseOps(data, s -> s.flatMap(i -> Collections.singleton(i).stream().mapToLong(j -> j)));
+        Collection<Long> result = exerciseOps(data, s -> s.flatMap(LongStream::of));
+        assertEquals(data.size(), result.size());
+        assertContents(data, result);
+
+        result = exerciseOps(data, s -> s.boxed().flatMapToLong(LongStream::of));
         assertEquals(data.size(), result.size());
         assertContents(data, result);
 
@@ -185,11 +222,30 @@
         exerciseOps(data, s -> s.flatMap(e -> LongStream.range(0, e).limit(10)));
     }
 
+    @Test
+    public void testLongOpsShortCircuit() {
+        AtomicInteger count = new AtomicInteger();
+        LongStream.of(0).flatMap(i -> LongStream.range(0, 100)).
+                peek(i -> count.incrementAndGet()).
+                limit(10).toArray();
+        assertEquals(count.get(), 10);
+
+        count.set(0);
+        Stream.of(0).flatMapToLong(i -> LongStream.range(0, 100)).
+                peek(i -> count.incrementAndGet()).
+                limit(10).toArray();
+        assertEquals(count.get(), 10);
+    }
+
     //
 
     @Test(dataProvider = "DoubleStreamTestData", dataProviderClass = DoubleStreamTestDataProvider.class)
     public void testDoubleOps(String name, TestData.OfDouble data) {
-        Collection<Double> result = exerciseOps(data, s -> s.flatMap(i -> Collections.singleton(i).stream().mapToDouble(j -> j)));
+        Collection<Double> result = exerciseOps(data, s -> s.flatMap(DoubleStream::of));
+        assertEquals(data.size(), result.size());
+        assertContents(data, result);
+
+        result = exerciseOps(data, s -> s.boxed().flatMapToDouble(DoubleStream::of));
         assertEquals(data.size(), result.size());
         assertContents(data, result);
 
@@ -202,4 +258,19 @@
         exerciseOps(data, s -> s.flatMap(e -> IntStream.range(0, (int) e).asDoubleStream()));
         exerciseOps(data, s -> s.flatMap(e -> IntStream.range(0, (int) e).limit(10).asDoubleStream()));
     }
+
+    @Test
+    public void testDoubleOpsShortCircuit() {
+        AtomicInteger count = new AtomicInteger();
+        DoubleStream.of(0).flatMap(i -> IntStream.range(0, 100).asDoubleStream()).
+                peek(i -> count.incrementAndGet()).
+                limit(10).toArray();
+        assertEquals(count.get(), 10);
+
+        count.set(0);
+        Stream.of(0).flatMapToDouble(i -> IntStream.range(0, 100).asDoubleStream()).
+                peek(i -> count.incrementAndGet()).
+                limit(10).toArray();
+        assertEquals(count.get(), 10);
+    }
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javax/imageio/plugins/jpeg/JpegTablesOnlyReadTest.java	Tue Jan 30 16:41:40 2018 +0100
@@ -0,0 +1,66 @@
+/*
+ * 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     8191073
+ * @summary Test verifies that when user tries to read image data from a
+ *          tables-only image input stream it should through IIOException
+ *          instead of throwing any other exception as per specification.
+ * @run     main JpegTablesOnlyReadTest
+ */
+
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Base64;
+import javax.imageio.IIOException;
+import javax.imageio.ImageIO;
+
+public class JpegTablesOnlyReadTest {
+    // JPEG input stream containing tables-only image
+    private static String inputImageBase64 = "/9j/4IAQSkZJRgABAQEASABIAAD"
+            + "/2wBDAFA3PEY8MlBGQUZaVVBfeMiCeG5uePWvuZHI//////////////////////"
+            + "//////////////////////////////2wBDAVVaWnhpeOuCguv//////////////"
+            + "///////////////////////////////////////////////////////////wAAR"
+            + "CAAgACADASIAAhEBAxEB/8QAFwAAAwEAAAAAAAAAAAAAAAAAAAECA//EACUQAQA"
+            + "CAAUDBAMAAAAAAAAAAAEAAhESITGxQXKSA2Fi0SIyUf/EABYBAQEBAAAAAAAAAA"
+            + "AAAAAAAAABA//EABcRAQEBAQAAAAAAAAAAAAAAAAEAESH/2gAMAwEAAhEDEQA/A"
+            + "Nf2VW2OKaWTqnRhl97eb9wrs91uWPEBUX+EtmrssvvbzfuJWjVG2tg1svLLtgJ0"
+            + "Uxwmd96d5zE7tVdnutyxm5JVoo0u6rpXHdWLP8PU8WIjtRuvVZN96d5zDP8AD1P"
+            + "Fhre1Apc/Ida4RAdv/9k=";
+
+    public static void main(String[] args) throws IOException {
+        byte[] inputBytes = Base64.getDecoder().decode(inputImageBase64);
+        InputStream in = new ByteArrayInputStream(inputBytes);
+
+        // Read tables-only JPEG image
+        try {
+            ImageIO.read(in);
+        } catch (IIOException e) {
+            // do nothing we expect it to throw IIOException if it throws
+            // any other exception test will fail.
+        }
+    }
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javax/imageio/plugins/png/PngPLTEChunkMissingTest.java	Tue Jan 30 16:41:40 2018 +0100
@@ -0,0 +1,71 @@
+/*
+ * 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.
+ *
+ * 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     8190997
+ * @summary Test verifies that ImageIO.read() throws proper IIOException
+ *          when we have a PNG image with color type PNG_COLOR_PALETTE but
+ *          missing the required PLTE chunk.
+ * @run     main PngPLTEChunkMissingTest
+ */
+
+import java.io.ByteArrayInputStream;
+import java.io.InputStream;
+import java.util.Base64;
+import javax.imageio.IIOException;
+import javax.imageio.ImageIO;
+
+public class PngPLTEChunkMissingTest {
+
+    // PNG image stream missing the required PLTE chunk
+    private static String inputImageBase64 = "iVBORw0KGgoAAAANSUhEUgAAAAEAAAAB"
+            + "CAMAAAA6fptVAAAACklEQVQYV2P4DwABAQEAWk1v8QAAAABJRU5ErkJgggo=";
+
+    public static void main(String[] args) throws Exception {
+
+        byte[] inputBytes = Base64.getDecoder().decode(inputImageBase64);
+        InputStream in = new ByteArrayInputStream(inputBytes);
+
+        /*
+         * Attempt to read a PNG image of color type PNG_COLOR_PALETTE
+         * but missing the required PLTE chunk.
+         */
+        try {
+            ImageIO.read(in);
+        } catch (IIOException e) {
+            /*
+             * We expect ImageIO to throw IIOException with proper message
+             * instead of throwing NullPointerException.
+             */
+            Throwable cause = e.getCause();
+            if (cause == null ||
+                (!(cause.getMessage().
+                 equals("Required PLTE chunk missing"))))
+            {
+                throw e;
+            }
+        }
+    }
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javax/imageio/plugins/png/PngReaderLargeWidthStrideTest.java	Tue Jan 30 16:41:40 2018 +0100
@@ -0,0 +1,57 @@
+/*
+ * 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     8191174
+ * @summary Test verifies that PNGImageReader doesn't throw any undocumented
+ *          Exception because of faulty calculation of scanline stride in
+ *          PNGImageReader.
+ * @run     main PngReaderLargeWidthStrideTest
+ */
+
+import java.io.ByteArrayInputStream;
+import java.io.InputStream;
+import java.util.Base64;
+import javax.imageio.IIOException;
+import javax.imageio.ImageIO;
+
+public class PngReaderLargeWidthStrideTest {
+
+    private static String inputImageBase64 = "iVBORw0KGgoAAAANSUhEUk////8AAAA"
+            + "BCAAAAAA6fptVAAAACklEQVQYV2P4DwABAQEAWk1v8QAAAABJRU5ErkJgggo=";
+
+    public static void main(String[] args) throws Exception {
+
+        byte[] inputBytes = Base64.getDecoder().decode(inputImageBase64);
+        InputStream in = new ByteArrayInputStream(inputBytes);
+
+        try {
+            ImageIO.read(in);
+        } catch (IIOException e) {
+            // Do nothing we expect it to throw IIOException, but if it throws
+            // any other exception test will fail.
+        }
+    }
+}
+
--- a/test/jdk/javax/imageio/spi/AppletContextTest/BadPluginConfigurationTest.sh	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/javax/imageio/spi/AppletContextTest/BadPluginConfigurationTest.sh	Tue Jan 30 16:41:40 2018 +0100
@@ -1,5 +1,5 @@
 #!/bin/ksh -p
-# 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
@@ -86,8 +86,24 @@
 
 # Checking for proper OS
 OS=`uname -s`
+MKTEMP="mktemp"
 case "$OS" in
-   SunOS | Linux | Darwin )
+   AIX )
+      FILESEP="/"
+      PATHSEP=":"
+      TMP=`cd /tmp; pwd -P`
+
+      type ${MKTEMP} > /dev/null 2>&1
+
+      if ! [ $? -ne 0 ] ; then 
+        MKTEMP="/opt/freeware/bin/mktemp"
+      fi
+      if ! [ -e ${MKTEMP} ] ; then 
+        pass "Test skipped because no mktemp found on this machine"
+      fi
+      ;;
+
+   Darwin | Linux | SunOS )
       FILESEP="/"
       PATHSEP=":"
       TMP=`cd /tmp; pwd -P`
@@ -180,7 +196,7 @@
 # app have file read permission for all subdirs of the
 # scratch dir
 
-PLUGINDST_DIR=$(mktemp -d ${TMP}/iio_test.XXXXXXXX)
+PLUGINDST_DIR=$(${MKTEMP} -d ${TMP}/iio_test.XXXXXXXX)
 echo "Created PLUGINDST_DIR as ${PLUGINDST_DIR}"
 
 TEST_PLUGIN=dummy.jar
--- a/test/jdk/javax/management/remote/nonLocalAccess/NonLocalJMXRemoteTest.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/javax/management/remote/nonLocalAccess/NonLocalJMXRemoteTest.java	Tue Jan 30 16:41:40 2018 +0100
@@ -43,14 +43,37 @@
  * This tests the SingleEntryRegistry implemented by JMX.
  * This test is a manual test and uses JMX running on a *different* host.
  * JMX can be enabled in any Java runtime; for example:
- * login or ssh to the different host and invoke rmiregistry with arguments below.
+ *
+ * Note: Use remote host with latest JDK update release for invoking rmiregistry.
+ *
+ * Note: Test should be ran twice once using arg1 and once using arg2.
+ *
+ * login or ssh to the remote host and invoke rmiregistry with arg1.
  * It will not show any output.
- * {@code $JDK_HOME/bin/rmiregistry \
+ * Execute the test, after test completes execution, stop the server.
+ *
+ * repeat above step using arg2 and execute the test.
+ *
+ *
+ * arg1: {@code $JDK_HOME/bin/rmiregistry \
  *         -J-Dcom.sun.management.jmxremote.port=8888 \
  *         -J-Dcom.sun.management.jmxremote.local.only=false \
  *         -J-Dcom.sun.management.jmxremote.ssl=false \
  *         -J-Dcom.sun.management.jmxremote.authenticate=false
  * }
+ *
+ *
+ * replace "jmx-registry-host" with the hostname or IP address of the remote host
+ * for property "-J-Dcom.sun.management.jmxremote.host" below.
+ *
+ * arg2: {@code $JDK_HOME/bin/rmiregistry \
+ *         -J-Dcom.sun.management.jmxremote.port=8888 \
+ *         -J-Dcom.sun.management.jmxremote.local.only=false \
+ *         -J-Dcom.sun.management.jmxremote.ssl=false \
+ *         -J-Dcom.sun.management.jmxremote.authenticate=false \
+ *         -J-Dcom.sun.management.jmxremote.host="jmx-registry-host"
+ * }
+ *
  * On the first host modify the @run command above to replace "jmx-registry-host"
  * with the hostname or IP address of the different host and run the test with jtreg.
  */
@@ -123,6 +146,7 @@
             if (asIndex < 0 ||
                     disallowIndex < 0 ||
                     nonLocalHostIndex < 0 ) {
+                System.out.println("Exception message is " + msg);
                 throw new RuntimeException("exception message is malformed", t);
             }
             System.out.printf("Found expected AccessException: %s%n%n", t);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javax/net/ssl/sanity/CacertsExplorer.java	Tue Jan 30 16:41:40 2018 +0100
@@ -0,0 +1,72 @@
+/*
+ * Copyright (c) 2018 Google Inc. All rights reserved.
+ * 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.
+ */
+
+import java.security.KeyStore;
+import java.security.cert.X509Certificate;
+import java.util.Arrays;
+import javax.net.ssl.TrustManager;
+import javax.net.ssl.TrustManagerFactory;
+import javax.net.ssl.X509TrustManager;
+
+/*
+ * @test
+ * @bug 8194960
+ * @summary Sanity check trust manager defaults/cacerts.
+ */
+
+/**
+ * Explores the set of root certificates.
+ * Also useful as a standalone program.
+ *
+ * Prior to JEP 319, stock openjdk fails this because no root
+ * certificates were checked into the repo.
+ */
+public class CacertsExplorer {
+    public static void main(String[] args) throws Throwable {
+        String defaultAlgorithm = TrustManagerFactory.getDefaultAlgorithm();
+        if (!defaultAlgorithm.equals("PKIX")) {
+            throw new AssertionError(
+                "Expected default algorithm PKIX, got " + defaultAlgorithm);
+        }
+
+        TrustManagerFactory trustManagerFactory =
+            TrustManagerFactory.getInstance(defaultAlgorithm);
+        trustManagerFactory.init((KeyStore) null);
+        TrustManager[] trustManagers = trustManagerFactory.getTrustManagers();
+        if (trustManagers.length != 1) {
+            throw new AssertionError(
+                "Expected exactly one TrustManager, got "
+                + Arrays.toString(trustManagers));
+        }
+        X509TrustManager trustManager = (X509TrustManager) trustManagers[0];
+
+        X509Certificate[] acceptedIssuers = trustManager.getAcceptedIssuers();
+        if (acceptedIssuers.length == 0) {
+            throw new AssertionError(
+                "no accepted issuers - cacerts file configuration problem?");
+        }
+        Arrays.stream(acceptedIssuers)
+            .map(X509Certificate::getIssuerX500Principal)
+            .forEach(System.out::println);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javax/swing/JFileChooser/8194044/FileSystemRootTest.java	Tue Jan 30 16:41:40 2018 +0100
@@ -0,0 +1,59 @@
+/*
+ * 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 8194044
+ * @summary Test if Win32ShellFolder2 root folder object gets identified as such.
+ * @requires os.family=="windows"
+ * @modules java.desktop/sun.awt.shell
+ * @run main FileSystemRootTest
+ */
+
+import sun.awt.shell.ShellFolder;
+import javax.swing.filechooser.FileSystemView;
+import java.io.File;
+
+public class FileSystemRootTest {
+    public static void main(String[] args) throws Exception {
+        FileSystemView fileSystemView = FileSystemView.getFileSystemView();
+
+        /*
+         * This is the only way to get the Win32ShellFolder2 object, since
+         * it is an internal class, which cannot be instantiated directly.
+         * On windows, this returns "C:\Users\<user-name>\Documents"
+         */
+        File def = fileSystemView.getDefaultDirectory();
+        File root = fileSystemView.getParentDirectory(
+                        fileSystemView.getParentDirectory(
+                            fileSystemView.getParentDirectory(def)));
+
+        if (! (root instanceof ShellFolder && ShellFolder.isFileSystemRoot(root))) {
+            throw new RuntimeException("Test failed: root drive reported as false");
+        }
+
+        if (fileSystemView.getSystemDisplayName(root).isEmpty()) {
+            throw new RuntimeException("Root drive display name is empty.");
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javax/swing/UIManager/8193673/TestProperties.java	Tue Jan 30 16:41:40 2018 +0100
@@ -0,0 +1,103 @@
+/*
+ * 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.
+ */
+
+import javax.swing.UIManager;
+import javax.swing.plaf.metal.MetalLookAndFeel;
+import javax.swing.plaf.nimbus.NimbusLookAndFeel;
+
+/**
+ * @test
+ * @bug 8193673
+ * @summary The test verifies that l&f specific properties are accessible
+ */
+public final class TestProperties {
+
+    private static final String[] windowsProperties = {
+            "FileChooser.viewMenuButtonToolTipText",
+            "FileChooser.viewMenuButtonAccessibleName",
+    };
+
+    private static final String[] aquaProperties = {
+            "FileChooser.mac.newFolder",
+    };
+
+    private static final String[] gtkProperties = {
+            "FileChooser.renameFileDialogText",
+    };
+
+    private static final String[] motifProperties = {
+            "FileChooser.enterFolderNameLabel.textAndMnemonic",
+    };
+
+    private static final String[] nimbusProperties = {
+            "FileChooser.refreshActionLabelText",
+    };
+
+    private static final String[] metalProperties = {
+            "MetalTitlePane.iconify.titleAndMnemonic",
+    };
+
+    public static void main(final String[] args) throws Exception {
+        UIManager.setLookAndFeel(new MetalLookAndFeel());
+        test(metalProperties);
+
+        UIManager.setLookAndFeel(new NimbusLookAndFeel());
+        test(nimbusProperties);
+
+        UIManager.setLookAndFeel("com.sun.java.swing.plaf.motif.MotifLookAndFeel");
+        test(motifProperties);
+
+        try {
+            UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
+            test(windowsProperties);
+        } catch (Exception e) {
+            // ignore
+        }
+
+        try {
+            UIManager.setLookAndFeel("com.apple.laf.AquaLookAndFeel");
+            test(aquaProperties);
+        } catch (Exception e) {
+            // ignore
+        }
+
+        try {
+            UIManager.setLookAndFeel("com.sun.java.swing.plaf.gtk.GTKLookAndFeel");
+            test(gtkProperties);
+        } catch (Exception e) {
+            // ignore
+        }
+    }
+
+    private static void test(final String[] properties) {
+        for (final String name : properties) {
+            String value = UIManager.getString(name);
+            if (value == null) {
+                System.err.println("Current LookAndFeel = "
+                        + UIManager.getLookAndFeel().getDescription());
+                System.err.printf("The value for %s property is null\n", name);
+                throw new Error();
+            }
+        }
+    }
+}
--- a/test/jdk/jdk/internal/reflect/CallerSensitive/CallerSensitiveFinder.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/jdk/internal/reflect/CallerSensitive/CallerSensitiveFinder.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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,21 +22,20 @@
  */
 
 import com.sun.tools.classfile.*;
-import com.sun.tools.jdeps.ClassFileReader;
 import static com.sun.tools.classfile.ConstantPool.*;
 import java.io.File;
 import java.io.IOException;
+import java.io.InputStream;
 import java.io.UncheckedIOException;
 import java.net.URI;
-import java.nio.file.FileSystem;
 import java.nio.file.FileSystems;
 import java.nio.file.Files;
 import java.nio.file.Path;
 import java.nio.file.Paths;
 import java.util.ArrayList;
-import java.util.Collections;
 import java.util.List;
 import java.util.concurrent.Callable;
+import java.util.concurrent.CopyOnWriteArrayList;
 import java.util.concurrent.ExecutionException;
 import java.util.concurrent.ExecutorService;
 import java.util.concurrent.Executors;
@@ -87,8 +86,7 @@
         }
     }
 
-    private final List<String> csMethodsMissingAnnotation =
-            Collections.synchronizedList(new ArrayList<>());
+    private final List<String> csMethodsMissingAnnotation = new CopyOnWriteArrayList<>();
     private final ReferenceFinder finder;
     public CallerSensitiveFinder() {
         this.finder = new ReferenceFinder(getFilter(), getVisitor());
@@ -142,40 +140,17 @@
     public List<String> run(Stream<Path> classes)throws IOException, InterruptedException,
             ExecutionException, ConstantPoolException
     {
-        classes.forEach(this::processPath);
+        classes.forEach(p -> pool.submit(getTask(p)));
         waitForCompletion();
-        pool.shutdown();
         return csMethodsMissingAnnotation;
     }
 
-    void processPath(Path path) {
-        try {
-            ClassFileReader reader = ClassFileReader.newInstance(path);
-            for (ClassFile cf : reader.getClassFiles()) {
-                if (cf.access_flags.is(AccessFlags.ACC_MODULE))
-                    continue;
-
-                String classFileName = cf.getName();
-                // for each ClassFile
-                //    parse constant pool to find matching method refs
-                //      parse each method (caller)
-                //      - visit and find method references matching the given method name
-                pool.submit(getTask(cf));
-            }
-        } catch (IOException x) {
-            throw new UncheckedIOException(x);
-        } catch (ConstantPoolException x) {
-            throw new RuntimeException(x);
-        }
-    }
-
     private static final String CALLER_SENSITIVE_ANNOTATION = "Ljdk/internal/reflect/CallerSensitive;";
     private static boolean isCallerSensitive(Method m, ConstantPool cp)
             throws ConstantPoolException
     {
         RuntimeAnnotations_attribute attr =
             (RuntimeAnnotations_attribute)m.attributes.get(Attribute.RuntimeVisibleAnnotations);
-        int index = 0;
         if (attr != null) {
             for (int i = 0; i < attr.annotations.length; i++) {
                 Annotation ann = attr.annotations[i];
@@ -188,11 +163,24 @@
         return false;
     }
 
-    private final List<FutureTask<Void>> tasks = new ArrayList<FutureTask<Void>>();
-    private FutureTask<Void> getTask(final ClassFile cf) {
-        FutureTask<Void> task = new FutureTask<Void>(new Callable<Void>() {
+    private final List<FutureTask<Void>> tasks = new ArrayList<>();
+
+    /*
+     * Each task parses the class file of the given path.
+     * - parse constant pool to find matching method refs
+     * - parse each method (caller)
+     * - visit and find method references matching the given method name
+     */
+    private FutureTask<Void> getTask(Path p) {
+        FutureTask<Void> task = new FutureTask<>(new Callable<>() {
             public Void call() throws Exception {
-                finder.parse(cf);
+                try (InputStream is = Files.newInputStream(p)) {
+                    finder.parse(ClassFile.read(is));
+                } catch (IOException x) {
+                    throw new UncheckedIOException(x);
+                } catch (ConstantPoolException x) {
+                    throw new RuntimeException(x);
+                }
                 return null;
             }
         });
@@ -207,6 +195,7 @@
         if (tasks.isEmpty()) {
             throw new RuntimeException("No classes found, or specified.");
         }
+        pool.shutdown();
         System.out.println("Parsed " + tasks.size() + " classfiles");
     }
 
@@ -215,21 +204,16 @@
 
         // Either an exploded build or an image.
         File classes = home.resolve("modules").toFile();
-        if (classes.isDirectory()) {
-            return Stream.of(classes.toPath());
-        } else {
-            return jrtPaths();
-        }
-    }
-
-    static Stream<Path> jrtPaths() {
-        FileSystem jrt = FileSystems.getFileSystem(URI.create("jrt:/"));
-        Path root = jrt.getPath("/");
+        Path root = classes.isDirectory()
+                        ? classes.toPath()
+                        : FileSystems.getFileSystem(URI.create("jrt:/"))
+                                     .getPath("/");
 
         try {
             return Files.walk(root)
-                    .filter(p -> p.getNameCount() > 1)
-                    .filter(p -> p.toString().endsWith(".class"));
+                .filter(p -> p.getNameCount() > 1)
+                .filter(p -> p.toString().endsWith(".class") &&
+                             !p.toString().equals("module-info.class"));
         } catch (IOException x) {
             throw new UncheckedIOException(x);
         }
--- a/test/jdk/jdk/internal/reflect/CallerSensitive/CheckCSMs.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/jdk/internal/reflect/CallerSensitive/CheckCSMs.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -22,13 +22,12 @@
  */
 
 import com.sun.tools.classfile.*;
-import com.sun.tools.jdeps.ClassFileReader;
 import static com.sun.tools.classfile.ConstantPool.*;
 import java.io.File;
 import java.io.IOException;
+import java.io.InputStream;
 import java.io.UncheckedIOException;
 import java.net.URI;
-import java.nio.file.FileSystem;
 import java.nio.file.FileSystems;
 import java.nio.file.Files;
 import java.nio.file.Path;
@@ -99,9 +98,8 @@
         throws IOException, InterruptedException, ExecutionException,
                ConstantPoolException
     {
-        classes.forEach(this::processPath);
+        classes.forEach(p -> pool.submit(getTask(p)));
         waitForCompletion();
-        pool.shutdown();
         return nonFinalCSMs;
     }
 
@@ -149,27 +147,6 @@
         };
     }
 
-    void processPath(Path path) {
-        try {
-            ClassFileReader reader = ClassFileReader.newInstance(path);
-            for (ClassFile cf : reader.getClassFiles()) {
-                if (cf.access_flags.is(AccessFlags.ACC_MODULE))
-                    continue;
-
-                String classFileName = cf.getName();
-                // for each ClassFile
-                //    parse constant pool to find matching method refs
-                //      parse each method (caller)
-                //      - visit and find method references matching the given method name
-                pool.submit(getTask(cf));
-            }
-        } catch (IOException x) {
-            throw new UncheckedIOException(x);
-        } catch (ConstantPoolException x) {
-            throw new RuntimeException(x);
-        }
-    }
-
     private static final String CALLER_SENSITIVE_ANNOTATION
         = "Ljdk/internal/reflect/CallerSensitive;";
 
@@ -202,11 +179,24 @@
                cf.access_flags.is(AccessFlags.ACC_FINAL);
     }
 
-    private final List<FutureTask<Void>> tasks = new ArrayList<FutureTask<Void>>();
-    private FutureTask<Void> getTask(final ClassFile cf) {
-        FutureTask<Void> task = new FutureTask<Void>(new Callable<Void>() {
+    private final List<FutureTask<Void>> tasks = new ArrayList<>();
+
+    /*
+     * Each task parses the class file of the given path.
+     * - parse constant pool to find matching method refs
+     * - parse each method (caller)
+     * - visit and find method references matching the given method name
+     */
+    private FutureTask<Void> getTask(Path p) {
+        FutureTask<Void> task = new FutureTask<>(new Callable<>() {
             public Void call() throws Exception {
-                finder.parse(cf);
+                try (InputStream is = Files.newInputStream(p)) {
+                    finder.parse(ClassFile.read(is));
+                } catch (IOException x) {
+                    throw new UncheckedIOException(x);
+                } catch (ConstantPoolException x) {
+                    throw new RuntimeException(x);
+                }
                 return null;
             }
         });
@@ -221,6 +211,7 @@
         if (tasks.isEmpty()) {
             throw new RuntimeException("No classes found, or specified.");
         }
+        pool.shutdown();
         System.out.println("Parsed " + tasks.size() + " classfiles");
     }
 
@@ -229,21 +220,16 @@
 
         // Either an exploded build or an image.
         File classes = home.resolve("modules").toFile();
-        if (classes.isDirectory()) {
-            return Stream.of(classes.toPath());
-        } else {
-            return jrtPaths();
-        }
-    }
-
-    static Stream<Path> jrtPaths() {
-        FileSystem jrt = FileSystems.getFileSystem(URI.create("jrt:/"));
-        Path root = jrt.getPath("/");
+        Path root = classes.isDirectory()
+                        ? classes.toPath()
+                        : FileSystems.getFileSystem(URI.create("jrt:/"))
+                                     .getPath("/");
 
         try {
             return Files.walk(root)
-                    .filter(p -> p.getNameCount() > 1)
-                    .filter(p -> p.toString().endsWith(".class"));
+                        .filter(p -> p.getNameCount() > 1)
+                        .filter(p -> p.toString().endsWith(".class") &&
+                                     !p.toString().equals("module-info.class"));
         } catch (IOException x) {
             throw new UncheckedIOException(x);
         }
--- a/test/jdk/lib/testlibrary/jdk/testlibrary/OutputAnalyzer.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/lib/testlibrary/jdk/testlibrary/OutputAnalyzer.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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,12 +25,16 @@
 
 import static jdk.testlibrary.Asserts.*;
 
+import java.io.BufferedReader;
 import java.io.IOException;
 import java.io.PrintStream;
+import java.io.StringReader;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
+import java.util.stream.Collectors;
+
 
 /**
  * Utility class for verifying output and exit value from a {@code Process}.
@@ -446,8 +450,9 @@
 
 
     /**
-     * Get the contents of the output buffer (stdout and stderr) as list of strings.
-     * Output will be split by system property 'line.separator'.
+     * Get the contents of the output buffer (stdout and stderr)
+     * as a list of strings. Output will be split at new-lines as
+     * recognized by java.io.BufferedReader.readLine().
      *
      * @return Contents of the output buffer as list of strings
      */
@@ -456,12 +461,8 @@
     }
 
     private List<String> asLines(String buffer) {
-        List<String> l = new ArrayList<>();
-        String[] a = buffer.split(Utils.NEW_LINE);
-        for (String string : a) {
-            l.add(string);
-        }
-        return l;
+        return new BufferedReader(new StringReader(buffer))
+            .lines().collect(Collectors.toList());
     }
 
     /**
--- a/test/jdk/sun/management/jdp/JdpTestCase.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/sun/management/jdp/JdpTestCase.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -77,11 +77,15 @@
                 onSocketTimeOut(e);
             }
 
+            if (!shouldContinue()) {
+              break;
+            }
+
             if (hasTestLivedLongEnough()) {
                 shutdown();
             }
 
-        } while (shouldContinue());
+        } while (true);
         log.fine("Test ended successfully.");
     }
 
--- a/test/jdk/sun/security/krb5/auto/AcceptPermissions.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/sun/security/krb5/auto/AcceptPermissions.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -23,11 +23,13 @@
 
 /*
  * @test
- * @bug 9999999
+ * @bug 8005447 8194486
  * @summary default principal can act as anyone
+ * @library /test/lib
  * @compile -XDignore.symbol.file AcceptPermissions.java
- * @run main/othervm AcceptPermissions two
- * @run main/othervm AcceptPermissions unbound
+ * @run main jdk.test.lib.FileInstaller TestHosts TestHosts
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts AcceptPermissions two
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts AcceptPermissions unbound
  */
 
 import java.nio.file.Files;
--- a/test/jdk/sun/security/krb5/auto/AcceptorSubKey.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/sun/security/krb5/auto/AcceptorSubKey.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2013, 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,11 +23,13 @@
 
 /*
  * @test
- * @bug 7077646
+ * @bug 7077646 8194486
  * @summary gssapi wrap for CFX per-message tokens always set FLAG_ACCEPTOR_SUBKEY
+ * @library /test/lib
  * @compile -XDignore.symbol.file AcceptorSubKey.java
- * @run main/othervm AcceptorSubKey 0
- * @run main/othervm AcceptorSubKey 4
+ * @run main jdk.test.lib.FileInstaller TestHosts TestHosts
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts AcceptorSubKey 0
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts AcceptorSubKey 4
  */
 
 import sun.security.jgss.GSSUtil;
--- a/test/jdk/sun/security/krb5/auto/Addresses.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/sun/security/krb5/auto/Addresses.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -23,10 +23,12 @@
 
 /*
  * @test
- * @bug 8031111
+ * @bug 8031111 8194486
  * @summary fix krb5 caddr
+ * @library /test/lib
  * @compile -XDignore.symbol.file Addresses.java
- * @run main/othervm Addresses
+ * @run main jdk.test.lib.FileInstaller TestHosts TestHosts
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts Addresses
  */
 
 import sun.security.krb5.Config;
--- a/test/jdk/sun/security/krb5/auto/AddressesAndNameType.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/sun/security/krb5/auto/AddressesAndNameType.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 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,11 +23,13 @@
 
 /*
  * @test
- * @bug 4501327 4868379 8039132
- * @run main/othervm AddressesAndNameType 1
- * @run main/othervm AddressesAndNameType 2
- * @run main/othervm AddressesAndNameType 3
+ * @bug 4501327 4868379 8039132 8194486
  * @summary noaddresses settings and server name type
+ * @library /test/lib
+ * @run main jdk.test.lib.FileInstaller TestHosts TestHosts
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts AddressesAndNameType 1
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts AddressesAndNameType 2
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts AddressesAndNameType 3
  */
 
 import java.net.InetAddress;
--- a/test/jdk/sun/security/krb5/auto/Basic.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/sun/security/krb5/auto/Basic.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -23,10 +23,12 @@
 
 /*
  * @test
- * @bug 7152176
+ * @bug 7152176 8194486
  * @summary More krb5 tests
+ * @library /test/lib
  * @compile -XDignore.symbol.file Basic.java
- * @run main/othervm Basic
+ * @run main jdk.test.lib.FileInstaller TestHosts TestHosts
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts Basic
  */
 
 import sun.security.jgss.GSSUtil;
--- a/test/jdk/sun/security/krb5/auto/BasicKrb5Test.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/sun/security/krb5/auto/BasicKrb5Test.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, 2013, 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
@@ -23,44 +23,62 @@
 
 /*
  * @test
- * @bug 6706974
+ * @bug 6706974 8014628 8194486
  * @summary Add krb5 test infrastructure
+ * @library /test/lib
  * @compile -XDignore.symbol.file BasicKrb5Test.java
- * @run main/othervm BasicKrb5Test
- * @run main/othervm BasicKrb5Test des-cbc-crc
- * @run main/othervm BasicKrb5Test des-cbc-md5
- * @run main/othervm BasicKrb5Test des3-cbc-sha1
- * @run main/othervm BasicKrb5Test aes128-cts
- * @run main/othervm BasicKrb5Test aes256-cts
- * @run main/othervm BasicKrb5Test rc4-hmac
- * @run main/othervm BasicKrb5Test -s
- * @run main/othervm BasicKrb5Test des-cbc-crc -s
- * @run main/othervm BasicKrb5Test des-cbc-md5 -s
- * @run main/othervm BasicKrb5Test des3-cbc-sha1 -s
- * @run main/othervm BasicKrb5Test aes128-cts -s
- * @run main/othervm BasicKrb5Test aes256-cts -s
- * @run main/othervm BasicKrb5Test rc4-hmac -s
- * @run main/othervm BasicKrb5Test -C
- * @run main/othervm BasicKrb5Test des-cbc-crc -C
- * @run main/othervm BasicKrb5Test des-cbc-md5 -C
- * @run main/othervm BasicKrb5Test des3-cbc-sha1 -C
- * @run main/othervm BasicKrb5Test aes128-cts -C
- * @run main/othervm BasicKrb5Test aes256-cts -C
- * @run main/othervm BasicKrb5Test rc4-hmac -C
- * @run main/othervm BasicKrb5Test -s -C
- * @run main/othervm BasicKrb5Test des-cbc-crc -s -C
- * @run main/othervm BasicKrb5Test des-cbc-md5 -s -C
- * @run main/othervm BasicKrb5Test des3-cbc-sha1 -s -C
- * @run main/othervm BasicKrb5Test aes128-cts -s -C
- * @run main/othervm BasicKrb5Test aes256-cts -s -C
- * @run main/othervm BasicKrb5Test rc4-hmac -s -C
+ * @run main jdk.test.lib.FileInstaller TestHosts TestHosts
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts BasicKrb5Test
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts BasicKrb5Test des-cbc-crc
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts BasicKrb5Test des-cbc-md5
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts BasicKrb5Test des3-cbc-sha1
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts BasicKrb5Test aes128-sha1
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts BasicKrb5Test aes256-sha1
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts BasicKrb5Test aes128-sha2
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts BasicKrb5Test aes256-sha2
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts BasicKrb5Test rc4-hmac
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts BasicKrb5Test -s
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts BasicKrb5Test des-cbc-crc -s
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts BasicKrb5Test des-cbc-md5 -s
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts BasicKrb5Test
+ *                   des3-cbc-sha1 -s
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts BasicKrb5Test aes128-sha1 -s
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts BasicKrb5Test aes256-sha1 -s
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts BasicKrb5Test aes128-sha2 -s
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts BasicKrb5Test aes256-sha2 -s
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts BasicKrb5Test rc4-hmac -s
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts BasicKrb5Test -C
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts BasicKrb5Test des-cbc-crc -C
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts BasicKrb5Test des-cbc-md5 -C
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts BasicKrb5Test
+ *                   des3-cbc-sha1 -C
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts BasicKrb5Test aes128-sha1 -C
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts BasicKrb5Test aes256-sha1 -C
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts BasicKrb5Test aes128-sha2 -C
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts BasicKrb5Test aes256-sha2 -C
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts BasicKrb5Test rc4-hmac -C
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts BasicKrb5Test -s -C
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts BasicKrb5Test
+ *                   des-cbc-crc -s -C
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts BasicKrb5Test
+ *                   des-cbc-md5 -s -C
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts BasicKrb5Test
+ *                   des3-cbc-sha1 -s -C
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts BasicKrb5Test
+ *                   aes128-sha1 -s -C
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts BasicKrb5Test
+ *                   aes256-sha1 -s -C
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts BasicKrb5Test
+ *                   aes128-sha2 -s -C
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts BasicKrb5Test
+ *                   aes256-sha2 -s -C
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts BasicKrb5Test
+ *                   rc4-hmac -s -C
  */
 
 import org.ietf.jgss.GSSName;
 import sun.security.jgss.GSSUtil;
-import sun.security.krb5.Config;
 import sun.security.krb5.KrbException;
-import sun.security.krb5.internal.crypto.EType;
 
 /**
  * Basic JGSS/krb5 test with 3 parties: client, server, backend server. Each
--- a/test/jdk/sun/security/krb5/auto/BasicProc.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/sun/security/krb5/auto/BasicProc.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2017, 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
@@ -23,12 +23,13 @@
 
 /*
  * @test
- * @bug 8009977 8186884
+ * @bug 8009977 8186884 8194486
  * @summary A test to launch multiple Java processes using either Java GSS
  *          or native GSS
- * @library ../../../../java/security/testlibrary/
+ * @library ../../../../java/security/testlibrary/ /test/lib
  * @compile -XDignore.symbol.file BasicProc.java
- * @run main/othervm BasicProc launcher
+ * @run main jdk.test.lib.FileInstaller TestHosts TestHosts
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts BasicProc launcher
  */
 
 import java.nio.file.Files;
@@ -304,6 +305,7 @@
      */
     private static Proc proc(String lib) throws Exception {
         Proc p = Proc.create("BasicProc")
+                .inheritProp("jdk.net.hosts.file")
                 .prop("java.security.manager", "")
                 .perm(new javax.security.auth.AuthPermission("doAs"));
         if (lib != null) {
--- a/test/jdk/sun/security/krb5/auto/BogusKDC.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/sun/security/krb5/auto/BogusKDC.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -33,10 +33,12 @@
 
 /*
  * @test
- * @bug 4515853 8075297
+ * @bug 4515853 8075297 8194486
  * @summary Checks that Kerberos client tries slave KDC
  *          if master KDC is not responding
- * @run main/othervm BogusKDC
+ * @library /test/lib
+ * @run main jdk.test.lib.FileInstaller TestHosts TestHosts
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts BogusKDC
  */
 public class BogusKDC {
 
--- a/test/jdk/sun/security/krb5/auto/CleanState.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/sun/security/krb5/auto/CleanState.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, 2013, 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
@@ -23,10 +23,12 @@
 
 /*
  * @test
- * @bug 6716534
+ * @bug 6716534 8194486
+ * @summary Krb5LoginModule has not cleaned temp info between authentication attempts
+ * @library /test/lib
  * @compile -XDignore.symbol.file CleanState.java
- * @run main/othervm CleanState
- * @summary Krb5LoginModule has not cleaned temp info between authentication attempts
+ * @run main jdk.test.lib.FileInstaller TestHosts TestHosts
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts CleanState
  */
 import com.sun.security.auth.module.Krb5LoginModule;
 import java.util.HashMap;
--- a/test/jdk/sun/security/krb5/auto/CrossRealm.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/sun/security/krb5/auto/CrossRealm.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, 2012, 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
@@ -23,10 +23,12 @@
 
 /*
  * @test
- * @bug 6706974
+ * @bug 6706974 8194486
+ * @summary Add krb5 test infrastructure
+ * @library /test/lib
  * @compile -XDignore.symbol.file CrossRealm.java
- * @run main/othervm CrossRealm
- * @summary Add krb5 test infrastructure
+ * @run main jdk.test.lib.FileInstaller TestHosts TestHosts
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts CrossRealm
  */
 import java.io.File;
 import java.io.FileOutputStream;
--- a/test/jdk/sun/security/krb5/auto/DiffNameSameKey.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/sun/security/krb5/auto/DiffNameSameKey.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -23,11 +23,13 @@
 
 /*
  * @test
- * @bug 8005447
+ * @bug 8005447 8194486
  * @summary default principal can act as anyone
+ * @library /test/lib
  * @compile -XDignore.symbol.file DiffNameSameKey.java
- * @run main/othervm/fail DiffNameSameKey a
- * @run main/othervm DiffNameSameKey b
+ * @run main jdk.test.lib.FileInstaller TestHosts TestHosts
+ * @run main/othervm/fail -Djdk.net.hosts.file=TestHosts DiffNameSameKey a
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts DiffNameSameKey b
  */
 
 import sun.security.jgss.GSSUtil;
--- a/test/jdk/sun/security/krb5/auto/DiffSaltParams.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/sun/security/krb5/auto/DiffSaltParams.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -23,10 +23,13 @@
 
 /*
  * @test
- * @bug 8186831
+ * @bug 8186831 8194486
  * @summary Kerberos ignores PA-DATA with a non-null s2kparams
+ * @library /test/lib
  * @compile -XDignore.symbol.file DiffSaltParams.java
- * @run main/othervm -Dsun.security.krb5.debug=true DiffSaltParams
+ * @run main jdk.test.lib.FileInstaller TestHosts TestHosts
+ * @run main/othervm -Dsun.security.krb5.debug=true
+ *      -Djdk.net.hosts.file=TestHosts DiffSaltParams
  */
 
 public class DiffSaltParams {
--- a/test/jdk/sun/security/krb5/auto/DupEtypes.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/sun/security/krb5/auto/DupEtypes.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2013, 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,14 +23,16 @@
 
 /*
  * @test
- * @bug 7067974
+ * @bug 7067974 8194486
  * @summary multiple ETYPE-INFO-ENTRY with same etype and different salt
+ * @library /test/lib
  * @compile -XDignore.symbol.file DupEtypes.java
- * @run main/othervm DupEtypes 1
- * @run main/othervm DupEtypes 2
- * @run main/othervm/fail DupEtypes 3
- * @run main/othervm DupEtypes 4
- * @run main/othervm DupEtypes 5
+ * @run main jdk.test.lib.FileInstaller TestHosts TestHosts
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts DupEtypes 1
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts DupEtypes 2
+ * @run main/othervm/fail -Djdk.net.hosts.file=TestHosts DupEtypes 3
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts DupEtypes 4
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts DupEtypes 5
  */
 
 import sun.security.jgss.GSSUtil;
--- a/test/jdk/sun/security/krb5/auto/DynamicKeytab.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/sun/security/krb5/auto/DynamicKeytab.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2013, 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,10 +23,12 @@
 
 /*
  * @test
- * @bug 6894072
+ * @bug 6894072 8194486
+ * @summary always refresh keytab
+ * @library /test/lib
  * @compile -XDignore.symbol.file DynamicKeytab.java
- * @run main/othervm DynamicKeytab
- * @summary always refresh keytab
+ * @run main jdk.test.lib.FileInstaller TestHosts TestHosts
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts DynamicKeytab
  */
 
 import java.io.File;
--- a/test/jdk/sun/security/krb5/auto/EmptyPassword.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/sun/security/krb5/auto/EmptyPassword.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -23,10 +23,12 @@
 
 /*
  * @test
- * @bug 6879540
+ * @bug 6879540 8194486
  * @summary enable empty password for kerberos 5
+ * @library /test/lib
  * @compile -XDignore.symbol.file EmptyPassword.java
- * @run main/othervm EmptyPassword
+ * @run main jdk.test.lib.FileInstaller TestHosts TestHosts
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts EmptyPassword
  */
 
 public class EmptyPassword {
--- a/test/jdk/sun/security/krb5/auto/FileKeyTab.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/sun/security/krb5/auto/FileKeyTab.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -23,10 +23,12 @@
 
 /*
  * @test
- * @bug 7152121
+ * @bug 7152121 8194486
  * @summary Krb5LoginModule no longer handles keyTabNames with "file:" prefix
+ * @library /test/lib
  * @compile -XDignore.symbol.file FileKeyTab.java
- * @run main/othervm FileKeyTab
+ * @run main jdk.test.lib.FileInstaller TestHosts TestHosts
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts FileKeyTab
  */
 
 import java.io.File;
--- a/test/jdk/sun/security/krb5/auto/ForwardableCheck.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/sun/security/krb5/auto/ForwardableCheck.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 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,10 +23,12 @@
 
 /*
  * @test
- * @bug 8022582
+ * @bug 8022582 8194486
  * @summary Relax response flags checking in sun.security.krb5.KrbKdcRep.check.
+ * @library /test/lib
  * @compile -XDignore.symbol.file ForwardableCheck.java
- * @run main/othervm ForwardableCheck
+ * @run main jdk.test.lib.FileInstaller TestHosts TestHosts
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts ForwardableCheck
  */
 
 import org.ietf.jgss.GSSException;
--- a/test/jdk/sun/security/krb5/auto/Forwarded.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/sun/security/krb5/auto/Forwarded.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -23,10 +23,12 @@
 
 /*
  * @test
- * @bug 8031111
+ * @bug 8031111 8194486
  * @summary fix krb5 caddr
+ * @library /test/lib
  * @compile -XDignore.symbol.file Forwarded.java
- * @run main/othervm Forwarded
+ * @run main jdk.test.lib.FileInstaller TestHosts TestHosts
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts Forwarded
  */
 
 import sun.security.jgss.GSSUtil;
--- a/test/jdk/sun/security/krb5/auto/GSS.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/sun/security/krb5/auto/GSS.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -23,10 +23,12 @@
 
 /*
  * @test
- * @bug 7152176
+ * @bug 7152176 8194486
  * @summary More krb5 tests
+ * @library /test/lib
  * @compile -XDignore.symbol.file GSS.java
- * @run main/othervm GSS
+ * @run main jdk.test.lib.FileInstaller TestHosts TestHosts
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts GSS
  */
 
 import sun.security.jgss.GSSUtil;
--- a/test/jdk/sun/security/krb5/auto/GSSUnbound.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/sun/security/krb5/auto/GSSUnbound.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -23,10 +23,12 @@
 
 /*
  * @test
- * @bug 8001104
+ * @bug 8001104 8194486
  * @summary Unbound SASL service: the GSSAPI/krb5 mech
+ * @library /test/lib
  * @compile -XDignore.symbol.file GSSUnbound.java
- * @run main/othervm GSSUnbound
+ * @run main jdk.test.lib.FileInstaller TestHosts TestHosts
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts GSSUnbound
  */
 
 import java.security.Security;
--- a/test/jdk/sun/security/krb5/auto/HttpNegotiateServer.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/sun/security/krb5/auto/HttpNegotiateServer.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009, 2017, 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
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug 6578647 6829283 8171340
+ * @bug 6578647 6829283 8171340 8194486
  * @modules java.base/sun.security.util
  *          java.security.jgss/sun.security.krb5.internal:+open
  *          java.security.jgss/sun.security.jgss
@@ -35,11 +35,13 @@
  *          jdk.security.auth
  *          jdk.security.jgss
  *          jdk.httpserver
- * @run main/othervm HttpNegotiateServer
  * @summary Undefined requesting URL in java.net.Authenticator
  *          .getPasswordAuthentication()
  * @summary HTTP/Negotiate: Authenticator triggered again when
  *          user cancels the first one
+ * @library /test/lib
+ * @run main jdk.test.lib.FileInstaller TestHosts TestHosts
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts HttpNegotiateServer
  */
 
 import com.sun.net.httpserver.Headers;
--- a/test/jdk/sun/security/krb5/auto/IgnoreChannelBinding.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/sun/security/krb5/auto/IgnoreChannelBinding.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009, 2011, 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
@@ -23,9 +23,11 @@
 
 /*
  * @test
- * @bug 6851973
- * @run main/othervm IgnoreChannelBinding
+ * @bug 6851973 8194486
  * @summary ignore incoming channel binding if acceptor does not set one
+ * @library /test/lib
+ * @run main jdk.test.lib.FileInstaller TestHosts TestHosts
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts IgnoreChannelBinding
  */
 
 import java.net.InetAddress;
--- a/test/jdk/sun/security/krb5/auto/KDC.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/sun/security/krb5/auto/KDC.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -241,14 +241,6 @@
         CHECK_ADDRESSES,
     };
 
-    static {
-        if (System.getProperty("jdk.net.hosts.file") == null) {
-            String hostsFileName
-                    = System.getProperty("test.src", ".") + "/TestHosts";
-            System.setProperty("jdk.net.hosts.file", hostsFileName);
-        }
-    }
-
     /**
      * A standalone KDC server.
      */
@@ -604,19 +596,7 @@
      */
     private static EncryptionKey generateRandomKey(int eType)
             throws KrbException  {
-        // Is 32 enough for AES256? I should have generated the keys directly
-        // but different cryptos have different rules on what keys are valid.
-        char[] pass = randomPassword();
-        String algo;
-        switch (eType) {
-            case EncryptedData.ETYPE_DES_CBC_MD5: algo = "DES"; break;
-            case EncryptedData.ETYPE_DES3_CBC_HMAC_SHA1_KD: algo = "DESede"; break;
-            case EncryptedData.ETYPE_AES128_CTS_HMAC_SHA1_96: algo = "AES128"; break;
-            case EncryptedData.ETYPE_ARCFOUR_HMAC: algo = "ArcFourHMAC"; break;
-            case EncryptedData.ETYPE_AES256_CTS_HMAC_SHA1_96: algo = "AES256"; break;
-            default: algo = "DES"; break;
-        }
-        return new EncryptionKey(pass, "NOTHING", algo);    // Silly
+        return genKey0(randomPassword(), "NOTHING", null, eType, null);
     }
 
     /**
@@ -680,6 +660,8 @@
         switch (etype) {
             case EncryptedData.ETYPE_AES128_CTS_HMAC_SHA1_96:
             case EncryptedData.ETYPE_AES256_CTS_HMAC_SHA1_96:
+            case EncryptedData.ETYPE_AES128_CTS_HMAC_SHA256_128:
+            case EncryptedData.ETYPE_AES256_CTS_HMAC_SHA384_192:
                 String pn = p.toString();
                 if (p.getRealmString() == null) {
                     pn = pn + "@" + getRealm();
@@ -687,7 +669,11 @@
                 if (s2kparamses.containsKey(pn)) {
                     return s2kparamses.get(pn);
                 }
-                return new byte[] {0, 0, 0x10, 0};
+                if (etype < EncryptedData.ETYPE_AES128_CTS_HMAC_SHA256_128) {
+                    return new byte[]{0, 0, 0x10, 0};
+                } else {
+                    return new byte[]{0, 0, (byte) 0x80, 0};
+                }
             default:
                 return null;
         }
@@ -715,9 +701,8 @@
                     kvno = pass[pass.length-1] - '0';
                 }
             }
-            return new EncryptionKey(EncryptionKeyDotStringToKey(
-                    getPassword(p, server), getSalt(p), getParams(p, etype), etype),
-                    etype, kvno);
+            return genKey0(getPassword(p, server), getSalt(p),
+                    getParams(p, etype), etype, kvno);
         } catch (KrbException ke) {
             throw ke;
         } catch (Exception e) {
@@ -735,6 +720,17 @@
     }
 
     /**
+     * Generates key from password.
+     */
+    private static EncryptionKey genKey0(
+            char[] pass, String salt, byte[] s2kparams,
+            int etype, Integer kvno) throws KrbException {
+        return new EncryptionKey(EncryptionKeyDotStringToKey(
+                pass, salt, s2kparams, etype),
+                etype, kvno);
+    }
+
+    /**
      * Processes an incoming request and generates a response.
      * @param in the request
      * @return the response
@@ -1181,8 +1177,8 @@
                 }
                 boolean allOld = true;
                 for (int i: eTypes) {
-                    if (i == EncryptedData.ETYPE_AES128_CTS_HMAC_SHA1_96 ||
-                            i == EncryptedData.ETYPE_AES256_CTS_HMAC_SHA1_96) {
+                    if (i >= EncryptedData.ETYPE_AES128_CTS_HMAC_SHA1_96 &&
+                            i != EncryptedData.ETYPE_ARCFOUR_HMAC) {
                         allOld = false;
                         break;
                     }
--- a/test/jdk/sun/security/krb5/auto/KPEquals.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/sun/security/krb5/auto/KPEquals.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -23,10 +23,12 @@
 
 /*
  * @test
- * @bug 8015669
+ * @bug 8015669 8194486
  * @summary KerberosPrincipal::equals should ignore name-type
+ * @library /test/lib
  * @compile -XDignore.symbol.file KPEquals.java
- * @run main/othervm KPEquals
+ * @run main jdk.test.lib.FileInstaller TestHosts TestHosts
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts KPEquals
  */
 
 import sun.security.jgss.GSSUtil;
--- a/test/jdk/sun/security/krb5/auto/KdcPolicy.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/sun/security/krb5/auto/KdcPolicy.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -38,10 +38,12 @@
 
 /*
  * @test
- * @bug 8164656 8181461
- * @run main/othervm KdcPolicy udp
- * @run main/othervm KdcPolicy tcp
+ * @bug 8164656 8181461 8194486
  * @summary krb5.kdc.bad.policy test
+ * @library /test/lib
+ * @run main jdk.test.lib.FileInstaller TestHosts TestHosts
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts KdcPolicy udp
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts KdcPolicy tcp
  */
 public class KdcPolicy {
 
--- a/test/jdk/sun/security/krb5/auto/KeyPermissions.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/sun/security/krb5/auto/KeyPermissions.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -23,10 +23,12 @@
 
 /*
  * @test
- * @bug 8004488
+ * @bug 8004488 8194486
  * @summary wrong permissions checked in krb5
+ * @library /test/lib
  * @compile -XDignore.symbol.file KeyPermissions.java
- * @run main/othervm KeyPermissions
+ * @run main jdk.test.lib.FileInstaller TestHosts TestHosts
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts KeyPermissions
  */
 
 import java.security.AccessControlException;
--- a/test/jdk/sun/security/krb5/auto/KeyTabCompat.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/sun/security/krb5/auto/KeyTabCompat.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2013, 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,11 +23,12 @@
 
 /*
  * @test
- * @bug 6894072
- * @bug 8004488
+ * @bug 6894072 8004488 8194486
+ * @summary always refresh keytab
+ * @library /test/lib
  * @compile -XDignore.symbol.file KeyTabCompat.java
- * @run main/othervm KeyTabCompat
- * @summary always refresh keytab
+ * @run main jdk.test.lib.FileInstaller TestHosts TestHosts
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts KeyTabCompat
  */
 
 import javax.security.auth.kerberos.KerberosKey;
--- a/test/jdk/sun/security/krb5/auto/KrbTicket.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/sun/security/krb5/auto/KrbTicket.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -35,9 +35,11 @@
 
 /*
  * @test
- * @bug 6857795 8075299
+ * @bug 6857795 8075299 8194486
  * @summary Checks Kerberos ticket properties
- * @run main/othervm KrbTicket
+ * @library /test/lib
+ * @run main jdk.test.lib.FileInstaller TestHosts TestHosts
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts KrbTicket
  */
 public class KrbTicket {
 
--- a/test/jdk/sun/security/krb5/auto/KvnoNA.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/sun/security/krb5/auto/KvnoNA.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -23,10 +23,12 @@
 
 /*
  * @test
- * @bug 7197159
+ * @bug 7197159 8194486
+ * @summary accept different kvno if there no match
+ * @library /test/lib
  * @compile -XDignore.symbol.file KvnoNA.java
- * @run main/othervm KvnoNA
- * @summary accept different kvno if there no match
+ * @run main jdk.test.lib.FileInstaller TestHosts TestHosts
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts KvnoNA
  */
 
 import org.ietf.jgss.GSSException;
--- a/test/jdk/sun/security/krb5/auto/LifeTimeInSeconds.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/sun/security/krb5/auto/LifeTimeInSeconds.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009, 2011, 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
@@ -23,9 +23,11 @@
 
 /*
  * @test
- * @bug 6857802
- * @run main/othervm LifeTimeInSeconds
+ * @bug 6857802 8194486
  * @summary GSS getRemainingInitLifetime method returns milliseconds not seconds
+ * @library /test/lib
+ * @run main jdk.test.lib.FileInstaller TestHosts TestHosts
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts LifeTimeInSeconds
  */
 import org.ietf.jgss.GSSCredential;
 import org.ietf.jgss.GSSManager;
--- a/test/jdk/sun/security/krb5/auto/LoginModuleOptions.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/sun/security/krb5/auto/LoginModuleOptions.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, 2011, 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
@@ -23,9 +23,11 @@
 
 /*
  * @test
- * @bug 6765491
- * @run main/othervm LoginModuleOptions
+ * @bug 6765491 8194486
  * @summary Krb5LoginModule a little too restrictive, and the doc is not clear.
+ * @library /test/lib
+ * @run main jdk.test.lib.FileInstaller TestHosts TestHosts
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts LoginModuleOptions
  */
 import com.sun.security.auth.module.Krb5LoginModule;
 import java.util.HashMap;
--- a/test/jdk/sun/security/krb5/auto/LoginNoPass.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/sun/security/krb5/auto/LoginNoPass.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -23,10 +23,12 @@
 
 /*
  * @test
- * @bug 8028351
+ * @bug 8028351 8194486
  * @summary JWS doesn't get authenticated when using kerberos auth proxy
+ * @library /test/lib
  * @compile -XDignore.symbol.file LoginNoPass.java
- * @run main/othervm LoginNoPass
+ * @run main jdk.test.lib.FileInstaller TestHosts TestHosts
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts LoginNoPass
  */
 
 import sun.security.jgss.GSSUtil;
--- a/test/jdk/sun/security/krb5/auto/LongLife.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/sun/security/krb5/auto/LongLife.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -23,10 +23,12 @@
 
 /*
  * @test
- * @bug 8131051
+ * @bug 8131051 8194486
  * @summary KDC might issue a renewable ticket even if not requested
+ * @library /test/lib
  * @compile -XDignore.symbol.file LongLife.java
- * @run main/othervm LongLife
+ * @run main jdk.test.lib.FileInstaller TestHosts TestHosts
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts LongLife
  */
 
 import sun.security.krb5.Config;
--- a/test/jdk/sun/security/krb5/auto/MSOID2.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/sun/security/krb5/auto/MSOID2.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -23,10 +23,12 @@
 
 /*
  * @test
- * @bug 8078439
+ * @bug 8078439 8194486
  * @summary SPNEGO auth fails if client proposes MS krb5 OID
+ * @library /test/lib
  * @compile -XDignore.symbol.file MSOID2.java
- * @run main/othervm MSOID2
+ * @run main jdk.test.lib.FileInstaller TestHosts TestHosts
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts MSOID2
  */
 
 import sun.security.jgss.GSSUtil;
--- a/test/jdk/sun/security/krb5/auto/ModuleName.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/sun/security/krb5/auto/ModuleName.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug 8164437
+ * @bug 8164437 8194486
  * @summary GSSContext type when jdk.security.jgss is not available
  * @library /test/lib
  * @compile -XDignore.symbol.file ModuleName.java
@@ -33,7 +33,8 @@
  *        jdk.test.lib.JDKToolLauncher
  *        jdk.test.lib.Platform
  *        jdk.test.lib.process.*
- * @run main/othervm ModuleName
+ * @run main jdk.test.lib.FileInstaller TestHosts TestHosts
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts ModuleName
  */
 
 import jdk.test.lib.process.ProcessTools;
@@ -58,6 +59,7 @@
                             arg.startsWith("--add-opens="))
                     .forEach(cmd::add);
             cmd.addAll(List.of(
+                    "-Djdk.net.hosts.file=TestHosts",
                     "-Dtest.src=" + System.getProperty("test.src"),
                     "--add-modules",
                         "java.base,java.security.jgss,jdk.security.auth",
--- a/test/jdk/sun/security/krb5/auto/MoreKvno.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/sun/security/krb5/auto/MoreKvno.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009, 2012, 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
@@ -23,9 +23,11 @@
 
 /*
  * @test
- * @bug 6893158 6907425 7197159
- * @run main/othervm MoreKvno
+ * @bug 6893158 6907425 7197159 8194486
  * @summary AP_REQ check should use key version number
+ * @library /test/lib
+ * @run main jdk.test.lib.FileInstaller TestHosts TestHosts
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts MoreKvno
  */
 
 import org.ietf.jgss.GSSException;
--- a/test/jdk/sun/security/krb5/auto/NewInquireTypes.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/sun/security/krb5/auto/NewInquireTypes.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 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,10 +23,12 @@
 
 /*
  * @test
- * @bug 8043071
+ * @bug 8043071 8194486
  * @summary Expose session key and KRB_CRED through extended GSS-API
+ * @library /test/lib
  * @compile -XDignore.symbol.file NewInquireTypes.java
- * @run main/othervm NewInquireTypes
+ * @run main jdk.test.lib.FileInstaller TestHosts TestHosts
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts NewInquireTypes
  */
 
 import com.sun.security.jgss.ExtendedGSSContext;
--- a/test/jdk/sun/security/krb5/auto/NewSalt.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/sun/security/krb5/auto/NewSalt.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -23,11 +23,13 @@
 
 /*
  * @test
- * @bug 6960894
+ * @bug 6960894 8194486
  * @summary Better AS-REQ creation and processing
- * @run main/othervm NewSalt
- * @run main/othervm -Dnopreauth NewSalt
- * @run main/othervm -Donlyonepreauth NewSalt
+ * @library /test/lib
+ * @run main jdk.test.lib.FileInstaller TestHosts TestHosts
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts NewSalt
+ * @run main/othervm -Dnopreauth -Djdk.net.hosts.file=TestHosts NewSalt
+ * @run main/othervm -Donlyonepreauth -Djdk.net.hosts.file=TestHosts NewSalt
  */
 
 import java.util.Locale;
--- a/test/jdk/sun/security/krb5/auto/NoInitNoKeytab.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/sun/security/krb5/auto/NoInitNoKeytab.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -23,10 +23,12 @@
 
 /*
  * @test
- * @bug 7089889
+ * @bug 7089889 8194486
  * @summary Krb5LoginModule.login() throws an exception if used without a keytab
+ * @library /test/lib
  * @compile -XDignore.symbol.file NoInitNoKeytab.java
- * @run main/othervm NoInitNoKeytab
+ * @run main jdk.test.lib.FileInstaller TestHosts TestHosts
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts NoInitNoKeytab
  */
 
 import java.io.FileOutputStream;
--- a/test/jdk/sun/security/krb5/auto/NonMutualSpnego.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/sun/security/krb5/auto/NonMutualSpnego.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, 2011, 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
@@ -23,9 +23,11 @@
 
 /*
  * @test
- * @bug 6733095
- * @run main/othervm NonMutualSpnego
+ * @bug 6733095 8194486
  * @summary Failure when SPNEGO request non-Mutual
+ * @library /test/lib
+ * @run main jdk.test.lib.FileInstaller TestHosts TestHosts
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts NonMutualSpnego
  */
 
 import sun.security.jgss.GSSUtil;
--- a/test/jdk/sun/security/krb5/auto/NoneReplayCacheTest.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/sun/security/krb5/auto/NoneReplayCacheTest.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -23,12 +23,14 @@
 
 /*
  * @test
- * @bug 8001326
- * @run main/othervm NoneReplayCacheTest
+ * @bug 8001326 8194486
  * @summary the replaycache type none cannot stop an authenticator replay,
  * but it can stop a message replay when s.s.k.acceptor.subkey is true.
  * You should not really use none in production environment. This test merely
  * shows there can be other protections when replay cache is not working fine.
+ * @library /test/lib
+ * @run main jdk.test.lib.FileInstaller TestHosts TestHosts
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts NoneReplayCacheTest
  */
 
 import org.ietf.jgss.GSSException;
--- a/test/jdk/sun/security/krb5/auto/NullRenewUntil.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/sun/security/krb5/auto/NullRenewUntil.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -23,12 +23,14 @@
 
 /*
  * @test
- * @bug 8186576
+ * @bug 8186576 8194486
  * @summary KerberosTicket does not properly handle renewable tickets
  *          at the end of their lifetime
  * @library /test/lib
  * @compile -XDignore.symbol.file NullRenewUntil.java
- * @run main/othervm -Dtest.set.null.renew NullRenewUntil
+ * @run main jdk.test.lib.FileInstaller TestHosts TestHosts
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts
+ *      -Dtest.set.null.renew NullRenewUntil
  */
 
 import jdk.test.lib.Asserts;
--- a/test/jdk/sun/security/krb5/auto/OkAsDelegate.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/sun/security/krb5/auto/OkAsDelegate.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009, 2012, 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
@@ -23,29 +23,49 @@
 
 /*
  * @test
- * @bug 6853328 7172701
- * @run main/othervm OkAsDelegate false true true false false false
+ * @bug 6853328 7172701 8194486
+ * @summary Support OK-AS-DELEGATE flag
+ * @library /test/lib
+ * @run main jdk.test.lib.FileInstaller TestHosts TestHosts
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts OkAsDelegate
+ *      false true true false false false
  *      FORWARDABLE ticket not allowed, always fail
- * @run main/othervm OkAsDelegate true false false false false false
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts OkAsDelegate
+ *      true false false false false false
  *      Service ticket no OK-AS-DELEGATE. Request nothing, gain nothing
- * @run main/othervm OkAsDelegate true false true false false false
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts OkAsDelegate
+ *      true false true false false false
  *      Service ticket no OK-AS-DELEGATE. Request deleg policy, gain nothing
- * @run main/othervm OkAsDelegate true true false true false true
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts OkAsDelegate
+ *      true true false true false true
  *      Service ticket no OK-AS-DELEGATE. Request deleg, granted
- * @run main/othervm OkAsDelegate true true true true false true
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts
+ *      OkAsDelegate true true true true false true
  *      Service ticket no OK-AS-DELEGATE. Request deleg and deleg policy, granted, with info not by policy
- * @run main/othervm -Dtest.kdc.policy.ok-as-delegate OkAsDelegate true false true true true true
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts
+ *      -Dtest.kdc.policy.ok-as-delegate OkAsDelegate
+ *      true false true true true true
  *      Service ticket has OK-AS-DELEGATE. Request deleg policy, granted
- * @run main/othervm -Dtest.kdc.policy.ok-as-delegate OkAsDelegate true true true true true true
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts
+ *      -Dtest.kdc.policy.ok-as-delegate OkAsDelegate
+ *      true true true true true true
  *      Service ticket has OK-AS-DELEGATE. granted, with info by policy
- * @run main/othervm -Dtest.spnego OkAsDelegate false true true false false false
- * @run main/othervm -Dtest.spnego OkAsDelegate true false false false false false
- * @run main/othervm -Dtest.spnego OkAsDelegate true false true false false false
- * @run main/othervm -Dtest.spnego OkAsDelegate true true false true false true
- * @run main/othervm -Dtest.spnego OkAsDelegate true true true true false true
- * @run main/othervm -Dtest.spnego -Dtest.kdc.policy.ok-as-delegate OkAsDelegate true false true true true true
- * @run main/othervm -Dtest.spnego -Dtest.kdc.policy.ok-as-delegate OkAsDelegate true true true true true true
- * @summary Support OK-AS-DELEGATE flag
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts -Dtest.spnego
+ *      OkAsDelegate false true true false false false
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts -Dtest.spnego
+ *      OkAsDelegate true false false false false false
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts -Dtest.spnego
+ *      OkAsDelegate true false true false false false
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts -Dtest.spnego
+ *      OkAsDelegate true true false true false true
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts -Dtest.spnego
+ *      OkAsDelegate true true true true false true
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts -Dtest.spnego
+ *      -Dtest.kdc.policy.ok-as-delegate OkAsDelegate
+ *      true false true true true true
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts -Dtest.spnego
+ *      -Dtest.kdc.policy.ok-as-delegate OkAsDelegate
+ *      true true true true true true
  */
 import com.sun.security.jgss.ExtendedGSSContext;
 import org.ietf.jgss.GSSContext;
--- a/test/jdk/sun/security/krb5/auto/OkAsDelegateXRealm.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/sun/security/krb5/auto/OkAsDelegateXRealm.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009, 2012, 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
@@ -23,16 +23,23 @@
 
 /*
  * @test
- * @bug 6853328 7172701
- * @run main/othervm OkAsDelegateXRealm false
+ * @bug 6853328 7172701 8194486
+ * @summary Support OK-AS-DELEGATE flag
+ * @library /test/lib
+ * @run main jdk.test.lib.FileInstaller TestHosts TestHosts
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts OkAsDelegateXRealm false
  *      KDC no OK-AS-DELEGATE, fail
- * @run main/othervm -Dtest.kdc.policy.ok-as-delegate OkAsDelegateXRealm true
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts
+ *      -Dtest.kdc.policy.ok-as-delegate OkAsDelegateXRealm true
  *      KDC set OK-AS-DELEGATE for all, succeed
- * @run main/othervm -Dtest.kdc.policy.ok-as-delegate=host/host.r3.local OkAsDelegateXRealm false
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts
+ *      -Dtest.kdc.policy.ok-as-delegate=host/host.r3.local
+ *      OkAsDelegateXRealm false
  *      KDC set OK-AS-DELEGATE for host/host.r3.local only, fail
- * @run main/othervm -Dtest.kdc.policy.ok-as-delegate=host/host.r3.local,krbtgt/R2,krbtgt/R3 OkAsDelegateXRealm true
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts
+ *      -Dtest.kdc.policy.ok-as-delegate=host/host.r3.local,krbtgt/R2,krbtgt/R3
+ *      OkAsDelegateXRealm true
  *      KDC set OK-AS-DELEGATE for all three, succeed
- * @summary Support OK-AS-DELEGATE flag
  */
 import java.io.FileOutputStream;
 import java.io.IOException;
--- a/test/jdk/sun/security/krb5/auto/OnlyDesLogin.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/sun/security/krb5/auto/OnlyDesLogin.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -23,10 +23,13 @@
 
 /*
  * @test
- * @bug 8014310
- * @summary JAAS/Krb5LoginModule using des encytypes failure with NPE after JDK-8012679
+ * @bug 8014310 8194486
+ * @summary JAAS/Krb5LoginModule using des encytypes failure with NPE
+ *          after JDK-8012679
+ * @library /test/lib
  * @compile -XDignore.symbol.file OnlyDesLogin.java
- * @run main/othervm OnlyDesLogin
+ * @run main jdk.test.lib.FileInstaller TestHosts TestHosts
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts OnlyDesLogin
  */
 
 import sun.security.krb5.Config;
--- a/test/jdk/sun/security/krb5/auto/PrincipalNameEquals.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/sun/security/krb5/auto/PrincipalNameEquals.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -23,10 +23,12 @@
 
 /*
  * @test
- * @bug 7061379
+ * @bug 7061379 8194486
  * @summary [Kerberos] Cross-realm authentication fails, due to nameType problem
+ * @library /test/lib
  * @compile -XDignore.symbol.file PrincipalNameEquals.java
- * @run main/othervm PrincipalNameEquals
+ * @run main jdk.test.lib.FileInstaller TestHosts TestHosts
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts PrincipalNameEquals
  */
 
 import sun.security.jgss.GSSUtil;
--- a/test/jdk/sun/security/krb5/auto/RRC.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/sun/security/krb5/auto/RRC.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -23,10 +23,12 @@
 
 /*
  * @test
- * @bug 7077640
+ * @bug 7077640 8194486
  * @summary gss wrap for cfx doesn't handle rrc != 0
+ * @library /test/lib
  * @compile -XDignore.symbol.file RRC.java
- * @run main/othervm RRC
+ * @run main jdk.test.lib.FileInstaller TestHosts TestHosts
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts RRC
  */
 
 import java.util.Arrays;
--- a/test/jdk/sun/security/krb5/auto/RefreshKrb5Config.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/sun/security/krb5/auto/RefreshKrb5Config.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -31,10 +31,12 @@
 
 /*
  * @test
- * @bug 4745056 8075297
+ * @bug 4745056 8075297 8194486
  * @summary Checks if refreshKrb5Config is set to true for Krb5LoginModule,
  *          then configuration will be refreshed before login() method is called
- * @run main/othervm RefreshKrb5Config
+ * @library /test/lib
+ * @run main jdk.test.lib.FileInstaller TestHosts TestHosts
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts RefreshKrb5Config
  */
 public class RefreshKrb5Config {
 
--- a/test/jdk/sun/security/krb5/auto/Renew.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/sun/security/krb5/auto/Renew.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -23,13 +23,15 @@
 
 /*
  * @test
- * @bug 8058290
+ * @bug 8058290 8194486
  * @summary JAAS Krb5LoginModule has suspect ticket-renewal logic,
  *          relies on clockskew grace
+ * @library /test/lib
  * @compile -XDignore.symbol.file Renew.java
- * @run main/othervm Renew 1
- * @run main/othervm Renew 2
- * @run main/othervm Renew 3
+ * @run main jdk.test.lib.FileInstaller TestHosts TestHosts
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts Renew 1
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts Renew 2
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts Renew 3
  */
 
 import sun.security.krb5.Config;
--- a/test/jdk/sun/security/krb5/auto/Renewal.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/sun/security/krb5/auto/Renewal.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -23,12 +23,13 @@
 
 /*
  * @test
- * @bug 8044500
+ * @bug 8044500 8194486
  * @summary Add kinit options and krb5.conf flags that allow users to
  *          obtain renewable tickets and specify ticket lifetimes
- * @library ../../../../java/security/testlibrary/
+ * @library ../../../../java/security/testlibrary/ /test/lib
  * @compile -XDignore.symbol.file Renewal.java
- * @run main/othervm Renewal
+ * @run main jdk.test.lib.FileInstaller TestHosts TestHosts
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts Renewal
  */
 
 import sun.security.krb5.Config;
--- a/test/jdk/sun/security/krb5/auto/ReplayCacheTest.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/sun/security/krb5/auto/ReplayCacheTest.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -23,10 +23,12 @@
 
 /*
  * @test
- * @bug 7118809 8001326
- * @run main/othervm ReplayCacheTest jvm
- * @run main/othervm ReplayCacheTest dfl
+ * @bug 7118809 8001326 8194486
  * @summary rcache deadlock
+ * @library /test/lib
+ * @run main jdk.test.lib.FileInstaller TestHosts TestHosts
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts ReplayCacheTest jvm
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts ReplayCacheTest dfl
  */
 
 import java.io.File;
--- a/test/jdk/sun/security/krb5/auto/ReplayCacheTestProc.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/sun/security/krb5/auto/ReplayCacheTestProc.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -23,11 +23,13 @@
 
 /*
  * @test
- * @bug 7152176 8168518 8172017
+ * @bug 7152176 8168518 8172017 8014628 8194486
  * @summary More krb5 tests
  * @library ../../../../java/security/testlibrary/ /test/lib
  * @build jdk.test.lib.Platform
- * @run main/othervm/timeout=300 ReplayCacheTestProc
+ * @run main jdk.test.lib.FileInstaller TestHosts TestHosts
+ * @run main/othervm/timeout=300 -Djdk.net.hosts.file=TestHosts
+ *      ReplayCacheTestProc
  */
 
 import java.io.*;
@@ -132,8 +134,13 @@
                 kdc.addPrincipalRandKey(service(i));
             }
 
+            // Native lib might not support aes-sha2
+            KDC.saveConfig(OneKDC.KRB5_CONF, kdc,
+                    "default_tkt_enctypes = aes128-cts",
+                    "default_tgs_enctypes = aes128-cts");
+
+            // Write KTAB after krb5.conf so it contains no aes-sha2 keys
             kdc.writeKtab(OneKDC.KTAB);
-            KDC.saveConfig(OneKDC.KRB5_CONF, kdc);
 
             // User-provided libs
             String userLibs = System.getProperty("test.libs");
@@ -155,6 +162,7 @@
             }
 
             pi = Proc.create("ReplayCacheTestProc").debug("C")
+                    .inheritProp("jdk.net.hosts.file")
                     .args("initiator")
                     .start();
 
@@ -367,9 +375,11 @@
         }
         if (type.startsWith("J")) {
             if (lib == null) {
-                p = Proc.create("ReplayCacheTestProc");
+                p = Proc.create("ReplayCacheTestProc")
+                        .inheritProp("jdk.net.hosts.file");
             } else {
-                p = Proc.create("ReplayCacheTestProc", lib);
+                p = Proc.create("ReplayCacheTestProc", lib)
+                        .inheritProp("jdk.net.hosts.file");
             }
             p.prop("sun.security.krb5.rcache", "dfl")
                     .prop("java.io.tmpdir", cwd);
@@ -382,6 +392,7 @@
                     .env("KRB5_CONFIG", OneKDC.KRB5_CONF)
                     .env("KRB5_KTNAME", OneKDC.KTAB)
                     .env("KRB5RCACHEDIR", cwd)
+                    .inheritProp("jdk.net.hosts.file")
                     .prop("sun.security.jgss.native", "true")
                     .prop("javax.security.auth.useSubjectCredsOnly", "false")
                     .prop("sun.security.nativegss.debug", "true");
--- a/test/jdk/sun/security/krb5/auto/S4U2proxy.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/sun/security/krb5/auto/S4U2proxy.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -23,11 +23,13 @@
 
 /*
  * @test
- * @bug 6355584 8044215
+ * @bug 6355584 8044215 8194486
  * @summary Introduce constrained Kerberos delegation
+ * @library /test/lib
  * @compile -XDignore.symbol.file S4U2proxy.java
- * @run main/othervm S4U2proxy krb5
- * @run main/othervm S4U2proxy spnego
+ * @run main jdk.test.lib.FileInstaller TestHosts TestHosts
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts S4U2proxy krb5
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts S4U2proxy spnego
  */
 
 import java.util.Arrays;
--- a/test/jdk/sun/security/krb5/auto/S4U2proxyGSS.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/sun/security/krb5/auto/S4U2proxyGSS.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -23,11 +23,15 @@
 
 /*
  * @test
- * @bug 6355584
+ * @bug 6355584 8194486
  * @summary Introduce constrained Kerberos delegation
+ * @library /test/lib
  * @compile -XDignore.symbol.file S4U2proxyGSS.java
- * @run main/othervm -Djavax.security.auth.useSubjectCredsOnly=false S4U2proxyGSS krb5
- * @run main/othervm -Djavax.security.auth.useSubjectCredsOnly=false S4U2proxyGSS spnego
+ * @run main jdk.test.lib.FileInstaller TestHosts TestHosts
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts
+ *      -Djavax.security.auth.useSubjectCredsOnly=false S4U2proxyGSS krb5
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts
+ *      -Djavax.security.auth.useSubjectCredsOnly=false S4U2proxyGSS spnego
  */
 
 import java.io.File;
--- a/test/jdk/sun/security/krb5/auto/S4U2self.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/sun/security/krb5/auto/S4U2self.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -23,16 +23,25 @@
 
 /*
  * @test
- * @bug 6355584
+ * @bug 6355584 8194486
  * @summary Introduce constrained Kerberos delegation
+ * @library /test/lib
  * @compile -XDignore.symbol.file S4U2self.java
- * @run main/othervm -Dsun.security.krb5.debug=false S4U2self krb5 0
- * @run main/othervm/fail -Dsun.security.krb5.debug=false S4U2self krb5 1
- * @run main/othervm/fail -Dsun.security.krb5.debug=false S4U2self krb5 2
- * @run main/othervm/fail -Dsun.security.krb5.debug=false S4U2self krb5 3
- * @run main/othervm/fail -Dsun.security.krb5.debug=false S4U2self krb5 4
- * @run main/othervm/fail -Dsun.security.krb5.debug=false S4U2self krb5 5
- * @run main/othervm -Dsun.security.krb5.debug=false S4U2self spnego
+ * @run main jdk.test.lib.FileInstaller TestHosts TestHosts
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts
+ *      -Dsun.security.krb5.debug=false S4U2self krb5 0
+ * @run main/othervm/fail -Djdk.net.hosts.file=TestHosts
+ *      -Dsun.security.krb5.debug=false S4U2self krb5 1
+ * @run main/othervm/fail -Djdk.net.hosts.file=TestHosts
+ *      -Dsun.security.krb5.debug=false S4U2self krb5 2
+ * @run main/othervm/fail -Djdk.net.hosts.file=TestHosts
+ *      -Dsun.security.krb5.debug=false S4U2self krb5 3
+ * @run main/othervm/fail -Djdk.net.hosts.file=TestHosts
+ *      -Dsun.security.krb5.debug=false S4U2self krb5 4
+ * @run main/othervm/fail -Djdk.net.hosts.file=TestHosts
+ *      -Dsun.security.krb5.debug=false S4U2self krb5 5
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts
+ *      -Dsun.security.krb5.debug=false S4U2self spnego
  */
 
 import java.util.Arrays;
--- a/test/jdk/sun/security/krb5/auto/S4U2selfAsServer.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/sun/security/krb5/auto/S4U2selfAsServer.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -23,11 +23,13 @@
 
 /*
  * @test
- * @bug 6355584
+ * @bug 6355584 8194486
  * @summary Introduce constrained Kerberos delegation
+ * @library /test/lib
  * @compile -XDignore.symbol.file S4U2selfAsServer.java
- * @run main/othervm S4U2selfAsServer krb5
- * @run main/othervm S4U2selfAsServer spnego
+ * @run main jdk.test.lib.FileInstaller TestHosts TestHosts
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts S4U2selfAsServer krb5
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts S4U2selfAsServer spnego
  */
 
 import java.util.Arrays;
--- a/test/jdk/sun/security/krb5/auto/S4U2selfAsServerGSS.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/sun/security/krb5/auto/S4U2selfAsServerGSS.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -23,11 +23,17 @@
 
 /*
  * @test
- * @bug 6355584
+ * @bug 6355584 8194486
  * @summary Introduce constrained Kerberos delegation
+ * @library /test/lib
  * @compile -XDignore.symbol.file S4U2selfAsServerGSS.java
- * @run main/othervm -Djavax.security.auth.useSubjectCredsOnly=false S4U2selfAsServerGSS krb5
- * @run main/othervm -Djavax.security.auth.useSubjectCredsOnly=false S4U2selfAsServerGSS spnego
+ * @run main jdk.test.lib.FileInstaller TestHosts TestHosts
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts
+ *      -Djavax.security.auth.useSubjectCredsOnly=false
+ *      S4U2selfAsServerGSS krb5
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts
+ *      -Djavax.security.auth.useSubjectCredsOnly=false
+ *      S4U2selfAsServerGSS spnego
  */
 
 import java.io.File;
--- a/test/jdk/sun/security/krb5/auto/S4U2selfGSS.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/sun/security/krb5/auto/S4U2selfGSS.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -23,11 +23,15 @@
 
 /*
  * @test
- * @bug 6355584
+ * @bug 6355584 8194486
  * @summary Introduce constrained Kerberos delegation
+ * @library /test/lib
  * @compile -XDignore.symbol.file S4U2selfGSS.java
- * @run main/othervm -Dsun.security.krb5.debug=false S4U2selfGSS krb5
- * @run main/othervm -Dsun.security.krb5.debug=false S4U2selfGSS spnego
+ * @run main jdk.test.lib.FileInstaller TestHosts TestHosts
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts
+ *      -Dsun.security.krb5.debug=false S4U2selfGSS krb5
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts
+ *      -Dsun.security.krb5.debug=false S4U2selfGSS spnego
  */
 
 import java.util.Arrays;
--- a/test/jdk/sun/security/krb5/auto/SPNEGO.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/sun/security/krb5/auto/SPNEGO.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -23,10 +23,12 @@
 
 /*
  * @test
- * @bug 7040151
+ * @bug 7040151 8194486
  * @summary SPNEGO GSS code does not parse tokens in accordance to RFC 2478
+ * @library /test/lib
  * @compile -XDignore.symbol.file SPNEGO.java
- * @run main/othervm SPNEGO
+ * @run main jdk.test.lib.FileInstaller TestHosts TestHosts
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts SPNEGO
  */
 
 import sun.security.jgss.GSSUtil;
--- a/test/jdk/sun/security/krb5/auto/SSL.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/sun/security/krb5/auto/SSL.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -23,19 +23,32 @@
 
 /*
  * @test
- * @bug 6894643 6913636 8005523 8025123
+ * @bug 6894643 6913636 8005523 8025123 8194486
  * @summary Test JSSE Kerberos ciphersuite
- * @run main/othervm SSL TLS_KRB5_WITH_RC4_128_SHA
- * @run main/othervm SSL TLS_KRB5_WITH_RC4_128_SHA unbound
- * @run main/othervm SSL TLS_KRB5_WITH_RC4_128_SHA unbound sni
- * @run main/othervm SSL TLS_KRB5_WITH_3DES_EDE_CBC_SHA
- * @run main/othervm SSL TLS_KRB5_WITH_3DES_EDE_CBC_MD5
- * @run main/othervm SSL TLS_KRB5_WITH_DES_CBC_SHA
- * @run main/othervm SSL TLS_KRB5_WITH_DES_CBC_MD5
- * @run main/othervm SSL TLS_KRB5_EXPORT_WITH_RC4_40_SHA
- * @run main/othervm SSL TLS_KRB5_EXPORT_WITH_RC4_40_MD5
- * @run main/othervm SSL TLS_KRB5_EXPORT_WITH_DES_CBC_40_SHA
- * @run main/othervm SSL TLS_KRB5_EXPORT_WITH_DES_CBC_40_MD5
+ * @library /test/lib
+ * @run main jdk.test.lib.FileInstaller TestHosts TestHosts
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts SSL
+ *      TLS_KRB5_WITH_RC4_128_SHA
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts SSL
+ *      TLS_KRB5_WITH_RC4_128_SHA unbound
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts SSL
+ *      TLS_KRB5_WITH_RC4_128_SHA unbound sni
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts SSL
+ *      TLS_KRB5_WITH_3DES_EDE_CBC_SHA
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts SSL
+ *      TLS_KRB5_WITH_3DES_EDE_CBC_MD5
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts SSL
+ *      TLS_KRB5_WITH_DES_CBC_SHA
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts SSL
+ *      TLS_KRB5_WITH_DES_CBC_MD5
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts SSL
+ *      TLS_KRB5_EXPORT_WITH_RC4_40_SHA
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts SSL
+ *      TLS_KRB5_EXPORT_WITH_RC4_40_MD5
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts SSL
+ *      TLS_KRB5_EXPORT_WITH_DES_CBC_40_SHA
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts SSL
+ *      TLS_KRB5_EXPORT_WITH_DES_CBC_40_MD5
  */
 import java.io.*;
 import java.security.Permission;
--- a/test/jdk/sun/security/krb5/auto/SSLwithPerms.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/sun/security/krb5/auto/SSLwithPerms.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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,10 +23,11 @@
 
 /*
  * @test
- * @bug 8038089
+ * @bug 8038089 8194486
  * @summary TLS optional support for Kerberos cipher suites needs to be re-examined
- * @library ../../../../java/security/testlibrary/
- * @run main/othervm SSLwithPerms
+ * @library ../../../../java/security/testlibrary/ /test/lib
+ * @run main jdk.test.lib.FileInstaller TestHosts TestHosts
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts SSLwithPerms
  */
 import java.io.*;
 import javax.net.ssl.*;
--- a/test/jdk/sun/security/krb5/auto/SaslBasic.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/sun/security/krb5/auto/SaslBasic.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -23,12 +23,14 @@
 
 /*
  * @test
- * @bug 7110803 8170732
+ * @bug 7110803 8170732 8194486
  * @summary SASL service for multiple hostnames
+ * @library /test/lib
  * @compile -XDignore.symbol.file SaslBasic.java
- * @run main/othervm SaslBasic bound auth-int
- * @run main/othervm SaslBasic unbound auth-conf
- * @run main/othervm SaslBasic bound auth
+ * @run main jdk.test.lib.FileInstaller TestHosts TestHosts
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts SaslBasic bound auth-int
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts SaslBasic unbound auth-conf
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts SaslBasic bound auth
  */
 import java.io.IOException;
 import java.util.Arrays;
--- a/test/jdk/sun/security/krb5/auto/SaslGSS.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/sun/security/krb5/auto/SaslGSS.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -23,11 +23,13 @@
 
 /*
  * @test
- * @bug 8012082 8019267
+ * @bug 8012082 8019267 8194486
  * @summary SASL: auth-conf negotiated, but unencrypted data is accepted,
   *         reset to unencrypt
+ * @library /test/lib
  * @compile -XDignore.symbol.file SaslGSS.java
- * @run main/othervm SaslGSS
+ * @run main jdk.test.lib.FileInstaller TestHosts TestHosts
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts SaslGSS
  */
 
 import javax.security.auth.callback.Callback;
--- a/test/jdk/sun/security/krb5/auto/SaslUnbound.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/sun/security/krb5/auto/SaslUnbound.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -23,14 +23,16 @@
 
 /*
  * @test
- * @bug 8001104
+ * @bug 8001104 8194486
  * @summary Unbound SASL service: the GSSAPI/krb5 mech
+ * @library /test/lib
  * @compile -XDignore.symbol.file SaslUnbound.java
- * @run main/othervm SaslUnbound 0
- * @run main/othervm/fail SaslUnbound 1
- * @run main/othervm/fail SaslUnbound 2
- * @run main/othervm/fail SaslUnbound 3
- * @run main/othervm/fail SaslUnbound 4
+ * @run main jdk.test.lib.FileInstaller TestHosts TestHosts
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts SaslUnbound 0
+ * @run main/othervm/fail -Djdk.net.hosts.file=TestHosts SaslUnbound 1
+ * @run main/othervm/fail -Djdk.net.hosts.file=TestHosts SaslUnbound 2
+ * @run main/othervm/fail -Djdk.net.hosts.file=TestHosts SaslUnbound 3
+ * @run main/othervm/fail -Djdk.net.hosts.file=TestHosts SaslUnbound 4
  */
 import java.io.IOException;
 import java.util.Arrays;
--- a/test/jdk/sun/security/krb5/auto/SpnegoLifeTime.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/sun/security/krb5/auto/SpnegoLifeTime.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -23,10 +23,12 @@
 
 /*
  * @test
- * @bug 8000653
+ * @bug 8000653 8194486
  * @summary SPNEGO tests fail at context.getDelegCred().getRemainingInitLifetime(mechOid)
+ * @library /test/lib
  * @compile -XDignore.symbol.file SpnegoLifeTime.java
- * @run main/othervm SpnegoLifeTime
+ * @run main jdk.test.lib.FileInstaller TestHosts TestHosts
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts SpnegoLifeTime
  */
 
 import org.ietf.jgss.Oid;
--- a/test/jdk/sun/security/krb5/auto/SpnegoReqFlags.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/sun/security/krb5/auto/SpnegoReqFlags.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009, 2011, 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
@@ -23,9 +23,11 @@
 
 /*
  * @test
- * @bug 6815182
- * @run main/othervm SpnegoReqFlags
+ * @bug 6815182 8194486
  * @summary GSSAPI/SPNEGO does not work with server using MIT Kerberos library
+ * @library /test/lib
+ * @run main jdk.test.lib.FileInstaller TestHosts TestHosts
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts SpnegoReqFlags
  */
 
 import sun.security.jgss.GSSUtil;
--- a/test/jdk/sun/security/krb5/auto/Test5653.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/sun/security/krb5/auto/Test5653.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, 2011, 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
@@ -23,9 +23,11 @@
 
 /*
  * @test
- * @bug 6895424
- * @run main/othervm Test5653
+ * @bug 6895424 8194486
  * @summary RFC 5653
+ * @library /test/lib
+ * @run main jdk.test.lib.FileInstaller TestHosts TestHosts
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts Test5653
  */
 
 import org.ietf.jgss.GSSContext;
--- a/test/jdk/sun/security/krb5/auto/TicketSName.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/sun/security/krb5/auto/TicketSName.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -23,10 +23,13 @@
 
 /*
  * @test
- * @bug 8178794
+ * @bug 8178794 8194486
  * @summary krb5 client should ignore sname in incoming tickets
+ * @library /test/lib
  * @compile -XDignore.symbol.file TicketSName.java
- * @run main/othervm -Dtest.kdc.diff.sname TicketSName
+ * @run main jdk.test.lib.FileInstaller TestHosts TestHosts
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts -Dtest.kdc.diff.sname
+ *      TicketSName
  */
 
 import sun.security.jgss.GSSUtil;
--- a/test/jdk/sun/security/krb5/auto/TwoOrThree.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/sun/security/krb5/auto/TwoOrThree.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -23,14 +23,16 @@
 
 /*
  * @test
- * @bug 8005447
+ * @bug 8005447 8194486
  * @summary default principal can act as anyone
+ * @library /test/lib
  * @compile -XDignore.symbol.file TwoOrThree.java
- * @run main/othervm TwoOrThree first first
- * @run main/othervm/fail TwoOrThree first second
- * @run main/othervm TwoOrThree - first
- * @run main/othervm TwoOrThree - second
- * @run main/othervm/fail TwoOrThree - third
+ * @run main jdk.test.lib.FileInstaller TestHosts TestHosts
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts TwoOrThree first first
+ * @run main/othervm/fail -Djdk.net.hosts.file=TestHosts TwoOrThree first second
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts TwoOrThree - first
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts TwoOrThree - second
+ * @run main/othervm/fail -Djdk.net.hosts.file=TestHosts TwoOrThree - third
  */
 
 import java.nio.file.Files;
--- a/test/jdk/sun/security/krb5/auto/TwoPrinces.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/sun/security/krb5/auto/TwoPrinces.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -23,10 +23,12 @@
 
 /*
  * @test
- * @bug 6894072
+ * @bug 6894072 8194486
+ * @summary always refresh keytab
+ * @library /test/lib
  * @compile -XDignore.symbol.file TwoPrinces.java
- * @run main/othervm TwoPrinces
- * @summary always refresh keytab
+ * @run main jdk.test.lib.FileInstaller TestHosts TestHosts
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts TwoPrinces
  */
 
 import java.io.File;
--- a/test/jdk/sun/security/krb5/auto/TwoTab.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/sun/security/krb5/auto/TwoTab.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -23,10 +23,12 @@
 
 /*
  * @test
- * @bug 7152176
+ * @bug 7152176 8194486
  * @summary More krb5 tests
+ * @library /test/lib
  * @compile -XDignore.symbol.file TwoTab.java
- * @run main/othervm TwoTab
+ * @run main jdk.test.lib.FileInstaller TestHosts TestHosts
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts TwoTab
  */
 
 import java.io.File;
--- a/test/jdk/sun/security/krb5/auto/UnboundSSL.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/sun/security/krb5/auto/UnboundSSL.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -31,13 +31,15 @@
 
 /*
  * @test
- * @bug 8025123
+ * @bug 8025123 8194486
  * @summary Checks if an unbound server can handle connections
  *          only for allowed service principals
- * @run main/othervm/policy=unbound.ssl.policy UnboundSSL
- *                              unbound.ssl.jaas.conf server_star
- * @run main/othervm/policy=unbound.ssl.policy UnboundSSL
- *                              unbound.ssl.jaas.conf server_multiple_principals
+ * @library /test/lib
+ * @run main jdk.test.lib.FileInstaller TestHosts TestHosts
+ * @run main/othervm/policy=unbound.ssl.policy -Djdk.net.hosts.file=TestHosts
+ *      UnboundSSL unbound.ssl.jaas.conf server_star
+ * @run main/othervm/policy=unbound.ssl.policy -Djdk.net.hosts.file=TestHosts
+ *      UnboundSSL unbound.ssl.jaas.conf server_multiple_principals
  */
 public class UnboundSSL {
 
--- a/test/jdk/sun/security/krb5/auto/UnboundSSLMultipleKeys.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/sun/security/krb5/auto/UnboundSSLMultipleKeys.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -31,11 +31,13 @@
 
 /*
  * @test
- * @bug 8025123
+ * @bug 8025123 8194486
  * @summary Checks if an unbound server pick up a correct key from keytab
- * @run main/othervm UnboundSSLMultipleKeys
+ * @library /test/lib
+ * @run main jdk.test.lib.FileInstaller TestHosts TestHosts
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts UnboundSSLMultipleKeys
  *                              unbound.ssl.jaas.conf server_star
- * @run main/othervm UnboundSSLMultipleKeys
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts UnboundSSLMultipleKeys
  *                              unbound.ssl.jaas.conf server_multiple_principals
  */
 public class UnboundSSLMultipleKeys {
--- a/test/jdk/sun/security/krb5/auto/UnboundSSLPrincipalProperty.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/sun/security/krb5/auto/UnboundSSLPrincipalProperty.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -30,12 +30,14 @@
 
 /*
  * @test
- * @bug 8025123
+ * @bug 8025123 8194486
  * @summary Checks if an unbound server uses a service principal
  *          from sun.security.krb5.principal system property if specified
- * @run main/othervm UnboundSSLPrincipalProperty
+ * @library /test/lib
+ * @run main jdk.test.lib.FileInstaller TestHosts TestHosts
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts UnboundSSLPrincipalProperty
  *                              unbound.ssl.jaas.conf server_star
- * @run main/othervm UnboundSSLPrincipalProperty
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts UnboundSSLPrincipalProperty
  *                              unbound.ssl.jaas.conf server_multiple_principals
  */
 public class UnboundSSLPrincipalProperty {
--- a/test/jdk/sun/security/krb5/auto/UnboundService.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/sun/security/krb5/auto/UnboundService.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -23,17 +23,26 @@
 
 /*
  * @test
- * @bug 8001104
+ * @bug 8001104 8194486
  * @summary Unbound SASL service: the GSSAPI/krb5 mech
+ * @library /test/lib
  * @compile -XDignore.symbol.file UnboundService.java
- * @run main/othervm UnboundService null null
- * @run main/othervm UnboundService server/host.rabbit.hole null
- * @run main/othervm UnboundService server/host.rabbit.hole@RABBIT.HOLE null
- * @run main/othervm/fail UnboundService backend/host.rabbit.hole null
- * @run main/othervm UnboundService null server@host.rabbit.hole
- * @run main/othervm UnboundService server/host.rabbit.hole server@host.rabbit.hole
- * @run main/othervm UnboundService server/host.rabbit.hole@RABBIT.HOLE server@host.rabbit.hole
- * @run main/othervm/fail UnboundService backend/host.rabbit.hole server@host.rabbit.hole
+ * @run main jdk.test.lib.FileInstaller TestHosts TestHosts
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts UnboundService null null
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts UnboundService
+ *      server/host.rabbit.hole null
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts UnboundService
+ *      server/host.rabbit.hole@RABBIT.HOLE null
+ * @run main/othervm/fail -Djdk.net.hosts.file=TestHosts UnboundService
+ *      backend/host.rabbit.hole null
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts UnboundService
+ *      null server@host.rabbit.hole
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts UnboundService
+ *      server/host.rabbit.hole server@host.rabbit.hole
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts UnboundService
+ *      server/host.rabbit.hole@RABBIT.HOLE server@host.rabbit.hole
+ * @run main/othervm/fail -Djdk.net.hosts.file=TestHosts UnboundService
+ *      backend/host.rabbit.hole server@host.rabbit.hole
  */
 
 import java.io.File;
--- a/test/jdk/sun/security/krb5/auto/Unreachable.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/sun/security/krb5/auto/Unreachable.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -23,10 +23,12 @@
 
 /*
  * @test
- * @bug 7162687 8015595
+ * @bug 7162687 8015595 8194486
  * @summary enhance KDC server availability detection
+ * @library /test/lib
  * @compile -XDignore.symbol.file Unreachable.java
- * @run main/othervm Unreachable
+ * @run main jdk.test.lib.FileInstaller TestHosts TestHosts
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts Unreachable
  */
 import java.net.PortUnreachableException;
 import java.net.SocketTimeoutException;
--- a/test/jdk/sun/security/krb5/auto/UseCacheAndStoreKey.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/sun/security/krb5/auto/UseCacheAndStoreKey.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -23,11 +23,13 @@
 
 /*
  * @test
- * @bug 7201053
+ * @bug 7201053 8194486
  * @summary Krb5LoginModule shows NPE when both useTicketCache and storeKey
  *          are set to true
+ * @library /test/lib
  * @compile -XDignore.symbol.file UseCacheAndStoreKey.java
- * @run main/othervm UseCacheAndStoreKey
+ * @run main jdk.test.lib.FileInstaller TestHosts TestHosts
+ * @run main/othervm -Djdk.net.hosts.file=TestHosts UseCacheAndStoreKey
  */
 
 import java.io.FileOutputStream;
--- a/test/jdk/sun/security/krb5/auto/W83.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/sun/security/krb5/auto/W83.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, 2011, 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
@@ -23,11 +23,13 @@
 
 /*
  * @test
- * @bug 6932525 6951366 6959292
+ * @bug 6932525 6951366 6959292 8194486
  * @summary kerberos login failure on win2008 with AD set to win2000 compat mode
  * and cannot login if session key and preauth does not use the same etype
- * @run main/othervm -D6932525 W83
- * @run main/othervm -D6959292 W83
+ * @library /test/lib
+ * @run main jdk.test.lib.FileInstaller TestHosts TestHosts
+ * @run main/othervm -D6932525 -Djdk.net.hosts.file=TestHosts W83
+ * @run main/othervm -D6959292 -Djdk.net.hosts.file=TestHosts W83
  */
 import com.sun.security.auth.module.Krb5LoginModule;
 import java.io.File;
--- a/test/jdk/sun/security/krb5/auto/principalProperty/TestHosts	Tue Jan 30 16:26:40 2018 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-127.0.0.1 localhost
--- a/test/jdk/sun/security/krb5/auto/rcache_usemd5.sh	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/sun/security/krb5/auto/rcache_usemd5.sh	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -22,11 +22,13 @@
 #
 
 # @test
-# @bug 8168518
-# @library ../../../../java/security/testlibrary/ /test/lib
-# @build jdk.test.lib.Platform
-# @run main/othervm/timeout=300 -Djdk.krb5.rcache.useMD5=true
-#           -Dtest.service=host ReplayCacheTestProc
+# @bug 8168518 8194486
 # @summary  testing jdk.krb5.rcache.useMD5. This action is put in a separate
 #           test so that ReplayCacheTestProc.java can be launched with special
 #           test.* system properties easily.
+# @library ../../../../java/security/testlibrary/ /test/lib
+# @build jdk.test.lib.Platform
+# @run main jdk.test.lib.FileInstaller TestHosts TestHosts
+# @run main/othervm/timeout=300 -Djdk.krb5.rcache.useMD5=true
+#           -Djdk.net.hosts.file=TestHosts
+#           -Dtest.service=host ReplayCacheTestProc
--- a/test/jdk/sun/security/krb5/config/Include.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/sun/security/krb5/config/Include.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug 8029994 8177085
+ * @bug 8029994 8177085 8177398
  * @summary Support "include" and "includedir" in krb5.conf
  * @modules java.security.jgss/sun.security.krb5
  * @compile -XDignore.symbol.file Include.java
@@ -53,6 +53,7 @@
         Path df2 = Paths.get("d/f2");       // another file
         Path df3 = Paths.get("d/f.3");      // third file bad name
         Path df4 = Paths.get("d/f4.conf");  // fourth file
+        Path df5 = Paths.get("d/.f5.conf"); // fifth file is dotfile
 
         // OK: The base file can be missing
         System.setProperty("java.security.krb5.conf", "no-such-file");
@@ -103,6 +104,8 @@
         Files.write(ddf, (krb5Conf + "ddf").getBytes());
         // fx4 will be loaded
         Files.write(df4, (krb5Conf + "df4").getBytes());
+        // fx5 will be excluded
+        Files.write(df5, (krb5Conf + "df5").getBytes());
 
         // OK: All good files read
         tryReload(true);
--- a/test/jdk/sun/security/krb5/etype/ETypeOrder.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/sun/security/krb5/etype/ETypeOrder.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 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
@@ -38,7 +38,7 @@
         int[] etypes = EType.getBuiltInDefaults();
 
         // Reference order, note that 2 is not implemented in Java
-        int correct[] = { 18, 17, 16, 23, 1, 3, 2 };
+        int correct[] = { 18, 17, 20, 19, 16, 23, 1, 3, 2 };
 
         int match = 0;
         loopi: for (int i=0; i<etypes.length; i++) {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/sun/security/krb5/etype/KerberosAesSha2.java	Tue Jan 30 16:41:40 2018 +0100
@@ -0,0 +1,209 @@
+/*
+ * 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.
+ *
+ * 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 8014628
+ * @modules java.base/sun.security.util
+ *          java.security.jgss/sun.security.krb5.internal.crypto.dk:+open
+ * @summary https://tools.ietf.org/html/rfc8009 Test Vectors
+ */
+
+import javax.crypto.Cipher;
+import java.lang.reflect.Method;
+import java.util.Arrays;
+
+import sun.security.krb5.internal.crypto.dk.AesSha2DkCrypto;
+import sun.security.util.HexDumpEncoder;
+
+public class KerberosAesSha2 {
+
+    public static void main(String[] args) throws Exception {
+
+        AesSha2DkCrypto dk128 = new AesSha2DkCrypto(128);
+        AesSha2DkCrypto dk256 = new AesSha2DkCrypto(256);
+
+        boolean aes256ok = Cipher.getMaxAllowedKeyLength("AES") >= 256;
+
+        // Sample results for string-to-key conversion:
+        char[] pass = "password".toCharArray();
+        byte[] salt = cat(
+                hex("10 DF 9D D7 83 E5 BC 8A CE A1 73 0E 74 35 5F 61"),
+                "ATHENA.MIT.EDUraeburn".getBytes());
+
+        check(stringToKey(dk128, pass, salt, null),
+                hex("08 9B CA 48 B1 05 EA 6E A7 7C A5 D2 F3 9D C5 E7"));
+
+        check(stringToKey(dk256, pass, salt, null),
+                hex("45 BD 80 6D BF 6A 83 3A 9C FF C1 C9 45 89 A2 22\n" +
+                    "36 7A 79 BC 21 C4 13 71 89 06 E9 F5 78 A7 84 67"));
+
+        // Sample results for key derivation:
+        byte[] bk16 = hex("37 05 D9 60 80 C1 77 28 A0 E8 00 EA B6 E0 D2 3C");
+
+        check(deriveKey(dk128, bk16, 2, (byte) 0x99),
+                hex("B3 1A 01 8A 48 F5 47 76 F4 03 E9 A3 96 32 5D C3"));
+        check(deriveKey(dk128, bk16, 2, (byte) 0xaa),
+                hex("9B 19 7D D1 E8 C5 60 9D 6E 67 C3 E3 7C 62 C7 2E"));
+        check(deriveKey(dk128, bk16, 2, (byte) 0x55),
+                hex("9F DA 0E 56 AB 2D 85 E1 56 9A 68 86 96 C2 6A 6C"));
+
+        byte[] bk32 = hex(
+                "6D 40 4D 37 FA F7 9F 9D F0 D3 35 68 D3 20 66 98\n" +
+                "00 EB 48 36 47 2E A8 A0 26 D1 6B 71 82 46 0C 52");
+
+        check(deriveKey(dk256, bk32, 2, (byte) 0x99), hex(
+                "EF 57 18 BE 86 CC 84 96 3D 8B BB 50 31 E9 F5 C4\n" +
+                "BA 41 F2 8F AF 69 E7 3D"));
+        check(deriveKey(dk256, bk32, 2, (byte) 0xaa), hex(
+                "56 AB 22 BE E6 3D 82 D7 BC 52 27 F6 77 3F 8E A7\n" +
+                "A5 EB 1C 82 51 60 C3 83 12 98 0C 44 2E 5C 7E 49"));
+        check(deriveKey(dk256, bk32, 2, (byte) 0x55), hex(
+                "69 B1 65 14 E3 CD 8E 56 B8 20 10 D5 C7 30 12 B6\n" +
+                "22 C4 D0 0F FC 23 ED 1F"));
+
+        // Sample encryptions (all using the default cipher state):
+
+        check(enc(dk128, hex("7E 58 95 EA F2 67 24 35 BA D8 17 F5 45 A3 71 48"),
+                    bk16, hex("")),
+                hex("EF 85 FB 89 0B B8 47 2F 4D AB 20 39 4D CA 78 1D\n" +
+                    "AD 87 7E DA 39 D5 0C 87 0C 0D 5A 0A 8E 48 C7 18"));
+
+        check(enc(dk128, hex("7B CA 28 5E 2F D4 13 0F B5 5B 1A 5C 83 BC 5B 24"),
+                    bk16, hex("00 01 02 03 04 05")),
+                hex("84 D7 F3 07 54 ED 98 7B AB 0B F3 50 6B EB 09 CF\n" +
+                    "B5 54 02 CE F7 E6 87 7C E9 9E 24 7E 52 D1 6E D4\n" +
+                    "42 1D FD F8 97 6C"));
+
+        check(enc(dk128, hex("56 AB 21 71 3F F6 2C 0A 14 57 20 0F 6F A9 94 8F"),
+                    bk16, hex("00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F")),
+                hex("35 17 D6 40 F5 0D DC 8A D3 62 87 22 B3 56 9D 2A\n" +
+                    "E0 74 93 FA 82 63 25 40 80 EA 65 C1 00 8E 8F C2\n" +
+                    "95 FB 48 52 E7 D8 3E 1E 7C 48 C3 7E EB E6 B0 D3"));
+
+        check(enc(dk128, hex("A7 A4 E2 9A 47 28 CE 10 66 4F B6 4E 49 AD 3F AC"),
+                    bk16, hex("00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F\n" +
+                              "10 11 12 13 14")),
+                hex("72 0F 73 B1 8D 98 59 CD 6C CB 43 46 11 5C D3 36\n" +
+                    "C7 0F 58 ED C0 C4 43 7C 55 73 54 4C 31 C8 13 BC\n" +
+                    "E1 E6 D0 72 C1 86 B3 9A 41 3C 2F 92 CA 9B 83 34\n" +
+                    "A2 87 FF CB FC\n"));
+
+        if (aes256ok) {
+            check(enc(dk256, hex("F7 64 E9 FA 15 C2 76 47 8B 2C 7D 0C 4E 5F 58 E4"),
+                        bk32, hex("")),
+                    hex("41 F5 3F A5 BF E7 02 6D 91 FA F9 BE 95 91 95 A0\n" +
+                        "58 70 72 73 A9 6A 40 F0 A0 19 60 62 1A C6 12 74\n" +
+                        "8B 9B BF BE 7E B4 CE 3C\n"));
+
+            check(enc(dk256, hex("B8 0D 32 51 C1 F6 47 14 94 25 6F FE 71 2D 0B 9A"),
+                        bk32, hex("00 01 02 03 04 05")),
+                    hex("4E D7 B3 7C 2B CA C8 F7 4F 23 C1 CF 07 E6 2B C7\n" +
+                        "B7 5F B3 F6 37 B9 F5 59 C7 F6 64 F6 9E AB 7B 60\n" +
+                        "92 23 75 26 EA 0D 1F 61 CB 20 D6 9D 10 F2\n"));
+
+            check(enc(dk256, hex("53 BF 8A 0D 10 52 65 D4 E2 76 42 86 24 CE 5E 63"),
+                        bk32, hex("00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F")),
+                    hex("BC 47 FF EC 79 98 EB 91 E8 11 5C F8 D1 9D AC 4B\n" +
+                        "BB E2 E1 63 E8 7D D3 7F 49 BE CA 92 02 77 64 F6\n" +
+                        "8C F5 1F 14 D7 98 C2 27 3F 35 DF 57 4D 1F 93 2E\n" +
+                        "40 C4 FF 25 5B 36 A2 66\n"));
+
+            check(enc(dk256, hex("76 3E 65 36 7E 86 4F 02 F5 51 53 C7 E3 B5 8A F1"),
+                        bk32, hex("00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F\n" +
+                                  "10 11 12 13 14")),
+                    hex("40 01 3E 2D F5 8E 87 51 95 7D 28 78 BC D2 D6 FE\n" +
+                        "10 1C CF D5 56 CB 1E AE 79 DB 3C 3E E8 64 29 F2\n" +
+                        "B2 A6 02 AC 86 FE F6 EC B6 47 D6 29 5F AE 07 7A\n" +
+                        "1F EB 51 75 08 D2 C1 6B 41 92 E0 1F 62\n"));
+        }
+
+        // Sample checksums:
+
+        byte[] msg = hex(
+                "00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F\n" +
+                "10 11 12 13 14");
+
+        check(checksum(dk128, bk16, msg), hex(
+                "D7 83 67 18 66 43 D6 7B 41 1C BA 91 39 FC 1D EE"));
+
+        check(checksum(dk256, bk32, msg), hex(
+                "45 EE 79 15 67 EE FC A3 7F 4A C1 E0 22 2D E8 0D\n" +
+                "43 C3 BF A0 66 99 67 2A"));
+
+        // Sample pseudorandom function (PRF) invocations:
+        // Java does not support PRF. Skipped.
+    }
+
+    private static byte[] stringToKey(AesSha2DkCrypto dk,
+            char[] pass, byte[] salt, byte[] params) throws Exception {
+        Method m = AesSha2DkCrypto.class.getDeclaredMethod("stringToKey",
+                char[].class, byte[].class, byte[].class);
+        m.setAccessible(true);
+        return (byte[])m.invoke(dk, pass, salt, params);
+    }
+
+    private static byte[] deriveKey(AesSha2DkCrypto dk, byte[] baseKey,
+            int usage, byte type) throws Exception {
+        Method m = AesSha2DkCrypto.class.getDeclaredMethod("deriveKey",
+                byte[].class, int.class, byte.class);
+        m.setAccessible(true);
+        return (byte[]) m.invoke(dk, baseKey, usage, type);
+    }
+
+    private static byte[] cat(byte[] b1, byte[] b2) {
+        byte[] result = Arrays.copyOf(b1, b1.length + b2.length);
+        System.arraycopy(b2, 0, result, b1.length, b2.length);
+        return result;
+    }
+
+    private static byte[] enc(AesSha2DkCrypto dk, byte[] confounder,
+            byte[] bk, byte[] text) throws Exception {
+        return dk.encryptRaw(bk, 2, new byte[16], cat(confounder, text),
+                0, confounder.length + text.length);
+    }
+
+    private static byte[] checksum(AesSha2DkCrypto dk, byte[] baseKey, byte[] text)
+            throws Exception {
+        return dk.calculateChecksum(baseKey, 2, text, 0, text.length);
+    }
+
+    private static byte[] hex(String var) {
+        var = var.replaceAll("\\s", "");
+        byte[] data = new byte[var.length()/2];
+        for (int i=0; i<data.length; i++) {
+            data[i] = Integer.valueOf(var.substring(2*i,2*i+2), 16).byteValue();
+        }
+        return data;
+    }
+
+    private static void check(byte[] b1, byte[] b2) throws Exception {
+        if (!Arrays.equals(b1, b2)) {
+            dump(b1); dump(b2);
+            throw new Exception("Failure");
+        }
+    }
+
+    private static void dump(byte[] data) throws Exception {
+        new HexDumpEncoder().encodeBuffer(data, System.err);
+    }
+}
--- a/test/jdk/sun/security/mscapi/ShortRSAKey1024.sh	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/sun/security/mscapi/ShortRSAKey1024.sh	Tue Jan 30 16:41:40 2018 +0100
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 #
-# 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
@@ -50,7 +50,7 @@
 
 OS=`uname -s`
 case "$OS" in
-  SunOS | Linux | Darwin | CYGWIN* )
+  AIX | CYGWIN* | Darwin | Linux | SunOS )
     FS="/"
     ;;
   Windows_* )
--- a/test/jdk/sun/security/pkcs11/KeyAgreement/TestDH.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/sun/security/pkcs11/KeyAgreement/TestDH.java	Tue Jan 30 16:41:40 2018 +0100
@@ -28,8 +28,8 @@
  * @author Andreas Sterbenz
  * @library ..
  * @modules jdk.crypto.cryptoki
- * @run main/othervm TestDH
- * @run main/othervm TestDH sm
+ * @run main/othervm -Djdk.crypto.KeyAgreement.legacyKDF=true TestDH
+ * @run main/othervm -Djdk.crypto.KeyAgreement.legacyKDF=true TestDH sm
  */
 
 import java.security.KeyPair;
--- a/test/jdk/sun/security/pkcs11/PKCS11Test.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/sun/security/pkcs11/PKCS11Test.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2016, 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
@@ -31,6 +31,7 @@
 import java.io.IOException;
 import java.io.InputStreamReader;
 import java.io.StringReader;
+import java.nio.charset.StandardCharsets;
 import java.security.AlgorithmParameters;
 import java.security.InvalidAlgorithmParameterException;
 import java.security.KeyPairGenerator;
@@ -387,6 +388,11 @@
         getNSSInfo(nss_library);
     }
 
+    // Try to parse the version for the specified library.
+    // Assuming the library contains either of the following patterns:
+    // $Header: NSS <version>
+    // Version: NSS <version>
+    // Here, <version> stands for NSS version.
     static double getNSSInfo(String library) {
         // look for two types of headers in NSS libraries
         String nssHeader1 = "$Header: NSS";
@@ -417,7 +423,7 @@
                         read = 100 + is.read(data, 100, 900);
                     }
 
-                    s = new String(data, 0, read);
+                    s = new String(data, 0, read, StandardCharsets.US_ASCII);
                     i = s.indexOf(nssHeader1);
                     if (i > 0 || (i = s.indexOf(nssHeader2)) > 0) {
                         found = true;
@@ -443,7 +449,12 @@
 
         // the index after whitespace after nssHeader
         int afterheader = s.indexOf("NSS", i) + 4;
-        String version = s.substring(afterheader, s.indexOf(' ', afterheader));
+        String version = String.valueOf(s.charAt(afterheader));
+        for (char c = s.charAt(++afterheader);
+                c == '.' || (c >= '0' && c <= '9');
+                c = s.charAt(++afterheader)) {
+            version += c;
+        }
 
         // If a "dot dot" release, strip the extra dots for double parsing
         String[] dot = version.split("\\.");
@@ -458,6 +469,9 @@
         try {
             nss_version = Double.parseDouble(version);
         } catch (NumberFormatException e) {
+            System.out.println("===== Content start =====");
+            System.out.println(s);
+            System.out.println("===== Content end =====");
             System.out.println("Failed to parse lib" + library +
                     " version. Set to 0.0");
             e.printStackTrace();
@@ -624,6 +638,7 @@
             "/usr/lib64/"});
         osMap.put("Linux-ppc64-64", new String[]{"/usr/lib64/"});
         osMap.put("Linux-ppc64le-64", new String[]{"/usr/lib64/"});
+        osMap.put("Linux-s390x-64", new String[]{"/usr/lib64/"});
         osMap.put("Windows-x86-32", new String[]{
             PKCS11_BASE + "/nss/lib/windows-i586/".replace('/', SEP)});
         osMap.put("Windows-amd64-64", new String[]{
--- a/test/jdk/sun/security/ssl/ClientHandshaker/RSAExport.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/sun/security/ssl/ClientHandshaker/RSAExport.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 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
@@ -419,6 +419,7 @@
         // reset the security property to make sure that the algorithms
         // and keys used in this test are not disabled.
         Security.setProperty("jdk.certpath.disabledAlgorithms", "MD2");
+        Security.setProperty("jdk.tls.disabledAlgorithms", "MD2");
 
         if (debug)
             System.setProperty("javax.net.debug", "all");
--- a/test/jdk/sun/security/tools/keytool/i18n.sh	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/sun/security/tools/keytool/i18n.sh	Tue Jan 30 16:41:40 2018 +0100
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2000, 2014, 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
@@ -44,7 +44,7 @@
 # set platform-dependent variables
 OS=`uname -s`
 case "$OS" in
-  SunOS | Linux | Darwin )
+  AIX | Darwin | Linux | SunOS )
     NULL=/dev/null
     PS=":"
     FS="/"
--- a/test/jdk/sun/text/resources/LocaleData	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/sun/text/resources/LocaleData	Tue Jan 30 16:41:40 2018 +0100
@@ -6396,7 +6396,6 @@
 CurrencyNames//ang=Netherlands Antillean Guilder
 CurrencyNames//awg=Aruban Florin
 CurrencyNames//azm=Azerbaijani Manat (1993-2006)
-CurrencyNames//azn=Azerbaijani Manat
 CurrencyNames//bbd=Barbadian Dollar
 CurrencyNames//bdt=Bangladeshi Taka
 CurrencyNames//bgn=Bulgarian Lev
@@ -8312,3 +8311,9 @@
 # bug #8081643
 FormatData/sr-Latin/NumberElements/0=,
 FormatData/sr-Latin/NumberElements/1=.
+
+# bug #8187946
+CurrencyNames//stn=S\u00e3o Tom\u00e9 and Pr\u00edncipe Dobra
+CurrencyNames//lak=Lao Kip
+CurrencyNames//php=Philippine Piso
+CurrencyNames//azn=Azerbaijan Manat
--- a/test/jdk/sun/text/resources/LocaleDataTest.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/sun/text/resources/LocaleDataTest.java	Tue Jan 30 16:41:40 2018 +0100
@@ -38,6 +38,7 @@
  *      7114053 7074882 7040556 8008577 8013836 8021121 6192407 6931564 8027695
  *      8017142 8037343 8055222 8042126 8074791 8075173 8080774 8129361 8134916
  *      8145136 8145952 8164784 8037111 8081643 7037368 8178872 8185841 8190918
+ *      8187946 8195478
  * @summary Verify locale data
  * @modules java.base/sun.util.resources
  * @modules jdk.localedata
--- a/test/jdk/sun/tools/jcmd/TestJcmdDefaults.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/sun/tools/jcmd/TestJcmdDefaults.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -52,20 +52,22 @@
     private static final String JCMD_LIST_REGEX = "(?s)^\\d+\\s*.*";
 
     public static void main(String[] args) throws Exception {
+        testJcmdUsage("-?");
         testJcmdUsage("-h");
-        testJcmdUsage("-help");
+        testJcmdUsage("--help");
         testJcmdDefaults();
         testJcmdDefaults("-l");
     }
 
     /**
+     * jcmd -J-XX:+UsePerfData -?
      * jcmd -J-XX:+UsePerfData -h
-     * jcmd -J-XX:+UsePerfData -help
+     * jcmd -J-XX:+UsePerfData --help
      */
     private static void testJcmdUsage(String... jcmdArgs) throws Exception {
         OutputAnalyzer output = JcmdBase.jcmdNoPid(VM_ARGS, jcmdArgs);
 
-        assertNotEquals(output.getExitValue(), 0);
+        assertEquals(output.getExitValue(), 0);
         verifyOutputAgainstFile(output);
     }
 
--- a/test/jdk/sun/tools/jcmd/usage.out	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/sun/tools/jcmd/usage.out	Tue Jan 30 16:41:40 2018 +0100
@@ -12,4 +12,4 @@
   PerfCounter.print display the counters exposed by this process  
   -f  read and execute commands from the file                     
   -l  list JVM processes on the local machine                     
-  -h  this help                                                   
+  -? -h --help print this help message                            
--- a/test/jdk/sun/tools/jps/TestJpsSanity.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/sun/tools/jps/TestJpsSanity.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -84,7 +84,10 @@
         OutputAnalyzer output = JpsHelper.jps("-?");
         JpsHelper.verifyOutputAgainstFile(output);
 
-        output = JpsHelper.jps("-help");
+        output = JpsHelper.jps("-h");
+        JpsHelper.verifyOutputAgainstFile(output);
+
+        output = JpsHelper.jps("--help");
         JpsHelper.verifyOutputAgainstFile(output);
     }
 
--- a/test/jdk/sun/tools/jps/usage.out	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/sun/tools/jps/usage.out	Tue Jan 30 16:41:40 2018 +0100
@@ -1,5 +1,6 @@
-usage: jps [-help]
+usage: jps [--help]
        jps [-q] [-mlvV] [<hostid>]
 
 Definitions:
     <hostid>:      <hostname>[:<port>]
+    -? -h --help -help: Print this help message and exit.
--- a/test/jdk/sun/tools/jstat/jstatHelp.sh	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/sun/tools/jstat/jstatHelp.sh	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -24,7 +24,7 @@
 # @test
 # @bug 4990825 6364329
 # @run shell jstatHelp.sh
-# @summary Test that output of 'jstat -?', 'jstat -help' and 'jstat' matches the usage.out file
+# @summary Test that output of 'jstat -?', 'jstat -h', 'jstat --help' and 'jstat' matches the usage.out file
 
 . ${TESTSRC-.}/../../jvmstat/testlibrary/utils.sh
 
@@ -43,12 +43,22 @@
 fi
 
 rm -f jstat.out 2>/dev/null
-${JSTAT} -J-XX:+UsePerfData -help > jstat.out 2>&1
+${JSTAT} -J-XX:+UsePerfData --help > jstat.out 2>&1
 
 diff -w jstat.out ${TESTSRC}/usage.out
 if [ $? != 0 ]
 then
-  echo "Output of jstat -help differs from expected output. Failed."
+  echo "Output of jstat -h differs from expected output. Failed."
+  exit 1
+fi
+
+rm -f jstat.out 2>/dev/null
+${JSTAT} -J-XX:+UsePerfData --help > jstat.out 2>&1
+
+diff -w jstat.out ${TESTSRC}/usage.out
+if [ $? != 0 ]
+then
+  echo "Output of jstat --help differs from expected output. Failed."
   exit 1
 fi
 
--- a/test/jdk/sun/tools/jstat/usage.out	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/sun/tools/jstat/usage.out	Tue Jan 30 16:41:40 2018 +0100
@@ -1,4 +1,4 @@
-Usage: jstat -help|-options
+Usage: jstat --help|-options
        jstat -<option> [-t] [-h<lines>] <vmid> [<interval> [<count>]]
 
 Definitions:
@@ -18,3 +18,5 @@
                 milliseconds("ms") or seconds("s"). The default units are "ms".
   <count>       Number of samples to take before terminating.
   -J<flag>      Pass <flag> directly to the runtime system.
+  -? -h --help  Prints this help message.
+  -help         Prints this help message.
--- a/test/jdk/sun/tools/jstatd/TestJstatdUsage.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/sun/tools/jstatd/TestJstatdUsage.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * 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
@@ -36,8 +36,9 @@
 public class TestJstatdUsage {
 
     public static void main(String[] args) throws Exception {
-        testUsage("-help");
         testUsage("-?");
+        testUsage("-h");
+        testUsage("--help");
     }
 
     private static void testUsage(String option) throws Exception {
@@ -47,7 +48,7 @@
         OutputAnalyzer output = ProcessTools.executeProcess(processBuilder);
 
         output.shouldContain("usage: jstatd [-nr] [-p port] [-n rminame]");
-        output.shouldHaveExitValue(1);
+        output.shouldHaveExitValue(0);
     }
 
 }
--- a/test/jdk/tools/jlink/DefaultProviderTest.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/tools/jlink/DefaultProviderTest.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -40,6 +40,7 @@
  * @test
  * @summary Test plugins enabled by default
  * @author Jean-Francois Denise
+ * @requires vm.compMode != "Xcomp"
  * @library ../lib
  * @modules java.base/jdk.internal.jimage
  *          jdk.jdeps/com.sun.tools.classfile
--- a/test/jdk/tools/jlink/JLinkPluginsTest.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/tools/jlink/JLinkPluginsTest.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -33,6 +33,7 @@
  * @test
  * @summary Test image creation
  * @author Jean-Francois Denise
+ * @requires (vm.compMode != "Xcomp" & os.maxMemory >= 2g)
  * @library ../lib
  * @modules java.base/jdk.internal.jimage
  *          jdk.jdeps/com.sun.tools.classfile
--- a/test/jdk/tools/jlink/JLinkTest.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/tools/jlink/JLinkTest.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -44,6 +44,7 @@
  * @summary Test image creation
  * @bug 8189777
  * @author Jean-Francois Denise
+ * @requires (vm.compMode != "Xcomp" & os.maxMemory >= 2g)
  * @library ../lib
  * @modules java.base/jdk.internal.jimage
  *          jdk.jdeps/com.sun.tools.classfile
--- a/test/jdk/tools/jlink/JLinkToolProviderTest.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/tools/jlink/JLinkToolProviderTest.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -28,6 +28,7 @@
 
 /*
  * @test
+ * @modules jdk.jlink
  * @build JLinkToolProviderTest
  * @run main/othervm/java.security.policy=toolprovider.policy JLinkToolProviderTest
  */
--- a/test/jdk/tools/jlink/multireleasejar/JLinkMultiReleaseJarTest.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/tools/jlink/multireleasejar/JLinkMultiReleaseJarTest.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -29,6 +29,10 @@
  * @library /test/lib
  * @modules java.base/jdk.internal.jimage
  *          java.base/jdk.internal.module
+ *          jdk.compiler
+ *          jdk.jartool
+ *          jdk.jlink
+ *          jdk.zipfs
  * @build jdk.test.lib.Utils
  *        jdk.test.lib.Asserts
  *        jdk.test.lib.JDKToolFinder
--- a/test/jdk/tools/jlink/plugins/IncludeLocalesPluginTest.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/tools/jlink/plugins/IncludeLocalesPluginTest.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -43,6 +43,7 @@
  * @bug 8152143 8152704 8155649 8165804 8185841 8176841 8190918
  * @summary IncludeLocalesPlugin tests
  * @author Naoto Sato
+ * @requires (vm.compMode != "Xcomp" & os.maxMemory >= 2g)
  * @library ../../lib
  * @modules java.base/jdk.internal.jimage
  *          jdk.jdeps/com.sun.tools.classfile
--- a/test/jdk/tools/launcher/FXLauncherTest.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/tools/launcher/FXLauncherTest.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -29,7 +29,7 @@
  * jfx app class, a main-class for the manifest, a bogus one and none.
  * All should execute except the incorrect fx app class entries.
  * @run main/othervm FXLauncherTest
- * @key intermittent
+ * @key intermittent headful
  */
 import java.io.File;
 import java.io.IOException;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/tools/launcher/HelpFlagsTest.java	Tue Jan 30 16:41:40 2018 +0100
@@ -0,0 +1,422 @@
+/*
+ * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2018 SAP SE. All rights reserved.
+ * 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 Validate and test -?, -h and --help flags. All tools in the jdk
+ *          should take the same flags to display the help message. These
+ *          flags should be documented in the printed help message. The
+ *          tool should quit without error code after displaying the
+ *          help message (if there  is no other problem with the command
+ *          line).
+ *          Also check that tools that used to accept -help still do
+ *          so. Test that tools that never accepted -help don't do so
+ *          in future. I.e., check that the tool returns with the same
+ *          return code as called with an invalid flag, and does not
+ *          print anything containing '-help' in that case.
+ * @compile HelpFlagsTest.java
+ * @run main HelpFlagsTest
+ */
+
+import java.io.File;
+import java.io.FileFilter;
+import java.util.Map;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.HashSet;
+import java.util.Set;
+
+
+public class HelpFlagsTest extends TestHelper {
+
+    // Tools that should not be tested because a usage message is pointless.
+    static final String[] TOOLS_NOT_TO_TEST = {
+        "appletviewer",     // deprecated, don't test
+        "jaccessinspector", // gui, don't test, win only
+        "jaccesswalker",    // gui, don't test, win only
+        "jconsole",         // gui, don't test
+        "servertool",       // none. Shell, don't test.
+        "javaw",            // don't test, win only
+        // The flags of these tools need to be fixed in Java EE.
+        // The tools are deprecated for removal in Java SE. Don't test.
+        "idlj",
+        "orbd",
+        "schemagen",
+        "tnameserv",
+        "wsgen",
+        "wsimport",
+        "xjc",
+        // These shall have a help message that resembles that of
+        // MIT's tools. Thus -?, -h and --help are supported, but not
+        // mentioned in the help text.
+        "kinit",
+        "klist",
+        "ktab",
+        // Oracle proprietary tools without help message.
+        "javacpl",
+        "jmc",
+        "jweblauncher",
+        "jcontrol",
+        "ssvagent"
+    };
+
+    // Lists which tools support which flags.
+    private static class ToolHelpSpec {
+        String toolname;
+
+        // How the flags supposed to be supported are handled.
+        //
+        // These flags are supported, i.e.,
+        // * the tool accepts the flag
+        // * the tool prints a help message if the flag is specified
+        // * this help message lists the flag
+        // * the tool exits with exit code '0'.
+        boolean supportsQuestionMark;
+        boolean supportsH;
+        boolean supportsHelp;
+
+        // One tool returns with exit code != '0'.
+        int exitcodeOfHelp;
+
+        // How legacy -help is handled.
+        //
+        // Tools that so far support -help should still do so, but
+        // not print documentation about it. Tools that do not
+        // support -help should not do so in future.
+        //
+        // The tools accepts legacy -help. -help should not be
+        // documented in the usage message.
+        boolean supportsLegacyHelp;
+
+        // Java itself documents -help. -help prints to stderr,
+        // while --help prints to stdout. Leave as is.
+        boolean documentsLegacyHelp;
+
+        // The exit code of the tool if an invalid argument is passed to it.
+        // An exit code != 0 would be expected, but not all tools handle it
+        // that way.
+        int exitcodeOfWrongFlag;
+
+        ToolHelpSpec(String n, int q, int h, int hp, int ex1, int l, int dl, int ex2) {
+            toolname = n;
+            supportsQuestionMark = ( q  == 1 ? true : false );
+            supportsH            = ( h  == 1 ? true : false );
+            supportsHelp         = ( hp == 1 ? true : false );
+            exitcodeOfHelp       = ex1;
+
+            supportsLegacyHelp   = (  l == 1 ? true : false );
+            documentsLegacyHelp  = ( dl == 1 ? true : false );
+            exitcodeOfWrongFlag  = ex2;
+        }
+    }
+
+    static ToolHelpSpec[] jdkTools = {
+        //               name          -?   -h --help exitcode   -help -help  exitcode
+        //                                            of help          docu   of wrong
+        //                                                             mented flag
+        new ToolHelpSpec("jabswitch",   0,   0,   0,   0,         0,    0,     0),     // /?, prints help message anyways, win only
+        new ToolHelpSpec("jaotc",       1,   1,   1,   0,         0,    0,     2),     // -?, -h, --help
+        new ToolHelpSpec("jar",         1,   1,   1,   0,         0,    0,     1),     // -?, -h, --help
+        new ToolHelpSpec("jarsigner",   1,   1,   1,   0,         1,    0,     1),     // -?, -h, --help, -help accepted but not documented.
+        new ToolHelpSpec("java",        1,   1,   1,   0,         1,    1,     1),     // -?, -h, --help -help, Documents -help
+        new ToolHelpSpec("javac",       1,   0,   1,   0,         1,    1,     2),     // -?,     --help -help, Documents -help, -h is already taken for "native header output directory".
+        new ToolHelpSpec("javadoc",     1,   1,   1,   0,         1,    1,     1),     // -?, -h, --help -help, Documents -help
+        new ToolHelpSpec("javap",       1,   1,   1,   0,         1,    1,     2),     // -?, -h, --help -help, Documents -help
+        new ToolHelpSpec("javaw",       1,   1,   1,   0,         1,    1,     1),     // -?, -h, --help -help, Documents -help, win only
+        new ToolHelpSpec("jcmd",        1,   1,   1,   0,         1,    0,     1),     // -?, -h, --help, -help accepted but not documented.
+        new ToolHelpSpec("jdb",         1,   1,   1,   0,         1,    1,     0),     // -?, -h, --help -help, Documents -help
+        new ToolHelpSpec("jdeprscan",   1,   1,   1,   0,         0,    0,     1),     // -?, -h, --help
+        new ToolHelpSpec("jdeps",       1,   1,   1,   0,         1,    0,     2),     // -?, -h, --help, -help accepted but not documented.
+        new ToolHelpSpec("jhsdb",       0,   0,   0,   0,         0,    0,     0),     // none, prints help message anyways.
+        new ToolHelpSpec("jimage",      1,   1,   1,   0,         0,    0,     2),     // -?, -h, --help
+        new ToolHelpSpec("jinfo",       1,   1,   1,   0,         1,    1,     1),     // -?, -h, --help -help, Documents -help
+        new ToolHelpSpec("jjs",         0,   1,   1, 100,         0,    0,   100),     //     -h, --help, return code 100
+        new ToolHelpSpec("jlink",       1,   1,   1,   0,         0,    0,     2),     // -?, -h, --help
+        new ToolHelpSpec("jmap",        1,   1,   1,   0,         1,    0,     1),     // -?, -h, --help, -help accepted but not documented.
+        new ToolHelpSpec("jmod",        1,   1,   1,   0,         1,    0,     2),     // -?, -h, --help, -help accepted but not documented.
+        new ToolHelpSpec("jps",         1,   1,   1,   0,         1,    1,     1),     // -?, -h, --help -help, Documents -help
+        new ToolHelpSpec("jrunscript",  1,   1,   1,   0,         1,    1,     7),     // -?, -h, --help -help, Documents -help
+        new ToolHelpSpec("jshell",      1,   1,   1,   0,         1,    0,     1),     // -?, -h, --help, -help accepted but not documented.
+        new ToolHelpSpec("jstack",      1,   1,   1,   0,         1,    1,     1),     // -?, -h, --help -help, Documents -help
+        new ToolHelpSpec("jstat",       1,   1,   1,   0,         1,    1,     1),     // -?, -h, --help -help, Documents -help
+        new ToolHelpSpec("jstatd",      1,   1,   1,   0,         0,    0,     1),     // -?, -h, --help
+        new ToolHelpSpec("keytool",     1,   1,   1,   0,         1,    0,     1),     // none, prints help message anyways.
+        new ToolHelpSpec("pack200",     1,   1,   1,   0,         1,    0,     2),     // -?, -h, --help, -help accepted but not documented.
+        new ToolHelpSpec("rmic",        0,   0,   0,   0,         0,    0,     1),     // none, pirnts help message anyways.
+        new ToolHelpSpec("rmid",        0,   0,   0,   0,         0,    0,     1),     // none, prints help message anyways.
+        new ToolHelpSpec("rmiregistry", 0,   0,   0,   0,         0,    0,     1),     // none, prints help message anyways.
+        new ToolHelpSpec("serialver",   0,   0,   0,   0,         0,    0,     1),     // none, prints help message anyways.
+        new ToolHelpSpec("unpack200",   1,   1,   1,   0,         1,    0,     2),     // -?, -h, --help, -help accepted but not documented.
+        // Oracle proprietary tools:
+        new ToolHelpSpec("javapackager",0,   0,   0,   0,         1,    0,   255),     // -help accepted but not documented.
+    };
+
+    // Returns true if the file is not a tool.
+    static boolean notATool(String file) {
+        if (isWindows && !file.endsWith(EXE_FILE_EXT))
+            return true;
+        return false;
+    }
+
+    // Returns true if tool is listed in TOOLS_NOT_TO_TEST.
+    static boolean dontTestTool(String tool) {
+        tool = tool.toLowerCase();
+        for (String x : TOOLS_NOT_TO_TEST) {
+            if (tool.toLowerCase().startsWith(x))
+                return true;
+        }
+        return false;
+    }
+
+    // Returns corresponding object from jdkTools array.
+    static ToolHelpSpec getToolHelpSpec(String tool) {
+        for (ToolHelpSpec x : jdkTools) {
+            if (tool.toLowerCase().equals(x.toolname) ||
+                tool.toLowerCase().equals(x.toolname + ".exe"))
+                return x;
+        }
+        return null;
+    }
+
+    // Check whether 'flag' appears in 'line' as a word of itself. It must not
+    // be a substring of a word, as then similar flags might be matched.
+    // E.g.: --help matches in the documentation of --help-extra.
+    // This works only with english locale, as some tools have translated
+    // usage messages.
+    static boolean findFlagInLine(String line, String flag) {
+        if (line.contains(flag) &&
+            !line.contains("nknown") &&                       // Some tools say 'Unknown option "<flag>"',
+            !line.contains("invalid flag") &&                 // 'invalid flag: <flag>'
+            !line.contains("invalid option") &&               // or 'invalid option: <flag>'. Skip that.
+            !line.contains("FileNotFoundException: -help") && // Special case for idlj.
+            !line.contains("-h requires an argument") &&      // Special case for javac.
+            !line.contains("port argument,")) {               // Special case for rmiregistry.
+            // There might be several appearances of 'flag' in
+            // 'line'. (-h as substring of --help).
+            int flagLen = flag.length();
+            int lineLen = line.length();
+            for (int i = line.indexOf(flag); i >= 0; i = line.indexOf(flag, i+1)) {
+                // There should be a space before 'flag' in 'line', or it's right at the beginning.
+                if (i > 0 &&
+                    line.charAt(i-1) != ' ' &&
+                    line.charAt(i-1) != '[' &&  // jarsigner
+                    line.charAt(i-1) != '|' &&  // jstatd
+                    line.charAt(i-1) != '\t') { // jjs
+                    continue;
+                }
+                // There should be a space or comma after 'flag' in 'line', or it's just at the end.
+                int posAfter = i + flagLen;
+                if (posAfter < lineLen &&
+                    line.charAt(posAfter) != ' ' &&
+                    line.charAt(posAfter) != ',' &&
+                    line.charAt(posAfter) != '[' && // jar
+                    line.charAt(posAfter) != ']' && // jarsigner
+                    line.charAt(posAfter) != '|' && // jstatd
+                    line.charAt(posAfter) != ':' && // jps
+                    line.charAt(posAfter) != '"') { // keytool
+                    continue;
+                }
+                return true;
+            }
+        }
+        return false;
+    }
+
+    static TestResult runToolWithFlag(File f, String flag) {
+        String x = f.getAbsolutePath();
+        TestResult tr = doExec(x, flag);
+        System.out.println("Testing " + f.getName());
+        System.out.println("#> " + x + " " + flag);
+        tr.testOutput.forEach(System.out::println);
+        System.out.println("#> echo $?");
+        System.out.println(tr.exitValue);
+
+        return tr;
+    }
+
+    // Checks whether tool supports flag 'flag' and documents it
+    // in the help message.
+    static String testTool(File f, String flag, int exitcode) {
+        String result = "";
+        TestResult tr = runToolWithFlag(f, flag);
+
+        // Check that the tool accepted the flag.
+        if (exitcode == 0 && !tr.isOK()) {
+            System.out.println("failed");
+            result = "failed: " + f.getName() + " " + flag + " has exit code " + tr.exitValue + ".\n";
+        }
+
+        // Check there is a help message listing the flag.
+        boolean foundFlag = false;
+        for (String y : tr.testOutput) {
+            if (!foundFlag && findFlagInLine(y, flag)) { // javac
+                foundFlag = true;
+                System.out.println("Found documentation of '" + flag + "': '" + y.trim() +"'");
+            }
+        }
+        if (!foundFlag) {
+            result += "failed: " + f.getName() + " does not document " +
+                flag + " in help message.\n";
+        }
+
+        if (!result.isEmpty())
+            System.out.println(result);
+
+        return result;
+    }
+
+    // Test the tool supports legacy option -help, but does
+    // not document it.
+    static String testLegacyFlag(File f, int exitcode) {
+        String result = "";
+        TestResult tr = runToolWithFlag(f, "-help");
+
+        // Check that the tool accepted the flag.
+        if (exitcode == 0 && !tr.isOK()) {
+            System.out.println("failed");
+            result = "failed: " + f.getName() + " -help has exit code " + tr.exitValue + ".\n";
+        }
+
+        // Check there is _no_ documentation of -help.
+        boolean foundFlag = false;
+        for (String y : tr.testOutput) {
+            if (!foundFlag && findFlagInLine(y, "-help")) {  // javac
+                foundFlag = true;
+                System.out.println("Found documentation of '-help': '" + y.trim() +"'");
+            }
+        }
+        if (foundFlag) {
+            result += "failed: " + f.getName() + " does document -help " +
+                "in help message. This legacy flag should not be documented.\n";
+        }
+
+        if (!result.isEmpty())
+            System.out.println(result);
+
+        return result;
+    }
+
+    // Test that the tool exits with the exit code expected for
+    // invalid flags. In general, one would expect this to be != 0,
+    // but currently a row of tools exit with 0 in this case.
+    // The output should not ask to get help with flag '-help'.
+    static String testInvalidFlag(File f, String flag, int exitcode, boolean documentsLegacyHelp) {
+        String result = "";
+        TestResult tr = runToolWithFlag(f, flag);
+
+        // Check that the tool did exit with the expected return code.
+        if (!((exitcode == tr.exitValue) ||
+              // Windows reports -1 where unix reports 255.
+              (tr.exitValue < 0 && exitcode == tr.exitValue + 256))) {
+            System.out.println("failed");
+            result = "failed: " + f.getName() + " " + flag + " should not be " +
+                     "accepted. But it has exit code " + tr.exitValue + ".\n";
+        }
+
+        if (!documentsLegacyHelp) {
+            // Check there is _no_ documentation of -help.
+            boolean foundFlag = false;
+            for (String y : tr.testOutput) {
+                if (!foundFlag && findFlagInLine(y, "-help")) {  // javac
+                    foundFlag = true;
+                    System.out.println("Found documentation of '-help': '" + y.trim() +"'");
+                }
+            }
+            if (foundFlag) {
+                result += "failed: " + f.getName() + " does document -help " +
+                    "in error message. This legacy flag should not be documented.\n";
+            }
+        }
+
+        if (!result.isEmpty())
+            System.out.println(result);
+
+        return result;
+    }
+
+    public static void main(String[] args) {
+        String errorMessage = "";
+
+        // The test analyses the help messages printed. It assumes englisch
+        // help messages. Thus it only works with english locale.
+        if (!isEnglishLocale()) { return; }
+
+        for (File f : new File(JAVA_BIN).listFiles()) {
+            String toolName = f.getName();
+
+            if (notATool(toolName)) {
+                continue;
+            }
+            if (dontTestTool(toolName)) {
+                System.out.println("Skipping test of tool " + toolName +
+                                   ". Tool has no help message.");
+                continue;
+            }
+
+            ToolHelpSpec tool = getToolHelpSpec(toolName);
+            if (tool == null) {
+                errorMessage += "Tool " + toolName + " not covered by this test. " +
+                    "Add specification to jdkTools array!\n";
+                continue;
+            }
+
+            // Test for help flags to be supported.
+            if (tool.supportsQuestionMark == true) {
+                errorMessage += testTool(f, "-?", tool.exitcodeOfHelp);
+            } else {
+                System.out.println("Skip " + tool.toolname + ". It does not support -?.");
+            }
+            if (tool.supportsH == true) {
+                errorMessage += testTool(f, "-h", tool.exitcodeOfHelp);
+            } else {
+                System.out.println("Skip " + tool.toolname + ". It does not support -h.");
+            }
+            if (tool.supportsHelp == true) {
+                errorMessage += testTool(f, "--help", tool.exitcodeOfHelp);
+            } else {
+                System.out.println("Skip " + tool.toolname + ". It does not support --help.");
+            }
+
+            // Check that the return code listing in jdkTools[] is
+            // correct for an invalid flag.
+            errorMessage += testInvalidFlag(f, "-asdfxgr", tool.exitcodeOfWrongFlag, tool.documentsLegacyHelp);
+
+            // Test for legacy -help flag.
+            if (!tool.documentsLegacyHelp) {
+                if (tool.supportsLegacyHelp == true) {
+                    errorMessage += testLegacyFlag(f, tool.exitcodeOfHelp);
+                } else {
+                    errorMessage += testInvalidFlag(f, "-help", tool.exitcodeOfWrongFlag, false);
+                }
+            }
+        }
+
+        if (errorMessage.isEmpty()) {
+            System.out.println("All help string tests: PASS");
+        } else {
+            throw new AssertionError("HelpFlagsTest failed:\n" + errorMessage);
+        }
+    }
+}
--- a/test/jdk/tools/launcher/RunpathTest.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/tools/launcher/RunpathTest.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -71,6 +71,10 @@
     public static void main(String... args) throws Exception {
         if (isSolaris || isLinux) {
             RunpathTest rp = new RunpathTest();
+            if (rp.elfreaderCmd == null) {
+                System.err.println("Warning: test passes vacuously");
+                return;
+            }
             rp.testRpath();
         }
     }
--- a/test/jdk/tools/launcher/modules/addexports/manifest/AddExportsAndOpensInManifest.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/tools/launcher/modules/addexports/manifest/AddExportsAndOpensInManifest.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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,7 @@
  *          manifest of a main application JAR
  */
 
+import java.lang.reflect.Method;
 import java.nio.file.Files;
 import java.nio.file.Path;
 import java.nio.file.Paths;
@@ -41,6 +42,7 @@
 import jdk.testlibrary.OutputAnalyzer;
 import jdk.testlibrary.ProcessTools;
 
+import org.testng.annotations.BeforeMethod;
 import org.testng.annotations.Test;
 import static org.testng.Assert.*;
 
@@ -48,6 +50,15 @@
 @Test
 public class AddExportsAndOpensInManifest {
 
+    private String testName;
+    private int testCaseNum;
+
+    @BeforeMethod
+    public void getTestName(Method m){
+        testName = m.getName();
+        testCaseNum = 0;
+    }
+
     /**
      * Package Test1 and Test2 into a JAR file with the given attributes
      * in the JAR manifest, then execute the JAR file with `java -jar`.
@@ -67,7 +78,7 @@
         }
 
         // create the JAR file with Test1 and Test2
-        Path jarfile = Paths.get("test.jar");
+        Path jarfile = Paths.get(String.format("%s-%s.jar", testName, ++testCaseNum));
         Files.deleteIfExists(jarfile);
 
         Path classes = Paths.get(System.getProperty("test.classes", ""));
@@ -172,5 +183,4 @@
         attrs = "Main-Class=Test1,Add-Opens=java.base/jdk.internal.DoesNotExit";
         runExpectingFail(attrs, "IllegalAccessError");
     }
-
 }
--- a/test/jdk/tools/pack200/ModuleAttributes.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/tools/pack200/ModuleAttributes.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -29,6 +29,8 @@
  * @test
  * @bug 8048100
  * @summary test the new Module attributes
+ * @modules jdk.compiler
+ *          jdk.zipfs
  * @compile -XDignore.symbol.file Utils.java ModuleAttributes.java
  * @run main ModuleAttributes
  */
--- a/test/jdk/tools/pack200/Pack200Props.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/jdk/tools/pack200/Pack200Props.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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,6 +25,8 @@
  * @test
  * @bug 6575373 6969063
  * @summary verify default properties of the packer/unpacker and segment limit
+ * @modules jdk.compiler
+ *          jdk.zipfs
  * @compile -XDignore.symbol.file Utils.java Pack200Props.java
  * @run main Pack200Props
  * @author ksrini
--- a/test/langtools/jdk/javadoc/doclet/AccessAsciiArt/AccessAsciiArt.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/langtools/jdk/javadoc/doclet/AccessAsciiArt/AccessAsciiArt.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2016, 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
@@ -48,9 +48,9 @@
 
         checkOutput("p1/subpkg/SSC.html", true,
                 // Test the top line of the class tree
-                "<li><a href=\"../../p1/C.html\" title=\"class in p1\">p1.C</a></li>",
+                "<li><a href=\"../C.html\" title=\"class in p1\">p1.C</a></li>",
                 // Test the second line of the class tree
-                "<li><a href=\"../../p1/SC.html\" title=\"class in p1\">p1.SC</a></li>",
+                "<li><a href=\"../SC.html\" title=\"class in p1\">p1.SC</a></li>",
                 // Test the third line of the class tree
                 "<li>p1.subpkg.SSC</li>");
     }
--- a/test/langtools/jdk/javadoc/doclet/testAnchorNames/TestAnchorNames.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/langtools/jdk/javadoc/doclet/testAnchorNames/TestAnchorNames.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2017, 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
@@ -82,63 +82,63 @@
         // Test some fields
         checkOutput("pkg1/RegClass.html", true,
                 "<a name=\"Z:Z_\">",
-                "<a href=\"../pkg1/RegClass.html#Z:Z_\">",
+                "<a href=\"#Z:Z_\">",
                 "<a name=\"Z:Z_:D\">",
-                "<a href=\"../pkg1/RegClass.html#Z:Z_:D\">",
+                "<a href=\"#Z:Z_:D\">",
                 "<a name=\"Z:Z:D_\">",
-                "<a href=\"../pkg1/RegClass.html#Z:Z:D_\">",
+                "<a href=\"#Z:Z:D_\">",
                 "<a name=\"Z:Z:Dfield\">",
-                "<a href=\"../pkg1/RegClass.html#Z:Z:Dfield\">",
+                "<a href=\"#Z:Z:Dfield\">",
                 "<a name=\"fieldInCla:D:D\">",
-                "<a href=\"../pkg1/RegClass.html#fieldInCla:D:D\">",
+                "<a href=\"#fieldInCla:D:D\">",
                 "<a name=\"S_:D:D:D:D:DINT\">",
-                "<a href=\"../pkg1/RegClass.html#S_:D:D:D:D:DINT\">",
+                "<a href=\"#S_:D:D:D:D:DINT\">",
                 "<a name=\"method:D:D\">",
-                "<a href=\"../pkg1/RegClass.html#method:D:D\">");
+                "<a href=\"#method:D:D\">");
 
         checkOutput("pkg1/DeprMemClass.html", true,
                 "<a name=\"Z:Z_field_In_Class\">",
-                "<a href=\"../pkg1/DeprMemClass.html#Z:Z_field_In_Class\">");
+                "<a href=\"#Z:Z_field_In_Class\">");
 
         // Test constructor
         checkOutput("pkg1/RegClass.html", true,
                 "<a name=\"RegClass-java.lang.String-int-\">",
-                "<a href=\"../pkg1/RegClass.html#RegClass-java.lang.String-int-\">");
+                "<a href=\"#RegClass-java.lang.String-int-\">");
 
         // Test some methods
         checkOutput("pkg1/RegClass.html", true,
                 "<a name=\"Z:Z_methodInClass-java.lang.String-\">",
-                "<a href=\"../pkg1/RegClass.html#Z:Z_methodInClass-java.lang.String-\">",
+                "<a href=\"#Z:Z_methodInClass-java.lang.String-\">",
                 "<a name=\"method--\">",
-                "<a href=\"../pkg1/RegClass.html#method--\">",
+                "<a href=\"#method--\">",
                 "<a name=\"foo-java.util.Map-\">",
-                "<a href=\"../pkg1/RegClass.html#foo-java.util.Map-\">",
+                "<a href=\"#foo-java.util.Map-\">",
                 "<a name=\"methodInCla:Ds-java.lang.String:A-\">",
-                "<a href=\"../pkg1/RegClass.html#methodInCla:Ds-java.lang.String:A-\">",
+                "<a href=\"#methodInCla:Ds-java.lang.String:A-\">",
                 "<a name=\"Z:Z_methodInClas:D-java.lang.String-int-\">",
-                "<a href=\"../pkg1/RegClass.html#Z:Z_methodInClas:D-java.lang.String-int-\">",
+                "<a href=\"#Z:Z_methodInClas:D-java.lang.String-int-\">",
                 "<a name=\"methodD-pkg1.RegClass.:DA-\">",
-                "<a href=\"../pkg1/RegClass.html#methodD-pkg1.RegClass.:DA-\">",
+                "<a href=\"#methodD-pkg1.RegClass.:DA-\">",
                 "<a name=\"methodD-pkg1.RegClass.D:A-\">",
-                "<a href=\"../pkg1/RegClass.html#methodD-pkg1.RegClass.D:A-\">");
+                "<a href=\"#methodD-pkg1.RegClass.D:A-\">");
 
         checkOutput("pkg1/DeprMemClass.html", true,
                 "<a name=\"Z:Z:Dmethod_In_Class--\">",
-                "<a href=\"../pkg1/DeprMemClass.html#Z:Z:Dmethod_In_Class--\">");
+                "<a href=\"#Z:Z:Dmethod_In_Class--\">");
 
         // Test enum
         checkOutput("pkg1/RegClass.Te$t_Enum.html", true,
                 "<a name=\"Z:Z:DFLD2\">",
-                "<a href=\"../pkg1/RegClass.Te$t_Enum.html#Z:Z:DFLD2\">");
+                "<a href=\"#Z:Z:DFLD2\">");
 
         // Test nested class
         checkOutput("pkg1/RegClass._NestedClas$.html", true,
                 "<a name=\"Z:Z_NestedClas:D--\">",
-                "<a href=\"../pkg1/RegClass._NestedClas$.html#Z:Z_NestedClas:D--\">");
+                "<a href=\"#Z:Z_NestedClas:D--\">");
 
         // Test class use page
         checkOutput("pkg1/class-use/DeprMemClass.html", true,
-                "<a href=\"../../pkg1/RegClass.html#d____mc\">");
+                "<a href=\"../RegClass.html#d____mc\">");
 
         // Test deprecated list page
         checkOutput("deprecated-list.html", true,
@@ -201,63 +201,63 @@
         // Test some fields
         checkOutput("pkg1/RegClass.html", true,
                 "<a id=\"_\">",
-                "<a href=\"../pkg1/RegClass.html#_\">",
+                "<a href=\"#_\">",
                 "<a id=\"_$\">",
-                "<a href=\"../pkg1/RegClass.html#_$\">",
+                "<a href=\"#_$\">",
                 "<a id=\"$_\">",
-                "<a href=\"../pkg1/RegClass.html#$_\">",
+                "<a href=\"#$_\">",
                 "<a id=\"$field\">",
-                "<a href=\"../pkg1/RegClass.html#$field\">",
+                "<a href=\"#$field\">",
                 "<a id=\"fieldInCla$$\">",
-                "<a href=\"../pkg1/RegClass.html#fieldInCla$$\">",
+                "<a href=\"#fieldInCla$$\">",
                 "<a id=\"S_$$$$$INT\">",
-                "<a href=\"../pkg1/RegClass.html#S_$$$$$INT\">",
+                "<a href=\"#S_$$$$$INT\">",
                 "<a id=\"method$$\">",
-                "<a href=\"../pkg1/RegClass.html#method$$\">");
+                "<a href=\"#method$$\">");
 
         checkOutput("pkg1/DeprMemClass.html", true,
                 "<a id=\"_field_In_Class\">",
-                "<a href=\"../pkg1/DeprMemClass.html#_field_In_Class\">");
+                "<a href=\"#_field_In_Class\">");
 
         // Test constructor
         checkOutput("pkg1/RegClass.html", true,
                 "<a id=\"&lt;init&gt;(java.lang.String,int)\">",
-                "<a href=\"../pkg1/RegClass.html#%3Cinit%3E(java.lang.String,int)\">");
+                "<a href=\"#%3Cinit%3E(java.lang.String,int)\">");
 
         // Test some methods
         checkOutput("pkg1/RegClass.html", true,
                 "<a id=\"_methodInClass(java.lang.String)\">",
-                "<a href=\"../pkg1/RegClass.html#_methodInClass(java.lang.String)\">",
+                "<a href=\"#_methodInClass(java.lang.String)\">",
                 "<a id=\"method()\">",
-                "<a href=\"../pkg1/RegClass.html#method()\">",
+                "<a href=\"#method()\">",
                 "<a id=\"foo(java.util.Map)\">",
-                "<a href=\"../pkg1/RegClass.html#foo(java.util.Map)\">",
+                "<a href=\"#foo(java.util.Map)\">",
                 "<a id=\"methodInCla$s(java.lang.String[])\">",
-                "<a href=\"../pkg1/RegClass.html#methodInCla$s(java.lang.String%5B%5D)\">",
+                "<a href=\"#methodInCla$s(java.lang.String%5B%5D)\">",
                 "<a id=\"_methodInClas$(java.lang.String,int)\">",
-                "<a href=\"../pkg1/RegClass.html#_methodInClas$(java.lang.String,int)\">",
+                "<a href=\"#_methodInClas$(java.lang.String,int)\">",
                 "<a id=\"methodD(pkg1.RegClass.$A)\">",
-                "<a href=\"../pkg1/RegClass.html#methodD(pkg1.RegClass.$A)\">",
+                "<a href=\"#methodD(pkg1.RegClass.$A)\">",
                 "<a id=\"methodD(pkg1.RegClass.D[])\">",
-                "<a href=\"../pkg1/RegClass.html#methodD(pkg1.RegClass.D%5B%5D)\">");
+                "<a href=\"#methodD(pkg1.RegClass.D%5B%5D)\">");
 
         checkOutput("pkg1/DeprMemClass.html", true,
                 "<a id=\"$method_In_Class()\">",
-                "<a href=\"../pkg1/DeprMemClass.html#$method_In_Class()\">");
+                "<a href=\"#$method_In_Class()\">");
 
         // Test enum
         checkOutput("pkg1/RegClass.Te$t_Enum.html", true,
                 "<a id=\"$FLD2\">",
-                "<a href=\"../pkg1/RegClass.Te$t_Enum.html#$FLD2\">");
+                "<a href=\"#$FLD2\">");
 
         // Test nested class
         checkOutput("pkg1/RegClass._NestedClas$.html", true,
                 "<a id=\"&lt;init&gt;()\">",
-                "<a href=\"../pkg1/RegClass._NestedClas$.html#%3Cinit%3E()\">");
+                "<a href=\"#%3Cinit%3E()\">");
 
         // Test class use page
         checkOutput("pkg1/class-use/DeprMemClass.html", true,
-                "<a href=\"../../pkg1/RegClass.html#d____mc\">");
+                "<a href=\"../RegClass.html#d____mc\">");
 
         // Test deprecated list page
         checkOutput("deprecated-list.html", true,
@@ -320,10 +320,10 @@
                 "<a id=\"\u0391\u0392\u0393()\">");
 
         checkOutput("p/Ref.html", true,
-                "<a href=\"../p/Def.html#%C3%A0%C3%A9\"><code>&agrave;&eacute;</code></a>",
-                "<a href=\"../p/Def.html#%C3%80%C3%89()\"><code>&Agrave;&Eacute;</code></a>",
-                "<a href=\"../p/Def.html#%CE%B1%CE%B2%CE%B3\"><code>&alpha;&beta;&gamma;</code></a>",
-                "<a href=\"../p/Def.html#%CE%91%CE%92%CE%93()\"><code>&Alpha;&Beta;&Gamma;</code></a>");
+                "<a href=\"Def.html#%C3%A0%C3%A9\"><code>&agrave;&eacute;</code></a>",
+                "<a href=\"Def.html#%C3%80%C3%89()\"><code>&Agrave;&Eacute;</code></a>",
+                "<a href=\"Def.html#%CE%B1%CE%B2%CE%B3\"><code>&alpha;&beta;&gamma;</code></a>",
+                "<a href=\"Def.html#%CE%91%CE%92%CE%93()\"><code>&Alpha;&Beta;&Gamma;</code></a>");
 
     }
 }
--- a/test/langtools/jdk/javadoc/doclet/testAnnotationTypes/TestAnnotationTypes.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/langtools/jdk/javadoc/doclet/testAnnotationTypes/TestAnnotationTypes.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2004, 2016, 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
@@ -56,8 +56,7 @@
                 + "field.detail\">Field</a>&nbsp;|&nbsp;</li>",
                 "<!-- =========== ANNOTATION TYPE FIELD SUMMARY =========== -->",
                 "<h3>Field Summary</h3>",
-                "<th class=\"colSecond\" scope=\"row\"><code><span class=\"memberNameLink\"><a href=\"../"
-                + "pkg/AnnotationTypeField.html#DEFAULT_NAME\">DEFAULT_NAME</a></span>"
+                "<th class=\"colSecond\" scope=\"row\"><code><span class=\"memberNameLink\"><a href=\"#DEFAULT_NAME\">DEFAULT_NAME</a></span>"
                 + "</code></th>",
                 "<!-- ============ ANNOTATION TYPE FIELD DETAIL =========== -->",
                 "<h4>DEFAULT_NAME</h4>\n"
--- a/test/langtools/jdk/javadoc/doclet/testClassLinks/TestClassLinks.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/langtools/jdk/javadoc/doclet/testClassLinks/TestClassLinks.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -50,38 +50,38 @@
         checkExit(Exit.OK);
 
         checkOutput("p/C1.html", true,
-                "<code><a href=\"../p/C2.html\" title=\"class in p\">C2</a></code>",
-                "<code><span class=\"memberNameLink\"><a href=\"../p/C1.html#C1--\">C1</a></span>()</code>");
+                "<code><a href=\"C2.html\" title=\"class in p\">C2</a></code>",
+                "<code><span class=\"memberNameLink\"><a href=\"#C1--\">C1</a></span>()</code>");
 
         checkOutput("p/C2.html", true,
-                "<code><a href=\"../p/C3.html\" title=\"class in p\">C3</a></code>",
-                "<code><span class=\"memberNameLink\"><a href=\"../p/C2.html#C2--\">C2</a></span>()</code>");
+                "<code><a href=\"C3.html\" title=\"class in p\">C3</a></code>",
+                "<code><span class=\"memberNameLink\"><a href=\"#C2--\">C2</a></span>()</code>");
 
         checkOutput("p/C3.html", true,
-                "<code><a href=\"../p/I1.html\" title=\"interface in p\">I1</a></code>, "
-                + "<code><a href=\"../p/I12.html\" title=\"interface in p\">I12</a></code>, "
-                + "<code><a href=\"../p/I2.html\" title=\"interface in p\">I2</a></code>, "
-                + "<code><a href=\"../p/IT1.html\" title=\"interface in p\">IT1</a>&lt;T&gt;</code>, "
-                + "<code><a href=\"../p/IT2.html\" title=\"interface in p\">IT2</a>&lt;java.lang.String&gt;</code>",
-                "<code><span class=\"memberNameLink\"><a href=\"../p/C3.html#C3--\">C3</a></span>()</code>");
+                "<code><a href=\"I1.html\" title=\"interface in p\">I1</a></code>, "
+                + "<code><a href=\"I12.html\" title=\"interface in p\">I12</a></code>, "
+                + "<code><a href=\"I2.html\" title=\"interface in p\">I2</a></code>, "
+                + "<code><a href=\"IT1.html\" title=\"interface in p\">IT1</a>&lt;T&gt;</code>, "
+                + "<code><a href=\"IT2.html\" title=\"interface in p\">IT2</a>&lt;java.lang.String&gt;</code>",
+                "<code><span class=\"memberNameLink\"><a href=\"#C3--\">C3</a></span>()</code>");
 
         checkOutput("p/I1.html", true,
-                "<code><a href=\"../p/C3.html\" title=\"class in p\">C3</a></code>",
-                "<code><a href=\"../p/I12.html\" title=\"interface in p\">I12</a></code>");
+                "<code><a href=\"C3.html\" title=\"class in p\">C3</a></code>",
+                "<code><a href=\"I12.html\" title=\"interface in p\">I12</a></code>");
 
         checkOutput("p/I2.html", true,
-                "<code><a href=\"../p/C3.html\" title=\"class in p\">C3</a></code>",
-                "<code><a href=\"../p/I12.html\" title=\"interface in p\">I12</a></code>");
+                "<code><a href=\"C3.html\" title=\"class in p\">C3</a></code>",
+                "<code><a href=\"I12.html\" title=\"interface in p\">I12</a></code>");
 
         checkOutput("p/I12.html", true,
-                "<code><a href=\"../p/C3.html\" title=\"class in p\">C3</a></code>",
-                "<code><a href=\"../p/I1.html\" title=\"interface in p\">I1</a></code>, <code><a href=\"../p/I2.html\" title=\"interface in p\">I2</a></code>");
+                "<code><a href=\"C3.html\" title=\"class in p\">C3</a></code>",
+                "<code><a href=\"I1.html\" title=\"interface in p\">I1</a></code>, <code><a href=\"I2.html\" title=\"interface in p\">I2</a></code>");
 
         checkOutput("p/IT1.html", true,
-                "<code><a href=\"../p/C3.html\" title=\"class in p\">C3</a></code>");
+                "<code><a href=\"C3.html\" title=\"class in p\">C3</a></code>");
 
         checkOutput("p/IT2.html", true,
-                "code><a href=\"../p/C3.html\" title=\"class in p\">C3</a></code>");
+                "code><a href=\"C3.html\" title=\"class in p\">C3</a></code>");
 
     }
 
--- a/test/langtools/jdk/javadoc/doclet/testClassTree/TestClassTree.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/langtools/jdk/javadoc/doclet/testClassTree/TestClassTree.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2004, 2016, 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
@@ -51,11 +51,11 @@
 
         checkOutput("pkg/package-tree.html", true,
                 "<ul>\n"
-                + "<li class=\"circle\">pkg.<a href=\"../pkg/ParentClass.html\" "
+                + "<li class=\"circle\">pkg.<a href=\"ParentClass.html\" "
                 + "title=\"class in pkg\"><span class=\"typeNameLink\">ParentClass</span></a>",
                 "<h2 title=\"Annotation Type Hierarchy\">Annotation Type Hierarchy</h2>\n"
                 + "<ul>\n"
-                + "<li class=\"circle\">pkg.<a href=\"../pkg/AnnotationType.html\" "
+                + "<li class=\"circle\">pkg.<a href=\"AnnotationType.html\" "
                 + "title=\"annotation in pkg\"><span class=\"typeNameLink\">AnnotationType</span></a> "
                 + "(implements java.lang.annotation.Annotation)</li>\n"
                 + "</ul>",
@@ -66,7 +66,7 @@
                 + "<li class=\"circle\">java.lang.Enum&lt;E&gt; (implements java.lang."
                 + "Comparable&lt;T&gt;, java.io.Serializable)\n"
                 + "<ul>\n"
-                + "<li class=\"circle\">pkg.<a href=\"../pkg/Coin.html\" "
+                + "<li class=\"circle\">pkg.<a href=\"Coin.html\" "
                 + "title=\"enum in pkg\"><span class=\"typeNameLink\">Coin</span></a></li>\n"
                 + "</ul>\n"
                 + "</li>\n"
@@ -75,7 +75,7 @@
                 + "</ul>");
 
         checkOutput("pkg/package-tree.html", false,
-                "<li class=\"circle\">class pkg.<a href=\"../pkg/ParentClass.html\" "
+                "<li class=\"circle\">class pkg.<a href=\".ParentClass.html\" "
                 + "title=\"class in pkg\"><span class=\"typeNameLink\">ParentClass</span></a></li>");
     }
 }
--- a/test/langtools/jdk/javadoc/doclet/testConstructors/TestConstructors.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/langtools/jdk/javadoc/doclet/testConstructors/TestConstructors.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2017, 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
@@ -48,31 +48,31 @@
 
         checkOutput("pkg1/Outer.html", true,
                 "<dt><span class=\"seeLabel\">See Also:</span></dt>\n"
-                + "<dd><a href=\"../pkg1/Outer.Inner.html#Inner--\"><code>Inner()</code></a>, \n"
-                + "<a href=\"../pkg1/Outer.Inner.html#Inner-int-\"><code>Inner(int)</code></a>, \n"
-                + "<a href=\"../pkg1/Outer.Inner.NestedInner.html#NestedInner--\"><code>NestedInner()</code></a>, \n"
-                + "<a href=\"../pkg1/Outer.Inner.NestedInner.html#NestedInner-int-\"><code>NestedInner(int)</code></a>, \n"
-                + "<a href=\"../pkg1/Outer.html#Outer--\"><code>Outer()</code></a>, \n"
-                + "<a href=\"../pkg1/Outer.html#Outer-int-\"><code>Outer(int)</code></a>",
-                "Link: <a href=\"../pkg1/Outer.Inner.html#Inner--\"><code>Inner()</code></a>, "
-                + "<a href=\"../pkg1/Outer.html#Outer-int-\"><code>Outer(int)</code></a>, "
-                + "<a href=\"../pkg1/Outer.Inner.NestedInner.html#NestedInner-int-\"><code>"
+                + "<dd><a href=\"Outer.Inner.html#Inner--\"><code>Inner()</code></a>, \n"
+                + "<a href=\"Outer.Inner.html#Inner-int-\"><code>Inner(int)</code></a>, \n"
+                + "<a href=\"Outer.Inner.NestedInner.html#NestedInner--\"><code>NestedInner()</code></a>, \n"
+                + "<a href=\"Outer.Inner.NestedInner.html#NestedInner-int-\"><code>NestedInner(int)</code></a>, \n"
+                + "<a href=\"#Outer--\"><code>Outer()</code></a>, \n"
+                + "<a href=\"#Outer-int-\"><code>Outer(int)</code></a>",
+                "Link: <a href=\"Outer.Inner.html#Inner--\"><code>Inner()</code></a>, "
+                + "<a href=\"#Outer-int-\"><code>Outer(int)</code></a>, "
+                + "<a href=\"Outer.Inner.NestedInner.html#NestedInner-int-\"><code>"
                 + "NestedInner(int)</code></a>",
-                "<a href=\"../pkg1/Outer.html#Outer--\">Outer</a></span>()",
+                "<a href=\"#Outer--\">Outer</a></span>()",
                 "<a name=\"Outer--\">",
-                "<a href=\"../pkg1/Outer.html#Outer-int-\">Outer</a></span>&#8203;(int&nbsp;i)",
+                "<a href=\"#Outer-int-\">Outer</a></span>&#8203;(int&nbsp;i)",
                 "<a name=\"Outer-int-\">");
 
         checkOutput("pkg1/Outer.Inner.html", true,
-                "<a href=\"../pkg1/Outer.Inner.html#Inner--\">Inner</a></span>()",
+                "<a href=\"#Inner--\">Inner</a></span>()",
                 "<a name=\"Inner--\">",
-                "<a href=\"../pkg1/Outer.Inner.html#Inner-int-\">Inner</a></span>&#8203;(int&nbsp;i)",
+                "<a href=\"#Inner-int-\">Inner</a></span>&#8203;(int&nbsp;i)",
                 "<a name=\"Inner-int-\">");
 
         checkOutput("pkg1/Outer.Inner.NestedInner.html", true,
-                "<a href=\"../pkg1/Outer.Inner.NestedInner.html#NestedInner--\">NestedInner</a></span>()",
+                "<a href=\"#NestedInner--\">NestedInner</a></span>()",
                 "<a name=\"NestedInner--\">",
-                "<a href=\"../pkg1/Outer.Inner.NestedInner.html#NestedInner-int-\">NestedInner</a></span>&#8203;(int&nbsp;i)",
+                "<a href=\"#NestedInner-int-\">NestedInner</a></span>&#8203;(int&nbsp;i)",
                 "<a name=\"NestedInner-int-\">");
 
         checkOutput("pkg1/Outer.Inner.html", false,
@@ -84,9 +84,9 @@
                 "Outer.Inner.NestedInner-int-");
 
         checkOutput("pkg1/Outer.html", false,
-                "<a href=\"../pkg1/Outer.Inner.html#Outer.Inner--\"><code>Outer.Inner()</code></a>",
-                "<a href=\"../pkg1/Outer.Inner.html#Outer.Inner-int-\"><code>Outer.Inner(int)</code></a>",
-                "<a href=\"../pkg1/Outer.Inner.NestedInner.html#Outer.Inner.NestedInner--\"><code>Outer.Inner.NestedInner()</code></a>",
-                "<a href=\"../pkg1/Outer.Inner.NestedInner.html#Outer.Inner.NestedInner-int-\"><code>Outer.Inner.NestedInner(int)</code></a>");
+                "<a href=\"Outer.Inner.html#Outer.Inner--\"><code>Outer.Inner()</code></a>",
+                "<a href=\"Outer.Inner.html#Outer.Inner-int-\"><code>Outer.Inner(int)</code></a>",
+                "<a href=\"Outer.Inner.NestedInner.html#Outer.Inner.NestedInner--\"><code>Outer.Inner.NestedInner()</code></a>",
+                "<a href=\"Outer.Inner.NestedInner.html#Outer.Inner.NestedInner-int-\"><code>Outer.Inner.NestedInner(int)</code></a>");
     }
 }
--- a/test/langtools/jdk/javadoc/doclet/testCopyFiles/TestCopyFiles.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/langtools/jdk/javadoc/doclet/testCopyFiles/TestCopyFiles.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug  8157349 8185985
+ * @bug  8157349 8185985 8194953
  * @summary  test copy of doc-files, and its contents for HTML meta content.
  * @library  ../lib
  * @modules jdk.javadoc/jdk.javadoc.internal.tool
@@ -54,18 +54,18 @@
                 "phi-TOP-phi",
                 // check top navbar
                 "<a href=\"../../acme.mdle-summary.html\">Module</a>",
-                "<a href=\"../../p/package-summary.html\">Package</a>",
+                "<a href=\"../package-summary.html\">Package</a>",
                 "<a href=\"../../overview-tree.html\">Tree</a>",
                 "<a href=\"../../deprecated-list.html\">Deprecated</a>",
                 "<a href=\"../../index-all.html\">Index</a>",
                 "phi-HEADER-phi",
                 "In a named module acme.module and named package "
-                        + "<a href=\"../../p/package-summary.html\"><code>p</code></a>.",
+                        + "<a href=\"../package-summary.html\"><code>p</code></a>.",
                 "\"simpleTagLabel\">Since:</",
                 "1940",
                 // check bottom navbar
                 "<a href=\"../../acme.mdle-summary.html\">Module</a>",
-                "<a href=\"../../p/package-summary.html\">Package</a>",
+                "<a href=\"../package-summary.html\">Package</a>",
                 "<a href=\"../../overview-tree.html\">Tree</a>",
                 "<a href=\"../../deprecated-list.html\">Deprecated</a>",
                 "<a href=\"../../index-all.html\">Index</a>",
@@ -91,18 +91,18 @@
                 "phi-TOP-phi",
                 // check top navbar
                 "<a href=\"../../acme.mdle-summary.html\">Module</a>",
-                "<a href=\"../../p/package-summary.html\">Package</a>",
+                "<a href=\"../package-summary.html\">Package</a>",
                 "<a href=\"../../overview-tree.html\">Tree</a>",
                 "<a href=\"../../deprecated-list.html\">Deprecated</a>",
                 "<a href=\"../../index-all.html\">Index</a>",
                 "phi-HEADER-phi",
                 "In a named module acme.module and named package "
-                        + "<a href=\"../../p/package-summary.html\"><code>p</code></a>.",
+                        + "<a href=\"../package-summary.html\"><code>p</code></a>.",
                 "\"simpleTagLabel\">Since:</",
                 "1940",
                 // check bottom navbar
                 "<a href=\"../../acme.mdle-summary.html\">Module</a>",
-                "<a href=\"../../p/package-summary.html\">Package</a>",
+                "<a href=\"../package-summary.html\">Package</a>",
                 "<a href=\"../../overview-tree.html\">Tree</a>",
                 "<a href=\"../../deprecated-list.html\">Deprecated</a>",
                 "<a href=\"../../index-all.html\">Index</a>",
@@ -116,7 +116,7 @@
                 "phi-TOP-phi",
                 // check top navbar
                 "<a href=\"../../../../acme2.mdle-summary.html\">Module</a>",
-                "<a href=\"../../../../p2/package-summary.html\">Package</a>",
+                "<a href=\"../../../package-summary.html\">Package</a>",
                 "<a href=\"../../../../overview-tree.html\">Tree</a>",
                 "<a href=\"../../../../deprecated-list.html\">Deprecated</a>",
                 "<a href=\"../../../../index-all.html\">Index</a>",
@@ -124,7 +124,7 @@
                 "SubSubReadme.html at third level of doc-file directory.",
                 // check bottom navbar
                 "<a href=\"../../../../acme2.mdle-summary.html\">Module</a>",
-                "<a href=\"../../../../p2/package-summary.html\">Package</a>",
+                "<a href=\"../../../package-summary.html\">Package</a>",
                 "<a href=\"../../../../overview-tree.html\">Tree</a>",
                 "<a href=\"../../../../deprecated-list.html\">Deprecated</a>",
                 "<a href=\"../../../../index-all.html\">Index</a>",
@@ -141,7 +141,7 @@
         checkExit(Exit.OK);
         checkOutput("p/doc-files/inpackage.html", true,
                 "In a named module acme.module and named package "
-                + "<a href=\"../../p/package-summary.html\"><code>p</code></a>."
+                + "<a href=\"../package-summary.html\"><code>p</code></a>."
         );
     }
 
@@ -155,7 +155,7 @@
         checkExit(Exit.OK);
         checkOutput("p/doc-files/inpackage.html", true,
                 "In a named module acme.module and named package "
-                + "<a href=\"../../p/package-summary.html\"><code>p</code></a>."
+                + "<a href=\"../package-summary.html\"><code>p</code></a>."
         );
     }
 
@@ -258,4 +258,16 @@
                 "A named package in an unnamed module"
         );
     }
+
+    @Test
+    void testCopyThrough() {
+        javadoc("-d", "copy",
+                "-sourcepath", testSrc("packages"),
+                "p2");
+        checkExit(Exit.OK);
+        checkOutput("p2/doc-files/case1.html", true, "<!-- Generated by javadoc");
+        checkOutput("p2/doc-files/case2.html", false, "<!-- Generated by javadoc");
+        checkOutput("p2/doc-files/case3.html", false, "<!-- Generated by javadoc");
+        checkOutput("p2/doc-files/case4.html", false, "<!-- Generated by javadoc");
+    }
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/langtools/jdk/javadoc/doclet/testCopyFiles/packages/p2/Foo.java	Tue Jan 30 16:41:40 2018 +0100
@@ -0,0 +1,34 @@
+/*
+ * 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.
+ */
+
+ /**
+  * A test class.
+  */
+package p2;
+
+/**
+ * A test class.
+ */
+public class Foo {}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/langtools/jdk/javadoc/doclet/testCopyFiles/packages/p2/doc-files/case1.html	Tue Jan 30 16:41:40 2018 +0100
@@ -0,0 +1,39 @@
+<!doctype html>
+
+<!--
+/*
+ * 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.
+ */
+-->
+
+<html lang="en">
+  <head>
+    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
+    <title>Case 1</title>
+  </head>
+  <body>
+     This should be translated with a navbar, and should have
+     the "Generated by javadoc blah" signature.
+  </body>
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/langtools/jdk/javadoc/doclet/testCopyFiles/packages/p2/doc-files/case2.html	Tue Jan 30 16:41:40 2018 +0100
@@ -0,0 +1,44 @@
+<!doctype html>
+
+<!--
+/*
+ * 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.
+ */
+-->
+
+<html lang="en">
+  <head>
+    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
+    <title>Case 2</title>
+    <style type="text/css">
+      body {
+        font-family: Helvetica, Arial, sans-serif;
+        font-size: 14px;
+      }
+    </style>
+  </head>
+  <body>
+  This should be copied directly, with no modifications.
+  </body>
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/langtools/jdk/javadoc/doclet/testCopyFiles/packages/p2/doc-files/case3.html	Tue Jan 30 16:41:40 2018 +0100
@@ -0,0 +1,42 @@
+<!doctype html>
+
+<!--
+/*
+ * 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.
+ */
+-->
+
+<html lang="en">
+  <head>
+    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
+    <title>Case 3</title>
+      <style>
+        h1 {color:red;}
+        p {color:blue;}
+      </style>
+  </head>
+  <body>
+  This should be copied directly, with no modifications.
+  </body>
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/langtools/jdk/javadoc/doclet/testCopyFiles/packages/p2/doc-files/case4.html	Tue Jan 30 16:41:40 2018 +0100
@@ -0,0 +1,39 @@
+<!doctype html>
+
+<!--
+/*
+ * 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.
+ */
+-->
+
+<html lang="en">
+  <head>
+    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
+    <title>Case 3</title>
+    <link rel="stylesheet" type="text/css" href="theme.css"> 
+  </head>
+  <body>
+  This should be copied directly, with no modifications.
+  </body>
+</html>
--- a/test/langtools/jdk/javadoc/doclet/testDeprecatedDocs/TestDeprecatedDocs.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/langtools/jdk/javadoc/doclet/testDeprecatedDocs/TestDeprecatedDocs.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -158,12 +158,12 @@
                 "<hr>\n"
                 + "<pre>@Deprecated(forRemoval=true)\n"
                 + "public enum <span class=\"typeNameLabel\">TestEnum</span>\n"
-                + "extends java.lang.Enum&lt;<a href=\"../pkg/TestEnum.html\" title=\"enum in pkg\">TestEnum</a>&gt;</pre>\n"
+                + "extends java.lang.Enum&lt;<a href=\"TestEnum.html\" title=\"enum in pkg\">TestEnum</a>&gt;</pre>\n"
                 + "<div class=\"deprecationBlock\"><span class=\"deprecatedLabel\">Deprecated, for removal: This API element is subject to removal in a future version.</span>\n"
                 + "<div class=\"deprecationComment\">enum_test1 passes.</div>\n"
                 + "</div>",
                 "<pre>@Deprecated(forRemoval=true)\n"
-                + "public static final&nbsp;<a href=\"../pkg/TestEnum.html\" title=\"enum in pkg\">TestEnum</a> FOR_REMOVAL</pre>\n"
+                + "public static final&nbsp;<a href=\"TestEnum.html\" title=\"enum in pkg\">TestEnum</a> FOR_REMOVAL</pre>\n"
                 + "<div class=\"deprecationBlock\"><span class=\"deprecatedLabel\">Deprecated, for removal: This API element is subject to removal in a future version.</span>\n"
                 + "<div class=\"deprecationComment\">enum_test3 passes.</div>\n"
                 + "</div>");
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/langtools/jdk/javadoc/doclet/testDocPaths/TestDocPaths.java	Tue Jan 30 16:41:40 2018 +0100
@@ -0,0 +1,99 @@
+/*
+ * 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 8195796
+ * @summary Add normalize and relative methods to DocPath
+ * @library /tools/lib
+ * @modules jdk.javadoc/jdk.javadoc.internal.doclets.toolkit.util
+ * @build toolbox.TestRunner
+ * @run main TestDocPaths
+ */
+
+import jdk.javadoc.internal.doclets.toolkit.util.DocPath;
+import toolbox.TestRunner;
+
+public class TestDocPaths extends TestRunner {
+
+    public static void main(String... args) throws Exception {
+        TestDocPaths tester = new TestDocPaths();
+        tester.runTests();
+    }
+
+    TestDocPaths() {
+        super(System.err);
+    }
+
+    @Test
+    public void testNormalize() {
+        testNormalize("", "");
+        testNormalize(".", "");
+        testNormalize("a/b", "a/b");
+        testNormalize("a//b", "a/b");
+        testNormalize("./b", "b");
+        testNormalize("a/.", "a");
+        testNormalize("a/./b", "a/b");
+        testNormalize("../b", "../b");
+        testNormalize("a/..", "");
+        testNormalize("a/../b", "b");
+        testNormalize("a/../../b", "../b");
+        testNormalize("a/./../b", "b");
+        testNormalize("./../b", "../b");
+        testNormalize("a/./../b", "b");
+    }
+
+    private void testNormalize(String p, String expect) {
+        out.println("test " + p);
+        String found = DocPath.create(p).normalize().getPath();
+        out.println("  result: " + found);
+        if (!expect.equals(found)) {
+            error("Mismatch:\n"
+                + "  expect: " + expect);
+        }
+        out.println();
+    }
+
+    @Test
+    public void testRelativize() {
+        testRelativize("a/b/c/file.html", "file.html", "");
+        testRelativize("a/b/c/file.html", "file2.html", "file2.html");
+        testRelativize("a/b/c/file.html", "../../../a/b/file.html", "../file.html");
+        testRelativize("a/b/c/file.html", "../../../a/b/c/file.html", "");
+        testRelativize("a/b/c/file.html", "../../../a/b/c2/file.html", "../c2/file.html");
+        testRelativize("a/b/c/file.html", "../../../a/b/c/d/file.html", "d/file.html");
+    }
+
+    private void testRelativize(String file, String href, String expect) {
+        out.println("test " + file + " " + href);
+        String found = DocPath.create(file)
+                .relativize(DocPath.create(href))
+                .getPath();
+        out.println("  result: " + found);
+        if (!expect.equals(found)) {
+            error("Mismatch:\n"
+                + "  expect: " + expect);
+        }
+        out.println();
+    }
+}
--- a/test/langtools/jdk/javadoc/doclet/testHelpOption/TestHelpOption.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/langtools/jdk/javadoc/doclet/testHelpOption/TestHelpOption.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -24,7 +24,7 @@
 /*
  * @test
  * @bug      4934778 4777599 6553182 8146427 8146475 8175055 8185371
- * @summary  Make sure that -help, -helpfile and -nohelp options work correctly.
+ * @summary  Make sure that --help, -helpfile and -nohelp options work correctly.
  * @author   jamieh
  * @library ../lib
  * @modules jdk.javadoc/jdk.javadoc.internal.tool
@@ -66,7 +66,7 @@
     void testWithOption() {
         javadoc("-d", "out1",
                 "-sourcepath", testSrc,
-                "-help",
+                "--help",
                 testSrc("Sample.java"));
         checkExit(Exit.OK);
 
--- a/test/langtools/jdk/javadoc/doclet/testHiddenTag/TestHiddenTag.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/langtools/jdk/javadoc/doclet/testHiddenTag/TestHiddenTag.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -54,8 +54,8 @@
                 "<a name=\"visibleField\">",
                 "<a name=\"visibleMethod--\">",
                 "<dt>Direct Known Subclasses:</dt>\n" +
-                "<dd><code><a href=\"../pkg1/A.VisibleInner.html\" title=\"class in pkg1\">" +
-                "A.VisibleInner</a></code>, <code><a href=\"../pkg1/A.VisibleInnerExtendsInvisibleInner.html\" " +
+                "<dd><code><a href=\"A.VisibleInner.html\" title=\"class in pkg1\">" +
+                "A.VisibleInner</a></code>, <code><a href=\"A.VisibleInnerExtendsInvisibleInner.html\" " +
                 "title=\"class in pkg1\">A.VisibleInnerExtendsInvisibleInner</a></code></dd>");
 
         checkOutput("pkg1/A.html", false,
@@ -63,12 +63,12 @@
                 "<a name=\"inVisibleMethod--\">");
 
         checkOutput("pkg1/A.VisibleInner.html", true,
-                "<code><a href=\"../pkg1/A.html#visibleField\">visibleField</a></code>",
-                "<code><a href=\"../pkg1/A.html#visibleMethod--\">visibleMethod</a></code>",
+                "<code><a href=\"A.html#visibleField\">visibleField</a></code>",
+                "<code><a href=\"A.html#visibleMethod--\">visibleMethod</a></code>",
                 "<h3>Nested classes/interfaces inherited from class&nbsp;pkg1." +
-                "<a href=\"../pkg1/A.html\" title=\"class in pkg1\">A</a></h3>\n" +
-                "<code><a href=\"../pkg1/A.VisibleInner.html\" title=\"class in pkg1\">" +
-                "A.VisibleInner</a>, <a href=\"../pkg1/A.VisibleInnerExtendsInvisibleInner.html\" " +
+                "<a href=\"A.html\" title=\"class in pkg1\">A</a></h3>\n" +
+                "<code><a href=\"A.VisibleInner.html\" title=\"class in pkg1\">" +
+                "A.VisibleInner</a>, <a href=\"A.VisibleInnerExtendsInvisibleInner.html\" " +
                 "title=\"class in pkg1\">A.VisibleInnerExtendsInvisibleInner</a></code></li>\n" +
                 "</ul>");
 
@@ -80,9 +80,9 @@
         checkOutput("pkg1/A.VisibleInnerExtendsInvisibleInner.html", true,
                 "<pre>public static class <span class=\"typeNameLabel\">" +
                 "A.VisibleInnerExtendsInvisibleInner</span>\n" +
-                "extends <a href=\"../pkg1/A.html\" title=\"class in pkg1\">A</a></pre>",
-                "<code><a href=\"../pkg1/A.html#visibleField\">visibleField</a></code></li>",
-                "<code><a href=\"../pkg1/A.html#visibleMethod--\">visibleMethod</a></code>");
+                "extends <a href=\"A.html\" title=\"class in pkg1\">A</a></pre>",
+                "<code><a href=\"A.html#visibleField\">visibleField</a></code></li>",
+                "<code><a href=\"A.html#visibleMethod--\">visibleMethod</a></code>");
 
         checkOutput("pkg1/A.VisibleInnerExtendsInvisibleInner.html", false,
                 "invisibleField",
--- a/test/langtools/jdk/javadoc/doclet/testHref/TestHref.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/langtools/jdk/javadoc/doclet/testHref/TestHref.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2016, 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
@@ -52,7 +52,7 @@
                 //External link.
                 "href=\"http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html?is-external=true#wait-long-int-\"",
                 //Member summary table link.
-                "href=\"../pkg/C1.html#method-int-int-java.util.ArrayList-\"",
+                "href=\"#method-int-int-java.util.ArrayList-\"",
                 //Anchor test.
                 "<a name=\"method-int-int-java.util.ArrayList-\">\n"
                 + "<!--   -->\n"
@@ -64,10 +64,10 @@
 
         checkOutput("pkg/C2.html", true,
                 //{@link} test.
-                "Link: <a href=\"../pkg/C1.html#method-int-int-java.util.ArrayList-\">",
+                "Link: <a href=\"C1.html#method-int-int-java.util.ArrayList-\">",
                 //@see test.
                 "See Also:</span></dt>\n"
-                + "<dd><a href=\"../pkg/C1.html#method-int-int-java.util.ArrayList-\">"
+                + "<dd><a href=\"C1.html#method-int-int-java.util.ArrayList-\">"
         );
 
         checkOutput("pkg/C4.html", true,
--- a/test/langtools/jdk/javadoc/doclet/testHtmlDefinitionListTag/TestHtmlDefinitionListTag.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/langtools/jdk/javadoc/doclet/testHtmlDefinitionListTag/TestHtmlDefinitionListTag.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009, 2017, 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
@@ -157,7 +157,7 @@
                 + "<dt><span class=\"simpleTagLabel\">Since:</span></dt>\n"
                 + "<dd>JDK1.0</dd>\n"
                 + "<dt><span class=\"seeLabel\">See Also:</span></dt>\n"
-                + "<dd><a href=\"../pkg1/C2.html\" title=\"class in pkg1\"><code>"
+                + "<dd><a href=\"C2.html\" title=\"class in pkg1\"><code>"
                 + "C2</code></a>, \n"
                 + "<a href=\"../serialized-form.html#pkg1.C1\">"
                 + "Serialized Form</a></dd>\n"
@@ -166,7 +166,7 @@
                 + "<dt><span class=\"simpleTagLabel\">Since:</span></dt>\n"
                 + "<dd>1.4</dd>\n"
                 + "<dt><span class=\"seeLabel\">See Also:</span></dt>\n"
-                + "<dd><a href=\"../pkg1/C1.html#setUndecorated-boolean-\">"
+                + "<dd><a href=\"#setUndecorated-boolean-\">"
                 + "<code>setUndecorated(boolean)</code></a></dd>\n"
                 + "</dl>",
                 "<dl>\n"
@@ -193,7 +193,7 @@
                 + "<dd>1.4</dd>\n"
                 + "<dt><span class=\"seeLabel\">See Also:</span></dt>\n"
                 + "<dd>"
-                + "<a href=\"../pkg1/C1.html#readObject--\"><code>readObject()"
+                + "<a href=\"#readObject--\"><code>readObject()"
                 + "</code></a></dd>\n"
                 + "</dl>",
                 "<dl>\n"
@@ -201,7 +201,7 @@
                 + "<dd><code>java.io.IOException</code></dd>\n"
                 + "<dt><span class=\"seeLabel\">See Also:"
                 + "</span></dt>\n"
-                + "<dd><a href=\"../pkg1/C1.html#setUndecorated-boolean-\">"
+                + "<dd><a href=\"#setUndecorated-boolean-\">"
                 + "<code>setUndecorated(boolean)</code></a></dd>\n"
                 + "</dl>");
 
@@ -277,7 +277,7 @@
                 "<dd>JDK1.0</dd>\n" +
                 "<dt><span class=\"seeLabel\">See Also:" +
                 "</span></dt>\n" +
-                "<dd><a href=\"../pkg1/C2.html\" title=\"class in pkg1\">" +
+                "<dd><a href=\"C2.html\" title=\"class in pkg1\">" +
                 "<code>C2</code></a>, \n" +
                 "<a href=\"../serialized-form.html#pkg1.C1\">" +
                 "Serialized Form</a></dd>\n" +
@@ -310,7 +310,7 @@
                 + "<dt><span class=\"simpleTagLabel\">Since:</span></dt>\n"
                 + "<dd>1.4</dd>\n"
                 + "<dt><span class=\"seeLabel\">See Also:</span></dt>\n"
-                + "<dd><a href=\"../pkg1/C1.html#readObject--\">"
+                + "<dd><a href=\"#readObject--\">"
                 + "<code>readObject()</code></a></dd>\n"
                 + "</dl>",
                 "<dl>\n"
@@ -319,7 +319,7 @@
                 + "<dd><code>java.io.IOException</code></dd>\n"
                 + "<dt>"
                 + "<span class=\"seeLabel\">See Also:</span></dt>\n"
-                + "<dd><a href=\"../pkg1/C1.html#setUndecorated-boolean-\">"
+                + "<dd><a href=\"#setUndecorated-boolean-\">"
                 + "<code>setUndecorated(boolean)</code></a></dd>\n"
                 + "</dl>");
 
@@ -381,7 +381,7 @@
 
         checkOutput("pkg1/C1.ModalExclusionType.html", expectFound,
                 "<pre>public " +
-                "static final&nbsp;<a href=\"../pkg1/C1.ModalExclusionType.html\" " +
+                "static final&nbsp;<a href=\"C1.ModalExclusionType.html\" " +
                 "title=\"enum in pkg1\">C1.ModalExclusionType</a> " +
                 "APPLICATION_EXCLUDE</pre>\n" +
                 "</li>");
--- a/test/langtools/jdk/javadoc/doclet/testHtmlTableTags/TestHtmlTableTags.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/langtools/jdk/javadoc/doclet/testHtmlTableTags/TestHtmlTableTags.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009, 2017, 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
@@ -192,48 +192,48 @@
 
         // Class use documentation
         checkOutput("pkg1/class-use/I1.html", true,
-                "<caption><span>Packages that use <a href=\"../../pkg1/I1.html\" "
+                "<caption><span>Packages that use <a href=\"../I1.html\" "
                 + "title=\"interface in pkg1\">I1</a></span><span class=\"tabEnd\">"
                 + "&nbsp;</span></caption>");
 
         checkOutput("pkg1/class-use/C1.html", true,
                 "<caption><span>Fields in <a href=\"../../pkg2/package-summary.html\">"
-                + "pkg2</a> declared as <a href=\"../../pkg1/C1.html\" "
+                + "pkg2</a> declared as <a href=\"../C1.html\" "
                 + "title=\"class in pkg1\">C1</a></span><span class=\"tabEnd\">&nbsp;"
                 + "</span></caption>",
                 "<caption><span>Methods in <a href=\"../../pkg2/package-summary.html\">"
-                + "pkg2</a> that return <a href=\"../../pkg1/C1.html\" "
+                + "pkg2</a> that return <a href=\"../C1.html\" "
                 + "title=\"class in pkg1\">C1</a></span><span class=\"tabEnd\">"
                 + "&nbsp;</span></caption>");
 
         checkOutput("pkg2/class-use/C2.html", true,
                 "<caption><span>Fields in <a href=\"../../pkg1/package-summary.html\">"
-                + "pkg1</a> declared as <a href=\"../../pkg2/C2.html\" "
+                + "pkg1</a> declared as <a href=\"../C2.html\" "
                 + "title=\"class in pkg2\">C2</a></span><span class=\"tabEnd\">"
                 + "&nbsp;</span></caption>",
                 "<caption><span>Methods in <a href=\"../../pkg1/package-summary.html\">"
-                + "pkg1</a> that return <a href=\"../../pkg2/C2.html\" "
+                + "pkg1</a> that return <a href=\"../C2.html\" "
                 + "title=\"class in pkg2\">C2</a></span><span class=\"tabEnd\">"
                 + "&nbsp;</span></caption>");
 
         checkOutput("pkg2/class-use/C2.ModalExclusionType.html", true,
-                "<caption><span>Methods in <a href=\"../../pkg2/package-summary.html\">"
-                + "pkg2</a> that return <a href=\"../../pkg2/C2.ModalExclusionType.html\" "
+                "<caption><span>Methods in <a href=\"../package-summary.html\">"
+                + "pkg2</a> that return <a href=\"../C2.ModalExclusionType.html\" "
                 + "title=\"enum in pkg2\">C2.ModalExclusionType</a></span>"
                 + "<span class=\"tabEnd\">&nbsp;</span></caption>");
 
         // Package use documentation
         checkOutput("pkg1/package-use.html", true,
-                "<caption><span>Packages that use <a href=\"../pkg1/package-summary.html\">"
+                "<caption><span>Packages that use <a href=\"package-summary.html\">"
                 + "pkg1</a></span><span class=\"tabEnd\">&nbsp;</span></caption>",
-                "<caption><span>Classes in <a href=\"../pkg1/package-summary.html\">"
-                + "pkg1</a> used by <a href=\"../pkg1/package-summary.html\">pkg1</a>"
+                "<caption><span>Classes in <a href=\"package-summary.html\">"
+                + "pkg1</a> used by <a href=\"package-summary.html\">pkg1</a>"
                 + "</span><span class=\"tabEnd\">&nbsp;</span></caption>");
 
         checkOutput("pkg2/package-use.html", true,
-                "<caption><span>Packages that use <a href=\"../pkg2/package-summary.html\">"
+                "<caption><span>Packages that use <a href=\"package-summary.html\">"
                 + "pkg2</a></span><span class=\"tabEnd\">&nbsp;</span></caption>",
-                "<caption><span>Classes in <a href=\"../pkg2/package-summary.html\">"
+                "<caption><span>Classes in <a href=\"package-summary.html\">"
                 + "pkg2</a> used by <a href=\"../pkg1/package-summary.html\">pkg1</a>"
                 + "</span><span class=\"tabEnd\">&nbsp;</span></caption>");
 
--- a/test/langtools/jdk/javadoc/doclet/testHtmlTag/TestHtmlTag.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/langtools/jdk/javadoc/doclet/testHtmlTag/TestHtmlTag.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009, 2017, 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
@@ -119,11 +119,11 @@
                 + "\n"
                 + " <p>\n"
                 + " A new instance of the <code>DatatypeFactory</code> is created through the\n"
-                + " <a href=\"../pkg3/A.DatatypeFactory.html#newInstance--\"><code>newInstance()</code></a> method that uses the following implementation\n"
+                + " <a href=\"#newInstance--\"><code>newInstance()</code></a> method that uses the following implementation\n"
                 + " resolution mechanisms to determine an implementation:</p>\n"
                 + " <ol>\n"
                 + " <li>\n"
-                + " If the system property specified by <a href=\"../pkg3/A.DatatypeFactory.html#DATATYPEFACTORY_PROPERTY\"><code>DATATYPEFACTORY_PROPERTY</code></a>,\n"
+                + " If the system property specified by <a href=\"#DATATYPEFACTORY_PROPERTY\"><code>DATATYPEFACTORY_PROPERTY</code></a>,\n"
                 + " \"<code>javax.xml.datatype.DatatypeFactory</code>\", exists, a class with\n"
                 + " the name of the property value is instantiated. Any Exception thrown\n"
                 + " during the instantiation process is wrapped as a\n"
@@ -148,7 +148,7 @@
                 + " </li>\n"
                 + " <li>\n"
                 + " The final mechanism is to attempt to instantiate the <code>Class</code>\n"
-                + " specified by <a href=\"../pkg3/A.DatatypeFactory.html#DATATYPEFACTORY_IMPLEMENTATION_CLASS\">"
+                + " specified by <a href=\"#DATATYPEFACTORY_IMPLEMENTATION_CLASS\">"
                 + "<code>DATATYPEFACTORY_IMPLEMENTATION_CLASS</code></a>. Any Exception\n"
                 + " thrown during the instantiation process is wrapped as a\n"
                 + " <code>IllegalStateException</code>.\n"
--- a/test/langtools/jdk/javadoc/doclet/testHtmlVersion/TestHtmlVersion.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/langtools/jdk/javadoc/doclet/testHtmlVersion/TestHtmlVersion.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -133,7 +133,7 @@
                 "<!DOCTYPE HTML>",
                 "<meta name=\"dc.created\"",
                 "<main role=\"main\">\n"
-                + "<h1 class=\"bar\"><a href=\"../pkg/package-summary.html\" target=\"classFrame\">pkg</a></h1>",
+                + "<h1 class=\"bar\"><a href=\"package-summary.html\" target=\"classFrame\">pkg</a></h1>",
                 "<section role=\"region\">\n"
                 + "<h2 title=\"Interfaces\">Interfaces</h2>",
                 "<section role=\"region\">\n"
@@ -598,7 +598,7 @@
                 "<section role=\"region\"><a id=\"pkg\">\n"
                 + "<!--   -->\n"
                 + "</a>\n"
-                + "<h3>Uses of <a href=\"../../pkg1/RegClass.html\" title=\"class in pkg1\">RegClass</a> in <a href=\"../../pkg/package-summary.html\">pkg</a></h3>\n"
+                + "<h3>Uses of <a href=\"../RegClass.html\" title=\"class in pkg1\">RegClass</a> in <a href=\"../../pkg/package-summary.html\">pkg</a></h3>\n"
                 + "<table class=\"useSummary\">",
                 "<footer role=\"contentinfo\">\n"
                 + "<nav role=\"navigation\">\n"
@@ -667,7 +667,7 @@
                 "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">",
                 "<meta name=\"date\"",
                 "<body>\n"
-                + "<h1 class=\"bar\"><a href=\"../pkg/package-summary.html\" target=\"classFrame\">pkg</a></h1>");
+                + "<h1 class=\"bar\"><a href=\"package-summary.html\" target=\"classFrame\">pkg</a></h1>");
 
         // Negated test for package-summary page
         checkOutput("pkg/package-summary.html", false,
@@ -1040,7 +1040,7 @@
                 "<li class=\"blockList\"><a name=\"pkg\">\n"
                 + "<!--   -->\n"
                 + "</a>\n"
-                + "<h3>Uses of <a href=\"../../pkg1/RegClass.html\" title=\"class in pkg1\">RegClass</a> in <a href=\"../../pkg/package-summary.html\">pkg</a></h3>\n"
+                + "<h3>Uses of <a href=\"../RegClass.html\" title=\"class in pkg1\">RegClass</a> in <a href=\"../../pkg/package-summary.html\">pkg</a></h3>\n"
                 + "<table class=\"useSummary\" summary=\"Use table, listing fields, and an explanation\">");
 
         // Negated test for main index page
@@ -1100,7 +1100,7 @@
                 "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">",
                 "<meta name=\"date\"",
                 "<body>\n"
-                + "<h1 class=\"bar\"><a href=\"../pkg/package-summary.html\" target=\"classFrame\">pkg</a></h1>");
+                + "<h1 class=\"bar\"><a href=\"package-summary.html\" target=\"classFrame\">pkg</a></h1>");
 
         // Test for package-summary page
         checkOutput("pkg/package-summary.html", true,
@@ -1486,7 +1486,7 @@
                 "<li class=\"blockList\"><a name=\"pkg\">\n"
                 + "<!--   -->\n"
                 + "</a>\n"
-                + "<h3>Uses of <a href=\"../../pkg1/RegClass.html\" title=\"class in pkg1\">RegClass</a> in <a href=\"../../pkg/package-summary.html\">pkg</a></h3>\n"
+                + "<h3>Uses of <a href=\"../RegClass.html\" title=\"class in pkg1\">RegClass</a> in <a href=\"../../pkg/package-summary.html\">pkg</a></h3>\n"
                 + "<table class=\"useSummary\" summary=\"Use table, listing fields, and an explanation\">");
 
         // Test for main index page
@@ -1551,7 +1551,7 @@
                 "<!DOCTYPE HTML>",
                 "<meta name=\"dc.created\"",
                 "<main role=\"main\">\n"
-                + "<h1 class=\"bar\"><a href=\"../pkg/package-summary.html\" target=\"classFrame\">pkg</a></h1>",
+                + "<h1 class=\"bar\"><a href=\"package-summary.html\" target=\"classFrame\">pkg</a></h1>",
                 "<section role=\"region\">\n"
                 + "<h2 title=\"Interfaces\">Interfaces</h2>",
                 "<section role=\"region\">\n"
@@ -1988,7 +1988,7 @@
                 "<section role=\"region\"><a id=\"pkg\">\n"
                 + "<!--   -->\n"
                 + "</a>\n"
-                + "<h3>Uses of <a href=\"../../pkg1/RegClass.html\" title=\"class in pkg1\">RegClass</a> in <a href=\"../../pkg/package-summary.html\">pkg</a></h3>\n"
+                + "<h3>Uses of <a href=\"../RegClass.html\" title=\"class in pkg1\">RegClass</a> in <a href=\"../../pkg/package-summary.html\">pkg</a></h3>\n"
                 + "\n"
                 + "<table class=\"useSummary\">",
                 "<footer role=\"contentinfo\">\n"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/langtools/jdk/javadoc/doclet/testHtmlWarning/TestHtmlWarning.java	Tue Jan 30 16:41:40 2018 +0100
@@ -0,0 +1,81 @@
+/*
+ * 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 8194955
+ * @summary Warn when default HTML version is used.
+ * @library ../lib
+ * @modules jdk.javadoc/jdk.javadoc.internal.tool
+ * @build JavadocTester
+ * @run main TestHtmlWarning
+ */
+
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.util.List;
+
+public class TestHtmlWarning extends JavadocTester {
+
+    public static void main(String... args) throws Exception {
+        Files.write(testFile,
+                List.of("/** Comment. */", "public class C { }"));
+
+        TestHtmlWarning tester = new TestHtmlWarning();
+        tester.runTests();
+    }
+
+    private static final Path testFile = Paths.get("C.java");
+    private static final String warning =
+        "javadoc: warning - You have not specified the version of HTML to use.";
+
+    @Test
+    void testHtml4() {
+        javadoc("-d", "out-4",
+                "-html4",
+                testFile.toString());
+        checkExit(Exit.OK);
+
+        checkOutput(Output.OUT, false, warning);
+    }
+
+    @Test
+    void testHtml5() {
+        javadoc("-d", "out-5",
+                "-html5",
+                testFile.toString());
+        checkExit(Exit.OK);
+
+        checkOutput(Output.OUT, false, warning);
+    }
+
+    @Test
+    void testDefault() {
+        javadoc("-d", "out-default",
+                testFile.toString());
+        checkExit(Exit.OK);
+
+        checkOutput(Output.OUT, true, warning);
+    }
+}
--- a/test/langtools/jdk/javadoc/doclet/testInlineLinkLabel/TestInlineLinkLabel.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/langtools/jdk/javadoc/doclet/testInlineLinkLabel/TestInlineLinkLabel.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2016, 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
@@ -48,8 +48,8 @@
 
         checkOutput("pkg/C1.html", true,
                 //Search for the label to the package link.
-                "<a href=\"../pkg/package-summary.html\"><code>Here is a link to a package</code></a>",
+                "<a href=\"package-summary.html\"><code>Here is a link to a package</code></a>",
                 //Search for the label to the class link
-                "<a href=\"../pkg/C2.html\" title=\"class in pkg\"><code>Here is a link to a class</code></a>");
+                "<a href=\"C2.html\" title=\"class in pkg\"><code>Here is a link to a class</code></a>");
     }
 }
--- a/test/langtools/jdk/javadoc/doclet/testInterface/TestInterface.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/langtools/jdk/javadoc/doclet/testInterface/TestInterface.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -70,8 +70,8 @@
                 // Make sure known implementing class list is correct and omits type parameters.
                 "<dl>\n"
                 + "<dt>All Known Implementing Classes:</dt>\n"
-                + "<dd><code><a href=\"../pkg/Child.html\" title=\"class in pkg\">Child"
-                + "</a></code>, <code><a href=\"../pkg/Parent.html\" title=\"class in pkg\">Parent"
+                + "<dd><code><a href=\"Child.html\" title=\"class in pkg\">Child"
+                + "</a></code>, <code><a href=\"Parent.html\" title=\"class in pkg\">Parent"
                 + "</a></code></dd>\n"
                 + "</dl>");
 
@@ -79,7 +79,7 @@
                 // Make sure "All Implemented Interfaces": has substituted type parameters
                 "<dl>\n"
                 + "<dt>All Implemented Interfaces:</dt>\n"
-                + "<dd><code><a href=\"../pkg/Interface.html\" title=\"interface in pkg\">"
+                + "<dd><code><a href=\"Interface.html\" title=\"interface in pkg\">"
                 + "Interface</a>&lt;CE&gt;</code></dd>\n"
                 + "</dl>",
                 //Make sure Class Tree has substituted type parameters.
@@ -87,7 +87,7 @@
                 + "<li>java.lang.Object</li>\n"
                 + "<li>\n"
                 + "<ul class=\"inheritance\">\n"
-                + "<li><a href=\"../pkg/Parent.html\" title=\"class in pkg\">"
+                + "<li><a href=\"Parent.html\" title=\"class in pkg\">"
                 + "pkg.Parent</a>&lt;CE&gt;</li>\n"
                 + "<li>\n"
                 + "<ul class=\"inheritance\">\n"
@@ -99,23 +99,23 @@
                 + "</ul>",
                 //Make sure "Specified By" has substituted type parameters.
                 "<dt><span class=\"overrideSpecifyLabel\">Specified by:</span></dt>\n"
-                + "<dd><code><a href=\"../pkg/Interface.html#method--\">method</a>"
+                + "<dd><code><a href=\"Interface.html#method--\">method</a>"
                 + "</code>&nbsp;in interface&nbsp;<code>"
-                + "<a href=\"../pkg/Interface.html\" title=\"interface in pkg\">"
-                + "Interface</a>&lt;<a href=\"../pkg/Child.html\" title=\"type parameter in Child\">"
+                + "<a href=\"Interface.html\" title=\"interface in pkg\">"
+                + "Interface</a>&lt;<a href=\"Child.html\" title=\"type parameter in Child\">"
                 + "CE</a>&gt;</code></dd>",
                 //Make sure "Overrides" has substituted type parameters.
                 "<dt><span class=\"overrideSpecifyLabel\">Overrides:</span></dt>\n"
-                + "<dd><code><a href=\"../pkg/Parent.html#method--\">method</a>"
-                + "</code>&nbsp;in class&nbsp;<code><a href=\"../pkg/Parent.html\" "
-                + "title=\"class in pkg\">Parent</a>&lt;<a href=\"../pkg/Child.html\" "
+                + "<dd><code><a href=\"Parent.html#method--\">method</a>"
+                + "</code>&nbsp;in class&nbsp;<code><a href=\"Parent.html\" "
+                + "title=\"class in pkg\">Parent</a>&lt;<a href=\"Child.html\" "
                 + "title=\"type parameter in Child\">CE</a>&gt;</code></dd>");
 
         checkOutput("pkg/Parent.html", true,
                 //Make sure "Direct Know Subclasses" omits type parameters
                 "<dl>\n"
                 + "<dt>Direct Known Subclasses:</dt>\n"
-                + "<dd><code><a href=\"../pkg/Child.html\" title=\"class in pkg\">Child"
+                + "<dd><code><a href=\"Child.html\" title=\"class in pkg\">Child"
                 + "</a></code></dd>\n"
                 + "</dl>");
 
@@ -135,7 +135,7 @@
 
                 "<td class=\"colFirst\"><code>static void</code></td>\n"
                 + "<th class=\"colSecond\" scope=\"row\"><code><span class=\"memberNameLink\">"
-                + "<a href=\"../pkg/ClassWithStaticMembers.html#m--\">m</a></span>()</code></th>\n"
+                + "<a href=\"#m--\">m</a></span>()</code></th>\n"
                 + "<td class=\"colLast\">\n"
                 + "<div class=\"block\">A hider method</div>\n"
                 + "</td>\n",
@@ -144,7 +144,7 @@
                 + "<pre>public static&nbsp;void&nbsp;staticMethod()</pre>\n"
                 + "<div class=\"block\"><span class=\"descfrmTypeLabel\">"
                 + "Description copied from interface:&nbsp;<code>"
-                + "<a href=\"../pkg/InterfaceWithStaticMembers.html#staticMethod--\">"
+                + "<a href=\"InterfaceWithStaticMembers.html#staticMethod--\">"
                 + "InterfaceWithStaticMembers</a></code></span></div>\n"
                 + "<div class=\"block\">A static method</div>\n");
 
@@ -165,10 +165,10 @@
         checkOutput("pkg1/Child.html", true,
             // Ensure the correct Overrides in the inheritance hierarchy is reported
             "<span class=\"overrideSpecifyLabel\">Overrides:</span></dt>\n" +
-            "<dd><code><a href=\"../pkg1/GrandParent.html#method1--\">method1</a></code>" +
+            "<dd><code><a href=\"GrandParent.html#method1--\">method1</a></code>" +
             "&nbsp;in class&nbsp;" +
-            "<code><a href=\"../pkg1/GrandParent.html\" title=\"class in pkg1\">GrandParent</a>" +
-            "&lt;<a href=\"../pkg1/Child.html\" title=\"type parameter in Child\">CE</a>&gt;</code>");
+            "<code><a href=\"GrandParent.html\" title=\"class in pkg1\">GrandParent</a>" +
+            "&lt;<a href=\"Child.html\" title=\"type parameter in Child\">CE</a>&gt;</code>");
     }
 
     @Test
@@ -182,21 +182,21 @@
         checkOutput("pkg2/Spliterator.OfDouble.html", true,
             // Ensure the correct type parameters are displayed correctly
             "<h3>Nested classes/interfaces inherited from interface&nbsp;pkg2."
-            + "<a href=\"../pkg2/Spliterator.html\" title=\"interface in pkg2\">Spliterator</a></h3>\n"
-            + "<code><a href=\"../pkg2/Spliterator.OfDouble.html\" title=\"interface in pkg2\">"
-            + "Spliterator.OfDouble</a>, <a href=\"../pkg2/Spliterator.OfInt.html\" "
+            + "<a href=\"Spliterator.html\" title=\"interface in pkg2\">Spliterator</a></h3>\n"
+            + "<code><a href=\"Spliterator.OfDouble.html\" title=\"interface in pkg2\">"
+            + "Spliterator.OfDouble</a>, <a href=\"Spliterator.OfInt.html\" "
             + "title=\"interface in pkg2\">Spliterator.OfInt</a>&lt;"
-            + "<a href=\"../pkg2/Spliterator.OfInt.html\" title=\"type parameter in Spliterator.OfInt\">"
-            + "Integer</a>&gt;, <a href=\"../pkg2/Spliterator.OfPrimitive.html\" title=\"interface in pkg2\">"
-            + "Spliterator.OfPrimitive</a>&lt;<a href=\"../pkg2/Spliterator.OfPrimitive.html\" "
-            + "title=\"type parameter in Spliterator.OfPrimitive\">T</a>,<a href=\"../pkg2/Spliterator.OfPrimitive.html\" "
+            + "<a href=\"Spliterator.OfInt.html\" title=\"type parameter in Spliterator.OfInt\">"
+            + "Integer</a>&gt;, <a href=\"Spliterator.OfPrimitive.html\" title=\"interface in pkg2\">"
+            + "Spliterator.OfPrimitive</a>&lt;<a href=\"Spliterator.OfPrimitive.html\" "
+            + "title=\"type parameter in Spliterator.OfPrimitive\">T</a>,<a href=\"Spliterator.OfPrimitive.html\" "
             + "title=\"type parameter in Spliterator.OfPrimitive\">T_CONS</a>,"
-            + "<a href=\"../pkg2/Spliterator.OfPrimitive.html\" title=\"type parameter in Spliterator.OfPrimitive\">"
-            + "T_SPLITR</a> extends <a href=\"../pkg2/Spliterator.OfPrimitive.html\" title=\"interface in pkg2\">"
-            + "Spliterator.OfPrimitive</a>&lt;<a href=\"../pkg2/Spliterator.OfPrimitive.html\" "
+            + "<a href=\"Spliterator.OfPrimitive.html\" title=\"type parameter in Spliterator.OfPrimitive\">"
+            + "T_SPLITR</a> extends <a href=\"Spliterator.OfPrimitive.html\" title=\"interface in pkg2\">"
+            + "Spliterator.OfPrimitive</a>&lt;<a href=\"Spliterator.OfPrimitive.html\" "
             + "title=\"type parameter in Spliterator.OfPrimitive\">T</a>,"
-            + "<a href=\"../pkg2/Spliterator.OfPrimitive.html\" title=\"type parameter in Spliterator.OfPrimitive\">"
-            + "T_CONS</a>,<a href=\"../pkg2/Spliterator.OfPrimitive.html\" title=\"type parameter in Spliterator.OfPrimitive\">"
+            + "<a href=\"Spliterator.OfPrimitive.html\" title=\"type parameter in Spliterator.OfPrimitive\">"
+            + "T_CONS</a>,<a href=\"Spliterator.OfPrimitive.html\" title=\"type parameter in Spliterator.OfPrimitive\">"
             + "T_SPLITR</a>&gt;&gt;</code>");
     }
 }
--- a/test/langtools/jdk/javadoc/doclet/testJavaFX/TestJavaFX.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/langtools/jdk/javadoc/doclet/testJavaFX/TestJavaFX.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -51,8 +51,8 @@
 
         checkOutput("pkg1/C.html", true,
                 "<dt><span class=\"seeLabel\">See Also:</span></dt>\n"
-                + "<dd><a href=\"../pkg1/C.html#getRate--\"><code>getRate()</code></a>, \n"
-                + "<a href=\"../pkg1/C.html#setRate-double-\">"
+                + "<dd><a href=\"#getRate--\"><code>getRate()</code></a>, \n"
+                + "<a href=\"#setRate-double-\">"
                 + "<code>setRate(double)</code></a></dd>",
                 "<pre>public final&nbsp;void&nbsp;setRate&#8203;(double&nbsp;value)</pre>\n"
                 + "<div class=\"block\">Sets the value of the property rate.</div>\n"
@@ -62,10 +62,10 @@
                 + "<div class=\"block\">Gets the value of the property rate.</div>\n"
                 + "<dl>\n"
                 + "<dt><span class=\"simpleTagLabel\">Property description:</span></dt>",
-                "<td class=\"colFirst\"><code><a href=\"../pkg1/C.DoubleProperty.html\" "
+                "<td class=\"colFirst\"><code><a href=\"C.DoubleProperty.html\" "
                 + "title=\"class in pkg1\">C.DoubleProperty</a></code></td>\n"
                 + "<th class=\"colSecond\" scope=\"row\"><code><span class=\"memberNameLink\">"
-                + "<a href=\"../pkg1/C.html#rateProperty\">rate</a></span></code></th>\n"
+                + "<a href=\"#rateProperty\">rate</a></span></code></th>\n"
                 + "<td class=\"colLast\">\n"
                 + "<div class=\"block\">Defines the direction/speed at which the "
                 + "<code>Timeline</code> is expected to\n"
@@ -77,14 +77,14 @@
                 "<p>Gets the value of the property <code>Property</code>",
                 "<span class=\"simpleTagLabel\">Property description:</span>",
                 "<th class=\"colSecond\" scope=\"row\"><code><span class=\"memberNameLink\">"
-                + "<a href=\"../pkg1/C.html#setTestMethodProperty--\">"
+                + "<a href=\"#setTestMethodProperty--\">"
                 + "setTestMethodProperty</a></span>()</code></th>",
                 "<th class=\"colSecond\" scope=\"row\"><code><span class=\"memberNameLink\">"
-                + "<a href=\"../pkg1/C.html#pausedProperty\">paused</a></span></code></th>\n"
+                + "<a href=\"#pausedProperty\">paused</a></span></code></th>\n"
                 + "<td class=\"colLast\">\n"
                 + "<div class=\"block\">Defines if paused.</div>",
                 "<h4>paused</h4>\n"
-                + "<pre>public final&nbsp;<a href=\"../pkg1/C.BooleanProperty.html\" "
+                + "<pre>public final&nbsp;<a href=\"C.BooleanProperty.html\" "
                 + "title=\"class in pkg1\">C.BooleanProperty</a> pausedProperty</pre>\n"
                 + "<div class=\"block\">Defines if paused. The second line.</div>",
                 "<h4>isPaused</h4>\n"
@@ -107,7 +107,7 @@
                 + "<dt><span class=\"simpleTagLabel\">Default value:</span></dt>\n"
                 + "<dd>false</dd>",
                 "<h4>rate</h4>\n"
-                + "<pre>public final&nbsp;<a href=\"../pkg1/C.DoubleProperty.html\" "
+                + "<pre>public final&nbsp;<a href=\"C.DoubleProperty.html\" "
                 + "title=\"class in pkg1\">C.DoubleProperty</a> rateProperty</pre>\n"
                 + "<div class=\"block\">Defines the direction/speed at which the "
                 + "<code>Timeline</code> is expected to\n"
@@ -138,9 +138,9 @@
                 + "<table class=\"memberSummary\" summary=\"Property Summary table, listing properties, and an explanation\">\n"
                 + "<caption><span>Properties</span><span class=\"tabEnd\">&nbsp;</span></caption>",
                 "<tr class=\"altColor\">\n"
-                + "<td class=\"colFirst\"><code><a href=\"../pkg1/C.BooleanProperty.html\" title=\"class in pkg1\">C.BooleanProperty</a></code></td>\n",
+                + "<td class=\"colFirst\"><code><a href=\"C.BooleanProperty.html\" title=\"class in pkg1\">C.BooleanProperty</a></code></td>\n",
                 "<tr class=\"rowColor\">\n"
-                + "<td class=\"colFirst\"><code><a href=\"../pkg1/C.DoubleProperty.html\" title=\"class in pkg1\">C.DoubleProperty</a></code></td>\n");
+                + "<td class=\"colFirst\"><code><a href=\"C.DoubleProperty.html\" title=\"class in pkg1\">C.DoubleProperty</a></code></td>\n");
 
         checkOutput("pkg1/C.html", false,
                 "A()",
@@ -152,9 +152,9 @@
                 + "<a href=\"javascript:show(8);\">Concrete Methods</a></span><span class=\"tabEnd\">&nbsp;</span></span>"
                 + "</caption>",
                 "<tr id=\"i0\" class=\"altColor\">\n"
-                + "<td class=\"colFirst\"><code><a href=\"../pkg1/C.BooleanProperty.html\" title=\"class in pkg1\">C.BooleanProperty</a></code></td>\n",
+                + "<td class=\"colFirst\"><code><a href=\"C.BooleanProperty.html\" title=\"class in pkg1\">C.BooleanProperty</a></code></td>\n",
                 "<tr id=\"i1\" class=\"rowColor\">\n"
-                + "<td class=\"colFirst\"><code><a href=\"../pkg1/C.DoubleProperty.html\" title=\"class in pkg1\">C.DoubleProperty</a></code></td>\n");
+                + "<td class=\"colFirst\"><code><a href=\"C.DoubleProperty.html\" title=\"class in pkg1\">C.DoubleProperty</a></code></td>\n");
 
         checkOutput("index-all.html", true,
                 "<div class=\"block\">Gets the value of the property paused.</div>",
@@ -162,9 +162,9 @@
 
         checkOutput("pkg1/D.html", true,
                 "<h3>Properties inherited from class&nbsp;pkg1."
-                    + "<a href=\"../pkg1/C.html\" title=\"class in pkg1\">C</a></h3>\n"
-                    + "<code><a href=\"../pkg1/C.html#pausedProperty\">"
-                    + "paused</a>, <a href=\"../pkg1/C.html#rateProperty\">rate</a></code></li>");
+                    + "<a href=\"C.html\" title=\"class in pkg1\">C</a></h3>\n"
+                    + "<code><a href=\"C.html#pausedProperty\">"
+                    + "paused</a>, <a href=\"C.html#rateProperty\">rate</a></code></li>");
 
         checkOutput("pkg1/D.html", false, "shouldNotAppear");
     }
@@ -246,27 +246,27 @@
                 + "<tr id=\"i0\" class=\"altColor\">\n"
                 + "<td class=\"colFirst\"><code>&lt;T&gt;&nbsp;java.lang.Object</code></td>\n"
                 + "<th class=\"colSecond\" scope=\"row\"><code><span class=\"memberNameLink\">"
-                + "<a href=\"../pkg2/Test.html#alphaProperty-java.util.List-\">alphaProperty</a>"
+                + "<a href=\"#alphaProperty-java.util.List-\">alphaProperty</a>"
                 + "</span>&#8203;(java.util.List&lt;T&gt;&nbsp;foo)</code></th>\n"
                 + "<td class=\"colLast\">&nbsp;</td>\n"
                 + "</tr>\n"
                 + "<tr id=\"i1\" class=\"rowColor\">\n"
                 + "<td class=\"colFirst\"><code>java.lang.Object</code></td>\n"
                 + "<th class=\"colSecond\" scope=\"row\"><code><span class=\"memberNameLink\">"
-                + "<a href=\"../pkg2/Test.html#betaProperty--\">betaProperty</a></span>()</code></th>\n"
+                + "<a href=\"#betaProperty--\">betaProperty</a></span>()</code></th>\n"
                 + "<td class=\"colLast\">&nbsp;</td>\n"
                 + "</tr>\n"
                 + "<tr id=\"i2\" class=\"altColor\">\n"
                 + "<td class=\"colFirst\"><code>java.util.List&lt;java.util.Set&lt;? super java.lang.Object&gt;&gt;"
                 + "</code></td>\n"
                 + "<th class=\"colSecond\" scope=\"row\"><code><span class=\"memberNameLink\">"
-                + "<a href=\"../pkg2/Test.html#deltaProperty--\">deltaProperty</a></span>()</code></th>\n"
+                + "<a href=\"#deltaProperty--\">deltaProperty</a></span>()</code></th>\n"
                 + "<td class=\"colLast\">&nbsp;</td>\n"
                 + "</tr>\n"
                 + "<tr id=\"i3\" class=\"rowColor\">\n"
                 + "<td class=\"colFirst\"><code>java.util.List&lt;java.lang.String&gt;</code></td>\n"
                 + "<th class=\"colSecond\" scope=\"row\"><code><span class=\"memberNameLink\">"
-                + "<a href=\"../pkg2/Test.html#gammaProperty--\">gammaProperty</a></span>()</code></th>\n"
+                + "<a href=\"#gammaProperty--\">gammaProperty</a></span>()</code></th>\n"
                 + "<td class=\"colLast\">&nbsp;</td>"
         );
     }
--- a/test/langtools/jdk/javadoc/doclet/testLinkOption/TestLinkOption.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/langtools/jdk/javadoc/doclet/testLinkOption/TestLinkOption.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2017, 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
@@ -86,7 +86,7 @@
                 + " title=\"class or interface in java.lang\" class=\"externalLink\"><code><tt>getSystemClassLoader()</tt>"
                 + "</code></a> as the parent class loader.</div>",
                 "<div class=\"block\">is equivalent to invoking <code>"
-                + "<a href=\"../pkg/B.html#createTempFile-java.lang.String-java.lang.String-java.io.File-\">"
+                + "<a href=\"#createTempFile-java.lang.String-java.lang.String-java.io.File-\">"
                 + "<code>createTempFile(prefix,&nbsp;suffix,&nbsp;null)</code></a></code>.</div>",
                 "<a href=\"" + url + "java/lang/String.html?is-external=true\" "
                 + "title=\"class or interface in java.lang\" class=\"externalLink\">Link-Plain to String Class</a>",
--- a/test/langtools/jdk/javadoc/doclet/testLinkTaglet/TestLinkTaglet.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/langtools/jdk/javadoc/doclet/testLinkTaglet/TestLinkTaglet.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2004, 2016, 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
@@ -49,23 +49,23 @@
         checkExit(Exit.OK);
 
         checkOutput("pkg/C.html", true,
-                "Qualified Link: <a href=\"../pkg/C.InnerC.html\" title=\"class in pkg\"><code>C.InnerC</code></a>.<br/>\n"
-                + " Unqualified Link1: <a href=\"../pkg/C.InnerC.html\" title=\"class in pkg\"><code>C.InnerC</code></a>.<br/>\n"
-                + " Unqualified Link2: <a href=\"../pkg/C.InnerC.html\" title=\"class in pkg\"><code>C.InnerC</code></a>.<br/>\n"
-                + " Qualified Link: <a href=\"../pkg/C.html#method-pkg.C.InnerC-pkg.C.InnerC2-\"><code>method(pkg.C.InnerC, pkg.C.InnerC2)</code></a>.<br/>\n"
-                + " Unqualified Link: <a href=\"../pkg/C.html#method-pkg.C.InnerC-pkg.C.InnerC2-\"><code>method(C.InnerC, C.InnerC2)</code></a>.<br/>\n"
-                + " Unqualified Link: <a href=\"../pkg/C.html#method-pkg.C.InnerC-pkg.C.InnerC2-\"><code>method(InnerC, InnerC2)</code></a>.<br/>\n"
-                + " Package Link: <a href=\"../pkg/package-summary.html\"><code>pkg</code></a>.<br/>");
+                "Qualified Link: <a href=\"C.InnerC.html\" title=\"class in pkg\"><code>C.InnerC</code></a>.<br/>\n"
+                + " Unqualified Link1: <a href=\"C.InnerC.html\" title=\"class in pkg\"><code>C.InnerC</code></a>.<br/>\n"
+                + " Unqualified Link2: <a href=\"C.InnerC.html\" title=\"class in pkg\"><code>C.InnerC</code></a>.<br/>\n"
+                + " Qualified Link: <a href=\"#method-pkg.C.InnerC-pkg.C.InnerC2-\"><code>method(pkg.C.InnerC, pkg.C.InnerC2)</code></a>.<br/>\n"
+                + " Unqualified Link: <a href=\"#method-pkg.C.InnerC-pkg.C.InnerC2-\"><code>method(C.InnerC, C.InnerC2)</code></a>.<br/>\n"
+                + " Unqualified Link: <a href=\"#method-pkg.C.InnerC-pkg.C.InnerC2-\"><code>method(InnerC, InnerC2)</code></a>.<br/>\n"
+                + " Package Link: <a href=\"package-summary.html\"><code>pkg</code></a>.<br/>");
 
         checkOutput("pkg/C.InnerC.html", true,
-                "Link to member in outer class: <a href=\"../pkg/C.html#MEMBER\"><code>C.MEMBER</code></a> <br/>\n"
-                + " Link to member in inner class: <a href=\"../pkg/C.InnerC2.html#MEMBER2\"><code>C.InnerC2.MEMBER2</code></a> <br/>\n"
-                + " Link to another inner class: <a href=\"../pkg/C.InnerC2.html\" title=\"class in pkg\"><code>C.InnerC2</code></a>");
+                "Link to member in outer class: <a href=\"C.html#MEMBER\"><code>C.MEMBER</code></a> <br/>\n"
+                + " Link to member in inner class: <a href=\"C.InnerC2.html#MEMBER2\"><code>C.InnerC2.MEMBER2</code></a> <br/>\n"
+                + " Link to another inner class: <a href=\"C.InnerC2.html\" title=\"class in pkg\"><code>C.InnerC2</code></a>");
 
         checkOutput("pkg/C.InnerC2.html", true,
                 "<dl>\n"
                 + "<dt>Enclosing class:</dt>\n"
-                + "<dd><a href=\"../pkg/C.html\" title=\"class in pkg\">C</a></dd>\n"
+                + "<dd><a href=\"C.html\" title=\"class in pkg\">C</a></dd>\n"
                 + "</dl>");
 
         checkOutput(Output.OUT, false,
--- a/test/langtools/jdk/javadoc/doclet/testMemberInheritance/TestMemberInheritance.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/langtools/jdk/javadoc/doclet/testMemberInheritance/TestMemberInheritance.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2017, 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
@@ -50,56 +50,56 @@
 
         checkOutput("pkg/SubClass.html", true,
                 // Public field should be inherited
-                "<a href=\"../pkg/BaseClass.html#pubField\">",
+                "<a href=\"BaseClass.html#pubField\">",
                 // Public method should be inherited
-                "<a href=\"../pkg/BaseClass.html#pubMethod--\">",
+                "<a href=\"BaseClass.html#pubMethod--\">",
                 // Public inner class should be inherited.
-                "<a href=\"../pkg/BaseClass.pubInnerClass.html\" title=\"class in pkg\">",
+                "<a href=\"BaseClass.pubInnerClass.html\" title=\"class in pkg\">",
                 // Protected field should be inherited
-                "<a href=\"../pkg/BaseClass.html#proField\">",
+                "<a href=\"BaseClass.html#proField\">",
                 // Protected method should be inherited
-                "<a href=\"../pkg/BaseClass.html#proMethod--\">",
+                "<a href=\"BaseClass.html#proMethod--\">",
                 // Protected inner class should be inherited.
-                "<a href=\"../pkg/BaseClass.proInnerClass.html\" title=\"class in pkg\">",
+                "<a href=\"BaseClass.proInnerClass.html\" title=\"class in pkg\">",
                 // New labels as of 1.5.0
                 "Nested classes/interfaces inherited from class&nbsp;pkg."
-                + "<a href=\"../pkg/BaseClass.html\" title=\"class in pkg\">BaseClass</a>",
+                + "<a href=\"BaseClass.html\" title=\"class in pkg\">BaseClass</a>",
                 "Nested classes/interfaces inherited from interface&nbsp;pkg."
-                + "<a href=\"../pkg/BaseInterface.html\" title=\"interface in pkg\">BaseInterface</a>");
+                + "<a href=\"BaseInterface.html\" title=\"interface in pkg\">BaseInterface</a>");
 
         checkOutput("pkg/BaseClass.html", true,
                 // Test overriding/implementing methods with generic parameters.
                 "<dl>\n"
                 + "<dt><span class=\"overrideSpecifyLabel\">Specified by:</span></dt>\n"
-                + "<dd><code><a href=\"../pkg/BaseInterface.html#getAnnotation-java.lang.Class-\">"
+                + "<dd><code><a href=\"BaseInterface.html#getAnnotation-java.lang.Class-\">"
                 + "getAnnotation</a></code>&nbsp;in interface&nbsp;<code>"
-                + "<a href=\"../pkg/BaseInterface.html\" title=\"interface in pkg\">"
+                + "<a href=\"BaseInterface.html\" title=\"interface in pkg\">"
                 + "BaseInterface</a></code></dd>\n"
                 + "</dl>");
 
         checkOutput("diamond/Z.html", true,
                 // Test diamond inheritance member summary (6256068)
-                "<code><a href=\"../diamond/A.html#aMethod--\">aMethod</a></code>");
+                "<code><a href=\"A.html#aMethod--\">aMethod</a></code>");
 
         checkOutput("inheritDist/C.html", true,
                 // Test that doc is inherited from closed parent (6270645)
                 "<div class=\"block\">m1-B</div>");
 
         checkOutput("pkg/SubClass.html", false,
-                "<a href=\"../pkg/BaseClass.html#staticMethod--\">staticMethod</a></code>");
+                "<a href=\"BaseClass.html#staticMethod--\">staticMethod</a></code>");
 
         checkOutput("pkg1/Implementer.html", true,
                 // ensure the method makes it
                 "<td class=\"colFirst\"><code>static java.time.Period</code></td>\n"
                 + "<th class=\"colSecond\" scope=\"row\"><code><span class=\"memberNameLink\">"
-                + "<a href=\"../pkg1/Implementer.html#between-java.time.LocalDate-java.time.LocalDate-\">"
+                + "<a href=\"#between-java.time.LocalDate-java.time.LocalDate-\">"
                 + "between</a></span>&#8203;(java.time.LocalDate&nbsp;startDateInclusive,\n"
                 + "       java.time.LocalDate&nbsp;endDateExclusive)</code></th>");
 
         checkOutput("pkg1/Implementer.html", false,
-                "<h3>Methods inherited from interface&nbsp;pkg1.<a href=\"../pkg1/Interface.html\""
+                "<h3>Methods inherited from interface&nbsp;pkg1.<a href=\"Interface.html\""
                 + " title=\"interface in pkg1\">Interface</a></h3>\n"
-                + "<code><a href=\"../pkg1/Interface.html#between-java.time.chrono.ChronoLocalDate"
+                + "<code><a href=\"Interface.html#between-java.time.chrono.ChronoLocalDate"
                 + "-java.time.chrono.ChronoLocalDate-\">between</a></code>"
         );
     }
--- a/test/langtools/jdk/javadoc/doclet/testMemberSummary/TestMemberSummary.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/langtools/jdk/javadoc/doclet/testMemberSummary/TestMemberSummary.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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,19 +50,19 @@
 
         checkOutput("pkg/PublicChild.html", true,
                 // Check return type in member summary.
-                "<code><a href=\"../pkg/PublicChild.html\" title=\"class in pkg\">PublicChild</a></code></td>\n"
-                + "<th class=\"colSecond\" scope=\"row\"><code><span class=\"memberNameLink\"><a href=\"../pkg/PublicChild.html#returnTypeTest--\">"
+                "<code><a href=\"PublicChild.html\" title=\"class in pkg\">PublicChild</a></code></td>\n"
+                + "<th class=\"colSecond\" scope=\"row\"><code><span class=\"memberNameLink\"><a href=\"#returnTypeTest--\">"
                 + "returnTypeTest</a></span>()</code>",
                 // Check return type in member detail.
-                "<pre>public&nbsp;<a href=\"../pkg/PublicChild.html\" title=\"class in pkg\">"
+                "<pre>public&nbsp;<a href=\"PublicChild.html\" title=\"class in pkg\">"
                 + "PublicChild</a>&nbsp;returnTypeTest()</pre>",
                 "<th class=\"colConstructorName\" scope=\"row\"><code><span class=\"memberNameLink\">"
-                + "<a href=\"../pkg/PublicChild.html#PublicChild--\">PublicChild</a></span>()</code></th>");
+                + "<a href=\"#PublicChild--\">PublicChild</a></span>()</code></th>");
 
         checkOutput("pkg/PrivateParent.html", true,
                 "<td class=\"colFirst\"><code>private </code></td>\n"
                 + "<th class=\"colConstructorName\" scope=\"row\"><code><span class=\"memberNameLink\">"
-                + "<a href=\"../pkg/PrivateParent.html#PrivateParent-int-\">PrivateParent</a></span>&#8203;(int&nbsp;i)</code>"
+                + "<a href=\"#PrivateParent-int-\">PrivateParent</a></span>&#8203;(int&nbsp;i)</code>"
                 + "</th>");
 
         // Legacy anchor dimensions (6290760)
--- a/test/langtools/jdk/javadoc/doclet/testModules/TestModules.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/langtools/jdk/javadoc/doclet/testModules/TestModules.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -854,7 +854,7 @@
                 "<div class=\"subTitle\"><span class=\"moduleLabelInType\">Module</span>&nbsp;"
                 + "<a href=\"../moduleB-summary.html\">moduleB</a></div>",
                 "<div class=\"subTitle\"><span class=\"packageLabelInType\">"
-                + "Package</span>&nbsp;<a href=\"../testpkgmdlB/package-summary.html\">testpkgmdlB</a></div>");
+                + "Package</span>&nbsp;<a href=\"package-summary.html\">testpkgmdlB</a></div>");
         checkFiles(found,
                 "moduleA-frame.html",
                 "moduleA-summary.html",
--- a/test/langtools/jdk/javadoc/doclet/testNavigation/TestNavigation.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/langtools/jdk/javadoc/doclet/testNavigation/TestNavigation.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -49,21 +49,21 @@
 
         checkOutput("pkg/A.html", true,
                 "<li>Prev&nbsp;Class</li>",
-                "<a href=\"../pkg/C.html\" title=\"class in pkg\"><span class=\"typeNameLink\">Next&nbsp;Class</span></a>",
+                "<a href=\"C.html\" title=\"class in pkg\"><span class=\"typeNameLink\">Next&nbsp;Class</span></a>",
                 "<li><a href=\"../overview-summary.html\">Overview</a></li>");
 
         checkOutput("pkg/C.html", true,
-                "<a href=\"../pkg/A.html\" title=\"annotation in pkg\"><span class=\"typeNameLink\">Prev&nbsp;Class</span></a>",
-                "<a href=\"../pkg/E.html\" title=\"enum in pkg\"><span class=\"typeNameLink\">Next&nbsp;Class</span></a>",
+                "<a href=\"A.html\" title=\"annotation in pkg\"><span class=\"typeNameLink\">Prev&nbsp;Class</span></a>",
+                "<a href=\"E.html\" title=\"enum in pkg\"><span class=\"typeNameLink\">Next&nbsp;Class</span></a>",
                 "<li><a href=\"../overview-summary.html\">Overview</a></li>");
 
         checkOutput("pkg/E.html", true,
-                "<a href=\"../pkg/C.html\" title=\"class in pkg\"><span class=\"typeNameLink\">Prev&nbsp;Class</span></a>",
-                "<a href=\"../pkg/I.html\" title=\"interface in pkg\"><span class=\"typeNameLink\">Next&nbsp;Class</span></a>",
+                "<a href=\"C.html\" title=\"class in pkg\"><span class=\"typeNameLink\">Prev&nbsp;Class</span></a>",
+                "<a href=\"I.html\" title=\"interface in pkg\"><span class=\"typeNameLink\">Next&nbsp;Class</span></a>",
                 "<li><a href=\"../overview-summary.html\">Overview</a></li>");
 
         checkOutput("pkg/I.html", true,
-                "<a href=\"../pkg/E.html\" title=\"enum in pkg\"><span class=\"typeNameLink\">Prev&nbsp;Class</span></a>",
+                "<a href=\"E.html\" title=\"enum in pkg\"><span class=\"typeNameLink\">Prev&nbsp;Class</span></a>",
                 "<li>Next&nbsp;Class</li>",
                 // Test for 4664607
                 "<div class=\"skipNav\"><a href=\"#skip.navbar.top\" title=\"Skip navigation links\">Skip navigation links</a></div>\n"
--- a/test/langtools/jdk/javadoc/doclet/testNestedGenerics/TestNestedGenerics.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/langtools/jdk/javadoc/doclet/testNestedGenerics/TestNestedGenerics.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -48,7 +48,7 @@
 
         checkOutput("pkg/NestedGenerics.html", true,
             "<div class=\"block\">Contains <a " +
-            "href=\"../pkg/NestedGenerics.html#foo-java.util.Map-\"><code>foo" +
+            "href=\"#foo-java.util.Map-\"><code>foo" +
             "(java.util.Map&lt;A, java.util.Map&lt;A, A&gt;&gt;)</code></a></div>");
     }
 }
--- a/test/langtools/jdk/javadoc/doclet/testNewLanguageFeatures/TestNewLanguageFeatures.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/langtools/jdk/javadoc/doclet/testNewLanguageFeatures/TestNewLanguageFeatures.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -67,20 +67,20 @@
                 // Make sure enum signature is correct.
                 "<pre>public enum "
                 + "<span class=\"typeNameLabel\">Coin</span>\n"
-                + "extends java.lang.Enum&lt;<a href=\"../pkg/Coin.html\" "
+                + "extends java.lang.Enum&lt;<a href=\"Coin.html\" "
                 + "title=\"enum in pkg\">Coin</a>&gt;</pre>",
                 // Check for enum constant section
                 "<caption><span>Enum Constants"
                 + "</span><span class=\"tabEnd\">&nbsp;</span></caption>",
                 // Detail for enum constant
-                "<span class=\"memberNameLink\"><a href=\"../pkg/Coin.html#Dime\">Dime</a></span>",
+                "<span class=\"memberNameLink\"><a href=\"#Dime\">Dime</a></span>",
                 // Automatically insert documentation for values() and valueOf().
                 "Returns an array containing the constants of this enum type,",
                 "Returns the enum constant of this type with the specified name",
                 "for (Coin c : Coin.values())",
                 "Overloaded valueOf() method has correct documentation.",
                 "Overloaded values method  has correct documentation.",
-                "<pre>public static&nbsp;<a href=\"../pkg/Coin.html\" title=\"enum in pkg\">Coin</a>" +
+                "<pre>public static&nbsp;<a href=\"Coin.html\" title=\"enum in pkg\">Coin</a>" +
                 "&nbsp;valueOf&#8203;(java.lang.String&nbsp;name)</pre>\n" +
                 "<div class=\"block\">Returns the enum constant of this type with the specified name.\n" +
                 "The string must match <i>exactly</i> an identifier used to declare an\n" +
@@ -117,11 +117,11 @@
                 "<dl>\n"
                 + "<dt><span class=\"seeLabel\">See Also:</span></dt>\n"
                 + "<dd>"
-                + "<a href=\"../pkg/TypeParameters.html\" title=\"class in pkg\">"
+                + "<a href=\"TypeParameters.html\" title=\"class in pkg\">"
                 + "<code>TypeParameters</code></a></dd>\n"
                 + "</dl>",
                 // Method that uses class type parameter.
-                "(<a href=\"../pkg/TypeParameters.html\" title=\"type "
+                "(<a href=\"TypeParameters.html\" title=\"type "
                 + "parameter in TypeParameters\">E</a>&nbsp;param)",
                 // Method type parameter section.
                 "<span class=\"paramLabel\">Type Parameters:</span></dt>\n"
@@ -133,38 +133,38 @@
                 "public&nbsp;&lt;T extends java.util.List,V&gt;&nbsp;"
                 + "java.lang.String[]&nbsp;methodThatHasTypeParameters",
                 // Method that returns TypeParameters
-                "<td class=\"colFirst\"><code><a href=\"../pkg/TypeParameters.html\" "
+                "<td class=\"colFirst\"><code><a href=\"TypeParameters.html\" "
                 + "title=\"type parameter in TypeParameters\">E</a>[]</code></td>\n"
                 + "<th class=\"colSecond\" scope=\"row\"><code><span class=\"memberNameLink\">"
-                + "<a href=\"../pkg/TypeParameters.html#methodThatReturnsTypeParameterA-E:A-\">"
-                + "methodThatReturnsTypeParameterA</a></span>&#8203;(<a href=\"../pkg/TypeParameters.html\" "
+                + "<a href=\"#methodThatReturnsTypeParameterA-E:A-\">"
+                + "methodThatReturnsTypeParameterA</a></span>&#8203;(<a href=\"TypeParameters.html\" "
                 + "title=\"type parameter in TypeParameters\">E</a>[]&nbsp;e)</code>",
-                "<pre>public&nbsp;<a href=\"../pkg/TypeParameters.html\" "
+                "<pre>public&nbsp;<a href=\"TypeParameters.html\" "
                 + "title=\"type parameter in TypeParameters\">E</a>[]&nbsp;"
-                + "methodThatReturnsTypeParameterA&#8203;(<a href=\"../pkg/TypeParameters.html\" "
+                + "methodThatReturnsTypeParameterA&#8203;(<a href=\"TypeParameters.html\" "
                 + "title=\"type parameter in TypeParameters\">E</a>[]&nbsp;e)</pre>\n",
                 "<td class=\"colFirst\"><code>&lt;T extends java.lang.Object &amp; java.lang.Comparable&lt;? super T&gt;&gt;"
                 + "<br>T</code></td>\n"
                 + "<th class=\"colSecond\" scope=\"row\"><code><span class=\"memberNameLink\">"
-                + "<a href=\"../pkg/TypeParameters.html#methodtThatReturnsTypeParametersB-java.util.Collection-\">"
+                + "<a href=\"#methodtThatReturnsTypeParametersB-java.util.Collection-\">"
                 + "methodtThatReturnsTypeParametersB</a></span>&#8203;(java.util.Collection&lt;? extends T&gt;&nbsp;coll)</code>",
                 "<div class=\"block\">Returns TypeParameters</div>\n",
                 // Method takes a TypeVariable
                 "<td class=\"colFirst\"><code>&lt;X extends java.lang.Throwable&gt;<br>"
-                + "<a href=\"../pkg/TypeParameters.html\" title=\"type parameter in TypeParameters\">E</a>"
+                + "<a href=\"TypeParameters.html\" title=\"type parameter in TypeParameters\">E</a>"
                 + "</code></td>\n"
                 + "<th class=\"colSecond\" scope=\"row\"><code><span class=\"memberNameLink\">"
-                + "<a href=\"../pkg/TypeParameters.html#orElseThrow-java.util.function.Supplier-\">"
+                + "<a href=\"#orElseThrow-java.util.function.Supplier-\">"
                 + "orElseThrow</a></span>&#8203;(java.util.function.Supplier&lt;? extends X&gt;&nbsp;exceptionSupplier)</code>"
                 );
 
         checkOutput("pkg/Wildcards.html", true,
                 // Wildcard testing.
-                "<a href=\"../pkg/TypeParameters.html\" title=\"class in pkg\">"
+                "<a href=\"TypeParameters.html\" title=\"class in pkg\">"
                 + "TypeParameters</a>&lt;? super java.lang.String&gt;&nbsp;a",
-                "<a href=\"../pkg/TypeParameters.html\" title=\"class in pkg\">"
+                "<a href=\"TypeParameters.html\" title=\"class in pkg\">"
                 + "TypeParameters</a>&lt;? extends java.lang.StringBuffer&gt;&nbsp;b",
-                "<a href=\"../pkg/TypeParameters.html\" title=\"class in pkg\">"
+                "<a href=\"TypeParameters.html\" title=\"class in pkg\">"
                 + "TypeParameters</a>&nbsp;c");
 
         checkOutput(Output.OUT, true,
@@ -179,7 +179,7 @@
                 "<pre>public class <span class=\"typeNameLabel\">TypeParameterSubClass&lt;T extends "
                 + "java.lang.String&gt;</span>\n"
                 + "extends "
-                + "<a href=\"../pkg/TypeParameterSuperClass.html\" title=\"class in pkg\">"
+                + "<a href=\"TypeParameterSuperClass.html\" title=\"class in pkg\">"
                 + "TypeParameterSuperClass</a>&lt;T&gt;</pre>");
 
         // Interface generic parameter substitution
@@ -187,21 +187,21 @@
         checkOutput("pkg/TypeParameters.html", true,
                 "<dl>\n"
                 + "<dt>All Implemented Interfaces:</dt>\n"
-                + "<dd><code><a href=\"../pkg/SubInterface.html\" title=\"interface in pkg\">"
-                + "SubInterface</a>&lt;E&gt;</code>, <code><a href=\"../pkg/SuperInterface.html\" "
+                + "<dd><code><a href=\"SubInterface.html\" title=\"interface in pkg\">"
+                + "SubInterface</a>&lt;E&gt;</code>, <code><a href=\"SuperInterface.html\" "
                 + "title=\"interface in pkg\">SuperInterface</a>&lt;E&gt;</code></dd>\n"
                 + "</dl>");
 
         checkOutput("pkg/SuperInterface.html", true,
                 "<dl>\n"
                 + "<dt>All Known Subinterfaces:</dt>\n"
-                + "<dd><code><a href=\"../pkg/SubInterface.html\" title=\"interface in pkg\">"
+                + "<dd><code><a href=\"SubInterface.html\" title=\"interface in pkg\">"
                 + "SubInterface</a>&lt;V&gt;</code></dd>\n"
                 + "</dl>");
         checkOutput("pkg/SubInterface.html", true,
                 "<dl>\n"
                 + "<dt>All Superinterfaces:</dt>\n"
-                + "<dd><code><a href=\"../pkg/SuperInterface.html\" title=\"interface in pkg\">"
+                + "<dd><code><a href=\"SuperInterface.html\" title=\"interface in pkg\">"
                 + "SuperInterface</a>&lt;V&gt;</code></dd>\n"
                 + "</dl>");
 
@@ -216,212 +216,212 @@
         //==============================================================
         // ClassUseTest1: <T extends Foo & Foo2>
         checkOutput("pkg2/class-use/Foo.html", true,
-                "<caption><span>Classes in <a href=\"../../pkg2/"
+                "<caption><span>Classes in <a href=\"../"
                 + "package-summary.html\">pkg2</a> with type parameters of "
-                + "type <a href=\"../../pkg2/Foo.html\" title=\"class in pkg2\">"
+                + "type <a href=\"../Foo.html\" title=\"class in pkg2\">"
                 + "Foo</a></span><span class=\"tabEnd\">&nbsp;</span></caption>",
-                "<th class=\"colSecond\" scope=\"row\"><code><span class=\"memberNameLink\"><a href=\"../../pkg2/ClassUseTest1.html\" "
+                "<th class=\"colSecond\" scope=\"row\"><code><span class=\"memberNameLink\"><a href=\"../ClassUseTest1.html\" "
                 + "title=\"class in pkg2\">ClassUseTest1</a>&lt;T extends "
-                + "<a href=\"../../pkg2/Foo.html\" title=\"class in pkg2\">Foo"
-                + "</a> &amp; <a href=\"../../pkg2/Foo2.html\" title=\"interface in pkg2\">"
+                + "<a href=\"../Foo.html\" title=\"class in pkg2\">Foo"
+                + "</a> &amp; <a href=\"../Foo2.html\" title=\"interface in pkg2\">"
                 + "Foo2</a>&gt;</span></code></th>",
-                "<caption><span>Methods in <a href=\"../../pkg2/"
+                "<caption><span>Methods in <a href=\"../"
                 + "package-summary.html\">pkg2</a> with type parameters of "
-                + "type <a href=\"../../pkg2/Foo.html\" title=\"class in "
+                + "type <a href=\"../Foo.html\" title=\"class in "
                 + "pkg2\">Foo</a></span><span class=\"tabEnd\">&nbsp;</span></caption>",
                 "<th class=\"colSecond\" scope=\"row\"><span class=\"typeNameLabel\">ClassUseTest1."
-                + "</span><code><span class=\"memberNameLink\"><a href=\"../../pkg2/"
+                + "</span><code><span class=\"memberNameLink\"><a href=\"../"
                 + "ClassUseTest1.html#method-T-\">method</a></span>"
                 + "&#8203;(T&nbsp;t)</code></th>",
-                "<caption><span>Fields in <a href=\"../../pkg2/"
+                "<caption><span>Fields in <a href=\"../"
                 + "package-summary.html\">pkg2</a> with type parameters of "
-                + "type <a href=\"../../pkg2/Foo.html\" title=\"class in pkg2\">"
+                + "type <a href=\"../Foo.html\" title=\"class in pkg2\">"
                 + "Foo</a></span><span class=\"tabEnd\">&nbsp;</span></caption>",
-                "td class=\"colFirst\"><code><a href=\"../../pkg2/"
+                "td class=\"colFirst\"><code><a href=\"../"
                 + "ParamTest.html\" title=\"class in pkg2\">ParamTest</a>"
-                + "&lt;<a href=\"../../pkg2/Foo.html\" title=\"class in pkg2\""
+                + "&lt;<a href=\"../Foo.html\" title=\"class in pkg2\""
                 + ">Foo</a>&gt;</code></td>"
         );
 
         checkOutput("pkg2/class-use/ParamTest.html", true,
-                "<caption><span>Fields in <a href=\"../../pkg2/"
+                "<caption><span>Fields in <a href=\"../"
                 + "package-summary.html\">pkg2</a> declared as <a href=\"../"
-                + "../pkg2/ParamTest.html\" title=\"class in pkg2\">ParamTest"
+                + "ParamTest.html\" title=\"class in pkg2\">ParamTest"
                 + "</a></span><span class=\"tabEnd\">&nbsp;</span></caption>",
-                "<td class=\"colFirst\"><code><a href=\"../../pkg2/"
+                "<td class=\"colFirst\"><code><a href=\"../"
                 + "ParamTest.html\" title=\"class in pkg2\">ParamTest</a>&lt;<a "
-                + "href=\"../../pkg2/Foo.html\" title=\"class in pkg2\">Foo</a"
+                + "href=\"../Foo.html\" title=\"class in pkg2\">Foo</a"
                 + ">&gt;</code></td>"
         );
 
         checkOutput("pkg2/class-use/Foo2.html", true,
-                "<caption><span>Classes in <a href=\"../../pkg2/"
+                "<caption><span>Classes in <a href=\"../"
                 + "package-summary.html\">pkg2</a> with type parameters of "
-                + "type <a href=\"../../pkg2/Foo2.html\" title=\"interface "
+                + "type <a href=\"../Foo2.html\" title=\"interface "
                 + "in pkg2\">Foo2</a></span><span class=\"tabEnd\">&nbsp;"
                 + "</span></caption>",
-                "<th class=\"colSecond\" scope=\"row\"><code><span class=\"memberNameLink\"><a href=\"../../pkg2/ClassUseTest1.html\" "
+                "<th class=\"colSecond\" scope=\"row\"><code><span class=\"memberNameLink\"><a href=\"../ClassUseTest1.html\" "
                 + "title=\"class in pkg2\">ClassUseTest1</a>&lt;T extends "
-                + "<a href=\"../../pkg2/Foo.html\" title=\"class in pkg2\">Foo"
-                + "</a> &amp; <a href=\"../../pkg2/Foo2.html\" title=\"interface in pkg2\">"
+                + "<a href=\"../Foo.html\" title=\"class in pkg2\">Foo"
+                + "</a> &amp; <a href=\"../Foo2.html\" title=\"interface in pkg2\">"
                 + "Foo2</a>&gt;</span></code></th>",
-                "<caption><span>Methods in <a href=\"../../pkg2/"
+                "<caption><span>Methods in <a href=\"../"
                 + "package-summary.html\">pkg2</a> with type parameters of "
-                + "type <a href=\"../../pkg2/Foo2.html\" title=\"interface "
+                + "type <a href=\"../Foo2.html\" title=\"interface "
                 + "in pkg2\">Foo2</a></span><span class=\"tabEnd\">&nbsp;"
                 + "</span></caption>",
                 "<th class=\"colSecond\" scope=\"row\"><span class=\"typeNameLabel\">"
-                + "ClassUseTest1.</span><code><span class=\"memberNameLink\"><a href=\"../../"
-                + "pkg2/ClassUseTest1.html#method-T-\">method</a></span>"
+                + "ClassUseTest1.</span><code><span class=\"memberNameLink\"><a href=\"../"
+                + "ClassUseTest1.html#method-T-\">method</a></span>"
                 + "&#8203;(T&nbsp;t)</code></th>"
         );
 
         // ClassUseTest2: <T extends ParamTest<Foo3>>
         checkOutput("pkg2/class-use/ParamTest.html", true,
-                "<caption><span>Classes in <a href=\"../../pkg2/"
+                "<caption><span>Classes in <a href=\"../"
                 + "package-summary.html\">pkg2</a> with type parameters of "
-                + "type <a href=\"../../pkg2/ParamTest.html\" title=\"class "
+                + "type <a href=\"../ParamTest.html\" title=\"class "
                 + "in pkg2\">ParamTest</a></span><span class=\"tabEnd\">"
                 + "&nbsp;</span></caption>",
-                "<th class=\"colSecond\" scope=\"row\"><code><span class=\"memberNameLink\"><a href=\"../../pkg2/ClassUseTest2.html\" "
+                "<th class=\"colSecond\" scope=\"row\"><code><span class=\"memberNameLink\"><a href=\"../ClassUseTest2.html\" "
                 + "title=\"class in pkg2\">ClassUseTest2</a>&lt;T extends "
-                + "<a href=\"../../pkg2/ParamTest.html\" title=\"class in pkg2\">"
-                + "ParamTest</a>&lt;<a href=\"../../pkg2/Foo3.html\" title=\"class in pkg2\">"
+                + "<a href=\"../ParamTest.html\" title=\"class in pkg2\">"
+                + "ParamTest</a>&lt;<a href=\"../Foo3.html\" title=\"class in pkg2\">"
                 + "Foo3</a>&gt;&gt;</span></code></th>",
-                "<caption><span>Methods in <a href=\"../../pkg2/"
+                "<caption><span>Methods in <a href=\"../"
                 + "package-summary.html\">pkg2</a> with type parameters of "
-                + "type <a href=\"../../pkg2/ParamTest.html\" title=\"class "
+                + "type <a href=\"../ParamTest.html\" title=\"class "
                 + "in pkg2\">ParamTest</a></span><span class=\"tabEnd\">"
                 + "&nbsp;</span></caption>",
                 "<th class=\"colSecond\" scope=\"row\"><span class=\"typeNameLabel\">ClassUseTest2."
-                + "</span><code><span class=\"memberNameLink\"><a href=\"../../pkg2/"
+                + "</span><code><span class=\"memberNameLink\"><a href=\"../"
                 + "ClassUseTest2.html#method-T-\">method</a></span>"
                 + "&#8203;(T&nbsp;t)</code></th>",
-                "<caption><span>Fields in <a href=\"../../pkg2/"
+                "<caption><span>Fields in <a href=\"../"
                 + "package-summary.html\">pkg2</a> declared as <a href=\"../"
-                + "../pkg2/ParamTest.html\" title=\"class in pkg2\">ParamTest"
+                + "ParamTest.html\" title=\"class in pkg2\">ParamTest"
                 + "</a></span><span class=\"tabEnd\">&nbsp;</span></caption>",
-                "<td class=\"colFirst\"><code><a href=\"../../pkg2/"
+                "<td class=\"colFirst\"><code><a href=\"../"
                 + "ParamTest.html\" title=\"class in pkg2\">ParamTest</a>"
-                + "&lt;<a href=\"../../pkg2/Foo.html\" title=\"class in pkg2\">"
+                + "&lt;<a href=\"../Foo.html\" title=\"class in pkg2\">"
                 + "Foo</a>&gt;</code></td>",
-                "<caption><span>Methods in <a href=\"../../pkg2/"
+                "<caption><span>Methods in <a href=\"../"
                 + "package-summary.html\">pkg2</a> with type parameters of "
-                + "type <a href=\"../../pkg2/ParamTest.html\" title=\"class "
+                + "type <a href=\"../ParamTest.html\" title=\"class "
                 + "in pkg2\">ParamTest</a></span><span class=\"tabEnd\">"
                 + "&nbsp;</span></caption>",
                 "<td class=\"colFirst\"><code>&lt;T extends <a href=\"../"
-                + "../pkg2/ParamTest.html\" title=\"class in pkg2\">ParamTest"
-                + "</a>&lt;<a href=\"../../pkg2/Foo3.html\" title=\"class in "
-                + "pkg2\">Foo3</a>&gt;&gt;<br><a href=\"../../pkg2/"
+                + "ParamTest.html\" title=\"class in pkg2\">ParamTest"
+                + "</a>&lt;<a href=\"../Foo3.html\" title=\"class in "
+                + "pkg2\">Foo3</a>&gt;&gt;<br><a href=\"../"
                 + "ParamTest.html\" title=\"class in pkg2\">ParamTest</a>"
-                + "&lt;<a href=\"../../pkg2/Foo3.html\" title=\"class in "
+                + "&lt;<a href=\"../Foo3.html\" title=\"class in "
                 + "pkg2\">Foo3</a>&gt;</code></td>"
         );
 
         checkOutput("pkg2/class-use/Foo3.html", true,
-                "<caption><span>Classes in <a href=\"../../pkg2/"
+                "<caption><span>Classes in <a href=\"../"
                 + "package-summary.html\">pkg2</a> with type parameters of "
-                + "type <a href=\"../../pkg2/Foo3.html\" title=\"class in pkg2\">"
+                + "type <a href=\"../Foo3.html\" title=\"class in pkg2\">"
                 + "Foo3</a></span><span class=\"tabEnd\">&nbsp;</span></caption>",
-                "<th class=\"colSecond\" scope=\"row\"><code><span class=\"memberNameLink\"><a href=\"../../pkg2/ClassUseTest2.html\" "
+                "<th class=\"colSecond\" scope=\"row\"><code><span class=\"memberNameLink\"><a href=\"../ClassUseTest2.html\" "
                 + "title=\"class in pkg2\">ClassUseTest2</a>&lt;T extends "
-                + "<a href=\"../../pkg2/ParamTest.html\" title=\"class in pkg2\">"
-                + "ParamTest</a>&lt;<a href=\"../../pkg2/Foo3.html\" title=\"class in pkg2\">"
+                + "<a href=\"../ParamTest.html\" title=\"class in pkg2\">"
+                + "ParamTest</a>&lt;<a href=\"../Foo3.html\" title=\"class in pkg2\">"
                 + "Foo3</a>&gt;&gt;</span></code></th>",
-                "<caption><span>Methods in <a href=\"../../pkg2/"
+                "<caption><span>Methods in <a href=\"../"
                 + "package-summary.html\">pkg2</a> with type parameters of "
-                + "type <a href=\"../../pkg2/Foo3.html\" title=\"class in "
+                + "type <a href=\"../Foo3.html\" title=\"class in "
                 + "pkg2\">Foo3</a></span><span class=\"tabEnd\">&nbsp;"
                 + "</span></caption>",
                 "<th class=\"colSecond\" scope=\"row\"><span class=\"typeNameLabel\">ClassUseTest2."
-                + "</span><code><span class=\"memberNameLink\"><a href=\"../../pkg2/"
+                + "</span><code><span class=\"memberNameLink\"><a href=\"../"
                 + "ClassUseTest2.html#method-T-\">method</a></span>"
                 + "&#8203;(T&nbsp;t)</code></th>",
-                "<caption><span>Methods in <a href=\"../../pkg2/"
+                "<caption><span>Methods in <a href=\"../"
                 + "package-summary.html\">pkg2</a> that return types with "
-                + "arguments of type <a href=\"../../pkg2/Foo3.html\" title"
+                + "arguments of type <a href=\"../Foo3.html\" title"
                 + "=\"class in pkg2\">Foo3</a></span><span class=\"tabEnd\">"
                 + "&nbsp;</span></caption>",
-                "<td class=\"colFirst\"><code>&lt;T extends <a href=\"../../"
-                + "pkg2/ParamTest.html\" title=\"class in pkg2\">ParamTest</a>&lt;"
-                + "<a href=\"../../pkg2/Foo3.html\" title=\"class in pkg2\">Foo3"
-                + "</a>&gt;&gt;<br><a href=\"../../pkg2/ParamTest.html\" "
-                + "title=\"class in pkg2\">ParamTest</a>&lt;<a href=\"../../pkg2/"
+                "<td class=\"colFirst\"><code>&lt;T extends <a href=\"../"
+                + "ParamTest.html\" title=\"class in pkg2\">ParamTest</a>&lt;"
+                + "<a href=\"../Foo3.html\" title=\"class in pkg2\">Foo3"
+                + "</a>&gt;&gt;<br><a href=\"../ParamTest.html\" "
+                + "title=\"class in pkg2\">ParamTest</a>&lt;<a href=\"../"
                 + "Foo3.html\" title=\"class in pkg2\">Foo3</a>&gt;</code></td>"
         );
 
         // ClassUseTest3: <T extends ParamTest2<List<? extends Foo4>>>
         checkOutput("pkg2/class-use/ParamTest2.html", true,
-                "<caption><span>Classes in <a href=\"../../pkg2/"
+                "<caption><span>Classes in <a href=\"../"
                 + "package-summary.html\">pkg2</a> with type parameters of "
-                + "type <a href=\"../../pkg2/ParamTest2.html\" title=\"class "
+                + "type <a href=\"../ParamTest2.html\" title=\"class "
                 + "in pkg2\">ParamTest2</a></span><span class=\"tabEnd\">"
                 + "&nbsp;</span></caption>",
-                "<th class=\"colSecond\" scope=\"row\"><code><span class=\"memberNameLink\"><a href=\"../../pkg2/ClassUseTest3.html\" "
+                "<th class=\"colSecond\" scope=\"row\"><code><span class=\"memberNameLink\"><a href=\"../ClassUseTest3.html\" "
                 + "title=\"class in pkg2\">ClassUseTest3</a>&lt;T extends "
-                + "<a href=\"../../pkg2/ParamTest2.html\" title=\"class in pkg2\">"
+                + "<a href=\"../ParamTest2.html\" title=\"class in pkg2\">"
                 + "ParamTest2</a>&lt;java.util.List&lt;? extends "
-                + "<a href=\"../../pkg2/Foo4.html\" title=\"class in pkg2\">"
+                + "<a href=\"../Foo4.html\" title=\"class in pkg2\">"
                 + "Foo4</a>&gt;&gt;&gt;</span></code></th>",
-                "<caption><span>Methods in <a href=\"../../pkg2/"
+                "<caption><span>Methods in <a href=\"../"
                 + "package-summary.html\">pkg2</a> with type parameters of "
-                + "type <a href=\"../../pkg2/ParamTest2.html\" title=\"class "
+                + "type <a href=\"../ParamTest2.html\" title=\"class "
                 + "in pkg2\">ParamTest2</a></span><span class=\"tabEnd\">"
                 + "&nbsp;</span></caption>",
                 "<th class=\"colSecond\" scope=\"row\"><span class=\"typeNameLabel\">ClassUseTest3"
-                + ".</span><code><span class=\"memberNameLink\"><a href=\"../../pkg2/ClassUseTest3."
+                + ".</span><code><span class=\"memberNameLink\"><a href=\"../ClassUseTest3."
                 + "html#method-T-\">method</a></span>&#8203;(T&nbsp;t)</code></th>",
                 "<td class=\"colFirst\"><code>&lt;T extends <a href=\"../"
-                + "../pkg2/ParamTest2.html\" title=\"class in pkg2\">"
+                + "ParamTest2.html\" title=\"class in pkg2\">"
                 + "ParamTest2</a>&lt;java.util.List&lt;? extends <a href=\".."
-                + "/../pkg2/Foo4.html\" title=\"class in pkg2\">Foo4</a>&gt;"
-                + "&gt;&gt;<br><a href=\"../../pkg2/ParamTest2.html\" "
+                + "/Foo4.html\" title=\"class in pkg2\">Foo4</a>&gt;"
+                + "&gt;&gt;<br><a href=\"../ParamTest2.html\" "
                 + "title=\"class in pkg2\">ParamTest2</a>&lt;java.util.List"
-                + "&lt;? extends <a href=\"../../pkg2/Foo4.html\" title=\""
+                + "&lt;? extends <a href=\"../Foo4.html\" title=\""
                 + "class in pkg2\">Foo4</a>&gt;&gt;</code></td>"
         );
 
         checkOutput("pkg2/class-use/Foo4.html", true,
-                "<caption><span>Classes in <a href=\"../../pkg2/"
+                "<caption><span>Classes in <a href=\"../"
                 + "package-summary.html\">pkg2</a> with type parameters of "
-                + "type <a href=\"../../pkg2/Foo4.html\" title=\"class in "
+                + "type <a href=\"../Foo4.html\" title=\"class in "
                 + "pkg2\">Foo4</a></span><span class=\"tabEnd\">&nbsp;"
                 + "</span></caption>",
-                "<th class=\"colSecond\" scope=\"row\"><code><span class=\"memberNameLink\"><a href=\"../../pkg2/ClassUseTest3.html\" "
+                "<th class=\"colSecond\" scope=\"row\"><code><span class=\"memberNameLink\"><a href=\"../ClassUseTest3.html\" "
                 + "title=\"class in pkg2\">ClassUseTest3</a>&lt;T extends "
-                + "<a href=\"../../pkg2/ParamTest2.html\" title=\"class in pkg2\">"
+                + "<a href=\"../ParamTest2.html\" title=\"class in pkg2\">"
                 + "ParamTest2</a>&lt;java.util.List&lt;? extends "
-                + "<a href=\"../../pkg2/Foo4.html\" title=\"class in pkg2\">"
+                + "<a href=\"../Foo4.html\" title=\"class in pkg2\">"
                 + "Foo4</a>&gt;&gt;&gt;</span></code></th>",
-                "<caption><span>Methods in <a href=\"../../pkg2/"
+                "<caption><span>Methods in <a href=\"../"
                 + "package-summary.html\">pkg2</a> with type parameters of "
-                + "type <a href=\"../../pkg2/Foo4.html\" title=\"class in "
+                + "type <a href=\"../Foo4.html\" title=\"class in "
                 + "pkg2\">Foo4</a></span><span class=\"tabEnd\">&nbsp;</span></caption>",
                 "<th class=\"colSecond\" scope=\"row\"><span class=\"typeNameLabel\">ClassUseTest3."
-                + "</span><code><span class=\"memberNameLink\"><a href=\"../../pkg2/ClassUseTest3."
+                + "</span><code><span class=\"memberNameLink\"><a href=\"../ClassUseTest3."
                 + "html#method-T-\">method</a></span>&#8203;(T&nbsp;t)</code>"
                 + "</th>",
-                "<caption><span>Methods in <a href=\"../../pkg2/"
+                "<caption><span>Methods in <a href=\"../"
                 + "package-summary.html\">pkg2</a> that return types with "
-                + "arguments of type <a href=\"../../pkg2/Foo4.html\" "
+                + "arguments of type <a href=\"../Foo4.html\" "
                 + "title=\"class in pkg2\">Foo4</a></span><span class=\""
                 + "tabEnd\">&nbsp;</span></caption>",
                 "<td class=\"colFirst\"><code>&lt;T extends <a href=\"../"
-                + "../pkg2/ParamTest2.html\" title=\"class in pkg2\">"
+                + "ParamTest2.html\" title=\"class in pkg2\">"
                 + "ParamTest2</a>&lt;java.util.List&lt;? extends <a href=\".."
-                + "/../pkg2/Foo4.html\" title=\"class in pkg2\">Foo4</a>&gt;"
-                + "&gt;&gt;<br><a href=\"../../pkg2/ParamTest2.html\" "
+                + "/Foo4.html\" title=\"class in pkg2\">Foo4</a>&gt;"
+                + "&gt;&gt;<br><a href=\"../ParamTest2.html\" "
                 + "title=\"class in pkg2\">ParamTest2</a>&lt;java.util.List"
-                + "&lt;? extends <a href=\"../../pkg2/Foo4.html\" title=\""
+                + "&lt;? extends <a href=\"../Foo4.html\" title=\""
                 + "class in pkg2\">Foo4</a>&gt;&gt;</code></td>"
         );
 
         // Type parameters in constructor and method args
         checkOutput("pkg2/class-use/Foo4.html", true,
-                "<caption><span>Method parameters in <a href=\"../../pkg2/"
+                "<caption><span>Method parameters in <a href=\"../"
                 + "package-summary.html\">pkg2</a> with type arguments of "
-                + "type <a href=\"../../pkg2/Foo4.html\" title=\"class in "
+                + "type <a href=\"../Foo4.html\" title=\"class in "
                 + "pkg2\">Foo4</a></span><span class=\"tabEnd\">&nbsp;"
                 + "</span></caption>\n"
                 + "<tr>\n"
@@ -433,13 +433,13 @@
                 + "<tr class=\"altColor\">\n"
                 + "<td class=\"colFirst\"><code>void</code></td>\n"
                 + "<th class=\"colSecond\" scope=\"row\"><span class=\"typeNameLabel\">ClassUseTest3."
-                + "</span><code><span class=\"memberNameLink\"><a href=\"../../pkg2/ClassUseTest3."
+                + "</span><code><span class=\"memberNameLink\"><a href=\"../ClassUseTest3."
                 + "html#method-java.util.Set-\">method</a></span>&#8203;(java."
-                + "util.Set&lt;<a href=\"../../pkg2/Foo4.html\" title=\""
+                + "util.Set&lt;<a href=\"../Foo4.html\" title=\""
                 + "class in pkg2\">Foo4</a>&gt;&nbsp;p)</code></th>",
-                "<caption><span>Constructor parameters in <a href=\"../../"
-                + "pkg2/package-summary.html\">pkg2</a> with type arguments "
-                + "of type <a href=\"../../pkg2/Foo4.html\" title=\"class in "
+                "<caption><span>Constructor parameters in <a href=\"../"
+                + "package-summary.html\">pkg2</a> with type arguments "
+                + "of type <a href=\"../Foo4.html\" title=\"class in "
                 + "pkg2\">Foo4</a></span><span class=\"tabEnd\">&nbsp;"
                 + "</span></caption>"
         );
@@ -478,7 +478,7 @@
                 "(int...&nbsp;i)",
                 "(int[][]...&nbsp;i)",
                 "-int:A...-",
-                "<a href=\"../pkg/TypeParameters.html\" title=\"class in pkg\">"
+                "<a href=\"TypeParameters.html\" title=\"class in pkg\">"
                 + "TypeParameters</a>...&nbsp;t");
     }
 
@@ -520,58 +520,58 @@
     void checkAnnotationTypeUsage() {
         checkOutput("pkg/package-summary.html", true,
                 // PACKAGE
-                "<a href=\"../pkg/AnnotationType.html\" title=\"annotation in pkg\">@AnnotationType</a>(<a href=\"../pkg/AnnotationType.html#optional--\">optional</a>=\"Package Annotation\",\n"
-                + "                <a href=\"../pkg/AnnotationType.html#required--\">required</a>=1994)");
+                "<a href=\"AnnotationType.html\" title=\"annotation in pkg\">@AnnotationType</a>(<a href=\"AnnotationType.html#optional--\">optional</a>=\"Package Annotation\",\n"
+                + "                <a href=\"AnnotationType.html#required--\">required</a>=1994)");
 
         checkOutput("pkg/AnnotationTypeUsage.html", true,
                 // CLASS
-                "<pre><a href=\"../pkg/AnnotationType.html\" "
+                "<pre><a href=\"AnnotationType.html\" "
                 + "title=\"annotation in pkg\">@AnnotationType</a>("
-                + "<a href=\"../pkg/AnnotationType.html#optional--\">optional</a>"
+                + "<a href=\"AnnotationType.html#optional--\">optional</a>"
                 + "=\"Class Annotation\",\n"
-                + "                <a href=\"../pkg/AnnotationType.html#required--\">"
+                + "                <a href=\"AnnotationType.html#required--\">"
                 + "required</a>=1994)\n"
                 + "public class <span class=\"typeNameLabel\">"
                 + "AnnotationTypeUsage</span>\n"
                 + "extends java.lang.Object</pre>",
                 // FIELD
-                "<pre><a href=\"../pkg/AnnotationType.html\" "
+                "<pre><a href=\"AnnotationType.html\" "
                 + "title=\"annotation in pkg\">@AnnotationType</a>("
-                + "<a href=\"../pkg/AnnotationType.html#optional--\">optional</a>"
+                + "<a href=\"AnnotationType.html#optional--\">optional</a>"
                 + "=\"Field Annotation\",\n"
-                + "                <a href=\"../pkg/AnnotationType.html#required--\">"
+                + "                <a href=\"AnnotationType.html#required--\">"
                 + "required</a>=1994)\n"
                 + "public&nbsp;int field</pre>",
                 // CONSTRUCTOR
-                "<pre><a href=\"../pkg/AnnotationType.html\" "
+                "<pre><a href=\"AnnotationType.html\" "
                 + "title=\"annotation in pkg\">@AnnotationType</a>("
-                + "<a href=\"../pkg/AnnotationType.html#optional--\">optional</a>"
+                + "<a href=\"AnnotationType.html#optional--\">optional</a>"
                 + "=\"Constructor Annotation\",\n"
-                + "                <a href=\"../pkg/AnnotationType.html#required--\">"
+                + "                <a href=\"AnnotationType.html#required--\">"
                 + "required</a>=1994)\n"
                 + "public&nbsp;AnnotationTypeUsage()</pre>",
                 // METHOD
-                "<pre><a href=\"../pkg/AnnotationType.html\" "
+                "<pre><a href=\"AnnotationType.html\" "
                 + "title=\"annotation in pkg\">@AnnotationType</a>("
-                + "<a href=\"../pkg/AnnotationType.html#optional--\">optional</a>"
+                + "<a href=\"AnnotationType.html#optional--\">optional</a>"
                 + "=\"Method Annotation\",\n"
-                + "                <a href=\"../pkg/AnnotationType.html#required--\">"
+                + "                <a href=\"AnnotationType.html#required--\">"
                 + "required</a>=1994)\n"
                 + "public&nbsp;void&nbsp;method()</pre>",
                 // METHOD PARAMS
                 "<pre>public&nbsp;void&nbsp;methodWithParams&#8203;("
-                + "<a href=\"../pkg/AnnotationType.html\" title=\"annotation in pkg\">"
-                + "@AnnotationType</a>(<a href=\"../pkg/AnnotationType.html#optional--\">"
+                + "<a href=\"AnnotationType.html\" title=\"annotation in pkg\">"
+                + "@AnnotationType</a>(<a href=\"AnnotationType.html#optional--\">"
                 + "optional</a>=\"Parameter Annotation\",<a "
-                + "href=\"../pkg/AnnotationType.html#required--\">required</a>=1994)\n"
+                + "href=\"AnnotationType.html#required--\">required</a>=1994)\n"
                 + "                             int&nbsp;documented,\n"
                 + "                             int&nbsp;undocmented)</pre>",
                 // CONSTRUCTOR PARAMS
                 "<pre>public&nbsp;AnnotationTypeUsage&#8203;(<a "
-                + "href=\"../pkg/AnnotationType.html\" title=\"annotation in pkg\">"
-                + "@AnnotationType</a>(<a href=\"../pkg/AnnotationType.html#optional--\">"
+                + "href=\"AnnotationType.html\" title=\"annotation in pkg\">"
+                + "@AnnotationType</a>(<a href=\"AnnotationType.html#optional--\">"
                 + "optional</a>=\"Constructor Param Annotation\",<a "
-                + "href=\"../pkg/AnnotationType.html#required--\">required</a>=1994)\n"
+                + "href=\"AnnotationType.html#required--\">required</a>=1994)\n"
                 + "                           int&nbsp;documented,\n"
                 + "                           int&nbsp;undocmented)</pre>");
 
@@ -580,37 +580,37 @@
         //=================================
         checkOutput("pkg/class-use/AnnotationType.html", true,
                 "<caption><span>Packages with annotations of type <a href=\""
-                + "../../pkg/AnnotationType.html\" title=\"annotation in pkg\">"
+                + "../AnnotationType.html\" title=\"annotation in pkg\">"
                 + "AnnotationType</a></span><span class=\"tabEnd\">&nbsp;"
                 + "</span></caption>",
-                "<caption><span>Classes in <a href=\"../../pkg/"
+                "<caption><span>Classes in <a href=\"../"
                 + "package-summary.html\">pkg</a> with annotations of type "
-                + "<a href=\"../../pkg/AnnotationType.html\" title=\""
+                + "<a href=\"../AnnotationType.html\" title=\""
                 + "annotation in pkg\">AnnotationType</a></span><span class"
                 + "=\"tabEnd\">&nbsp;</span></caption>",
-                "<caption><span>Fields in <a href=\"../../pkg/"
+                "<caption><span>Fields in <a href=\"../"
                 + "package-summary.html\">pkg</a> with annotations of type "
-                + "<a href=\"../../pkg/AnnotationType.html\" title=\"annotation "
+                + "<a href=\"../AnnotationType.html\" title=\"annotation "
                 + "in pkg\">AnnotationType</a></span><span class=\"tabEnd\">"
                 + "&nbsp;</span></caption>",
-                "<caption><span>Methods in <a href=\"../../pkg/"
+                "<caption><span>Methods in <a href=\"../"
                 + "package-summary.html\">pkg</a> with annotations of type "
-                + "<a href=\"../../pkg/AnnotationType.html\" title=\"annotation "
+                + "<a href=\"../AnnotationType.html\" title=\"annotation "
                 + "in pkg\">AnnotationType</a></span><span class=\"tabEnd\">"
                 + "&nbsp;</span></caption>",
-                "<caption><span>Method parameters in <a href=\"../../pkg/"
+                "<caption><span>Method parameters in <a href=\"../"
                 + "package-summary.html\">pkg</a> with annotations of type "
-                + "<a href=\"../../pkg/AnnotationType.html\" title=\"annotation "
+                + "<a href=\"../AnnotationType.html\" title=\"annotation "
                 + "in pkg\">AnnotationType</a></span><span class=\"tabEnd\">"
                 + "&nbsp;</span></caption>",
-                "<caption><span>Constructors in <a href=\"../../pkg/"
+                "<caption><span>Constructors in <a href=\"../"
                 + "package-summary.html\">pkg</a> with annotations of type "
-                + "<a href=\"../../pkg/AnnotationType.html\" title=\"annotation "
+                + "<a href=\"../AnnotationType.html\" title=\"annotation "
                 + "in pkg\">AnnotationType</a></span><span class=\"tabEnd\">"
                 + "&nbsp;</span></caption>",
-                "<caption><span>Constructor parameters in <a href=\"../../"
-                + "pkg/package-summary.html\">pkg</a> with annotations of "
-                + "type <a href=\"../../pkg/AnnotationType.html\" title=\""
+                "<caption><span>Constructor parameters in <a href=\"../"
+                + "package-summary.html\">pkg</a> with annotations of "
+                + "type <a href=\"../AnnotationType.html\" title=\""
                 + "annotation in pkg\">AnnotationType</a></span><span class=\""
                 + "tabEnd\">&nbsp;</span></caption>"
         );
@@ -620,20 +620,20 @@
         //===============================================================
         checkOutput("pkg/AnnotationTypeUsage.html", false,
                 // CLASS
-                "<a href=\"../pkg/AnnotationTypeUndocumented.html\" title=\"annotation in pkg\">@AnnotationTypeUndocumented</a>(<a href=\"../pkg/AnnotationType.html#optional\">optional</a>=\"Class Annotation\",\n"
-                + "                <a href=\"../pkg/AnnotationType.html#required\">required</a>=1994)\n"
+                "<a href=\"AnnotationTypeUndocumented.html\" title=\"annotation in pkg\">@AnnotationTypeUndocumented</a>(<a href=\"AnnotationType.html#optional\">optional</a>=\"Class Annotation\",\n"
+                + "                <a href=\"AnnotationType.html#required\">required</a>=1994)\n"
                 + "public class <span class=\"typeNameLabel\">AnnotationTypeUsage</span></dt><dt>extends java.lang.Object</dt>",
                 // FIELD
-                "<a href=\"../pkg/AnnotationTypeUndocumented.html\" title=\"annotation in pkg\">@AnnotationTypeUndocumented</a>(<a href=\"../pkg/AnnotationType.html#optional\">optional</a>=\"Field Annotation\",\n"
-                + "                <a href=\"../pkg/AnnotationType.html#required\">required</a>=1994)\n"
+                "<a href=\"AnnotationTypeUndocumented.html\" title=\"annotation in pkg\">@AnnotationTypeUndocumented</a>(<a href=\"AnnotationType.html#optional\">optional</a>=\"Field Annotation\",\n"
+                + "                <a href=\"AnnotationType.html#required\">required</a>=1994)\n"
                 + "public int <span class=\"memberNameLabel\">field</span>",
                 // CONSTRUCTOR
-                "<a href=\"../pkg/AnnotationTypeUndocumented.html\" title=\"annotation in pkg\">@AnnotationTypeUndocumented</a>(<a href=\"../pkg/AnnotationType.html#optional\">optional</a>=\"Constructor Annotation\",\n"
-                + "                <a href=\"../pkg/AnnotationType.html#required\">required</a>=1994)\n"
+                "<a href=\"AnnotationTypeUndocumented.html\" title=\"annotation in pkg\">@AnnotationTypeUndocumented</a>(<a href=\"AnnotationType.html#optional\">optional</a>=\"Constructor Annotation\",\n"
+                + "                <a href=\"AnnotationType.html#required\">required</a>=1994)\n"
                 + "public <span class=\"typeNameLabel\">AnnotationTypeUsage</span>()",
                 // METHOD
-                "<a href=\"../pkg/AnnotationTypeUndocumented.html\" title=\"annotation in pkg\">@AnnotationTypeUndocumented</a>(<a href=\"../pkg/AnnotationType.html#optional\">optional</a>=\"Method Annotation\",\n"
-                + "                <a href=\"../pkg/AnnotationType.html#required\">required</a>=1994)\n"
+                "<a href=\"AnnotationTypeUndocumented.html\" title=\"annotation in pkg\">@AnnotationTypeUndocumented</a>(<a href=\"AnnotationType.html#optional\">optional</a>=\"Method Annotation\",\n"
+                + "                <a href=\"AnnotationType.html#required\">required</a>=1994)\n"
                 + "public void <span class=\"memberNameLabel\">method</span>()");
 
         //=================================
@@ -648,31 +648,31 @@
         //=================================
         checkOutput("pkg1/B.html", true,
                 // Integer
-                "<a href=\"../pkg1/A.html#d--\">d</a>=3.14,",
+                "<a href=\"A.html#d--\">d</a>=3.14,",
                 // Double
-                "<a href=\"../pkg1/A.html#d--\">d</a>=3.14,",
+                "<a href=\"A.html#d--\">d</a>=3.14,",
                 // Boolean
-                "<a href=\"../pkg1/A.html#b--\">b</a>=true,",
+                "<a href=\"A.html#b--\">b</a>=true,",
                 // String
-                "<a href=\"../pkg1/A.html#s--\">s</a>=\"sigh\",",
+                "<a href=\"A.html#s--\">s</a>=\"sigh\",",
                 // Class
-                "<a href=\"../pkg1/A.html#c--\">c</a>=<a href=\"../pkg2/Foo.html\" title=\"class in pkg2\">Foo.class</a>,",
+                "<a href=\"A.html#c--\">c</a>=<a href=\"../pkg2/Foo.html\" title=\"class in pkg2\">Foo.class</a>,",
                 // Bounded Class
-                "<a href=\"../pkg1/A.html#w--\">w</a>=<a href=\"../pkg/TypeParameterSubClass.html\" title=\"class in pkg\">TypeParameterSubClass.class</a>,",
+                "<a href=\"A.html#w--\">w</a>=<a href=\"../pkg/TypeParameterSubClass.html\" title=\"class in pkg\">TypeParameterSubClass.class</a>,",
                 // Enum
-                "<a href=\"../pkg1/A.html#e--\">e</a>=<a href=\"../pkg/Coin.html#Penny\">Penny</a>,",
+                "<a href=\"A.html#e--\">e</a>=<a href=\"../pkg/Coin.html#Penny\">Penny</a>,",
                 // Annotation Type
-                "<a href=\"../pkg1/A.html#a--\">a</a>=<a href=\"../pkg/AnnotationType.html\" title=\"annotation in pkg\">@AnnotationType</a>(<a href=\"../pkg/AnnotationType.html#optional--\">optional</a>=\"foo\",<a href=\"../pkg/AnnotationType.html#required--\">required</a>=1994),",
+                "<a href=\"A.html#a--\">a</a>=<a href=\"../pkg/AnnotationType.html\" title=\"annotation in pkg\">@AnnotationType</a>(<a href=\"../pkg/AnnotationType.html#optional--\">optional</a>=\"foo\",<a href=\"../pkg/AnnotationType.html#required--\">required</a>=1994),",
                 // String Array
-                "<a href=\"../pkg1/A.html#sa--\">sa</a>={\"up\",\"down\"},",
+                "<a href=\"A.html#sa--\">sa</a>={\"up\",\"down\"},",
                 // Primitive
-                "<a href=\"../pkg1/A.html#primitiveClassTest--\">primitiveClassTest</a>=boolean.class,");
+                "<a href=\"A.html#primitiveClassTest--\">primitiveClassTest</a>=boolean.class,");
 
         // XXX:  Add array test case after this if fixed:
         //5020899: Incorrect internal representation of class-valued annotation elements
         // Make sure that annotations are surrounded by <pre> and </pre>
         checkOutput("pkg1/B.html", true,
-                "<pre><a href=\"../pkg1/A.html\" title=\"annotation in pkg1\">@A</a>",
+                "<pre><a href=\"A.html\" title=\"annotation in pkg1\">@A</a>",
                 "public interface <span class=\"typeNameLabel\">B</span></pre>");
 
     }
--- a/test/langtools/jdk/javadoc/doclet/testOptions/TestOptions.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/langtools/jdk/javadoc/doclet/testOptions/TestOptions.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2017, 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
@@ -236,10 +236,10 @@
                 + "public int method() {</a>");
 
         checkOutput("linksource/SomeEnum.html", true,
-                "<pre>public static final&nbsp;<a href=\"../linksource/SomeEnum.html\" "
+                "<pre>public static final&nbsp;<a href=\"SomeEnum.html\" "
                 + "title=\"enum in linksource\">SomeEnum</a> <a href="
                 + "\"../src-html/linksource/SomeEnum.html#line.29\">VALUE1</a></pre>",
-                "<pre>public static final&nbsp;<a href=\"../linksource/SomeEnum.html\" "
+                "<pre>public static final&nbsp;<a href=\"SomeEnum.html\" "
                 + "title=\"enum in linksource\">SomeEnum</a> <a href="
                 + "\"../src-html/linksource/SomeEnum.html#line.30\">VALUE2</a></pre>");
 
--- a/test/langtools/jdk/javadoc/doclet/testOrdering/TestOrdering.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/langtools/jdk/javadoc/doclet/testOrdering/TestOrdering.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -135,42 +135,42 @@
             checkClassUseOrdering("pkg1/class-use/UsedClass.html");
 
             tester.checkOrder("pkg1/class-use/UsedClass.html",
-                    "../../pkg1/MethodOrder.html#m--",
-                    "../../pkg1/MethodOrder.html#m-byte:A-",
-                    "../../pkg1/MethodOrder.html#m-double-",
-                    "../../pkg1/MethodOrder.html#m-double-double-",
-                    "../../pkg1/MethodOrder.html#m-double-java.lang.Double-",
-                    "../../pkg1/MethodOrder.html#m-int-",
-                    "../../pkg1/MethodOrder.html#m-int-int-",
-                    "../../pkg1/MethodOrder.html#m-int-java.lang.Integer-",
-                    "../../pkg1/MethodOrder.html#m-long-",
-                    "../../pkg1/MethodOrder.html#m-long-long-",
-                    "../../pkg1/MethodOrder.html#m-long-java.lang.Long-",
-                    "../../pkg1/MethodOrder.html#m-long-java.lang.Long...-",
-                    "../../pkg1/MethodOrder.html#m-java.lang.Double-",
-                    "../../pkg1/MethodOrder.html#m-java.lang.Double-double-",
-                    "../../pkg1/MethodOrder.html#m-java.lang.Double-java.lang.Double-",
-                    "../../pkg1/MethodOrder.html#m-java.lang.Integer-",
-                    "../../pkg1/MethodOrder.html#m-java.lang.Integer-int-",
-                    "../../pkg1/MethodOrder.html#m-java.lang.Integer-java.lang.Integer-",
-                    "../../pkg1/MethodOrder.html#m-java.lang.Object:A-",
-                    "../../pkg1/MethodOrder.html#m-java.util.ArrayList-",
-                    "../../pkg1/MethodOrder.html#m-java.util.Collection-",
-                    "../../pkg1/MethodOrder.html#m-java.util.List-");
+                    "../MethodOrder.html#m--",
+                    "../MethodOrder.html#m-byte:A-",
+                    "../MethodOrder.html#m-double-",
+                    "../MethodOrder.html#m-double-double-",
+                    "../MethodOrder.html#m-double-java.lang.Double-",
+                    "../MethodOrder.html#m-int-",
+                    "../MethodOrder.html#m-int-int-",
+                    "../MethodOrder.html#m-int-java.lang.Integer-",
+                    "../MethodOrder.html#m-long-",
+                    "../MethodOrder.html#m-long-long-",
+                    "../MethodOrder.html#m-long-java.lang.Long-",
+                    "../MethodOrder.html#m-long-java.lang.Long...-",
+                    "../MethodOrder.html#m-java.lang.Double-",
+                    "../MethodOrder.html#m-java.lang.Double-double-",
+                    "../MethodOrder.html#m-java.lang.Double-java.lang.Double-",
+                    "../MethodOrder.html#m-java.lang.Integer-",
+                    "../MethodOrder.html#m-java.lang.Integer-int-",
+                    "../MethodOrder.html#m-java.lang.Integer-java.lang.Integer-",
+                    "../MethodOrder.html#m-java.lang.Object:A-",
+                    "../MethodOrder.html#m-java.util.ArrayList-",
+                    "../MethodOrder.html#m-java.util.Collection-",
+                    "../MethodOrder.html#m-java.util.List-");
 
             tester.checkOrder("pkg1/class-use/UsedClass.html",
-                    "../../pkg1/MethodOrder.html#tpm-pkg1.UsedClass-",
-                    "../../pkg1/MethodOrder.html#tpm-pkg1.UsedClass-pkg1.UsedClass-",
-                    "../../pkg1/MethodOrder.html#tpm-pkg1.UsedClass-pkg1.UsedClass:A-",
-                    "../../pkg1/MethodOrder.html#tpm-pkg1.UsedClass-java.lang.String-");
+                    "../MethodOrder.html#tpm-pkg1.UsedClass-",
+                    "../MethodOrder.html#tpm-pkg1.UsedClass-pkg1.UsedClass-",
+                    "../MethodOrder.html#tpm-pkg1.UsedClass-pkg1.UsedClass:A-",
+                    "../MethodOrder.html#tpm-pkg1.UsedClass-java.lang.String-");
 
             tester.checkOrder("pkg1/class-use/UsedClass.html",
-                    "../../pkg1/A.html#A-pkg1.UsedClass-",
-                    "../../pkg1/B.A.html#A-pkg1.UsedClass-",
-                    "../../pkg1/B.html#B-pkg1.UsedClass-",
-                    "../../pkg1/A.C.html#C-pkg1.UsedClass-java.lang.Object:A-",
-                    "../../pkg1/A.C.html#C-pkg1.UsedClass-java.util.Collection-",
-                    "../../pkg1/A.C.html#C-pkg1.UsedClass-java.util.List-");
+                    "../A.html#A-pkg1.UsedClass-",
+                    "../B.A.html#A-pkg1.UsedClass-",
+                    "../B.html#B-pkg1.UsedClass-",
+                    "../A.C.html#C-pkg1.UsedClass-java.lang.Object:A-",
+                    "../A.C.html#C-pkg1.UsedClass-java.util.Collection-",
+                    "../A.C.html#C-pkg1.UsedClass-java.util.List-");
 
             tester.checkOrder("pkg1/ImplementsOrdering.html",
                     "<dd><code>close</code>&nbsp;in interface&nbsp;<code>java.lang.AutoCloseable</code></dd>",
@@ -211,10 +211,10 @@
         }
 
         void checkClassUseOrdering(String usePage) {
-            checkClassUseOrdering(usePage, "pkg1/C#ITERATION#.html#zfield");
-            checkClassUseOrdering(usePage, "pkg1/C#ITERATION#.html#fieldInC#ITERATION#");
-            checkClassUseOrdering(usePage, "pkg1/C#ITERATION#.html#zmethod-pkg1.UsedClass");
-            checkClassUseOrdering(usePage, "pkg1/C#ITERATION#.html#methodInC#ITERATION#");
+            checkClassUseOrdering(usePage, "C#ITERATION#.html#zfield");
+            checkClassUseOrdering(usePage, "C#ITERATION#.html#fieldInC#ITERATION#");
+            checkClassUseOrdering(usePage, "C#ITERATION#.html#zmethod-pkg1.UsedClass");
+            checkClassUseOrdering(usePage, "C#ITERATION#.html#methodInC#ITERATION#");
         }
 
         void checkClassUseOrdering(String usePage, String searchString) {
@@ -405,8 +405,8 @@
             tester.checkExit(Exit.OK);
             tester.checkOrder("index-all.html", composeTestVectors());
             tester.checkOrder("add0/add/package-tree.html",
-                    "<a href=\"../../add0/add/Add.add.html\" title=\"enum in add0.add\">",
-                    "<a href=\"../../add0/add/Add.ADD.html\" title=\"enum in add0.add\">");
+                    "<a href=\"Add.add.html\" title=\"enum in add0.add\">",
+                    "<a href=\"Add.ADD.html\" title=\"enum in add0.add\">");
             tester.checkOrder("overview-tree.html",
                     "<a href=\"Add.add.html\" title=\"enum in &lt;Unnamed&gt;\">",
                     "<a href=\"add0/Add.add.html\" title=\"enum in add0\">",
@@ -593,10 +593,10 @@
 
             tester.checkOrder("pkg5/AnnoOptionalTest.html",
                     "<h3>Optional Element Summary</h3>",
-                    "<a href=\"../pkg5/AnnoOptionalTest.html#four--\">four</a>",
-                    "<a href=\"../pkg5/AnnoOptionalTest.html#one--\">one</a>",
-                    "<a href=\"../pkg5/AnnoOptionalTest.html#three--\">three</a>",
-                    "<a href=\"../pkg5/AnnoOptionalTest.html#two--\">two</a>",
+                    "<a href=\"#four--\">four</a>",
+                    "<a href=\"#one--\">one</a>",
+                    "<a href=\"#three--\">three</a>",
+                    "<a href=\"#two--\">two</a>",
                     "<h3>Element Detail</h3>",
                     "<h4>one</h4>",
                     "<h4>two</h4>",
@@ -605,10 +605,10 @@
 
             tester.checkOrder("pkg5/AnnoRequiredTest.html",
                     "<h3>Required Element Summary</h3>",
-                    "<a href=\"../pkg5/AnnoRequiredTest.html#four--\">four</a>",
-                    "<a href=\"../pkg5/AnnoRequiredTest.html#one--\">one</a>",
-                    "<a href=\"../pkg5/AnnoRequiredTest.html#three--\">three</a>",
-                    "<a href=\"../pkg5/AnnoRequiredTest.html#two--\">two</a>",
+                    "<a href=\"#four--\">four</a>",
+                    "<a href=\"#one--\">one</a>",
+                    "<a href=\"#three--\">three</a>",
+                    "<a href=\"#two--\">two</a>",
                     "<h3>Element Detail</h3>",
                     "<h4>one</h4>",
                     "<h4>two</h4>",
@@ -617,10 +617,10 @@
 
             tester.checkOrder("pkg5/CtorTest.html",
                     "<h3>Constructor Summary</h3>",
-                    "<a href=\"../pkg5/CtorTest.html#CtorTest-int-\"",
-                    "<a href=\"../pkg5/CtorTest.html#CtorTest-int-int-\"",
-                    "<a href=\"../pkg5/CtorTest.html#CtorTest-int-int-int-\"",
-                    "<a href=\"../pkg5/CtorTest.html#CtorTest-int-int-int-int-\"",
+                    "<a href=\"#CtorTest-int-\"",
+                    "<a href=\"#CtorTest-int-int-\"",
+                    "<a href=\"#CtorTest-int-int-int-\"",
+                    "<a href=\"#CtorTest-int-int-int-int-\"",
                     "<h3>Constructor Detail</h3>",
                     "<a name=\"CtorTest-int-int-int-int-\">",
                     "<a name=\"CtorTest-int-int-int-\">",
@@ -629,10 +629,10 @@
 
             tester.checkOrder("pkg5/EnumTest.html",
                     "<h3>Enum Constant Summary</h3>",
-                    "<a href=\"../pkg5/EnumTest.html#FOUR\">FOUR</a>",
-                    "<a href=\"../pkg5/EnumTest.html#ONE\">ONE</a>",
-                    "<a href=\"../pkg5/EnumTest.html#THREE\">THREE</a>",
-                    "<a href=\"../pkg5/EnumTest.html#TWO\">TWO</a>",
+                    "<a href=\"#FOUR\">FOUR</a>",
+                    "<a href=\"#ONE\">ONE</a>",
+                    "<a href=\"#THREE\">THREE</a>",
+                    "<a href=\"#TWO\">TWO</a>",
                     "<h3>Enum Constant Detail</h3>",
                     "<h4>ONE</h4>",
                     "<h4>TWO</h4>",
@@ -641,10 +641,10 @@
 
             tester.checkOrder("pkg5/FieldTest.html",
                     "<h3>Field Summary</h3>",
-                    "<a href=\"../pkg5/FieldTest.html#four\">four</a>",
-                    "<a href=\"../pkg5/FieldTest.html#one\">one</a>",
-                    "<a href=\"../pkg5/FieldTest.html#three\">three</a>",
-                    "<a href=\"../pkg5/FieldTest.html#two\">two</a>",
+                    "<a href=\"#four\">four</a>",
+                    "<a href=\"#one\">one</a>",
+                    "<a href=\"#three\">three</a>",
+                    "<a href=\"#two\">two</a>",
                     "<h3>Field Detail</h3>",
                     "<h4>one</h4>",
                     "<h4>two</h4>",
@@ -653,10 +653,10 @@
 
             tester.checkOrder("pkg5/IntfTest.html",
                     "<h3>Method Summary</h3>",
-                    "<a href=\"../pkg5/IntfTest.html#four--\">four</a>",
-                    "<a href=\"../pkg5/IntfTest.html#one--\">one</a>",
-                    "<a href=\"../pkg5/IntfTest.html#three--\">three</a>",
-                    "<a href=\"../pkg5/IntfTest.html#two--\">two</a>",
+                    "<a href=\"#four--\">four</a>",
+                    "<a href=\"#one--\">one</a>",
+                    "<a href=\"#three--\">three</a>",
+                    "<a href=\"#two--\">two</a>",
                     "<h3>Method Detail</h3>",
                     "<h4>one</h4>",
                     "<h4>two</h4>",
@@ -665,10 +665,10 @@
 
             tester.checkOrder("pkg5/MethodTest.html",
                     "<h3>Method Summary</h3>",
-                    "<a href=\"../pkg5/MethodTest.html#four--\">four</a>",
-                    "<a href=\"../pkg5/MethodTest.html#one--\">one</a>",
-                    "<a href=\"../pkg5/MethodTest.html#three--\">three</a>",
-                    "<a href=\"../pkg5/MethodTest.html#two--\">two</a>",
+                    "<a href=\"#four--\">four</a>",
+                    "<a href=\"#one--\">one</a>",
+                    "<a href=\"#three--\">three</a>",
+                    "<a href=\"#two--\">two</a>",
                     "<h3>Method Detail</h3>",
                     "<h4>one</h4>",
                     "<h4>two</h4>",
@@ -677,10 +677,10 @@
 
             tester.checkOrder("pkg5/PropertyTest.html",
                     "<h3>Property Summary</h3>",
-                    "<a href=\"../pkg5/PropertyTest.html#fourProperty\">four</a>",
-                    "<a href=\"../pkg5/PropertyTest.html#oneProperty\">one</a>",
-                    "<a href=\"../pkg5/PropertyTest.html#threeProperty\">three</a>",
-                    "<a href=\"../pkg5/PropertyTest.html#twoProperty\">two</a>",
+                    "<a href=\"#fourProperty\">four</a>",
+                    "<a href=\"#oneProperty\">one</a>",
+                    "<a href=\"#threeProperty\">three</a>",
+                    "<a href=\"#twoProperty\">two</a>",
                     "<h3>Property Detail</h3>",
                     "<h4>oneProperty</h4>",
                     "<h4>twoProperty</h4>",
--- a/test/langtools/jdk/javadoc/doclet/testOverriddenMethods/TestMultiInheritance.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/langtools/jdk/javadoc/doclet/testOverriddenMethods/TestMultiInheritance.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2016, 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
@@ -51,30 +51,30 @@
 
         checkOutput("pkg3/I1.html", true,
                 "Methods inherited from interface&nbsp;pkg3."
-                + "<a href=\"../pkg3/I2.html\" title=\"interface in pkg3\">"
+                + "<a href=\"I2.html\" title=\"interface in pkg3\">"
                 + "I2</a>",
                 "Methods inherited from interface&nbsp;pkg3."
-                + "<a href=\"../pkg3/I3.html\" title=\"interface in pkg3\">"
+                + "<a href=\"I3.html\" title=\"interface in pkg3\">"
                 + "I3</a>");
 
         checkOutput("pkg3/I0.html", true,
                 "Methods inherited from interface&nbsp;pkg3."
-                + "<a href=\"../pkg3/I2.html\" title=\"interface in pkg3\">"
+                + "<a href=\"I2.html\" title=\"interface in pkg3\">"
                 + "I2</a>",
                 "Methods inherited from interface&nbsp;pkg3."
-                + "<a href=\"../pkg3/I3.html\" title=\"interface in pkg3\">"
+                + "<a href=\"I3.html\" title=\"interface in pkg3\">"
                 + "I3</a>");
 
         // Method foo() is NOT inherited from I4 because it is overriden by I3.
 
         checkOutput("pkg3/I1.html", false,
                 "Methods inherited from interface&nbsp;pkg3."
-                + "<a href=\"../pkg3/I4.html\" title=\"interface in pkg3\">"
+                + "<a href=\"I4.html\" title=\"interface in pkg3\">"
                 + "I4</a>");
 
         checkOutput("pkg3/I0.html", false,
                 "Methods inherited from interface&nbsp;pkg3."
-                + "<a href=\"../pkg3/I4.html\" title=\"interface in pkg3\">"
+                + "<a href=\"I4.html\" title=\"interface in pkg3\">"
                 + "I4</a>");
     }
 }
--- a/test/langtools/jdk/javadoc/doclet/testOverriddenMethods/TestOverriddenMethodDocCopy.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/langtools/jdk/javadoc/doclet/testOverriddenMethods/TestOverriddenMethodDocCopy.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2016, 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
@@ -53,7 +53,7 @@
 
         checkOutput("pkg1/SubClass.html", true,
                 "<span class=\"descfrmTypeLabel\">Description copied from class:&nbsp;<code>"
-                + "<a href=\"../pkg1/BaseClass.html#overridenMethodWithDocsToCopy--\">"
+                + "<a href=\"BaseClass.html#overridenMethodWithDocsToCopy--\">"
                 + "BaseClass</a></code></span>");
     }
 }
--- a/test/langtools/jdk/javadoc/doclet/testOverriddenMethods/TestOverriddenPrivateMethods.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/langtools/jdk/javadoc/doclet/testOverriddenMethods/TestOverriddenPrivateMethods.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2016, 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
@@ -50,7 +50,7 @@
         // The public method should be overridden
         checkOutput("pkg1/SubClass.html", true,
                 "<dt><span class=\"overrideSpecifyLabel\">Overrides:</span></dt>\n"
-                + "<dd><code><a href=\"../pkg1/BaseClass.html#publicMethod");
+                + "<dd><code><a href=\"BaseClass.html#publicMethod");
 
         // The public method in different package should be overridden
         checkOutput("pkg2/SubClass.html", true,
--- a/test/langtools/jdk/javadoc/doclet/testOverriddenMethods/TestOverriddenPrivateMethodsWithPackageFlag.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/langtools/jdk/javadoc/doclet/testOverriddenMethods/TestOverriddenPrivateMethodsWithPackageFlag.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2016, 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
@@ -51,9 +51,9 @@
         // The public method should be overridden
         checkOutput("pkg1/SubClass.html", true,
                 "<dt><span class=\"overrideSpecifyLabel\">Overrides:</span></dt>\n"
-                + "<dd><code><a href=\"../pkg1/BaseClass.html#publicMethod--\">"
+                + "<dd><code><a href=\"BaseClass.html#publicMethod--\">"
                 + "publicMethod</a></code>&nbsp;in class&nbsp;<code>"
-                + "<a href=\"../pkg1/BaseClass.html\" title=\"class in pkg1\">BaseClass</a></code></dd>");
+                + "<a href=\"BaseClass.html\" title=\"class in pkg1\">BaseClass</a></code></dd>");
 
         // The public method in different package should be overridden
         checkOutput("pkg2/SubClass.html", true,
@@ -66,14 +66,14 @@
         // package.
         checkOutput("pkg1/SubClass.html", true,
                 "<dt><span class=\"overrideSpecifyLabel\">Overrides:</span></dt>\n"
-                + "<dd><code><a href=\"../pkg1/BaseClass.html#packagePrivateMethod--\">"
+                + "<dd><code><a href=\"BaseClass.html#packagePrivateMethod--\">"
                 + "packagePrivateMethod</a></code>&nbsp;in class&nbsp;<code>"
-                + "<a href=\"../pkg1/BaseClass.html\" title=\"class in pkg1\">BaseClass</a></code></dd>");
+                + "<a href=\"BaseClass.html\" title=\"class in pkg1\">BaseClass</a></code></dd>");
 
         // The private method in should not be overridden
         checkOutput("pkg1/SubClass.html", false,
                 "<dt><span class=\"overrideSpecifyLabel\">Overrides:</span></dt>\n"
-                + "<dd><code><a href=\"../pkg1/BaseClass.html#privateMethod()\">");
+                + "<dd><code><a href=\"BaseClass.html#privateMethod()\">");
 
         // The private method in different package should not be overridden
         checkOutput("pkg2/SubClass.html", false,
--- a/test/langtools/jdk/javadoc/doclet/testOverriddenMethods/TestOverriddenPrivateMethodsWithPrivateFlag.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/langtools/jdk/javadoc/doclet/testOverriddenMethods/TestOverriddenPrivateMethodsWithPrivateFlag.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2016, 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
@@ -51,13 +51,13 @@
         // The public method should be overridden
         checkOutput("pkg1/SubClass.html", true,
          "<dt><span class=\"overrideSpecifyLabel\">Overrides:</span></dt>\n" +
-                 "<dd><code><a href=\"../pkg1/BaseClass.html#publicMethod");
+                 "<dd><code><a href=\"BaseClass.html#publicMethod");
 
         // The package private method should be overridden since the base and sub class are in the same
         // package.
         checkOutput("pkg1/SubClass.html", true,
          "<dt><span class=\"overrideSpecifyLabel\">Overrides:</span></dt>\n" +
-                 "<dd><code><a href=\"../pkg1/BaseClass.html#packagePrivateMethod");
+                 "<dd><code><a href=\"BaseClass.html#packagePrivateMethod");
 
         // The public method in different package should be overridden
         checkOutput("pkg2/SubClass.html", true,
@@ -67,7 +67,7 @@
         // The private method in should not be overridden
         checkOutput("pkg1/SubClass.html", false,
          "<dt><span class=\"overrideSpecifyLabel\">Overrides:</span></dt>\n" +
-                 "<dd><code><a href=\"../pkg1/BaseClass.html#privateMethod");
+                 "<dd><code><a href=\"BaseClass.html#privateMethod");
 
         // The private method in different package should not be overridden
         checkOutput("pkg2/SubClass.html", false,
--- a/test/langtools/jdk/javadoc/doclet/testOverriddenMethods/TestOverrideMethods.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/langtools/jdk/javadoc/doclet/testOverriddenMethods/TestOverrideMethods.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -73,94 +73,94 @@
 
         checkOrder("pkg5/Classes.C.html",
                 // Check properties
-                "Properties declared in class&nbsp;pkg5.<a href=\"../pkg5/Classes.P.html",
+                "Properties declared in class&nbsp;pkg5.<a href=\"Classes.P.html",
                 "Classes.P",
-                "../pkg5/Classes.P.html#rateProperty\">rate",
+                "Classes.P.html#rateProperty\">rate",
 
                 // Check nested classes
                 "Nested classes/interfaces declared in class&nbsp;pkg5.",
                 "Classes.P",
-                "./pkg5/Classes.P.PN.html",
+                "Classes.P.PN.html",
                 "Classes.P.PN.html",
                 "type parameter in Classes.P.PN\">K",
                 "type parameter in Classes.P.PN",
                 "V",
 
                 // Check fields
-                "Fields declared in class&nbsp;pkg5.<a href=\"../pkg5/Classes.P.html",
+                "Fields declared in class&nbsp;pkg5.<a href=\"Classes.P.html",
                 "Classes.P",
-                "../pkg5/Classes.P.html#field0\">field0",
+                "Classes.P.html#field0\">field0",
 
                 // Check method summary
                 "Method Summary",
                 "void",
-                "../pkg5/Classes.C.html#m1--\">m1",
+                "#m1--\">m1",
                 "A modified method",
 
                 "void",
-                "../pkg5/Classes.C.html#m4-java.lang.String-java.lang.String-\">m4",
+                "#m4-java.lang.String-java.lang.String-\">m4",
                 "java.lang.String&nbsp;k,",
                 "java.lang.String",
                 "&nbsp;v)",
 
                 // Check footnotes
-                "Methods declared in class&nbsp;pkg5.<a href=\"../pkg5/Classes.GP.html",
+                "Methods declared in class&nbsp;pkg5.<a href=\"Classes.GP.html",
                 "Classes.GP",
-                "../pkg5/Classes.GP.html#m0--\">m0",
+                "Classes.GP.html#m0--\">m0",
 
                 // Check method details for override
                 "overrideSpecifyLabel",
                 "Overrides:",
-                "../pkg5/Classes.GP.html#m7--\">m7",
+                "Classes.GP.html#m7--\">m7",
                 "in class",
-                "../pkg5/Classes.GP.html",
+                "Classes.GP.html",
                 "Classes.GP"
         );
 
         checkOrder("pkg5/Classes.C.html",
                 // Check footnotes 2
                 "Methods declared in class&nbsp;pkg5.",
-                "../pkg5/Classes.P.html#getRate--\">getRate",
-                "../pkg5/Classes.P.html#m2--\">m2",
-                "../pkg5/Classes.P.html#m3--\">m3",
-                "../pkg5/Classes.P.html#m4-K-V-\">m4",
-                "../pkg5/Classes.P.html#rateProperty--\">rateProperty",
-                "../pkg5/Classes.P.html#setRate-double-\">setRate",
+                "Classes.P.html#getRate--\">getRate",
+                "Classes.P.html#m2--\">m2",
+                "Classes.P.html#m3--\">m3",
+                "Classes.P.html#m4-K-V-\">m4",
+                "Classes.P.html#rateProperty--\">rateProperty",
+                "Classes.P.html#setRate-double-\">setRate",
 
                 // Check @link
                 "A test of links to the methods in this class. <p>\n",
-                "../pkg5/Classes.GP.html#m0--",
+                "Classes.GP.html#m0--",
                 "Classes.GP.m0()",
-                "../pkg5/Classes.C.html#m1--",
+                "#m1--",
                 "m1()",
-                "../pkg5/Classes.P.html#m2--",
+                "Classes.P.html#m2--",
                 "Classes.P.m2()",
-                "../pkg5/Classes.P.html#m3--",
+                "Classes.P.html#m3--",
                 "Classes.P.m3()",
                 "m4(java.lang.String,java.lang.String)",
-                "../pkg5/Classes.P.html#m5--",
+                "Classes.P.html#m5--",
                 "Classes.P.m5()",
-                "../pkg5/Classes.C.html#m6--",
+                "#m6--",
                 "m6()",
-                "../pkg5/Classes.C.html#m7--",
+                "#m7--",
                 "m7()",
                 "End of links",
 
                 // Check @see
                 "See Also:",
-                "../pkg5/Classes.GP.html#m0--",
+                "Classes.GP.html#m0--",
                 "Classes.GP.m0()",
-                "../pkg5/Classes.C.html#m1--",
+                "#m1--",
                 "m1()",
-                "../pkg5/Classes.P.html#m2--",
+                "Classes.P.html#m2--",
                 "Classes.P.m2()",
-                "../pkg5/Classes.P.html#m3--",
+                "Classes.P.html#m3--",
                 "Classes.P.m3()",
-                "../pkg5/Classes.C.html#m4-java.lang.String-java.lang.String-",
+                "#m4-java.lang.String-java.lang.String-",
                 "m4(String k, String v)",
-                "../pkg5/Classes.P.html#m5--\"><code>Classes.P.m5()",
-                "../pkg5/Classes.C.html#m6--\"><code>m6()",
-                "../pkg5/Classes.C.html#m7--\"><code>m7()"
+                "Classes.P.html#m5--\"><code>Classes.P.m5()",
+                "#m6--\"><code>m6()",
+                "#m7--\"><code>m7()"
         );
 
         // Tests for interfaces
@@ -172,56 +172,56 @@
 
         checkOrder("pkg5/Interfaces.D.html",
                 "Start of links <p>",
-                "../pkg5/Interfaces.A.html#m0--\"><code>Interfaces.A.m0()",
-                "../pkg5/Interfaces.A.html#m1--\"><code>Interfaces.A.m1()",
-                "../pkg5/Interfaces.A.html#m2--\"><code>Interfaces.A.m2()",
-                "../pkg5/Interfaces.A.html#m3--\"><code>Interfaces.A.m3()",
-                "../pkg5/Interfaces.D.html#m--\"><code>m()",
-                "../pkg5/Interfaces.D.html#n--\"><code>n()",
-                "../pkg5/Interfaces.C.html#o--\"><code>Interfaces.C.o()",
+                "Interfaces.A.html#m0--\"><code>Interfaces.A.m0()",
+                "Interfaces.A.html#m1--\"><code>Interfaces.A.m1()",
+                "Interfaces.A.html#m2--\"><code>Interfaces.A.m2()",
+                "Interfaces.A.html#m3--\"><code>Interfaces.A.m3()",
+                "#m--\"><code>m()",
+                "#n--\"><code>n()",
+                "Interfaces.C.html#o--\"><code>Interfaces.C.o()",
                 "End of links",
 
                 // Check @see links
                 "See Also:",
-                "../pkg5/Interfaces.A.html#m0--\"><code>Interfaces.A.m0()",
-                "../pkg5/Interfaces.A.html#m1--\"><code>Interfaces.A.m1()",
-                "../pkg5/Interfaces.A.html#m2--\"><code>Interfaces.A.m2()",
-                "../pkg5/Interfaces.A.html#m3--\"><code>Interfaces.A.m3()",
-                "../pkg5/Interfaces.D.html#m--\"><code>m()",
-                "../pkg5/Interfaces.D.html#n--\"><code>n()",
-                "../pkg5/Interfaces.C.html#o--\"><code>Interfaces.C.o()",
+                "Interfaces.A.html#m0--\"><code>Interfaces.A.m0()",
+                "Interfaces.A.html#m1--\"><code>Interfaces.A.m1()",
+                "Interfaces.A.html#m2--\"><code>Interfaces.A.m2()",
+                "Interfaces.A.html#m3--\"><code>Interfaces.A.m3()",
+                "#m--\"><code>m()",
+                "#n--\"><code>n()",
+                "Interfaces.C.html#o--\"><code>Interfaces.C.o()",
 
                 // Check properties
-                "Properties declared in interface&nbsp;pkg5.<a href=\"../pkg5/Interfaces.A.html\" "
+                "Properties declared in interface&nbsp;pkg5.<a href=\"Interfaces.A.html\" "
                 + "title=\"interface in pkg5\">Interfaces.A</a>",
 
                 // Check nested classes
                 "Nested classes/interfaces declared in interface&nbsp;pkg5.",
                 "Interfaces.A",
-                "../pkg5/Interfaces.A.AA.html",
+                "Interfaces.A.AA.html",
                 "Interfaces.A.AA",
 
                 // Check Fields
-                "Fields declared in interface&nbsp;pkg5.<a href=\"../pkg5/Interfaces.A.html",
-                "../pkg5/Interfaces.A.html#f",
-                "../pkg5/Interfaces.A.html#QUOTE\">QUOTE",
-                "../pkg5/Interfaces.A.html#rate\">rate",
+                "Fields declared in interface&nbsp;pkg5.<a href=\"Interfaces.A.html",
+                "Interfaces.A.html#f",
+                "Interfaces.A.html#QUOTE\">QUOTE",
+                "Interfaces.A.html#rate\">rate",
 
                 // Check Method Summary
                 "Method Summary",
-                "../pkg5/Interfaces.D.html#m--\">m",
-                "../pkg5/Interfaces.D.html#n--\">n",
+                "#m--\">m",
+                "#n--\">n",
 
                 // Check footnotes
-                "Methods declared in interface&nbsp;pkg5.<a href=\"../pkg5/Interfaces.A.html",
-                "../pkg5/Interfaces.A.html#getRate--\">getRate",
-                "../pkg5/Interfaces.A.html#rateProperty--\">rateProperty",
-                "../pkg5/Interfaces.A.html#setRate-double-",
-                "Methods declared in interface&nbsp;pkg5.<a href=\"../pkg5/Interfaces.B.html",
-                "../pkg5/Interfaces.B.html#m1--\">m1",
-                "../pkg5/Interfaces.B.html#m3--\">m3",
-                "Methods declared in interface&nbsp;pkg5.<a href=\"../pkg5/Interfaces.C.html",
-                "<a href=\"../pkg5/Interfaces.C.html#o--\">o</a>"
+                "Methods declared in interface&nbsp;pkg5.<a href=\"Interfaces.A.html",
+                "Interfaces.A.html#getRate--\">getRate",
+                "Interfaces.A.html#rateProperty--\">rateProperty",
+                "Interfaces.A.html#setRate-double-",
+                "Methods declared in interface&nbsp;pkg5.<a href=\"Interfaces.B.html",
+                "Interfaces.B.html#m1--\">m1",
+                "Interfaces.B.html#m3--\">m3",
+                "Methods declared in interface&nbsp;pkg5.<a href=\"Interfaces.C.html",
+                "<a href=\"Interfaces.C.html#o--\">o</a>"
         );
 
         // Test synthetic values and valuesof of an enum.
--- a/test/langtools/jdk/javadoc/doclet/testPackagePage/TestPackagePage.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/langtools/jdk/javadoc/doclet/testPackagePage/TestPackagePage.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2016, 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
@@ -53,9 +53,9 @@
 
         // With just one package, all general pages link to the single package page.
         checkOutput("com/pkg/C.html", true,
-            "<a href=\"../../com/pkg/package-summary.html\">Package</a>");
+            "<a href=\"package-summary.html\">Package</a>");
         checkOutput("com/pkg/package-tree.html", true,
-            "<li><a href=\"../../com/pkg/package-summary.html\">Package</a></li>");
+            "<li><a href=\"package-summary.html\">Package</a></li>");
         checkOutput("deprecated-list.html", true,
             "<li><a href=\"com/pkg/package-summary.html\">Package</a></li>");
         checkOutput("index-all.html", true,
--- a/test/langtools/jdk/javadoc/doclet/testPackageSummary/TestPackageSummary.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/langtools/jdk/javadoc/doclet/testPackageSummary/TestPackageSummary.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -49,23 +49,23 @@
         checkOutput("pkg/package-summary.html", true,
                 "<tbody>\n"
                 + "<tr class=\"altColor\">\n"
-                + "<th class=\"colFirst\" scope=\"row\"><a href=\"../pkg/C0.html\" title=\"class in pkg\">C0</a></th>\n"
+                + "<th class=\"colFirst\" scope=\"row\"><a href=\"C0.html\" title=\"class in pkg\">C0</a></th>\n"
                 + "<td class=\"colLast\">&nbsp;</td>\n"
                 + "</tr>\n"
                 + "<tr class=\"rowColor\">\n"
-                + "<th class=\"colFirst\" scope=\"row\"><a href=\"../pkg/C1.html\" title=\"class in pkg\">C1</a></th>\n"
+                + "<th class=\"colFirst\" scope=\"row\"><a href=\"C1.html\" title=\"class in pkg\">C1</a></th>\n"
                 + "<td class=\"colLast\">&nbsp;</td>\n"
                 + "</tr>\n"
                 + "<tr class=\"altColor\">\n"
-                + "<th class=\"colFirst\" scope=\"row\"><a href=\"../pkg/C2.html\" title=\"class in pkg\">C2</a></th>\n"
+                + "<th class=\"colFirst\" scope=\"row\"><a href=\"C2.html\" title=\"class in pkg\">C2</a></th>\n"
                 + "<td class=\"colLast\">&nbsp;</td>\n"
                 + "</tr>\n"
                 + "<tr class=\"rowColor\">\n"
-                + "<th class=\"colFirst\" scope=\"row\"><a href=\"../pkg/C3.html\" title=\"class in pkg\">C3</a></th>\n"
+                + "<th class=\"colFirst\" scope=\"row\"><a href=\"C3.html\" title=\"class in pkg\">C3</a></th>\n"
                 + "<td class=\"colLast\">&nbsp;</td>\n"
                 + "</tr>\n"
                 + "<tr class=\"altColor\">\n"
-                + "<th class=\"colFirst\" scope=\"row\"><a href=\"../pkg/C4.html\" title=\"class in pkg\">C4</a></th>\n"
+                + "<th class=\"colFirst\" scope=\"row\"><a href=\"C4.html\" title=\"class in pkg\">C4</a></th>\n"
                 + "<td class=\"colLast\">&nbsp;</td>\n"
                 + "</tr>\n"
                 + "</tbody>\n"
--- a/test/langtools/jdk/javadoc/doclet/testPrivateClasses/TestPrivateClasses.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/langtools/jdk/javadoc/doclet/testPrivateClasses/TestPrivateClasses.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -59,10 +59,10 @@
 
         checkOutput("pkg/PublicChild.html", true,
                 // Field inheritence from non-public superclass.
-                "<a href=\"../pkg/PublicChild.html#fieldInheritedFromParent\">"
+                "<a href=\"#fieldInheritedFromParent\">"
                 + "fieldInheritedFromParent</a>",
                 // Method inheritance from non-public superclass.
-                "<a href=\"../pkg/PublicChild.html#methodInheritedFromParent-int-\">"
+                "<a href=\"#methodInheritedFromParent-int-\">"
                 + "methodInheritedFromParent</a>",
                 // private class does not show up in tree
                 "<ul class=\"inheritance\">\n"
@@ -77,7 +77,7 @@
                 "<pre>public&nbsp;void&nbsp;methodInheritedFromParent&#8203;(int&nbsp;p1)",
                 "<dl>\n"
                 + "<dt>All Implemented Interfaces:</dt>\n"
-                + "<dd><code><a href=\"../pkg/PublicInterface.html\" title=\"interface in pkg\">"
+                + "<dd><code><a href=\"PublicInterface.html\" title=\"interface in pkg\">"
                 + "PublicInterface</a></code></dd>\n"
                 + "</dl>");
 
@@ -95,27 +95,27 @@
         checkOutput("pkg/PublicChild.html", false,
                 // Should not document comments from private inherited interfaces
                 "<td class=\"colLast\"><code><span class=\"memberNameLink\">" +
-                "<a href=\"../pkg/PublicChild.html#methodInterface-int-\">" +
+                "<a href=\"#methodInterface-int-\">" +
                 "methodInterface</a></span>&#8203;(int&nbsp;p1)</code>\n" +
                 "<div class=\"block\">Comment from interface.</div>\n</td>",
                 // and similarly one more
                 "<td class=\"colLast\"><code><span class=\"memberNameLink\">" +
-                "<a href=\"../pkg/PublicChild.html#methodInterface2-int-\">" +
+                "<a href=\"#methodInterface2-int-\">" +
                 "methodInterface2</a></span>&#8203;(int&nbsp;p1)</code>\n" +
                 "<div class=\"block\">Comment from interface.</div>\n</td>"
         );
 
         checkOutput("pkg/PublicInterface.html", true,
                 // Field inheritance from non-public superinterface.
-                "<a href=\"../pkg/PublicInterface.html#fieldInheritedFromInterface\">"
+                "<a href=\"#fieldInheritedFromInterface\">"
                 + "fieldInheritedFromInterface</a>",
                 // Method inheritance from non-public superinterface.
-                "<a href=\"../pkg/PublicInterface.html#methodInterface-int-\">"
+                "<a href=\"#methodInterface-int-\">"
                 + "methodInterface</a>",
                 //Make sure implemented interfaces from private superclass are inherited
                 "<dl>\n"
                 + "<dt>All Known Implementing Classes:</dt>\n"
-                + "<dd><code><a href=\"../pkg/PublicChild.html\" title=\"class in pkg\">"
+                + "<dd><code><a href=\"PublicChild.html\" title=\"class in pkg\">"
                 + "PublicChild</a></code></dd>\n"
                 + "</dl>");
 
@@ -132,7 +132,7 @@
         checkOutput("pkg2/C.html", false,
                 //Do not inherit private interface method with generic parameters.
                 //This method has been implemented.
-                "<span class=\"memberNameLink\"><a href=\"../pkg2/I.html#hello-T-\">hello</a></span>");
+                "<span class=\"memberNameLink\"><a href=\"I.html#hello-T-\">hello</a></span>");
 
         checkOutput("constant-values.html", false,
                 // Make inherited constant are documented correctly.
@@ -150,27 +150,27 @@
         checkOutput("pkg/PublicChild.html", true,
                 // Field inheritence from non-public superclass.
                 "Fields inherited from class&nbsp;pkg."
-                + "<a href=\"../pkg/PrivateParent.html\" title=\"class in pkg\">"
+                + "<a href=\"PrivateParent.html\" title=\"class in pkg\">"
                 + "PrivateParent</a>",
-                "<a href=\"../pkg/PrivateParent.html#fieldInheritedFromParent\">"
+                "<a href=\"PrivateParent.html#fieldInheritedFromParent\">"
                 + "fieldInheritedFromParent</a>",
                 // Method inheritence from non-public superclass.
                 "Methods inherited from class&nbsp;pkg."
-                + "<a href=\"../pkg/PrivateParent.html\" title=\"class in pkg\">"
+                + "<a href=\"PrivateParent.html\" title=\"class in pkg\">"
                 + "PrivateParent</a>",
-                "<a href=\"../pkg/PrivateParent.html#methodInheritedFromParent-int-\">"
+                "<a href=\"PrivateParent.html#methodInheritedFromParent-int-\">"
                 + "methodInheritedFromParent</a>",
                 // Should document that a method overrides method from private class.
                 "<dt><span class=\"overrideSpecifyLabel\">Overrides:</span></dt>\n"
-                + "<dd><code><a href=\"../pkg/PrivateParent.html#methodOverridenFromParent-char:A-int-T-V-java.util.List-\">"
+                + "<dd><code><a href=\"PrivateParent.html#methodOverridenFromParent-char:A-int-T-V-java.util.List-\">"
                 + "methodOverridenFromParent</a></code>&nbsp;in class&nbsp;<code>"
-                + "<a href=\"../pkg/PrivateParent.html\" title=\"class in pkg\">"
+                + "<a href=\"PrivateParent.html\" title=\"class in pkg\">"
                 + "PrivateParent</a></code></dd>",
                 // Should document that a method is specified by private interface.
                 "<dt><span class=\"overrideSpecifyLabel\">Specified by:</span></dt>\n"
-                + "<dd><code><a href=\"../pkg/PrivateInterface.html#methodInterface-int-\">"
+                + "<dd><code><a href=\"PrivateInterface.html#methodInterface-int-\">"
                 + "methodInterface</a></code>&nbsp;in interface&nbsp;<code>"
-                + "<a href=\"../pkg/PrivateInterface.html\" title=\"interface in pkg\">"
+                + "<a href=\"PrivateInterface.html\" title=\"interface in pkg\">"
                 + "PrivateInterface</a></code></dd>",
                 // Should mention that any documentation was copied.
                 "Description copied from",
@@ -178,9 +178,9 @@
                 "extends",
                 "<dl>\n"
                 + "<dt>All Implemented Interfaces:</dt>\n"
-                + "<dd><code><a href=\"../pkg/PrivateInterface.html\" title=\"interface in pkg\">"
+                + "<dd><code><a href=\"PrivateInterface.html\" title=\"interface in pkg\">"
                 + "PrivateInterface</a></code>, "
-                + "<code><a href=\"../pkg/PublicInterface.html\" title=\"interface in pkg\">"
+                + "<code><a href=\"PublicInterface.html\" title=\"interface in pkg\">"
                 + "PublicInterface</a></code></dd>\n"
                 + "</dl>",
                 "<pre>public class <span class=\"typeNameLabel\">PublicChild</span>");
@@ -188,13 +188,13 @@
         checkOutput("pkg/PublicInterface.html", true,
                 // Field inheritence from non-public superinterface.
                 "Fields inherited from interface&nbsp;pkg."
-                + "<a href=\"../pkg/PrivateInterface.html\" title=\"interface in pkg\">"
+                + "<a href=\"PrivateInterface.html\" title=\"interface in pkg\">"
                 + "PrivateInterface</a>",
-                "<a href=\"../pkg/PrivateInterface.html#fieldInheritedFromInterface\">"
+                "<a href=\"PrivateInterface.html#fieldInheritedFromInterface\">"
                 + "fieldInheritedFromInterface</a>",
                 // Method inheritance from non-public superinterface.
                 "Methods inherited from interface&nbsp;pkg."
-                + "<a href=\"../pkg/PrivateInterface.html\" title=\"interface in pkg\">"
+                + "<a href=\"PrivateInterface.html\" title=\"interface in pkg\">"
                 + "PrivateInterface</a>",
                 // Extend documented private classes or interfaces
                 "extends",
@@ -202,14 +202,14 @@
                 //Make sure implemented interfaces from private superclass are inherited
                 "<dl>\n"
                 + "<dt>All Known Implementing Classes:</dt>\n"
-                + "<dd><code><a href=\"../pkg/PrivateParent.html\" title=\"class in pkg\">"
+                + "<dd><code><a href=\"PrivateParent.html\" title=\"class in pkg\">"
                 + "PrivateParent</a></code>, "
-                + "<code><a href=\"../pkg/PublicChild.html\" title=\"class in pkg\">PublicChild"
+                + "<code><a href=\"PublicChild.html\" title=\"class in pkg\">PublicChild"
                 + "</a></code></dd>\n"
                 + "</dl>");
 
         checkOutput("pkg/PrivateInterface.html", true,
-                "<a href=\"../pkg/PrivateInterface.html#methodInterface-int-\">"
+                "<a href=\"#methodInterface-int-\">"
                 + "methodInterface</a>"
         );
 
@@ -217,11 +217,11 @@
                 //Since private flag is used, we can document that private interface method
                 //with generic parameters has been implemented.
                 "<span class=\"descfrmTypeLabel\">Description copied from interface:&nbsp;<code>"
-                + "<a href=\"../pkg2/I.html#hello-T-\">I</a></code></span>",
+                + "<a href=\"I.html#hello-T-\">I</a></code></span>",
                 "<dt><span class=\"overrideSpecifyLabel\">Specified by:</span></dt>\n"
-                + "<dd><code><a href=\"../pkg2/I.html#hello-T-\">hello</a></code>"
+                + "<dd><code><a href=\"I.html#hello-T-\">hello</a></code>"
                 + "&nbsp;in interface&nbsp;<code>"
-                + "<a href=\"../pkg2/I.html\" title=\"interface in pkg2\">I</a>"
+                + "<a href=\"I.html\" title=\"interface in pkg2\">I</a>"
                 + "&lt;java.lang.String&gt;</code></dd>");
 
         checkOutput("pkg/PrivateParent.html", true,
--- a/test/langtools/jdk/javadoc/doclet/testProperty/TestProperty.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/langtools/jdk/javadoc/doclet/testProperty/TestProperty.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -47,62 +47,62 @@
         checkExit(Exit.OK);
 
         checkOutput("pkg/MyClass.html", true,
-                "<pre>public final&nbsp;<a href=\"../pkg/ObjectProperty.html\" "
+                "<pre>public final&nbsp;<a href=\"ObjectProperty.html\" "
                 + "title=\"class in pkg\">ObjectProperty</a>"
-                + "&lt;<a href=\"../pkg/MyObj.html\" "
+                + "&lt;<a href=\"MyObj.html\" "
                 + "title=\"class in pkg\">MyObj</a>&gt; goodProperty</pre>\n"
                 + "<div class=\"block\">This is an Object property where the "
                 + "Object is a single Object.</div>\n"
                 + "<dl>\n"
                 + "<dt><span class=\"seeLabel\">See Also:</span></dt>\n"
-                + "<dd><a href=\"../pkg/MyClass.html#getGood--\"><code>getGood()</code></a>, \n"
-                + "<a href=\"../pkg/MyClass.html#setGood-pkg.MyObj-\">"
+                + "<dd><a href=\"#getGood--\"><code>getGood()</code></a>, \n"
+                + "<a href=\"#setGood-pkg.MyObj-\">"
                 + "<code>setGood(MyObj)</code></a></dd>\n"
                 + "</dl>",
 
-                "<pre>public final&nbsp;<a href=\"../pkg/ObjectProperty.html\" "
+                "<pre>public final&nbsp;<a href=\"ObjectProperty.html\" "
                 + "title=\"class in pkg\">ObjectProperty</a>"
-                + "&lt;<a href=\"../pkg/MyObj.html\" "
+                + "&lt;<a href=\"MyObj.html\" "
                 + "title=\"class in pkg\">MyObj</a>[]&gt; badProperty</pre>\n"
                 + "<div class=\"block\">This is an Object property where the "
                 + "Object is an array.</div>\n"
                 + "<dl>\n"
                 + "<dt><span class=\"seeLabel\">See Also:</span></dt>\n"
-                + "<dd><a href=\"../pkg/MyClass.html#getBad--\"><code>getBad()</code></a>, \n"
-                + "<a href=\"../pkg/MyClass.html#setBad-pkg.MyObj:A-\">"
+                + "<dd><a href=\"#getBad--\"><code>getBad()</code></a>, \n"
+                + "<a href=\"#setBad-pkg.MyObj:A-\">"
                 + "<code>setBad(MyObj[])</code></a></dd>\n"
                 + "</dl>",
 
                 // id should not be used in the property table
                 "<tr class=\"altColor\">\n"
-                + "<td class=\"colFirst\"><code><a href=\"../pkg/ObjectProperty.html\" "
-                + "title=\"class in pkg\">ObjectProperty</a>&lt;<a href=\"../pkg/MyObj.html\" "
+                + "<td class=\"colFirst\"><code><a href=\"ObjectProperty.html\" "
+                + "title=\"class in pkg\">ObjectProperty</a>&lt;<a href=\"MyObj.html\" "
                 + "title=\"class in pkg\">MyObj</a>[]&gt;</code></td>\n"
                 + "<th class=\"colSecond\" scope=\"row\"><code><span class=\"memberNameLink\">"
-                + "<a href=\"../pkg/MyClass.html#badProperty\">bad</a></span></code></th>",
+                + "<a href=\"#badProperty\">bad</a></span></code></th>",
 
                 // id should be used in the method table
                 "<tr id=\"i0\" class=\"altColor\">\n"
-                + "<td class=\"colFirst\"><code><a href=\"../pkg/ObjectProperty.html\" "
-                + "title=\"class in pkg\">ObjectProperty</a>&lt;<a href=\"../pkg/MyObj.html\" "
+                + "<td class=\"colFirst\"><code><a href=\"ObjectProperty.html\" "
+                + "title=\"class in pkg\">ObjectProperty</a>&lt;<a href=\"MyObj.html\" "
                 + "title=\"class in pkg\">MyObj</a>[]&gt;</code></td>\n"
                 + "<th class=\"colSecond\" scope=\"row\"><code><span class=\"memberNameLink\">"
-                + "<a href=\"../pkg/MyClass.html#badProperty--\">badProperty</a></span>()</code></th>"
+                + "<a href=\"#badProperty--\">badProperty</a></span>()</code></th>"
         );
 
         checkOutput("pkg/MyClassT.html", true,
-                "<pre>public final&nbsp;<a href=\"../pkg/ObjectProperty.html\" "
+                "<pre>public final&nbsp;<a href=\"ObjectProperty.html\" "
                 + "title=\"class in pkg\">ObjectProperty</a>"
-                + "&lt;java.util.List&lt;<a href=\"../pkg/MyClassT.html\" "
+                + "&lt;java.util.List&lt;<a href=\"MyClassT.html\" "
                 + "title=\"type parameter in MyClassT\">T</a>&gt;&gt; "
                 + "listProperty</pre>\n"
                 + "<div class=\"block\">This is an Object property where the "
                 + "Object is a single <code>List&lt;T&gt;</code>.</div>\n"
                 + "<dl>\n"
                 + "<dt><span class=\"seeLabel\">See Also:</span></dt>\n"
-                + "<dd><a href=\"../pkg/MyClassT.html#getList--\">"
+                + "<dd><a href=\"#getList--\">"
                 + "<code>getList()</code></a>, \n"
-                + "<a href=\"../pkg/MyClassT.html#setList-java.util.List-\">"
+                + "<a href=\"#setList-java.util.List-\">"
                 + "<code>setList(List)</code></a></dd>\n"
                 + "</dl>"
         );
--- a/test/langtools/jdk/javadoc/doclet/testRelativeLinks/TestRelativeLinks.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/langtools/jdk/javadoc/doclet/testRelativeLinks/TestRelativeLinks.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2016, 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
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug      4460354 8014636 8043186
+ * @bug      4460354 8014636 8043186 8195805
  * @summary  Test to make sure that relative paths are redirected in the
  *           output so that they are not broken.
  * @author   jamieh
@@ -67,7 +67,12 @@
             "<a href=\"./pkg/relative-field-link.html\">relative field link</a>",
             "<a href=\"./pkg/relative-method-link.html\">relative method link</a>",
             "<a href=\"./pkg/relative-package-link.html\">relative package link</a>",
-            " <a href=\"./pkg/relative-multi-line-link.html\">relative-multi-line-link</a>.",
+            " <a href=\"./pkg/relative-multi-line-link.html\">relative-multi-line-link</a>.");
+
+        // This is not a relative path and should not be redirected.
+        checkOutput("index-all.html", true,
+            "<div class=\"block\"><a name=\"masters\"></a>");
+        checkOutput("index-all.html", false,
             "<div class=\"block\"><a name=\"./pkg/masters\"></a>");
 
         // PACKAGE USE
--- a/test/langtools/jdk/javadoc/doclet/testRepeatedAnnotations/TestRepeatedAnnotations.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/langtools/jdk/javadoc/doclet/testRepeatedAnnotations/TestRepeatedAnnotations.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -47,91 +47,91 @@
         checkExit(Exit.OK);
 
         checkOutput("pkg/C.html", true,
-                "<a href=\"../pkg/ContaineeSynthDoc.html\" "
+                "<a href=\"ContaineeSynthDoc.html\" "
                 + "title=\"annotation in pkg\">@ContaineeSynthDoc</a> "
-                + "<a href=\"../pkg/ContaineeSynthDoc.html\" "
+                + "<a href=\"ContaineeSynthDoc.html\" "
                 + "title=\"annotation in pkg\">@ContaineeSynthDoc</a>",
-                "<a href=\"../pkg/ContaineeRegDoc.html\" "
+                "<a href=\"ContaineeRegDoc.html\" "
                 + "title=\"annotation in pkg\">@ContaineeRegDoc</a> "
-                + "<a href=\"../pkg/ContaineeRegDoc.html\" "
+                + "<a href=\"ContaineeRegDoc.html\" "
                 + "title=\"annotation in pkg\">@ContaineeRegDoc</a>",
-                "<a href=\"../pkg/RegContainerDoc.html\" "
+                "<a href=\"RegContainerDoc.html\" "
                 + "title=\"annotation in pkg\">@RegContainerDoc</a>"
                 + "({"
-                + "<a href=\"../pkg/RegContaineeNotDoc.html\" "
+                + "<a href=\"RegContaineeNotDoc.html\" "
                 + "title=\"annotation in pkg\">@RegContaineeNotDoc</a>,"
-                + "<a href=\"../pkg/RegContaineeNotDoc.html\" "
+                + "<a href=\"RegContaineeNotDoc.html\" "
                 + "title=\"annotation in pkg\">@RegContaineeNotDoc</a>})");
 
         checkOutput("pkg/D.html", true,
-                "<a href=\"../pkg/RegDoc.html\" title=\"annotation in pkg\">@RegDoc</a>"
-                + "(<a href=\"../pkg/RegDoc.html#x--\">x</a>=1)",
-                "<a href=\"../pkg/RegArryDoc.html\" title=\"annotation in pkg\">@RegArryDoc</a>"
-                + "(<a href=\"../pkg/RegArryDoc.html#y--\">y</a>=1)",
-                "<a href=\"../pkg/RegArryDoc.html\" title=\"annotation in pkg\">@RegArryDoc</a>"
-                + "(<a href=\"../pkg/RegArryDoc.html#y--\">y</a>={1,2})",
-                "<a href=\"../pkg/NonSynthDocContainer.html\" "
+                "<a href=\"RegDoc.html\" title=\"annotation in pkg\">@RegDoc</a>"
+                + "(<a href=\"RegDoc.html#x--\">x</a>=1)",
+                "<a href=\"RegArryDoc.html\" title=\"annotation in pkg\">@RegArryDoc</a>"
+                + "(<a href=\"RegArryDoc.html#y--\">y</a>=1)",
+                "<a href=\"RegArryDoc.html\" title=\"annotation in pkg\">@RegArryDoc</a>"
+                + "(<a href=\"RegArryDoc.html#y--\">y</a>={1,2})",
+                "<a href=\"NonSynthDocContainer.html\" "
                 + "title=\"annotation in pkg\">@NonSynthDocContainer</a>"
                 + "("
-                + "<a href=\"../pkg/RegArryDoc.html\" title=\"annotation in pkg\">@RegArryDoc</a>"
-                + "(<a href=\"../pkg/RegArryDoc.html#y--\">y</a>=1))");
+                + "<a href=\"RegArryDoc.html\" title=\"annotation in pkg\">@RegArryDoc</a>"
+                + "(<a href=\"RegArryDoc.html#y--\">y</a>=1))");
 
         checkOutput("pkg1/C.html", true,
-                "<a href=\"../pkg1/RegContainerValDoc.html\" "
+                "<a href=\"RegContainerValDoc.html\" "
                 + "title=\"annotation in pkg1\">@RegContainerValDoc</a>"
-                + "(<a href=\"../pkg1/RegContainerValDoc.html#value--\">value</a>={"
-                + "<a href=\"../pkg1/RegContaineeNotDoc.html\" "
+                + "(<a href=\"RegContainerValDoc.html#value--\">value</a>={"
+                + "<a href=\"RegContaineeNotDoc.html\" "
                 + "title=\"annotation in pkg1\">@RegContaineeNotDoc</a>,"
-                + "<a href=\"../pkg1/RegContaineeNotDoc.html\" "
+                + "<a href=\"RegContaineeNotDoc.html\" "
                 + "title=\"annotation in pkg1\">@RegContaineeNotDoc</a>},"
-                + "<a href=\"../pkg1/RegContainerValDoc.html#y--\">y</a>=3)",
-                "<a href=\"../pkg1/ContainerValDoc.html\" "
+                + "<a href=\"RegContainerValDoc.html#y--\">y</a>=3)",
+                "<a href=\"ContainerValDoc.html\" "
                 + "title=\"annotation in pkg1\">@ContainerValDoc</a>"
-                + "(<a href=\"../pkg1/ContainerValDoc.html#value--\">value</a>={"
-                + "<a href=\"../pkg1/ContaineeNotDoc.html\" "
+                + "(<a href=\"ContainerValDoc.html#value--\">value</a>={"
+                + "<a href=\"ContaineeNotDoc.html\" "
                 + "title=\"annotation in pkg1\">@ContaineeNotDoc</a>,"
-                + "<a href=\"../pkg1/ContaineeNotDoc.html\" "
+                + "<a href=\"ContaineeNotDoc.html\" "
                 + "title=\"annotation in pkg1\">@ContaineeNotDoc</a>},"
-                + "<a href=\"../pkg1/ContainerValDoc.html#x--\">x</a>=1)");
+                + "<a href=\"ContainerValDoc.html#x--\">x</a>=1)");
 
         checkOutput("pkg/C.html", false,
-                "<a href=\"../pkg/RegContaineeDoc.html\" "
+                "<a href=\"RegContaineeDoc.html\" "
                 + "title=\"annotation in pkg\">@RegContaineeDoc</a> "
-                + "<a href=\"../pkg/RegContaineeDoc.html\" "
+                + "<a href=\"RegContaineeDoc.html\" "
                 + "title=\"annotation in pkg\">@RegContaineeDoc</a>",
-                "<a href=\"../pkg/RegContainerNotDoc.html\" "
+                "<a href=\"RegContainerNotDoc.html\" "
                 + "title=\"annotation in pkg\">@RegContainerNotDoc</a>"
-                + "(<a href=\"../pkg/RegContainerNotDoc.html#value--\">value</a>={"
-                + "<a href=\"../pkg/RegContaineeNotDoc.html\" "
+                + "(<a href=\"RegContainerNotDoc.html#value--\">value</a>={"
+                + "<a href=\"RegContaineeNotDoc.html\" "
                 + "title=\"annotation in pkg\">@RegContaineeNotDoc</a>,"
-                + "<a href=\"../pkg/RegContaineeNotDoc.html\" "
+                + "<a href=\"RegContaineeNotDoc.html\" "
                 + "title=\"annotation in pkg\">@RegContaineeNotDoc</a>})");
 
         checkOutput("pkg1/C.html", false,
-                "<a href=\"../pkg1/ContaineeSynthDoc.html\" "
+                "<a href=\"ContaineeSynthDoc.html\" "
                 + "title=\"annotation in pkg1\">@ContaineeSynthDoc</a> "
-                + "<a href=\"../pkg1/ContaineeSynthDoc.html\" "
+                + "<a href=\"ContaineeSynthDoc.html\" "
                 + "title=\"annotation in pkg1\">@ContaineeSynthDoc</a>",
-                "<a href=\"../pkg1/RegContainerValNotDoc.html\" "
+                "<a href=\"RegContainerValNotDoc.html\" "
                 + "title=\"annotation in pkg1\">@RegContainerValNotDoc</a>"
-                + "(<a href=\"../pkg1/RegContainerValNotDoc.html#value--\">value</a>={"
-                + "<a href=\"../pkg1/RegContaineeDoc.html\" "
+                + "(<a href=\"RegContainerValNotDoc.html#value--\">value</a>={"
+                + "<a href=\"RegContaineeDoc.html\" "
                 + "title=\"annotation in pkg1\">@RegContaineeDoc</a>,"
-                + "<a href=\"../pkg1/RegContaineeDoc.html\" "
+                + "<a href=\"RegContaineeDoc.html\" "
                 + "title=\"annotation in pkg1\">@RegContaineeDoc</a>},"
-                + "<a href=\"../pkg1/RegContainerValNotDoc.html#y--\">y</a>=4)",
-                "<a href=\"../pkg1/ContainerValNotDoc.html\" "
+                + "<a href=\"RegContainerValNotDoc.html#y--\">y</a>=4)",
+                "<a href=\"ContainerValNotDoc.html\" "
                 + "title=\"annotation in pkg1\">@ContainerValNotDoc</a>"
-                + "(<a href=\"../pkg1/ContainerValNotDoc.html#value--\">value</a>={"
-                + "<a href=\"../pkg1/ContaineeNotDoc.html\" "
+                + "(<a href=\"ContainerValNotDoc.html#value--\">value</a>={"
+                + "<a href=\"ContaineeNotDoc.html\" "
                 + "title=\"annotation in pkg1\">@ContaineeNotDoc</a>,"
-                + "<a href=\"../pkg1/ContaineeNotDoc.html\" "
+                + "<a href=\"ContaineeNotDoc.html\" "
                 + "title=\"annotation in pkg1\">@ContaineeNotDoc</a>},"
-                + "<a href=\"../pkg1/ContainerValNotDoc.html#x--\">x</a>=2)",
-                "<a href=\"../pkg1/ContainerSynthNotDoc.html\" "
+                + "<a href=\"ContainerValNotDoc.html#x--\">x</a>=2)",
+                "<a href=\"ContainerSynthNotDoc.html\" "
                 + "title=\"annotation in pkg1\">@ContainerSynthNotDoc</a>("
-                + "<a href=\"../pkg1/ContainerSynthNotDoc.html#value--\">value</a>="
-                + "<a href=\"../pkg1/ContaineeSynthDoc.html\" "
+                + "<a href=\"ContainerSynthNotDoc.html#value--\">value</a>="
+                + "<a href=\"ContaineeSynthDoc.html\" "
                 + "title=\"annotation in pkg1\">@ContaineeSynthDoc</a>)");
     }
 }
--- a/test/langtools/jdk/javadoc/doclet/testSeeTag/TestSeeTag.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/langtools/jdk/javadoc/doclet/testSeeTag/TestSeeTag.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2016, 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
@@ -50,10 +50,10 @@
             "<code>List</code>",
             "<dl>\n"
             + "<dt><span class=\"seeLabel\">See Also:</span></dt>\n"
-            + "<dd><a href=\"../pkg/Test.InnerOne.html#foo--\"><code>Test.InnerOne.foo()</code></a>, \n"
-            + "<a href=\"../pkg/Test.InnerOne.html#bar-java.lang.Object-\"><code>Test.InnerOne.bar(Object)</code></a>, \n"
+            + "<dd><a href=\"Test.InnerOne.html#foo--\"><code>Test.InnerOne.foo()</code></a>, \n"
+            + "<a href=\"Test.InnerOne.html#bar-java.lang.Object-\"><code>Test.InnerOne.bar(Object)</code></a>, \n"
             + "<a href=\"http://docs.oracle.com/javase/7/docs/technotes/tools/windows/javadoc.html#see\">Javadoc</a>, \n"
-            + "<a href=\"../pkg/Test.InnerOne.html#baz-float-\"><code>something</code></a></dd>\n"
+            + "<a href=\"Test.InnerOne.html#baz-float-\"><code>something</code></a></dd>\n"
             + "</dl>");
 
         checkOutput("pkg/Test.html", false,
--- a/test/langtools/jdk/javadoc/doclet/testSubTitle/TestSubTitle.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/langtools/jdk/javadoc/doclet/testSubTitle/TestSubTitle.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -51,7 +51,7 @@
 
         checkOutput("pkg/C.html", true,
                 "<div class=\"subTitle\"><span class=\"packageLabelInType\">" +
-                "Package</span>&nbsp;<a href=\"../pkg/package-summary.html\">pkg</a></div>");
+                "Package</span>&nbsp;<a href=\"package-summary.html\">pkg</a></div>");
 
         checkOutput("pkg/package-summary.html", false,
             "<p class=\"subTitle\">\n" +
--- a/test/langtools/jdk/javadoc/doclet/testThrowsTag/TestThrowsTag.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/langtools/jdk/javadoc/doclet/testThrowsTag/TestThrowsTag.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2004, 2016, 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
@@ -48,14 +48,14 @@
         checkExit(Exit.OK);
 
         checkOutput("pkg/C.html", true,
-            "<dd><code><a href=\"../pkg/T1.html\" title=\"class in pkg\">T1</a></code> - the first throws tag.</dd>\n" +
-            "<dd><code><a href=\"../pkg/T2.html\" title=\"class in pkg\">T2</a></code> - the second throws tag.</dd>\n" +
-            "<dd><code><a href=\"../pkg/T3.html\" title=\"class in pkg\">T3</a></code> - the third throws tag.</dd>\n" +
-            "<dd><code><a href=\"../pkg/T4.html\" title=\"class in pkg\">T4</a></code> - the fourth throws tag.</dd>\n" +
-            "<dd><code><a href=\"../pkg/T5.html\" title=\"class in pkg\">T5</a></code> - the first inherited throws tag.</dd>\n" +
-            "<dd><code><a href=\"../pkg/T6.html\" title=\"class in pkg\">T6</a></code> - the second inherited throws tag.</dd>\n" +
-            "<dd><code><a href=\"../pkg/T7.html\" title=\"class in pkg\">T7</a></code> - the third inherited throws tag.</dd>\n" +
-            "<dd><code><a href=\"../pkg/T8.html\" title=\"class in pkg\">T8</a></code> - the fourth inherited throws tag.</dd>"
+            "<dd><code><a href=\"T1.html\" title=\"class in pkg\">T1</a></code> - the first throws tag.</dd>\n" +
+            "<dd><code><a href=\"T2.html\" title=\"class in pkg\">T2</a></code> - the second throws tag.</dd>\n" +
+            "<dd><code><a href=\"T3.html\" title=\"class in pkg\">T3</a></code> - the third throws tag.</dd>\n" +
+            "<dd><code><a href=\"T4.html\" title=\"class in pkg\">T4</a></code> - the fourth throws tag.</dd>\n" +
+            "<dd><code><a href=\"T5.html\" title=\"class in pkg\">T5</a></code> - the first inherited throws tag.</dd>\n" +
+            "<dd><code><a href=\"T6.html\" title=\"class in pkg\">T6</a></code> - the second inherited throws tag.</dd>\n" +
+            "<dd><code><a href=\"T7.html\" title=\"class in pkg\">T7</a></code> - the third inherited throws tag.</dd>\n" +
+            "<dd><code><a href=\"T8.html\" title=\"class in pkg\">T8</a></code> - the fourth inherited throws tag.</dd>"
         );
     }
 }
--- a/test/langtools/jdk/javadoc/doclet/testTitleInHref/TestTitleInHref.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/langtools/jdk/javadoc/doclet/testTitleInHref/TestTitleInHref.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2016, 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
@@ -50,9 +50,9 @@
 
         checkOutput("pkg/Links.html", true,
                 //Test to make sure that the title shows up in a class link.
-                "<a href=\"../pkg/Class.html\" title=\"class in pkg\">",
+                "<a href=\"Class.html\" title=\"class in pkg\">",
                 //Test to make sure that the title shows up in an interface link.
-                "<a href=\"../pkg/Interface.html\" title=\"interface in pkg\">",
+                "<a href=\"Interface.html\" title=\"interface in pkg\">",
                 //Test to make sure that the title shows up in cross link shows up
                 "<a href=\"" + uri + "/java/io/File.html?is-external=true\" "
                 + "title=\"class or interface in java.io\" class=\"externalLink\">"
--- a/test/langtools/jdk/javadoc/doclet/testTypeAnnotations/TestTypeAnnotations.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/langtools/jdk/javadoc/doclet/testTypeAnnotations/TestTypeAnnotations.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2017, 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
@@ -49,675 +49,675 @@
 
         // Test for type annotations on Class Extends (ClassExtends.java).
         checkOutput("typeannos/MyClass.html", true,
-                "extends <a href=\"../typeannos/ClassExtA.html\" title=\"annotation "
-                + "in typeannos\">@ClassExtA</a> <a href=\"../typeannos/ParameterizedClass.html\" "
+                "extends <a href=\"ClassExtA.html\" title=\"annotation "
+                + "in typeannos\">@ClassExtA</a> <a href=\"ParameterizedClass.html\" "
                 + "title=\"class in typeannos\">ParameterizedClass</a>&lt;<a href=\""
-                + "../typeannos/ClassExtB.html\" title=\"annotation in typeannos\">"
+                + "ClassExtB.html\" title=\"annotation in typeannos\">"
                 + "@ClassExtB</a> java.lang.String&gt;",
 
-                "implements <a href=\"../typeannos/ClassExtB.html\" title=\""
+                "implements <a href=\"ClassExtB.html\" title=\""
                 + "annotation in typeannos\">@ClassExtB</a> java.lang.CharSequence, "
-                + "<a href=\"../typeannos/ClassExtA.html\" title=\"annotation in "
-                + "typeannos\">@ClassExtA</a> <a href=\"../typeannos/ParameterizedInterface.html\" "
+                + "<a href=\"ClassExtA.html\" title=\"annotation in "
+                + "typeannos\">@ClassExtA</a> <a href=\"ParameterizedInterface.html\" "
                 + "title=\"interface in typeannos\">ParameterizedInterface</a>&lt;"
-                + "<a href=\"../typeannos/ClassExtB.html\" title=\"annotation in "
+                + "<a href=\"ClassExtB.html\" title=\"annotation in "
                 + "typeannos\">@ClassExtB</a> java.lang.String&gt;</pre>");
 
         checkOutput("typeannos/MyInterface.html", true,
-                "extends <a href=\"../typeannos/ClassExtA.html\" title=\"annotation "
-                + "in typeannos\">@ClassExtA</a> <a href=\"../typeannos/"
+                "extends <a href=\"ClassExtA.html\" title=\"annotation "
+                + "in typeannos\">@ClassExtA</a> <a href=\""
                 + "ParameterizedInterface.html\" title=\"interface in typeannos\">"
-                + "ParameterizedInterface</a>&lt;<a href=\"../typeannos/ClassExtA.html\" "
+                + "ParameterizedInterface</a>&lt;<a href=\"ClassExtA.html\" "
                 + "title=\"annotation in typeannos\">@ClassExtA</a> java.lang.String&gt;, "
-                + "<a href=\"../typeannos/ClassExtB.html\" title=\"annotation in "
+                + "<a href=\"ClassExtB.html\" title=\"annotation in "
                 + "typeannos\">@ClassExtB</a> java.lang.CharSequence</pre>");
 
         // Test for type annotations on Class Parameters (ClassParameters.java).
         checkOutput("typeannos/ExtendsBound.html", true,
                 "class <span class=\"typeNameLabel\">ExtendsBound&lt;K extends <a "
-                + "href=\"../typeannos/ClassParamA.html\" title=\"annotation in "
+                + "href=\"ClassParamA.html\" title=\"annotation in "
                 + "typeannos\">@ClassParamA</a> java.lang.String&gt;</span>");
 
         checkOutput("typeannos/ExtendsGeneric.html", true,
                 "<pre>class <span class=\"typeNameLabel\">ExtendsGeneric&lt;K extends "
-                + "<a href=\"../typeannos/ClassParamA.html\" title=\"annotation in "
-                + "typeannos\">@ClassParamA</a> <a href=\"../typeannos/Unannotated.html\" "
+                + "<a href=\"ClassParamA.html\" title=\"annotation in "
+                + "typeannos\">@ClassParamA</a> <a href=\"Unannotated.html\" "
                 + "title=\"class in typeannos\">Unannotated</a>&lt;<a href=\""
-                + "../typeannos/ClassParamB.html\" title=\"annotation in typeannos\">"
+                + "ClassParamB.html\" title=\"annotation in typeannos\">"
                 + "@ClassParamB</a> java.lang.String&gt;&gt;</span>");
 
         checkOutput("typeannos/TwoBounds.html", true,
                 "<pre>class <span class=\"typeNameLabel\">TwoBounds&lt;K extends <a href=\""
-                + "../typeannos/ClassParamA.html\" title=\"annotation in typeannos\">"
-                + "@ClassParamA</a> java.lang.String,V extends <a href=\"../typeannos/"
+                + "ClassParamA.html\" title=\"annotation in typeannos\">"
+                + "@ClassParamA</a> java.lang.String,V extends <a href=\""
                 + "ClassParamB.html\" title=\"annotation in typeannos\">@ClassParamB"
                 + "</a> java.lang.String&gt;</span>");
 
         checkOutput("typeannos/Complex1.html", true,
-                "class <span class=\"typeNameLabel\">Complex1&lt;K extends <a href=\"../"
-                + "typeannos/ClassParamA.html\" title=\"annotation in typeannos\">"
+                "class <span class=\"typeNameLabel\">Complex1&lt;K extends <a href=\""
+                + "ClassParamA.html\" title=\"annotation in typeannos\">"
                 + "@ClassParamA</a> java.lang.String &amp; java.lang.Runnable&gt;</span>");
 
         checkOutput("typeannos/Complex2.html", true,
                 "class <span class=\"typeNameLabel\">Complex2&lt;K extends java.lang."
-                + "String &amp; <a href=\"../typeannos/ClassParamB.html\" title=\""
+                + "String &amp; <a href=\"ClassParamB.html\" title=\""
                 + "annotation in typeannos\">@ClassParamB</a> java.lang.Runnable&gt;</span>");
 
         checkOutput("typeannos/ComplexBoth.html", true,
                 "class <span class=\"typeNameLabel\">ComplexBoth&lt;K extends <a href=\""
-                + "../typeannos/ClassParamA.html\" title=\"annotation in typeannos\""
-                + ">@ClassParamA</a> java.lang.String &amp; <a href=\"../typeannos/"
+                + "ClassParamA.html\" title=\"annotation in typeannos\""
+                + ">@ClassParamA</a> java.lang.String &amp; <a href=\""
                 + "ClassParamA.html\" title=\"annotation in typeannos\">@ClassParamA"
                 + "</a> java.lang.Runnable&gt;</span>");
 
         // Test for type annotations on fields (Fields.java).
         checkOutput("typeannos/DefaultScope.html", true,
-                "<pre><a href=\"../typeannos/Parameterized.html\" title=\"class in "
-                + "typeannos\">Parameterized</a>&lt;<a href=\"../typeannos/FldA.html\" "
+                "<pre><a href=\"Parameterized.html\" title=\"class in "
+                + "typeannos\">Parameterized</a>&lt;<a href=\"FldA.html\" "
                 + "title=\"annotation in typeannos\">@FldA</a> java.lang.String,<a "
-                + "href=\"../typeannos/FldB.html\" title=\"annotation in typeannos\">"
+                + "href=\"FldB.html\" title=\"annotation in typeannos\">"
                 + "@FldB</a> java.lang.String&gt; bothTypeArgs</pre>",
 
-                "<pre><a href=\"../typeannos/FldA.html\" title=\"annotation in "
-                + "typeannos\">@FldA</a> java.lang.String <a href=\"../typeannos/"
+                "<pre><a href=\"FldA.html\" title=\"annotation in "
+                + "typeannos\">@FldA</a> java.lang.String <a href=\""
                 + "FldB.html\" title=\"annotation in typeannos\">@FldB</a> [] "
                 + "array1Deep</pre>",
 
-                "<pre>java.lang.String <a href=\"../typeannos/FldB.html\" "
+                "<pre>java.lang.String <a href=\"FldB.html\" "
                 + "title=\"annotation in typeannos\">@FldB</a> [][] array2SecondOld</pre>",
 
                 // When JDK-8068737, we should change the order
-                "<pre><a href=\"../typeannos/FldD.html\" title=\"annotation in typeannos\">"
+                "<pre><a href=\"FldD.html\" title=\"annotation in typeannos\">"
                 + "@FldD</a> java.lang.String "
-                + "<a href=\"../typeannos/FldC.html\" title=\"annotation in typeannos\">@FldC</a> "
-                + "<a href=\"../typeannos/FldB.html\" title=\"annotation in typeannos\">@FldB</a> [] "
-                + "<a href=\"../typeannos/FldC.html\" title=\"annotation in typeannos\">@FldC</a> "
-                + "<a href=\"../typeannos/FldA.html\" title=\"annotation in typeannos\">@FldA</a> [] "
+                + "<a href=\"FldC.html\" title=\"annotation in typeannos\">@FldC</a> "
+                + "<a href=\"FldB.html\" title=\"annotation in typeannos\">@FldB</a> [] "
+                + "<a href=\"FldC.html\" title=\"annotation in typeannos\">@FldC</a> "
+                + "<a href=\"FldA.html\" title=\"annotation in typeannos\">@FldA</a> [] "
                 + "array2Deep</pre>");
 
         checkOutput("typeannos/ModifiedScoped.html", true,
-                "<pre>public final&nbsp;<a href=\"../typeannos/Parameterized.html\" "
-                + "title=\"class in typeannos\">Parameterized</a>&lt;<a href=\"../"
-                + "typeannos/FldA.html\" title=\"annotation in typeannos\">@FldA</a> "
-                + "<a href=\"../typeannos/Parameterized.html\" title=\"class in "
-                + "typeannos\">Parameterized</a>&lt;<a href=\"../typeannos/FldA.html\" "
+                "<pre>public final&nbsp;<a href=\"Parameterized.html\" "
+                + "title=\"class in typeannos\">Parameterized</a>&lt;<a href=\""
+                + "FldA.html\" title=\"annotation in typeannos\">@FldA</a> "
+                + "<a href=\"Parameterized.html\" title=\"class in "
+                + "typeannos\">Parameterized</a>&lt;<a href=\"FldA.html\" "
                 + "title=\"annotation in typeannos\">@FldA</a> java.lang.String,<a "
-                + "href=\"../typeannos/FldB.html\" title=\"annotation in typeannos\">"
-                + "@FldB</a> java.lang.String&gt;,<a href=\"../typeannos/FldB.html\" "
+                + "href=\"FldB.html\" title=\"annotation in typeannos\">"
+                + "@FldB</a> java.lang.String&gt;,<a href=\"FldB.html\" "
                 + "title=\"annotation in typeannos\">@FldB</a> java.lang.String&gt; "
                 + "nestedParameterized</pre>",
 
-                "<pre>public final&nbsp;<a href=\"../typeannos/FldA.html\" "
+                "<pre>public final&nbsp;<a href=\"FldA.html\" "
                 + "title=\"annotation in typeannos\">@FldA</a> java.lang.String[][] "
                 + "array2</pre>");
 
         // Test for type annotations on method return types (MethodReturnType.java).
         checkOutput("typeannos/MtdDefaultScope.html", true,
-                "<pre>public&nbsp;&lt;T&gt;&nbsp;<a href=\"../typeannos/MRtnA.html\" "
+                "<pre>public&nbsp;&lt;T&gt;&nbsp;<a href=\"MRtnA.html\" "
                 + "title=\"annotation in typeannos\">@MRtnA</a> java.lang.String"
                 + "&nbsp;method()</pre>",
 
                 // When JDK-8068737 is fixed, we should change the order
-                "<pre><a href=\"../typeannos/MRtnA.html\" title=\"annotation in typeannos\">"
+                "<pre><a href=\"MRtnA.html\" title=\"annotation in typeannos\">"
                 + "@MRtnA</a> java.lang.String "
-                + "<a href=\"../typeannos/MRtnB.html\" title=\"annotation in typeannos\">@MRtnB</a> [] "
-                + "<a href=\"../typeannos/MRtnA.html\" title=\"annotation in typeannos\">@MRtnA</a> []"
+                + "<a href=\"MRtnB.html\" title=\"annotation in typeannos\">@MRtnB</a> [] "
+                + "<a href=\"MRtnA.html\" title=\"annotation in typeannos\">@MRtnA</a> []"
                 + "&nbsp;array2Deep()</pre>",
 
-                "<pre><a href=\"../typeannos/MRtnA.html\" title=\"annotation in "
+                "<pre><a href=\"MRtnA.html\" title=\"annotation in "
                 + "typeannos\">@MRtnA</a> java.lang.String[][]&nbsp;array2()</pre>");
 
         checkOutput("typeannos/MtdModifiedScoped.html", true,
-                "<pre>public final&nbsp;<a href=\"../typeannos/MtdParameterized.html\" "
-                + "title=\"class in typeannos\">MtdParameterized</a>&lt;<a href=\"../"
-                + "typeannos/MRtnA.html\" title=\"annotation in typeannos\">@MRtnA</a> "
-                + "<a href=\"../typeannos/MtdParameterized.html\" title=\"class in "
-                + "typeannos\">MtdParameterized</a>&lt;<a href=\"../typeannos/MRtnA."
+                "<pre>public final&nbsp;<a href=\"MtdParameterized.html\" "
+                + "title=\"class in typeannos\">MtdParameterized</a>&lt;<a href=\""
+                + "MRtnA.html\" title=\"annotation in typeannos\">@MRtnA</a> "
+                + "<a href=\"MtdParameterized.html\" title=\"class in "
+                + "typeannos\">MtdParameterized</a>&lt;<a href=\"MRtnA."
                 + "html\" title=\"annotation in typeannos\">@MRtnA</a> java.lang."
-                + "String,<a href=\"../typeannos/MRtnB.html\" title=\"annotation in "
-                + "typeannos\">@MRtnB</a> java.lang.String&gt;,<a href=\"../typeannos/"
+                + "String,<a href=\"MRtnB.html\" title=\"annotation in "
+                + "typeannos\">@MRtnB</a> java.lang.String&gt;,<a href=\""
                 + "MRtnB.html\" title=\"annotation in typeannos\">@MRtnB</a> java."
                 + "lang.String&gt;&nbsp;nestedMtdParameterized()</pre>");
 
         // Test for type annotations on method type parameters (MethodTypeParameters.java).
         checkOutput("typeannos/UnscopedUnmodified.html", true,
-                "<pre>&lt;K extends <a href=\"../typeannos/MTyParamA.html\" title=\""
+                "<pre>&lt;K extends <a href=\"MTyParamA.html\" title=\""
                 + "annotation in typeannos\">@MTyParamA</a> java.lang.String&gt;"
                 + "&nbsp;void&nbsp;methodExtends()</pre>",
 
-                "<pre>&lt;K extends <a href=\"../typeannos/MTyParamA.html\" title=\""
-                + "annotation in typeannos\">@MTyParamA</a> <a href=\"../typeannos/"
+                "<pre>&lt;K extends <a href=\"MTyParamA.html\" title=\""
+                + "annotation in typeannos\">@MTyParamA</a> <a href=\""
                 + "MtdTyParameterized.html\" title=\"class in typeannos\">"
-                + "MtdTyParameterized</a>&lt;<a href=\"../typeannos/MTyParamB.html\" "
+                + "MtdTyParameterized</a>&lt;<a href=\"MTyParamB.html\" "
                 + "title=\"annotation in typeannos\">@MTyParamB</a> java.lang.String"
                 + "&gt;&gt;&nbsp;void&nbsp;nestedExtends()</pre>");
 
         checkOutput("typeannos/PublicModifiedMethods.html", true,
-                "<pre>public final&nbsp;&lt;K extends <a href=\"../typeannos/"
+                "<pre>public final&nbsp;&lt;K extends <a href=\""
                 + "MTyParamA.html\" title=\"annotation in typeannos\">@MTyParamA</a> "
                 + "java.lang.String&gt;&nbsp;void&nbsp;methodExtends()</pre>",
 
-                "<pre>public final&nbsp;&lt;K extends <a href=\"../typeannos/"
+                "<pre>public final&nbsp;&lt;K extends <a href=\""
                 + "MTyParamA.html\" title=\"annotation in typeannos\">@MTyParamA</a> "
-                + "java.lang.String,V extends <a href=\"../typeannos/MTyParamA.html\" "
-                + "title=\"annotation in typeannos\">@MTyParamA</a> <a href=\"../"
-                + "typeannos/MtdTyParameterized.html\" title=\"class in typeannos\">"
-                + "MtdTyParameterized</a>&lt;<a href=\"../typeannos/MTyParamB.html\" "
+                + "java.lang.String,V extends <a href=\"MTyParamA.html\" "
+                + "title=\"annotation in typeannos\">@MTyParamA</a> <a href=\""
+                + "MtdTyParameterized.html\" title=\"class in typeannos\">"
+                + "MtdTyParameterized</a>&lt;<a href=\"MTyParamB.html\" "
                 + "title=\"annotation in typeannos\">@MTyParamB</a> java.lang.String"
                 + "&gt;&gt;&nbsp;void&nbsp;dual()</pre>");
 
         // Test for type annotations on parameters (Parameters.java).
         checkOutput("typeannos/Parameters.html", true,
-                "<pre>void&nbsp;unannotated&#8203;(<a href=\"../typeannos/"
+                "<pre>void&nbsp;unannotated&#8203;(<a href=\""
                 + "ParaParameterized.html\" title=\"class in typeannos\">"
                 + "ParaParameterized</a>&lt;java.lang.String,java.lang.String&gt;"
                 + "&nbsp;a)</pre>",
 
-                "<pre>void&nbsp;nestedParaParameterized&#8203;(<a href=\"../typeannos/"
+                "<pre>void&nbsp;nestedParaParameterized&#8203;(<a href=\""
+                + "ParaParameterized.html\" title=\"class in typeannos\">"
+                + "ParaParameterized</a>&lt;<a href=\"ParamA.html\" "
+                + "title=\"annotation in typeannos\">@ParamA</a> <a href=\""
                 + "ParaParameterized.html\" title=\"class in typeannos\">"
-                + "ParaParameterized</a>&lt;<a href=\"../typeannos/ParamA.html\" "
-                + "title=\"annotation in typeannos\">@ParamA</a> <a href=\"../"
-                + "typeannos/ParaParameterized.html\" title=\"class in typeannos\">"
-                + "ParaParameterized</a>&lt;<a href=\"../typeannos/ParamA.html\" "
+                + "ParaParameterized</a>&lt;<a href=\"ParamA.html\" "
                 + "title=\"annotation in typeannos\">@ParamA</a> java.lang.String,"
-                + "<a href=\"../typeannos/ParamB.html\" title=\"annotation in "
-                + "typeannos\">@ParamB</a> java.lang.String&gt;,<a href=\"../"
-                + "typeannos/ParamB.html\" title=\"annotation in typeannos\">@ParamB"
+                + "<a href=\"ParamB.html\" title=\"annotation in "
+                + "typeannos\">@ParamB</a> java.lang.String&gt;,<a href=\""
+                + "ParamB.html\" title=\"annotation in typeannos\">@ParamB"
                 + "</a> java.lang.String&gt;&nbsp;a)</pre>",
 
                 // When JDK-8068737 is fixed, we should change the order
-                "<pre>void&nbsp;array2Deep&#8203;(<a href=\"../typeannos/ParamA.html\" "
+                "<pre>void&nbsp;array2Deep&#8203;(<a href=\"ParamA.html\" "
                 + "title=\"annotation in typeannos\">@ParamA</a> java.lang.String "
-                + "<a href=\"../typeannos/ParamB.html\" title=\"annotation in typeannos\">"
+                + "<a href=\"ParamB.html\" title=\"annotation in typeannos\">"
                 + "@ParamB</a> [] "
-                + "<a href=\"../typeannos/ParamA.html\" title=\"annotation in typeannos\">"
+                + "<a href=\"ParamA.html\" title=\"annotation in typeannos\">"
                 + "@ParamA</a> []"
                 + "&nbsp;a)</pre>");
 
         // Test for type annotations on throws (Throws.java).
         checkOutput("typeannos/ThrDefaultUnmodified.html", true,
                 "<pre>void&nbsp;oneException()\n"
-                + "           throws <a href=\"../typeannos/ThrA.html\" title=\""
+                + "           throws <a href=\"ThrA.html\" title=\""
                 + "annotation in typeannos\">@ThrA</a> java.lang.Exception</pre>",
 
                 "<pre>void&nbsp;twoExceptions()\n"
-                + "            throws <a href=\"../typeannos/ThrA.html\" title=\""
+                + "            throws <a href=\"ThrA.html\" title=\""
                 + "annotation in typeannos\">@ThrA</a> java.lang.RuntimeException,\n"
-                + "                   <a href=\"../typeannos/ThrA.html\" title=\""
+                + "                   <a href=\"ThrA.html\" title=\""
                 + "annotation in typeannos\">@ThrA</a> java.lang.Exception</pre>");
 
         checkOutput("typeannos/ThrPublicModified.html", true,
                 "<pre>public final&nbsp;void&nbsp;oneException&#8203;(java.lang.String&nbsp;a)\n"
-                + "                        throws <a href=\"../typeannos/ThrA.html\" "
+                + "                        throws <a href=\"ThrA.html\" "
                 + "title=\"annotation in typeannos\">@ThrA</a> java.lang.Exception</pre>",
 
                 "<pre>public final&nbsp;void&nbsp;twoExceptions&#8203;(java.lang.String&nbsp;a)\n"
-                + "                         throws <a href=\"../typeannos/ThrA.html\" "
+                + "                         throws <a href=\"ThrA.html\" "
                 + "title=\"annotation in typeannos\">@ThrA</a> java.lang.RuntimeException,\n"
-                + "                                <a href=\"../typeannos/ThrA.html\" "
+                + "                                <a href=\"ThrA.html\" "
                 + "title=\"annotation in typeannos\">@ThrA</a> java.lang.Exception</pre>");
 
         checkOutput("typeannos/ThrWithValue.html", true,
                 "<pre>void&nbsp;oneException()\n"
-                + "           throws <a href=\"../typeannos/ThrB.html\" title=\""
+                + "           throws <a href=\"ThrB.html\" title=\""
                 + "annotation in typeannos\">@ThrB</a>("
                 + "\"m\") java.lang.Exception</pre>",
 
                 "<pre>void&nbsp;twoExceptions()\n"
-                + "            throws <a href=\"../typeannos/ThrB.html\" title=\""
+                + "            throws <a href=\"ThrB.html\" title=\""
                 + "annotation in typeannos\">@ThrB</a>("
                 + "\"m\") java.lang.RuntimeException,\n"
-                + "                   <a href=\"../typeannos/ThrA.html\" title=\""
+                + "                   <a href=\"ThrA.html\" title=\""
                 + "annotation in typeannos\">@ThrA</a> java.lang.Exception</pre>");
 
         // Test for type annotations on type parameters (TypeParameters.java).
         checkOutput("typeannos/TestMethods.html", true,
-                "<pre>&lt;K,<a href=\"../typeannos/TyParaA.html\" title=\"annotation in typeannos\">"
-                + "@TyParaA</a> V extends <a href=\"../typeannos/TyParaA.html\" "
+                "<pre>&lt;K,<a href=\"TyParaA.html\" title=\"annotation in typeannos\">"
+                + "@TyParaA</a> V extends <a href=\"TyParaA.html\" "
                 + "title=\"annotation in typeannos\">@TyParaA</a> "
                 + "java.lang.String&gt;&nbsp;void&nbsp;secondAnnotated()</pre>"
         );
 
         // Test for type annotations on wildcard type (Wildcards.java).
         checkOutput("typeannos/BoundTest.html", true,
-                "<pre>void&nbsp;wcExtends&#8203;(<a href=\"../typeannos/MyList.html\" "
+                "<pre>void&nbsp;wcExtends&#8203;(<a href=\"MyList.html\" "
                 + "title=\"class in typeannos\">MyList</a>&lt;? extends <a href=\""
-                + "../typeannos/WldA.html\" title=\"annotation in typeannos\">@WldA"
+                + "WldA.html\" title=\"annotation in typeannos\">@WldA"
                 + "</a> java.lang.String&gt;&nbsp;l)</pre>",
 
-                "<pre><a href=\"../typeannos/MyList.html\" title=\"class in "
-                + "typeannos\">MyList</a>&lt;? super <a href=\"../typeannos/WldA.html\" "
+                "<pre><a href=\"MyList.html\" title=\"class in "
+                + "typeannos\">MyList</a>&lt;? super <a href=\"WldA.html\" "
                 + "title=\"annotation in typeannos\">@WldA</a> java.lang.String&gt;"
                 + "&nbsp;returnWcSuper()</pre>");
 
         checkOutput("typeannos/BoundWithValue.html", true,
-                "<pre>void&nbsp;wcSuper&#8203;(<a href=\"../typeannos/MyList.html\" title=\""
-                + "class in typeannos\">MyList</a>&lt;? super <a href=\"../typeannos/"
+                "<pre>void&nbsp;wcSuper&#8203;(<a href=\"MyList.html\" title=\""
+                + "class in typeannos\">MyList</a>&lt;? super <a href=\""
                 + "WldB.html\" title=\"annotation in typeannos\">@WldB</a>("
                 + "\"m\") java.lang."
                 + "String&gt;&nbsp;l)</pre>",
 
-                "<pre><a href=\"../typeannos/MyList.html\" title=\"class in "
-                + "typeannos\">MyList</a>&lt;? extends <a href=\"../typeannos/WldB."
+                "<pre><a href=\"MyList.html\" title=\"class in "
+                + "typeannos\">MyList</a>&lt;? extends <a href=\"WldB."
                 + "html\" title=\"annotation in typeannos\">@WldB</a>("
                 + "\"m\") java.lang.String"
                 + "&gt;&nbsp;returnWcExtends()</pre>");
 
         // Test for receiver annotations (Receivers.java).
         checkOutput("typeannos/DefaultUnmodified.html", true,
-                "<pre>void&nbsp;withException&#8203;(<a href=\"../typeannos/RcvrA.html\" "
+                "<pre>void&nbsp;withException&#8203;(<a href=\"RcvrA.html\" "
                 + "title=\"annotation in typeannos\">@RcvrA</a>&nbsp;"
                 + "DefaultUnmodified&nbsp;this)\n"
                 + "            throws java."
                 + "lang.Exception</pre>",
 
-                "<pre>java.lang.String&nbsp;nonVoid&#8203;(<a href=\"../typeannos/RcvrA."
-                + "html\" title=\"annotation in typeannos\">@RcvrA</a> <a href=\"../"
-                + "typeannos/RcvrB.html\" title=\"annotation in typeannos\">@RcvrB"
+                "<pre>java.lang.String&nbsp;nonVoid&#8203;(<a href=\"RcvrA."
+                + "html\" title=\"annotation in typeannos\">@RcvrA</a> <a href=\""
+                + "RcvrB.html\" title=\"annotation in typeannos\">@RcvrB"
                 + "</a>(\"m\")"
                 + "&nbsp;DefaultUnmodified&nbsp;this)</pre>",
 
                 "<pre>&lt;T extends java.lang.Runnable&gt;&nbsp;void&nbsp;accept&#8203;("
-                + "<a href=\"../typeannos/RcvrA.html\" title=\"annotation in "
+                + "<a href=\"RcvrA.html\" title=\"annotation in "
                 + "typeannos\">@RcvrA</a>&nbsp;DefaultUnmodified&nbsp;this,\n"
                 + "                                           T&nbsp;r)\n"
                 + "                                    throws java.lang.Exception</pre>");
 
         checkOutput("typeannos/PublicModified.html", true,
                 "<pre>public final&nbsp;java.lang.String&nbsp;nonVoid&#8203;(<a href=\""
-                + "../typeannos/RcvrA.html\" title=\"annotation in typeannos\">"
+                + "RcvrA.html\" title=\"annotation in typeannos\">"
                 + "@RcvrA</a>&nbsp;PublicModified&nbsp;this)</pre>",
 
                 "<pre>public final&nbsp;&lt;T extends java.lang.Runnable&gt;&nbsp;"
-                + "void&nbsp;accept&#8203;(<a href=\"../typeannos/RcvrA.html\" title=\""
+                + "void&nbsp;accept&#8203;(<a href=\"RcvrA.html\" title=\""
                 + "annotation in typeannos\">@RcvrA</a>&nbsp;PublicModified&nbsp;this,\n"
                 + "                                                        T&nbsp;r)\n"
                 + "                                                 throws java.lang.Exception</pre>");
 
         checkOutput("typeannos/WithValue.html", true,
                 "<pre>&lt;T extends java.lang.Runnable&gt;&nbsp;void&nbsp;accept&#8203;("
-                + "<a href=\"../typeannos/RcvrB.html\" title=\"annotation in "
+                + "<a href=\"RcvrB.html\" title=\"annotation in "
                 + "typeannos\">@RcvrB</a>("
                 + "\"m\")&nbsp;WithValue&nbsp;this,\n"
                 + "                                           T&nbsp;r)\n"
                 + "                                    throws java.lang.Exception</pre>");
 
         checkOutput("typeannos/WithFinal.html", true,
-                "<pre>java.lang.String&nbsp;nonVoid&#8203;(<a href=\"../typeannos/RcvrB.html\" "
+                "<pre>java.lang.String&nbsp;nonVoid&#8203;(<a href=\"RcvrB.html\" "
                 + "title=\"annotation in typeannos\">@RcvrB</a>(\"m\") "
-                + "<a href=\"../typeannos/WithFinal.html\" title=\"class in typeannos\">"
+                + "<a href=\"WithFinal.html\" title=\"class in typeannos\">"
                 + "WithFinal</a>&nbsp;afield)</pre>");
 
         checkOutput("typeannos/WithBody.html", true,
-                "<pre>void&nbsp;field&#8203;(<a href=\"../typeannos/RcvrA.html\" title=\""
+                "<pre>void&nbsp;field&#8203;(<a href=\"RcvrA.html\" title=\""
                 + "annotation in typeannos\">@RcvrA</a>&nbsp;WithBody&nbsp;this)</pre>");
 
         checkOutput("typeannos/Generic2.html", true,
-                "<pre>void&nbsp;test2&#8203;(<a href=\"../typeannos/RcvrA.html\" title=\""
+                "<pre>void&nbsp;test2&#8203;(<a href=\"RcvrA.html\" title=\""
                 + "annotation in typeannos\">@RcvrA</a>&nbsp;Generic2&lt;X&gt;&nbsp;this)</pre>");
 
 
         // Test for repeated type annotations (RepeatedAnnotations.java).
         checkOutput("typeannos/RepeatingAtClassLevel.html", true,
-                "<pre><a href=\"../typeannos/RepTypeA.html\" title=\"annotation in "
-                + "typeannos\">@RepTypeA</a> <a href=\"../typeannos/RepTypeA.html\" "
+                "<pre><a href=\"RepTypeA.html\" title=\"annotation in "
+                + "typeannos\">@RepTypeA</a> <a href=\"RepTypeA.html\" "
                 + "title=\"annotation in typeannos\">@RepTypeA</a>\n<a href="
-                + "\"../typeannos/RepTypeB.html\" title=\"annotation in typeannos\">"
-                + "@RepTypeB</a> <a href=\"../typeannos/RepTypeB.html\" title="
+                + "\"RepTypeB.html\" title=\"annotation in typeannos\">"
+                + "@RepTypeB</a> <a href=\"RepTypeB.html\" title="
                 + "\"annotation in typeannos\">@RepTypeB</a>\nclass <span class="
                 + "\"typeNameLabel\">RepeatingAtClassLevel</span>\nextends "
                 + "java.lang.Object</pre>");
 
 // @ignore 8146008
 //        checkOutput("typeannos/RepeatingAtClassLevel2.html", true,
-//                "<pre><a href=\"../typeannos/RepTypeUseA.html\" title=\"annotation "
-//                + "in typeannos\">@RepTypeUseA</a> <a href=\"../typeannos/RepTypeUseA.html"
+//                "<pre><a href=\"RepTypeUseA.html\" title=\"annotation "
+//                + "in typeannos\">@RepTypeUseA</a> <a href=\"RepTypeUseA.html"
 //                + "\" title=\"annotation in typeannos\">@RepTypeUseA</a>\n<a href="
-//                + "\"../typeannos/RepTypeUseB.html\" title=\"annotation in typeannos"
-//                + "\">@RepTypeUseB</a> <a href=\"../typeannos/RepTypeUseB.html\" "
+//                + "\"RepTypeUseB.html\" title=\"annotation in typeannos"
+//                + "\">@RepTypeUseB</a> <a href=\"RepTypeUseB.html\" "
 //                + "title=\"annotation in typeannos\">@RepTypeUseB</a>\nclass <span "
 //                + "class=\"typeNameLabel\">RepeatingAtClassLevel2</span>\nextends "
 //                + "java.lang.Object</pre>");
 //
 //        checkOutput("typeannos/RepeatingAtClassLevel2.html", true,
-//                "<pre><a href=\"../typeannos/RepAllContextsA.html\" title=\"annotation"
-//                + " in typeannos\">@RepAllContextsA</a> <a href=\"../typeannos/RepAllContextsA.html"
+//                "<pre><a href=\"RepAllContextsA.html\" title=\"annotation"
+//                + " in typeannos\">@RepAllContextsA</a> <a href=\"RepAllContextsA.html"
 //                + "\" title=\"annotation in typeannos\">@RepAllContextsA</a>\n<a href="
-//                + "\"../typeannos/RepAllContextsB.html\" title=\"annotation in typeannos"
-//                + "\">@RepAllContextsB</a> <a href=\"../typeannos/RepAllContextsB.html"
+//                + "\"RepAllContextsB.html\" title=\"annotation in typeannos"
+//                + "\">@RepAllContextsB</a> <a href=\"RepAllContextsB.html"
 //                + "\" title=\"annotation in typeannos\">@RepAllContextsB</a>\n"
 //                + "class <span class=\"typeNameLabel\">RepeatingAtClassLevel3</span>\n"
 //                + "extends java.lang.Object</pre>");
 
         checkOutput("typeannos/RepeatingOnConstructor.html", true,
-                "<pre><a href=\"../typeannos/RepConstructorA.html\" title=\"annotation "
-                + "in typeannos\">@RepConstructorA</a> <a href=\"../typeannos/RepConstructorA.html"
+                "<pre><a href=\"RepConstructorA.html\" title=\"annotation "
+                + "in typeannos\">@RepConstructorA</a> <a href=\"RepConstructorA.html"
                 + "\" title=\"annotation in typeannos\">@RepConstructorA</a>\n<a href="
-                + "\"../typeannos/RepConstructorB.html\" title=\"annotation in typeannos"
-                + "\">@RepConstructorB</a> <a href=\"../typeannos/RepConstructorB.html"
+                + "\"RepConstructorB.html\" title=\"annotation in typeannos"
+                + "\">@RepConstructorB</a> <a href=\"RepConstructorB.html"
                 + "\" title=\"annotation in typeannos\">@RepConstructorB</a>\n"
                 + "RepeatingOnConstructor()</pre>",
 
-                "<pre><a href=\"../typeannos/RepConstructorA.html\" title=\"annotation in typeannos"
-                + "\">@RepConstructorA</a> <a href=\"../typeannos/RepConstructorA.html"
+                "<pre><a href=\"RepConstructorA.html\" title=\"annotation in typeannos"
+                + "\">@RepConstructorA</a> <a href=\"RepConstructorA.html"
                 + "\" title=\"annotation in typeannos\">@RepConstructorA</a>\n<a href="
-                + "\"../typeannos/RepConstructorB.html\" title=\"annotation in typeannos"
-                + "\">@RepConstructorB</a> <a href=\"../typeannos/RepConstructorB.html"
+                + "\"RepConstructorB.html\" title=\"annotation in typeannos"
+                + "\">@RepConstructorB</a> <a href=\"RepConstructorB.html"
                 + "\" title=\"annotation in typeannos\">@RepConstructorB</a>\n"
                 + "RepeatingOnConstructor&#8203;(int&nbsp;i,\n                       int&nbsp;j)</pre>",
 
-                "<pre><a href=\"../typeannos/RepAllContextsA.html\" title=\"annotation in typeannos"
-                + "\">@RepAllContextsA</a> <a href=\"../typeannos/RepAllContextsA.html"
+                "<pre><a href=\"RepAllContextsA.html\" title=\"annotation in typeannos"
+                + "\">@RepAllContextsA</a> <a href=\"RepAllContextsA.html"
                 + "\" title=\"annotation in typeannos\">@RepAllContextsA</a>\n"
-                + "<a href=\"../typeannos/RepAllContextsB.html\" title=\"annotation in typeannos"
-                + "\">@RepAllContextsB</a> <a href=\"../typeannos/RepAllContextsB.html"
+                + "<a href=\"RepAllContextsB.html\" title=\"annotation in typeannos"
+                + "\">@RepAllContextsB</a> <a href=\"RepAllContextsB.html"
                 + "\" title=\"annotation in typeannos\">@RepAllContextsB</a>\n"
                 + "RepeatingOnConstructor&#8203;(int&nbsp;i,\n                       int&nbsp;j,\n"
                 + "                       int&nbsp;k)</pre>",
 
-                "<pre>RepeatingOnConstructor&#8203;(<a href=\"../typeannos/RepParameterA.html"
+                "<pre>RepeatingOnConstructor&#8203;(<a href=\"RepParameterA.html"
                 + "\" title=\"annotation in typeannos\">@RepParameterA</a> <a href="
-                + "\"../typeannos/RepParameterA.html\" title=\"annotation in typeannos"
-                + "\">@RepParameterA</a> <a href=\"../typeannos/RepParameterB.html"
+                + "\"RepParameterA.html\" title=\"annotation in typeannos"
+                + "\">@RepParameterA</a> <a href=\"RepParameterB.html"
                 + "\" title=\"annotation in typeannos\">@RepParameterB</a> "
-                + "<a href=\"../typeannos/RepParameterB.html\" title=\"annotation in typeannos"
+                + "<a href=\"RepParameterB.html\" title=\"annotation in typeannos"
                 + "\">@RepParameterB</a>\n                       java.lang.String&nbsp;parameter,\n"
-                + "                       <a href=\"../typeannos/RepParameterA.html\" "
+                + "                       <a href=\"RepParameterA.html\" "
                 + "title=\"annotation in typeannos\">@RepParameterA</a> <a href="
-                + "\"../typeannos/RepParameterA.html\" title=\"annotation in typeannos\">"
-                + "@RepParameterA</a> <a href=\"../typeannos/RepParameterB.html\" "
+                + "\"RepParameterA.html\" title=\"annotation in typeannos\">"
+                + "@RepParameterA</a> <a href=\"RepParameterB.html\" "
                 + "title=\"annotation in typeannos\">@RepParameterB</a> <a href="
-                + "\"../typeannos/RepParameterB.html\" title=\"annotation in typeannos\">"
+                + "\"RepParameterB.html\" title=\"annotation in typeannos\">"
                 + "@RepParameterB</a>\n                       java.lang.String "
-                + "<a href=\"../typeannos/RepTypeUseA.html\" title=\"annotation in typeannos\">"
-                + "@RepTypeUseA</a> <a href=\"../typeannos/RepTypeUseA.html\" "
+                + "<a href=\"RepTypeUseA.html\" title=\"annotation in typeannos\">"
+                + "@RepTypeUseA</a> <a href=\"RepTypeUseA.html\" "
                 + "title=\"annotation in typeannos\">@RepTypeUseA</a> <a href="
-                + "\"../typeannos/RepTypeUseB.html\" title=\"annotation in typeannos\">@RepTypeUseB</a> "
-                + "<a href=\"../typeannos/RepTypeUseB.html\" title=\"annotation in typeannos\">"
+                + "\"RepTypeUseB.html\" title=\"annotation in typeannos\">@RepTypeUseB</a> "
+                + "<a href=\"RepTypeUseB.html\" title=\"annotation in typeannos\">"
                 + "@RepTypeUseB</a> ...&nbsp;vararg)</pre>"
         );
 
         checkOutput("typeannos/RepeatingOnConstructor.Inner.html", true,
-                "<code><span class=\"memberNameLink\"><a href=\"../typeannos/RepeatingOnConstructor.Inner.html"
+                "<code><span class=\"memberNameLink\"><a href=\""
                 + "#Inner-java.lang.String-java.lang.String...-\">Inner</a></span>"
                 + "&#8203;(java.lang.String&nbsp;parameter,\n     java.lang.String <a href="
-                + "\"../typeannos/RepTypeUseA.html\" title=\"annotation in typeannos\">"
-                + "@RepTypeUseA</a> <a href=\"../typeannos/RepTypeUseA.html\" title="
-                + "\"annotation in typeannos\">@RepTypeUseA</a> <a href=\"../typeannos/RepTypeUseB.html"
+                + "\"RepTypeUseA.html\" title=\"annotation in typeannos\">"
+                + "@RepTypeUseA</a> <a href=\"RepTypeUseA.html\" title="
+                + "\"annotation in typeannos\">@RepTypeUseA</a> <a href=\"RepTypeUseB.html"
                 + "\" title=\"annotation in typeannos\">@RepTypeUseB</a> <a href="
-                + "\"../typeannos/RepTypeUseB.html\" title=\"annotation in typeannos\">"
+                + "\"RepTypeUseB.html\" title=\"annotation in typeannos\">"
                 + "@RepTypeUseB</a> ...&nbsp;vararg)</code>",
 
-                "Inner&#8203;(<a href=\"../typeannos/RepTypeUseA.html\" title=\"annotation in typeannos\">"
-                + "@RepTypeUseA</a> <a href=\"../typeannos/RepTypeUseA.html\" title="
-                + "\"annotation in typeannos\">@RepTypeUseA</a> <a href=\"../typeannos/RepTypeUseB.html"
+                "Inner&#8203;(<a href=\"RepTypeUseA.html\" title=\"annotation in typeannos\">"
+                + "@RepTypeUseA</a> <a href=\"RepTypeUseA.html\" title="
+                + "\"annotation in typeannos\">@RepTypeUseA</a> <a href=\"RepTypeUseB.html"
                 + "\" title=\"annotation in typeannos\">@RepTypeUseB</a> <a href="
-                + "\"../typeannos/RepTypeUseB.html\" title=\"annotation in typeannos\">"
+                + "\"RepTypeUseB.html\" title=\"annotation in typeannos\">"
                 + "@RepTypeUseB</a>&nbsp;RepeatingOnConstructor&nbsp;this,\n      <a href="
-                + "\"../typeannos/RepParameterA.html\" title=\"annotation in typeannos\">"
-                + "@RepParameterA</a> <a href=\"../typeannos/RepParameterA.html\" title="
-                + "\"annotation in typeannos\">@RepParameterA</a> <a href=\"../typeannos/RepParameterB.html"
+                + "\"RepParameterA.html\" title=\"annotation in typeannos\">"
+                + "@RepParameterA</a> <a href=\"RepParameterA.html\" title="
+                + "\"annotation in typeannos\">@RepParameterA</a> <a href=\"RepParameterB.html"
                 + "\" title=\"annotation in typeannos\">@RepParameterB</a> <a href="
-                + "\"../typeannos/RepParameterB.html\" title=\"annotation in typeannos\">"
+                + "\"RepParameterB.html\" title=\"annotation in typeannos\">"
                 + "@RepParameterB</a>\n      java.lang.String&nbsp;parameter,\n"
-                + "      <a href=\"../typeannos/RepParameterA.html\" title=\"annotation in typeannos\">"
-                + "@RepParameterA</a> <a href=\"../typeannos/RepParameterA.html\" title="
-                + "\"annotation in typeannos\">@RepParameterA</a> <a href=\"../typeannos/RepParameterB.html"
+                + "      <a href=\"RepParameterA.html\" title=\"annotation in typeannos\">"
+                + "@RepParameterA</a> <a href=\"RepParameterA.html\" title="
+                + "\"annotation in typeannos\">@RepParameterA</a> <a href=\"RepParameterB.html"
                 + "\" title=\"annotation in typeannos\">@RepParameterB</a> <a href="
-                + "\"../typeannos/RepParameterB.html\" title=\"annotation in typeannos\">"
-                + "@RepParameterB</a>\n      java.lang.String <a href=\"../typeannos/RepTypeUseA.html"
+                + "\"RepParameterB.html\" title=\"annotation in typeannos\">"
+                + "@RepParameterB</a>\n      java.lang.String <a href=\"RepTypeUseA.html"
                 + "\" title=\"annotation in typeannos\">@RepTypeUseA</a> <a href="
-                + "\"../typeannos/RepTypeUseA.html\" title=\"annotation in typeannos\">"
-                + "@RepTypeUseA</a> <a href=\"../typeannos/RepTypeUseB.html\" title="
-                + "\"annotation in typeannos\">@RepTypeUseB</a> <a href=\"../typeannos/RepTypeUseB.html"
+                + "\"RepTypeUseA.html\" title=\"annotation in typeannos\">"
+                + "@RepTypeUseA</a> <a href=\"RepTypeUseB.html\" title="
+                + "\"annotation in typeannos\">@RepTypeUseB</a> <a href=\"RepTypeUseB.html"
                 + "\" title=\"annotation in typeannos\">@RepTypeUseB</a> ...&nbsp;vararg)");
 
         checkOutput("typeannos/RepeatingOnField.html", true,
                 "<code>(package private) java.lang.Integer</code></td>\n<th class=\"colSecond\" scope=\"row\">"
-                + "<code><span class=\"memberNameLink\"><a href=\"../typeannos/RepeatingOnField.html#i1"
+                + "<code><span class=\"memberNameLink\"><a href=\"#i1"
                 + "\">i1</a></span></code>",
 
-                "<code>(package private) <a href=\"../typeannos/RepTypeUseA.html\" "
+                "<code>(package private) <a href=\"RepTypeUseA.html\" "
                 + "title=\"annotation in typeannos\">@RepTypeUseA</a> <a href=\""
-                + "../typeannos/RepTypeUseA.html\" title=\"annotation in typeannos\">"
-                + "@RepTypeUseA</a> <a href=\"../typeannos/RepTypeUseB.html\" title="
-                + "\"annotation in typeannos\">@RepTypeUseB</a> <a href=\"../typeannos/RepTypeUseB.html"
+                + "RepTypeUseA.html\" title=\"annotation in typeannos\">"
+                + "@RepTypeUseA</a> <a href=\"RepTypeUseB.html\" title="
+                + "\"annotation in typeannos\">@RepTypeUseB</a> <a href=\"RepTypeUseB.html"
                 + "\" title=\"annotation in typeannos\">@RepTypeUseB</a> java.lang.Integer</code></td>\n"
                 + "<th class=\"colSecond\" scope=\"row\"><code><span class=\"memberNameLink\"><a href="
-                + "\"../typeannos/RepeatingOnField.html#i2\">i2</a></span></code>",
+                + "\"#i2\">i2</a></span></code>",
 
-                "<code>(package private) <a href=\"../typeannos/RepTypeUseA.html\" title="
-                + "\"annotation in typeannos\">@RepTypeUseA</a> <a href=\"../typeannos/RepTypeUseA.html\" "
+                "<code>(package private) <a href=\"RepTypeUseA.html\" title="
+                + "\"annotation in typeannos\">@RepTypeUseA</a> <a href=\"RepTypeUseA.html\" "
                 + "title=\"annotation in typeannos\">@RepTypeUseA</a> <a href="
-                + "\"../typeannos/RepTypeUseB.html\" title=\"annotation in typeannos\">"
-                + "@RepTypeUseB</a> <a href=\"../typeannos/RepTypeUseB.html\" title="
+                + "\"RepTypeUseB.html\" title=\"annotation in typeannos\">"
+                + "@RepTypeUseB</a> <a href=\"RepTypeUseB.html\" title="
                 + "\"annotation in typeannos\">@RepTypeUseB</a> java.lang.Integer</code>"
                 + "</td>\n<th class=\"colSecond\" scope=\"row\"><code><span class=\"memberNameLink\">"
-                + "<a href=\"../typeannos/RepeatingOnField.html#i3\">i3</a></span></code>",
+                + "<a href=\"#i3\">i3</a></span></code>",
 
-                "<code>(package private) <a href=\"../typeannos/RepAllContextsA.html\" title=\""
-                + "annotation in typeannos\">@RepAllContextsA</a> <a href=\"../typeannos/RepAllContextsA.html"
+                "<code>(package private) <a href=\"RepAllContextsA.html\" title=\""
+                + "annotation in typeannos\">@RepAllContextsA</a> <a href=\"RepAllContextsA.html"
                 + "\" title=\"annotation in typeannos\">@RepAllContextsA</a> <a href="
-                + "\"../typeannos/RepAllContextsB.html\" title=\"annotation in typeannos\">"
-                + "@RepAllContextsB</a> <a href=\"../typeannos/RepAllContextsB.html\" title="
+                + "\"RepAllContextsB.html\" title=\"annotation in typeannos\">"
+                + "@RepAllContextsB</a> <a href=\"RepAllContextsB.html\" title="
                 + "\"annotation in typeannos\">@RepAllContextsB</a> java.lang.Integer</code>"
                 + "</td>\n<th class=\"colSecond\" scope=\"row\"><code><span class=\"memberNameLink\">"
-                + "<a href=\"../typeannos/RepeatingOnField.html#i4\">i4</a></span></code>",
+                + "<a href=\"#i4\">i4</a></span></code>",
 
-                "<code>(package private) java.lang.String <a href=\"../typeannos/RepTypeUseA.html"
+                "<code>(package private) java.lang.String <a href=\"RepTypeUseA.html"
                 + "\" title=\"annotation in typeannos\">@RepTypeUseA</a> <a href="
-                + "\"../typeannos/RepTypeUseA.html\" title=\"annotation in typeannos\">"
-                + "@RepTypeUseA</a> <a href=\"../typeannos/RepTypeUseB.html\" title="
-                + "\"annotation in typeannos\">@RepTypeUseB</a> <a href=\"../typeannos/RepTypeUseB.html"
+                + "\"RepTypeUseA.html\" title=\"annotation in typeannos\">"
+                + "@RepTypeUseA</a> <a href=\"RepTypeUseB.html\" title="
+                + "\"annotation in typeannos\">@RepTypeUseB</a> <a href=\"RepTypeUseB.html"
                 + "\" title=\"annotation in typeannos\">@RepTypeUseB</a> [] <a href="
-                + "\"../typeannos/RepTypeUseA.html\" title=\"annotation in typeannos\">"
-                + "@RepTypeUseA</a> <a href=\"../typeannos/RepTypeUseA.html\" title="
-                + "\"annotation in typeannos\">@RepTypeUseA</a> <a href=\"../typeannos/RepTypeUseB.html"
+                + "\"RepTypeUseA.html\" title=\"annotation in typeannos\">"
+                + "@RepTypeUseA</a> <a href=\"RepTypeUseA.html\" title="
+                + "\"annotation in typeannos\">@RepTypeUseA</a> <a href=\"RepTypeUseB.html"
                 + "\" title=\"annotation in typeannos\">@RepTypeUseB</a> <a href="
-                + "\"../typeannos/RepTypeUseB.html\" title=\"annotation in typeannos\">"
+                + "\"RepTypeUseB.html\" title=\"annotation in typeannos\">"
                 + "@RepTypeUseB</a> []</code></td>\n<th class=\"colSecond\" scope=\"row\"><code><span class="
-                + "\"memberNameLink\"><a href=\"../typeannos/RepeatingOnField.html#sa"
+                + "\"memberNameLink\"><a href=\"#sa"
                 + "\">sa</a></span></code>",
 
-                "<pre><a href=\"../typeannos/RepFieldA.html\" title=\"annotation in typeannos\">"
-                + "@RepFieldA</a> <a href=\"../typeannos/RepFieldA.html\" title="
-                + "\"annotation in typeannos\">@RepFieldA</a>\n<a href=\"../typeannos/RepFieldB.html"
+                "<pre><a href=\"RepFieldA.html\" title=\"annotation in typeannos\">"
+                + "@RepFieldA</a> <a href=\"RepFieldA.html\" title="
+                + "\"annotation in typeannos\">@RepFieldA</a>\n<a href=\"RepFieldB.html"
                 + "\" title=\"annotation in typeannos\">@RepFieldB</a> <a href="
-                + "\"../typeannos/RepFieldB.html\" title=\"annotation in typeannos\">"
+                + "\"RepFieldB.html\" title=\"annotation in typeannos\">"
                 + "@RepFieldB</a>\njava.lang.Integer i1</pre>",
 
-                "<pre><a href=\"../typeannos/RepTypeUseA.html\" title=\"annotation in typeannos"
-                + "\">@RepTypeUseA</a> <a href=\"../typeannos/RepTypeUseA.html"
+                "<pre><a href=\"RepTypeUseA.html\" title=\"annotation in typeannos"
+                + "\">@RepTypeUseA</a> <a href=\"RepTypeUseA.html"
                 + "\" title=\"annotation in typeannos\">@RepTypeUseA</a> "
-                + "<a href=\"../typeannos/RepTypeUseB.html\" title=\"annotation in typeannos\">"
-                + "@RepTypeUseB</a> <a href=\"../typeannos/RepTypeUseB.html\" title="
+                + "<a href=\"RepTypeUseB.html\" title=\"annotation in typeannos\">"
+                + "@RepTypeUseB</a> <a href=\"RepTypeUseB.html\" title="
                 + "\"annotation in typeannos\">@RepTypeUseB</a> java.lang.Integer i2</pre>",
 
-                "<pre><a href=\"../typeannos/RepFieldA.html\" title=\"annotation in typeannos\">"
-                + "@RepFieldA</a> <a href=\"../typeannos/RepFieldA.html\" title="
-                + "\"annotation in typeannos\">@RepFieldA</a>\n<a href=\"../typeannos/RepFieldB.html"
+                "<pre><a href=\"RepFieldA.html\" title=\"annotation in typeannos\">"
+                + "@RepFieldA</a> <a href=\"RepFieldA.html\" title="
+                + "\"annotation in typeannos\">@RepFieldA</a>\n<a href=\"RepFieldB.html"
                 + "\" title=\"annotation in typeannos\">@RepFieldB</a> <a href="
-                + "\"../typeannos/RepFieldB.html\" title=\"annotation in typeannos\">"
-                + "@RepFieldB</a>\n<a href=\"../typeannos/RepTypeUseA.html\" title="
-                + "\"annotation in typeannos\">@RepTypeUseA</a> <a href=\"../typeannos/RepTypeUseA.html"
+                + "\"RepFieldB.html\" title=\"annotation in typeannos\">"
+                + "@RepFieldB</a>\n<a href=\"RepTypeUseA.html\" title="
+                + "\"annotation in typeannos\">@RepTypeUseA</a> <a href=\"RepTypeUseA.html"
                 + "\" title=\"annotation in typeannos\">@RepTypeUseA</a> <a href="
-                + "\"../typeannos/RepTypeUseB.html\" title=\"annotation in typeannos\">"
-                + "@RepTypeUseB</a> <a href=\"../typeannos/RepTypeUseB.html\" title="
+                + "\"RepTypeUseB.html\" title=\"annotation in typeannos\">"
+                + "@RepTypeUseB</a> <a href=\"RepTypeUseB.html\" title="
                 + "\"annotation in typeannos\">@RepTypeUseB</a> java.lang.Integer i3</pre>",
 
-                "<pre><a href=\"../typeannos/RepAllContextsA.html\" title=\"annotation in typeannos\">"
-                + "@RepAllContextsA</a> <a href=\"../typeannos/RepAllContextsA.html"
+                "<pre><a href=\"RepAllContextsA.html\" title=\"annotation in typeannos\">"
+                + "@RepAllContextsA</a> <a href=\"RepAllContextsA.html"
                 + "\" title=\"annotation in typeannos\">@RepAllContextsA</a>\n<a href="
-                + "\"../typeannos/RepAllContextsB.html\" title=\"annotation in typeannos\">"
-                + "@RepAllContextsB</a> <a href=\"../typeannos/RepAllContextsB.html"
+                + "\"RepAllContextsB.html\" title=\"annotation in typeannos\">"
+                + "@RepAllContextsB</a> <a href=\"RepAllContextsB.html"
                 + "\" title=\"annotation in typeannos\">@RepAllContextsB</a>\n"
-                + "<a href=\"../typeannos/RepAllContextsA.html\" title=\"annotation in typeannos\">"
-                + "@RepAllContextsA</a> <a href=\"../typeannos/RepAllContextsA.html\" "
+                + "<a href=\"RepAllContextsA.html\" title=\"annotation in typeannos\">"
+                + "@RepAllContextsA</a> <a href=\"RepAllContextsA.html\" "
                 + "title=\"annotation in typeannos\">@RepAllContextsA</a> <a href="
-                + "\"../typeannos/RepAllContextsB.html\" title=\"annotation in typeannos\">"
-                + "@RepAllContextsB</a> <a href=\"../typeannos/RepAllContextsB.html"
+                + "\"RepAllContextsB.html\" title=\"annotation in typeannos\">"
+                + "@RepAllContextsB</a> <a href=\"RepAllContextsB.html"
                 + "\" title=\"annotation in typeannos\">@RepAllContextsB</a> java.lang.Integer i4</pre>",
 
-                "<pre>java.lang.String <a href=\"../typeannos/RepTypeUseA.html\" title="
-                + "\"annotation in typeannos\">@RepTypeUseA</a> <a href=\"../typeannos/RepTypeUseA.html"
+                "<pre>java.lang.String <a href=\"RepTypeUseA.html\" title="
+                + "\"annotation in typeannos\">@RepTypeUseA</a> <a href=\"RepTypeUseA.html"
                 + "\" title=\"annotation in typeannos\">@RepTypeUseA</a> <a href="
-                + "\"../typeannos/RepTypeUseB.html\" title=\"annotation in typeannos\">"
-                + "@RepTypeUseB</a> <a href=\"../typeannos/RepTypeUseB.html\" title="
+                + "\"RepTypeUseB.html\" title=\"annotation in typeannos\">"
+                + "@RepTypeUseB</a> <a href=\"RepTypeUseB.html\" title="
                 + "\"annotation in typeannos\">@RepTypeUseB</a> [] <a href="
-                + "\"../typeannos/RepTypeUseA.html\" title=\"annotation in typeannos\">"
-                + "@RepTypeUseA</a> <a href=\"../typeannos/RepTypeUseA.html\" title="
-                + "\"annotation in typeannos\">@RepTypeUseA</a> <a href=\"../typeannos/RepTypeUseB.html\" "
+                + "\"RepTypeUseA.html\" title=\"annotation in typeannos\">"
+                + "@RepTypeUseA</a> <a href=\"RepTypeUseA.html\" title="
+                + "\"annotation in typeannos\">@RepTypeUseA</a> <a href=\"RepTypeUseB.html\" "
                 + "title=\"annotation in typeannos\">@RepTypeUseB</a> <a href="
-                + "\"../typeannos/RepTypeUseB.html\" title=\"annotation in typeannos\">"
+                + "\"RepTypeUseB.html\" title=\"annotation in typeannos\">"
                 + "@RepTypeUseB</a> [] sa</pre>");
 
         checkOutput("typeannos/RepeatingOnMethod.html", true,
                 "<code>(package private) java.lang.String</code></td>\n<th class=\"colSecond\" scope=\"row\">"
                 + "<code><span class=\"memberNameLink\"><a href="
-                + "\"../typeannos/RepeatingOnMethod.html#test1--\">test1</a></span>()</code>",
+                + "\"#test1--\">test1</a></span>()</code>",
 
-                "<code>(package private) <a href=\"../typeannos/RepTypeUseA.html\" "
+                "<code>(package private) <a href=\"RepTypeUseA.html\" "
                 + "title=\"annotation in typeannos\">@RepTypeUseA</a> <a href="
-                + "\"../typeannos/RepTypeUseA.html\" title=\"annotation in typeannos\">"
-                + "@RepTypeUseA</a> <a href=\"../typeannos/RepTypeUseB.html\" title="
-                + "\"annotation in typeannos\">@RepTypeUseB</a> <a href=\"../typeannos/RepTypeUseB.html"
+                + "\"RepTypeUseA.html\" title=\"annotation in typeannos\">"
+                + "@RepTypeUseA</a> <a href=\"RepTypeUseB.html\" title="
+                + "\"annotation in typeannos\">@RepTypeUseB</a> <a href=\"RepTypeUseB.html"
                 + "\" title=\"annotation in typeannos\">@RepTypeUseB</a> java.lang.String</code>"
                 + "</td>\n<th class=\"colSecond\" scope=\"row\"><code><span class=\"memberNameLink\">"
-                + "<a href=\"../typeannos/RepeatingOnMethod.html#test2--\">test2</a>"
+                + "<a href=\"#test2--\">test2</a>"
                 + "</span>()</code>",
 
-                "<code>(package private) <a href=\"../typeannos/RepTypeUseA.html\" "
+                "<code>(package private) <a href=\"RepTypeUseA.html\" "
                 + "title=\"annotation in typeannos\">@RepTypeUseA</a> <a href="
-                + "\"../typeannos/RepTypeUseA.html\" title=\"annotation in typeannos\">"
-                + "@RepTypeUseA</a> <a href=\"../typeannos/RepTypeUseB.html\" title="
-                + "\"annotation in typeannos\">@RepTypeUseB</a> <a href=\"../typeannos/RepTypeUseB.html\" "
+                + "\"RepTypeUseA.html\" title=\"annotation in typeannos\">"
+                + "@RepTypeUseA</a> <a href=\"RepTypeUseB.html\" title="
+                + "\"annotation in typeannos\">@RepTypeUseB</a> <a href=\"RepTypeUseB.html\" "
                 + "title=\"annotation in typeannos\">@RepTypeUseB</a> java.lang.String</code>"
                 + "</td>\n<th class=\"colSecond\" scope=\"row\"><code><span class=\"memberNameLink\">"
-                + "<a href=\"../typeannos/RepeatingOnMethod.html#test3--\">test3</a>"
+                + "<a href=\"#test3--\">test3</a>"
                 + "</span>()</code>",
 
-                "<code>(package private) <a href=\"../typeannos/RepAllContextsA.html\" "
+                "<code>(package private) <a href=\"RepAllContextsA.html\" "
                 + "title=\"annotation in typeannos\">@RepAllContextsA</a> <a href="
-                + "\"../typeannos/RepAllContextsA.html\" title=\"annotation in typeannos\">"
-                + "@RepAllContextsA</a> <a href=\"../typeannos/RepAllContextsB.html\" "
+                + "\"RepAllContextsA.html\" title=\"annotation in typeannos\">"
+                + "@RepAllContextsA</a> <a href=\"RepAllContextsB.html\" "
                 + "title=\"annotation in typeannos\">@RepAllContextsB</a> <a href="
-                + "\"../typeannos/RepAllContextsB.html\" title=\"annotation in typeannos\">"
+                + "\"RepAllContextsB.html\" title=\"annotation in typeannos\">"
                 + "@RepAllContextsB</a> java.lang.String</code></td>\n<th class=\"colSecond\" scope=\"row\">"
-                + "<code><span class=\"memberNameLink\"><a href=\"../typeannos/RepeatingOnMethod.html"
+                + "<code><span class=\"memberNameLink\"><a href=\""
                 + "#test4--\">test4</a></span>()</code>",
 
-                "<code><span class=\"memberNameLink\"><a href=\"../typeannos/RepeatingOnMethod.html"
+                "<code><span class=\"memberNameLink\"><a href=\""
                 + "#test5-java.lang.String-java.lang.String...-\">test5</a></span>"
                 + "&#8203;(java.lang.String&nbsp;parameter,\n     java.lang.String <a href="
-                + "\"../typeannos/RepTypeUseA.html\" title=\"annotation in typeannos\">"
-                + "@RepTypeUseA</a> <a href=\"../typeannos/RepTypeUseA.html\" title="
-                + "\"annotation in typeannos\">@RepTypeUseA</a> <a href=\"../typeannos/RepTypeUseB.html"
+                + "\"RepTypeUseA.html\" title=\"annotation in typeannos\">"
+                + "@RepTypeUseA</a> <a href=\"RepTypeUseA.html\" title="
+                + "\"annotation in typeannos\">@RepTypeUseA</a> <a href=\"RepTypeUseB.html"
                 + "\" title=\"annotation in typeannos\">@RepTypeUseB</a> <a href="
-                + "\"../typeannos/RepTypeUseB.html\" title=\"annotation in typeannos\">"
+                + "\"RepTypeUseB.html\" title=\"annotation in typeannos\">"
                 + "@RepTypeUseB</a> ...&nbsp;vararg)</code>",
 
-                "<a href=\"../typeannos/RepMethodA.html\" title=\"annotation in typeannos\">"
-                + "@RepMethodA</a> <a href=\"../typeannos/RepMethodA.html\" title="
-                + "\"annotation in typeannos\">@RepMethodA</a>\n<a href=\"../typeannos/RepMethodB.html\""
+                "<a href=\"RepMethodA.html\" title=\"annotation in typeannos\">"
+                + "@RepMethodA</a> <a href=\"RepMethodA.html\" title="
+                + "\"annotation in typeannos\">@RepMethodA</a>\n<a href=\"RepMethodB.html\""
                 + " title=\"annotation in typeannos\">@RepMethodB</a> <a href="
-                + "\"../typeannos/RepMethodB.html\" title=\"annotation in typeannos\">"
+                + "\"RepMethodB.html\" title=\"annotation in typeannos\">"
                 + "@RepMethodB</a>\njava.lang.String&nbsp;test1()",
 
-                "<a href=\"../typeannos/RepTypeUseA.html\" title=\"annotation in typeannos\">"
-                + "@RepTypeUseA</a> <a href=\"../typeannos/RepTypeUseA.html\" title="
-                + "\"annotation in typeannos\">@RepTypeUseA</a> <a href=\"../typeannos/RepTypeUseB.html\" "
-                + "title=\"annotation in typeannos\">@RepTypeUseB</a> <a href=\"../typeannos/RepTypeUseB.html\" "
+                "<a href=\"RepTypeUseA.html\" title=\"annotation in typeannos\">"
+                + "@RepTypeUseA</a> <a href=\"RepTypeUseA.html\" title="
+                + "\"annotation in typeannos\">@RepTypeUseA</a> <a href=\"RepTypeUseB.html\" "
+                + "title=\"annotation in typeannos\">@RepTypeUseB</a> <a href=\"RepTypeUseB.html\" "
                 + "title=\"annotation in typeannos\">@RepTypeUseB</a> java.lang.String&nbsp;test2()",
 
-                "<a href=\"../typeannos/RepMethodA.html\" title=\"annotation in typeannos\">"
-                + "@RepMethodA</a> <a href=\"../typeannos/RepMethodA.html\" title="
-                + "\"annotation in typeannos\">@RepMethodA</a>\n<a href=\"../typeannos/RepMethodB.html\" "
+                "<a href=\"RepMethodA.html\" title=\"annotation in typeannos\">"
+                + "@RepMethodA</a> <a href=\"RepMethodA.html\" title="
+                + "\"annotation in typeannos\">@RepMethodA</a>\n<a href=\"RepMethodB.html\" "
                 + "title=\"annotation in typeannos\">@RepMethodB</a> <a href="
-                + "\"../typeannos/RepMethodB.html\" title=\"annotation in typeannos\">"
-                + "@RepMethodB</a>\n<a href=\"../typeannos/RepTypeUseA.html\" title="
-                + "\"annotation in typeannos\">@RepTypeUseA</a> <a href=\"../typeannos/RepTypeUseA.html\" "
+                + "\"RepMethodB.html\" title=\"annotation in typeannos\">"
+                + "@RepMethodB</a>\n<a href=\"RepTypeUseA.html\" title="
+                + "\"annotation in typeannos\">@RepTypeUseA</a> <a href=\"RepTypeUseA.html\" "
                 + "title=\"annotation in typeannos\">@RepTypeUseA</a> <a href="
-                + "\"../typeannos/RepTypeUseB.html\" title=\"annotation in typeannos\">"
-                + "@RepTypeUseB</a> <a href=\"../typeannos/RepTypeUseB.html\" title="
+                + "\"RepTypeUseB.html\" title=\"annotation in typeannos\">"
+                + "@RepTypeUseB</a> <a href=\"RepTypeUseB.html\" title="
                 + "\"annotation in typeannos\">@RepTypeUseB</a> java.lang.String&nbsp;test3()",
 
-                "<a href=\"../typeannos/RepAllContextsA.html\" title=\"annotation in typeannos\">"
-                + "@RepAllContextsA</a> <a href=\"../typeannos/RepAllContextsA.html\" "
+                "<a href=\"RepAllContextsA.html\" title=\"annotation in typeannos\">"
+                + "@RepAllContextsA</a> <a href=\"RepAllContextsA.html\" "
                 + "title=\"annotation in typeannos\">@RepAllContextsA</a>\n<a href="
-                + "\"../typeannos/RepAllContextsB.html\" title=\"annotation in typeannos\">"
-                + "@RepAllContextsB</a> <a href=\"../typeannos/RepAllContextsB.html\" "
+                + "\"RepAllContextsB.html\" title=\"annotation in typeannos\">"
+                + "@RepAllContextsB</a> <a href=\"RepAllContextsB.html\" "
                 + "title=\"annotation in typeannos\">@RepAllContextsB</a>\n<a href="
-                + "\"../typeannos/RepAllContextsA.html\" title=\"annotation in typeannos\">"
-                + "@RepAllContextsA</a> <a href=\"../typeannos/RepAllContextsA.html\" "
+                + "\"RepAllContextsA.html\" title=\"annotation in typeannos\">"
+                + "@RepAllContextsA</a> <a href=\"RepAllContextsA.html\" "
                 + "title=\"annotation in typeannos\">@RepAllContextsA</a> <a href="
-                + "\"../typeannos/RepAllContextsB.html\" title=\"annotation in typeannos\">"
-                + "@RepAllContextsB</a> <a href=\"../typeannos/RepAllContextsB.html\" "
+                + "\"RepAllContextsB.html\" title=\"annotation in typeannos\">"
+                + "@RepAllContextsB</a> <a href=\"RepAllContextsB.html\" "
                 + "title=\"annotation in typeannos\">@RepAllContextsB</a> java.lang.String&nbsp;test4()",
 
-                "java.lang.String&nbsp;test5&#8203;(<a href=\"../typeannos/RepTypeUseA.html\" "
+                "java.lang.String&nbsp;test5&#8203;(<a href=\"RepTypeUseA.html\" "
                 + "title=\"annotation in typeannos\">@RepTypeUseA</a> <a href="
-                + "\"../typeannos/RepTypeUseA.html\" title=\"annotation in typeannos\">"
-                + "@RepTypeUseA</a> <a href=\"../typeannos/RepTypeUseB.html\" title="
-                + "\"annotation in typeannos\">@RepTypeUseB</a> <a href=\"../typeannos/RepTypeUseB.html\" "
+                + "\"RepTypeUseA.html\" title=\"annotation in typeannos\">"
+                + "@RepTypeUseA</a> <a href=\"RepTypeUseB.html\" title="
+                + "\"annotation in typeannos\">@RepTypeUseB</a> <a href=\"RepTypeUseB.html\" "
                 + "title=\"annotation in typeannos\">@RepTypeUseB</a>&nbsp;RepeatingOnMethod&nbsp;"
-                + "this,\n                       <a href=\"../typeannos/RepParameterA.html\" "
+                + "this,\n                       <a href=\"RepParameterA.html\" "
                 + "title=\"annotation in typeannos\">@RepParameterA</a> <a href="
-                + "\"../typeannos/RepParameterA.html\" title=\"annotation in typeannos\">"
-                + "@RepParameterA</a> <a href=\"../typeannos/RepParameterB.html\" "
+                + "\"RepParameterA.html\" title=\"annotation in typeannos\">"
+                + "@RepParameterA</a> <a href=\"RepParameterB.html\" "
                 + "title=\"annotation in typeannos\">@RepParameterB</a> <a href="
-                + "\"../typeannos/RepParameterB.html\" title=\"annotation in typeannos\">"
+                + "\"RepParameterB.html\" title=\"annotation in typeannos\">"
                 + "@RepParameterB</a>\n                       java.lang.String&nbsp;parameter,\n"
-                + "                       <a href=\"../typeannos/RepParameterA.html\" title="
-                + "\"annotation in typeannos\">@RepParameterA</a> <a href=\"../typeannos/RepParameterA.html\""
+                + "                       <a href=\"RepParameterA.html\" title="
+                + "\"annotation in typeannos\">@RepParameterA</a> <a href=\"RepParameterA.html\""
                 + " title=\"annotation in typeannos\">@RepParameterA</a> <a href="
-                + "\"../typeannos/RepParameterB.html\" title=\"annotation in typeannos\">"
-                + "@RepParameterB</a> <a href=\"../typeannos/RepParameterB.html\" title="
+                + "\"RepParameterB.html\" title=\"annotation in typeannos\">"
+                + "@RepParameterB</a> <a href=\"RepParameterB.html\" title="
                 + "\"annotation in typeannos\">@RepParameterB</a>\n                       "
-                + "java.lang.String <a href=\"../typeannos/RepTypeUseA.html\" title="
-                + "\"annotation in typeannos\">@RepTypeUseA</a> <a href=\"../typeannos/RepTypeUseA.html\" "
+                + "java.lang.String <a href=\"RepTypeUseA.html\" title="
+                + "\"annotation in typeannos\">@RepTypeUseA</a> <a href=\"RepTypeUseA.html\" "
                 + "title=\"annotation in typeannos\">@RepTypeUseA</a> <a href="
-                + "\"../typeannos/RepTypeUseB.html\" title=\"annotation in typeannos\">"
-                + "@RepTypeUseB</a> <a href=\"../typeannos/RepTypeUseB.html\" title="
+                + "\"RepTypeUseB.html\" title=\"annotation in typeannos\">"
+                + "@RepTypeUseB</a> <a href=\"RepTypeUseB.html\" title="
                 + "\"annotation in typeannos\">@RepTypeUseB</a> ...&nbsp;vararg)");
 
         checkOutput("typeannos/RepeatingOnTypeParametersBoundsTypeArgumentsOnMethod.html", true,
                 "<code>(package private) &lt;T&gt;&nbsp;java.lang.String</code></td>\n"
                 + "<th class=\"colSecond\" scope=\"row\"><code><span class=\"memberNameLink\"><a href="
-                + "\"../typeannos/RepeatingOnTypeParametersBoundsTypeArgumentsOnMethod.html#"
+                + "\"#"
                 + "genericMethod-T-\">genericMethod</a></span>&#8203;(T&nbsp;t)</code>",
 
                 "<code>(package private) &lt;T&gt;&nbsp;java.lang.String</code></td>\n"
                 + "<th class=\"colSecond\" scope=\"row\"><code><span class=\"memberNameLink\"><a href="
-                + "\"../typeannos/RepeatingOnTypeParametersBoundsTypeArgumentsOnMethod.html#"
-                + "genericMethod2-T-\">genericMethod2</a></span>&#8203;(<a href=\"../typeannos/RepTypeUseA.html"
-                + "\" title=\"annotation in typeannos\">@RepTypeUseA</a> <a href=\"../typeannos/RepTypeUseA.html"
-                + "\" title=\"annotation in typeannos\">@RepTypeUseA</a> <a href=\"../typeannos/RepTypeUseB.html"
-                + "\" title=\"annotation in typeannos\">@RepTypeUseB</a> <a href=\"../typeannos/RepTypeUseB.html"
+                + "\"#"
+                + "genericMethod2-T-\">genericMethod2</a></span>&#8203;(<a href=\"RepTypeUseA.html"
+                + "\" title=\"annotation in typeannos\">@RepTypeUseA</a> <a href=\"RepTypeUseA.html"
+                + "\" title=\"annotation in typeannos\">@RepTypeUseA</a> <a href=\"RepTypeUseB.html"
+                + "\" title=\"annotation in typeannos\">@RepTypeUseB</a> <a href=\"RepTypeUseB.html"
                 + "\" title=\"annotation in typeannos\">@RepTypeUseB</a> T&nbsp;t)</code>",
 
                 "<code>(package private) java.lang.String</code></td>\n<th class=\"colSecond\" scope=\"row\"><code>"
-                + "<span class=\"memberNameLink\"><a href=\"../typeannos/RepeatingOnTypeParametersBoundsTypeArgumentsOnMethod.html#"
+                + "<span class=\"memberNameLink\"><a href=\"#"
                 + "test--\">test</a></span>()</code>",
 
-                "java.lang.String&nbsp;test&#8203;(<a href=\"../typeannos/RepTypeUseA.html\" "
+                "java.lang.String&nbsp;test&#8203;(<a href=\"RepTypeUseA.html\" "
                 + "title=\"annotation in typeannos\">@RepTypeUseA</a> <a href="
-                + "\"../typeannos/RepTypeUseA.html\" title=\"annotation in typeannos\">"
-                + "@RepTypeUseA</a> <a href=\"../typeannos/RepTypeUseB.html\" title="
-                + "\"annotation in typeannos\">@RepTypeUseB</a> <a href=\"../typeannos/RepTypeUseB.html\" "
+                + "\"RepTypeUseA.html\" title=\"annotation in typeannos\">"
+                + "@RepTypeUseA</a> <a href=\"RepTypeUseB.html\" title="
+                + "\"annotation in typeannos\">@RepTypeUseB</a> <a href=\"RepTypeUseB.html\" "
                 + "title=\"annotation in typeannos\">@RepTypeUseB</a>&nbsp;"
                 + "RepeatingOnTypeParametersBoundsTypeArgumentsOnMethod&lt;<a href="
-                + "\"../typeannos/RepTypeUseA.html\" title=\"annotation in typeannos\">"
-                + "@RepTypeUseA</a> <a href=\"../typeannos/RepTypeUseA.html\" title="
-                + "\"annotation in typeannos\">@RepTypeUseA</a> <a href=\"../typeannos/RepTypeUseB.html"
-                + "\" title=\"annotation in typeannos\">@RepTypeUseB</a> <a href=\"../typeannos/RepTypeUseB.html\" "
+                + "\"RepTypeUseA.html\" title=\"annotation in typeannos\">"
+                + "@RepTypeUseA</a> <a href=\"RepTypeUseA.html\" title="
+                + "\"annotation in typeannos\">@RepTypeUseA</a> <a href=\"RepTypeUseB.html"
+                + "\" title=\"annotation in typeannos\">@RepTypeUseB</a> <a href=\"RepTypeUseB.html\" "
                 + "title=\"annotation in typeannos\">@RepTypeUseB</a> T&gt;&nbsp;this)");
 
         checkOutput("typeannos/RepeatingOnVoidMethodDeclaration.html", true,
-                "<a href=\"../typeannos/RepMethodA.html\" title=\"annotation in typeannos\">"
-                + "@RepMethodA</a> <a href=\"../typeannos/RepMethodA.html\" title="
-                + "\"annotation in typeannos\">@RepMethodA</a>\n<a href=\"../typeannos/RepMethodB.html"
+                "<a href=\"RepMethodA.html\" title=\"annotation in typeannos\">"
+                + "@RepMethodA</a> <a href=\"RepMethodA.html\" title="
+                + "\"annotation in typeannos\">@RepMethodA</a>\n<a href=\"RepMethodB.html"
                 + "\" title=\"annotation in typeannos\">@RepMethodB</a> <a href="
-                + "\"../typeannos/RepMethodB.html\" title=\"annotation in typeannos\">"
+                + "\"RepMethodB.html\" title=\"annotation in typeannos\">"
                 + "@RepMethodB</a>\nvoid&nbsp;test()");
     }
 }
--- a/test/langtools/jdk/javadoc/doclet/testTypeParams/TestTypeParameters.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/langtools/jdk/javadoc/doclet/testTypeParams/TestTypeParameters.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2016, 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
@@ -57,14 +57,14 @@
                 "<code>&lt;T&gt;&nbsp;java.lang.Object</code>");
 
         checkOutput("pkg/package-summary.html", true,
-                "C</a>&lt;E extends <a href=\"../pkg/Parent.html\" "
+                "C</a>&lt;E extends <a href=\"Parent.html\" "
                 + "title=\"class in pkg\">Parent</a>&gt;");
 
         checkOutput("pkg/class-use/Foo4.html", true,
-                "<a href=\"../../pkg/ClassUseTest3.html\" title=\"class in pkg\">"
-                + "ClassUseTest3</a>&lt;T extends <a href=\"../../pkg/ParamTest2.html\" "
+                "<a href=\"../ClassUseTest3.html\" title=\"class in pkg\">"
+                + "ClassUseTest3</a>&lt;T extends <a href=\"../ParamTest2.html\" "
                 + "title=\"class in pkg\">ParamTest2</a>&lt;java.util.List&lt;? extends "
-                + "<a href=\"../../pkg/Foo4.html\" title=\"class in pkg\">Foo4</a>&gt;&gt;&gt;");
+                + "<a href=\"../Foo4.html\" title=\"class in pkg\">Foo4</a>&gt;&gt;&gt;");
 
         // Nested type parameters
         checkOutput("pkg/C.html", true,
@@ -84,8 +84,8 @@
 
         checkOutput("pkg/ClassUseTest3.html", true,
             "public class <a href=\"../src-html/pkg/ClassUseTest3.html#line.28\">" +
-            "ClassUseTest3</a>&lt;T extends <a href=\"../pkg/ParamTest2.html\" " +
+            "ClassUseTest3</a>&lt;T extends <a href=\"ParamTest2.html\" " +
             "title=\"class in pkg\">ParamTest2</a>&lt;java.util.List&lt;? extends " +
-            "<a href=\"../pkg/Foo4.html\" title=\"class in pkg\">Foo4</a>&gt;&gt;&gt;");
+            "<a href=\"Foo4.html\" title=\"class in pkg\">Foo4</a>&gt;&gt;&gt;");
     }
 }
--- a/test/langtools/jdk/javadoc/doclet/testTypeVariableLinks/TestTypeVariableLinks.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/langtools/jdk/javadoc/doclet/testTypeVariableLinks/TestTypeVariableLinks.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -48,8 +48,8 @@
         checkOutput("pkg1/C.html", true,
                 "<div class=\"block\">Linking to List.clear() <code>List.clear()</code></div>");
         checkOutput("pkg1/C.html", true,
-                "<div class=\"block\">Linking to Additional.doAction() <a href=\"../pkg1/Additional.html#doAction--\"><code>Additional.doAction()</code></a></div>");
+                "<div class=\"block\">Linking to Additional.doAction() <a href=\"Additional.html#doAction--\"><code>Additional.doAction()</code></a></div>");
         checkOutput("pkg1/C.html", true,
-                "<div class=\"block\">Linking to I.abstractAction() <a href=\"../pkg1/I.html#abstractAction--\"><code>I.abstractAction()</code></a></div>");
+                "<div class=\"block\">Linking to I.abstractAction() <a href=\"I.html#abstractAction--\"><code>I.abstractAction()</code></a></div>");
     }
 }
--- a/test/langtools/jdk/javadoc/doclet/testUseOption/TestUseOption.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/langtools/jdk/javadoc/doclet/testUseOption/TestUseOption.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2017, 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
@@ -84,56 +84,56 @@
           "that return types with arguments of type"
         );
         checkOutput("pkg1/class-use/UsedClass.html", true,
-          "<a href=\"../../pkg1/C1.html#methodInC1ReturningType--\">methodInC1ReturningType</a>"
+          "<a href=\"../C1.html#methodInC1ReturningType--\">methodInC1ReturningType</a>"
         );
         checkOutput("pkg1/class-use/UsedInterface.html", true,
-          "Classes in <a href=\"../../pkg1/package-summary.html\">pkg1</a> that implement " +
-          "<a href=\"../../pkg1/UsedInterface.html\" title=\"interface in pkg1\">UsedInterface</a>"
+          "Classes in <a href=\"../package-summary.html\">pkg1</a> that implement " +
+          "<a href=\"../UsedInterface.html\" title=\"interface in pkg1\">UsedInterface</a>"
         );
         checkOutput("pkg1/class-use/UsedInterfaceA.html", true,
-          "Classes in <a href=\"../../pkg1/package-summary.html\">pkg1</a> that implement " +
-          "<a href=\"../../pkg1/UsedInterfaceA.html\" title=\"interface in pkg1\">UsedInterfaceA</a>"
+          "Classes in <a href=\"../package-summary.html\">pkg1</a> that implement " +
+          "<a href=\"../UsedInterfaceA.html\" title=\"interface in pkg1\">UsedInterfaceA</a>"
         );
         checkOutput("pkg1/class-use/UsedClass.html", false,
            "methodInC1Protected"
         );
         checkOutput("pkg1/class-use/UsedInterface.html", true,
-           "<a href=\"../../pkg1/AnAbstract.html\" title=\"class in pkg1\">AnAbstract</a>"
+           "<a href=\"../AnAbstract.html\" title=\"class in pkg1\">AnAbstract</a>"
         );
         checkOutput("pkg1/class-use/UsedInterface.html", true,
-            "../../pkg1/C10.html#withReturningTypeParameters--"
+            "../C10.html#withReturningTypeParameters--"
         );
         checkOutput("pkg1/class-use/UsedInterface.html", true,
-            "../../pkg1/C10.html#withTypeParametersOfType-java.lang.Class-"
+            "../C10.html#withTypeParametersOfType-java.lang.Class-"
         );
         checkOutput("pkg1/class-use/UsedInterface.html", true,
-            "\"../../pkg1/package-summary.html\">pkg1</a> that return " +
-            "<a href=\"../../pkg1/UsedInterface.html\" title=\"interface in pkg1\""
+            "\"../package-summary.html\">pkg1</a> that return " +
+            "<a href=\"../UsedInterface.html\" title=\"interface in pkg1\""
         );
         checkOutput("pkg1/class-use/UsedInterface.html", true,
-            "<a href=\"../../pkg1/C10.html#addAll-pkg1.UsedInterface...-\">addAll</a>"
+            "<a href=\"../C10.html#addAll-pkg1.UsedInterface...-\">addAll</a>"
         );
         checkOutput("pkg1/class-use/UsedInterface.html", true,
-            "<a href=\"../../pkg1/C10.html#create-pkg1.UsedInterfaceA-pkg1." +
+            "<a href=\"../C10.html#create-pkg1.UsedInterfaceA-pkg1." +
             "UsedInterface-java.lang.String-\">"
         );
         checkOutput("pkg1/class-use/UsedInterface.html", true,
-            "<a href=\"../../pkg1/C10.html#withTypeParametersOfType-java.lang.Class-\">" +
+            "<a href=\"../C10.html#withTypeParametersOfType-java.lang.Class-\">" +
             "withTypeParametersOfType</a>"
         );
         checkOutput("pkg1/class-use/UsedInterface.html", true,
-            "Subinterfaces of <a href=\"../../pkg1/UsedInterface.html\" title=\"interface in pkg1\">"
-            + "UsedInterface</a> in <a href=\"../../pkg1/package-summary.html\">pkg1",
+            "Subinterfaces of <a href=\"../UsedInterface.html\" title=\"interface in pkg1\">"
+            + "UsedInterface</a> in <a href=\"../package-summary.html\">pkg1",
             "<td class=\"colFirst\"><code>interface&nbsp;</code></td>\n<th class=\"colSecond\" scope=\"row\">"
-            + "<code><span class=\"memberNameLink\"><a href=\"../../pkg1/SubInterface.html\" "
+            + "<code><span class=\"memberNameLink\"><a href=\"../SubInterface.html\" "
             + "title=\"interface in pkg1\">SubInterface</a>&lt;T&gt;</span></code></th>"
         );
         checkOutput("pkg1/class-use/UsedThrowable.html", true,
-            "Methods in <a href=\"../../pkg1/package-summary.html\">pkg1</a> that throw "
-            + "<a href=\"../../pkg1/UsedThrowable.html\" title=\"class in pkg1\">UsedThrowable</a>",
+            "Methods in <a href=\"../package-summary.html\">pkg1</a> that throw "
+            + "<a href=\"../UsedThrowable.html\" title=\"class in pkg1\">UsedThrowable</a>",
             "<td class=\"colFirst\"><code>void</code></td>\n<th class=\"colSecond\" scope=\"row\"><span class="
             + "\"typeNameLabel\">C1.</span><code><span class=\"memberNameLink\">"
-            + "<a href=\"../../pkg1/C1.html#methodInC1ThrowsThrowable--\">methodInC1ThrowsThrowable"
+            + "<a href=\"../C1.html#methodInC1ThrowsThrowable--\">methodInC1ThrowsThrowable"
             + "</a></span>()</code></th>"
         );
     }
@@ -169,9 +169,9 @@
                 "-package", "unique");
         checkExit(Exit.OK);
         checkUnique("unique/class-use/UseMe.html",
-                "<a href=\"../../unique/C1.html#umethod1-unique.UseMe-unique.UseMe:A-\">",
-                "<a href=\"../../unique/C1.html#umethod2-unique.UseMe-unique.UseMe-\">",
-                "<a href=\"../../unique/C1.html#umethod3-unique.UseMe-unique.UseMe-\">",
-                "<a href=\"../../unique/C1.html#C1-unique.UseMe-unique.UseMe-\">");
+                "<a href=\"../C1.html#umethod1-unique.UseMe-unique.UseMe:A-\">",
+                "<a href=\"../C1.html#umethod2-unique.UseMe-unique.UseMe-\">",
+                "<a href=\"../C1.html#umethod3-unique.UseMe-unique.UseMe-\">",
+                "<a href=\"../C1.html#C1-unique.UseMe-unique.UseMe-\">");
     }
 }
--- a/test/langtools/jdk/javadoc/doclet/testValueTag/TestValueTag.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/langtools/jdk/javadoc/doclet/testValueTag/TestValueTag.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -52,19 +52,19 @@
                 // Base case:  using @value on a constant.
                 "Result:  \"Test 1 passes\"",
                 // Retrieve value of constant in same class.
-                "Result:  <a href=\"../pkg1/Class1.html#TEST_2_PASSES\">\"Test 2 passes\"</a>",
-                "Result:  <a href=\"../pkg1/Class1.html#TEST_3_PASSES\">\"Test 3 passes\"</a>",
-                "Result:  <a href=\"../pkg1/Class1.html#TEST_4_PASSES\">\"Test 4 passes\"</a>",
-                "Result:  <a href=\"../pkg1/Class1.html#TEST_5_PASSES\">\"Test 5 passes\"</a>",
-                "Result:  <a href=\"../pkg1/Class1.html#TEST_6_PASSES\">\"Test 6 passes\"</a>");
+                "Result:  <a href=\"#TEST_2_PASSES\">\"Test 2 passes\"</a>",
+                "Result:  <a href=\"#TEST_3_PASSES\">\"Test 3 passes\"</a>",
+                "Result:  <a href=\"#TEST_4_PASSES\">\"Test 4 passes\"</a>",
+                "Result:  <a href=\"#TEST_5_PASSES\">\"Test 5 passes\"</a>",
+                "Result:  <a href=\"#TEST_6_PASSES\">\"Test 6 passes\"</a>");
 
         checkOutput("pkg1/Class2.html", true,
                 // Retrieve value of constant in different class.
-                "Result:  <a href=\"../pkg1/Class1.html#TEST_7_PASSES\">\"Test 7 passes\"</a>",
-                "Result:  <a href=\"../pkg1/Class1.html#TEST_8_PASSES\">\"Test 8 passes\"</a>",
-                "Result:  <a href=\"../pkg1/Class1.html#TEST_9_PASSES\">\"Test 9 passes\"</a>",
-                "Result:  <a href=\"../pkg1/Class1.html#TEST_10_PASSES\">\"Test 10 passes\"</a>",
-                "Result:  <a href=\"../pkg1/Class1.html#TEST_11_PASSES\">\"Test 11 passes\"</a>",
+                "Result:  <a href=\"Class1.html#TEST_7_PASSES\">\"Test 7 passes\"</a>",
+                "Result:  <a href=\"Class1.html#TEST_8_PASSES\">\"Test 8 passes\"</a>",
+                "Result:  <a href=\"Class1.html#TEST_9_PASSES\">\"Test 9 passes\"</a>",
+                "Result:  <a href=\"Class1.html#TEST_10_PASSES\">\"Test 10 passes\"</a>",
+                "Result:  <a href=\"Class1.html#TEST_11_PASSES\">\"Test 11 passes\"</a>",
                 // Retrieve value of constant in different package
                 "Result:  <a href=\"../pkg2/Class3.html#TEST_12_PASSES\">\"Test 12 passes\"</a>",
                 "Result:  <a href=\"../pkg2/Class3.html#TEST_13_PASSES\">\"Test 13 passes\"</a>",
@@ -74,7 +74,7 @@
 
         checkOutput("pkg2/package-summary.html", true,
                 // Retrieve value of constant from a package page
-                "Result: <a href=\"../pkg2/Class3.html#TEST_17_PASSES\">\"Test 17 passes\"</a>");
+                "Result: <a href=\"Class3.html#TEST_17_PASSES\">\"Test 17 passes\"</a>");
 
         checkOutput("pkg1/CustomTagUsage.html", true,
                 // Test @value tag used with custom tag.
@@ -104,7 +104,7 @@
 
         checkOutput("pkg1/Class1.html", false,
                 // Base case:  using @value on a constant.
-                "Result:  <a href=\"../pkg1/Class1.html#TEST_12_ERROR\">\"Test 12 "
+                "Result:  <a href=\"#TEST_12_ERROR\">\"Test 12 "
                 + "generates an error message\"</a>");
 
         checkForException();
@@ -141,9 +141,9 @@
         checkExit(Exit.OK);
 
         checkOrder("pkg3/RT.html",
-                "The value is <a href=\"../pkg3/RT.html#CONSTANT\">\"constant\"</a>.",
-                "The value1 is <a href=\"../pkg3/RT.html#CONSTANT\">\"constant\"</a>.",
-                "The value2 is <a href=\"../pkg3/RT.html#CONSTANT\">\"constant\"</a>.",
+                "The value is <a href=\"#CONSTANT\">\"constant\"</a>.",
+                "The value1 is <a href=\"#CONSTANT\">\"constant\"</a>.",
+                "The value2 is <a href=\"#CONSTANT\">\"constant\"</a>.",
                 "The value3 is <a href=\"../pkg2/Class3.html#TEST_12_PASSES\">"
                 + "\"Test 12 passes\"</a>.");
     }
--- a/test/langtools/jdk/javadoc/doclet/testWarnings/TestWarnings.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/langtools/jdk/javadoc/doclet/testWarnings/TestWarnings.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2004, 2016, 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
@@ -78,8 +78,8 @@
         checkExit(Exit.ERROR);
 
         checkOutput("pkg/X.html", true,
-            "<a href=\"../pkg/X.html#m--\"><code>m()</code></a><br/>",
-            "<a href=\"../pkg/X.html#X--\"><code>X()</code></a><br/>",
-            "<a href=\"../pkg/X.html#f\"><code>f</code></a><br/>");
+            "<a href=\"#m--\"><code>m()</code></a><br/>",
+            "<a href=\"#X--\"><code>X()</code></a><br/>",
+            "<a href=\"#f\"><code>f</code></a><br/>");
     }
 }
--- a/test/langtools/jdk/javadoc/tool/6958836/Test.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/langtools/jdk/javadoc/tool/6958836/Test.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -63,6 +63,7 @@
         // For some reason, this must be the first option when used.
         opts.addAll(list("-locale", "en_US"));
         opts.add("-Xdoclint:none");
+        opts.add("-html4");
         opts.addAll(list("-classpath", System.getProperty("test.src")));
         opts.addAll(list("-d", testOutDir.getPath()));
         opts.addAll(testOpts);
--- a/test/langtools/jdk/javadoc/tool/6964914/Test.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/langtools/jdk/javadoc/tool/6964914/Test.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -47,6 +47,7 @@
         File testSrc = new File(System.getProperty("test.src"));
         String[] args = {
             "-Xdoclint:none",
+            "-html4",
             "-source", "8",
             "-classpath", ".",
             "-package",
--- a/test/langtools/jdk/javadoc/tool/6964914/TestStdDoclet.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/langtools/jdk/javadoc/tool/6964914/TestStdDoclet.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -58,6 +58,7 @@
         cmdArgs.addAll(Arrays.asList(
                 "-classpath", ".", // insulates us from ambient classpath
                 "-Xdoclint:none",
+                "-html4",
                 "-package",
                 new File(testSrc, thisClassName + ".java").getPath()
         ));
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/langtools/jdk/javadoc/tool/AddOpensTest.java	Tue Jan 30 16:41:40 2018 +0100
@@ -0,0 +1,76 @@
+/*
+ * 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 8181878
+ * @summary javadoc should support/ignore --add-opens
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * @modules jdk.compiler/com.sun.tools.javac.main
+ * @modules jdk.javadoc/jdk.javadoc.internal.api
+ * @modules jdk.javadoc/jdk.javadoc.internal.tool
+ * @library /tools/lib
+ * @build toolbox.JavacTask toolbox.JavadocTask toolbox.TestRunner toolbox.ToolBox
+ * @run main AddOpensTest
+ */
+
+import java.io.IOException;
+import java.nio.charset.StandardCharsets;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+
+import toolbox.JavadocTask;
+import toolbox.Task;
+import toolbox.TestRunner;
+import toolbox.ToolBox;
+
+public class AddOpensTest extends TestRunner {
+    public static void main(String... args) throws Exception {
+        AddOpensTest t = new AddOpensTest();
+        t.runTests();
+    }
+
+    private final ToolBox tb = new ToolBox();
+    private final Path src = Paths.get("src");
+    private final Path api = Paths.get("api");
+
+    AddOpensTest() throws Exception {
+        super(System.err);
+        init();
+    }
+
+    void init() throws IOException {
+        tb.writeJavaFiles(src, "public class C { }");
+    }
+
+    @Test
+    public void testEncoding() {
+        Task.Result result = new JavadocTask(tb, Task.Mode.EXEC)
+                .options("-d", api.toString(),
+                        "--add-opens", "some.module")
+                .files(src.resolve("C.java"))
+                .run(Task.Expect.SUCCESS)
+                .writeAll();
+    }
+}
+
--- a/test/langtools/jdk/javadoc/tool/CheckResourceKeys.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/langtools/jdk/javadoc/tool/CheckResourceKeys.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -117,7 +117,7 @@
     }
 
     void usageTests(boolean xflag) {
-        String[] argarray = { xflag ? "-X" : "-help" };
+        String[] argarray = { xflag ? "-X" : "--help" };
         StringWriter sw = new StringWriter();
         PrintWriter pw = new PrintWriter(sw);
         if (jdk.javadoc.internal.tool.Main.execute(argarray, pw) == 0) {
--- a/test/langtools/jdk/javadoc/tool/MaxWarns.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/langtools/jdk/javadoc/tool/MaxWarns.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -75,7 +75,7 @@
     String javadoc(File f) {
         StringWriter sw = new StringWriter();
         PrintWriter pw = new PrintWriter(sw);
-        String[] args = { "-Xdoclint:none", "-d", "api", f.getPath() };
+        String[] args = { "-Xdoclint:none", "-html4", "-d", "api", f.getPath() };
         int rc = jdk.javadoc.internal.tool.Main.execute(args, pw);
         pw.flush();
         return sw.toString();
--- a/test/langtools/jdk/javadoc/tool/QuietOption.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/langtools/jdk/javadoc/tool/QuietOption.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -62,6 +62,7 @@
     void run1() throws Exception {
         List<String> output = doTest(javadoc.getPath(),
                 "-classpath", ".", // insulates us from ambient classpath
+                "-html4",
                 "-quiet",
                 new File(testSrc, thisClassName + ".java").getPath());
 
--- a/test/langtools/jdk/javadoc/tool/ToolProviderTest.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/langtools/jdk/javadoc/tool/ToolProviderTest.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -69,7 +69,7 @@
     public void testOneStream() throws Exception {
         StringWriter sw = new StringWriter();
         try (PrintWriter pw = new PrintWriter(sw)) {
-            int rc = javadoc.run(pw, pw, "-help");
+            int rc = javadoc.run(pw, pw, "--help");
             if (rc != 0) {
                 error("unexpected exit code: " + rc);
             }
@@ -86,7 +86,7 @@
         StringWriter swErr = new StringWriter();
         try (PrintWriter pwOut = new PrintWriter(swOut);
                 PrintWriter pwErr = new PrintWriter(swErr)) {
-            int rc = javadoc.run(pwOut, pwErr, "-help");
+            int rc = javadoc.run(pwOut, pwErr, "--help");
             if (rc != 0) {
                 error("unexpected exit code: " + rc);
             }
--- a/test/langtools/jdk/javadoc/tool/doclint/DocLintTest.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/langtools/jdk/javadoc/tool/doclint/DocLintTest.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -92,6 +92,7 @@
         /* 05 */    "}\n";
 
     private final String rawDiags = "-XDrawDiagnostics";
+    private final String htmlVersion = "-html4";
 
     private enum Message {
         // doclint messages
@@ -141,66 +142,66 @@
         javadoc = ToolProvider.getSystemDocumentationTool();
         fm = javadoc.getStandardFileManager(null, null, null);
         try {
-            fm.setLocation(StandardLocation.CLASS_OUTPUT, Arrays.asList(new File(".")));
+            fm.setLocation(StandardLocation.CLASS_OUTPUT, List.of(new File(".")));
             fm.setLocation(StandardLocation.CLASS_PATH, Collections.<File>emptyList());
-            files = Arrays.asList(new TestJFO("Test.java", code));
+            files = List.of(new TestJFO("Test.java", code));
 
-            test(Collections.<String>emptyList(),
+            test(List.of(htmlVersion),
                     Main.Result.ERROR,
                     EnumSet.of(Message.DL_ERR9A, Message.DL_WRN12A));
 
-            test(Arrays.asList(rawDiags),
+            test(List.of(htmlVersion, rawDiags),
                     Main.Result.ERROR,
                     EnumSet.of(Message.DL_ERR9, Message.DL_WRN12));
 
-//            test(Arrays.asList("-Xdoclint:none"),
+//            test(List.of("-Xdoclint:none"),
 //                    Main.Result.OK,
 //                    EnumSet.of(Message.JD_WRN10, Message.JD_WRN13));
 
-            test(Arrays.asList(rawDiags, "-Xdoclint"),
+            test(List.of(htmlVersion, rawDiags, "-Xdoclint"),
                     Main.Result.ERROR,
                     EnumSet.of(Message.DL_ERR9, Message.DL_WRN12));
 
-            test(Arrays.asList(rawDiags, "-Xdoclint:all/public"),
+            test(List.of(htmlVersion, rawDiags, "-Xdoclint:all/public"),
                     Main.Result.ERROR,
                     EnumSet.of(Message.OPT_BADQUAL));
 
-            test(Arrays.asList(rawDiags, "-Xdoclint:all", "-public"),
+            test(List.of(htmlVersion, rawDiags, "-Xdoclint:all", "-public"),
                     Main.Result.OK,
                     EnumSet.of(Message.DL_WRN12));
 
-            test(Arrays.asList(rawDiags, "-Xdoclint:syntax"),
+            test(List.of(htmlVersion, rawDiags, "-Xdoclint:syntax"),
                     Main.Result.OK,
                     EnumSet.of(Message.DL_WRN12));
 
-            test(Arrays.asList(rawDiags, "-private"),
+            test(List.of(htmlVersion, rawDiags, "-private"),
                     Main.Result.ERROR,
                     EnumSet.of(Message.DL_ERR6, Message.DL_ERR9, Message.DL_WRN12));
 
-            test(Arrays.asList(rawDiags, "-Xdoclint:syntax", "-private"),
+            test(List.of(htmlVersion, rawDiags, "-Xdoclint:syntax", "-private"),
                     Main.Result.ERROR,
                     EnumSet.of(Message.DL_ERR6, Message.DL_WRN12));
 
-            test(Arrays.asList(rawDiags, "-Xdoclint:reference"),
+            test(List.of(htmlVersion, rawDiags, "-Xdoclint:reference"),
                     Main.Result.ERROR,
                     EnumSet.of(Message.DL_ERR9));
 
-            test(Arrays.asList(rawDiags, "-Xdoclint:badarg"),
+            test(List.of(htmlVersion, rawDiags, "-Xdoclint:badarg"),
                     Main.Result.ERROR,
                     EnumSet.of(Message.OPT_BADARG));
 
-            files = Arrays.asList(new TestJFO("p1/P1Test.java", p1Code),
+            files = List.of(new TestJFO("p1/P1Test.java", p1Code),
                                   new TestJFO("p2/P2Test.java", p2Code));
 
-            test(Arrays.asList(rawDiags),
+            test(List.of(htmlVersion, rawDiags),
                     Main.Result.ERROR,
                     EnumSet.of(Message.DL_ERR_P1TEST, Message.DL_ERR_P2TEST));
 
-            test(Arrays.asList(rawDiags, "-Xdoclint/package:p1"),
+            test(List.of(htmlVersion, rawDiags, "-Xdoclint/package:p1"),
                     Main.Result.ERROR,
                     EnumSet.of(Message.DL_ERR_P1TEST));
 
-            test(Arrays.asList(rawDiags, "-Xdoclint/package:*p"),
+            test(List.of(htmlVersion, rawDiags, "-Xdoclint/package:*p"),
                     Main.Result.ERROR,
                     EnumSet.of(Message.OPT_BADPACKAGEARG));
 
--- a/test/langtools/jdk/jshell/InaccessibleExpressionTest.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/langtools/jdk/jshell/InaccessibleExpressionTest.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -22,7 +22,7 @@
  */
 
 /*
- * @test 8190939
+ * @test 8190939 8191842
  * @summary test expressions whose type is inaccessible
  * @modules jdk.compiler/com.sun.tools.javac.api
  *          jdk.compiler/com.sun.tools.javac.main
@@ -86,6 +86,8 @@
         assertEval(list.name() + ".size()", "0");
         VarSnippet one = varKey(assertEval("priv()", "One"));
         assertEquals(one.typeName(), "priv.GetPriv.Count");
+        assertEval("var v = down();", "Packp");
+        assertDeclareFail("v.toString()", "compiler.err.not.def.access.class.intf.cant.access");
     }
 
     public void testInternal() {
--- a/test/langtools/jdk/jshell/StartOptionTest.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/langtools/jdk/jshell/StartOptionTest.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -214,7 +214,7 @@
 
     // Test that the usage message is printed
     public void testUsage() {
-        for (String opt : new String[]{"-h", "--help"}) {
+        for (String opt : new String[]{"-?", "-h", "--help"}) {
             startCo(s -> {
                 assertTrue(s.split("\n").length >= 7, "Not enough usage lines: " + s);
                 assertTrue(s.startsWith("Usage:   jshell <option>..."), "Unexpect usage start: " + s);
--- a/test/langtools/jdk/jshell/ToolSimpleTest.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/langtools/jdk/jshell/ToolSimpleTest.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -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
+ * @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
  * @summary Simple jshell tool tests
  * @modules jdk.compiler/com.sun.tools.javac.api
  *          jdk.compiler/com.sun.tools.javac.main
@@ -786,7 +786,11 @@
                 (a) -> assertCommandOutputContains(a, "var r1 = new Object() {}", "r1"),
                 (a) -> assertCommandOutputContains(a, "/vars r1", "|    <anonymous class extending Object> r1 = "),
                 (a) -> assertCommandOutputContains(a, "var r2 = new Runnable() { public void run() { } }", "r2"),
-                (a) -> assertCommandOutputContains(a, "/vars r2", "|    <anonymous class implementing Runnable> r2 = ")
+                (a) -> assertCommandOutputContains(a, "/vars r2", "|    <anonymous class implementing Runnable> r2 = "),
+                (a) -> assertCommandOutputContains(a, "import java.util.stream.*;", ""),
+                (a) -> assertCommandOutputContains(a, "var list = Stream.of(1, 2, 3).map(j -> new Object() { int i = j; }).collect(Collectors.toList());",
+                                                      "list"),
+                (a) -> assertCommandOutputContains(a, "/vars list", "|    List<<anonymous class extending Object>> list = ")
         );
     }
 }
--- a/test/langtools/jdk/jshell/TypeNameTest.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/langtools/jdk/jshell/TypeNameTest.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug 8144903 8171981 8191802
+ * @bug 8144903 8171981 8191802 8191842
  * @summary Tests for determining the type from the expression
  * @build KullaTesting TestingInputStream
  * @run testng TypeNameTest
@@ -38,8 +38,12 @@
 
 
     private void assertType(String expr, String type) {
+        assertType(expr, type, type);
+    }
+
+    private void assertType(String expr, String type, String inferType) {
         assertEquals(varKey(assertEval(expr)).typeName(), type);
-        assertInferredType(expr, type);
+        assertInferredType(expr, inferType);
     }
 
     public void testTypeInference() {
@@ -58,7 +62,7 @@
         assertType("d.getS()", "D<?>");
         assertType("null", "Object");
         assertType("Class.forName( \"java.util.ArrayList\" )", "Class<?>");
-        assertType("new ArrayList<Boolean>() {}", "ArrayList<Boolean>");
+        assertType("new ArrayList<Boolean>() {}", "<anonymous class extending ArrayList<Boolean>>", "ArrayList<Boolean>");
         assertType("new ArrayList<String>().stream()", "java.util.stream.Stream<String>");
         assertType("Arrays.asList( 1, 2, 3)", "List<Integer>");
         assertType("new ArrayList().getClass().getClass()", "Class<? extends Class>");
@@ -188,7 +192,7 @@
         assertType("arrayOf(99)[0]", "Integer");
 
         assertEval("<Z> Z choose(Z z1, Z z2) { return z1; }");
-        assertType("choose(1, 1L);", "Object");
+        assertType("choose(1, 1L);", "Number&Comparable<? extends Number&Comparable<?>>", "Object");
     }
 
     public void testVariableTypeName() {
@@ -215,7 +219,7 @@
     public void testAnonymousClassName() {
         assertEval("class C {}");
         assertType("new C();", "C");
-        assertType("new C() { int x; };", "C");
+        assertType("new C() { int x; };", "<anonymous class extending C>", "C");
     }
 
     public void testCapturedTypeName() {
@@ -243,7 +247,7 @@
         assertType("test1.get()", "CharSequence");
         assertEval("class Test2<X extends Number & CharSequence> { public X get() { return null; } }");
         assertEval("Test2<?> test2 = new Test2<>();");
-        assertType("test2.get()", "Object");
+        assertType("test2.get()", "Number&CharSequence", "Object");
         assertEval("class Test3<T> { T[][] get() { return null; } }");
         assertEval("Test3<? extends String> test3 = new Test3<>();");
         assertType("test3.get()", "String[][]");
--- a/test/langtools/jdk/jshell/VariablesTest.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/langtools/jdk/jshell/VariablesTest.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -23,12 +23,18 @@
 
 /*
  * @test
- * @bug 8144903 8177466
+ * @bug 8144903 8177466 8191842
  * @summary Tests for EvaluationState.variables
- * @build KullaTesting TestingInputStream ExpectedDiagnostic
+ * @library /tools/lib
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ *          jdk.compiler/com.sun.tools.javac.main
+ *          jdk.jshell
+ * @build Compiler KullaTesting TestingInputStream ExpectedDiagnostic
  * @run testng VariablesTest
  */
 
+import java.nio.file.Path;
+import java.nio.file.Paths;
 import java.util.List;
 import javax.tools.Diagnostic;
 
@@ -37,6 +43,7 @@
 import jdk.jshell.VarSnippet;
 import jdk.jshell.Snippet.SubKind;
 import jdk.jshell.SnippetEvent;
+import org.testng.annotations.BeforeMethod;
 import org.testng.annotations.Test;
 
 import static java.util.stream.Collectors.toList;
@@ -362,5 +369,157 @@
         assertEval("class O2 { public class Inner { public Inner(int i) { } public String test() { return \"good\"; } } }");
         assertEval("var r5 = new O2().new Inner(1) { public String get() { return \"good\"; } };");
         assertEval("r5.get()", "\"good\"");
+        assertEval("<Z> Z identity(Z z) { return z; }");
+        assertEval("var r6 = identity(new Object() { String s = \"good\"; });");
+        assertEval("r6.s", "\"good\"");
+        assertEval("interface I<B, C> { C get(B b); }");
+        assertEval("<A, B, C> C cascade(A a, I<A, B> c1, I<B, C> c2) { return c2.get(c1.get(a)); }");
+        assertEval("var r7 = cascade(\"good\", a -> new Object() { String s = a; }, b -> new java.util.ArrayList<String>(5) { String s = b.s; });");
+        assertEval("r7.s", "\"good\"");
+        assertEval("var r8 = cascade(\"good\", a -> new Object() { String s = a; public String getS() { return s; } }, b -> new java.util.ArrayList<String>(5) { String s = b.getS(); public String getS() { return s; } });");
+        assertEval("r8.getS()", "\"good\"");
+        assertEval("var r9 = new Object() { class T { class Inner { public String g() { return outer(); } } public String outer() { return \"good\"; } public String test() { return new Inner() {}.g(); } } public String test() { return new T().test(); } };");
+        assertEval("r9.test()", "\"good\"");
+        assertEval("var nested1 = new Object() { class N { public String get() { return \"good\"; } } };");
+        assertEval("nested1.new N().get()", "\"good\"");
+        assertEval("var nested2 = cascade(\"good\", a -> new Object() { abstract class G { abstract String g(); } G g = new G() { String g() { return a; } }; }, b -> new java.util.ArrayList<String>(5) { String s = b.g.g(); });");
+        assertEval("nested2.s", "\"good\"");
+        assertEval("<A, B> B convert(A a, I<A, B> c) { return c.get(a); }");
+        assertEval("var r10 = convert(\"good\", a -> new api.C(12) { public String val = \"\" + i + s + l + a; } );");
+        assertEval("r10.val", "\"12empty[empty]good\"");
+        assertEval("var r11 = convert(\"good\", a -> new api.C(\"a\") { public String val = \"\" + i + s + l + a; } );");
+        assertEval("r11.val", "\"3a[empty]good\"");
+        assertEval("import api.C;");
+        assertEval("var r12 = convert(\"good\", a -> new C(java.util.List.of(\"a\")) { public String val = \"\" + i + s + l + a; } );");
+        assertEval("r12.val", "\"4empty[a]good\"");
+        assertEval("var r13 = convert(\"good\", a -> new api.G<String>(java.util.List.of(\"b\")) { public String val = \"\" + l + a; } );");
+        assertEval("r13.val", "\"[b]good\"");
+        assertEval("var r14 = convert(\"good\", a -> new api.J<String>() { public java.util.List<String> get() { return java.util.List.of(a, \"c\"); } } );");
+        assertEval("r14.get()", "[good, c]");
+        assertEval("var r15a = new java.util.ArrayList<String>();");
+        assertEval("r15a.add(\"a\");");
+        assertEval("var r15b = r15a.get(0);");
+        assertEval("r15b", "\"a\"");
+    }
+
+    public void test8191842() {
+        assertEval("import java.util.stream.*;");
+        assertEval("var list = Stream.of(1, 2, 3).map(j -> new Object() { int i = j; }).collect(Collectors.toList());");
+        assertEval("list.stream().map(a -> String.valueOf(a.i)).collect(Collectors.joining(\", \"));", "\"1, 2, 3\"");
+    }
+
+    public void lvtiRecompileDependentsWithIntersectionTypes() {
+        assertEval("<Z extends Runnable & CharSequence> Z get1() { return null; }", added(VALID));
+        VarSnippet var = varKey(assertEval("var i1 = get1();", added(VALID)));
+        assertEval("import java.util.stream.*;", added(VALID),
+                                                 ste(var, VALID, VALID, true, MAIN_SNIPPET));
+        assertEval("void t1() { i1.run(); i1.length(); }", added(VALID));
+    }
+
+    public void arrayInit() {
+        assertEval("int[] d = {1, 2, 3};");
+    }
+
+    public void testAnonymousVar() {
+        assertEval("new Object() { public String get() { return \"a\"; } }");
+        assertEval("$1.get()", "\"a\"");
+    }
+
+    public void testIntersectionVar() {
+        assertEval("<Z extends Runnable & CharSequence> Z get() { return null; }", added(VALID));
+        assertEval("get();", added(VALID));
+        assertEval("void t1() { $1.run(); $1.length(); }", added(VALID));
+    }
+
+    public void multipleCaptures() {
+        assertEval("class D { D(int foo, String bar) { this.foo = foo; this.bar = bar; } int foo; String bar; } ");
+        assertEval("var d = new D(34, \"hi\") { String z = foo + bar; };");
+        assertEval("d.z", "\"34hi\"");
+    }
+
+    public void multipleAnonymous() {
+        VarSnippet v1 = varKey(assertEval("new Object() { public int i = 42; public int i1 = i; public int m1() { return i1; } };"));
+        VarSnippet v2 = varKey(assertEval("new Object() { public int i = 42; public int i2 = i; public int m2() { return i2; } };"));
+        assertEval(v1.name() + ".i", "42");
+        assertEval(v1.name() + ".i1", "42");
+        assertEval(v1.name() + ".m1()", "42");
+        assertDeclareFail(v1.name() + ".i2",
+                          new ExpectedDiagnostic("compiler.err.cant.resolve.location", 0, 5, 2,
+                                                 -1, -1, Diagnostic.Kind.ERROR));
+        assertEval(v2.name() + ".i", "42");
+        assertEval(v2.name() + ".i2", "42");
+        assertEval(v2.name() + ".m2()", "42");
+        assertDeclareFail(v2.name() + ".i1",
+                          new ExpectedDiagnostic("compiler.err.cant.resolve.location", 0, 5, 2,
+                                                 -1, -1, Diagnostic.Kind.ERROR));
+    }
+
+    public void displayName() {
+        assertVarDisplayName("var v1 = 234;", "int");
+        assertVarDisplayName("var v2 = new int[] {234};", "int[]");
+        assertEval("<Z extends Runnable & CharSequence> Z get() { return null; }", added(VALID));
+        assertVarDisplayName("var v3 = get();", "CharSequence&Runnable");
+        assertVarDisplayName("var v4a = new java.util.ArrayList<String>();", "java.util.ArrayList<String>");
+        assertEval("v4a.add(\"a\");");
+        assertVarDisplayName("var v4b = v4a.get(0);", "String");
+        assertVarDisplayName("var v5 = new Object() { };", "<anonymous class extending Object>");
+        assertVarDisplayName("var v6 = new Runnable() { public void run() { } };", "<anonymous class implementing Runnable>");
+    }
+
+    private void assertVarDisplayName(String var, String typeName) {
+        assertEquals(varKey(assertEval(var)).typeName(), typeName);
+    }
+
+    @BeforeMethod
+    @Override
+    public void setUp() {
+        Path path = Paths.get("cp");
+        Compiler compiler = new Compiler();
+        compiler.compile(path,
+                "package api;\n" +
+                "\n" +
+                "import java.util.List;\n" +
+                "\n" +
+                "public class C {\n" +
+                "   public int i;\n" +
+                "   public String s;\n" +
+                "   public List<String> l;\n" +
+                "   public C(int i) {\n" +
+                "       this.i = i;\n" +
+                "       this.s = \"empty\";\n" +
+                "       this.l = List.of(\"empty\");\n" +
+                "   }\n" +
+                "   public C(String s) {\n" +
+                "       this.i = 3;\n" +
+                "       this.s = s;\n" +
+                "       this.l = List.of(\"empty\");\n" +
+                "   }\n" +
+                "   public C(List<String> l) {\n" +
+                "       this.i = 4;\n" +
+                "       this.s = \"empty\";\n" +
+                "       this.l = l;\n" +
+                "   }\n" +
+                "}\n",
+                "package api;\n" +
+                "\n" +
+                "import java.util.List;\n" +
+                "\n" +
+                "public class G<T> {\n" +
+                "   public List<T> l;\n" +
+                "   public G(List<T> l) {\n" +
+                "       this.l = l;\n" +
+                "   }\n" +
+                "}\n",
+                "package api;\n" +
+                "\n" +
+                "import java.util.List;\n" +
+                "\n" +
+                "public interface J<T> {\n" +
+                "   public List<T> get();\n" +
+                "}\n");
+        String tpath = compiler.getPath(path).toString();
+        setUp(b -> b
+                .remoteVMOptions("--class-path", tpath)
+                .compilerOptions("--class-path", tpath));
     }
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/langtools/tools/javac/T8187805/BogusRTTAForUnusedVarTest.java	Tue Jan 30 16:41:40 2018 +0100
@@ -0,0 +1,88 @@
+/*
+ * 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 8187805
+ * @summary bogus RuntimeVisibleTypeAnnotations for unused local in a block
+ * @modules jdk.jdeps/com.sun.tools.classfile
+ *          jdk.compiler/com.sun.tools.javac.util
+ * @run main BogusRTTAForUnusedVarTest
+ */
+
+import com.sun.tools.classfile.*;
+
+import java.io.File;
+import java.lang.annotation.Target;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+
+import com.sun.tools.classfile.Attribute;
+import com.sun.tools.classfile.RuntimeVisibleTypeAnnotations_attribute;
+import com.sun.tools.classfile.TypeAnnotation;
+import com.sun.tools.classfile.TypeAnnotation.Position;
+import com.sun.tools.javac.util.Assert;
+
+public class BogusRTTAForUnusedVarTest {
+
+    class Foo {
+        void something() {
+            {
+                @MyAnno Object o = new Object();
+            }
+        }
+    }
+
+    @Target(ElementType.TYPE_USE)
+    @Retention(RetentionPolicy.RUNTIME)
+    @interface MyAnno {}
+
+    public static void main(String args[]) throws Throwable {
+        new BogusRTTAForUnusedVarTest().run();
+    }
+
+    void run() throws Throwable {
+        checkRTTA();
+    }
+
+    void checkRTTA() throws Throwable {
+        File testClasses = new File(System.getProperty("test.classes"));
+        File file = new File(testClasses,
+                BogusRTTAForUnusedVarTest.class.getName() + "$Foo.class");
+        ClassFile classFile = ClassFile.read(file);
+        for (Method m : classFile.methods) {
+            if (m.getName(classFile.constant_pool).equals("something")) {
+                for (Attribute a : m.attributes) {
+                    if (a.getName(classFile.constant_pool).equals("Code")) {
+                        Code_attribute code = (Code_attribute)a;
+                        for (Attribute codeAttrs : code.attributes) {
+                            if (codeAttrs.getName(classFile.constant_pool).equals("RuntimeVisibleTypeAnnotations")) {
+                                throw new AssertionError("no RuntimeVisibleTypeAnnotations attribute should have been generated in this case");
+                            }
+                        }
+                    }
+                }
+            }
+        }
+    }
+}
--- a/test/langtools/tools/javac/T8192885/AddGotoAfterForLoopToLNTTest.java	Tue Jan 30 16:26:40 2018 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,116 +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.
- *
- * 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 8192885
- * @summary Compiler in JDK 10-ea+33 misses to include entry in LineNumberTable for goto instruction of foreach loop
- * @library /tools/lib
- * @modules jdk.jdeps/com.sun.tools.classfile
- *          jdk.compiler/com.sun.tools.javac.api
- *          jdk.compiler/com.sun.tools.javac.main
- *          jdk.compiler/com.sun.tools.javac.util
- *          jdk.jdeps/com.sun.tools.javap
- * @build toolbox.ToolBox toolbox.JavacTask
- * @run main AddGotoAfterForLoopToLNTTest
- */
-
-import java.io.File;
-import java.nio.file.Paths;
-
-import com.sun.tools.classfile.ClassFile;
-import com.sun.tools.classfile.Code_attribute;
-import com.sun.tools.classfile.LineNumberTable_attribute;
-import com.sun.tools.classfile.Method;
-import com.sun.tools.javac.util.Assert;
-
-import toolbox.JavacTask;
-import toolbox.ToolBox;
-
-public class AddGotoAfterForLoopToLNTTest {
-
-    static final String testSource =
-    /* 01 */        "class GotoAtEnhancedForTest {\n" +
-    /* 02 */        "    void lookForThisMethod() {\n" +
-    /* 03 */        "        for (Object o : java.util.Collections.emptyList()) {\n" +
-    /* 04 */        "        }\n" +
-    /* 05 */        "    }\n" +
-    /* 06 */        "}";
-
-    static final int[][] expectedLNT = {
-    //  {line-number, start-pc},
-        {3,           0},
-        {4,           25},
-        {3,           28},
-        {5,           30},
-    };
-
-    static final String methodToLookFor = "lookForThisMethod";
-
-    public static void main(String[] args) throws Exception {
-        new AddGotoAfterForLoopToLNTTest().run();
-    }
-
-    ToolBox tb = new ToolBox();
-
-    void run() throws Exception {
-        compileTestClass();
-        checkClassFile(new File(Paths.get(System.getProperty("user.dir"),
-                "GotoAtEnhancedForTest.class").toUri()), methodToLookFor);
-    }
-
-    void compileTestClass() throws Exception {
-        new JavacTask(tb)
-                .sources(testSource)
-                .run();
-    }
-
-    void checkClassFile(final File cfile, String methodToFind) throws Exception {
-        ClassFile classFile = ClassFile.read(cfile);
-        boolean methodFound = false;
-        for (Method method : classFile.methods) {
-            if (method.getName(classFile.constant_pool).equals(methodToFind)) {
-                methodFound = true;
-                Code_attribute code = (Code_attribute) method.attributes.get("Code");
-                LineNumberTable_attribute lnt =
-                        (LineNumberTable_attribute) code.attributes.get("LineNumberTable");
-                Assert.check(lnt.line_number_table_length == expectedLNT.length,
-                        "The LineNumberTable found has a length different to the expected one");
-                int i = 0;
-                for (LineNumberTable_attribute.Entry entry: lnt.line_number_table) {
-                    Assert.check(entry.line_number == expectedLNT[i][0] &&
-                            entry.start_pc == expectedLNT[i][1],
-                            "LNT entry at pos " + i + " differ from expected." +
-                            "Found " + entry.line_number + ":" + entry.start_pc +
-                            ". Expected " + expectedLNT[i][0] + ":" + expectedLNT[i][1]);
-                    i++;
-                }
-            }
-        }
-        Assert.check(methodFound, "The seek method was not found");
-    }
-
-    void error(String msg) {
-        throw new AssertionError(msg);
-    }
-}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/langtools/tools/javac/diags/examples/FutureVarNotAllowed.java	Tue Jan 30 16:41:40 2018 +0100
@@ -0,0 +1,29 @@
+/*
+ * 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
+ * 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.
+ */
+
+// key: compiler.warn.var.not.allowed
+// options: --release 9
+
+class var { }
--- a/test/langtools/tools/javac/flow/tests/TestCaseForEach.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/langtools/tools/javac/flow/tests/TestCaseForEach.java	Tue Jan 30 16:41:40 2018 +0100
@@ -3,7 +3,7 @@
 public class TestCaseForEach {
 
     @AliveRange(varName="o", bytecodeStart=25, bytecodeLength=11)
-    @AliveRange(varName="o", bytecodeStart=41, bytecodeLength=1)
+    @AliveRange(varName="o", bytecodeStart=39, bytecodeLength=1)
     void m(String[] args) {
         Object o;
         for (String s : args) {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/langtools/tools/javac/jvm/VerboseClassPathTest.java	Tue Jan 30 16:41:40 2018 +0100
@@ -0,0 +1,79 @@
+/*
+ * Copyright (c) 2018, Google Inc. All rights reserved.
+ * 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 8179373
+ * @summary javac -verbose logs the class path multiple times
+ * @modules jdk.compiler
+ * @run main VerboseClassPathTest
+ */
+
+import java.io.BufferedReader;
+import java.io.PrintWriter;
+import java.io.StringReader;
+import java.io.StringWriter;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.util.spi.ToolProvider;
+
+public class VerboseClassPathTest {
+    public static void main(String... args) throws Exception {
+        new VerboseClassPathTest().run();
+    }
+
+    void run() throws Exception {
+        String className = getClass().getName();
+        Path testSrc = Paths.get(System.getProperty("test.src"));
+        Path file = testSrc.resolve(className + ".java");
+        ToolProvider javac = ToolProvider.findFirst("javac").orElseThrow();
+        StringWriter sw = new StringWriter();
+        PrintWriter pw = new PrintWriter(sw, true);
+        int rc =
+                javac.run(
+                        pw,
+                        pw,
+                        "-d",
+                        ",",
+                        "-source",
+                        "8",
+                        "-target",
+                        "8",
+                        "-verbose",
+                        file.toString());
+        String log = sw.toString();
+        System.out.println(log);
+        if (rc != 0) {
+            throw new Exception("compilation failed: rc=" + rc);
+        }
+        String expect = "[search path for class files:";
+        long count =
+                new BufferedReader(new StringReader(log))
+                        .lines()
+                        .filter(line -> line.startsWith(expect))
+                        .count();
+        if (count != 1) {
+            throw new Exception("expected '" + expect + "' to appear once, actual: " + count);
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/langtools/tools/javac/lambda/T8195598.java	Tue Jan 30 16:41:40 2018 +0100
@@ -0,0 +1,49 @@
+/*
+ * 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
+ * @bug 8195598
+ * @summary Reference to overloaded method is ambiguous with 3 methods but works with 2
+ * @compile T8195598.java
+ */
+
+import java.util.concurrent.*;
+import java.util.function.*;
+
+class T8195598 {
+    public CompletableFuture<?> test() {
+        return ok(() -> System.out.append("aaa"));
+    }
+    public <T> CompletableFuture<T> ok(Supplier<T> action) {
+        return CompletableFuture.supplyAsync(action);
+    }
+    public <T> CompletableFuture<T> ok(T body) {
+        return CompletableFuture.completedFuture(body);
+    }
+    public CompletableFuture<Void> ok(Runnable action) {
+        return CompletableFuture.runAsync(action);
+    }
+}
--- a/test/langtools/tools/javac/lvti/ParserTest.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/langtools/tools/javac/lvti/ParserTest.java	Tue Jan 30 16:41:40 2018 +0100
@@ -1,8 +1,8 @@
 /*
  * @test /nodynamiccopyright/
- * @bug 8177466
+ * @bug 8177466 8189146
+ * @compile/ref=ParserTest9.out -XDrawDiagnostics --release 9 ParserTest.java
  * @summary Add compiler support for local variable type-inference
- * @compile -source 9 ParserTest.java
  * @compile/fail/ref=ParserTest.out -XDrawDiagnostics ParserTest.java
  */
 
@@ -11,7 +11,7 @@
 import java.util.function.Function;
 import java.util.List;
 
-class ParserTest<var> {
+class ParserTest<var extends AutoCloseable> {
     static class TestClass {
         static class var { } //illegal
     }
@@ -33,7 +33,7 @@
 
     @interface DA { }
 
-    static class var extends RuntimeException { } //illegal
+    static abstract class var extends RuntimeException implements AutoCloseable { } //illegal
 
     var x = null; //illegal
 
@@ -68,4 +68,10 @@
         boolean b1 = o instanceof var; //error
         Object o2 = (var)o; //error
     }
+
+    void test4() throws Exception {
+        try (final var resource1 = null; // ok
+             var resource2 = null) {     // ok
+        }
+    }
 }
--- a/test/langtools/tools/javac/lvti/ParserTest.out	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/langtools/tools/javac/lvti/ParserTest.out	Tue Jan 30 16:41:40 2018 +0100
@@ -3,7 +3,7 @@
 ParserTest.java:20:19: compiler.err.var.not.allowed: var
 ParserTest.java:24:14: compiler.err.var.not.allowed: var
 ParserTest.java:28:20: compiler.err.var.not.allowed: var
-ParserTest.java:36:18: compiler.err.var.not.allowed: var
+ParserTest.java:36:27: compiler.err.var.not.allowed: var
 ParserTest.java:38:5: compiler.err.var.not.allowed.here
 ParserTest.java:41:15: compiler.err.var.not.allowed.array
 ParserTest.java:42:13: compiler.err.var.not.allowed.array
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/langtools/tools/javac/lvti/ParserTest9.out	Tue Jan 30 16:41:40 2018 +0100
@@ -0,0 +1,7 @@
+ParserTest.java:14:18: compiler.warn.var.not.allowed
+ParserTest.java:16:22: compiler.warn.var.not.allowed
+ParserTest.java:20:19: compiler.warn.var.not.allowed
+ParserTest.java:24:14: compiler.warn.var.not.allowed
+ParserTest.java:28:20: compiler.warn.var.not.allowed
+ParserTest.java:36:27: compiler.warn.var.not.allowed
+6 warnings
--- a/test/langtools/tools/javac/processing/model/TestSourceVersion.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/langtools/tools/javac/processing/model/TestSourceVersion.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug 7025809 8028543 6415644 8028544 8029942 8193291
+ * @bug 7025809 8028543 6415644 8028544 8029942 8187951 8193291
  * @summary Test latest, latestSupported, underscore as keyword, etc.
  * @author  Joseph D. Darcy
  * @modules java.compiler
@@ -42,6 +42,7 @@
         testLatestSupported();
         testVersionVaryingKeywords();
         testRestrictedKeywords();
+        testVar();
     }
 
     private static void testLatestSupported() {
@@ -96,6 +97,19 @@
         }
     }
 
+    private static void testVar() {
+
+        for(SourceVersion version : SourceVersion.values()) {
+            check(false, isKeyword("var",     version), "keyword", version);
+            check(false, isKeyword("foo.var", version), "keyword", version);
+            check(false, isKeyword("var.foo", version), "keyword", version);
+
+            check(true, isName("var", version),     "name", version);
+            check(true, isName("foo.var", version), "name", version);
+            check(true, isName("var.foo", version), "name", version);
+        }
+    }
+
     private static void check(boolean result, boolean expected,
                               String message, SourceVersion version) {
         if (result != expected) {
--- a/test/langtools/tools/javadoc/6964914/TestStdDoclet.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/langtools/tools/javadoc/6964914/TestStdDoclet.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -57,6 +57,7 @@
         cmdArgs.add(javadoc.getPath());
         cmdArgs.addAll(Arrays.asList(
                 "-classpath", ".", // insulates us from ambient classpath
+                "-html4",
                 "-Xdoclint:none",
                 "-package",
                 new File(testSrc, thisClassName + ".java").getPath()
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/langtools/tools/javadoc/AddOpensTest.java	Tue Jan 30 16:41:40 2018 +0100
@@ -0,0 +1,77 @@
+/*
+ * 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 8181878
+ * @summary javadoc should support/ignore --add-opens
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * @modules jdk.compiler/com.sun.tools.javac.main
+ * @modules jdk.javadoc/jdk.javadoc.internal.api
+ * @modules jdk.javadoc/jdk.javadoc.internal.tool
+ * @library /tools/lib /tools/javadoc/lib
+ * @build toolbox.JavacTask toolbox.JavadocTask toolbox.TestRunner toolbox.ToolBox ToyDoclet
+ * @run main AddOpensTest
+ */
+
+import java.io.IOException;
+import java.nio.charset.StandardCharsets;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+
+import toolbox.JavadocTask;
+import toolbox.Task;
+import toolbox.TestRunner;
+import toolbox.ToolBox;
+
+public class AddOpensTest extends TestRunner {
+    public static void main(String... args) throws Exception {
+        AddOpensTest t = new AddOpensTest();
+        t.runTests();
+    }
+
+    private final ToolBox tb = new ToolBox();
+    private final Path src = Paths.get("src");
+    private final Path api = Paths.get("api");
+
+    AddOpensTest() throws Exception {
+        super(System.err);
+        init();
+    }
+
+    void init() throws IOException {
+        tb.writeJavaFiles(src, "public class C { }");
+    }
+
+    @Test
+    public void testEncoding() {
+        Task.Result result = new JavadocTask(tb, Task.Mode.EXEC)
+                .options("-docletpath", System.getProperty("test.class.path"),
+                        "-doclet", "ToyDoclet",
+                        "--add-opens", "some.module")
+                .files(src.resolve("C.java"))
+                .run(Task.Expect.SUCCESS)
+                .writeAll();
+    }
+}
+
--- a/test/langtools/tools/javap/InvalidOptions.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/langtools/tools/javap/InvalidOptions.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -42,7 +42,7 @@
     void run() throws Exception {
         test(2, "-b", "Error: unknown option: -b",
                       "Usage: javap <options> <classes>",
-                      "use -help for a list of possible options");
+                      "use --help for a list of possible options");
         if (errorCount > 0)
             throw new Exception(errorCount + " errors received");
     }
--- a/test/langtools/tools/jdeps/MultiReleaseJar.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/langtools/tools/jdeps/MultiReleaseJar.java	Tue Jan 30 16:41:40 2018 +0100
@@ -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
@@ -118,7 +118,7 @@
         checkResult(r, false,
                 "Error: unknown option: -multi-release",
                 "Usage: jdeps <options> <path",
-                "use -h, -?, -help, or --help"
+                "use --help"
         );
 
         r = run("jdeps -v -R -cp Version.jar --multi-release 9 test/Main.class");
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/nashorn/script/basic/JDK-8193567.js	Tue Jan 30 16:41:40 2018 +0100
@@ -0,0 +1,36 @@
+/*
+ * 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.
+ * 
+ * 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-8193567: Conversion of comparison nodes affects local slots in optimistic continuation
+ *
+ * @test
+ * @run
+ */
+
+function a() {
+    var x, y;
+    return null == (r = null == (x = this.p) ? void 0 : x.r) ? this : y;
+}
+
+a();
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/nashorn/script/basic/JDK-8195829.js	Tue Jan 30 16:41:40 2018 +0100
@@ -0,0 +1,46 @@
+/*
+ * 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.
+ */
+
+/**
+ * JDK-8195829 : Parsing a nameless ES6 class results in a thrown NullPointerException.
+ *
+ * @test
+ * @run
+ */
+
+var Parser = Java.type("jdk.nashorn.api.tree.Parser");
+var SimpleTreeVisitor = Java.type("jdk.nashorn.api.tree.SimpleTreeVisitorES6");
+var parser = Parser.create("--language=es6"); 
+var ast = parser.parse("test.js", "(class {});", print);
+var reachedClassExpr = false;
+ast.accept(new (Java.extend(SimpleTreeVisitor)) {
+    visitClassExpression: function(node, extra) {
+        reachedClassExpr = true;
+        Assert.assertTrue(node.name === null);
+    }
+}, null);
+
+Assert.assertTrue(reachedClassExpr);
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/nashorn/script/nosecurity/jjs-option-t.js	Tue Jan 30 16:41:40 2018 +0100
@@ -0,0 +1,57 @@
+/*
+ * 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-8147614: add jjs test for -t option.
+ * @test
+ * @option -scripting
+ * @run
+ * @summary Test -t flag and its basic functionality
+ */
+
+load(__DIR__ + "jjs-common.js")
+
+var timezone = Java.type("java.util.TimeZone")
+var currentTimezone = timezone.getDefault().getID()
+var msg_flag = "print($OPTIONS._timezone.ID)"
+var e_outp = "Asia/Tokyo"
+var e_outn = currentTimezone
+
+var msg_func=<<EOD
+var d= new Date(0)
+print(d.getTimezoneOffset())
+EOD
+
+var func_cond_p = <<'EOD'
+out==-540
+EOD
+
+var func_cond_n = <<'EOD'
+out==-timezone.getDefault().getRawOffset()/60000
+EOD
+
+var arg_p = "-t=Asia/Tokyo ${testfunc_file}"
+var arg_n = "${testfunc_file}"
+
+testjjs_flag_and_func("-t","=Asia/Tokyo")
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/nashorn/script/nosecurity/jjs-option-t.js.EXPECTED	Tue Jan 30 16:41:40 2018 +0100
@@ -0,0 +1,6 @@
+-t flag positive test:
+flag test PASSED
+functionality test PASSED
+-t flag negative test:
+flag test PASSED
+functionality test PASSED
--- a/test/nashorn/src/jdk/nashorn/api/scripting/test/ScriptEngineSecurityTest.java	Tue Jan 30 16:26:40 2018 +0100
+++ b/test/nashorn/src/jdk/nashorn/api/scripting/test/ScriptEngineSecurityTest.java	Tue Jan 30 16:41:40 2018 +0100
@@ -133,7 +133,7 @@
         }
     }
 
-
+    // This also covers overriding finalizer in JavaAdapter such as JDK-8194985
     @Test
     public void securitySystemExitFromFinalizerThread() throws ScriptException {
         if (System.getSecurityManager() == null) {