changeset 14599:af37c3fb97fd

Merge
author ddehaven
date Tue, 03 Nov 2015 12:04:12 -0800
parents 3d1f56602d93 14f8bca09c9b
children 298d3fe64572
files src/java.rmi/unix/bin/java-rmi.cgi.sh
diffstat 131 files changed, 1368 insertions(+), 972 deletions(-) [+]
line wrap: on
line diff
--- a/.hgtags	Tue Nov 03 14:00:01 2015 +0300
+++ b/.hgtags	Tue Nov 03 12:04:12 2015 -0800
@@ -331,3 +331,4 @@
 e8a66c0b05d786a282a7ff1d7eb4989afa30c891 jdk9-b86
 110fc90bdfa0fe59606c047c2301ed75d2bad6cf jdk9-b87
 6e50b992bef4def597a5033e696e5b1d4fe5b294 jdk9-b88
+0d0a63b325592607974612f9cfb48590975aa2d6 jdk9-b89
--- a/make/CompileDemos.gmk	Tue Nov 03 14:00:01 2015 +0300
+++ b/make/CompileDemos.gmk	Tue Nov 03 12:04:12 2015 -0800
@@ -23,6 +23,10 @@
 # questions.
 #
 
+################################################################################
+# Build demos for the JDK into $(SUPPORT_OUTPUTDIR)/demos/image.
+################################################################################
+
 default: all
 
 include $(SPEC)
@@ -31,428 +35,487 @@
 include NativeCompilation.gmk
 include SetupJavaCompilers.gmk
 include TextFileProcessing.gmk
+include ZipArchive.gmk
 
 # Prepare the find cache.
 $(eval $(call FillCacheFind, $(JDK_TOPDIR)/src))
 
 # Append demo goals to this variable.
-BUILD_DEMOS =
+TARGETS =
 
 # The demo structure and contents should really be cleaned up.
 # Now every other demo has its own quirks where to put the
 # READMEs and other files.
 
 DEMO_SHARE_SRC := $(JDK_TOPDIR)/src/demo/share
-DEMO_CLOSED_SHARE_SRC := $(JDK_TOPDIR)/src/closed/demo/share
-DEMO_SOLARIS_SRC := $(JDK_TOPDIR)/src/demo/solaris
-DEMO_OS_TYPE_SRC := $(JDK_TOPDIR)/src/demo/$(OPENJDK_TARGET_OS_TYPE)
 GLOBAL_VERSION_INFO_RESOURCE := $(JDK_TOPDIR)/src/java.base/windows/native/common/version.rc
 
-##################################################################################################
+DEMO_MANIFEST := $(SUPPORT_OUTPUTDIR)/demos/java-main-manifest.mf
 
-# This rule will be depended on due to the MANIFEST line
+# This rule will be depended on due to the MANIFEST line in SetupBuildDemo
+# and SetupBuildJvmtiDemo.
 $(eval $(call SetupTextFileProcessing, BUILD_JAVA_MANIFEST, \
   SOURCE_FILES := $(JDK_TOPDIR)/make/data/mainmanifest/manifest.mf, \
-  OUTPUT_FILE := $(SUPPORT_OUTPUTDIR)/demo/java-main-manifest.mf, \
+  OUTPUT_FILE := $(DEMO_MANIFEST), \
   REPLACEMENTS := \
       @@RELEASE@@ => $(RELEASE) ; \
       @@COMPANY_NAME@@ => $(COMPANY_NAME) , \
 ))
 
-define SetupAppletDemo
-  $$(eval $$(call SetupJavaCompilation,BUILD_DEMO_APPLET_$1, \
+################################################################################
+# Build applet demos.
+
+# Setup make rules for building a demo applet.
+#
+# Parameter 1 is the name of the rule. This name is used as variable prefix,
+# and the targets generated are listed in a variable by that name. It is also
+# used to locate the name of the applet subdir, and to determine the name
+# of the output directory.
+#
+# Remaining parameters are named arguments. These include:
+# SRC_DIR   Alternative source directory to use for the demos.
+# DISABLE_SJAVAC   Passed to SetupJavaCompilation
+
+SetupBuildAppletDemo = $(NamedParamsMacroTemplate)
+define SetupBuildAppletDemoBody
+  ifeq ($$($1_SRC_DIR), )
+    $1_SRC_DIR := $(DEMO_SHARE_SRC)/applets
+  endif
+
+  $$(eval $$(call SetupJavaCompilation, BUILD_DEMO_APPLET_$1, \
       SETUP := GENERATE_USINGJDKBYTECODE, \
-      SRC := $(JDK_TOPDIR)/src/$3demo/share/applets/$1, \
-      BIN := $(SUPPORT_OUTPUTDIR)/demo/image/applets/$1, \
+      SRC := $$($1_SRC_DIR)/$1, \
+      BIN := $(SUPPORT_OUTPUTDIR)/demos/image/applets/$1, \
       COPY := .html .java .xyz .obj .au .gif, \
-      DISABLE_SJAVAC := $2))
-      BUILD_DEMOS += $$(BUILD_DEMO_APPLET_$1)
+      DISABLE_SJAVAC := $$($1_DISABLE_SJAVAC), \
+  ))
+
+  $1 := $$(BUILD_DEMO_APPLET_$1)
+
+  TARGETS += $$($1)
 endef
 
 ifneq ($(OPENJDK_TARGET_OS), solaris)
-  $(eval $(call SetupAppletDemo,ArcTest))
-  $(eval $(call SetupAppletDemo,BarChart))
-  $(eval $(call SetupAppletDemo,Blink))
-  $(eval $(call SetupAppletDemo,CardTest))
-  $(eval $(call SetupAppletDemo,Clock))
-  $(eval $(call SetupAppletDemo,DitherTest))
-  $(eval $(call SetupAppletDemo,DrawTest))
-  $(eval $(call SetupAppletDemo,Fractal))
-  $(eval $(call SetupAppletDemo,GraphicsTest))
-  $(eval $(call SetupAppletDemo,NervousText))
-  $(eval $(call SetupAppletDemo,SimpleGraph))
-  $(eval $(call SetupAppletDemo,SortDemo))
-  $(eval $(call SetupAppletDemo,SpreadSheet))
-
-  ifndef OPENJDK
-    $(eval $(call SetupAppletDemo,Animator,,closed/))
-    $(eval $(call SetupAppletDemo,GraphLayout,true,closed/))
-    $(eval $(call SetupAppletDemo,JumpingBox,,closed/))
-    $(eval $(call SetupAppletDemo,TicTacToe,,closed/))
-  endif
+  $(eval $(call SetupBuildAppletDemo, ArcTest))
+  $(eval $(call SetupBuildAppletDemo, BarChart))
+  $(eval $(call SetupBuildAppletDemo, Blink))
+  $(eval $(call SetupBuildAppletDemo, CardTest))
+  $(eval $(call SetupBuildAppletDemo, Clock))
+  $(eval $(call SetupBuildAppletDemo, DitherTest))
+  $(eval $(call SetupBuildAppletDemo, DrawTest))
+  $(eval $(call SetupBuildAppletDemo, Fractal))
+  $(eval $(call SetupBuildAppletDemo, GraphicsTest))
+  $(eval $(call SetupBuildAppletDemo, NervousText))
+  $(eval $(call SetupBuildAppletDemo, SimpleGraph))
+  $(eval $(call SetupBuildAppletDemo, SortDemo))
+  $(eval $(call SetupBuildAppletDemo, SpreadSheet))
 endif
 
-##################################################################################################
+################################################################################
+# Build normal demos.
 
-PATTERNS_TO_COPY = .html .txt .properties .js .gif .jpg .theme .data .opt README .c .h .png .ttf .xyz .obj
+COPY_TO_JAR := .html .txt .properties .js .gif .jpg .theme .data .opt .c .h \
+    .png .ttf .xyz .obj README COPYRIGHT
 
-define SetupDemo
-  # Param 1 = Name of the demo
-  # Param 2 = Subdirectory of the demo below the demo directory.
-  # Param 3 = Additional javac flags.
-  # Param 4 = The main class for the jar.
-  # Param 5 = Additional source directory.
-  # Param 6 = Extra dir below $(JDK_TOPDIR)/src (closed)
-  # Param 7 = List of files to copy
-  # Param 8 = Base name of jar file. Defaults to $1
-  # Param 9 = Exclude list
-  # Param 10 = Extra copy patterns
-  # Param 11 = Extra manifest attribute
-  # Param 12 = Suffix for compiler setup name
+COPY_TO_IMAGE := *.html *.txt *.png *.xml README*
 
-  $1_SRC_BASE := $(JDK_TOPDIR)/src/$6demo/share/$2/$1
-  # In some demos the source is found in a subdir called src.
-  $1_MAIN_SRC := $$(wildcard $$($1_SRC_BASE)/src)
-  ifeq ($$($1_MAIN_SRC), )
+# Setup make rules for building a demo.
+#
+# Parameter 1 is the name of the rule. This name is used as variable prefix,
+# and the targets generated are listed in a variable by that name.
+#
+# Remaining parameters are named arguments. These include:
+# DEMO_SUBDIR   The name of the subdir of the demo, below the demo top dir.
+# EXTRA_SRC_DIR   Additional source directory.
+# SRC_SUB_DIR   Optional subdir to locate source code in
+# SRC_DIR   Alternative source directory to use for the demos.
+# EXCLUDE_FILES   Exclude file list
+# JAR_NAME   Base name of jar file. Defaults to $1.
+# MAIN_CLASS   The main class for the jar. Defaults to $1.
+# EXTRA_COPY_TO_JAR   Additional files to copy to jar (as patterns)
+# EXTRA_COPY_TO_IMAGE   Additional files to copy to images (as wildcards)
+# EXTRA_MANIFEST_ATTR   Extra manifest attribute
+# SKIP_COMPILATION   Skip Java compilation iff true
+# DISABLE_SJAVAC   Passed to SetupJavaCompilation
+SetupBuildDemo = $(NamedParamsMacroTemplate)
+define SetupBuildDemoBody
+  ifeq ($$($1_SRC_DIR), )
+    $1_SRC_DIR := $(DEMO_SHARE_SRC)
+  endif
+
+  $1_SRC_BASE := $$($1_SRC_DIR)/$$($1_DEMO_SUBDIR)/$1
+
+  # In some demos the source is found in a subdir
+  ifneq ($$($1_SRC_SUB_DIR), )
+    $1_MAIN_SRC := $$($1_SRC_BASE)/$$($1_SRC_SUB_DIR)
+  else
+    # for allmost all
     $1_MAIN_SRC := $$($1_SRC_BASE)
   endif
 
-  ifneq ($8, )
-    $1_JARFILE := $8.jar
-  else
-    $1_JARFILE := $1.jar
+  # Default is to use demo name as jar file name.
+  ifeq ($$($1_JAR_NAME), )
+    $1_JAR_NAME := $1
   endif
 
-  ifeq ($(findstring $1,Laffy SwingSet3), )
-    $$(eval $$(call SetupJavaCompilation,BUILD_DEMO_$1, \
-        SETUP := GENERATE_USINGJDKBYTECODE, \
-        ADD_JAVAC_FLAGS := $3, \
-        SRC := $$($1_MAIN_SRC) $5, \
-        BIN := $(SUPPORT_OUTPUTDIR)/demo/classes/$2/$1, \
-        COPY := $(PATTERNS_TO_COPY) $(10), \
-        JAR := $(SUPPORT_OUTPUTDIR)/demo/image/$2/$1/$$($1_JARFILE), \
-        JARMAIN := $4, \
-        MANIFEST := $(SUPPORT_OUTPUTDIR)/demo/java-main-manifest.mf, \
-        EXTRA_MANIFEST_ATTR := $(11), \
-        SRCZIP := $(SUPPORT_OUTPUTDIR)/demo/image/$2/$1/src.zip, \
-        EXCLUDE_FILES := $9, \
-        DISABLE_SJAVAC := $(12)))
-
-    BUILD_DEMOS += $$(BUILD_DEMO_$1) \
-        $(SUPPORT_OUTPUTDIR)/demo/image/$2/$1/$$($1_JARFILE) \
-        $(SUPPORT_OUTPUTDIR)/demo/image/$2/$1/src.zip
+  # Default is to use demo name as jar main class.
+  ifeq ($$($1_MAIN_CLASS), )
+    $1_MAIN_CLASS := $1
+  else ifeq ($$($1_MAIN_CLASS), NONE)
+    $1_MAIN_CLASS :=
+    $1_EXTRA_MANIFEST_ATTR += Main-Class: \n
   endif
 
-  # Copy files.
-  $1_COPY_TARGETS := $$(patsubst $$($1_SRC_BASE)/%, \
-      $(SUPPORT_OUTPUTDIR)/demo/image/$2/$1/%, \
-      $$(wildcard $$(addprefix $$($1_SRC_BASE)/, $7)))
-  ifneq ($7, )
-    $(SUPPORT_OUTPUTDIR)/demo/image/$2/$1/%: $$($1_SRC_BASE)/%
-	$$(call install-file)
-	$(CHMOD) -f ug+w $$@
+  ifneq ($$($1_SKIP_COMPILATION), true)
+    $$(eval $$(call SetupJavaCompilation, BUILD_DEMO_$1, \
+        SETUP := GENERATE_USINGJDKBYTECODE, \
+        SRC := $$($1_MAIN_SRC) $$($1_EXTRA_SRC_DIR), \
+        BIN := $(SUPPORT_OUTPUTDIR)/demos/classes/$$($1_DEMO_SUBDIR)/$1, \
+        COPY := $(COPY_TO_JAR) $$($1_EXTRA_COPY_TO_JAR), \
+        JAR := $(SUPPORT_OUTPUTDIR)/demos/image/$$($1_DEMO_SUBDIR)/$1/$$($1_JAR_NAME).jar, \
+        JARMAIN := $$($1_MAIN_CLASS), \
+        MANIFEST := $(DEMO_MANIFEST), \
+        EXTRA_MANIFEST_ATTR := $$($1_EXTRA_MANIFEST_ATTR), \
+        SRCZIP := $(SUPPORT_OUTPUTDIR)/demos/image/$$($1_DEMO_SUBDIR)/$1/src.zip, \
+        EXCLUDE_FILES := $$($1_EXCLUDE_FILES), \
+        DISABLE_SJAVAC := $$($1_DISABLE_SJAVAC), \
+    ))
 
-    BUILD_DEMOS += $$($1_COPY_TARGETS)
+    $1 += $$(BUILD_DEMO_$1)
   endif
 
+  # Copy files. Sort is needed to remove duplicates.
+  $1_COPY_FILES := $$(sort $$(wildcard $$(addprefix $$($1_SRC_BASE)/, \
+      $(COPY_TO_IMAGE) $$($1_EXTRA_COPY_TO_IMAGE))))
+  $$(eval $$(call SetupCopyFiles, COPY_DEMO_$1, \
+      SRC :=  $$($1_SRC_BASE), \
+      DEST := $(SUPPORT_OUTPUTDIR)/demos/image/$$($1_DEMO_SUBDIR)/$1, \
+      FILES := $$($1_COPY_FILES), \
+  ))
+
+  $1 += $$(COPY_DEMO_$1)
+
+  TARGETS += $$($1)
 endef
 
-$(eval $(call SetupDemo,CodePointIM,jfc,,CodePointIM,,,*.html))
-$(SUPPORT_OUTPUTDIR)/demo/image/jfc/CodePointIM/_the.services: \
-    $(SUPPORT_OUTPUTDIR)/demo/image/jfc/CodePointIM/CodePointIM.jar \
-    $(DEMO_SHARE_SRC)/jfc/CodePointIM/java.awt.im.spi.InputMethodDescriptor
-	(cd $(SUPPORT_OUTPUTDIR)/demo/image/jfc/CodePointIM && \
-	$(MKDIR) -p _the.tmp/META-INF/services && \
-	$(CP) $(DEMO_SHARE_SRC)/jfc/CodePointIM/java.awt.im.spi.InputMethodDescriptor _the.tmp/META-INF/services && \
-	cd ./_the.tmp && \
-	$(JAR) uf $(SUPPORT_OUTPUTDIR)/demo/image/jfc/CodePointIM/CodePointIM.jar META-INF/services/java.awt.im.spi.InputMethodDescriptor && \
-	cd ./META-INF/services && \
-	$(JAR) uf $(SUPPORT_OUTPUTDIR)/demo/image/jfc/CodePointIM/CodePointIM.jar java.awt.im.spi.InputMethodDescriptor)
-	$(RM) -r $(SUPPORT_OUTPUTDIR)/demo/image/jfc/CodePointIM/_the.tmp
-	$(TOUCH) $@
+CODEPOINT_SERVICE := java.awt.im.spi.InputMethodDescriptor
+CODEPOINT_METAINF_SERVICE_FILE := \
+    $(SUPPORT_OUTPUTDIR)/demos/classes/jfc/CodePointIM/META-INF/services/$(CODEPOINT_SERVICE)
 
-BUILD_DEMOS += $(SUPPORT_OUTPUTDIR)/demo/image/jfc/CodePointIM/_the.services
+$(eval $(call SetupBuildDemo, CodePointIM, \
+    DEMO_SUBDIR := jfc, \
+    EXTRA_COPY_TO_JAR := $(CODEPOINT_SERVICE), \
+))
+
+# We also need to copy the CODEPOINT_SERVICE file to the META-INF/services
+# location, and make sure the jar depends on that file to get it included.
+$(CODEPOINT_METAINF_SERVICE_FILE): $(DEMO_SHARE_SRC)/jfc/CodePointIM/$(CODEPOINT_SERVICE)
+	$(call install-file)
+
+$(BUILD_DEMO_CodePointIM_JAR): $(CODEPOINT_METAINF_SERVICE_FILE)
 
 ifneq ($(OPENJDK_TARGET_OS), solaris)
-  $(eval $(call SetupDemo,MoleculeViewer,applets,,XYZChemModel,,,example*.html *.java))
-  $(eval $(call SetupDemo,WireFrame,applets,,ThreeD,,,example*.html *.java))
-  $(eval $(call SetupDemo,SwingApplet,jfc,,SwingApplet,,,README* *.html))
-endif
-$(eval $(call SetupDemo,FileChooserDemo,jfc,,FileChooserDemo,,,README*))
-$(eval $(call SetupDemo,Font2DTest,jfc,,Font2DTest,,,*.html *.txt))
-$(eval $(call SetupDemo,Metalworks,jfc,,Metalworks,,,README*))
-$(eval $(call SetupDemo,Notepad,jfc,,Notepad,,,README*))
-$(eval $(call SetupDemo,SampleTree,jfc,,SampleTree,,,README*))
-$(eval $(call SetupDemo,TableExample,jfc,,TableExample,,,README*))
-$(eval $(call SetupDemo,TransparentRuler,jfc,,transparentruler.Ruler,,,README*))
-$(eval $(call SetupDemo,jconsole-plugin,scripting,,,,,*.xml *.txt,,,,Main-Class: \n))
-$(eval $(call SetupDemo,FullThreadDump,management,,FullThreadDump,,,README*))
-$(eval $(call SetupDemo,JTop,management,,JTop,,,README*))
-$(eval $(call SetupDemo,MemoryMonitor,management,,MemoryMonitor,,,README*))
-$(eval $(call SetupDemo,VerboseGC,management,,VerboseGC,,,README*))
+  $(eval $(call SetupBuildDemo, MoleculeViewer, \
+      DEMO_SUBDIR := applets, \
+      MAIN_CLASS := XYZChemModel, \
+      EXTRA_COPY_TO_IMAGE := *.java, \
+  ))
 
-ifndef OPENJDK
-  $(eval $(call SetupDemo,Laffy,jfc,,,,closed/,*))
-  $(eval $(call SetupDemo,SwingSet3,jfc,,,,closed/,*))
+  $(eval $(call SetupBuildDemo, WireFrame, \
+      DEMO_SUBDIR := applets, \
+      MAIN_CLASS := ThreeD, \
+      EXTRA_COPY_TO_IMAGE := *.java, \
+  ))
 
-  $(eval $(call SetupDemo,Java2D,jfc,,java2d.Java2Demo,,closed/,*.html README*,Java2Demo))
-  $(eval $(call SetupDemo,Stylepad,jfc,,Stylepad, \
-  $(DEMO_SHARE_SRC)/jfc/Notepad,closed/,*.txt,,$(DEMO_SHARE_SRC)/jfc/Notepad/README.txt))
-  $(eval $(call SetupDemo,SwingSet2,jfc,,SwingSet2,,closed/,README* *.html,,,.java COPYRIGHT, \
-      SplashScreen-Image: resources/images/splash.png,true))
-
-  BUILD_DEMOS += $(patsubst $(DEMO_CLOSED_SHARE_SRC)/nbproject/%, \
-      $(SUPPORT_OUTPUTDIR)/demo/image/nbproject/%, \
-      $(call CacheFind, $(DEMO_CLOSED_SHARE_SRC)/nbproject))
-
-  $(SUPPORT_OUTPUTDIR)/demo/image/nbproject/%: $(DEMO_CLOSED_SHARE_SRC)/nbproject/%
-	$(call install-file)
-	$(CHMOD) -f ug+w $@
+  $(eval $(call SetupBuildDemo, SwingApplet, \
+      DEMO_SUBDIR := jfc, \
+  ))
 endif
 
-##################################################################################################
+$(eval $(call SetupBuildDemo, FileChooserDemo, \
+    DEMO_SUBDIR := jfc, \
+))
 
-# In the old makefiles, j2dbench was not compiled.
-#$(eval $(call SetupDemo,J2DBench, java2d, /src, , j2dbench/J2DBench))
+$(eval $(call SetupBuildDemo, Font2DTest, \
+    DEMO_SUBDIR := jfc, \
+))
 
-# JVMTI demos are a bit strange and share some files, but be careful the
-# shared files are just the *.c and *.h files, not the README or sample
-# makefiles. So we always exclude the README.txt and sample.makefile.txt
-# from the extra sources.
-define SetupJVMTIDemo
-  # Param 1 = Name of the demo
-  # Param 2 = add these directories to the includes, default is agent_util
-  # Param 3 = extra CFLAGS
-  # Param 4 = C or C++ (defaults to C)
-  # Param 5 = libs for unix
-  # Param 6 = libs for windows
-  # Param 7 = libs for solaris
-  # Param 8 = libs for linux
-  # Param 9 = extra directories with required sources
-  # Param 10 = DISABLED_WARNINGS_gcc
-  # Param 11 = DISABLED_WARNINGS_microsoft
-  # Param 12 = DISABLED_WARNINGS_clang
-  BUILD_DEMO_JVMTI_$1_EXTRA_SRC := \
-      $$(wildcard $(DEMO_OS_TYPE_SRC)/jvmti/$1) \
-      $$(wildcard $$(addprefix $(DEMO_SHARE_SRC)/jvmti/, $2)) \
-      $9
-  BUILD_DEMO_JVMTI_$1_EXTRA_SRC_EXCLUDE := \
-      $$(wildcard $$(patsubst %, $(DEMO_SHARE_SRC)/jvmti/%/README.txt, $2)) \
-      $$(wildcard $$(patsubst %, $(DEMO_SHARE_SRC)/jvmti/%/sample.makefile.txt, $2))
-  BUILD_DEMO_JVMTI_$1_EXTRA_INC := $$(addprefix -I, $$(BUILD_DEMO_JVMTI_$1_EXTRA_SRC))
-  ifeq (C++, $4)
-    BUILD_DEMO_JVMTI_$1_TOOLCHAIN := TOOLCHAIN_LINK_CXX
-    $1_EXTRA_CXX := $(LDFLAGS_CXX_JDK) $(LIBCXX)
+$(eval $(call SetupBuildDemo, Metalworks, \
+    DEMO_SUBDIR := jfc, \
+))
+
+$(eval $(call SetupBuildDemo, Notepad, \
+    DEMO_SUBDIR := jfc, \
+))
+
+$(eval $(call SetupBuildDemo, SampleTree, \
+    DEMO_SUBDIR := jfc, \
+))
+
+$(eval $(call SetupBuildDemo, TableExample, \
+    DEMO_SUBDIR := jfc, \
+))
+
+$(eval $(call SetupBuildDemo, TransparentRuler, \
+    DEMO_SUBDIR := jfc, \
+    MAIN_CLASS := transparentruler.Ruler, \
+))
+
+$(eval $(call SetupBuildDemo, jconsole-plugin, \
+    DEMO_SUBDIR := scripting, \
+    SRC_SUB_DIR := src, \
+    MAIN_CLASS := NONE, \
+))
+
+$(eval $(call SetupBuildDemo, FullThreadDump, \
+    DEMO_SUBDIR := management, \
+))
+
+$(eval $(call SetupBuildDemo, JTop, \
+    DEMO_SUBDIR := management, \
+))
+
+$(eval $(call SetupBuildDemo, MemoryMonitor, \
+    DEMO_SUBDIR := management, \
+))
+
+$(eval $(call SetupBuildDemo, VerboseGC, \
+    DEMO_SUBDIR := management, \
+))
+
+################################################################################
+# Build JVMTI demos.
+
+# Setup make rules for building a JVMTI demo.
+#
+# Parameter 1 is the name of the rule. This name is used as variable prefix,
+# and the targets generated are listed in a variable by that name.
+#
+# Remaining parameters are named arguments. These include:
+# EXTRA_SRC_SUBDIR   Also include these subdirectories
+# TOOLCHAIN   Optionally specify toolchain to use
+SetupBuildJvmtiDemo = $(NamedParamsMacroTemplate)
+define SetupBuildJvmtiDemoBody
+  $1_SRC := \
+      $(DEMO_SHARE_SRC)/jvmti/$1 \
+      $$(wildcard $$(addprefix $(DEMO_SHARE_SRC)/jvmti/, \
+          agent_util $$($1_EXTRA_SRC_SUBDIR)))
+
+  ### Build the native lib
+  $1_CFLAGS_INCLUDE := $$(addprefix -I, $$($1_SRC))
+
+  $1_CXXFLAGS := $$($1_CFLAGS_INCLUDE) $(CXXFLAGS_JDKLIB) $(CXXFLAGS_DEBUG_SYMBOLS)
+
+  ifeq ($$($1_TOOLCHAIN), TOOLCHAIN_LINK_CXX)
+    # For C++, we also need some special treatment.
+    $1_LDFLAGS := $(LDFLAGS_CXX_JDK)
+    $1_LIBS := $(LIBCXX)
+
+    ifeq ($(OPENJDK_TARGET_CPU_ARCH), sparc)
+      $1_CXXFLAGS := $$(filter-out -xregs=no%appl, $$($1_CXXFLAGS))
+    endif
   endif
 
-  $1_CXXFLAGS := $(CXXFLAGS_JDKLIB) -I$(DEMO_SHARE_SRC)/jvmti/$1 \
-      $$(BUILD_DEMO_JVMTI_$1_EXTRA_INC) $3 \
-      $(CXXFLAGS_DEBUG_SYMBOLS)
-  ifeq ($1-$(OPENJDK_TARGET_CPU_ARCH), waiters-sparc)
-    $1_FILTER := -xregs=no%appl
-    $1_CXXFLAGS := $$(filter-out $$($1_FILTER), $$($1_CXXFLAGS))
-  endif
-
-  # Workaround for CFLAGS_JDKLIB containing ',' on solaris. If this is added as 'CFLAGS' to the
-  # eval call below, the comma gets expanded too early.
-  BUILD_DEMO_JVMTI_$1_CFLAGS := $(CFLAGS_JDKLIB) $(CFLAGS_DEBUG_SYMBOLS) \
-      -I$(DEMO_SHARE_SRC)/jvmti/$1 $$(BUILD_DEMO_JVMTI_$1_EXTRA_INC) $3
-
   # Remove the -incremental:no setting to get .ilk-files like in the old build.
-  $$(eval $$(call SetupNativeCompilation,BUILD_DEMO_JVMTI_$1, \
-      SRC := $(DEMO_SHARE_SRC)/jvmti/$1 $$(BUILD_DEMO_JVMTI_$1_EXTRA_SRC), \
-      TOOLCHAIN := $$(BUILD_DEMO_JVMTI_$1_TOOLCHAIN), \
+  $$(eval $$(call SetupNativeCompilation, BUILD_DEMO_JVMTI_NATIVE_$1, \
+      SRC := $$($1_SRC), \
+      TOOLCHAIN := $$($1_TOOLCHAIN), \
       OPTIMIZATION := LOW, \
+      CFLAGS := $$($1_CFLAGS_INCLUDE) $$(CFLAGS_JDKLIB) $$(CFLAGS_DEBUG_SYMBOLS), \
       CXXFLAGS := $$($1_CXXFLAGS), \
-      DISABLED_WARNINGS_gcc := $(10), \
-      DISABLED_WARNINGS_clang := $(12), \
-      DISABLED_WARNINGS_microsoft := $(11), \
-      LDFLAGS := $(filter-out -incremental:no -opt:ref, $(LDFLAGS_JDKLIB)), \
+      LDFLAGS := $(filter-out -incremental:no -opt:ref, $(LDFLAGS_JDKLIB)) \
+          $$($1_LDFLAGS), \
       LDFLAGS_macosx := $(call SET_EXECUTABLE_ORIGIN), \
-      LDFLAGS_SUFFIX := $$($1_EXTRA_CXX), \
-      LDFLAGS_SUFFIX_unix := $5, \
-      LDFLAGS_SUFFIX_windows := $6, \
-      LDFLAGS_SUFFIX_solaris := $7 -lc, \
-      LDFLAGS_SUFFIX_linux := $8, \
+      LIBS := $$($1_LIBS), \
+      LIBS_solaris := -lc, \
       VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
       RC_FLAGS := $$(RC_FLAGS) \
           -D "JDK_FNAME=$1.dll" \
           -D "JDK_INTERNAL_NAME=$1" \
           -D "JDK_FTYPE=0x2L", \
-      OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/demo/native/jvmti/$1, \
-      OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/demo/image/jvmti/$1/lib, \
-      LIBRARY := $1))
+      OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/demos/native/jvmti/$1, \
+      OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/demos/image/jvmti/$1/lib, \
+      LIBRARY := $1, \
+  ))
 
-  $$(eval $$(call SetupZipArchive,BUILD_DEMO_JVMTI_SRC_$1, \
-      SRC := $(DEMO_SHARE_SRC)/jvmti/$1 $$(BUILD_DEMO_JVMTI_$1_EXTRA_SRC), \
-      EXCLUDE_FILES := $$(BUILD_DEMO_JVMTI_$1_EXTRA_SRC_EXCLUDE), \
-      ZIP := $(SUPPORT_OUTPUTDIR)/demo/image/jvmti/$1/src.zip))
+  $1 += $$(BUILD_DEMO_JVMTI_NATIVE_$1)
 
-  $(SUPPORT_OUTPUTDIR)/demo/image/jvmti/$1/README.txt: $(DEMO_SHARE_SRC)/jvmti/$1/README.txt
+  ### Build the jar, if we have java sources
+  ifneq ($$(wildcard $(DEMO_SHARE_SRC)/jvmti/$1/*.java), )
+    $$(eval $$(call SetupJavaCompilation, BUILD_DEMO_JVMTI_JAVA_$1, \
+        SETUP := GENERATE_USINGJDKBYTECODE, \
+        SRC := $(DEMO_SHARE_SRC)/jvmti/$1, \
+        BIN := $(SUPPORT_OUTPUTDIR)/demos/classes/jvmti/$1, \
+        COPY := $(COPY_TO_JAR), \
+        JAR := $(SUPPORT_OUTPUTDIR)/demos/image/jvmti/$1/$1.jar, \
+        EXTRA_MANIFEST_ATTR := Main-Class: \n, \
+        MANIFEST := $(DEMO_MANIFEST), \
+    ))
+
+    $1 += $$(BUILD_DEMO_JVMTI_JAVA_$1_JAR)
+  endif
+
+  ### Build the source zip
+  $1_EXCLUDE_FILES := \
+      $$(wildcard $$(patsubst %, $(DEMO_SHARE_SRC)/jvmti/%/README.txt, \
+          agent_util $$($1_EXTRA_SRC_SUBDIR))) \
+      $$(wildcard $$(patsubst %, $(DEMO_SHARE_SRC)/jvmti/%/sample.makefile.txt, \
+          agent_util $$($1_EXTRA_SRC_SUBDIR)))
+
+  $$(eval $$(call SetupZipArchive, BUILD_DEMO_JVMTI_SRC_$1, \
+      SRC := $$($1_SRC), \
+      EXCLUDE_FILES := $$($1_EXCLUDE_FILES), \
+      ZIP := $(SUPPORT_OUTPUTDIR)/demos/image/jvmti/$1/src.zip, \
+  ))
+
+  $1 += $$(BUILD_DEMO_JVMTI_SRC_$1)
+
+  # Copy files to image
+  $(SUPPORT_OUTPUTDIR)/demos/image/jvmti/$1/README.txt: $(DEMO_SHARE_SRC)/jvmti/$1/README.txt
 	$$(call install-file)
 	$(CHMOD) -f ug+w $$@
 
-  ifneq (, $$(wildcard $(DEMO_SHARE_SRC)/jvmti/$1/*.java))
-    $$(eval $$(call SetupJavaCompilation,BUILD_DEMO_JVMTI_$1_JAVA, \
-        SETUP := GENERATE_USINGJDKBYTECODE, \
-        SRC := $(DEMO_SHARE_SRC)/jvmti/$1, \
-        BIN := $(SUPPORT_OUTPUTDIR)/demo/classes/jvmti/$1, \
-        COPY := $(PATTERNS_TO_COPY), \
-        JAR := $(SUPPORT_OUTPUTDIR)/demo/image/jvmti/$1/$1.jar, \
-        EXTRA_MANIFEST_ATTR := Main-Class: \n, \
-        MANIFEST := $(SUPPORT_OUTPUTDIR)/demo/java-main-manifest.mf))
+  $1 += $(SUPPORT_OUTPUTDIR)/demos/image/jvmti/$1/README.txt
 
-    BUILD_DEMOS += $(SUPPORT_OUTPUTDIR)/demo/image/jvmti/$1/$1.jar
+  ifeq ($(OPENJDK_TARGET_OS), windows)
+    # These lib and exp files normally end up in OBJECT_DIR but for demos they
+    # are supposed to be included in the distro. Since they are created as
+    # a side-effect of the library compilation, make does not know about them.
+    $1_SUPPORT_OUTPUTDIR := $(SUPPORT_OUTPUTDIR)/demos/native/jvmti/$1
+    $1_IMAGE_OUTPUTDIR := $(SUPPORT_OUTPUTDIR)/demos/image/jvmti/$1/lib
+
+    $$($1_SUPPORT_OUTPUTDIR)/$1.lib: $$(BUILD_DEMO_JVMTI_NATIVE_$1)
+
+    $$($1_SUPPORT_OUTPUTDIR)/$1.exp: $$(BUILD_DEMO_JVMTI_NATIVE_$1)
+
+    $$($1_IMAGE_OUTPUTDIR)/$1.lib: $$($1_SUPPORT_OUTPUTDIR)/$1.lib
+	$$(call install-file)
+
+    $$($1_IMAGE_OUTPUTDIR)/$1.exp: $$($1_SUPPORT_OUTPUTDIR)/$1.exp
+	$$(call install-file)
+
+    $1 += $$($1_IMAGE_OUTPUTDIR)/$1.lib $$($1_IMAGE_OUTPUTDIR)/$1.exp
   endif
 
-  BUILD_DEMOS += $$(BUILD_DEMO_JVMTI_$1) \
-      $(SUPPORT_OUTPUTDIR)/demo/image/jvmti/$1/src.zip \
-      $(SUPPORT_OUTPUTDIR)/demo/image/jvmti/$1/README.txt
-
-  ifeq ($(OPENJDK_TARGET_OS), windows)
-    # These files normally end up in OBJECT_DIR but for demos they
-    # are supposed to be included in the distro.
-    $(SUPPORT_OUTPUTDIR)/demo/image/jvmti/$1/lib/$1.lib: $$(BUILD_DEMO_JVMTI_$1)
-	$(CP) $(SUPPORT_OUTPUTDIR)/demo/native/jvmti/$1/$1.lib $$@
-
-    $(SUPPORT_OUTPUTDIR)/demo/image/jvmti/$1/lib/$1.exp: $$(BUILD_DEMO_JVMTI_$1)
-	$(CP) $(SUPPORT_OUTPUTDIR)/demo/native/jvmti/$1/$1.exp $$@
-
-    BUILD_DEMOS += $(SUPPORT_OUTPUTDIR)/demo/image/jvmti/$1/lib/$1.lib \
-        $(SUPPORT_OUTPUTDIR)/demo/image/jvmti/$1/lib/$1.exp
-  endif
+  TARGETS += $$($1)
 endef
 
-$(eval $(call SetupJVMTIDemo,compiledMethodLoad, agent_util))
-$(eval $(call SetupJVMTIDemo,gctest, agent_util))
-$(eval $(call SetupJVMTIDemo,heapTracker, agent_util java_crw_demo))
-$(eval $(call SetupJVMTIDemo,heapViewer, agent_util))
-$(eval $(call SetupJVMTIDemo,minst, agent_util java_crw_demo))
-$(eval $(call SetupJVMTIDemo,mtrace, agent_util java_crw_demo))
-$(eval $(call SetupJVMTIDemo,waiters, agent_util, , C++))
-$(eval $(call SetupJVMTIDemo,versionCheck, agent_util))
+$(eval $(call SetupBuildJvmtiDemo, compiledMethodLoad))
+$(eval $(call SetupBuildJvmtiDemo, gctest))
+$(eval $(call SetupBuildJvmtiDemo, heapViewer))
+$(eval $(call SetupBuildJvmtiDemo, versionCheck))
 
-##################################################################################################
+$(eval $(call SetupBuildJvmtiDemo, heapTracker, \
+    EXTRA_SRC_SUBDIR := java_crw_demo, \
+))
 
-$(SUPPORT_OUTPUTDIR)/demo/image/management/index.html: $(DEMO_SHARE_SRC)/management/index.html
+$(eval $(call SetupBuildJvmtiDemo, minst, \
+    EXTRA_SRC_SUBDIR := java_crw_demo, \
+))
+
+$(eval $(call SetupBuildJvmtiDemo, mtrace, \
+    EXTRA_SRC_SUBDIR := java_crw_demo, \
+))
+
+$(eval $(call SetupBuildJvmtiDemo, waiters, \
+    TOOLCHAIN := TOOLCHAIN_LINK_CXX, \
+))
+
+################################################################################
+# Build the Poller demo (on Solaris only).
+
+ifeq ($(OPENJDK_TARGET_OS), solaris)
+  DEMO_SOLARIS_SRC := $(JDK_TOPDIR)/src/demo/solaris
+
+  $(eval $(call SetupJavaCompilation, BUILD_DEMO_JAVA_Poller, \
+      SETUP := GENERATE_USINGJDKBYTECODE, \
+      SRC := $(DEMO_SOLARIS_SRC)/jni/Poller, \
+      BIN := $(SUPPORT_OUTPUTDIR)/demos/classes/jni/Poller, \
+      HEADERS := $(SUPPORT_OUTPUTDIR)/demos/classes/jni/Poller, \
+      JAR := $(SUPPORT_OUTPUTDIR)/demos/image/jni/Poller/Poller.jar, \
+      MANIFEST := $(SUPPORT_OUTPUTDIR)/demos/java-main-manifest.mf, \
+      SRCZIP := $(SUPPORT_OUTPUTDIR)/demos/image/jni/Poller/src.zip, \
+      COPY := README.txt Poller.c, \
+      JARMAIN := Client, \
+  ))
+
+  TARGETS += $(BUILD_DEMO_JAVA_Poller)
+
+  $(eval $(call SetupNativeCompilation, BUILD_DEMO_NATIVE_Poller, \
+      SRC := $(DEMO_SOLARIS_SRC)/jni/Poller, \
+      OPTIMIZATION := LOW, \
+      CFLAGS := $(CFLAGS_JDKLIB) \
+          -I$(SUPPORT_OUTPUTDIR)/demos/classes/jni/Poller, \
+      LDFLAGS := $(LDFLAGS_JDKLIB), \
+      LIBS_solaris := -lc, \
+      OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/demos/native/jni/Poller, \
+      OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/demos/native, \
+      LIBRARY := Poller, \
+  ))
+
+  TARGETS += $(BUILD_DEMO_NATIVE_Poller)
+
+  # We can only compile native code after java has been compiled (since we
+  # depend on generated .h files)
+  $(SUPPORT_OUTPUTDIR)/demos/native/jni/Poller/Poller.o: \
+      $(BUILD_DEMO_JAVA_POLLER_COMPILE_TARGETS)
+
+  # Copy to image
+  $(SUPPORT_OUTPUTDIR)/demos/image/jni/Poller/README.txt: \
+      $(DEMO_SOLARIS_SRC)/jni/Poller/README.txt
 	$(call install-file)
 	$(CHMOD) -f ug+w $@
 
-$(SUPPORT_OUTPUTDIR)/demo/image/jvmti/index.html: $(DEMO_SHARE_SRC)/jvmti/index.html
+  TARGETS += $(SUPPORT_OUTPUTDIR)/demos/image/jni/Poller/README.txt
+
+  $(SUPPORT_OUTPUTDIR)/demos/image/jni/Poller/lib/libPoller.so: \
+      $(SUPPORT_OUTPUTDIR)/demos/native/libPoller.so
+	$(call install-file)
+
+  TARGETS += $(SUPPORT_OUTPUTDIR)/demos/image/jni/Poller/lib/libPoller.so
+endif
+
+################################################################################
+# Copy html and README files.
+
+$(SUPPORT_OUTPUTDIR)/demos/image/management/index.html: $(DEMO_SHARE_SRC)/management/index.html
 	$(call install-file)
 	$(CHMOD) -f ug+w $@
 
-BUILD_DEMOS += $(SUPPORT_OUTPUTDIR)/demo/image/management/index.html \
-    $(SUPPORT_OUTPUTDIR)/demo/image/jvmti/index.html
+$(SUPPORT_OUTPUTDIR)/demos/image/jvmti/index.html: $(DEMO_SHARE_SRC)/jvmti/index.html
+	$(call install-file)
+	$(CHMOD) -f ug+w $@
 
-##################################################################################################
+$(SUPPORT_OUTPUTDIR)/demos/image/README: $(DEMO_SHARE_SRC)/README
+	$(call install-file)
 
-# The netbeans project files are copied into the demo directory.
+TARGETS += $(SUPPORT_OUTPUTDIR)/demos/image/management/index.html \
+    $(SUPPORT_OUTPUTDIR)/demos/image/jvmti/index.html \
+    $(SUPPORT_OUTPUTDIR)/demos/image/README
+
+################################################################################
+# Copy netbeans project files.
+
+$(SUPPORT_OUTPUTDIR)/demos/image/nbproject/%: $(DEMO_SHARE_SRC)/nbproject/%
+	$(call install-file)
+	$(CHMOD) -f ug+w $@
+
 ifeq ($(OPENJDK_TARGET_OS), solaris)
-  BUILD_DEMOS += $(patsubst $(DEMO_SHARE_SRC)/nbproject/%, \
-    $(SUPPORT_OUTPUTDIR)/demo/image/nbproject/%, \
+  TARGETS += $(patsubst $(DEMO_SHARE_SRC)/nbproject/%, \
+    $(SUPPORT_OUTPUTDIR)/demos/image/nbproject/%, \
     $(filter-out $(DEMO_SHARE_SRC)/nbproject/jfc/SwingApplet%, \
     $(call CacheFind, $(DEMO_SHARE_SRC)/nbproject)))
 else
-  BUILD_DEMOS += $(patsubst $(DEMO_SHARE_SRC)/nbproject/%, \
-    $(SUPPORT_OUTPUTDIR)/demo/image/nbproject/%, \
+  TARGETS += $(patsubst $(DEMO_SHARE_SRC)/nbproject/%, \
+    $(SUPPORT_OUTPUTDIR)/demos/image/nbproject/%, \
     $(call CacheFind, $(DEMO_SHARE_SRC)/nbproject))
 endif
 
-$(SUPPORT_OUTPUTDIR)/demo/image/nbproject/%: $(DEMO_SHARE_SRC)/nbproject/%
-	$(call install-file)
-	$(CHMOD) -f ug+w $@
+################################################################################
 
-##################################################################################################
+# Hook to include the corresponding custom file, if present.
+$(eval $(call IncludeCustomExtension, jdk, CompileDemos.gmk))
 
-$(SUPPORT_OUTPUTDIR)/demo/image/README: $(DEMO_SHARE_SRC)/README
-	$(call install-file)
-
-BUILD_DEMOS += $(SUPPORT_OUTPUTDIR)/demo/image/README
-
-##################################################################################################
-
-ifeq ($(OPENJDK_TARGET_OS), solaris)
-
-  $(SUPPORT_OUTPUTDIR)/demo/classes/jni/Poller/%: $(DEMO_SOLARIS_SRC)/jni/Poller/%
-	$(call install-file)
-	$(CHMOD) -f ug+w $@
-
-  $(SUPPORT_OUTPUTDIR)/demo/image/jni/Poller/README.txt: $(DEMO_SOLARIS_SRC)/jni/Poller/README.txt
-	$(call install-file)
-	$(CHMOD) -f ug+w $@
-
-  $(SUPPORT_OUTPUTDIR)/demo/image/jni/Poller/Poller.jar: \
-      $(SUPPORT_OUTPUTDIR)/demo/classes/jni/Poller/README.txt \
-      $(SUPPORT_OUTPUTDIR)/demo/classes/jni/Poller/Poller.c
-
-  $(eval $(call SetupJavaCompilation,BUILD_DEMO_POLLER_JAR, \
-      SETUP := GENERATE_USINGJDKBYTECODE, \
-      SRC := $(DEMO_SOLARIS_SRC)/jni/Poller, \
-      BIN := $(SUPPORT_OUTPUTDIR)/demo/classes/jni/Poller, \
-      HEADERS := $(SUPPORT_OUTPUTDIR)/demo/classes/jni/Poller, \
-      JAR := $(SUPPORT_OUTPUTDIR)/demo/image/jni/Poller/Poller.jar, \
-      MANIFEST := $(SUPPORT_OUTPUTDIR)/demo/java-main-manifest.mf, \
-      SRCZIP := $(SUPPORT_OUTPUTDIR)/demo/image/jni/Poller/src.zip, \
-      COPY := README.txt Poller.c, \
-      JARMAIN := Client))
-
-
-
-  BUILD_DEMOS += $(SUPPORT_OUTPUTDIR)/demo/image/jni/Poller/Poller.jar \
-      $(SUPPORT_OUTPUTDIR)/demo/image/jni/Poller/src.zip \
-      $(SUPPORT_OUTPUTDIR)/demo/image/jni/Poller/README.txt
-
-  $(eval $(call SetupNativeCompilation,BUILD_LIBPOLLER, \
-      SRC := $(DEMO_SOLARIS_SRC)/jni/Poller, \
-      OPTIMIZATION := LOW, \
-      CFLAGS := $(CFLAGS_JDKLIB) \
-          -I$(SUPPORT_OUTPUTDIR)/demo/classes/jni/Poller, \
-      LDFLAGS := $(LDFLAGS_JDKLIB), \
-      LDFLAGS_SUFFIX_solaris := -lc, \
-      OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/demo/native/jni/Poller, \
-      OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/demo/native, \
-      LIBRARY := Poller))
-
-  #
-  # We can only compile native code after jar has been build (since we depend on generated .h files)
-  #
-  $(SUPPORT_OUTPUTDIR)/demo/native/jni/Poller/Poller.o: $(SUPPORT_OUTPUTDIR)/demo/image/jni/Poller/Poller.jar
-
-  $(SUPPORT_OUTPUTDIR)/demo/image/jni/Poller/lib/$(LIBRARY_PREFIX)Poller$(SHARED_LIBRARY_SUFFIX): \
-      $(SUPPORT_OUTPUTDIR)/demo/native/$(LIBRARY_PREFIX)Poller$(SHARED_LIBRARY_SUFFIX)
-	$(call install-file)
-
-  BUILD_DEMOS += $(SUPPORT_OUTPUTDIR)/demo/image/jni/Poller/lib/$(LIBRARY_PREFIX)Poller$(SHARED_LIBRARY_SUFFIX)
-
-endif
-
-##################################################################################################
-
-ifndef OPENJDK
-  DB_ZIP_DIR := $(wildcard $(JDK_TOPDIR)/src/closed/db)
-  DB_DEMO_ZIPFILE := $(wildcard $(DB_ZIP_DIR)/*.zip)
-
-  $(SUPPORT_OUTPUTDIR)/demo/image/_the.db.unzipped: $(DB_DEMO_ZIPFILE)
-	$(MKDIR) -p $(@D)
-	$(RM) -r $(SUPPORT_OUTPUTDIR)/demo/image/db $(SUPPORT_OUTPUTDIR)/demo/image/demo
-	$(CD) $(SUPPORT_OUTPUTDIR)/demo/image && $(UNZIP) -q -o $<
-	$(MV) $(SUPPORT_OUTPUTDIR)/demo/image/db-derby-*-bin/demo $(SUPPORT_OUTPUTDIR)/demo/image/db
-	$(CD) $(SUPPORT_OUTPUTDIR)/demo/image && $(RM) -r db-derby-*-bin
-	$(TOUCH) $@
-
-  # Copy this after the unzip above to avoid race with directory creation and mv command.
-  $(SUPPORT_OUTPUTDIR)/demo/image/db/README-JDK-DEMOS.html: \
-      $(DB_ZIP_DIR)/README-JDK-DEMOS.html \
-      | $(SUPPORT_OUTPUTDIR)/demo/image/_the.db.unzipped
-	$(MKDIR) -p $(@D)
-	$(CAT) $< | $(SED) "s/XXXX/$(shell cat $(DB_ZIP_DIR)/COPYRIGHTYEAR)/" > $@
-
-  BUILD_DEMOS += $(SUPPORT_OUTPUTDIR)/demo/image/_the.db.unzipped $(SUPPORT_OUTPUTDIR)/demo/image/db/README-JDK-DEMOS.html
-endif
-
-##################################################################################################
-
-all: $(BUILD_DEMOS)
+all: $(TARGETS)
 
 .PHONY: all
--- a/make/gendata/GendataPolicyJars.gmk	Tue Nov 03 14:00:01 2015 +0300
+++ b/make/gendata/GendataPolicyJars.gmk	Tue Nov 03 12:04:12 2015 -0800
@@ -27,7 +27,7 @@
 
 include $(SPEC)
 include MakeBase.gmk
-include JavaCompilation.gmk
+include JarArchive.gmk
 
 
 ################################################################################
@@ -57,7 +57,7 @@
 endif
 
 #
-# TODO fix so that SetupArchive does not write files into SRCS
+# TODO fix so that SetupJarArchive does not write files into SRCS
 # then we don't need this extra copying
 #
 # NOTE: We currently do not place restrictions on our limited export
@@ -76,13 +76,14 @@
 US_EXPORT_POLICY_JAR_DEPS := \
     $(US_EXPORT_POLICY_JAR_TMP)/default_US_export.policy
 
-$(eval $(call SetupArchive,BUILD_US_EXPORT_POLICY_JAR, \
+$(eval $(call SetupJarArchive, BUILD_US_EXPORT_POLICY_JAR, \
     DEPENDENCIES := $(US_EXPORT_POLICY_JAR_DEPS), \
     SRCS := $(US_EXPORT_POLICY_JAR_TMP), \
     SUFFIXES := .policy, \
     JAR := $(US_EXPORT_POLICY_JAR_UNLIMITED), \
     EXTRA_MANIFEST_ATTR := Crypto-Strength: unlimited, \
-    SKIP_METAINF := true))
+    SKIP_METAINF := true, \
+))
 
 $(US_EXPORT_POLICY_JAR_LIMITED): \
     $(US_EXPORT_POLICY_JAR_UNLIMITED)
@@ -122,7 +123,7 @@
     $(SUPPORT_OUTPUTDIR)/jce/policy/unlimited/local_policy.jar
 
 #
-# TODO fix so that SetupArchive does not write files into SRCS
+# TODO fix so that SetupJarArchive does not write files into SRCS
 # then we don't need this extra copying
 #
 LOCAL_POLICY_JAR_LIMITED_TMP := \
@@ -138,22 +139,24 @@
     $(JDK_TOPDIR)/make/data/cryptopolicy/unlimited/%
 	$(install-file)
 
-$(eval $(call SetupArchive,BUILD_LOCAL_POLICY_JAR_LIMITED, \
+$(eval $(call SetupJarArchive, BUILD_LOCAL_POLICY_JAR_LIMITED, \
     DEPENDENCIES := $(LOCAL_POLICY_JAR_LIMITED_TMP)/exempt_local.policy \
         $(LOCAL_POLICY_JAR_LIMITED_TMP)/default_local.policy, \
     SRCS := $(LOCAL_POLICY_JAR_LIMITED_TMP), \
     SUFFIXES := .policy, \
     JAR := $(LOCAL_POLICY_JAR_LIMITED), \
     EXTRA_MANIFEST_ATTR := Crypto-Strength: limited, \
-    SKIP_METAINF := true))
+    SKIP_METAINF := true, \
+))
 
-$(eval $(call SetupArchive,BUILD_LOCAL_POLICY_JAR_UNLIMITED, \
+$(eval $(call SetupJarArchive, BUILD_LOCAL_POLICY_JAR_UNLIMITED, \
     DEPENDENCIES := $(LOCAL_POLICY_JAR_UNLIMITED_TMP)/default_local.policy, \
     SRCS := $(LOCAL_POLICY_JAR_UNLIMITED_TMP), \
     SUFFIXES := .policy, \
     JAR := $(LOCAL_POLICY_JAR_UNLIMITED), \
     EXTRA_MANIFEST_ATTR := Crypto-Strength: unlimited, \
-    SKIP_METAINF := true))
+    SKIP_METAINF := true, \
+))
 
 TARGETS += $(LOCAL_POLICY_JAR_LIMITED) $(LOCAL_POLICY_JAR_UNLIMITED)
 
--- a/make/launcher/Launcher-java.base.gmk	Tue Nov 03 14:00:01 2015 +0300
+++ b/make/launcher/Launcher-java.base.gmk	Tue Nov 03 12:04:12 2015 -0800
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -125,7 +125,7 @@
 JSPAWNHELPER_CFLAGS := -I$(JDK_TOPDIR)/src/java.base/unix/native/libjava
 BUILD_JSPAWNHELPER_DST_DIR := $(SUPPORT_OUTPUTDIR)/modules_libs/java.base$(OPENJDK_TARGET_CPU_LIBDIR)
 LINK_JSPAWNHELPER_OBJECTS := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjava/childproc.o
-LINK_JSPAWNHELPER_FLAGS :=
+BUILD_JSPAWNHELPER_LDFLAGS :=
 
 ifneq ($(findstring $(OPENJDK_TARGET_OS), macosx solaris aix), )
   BUILD_JSPAWNHELPER := 1
@@ -136,7 +136,7 @@
 endif
 
 ifeq ($(OPENJDK_TARGET_CPU_BITS), 64)
-  LINK_JSPAWNHELPER_FLAGS += $(COMPILER_TARGET_BITS_FLAG)64
+  BUILD_JSPAWNHELPER_LDFLAGS += $(COMPILER_TARGET_BITS_FLAG)64
 endif
 
 ifeq ($(BUILD_JSPAWNHELPER), 1)
@@ -145,8 +145,8 @@
       INCLUDE_FILES := jspawnhelper.c, \
       OPTIMIZATION := LOW, \
       CFLAGS := $(CFLAGS_JDKEXE) $(JSPAWNHELPER_CFLAGS), \
-      LDFLAGS := $(LDFLAGS_JDKEXE) $(LINK_JSPAWNHELPER_FLAGS), \
-      LDFLAGS_SUFFIX := $(LINK_JSPAWNHELPER_OBJECTS), \
+      LDFLAGS := $(LDFLAGS_JDKEXE) $(BUILD_JSPAWNHELPER_LDFLAGS), \
+      LIBS := $(LINK_JSPAWNHELPER_OBJECTS), \
       OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/jspawnhelper, \
       OUTPUT_DIR := $(BUILD_JSPAWNHELPER_DST_DIR), \
       PROGRAM := jspawnhelper))
--- a/make/launcher/Launcher-java.rmi.gmk	Tue Nov 03 14:00:01 2015 +0300
+++ b/make/launcher/Launcher-java.rmi.gmk	Tue Nov 03 12:04:12 2015 -0800
@@ -30,34 +30,3 @@
 
 $(eval $(call SetupLauncher,rmiregistry, \
     -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.rmi.registry.RegistryImpl"$(COMMA) }'))
-
-##########################################################################################
-
-#
-# The java-rmi.cgi script in bin/ only gets delivered in certain situations
-#
-JAVA_RMI_CGI := $(SUPPORT_OUTPUTDIR)/modules_cmds/$(MODULE)/java-rmi.cgi
-ifeq ($(OPENJDK_TARGET_OS), linux)
-  TARGETS += $(JAVA_RMI_CGI)
-endif
-ifeq ($(OPENJDK_TARGET_OS), solaris)
-  TARGETS += $(JAVA_RMI_CGI)
-endif
-
-# TODO:
-# On windows java-rmi.cgi shouldn't be bundled since Java 1.2, but has been built all
-# this time anyway. Since jdk6, it has been built from the wrong source and resulted
-# in a (almost) copy of the standard java launcher named "java-rmi.exe" ending up in
-# the final images bin dir. This weird behavior is mimicked here in the converted
-# makefiles for now. Should probably just be deleted.
-# http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6512052
-ifeq ($(OPENJDK_TARGET_OS), windows)
-  $(eval $(call SetupLauncher,java-rmi, , \
-      $(call SET_SHARED_LIBRARY_MAPFILE,$(JDK_TOPDIR)/make/java/main/java/mapfile-$(OPENJDK_TARGET_CPU)),,,,,,,,,RMI))
-else
-  $(JAVA_RMI_CGI): $(JDK_TOPDIR)/src/java.rmi/unix/bin/java-rmi.cgi.sh
-	$(call install-file)
-	$(CHMOD) a+x $@
-endif
-
-##########################################################################################
--- a/make/launcher/Launcher-jdk.accessibility.gmk	Tue Nov 03 14:00:01 2015 +0300
+++ b/make/launcher/Launcher-jdk.accessibility.gmk	Tue Nov 03 12:04:12 2015 -0800
@@ -40,8 +40,8 @@
           -analyze- -Od -Gd -D_WINDOWS \
           -D_UNICODE -DUNICODE -RTC1 -EHsc, \
       DISABLED_WARNINGS_microsoft := 4267 4996, \
-      LDFLAGS := $(LDFLAGS_JDKEXE) \
-          Advapi32.lib Version.lib User32.lib, \
+      LDFLAGS := $(LDFLAGS_JDKEXE), \
+      LIBS := advapi32.lib version.lib user32.lib, \
       OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/jdk.accessibility/jabswitch, \
       OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/modules_cmds/jdk.accessibility, \
       PROGRAM := jabswitch, \
--- a/make/launcher/Launcher-jdk.jconsole.gmk	Tue Nov 03 14:00:01 2015 +0300
+++ b/make/launcher/Launcher-jdk.jconsole.gmk	Tue Nov 03 12:04:12 2015 -0800
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -26,9 +26,8 @@
 include LauncherCommon.gmk
 
 BUILD_LAUNCHER_jconsole_CFLAGS_windows := -DJAVAW
-BUILD_LAUNCHER_jconsole_LDFLAGS_windows := user32.lib
+BUILD_LAUNCHER_jconsole_LIBS_windows := user32.lib
 
 $(eval $(call SetupLauncher,jconsole, \
     -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "-J-Djconsole.showOutputViewer"$(COMMA) "sun.tools.jconsole.JConsole"$(COMMA) }' \
     -DAPP_CLASSPATH='{ "/lib/jconsole.jar"$(COMMA) "/lib/tools.jar"$(COMMA) "/classes" }'))
-
--- a/make/launcher/Launcher-jdk.pack200.gmk	Tue Nov 03 14:00:01 2015 +0300
+++ b/make/launcher/Launcher-jdk.pack200.gmk	Tue Nov 03 12:04:12 2015 -0800
@@ -90,9 +90,8 @@
         $(LDFLAGS_JDKEXE) $(LDFLAGS_CXX_JDK) \
         $(call SET_SHARED_LIBRARY_NAME,$(LIBRARY_PREFIX)unpack$(SHARED_LIBRARY_SUFFIX)) \
         $(call SET_SHARED_LIBRARY_ORIGIN), \
-    LDFLAGS_linux := , \
-    LDFLAGS_solaris := $(UNPACKEXE_LDFLAGS_solaris) -lc, \
-    LDFLAGS_SUFFIX := $(UNPACKEXE_LIBS) $(LIBCXX), \
+    LIBS := $(UNPACKEXE_LIBS) $(LIBCXX), \
+    LIBS_solaris :=  -lc, \
     OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/unpackexe$(OUTPUT_SUBDIR), \
     OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/modules_cmds/$(MODULE), \
     PROGRAM := unpack200, \
--- a/make/launcher/LauncherCommon.gmk	Tue Nov 03 14:00:01 2015 +0300
+++ b/make/launcher/LauncherCommon.gmk	Tue Nov 03 12:04:12 2015 -0800
@@ -75,8 +75,8 @@
   # Parameter 1 is the name of the launcher (java, javac, jar...)
   # Parameter 2 is extra CFLAGS
   # Parameter 3 is extra LDFLAGS
-  # Parameter 4 is extra LDFLAGS_SUFFIX_unix
-  # Parameter 5 is extra LDFLAGS_SUFFIX_windows
+  # Parameter 4 is extra LIBS_unix
+  # Parameter 5 is extra LIBS_windows
   # Parameter 6 is optional Windows JLI library (full path)
   # Parameter 7 is optional Windows resource (RC) flags
   # Parameter 8 is optional Windows version resource file (.rc)
@@ -96,7 +96,7 @@
   endif
 
   $1_LDFLAGS := $3
-  $1_LDFLAGS_SUFFIX :=
+  $1_LIBS :=
   ifeq ($(OPENJDK_TARGET_OS), macosx)
     $1_PLIST_FILE := Info-cmdline.plist
     ifneq ($(11), )
@@ -107,17 +107,18 @@
     endif
 
     $1_LDFLAGS += -Wl,-all_load $(SUPPORT_OUTPUTDIR)/native/java.base/libjli_static.a \
-        -framework Cocoa -framework Security -framework ApplicationServices \
         -sectcreate __TEXT __info_plist $(MACOSX_PLIST_DIR)/$$($1_PLIST_FILE)
-        $1_LDFLAGS_SUFFIX += -pthread
+    $1_LIBS += -framework Cocoa -framework Security \
+        -framework ApplicationServices
   endif
 
   ifeq ($(OPENJDK_TARGET_OS), aix)
-    $1_LDFLAGS_SUFFIX += -L$(SUPPORT_OUTPUTDIR)/native/java.base -ljli_static
+    $1_LDFLAGS += -L$(SUPPORT_OUTPUTDIR)/native/java.base
+    $1_LIBS += -ljli_static
   endif
 
   ifeq ($(USE_EXTERNAL_LIBZ), true)
-    $1_LDFLAGS_SUFFIX += -lz
+    $1_LIBS += -lz
   endif
 
   $1_OUTPUT_DIR_ARG := $9
@@ -130,7 +131,7 @@
     $1_OPTIMIZATION_ARG := HIGH
     $1_LDFLAGS_solaris := -R$(OPENWIN_HOME)/lib$(OPENJDK_TARGET_CPU_ISADIR)
   else
-  $1_OPTIMIZATION_ARG := LOW
+    $1_OPTIMIZATION_ARG := LOW
   endif
 
   $1_CFLAGS := $(CFLAGS_JDKEXE)
@@ -172,18 +173,20 @@
       LDFLAGS := $(LDFLAGS_JDKEXE) \
           $(ORIGIN_ARG) \
           $$($1_LDFLAGS), \
+      LDFLAGS_linux := \
+          $(call SET_SHARED_LIBRARY_NAME,$(LIBRARY_PREFIX)$(SHARED_LIBRARY_SUFFIX)) \
+          -L$(SUPPORT_OUTPUTDIR)/modules_libs/java.base$(OPENJDK_TARGET_CPU_LIBDIR)/jli, \
       LDFLAGS_macosx := $(call SET_SHARED_LIBRARY_NAME,$1), \
-      LDFLAGS_linux := -lpthread \
-          $(call SET_SHARED_LIBRARY_NAME,$(LIBRARY_PREFIX)$(SHARED_LIBRARY_SUFFIX)), \
       LDFLAGS_solaris := $$($1_LDFLAGS_solaris) \
-          $(call SET_SHARED_LIBRARY_NAME,$(LIBRARY_PREFIX)$(SHARED_LIBRARY_SUFFIX)), \
+          $(call SET_SHARED_LIBRARY_NAME,$(LIBRARY_PREFIX)$(SHARED_LIBRARY_SUFFIX)) \
+          -L$(SUPPORT_OUTPUTDIR)/modules_libs/java.base$(OPENJDK_TARGET_CPU_LIBDIR)/jli, \
       MAPFILE := $$($1_MAPFILE), \
-      LDFLAGS_SUFFIX := $(LDFLAGS_JDKEXE_SUFFIX) $$($1_LDFLAGS_SUFFIX), \
-      LDFLAGS_SUFFIX_unix := $4, \
-      LDFLAGS_SUFFIX_windows := $$($1_WINDOWS_JLI_LIB) \
+      LIBS := $(JDKEXE_LIBS) $$($1_LIBS), \
+      LIBS_unix := $4, \
+      LIBS_linux := -lpthread -ljli $(LIBDL) -lc, \
+      LIBS_solaris := -ljli -lthread $(LIBDL) -lc, \
+      LIBS_windows := $$($1_WINDOWS_JLI_LIB) \
           $(SUPPORT_OUTPUTDIR)/native/java.base/libjava/java.lib advapi32.lib $5, \
-      LDFLAGS_SUFFIX_linux := -L$(SUPPORT_OUTPUTDIR)/modules_libs/java.base$(OPENJDK_TARGET_CPU_LIBDIR)/jli -ljli $(LIBDL) -lc, \
-      LDFLAGS_SUFFIX_solaris := -L$(SUPPORT_OUTPUTDIR)/modules_libs/java.base$(OPENJDK_TARGET_CPU_LIBDIR)/jli -ljli -lthread $(LIBDL) -lc, \
       OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/$1_objs$(OUTPUT_SUBDIR), \
       OUTPUT_DIR := $$($1_OUTPUT_DIR_ARG)$(OUTPUT_SUBDIR), \
       PROGRAM := $1, \
--- a/make/lib/Awt2dLibraries.gmk	Tue Nov 03 14:00:01 2015 +0300
+++ b/make/lib/Awt2dLibraries.gmk	Tue Nov 03 12:04:12 2015 -0800
@@ -60,9 +60,9 @@
     MAPFILE := $(BUILD_LIBMLIB_IMAGE_MAPFILE), \
     LDFLAGS := $(LDFLAGS_JDKLIB) \
         $(call SET_SHARED_LIBRARY_ORIGIN), \
-    LDFLAGS_SUFFIX := $(BUILD_LIBMLIB_LDLIBS) \
-        $(LDFLAGS_JDKLIB_SUFFIX), \
-    LDFLAGS_SUFFIX_solaris := -lc, \
+    LIBS := $(BUILD_LIBMLIB_LDLIBS) \
+        $(JDKLIB_LIBS), \
+    LIBS_solaris := -lc, \
     VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
     RC_FLAGS := $(RC_FLAGS) \
         -D "JDK_FNAME=mlib_image.dll" \
@@ -131,9 +131,8 @@
       DISABLED_WARNINGS_solstudio := E_STATEMENT_NOT_REACHED, \
       MAPFILE := $(BUILD_LIBMLIB_IMAGE_MAPFILE), \
       LDFLAGS := $(LDFLAGS_JDKLIB) \
-          $(BUILD_LIBMLIB_LDLIBS) -ljava -ljvm \
           $(call SET_SHARED_LIBRARY_ORIGIN), \
-      LDFLAGS_SUFFIX_solaris := -lc, \
+      LIBS := -ljava -ljvm -lc $(BUILD_LIBMLIB_LDLIBS), \
       OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libmlib_image_v, \
       DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
 
@@ -253,27 +252,27 @@
     ASFLAGS := $(LIBAWT_ASFLAGS), \
     MAPFILE := $(LIBAWT_MAPFILE), \
     LDFLAGS := $(LDFLAGS_JDKLIB) $(call SET_SHARED_LIBRARY_ORIGIN), \
-    LDFLAGS_SUFFIX_linux := -ljvm $(LIBM) $(LIBDL) -ljava, \
-    LDFLAGS_SUFFIX_solaris := -ljvm $(LIBM) $(LIBDL) -ljava -lc, \
-    LDFLAGS_SUFFIX_aix :=-ljvm $(LIBM) $(LIBDL) -ljava -lm,\
-    LDFLAGS_SUFFIX_macosx := -L$(INSTALL_LIBRARIES_HERE) \
-        -lmlib_image -ljvm $(LIBM) \
+    LDFLAGS_macosx := -L$(INSTALL_LIBRARIES_HERE), \
+    LDFLAGS_windows := -delayload:user32.dll -delayload:gdi32.dll \
+        -delayload:shell32.dll -delayload:winmm.dll \
+        -delayload:winspool.drv -delayload:imm32.dll \
+        -delayload:ole32.dll -delayload:comdlg32.dll \
+        -delayload:comctl32.dll -delayload:shlwapi.dll, \
+    LIBS_unix := -ljvm -ljava $(LIBM), \
+    LIBS_linux :=  $(LIBDL), \
+    LIBS_solaris := $(LIBDL) -lc, \
+    LIBS_aix := $(LIBDL),\
+    LIBS_macosx := -lmlib_image \
         -framework Cocoa \
         -framework OpenGL \
         -framework JavaNativeFoundation \
         -framework JavaRuntimeSupport \
         -framework ApplicationServices \
-        -framework AudioToolbox \
-        -ljava, \
-    LDFLAGS_SUFFIX_windows := kernel32.lib user32.lib gdi32.lib winspool.lib \
+        -framework AudioToolbox, \
+    LIBS_windows := kernel32.lib user32.lib gdi32.lib winspool.lib \
         imm32.lib ole32.lib uuid.lib shell32.lib \
         comdlg32.lib winmm.lib comctl32.lib shlwapi.lib \
-        delayimp.lib jvm.lib $(WIN_JAVA_LIB) advapi32.lib \
-        -DELAYLOAD:user32.dll -DELAYLOAD:gdi32.dll \
-        -DELAYLOAD:shell32.dll -DELAYLOAD:winmm.dll \
-        -DELAYLOAD:winspool.drv -DELAYLOAD:imm32.dll \
-        -DELAYLOAD:ole32.dll -DELAYLOAD:comdlg32.dll \
-        -DELAYLOAD:comctl32.dll -DELAYLOAD:shlwapi.dll, \
+        delayimp.lib jvm.lib $(WIN_JAVA_LIB) advapi32.lib, \
     VERSIONINFO_RESOURCE := $(LIBAWT_VERSIONINFO_RESOURCE), \
     RC_FLAGS := $(RC_FLAGS) $(LIBAWT_RC_FLAGS) \
         -D "JDK_FNAME=awt.dll" \
@@ -338,11 +337,10 @@
       endif
     endif
 
-    LIBAWT_XAWT_LDFLAGS_SUFFIX := $(LIBM) -lawt -lXext -lX11 -lXrender $(LIBDL) -lXtst -lXi -ljava -ljvm -lc
+    LIBAWT_XAWT_LIBS := $(LIBM) -lawt -lXext -lX11 -lXrender $(LIBDL) -lXtst -lXi -ljava -ljvm -lc
 
     ifeq ($(OPENJDK_TARGET_OS), linux)
-      # To match old build, add this to LDFLAGS instead of suffix.
-      LIBAWT_XAWT_LDFLAGS += -lpthread
+      LIBAWT_XAWT_LIBS += -lpthread
     endif
 
     $(eval $(call SetupNativeCompilation,BUILD_LIBAWT_XAWT, \
@@ -361,11 +359,10 @@
         WARNINGS_AS_ERRORS_gcc := false, \
         MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libawt_xawt/mapfile-vers, \
         LDFLAGS := $(LDFLAGS_JDKLIB) \
-            $(X_LIBS) $(LIBAWT_XAWT_LDFLAGS) \
             $(call SET_SHARED_LIBRARY_ORIGIN) \
             $(call SET_SHARED_LIBRARY_ORIGIN,/..) \
             -L$(INSTALL_LIBRARIES_HERE), \
-        LDFLAGS_SUFFIX := $(LIBAWT_XAWT_LDFLAGS_SUFFIX), \
+        LIBS :=  $(X_LIBS) $(LIBAWT_XAWT_LIBS), \
         VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
         RC_FLAGS := $(RC_FLAGS) \
             -D "JDK_FNAME=xawt.dll" \
@@ -424,11 +421,12 @@
         $(call SET_SHARED_LIBRARY_ORIGIN), \
     LDFLAGS_unix := -L$(INSTALL_LIBRARIES_HERE), \
     LDFLAGS_solaris := /usr/lib$(OPENJDK_TARGET_CPU_ISADIR)/libm.so.2, \
-    LDFLAGS_windows := $(WIN_AWT_LIB) $(WIN_JAVA_LIB), \
-    LDFLAGS_SUFFIX_solaris := -lawt -ljava -ljvm -lc $(LCMS_LIBS), \
-    LDFLAGS_SUFFIX_macosx := $(LIBM) -lawt -ljava -ljvm $(LCMS_LIBS), \
-    LDFLAGS_SUFFIX_linux := -lm -lawt -ljava -ljvm $(LCMS_LIBS), \
-    LDFLAGS_SUFFIX_aix := -lm -lawt -ljava -ljvm $(LCMS_LIBS),\
+    LIBS_unix := -lawt -ljvm -ljava $(LCMS_LIBS), \
+    LIBS_linux := $(LIBM), \
+    LIBS_macosx := $(LIBM), \
+    LIBS_solaris := -lc, \
+    LIBS_aix := $(LIBM),\
+    LIBS_windows := $(WIN_AWT_LIB) $(WIN_JAVA_LIB), \
     VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
     RC_FLAGS := $(RC_FLAGS) \
         -D "JDK_FNAME=lcms.dll" \
@@ -502,8 +500,8 @@
     MAPFILE := $(BUILD_LIBJAVAJPEG_MAPFILE), \
     LDFLAGS := $(LDFLAGS_JDKLIB) \
         $(call SET_SHARED_LIBRARY_ORIGIN), \
-    LDFLAGS_windows := $(WIN_JAVA_LIB) jvm.lib, \
-    LDFLAGS_SUFFIX := $(LIBJPEG_LIBS) $(LDFLAGS_JDKLIB_SUFFIX), \
+    LIBS := $(LIBJPEG_LIBS) $(JDKLIB_LIBS), \
+    LIBS_windows := $(WIN_JAVA_LIB) jvm.lib, \
     VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
     RC_FLAGS := $(RC_FLAGS) \
         -D "JDK_FNAME=javajpeg.dll" \
@@ -575,11 +573,10 @@
         LDFLAGS_unix := -L$(INSTALL_LIBRARIES_HERE), \
         LDFLAGS_linux := $(call SET_SHARED_LIBRARY_ORIGIN,/..), \
         LDFLAGS_solaris := $(call SET_SHARED_LIBRARY_ORIGIN,/..), \
-        LDFLAGS_macosx := $(call SET_SHARED_LIBRARY_ORIGIN)., \
         REORDER := $(LIBAWT_HEADLESS_REORDER), \
-        LDFLAGS_SUFFIX_linux := -ljvm -lawt -lm $(LIBDL) -ljava, \
-        LDFLAGS_SUFFIX_aix := -ljvm -lawt -ljava,\
-        LDFLAGS_SUFFIX_solaris := $(LIBDL) -ljvm -lawt -lm -ljava $(LIBCXX) -lc, \
+        LIBS_unix := -lawt -ljvm -ljava, \
+        LIBS_linux := -lm $(LIBDL), \
+        LIBS_solaris := -lm $(LIBDL) $(LIBCXX) -lc, \
         OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libawt_headless, \
         DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
 
@@ -662,13 +659,13 @@
     LDFLAGS := $(subst -Xlinker -z -Xlinker defs,,$(LDFLAGS_JDKLIB)) $(LDFLAGS_CXX_JDK) \
         $(call SET_SHARED_LIBRARY_ORIGIN), \
     LDFLAGS_unix := -L$(INSTALL_LIBRARIES_HERE), \
-    LDFLAGS_SUFFIX := $(BUILD_LIBFONTMANAGER_FONTLIB), \
-    LDFLAGS_SUFFIX_linux := -lawt $(LIBM) $(LIBCXX) -ljava -ljvm -lc, \
-    LDFLAGS_SUFFIX_solaris := -lawt -lawt_headless -lc $(LIBM) $(LIBCXX) -ljava -ljvm, \
-    LDFLAGS_SUFFIX_aix := -lawt -lawt_headless $(LIBM) $(LIBCXX) -ljava -ljvm,\
-    LDFLAGS_SUFFIX_macosx := -lawt $(LIBM) $(LIBCXX) -undefined dynamic_lookup \
-        -ljava -ljvm, \
-    LDFLAGS_SUFFIX_windows := $(WIN_JAVA_LIB) advapi32.lib user32.lib gdi32.lib \
+    LDFLAGS_macosx := -undefined dynamic_lookup, \
+    LIBS := $(BUILD_LIBFONTMANAGER_FONTLIB), \
+    LIBS_unix := -lawt -ljava -ljvm $(LIBM) $(LIBCXX), \
+    LIBS_linux := -lc, \
+    LIBS_solaris := -lawt_headless -lc, \
+    LIBS_aix := -lawt_headless,\
+    LIBS_windows := $(WIN_JAVA_LIB) advapi32.lib user32.lib gdi32.lib \
         $(WIN_AWT_LIB), \
     VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
     RC_FLAGS := $(RC_FLAGS) \
@@ -713,9 +710,8 @@
       CFLAGS := $(CXXFLAGS_JDKLIB) \
           -EHsc -DUNICODE -D_UNICODE \
           $(LIBJAWT_CFLAGS), \
-      LDFLAGS := $(LDFLAGS_JDKLIB) $(KERNEL32_LIB) $(LDFLAGS_CXX_JDK) \
-          advapi32.lib $(WIN_AWT_LIB), \
-      LDFLAGS_SUFFIX := $(LDFLAGS_JDKLIB_SUFFIX), \
+      LDFLAGS := $(LDFLAGS_JDKLIB) $(LDFLAGS_CXX_JDK), \
+      LIBS := $(JDKLIB_LIBS) $(KERNEL32_LIB) advapi32.lib $(WIN_AWT_LIB), \
       VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
       RC_FLAGS := $(RC_FLAGS) \
           -D "JDK_FNAME=jawt.dll" \
@@ -776,12 +772,10 @@
       LDFLAGS := $(LDFLAGS_JDKLIB) \
           $(call SET_SHARED_LIBRARY_ORIGIN), \
       LDFLAGS_unix := -L$(INSTALL_LIBRARIES_HERE), \
-      LDFLAGS_solaris := $(X_LIBS), \
-      LDFLAGS_SUFFIX_linux := $(JAWT_LIBS) $(LDFLAGS_JDKLIB_SUFFIX), \
-      LDFLAGS_SUFFIX_aix := $(JAWT_LIBS) $(LDFLAGS_JDKLIB_SUFFIX),\
-      LDFLAGS_SUFFIX_solaris := $(JAWT_LIBS) $(LDFLAGS_JDKLIB_SUFFIX) -lXrender, \
-      LDFLAGS_SUFFIX_macosx := -Xlinker -rpath -Xlinker @loader_path $(JAWT_LIBS) \
-          -framework Cocoa $(LDFLAGS_JDKLIB_SUFFIX), \
+      LDFLAGS_macosx := -Xlinker -rpath -Xlinker @loader_path, \
+      LIBS_unix := $(JAWT_LIBS) $(JDKLIB_LIBS), \
+      LIBS_solaris := $(X_LIBS) -lXrender, \
+      LIBS_macosx := -framework Cocoa, \
       OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjawt, \
       DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
 
@@ -809,14 +803,14 @@
       #
 
   ifeq ($(USE_EXTERNAL_LIBGIF), true)
-    GIFLIB_LDFLAGS := -lgif
+    GIFLIB_LIBS := -lgif
     LIBSPLASHSCREEN_EXCLUDES := giflib
   else
     LIBSPLASHSCREEN_CFLAGS += -I$(JDK_TOPDIR)/src/java.desktop/share/native/libsplashscreen/giflib
   endif
 
   ifeq ($(USE_EXTERNAL_LIBJPEG), true)
-    LIBJPEG_LDFLAGS := -ljpeg
+    LIBJPEG_LIBS := -ljpeg
   else
     LIBSPLASHSCREEN_DIRS += $(JDK_TOPDIR)/src/java.desktop/share/native/libjavajpeg
     LIBJPEG_CFLAGS := -I$(JDK_TOPDIR)/src/java.desktop/share/native/libjavajpeg
@@ -857,7 +851,7 @@
     LIBSPLASHSCREEN_CFLAGS += -DWITH_X11 $(X_CFLAGS)
   endif
 
-  LIBSPLASHSCREEN_LDFLAGS_SUFFIX :=
+  LIBSPLASHSCREEN_LIBS :=
 
   ifneq ($(USE_EXTERNAL_LIBZ), true)
     LIBSPLASHSCREEN_DIRS += $(JDK_TOPDIR)/src/java.base/share/native/libzip/zlib-1.2.8
@@ -865,17 +859,18 @@
   endif
 
   ifeq ($(OPENJDK_TARGET_OS), macosx)
-    LIBSPLASHSCREEN_LDFLAGS_SUFFIX += \
-        -L$(INSTALL_LIBRARIES_HERE) \
+    LIBSPLASHSCREEN_LDFLAGS := -L$(INSTALL_LIBRARIES_HERE)
+    LIBSPLASHSCREEN_LIBS += \
         $(LIBM) -lpthread -liconv -losxapp \
         -framework ApplicationServices \
         -framework Foundation \
         -framework Cocoa \
         -framework JavaNativeFoundation
   else ifeq ($(OPENJDK_TARGET_OS), windows)
-    LIBSPLASHSCREEN_LDFLAGS_SUFFIX += kernel32.lib user32.lib gdi32.lib delayimp.lib -DELAYLOAD:user32.dll
+    LIBSPLASHSCREEN_LDFLAGS := -delayload:user32.dll
+    LIBSPLASHSCREEN_LIBS += kernel32.lib user32.lib gdi32.lib delayimp.lib
   else
-    LIBSPLASHSCREEN_LDFLAGS_SUFFIX += $(X_LIBS) -lX11 -lXext $(LIBM) -lpthread
+    LIBSPLASHSCREEN_LIBS += $(X_LIBS) -lX11 -lXext $(LIBM) -lpthread
   endif
 
   $(eval $(call SetupNativeCompilation,BUILD_LIBSPLASHSCREEN, \
@@ -893,11 +888,11 @@
           E_STATEMENT_NOT_REACHED, \
       DISABLED_WARNINGS_microsoft := 4018 4244 4267, \
       MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libsplashscreen/mapfile-vers, \
-      LDFLAGS := $(LDFLAGS_JDKLIB) \
+      LDFLAGS := $(LIBSPLASHSCREEN_LDFLAGS) $(LDFLAGS_JDKLIB) \
           $(call SET_SHARED_LIBRARY_ORIGIN), \
-      LDFLAGS_SUFFIX := $(LIBSPLASHSCREEN_LDFLAGS_SUFFIX) $(LIBZ) \
-                        $(GIFLIB_LDFLAGS) $(LIBJPEG_LDFLAGS) $(PNG_LIBS), \
-      LDFLAGS_SUFFIX_solaris := -lc, \
+      LIBS := $(LIBSPLASHSCREEN_LIBS) $(LIBZ) \
+                        $(GIFLIB_LIBS) $(LIBJPEG_LIBS) $(PNG_LIBS), \
+      LIBS_solaris := -lc, \
       VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
       RC_FLAGS := $(RC_FLAGS) \
           -D "JDK_FNAME=splashscreen.dll" \
@@ -967,7 +962,7 @@
       LDFLAGS := $(LDFLAGS_JDKLIB) \
           $(call SET_SHARED_LIBRARY_ORIGIN) \
           -L$(INSTALL_LIBRARIES_HERE), \
-      LDFLAGS_SUFFIX_macosx := -lawt -lmlib_image -losxapp -ljvm $(LIBM) \
+      LIBS := -lawt -lmlib_image -losxapp -ljvm $(LIBM) \
           -framework Accelerate \
           -framework ApplicationServices \
           -framework AudioToolbox \
@@ -1014,7 +1009,7 @@
           $(call SET_SHARED_LIBRARY_ORIGIN) \
           -Xlinker -rpath -Xlinker @loader_path \
           -L$(INSTALL_LIBRARIES_HERE), \
-      LDFLAGS_SUFFIX_macosx := -lawt -losxapp -lawt_lwawt \
+      LIBS := -lawt -losxapp -lawt_lwawt \
           -framework Cocoa \
           -framework Carbon \
           -framework ApplicationServices \
--- a/make/lib/CoreLibraries.gmk	Tue Nov 03 14:00:01 2015 +0300
+++ b/make/lib/CoreLibraries.gmk	Tue Nov 03 12:04:12 2015 -0800
@@ -97,8 +97,8 @@
     MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libverify/mapfile-vers, \
     LDFLAGS := $(LDFLAGS_JDKLIB) \
         $(call SET_SHARED_LIBRARY_ORIGIN), \
-    LDFLAGS_SUFFIX_unix := -ljvm -lc, \
-    LDFLAGS_SUFFIX_windows := jvm.lib, \
+    LIBS_unix := -ljvm -lc, \
+    LIBS_windows := jvm.lib, \
     VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
     RC_FLAGS := $(RC_FLAGS) \
         -D "JDK_FNAME=verify.dll" \
@@ -150,19 +150,20 @@
     MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libjava/mapfile-vers, \
     LDFLAGS := $(LDFLAGS_JDKLIB) \
         $(call SET_SHARED_LIBRARY_ORIGIN), \
-    LDFLAGS_SUFFIX_unix := -ljvm -lverify, \
-    LDFLAGS_SUFFIX_solaris := -lsocket -lnsl -lscf $(LIBDL) $(BUILD_LIBFDLIBM) -lc, \
-    LDFLAGS_SUFFIX_linux := $(LIBDL) $(BUILD_LIBFDLIBM), \
-    LDFLAGS_SUFFIX_aix := $(LIBDL) $(BUILD_LIBFDLIBM) -lm,\
-    LDFLAGS_SUFFIX_macosx := -L$(SUPPORT_OUTPUTDIR)/native/$(MODULE)/ -lfdlibm \
+    LDFLAGS_macosx := -L$(SUPPORT_OUTPUTDIR)/native/$(MODULE)/, \
+    LDFLAGS_windows := -export:winFileHandleOpen -export:handleLseek \
+        -export:getLastErrorString \
+        -export:getErrorString -delayload:shell32.dll, \
+    LIBS_unix := -ljvm -lverify, \
+    LIBS_linux := $(LIBDL) $(BUILD_LIBFDLIBM), \
+    LIBS_solaris := -lsocket -lnsl -lscf $(LIBDL) $(BUILD_LIBFDLIBM) -lc, \
+    LIBS_aix := $(LIBDL) $(BUILD_LIBFDLIBM) -lm,\
+    LIBS_macosx := -lfdlibm \
         -framework CoreFoundation \
         -framework Foundation \
         -framework Security -framework SystemConfiguration, \
-    LDFLAGS_SUFFIX_windows := -export:winFileHandleOpen -export:handleLseek \
-        -export:getLastErrorString \
-        -export:getErrorString \
-        jvm.lib $(BUILD_LIBFDLIBM) $(WIN_VERIFY_LIB) \
-        shell32.lib delayimp.lib -DELAYLOAD:shell32.dll \
+    LIBS_windows := jvm.lib $(BUILD_LIBFDLIBM) $(WIN_VERIFY_LIB) \
+        shell32.lib delayimp.lib \
         advapi32.lib version.lib, \
     VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
     RC_FLAGS := $(RC_FLAGS) \
@@ -215,16 +216,13 @@
     MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libzip/mapfile-vers, \
     REORDER := $(BUILD_LIBZIP_REORDER), \
     LDFLAGS := $(LDFLAGS_JDKLIB) \
-        $(call SET_SHARED_LIBRARY_ORIGIN) \
-        $(EXPORT_ZIP_FUNCS), \
+        $(call SET_SHARED_LIBRARY_ORIGIN), \
     LDFLAGS_windows := -export:ZIP_Open -export:ZIP_Close -export:ZIP_FindEntry \
         -export:ZIP_ReadEntry -export:ZIP_GetNextEntry \
-        -export:ZIP_InflateFully -export:ZIP_CRC32 \
-        jvm.lib $(WIN_JAVA_LIB), \
-    LDFLAGS_SUFFIX_linux := -ljvm -ljava $(LIBZ), \
-    LDFLAGS_SUFFIX_solaris := -ljvm -ljava $(LIBZ) -lc, \
-    LDFLAGS_SUFFIX_aix := -ljvm -ljava $(LIBZ),\
-    LDFLAGS_SUFFIX_macosx := $(LIBZ) -ljava -ljvm, \
+        -export:ZIP_InflateFully -export:ZIP_CRC32, \
+    LIBS_unix := -ljvm -ljava $(LIBZ), \
+    LIBS_solaris := -lc, \
+    LIBS_windows := jvm.lib $(WIN_JAVA_LIB), \
     VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
     RC_FLAGS := $(RC_FLAGS) \
         -D "JDK_FNAME=zip.dll" \
@@ -261,18 +259,15 @@
     CFLAGS_unix := -UDEBUG, \
     MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libjimage/mapfile-vers, \
     LDFLAGS := $(LDFLAGS_JDKLIB) \
-        $(call SET_SHARED_LIBRARY_ORIGIN) \
-        $(EXPORT_JIMAGE_FUNCS), \
+        $(call SET_SHARED_LIBRARY_ORIGIN), \
     LDFLAGS_windows := -export:JIMAGE_Open -export:JIMAGE_Close \
         -export:JIMAGE_PackageToModule \
         -export:JIMAGE_FindResource -export:JIMAGE_GetResource \
         -export:JIMAGE_ResourceIterator, \
-    LDFLAGS_SUFFIX_unix := -ljvm -ldl $(LIBCXX), \
-    LDFLAGS_SUFFIX_linux := , \
-    LDFLAGS_SUFFIX_solaris := -lc, \
-    LDFLAGS_SUFFIX_aix := ,\
-    LDFLAGS_SUFFIX_macosx := -lc++, \
-    LDFLAGS_SUFFIX_windows := jvm.lib, \
+    LIBS_unix := -ljvm -ldl $(LIBCXX), \
+    LIBS_solaris := -lc, \
+    LIBS_macosx := -lc++, \
+    LIBS_windows := jvm.lib, \
     VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
     RC_FLAGS := $(RC_FLAGS) \
         -D "JDK_FNAME=jimage.dll" \
@@ -364,12 +359,7 @@
         $(call SET_SHARED_LIBRARY_ORIGIN), \
     LDFLAGS_linux := $(call SET_SHARED_LIBRARY_ORIGIN,/..), \
     LDFLAGS_solaris := $(call SET_SHARED_LIBRARY_ORIGIN,/..), \
-    LDFLAGS_macosx := -framework Cocoa -framework Security -framework ApplicationServices, \
-    LDFLAGS_SUFFIX_solaris := $(LIBZ) $(LIBDL) -lc, \
-    LDFLAGS_SUFFIX_linux := $(LIBZ) $(LIBDL) -lc -lpthread, \
-    LDFLAGS_SUFFIX_aix := $(LIBZ) $(LIBDL),\
-    LDFLAGS_SUFFIX_macosx := $(LIBZ), \
-    LDFLAGS_SUFFIX_windows := \
+    LDFLAGS_windows := \
         -export:JLI_Launch \
         -export:JLI_ManifestIterate \
         -export:JLI_SetTraceLauncher \
@@ -387,10 +377,13 @@
         -export:JLI_MemFree \
         -export:JLI_InitArgProcessing \
         -export:JLI_PreprocessArg \
-        -export:JLI_GetAppArgIndex \
-        advapi32.lib \
-        comctl32.lib \
-        user32.lib, \
+        -export:JLI_GetAppArgIndex, \
+    LIBS_unix := $(LIBZ), \
+    LIBS_linux := $(LIBDL) -lc -lpthread, \
+    LIBS_solaris := $(LIBDL) -lc, \
+    LIBS_aix := $(LIBDL),\
+    LIBS_macosx := -framework Cocoa -framework Security -framework ApplicationServices, \
+    LIBS_windows := advapi32.lib comctl32.lib user32.lib, \
     VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
     RC_FLAGS := $(RC_FLAGS) \
         -D "JDK_FNAME=jli.dll" \
--- a/make/lib/Lib-java.instrument.gmk	Tue Nov 03 14:00:01 2015 +0300
+++ b/make/lib/Lib-java.instrument.gmk	Tue Nov 03 12:04:12 2015 -0800
@@ -40,20 +40,13 @@
     -I$(JDK_TOPDIR)/src/java.base/share/native/libjava \
     #
 
-LIBINSTRUMENT_LDFLAGS :=
-LIBINSTRUMENT_LDFLAGS_SUFFIX :=
-
 ifeq ($(OPENJDK_TARGET_OS), windows)
-  LIBINSTRUMENT_LDFLAGS += $(SUPPORT_OUTPUTDIR)/native/java.base/jli_static.lib $(WIN_JAVA_LIB) \
-      -export:Agent_OnAttach advapi32.lib
   # Statically link the C runtime so that there are not dependencies on modules
   # not on the search patch when invoked from the Windows system directory
   # (or elsewhere).
   LIBINSTRUMENT_CFLAGS := $(filter-out -MD, $(LIBINSTRUMENT_CFLAGS))
   # equivalent of strcasecmp is stricmp on Windows
   LIBINSTRUMENT_CFLAGS += -Dstrcasecmp=stricmp
-else
-  LIBINSTRUMENT_LDFLAGS_SUFFIX := -ljava
 endif
 
 $(eval $(call SetupNativeCompilation,BUILD_LIBINSTRUMENT, \
@@ -68,15 +61,21 @@
     LDFLAGS := $(LDFLAGS_JDKLIB) \
         $(call SET_SHARED_LIBRARY_ORIGIN) \
         $(LIBINSTRUMENT_LDFLAGS), \
-    LDFLAGS_linux := $(call SET_SHARED_LIBRARY_ORIGIN,/jli), \
-    LDFLAGS_solaris := $(call SET_SHARED_LIBRARY_ORIGIN,/jli), \
-    LDFLAGS_macosx := -Xlinker -all_load $(SUPPORT_OUTPUTDIR)/native/java.base/libjli_static.a \
-        -framework Cocoa -framework Security -framework ApplicationServices, \
-    LDFLAGS_SUFFIX := $(LIBINSTRUMENT_LDFLAGS_SUFFIX), \
-    LDFLAGS_SUFFIX_macosx := -liconv $(LIBZ), \
-    LDFLAGS_SUFFIX_solaris := $(LIBZ) -L$(call FindLibDirForModule, java.base)/jli -ljli $(LIBDL) -lc, \
-    LDFLAGS_SUFFIX_linux := $(LIBZ) -L$(call FindLibDirForModule, java.base)/jli -ljli $(LIBDL), \
-    LDFLAGS_SUFFIX_aix := $(LIBZ) -L$(SUPPORT_OUTPUTDIR)/native/java.base -ljli_static $(LIBDL),\
+    LDFLAGS_linux := $(call SET_SHARED_LIBRARY_ORIGIN,/jli) \
+        -L$(call FindLibDirForModule, java.base)/jli, \
+    LDFLAGS_solaris := $(call SET_SHARED_LIBRARY_ORIGIN,/jli) \
+        -L$(call FindLibDirForModule, java.base)/jli, \
+    LDFLAGS_macosx := -Xlinker -all_load $(SUPPORT_OUTPUTDIR)/native/java.base/libjli_static.a, \
+    LDFLAGS_aix := -L$(SUPPORT_OUTPUTDIR)/native/java.base, \
+    LDFLAGS_windows := -export:Agent_OnAttach, \
+    LIBS_unix := -ljava $(LIBZ), \
+    LIBS_linux := -ljli $(LIBDL), \
+    LIBS_solaris := -ljli $(LIBDL) -lc, \
+    LIBS_aix := -ljli_static $(LIBDL),\
+    LIBS_macosx := -liconv -framework Cocoa -framework Security \
+        -framework ApplicationServices, \
+    LIBS_windows := $(WIN_JAVA_LIB) advapi32.lib \
+        $(SUPPORT_OUTPUTDIR)/native/java.base/jli_static.lib, \
     VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
     RC_FLAGS := $(RC_FLAGS) \
         -D "JDK_FNAME=instrument.dll" \
--- a/make/lib/Lib-java.management.gmk	Tue Nov 03 14:00:01 2015 +0300
+++ b/make/lib/Lib-java.management.gmk	Tue Nov 03 12:04:12 2015 -0800
@@ -54,10 +54,10 @@
     MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libmanagement/mapfile-vers, \
     LDFLAGS := $(LDFLAGS_JDKLIB) \
         $(call SET_SHARED_LIBRARY_ORIGIN), \
-    LDFLAGS_solaris := -lkstat, \
-    LDFLAGS_SUFFIX := $(LDFLAGS_JDKLIB_SUFFIX), \
-    LDFLAGS_SUFFIX_windows := jvm.lib psapi.lib $(WIN_JAVA_LIB) advapi32.lib, \
-    LDFLAGS_SUFFIX_aix := -lperfstat,\
+    LIBS := $(JDKLIB_LIBS), \
+    LIBS_solaris := -lkstat, \
+    LIBS_aix := -lperfstat,\
+    LIBS_windows := jvm.lib psapi.lib $(WIN_JAVA_LIB) advapi32.lib, \
     VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
     RC_FLAGS := $(RC_FLAGS) \
         -D "JDK_FNAME=management.dll" \
--- a/make/lib/Lib-java.prefs.gmk	Tue Nov 03 14:00:01 2015 +0300
+++ b/make/lib/Lib-java.prefs.gmk	Tue Nov 03 12:04:12 2015 -0800
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -43,11 +43,12 @@
     MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libprefs/mapfile-vers, \
     LDFLAGS := $(LDFLAGS_JDKLIB) \
         $(call SET_SHARED_LIBRARY_ORIGIN), \
-    LDFLAGS_SUFFIX_linux := -ljvm -ljava, \
-    LDFLAGS_SUFFIX_solaris := -ljvm -ljava -lc, \
-    LDFLAGS_SUFFIX_aix := -ljvm -ljava, \
-    LDFLAGS_SUFFIX_windows := advapi32.lib jvm.lib $(WIN_JAVA_LIB), \
-    LDFLAGS_SUFFIX_macosx := -ljvm -framework CoreFoundation -framework Foundation, \
+    LIBS_unix := -ljvm, \
+    LIBS_linux := -ljava, \
+    LIBS_solaris := -ljava -lc, \
+    LIBS_aix := -ljava, \
+    LIBS_macosx := -framework CoreFoundation -framework Foundation, \
+    LIBS_windows := advapi32.lib jvm.lib $(WIN_JAVA_LIB), \
     VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
     RC_FLAGS := $(RC_FLAGS) \
         -D "JDK_FNAME=prefs.dll" \
--- a/make/lib/Lib-java.security.jgss.gmk	Tue Nov 03 14:00:01 2015 +0300
+++ b/make/lib/Lib-java.security.jgss.gmk	Tue Nov 03 12:04:12 2015 -0800
@@ -43,8 +43,8 @@
       MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libj2gss/mapfile-vers, \
       LDFLAGS := $(LDFLAGS_JDKLIB) \
           $(call SET_SHARED_LIBRARY_ORIGIN), \
-      LDFLAGS_SUFFIX := $(LIBDL), \
-      LDFLAGS_SUFFIX_solaris := -lc, \
+      LIBS := $(LIBDL), \
+      LIBS_solaris := -lc, \
       OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libj2gss, \
       DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
 
@@ -85,7 +85,7 @@
         DISABLED_WARNINGS_clang := deprecated-declarations, \
         LDFLAGS := $(LDFLAGS_JDKLIB) \
             $(call SET_SHARED_LIBRARY_ORIGIN), \
-        LDFLAGS_SUFFIX := $(BUILD_LIBKRB5_LIBS), \
+        LIBS := $(BUILD_LIBKRB5_LIBS), \
         VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
         RC_FLAGS := $(RC_FLAGS) \
             -D "JDK_FNAME=$(BUILD_LIBKRB5_NAME).dll" \
--- a/make/lib/Lib-java.smartcardio.gmk	Tue Nov 03 14:00:01 2015 +0300
+++ b/make/lib/Lib-java.smartcardio.gmk	Tue Nov 03 12:04:12 2015 -0800
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -43,9 +43,9 @@
     MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libj2pcsc/mapfile-vers, \
     LDFLAGS := $(LDFLAGS_JDKLIB) \
         $(call SET_SHARED_LIBRARY_ORIGIN), \
-    LDFLAGS_SUFFIX_unix := $(LIBDL), \
-    LDFLAGS_SUFFIX_windows := winscard.lib, \
-    LDFLAGS_SUFFIX_solaris := -lc, \
+    LIBS_unix := $(LIBDL), \
+    LIBS_solaris := -lc, \
+    LIBS_windows := winscard.lib, \
     VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
     RC_FLAGS := $(RC_FLAGS) \
         -D "JDK_FNAME=j2pcsc.dll" \
--- a/make/lib/Lib-jdk.accessibility.gmk	Tue Nov 03 14:00:01 2015 +0300
+++ b/make/lib/Lib-jdk.accessibility.gmk	Tue Nov 03 12:04:12 2015 -0800
@@ -50,11 +50,11 @@
             $(addprefix -I,$(JAVA_AB_SRCDIR)) \
             -I$(JDK_TOPDIR)/src/jdk.accessibility/windows/native/include/bridge \
             -DACCESSBRIDGE_ARCH_$2, \
-        LDFLAGS := $(LDFLAGS_JDKLIB) kernel32.lib user32.lib gdi32.lib \
+        LDFLAGS := $(LDFLAGS_JDKLIB) -subsystem:windows, \
+        LIBS := kernel32.lib user32.lib gdi32.lib \
             winspool.lib comdlg32.lib advapi32.lib shell32.lib \
             $(SUPPORT_OUTPUTDIR)/native/java.desktop/libjawt/jawt.lib \
-            ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib \
-            -subsystem:windows, \
+            ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib, \
         VERSIONINFO_RESOURCE := $(ROOT_SRCDIR)/common/AccessBridgeStatusWindow.rc, \
         RC_FLAGS := $(RC_FLAGS) \
             -D "JDK_FNAME=javaaccessbridge$1.dll" \
@@ -80,11 +80,11 @@
             $(addprefix -I,$(WIN_AB_SRCDIR)) \
             -I$(JDK_TOPDIR)/src/jdk.accessibility/windows/native/include/bridge \
             -DACCESSBRIDGE_ARCH_$2, \
-        LDFLAGS := $(LDFLAGS_JDKLIB) kernel32.lib user32.lib gdi32.lib \
+        LDFLAGS := $(LDFLAGS_JDKLIB) -subsystem:windows \
+            -def:$(ROOT_SRCDIR)/libwindowsaccessbridge/WinAccessBridge.DEF, \
+        LIBS := kernel32.lib user32.lib gdi32.lib \
             winspool.lib comdlg32.lib advapi32.lib shell32.lib \
-            ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib \
-            -subsystem:windows \
-            -def:$(ROOT_SRCDIR)/libwindowsaccessbridge/WinAccessBridge.DEF, \
+            ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib, \
         VERSIONINFO_RESOURCE := $(ROOT_SRCDIR)/common/AccessBridgeStatusWindow.rc, \
         RC_FLAGS := $(RC_FLAGS) \
             -D "JDK_FNAME=windowsaccessbridge$1.dll" \
--- a/make/lib/Lib-jdk.attach.gmk	Tue Nov 03 14:00:01 2015 +0300
+++ b/make/lib/Lib-jdk.attach.gmk	Tue Nov 03 12:04:12 2015 -0800
@@ -51,10 +51,10 @@
         -D "JDK_FTYPE=0x2L", \
     LDFLAGS := $(LDFLAGS_JDKLIB) \
         $(call SET_SHARED_LIBRARY_ORIGIN), \
-    LDFLAGS_solaris := -ldoor, \
-    LDFLAGS_windows := /ORDER:@$(JDK_TOPDIR)/make/mapfiles/libattach/reorder-windows-$(OPENJDK_TARGET_CPU), \
-    LDFLAGS_SUFFIX := $(LDFLAGS_JDKLIB_SUFFIX), \
-    LDFLAGS_SUFFIX_windows := $(WIN_JAVA_LIB) advapi32.lib psapi.lib, \
+    LDFLAGS_windows := -order:@$(JDK_TOPDIR)/make/mapfiles/libattach/reorder-windows-$(OPENJDK_TARGET_CPU), \
+    LIBS := $(JDKLIB_LIBS), \
+    LIBS_solaris := -ldoor, \
+    LIBS_windows := $(WIN_JAVA_LIB) advapi32.lib psapi.lib, \
     OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libattach, \
     DEBUG_SYMBOLS := true))
 
--- a/make/lib/Lib-jdk.crypto.ec.gmk	Tue Nov 03 14:00:01 2015 +0300
+++ b/make/lib/Lib-jdk.crypto.ec.gmk	Tue Nov 03 12:04:12 2015 -0800
@@ -59,9 +59,9 @@
       MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libsunec/mapfile-vers, \
       LDFLAGS := $(LDFLAGS_JDKLIB) $(LDFLAGS_CXX_JDK), \
       LDFLAGS_macosx := $(call SET_SHARED_LIBRARY_ORIGIN), \
-      LDFLAGS_SUFFIX := $(LIBCXX), \
-      LDFLAGS_SUFFIX_linux := -lc, \
-      LDFLAGS_SUFFIX_solaris := -lc, \
+      LIBS := $(LIBCXX), \
+      LIBS_linux := -lc, \
+      LIBS_solaris := -lc, \
       VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
       RC_FLAGS := $(RC_FLAGS) \
           -D "JDK_FNAME=sunec.dll" \
--- a/make/lib/Lib-jdk.crypto.mscapi.gmk	Tue Nov 03 14:00:01 2015 +0300
+++ b/make/lib/Lib-jdk.crypto.mscapi.gmk	Tue Nov 03 12:04:12 2015 -0800
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -40,7 +40,7 @@
           -I$(LIBSUNMSCAPI_SRC), \
       LDFLAGS := $(LDFLAGS_JDKLIB) $(LDFLAGS_CXX_JDK) \
           $(call SET_SHARED_LIBRARY_ORIGIN), \
-      LDFLAGS_SUFFIX := Crypt32.Lib advapi32.lib, \
+      LIBS := crypt32.lib advapi32.lib, \
       VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
       RC_FLAGS := $(RC_FLAGS) \
           -D "JDK_FNAME=sunmscapi.dll" \
--- a/make/lib/Lib-jdk.crypto.pkcs11.gmk	Tue Nov 03 14:00:01 2015 +0300
+++ b/make/lib/Lib-jdk.crypto.pkcs11.gmk	Tue Nov 03 12:04:12 2015 -0800
@@ -43,8 +43,8 @@
     MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libj2pkcs11/mapfile-vers, \
     LDFLAGS := $(LDFLAGS_JDKLIB) \
         $(call SET_SHARED_LIBRARY_ORIGIN), \
-    LDFLAGS_SUFFIX_unix := $(LIBDL), \
-    LDFLAGS_SUFFIX_solaris := -lc, \
+    LIBS_unix := $(LIBDL), \
+    LIBS_solaris := -lc, \
     VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
     RC_FLAGS := $(RC_FLAGS) \
         -D "JDK_FNAME=j2pkcs11.dll" \
--- a/make/lib/Lib-jdk.crypto.ucrypto.gmk	Tue Nov 03 14:00:01 2015 +0300
+++ b/make/lib/Lib-jdk.crypto.ucrypto.gmk	Tue Nov 03 12:04:12 2015 -0800
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -41,8 +41,8 @@
       DISABLED_WARNINGS_solstudio := E_MACRO_REDEFINED, \
       MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libj2ucrypto/mapfile-vers, \
       LDFLAGS := $(LDFLAGS_JDKLIB), \
-      LDFLAGS_SUFFIX := $(LIBDL), \
-      LDFLAGS_SUFFIX_solaris := -lc, \
+      LIBS := $(LIBDL), \
+      LIBS_solaris := -lc, \
       OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libj2ucrypto, \
       DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
 
--- a/make/lib/Lib-jdk.deploy.osx.gmk	Tue Nov 03 14:00:01 2015 +0300
+++ b/make/lib/Lib-jdk.deploy.osx.gmk	Tue Nov 03 12:04:12 2015 -0800
@@ -42,10 +42,10 @@
       DISABLED_WARNINGS_clang := implicit-function-declaration format, \
       LDFLAGS := $(LDFLAGS_JDKLIB) \
           $(call SET_SHARED_LIBRARY_ORIGIN), \
-      LDFLAGS_SUFFIX := -framework Cocoa \
+      LIBS := -framework Cocoa \
           -framework Carbon \
           -framework JavaNativeFoundation \
-          $(LDFLAGS_JDKLIB_SUFFIX), \
+          $(JDKLIB_LIBS), \
       OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libAppleScriptEngine, \
       DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
 
@@ -74,14 +74,14 @@
       LDFLAGS := $(LDFLAGS_JDKLIB) \
           -L$(SUPPORT_OUTPUTDIR)/modules_libs/java.desktop \
           $(call SET_SHARED_LIBRARY_ORIGIN), \
-      LDFLAGS_SUFFIX_macosx := \
+      LIBS := \
           -losxapp \
           -framework Cocoa \
           -framework ApplicationServices \
           -framework JavaNativeFoundation \
           -framework JavaRuntimeSupport \
           -framework SystemConfiguration \
-          $(LDFLAGS_JDKLIB_SUFFIX), \
+          $(JDKLIB_LIBS), \
       OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libosx, \
       DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
 
--- a/make/lib/Lib-jdk.internal.le.gmk	Tue Nov 03 14:00:01 2015 +0300
+++ b/make/lib/Lib-jdk.internal.le.gmk	Tue Nov 03 12:04:12 2015 -0800
@@ -44,7 +44,7 @@
       CFLAGS := $(CFLAGS_JDKLIB) $(LIBJAVA_HEADER_FLAGS)\
           $(LIBLE_CPPFLAGS), \
       LDFLAGS := $(LDFLAGS_JDKLIB), \
-      LDFLAGS_SUFFIX := $(LDFLAGS_JDKLIB_SUFFIX) user32.lib, \
+      LIBS := $(JDKLIB_LIBS) user32.lib, \
       VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
       RC_FLAGS := $(RC_FLAGS) \
           -D "JDK_FNAME=le.dll" \
--- a/make/lib/Lib-jdk.jdi.gmk	Tue Nov 03 14:00:01 2015 +0300
+++ b/make/lib/Lib-jdk.jdi.gmk	Tue Nov 03 12:04:12 2015 -0800
@@ -48,7 +48,7 @@
           $(LIBDT_SHMEM_CPPFLAGS), \
       LDFLAGS := $(LDFLAGS_JDKLIB), \
       LDFLAGS_windows := -export:jdwpTransport_OnLoad, \
-      LDFLAGS_SUFFIX := $(LDFLAGS_JDKLIB_SUFFIX), \
+      LIBS := $(JDKLIB_LIBS), \
       VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
       RC_FLAGS := $(RC_FLAGS) \
           -D "JDK_FNAME=dt_shmem.dll" \
--- a/make/lib/Lib-jdk.jdwp.agent.gmk	Tue Nov 03 14:00:01 2015 +0300
+++ b/make/lib/Lib-jdk.jdwp.agent.gmk	Tue Nov 03 12:04:12 2015 -0800
@@ -46,9 +46,10 @@
     MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libdt_socket/mapfile-vers, \
     LDFLAGS := $(LDFLAGS_JDKLIB) \
         $(call SET_SHARED_LIBRARY_ORIGIN), \
-    LDFLAGS_SUFFIX_linux := -lpthread, \
-    LDFLAGS_SUFFIX_solaris := -lnsl -lsocket -lc, \
-    LDFLAGS_SUFFIX_windows := $(LDFLAGS_JDKLIB_SUFFIX) -export:jdwpTransport_OnLoad ws2_32.lib, \
+    LDFLAGS_windows := -export:jdwpTransport_OnLoad, \
+    LIBS_linux := -lpthread, \
+    LIBS_solaris := -lnsl -lsocket -lc, \
+    LIBS_windows := $(JDKLIB_LIBS) ws2_32.lib, \
     VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
     RC_FLAGS := $(RC_FLAGS) \
         -D "JDK_FNAME=dt_socket.dll" \
@@ -83,10 +84,10 @@
     MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libjdwp/mapfile-vers, \
     LDFLAGS := $(LDFLAGS_JDKLIB) \
         $(call SET_SHARED_LIBRARY_ORIGIN), \
-    LDFLAGS_SUFFIX_linux := $(LIBDL), \
-    LDFLAGS_SUFFIX_solaris := $(LIBDL) -lc, \
-    LDFLAGS_SUFFIX_windows := $(LDFLAGS_JDKLIB_SUFFIX), \
-    LDFLAGS_SUFFIX_macosx := -liconv, \
+    LIBS_linux := $(LIBDL), \
+    LIBS_solaris := $(LIBDL) -lc, \
+    LIBS_macosx := -liconv, \
+    LIBS_windows := $(JDKLIB_LIBS), \
     VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
     RC_FLAGS := $(RC_FLAGS) \
         -D "JDK_FNAME=jdwp.dll" \
--- a/make/lib/Lib-jdk.management.gmk	Tue Nov 03 14:00:01 2015 +0300
+++ b/make/lib/Lib-jdk.management.gmk	Tue Nov 03 12:04:12 2015 -0800
@@ -63,10 +63,10 @@
     MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libmanagement_ext/mapfile-vers, \
     LDFLAGS := $(LDFLAGS_JDKLIB) \
         $(call SET_SHARED_LIBRARY_ORIGIN), \
-    LDFLAGS_solaris := -lkstat, \
-    LDFLAGS_SUFFIX := $(LDFLAGS_JDKLIB_SUFFIX), \
-    LDFLAGS_SUFFIX_windows := jvm.lib psapi.lib $(WIN_JAVA_LIB) advapi32.lib, \
-    LDFLAGS_SUFFIX_aix := -lperfstat,\
+    LIBS := $(JDKLIB_LIBS), \
+    LIBS_solaris := -lkstat, \
+    LIBS_aix := -lperfstat,\
+    LIBS_windows := jvm.lib psapi.lib $(WIN_JAVA_LIB) advapi32.lib, \
     VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
     RC_FLAGS := $(RC_FLAGS) \
         -D "JDK_FNAME=management_ext.dll" \
--- a/make/lib/Lib-jdk.pack200.gmk	Tue Nov 03 14:00:01 2015 +0300
+++ b/make/lib/Lib-jdk.pack200.gmk	Tue Nov 03 12:04:12 2015 -0800
@@ -43,9 +43,9 @@
     MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libunpack/mapfile-vers, \
     LDFLAGS := $(LDFLAGS_JDKLIB) $(LDFLAGS_CXX_JDK) \
         $(call SET_SHARED_LIBRARY_ORIGIN), \
-    LDFLAGS_windows := -map:$(SUPPORT_OUTPUTDIR)/native/$(MODULE)/unpack.map -debug \
-        jvm.lib $(WIN_JAVA_LIB), \
-    LDFLAGS_SUFFIX_unix := -ljvm $(LIBCXX) -ljava -lc, \
+    LDFLAGS_windows := -map:$(SUPPORT_OUTPUTDIR)/native/$(MODULE)/unpack.map -debug, \
+    LIBS_unix := -ljvm $(LIBCXX) -ljava -lc, \
+    LIBS_windows := jvm.lib $(WIN_JAVA_LIB), \
     OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libunpack, \
     VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
     RC_FLAGS := $(RC_FLAGS) \
--- a/make/lib/Lib-jdk.sctp.gmk	Tue Nov 03 14:00:01 2015 +0300
+++ b/make/lib/Lib-jdk.sctp.gmk	Tue Nov 03 12:04:12 2015 -0800
@@ -49,10 +49,9 @@
         MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libsctp/mapfile-vers, \
         LDFLAGS := $(LDFLAGS_JDKLIB) \
             $(call SET_SHARED_LIBRARY_ORIGIN), \
-        LDFLAGS_SUFFIX_linux := -lpthread $(LIBDL) -ljava -ljvm, \
-        LDFLAGS_SUFFIX_unix := -lnio -lnet, \
-        LDFLAGS_SUFFIX_solaris := -lsocket -ljava -ljvm -lc, \
-        LDFLAGS_SUFFIX_macosx := -ljava -ljvm, \
+        LIBS_unix := -lnio -lnet -ljava -ljvm, \
+        LIBS_linux := -lpthread $(LIBDL), \
+        LIBS_solaris := -lsocket -lc, \
         OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libsctp, \
         DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
 
--- a/make/lib/Lib-jdk.security.auth.gmk	Tue Nov 03 14:00:01 2015 +0300
+++ b/make/lib/Lib-jdk.security.auth.gmk	Tue Nov 03 12:04:12 2015 -0800
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -45,11 +45,10 @@
     OPTIMIZATION := LOW, \
     CFLAGS := $(CFLAGS_JDKLIB) -I$(SUPPORT_OUTPUTDIR)/headers/jdk.security.auth, \
     MAPFILE := $(LIBJAAS_MAPFILE), \
-    LDFLAGS := $(filter-out -ljava, $(LDFLAGS_JDKLIB)) \
+    LDFLAGS := $(LDFLAGS_JDKLIB) \
         $(call SET_SHARED_LIBRARY_ORIGIN), \
-    LDFLAGS_windows := netapi32.lib user32.lib mpr.lib advapi32.lib, \
-    LDFLAGS_SUFFIX_windows := $(LDFLAGS_JDKLIB_SUFFIX), \
-    LDFLAGS_SUFFIX_solaris := -lc, \
+    LIBS_solaris := -lc, \
+    LIBS_windows := netapi32.lib user32.lib mpr.lib advapi32.lib $(JDKLIB_LIBS), \
     VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
     RC_FLAGS := $(RC_FLAGS) \
         -D "JDK_FNAME=$(LIBJAAS_NAME).dll" \
--- a/make/lib/NetworkingLibraries.gmk	Tue Nov 03 14:00:01 2015 +0300
+++ b/make/lib/NetworkingLibraries.gmk	Tue Nov 03 12:04:12 2015 -0800
@@ -39,13 +39,13 @@
     MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libnet/mapfile-vers, \
     LDFLAGS := $(LDFLAGS_JDKLIB) \
         $(call SET_SHARED_LIBRARY_ORIGIN), \
-    LDFLAGS_SUFFIX_macosx := -ljvm -ljava, \
-    LDFLAGS_SUFFIX_solaris := -ljvm -ljava -lnsl -lsocket $(LIBDL) -lc, \
-    LDFLAGS_SUFFIX_linux := $(LIBDL) -ljvm -lpthread -ljava, \
-    LDFLAGS_SUFFIX_aix := $(LIBDL) -ljvm -ljava,\
-    LDFLAGS_SUFFIX_windows := ws2_32.lib jvm.lib secur32.lib iphlpapi.lib \
-        delayimp.lib $(WIN_JAVA_LIB) advapi32.lib \
-        -DELAYLOAD:secur32.dll -DELAYLOAD:iphlpapi.dll, \
+    LDFLAGS_windows := -delayload:secur32.dll -delayload:iphlpapi.dll, \
+    LIBS_unix := -ljvm -ljava, \
+    LIBS_linux := $(LIBDL) -lpthread, \
+    LIBS_solaris := -lnsl -lsocket $(LIBDL) -lc, \
+    LIBS_aix := $(LIBDL),\
+    LIBS_windows := ws2_32.lib jvm.lib secur32.lib iphlpapi.lib \
+        delayimp.lib $(WIN_JAVA_LIB) advapi32.lib, \
     VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
     RC_FLAGS := $(RC_FLAGS) \
         -D "JDK_FNAME=net.dll" \
--- a/make/lib/NioLibraries.gmk	Tue Nov 03 14:00:01 2015 +0300
+++ b/make/lib/NioLibraries.gmk	Tue Nov 03 12:04:12 2015 -0800
@@ -70,18 +70,18 @@
     CFLAGS := $(CFLAGS_JDKLIB) \
         $(BUILD_LIBNIO_CFLAGS), \
     MAPFILE := $(BUILD_LIBNIO_MAPFILE), \
-    LDFLAGS := $(LDFLAGS_JDKLIB) $(BUILD_LIBNIO_LDFLAGS) \
+    LDFLAGS := $(LDFLAGS_JDKLIB) \
         $(call SET_SHARED_LIBRARY_ORIGIN), \
-    LDFLAGS_SUFFIX_linux := -ljava -lnet -lpthread $(LIBDL), \
-    LDFLAGS_SUFFIX_aix := -ljava -lnet $(LIBDL),\
-    LDFLAGS_SUFFIX_solaris := -ljvm -lsocket -lposix4 $(LIBDL) \
-        -lsendfile -ljava -lnet -lc, \
-    LDFLAGS_SUFFIX_windows := jvm.lib ws2_32.lib $(WIN_JAVA_LIB) \
+    LIBS_unix := -ljava -lnet, \
+    LIBS_linux := -lpthread $(LIBDL), \
+    LIBS_solaris := -ljvm -lsocket -lposix4 $(LIBDL) \
+        -lsendfile -lc, \
+    LIBS_aix := $(LIBDL), \
+    LIBS_macosx := \
+        -framework CoreFoundation -framework CoreServices, \
+    LIBS_windows := jvm.lib ws2_32.lib $(WIN_JAVA_LIB) \
         $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libnet/net.lib \
         advapi32.lib, \
-    LDFLAGS_SUFFIX_macosx := -ljava -lnet -pthread \
-        -framework CoreFoundation -framework CoreServices, \
-    LDFLAGS_SUFFIX :=, \
     VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
     RC_FLAGS := $(RC_FLAGS) \
         -D "JDK_FNAME=nio.dll" \
--- a/make/lib/PlatformLibraries.gmk	Tue Nov 03 14:00:01 2015 +0300
+++ b/make/lib/PlatformLibraries.gmk	Tue Nov 03 12:04:12 2015 -0800
@@ -40,7 +40,7 @@
       DISABLED_WARNINGS_clang := objc-method-access objc-root-class, \
       LDFLAGS := $(LDFLAGS_JDKLIB) \
           $(call SET_SHARED_LIBRARY_ORIGIN), \
-      LDFLAGS_SUFFIX_macosx := \
+      LIBS := \
           -framework Accelerate \
           -framework ApplicationServices \
           -framework AudioToolbox \
--- a/make/lib/SecurityLibraries.gmk	Tue Nov 03 14:00:01 2015 +0300
+++ b/make/lib/SecurityLibraries.gmk	Tue Nov 03 12:04:12 2015 -0800
@@ -44,13 +44,13 @@
       DISABLED_WARNINGS_clang := deprecated-declarations, \
       LDFLAGS := $(LDFLAGS_JDKLIB) \
           -L$(SUPPORT_OUTPUTDIR)/modules_libs/java.base \
-          $(call SET_SHARED_LIBRARY_ORIGIN), \
-      LDFLAGS_SUFFIX_macosx := \
-          -fobjc-link-runtime \
+          $(call SET_SHARED_LIBRARY_ORIGIN) \
+          -fobjc-link-runtime, \
+      LIBS := \
           -framework JavaNativeFoundation \
           -framework CoreServices \
           -framework Security \
-          $(LDFLAGS_JDKLIB_SUFFIX), \
+          $(JDKLIB_LIBS), \
       OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libosxsecurity, \
       DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
 
--- a/make/lib/SoundLibraries.gmk	Tue Nov 03 14:00:01 2015 +0300
+++ b/make/lib/SoundLibraries.gmk	Tue Nov 03 12:04:12 2015 -0800
@@ -126,12 +126,12 @@
     MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libjsound/mapfile-vers, \
     LDFLAGS := $(LDFLAGS_JDKLIB) \
         $(call SET_SHARED_LIBRARY_ORIGIN), \
-    LDFLAGS_macosx := -framework CoreAudio -framework CoreFoundation \
+    LIBS_unix := -ljava -ljvm, \
+    LIBS_solaris := -lc, \
+    LIBS_macosx := -framework CoreAudio -framework CoreFoundation \
         -framework CoreServices -framework AudioUnit $(LIBCXX) \
         -framework CoreMIDI -framework AudioToolbox, \
-    LDFLAGS_windows := $(WIN_JAVA_LIB) advapi32.lib winmm.lib, \
-    LDFLAGS_SUFFIX_unix := -ljava -ljvm, \
-    LDFLAGS_SUFFIX_solaris := -lc, \
+    LIBS_windows := $(WIN_JAVA_LIB) advapi32.lib winmm.lib, \
     VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
     RC_FLAGS := $(RC_FLAGS) \
         -D "JDK_FNAME=jsound.dll" \
@@ -171,7 +171,7 @@
       MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libjsoundalsa/mapfile-vers, \
       LDFLAGS := $(LDFLAGS_JDKLIB) \
           $(call SET_SHARED_LIBRARY_ORIGIN), \
-      LDFLAGS_SUFFIX := $(ALSA_LIBS) -ljava -ljvm, \
+      LIBS := $(ALSA_LIBS) -ljava -ljvm, \
       OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjsoundalsa, \
       DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
 
@@ -197,7 +197,7 @@
           -DUSE_DAUDIO=TRUE, \
       LDFLAGS := $(LDFLAGS_JDKLIB) $(LDFLAGS_CXX_JDK) \
           $(call SET_SHARED_LIBRARY_ORIGIN), \
-      LDFLAGS_SUFFIX := $(LDFLAGS_JDKLIB_SUFFIX) dsound.lib winmm.lib user32.lib ole32.lib, \
+      LIBS := $(JDKLIB_LIBS) dsound.lib winmm.lib user32.lib ole32.lib, \
       VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
       RC_FLAGS := $(RC_FLAGS) \
           -D "JDK_FNAME=jsoundds.dll" \
--- a/src/java.base/share/classes/java/io/ObjectInputStream.java	Tue Nov 03 14:00:01 2015 +0300
+++ b/src/java.base/share/classes/java/io/ObjectInputStream.java	Tue Nov 03 12:04:12 2015 -0800
@@ -3383,10 +3383,11 @@
          * Registers a dependency (in exception status) of one handle on
          * another.  The dependent handle must be "open" (i.e., assigned, but
          * not finished yet).  No action is taken if either dependent or target
-         * handle is NULL_HANDLE.
+         * handle is NULL_HANDLE. Additionally, no action is taken if the
+         * dependent and target are the same.
          */
         void markDependency(int dependent, int target) {
-            if (dependent == NULL_HANDLE || target == NULL_HANDLE) {
+            if (dependent == target || dependent == NULL_HANDLE || target == NULL_HANDLE) {
                 return;
             }
             switch (status[dependent]) {
--- a/src/java.base/share/classes/java/lang/String.java	Tue Nov 03 14:00:01 2015 +0300
+++ b/src/java.base/share/classes/java/lang/String.java	Tue Nov 03 12:04:12 2015 -0800
@@ -102,6 +102,10 @@
  * Unicode code points (i.e., characters), in addition to those for
  * dealing with Unicode code units (i.e., {@code char} values).
  *
+ * <p>Unless otherwise noted, methods for comparing Strings do not take locale
+ * into account.  The {@link java.text.Collator} class provides methods for
+ * finer-grain, locale-sensitive String comparison.
+ *
  * @author  Lee Boynton
  * @author  Arthur van Hoff
  * @author  Martin Buchholz
@@ -971,6 +975,9 @@
      * String} object that represents the same sequence of characters as this
      * object.
      *
+     * <p>For finer-grained String comparison, refer to
+     * {@link java.text.Collator}.
+     *
      * @param  anObject
      *         The object to compare this {@code String} against
      *
@@ -1008,6 +1015,9 @@
      * sequence of characters as the specified {@code StringBuffer}. This method
      * synchronizes on the {@code StringBuffer}.
      *
+     * <p>For finer-grained String comparison, refer to
+     * {@link java.text.Collator}.
+     *
      * @param  sb
      *         The {@code StringBuffer} to compare this {@code String} against
      *
@@ -1043,6 +1053,9 @@
      * {@code CharSequence} is a {@code StringBuffer} then the method
      * synchronizes on it.
      *
+     * <p>For finer-grained String comparison, refer to
+     * {@link java.text.Collator}.
+     *
      * @param  cs
      *         The sequence to compare this {@code String} against
      *
@@ -1092,14 +1105,14 @@
      * <ul>
      *   <li> The two characters are the same (as compared by the
      *        {@code ==} operator)
-     *   <li> Applying the method {@link
-     *        java.lang.Character#toUpperCase(char)} to each character
-     *        produces the same result
-     *   <li> Applying the method {@link
-     *        java.lang.Character#toLowerCase(char)} to each character
-     *        produces the same result
+     *   <li> Calling {@code Character.toLowerCase(Character.toUpperCase(char))}
+     *        on each character produces the same result
      * </ul>
      *
+     * <p>Note that this method does <em>not</em> take locale into account, and
+     * will result in unsatisfactory results for certain locales.  The
+     * {@link java.text.Collator} class provides locale-sensitive comparison.
+     *
      * @param  anotherString
      *         The {@code String} to compare this {@code String} against
      *
@@ -1150,6 +1163,9 @@
      * this.length()-anotherString.length()
      * </pre></blockquote>
      *
+     * <p>For finer-grained String comparison, refer to
+     * {@link java.text.Collator}.
+     *
      * @param   anotherString   the {@code String} to be compared.
      * @return  the value {@code 0} if the argument string is equal to
      *          this string; a value less than {@code 0} if this string
@@ -1181,10 +1197,9 @@
      * <p>
      * Note that this Comparator does <em>not</em> take locale into account,
      * and will result in an unsatisfactory ordering for certain locales.
-     * The java.text package provides <em>Collators</em> to allow
-     * locale-sensitive ordering.
+     * The {@link java.text.Collator} class provides locale-sensitive comparison.
      *
-     * @see     java.text.Collator#compare(String, String)
+     * @see     java.text.Collator
      * @since   1.2
      */
     public static final Comparator<String> CASE_INSENSITIVE_ORDER
@@ -1231,14 +1246,13 @@
      * <p>
      * Note that this method does <em>not</em> take locale into account,
      * and will result in an unsatisfactory ordering for certain locales.
-     * The java.text package provides <em>collators</em> to allow
-     * locale-sensitive ordering.
+     * The {@link java.text.Collator} class provides locale-sensitive comparison.
      *
      * @param   str   the {@code String} to be compared.
      * @return  a negative integer, zero, or a positive integer as the
      *          specified String is greater than, equal to, or less
      *          than this String, ignoring case considerations.
-     * @see     java.text.Collator#compare(String, String)
+     * @see     java.text.Collator
      * @since   1.2
      */
     public int compareToIgnoreCase(String str) {
@@ -1268,6 +1282,9 @@
      * <i>k</i>{@code )}
      * </ul>
      *
+     * <p>Note that this method does <em>not</em> take locale into account.  The
+     * {@link java.text.Collator} class provides locale-sensitive comparison.
+     *
      * @param   toffset   the starting offset of the subregion in this string.
      * @param   other     the string argument.
      * @param   ooffset   the starting offset of the subregion in the string
@@ -1323,16 +1340,16 @@
      * <li>{@code ignoreCase} is {@code true} and there is some nonnegative
      * integer <i>k</i> less than {@code len} such that:
      * <blockquote><pre>
-     * Character.toLowerCase(this.charAt(toffset+k)) !=
-     Character.toLowerCase(other.charAt(ooffset+k))
-     * </pre></blockquote>
-     * and:
-     * <blockquote><pre>
-     * Character.toUpperCase(this.charAt(toffset+k)) !=
-     *         Character.toUpperCase(other.charAt(ooffset+k))
+     * Character.toLowerCase(Character.toUpperCase(this.charAt(toffset+k))) !=
+     Character.toLowerCase(Character.toUpperCase(other.charAt(ooffset+k)))
      * </pre></blockquote>
      * </ul>
      *
+     * <p>Note that this method does <em>not</em> take locale into account,
+     * and will result in unsatisfactory results for certain locales when
+     * {@code ignoreCase} is {@code true}.  The {@link java.text.Collator} class
+     * provides locale-sensitive comparison.
+     *
      * @param   ignoreCase   if {@code true}, ignore case when comparing
      *                       characters.
      * @param   toffset      the starting offset of the subregion in this
--- a/src/java.base/share/classes/java/lang/Throwable.java	Tue Nov 03 14:00:01 2015 +0300
+++ b/src/java.base/share/classes/java/lang/Throwable.java	Tue Nov 03 12:04:12 2015 -0800
@@ -211,8 +211,7 @@
 
     // Setting this static field introduces an acceptable
     // initialization dependency on a few java.util classes.
-    private static final List<Throwable> SUPPRESSED_SENTINEL =
-        Collections.unmodifiableList(new ArrayList<Throwable>(0));
+    private static final List<Throwable> SUPPRESSED_SENTINEL = Collections.emptyList();
 
     /**
      * The list of suppressed exceptions, as returned by {@link
--- a/src/java.base/share/classes/java/lang/invoke/BoundMethodHandle.java	Tue Nov 03 14:00:01 2015 +0300
+++ b/src/java.base/share/classes/java/lang/invoke/BoundMethodHandle.java	Tue Nov 03 12:04:12 2015 -0800
@@ -404,14 +404,6 @@
             d = lookupCache(types);
             // Class loading must have upgraded the cache.
             assert(d != null && !d.isPlaceholder());
-            if (OBSERVE_BMH_SPECIES_CREATION) {
-                if (d == null) {
-                    throw new IllegalStateException("d == null");
-                }
-                if (d.isPlaceholder()) {
-                    throw new IllegalStateException("d is place holder");
-                }
-            }
             return d;
         }
         static SpeciesData getForClass(String types, Class<? extends BoundMethodHandle> clazz) {
@@ -423,9 +415,6 @@
             if (d != null)  return d;
             d = new SpeciesData(types);
             assert(d.isPlaceholder());
-            if (OBSERVE_BMH_SPECIES_CREATION && !d.isPlaceholder()) {
-                throw new IllegalStateException("d is not place holder");
-            }
             CACHE.put(types, d);
             return d;
         }
@@ -433,15 +422,6 @@
             SpeciesData d2;
             assert((d2 = CACHE.get(types)) == null || d2.isPlaceholder());
             assert(!d.isPlaceholder());
-            if (OBSERVE_BMH_SPECIES_CREATION) {
-                d2 = CACHE.get(types);
-                if (d2 != null && !d2.isPlaceholder()) {
-                    throw new IllegalStateException("non-null d2 is not place holder");
-                }
-                if (d.isPlaceholder()) {
-                    throw new IllegalStateException("d is place holder");
-                }
-            }
             CACHE.put(types, d);
             return d;
         }
--- a/src/java.base/share/classes/java/lang/invoke/MethodHandleStatics.java	Tue Nov 03 14:00:01 2015 +0300
+++ b/src/java.base/share/classes/java/lang/invoke/MethodHandleStatics.java	Tue Nov 03 12:04:12 2015 -0800
@@ -51,12 +51,8 @@
     static final boolean PROFILE_GWT;
     static final int CUSTOMIZE_THRESHOLD;
 
-    // This is a temporary property added for improved error reporting; it will
-    // be removed once it has served its purpose.
-    static final boolean OBSERVE_BMH_SPECIES_CREATION;
-
     static {
-        final Object[] values = new Object[10];
+        final Object[] values = new Object[9];
         AccessController.doPrivileged(new PrivilegedAction<>() {
                 public Void run() {
                     values[0] = Boolean.getBoolean("java.lang.invoke.MethodHandle.DEBUG_NAMES");
@@ -68,7 +64,6 @@
                     values[6] = Integer.getInteger("java.lang.invoke.MethodHandle.PROFILE_LEVEL", 0);
                     values[7] = Boolean.parseBoolean(System.getProperty("java.lang.invoke.MethodHandle.PROFILE_GWT", "true"));
                     values[8] = Integer.getInteger("java.lang.invoke.MethodHandle.CUSTOMIZE_THRESHOLD", 127);
-                    values[9] = Boolean.getBoolean("java.lang.invoke.MethodHandle.OBSERVE_BMH_SPECIES_CREATION");
                     return null;
                 }
             });
@@ -82,8 +77,6 @@
         PROFILE_GWT               = (Boolean) values[7];
         CUSTOMIZE_THRESHOLD       = (Integer) values[8];
 
-        OBSERVE_BMH_SPECIES_CREATION = (Boolean) values[9];
-
         if (CUSTOMIZE_THRESHOLD < -1 || CUSTOMIZE_THRESHOLD > 127) {
             throw newInternalError("CUSTOMIZE_THRESHOLD should be in [-1...127] range");
         }
--- a/src/java.base/share/classes/java/util/spi/LocaleServiceProvider.java	Tue Nov 03 14:00:01 2015 +0300
+++ b/src/java.base/share/classes/java/util/spi/LocaleServiceProvider.java	Tue Nov 03 12:04:12 2015 -0800
@@ -123,25 +123,27 @@
  * <ul>
  * <li> "CLDR": A provider based on Unicode Consortium's
  * <a href="http://cldr.unicode.org/">CLDR Project</a>.
- * <li> "JRE": represents the locale sensitive services that is compatible
- * with the prior JDK releases (same with JDK8's "JRE").
+ * <li> "COMPAT": represents the locale sensitive services that is compatible
+ * with the prior JDK releases up to JDK8 (same as JDK8's "JRE").
  * <li> "SPI": represents the locale sensitive services implementing the subclasses of
  * this {@code LocaleServiceProvider} class.
  * <li> "HOST": A provider that reflects the user's custom settings in the
  * underlying operating system. This provider may not be available, depending
  * on the Java Runtime Environment implementation.
+ * <li> "JRE": represents a synonym to "COMPAT". This name
+ * is deprecated and will be removed in the future release of JDK.
  * </ul>
  * <p>
  * For example, if the following is specified in the property:
  * <pre>
- * java.locale.providers=SPI,CLDR,JRE
+ * java.locale.providers=SPI,CLDR,COMPAT
  * </pre>
  * the locale sensitive services in the SPI providers are looked up first. If the
  * desired locale sensitive service is not available, then the runtime looks for CLDR,
- * JRE in that order.
+ * COMPAT in that order.
  * <p>
- * The default order for looking up the preferred locale providers is "CLDR,JRE",
- * so specifying "CLDR,JRE" is identical to the default behavior. Applications which
+ * The default order for looking up the preferred locale providers is "CLDR,COMPAT",
+ * so specifying "CLDR,COMPAT" is identical to the default behavior. Applications which
  * require implementations of the locale sensitive services must explicitly specify
  * "SPI" in order for the Java runtime to load them from the classpath.
  *
--- a/src/java.base/share/classes/java/util/zip/ZipUtils.java	Tue Nov 03 14:00:01 2015 +0300
+++ b/src/java.base/share/classes/java/util/zip/ZipUtils.java	Tue Nov 03 12:04:12 2015 -0800
@@ -26,7 +26,9 @@
 package java.util.zip;
 
 import java.nio.file.attribute.FileTime;
-import java.util.Date;
+import java.time.Instant;
+import java.time.LocalDateTime;
+import java.time.ZoneId;
 import java.util.concurrent.TimeUnit;
 
 class ZipUtils {
@@ -66,15 +68,16 @@
     /**
      * Converts DOS time to Java time (number of milliseconds since epoch).
      */
-    private static long dosToJavaTime(long dtime) {
-        @SuppressWarnings("deprecation") // Use of date constructor.
-        Date d = new Date((int)(((dtime >> 25) & 0x7f) + 80),
-                          (int)(((dtime >> 21) & 0x0f) - 1),
-                          (int)((dtime >> 16) & 0x1f),
-                          (int)((dtime >> 11) & 0x1f),
-                          (int)((dtime >> 5) & 0x3f),
-                          (int)((dtime << 1) & 0x3e));
-        return d.getTime();
+    public static long dosToJavaTime(long dtime) {
+        LocalDateTime ldt = LocalDateTime.of(
+                (int) (((dtime >> 25) & 0x7f) + 1980),
+                (int) ((dtime >> 21) & 0x0f),
+                (int) ((dtime >> 16) & 0x1f),
+                (int) ((dtime >> 11) & 0x1f),
+                (int) ((dtime >> 5) & 0x3f),
+                (int) ((dtime << 1) & 0x3e));
+        return TimeUnit.MILLISECONDS.convert(ldt.toEpochSecond(
+                ZoneId.systemDefault().getRules().getOffset(ldt)), TimeUnit.SECONDS);
     }
 
     /**
@@ -92,16 +95,20 @@
     /**
      * Converts Java time to DOS time.
      */
-    @SuppressWarnings("deprecation") // Use of date methods
     private static long javaToDosTime(long time) {
-        Date d = new Date(time);
-        int year = d.getYear() + 1900;
-        if (year < 1980) {
-            return ZipEntry.DOSTIME_BEFORE_1980;
+        Instant instant = Instant.ofEpochMilli(time);
+        LocalDateTime ldt = LocalDateTime.ofInstant(
+                instant, ZoneId.systemDefault());
+        int year = ldt.getYear() - 1980;
+        if (year < 0) {
+            return (1 << 21) | (1 << 16);
         }
-        return ((year - 1980) << 25 | (d.getMonth() + 1) << 21 |
-                d.getDate() << 16 | d.getHours() << 11 | d.getMinutes() << 5 |
-                d.getSeconds() >> 1) & 0xffffffffL;
+        return (year << 25 |
+            ldt.getMonthValue() << 21 |
+            ldt.getDayOfMonth() << 16 |
+            ldt.getHour() << 11 |
+            ldt.getMinute() << 5 |
+            ldt.getSecond() >> 1) & 0xffffffffL;
     }
 
     /**
--- a/src/java.base/share/classes/sun/util/locale/provider/LocaleProviderAdapter.java	Tue Nov 03 14:00:01 2015 +0300
+++ b/src/java.base/share/classes/sun/util/locale/provider/LocaleProviderAdapter.java	Tue Nov 03 12:04:12 2015 -0800
@@ -124,6 +124,10 @@
         if (order != null && order.length() != 0) {
             String[] types = order.split(",");
             for (String type : types) {
+                type = type.trim().toUpperCase(Locale.ROOT);
+                if (type.equals("COMPAT")) {
+                    type = "JRE";
+                }
                 try {
                     Type aType = Type.valueOf(type.trim().toUpperCase(Locale.ROOT));
                     if (!typeList.contains(aType)) {
--- a/src/java.base/share/native/libjimage/ImageNativeSubstrate.cpp	Tue Nov 03 14:00:01 2015 +0300
+++ b/src/java.base/share/native/libjimage/ImageNativeSubstrate.cpp	Tue Nov 03 12:04:12 2015 -0800
@@ -26,8 +26,7 @@
 #include <string.h>
 
 #include "jni.h"
-#include "jni_util.h"
-#include "jdk_util.h"
+
 #include "endian.hpp"
 #include "imageDecompressor.hpp"
 #include "imageFile.hpp"
@@ -39,6 +38,17 @@
 
 extern bool MemoryMapImage;
 
+/////////////////////////////////////////////////////////////////////////////
+
+// Static function for primitive throw since libjimage is not linked with libjava
+static void JNICALL ThrowByName(JNIEnv *env, const char *name, const char *msg)
+{
+    jclass cls = (env)->FindClass(name);
+
+    if (cls != 0) /* Otherwise an exception has already been thrown */
+        (env)->ThrowNew(cls, msg);
+}
+
 // jdk.internal.jimage /////////////////////////////////////////////////////////
 
 // Java entry to open an image file for sharing.
@@ -446,6 +456,23 @@
     jlong size = 0;
     jlong ret = 0;
 
+    if (moduleName == NULL) {
+        ThrowByName(env, "java/lang/NullPointerException", "moduleName");
+        return 0;
+    }
+    if (version == NULL) {
+        ThrowByName(env, "java/lang/NullPointerException", "version");
+        return 0;
+    }
+    if (path == NULL) {
+        ThrowByName(env, "java/lang/NullPointerException", "path");
+        return 0;
+    }
+    if (output_size == NULL) {
+        ThrowByName(env, "java/lang/NullPointerException", "size");
+        return 0;
+    }
+
     do {
         native_module = env->GetStringUTFChars(moduleName, NULL);
         if (native_module == NULL)
@@ -529,25 +556,47 @@
         // Store if there is room in the array
         // Concatenate to get full path
         char fullpath[IMAGE_MAX_PATH];
-        fullpath[0] = '\0';
-        if (*module != '\0') {
-            strncpy(fullpath, "/", IMAGE_MAX_PATH - 1);
-            strncat(fullpath, module, IMAGE_MAX_PATH - 1);
-            strncat(fullpath, "/", IMAGE_MAX_PATH - 1);
+        size_t moduleLen = strlen(module);
+        size_t packageLen = strlen(package);
+        size_t nameLen = strlen(name);
+        size_t extLen = strlen(extension);
+        size_t index;
+
+        if (1 + moduleLen + 1 + packageLen + 1 + nameLen + 1 + extLen + 1 > IMAGE_MAX_PATH) {
+            ThrowByName(env, "java/lang/InternalError", "concatenated name too long");
+            return true;
         }
-        if (*package != '\0') {
-            strncat(fullpath, package, IMAGE_MAX_PATH - 1);
-            strncat(fullpath, "/", IMAGE_MAX_PATH - 1);
+
+        index = 0;
+        if (moduleLen > 0) {
+            fullpath[index++] = '/';
+            memcpy(&fullpath[index], module, moduleLen);
+            index += moduleLen;
+            fullpath[index++] = '/';
         }
-        strncat(fullpath, name, IMAGE_MAX_PATH - 1);
-        if (*extension != '\0') {
-            strncat(fullpath, ".", IMAGE_MAX_PATH - 1);
-            strncat(fullpath, extension, IMAGE_MAX_PATH - 1);
+        if (packageLen > 0) {
+            memcpy(&fullpath[index], package, packageLen);
+            index += packageLen;
+            fullpath[index++] = '/';
         }
+        memcpy(&fullpath[index], name, nameLen);
+        index += nameLen;
+        if (extLen > 0) {
+            fullpath[index++] = '.';
+            memcpy(&fullpath[index], extension, extLen);
+            index += extLen;
+        }
+        fullpath[index++] = '\0';
+
         jobject str = env->NewStringUTF(fullpath);
-        JNU_CHECK_EXCEPTION_RETURN(env, true);
+        if (env->ExceptionCheck()) {
+            return true;
+        }
+
         env->SetObjectArrayElement(vdata->array, vdata->size, str);
-        JNU_CHECK_EXCEPTION_RETURN(env, true);
+        if (env->ExceptionCheck()) {
+            return true;
+        }
     }
     vdata->size++; // always count so the total size is returned
     return true;
@@ -584,7 +633,10 @@
     jstring module = NULL;
 
     native_package = env->GetStringUTFChars(package_name, NULL);
-    JNU_CHECK_EXCEPTION_RETURN(env, NULL);
+    if (env->ExceptionCheck()) {
+        return NULL;
+    }
+
 
     native_module = JIMAGE_PackageToModule((JImageFile*) jimageHandle, native_package);
     if (native_module != NULL) {
--- a/src/java.base/share/native/libjimage/jimage.cpp	Tue Nov 03 14:00:01 2015 +0300
+++ b/src/java.base/share/native/libjimage/jimage.cpp	Tue Nov 03 12:04:12 2015 -0800
@@ -102,14 +102,29 @@
 extern "C" JImageLocationRef JIMAGE_FindResource(JImageFile* image,
         const char* module_name, const char* version, const char* name,
         jlong* size) {
-    ImageLocation location;
+    // Concatenate to get full path
     char fullpath[IMAGE_MAX_PATH];
+    size_t moduleNameLen = strlen(module_name);
+    size_t nameLen = strlen(name);
+    size_t index;
 
-    // Concatenate to get full path
-    strncpy(fullpath, "/", IMAGE_MAX_PATH - 1);
-    strncat(fullpath, module_name, IMAGE_MAX_PATH - 1);
-    strncat(fullpath, "/", IMAGE_MAX_PATH - 1);
-    strncat(fullpath, name, IMAGE_MAX_PATH - 1);
+    // TBD:   assert(moduleNameLen > 0 && "module name must be non-empty");
+    assert(nameLen > 0 && "name must non-empty");
+
+    // If the concatenated string is too long for the buffer, return not found
+    if (1 + moduleNameLen + 1 + nameLen + 1 > IMAGE_MAX_PATH) {
+        return 0L;
+    }
+
+    index = 0;
+    fullpath[index++] = '/';
+    memcpy(&fullpath[index], module_name, moduleNameLen);
+    index += moduleNameLen;
+    fullpath[index++] = '/';
+    memcpy(&fullpath[index], name, nameLen);
+    index += nameLen;
+    fullpath[index++] = '\0';
+
     JImageLocationRef loc =
             (JImageLocationRef) ((ImageFileReader*) image)->find_location_index(fullpath, (u8*) size);
     return loc;
--- a/src/java.management/share/classes/com/sun/jmx/mbeanserver/DefaultMXBeanMappingFactory.java	Tue Nov 03 14:00:01 2015 +0300
+++ b/src/java.management/share/classes/com/sun/jmx/mbeanserver/DefaultMXBeanMappingFactory.java	Tue Nov 03 12:04:12 2015 -0800
@@ -60,6 +60,7 @@
 
 import javax.management.JMX;
 import javax.management.ObjectName;
+import javax.management.ConstructorParameters;
 import javax.management.openmbean.ArrayType;
 import javax.management.openmbean.CompositeData;
 import javax.management.openmbean.CompositeDataInvocationHandler;
@@ -1132,8 +1133,8 @@
     }
 
     /** Builder for when the target class has a constructor that is
-        annotated with @ConstructorProperties so we can see the correspondence
-        to getters.  */
+        annotated with {@linkplain ConstructorParameters &#64;ConstructorParameters}
+        or {@code @ConstructorProperties} so we can see the correspondence to getters.  */
     private static final class CompositeBuilderViaConstructor
             extends CompositeBuilder {
 
@@ -1141,10 +1142,19 @@
             super(targetClass, itemNames);
         }
 
+        private String[] getConstPropValues(Constructor<?> ctr) {
+            // is constructor annotated by javax.management.ConstructorParameters ?
+            ConstructorParameters ctrProps = ctr.getAnnotation(ConstructorParameters.class);
+            if (ctrProps != null) {
+                return ctrProps.value();
+            } else {
+                // try the legacy java.beans.ConstructorProperties annotation
+                String[] vals = JavaBeansAccessor.getConstructorPropertiesValue(ctr);
+                return vals;
+            }
+        }
+
         String applicable(Method[] getters) throws InvalidObjectException {
-            if (!JavaBeansAccessor.isAvailable())
-                return "@ConstructorProperties annotation not available";
-
             Class<?> targetClass = getTargetClass();
             Constructor<?>[] constrs = targetClass.getConstructors();
 
@@ -1152,12 +1162,13 @@
             List<Constructor<?>> annotatedConstrList = newList();
             for (Constructor<?> constr : constrs) {
                 if (Modifier.isPublic(constr.getModifiers())
-                        && JavaBeansAccessor.getConstructorPropertiesValue(constr) != null)
+                        && getConstPropValues(constr) != null)
                     annotatedConstrList.add(constr);
             }
 
             if (annotatedConstrList.isEmpty())
-                return "no constructor has @ConstructorProperties annotation";
+                return "no constructor has either @ConstructorParameters " +
+                       "or @ConstructorProperties annotation";
 
             annotatedConstructors = newList();
 
@@ -1181,13 +1192,17 @@
             // so we can test unambiguity.
             Set<BitSet> getterIndexSets = newSet();
             for (Constructor<?> constr : annotatedConstrList) {
-                String[] propertyNames = JavaBeansAccessor.getConstructorPropertiesValue(constr);
+                String annotationName =
+                    constr.isAnnotationPresent(ConstructorParameters.class) ?
+                        "@ConstructorParameters" : "@ConstructorProperties";
+
+                String[] propertyNames = getConstPropValues(constr);
 
                 Type[] paramTypes = constr.getGenericParameterTypes();
                 if (paramTypes.length != propertyNames.length) {
                     final String msg =
                         "Number of constructor params does not match " +
-                        "@ConstructorProperties annotation: " + constr;
+                        annotationName + " annotation: " + constr;
                     throw new InvalidObjectException(msg);
                 }
 
@@ -1200,7 +1215,7 @@
                     String propertyName = propertyNames[i];
                     if (!getterMap.containsKey(propertyName)) {
                         String msg =
-                            "@ConstructorProperties includes name " + propertyName +
+                            annotationName + " includes name " + propertyName +
                             " which does not correspond to a property";
                         for (String getterName : getterMap.keySet()) {
                             if (getterName.equalsIgnoreCase(propertyName)) {
@@ -1215,7 +1230,7 @@
                     paramIndexes[getterIndex] = i;
                     if (present.get(getterIndex)) {
                         final String msg =
-                            "@ConstructorProperties contains property " +
+                            annotationName + " contains property " +
                             propertyName + " more than once: " + constr;
                         throw new InvalidObjectException(msg);
                     }
@@ -1224,7 +1239,7 @@
                     Type propertyType = getter.getGenericReturnType();
                     if (!propertyType.equals(paramTypes[i])) {
                         final String msg =
-                            "@ConstructorProperties gives property " + propertyName +
+                            annotationName + " gives property " + propertyName +
                             " of type " + propertyType + " for parameter " +
                             " of type " + paramTypes[i] + ": " + constr;
                         throw new InvalidObjectException(msg);
@@ -1233,7 +1248,8 @@
 
                 if (!getterIndexSets.add(present)) {
                     final String msg =
-                        "More than one constructor has a @ConstructorProperties " +
+                        "More than one constructor has " +
+                        "@ConstructorParameters or @ConstructorProperties " +
                         "annotation with this set of names: " +
                         Arrays.toString(propertyNames);
                     throw new InvalidObjectException(msg);
@@ -1252,10 +1268,10 @@
              * just the bigger constructor.
              *
              * The algorithm here is quadratic in the number of constructors
-             * with a @ConstructorProperties annotation.  Typically this corresponds
-             * to the number of versions of the class there have been.  Ten
-             * would already be a large number, so although it's probably
-             * possible to have an O(n lg n) algorithm it wouldn't be
+             * with a @ConstructorParameters or @ConstructructorProperties annotation.
+             * Typically this corresponds to the number of versions of the class
+             * there have been.  Ten would already be a large number, so although
+             * it's probably possible to have an O(n lg n) algorithm it wouldn't be
              * worth the complexity.
              */
             for (BitSet a : getterIndexSets) {
@@ -1272,8 +1288,9 @@
                                  i = u.nextSetBit(i+1))
                                 names.add(itemNames[i]);
                             final String msg =
-                                "Constructors with @ConstructorProperties annotation " +
-                                " would be ambiguous for these items: " +
+                                "Constructors with @ConstructorParameters or " +
+                                "@ConstructorProperties annotation " +
+                                "would be ambiguous for these items: " +
                                 names;
                             throw new InvalidObjectException(msg);
                         }
@@ -1310,7 +1327,8 @@
 
             if (max == null) {
                 final String msg =
-                    "No constructor has a @ConstructorProperties for this set of " +
+                    "No constructor has either @ConstructorParameters " +
+                    "or @ConstructorProperties annotation for this set of " +
                     "items: " + ct.keySet();
                 throw new InvalidObjectException(msg);
             }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/java.management/share/classes/javax/management/ConstructorParameters.java	Tue Nov 03 12:04:12 2015 -0800
@@ -0,0 +1,76 @@
+/*
+ * Copyright (c) 2006, 2015 Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package javax.management;
+
+import java.lang.annotation.*;
+import static java.lang.annotation.ElementType.*;
+import static java.lang.annotation.RetentionPolicy.*;
+
+/**
+ * <p>
+ * An annotation on a constructor that shows how the parameters of
+ * that constructor correspond to the constructed object's getter
+ * methods.  For example:
+ * </p>
+ * <blockquote>
+ *     <pre>
+ *         public class MemoryUsage {
+ *             // standard JavaBean conventions with getters
+ *             <b>@ConstructorParameters({"init", "used", "committed", "max"})</b>
+ *             public MemoryUsage(long init, long used,
+ *                                long committed, long max) {...}
+ *             public long getInit() {...}
+ *             public long getUsed() {...}
+ *             public long getCommitted() {...}
+ *             public long getMax() {...}
+ *         }
+ *     </pre>
+ * </blockquote>
+ * <p>
+ * The annotation shows that the first parameter of the constructor
+ * can be retrieved with the {@code getInit()} method, the second one with
+ * the {@code getUsed()} method, and so on. Since parameter names are not in
+ * general available at runtime, without the annotation there would be
+ * no way of knowing which parameter corresponds to which property.
+ * </p>
+ * <p>
+ * If a constructor is annotated by the both {@code @java.beans.ConstructorProperties}
+ * and {@code @javax.management.ConstructorParameters} annotations
+ * the JMX introspection will give an absolute precedence to the latter one.
+ * </p>
+ *
+ * @since 1.9
+ */
+@Documented @Target(CONSTRUCTOR) @Retention(RUNTIME)
+public @interface ConstructorParameters {
+    /**
+     * <p>The getter names.</p>
+     *
+     * @return the getter names corresponding to the parameters in the
+     * annotated constructor.
+    */
+    String[] value();
+}
--- a/src/java.management/share/classes/javax/management/MXBean.java	Tue Nov 03 14:00:01 2015 +0300
+++ b/src/java.management/share/classes/javax/management/MXBean.java	Tue Nov 03 12:04:12 2015 -0800
@@ -153,7 +153,7 @@
         <td><pre>
 public class MemoryUsage {
     // standard JavaBean conventions with getters
-    <b>&#64;ConstructorProperties({"init", "used", "committed", "max"})</b>
+    <b>&#64;ConstructorParameters({"init", "used", "committed", "max"})</b>
     public MemoryUsage(long init, long used,
                        long committed, long max) {...}
     long getInit() {...}
@@ -168,8 +168,8 @@
     <p>The definitions are the same in the two cases, except
       that with the MXBean, <code>MemoryUsage</code> no longer needs to
       be marked <code>Serializable</code> (though it can be).  On
-      the other hand, we have added a {@code @ConstructorProperties} annotation
-      to link the constructor parameters to the corresponding getters.
+      the other hand, we have added a {@link ConstructorParameters &#64;ConstructorParameters}
+      annotation to link the constructor parameters to the corresponding getters.
       We will see more about this below.</p>
 
     <p><code>MemoryUsage</code> is a <em>model-specific class</em>.
@@ -850,18 +850,24 @@
         <em>J</em>.</p></li>
 
       <li><p>Otherwise, if <em>J</em> has at least one public
-        constructor with a {@link java.beans.ConstructorProperties
-        ConstructorProperties} annotation, then one
-        of those constructors (not necessarily always the same one)
-        will be called to reconstruct an instance of <em>J</em>.
+        constructor with either {@link javax.management.ConstructorParameters
+        &#64;javax.management.ConstructorParameters} or
+        {@code @java.beans.ConstructoProperties} annotation, then one of those
+        constructors (not necessarily always the same one) will be called to
+        reconstruct an instance of <em>J</em>.
+        If a constructor is annotated with both
+        {@code @javax.management.ConstructorParameters} and
+        {@code @java.beans.ConstructorProperties},
+        {@code @javax.management.ConstructorParameters} will be used and
+        {@code @java.beans.ConstructorProperties} will be ignored.
         Every such annotation must list as many strings as the
         constructor has parameters; each string must name a property
         corresponding to a getter of <em>J</em>; and the type of this
         getter must be the same as the corresponding constructor
         parameter.  It is not an error for there to be getters that
-        are not mentioned in the {@code ConstructorProperties} annotation
-        (these may correspond to information that is not needed to
-        reconstruct the object).</p>
+        are not mentioned in the {@code @ConstructorParameters} or
+        {@code @ConstructorProperties} annotations (these may correspond to
+        information that is not needed to reconstruct the object).</p>
 
         <p>An instance of <em>J</em> is reconstructed by calling a
         constructor with the appropriate reconstructed items from the
@@ -871,9 +877,10 @@
         CompositeData} might come from an earlier version of
         <em>J</em> where not all the items were present.  A
         constructor is <em>applicable</em> if all the properties named
-        in its {@code ConstructorProperties} annotation are present as items
-        in the {@code CompositeData}.  If no constructor is
-        applicable, then the attempt to reconstruct <em>J</em> fails.</p>
+        in its {@code @ConstructorParameters} or {@code @ConstructorProperties}
+        annotation are present as items in the {@code CompositeData}.
+        If no constructor is applicable, then the attempt to reconstruct
+        <em>J</em> fails.</p>
 
         <p>For any possible combination of properties, it must be the
         case that either (a) there are no applicable constructors, or
@@ -909,8 +916,9 @@
       <li><p>Otherwise, <em>J</em> is not reconstructible.</p></li>
     </ol>
 
-    <p>Rule 2 is not applicable to subset Profiles of Java SE that do not
-    include the {@code java.beans} package. When targeting a runtime that does
+    <p>When only {@code @java.beans.ConstructorProperties} is present then
+    rule 2 is not applicable to subset Profiles of Java SE that do not include
+    the {@code java.beans} package. When targeting a runtime that does
     not include the {@code java.beans} package, and where there is a mismatch
     between the compile-time and runtime environment whereby <em>J</em> is
     compiled with a public constructor and the {@code ConstructorProperties}
@@ -957,14 +965,14 @@
         </blockquote>
       </li>
 
-      <li>Public constructor with <code>&#64;ConstructorProperties</code> annotation:
+      <li>Public constructor with <code>&#64;ConstructorParameters</code> annotation:
 
         <blockquote>
           <pre>
 public class NamedNumber {
     public int getNumber() {return number;}
     public String getName() {return name;}
-    <b>&#64;ConstructorProperties({"number", "name"})
+    <b>&#64;ConstructorParameters({"number", "name"})
     public NamedNumber(int number, String name)</b> {
         this.number = number;
         this.name = name;
--- a/src/java.rmi/unix/bin/java-rmi.cgi.sh	Tue Nov 03 14:00:01 2015 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,74 +0,0 @@
-#!/bin/sh
-
-#
-# Copyright (c) 1996, Oracle and/or its affiliates. All rights reserved.
-# 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 executes the Java interpreter, defines properties
-# that correspond to the CGI 1.0 environment variables, and executes
-# the class "sun.rmi.transport.proxy.CGIHandler".  It should be
-# installed in the directory to which the HTTP server maps the
-# URL path "/cgi-bin".
-#
-# (Configuration is necessary as noted below.)
-#
-# This class will support a QUERY_STRING of the form "forward=<port>"
-# with a REQUEST_METHOD "POST".  The body of the request will be
-# forwarded (as another POST request) to the server listening on the
-# specified port (must be >= 1024).  The response from this forwarded
-# request will be the response to the original request.
-#
-# CONFIGURATION:
-#
-# Fill in correct absolute path to Java interpreter below.  For example,
-# the "PATH=" line might be changed to the follow if the JDK is installed
-# at the path "/home/peter/java":
-#
-# PATH=/home/peter/java/bin:$PATH
-#
-PATH=/usr/local/java/bin:$PATH
-exec java \
-	-DAUTH_TYPE="$AUTH_TYPE" \
-	-DCONTENT_LENGTH="$CONTENT_LENGTH" \
-	-DCONTENT_TYPE="$CONTENT_TYPE" \
-	-DGATEWAY_INTERFACE="$GATEWAY_INTERFACE" \
-	-DHTTP_ACCEPT="$HTTP_ACCEPT" \
-	-DPATH_INFO="$PATH_INFO" \
-	-DPATH_TRANSLATED="$PATH_TRANSLATED" \
-	-DQUERY_STRING="$QUERY_STRING" \
-	-DREMOTE_ADDR="$REMOTE_ADDR" \
-	-DREMOTE_HOST="$REMOTE_HOST" \
-	-DREMOTE_IDENT="$REMOTE_IDENT" \
-	-DREMOTE_USER="$REMOTE_USER" \
-	-DREQUEST_METHOD="$REQUEST_METHOD" \
-	-DSCRIPT_NAME="$SCRIPT_NAME" \
-	-DSERVER_NAME="$SERVER_NAME" \
-	-DSERVER_PORT="$SERVER_PORT" \
-	-DSERVER_PROTOCOL="$SERVER_PROTOCOL" \
-	-DSERVER_SOFTWARE="$SERVER_SOFTWARE" \
-	sun.rmi.transport.proxy.CGIHandler
--- a/src/jdk.zipfs/share/classes/jdk/nio/zipfs/ZipUtils.java	Tue Nov 03 14:00:01 2015 +0300
+++ b/src/jdk.zipfs/share/classes/jdk/nio/zipfs/ZipUtils.java	Tue Nov 03 12:04:12 2015 -0800
@@ -27,8 +27,10 @@
 
 import java.io.IOException;
 import java.io.OutputStream;
+import java.time.Instant;
+import java.time.LocalDateTime;
+import java.time.ZoneId;
 import java.util.Arrays;
-import java.util.Date;
 import java.util.regex.PatternSyntaxException;
 import java.util.concurrent.TimeUnit;
 
@@ -103,30 +105,35 @@
     /*
      * Converts DOS time to Java time (number of milliseconds since epoch).
      */
-    @SuppressWarnings("deprecation")
     public static long dosToJavaTime(long dtime) {
-        Date d = new Date((int)(((dtime >> 25) & 0x7f) + 80),
-                          (int)(((dtime >> 21) & 0x0f) - 1),
-                          (int)((dtime >> 16) & 0x1f),
-                          (int)((dtime >> 11) & 0x1f),
-                          (int)((dtime >> 5) & 0x3f),
-                          (int)((dtime << 1) & 0x3e));
-        return d.getTime();
+        LocalDateTime ldt = LocalDateTime.of(
+                (int) (((dtime >> 25) & 0x7f) + 1980),
+                (int) ((dtime >> 21) & 0x0f),
+                (int) ((dtime >> 16) & 0x1f),
+                (int) ((dtime >> 11) & 0x1f),
+                (int) ((dtime >> 5) & 0x3f),
+                (int) ((dtime << 1) & 0x3e));
+        return TimeUnit.MILLISECONDS.convert(ldt.toEpochSecond(
+                ZoneId.systemDefault().getRules().getOffset(ldt)), TimeUnit.SECONDS);
     }
 
     /*
      * Converts Java time to DOS time.
      */
-    @SuppressWarnings("deprecation")
     public static long javaToDosTime(long time) {
-        Date d = new Date(time);
-        int year = d.getYear() + 1900;
-        if (year < 1980) {
+        Instant instant = Instant.ofEpochMilli(time);
+        LocalDateTime ldt = LocalDateTime.ofInstant(
+                instant, ZoneId.systemDefault());
+        int year = ldt.getYear() - 1980;
+        if (year < 0) {
             return (1 << 21) | (1 << 16);
         }
-        return (year - 1980) << 25 | (d.getMonth() + 1) << 21 |
-               d.getDate() << 16 | d.getHours() << 11 | d.getMinutes() << 5 |
-               d.getSeconds() >> 1;
+        return (year << 25 |
+            ldt.getMonthValue() << 21 |
+            ldt.getDayOfMonth() << 16 |
+            ldt.getHour() << 11 |
+            ldt.getMinute() << 5 |
+            ldt.getSecond() >> 1) & 0xffffffffL;
     }
 
 
--- a/test/ProblemList.txt	Tue Nov 03 14:00:01 2015 +0300
+++ b/test/ProblemList.txt	Tue Nov 03 12:04:12 2015 -0800
@@ -300,9 +300,6 @@
 # 8074580
 sun/security/pkcs11/rsa/TestKeyPairGenerator.java               generic-all
 
-# 8139860
-com/oracle/security/ucrypto/TestRSA.java			solaris-all
-
 ############################################################################
 
 # jdk_sound
--- a/test/com/oracle/security/ucrypto/TestRSA.java	Tue Nov 03 14:00:01 2015 +0300
+++ b/test/com/oracle/security/ucrypto/TestRSA.java	Tue Nov 03 12:04:12 2015 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -171,17 +171,24 @@
         return kpg.generateKeyPair();
     }
 
-    private static KeyPair genPredefinedRSAKeyPair() throws Exception {
-        KeyFactory kf = KeyFactory.getInstance("RSA");
-        BigInteger mod = new BigInteger(MOD);
-        BigInteger pub = new BigInteger(PUB_EXP);
+    private static KeyPair genPredefinedRSAKeyPair(String prov) throws Exception {
+        KeyFactory kf;
+        if (prov == null) {
+            kf = KeyFactory.getInstance("RSA");
+            System.out.println("Using default KeyFactory:  "+kf.getProvider().getName());
+        } else {
+            kf = KeyFactory.getInstance("RSA", prov);
+            System.out.println("Using specified KeyFactory:  "+kf.getProvider().getName());
+        }
+        BigInteger mod = new BigInteger(1, MOD);
+        BigInteger pub = new BigInteger(1, PUB_EXP);
 
         PrivateKey privKey = kf.generatePrivate
             (new RSAPrivateCrtKeySpec
-             (mod, pub, new BigInteger(PRIV_EXP),
-              new BigInteger(PRIME_P), new BigInteger(PRIME_Q),
-              new BigInteger(EXP_P), new BigInteger(EXP_Q),
-              new BigInteger(CRT_COEFF)));
+             (mod, pub, new BigInteger(1, PRIV_EXP),
+              new BigInteger(1, PRIME_P), new BigInteger(1, PRIME_Q),
+              new BigInteger(1, EXP_P), new BigInteger(1, EXP_Q),
+              new BigInteger(1, CRT_COEFF)));
         PublicKey pubKey = kf.generatePublic(new RSAPublicKeySpec(mod, pub));
         return new KeyPair(pubKey, privKey);
     }
@@ -210,11 +217,20 @@
 
     public void doTest(Provider prov) throws Exception {
         // first test w/ predefine KeyPair
-        KeyPair pkp = genPredefinedRSAKeyPair();
         System.out.println("Test against Predefined RSA Key Pair");
+        KeyPair pkp = genPredefinedRSAKeyPair("SunPKCS11-Solaris");
         testCipher(pkp, 128, true, prov);
         testSignature(pkp, true, prov);
 
+        pkp = genPredefinedRSAKeyPair("SunRsaSign");
+        testCipher(pkp, 128, true, prov);
+        testSignature(pkp, true, prov);
+
+        pkp = genPredefinedRSAKeyPair(null);
+        testCipher(pkp, 128, true, prov);
+        testSignature(pkp, true, prov);
+
+        System.out.println("Running key length test loop");
         for (int i = 0; i < 10; i++) {
             // then test w/ various key lengths
             int keyLens[] = { 1024, 2048 };
--- a/test/java/lang/ProcessHandle/TEST.properties	Tue Nov 03 14:00:01 2015 +0300
+++ b/test/java/lang/ProcessHandle/TEST.properties	Tue Nov 03 12:04:12 2015 -0800
@@ -1,4 +1,4 @@
 # ProcessHandle tests use TestNG
 TestNG.dirs = .
 lib.dirs = /lib/testlibrary
-
+modules = jdk.management
--- a/test/java/lang/ProcessHandle/TreeTest.java	Tue Nov 03 14:00:01 2015 +0300
+++ b/test/java/lang/ProcessHandle/TreeTest.java	Tue Nov 03 12:04:12 2015 -0800
@@ -27,9 +27,11 @@
 import java.time.Duration;
 import java.time.Instant;
 import java.util.Arrays;
+import java.util.Collections;
 import java.util.List;
 import java.util.Set;
 import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.CountDownLatch;
 import java.util.concurrent.TimeUnit;
 import java.util.stream.Collectors;
 import java.util.stream.Stream;
@@ -44,6 +46,7 @@
  * @library /lib/testlibrary
  * Test counting and JavaChild.spawning and counting of Processes.
  * @run testng/othervm InfoTest
+ * @key intermittent
  * @author Roger Riggs
  */
 public class TreeTest extends ProcessUtil {
@@ -195,7 +198,7 @@
                     allChildren.stream().map(p -> p.getPid())
                             .collect(Collectors.toList()));
 
-            // Verify that all spawned children show up in the allChildrenList
+            // Verify that all spawned children show up in the allChildren List
             processes.forEach((p, parent) -> {
                 Assert.assertEquals(p.isAlive(), true, "Child should be alive: " + p);
                 Assert.assertTrue(allChildren.contains(p), "Spawned child should be listed in allChildren: " + p);
@@ -241,6 +244,7 @@
             printf(" p1: %s%n", p1.getPid());
 
             int newChildren = 3;
+            CountDownLatch spawnCount = new CountDownLatch(newChildren);
             // Spawn children and have them wait
             p1.sendAction("spawn", newChildren, "stdin");
 
@@ -251,11 +255,26 @@
                     Long child = Long.valueOf(split[2]);
                     Long parent = Long.valueOf(split[0].split(":")[0]);
                     processes.put(ProcessHandle.of(child).get(), ProcessHandle.of(parent).get());
+                    spawnCount.countDown();
                 }
             });
 
-            // Wait for the new processes and save the list
-            List<ProcessHandle> allChildren = waitForAllChildren(p1Handle, newChildren);
+            // Wait for all the subprocesses to be listed as started
+            Assert.assertTrue(spawnCount.await(Utils.adjustTimeout(30L), TimeUnit.SECONDS),
+                    "Timeout waiting for processes to start");
+
+            // Debugging; list allChildren that are not expected in processes
+            List<ProcessHandle> allChildren = ProcessUtil.getAllChildren(p1Handle);
+            long count = allChildren.stream()
+                    .filter(ph -> !processes.containsKey(ph))
+                    .count();
+            if (count > 0) {
+                allChildren.stream()
+                    .filter(ph -> !processes.containsKey(ph))
+                    .forEach(ph1 -> ProcessUtil.printProcess(ph1, "Extra process: "));
+                ProcessUtil.logTaskList();
+                Assert.assertEquals(0, count, "Extra processes in allChildren");
+            }
 
             // Verify that all spawned children are alive, show up in the allChildren list
             // then destroy them
@@ -266,6 +285,7 @@
             });
             Assert.assertEquals(processes.size(), newChildren, "Wrong number of children");
 
+            // Wait for each of the processes to exit
             processes.forEach((p, parent) ->  {
                 for (long retries = Utils.adjustTimeout(100L); retries > 0 ; retries--) {
                     if (!p.isAlive()) {
@@ -285,8 +305,10 @@
             p1.destroyForcibly();
             p1.waitFor();
 
+            // Verify that none of the spawned children are still listed by allChildren
             List<ProcessHandle> remaining = getAllChildren(self);
-            remaining = remaining.stream().filter(processes::contains).collect(Collectors.toList());
+            Assert.assertFalse(remaining.remove(p1Handle), "Child p1 should have exited");
+            remaining = remaining.stream().filter(processes::containsKey).collect(Collectors.toList());
             Assert.assertEquals(remaining.size(), 0, "Subprocess(es) should have exited: " + remaining);
 
         } catch (IOException ioe) {
@@ -354,6 +376,8 @@
      */
     @Test
     public static void test5() {
+        ConcurrentHashMap<ProcessHandle, ProcessHandle> processes = new ConcurrentHashMap<>();
+
         int factor = 2;
         JavaChild p1 = null;
         Instant start = Instant.now();
@@ -374,11 +398,39 @@
             p1.sendAction("child", "child", "spawn", factor, "stdin");
 
             int newChildren = factor * (1 + factor * (1 + factor));
-            List<ProcessHandle> children = ProcessUtil.waitForAllChildren(p1Handle, newChildren);
+            CountDownLatch spawnCount = new CountDownLatch(newChildren);
+
+            // Gather the PIDs from the output of the spawning process
+            p1.forEachOutputLine((s) -> {
+                String[] split = s.trim().split(" ");
+                if (split.length == 3 && split[1].equals("spawn")) {
+                    Long child = Long.valueOf(split[2]);
+                    Long parent = Long.valueOf(split[0].split(":")[0]);
+                    processes.put(ProcessHandle.of(child).get(), ProcessHandle.of(parent).get());
+                    spawnCount.countDown();
+                }
+            });
+
+            // Wait for all the subprocesses to be listed as started
+            Assert.assertTrue(spawnCount.await(Utils.adjustTimeout(30L), TimeUnit.SECONDS),
+                    "Timeout waiting for processes to start");
+
+            // Debugging; list allChildren that are not expected in processes
+            List<ProcessHandle> allChildren = ProcessUtil.getAllChildren(p1Handle);
+            long count = allChildren.stream()
+                    .filter(ph -> !processes.containsKey(ph))
+                    .count();
+            if (count > 0) {
+                allChildren.stream()
+                    .filter(ph -> !processes.containsKey(ph))
+                    .forEach(ph1 -> ProcessUtil.printProcess(ph1, "Extra process: "));
+                ProcessUtil.logTaskList();
+                Assert.assertEquals(0, count, "Extra processes in allChildren");
+            }
 
             Assert.assertEquals(getChildren(p1Handle).size(),
                     factor, "expected direct children");
-            long count = getAllChildren(p1Handle).size();
+            count = getAllChildren(p1Handle).size();
             long totalChildren = factor * factor * factor + factor * factor + factor;
             Assert.assertTrue(count >= totalChildren,
                     "expected at least " + totalChildren + ", actual: " + count);
@@ -397,6 +449,12 @@
             if (p1 != null) {
                 p1.destroyForcibly();
             }
+            processes.forEach((p, parent) -> {
+                if (p.isAlive()) {
+                    ProcessUtil.printProcess(p, "Process Cleanup: ");
+                    p.destroyForcibly();
+                }
+            });
         }
     }
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/lang/String/EqualsIgnoreCase.java	Tue Nov 03 12:04:12 2015 -0800
@@ -0,0 +1,104 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * 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 8138824
+ * @summary Test expected equalsIgnoreCase behavior for some known asymmetric case mappings
+ */
+
+public class EqualsIgnoreCase {
+    private static final String SMALL_I = "i";
+    private static final String CAPITAL_I = "I";
+    // Characters that do not map symmetrically between upper/lower case
+    private static final String SMALL_DOTLESS_I = "\u0131";
+    private static final String CAPITAL_I_WITH_DOT = "\u0130";
+    private static final String LOWER_GREEK_THETA = "\u03D1";
+    private static final String CAPITAL_GREEK_THETA = "\u03F4";
+
+    public static void main(String[] args) {
+        compareFuncs(SMALL_I, CAPITAL_I, true, true);
+        compareFuncs(CAPITAL_I_WITH_DOT, SMALL_DOTLESS_I, true, false);
+        compareFuncs(LOWER_GREEK_THETA, CAPITAL_GREEK_THETA, true, false);
+    }
+
+    /**
+     * Compare the actual results of equalsIgnoreCase():
+     *   toUpperCase(toLowerCase(eachChar))
+     * to the behavior described in the equalsIgnoreCase() spec prior to 8138824:
+     *   toUpperCase(eachChar)
+     *   toLowerCase(eachChar)
+     *
+     * @param s1 A string
+     * @param s2 Another string
+     * @param expectEquals Expected result of equalsIgnoreCase()
+     * @param expectTuTl Expected result of toUpperToLowerOriginals()
+     */
+    private static void compareFuncs(String s1, String s2, boolean expectEquals, boolean expectTuTl) {
+        System.out.println(s1 + ", " + s2);
+        boolean equalsResult = s1.equalsIgnoreCase(s2);
+        System.out.println("equalsIgnoreCase:" + equalsResult);
+
+        boolean tuTlResult = toUpperToLowerOriginals(s1, s2);
+        System.out.println("tUtLO:" + tuTlResult);
+        boolean failed = false;
+
+        if (equalsResult != expectEquals) {
+            System.out.println("Expected " + expectEquals + " from equalsIgnoreCase() but got " + equalsResult);
+            failed = true;
+        }
+        if (tuTlResult != expectTuTl) {
+            System.out.println("Expected " + expectTuTl + " from toUpperToLowerOriginals() but got " + tuTlResult);
+            failed = true;
+        }
+        if (failed) { throw new RuntimeException("Test Failed"); }
+    }
+
+    /**
+     * Apply toUpperCase() and toLowerCase() to corresponding chars of both
+     * Strings.  Returns true if each pair of corresponding chars are either:
+     *   1. == after both are converted to upper case
+     * or
+     *   2. == after both are converted to lower case
+     * and the String lengths are equal.
+     */
+    private static boolean toUpperToLowerOriginals(String str1, String str2) {
+        if (str1.length() != str2.length()) { return false; }
+        for (int i = 0; i < str1.length(); i++) {
+            char c1 = str1.charAt(i);
+            char c2 = str2.charAt(i);
+
+            char uc1 = Character.toUpperCase(c1);
+            char uc2 = Character.toUpperCase(c2);
+            boolean upperMatch = uc1 == uc2;
+
+            char lc1 = Character.toLowerCase(c1);
+            char lc2 = Character.toLowerCase(c2);
+            boolean lowerMatch = lc1 == lc2;
+
+            if (!(upperMatch || lowerMatch)) {
+                return false;
+            }
+        }
+        return true;
+    }
+}
--- a/test/java/lang/annotation/AnnotationType/AnnotationTypeDeadlockTest.java	Tue Nov 03 14:00:01 2015 +0300
+++ b/test/java/lang/annotation/AnnotationType/AnnotationTypeDeadlockTest.java	Tue Nov 03 12:04:12 2015 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
  * @test
  * @bug 7122142
  * @summary Test deadlock situation when recursive annotations are parsed
+ * @modules java.management
  */
 
 import java.lang.annotation.Retention;
--- a/test/java/lang/instrument/AddTransformerTest.java	Tue Nov 03 14:00:01 2015 +0300
+++ b/test/java/lang/instrument/AddTransformerTest.java	Tue Nov 03 12:04:12 2015 -0800
@@ -27,7 +27,6 @@
  * @summary confirms that added transformers all really run
  * @author Gabriel Adauto, Wily Technology
  *
- * @modules java.instrument
  * @run build AddTransformerTest ATransformerManagementTestCase
  * @run shell MakeJAR.sh redefineAgent
  * @run main/othervm -javaagent:redefineAgent.jar AddTransformerTest AddTransformerTest
--- a/test/java/lang/instrument/AppendToBootstrapClassPathTest.java	Tue Nov 03 14:00:01 2015 +0300
+++ b/test/java/lang/instrument/AppendToBootstrapClassPathTest.java	Tue Nov 03 12:04:12 2015 -0800
@@ -27,7 +27,6 @@
  * @summary simple test for the Boot-Class-Path manifest attribute
  * @author Gabriel Adauto, Wily Technology, Robert Field, Sun Microsystems
  *
- * @modules java.instrument
  * @run build AppendToBootstrapClassPathTest ExampleForBootClassPath
  * @run shell AppendToBootstrapClassPathSetUp.sh
  * @run shell MakeJAR.sh bootclasspathAgent
--- a/test/java/lang/instrument/AppendToClassPathTest.java	Tue Nov 03 14:00:01 2015 +0300
+++ b/test/java/lang/instrument/AppendToClassPathTest.java	Tue Nov 03 12:04:12 2015 -0800
@@ -27,7 +27,6 @@
  * @summary simple test for the Class-Path manifest attribute
  * @author Gabriel Adauto, Wily Technology; Robert Field, Sun Microsystems
  *
- * @modules java.instrument
  * @run build AppendToClassPathTest
  * @run shell AppendToClassPathSetUp.sh
  * @run shell MakeJAR.sh classpathAgent
--- a/test/java/lang/instrument/BootClassPath/BootClassPathTest.sh	Tue Nov 03 14:00:01 2015 +0300
+++ b/test/java/lang/instrument/BootClassPath/BootClassPathTest.sh	Tue Nov 03 12:04:12 2015 -0800
@@ -27,7 +27,6 @@
 #          attribute.
 #
 # @key intermittent
-# @modules java.instrument
 # @run shell/timeout=240 BootClassPathTest.sh
 
 if [ "${TESTJAVA}" = "" ]
--- a/test/java/lang/instrument/FromShutdownHook.java	Tue Nov 03 14:00:01 2015 +0300
+++ b/test/java/lang/instrument/FromShutdownHook.java	Tue Nov 03 12:04:12 2015 -0800
@@ -26,7 +26,6 @@
  * @bug 5050487
  * @summary Check that Instrumentation methods can execute from a runtime
  *          shutdown hook
- * @modules java.instrument
  * @run build FromShutdownHook
  * @run shell MakeJAR.sh basicAgent
  * @run main/othervm -javaagent:basicAgent.jar FromShutdownHook FromShutdownHook
--- a/test/java/lang/instrument/GetAllLoadedClassesTest.java	Tue Nov 03 14:00:01 2015 +0300
+++ b/test/java/lang/instrument/GetAllLoadedClassesTest.java	Tue Nov 03 12:04:12 2015 -0800
@@ -27,7 +27,6 @@
  * @summary simple tests for getAllLoadedClasses (is Object there? does a newly loaded class show up?)
  * @author Gabriel Adauto, Wily Technology
  *
- * @modules java.instrument
  * @run build GetAllLoadedClassesTest DummyClass
  * @run shell MakeJAR.sh basicAgent
  * @run main/othervm -javaagent:basicAgent.jar GetAllLoadedClassesTest GetAllLoadedClassesTest
--- a/test/java/lang/instrument/GetInitiatedClassesTest.java	Tue Nov 03 14:00:01 2015 +0300
+++ b/test/java/lang/instrument/GetInitiatedClassesTest.java	Tue Nov 03 12:04:12 2015 -0800
@@ -27,7 +27,6 @@
  * @summary simple tests for getInitiatedClasses (does a newly loaded class show up?)
  * @author Gabriel Adauto, Wily Technology
  *
- * @modules java.instrument
  * @run build GetInitiatedClassesTest DummyClass
  * @run shell MakeJAR.sh basicAgent
  * @run main/othervm -javaagent:basicAgent.jar GetInitiatedClassesTest GetInitiatedClassesTest
--- a/test/java/lang/instrument/GetObjectSizeTest.java	Tue Nov 03 14:00:01 2015 +0300
+++ b/test/java/lang/instrument/GetObjectSizeTest.java	Tue Nov 03 12:04:12 2015 -0800
@@ -27,7 +27,6 @@
  * @summary round-trip test for getObjectSize (does it return, and is the result non-zero?)
  * @author Gabriel Adauto, Wily Technology
  *
- * @modules java.instrument
  * @run build GetObjectSizeTest
  * @run shell MakeJAR.sh basicAgent
  * @run main/othervm -javaagent:basicAgent.jar GetObjectSizeTest GetObjectSizeTest
--- a/test/java/lang/instrument/IsModifiableClassAgent.java	Tue Nov 03 14:00:01 2015 +0300
+++ b/test/java/lang/instrument/IsModifiableClassAgent.java	Tue Nov 03 12:04:12 2015 -0800
@@ -27,7 +27,6 @@
  * @summary test isModifiableClass
  * @author Robert Field, Sun Microsystems
  *
- * @modules java.instrument
  * @run build IsModifiableClassApp IsModifiableClassAgent
  * @run shell MakeJAR3.sh IsModifiableClassAgent 'Can-Retransform-Classes: true'
  * @run main/othervm -javaagent:IsModifiableClassAgent.jar IsModifiableClassApp
--- a/test/java/lang/instrument/ManifestTest.sh	Tue Nov 03 14:00:01 2015 +0300
+++ b/test/java/lang/instrument/ManifestTest.sh	Tue Nov 03 12:04:12 2015 -0800
@@ -27,7 +27,6 @@
 # @author Daniel D. Daugherty
 #
 # @key intermittent
-# @modules java.instrument
 # @run build ManifestTestApp ExampleForBootClassPath
 # @run shell/timeout=900 ManifestTest.sh
 #
--- a/test/java/lang/instrument/NativeMethodPrefixAgent.java	Tue Nov 03 14:00:01 2015 +0300
+++ b/test/java/lang/instrument/NativeMethodPrefixAgent.java	Tue Nov 03 12:04:12 2015 -0800
@@ -28,6 +28,8 @@
  * @author Robert Field, Sun Microsystems
  *
  * @modules java.base/jdk.internal.org.objectweb.asm
+ *          java.management
+ *          java.instrument
  * @run shell/timeout=240 MakeJAR2.sh NativeMethodPrefixAgent NativeMethodPrefixApp 'Can-Retransform-Classes: true' 'Can-Set-Native-Method-Prefix: true'
  * @run main/othervm -javaagent:NativeMethodPrefixAgent.jar NativeMethodPrefixApp
  */
--- a/test/java/lang/instrument/NoTransformerAddedTest.java	Tue Nov 03 14:00:01 2015 +0300
+++ b/test/java/lang/instrument/NoTransformerAddedTest.java	Tue Nov 03 12:04:12 2015 -0800
@@ -27,7 +27,6 @@
  * @summary make sure no transformers run when none are registered
  * @author Gabriel Adauto, Wily Technology
  *
- * @modules java.instrument
  * @run build NoTransformerAddedTest
  * @run shell MakeJAR.sh redefineAgent
  * @run main/othervm -javaagent:redefineAgent.jar NoTransformerAddedTest NoTransformerAddedTest
--- a/test/java/lang/instrument/NullGetObjectSizeTest.java	Tue Nov 03 14:00:01 2015 +0300
+++ b/test/java/lang/instrument/NullGetObjectSizeTest.java	Tue Nov 03 12:04:12 2015 -0800
@@ -27,7 +27,6 @@
  * @summary make sure getObjectSize(null) throws NullPointerException.
  * @author Robert Field as modified from the code of Gabriel Adauto, Wily Technology
  *
- * @modules java.instrument
  * @run build NullGetObjectSizeTest
  * @run shell MakeJAR.sh basicAgent
  * @run main/othervm -javaagent:basicAgent.jar NullGetObjectSizeTest NullGetObjectSizeTest
--- a/test/java/lang/instrument/NullRedefineClassesTests.java	Tue Nov 03 14:00:01 2015 +0300
+++ b/test/java/lang/instrument/NullRedefineClassesTests.java	Tue Nov 03 12:04:12 2015 -0800
@@ -27,7 +27,6 @@
  * @summary make sure redefineClasses throws NullPointerException in the right places.
  * @author Robert Field as modified from the code of Gabriel Adauto, Wily Technology
  *
- * @modules java.instrument
  * @run build NullRedefineClassesTests
  * @run shell MakeJAR.sh redefineAgent
  * @run main/othervm -javaagent:redefineAgent.jar NullRedefineClassesTests NullRedefineClassesTests
--- a/test/java/lang/instrument/NullTransformerAddTest.java	Tue Nov 03 14:00:01 2015 +0300
+++ b/test/java/lang/instrument/NullTransformerAddTest.java	Tue Nov 03 12:04:12 2015 -0800
@@ -27,7 +27,6 @@
  * @summary make sure addTransformer(null) throws what it should
  * @author Gabriel Adauto, Wily Technology
  *
- * @modules java.instrument
  * @run build NullTransformerAddTest
  * @run shell MakeJAR.sh redefineAgent
  * @run main/othervm -javaagent:redefineAgent.jar NullTransformerAddTest NullTransformerAddTest
--- a/test/java/lang/instrument/NullTransformerRemoveTest.java	Tue Nov 03 14:00:01 2015 +0300
+++ b/test/java/lang/instrument/NullTransformerRemoveTest.java	Tue Nov 03 12:04:12 2015 -0800
@@ -27,7 +27,6 @@
  * @summary make sure removeTransformer(null) throws NullPointerException
  * @author Robert Field as modified from the code of Gabriel Adauto, Wily Technology
  *
- * @modules java.instrument
  * @run build NullTransformerRemoveTest
  * @run shell MakeJAR.sh redefineAgent
  * @run main/othervm -javaagent:redefineAgent.jar NullTransformerRemoveTest NullTransformerRemoveTest
--- a/test/java/lang/instrument/ParallelTransformerLoader.sh	Tue Nov 03 14:00:01 2015 +0300
+++ b/test/java/lang/instrument/ParallelTransformerLoader.sh	Tue Nov 03 12:04:12 2015 -0800
@@ -26,7 +26,6 @@
 # @summary Test parallel class loading by parallel transformers.
 # @author Daniel D. Daugherty as modified from the code of Daryl Puryear @ Wily
 #
-# @modules java.instrument
 # @run shell MakeJAR3.sh ParallelTransformerLoaderAgent
 # @run build ParallelTransformerLoaderApp
 # @run shell/timeout=240 ParallelTransformerLoader.sh
--- a/test/java/lang/instrument/PremainClass/InheritAgent0010.java	Tue Nov 03 14:00:01 2015 +0300
+++ b/test/java/lang/instrument/PremainClass/InheritAgent0010.java	Tue Nov 03 12:04:12 2015 -0800
@@ -27,7 +27,6 @@
  * @summary test config (0,0,1,0): declared 2-arg in agent class
  * @author Daniel D. Daugherty, Sun Microsystems
  *
- * @modules java.instrument
  * @run shell ../MakeJAR3.sh InheritAgent0010
  * @run main/othervm -javaagent:InheritAgent0010.jar DummyMain
  */
--- a/test/java/lang/instrument/PremainClass/InheritAgent0011.java	Tue Nov 03 14:00:01 2015 +0300
+++ b/test/java/lang/instrument/PremainClass/InheritAgent0011.java	Tue Nov 03 12:04:12 2015 -0800
@@ -27,7 +27,6 @@
  * @summary test config (0,0,1,1): declared 2-arg and declared 1-arg in agent class
  * @author Daniel D. Daugherty, Sun Microsystems
  *
- * @modules java.instrument
  * @run shell ../MakeJAR3.sh InheritAgent0011
  * @run main/othervm -javaagent:InheritAgent0011.jar DummyMain
  */
--- a/test/java/lang/instrument/PremainClass/InheritAgent0110.java	Tue Nov 03 14:00:01 2015 +0300
+++ b/test/java/lang/instrument/PremainClass/InheritAgent0110.java	Tue Nov 03 12:04:12 2015 -0800
@@ -27,7 +27,6 @@
  * @summary test config (0,1,1,0): inherited 1-arg and declared 2-arg in agent class
  * @author Daniel D. Daugherty, Sun Microsystems
  *
- * @modules java.instrument
  * @run shell ../MakeJAR3.sh InheritAgent0110
  * @run main/othervm -javaagent:InheritAgent0110.jar DummyMain
  */
--- a/test/java/lang/instrument/PremainClass/InheritAgent0111.java	Tue Nov 03 14:00:01 2015 +0300
+++ b/test/java/lang/instrument/PremainClass/InheritAgent0111.java	Tue Nov 03 12:04:12 2015 -0800
@@ -27,7 +27,6 @@
  * @summary test config (0,1,1,1): inherited 1-arg, declared 2-arg and declared 1-arg in agent class
  * @author Daniel D. Daugherty, Sun Microsystems
  *
- * @modules java.instrument
  * @run shell ../MakeJAR3.sh InheritAgent0111
  * @run main/othervm -javaagent:InheritAgent0111.jar DummyMain
  */
--- a/test/java/lang/instrument/PremainClass/InheritAgent1000.java	Tue Nov 03 14:00:01 2015 +0300
+++ b/test/java/lang/instrument/PremainClass/InheritAgent1000.java	Tue Nov 03 12:04:12 2015 -0800
@@ -27,7 +27,6 @@
  * @summary test config (1,0,0,0): inherited 2-arg in agent class
  * @author Daniel D. Daugherty, Sun Microsystems
  *
- * @modules java.instrument
  * @run shell ../MakeJAR3.sh InheritAgent1000
  * @run main/othervm -javaagent:InheritAgent1000.jar DummyMain
  */
--- a/test/java/lang/instrument/PremainClass/InheritAgent1001.java	Tue Nov 03 14:00:01 2015 +0300
+++ b/test/java/lang/instrument/PremainClass/InheritAgent1001.java	Tue Nov 03 12:04:12 2015 -0800
@@ -27,7 +27,6 @@
  * @summary test config (1,0,0,1): inherited 2-arg, and declared 1-arg in agent class
  * @author Daniel D. Daugherty, Sun Microsystems
  *
- * @modules java.instrument
  * @run shell ../MakeJAR3.sh InheritAgent1001
  * @run main/othervm -javaagent:InheritAgent1001.jar DummyMain
  */
--- a/test/java/lang/instrument/PremainClass/InheritAgent1010.java	Tue Nov 03 14:00:01 2015 +0300
+++ b/test/java/lang/instrument/PremainClass/InheritAgent1010.java	Tue Nov 03 12:04:12 2015 -0800
@@ -27,7 +27,6 @@
  * @summary test config (1,0,1,0): inherited 2-arg, and declared 2-arg in agent class
  * @author Daniel D. Daugherty, Sun Microsystems
  *
- * @modules java.instrument
  * @run shell ../MakeJAR3.sh InheritAgent1010
  * @run main/othervm -javaagent:InheritAgent1010.jar DummyMain
  */
--- a/test/java/lang/instrument/PremainClass/InheritAgent1011.java	Tue Nov 03 14:00:01 2015 +0300
+++ b/test/java/lang/instrument/PremainClass/InheritAgent1011.java	Tue Nov 03 12:04:12 2015 -0800
@@ -27,7 +27,6 @@
  * @summary test config (1,0,1,1): inherited 2-arg, declared 2-arg and declared 1-arg in agent class
  * @author Daniel D. Daugherty, Sun Microsystems
  *
- * @modules java.instrument
  * @run shell ../MakeJAR3.sh InheritAgent1011
  * @run main/othervm -javaagent:InheritAgent1011.jar DummyMain
  */
--- a/test/java/lang/instrument/PremainClass/InheritAgent1100.java	Tue Nov 03 14:00:01 2015 +0300
+++ b/test/java/lang/instrument/PremainClass/InheritAgent1100.java	Tue Nov 03 12:04:12 2015 -0800
@@ -27,7 +27,6 @@
  * @summary test config (1,1,0,0): inherited 2-arg and inherited 1-arg in agent class
  * @author Daniel D. Daugherty, Sun Microsystems
  *
- * @modules java.instrument
  * @run shell ../MakeJAR3.sh InheritAgent1100
  * @run main/othervm -javaagent:InheritAgent1100.jar DummyMain
  */
--- a/test/java/lang/instrument/PremainClass/InheritAgent1101.java	Tue Nov 03 14:00:01 2015 +0300
+++ b/test/java/lang/instrument/PremainClass/InheritAgent1101.java	Tue Nov 03 12:04:12 2015 -0800
@@ -27,7 +27,6 @@
  * @summary test config (1,1,0,1): inherited 2-arg, inherited 1-arg, and declared 1-arg in agent class
  * @author Daniel D. Daugherty, Sun Microsystems
  *
- * @modules java.instrument
  * @run shell ../MakeJAR3.sh InheritAgent1101
  * @run main/othervm -javaagent:InheritAgent1101.jar DummyMain
  */
--- a/test/java/lang/instrument/PremainClass/InheritAgent1110.java	Tue Nov 03 14:00:01 2015 +0300
+++ b/test/java/lang/instrument/PremainClass/InheritAgent1110.java	Tue Nov 03 12:04:12 2015 -0800
@@ -27,7 +27,6 @@
  * @summary test config (1,1,1,0): inherited 2-arg, inherited 1-arg, and declared 2-arg in agent class
  * @author Daniel D. Daugherty, Sun Microsystems
  *
- * @modules java.instrument
  * @run shell ../MakeJAR3.sh InheritAgent1110
  * @run main/othervm -javaagent:InheritAgent1110.jar DummyMain
  */
--- a/test/java/lang/instrument/PremainClass/InheritAgent1111.java	Tue Nov 03 14:00:01 2015 +0300
+++ b/test/java/lang/instrument/PremainClass/InheritAgent1111.java	Tue Nov 03 12:04:12 2015 -0800
@@ -27,7 +27,6 @@
  * @summary test config (1,1,1,1): inherited 2-arg, inherited 1-arg, declared 2-arg and declared 1-arg in agent class
  * @author Daniel D. Daugherty, Sun Microsystems
  *
- * @modules java.instrument
  * @run shell ../MakeJAR3.sh InheritAgent1111
  * @run main/othervm -javaagent:InheritAgent1111.jar DummyMain
  */
--- a/test/java/lang/instrument/RedefineBigClass.sh	Tue Nov 03 14:00:01 2015 +0300
+++ b/test/java/lang/instrument/RedefineBigClass.sh	Tue Nov 03 12:04:12 2015 -0800
@@ -28,6 +28,7 @@
 #
 # @key intermittent
 # @modules java.instrument
+#          java.management
 # @run shell MakeJAR3.sh RedefineBigClassAgent 'Can-Redefine-Classes: true'
 # @run build BigClass RedefineBigClassApp NMTHelper
 # @run shell/timeout=600 RedefineBigClass.sh
--- a/test/java/lang/instrument/RedefineClassWithNativeMethod.sh	Tue Nov 03 14:00:01 2015 +0300
+++ b/test/java/lang/instrument/RedefineClassWithNativeMethod.sh	Tue Nov 03 12:04:12 2015 -0800
@@ -26,7 +26,6 @@
 # @summary Redefine a class with a native method.
 # @author Daniel D. Daugherty as modified from the test submitted by clovis@par.univie.ac.at
 #
-# @modules java.instrument
 # @run shell MakeJAR3.sh RedefineClassWithNativeMethodAgent 'Can-Redefine-Classes: true'
 # @run build RedefineClassWithNativeMethodApp
 # @run shell RedefineClassWithNativeMethod.sh
--- a/test/java/lang/instrument/RedefineClassesDisabledTest.java	Tue Nov 03 14:00:01 2015 +0300
+++ b/test/java/lang/instrument/RedefineClassesDisabledTest.java	Tue Nov 03 12:04:12 2015 -0800
@@ -27,7 +27,6 @@
  * @summary test that redefineClasses and isRedefineClassesSupported behave correctly when redefine is not enabled
  * @author Robert Field, Sun Microsystems -- as modified from the work of Gabriel Adauto, Wily Technology
  *
- * @modules java.instrument
  * @run build RedefineClassesDisabledTest
  * @run shell RedefineSetUp.sh
  * @run shell MakeJAR.sh basicAgent
--- a/test/java/lang/instrument/RedefineClassesTests.java	Tue Nov 03 14:00:01 2015 +0300
+++ b/test/java/lang/instrument/RedefineClassesTests.java	Tue Nov 03 12:04:12 2015 -0800
@@ -27,7 +27,6 @@
  * @summary insure redefine is supported. exercise a class, then redefine it and do it again
  * @author Gabriel Adauto, Wily Technology
  *
- * @modules java.instrument
  * @run build RedefineClassesTests
  * @run shell RedefineSetUp.sh
  * @run shell MakeJAR.sh redefineAgent
--- a/test/java/lang/instrument/RedefineMethodAddInvoke.sh	Tue Nov 03 14:00:01 2015 +0300
+++ b/test/java/lang/instrument/RedefineMethodAddInvoke.sh	Tue Nov 03 12:04:12 2015 -0800
@@ -26,7 +26,6 @@
 # @summary Reflexive invocation of newly added methods broken.
 # @author Daniel D. Daugherty
 #
-# @modules java.instrument
 # @run shell MakeJAR3.sh RedefineMethodAddInvokeAgent 'Can-Redefine-Classes: true'
 # @run build RedefineMethodAddInvokeApp
 # @run shell RedefineMethodAddInvoke.sh
--- a/test/java/lang/instrument/RedefineMethodDelInvoke.sh	Tue Nov 03 14:00:01 2015 +0300
+++ b/test/java/lang/instrument/RedefineMethodDelInvoke.sh	Tue Nov 03 12:04:12 2015 -0800
@@ -27,7 +27,6 @@
 # @author Daniel D. Daugherty
 # @author Serguei Spitsyn
 #
-# @modules java.instrument
 # @run shell MakeJAR3.sh RedefineMethodDelInvokeAgent 'Can-Redefine-Classes: true'
 # @run build RedefineMethodDelInvokeApp
 # @run shell RedefineMethodDelInvoke.sh
--- a/test/java/lang/instrument/RedefineMethodInBacktrace.sh	Tue Nov 03 14:00:01 2015 +0300
+++ b/test/java/lang/instrument/RedefineMethodInBacktrace.sh	Tue Nov 03 12:04:12 2015 -0800
@@ -27,6 +27,7 @@
 # @author Stefan Karlsson
 #
 # @modules java.instrument
+#          java.management
 # @run shell MakeJAR3.sh RedefineMethodInBacktraceAgent 'Can-Redefine-Classes: true'
 # @run build RedefineMethodInBacktraceTarget RedefineMethodInBacktraceApp
 # @run shell RedefineMethodInBacktrace.sh
--- a/test/java/lang/instrument/RedefineMethodWithAnnotations.sh	Tue Nov 03 14:00:01 2015 +0300
+++ b/test/java/lang/instrument/RedefineMethodWithAnnotations.sh	Tue Nov 03 12:04:12 2015 -0800
@@ -26,7 +26,6 @@
 # @summary Method annotations are incorrectly set when redefining classes.
 # @author Stefan Karlsson
 #
-# @modules java.instrument
 # @run shell MakeJAR3.sh RedefineMethodWithAnnotationsAgent 'Can-Redefine-Classes: true'
 # @run build RedefineMethodWithAnnotationsTarget RedefineMethodWithAnnotationsApp RedefineMethodWithAnnotationsAnnotations
 # @run shell RedefineMethodWithAnnotations.sh
--- a/test/java/lang/instrument/RedefineSubclassWithTwoInterfaces.sh	Tue Nov 03 14:00:01 2015 +0300
+++ b/test/java/lang/instrument/RedefineSubclassWithTwoInterfaces.sh	Tue Nov 03 12:04:12 2015 -0800
@@ -28,7 +28,6 @@
 #   verify that the right methods are called.
 # @author Daniel D. Daugherty
 #
-# @modules java.instrument
 # @run shell MakeJAR3.sh RedefineSubclassWithTwoInterfacesAgent 'Can-Redefine-Classes: true'
 # @run build RedefineSubclassWithTwoInterfacesApp
 # @run shell RedefineSubclassWithTwoInterfaces.sh
--- a/test/java/lang/instrument/RemoveAbsentTransformerTest.java	Tue Nov 03 14:00:01 2015 +0300
+++ b/test/java/lang/instrument/RemoveAbsentTransformerTest.java	Tue Nov 03 12:04:12 2015 -0800
@@ -27,7 +27,6 @@
  * @summary remove an transformer that was never added
  * @author Gabriel Adauto, Wily Technology
  *
- * @modules java.instrument
  * @run build RemoveAbsentTransformerTest
  * @run shell MakeJAR.sh redefineAgent
  * @run main/othervm -javaagent:redefineAgent.jar RemoveAbsentTransformerTest RemoveAbsentTransformerTest
--- a/test/java/lang/instrument/RemoveTransformerTest.java	Tue Nov 03 14:00:01 2015 +0300
+++ b/test/java/lang/instrument/RemoveTransformerTest.java	Tue Nov 03 12:04:12 2015 -0800
@@ -27,7 +27,6 @@
  * @summary simple remove of a transformer that was added
  * @author Gabriel Adauto, Wily Technology
  *
- * @modules java.instrument
  * @run build RemoveTransformerTest
  * @run shell MakeJAR.sh redefineAgent
  * @run main/othervm -javaagent:redefineAgent.jar RemoveTransformerTest RemoveTransformerTest
--- a/test/java/lang/instrument/RetransformBigClass.sh	Tue Nov 03 14:00:01 2015 +0300
+++ b/test/java/lang/instrument/RetransformBigClass.sh	Tue Nov 03 12:04:12 2015 -0800
@@ -28,6 +28,7 @@
 #
 # @key intermittent
 # @modules java.instrument
+#          java.management
 # @run shell MakeJAR4.sh RetransformBigClassAgent SimpleIdentityTransformer 'Can-Retransform-Classes: true'
 # @run build BigClass RetransformBigClassApp NMTHelper
 # @run shell/timeout=600 RetransformBigClass.sh
--- a/test/java/lang/instrument/SingleTransformerTest.java	Tue Nov 03 14:00:01 2015 +0300
+++ b/test/java/lang/instrument/SingleTransformerTest.java	Tue Nov 03 12:04:12 2015 -0800
@@ -27,7 +27,6 @@
  * @summary simple test with one transformer (makes sure it gets called)
  * @author Gabriel Adauto, Wily Technology
  *
- * @modules java.instrument
  * @run build SingleTransformerTest
  * @run shell MakeJAR.sh redefineAgent
  * @run main/othervm -javaagent:redefineAgent.jar SingleTransformerTest SingleTransformerTest
--- a/test/java/lang/instrument/StressGetObjectSizeTest.sh	Tue Nov 03 14:00:01 2015 +0300
+++ b/test/java/lang/instrument/StressGetObjectSizeTest.sh	Tue Nov 03 12:04:12 2015 -0800
@@ -26,7 +26,6 @@
 # @summary stress getObjectSize() API
 # @author Daniel D. Daugherty as modified from the code of fischman@google.com
 #
-# @modules java.instrument
 # @run build StressGetObjectSizeApp
 # @run shell MakeJAR.sh basicAgent
 # @run shell StressGetObjectSizeTest.sh
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/lang/instrument/TEST.properties	Tue Nov 03 12:04:12 2015 -0800
@@ -0,0 +1,1 @@
+modules = java.instrument
--- a/test/java/lang/instrument/TransformMethodTest.java	Tue Nov 03 14:00:01 2015 +0300
+++ b/test/java/lang/instrument/TransformMethodTest.java	Tue Nov 03 12:04:12 2015 -0800
@@ -27,7 +27,6 @@
  * @summary test transformer add/remove pairs in sequence
  * @author Gabriel Adauto, Wily Technology
  *
- * @modules java.instrument
  * @run build TransformMethodTest
  * @run shell MakeJAR.sh redefineAgent
  * @run main/othervm -javaagent:redefineAgent.jar TransformMethodTest TransformMethodTest
--- a/test/java/lang/instrument/TransformerManagementThreadAddTests.java	Tue Nov 03 14:00:01 2015 +0300
+++ b/test/java/lang/instrument/TransformerManagementThreadAddTests.java	Tue Nov 03 12:04:12 2015 -0800
@@ -27,7 +27,6 @@
  * @summary multi-thread test to exercise sync and contention for adds to transformer registry
  * @author Gabriel Adauto, Wily Technology
  *
- * @modules java.instrument
  * @run build TransformerManagementThreadAddTests
  * @run shell MakeJAR.sh redefineAgent
  * @run main/othervm -javaagent:redefineAgent.jar TransformerManagementThreadAddTests TransformerManagementThreadAddTests
--- a/test/java/lang/instrument/TransformerManagementThreadRemoveTests.java	Tue Nov 03 14:00:01 2015 +0300
+++ b/test/java/lang/instrument/TransformerManagementThreadRemoveTests.java	Tue Nov 03 12:04:12 2015 -0800
@@ -27,7 +27,6 @@
  * @summary multi-thread test to exercise sync and contention for removes to transformer registry
  * @author Gabriel Adauto, Wily Technology
  *
- * @modules java.instrument
  * @run build TransformerManagementThreadRemoveTests
  * @run shell MakeJAR.sh redefineAgent
  * @run main/othervm -javaagent:redefineAgent.jar TransformerManagementThreadRemoveTests TransformerManagementThreadRemoveTests
--- a/test/java/lang/instrument/VerifyLocalVariableTableOnRetransformTest.sh	Tue Nov 03 14:00:01 2015 +0300
+++ b/test/java/lang/instrument/VerifyLocalVariableTableOnRetransformTest.sh	Tue Nov 03 12:04:12 2015 -0800
@@ -29,7 +29,6 @@
 # transform() on a retransform operation.
 # @author Daniel D. Daugherty
 #
-# @modules java.instrument
 # @run build VerifyLocalVariableTableOnRetransformTest
 # @run compile -g DummyClassWithLVT.java
 # @run shell MakeJAR.sh retransformAgent
--- a/test/java/lang/instrument/appendToClassLoaderSearch/CircularityErrorTest.sh	Tue Nov 03 14:00:01 2015 +0300
+++ b/test/java/lang/instrument/appendToClassLoaderSearch/CircularityErrorTest.sh	Tue Nov 03 12:04:12 2015 -0800
@@ -26,7 +26,6 @@
 # @summary Unit tests for appendToBootstrapClassLoaderSearch and
 #   appendToSystemClasLoaderSearch methods.
 #
-# @modules java.instrument
 # @run shell/timeout=240 CircularityErrorTest.sh
 
 if [ "${TESTSRC}" = "" ]
--- a/test/java/lang/instrument/appendToClassLoaderSearch/ClassUnloadTest.sh	Tue Nov 03 14:00:01 2015 +0300
+++ b/test/java/lang/instrument/appendToClassLoaderSearch/ClassUnloadTest.sh	Tue Nov 03 12:04:12 2015 -0800
@@ -26,7 +26,6 @@
 # @summary Unit tests for appendToBootstrapClassLoaderSearch and
 #   appendToSystemClasLoaderSearch methods.
 #
-# @modules java.instrument
 # @build ClassUnloadTest
 # @run shell ClassUnloadTest.sh
 
--- a/test/java/lang/instrument/appendToClassLoaderSearch/run_tests.sh	Tue Nov 03 14:00:01 2015 +0300
+++ b/test/java/lang/instrument/appendToClassLoaderSearch/run_tests.sh	Tue Nov 03 12:04:12 2015 -0800
@@ -29,7 +29,6 @@
 # @summary Unit tests for appendToBootstrapClassLoaderSearch and
 #   appendToSystemClasLoaderSearch methods.
 #
-# @modules java.instrument
 # @build Agent AgentSupport BootSupport BasicTest PrematureLoadTest DynamicTest
 # @run shell/timeout=240 run_tests.sh
 
--- a/test/java/lang/invoke/LFCaching/LFMultiThreadCachingTest.java	Tue Nov 03 14:00:01 2015 +0300
+++ b/test/java/lang/invoke/LFCaching/LFMultiThreadCachingTest.java	Tue Nov 03 12:04:12 2015 -0800
@@ -28,11 +28,12 @@
  * @summary Test verifies that lambda forms are cached when run with multiple threads
  * @author kshefov
  * @library /lib/testlibrary/jsr292 /lib/testlibrary
+ * @modules java.management
  * @build TestMethods
  * @build LambdaFormTestCase
  * @build LFCachingTestCase
  * @build LFMultiThreadCachingTest
- * @run main/othervm -Djava.lang.invoke.MethodHandle.OBSERVE_BMH_SPECIES_CREATION=true LFMultiThreadCachingTest
+ * @run main/othervm LFMultiThreadCachingTest
  */
 
 import java.lang.invoke.MethodHandle;
--- a/test/java/lang/invoke/LFCaching/LFSingleThreadCachingTest.java	Tue Nov 03 14:00:01 2015 +0300
+++ b/test/java/lang/invoke/LFCaching/LFSingleThreadCachingTest.java	Tue Nov 03 12:04:12 2015 -0800
@@ -23,6 +23,7 @@
 
 /*
  * @test LFSingleThreadCachingTest
+ * @ignore 8129523
  * @bug 8046703
  * @key randomness
  * @summary Test verifies that lambda forms are cached when run with single thread
--- a/test/java/lang/invoke/lambda/LambdaAccessControlDoPrivilegedTest.java	Tue Nov 03 14:00:01 2015 +0300
+++ b/test/java/lang/invoke/lambda/LambdaAccessControlDoPrivilegedTest.java	Tue Nov 03 12:04:12 2015 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,7 @@
  * @bug 8003881
  * @summary tests DoPrivileged action (implemented as lambda expressions) by
  * inserting them into the BootClassPath.
+ * @modules jdk.compiler
  * @compile -XDignore.symbol.file LambdaAccessControlDoPrivilegedTest.java LUtils.java
  * @run main/othervm LambdaAccessControlDoPrivilegedTest
  */
--- a/test/java/lang/invoke/lambda/LambdaAccessControlTest.java	Tue Nov 03 14:00:01 2015 +0300
+++ b/test/java/lang/invoke/lambda/LambdaAccessControlTest.java	Tue Nov 03 12:04:12 2015 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
  * @test
  * @bug 8003881
  * @summary tests Lambda expression with a a security manager at top level
+ * @modules jdk.compiler
  * @compile -XDignore.symbol.file LambdaAccessControlTest.java LUtils.java
  *
  * @run main/othervm LambdaAccessControlTest
--- a/test/java/lang/invoke/lambda/LambdaAsm.java	Tue Nov 03 14:00:01 2015 +0300
+++ b/test/java/lang/invoke/lambda/LambdaAsm.java	Tue Nov 03 12:04:12 2015 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
--- a/test/java/lang/invoke/lambda/LambdaStackTrace.java	Tue Nov 03 14:00:01 2015 +0300
+++ b/test/java/lang/invoke/lambda/LambdaStackTrace.java	Tue Nov 03 12:04:12 2015 -0800
@@ -26,6 +26,7 @@
  * @bug 8025636
  * @summary Synthetic frames should be hidden in exceptions
  * @modules java.base/jdk.internal.org.objectweb.asm
+ *          jdk.compiler
  * @compile -XDignore.symbol.file LUtils.java LambdaStackTrace.java
  * @run main LambdaStackTrace
  */
--- a/test/java/util/Currency/PropertiesTest.sh	Tue Nov 03 14:00:01 2015 +0300
+++ b/test/java/util/Currency/PropertiesTest.sh	Tue Nov 03 12:04:12 2015 -0800
@@ -101,11 +101,7 @@
 # without disturbing other users, including concurrently executing tests.
 WRITABLEJDK=.${FS}testjava
 cp -H -R $TESTJAVA $WRITABLEJDK || exit 1
-if [ -d ${TESTJAVA}${FS}jre ]; then
-  PROPLOCATION=${WRITABLEJDK}${FS}jre${FS}lib
-else
-  PROPLOCATION=${WRITABLEJDK}${FS}lib
-fi
+PROPLOCATION=${WRITABLEJDK}${FS}lib
 chmod -R +w $WRITABLEJDK || exit 1
 cp ${PROPS} $PROPLOCATION || exit 1
 echo "Properties location: ${PROPLOCATION}"
--- a/test/java/util/Locale/LocaleProviders.sh	Tue Nov 03 14:00:01 2015 +0300
+++ b/test/java/util/Locale/LocaleProviders.sh	Tue Nov 03 12:04:12 2015 -0800
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -24,7 +24,7 @@
 #
 # @test
 # @bug 6336885 7196799 7197573 7198834 8000245 8000615 8001440 8008577
-#      8010666 8013086 8013233 8013903 8015960 8028771
+#      8010666 8013086 8013233 8013903 8015960 8028771 8062006
 # @summary tests for "java.locale.providers" system property
 # @compile -XDignore.symbol.file LocaleProviders.java
 # @run shell/timeout=600 LocaleProviders.sh
@@ -182,7 +182,7 @@
 if [ "${DEFLANG}" != "en" ] && [ "${DEFFMTLANG}" != "en" ]; then
   PARAM2=en
   PARAM3=US
-elif [ "${DEFLANG}" != "ja" ] && [ "${DEFFMTLANG}" != "ja" ]; then 
+elif [ "${DEFLANG}" != "ja" ] && [ "${DEFFMTLANG}" != "ja" ]; then
   PARAM2=ja
   PARAM3=JP
 else
@@ -200,6 +200,8 @@
 PARAM3=US
 SPICLASSES=
 runTest
+PREFLIST=SPI,COMPAT
+runTest
 
 # testing the order, variaton #1. This assumes en_GB DateFormat data are available both in JRE & CLDR
 METHODNAME=adapterTest
@@ -209,6 +211,8 @@
 PARAM3=GB
 SPICLASSES=
 runTest
+PREFLIST=CLDR,COMPAT
+runTest
 
 # testing the order, variaton #2. This assumes en_GB DateFormat data are available both in JRE & CLDR
 METHODNAME=adapterTest
@@ -218,6 +222,8 @@
 PARAM3=GB
 SPICLASSES=
 runTest
+PREFLIST=COMPAT,CLDR
+runTest
 
 # testing the order, variaton #3 for non-existent locale in JRE assuming "haw" is not in JRE.
 METHODNAME=adapterTest
@@ -227,6 +233,8 @@
 PARAM3=
 SPICLASSES=
 runTest
+PREFLIST=COMPAT,CLDR
+runTest
 
 # testing the order, variaton #4 for the bug 7196799. CLDR's "zh" data should be used in "zh_CN"
 METHODNAME=adapterTest
@@ -275,6 +283,8 @@
 PARAM3=
 SPICLASSES=${SPIDIR}
 runTest
+PREFLIST=COMPAT
+runTest
 
 # testing 8000615 fix.
 METHODNAME=tzNameTest
@@ -284,6 +294,8 @@
 PARAM3=
 SPICLASSES=${SPIDIR}
 runTest
+PREFLIST=COMPAT
+runTest
 
 # testing 8001440 fix.
 METHODNAME=bug8001440Test
@@ -314,6 +326,8 @@
 PARAM3=
 SPICLASSES=${SPIDIR}
 runTest
+PREFLIST=COMPAT,SPI
+runTest
 
 # testing 8013903 fix. (Windows only)
 METHODNAME=bug8013903Test
@@ -323,12 +337,9 @@
 PARAM3=
 SPICLASSES=
 runTest
-METHODNAME=bug8013903Test
 PREFLIST=HOST
-PARAM1=
-PARAM2=
-PARAM3=
-SPICLASSES=
+runTest
+PREFLIST=HOST,COMPAT
 runTest
 
 # testing 8027289 fix, if the platform format default is zh_CN
@@ -342,12 +353,10 @@
   PARAM3=
   SPICLASSES=
   runTest
-  METHODNAME=bug8027289Test
+  PREFLIST=COMPAT,HOST
+  runTest
   PREFLIST=HOST
   PARAM1=00A5
-  PARAM2=
-  PARAM3=
-  SPICLASSES=
   runTest
 fi
 
--- a/test/javax/management/Introspector/AnnotationSecurityTest.java	Tue Nov 03 14:00:01 2015 +0300
+++ b/test/javax/management/Introspector/AnnotationSecurityTest.java	Tue Nov 03 12:04:12 2015 -0800
@@ -27,8 +27,7 @@
  * @summary Test that having a security manager doesn't trigger a
  *          NotCompliantMBeanException
  * @author Daniel Fuchs, Yves Joan
- * @modules java.desktop
- *          java.management
+ * @modules java.management
  * @run clean AnnotationSecurityTest Described UnDescribed DescribedMBean
  *            UnDescribedMBean SqeDescriptorKey DescribedMX DescribedMXBean
  * @run build AnnotationSecurityTest Described UnDescribed DescribedMBean
@@ -40,13 +39,8 @@
 import java.io.File;
 import java.io.IOException;
 
-import java.lang.annotation.Annotation;
 import java.lang.management.ManagementFactory;
-import java.lang.reflect.AnnotatedElement;
 import java.lang.reflect.Method;
-import java.lang.reflect.UndeclaredThrowableException;
-
-import javax.management.JMException;
 import javax.management.MBeanServer;
 import javax.management.ObjectName;
 /**
--- a/test/javax/management/Introspector/Described.java	Tue Nov 03 14:00:01 2015 +0300
+++ b/test/javax/management/Introspector/Described.java	Tue Nov 03 12:04:12 2015 -0800
@@ -25,7 +25,7 @@
  *
  * Used by AnnotationSecurityTest.java
  **/
-import java.beans.ConstructorProperties;
+import javax.management.ConstructorParameters;
 
 /**
  * An MBean used by AnnotationSecurityTest.java
@@ -37,7 +37,7 @@
     public Described() {}
 
     @SqeDescriptorKey("ONE PARAMETER CONSTRUCTOR Described")
-    @ConstructorProperties({"name", "unused"})
+    @ConstructorParameters({"name", "unused"})
     public Described(@SqeDescriptorKey("CONSTRUCTOR PARAMETER name")String name,
             @SqeDescriptorKey("CONSTRUCTOR PARAMETER unused")String unused) {
         this.name = name ;
--- a/test/javax/management/Introspector/DescribedMX.java	Tue Nov 03 14:00:01 2015 +0300
+++ b/test/javax/management/Introspector/DescribedMX.java	Tue Nov 03 12:04:12 2015 -0800
@@ -25,7 +25,7 @@
  *
  * Used by AnnotationSecurityTest.java
  **/
-import java.beans.ConstructorProperties;
+import javax.management.ConstructorParameters;
 
 /**
  * An MXBean used by AnnotationSecurityTest.java
@@ -37,7 +37,7 @@
     public DescribedMX() {}
 
     @SqeDescriptorKey("ONE PARAMETER CONSTRUCTOR DescribedMX")
-    @ConstructorProperties({"name", "unused"})
+    @ConstructorParameters({"name", "unused"})
     public DescribedMX(@SqeDescriptorKey("CONSTRUCTOR PARAMETER name")String name,
             @SqeDescriptorKey("CONSTRUCTOR PARAMETER unused")String unused) {
         this.name = name ;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/javax/management/Introspector/LegacyConstructorPropertiesTest.java	Tue Nov 03 12:04:12 2015 -0800
@@ -0,0 +1,106 @@
+
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * 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.beans.ConstructorProperties;
+import javax.management.ConstructorParameters;
+import javax.management.MBeanServer;
+import javax.management.MBeanServerFactory;
+import javax.management.ObjectName;
+
+/*
+ * @test
+ * @bug 7199353
+ * @summary Asserts that 'java.beans.ConstructorProperties' annotation is still
+ *          recognized and properly handled for custom types mapped to open types.
+ *          Also, makes sure that if the same constructor is annotated by both
+ *          j.b.ConstructorProperties and j.m.ConstructorProperties annotations
+ *          only j.m.ConstructorProperties annotation is considered.
+ * @author Jaroslav Bachorik
+ * @modules java.management
+ *          java.desktop
+ * @run main LegacyConstructorPropertiesTest
+ */
+
+public class LegacyConstructorPropertiesTest {
+    public static class CustomType {
+        private String name;
+        private int value;
+        @ConstructorProperties({"name", "value"})
+        public CustomType(String name, int value) {
+            this.name = name;
+            this.value = value;
+        }
+
+        // if @java.beans.ConstructorProperties would be used
+        // the introspector would choke on this
+        @ConstructorProperties("noname")
+        @ConstructorParameters("name")
+        public CustomType(String name) {
+            this.name = name;
+            this.value = -1;
+        }
+
+        public String getName() {
+            return name;
+        }
+
+        public void setName(String name) {
+            this.name = name;
+        }
+
+        public int getValue() {
+            return value;
+        }
+
+        public void setValue(int value) {
+            this.value = value;
+        }
+    }
+
+    public static interface CustomMXBean {
+        public CustomType getProp();
+        public void setProp(CustomType prop);
+    }
+
+    public static final class Custom implements CustomMXBean {
+        private CustomType prop;
+
+        @Override
+        public CustomType getProp() {
+            return prop;
+        }
+
+        @Override
+        public void setProp(CustomType prop) {
+            this.prop = prop;
+        }
+    }
+
+    public static void main(String[] args) throws Exception {
+        MBeanServer mbs = MBeanServerFactory.createMBeanServer();
+        CustomMXBean mbean = new Custom();
+
+        mbs.registerMBean(mbean, ObjectName.getInstance("test:type=Custom"));
+    }
+}
--- a/test/javax/management/mxbean/AmbiguousConstructorTest.java	Tue Nov 03 14:00:01 2015 +0300
+++ b/test/javax/management/mxbean/AmbiguousConstructorTest.java	Tue Nov 03 12:04:12 2015 -0800
@@ -26,15 +26,13 @@
  * @bug 6175517 6278707
  * @summary Test that ambiguous ConstructorProperties annotations are detected.
  * @author Eamonn McManus
- * @modules java.desktop
- *          java.management
+ * @modules java.management
  * @run clean AmbiguousConstructorTest
  * @run build AmbiguousConstructorTest
  * @run main AmbiguousConstructorTest
  */
 
-import java.beans.ConstructorProperties;
-import java.io.InvalidObjectException;
+import javax.management.ConstructorParameters;
 import javax.management.*;
 
 public class AmbiguousConstructorTest {
@@ -76,13 +74,13 @@
         public int getC() {return 0;}
         public long getD() {return 0;}
 
-        @ConstructorProperties({"a", "b"})
+        @ConstructorParameters({"a", "b"})
         public Unambiguous(byte a, short b) {}
 
-        @ConstructorProperties({"b", "c"})
+        @ConstructorParameters({"b", "c"})
         public Unambiguous(short b, int c) {}
 
-        @ConstructorProperties({"a", "b", "c"})
+        @ConstructorParameters({"a", "b", "c"})
         public Unambiguous(byte a, short b, int c) {}
     }
 
@@ -92,13 +90,13 @@
         public int getC() {return 0;}
         public long getD() {return 0;}
 
-        @ConstructorProperties({"a", "b"})
+        @ConstructorParameters({"a", "b"})
         public Ambiguous(byte a, short b) {}
 
-        @ConstructorProperties({"b", "c"})
+        @ConstructorParameters({"b", "c"})
         public Ambiguous(short b, int c) {}
 
-        @ConstructorProperties({"a", "b", "c", "d"})
+        @ConstructorParameters({"a", "b", "c", "d"})
         public Ambiguous(byte a, short b, int c, long d) {}
     }
 
--- a/test/javax/management/mxbean/ExceptionDiagnosisTest.java	Tue Nov 03 14:00:01 2015 +0300
+++ b/test/javax/management/mxbean/ExceptionDiagnosisTest.java	Tue Nov 03 12:04:12 2015 -0800
@@ -26,11 +26,10 @@
  * @bug 6713777
  * @summary Test that exception messages include all relevant information
  * @author Eamonn McManus
- * @modules java.desktop
- *          java.management
+ * @modules java.management
  */
 
-import java.beans.ConstructorProperties;
+import javax.management.ConstructorParameters;
 import java.io.File;
 import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
@@ -131,7 +130,7 @@
     }
 
     public static class CaseProb {
-        @ConstructorProperties({"urlPath"})
+        @ConstructorParameters({"urlPath"})
         public CaseProb(String urlPath) {}
 
         public String getURLPath() {return null;}
--- a/test/javax/management/mxbean/LeakTest.java	Tue Nov 03 14:00:01 2015 +0300
+++ b/test/javax/management/mxbean/LeakTest.java	Tue Nov 03 12:04:12 2015 -0800
@@ -25,8 +25,7 @@
  * @bug 6482247
  * @summary Test that creating MXBeans does not introduce memory leaks.
  * @author Eamonn McManus
- * @modules java.desktop
- *          java.management
+ * @modules java.management
  * @run build LeakTest RandomMXBeanTest MerlinMXBean TigerMXBean
  * @run main LeakTest
  */
--- a/test/javax/management/mxbean/MXBeanTest.java	Tue Nov 03 14:00:01 2015 +0300
+++ b/test/javax/management/mxbean/MXBeanTest.java	Tue Nov 03 12:04:12 2015 -0800
@@ -27,8 +27,7 @@
  * @summary General MXBean test.
  * @author Eamonn McManus
  * @author Jaroslav Bachorik
- * @modules java.desktop
- *          java.management
+ * @modules java.management
  * @run clean MXBeanTest MerlinMXBean TigerMXBean
  * @run build MXBeanTest MerlinMXBean TigerMXBean
  * @run main MXBeanTest
--- a/test/javax/management/mxbean/PropertyNamesTest.java	Tue Nov 03 14:00:01 2015 +0300
+++ b/test/javax/management/mxbean/PropertyNamesTest.java	Tue Nov 03 12:04:12 2015 -0800
@@ -26,14 +26,13 @@
  * @bug 6175517
  * @summary Test the PropertyNames annotation with MXBeans
  * @author Eamonn McManus
- * @modules java.desktop
- *          java.management
+ * @modules java.management
  * @run clean PropertyNamesTest
  * @run build PropertyNamesTest
  * @run main PropertyNamesTest
  */
 
-import java.beans.ConstructorProperties;
+import javax.management.ConstructorParameters;
 import java.util.Collections;
 import java.util.List;
 import javax.management.JMX;
@@ -95,7 +94,7 @@
     }
 
     public static class Point {
-        @ConstructorProperties({"x", "y"})
+        @ConstructorParameters({"x", "y"})
         public Point(int x, int y) {
             this.x = x;
             this.y = y;
@@ -123,17 +122,17 @@
     }
 
     public static class Evolve {
-        @ConstructorProperties({"oldInt"})
+        @ConstructorParameters({"oldInt"})
         public Evolve(int oldInt) {
             this(oldInt, "defaultString");
         }
 
-        @ConstructorProperties({"oldInt", "newString"})
+        @ConstructorParameters({"oldInt", "newString"})
         public Evolve(int oldInt, String newString) {
             this(oldInt, newString, Collections.<String>emptyList());
         }
 
-        @ConstructorProperties({"oldInt", "newString", "newerList"})
+        @ConstructorParameters({"oldInt", "newString", "newerList"})
         public Evolve(int oldInt, String newString, List<String> newerList) {
             this.oldInt = oldInt;
             this.newString = newString;
--- a/test/javax/management/mxbean/TigerMXBean.java	Tue Nov 03 14:00:01 2015 +0300
+++ b/test/javax/management/mxbean/TigerMXBean.java	Tue Nov 03 12:04:12 2015 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -21,7 +21,7 @@
  * questions.
  */
 
-import java.beans.ConstructorProperties;
+import javax.management.ConstructorParameters;
 import java.util.Arrays;
 import java.util.Collections;
 import java.util.HashSet;
@@ -42,7 +42,7 @@
 public interface TigerMXBean {
 
     class Point {
-        @ConstructorProperties({"x", "y"})
+        @ConstructorParameters({"x", "y"})
         public Point(double x, double y) {
             this.x = x;
             this.y = y;
--- a/test/jdk/internal/jimage/JImageReadTest.java	Tue Nov 03 14:00:01 2015 +0300
+++ b/test/jdk/internal/jimage/JImageReadTest.java	Tue Nov 03 12:04:12 2015 -0800
@@ -22,7 +22,9 @@
  */
 
 /*
+ * @test
  * @modules java.base/jdk.internal.jimage
+ * @run testng JImageReadTest
  * @summary Unit test for libjimage JIMAGE_Open/Read/Close
  */
 
@@ -57,8 +59,7 @@
                 {"java.base", "java/lang/String.class"},
                 {"java.base", "java/lang/Object.class"},
                 {"java.base", "sun/reflect/generics/tree/TypeArgument.class"},
-                {"jdk.jdeps", "com/sun/tools/javap/StackMapWriter$StackMapBuilder.class"},
-                {"jdk.hotspot.agent", "sa.properties"},
+                {"java.base", "sun/net/www/content-types.properties"},
                 {"java.logging", "java/util/logging/Logger.class"},
                 {"java.base", "java/NOSUCHCLASS/yyy.class"},    // non-existent
                 {"NOSUCHMODULE", "java/lang/Class.class"},    // non-existent
@@ -165,8 +166,10 @@
         int count = ImageNativeSubstrate.JIMAGE_Resources(jimageHandle,
                 names);
         System.out.printf(" count: %d, a class: %s\n", count, names[0]);
-        Assert.assertTrue(max > 31000,
-                "missing entries, should be more than 31000, reported: " + count);
+        int minEntryCount = 16000;
+        Assert.assertTrue(max > minEntryCount,
+                "missing entries, should be more than " + minEntryCount +
+                ", reported: " + count);
         Assert.assertTrue(count == max,
                 "unexpected count of entries, count: " + count
                         + ", max: " + max);
@@ -310,6 +313,7 @@
     static boolean isMetaName(String name) {
         return name.startsWith("/modules")
                 || name.startsWith("/packages")
+                || name.startsWith("META-INF/services")
                 || name.equals("bootmodules.jdata");
     }
 
@@ -362,6 +366,24 @@
         System.out.printf(" %s: %d names%n", fname, names.length);
     }
 
+    @Test
+    static void test5_nameTooLong() throws IOException {
+        long[] size = new long[1];
+        String moduleName = "FictiousModuleName";
+        String className = String.format("A%09999d", 1);
+
+        long jimageHandle = ImageNativeSubstrate.JIMAGE_Open(imageFile);
+        Assert.assertTrue(jimageHandle != 0, "JIMAGE_Open failed: id: " + jimageHandle);
+
+        long locationHandle =
+                ImageNativeSubstrate.JIMAGE_FindResource(jimageHandle,
+                        moduleName, "9.0", className, size);
+
+        Assert.assertEquals(0, locationHandle, "Too long name should have failed");
+
+        ImageNativeSubstrate.JIMAGE_Close(jimageHandle);
+    }
+
     // main method to run standalone from jtreg
 
     @Test(enabled=false)
--- a/test/jdk/lambda/TEST.properties	Tue Nov 03 14:00:01 2015 +0300
+++ b/test/jdk/lambda/TEST.properties	Tue Nov 03 12:04:12 2015 -0800
@@ -3,3 +3,4 @@
 TestNG.dirs = .
 
 javatest.maxOutputSize = 250000
+modules = jdk.compiler
--- a/test/sun/misc/JarIndex/metaInfFilenames/Basic.java	Tue Nov 03 14:00:01 2015 +0300
+++ b/test/sun/misc/JarIndex/metaInfFilenames/Basic.java	Tue Nov 03 12:04:12 2015 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,8 @@
  * @bug 6887710
  * @summary Verify the impact of sun.misc.JarIndex.metaInfFilenames on ServiceLoader
  * @modules jdk.jartool/sun.tools.jar
+ *          jdk.httpserver
+ *          jdk.compiler
  * @run main/othervm Basic
  */
 
--- a/test/sun/reflect/AnonymousNewInstance/ManyNewInstanceAnonTest.java	Tue Nov 03 14:00:01 2015 +0300
+++ b/test/sun/reflect/AnonymousNewInstance/ManyNewInstanceAnonTest.java	Tue Nov 03 12:04:12 2015 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,7 @@
  * @bug 7194897
  * @summary JSR 292: Cannot create more than 16 instances of an anonymous class
  * @modules java.base/sun.misc
- * @modules java.management
+ *          java.management
  * @library /lib/testlibrary
  * @author  Robert Field
  * @compile -XDignore.symbol.file ManyNewInstanceAnonTest.java
--- a/test/sun/security/pkcs11/PKCS11Test.java	Tue Nov 03 14:00:01 2015 +0300
+++ b/test/sun/security/pkcs11/PKCS11Test.java	Tue Nov 03 12:04:12 2015 -0800
@@ -539,6 +539,7 @@
         osMap.put("Linux-amd64-64", new String[]{
             "/usr/lib/x86_64-linux-gnu/", "/usr/lib/x86_64-linux-gnu/nss/",
             "/usr/lib64/"});
+        osMap.put("Linux-ppc64-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/vm/verifier/defaultMethods/DefaultMethodRegressionTestsRun.java	Tue Nov 03 14:00:01 2015 +0300
+++ b/test/vm/verifier/defaultMethods/DefaultMethodRegressionTestsRun.java	Tue Nov 03 12:04:12 2015 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
  * @test
  * @bug 8003639
  * @summary defaultMethod resolution and verification using an URLClassLoader
+ * @modules jdk.compiler
  * @compile -XDignore.symbol.file=true DefaultMethodRegressionTestsRun.java
  * @run main DefaultMethodRegressionTestsRun
  */