changeset 26332:9628dff9b9a1

Merge
author lana
date Thu, 04 Sep 2014 14:45:08 -0700
parents 8f17e084029b 537adb0fb9b9
children a384ec316f00
files jdk/make/CopyIntoClasses.gmk jdk/make/ModulesXml.gmk jdk/make/bundle/JDK-Info.plist jdk/make/bundle/JRE-Info.plist jdk/make/src/classes/build/tools/addtorestrictedpkgs/AddToRestrictedPkgs.java jdk/make/src/classes/build/tools/module/GenerateModulesXml.java jdk/src/demo/aix/jvmti/hprof/porting_aix.c jdk/src/demo/aix/jvmti/hprof/porting_aix.h jdk/src/demo/share/jfc/Font2DTest/resources/TextResources.properties jdk/src/demo/share/jfc/Font2DTest/resources/TextResources_de.properties jdk/src/demo/share/jfc/Font2DTest/resources/TextResources_en.properties jdk/src/demo/share/jfc/Font2DTest/resources/TextResources_en_GB.properties jdk/src/demo/share/jfc/Font2DTest/resources/TextResources_ja.properties jdk/src/demo/share/jfc/Font2DTest/resources/TextResources_ko.properties jdk/src/demo/share/jfc/Font2DTest/resources/TextResources_zh_CN.properties jdk/src/demo/share/jfc/Font2DTest/resources/resource.data jdk/src/demo/share/jpda/com/sun/tools/example/README jdk/src/demo/share/jpda/com/sun/tools/example/debug/bdi/AccessWatchpointSpec.java jdk/src/demo/share/jpda/com/sun/tools/example/debug/bdi/AmbiguousMethodException.java jdk/src/demo/share/jpda/com/sun/tools/example/debug/bdi/BreakpointSpec.java jdk/src/demo/share/jpda/com/sun/tools/example/debug/bdi/ChildSession.java jdk/src/demo/share/jpda/com/sun/tools/example/debug/bdi/EvaluationException.java jdk/src/demo/share/jpda/com/sun/tools/example/debug/bdi/EventRequestSpec.java jdk/src/demo/share/jpda/com/sun/tools/example/debug/bdi/EventRequestSpecList.java jdk/src/demo/share/jpda/com/sun/tools/example/debug/bdi/ExceptionSpec.java jdk/src/demo/share/jpda/com/sun/tools/example/debug/bdi/ExecutionManager.java jdk/src/demo/share/jpda/com/sun/tools/example/debug/bdi/FrameIndexOutOfBoundsException.java jdk/src/demo/share/jpda/com/sun/tools/example/debug/bdi/InputListener.java jdk/src/demo/share/jpda/com/sun/tools/example/debug/bdi/JDIEventSource.java jdk/src/demo/share/jpda/com/sun/tools/example/debug/bdi/LineBreakpointSpec.java jdk/src/demo/share/jpda/com/sun/tools/example/debug/bdi/LineNotFoundException.java jdk/src/demo/share/jpda/com/sun/tools/example/debug/bdi/MalformedMemberNameException.java jdk/src/demo/share/jpda/com/sun/tools/example/debug/bdi/MethodBreakpointSpec.java jdk/src/demo/share/jpda/com/sun/tools/example/debug/bdi/MethodNotFoundException.java jdk/src/demo/share/jpda/com/sun/tools/example/debug/bdi/ModificationWatchpointSpec.java jdk/src/demo/share/jpda/com/sun/tools/example/debug/bdi/NoSessionException.java jdk/src/demo/share/jpda/com/sun/tools/example/debug/bdi/NoThreadException.java jdk/src/demo/share/jpda/com/sun/tools/example/debug/bdi/OutputListener.java jdk/src/demo/share/jpda/com/sun/tools/example/debug/bdi/ParseException.java jdk/src/demo/share/jpda/com/sun/tools/example/debug/bdi/PatternReferenceTypeSpec.java jdk/src/demo/share/jpda/com/sun/tools/example/debug/bdi/ReferenceTypeSpec.java jdk/src/demo/share/jpda/com/sun/tools/example/debug/bdi/Session.java jdk/src/demo/share/jpda/com/sun/tools/example/debug/bdi/SessionListener.java jdk/src/demo/share/jpda/com/sun/tools/example/debug/bdi/SourceNameReferenceTypeSpec.java jdk/src/demo/share/jpda/com/sun/tools/example/debug/bdi/SpecErrorEvent.java jdk/src/demo/share/jpda/com/sun/tools/example/debug/bdi/SpecEvent.java jdk/src/demo/share/jpda/com/sun/tools/example/debug/bdi/SpecListener.java jdk/src/demo/share/jpda/com/sun/tools/example/debug/bdi/ThreadGroupIterator.java jdk/src/demo/share/jpda/com/sun/tools/example/debug/bdi/ThreadInfo.java jdk/src/demo/share/jpda/com/sun/tools/example/debug/bdi/ThreadIterator.java jdk/src/demo/share/jpda/com/sun/tools/example/debug/bdi/Utils.java jdk/src/demo/share/jpda/com/sun/tools/example/debug/bdi/VMLaunchFailureException.java jdk/src/demo/share/jpda/com/sun/tools/example/debug/bdi/VMNotInterruptedException.java jdk/src/demo/share/jpda/com/sun/tools/example/debug/bdi/WatchpointSpec.java jdk/src/demo/share/jpda/com/sun/tools/example/debug/event/AbstractEventSet.java jdk/src/demo/share/jpda/com/sun/tools/example/debug/event/AccessWatchpointEventSet.java jdk/src/demo/share/jpda/com/sun/tools/example/debug/event/ClassPrepareEventSet.java jdk/src/demo/share/jpda/com/sun/tools/example/debug/event/ClassUnloadEventSet.java jdk/src/demo/share/jpda/com/sun/tools/example/debug/event/ExceptionEventSet.java jdk/src/demo/share/jpda/com/sun/tools/example/debug/event/JDIAdapter.java jdk/src/demo/share/jpda/com/sun/tools/example/debug/event/JDIListener.java jdk/src/demo/share/jpda/com/sun/tools/example/debug/event/LocatableEventSet.java jdk/src/demo/share/jpda/com/sun/tools/example/debug/event/LocationTriggerEventSet.java jdk/src/demo/share/jpda/com/sun/tools/example/debug/event/ModificationWatchpointEventSet.java jdk/src/demo/share/jpda/com/sun/tools/example/debug/event/ThreadDeathEventSet.java jdk/src/demo/share/jpda/com/sun/tools/example/debug/event/ThreadStartEventSet.java jdk/src/demo/share/jpda/com/sun/tools/example/debug/event/VMDeathEventSet.java jdk/src/demo/share/jpda/com/sun/tools/example/debug/event/VMDisconnectEventSet.java jdk/src/demo/share/jpda/com/sun/tools/example/debug/event/VMStartEventSet.java jdk/src/demo/share/jpda/com/sun/tools/example/debug/event/WatchpointEventSet.java jdk/src/demo/share/jpda/com/sun/tools/example/debug/expr/Expr.jj jdk/src/demo/share/jpda/com/sun/tools/example/debug/gui/ApplicationTool.java jdk/src/demo/share/jpda/com/sun/tools/example/debug/gui/ClassManager.java jdk/src/demo/share/jpda/com/sun/tools/example/debug/gui/ClassTreeTool.java jdk/src/demo/share/jpda/com/sun/tools/example/debug/gui/CommandInterpreter.java jdk/src/demo/share/jpda/com/sun/tools/example/debug/gui/CommandTool.java jdk/src/demo/share/jpda/com/sun/tools/example/debug/gui/ContextListener.java jdk/src/demo/share/jpda/com/sun/tools/example/debug/gui/ContextManager.java jdk/src/demo/share/jpda/com/sun/tools/example/debug/gui/CurrentFrameChangedEvent.java jdk/src/demo/share/jpda/com/sun/tools/example/debug/gui/Environment.java jdk/src/demo/share/jpda/com/sun/tools/example/debug/gui/GUI.java jdk/src/demo/share/jpda/com/sun/tools/example/debug/gui/Icons.java jdk/src/demo/share/jpda/com/sun/tools/example/debug/gui/JDBFileFilter.java jdk/src/demo/share/jpda/com/sun/tools/example/debug/gui/JDBMenuBar.java jdk/src/demo/share/jpda/com/sun/tools/example/debug/gui/JDBToolBar.java jdk/src/demo/share/jpda/com/sun/tools/example/debug/gui/LaunchTool.java jdk/src/demo/share/jpda/com/sun/tools/example/debug/gui/MonitorListModel.java jdk/src/demo/share/jpda/com/sun/tools/example/debug/gui/MonitorTool.java jdk/src/demo/share/jpda/com/sun/tools/example/debug/gui/OutputSink.java jdk/src/demo/share/jpda/com/sun/tools/example/debug/gui/SearchPath.java jdk/src/demo/share/jpda/com/sun/tools/example/debug/gui/SingleLeafTreeSelectionModel.java jdk/src/demo/share/jpda/com/sun/tools/example/debug/gui/SourceListener.java jdk/src/demo/share/jpda/com/sun/tools/example/debug/gui/SourceManager.java jdk/src/demo/share/jpda/com/sun/tools/example/debug/gui/SourceModel.java jdk/src/demo/share/jpda/com/sun/tools/example/debug/gui/SourceTool.java jdk/src/demo/share/jpda/com/sun/tools/example/debug/gui/SourceTreeTool.java jdk/src/demo/share/jpda/com/sun/tools/example/debug/gui/SourcepathChangedEvent.java jdk/src/demo/share/jpda/com/sun/tools/example/debug/gui/StackTraceTool.java jdk/src/demo/share/jpda/com/sun/tools/example/debug/gui/ThreadTreeTool.java jdk/src/demo/share/jpda/com/sun/tools/example/debug/gui/TypeScript.java jdk/src/demo/share/jpda/com/sun/tools/example/debug/gui/TypeScriptOutputListener.java jdk/src/demo/share/jpda/com/sun/tools/example/debug/gui/TypeScriptWriter.java jdk/src/demo/share/jpda/com/sun/tools/example/doc/index.html jdk/src/demo/share/jpda/com/sun/tools/example/doc/javadt.html jdk/src/demo/share/jpda/com/sun/tools/example/doc/jdb.html jdk/src/demo/share/jpda/com/sun/tools/example/doc/trace.html jdk/src/demo/share/jpda/com/sun/tools/example/trace/EventThread.java jdk/src/demo/share/jpda/com/sun/tools/example/trace/StreamRedirectThread.java jdk/src/demo/share/jpda/com/sun/tools/example/trace/Trace.java jdk/src/demo/share/jvmti/hprof/README.txt jdk/src/demo/share/jvmti/hprof/debug_malloc.c jdk/src/demo/share/jvmti/hprof/debug_malloc.h jdk/src/demo/share/jvmti/hprof/hprof.h jdk/src/demo/share/jvmti/hprof/hprof_b_spec.h jdk/src/demo/share/jvmti/hprof/hprof_blocks.c jdk/src/demo/share/jvmti/hprof/hprof_blocks.h jdk/src/demo/share/jvmti/hprof/hprof_check.c jdk/src/demo/share/jvmti/hprof/hprof_check.h jdk/src/demo/share/jvmti/hprof/hprof_class.c jdk/src/demo/share/jvmti/hprof/hprof_class.h jdk/src/demo/share/jvmti/hprof/hprof_cpu.c jdk/src/demo/share/jvmti/hprof/hprof_cpu.h jdk/src/demo/share/jvmti/hprof/hprof_error.c jdk/src/demo/share/jvmti/hprof/hprof_error.h jdk/src/demo/share/jvmti/hprof/hprof_event.c jdk/src/demo/share/jvmti/hprof/hprof_event.h jdk/src/demo/share/jvmti/hprof/hprof_frame.c jdk/src/demo/share/jvmti/hprof/hprof_frame.h jdk/src/demo/share/jvmti/hprof/hprof_init.c jdk/src/demo/share/jvmti/hprof/hprof_init.h jdk/src/demo/share/jvmti/hprof/hprof_io.c jdk/src/demo/share/jvmti/hprof/hprof_io.h jdk/src/demo/share/jvmti/hprof/hprof_ioname.c jdk/src/demo/share/jvmti/hprof/hprof_ioname.h jdk/src/demo/share/jvmti/hprof/hprof_listener.c jdk/src/demo/share/jvmti/hprof/hprof_listener.h jdk/src/demo/share/jvmti/hprof/hprof_loader.c jdk/src/demo/share/jvmti/hprof/hprof_loader.h jdk/src/demo/share/jvmti/hprof/hprof_md.h jdk/src/demo/share/jvmti/hprof/hprof_monitor.c jdk/src/demo/share/jvmti/hprof/hprof_monitor.h jdk/src/demo/share/jvmti/hprof/hprof_object.c jdk/src/demo/share/jvmti/hprof/hprof_object.h jdk/src/demo/share/jvmti/hprof/hprof_reference.c jdk/src/demo/share/jvmti/hprof/hprof_reference.h jdk/src/demo/share/jvmti/hprof/hprof_site.c jdk/src/demo/share/jvmti/hprof/hprof_site.h jdk/src/demo/share/jvmti/hprof/hprof_stack.c jdk/src/demo/share/jvmti/hprof/hprof_stack.h jdk/src/demo/share/jvmti/hprof/hprof_string.c jdk/src/demo/share/jvmti/hprof/hprof_string.h jdk/src/demo/share/jvmti/hprof/hprof_table.c jdk/src/demo/share/jvmti/hprof/hprof_table.h jdk/src/demo/share/jvmti/hprof/hprof_tag.c jdk/src/demo/share/jvmti/hprof/hprof_tag.h jdk/src/demo/share/jvmti/hprof/hprof_tls.c jdk/src/demo/share/jvmti/hprof/hprof_tls.h jdk/src/demo/share/jvmti/hprof/hprof_trace.c jdk/src/demo/share/jvmti/hprof/hprof_trace.h jdk/src/demo/share/jvmti/hprof/hprof_tracker.c jdk/src/demo/share/jvmti/hprof/hprof_tracker.h jdk/src/demo/share/jvmti/hprof/hprof_util.c jdk/src/demo/share/jvmti/hprof/hprof_util.h jdk/src/demo/share/jvmti/hprof/jvm.hprof.txt jdk/src/demo/share/jvmti/hprof/manual.html jdk/src/demo/share/jvmti/hprof/sample.makefile.txt jdk/src/demo/unix/jvmti/hprof/hprof_md.c jdk/src/demo/windows/jvmti/hprof/hprof_md.c jdk/src/java.base/share/conf/security/java.security-aix jdk/src/java.base/share/conf/security/java.security-linux jdk/src/java.base/share/conf/security/java.security-macosx jdk/src/java.base/share/conf/security/java.security-solaris jdk/src/java.base/share/conf/security/java.security-windows jdk/src/jdk.attach/aix/classes/sun/tools/attach/AixAttachProvider.java jdk/src/jdk.attach/aix/classes/sun/tools/attach/AixVirtualMachine.java jdk/src/jdk.attach/aix/native/libattach/AixVirtualMachine.c jdk/src/jdk.attach/unix/classes/sun/tools/attach/BsdAttachProvider.java jdk/src/jdk.attach/unix/classes/sun/tools/attach/BsdVirtualMachine.java jdk/src/jdk.attach/unix/classes/sun/tools/attach/LinuxAttachProvider.java jdk/src/jdk.attach/unix/classes/sun/tools/attach/LinuxVirtualMachine.java jdk/src/jdk.attach/unix/classes/sun/tools/attach/SolarisAttachProvider.java jdk/src/jdk.attach/unix/classes/sun/tools/attach/SolarisVirtualMachine.java jdk/src/jdk.attach/unix/native/libattach/BsdVirtualMachine.c jdk/src/jdk.attach/unix/native/libattach/LinuxVirtualMachine.c jdk/src/jdk.attach/unix/native/libattach/SolarisVirtualMachine.c jdk/src/jdk.attach/windows/classes/sun/tools/attach/WindowsAttachProvider.java jdk/src/jdk.attach/windows/classes/sun/tools/attach/WindowsVirtualMachine.java jdk/src/jdk.attach/windows/native/libattach/WindowsAttachProvider.c jdk/src/jdk.attach/windows/native/libattach/WindowsVirtualMachine.c jdk/test/com/sun/net/httpserver/SimpleSSLContext.java jdk/test/com/sun/net/httpserver/testkeys jdk/test/java/lang/instrument/ilib/ClassDump.java jdk/test/java/lang/instrument/ilib/ClassReaderWriter.java jdk/test/java/lang/instrument/ilib/Info.java jdk/test/java/lang/instrument/ilib/Inject.java jdk/test/java/lang/instrument/ilib/InjectBytecodes.java jdk/test/java/lang/instrument/ilib/Injector.java jdk/test/java/lang/instrument/ilib/Options.java jdk/test/java/lang/instrument/ilib/RuntimeConstants.java jdk/test/sun/tools/jps/jps-Defaults.sh jdk/test/sun/tools/jps/jps-V_2.sh jdk/test/sun/tools/jps/jps-V_Output2.awk jdk/test/sun/tools/jps/jps-Vm_2.sh jdk/test/sun/tools/jps/jps-Vm_Output2.awk jdk/test/sun/tools/jps/jps-Vvm.sh jdk/test/sun/tools/jps/jps-Vvm_Output1.awk jdk/test/sun/tools/jps/jps-Vvml.sh jdk/test/sun/tools/jps/jps-Vvml_2.sh jdk/test/sun/tools/jps/jps-Vvml_Output1.awk jdk/test/sun/tools/jps/jps-Vvml_Output2.awk jdk/test/sun/tools/jps/jps-help.sh jdk/test/sun/tools/jps/jps-l_1.sh jdk/test/sun/tools/jps/jps-l_2.sh jdk/test/sun/tools/jps/jps-l_Output1.awk jdk/test/sun/tools/jps/jps-l_Output2.awk jdk/test/sun/tools/jps/jps-lm.sh jdk/test/sun/tools/jps/jps-lm_Output1.awk jdk/test/sun/tools/jps/jps-m.sh jdk/test/sun/tools/jps/jps-m_2.sh jdk/test/sun/tools/jps/jps-m_Output1.awk jdk/test/sun/tools/jps/jps-m_Output2.awk jdk/test/sun/tools/jps/jps-q.sh jdk/test/sun/tools/jps/jps-q_Output1.awk jdk/test/sun/tools/jps/jps-v_1.sh jdk/test/sun/tools/jps/jps-v_Output1.awk jdk/test/sun/tools/jps/jps-vm_1.sh jdk/test/sun/tools/jps/jps-vm_Output1.awk jdk/test/sun/tools/jps/jps_Output1.awk jdk/test/sun/tools/jps/vmflags langtools/src/jdk.compiler/share/classes/com/sun/tools/sjavac/comp/JavacServiceImpl.java langtools/src/jdk.compiler/share/classes/com/sun/tools/sjavac/server/CompilerPool.java langtools/src/jdk.compiler/share/classes/com/sun/tools/sjavac/server/CompilerThread.java langtools/src/jdk.compiler/share/classes/com/sun/tools/sjavac/server/JavacServer.java langtools/src/jdk.compiler/share/classes/com/sun/tools/sjavac/server/JavacService.java langtools/src/jdk.compiler/share/classes/com/sun/tools/sjavac/server/JavacServiceClient.java langtools/test/tools/javac/lib/ToolBox.java make/common/SetupJava.gmk nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/CompiledFunctions.java nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/CompiledScript.java
diffstat 1394 files changed, 63842 insertions(+), 65023 deletions(-) [+]
line wrap: on
line diff
--- a/.hgtags	Fri Aug 29 08:14:19 2014 -0700
+++ b/.hgtags	Thu Sep 04 14:45:08 2014 -0700
@@ -269,3 +269,5 @@
 d9ce05f36ffec3e5e8af62a92455c1c66a63c320 jdk9-b24
 13a5c76976fe48e55c9727c25fae2d2ce7c05da0 jdk9-b25
 cd6f4557e7fea5799ff3762ed7a80a743e75d5fd jdk9-b26
+d06a6d3c66c08293b2a9650f3cc01fd55c620e65 jdk9-b27
+f4269e8f454eb77763ecee228a88ae102a9aef6e jdk9-b28
--- a/.hgtags-top-repo	Fri Aug 29 08:14:19 2014 -0700
+++ b/.hgtags-top-repo	Thu Sep 04 14:45:08 2014 -0700
@@ -269,3 +269,5 @@
 1d4a293fbec19dc2d5790bbb2c7dd0ed8f265484 jdk9-b24
 aefd8899a8d6615fb34ba99b2e38996a7145baa8 jdk9-b25
 d3ec8d048e6c3c46b6e0ee011cc551ad386dfba5 jdk9-b26
+ba5645f2735b41ed085d07ba20fa7b322afff318 jdk9-b27
+ea2f7981236f3812436958748ab3d26e80a35130 jdk9-b28
--- a/Makefile	Fri Aug 29 08:14:19 2014 -0700
+++ b/Makefile	Thu Sep 04 14:45:08 2014 -0700
@@ -136,10 +136,12 @@
 	$(info .  make docs              # Create all docs)
 	$(info .  make docs-javadoc      # Create just javadocs, depends on less than full docs)
 	$(info .  make profiles          # Create complete j2re compact profile images)
-	$(info .  make bootcycle-images  # Build images twice, second time with newly build JDK)
+	$(info .  make bootcycle-images  # Build images twice, second time with newly built JDK)
 	$(info .  make install           # Install the generated images locally)
 	$(info .  make clean             # Remove all files generated by make, but not those)
-	$(info .                         # generated by configure)
+	$(info .                         # generated by configure. Do not run clean and other)
+	$(info .                         # targets together as that might behave in an)
+	$(info .                         # unexpected way.)
 	$(info .  make dist-clean        # Remove all files, including configuration)
 	$(info .  make help              # Give some help on using make)
 	$(info .  make test              # Run tests, default is all tests (see TEST below))
--- a/common/autoconf/basics.m4	Fri Aug 29 08:14:19 2014 -0700
+++ b/common/autoconf/basics.m4	Thu Sep 04 14:45:08 2014 -0700
@@ -377,7 +377,6 @@
   BASIC_REQUIRE_PROGS(CMP, cmp)
   BASIC_REQUIRE_PROGS(COMM, comm)
   BASIC_REQUIRE_PROGS(CP, cp)
-  BASIC_REQUIRE_PROGS(CPIO, cpio)
   BASIC_REQUIRE_PROGS(CUT, cut)
   BASIC_REQUIRE_PROGS(DATE, date)
   BASIC_REQUIRE_PROGS(DIFF, [gdiff diff])
@@ -427,6 +426,7 @@
   BASIC_PATH_PROGS(READLINK, [greadlink readlink])
   BASIC_PATH_PROGS(DF, df)
   BASIC_PATH_PROGS(SETFILE, SetFile)
+  BASIC_PATH_PROGS(CPIO, [cpio bsdcpio])
 ])
 
 # Setup basic configuration paths, and platform-specific stuff related to PATHs.
@@ -849,7 +849,12 @@
   if test -f $DELETEDIR/TestIfFindSupportsDelete; then
     # No, it does not.
     rm $DELETEDIR/TestIfFindSupportsDelete
-    FIND_DELETE="-exec rm \{\} \+"
+    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
+      # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
+      FIND_DELETE="-print | xargs rm"
+    else
+      FIND_DELETE="-exec rm \{\} \+"
+    fi
     AC_MSG_RESULT([no])
   else
     AC_MSG_RESULT([yes])
@@ -954,7 +959,7 @@
 # not be the case in cygwin in certain conditions.
 AC_DEFUN_ONCE([BASIC_CHECK_SRC_PERMS],
 [
-  if test x"$OPENJDK_BUILD_OS" = xwindows; then
+  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
     file_to_test="$SRC_ROOT/LICENSE"
     if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
       AC_MSG_ERROR([Bad file permissions on src files. This is usually caused by cloning the repositories with a non cygwin hg in a directory not created in cygwin.])
--- a/common/autoconf/basics_windows.m4	Fri Aug 29 08:14:19 2014 -0700
+++ b/common/autoconf/basics_windows.m4	Thu Sep 04 14:45:08 2014 -0700
@@ -266,6 +266,14 @@
     BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(new_path)
 
     new_path=`$WHICH "$new_path" 2> /dev/null`
+    # bat and cmd files are not always considered executable in MSYS causing which
+    # to not find them
+    if test "x$new_path" = x \
+        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
+      new_path="$path"
+      BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(new_path)
+    fi
 
     if test "x$new_path" = x; then
       # It's still not found. Now this is an unrecoverable error.
--- a/common/autoconf/boot-jdk.m4	Fri Aug 29 08:14:19 2014 -0700
+++ b/common/autoconf/boot-jdk.m4	Thu Sep 04 14:45:08 2014 -0700
@@ -370,18 +370,27 @@
 
   # Maximum amount of heap memory.
   # Maximum stack size.
+  JVM_MAX_HEAP=`expr $MEMORY_SIZE / 2`
   if test "x$BUILD_NUM_BITS" = x32; then
-    JVM_MAX_HEAP=1100M
+    if test "$JVM_MAX_HEAP" -gt "1100"; then
+      JVM_MAX_HEAP=1100
+    elif test "$JVM_MAX_HEAP" -lt "512"; then
+      JVM_MAX_HEAP=512
+    fi
     STACK_SIZE=768
   else
     # Running Javac on a JVM on a 64-bit machine, takes more space since 64-bit
     # pointers are used. Apparently, we need to increase the heap and stack
     # space for the jvm. More specifically, when running javac to build huge
     # jdk batch
-    JVM_MAX_HEAP=1600M
+    if test "$JVM_MAX_HEAP" -gt "1600"; then
+      JVM_MAX_HEAP=1600
+    elif test "$JVM_MAX_HEAP" -lt "512"; then
+      JVM_MAX_HEAP=512
+    fi
     STACK_SIZE=1536
   fi
-  ADD_JVM_ARG_IF_OK([-Xmx$JVM_MAX_HEAP],boot_jdk_jvmargs_big,[$JAVA])
+  ADD_JVM_ARG_IF_OK([-Xmx${JVM_MAX_HEAP}M],boot_jdk_jvmargs_big,[$JAVA])
   ADD_JVM_ARG_IF_OK([-XX:ThreadStackSize=$STACK_SIZE],boot_jdk_jvmargs_big,[$JAVA])
 
   AC_MSG_RESULT([$boot_jdk_jvmargs_big])
--- a/common/autoconf/build-performance.m4	Fri Aug 29 08:14:19 2014 -0700
+++ b/common/autoconf/build-performance.m4	Thu Sep 04 14:45:08 2014 -0700
@@ -131,8 +131,8 @@
   if test "x$with_jobs" = x; then
     # Number of jobs was not specified, calculate.
     AC_MSG_CHECKING([for appropriate number of jobs to run in parallel])
-    # Approximate memory in GB, rounding up a bit.
-    memory_gb=`expr $MEMORY_SIZE / 1100`
+    # Approximate memory in GB.
+    memory_gb=`expr $MEMORY_SIZE / 1024`
     # Pick the lowest of memory in gb and number of cores.
     if test "$memory_gb" -lt "$NUM_CORES"; then
       JOBS="$memory_gb"
@@ -291,16 +291,11 @@
       AC_MSG_ERROR([Could not execute server java: $SJAVAC_SERVER_JAVA])
     fi
   else
-    SJAVAC_SERVER_JAVA=""
-    # Hotspot specific options.
-    ADD_JVM_ARG_IF_OK([-verbosegc],SJAVAC_SERVER_JAVA,[$JAVA])
-    # JRockit specific options.
-    ADD_JVM_ARG_IF_OK([-Xverbose:gc],SJAVAC_SERVER_JAVA,[$JAVA])
-    SJAVAC_SERVER_JAVA="$JAVA $SJAVAC_SERVER_JAVA"
+    SJAVAC_SERVER_JAVA="$JAVA"
   fi
   AC_SUBST(SJAVAC_SERVER_JAVA)
 
-  if test "$MEMORY_SIZE" -gt "2500"; then
+  if test "$MEMORY_SIZE" -gt "3000"; then
     ADD_JVM_ARG_IF_OK([-d64],SJAVAC_SERVER_JAVA,[$SJAVAC_SERVER_JAVA])
     if test "$JVM_ARG_OK" = true; then
       JVM_64BIT=true
@@ -308,34 +303,33 @@
     fi
   fi
 
+  MX_VALUE=`expr $MEMORY_SIZE / 2`
   if test "$JVM_64BIT" = true; then
-    if test "$MEMORY_SIZE" -gt "17000"; then
-      ADD_JVM_ARG_IF_OK([-Xms10G -Xmx10G],SJAVAC_SERVER_JAVA,[$SJAVAC_SERVER_JAVA])
+    # Set ms lower than mx since more than one instance of the server might
+    # get launched at the same time before they figure out which instance won.
+    MS_VALUE=512
+    if test "$MX_VALUE" -gt "2048"; then
+      MX_VALUE=2048
     fi
-    if test "$MEMORY_SIZE" -gt "10000" && test "$JVM_ARG_OK" = false; then
-      ADD_JVM_ARG_IF_OK([-Xms6G -Xmx6G],SJAVAC_SERVER_JAVA,[$SJAVAC_SERVER_JAVA])
-    fi
-    if test "$MEMORY_SIZE" -gt "5000" && test "$JVM_ARG_OK" = false; then
-      ADD_JVM_ARG_IF_OK([-Xms1G -Xmx3G],SJAVAC_SERVER_JAVA,[$SJAVAC_SERVER_JAVA])
-    fi
-    if test "$MEMORY_SIZE" -gt "3800" && test "$JVM_ARG_OK" = false; then
-      ADD_JVM_ARG_IF_OK([-Xms1G -Xmx2500M],SJAVAC_SERVER_JAVA,[$SJAVAC_SERVER_JAVA])
+  else
+    MS_VALUE=256
+    if test "$MX_VALUE" -gt "1500"; then
+      MX_VALUE=1500
     fi
   fi
-  if test "$MEMORY_SIZE" -gt "2500" && test "$JVM_ARG_OK" = false; then
-    ADD_JVM_ARG_IF_OK([-Xms1000M -Xmx1500M],SJAVAC_SERVER_JAVA,[$SJAVAC_SERVER_JAVA])
+  if test "$MX_VALUE" -lt "512"; then
+    MX_VALUE=512
   fi
-  if test "$MEMORY_SIZE" -gt "1000" && test "$JVM_ARG_OK" = false; then
-    ADD_JVM_ARG_IF_OK([-Xms400M -Xmx1100M],SJAVAC_SERVER_JAVA,[$SJAVAC_SERVER_JAVA])
-  fi
-  if test "$JVM_ARG_OK" = false; then
-    ADD_JVM_ARG_IF_OK([-Xms256M -Xmx512M],SJAVAC_SERVER_JAVA,[$SJAVAC_SERVER_JAVA])
-  fi
+  ADD_JVM_ARG_IF_OK([-Xms${MS_VALUE}M -Xmx${MX_VALUE}M],SJAVAC_SERVER_JAVA,[$SJAVAC_SERVER_JAVA])
 
-  AC_MSG_CHECKING([whether to use sjavac])
   AC_ARG_ENABLE([sjavac], [AS_HELP_STRING([--enable-sjavac],
       [use sjavac to do fast incremental compiles @<:@disabled@:>@])],
       [ENABLE_SJAVAC="${enableval}"], [ENABLE_SJAVAC='no'])
+  if test "x$JVM_ARG_OK" = "xfalse"; then
+    AC_MSG_WARN([Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac])
+    ENABLE_SJAVAC=no;
+  fi
+  AC_MSG_CHECKING([whether to use sjavac])
   AC_MSG_RESULT([$ENABLE_SJAVAC])
   AC_SUBST(ENABLE_SJAVAC)
 
--- a/common/autoconf/configure.ac	Fri Aug 29 08:14:19 2014 -0700
+++ b/common/autoconf/configure.ac	Thu Sep 04 14:45:08 2014 -0700
@@ -142,7 +142,6 @@
 ###############################################################################
 
 BOOTJDK_SETUP_BOOT_JDK
-BOOTJDK_SETUP_BOOT_JDK_ARGUMENTS
 
 ###############################################################################
 #
@@ -233,6 +232,9 @@
 BPERF_SETUP_BUILD_MEMORY
 BPERF_SETUP_BUILD_JOBS
 
+# Setup arguments for the boot jdk (after cores and memory have been setup)
+BOOTJDK_SETUP_BOOT_JDK_ARGUMENTS
+
 # Setup smart javac (after cores and memory have been setup)
 BPERF_SETUP_SMART_JAVAC
 
--- a/common/autoconf/flags.m4	Fri Aug 29 08:14:19 2014 -0700
+++ b/common/autoconf/flags.m4	Thu Sep 04 14:45:08 2014 -0700
@@ -342,17 +342,15 @@
       # no adjustment
       ;;
     fastdebug )
-      # Add compile time bounds checks.
-      CFLAGS_DEBUG_OPTIONS="-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1"
-      CXXFLAGS_DEBUG_OPTIONS="-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1"
+      # no adjustment
       ;;
     slowdebug )
-      # Add runtime bounds checks and symbol info.
-      CFLAGS_DEBUG_OPTIONS="-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector-all --param ssp-buffer-size=1"
-      CXXFLAGS_DEBUG_OPTIONS="-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector-all --param ssp-buffer-size=1"
+      # Add runtime stack smashing and undefined behavior checks
+      CFLAGS_DEBUG_OPTIONS="-fstack-protector-all --param ssp-buffer-size=1"
+      CXXFLAGS_DEBUG_OPTIONS="-fstack-protector-all --param ssp-buffer-size=1"
       if test "x$HAS_CFLAG_DETECT_UNDEFINED_BEHAVIOR" = "xtrue"; then
         CFLAGS_DEBUG_OPTIONS="$CFLAGS_DEBUG_OPTIONS  $CFLAG_DETECT_UNDEFINED_BEHAVIOR_FLAG"
-        CXXFLAGS_DEBUG_OPTIONS="$CXXFLAGS_DEBUG_OPTIONS $CFLAG_DETECT_UNDEFINED_BEHAVIOR_FLAG"
+        CXXFLAGS_DEBUG_OPTIONS="$CXXFLAGS_DEBUG_OPTIONS $CFLAG_DETECT_UNDEFINED_BEHAVIsOR_FLAG"
       fi
       ;;
     esac
@@ -900,7 +898,7 @@
 
   case "${TOOLCHAIN_TYPE}" in
     microsoft)
-      CFLAGS_WARNINGS_ARE_ERRORS="/WX"
+      CFLAGS_WARNINGS_ARE_ERRORS="-WX"
       ;;
     solstudio)
       CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
--- a/common/autoconf/generated-configure.sh	Fri Aug 29 08:14:19 2014 -0700
+++ b/common/autoconf/generated-configure.sh	Thu Sep 04 14:45:08 2014 -0700
@@ -634,6 +634,10 @@
 SJAVAC_SERVER_DIR
 ENABLE_SJAVAC
 SJAVAC_SERVER_JAVA
+JAVA_TOOL_FLAGS_SMALL
+JAVA_FLAGS_SMALL
+JAVA_FLAGS_BIG
+JAVA_FLAGS
 JOBS
 MEMORY_SIZE
 NUM_CORES
@@ -805,10 +809,6 @@
 JAXP_TOPDIR
 CORBA_TOPDIR
 LANGTOOLS_TOPDIR
-JAVA_TOOL_FLAGS_SMALL
-JAVA_FLAGS_SMALL
-JAVA_FLAGS_BIG
-JAVA_FLAGS
 JAVAC_FLAGS
 BOOT_JDK_SOURCETARGET
 JARSIGNER
@@ -920,12 +920,14 @@
 OPENJDK_TARGET_CPU_BITS
 OPENJDK_TARGET_CPU_ARCH
 OPENJDK_TARGET_CPU
+OPENJDK_TARGET_OS_ENV
 OPENJDK_TARGET_OS_API
 OPENJDK_TARGET_OS
 OPENJDK_BUILD_CPU_ENDIAN
 OPENJDK_BUILD_CPU_BITS
 OPENJDK_BUILD_CPU_ARCH
 OPENJDK_BUILD_CPU
+OPENJDK_BUILD_OS_ENV
 OPENJDK_BUILD_OS_API
 OPENJDK_BUILD_OS
 OPENJDK_BUILD_AUTOCONF_NAME
@@ -942,6 +944,7 @@
 build_vendor
 build_cpu
 build
+CPIO
 SETFILE
 DF
 READLINK
@@ -980,7 +983,6 @@
 DIFF
 DATE
 CUT
-CPIO
 CP
 COMM
 CMP
@@ -1062,7 +1064,6 @@
 with_user_release_suffix
 with_build_number
 with_boot_jdk
-with_boot_jdk_jvmargs
 with_add_source_root
 with_override_source_root
 with_adds_and_overrides
@@ -1104,6 +1105,7 @@
 with_num_cores
 with_memory_size
 with_jobs
+with_boot_jdk_jvmargs
 with_sjavac_server_java
 enable_sjavac
 enable_precompiled_headers
@@ -1120,7 +1122,6 @@
 CMP
 COMM
 CP
-CPIO
 CUT
 DATE
 DIFF
@@ -1159,6 +1160,7 @@
 READLINK
 DF
 SETFILE
+CPIO
 UNZIP
 ZIP
 LDD
@@ -1902,10 +1904,6 @@
                           number is not set.[username_builddateb00]
   --with-build-number     Set build number value for build [b00]
   --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
-  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
-                          invocations of boot JDK, overriding the default
-                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
-                          -enableassertions"
   --with-add-source-root  for each and every source directory, look in this
                           additional source root for the same directory; if it
                           exists and have files in it, include it in the build
@@ -1977,6 +1975,10 @@
                           --with-memory-size=1024 [probed]
   --with-jobs             number of parallel jobs to let make run [calculated
                           based on cores and memory]
+  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
+                          invocations of boot JDK, overriding the default
+                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
+                          -enableassertions"
   --with-sjavac-server-java
                           use this java binary for running the sjavac
                           background server [Boot JDK java]
@@ -1990,7 +1992,6 @@
   CMP         Override default value for CMP
   COMM        Override default value for COMM
   CP          Override default value for CP
-  CPIO        Override default value for CPIO
   CUT         Override default value for CUT
   DATE        Override default value for DATE
   DIFF        Override default value for DIFF
@@ -2029,6 +2030,7 @@
   READLINK    Override default value for READLINK
   DF          Override default value for DF
   SETFILE     Override default value for SETFILE
+  CPIO        Override default value for CPIO
   UNZIP       Override default value for UNZIP
   ZIP         Override default value for ZIP
   LDD         Override default value for LDD
@@ -4319,7 +4321,7 @@
 #CUSTOM_AUTOCONF_INCLUDE
 
 # Do not change or remove the following line, it is needed for consistency checks:
-DATE_WHEN_GENERATED=1407143049
+DATE_WHEN_GENERATED=1409311712
 
 ###############################################################################
 #
@@ -5724,199 +5726,6 @@
   # Publish this variable in the help.
 
 
-  if test "x$CPIO" = x; then
-    # The variable is not set by user, try to locate tool using the code snippet
-    for ac_prog in cpio
-do
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_CPIO+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  case $CPIO in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-  ;;
-esac
-fi
-CPIO=$ac_cv_path_CPIO
-if test -n "$CPIO"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
-$as_echo "$CPIO" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-  test -n "$CPIO" && break
-done
-
-  else
-    # The variable is set, but is it from the command line or the environment?
-
-    # Try to remove the string !CPIO! from our list.
-    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
-    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
-      # If it failed, the variable was not from the command line. Ignore it,
-      # but warn the user (except for BASH, which is always set by the calling BASH).
-      if test "xCPIO" != xBASH; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
-$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
-      fi
-      # Try to locate tool using the code snippet
-      for ac_prog in cpio
-do
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_CPIO+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  case $CPIO in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-  ;;
-esac
-fi
-CPIO=$ac_cv_path_CPIO
-if test -n "$CPIO"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
-$as_echo "$CPIO" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-  test -n "$CPIO" && break
-done
-
-    else
-      # If it succeeded, then it was overridden by the user. We will use it
-      # for the tool.
-
-      # First remove it from the list of overridden variables, so we can test
-      # for unknown variables in the end.
-      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
-
-      # Check if the provided tool contains a complete path.
-      tool_specified="$CPIO"
-      tool_basename="${tool_specified##*/}"
-      if test "x$tool_basename" = "x$tool_specified"; then
-        # A command without a complete path is provided, search $PATH.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
-$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
-        # Extract the first word of "$tool_basename", so it can be a program name with args.
-set dummy $tool_basename; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_CPIO+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  case $CPIO in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-  ;;
-esac
-fi
-CPIO=$ac_cv_path_CPIO
-if test -n "$CPIO"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
-$as_echo "$CPIO" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-        if test "x$CPIO" = x; then
-          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
-        fi
-      else
-        # Otherwise we believe it is a complete path. Use it as it is.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
-$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
-$as_echo_n "checking for CPIO... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
-      fi
-    fi
-  fi
-
-
-
-  if test "x$CPIO" = x; then
-    as_fn_error $? "Could not find required tool for CPIO" "$LINENO" 5
-  fi
-
-
-
-
-
-  # Publish this variable in the help.
-
-
   if test "x$CUT" = x; then
     # The variable is not set by user, try to locate tool using the code snippet
     for ac_prog in cut
@@ -13386,6 +13195,192 @@
 
 
 
+  # Publish this variable in the help.
+
+
+  if test "x$CPIO" = x; then
+    # The variable is not set by user, try to locate tool using the code snippet
+    for ac_prog in cpio bsdcpio
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_CPIO+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $CPIO in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+CPIO=$ac_cv_path_CPIO
+if test -n "$CPIO"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
+$as_echo "$CPIO" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$CPIO" && break
+done
+
+  else
+    # The variable is set, but is it from the command line or the environment?
+
+    # Try to remove the string !CPIO! from our list.
+    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
+    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
+      # If it failed, the variable was not from the command line. Ignore it,
+      # but warn the user (except for BASH, which is always set by the calling BASH).
+      if test "xCPIO" != xBASH; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
+$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
+      fi
+      # Try to locate tool using the code snippet
+      for ac_prog in cpio bsdcpio
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_CPIO+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $CPIO in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+CPIO=$ac_cv_path_CPIO
+if test -n "$CPIO"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
+$as_echo "$CPIO" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$CPIO" && break
+done
+
+    else
+      # If it succeeded, then it was overridden by the user. We will use it
+      # for the tool.
+
+      # First remove it from the list of overridden variables, so we can test
+      # for unknown variables in the end.
+      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
+
+      # Check if the provided tool contains a complete path.
+      tool_specified="$CPIO"
+      tool_basename="${tool_specified##*/}"
+      if test "x$tool_basename" = "x$tool_specified"; then
+        # A command without a complete path is provided, search $PATH.
+        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
+$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
+        # Extract the first word of "$tool_basename", so it can be a program name with args.
+set dummy $tool_basename; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_CPIO+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $CPIO in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+CPIO=$ac_cv_path_CPIO
+if test -n "$CPIO"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
+$as_echo "$CPIO" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+        if test "x$CPIO" = x; then
+          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+        fi
+      else
+        # Otherwise we believe it is a complete path. Use it as it is.
+        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
+$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
+$as_echo_n "checking for CPIO... " >&6; }
+        if test ! -x "$tool_specified"; then
+          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+          as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
+        fi
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+      fi
+    fi
+  fi
+
+
+
+
 # Now we can determine OpenJDK build and target platforms. This is required to
 # have early on.
 # Make sure we can run config.sub.
@@ -13644,6 +13639,7 @@
 
 
 
+
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
 $as_echo_n "checking openjdk-build os-cpu... " >&6; }
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
@@ -13775,6 +13771,7 @@
 
 
 
+
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
 $as_echo_n "checking openjdk-target os-cpu... " >&6; }
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
@@ -15611,6 +15608,23 @@
 
 
     new_path=`$WHICH "$new_path" 2> /dev/null`
+    # bat and cmd files are not always considered executable in MSYS causing which
+    # to not find them
+    if test "x$new_path" = x \
+        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
+      new_path="$path"
+
+  windows_path="$new_path"
+  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+    unix_path=`$CYGPATH -u "$windows_path"`
+    new_path="$unix_path"
+  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+    new_path="$unix_path"
+  fi
+
+    fi
 
     if test "x$new_path" = x; then
       # It's still not found. Now this is an unrecoverable error.
@@ -15967,6 +15981,23 @@
 
 
     new_path=`$WHICH "$new_path" 2> /dev/null`
+    # bat and cmd files are not always considered executable in MSYS causing which
+    # to not find them
+    if test "x$new_path" = x \
+        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
+      new_path="$path"
+
+  windows_path="$new_path"
+  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+    unix_path=`$CYGPATH -u "$windows_path"`
+    new_path="$unix_path"
+  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+    new_path="$unix_path"
+  fi
+
+    fi
 
     if test "x$new_path" = x; then
       # It's still not found. Now this is an unrecoverable error.
@@ -16320,6 +16351,23 @@
 
 
     new_path=`$WHICH "$new_path" 2> /dev/null`
+    # bat and cmd files are not always considered executable in MSYS causing which
+    # to not find them
+    if test "x$new_path" = x \
+        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
+      new_path="$path"
+
+  windows_path="$new_path"
+  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+    unix_path=`$CYGPATH -u "$windows_path"`
+    new_path="$unix_path"
+  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+    new_path="$unix_path"
+  fi
+
+    fi
 
     if test "x$new_path" = x; then
       # It's still not found. Now this is an unrecoverable error.
@@ -16678,6 +16726,23 @@
 
 
     new_path=`$WHICH "$new_path" 2> /dev/null`
+    # bat and cmd files are not always considered executable in MSYS causing which
+    # to not find them
+    if test "x$new_path" = x \
+        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
+      new_path="$path"
+
+  windows_path="$new_path"
+  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+    unix_path=`$CYGPATH -u "$windows_path"`
+    new_path="$unix_path"
+  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+    new_path="$unix_path"
+  fi
+
+    fi
 
     if test "x$new_path" = x; then
       # It's still not found. Now this is an unrecoverable error.
@@ -17030,6 +17095,23 @@
 
 
     new_path=`$WHICH "$new_path" 2> /dev/null`
+    # bat and cmd files are not always considered executable in MSYS causing which
+    # to not find them
+    if test "x$new_path" = x \
+        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
+      new_path="$path"
+
+  windows_path="$new_path"
+  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+    unix_path=`$CYGPATH -u "$windows_path"`
+    new_path="$unix_path"
+  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+    new_path="$unix_path"
+  fi
+
+    fi
 
     if test "x$new_path" = x; then
       # It's still not found. Now this is an unrecoverable error.
@@ -17202,7 +17284,12 @@
   if test -f $DELETEDIR/TestIfFindSupportsDelete; then
     # No, it does not.
     rm $DELETEDIR/TestIfFindSupportsDelete
-    FIND_DELETE="-exec rm \{\} \+"
+    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
+      # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
+      FIND_DELETE="-print | xargs rm"
+    else
+      FIND_DELETE="-exec rm \{\} \+"
+    fi
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
   else
@@ -26233,197 +26320,6 @@
 
 
 
-  ##############################################################################
-  #
-  # Specify jvm options for anything that is run with the Boot JDK.
-  # Not all JVM:s accept the same arguments on the command line.
-  #
-
-# Check whether --with-boot-jdk-jvmargs was given.
-if test "${with_boot_jdk_jvmargs+set}" = set; then :
-  withval=$with_boot_jdk_jvmargs;
-fi
-
-
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
-$as_echo_n "checking flags for boot jdk java command ... " >&6; }
-
-  # Disable special log output when a debug build is used as Boot JDK...
-
-  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
-  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
-  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
-  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
-  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
-  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
-    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
-    JVM_ARG_OK=true
-  else
-    $ECHO "Arg failed:" >&5
-    $ECHO "$OUTPUT" >&5
-    JVM_ARG_OK=false
-  fi
-
-
-  # Apply user provided options.
-
-  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
-  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
-  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
-  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
-  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
-  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
-    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
-    JVM_ARG_OK=true
-  else
-    $ECHO "Arg failed:" >&5
-    $ECHO "$OUTPUT" >&5
-    JVM_ARG_OK=false
-  fi
-
-
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
-$as_echo "$boot_jdk_jvmargs" >&6; }
-
-  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
-  JAVA_FLAGS=$boot_jdk_jvmargs
-
-
-
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
-$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
-
-  # Starting amount of heap memory.
-
-  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
-  $ECHO "Command: $JAVA -Xms64M -version" >&5
-  OUTPUT=`$JAVA -Xms64M -version 2>&1`
-  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
-  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
-  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
-    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
-    JVM_ARG_OK=true
-  else
-    $ECHO "Arg failed:" >&5
-    $ECHO "$OUTPUT" >&5
-    JVM_ARG_OK=false
-  fi
-
-
-  # Maximum amount of heap memory.
-  # Maximum stack size.
-  if test "x$BUILD_NUM_BITS" = x32; then
-    JVM_MAX_HEAP=1100M
-    STACK_SIZE=768
-  else
-    # Running Javac on a JVM on a 64-bit machine, takes more space since 64-bit
-    # pointers are used. Apparently, we need to increase the heap and stack
-    # space for the jvm. More specifically, when running javac to build huge
-    # jdk batch
-    JVM_MAX_HEAP=1600M
-    STACK_SIZE=1536
-  fi
-
-  $ECHO "Check if jvm arg is ok: -Xmx$JVM_MAX_HEAP" >&5
-  $ECHO "Command: $JAVA -Xmx$JVM_MAX_HEAP -version" >&5
-  OUTPUT=`$JAVA -Xmx$JVM_MAX_HEAP -version 2>&1`
-  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
-  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
-  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
-    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx$JVM_MAX_HEAP"
-    JVM_ARG_OK=true
-  else
-    $ECHO "Arg failed:" >&5
-    $ECHO "$OUTPUT" >&5
-    JVM_ARG_OK=false
-  fi
-
-
-  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
-  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
-  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
-  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
-  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
-  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
-    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
-    JVM_ARG_OK=true
-  else
-    $ECHO "Arg failed:" >&5
-    $ECHO "$OUTPUT" >&5
-    JVM_ARG_OK=false
-  fi
-
-
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
-$as_echo "$boot_jdk_jvmargs_big" >&6; }
-
-  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
-
-
-
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
-$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
-
-  # Use serial gc for small short lived tools if possible
-
-  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
-  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
-  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
-  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
-  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
-  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
-    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
-    JVM_ARG_OK=true
-  else
-    $ECHO "Arg failed:" >&5
-    $ECHO "$OUTPUT" >&5
-    JVM_ARG_OK=false
-  fi
-
-
-  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
-  $ECHO "Command: $JAVA -Xms32M -version" >&5
-  OUTPUT=`$JAVA -Xms32M -version 2>&1`
-  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
-  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
-  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
-    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
-    JVM_ARG_OK=true
-  else
-    $ECHO "Arg failed:" >&5
-    $ECHO "$OUTPUT" >&5
-    JVM_ARG_OK=false
-  fi
-
-
-  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
-  $ECHO "Command: $JAVA -Xmx512M -version" >&5
-  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
-  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
-  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
-  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
-    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
-    JVM_ARG_OK=true
-  else
-    $ECHO "Arg failed:" >&5
-    $ECHO "$OUTPUT" >&5
-    JVM_ARG_OK=false
-  fi
-
-
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
-$as_echo "$boot_jdk_jvmargs_small" >&6; }
-
-  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
-
-
-  JAVA_TOOL_FLAGS_SMALL=""
-  for f in $JAVA_FLAGS_SMALL; do
-    JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
-  done
-
-
-
 ###############################################################################
 #
 # Configure the sources to use. We can add or override individual directories.
@@ -27493,6 +27389,23 @@
 
 
     new_path=`$WHICH "$new_path" 2> /dev/null`
+    # bat and cmd files are not always considered executable in MSYS causing which
+    # to not find them
+    if test "x$new_path" = x \
+        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
+      new_path="$path"
+
+  windows_path="$new_path"
+  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+    unix_path=`$CYGPATH -u "$windows_path"`
+    new_path="$unix_path"
+  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+    new_path="$unix_path"
+  fi
+
+    fi
 
     if test "x$new_path" = x; then
       # It's still not found. Now this is an unrecoverable error.
@@ -28136,6 +28049,23 @@
 
 
     new_path=`$WHICH "$new_path" 2> /dev/null`
+    # bat and cmd files are not always considered executable in MSYS causing which
+    # to not find them
+    if test "x$new_path" = x \
+        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
+      new_path="$path"
+
+  windows_path="$new_path"
+  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+    unix_path=`$CYGPATH -u "$windows_path"`
+    new_path="$unix_path"
+  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+    new_path="$unix_path"
+  fi
+
+    fi
 
     if test "x$new_path" = x; then
       # It's still not found. Now this is an unrecoverable error.
@@ -28576,6 +28506,23 @@
 
 
     new_path=`$WHICH "$new_path" 2> /dev/null`
+    # bat and cmd files are not always considered executable in MSYS causing which
+    # to not find them
+    if test "x$new_path" = x \
+        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
+      new_path="$path"
+
+  windows_path="$new_path"
+  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+    unix_path=`$CYGPATH -u "$windows_path"`
+    new_path="$unix_path"
+  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+    new_path="$unix_path"
+  fi
+
+    fi
 
     if test "x$new_path" = x; then
       # It's still not found. Now this is an unrecoverable error.
@@ -29842,6 +29789,23 @@
 
 
     new_path=`$WHICH "$new_path" 2> /dev/null`
+    # bat and cmd files are not always considered executable in MSYS causing which
+    # to not find them
+    if test "x$new_path" = x \
+        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
+      new_path="$path"
+
+  windows_path="$new_path"
+  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+    unix_path=`$CYGPATH -u "$windows_path"`
+    new_path="$unix_path"
+  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+    new_path="$unix_path"
+  fi
+
+    fi
 
     if test "x$new_path" = x; then
       # It's still not found. Now this is an unrecoverable error.
@@ -30282,6 +30246,23 @@
 
 
     new_path=`$WHICH "$new_path" 2> /dev/null`
+    # bat and cmd files are not always considered executable in MSYS causing which
+    # to not find them
+    if test "x$new_path" = x \
+        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
+      new_path="$path"
+
+  windows_path="$new_path"
+  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+    unix_path=`$CYGPATH -u "$windows_path"`
+    new_path="$unix_path"
+  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+    new_path="$unix_path"
+  fi
+
+    fi
 
     if test "x$new_path" = x; then
       # It's still not found. Now this is an unrecoverable error.
@@ -31127,6 +31108,23 @@
 
 
     new_path=`$WHICH "$new_path" 2> /dev/null`
+    # bat and cmd files are not always considered executable in MSYS causing which
+    # to not find them
+    if test "x$new_path" = x \
+        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
+      new_path="$path"
+
+  windows_path="$new_path"
+  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+    unix_path=`$CYGPATH -u "$windows_path"`
+    new_path="$unix_path"
+  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+    new_path="$unix_path"
+  fi
+
+    fi
 
     if test "x$new_path" = x; then
       # It's still not found. Now this is an unrecoverable error.
@@ -31525,6 +31523,23 @@
 
 
     new_path=`$WHICH "$new_path" 2> /dev/null`
+    # bat and cmd files are not always considered executable in MSYS causing which
+    # to not find them
+    if test "x$new_path" = x \
+        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
+      new_path="$path"
+
+  windows_path="$new_path"
+  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+    unix_path=`$CYGPATH -u "$windows_path"`
+    new_path="$unix_path"
+  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+    new_path="$unix_path"
+  fi
+
+    fi
 
     if test "x$new_path" = x; then
       # It's still not found. Now this is an unrecoverable error.
@@ -31852,6 +31867,23 @@
 
 
     new_path=`$WHICH "$new_path" 2> /dev/null`
+    # bat and cmd files are not always considered executable in MSYS causing which
+    # to not find them
+    if test "x$new_path" = x \
+        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
+      new_path="$path"
+
+  windows_path="$new_path"
+  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+    unix_path=`$CYGPATH -u "$windows_path"`
+    new_path="$unix_path"
+  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+    new_path="$unix_path"
+  fi
+
+    fi
 
     if test "x$new_path" = x; then
       # It's still not found. Now this is an unrecoverable error.
@@ -32330,6 +32362,23 @@
 
 
     new_path=`$WHICH "$new_path" 2> /dev/null`
+    # bat and cmd files are not always considered executable in MSYS causing which
+    # to not find them
+    if test "x$new_path" = x \
+        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
+      new_path="$path"
+
+  windows_path="$new_path"
+  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+    unix_path=`$CYGPATH -u "$windows_path"`
+    new_path="$unix_path"
+  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+    new_path="$unix_path"
+  fi
+
+    fi
 
     if test "x$new_path" = x; then
       # It's still not found. Now this is an unrecoverable error.
@@ -32941,6 +32990,23 @@
 
 
     new_path=`$WHICH "$new_path" 2> /dev/null`
+    # bat and cmd files are not always considered executable in MSYS causing which
+    # to not find them
+    if test "x$new_path" = x \
+        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
+      new_path="$path"
+
+  windows_path="$new_path"
+  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+    unix_path=`$CYGPATH -u "$windows_path"`
+    new_path="$unix_path"
+  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+    new_path="$unix_path"
+  fi
+
+    fi
 
     if test "x$new_path" = x; then
       # It's still not found. Now this is an unrecoverable error.
@@ -33460,6 +33526,23 @@
 
 
     new_path=`$WHICH "$new_path" 2> /dev/null`
+    # bat and cmd files are not always considered executable in MSYS causing which
+    # to not find them
+    if test "x$new_path" = x \
+        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
+      new_path="$path"
+
+  windows_path="$new_path"
+  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+    unix_path=`$CYGPATH -u "$windows_path"`
+    new_path="$unix_path"
+  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+    new_path="$unix_path"
+  fi
+
+    fi
 
     if test "x$new_path" = x; then
       # It's still not found. Now this is an unrecoverable error.
@@ -33911,6 +33994,23 @@
 
 
     new_path=`$WHICH "$new_path" 2> /dev/null`
+    # bat and cmd files are not always considered executable in MSYS causing which
+    # to not find them
+    if test "x$new_path" = x \
+        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
+      new_path="$path"
+
+  windows_path="$new_path"
+  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+    unix_path=`$CYGPATH -u "$windows_path"`
+    new_path="$unix_path"
+  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+    new_path="$unix_path"
+  fi
+
+    fi
 
     if test "x$new_path" = x; then
       # It's still not found. Now this is an unrecoverable error.
@@ -34235,6 +34335,23 @@
 
 
     new_path=`$WHICH "$new_path" 2> /dev/null`
+    # bat and cmd files are not always considered executable in MSYS causing which
+    # to not find them
+    if test "x$new_path" = x \
+        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
+      new_path="$path"
+
+  windows_path="$new_path"
+  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+    unix_path=`$CYGPATH -u "$windows_path"`
+    new_path="$unix_path"
+  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+    new_path="$unix_path"
+  fi
+
+    fi
 
     if test "x$new_path" = x; then
       # It's still not found. Now this is an unrecoverable error.
@@ -34555,6 +34672,23 @@
 
 
     new_path=`$WHICH "$new_path" 2> /dev/null`
+    # bat and cmd files are not always considered executable in MSYS causing which
+    # to not find them
+    if test "x$new_path" = x \
+        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
+      new_path="$path"
+
+  windows_path="$new_path"
+  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+    unix_path=`$CYGPATH -u "$windows_path"`
+    new_path="$unix_path"
+  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+    new_path="$unix_path"
+  fi
+
+    fi
 
     if test "x$new_path" = x; then
       # It's still not found. Now this is an unrecoverable error.
@@ -34857,6 +34991,23 @@
 
 
     new_path=`$WHICH "$new_path" 2> /dev/null`
+    # bat and cmd files are not always considered executable in MSYS causing which
+    # to not find them
+    if test "x$new_path" = x \
+        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
+      new_path="$path"
+
+  windows_path="$new_path"
+  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+    unix_path=`$CYGPATH -u "$windows_path"`
+    new_path="$unix_path"
+  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+    new_path="$unix_path"
+  fi
+
+    fi
 
     if test "x$new_path" = x; then
       # It's still not found. Now this is an unrecoverable error.
@@ -35311,6 +35462,23 @@
 
 
     new_path=`$WHICH "$new_path" 2> /dev/null`
+    # bat and cmd files are not always considered executable in MSYS causing which
+    # to not find them
+    if test "x$new_path" = x \
+        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
+      new_path="$path"
+
+  windows_path="$new_path"
+  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+    unix_path=`$CYGPATH -u "$windows_path"`
+    new_path="$unix_path"
+  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+    new_path="$unix_path"
+  fi
+
+    fi
 
     if test "x$new_path" = x; then
       # It's still not found. Now this is an unrecoverable error.
@@ -35762,6 +35930,23 @@
 
 
     new_path=`$WHICH "$new_path" 2> /dev/null`
+    # bat and cmd files are not always considered executable in MSYS causing which
+    # to not find them
+    if test "x$new_path" = x \
+        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
+      new_path="$path"
+
+  windows_path="$new_path"
+  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+    unix_path=`$CYGPATH -u "$windows_path"`
+    new_path="$unix_path"
+  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+    new_path="$unix_path"
+  fi
+
+    fi
 
     if test "x$new_path" = x; then
       # It's still not found. Now this is an unrecoverable error.
@@ -36213,6 +36398,23 @@
 
 
     new_path=`$WHICH "$new_path" 2> /dev/null`
+    # bat and cmd files are not always considered executable in MSYS causing which
+    # to not find them
+    if test "x$new_path" = x \
+        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
+      new_path="$path"
+
+  windows_path="$new_path"
+  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+    unix_path=`$CYGPATH -u "$windows_path"`
+    new_path="$unix_path"
+  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+    new_path="$unix_path"
+  fi
+
+    fi
 
     if test "x$new_path" = x; then
       # It's still not found. Now this is an unrecoverable error.
@@ -36665,6 +36867,23 @@
 
 
     new_path=`$WHICH "$new_path" 2> /dev/null`
+    # bat and cmd files are not always considered executable in MSYS causing which
+    # to not find them
+    if test "x$new_path" = x \
+        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
+      new_path="$path"
+
+  windows_path="$new_path"
+  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+    unix_path=`$CYGPATH -u "$windows_path"`
+    new_path="$unix_path"
+  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+    new_path="$unix_path"
+  fi
+
+    fi
 
     if test "x$new_path" = x; then
       # It's still not found. Now this is an unrecoverable error.
@@ -37228,6 +37447,23 @@
 
 
     new_path=`$WHICH "$new_path" 2> /dev/null`
+    # bat and cmd files are not always considered executable in MSYS causing which
+    # to not find them
+    if test "x$new_path" = x \
+        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
+      new_path="$path"
+
+  windows_path="$new_path"
+  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+    unix_path=`$CYGPATH -u "$windows_path"`
+    new_path="$unix_path"
+  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+    new_path="$unix_path"
+  fi
+
+    fi
 
     if test "x$new_path" = x; then
       # It's still not found. Now this is an unrecoverable error.
@@ -37789,6 +38025,23 @@
 
 
     new_path=`$WHICH "$new_path" 2> /dev/null`
+    # bat and cmd files are not always considered executable in MSYS causing which
+    # to not find them
+    if test "x$new_path" = x \
+        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
+      new_path="$path"
+
+  windows_path="$new_path"
+  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+    unix_path=`$CYGPATH -u "$windows_path"`
+    new_path="$unix_path"
+  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+    new_path="$unix_path"
+  fi
+
+    fi
 
     if test "x$new_path" = x; then
       # It's still not found. Now this is an unrecoverable error.
@@ -38359,6 +38612,23 @@
 
 
     new_path=`$WHICH "$new_path" 2> /dev/null`
+    # bat and cmd files are not always considered executable in MSYS causing which
+    # to not find them
+    if test "x$new_path" = x \
+        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
+      new_path="$path"
+
+  windows_path="$new_path"
+  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+    unix_path=`$CYGPATH -u "$windows_path"`
+    new_path="$unix_path"
+  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+    new_path="$unix_path"
+  fi
+
+    fi
 
     if test "x$new_path" = x; then
       # It's still not found. Now this is an unrecoverable error.
@@ -38926,6 +39196,23 @@
 
 
     new_path=`$WHICH "$new_path" 2> /dev/null`
+    # bat and cmd files are not always considered executable in MSYS causing which
+    # to not find them
+    if test "x$new_path" = x \
+        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
+      new_path="$path"
+
+  windows_path="$new_path"
+  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+    unix_path=`$CYGPATH -u "$windows_path"`
+    new_path="$unix_path"
+  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+    new_path="$unix_path"
+  fi
+
+    fi
 
     if test "x$new_path" = x; then
       # It's still not found. Now this is an unrecoverable error.
@@ -39402,6 +39689,23 @@
 
 
     new_path=`$WHICH "$new_path" 2> /dev/null`
+    # bat and cmd files are not always considered executable in MSYS causing which
+    # to not find them
+    if test "x$new_path" = x \
+        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
+      new_path="$path"
+
+  windows_path="$new_path"
+  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+    unix_path=`$CYGPATH -u "$windows_path"`
+    new_path="$unix_path"
+  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+    new_path="$unix_path"
+  fi
+
+    fi
 
     if test "x$new_path" = x; then
       # It's still not found. Now this is an unrecoverable error.
@@ -39853,6 +40157,23 @@
 
 
     new_path=`$WHICH "$new_path" 2> /dev/null`
+    # bat and cmd files are not always considered executable in MSYS causing which
+    # to not find them
+    if test "x$new_path" = x \
+        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
+      new_path="$path"
+
+  windows_path="$new_path"
+  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+    unix_path=`$CYGPATH -u "$windows_path"`
+    new_path="$unix_path"
+  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+    new_path="$unix_path"
+  fi
+
+    fi
 
     if test "x$new_path" = x; then
       # It's still not found. Now this is an unrecoverable error.
@@ -40304,6 +40625,23 @@
 
 
     new_path=`$WHICH "$new_path" 2> /dev/null`
+    # bat and cmd files are not always considered executable in MSYS causing which
+    # to not find them
+    if test "x$new_path" = x \
+        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
+      new_path="$path"
+
+  windows_path="$new_path"
+  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+    unix_path=`$CYGPATH -u "$windows_path"`
+    new_path="$unix_path"
+  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+    new_path="$unix_path"
+  fi
+
+    fi
 
     if test "x$new_path" = x; then
       # It's still not found. Now this is an unrecoverable error.
@@ -41991,17 +42329,15 @@
       # no adjustment
       ;;
     fastdebug )
-      # Add compile time bounds checks.
-      CFLAGS_DEBUG_OPTIONS="-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1"
-      CXXFLAGS_DEBUG_OPTIONS="-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1"
+      # no adjustment
       ;;
     slowdebug )
-      # Add runtime bounds checks and symbol info.
-      CFLAGS_DEBUG_OPTIONS="-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector-all --param ssp-buffer-size=1"
-      CXXFLAGS_DEBUG_OPTIONS="-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector-all --param ssp-buffer-size=1"
+      # Add runtime stack smashing and undefined behavior checks
+      CFLAGS_DEBUG_OPTIONS="-fstack-protector-all --param ssp-buffer-size=1"
+      CXXFLAGS_DEBUG_OPTIONS="-fstack-protector-all --param ssp-buffer-size=1"
       if test "x$HAS_CFLAG_DETECT_UNDEFINED_BEHAVIOR" = "xtrue"; then
         CFLAGS_DEBUG_OPTIONS="$CFLAGS_DEBUG_OPTIONS  $CFLAG_DETECT_UNDEFINED_BEHAVIOR_FLAG"
-        CXXFLAGS_DEBUG_OPTIONS="$CXXFLAGS_DEBUG_OPTIONS $CFLAG_DETECT_UNDEFINED_BEHAVIOR_FLAG"
+        CXXFLAGS_DEBUG_OPTIONS="$CXXFLAGS_DEBUG_OPTIONS $CFLAG_DETECT_UNDEFINED_BEHAVIsOR_FLAG"
       fi
       ;;
     esac
@@ -42629,7 +42965,7 @@
 
   case "${TOOLCHAIN_TYPE}" in
     microsoft)
-      CFLAGS_WARNINGS_ARE_ERRORS="/WX"
+      CFLAGS_WARNINGS_ARE_ERRORS="-WX"
       ;;
     solstudio)
       CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
@@ -48711,12 +49047,22 @@
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
 $as_echo_n "checking found msvcr100.dll architecture... " >&6; }
     MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
-    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
-      CORRECT_MSVCR_ARCH=386
-    else
-      CORRECT_MSVCR_ARCH=x86-64
-    fi
-    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
+    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
+      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
+      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
+        CORRECT_MSVCR_ARCH="PE32 executable"
+      else
+        CORRECT_MSVCR_ARCH="PE32+ executable"
+      fi
+    else
+      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
+        CORRECT_MSVCR_ARCH=386
+      else
+        CORRECT_MSVCR_ARCH=x86-64
+      fi
+    fi
+    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
 $as_echo "ok" >&6; }
       MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
@@ -48767,12 +49113,22 @@
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
 $as_echo_n "checking found msvcr100.dll architecture... " >&6; }
     MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
-    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
-      CORRECT_MSVCR_ARCH=386
-    else
-      CORRECT_MSVCR_ARCH=x86-64
-    fi
-    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
+    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
+      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
+      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
+        CORRECT_MSVCR_ARCH="PE32 executable"
+      else
+        CORRECT_MSVCR_ARCH="PE32+ executable"
+      fi
+    else
+      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
+        CORRECT_MSVCR_ARCH=386
+      else
+        CORRECT_MSVCR_ARCH=x86-64
+      fi
+    fi
+    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
 $as_echo "ok" >&6; }
       MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
@@ -48805,12 +49161,22 @@
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
 $as_echo_n "checking found msvcr100.dll architecture... " >&6; }
     MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
-    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
-      CORRECT_MSVCR_ARCH=386
-    else
-      CORRECT_MSVCR_ARCH=x86-64
-    fi
-    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
+    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
+      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
+      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
+        CORRECT_MSVCR_ARCH="PE32 executable"
+      else
+        CORRECT_MSVCR_ARCH="PE32+ executable"
+      fi
+    else
+      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
+        CORRECT_MSVCR_ARCH=386
+      else
+        CORRECT_MSVCR_ARCH=x86-64
+      fi
+    fi
+    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
 $as_echo "ok" >&6; }
       MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
@@ -48853,12 +49219,22 @@
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
 $as_echo_n "checking found msvcr100.dll architecture... " >&6; }
     MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
-    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
-      CORRECT_MSVCR_ARCH=386
-    else
-      CORRECT_MSVCR_ARCH=x86-64
-    fi
-    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
+    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
+      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
+      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
+        CORRECT_MSVCR_ARCH="PE32 executable"
+      else
+        CORRECT_MSVCR_ARCH="PE32+ executable"
+      fi
+    else
+      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
+        CORRECT_MSVCR_ARCH=386
+      else
+        CORRECT_MSVCR_ARCH=x86-64
+      fi
+    fi
+    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
 $as_echo "ok" >&6; }
       MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
@@ -48906,12 +49282,22 @@
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
 $as_echo_n "checking found msvcr100.dll architecture... " >&6; }
     MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
-    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
-      CORRECT_MSVCR_ARCH=386
-    else
-      CORRECT_MSVCR_ARCH=x86-64
-    fi
-    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
+    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
+      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
+      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
+        CORRECT_MSVCR_ARCH="PE32 executable"
+      else
+        CORRECT_MSVCR_ARCH="PE32+ executable"
+      fi
+    else
+      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
+        CORRECT_MSVCR_ARCH=386
+      else
+        CORRECT_MSVCR_ARCH=x86-64
+      fi
+    fi
+    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
 $as_echo "ok" >&6; }
       MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
@@ -48955,12 +49341,22 @@
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
 $as_echo_n "checking found msvcr100.dll architecture... " >&6; }
     MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
-    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
-      CORRECT_MSVCR_ARCH=386
-    else
-      CORRECT_MSVCR_ARCH=x86-64
-    fi
-    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
+    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
+      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
+      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
+        CORRECT_MSVCR_ARCH="PE32 executable"
+      else
+        CORRECT_MSVCR_ARCH="PE32+ executable"
+      fi
+    else
+      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
+        CORRECT_MSVCR_ARCH=386
+      else
+        CORRECT_MSVCR_ARCH=x86-64
+      fi
+    fi
+    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
 $as_echo "ok" >&6; }
       MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
@@ -49300,8 +49696,8 @@
     # Number of jobs was not specified, calculate.
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
 $as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
-    # Approximate memory in GB, rounding up a bit.
-    memory_gb=`expr $MEMORY_SIZE / 1100`
+    # Approximate memory in GB.
+    memory_gb=`expr $MEMORY_SIZE / 1024`
     # Pick the lowest of memory in gb and number of cores.
     if test "$memory_gb" -lt "$NUM_CORES"; then
       JOBS="$memory_gb"
@@ -49327,6 +49723,208 @@
 
 
 
+# Setup arguments for the boot jdk (after cores and memory have been setup)
+
+  ##############################################################################
+  #
+  # Specify jvm options for anything that is run with the Boot JDK.
+  # Not all JVM:s accept the same arguments on the command line.
+  #
+
+# Check whether --with-boot-jdk-jvmargs was given.
+if test "${with_boot_jdk_jvmargs+set}" = set; then :
+  withval=$with_boot_jdk_jvmargs;
+fi
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
+$as_echo_n "checking flags for boot jdk java command ... " >&6; }
+
+  # Disable special log output when a debug build is used as Boot JDK...
+
+  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
+  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
+  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
+  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
+  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
+  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
+    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
+    JVM_ARG_OK=true
+  else
+    $ECHO "Arg failed:" >&5
+    $ECHO "$OUTPUT" >&5
+    JVM_ARG_OK=false
+  fi
+
+
+  # Apply user provided options.
+
+  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
+  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
+  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
+  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
+  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
+  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
+    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
+    JVM_ARG_OK=true
+  else
+    $ECHO "Arg failed:" >&5
+    $ECHO "$OUTPUT" >&5
+    JVM_ARG_OK=false
+  fi
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
+$as_echo "$boot_jdk_jvmargs" >&6; }
+
+  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
+  JAVA_FLAGS=$boot_jdk_jvmargs
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
+$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
+
+  # Starting amount of heap memory.
+
+  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
+  $ECHO "Command: $JAVA -Xms64M -version" >&5
+  OUTPUT=`$JAVA -Xms64M -version 2>&1`
+  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
+  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
+  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
+    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
+    JVM_ARG_OK=true
+  else
+    $ECHO "Arg failed:" >&5
+    $ECHO "$OUTPUT" >&5
+    JVM_ARG_OK=false
+  fi
+
+
+  # Maximum amount of heap memory.
+  # Maximum stack size.
+  JVM_MAX_HEAP=`expr $MEMORY_SIZE / 2`
+  if test "x$BUILD_NUM_BITS" = x32; then
+    if test "$JVM_MAX_HEAP" -gt "1100"; then
+      JVM_MAX_HEAP=1100
+    elif test "$JVM_MAX_HEAP" -lt "512"; then
+      JVM_MAX_HEAP=512
+    fi
+    STACK_SIZE=768
+  else
+    # Running Javac on a JVM on a 64-bit machine, takes more space since 64-bit
+    # pointers are used. Apparently, we need to increase the heap and stack
+    # space for the jvm. More specifically, when running javac to build huge
+    # jdk batch
+    if test "$JVM_MAX_HEAP" -gt "1600"; then
+      JVM_MAX_HEAP=1600
+    elif test "$JVM_MAX_HEAP" -lt "512"; then
+      JVM_MAX_HEAP=512
+    fi
+    STACK_SIZE=1536
+  fi
+
+  $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
+  $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
+  OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
+  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
+  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
+  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
+    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
+    JVM_ARG_OK=true
+  else
+    $ECHO "Arg failed:" >&5
+    $ECHO "$OUTPUT" >&5
+    JVM_ARG_OK=false
+  fi
+
+
+  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
+  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
+  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
+  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
+  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
+  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
+    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
+    JVM_ARG_OK=true
+  else
+    $ECHO "Arg failed:" >&5
+    $ECHO "$OUTPUT" >&5
+    JVM_ARG_OK=false
+  fi
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
+$as_echo "$boot_jdk_jvmargs_big" >&6; }
+
+  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
+$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
+
+  # Use serial gc for small short lived tools if possible
+
+  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
+  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
+  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
+  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
+  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
+  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
+    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
+    JVM_ARG_OK=true
+  else
+    $ECHO "Arg failed:" >&5
+    $ECHO "$OUTPUT" >&5
+    JVM_ARG_OK=false
+  fi
+
+
+  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
+  $ECHO "Command: $JAVA -Xms32M -version" >&5
+  OUTPUT=`$JAVA -Xms32M -version 2>&1`
+  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
+  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
+  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
+    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
+    JVM_ARG_OK=true
+  else
+    $ECHO "Arg failed:" >&5
+    $ECHO "$OUTPUT" >&5
+    JVM_ARG_OK=false
+  fi
+
+
+  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
+  $ECHO "Command: $JAVA -Xmx512M -version" >&5
+  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
+  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
+  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
+  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
+    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
+    JVM_ARG_OK=true
+  else
+    $ECHO "Arg failed:" >&5
+    $ECHO "$OUTPUT" >&5
+    JVM_ARG_OK=false
+  fi
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
+$as_echo "$boot_jdk_jvmargs_small" >&6; }
+
+  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
+
+
+  JAVA_TOOL_FLAGS_SMALL=""
+  for f in $JAVA_FLAGS_SMALL; do
+    JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
+  done
+
+
+
 # Setup smart javac (after cores and memory have been setup)
 
 
@@ -49343,44 +49941,11 @@
       as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
     fi
   else
-    SJAVAC_SERVER_JAVA=""
-    # Hotspot specific options.
-
-  $ECHO "Check if jvm arg is ok: -verbosegc" >&5
-  $ECHO "Command: $JAVA -verbosegc -version" >&5
-  OUTPUT=`$JAVA -verbosegc -version 2>&1`
-  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
-  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
-  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
-    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -verbosegc"
-    JVM_ARG_OK=true
-  else
-    $ECHO "Arg failed:" >&5
-    $ECHO "$OUTPUT" >&5
-    JVM_ARG_OK=false
-  fi
-
-    # JRockit specific options.
-
-  $ECHO "Check if jvm arg is ok: -Xverbose:gc" >&5
-  $ECHO "Command: $JAVA -Xverbose:gc -version" >&5
-  OUTPUT=`$JAVA -Xverbose:gc -version 2>&1`
-  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
-  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
-  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
-    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xverbose:gc"
-    JVM_ARG_OK=true
-  else
-    $ECHO "Arg failed:" >&5
-    $ECHO "$OUTPUT" >&5
-    JVM_ARG_OK=false
-  fi
-
-    SJAVAC_SERVER_JAVA="$JAVA $SJAVAC_SERVER_JAVA"
-  fi
-
-
-  if test "$MEMORY_SIZE" -gt "2500"; then
+    SJAVAC_SERVER_JAVA="$JAVA"
+  fi
+
+
+  if test "$MEMORY_SIZE" -gt "3000"; then
 
   $ECHO "Check if jvm arg is ok: -d64" >&5
   $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
@@ -49402,16 +49967,31 @@
     fi
   fi
 
+  MX_VALUE=`expr $MEMORY_SIZE / 2`
   if test "$JVM_64BIT" = true; then
-    if test "$MEMORY_SIZE" -gt "17000"; then
-
-  $ECHO "Check if jvm arg is ok: -Xms10G -Xmx10G" >&5
-  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version" >&5
-  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1`
+    # Set ms lower than mx since more than one instance of the server might
+    # get launched at the same time before they figure out which instance won.
+    MS_VALUE=512
+    if test "$MX_VALUE" -gt "2048"; then
+      MX_VALUE=2048
+    fi
+  else
+    MS_VALUE=256
+    if test "$MX_VALUE" -gt "1500"; then
+      MX_VALUE=1500
+    fi
+  fi
+  if test "$MX_VALUE" -lt "512"; then
+    MX_VALUE=512
+  fi
+
+  $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
+  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
+  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
-    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G"
+    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
     JVM_ARG_OK=true
   else
     $ECHO "Arg failed:" >&5
@@ -49419,113 +49999,7 @@
     JVM_ARG_OK=false
   fi
 
-    fi
-    if test "$MEMORY_SIZE" -gt "10000" && test "$JVM_ARG_OK" = false; then
-
-  $ECHO "Check if jvm arg is ok: -Xms6G -Xmx6G" >&5
-  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version" >&5
-  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1`
-  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
-  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
-  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
-    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G"
-    JVM_ARG_OK=true
-  else
-    $ECHO "Arg failed:" >&5
-    $ECHO "$OUTPUT" >&5
-    JVM_ARG_OK=false
-  fi
-
-    fi
-    if test "$MEMORY_SIZE" -gt "5000" && test "$JVM_ARG_OK" = false; then
-
-  $ECHO "Check if jvm arg is ok: -Xms1G -Xmx3G" >&5
-  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version" >&5
-  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1`
-  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
-  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
-  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
-    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G"
-    JVM_ARG_OK=true
-  else
-    $ECHO "Arg failed:" >&5
-    $ECHO "$OUTPUT" >&5
-    JVM_ARG_OK=false
-  fi
-
-    fi
-    if test "$MEMORY_SIZE" -gt "3800" && test "$JVM_ARG_OK" = false; then
-
-  $ECHO "Check if jvm arg is ok: -Xms1G -Xmx2500M" >&5
-  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version" >&5
-  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1`
-  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
-  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
-  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
-    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M"
-    JVM_ARG_OK=true
-  else
-    $ECHO "Arg failed:" >&5
-    $ECHO "$OUTPUT" >&5
-    JVM_ARG_OK=false
-  fi
-
-    fi
-  fi
-  if test "$MEMORY_SIZE" -gt "2500" && test "$JVM_ARG_OK" = false; then
-
-  $ECHO "Check if jvm arg is ok: -Xms1000M -Xmx1500M" >&5
-  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version" >&5
-  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version 2>&1`
-  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
-  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
-  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
-    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M"
-    JVM_ARG_OK=true
-  else
-    $ECHO "Arg failed:" >&5
-    $ECHO "$OUTPUT" >&5
-    JVM_ARG_OK=false
-  fi
-
-  fi
-  if test "$MEMORY_SIZE" -gt "1000" && test "$JVM_ARG_OK" = false; then
-
-  $ECHO "Check if jvm arg is ok: -Xms400M -Xmx1100M" >&5
-  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version" >&5
-  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1`
-  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
-  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
-  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
-    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M"
-    JVM_ARG_OK=true
-  else
-    $ECHO "Arg failed:" >&5
-    $ECHO "$OUTPUT" >&5
-    JVM_ARG_OK=false
-  fi
-
-  fi
-  if test "$JVM_ARG_OK" = false; then
-
-  $ECHO "Check if jvm arg is ok: -Xms256M -Xmx512M" >&5
-  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version" >&5
-  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1`
-  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
-  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
-  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
-    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M"
-    JVM_ARG_OK=true
-  else
-    $ECHO "Arg failed:" >&5
-    $ECHO "$OUTPUT" >&5
-    JVM_ARG_OK=false
-  fi
-
-  fi
-
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
-$as_echo_n "checking whether to use sjavac... " >&6; }
+
   # Check whether --enable-sjavac was given.
 if test "${enable_sjavac+set}" = set; then :
   enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
@@ -49533,6 +50007,13 @@
   ENABLE_SJAVAC='no'
 fi
 
+  if test "x$JVM_ARG_OK" = "xfalse"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
+$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
+    ENABLE_SJAVAC=no;
+  fi
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
+$as_echo_n "checking whether to use sjavac... " >&6; }
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
 $as_echo "$ENABLE_SJAVAC" >&6; }
 
@@ -49903,7 +50384,7 @@
 
 # Check for some common pitfalls
 
-  if test x"$OPENJDK_BUILD_OS" = xwindows; then
+  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
     file_to_test="$SRC_ROOT/LICENSE"
     if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
       as_fn_error $? "Bad file permissions on src files. This is usually caused by cloning the repositories with a non cygwin hg in a directory not created in cygwin." "$LINENO" 5
--- a/common/autoconf/platform.m4	Fri Aug 29 08:14:19 2014 -0700
+++ b/common/autoconf/platform.m4	Thu Sep 04 14:45:08 2014 -0700
@@ -173,6 +173,7 @@
   OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
   AC_SUBST(OPENJDK_BUILD_OS)
   AC_SUBST(OPENJDK_BUILD_OS_API)
+  AC_SUBST(OPENJDK_BUILD_OS_ENV)
   AC_SUBST(OPENJDK_BUILD_CPU)
   AC_SUBST(OPENJDK_BUILD_CPU_ARCH)
   AC_SUBST(OPENJDK_BUILD_CPU_BITS)
@@ -194,6 +195,7 @@
   OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
   AC_SUBST(OPENJDK_TARGET_OS)
   AC_SUBST(OPENJDK_TARGET_OS_API)
+  AC_SUBST(OPENJDK_TARGET_OS_ENV)
   AC_SUBST(OPENJDK_TARGET_CPU)
   AC_SUBST(OPENJDK_TARGET_CPU_ARCH)
   AC_SUBST(OPENJDK_TARGET_CPU_BITS)
--- a/common/autoconf/spec.gmk.in	Fri Aug 29 08:14:19 2014 -0700
+++ b/common/autoconf/spec.gmk.in	Thu Sep 04 14:45:08 2014 -0700
@@ -106,6 +106,7 @@
 # When not cross-compiling, it is the same as the target.
 OPENJDK_BUILD_OS:=@OPENJDK_BUILD_OS@
 OPENJDK_BUILD_OS_API:=@OPENJDK_BUILD_OS_API@
+OPENJDK_BUILD_OS_ENV:=@OPENJDK_BUILD_OS_ENV@
 
 OPENJDK_BUILD_CPU:=@OPENJDK_BUILD_CPU@
 OPENJDK_BUILD_CPU_ARCH:=@OPENJDK_BUILD_CPU_ARCH@
--- a/common/autoconf/toolchain_windows.m4	Fri Aug 29 08:14:19 2014 -0700
+++ b/common/autoconf/toolchain_windows.m4	Thu Sep 04 14:45:08 2014 -0700
@@ -244,12 +244,22 @@
     # Need to check if the found msvcr is correct architecture
     AC_MSG_CHECKING([found msvcr100.dll architecture])
     MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
-    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
-      CORRECT_MSVCR_ARCH=386
+    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
+      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
+      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
+        CORRECT_MSVCR_ARCH="PE32 executable"
+      else
+        CORRECT_MSVCR_ARCH="PE32+ executable"
+      fi
     else
-      CORRECT_MSVCR_ARCH=x86-64
+      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
+        CORRECT_MSVCR_ARCH=386
+      else
+        CORRECT_MSVCR_ARCH=x86-64
+      fi
     fi
-    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
+    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
       AC_MSG_RESULT([ok])
       MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
       AC_MSG_CHECKING([for msvcr100.dll])
--- a/common/bin/hgforest.sh	Fri Aug 29 08:14:19 2014 -0700
+++ b/common/bin/hgforest.sh	Thu Sep 04 14:45:08 2014 -0700
@@ -77,6 +77,11 @@
   shift
 done
 
+# debug mode
+if [ "${HGFOREST_DEBUG:-false}" = "true" ] ; then
+  global_opts="${global_opts} --debug"
+fi
+
 # silence standard output?
 if [ ${qflag} = "true" ] ; then
   global_opts="${global_opts} -q"
@@ -89,14 +94,26 @@
 fi
 
 # Make sure we have a command.
-if [ $# -lt 1 -o -z "${1:-}" ] ; then
-  echo "ERROR: No command to hg supplied!"
-  usage
+if [ ${#} -lt 1 -o -z "${1:-}" ] ; then
+  echo "ERROR: No command to hg supplied!" > ${status_output}
+  usage > ${status_output}
 fi
 
-command="$1"; shift
+# grab command
+command="${1}"; shift
+
+if [ ${vflag} = "true" ] ; then
+  echo "# Mercurial command: ${command}" > ${status_output}
+fi
+
+
+# capture command options and arguments (if any)
 command_args="${@:-}"
 
+if [ ${vflag} = "true" ] ; then
+  echo "# Mercurial command arguments: ${command_args}" > ${status_output}
+fi
+
 # Clean out the temporary directory that stores the pid files.
 tmp=/tmp/forest.$$
 rm -f -r ${tmp}
@@ -104,7 +121,8 @@
 
 
 if [ "${HGFOREST_DEBUG:-false}" = "true" ] ; then
-  echo "DEBUG: temp files are in: ${tmp}"
+  # ignores redirection.
+  echo "DEBUG: temp files are in: ${tmp}" >&2
 fi
 
 # Check if we can use fifos for monitoring sub-process completion.
@@ -377,21 +395,33 @@
       fi
     fi
   done
+
+  if [ ${have_fifos} = "true" ]; then
+    # done with the fifo
+    exec 3>&-
+  fi
 fi
 
 # Wait for all subprocesses to complete
 wait
 
 # Terminate with exit 0 only if all subprocesses were successful
+# Terminate with highest exit code of subprocesses
 ec=0
 if [ -d ${tmp} ]; then
   rcfiles="`(ls -a ${tmp}/*.pid.rc 2> /dev/null) || echo ''`"
   for rc in ${rcfiles} ; do
     exit_code=`cat ${rc} | tr -d ' \n\r'`
     if [ "${exit_code}" != "0" ] ; then
+      if [ ${exit_code} -gt 1 ]; then
+        # mercurial exit codes greater than "1" signal errors.
       repo="`echo ${rc} | sed -e 's@^'${tmp}'@@' -e 's@/*\([^/]*\)\.pid\.rc$@\1@' -e 's@_@/@g'`"
       echo "WARNING: ${repo} exited abnormally (${exit_code})" > ${status_output}
-      ec=1
+      fi
+      if [ ${exit_code} -gt ${ec} ]; then
+        # assume that larger exit codes are more significant
+        ec=${exit_code}
+      fi
     fi
   done
 fi
--- a/corba/.hgtags	Fri Aug 29 08:14:19 2014 -0700
+++ b/corba/.hgtags	Thu Sep 04 14:45:08 2014 -0700
@@ -269,3 +269,5 @@
 8a44142bb7fc8118f70f91a1b97c12dfc50563ee jdk9-b24
 da08cca6b97f41b7081a3e176dcb400af6e4bb26 jdk9-b25
 6c777df597bbf5abba3488d44c401edfe73c74af jdk9-b26
+7e06bf1dcb0907b80ddf59315426ce9ce775e56d jdk9-b27
+a00b04ef067e39f50b9a0fea6f1904e35d632a73 jdk9-b28
--- a/corba/make/GensrcCorba.gmk	Fri Aug 29 08:14:19 2014 -0700
+++ b/corba/make/GensrcCorba.gmk	Thu Sep 04 14:45:08 2014 -0700
@@ -50,8 +50,9 @@
     INCLUDES := com/sun/tools/corba/se/idl, \
     EXCLUDE_FILES := ResourceBundleUtil.java))
 
+# Force the language to english for predictable source code generation.
 TOOL_IDLJ_CMD := $(JAVA) -cp $(CORBA_OUTPUTDIR)/idlj_classes \
-    com.sun.tools.corba.se.idl.toJavaPortable.Compile
+    -Duser.language=en com.sun.tools.corba.se.idl.toJavaPortable.Compile
 
 ################################################################################
 
--- a/corba/src/java.corba/share/classes/org/omg/CORBA/FloatSeqHelper.java	Fri Aug 29 08:14:19 2014 -0700
+++ b/corba/src/java.corba/share/classes/org/omg/CORBA/FloatSeqHelper.java	Thu Sep 04 14:45:08 2014 -0700
@@ -38,11 +38,11 @@
 * OMG specifications :
 *   <ul>
 *       <li> ORB core as defined by CORBA 2.3.1
-*       (<a href="http://cgi.omg.org/cgi-bin/doc?formal/99-10-07">formal/99-10-07</a>)
+*       (<a href="http://www.omg.org/cgi-bin/doc?formal/99-10-07">formal/99-10-07</a>)
 *       </li>
 *
 *       <li> IDL/Java Language Mapping as defined in
-*       <a href="http://cgi.omg.org/cgi-bin/doc?ptc/00-01-08">ptc/00-01-08</a>
+*       <a href="http://www.omg.org/cgi-bin/doc?ptc/00-01-08">ptc/00-01-08</a>
 *       </li>
 *   </ul>
 */
--- a/get_source.sh	Fri Aug 29 08:14:19 2014 -0700
+++ b/get_source.sh	Thu Sep 04 14:45:08 2014 -0700
@@ -67,7 +67,7 @@
   error "Could not locate Mercurial command"
 fi
 
-hgversion="`hg --version 2> /dev/null | sed -n -e 's@^Mercurial Distributed SCM (version \([^+]*\).*)\$@\1@p'`"
+hgversion="`LANGUAGE=en hg --version 2> /dev/null | sed -n -e 's@^Mercurial Distributed SCM (version \([^+]*\).*)\$@\1@p'`"
 if [ "x${hgversion}" = "x" ] ; then
   error "Could not determine Mercurial version of $hgwhere"
 fi
--- a/hotspot/.hgtags	Fri Aug 29 08:14:19 2014 -0700
+++ b/hotspot/.hgtags	Thu Sep 04 14:45:08 2014 -0700
@@ -429,3 +429,6 @@
 dde2d03b0ea46a27650839e3a1d212c7c1f7b4c8 jdk9-b24
 6de94e8693240cec8aae11f6b42f43433456a733 jdk9-b25
 48b95a073d752d6891cc0d1d2836b321ecf3ce0c jdk9-b26
+f95347244306affc32ce3056f27ceff7b2100810 jdk9-b27
+657294869d7ff063e055f5492cab7ce5612ca851 jdk9-b28
+deb29e92f68ace2808a36ecfa18c7d61dcb645bb jdk9-b29
--- a/jaxp/.hgtags	Fri Aug 29 08:14:19 2014 -0700
+++ b/jaxp/.hgtags	Thu Sep 04 14:45:08 2014 -0700
@@ -269,3 +269,5 @@
 345af113f57206711f75089c3ebf84a36a789122 jdk9-b24
 73757f4b8aa353ca8937abc07e79e7ece4c011a1 jdk9-b25
 a5aea8318ae4a9c2105228568688875142d70344 jdk9-b26
+2bfaf29cc90b19948938e3ef1a0983eee68806c7 jdk9-b27
+dc1e26434b3fd7e9b8eeab149103c1e30965f95c jdk9-b28
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/Constants.java	Fri Aug 29 08:14:19 2014 -0700
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/Constants.java	Thu Sep 04 14:45:08 2014 -0700
@@ -1,13 +1,10 @@
 /*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
- */
-
-/*
- * Copyright 2005 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
  *
  *      http://www.apache.org/licenses/LICENSE-2.0
  *
@@ -41,6 +38,9 @@
     public static final String NS_XMLSCHEMA = "http://www.w3.org/2001/XMLSchema".intern();
     public static final String NS_DTD = "http://www.w3.org/TR/REC-xml".intern();
 
+    // Schema Versions:
+    public static final String W3C_XML_SCHEMA10_NS_URI = "http://www.w3.org/XML/XMLSchema/v1.0".intern();
+
     // Schema features
     public static final String SUN_SCHEMA_FEATURE_PREFIX = "http://java.sun.com/xml/schema/features/";
     public static final String SUN_REPORT_IGNORED_ELEMENT_CONTENT_WHITESPACE = "report-ignored-element-content-whitespace";
@@ -487,6 +487,40 @@
     /** XInclude fixup language feature ("xinclude/fixup-language"). */
     public static final String XINCLUDE_FIXUP_LANGUAGE_FEATURE = "xinclude/fixup-language";
 
+     /**
+     * Feature to ignore xsi:type attributes on elements during validation,
+     * until a global element declaration is found. ("validation/schema/ignore-xsi-type-until-elemdecl")
+     * If this feature is on when validating a document, then beginning at the validation root
+     * element, xsi:type attributes are ignored until a global element declaration is
+     * found for an element.  Once a global element declaration has been found, xsi:type
+     * attributes will start being processed for the sub-tree beginning at the element for
+     * which the declaration was found.
+     *
+     * Suppose an element A has two element children, B and C.
+     *
+     * If a global element declaration is found for A, xsi:type attributes on A, B and C,
+     * and all of B and C's descendents, will be processed.
+     *
+     * If no global element declaration is found for A or B, but one is found for C,
+     * then xsi:type attributes will be ignored on A and B (and any descendents of B,
+     * until a global element declaration is found), but xsi:type attributes will be
+     * processed for C and all of C's descendents.
+     *
+     * Once xsi:type attributes stop being ignored for a subtree, they do not start
+     * being ignored again, even if more elements are encountered for which no global
+     * element declaration can be found.
+     */
+    public static final String IGNORE_XSI_TYPE_FEATURE = "validation/schema/ignore-xsi-type-until-elemdecl";
+
+    /** Perform checking of ID/IDREFs ("validation/id-idref-checking") */
+    public static final String ID_IDREF_CHECKING_FEATURE = "validation/id-idref-checking";
+
+    /** Feature to ignore errors caused by identity constraints ("validation/identity-constraint-checking") */
+    public static final String IDC_CHECKING_FEATURE = "validation/identity-constraint-checking";
+
+    /** Feature to ignore errors caused by unparsed entities ("validation/unparsed-entity-checking") */
+    public static final String UNPARSED_ENTITY_CHECKING_FEATURE = "validation/unparsed-entity-checking";
+
     /**
      * Internal feature. When set to true the schema validator will only use
      * schema components from the grammar pool provided.
@@ -598,6 +632,8 @@
     /** Validation manager property ("internal/validation-manager"). */
     public static final String VALIDATION_MANAGER_PROPERTY = "internal/validation-manager";
 
+    /** Schema type of the root element in a document ("validation/schema/root-type-definition"). */
+    public static final String ROOT_TYPE_DEFINITION_PROPERTY = "validation/schema/root-type-definition";
 
     /** XPointer Schema property ("xpointer-schema"). */
     public static final String XPOINTER_SCHEMA_PROPERTY = "xpointer-schema";
@@ -739,6 +775,10 @@
         XINCLUDE_FEATURE,
         XINCLUDE_FIXUP_BASE_URIS_FEATURE,
         XINCLUDE_FIXUP_LANGUAGE_FEATURE,
+        IGNORE_XSI_TYPE_FEATURE,
+        ID_IDREF_CHECKING_FEATURE,
+        IDC_CHECKING_FEATURE,
+        UNPARSED_ENTITY_CHECKING_FEATURE,
         NAMESPACE_GROWTH_FEATURE,
         TOLERATE_DUPLICATES_FEATURE,
     };
@@ -762,6 +802,7 @@
             VALIDATION_MANAGER_PROPERTY,
             BUFFER_SIZE_PROPERTY,
             SECURITY_MANAGER_PROPERTY,
+            ROOT_TYPE_DEFINITION_PROPERTY,
             LOCALE_PROPERTY,
             SCHEMA_DV_FACTORY_PROPERTY,
     };
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/ValidatedInfo.java	Fri Aug 29 08:14:19 2014 -0700
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/ValidatedInfo.java	Thu Sep 04 14:45:08 2014 -0700
@@ -1,13 +1,10 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
- */
-/*
- * Copyright 2001, 2002,2004 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
  *
  *      http://www.apache.org/licenses/LICENSE-2.0
  *
@@ -21,6 +18,7 @@
 package com.sun.org.apache.xerces.internal.impl.dv;
 
 import com.sun.org.apache.xerces.internal.xs.ShortList;
+import com.sun.org.apache.xerces.internal.xs.XSConstants;
 
 /**
  * Class to get the information back after content is validated. This info
@@ -95,4 +93,60 @@
         else
             return actualValue.toString();
     }
+
+    /**
+     * Returns true if the two ValidatedInfo objects can be compared in the same
+     * value space.
+     */
+    public static boolean isComparable(ValidatedInfo info1, ValidatedInfo info2) {
+        final short primitiveType1 = convertToPrimitiveKind(info1.actualValueType);
+        final short primitiveType2 = convertToPrimitiveKind(info2.actualValueType);
+        if (primitiveType1 != primitiveType2) {
+            return (primitiveType1 == XSConstants.ANYSIMPLETYPE_DT && primitiveType2 == XSConstants.STRING_DT ||
+                    primitiveType1 == XSConstants.STRING_DT && primitiveType2 == XSConstants.ANYSIMPLETYPE_DT);
+        }
+        else if (primitiveType1 == XSConstants.LIST_DT || primitiveType1 == XSConstants.LISTOFUNION_DT) {
+            final ShortList typeList1 = info1.itemValueTypes;
+            final ShortList typeList2 = info2.itemValueTypes;
+            final int typeList1Length = typeList1 != null ? typeList1.getLength() : 0;
+            final int typeList2Length = typeList2 != null ? typeList2.getLength() : 0;
+            if (typeList1Length != typeList2Length) {
+                return false;
+            }
+            for (int i = 0; i < typeList1Length; ++i) {
+                final short primitiveItem1 = convertToPrimitiveKind(typeList1.item(i));
+                final short primitiveItem2 = convertToPrimitiveKind(typeList2.item(i));
+                if (primitiveItem1 != primitiveItem2) {
+                    if (primitiveItem1 == XSConstants.ANYSIMPLETYPE_DT && primitiveItem2 == XSConstants.STRING_DT ||
+                        primitiveItem1 == XSConstants.STRING_DT && primitiveItem2 == XSConstants.ANYSIMPLETYPE_DT) {
+                        continue;
+                    }
+                    return false;
+                }
+            }
+        }
+        return true;
+    }
+
+    /**
+     * Returns the primitive type of the given type.
+     * @param valueType A value type as defined in XSConstants.
+     * @return The primitive type from which valueType was derived.
+     */
+    private static short convertToPrimitiveKind(short valueType) {
+        /** Primitive datatypes. */
+        if (valueType <= XSConstants.NOTATION_DT) {
+            return valueType;
+        }
+        /** Types derived from string. */
+        if (valueType <= XSConstants.ENTITY_DT) {
+            return XSConstants.STRING_DT;
+        }
+        /** Types derived from decimal. */
+        if (valueType <= XSConstants.POSITIVEINTEGER_DT) {
+            return XSConstants.DECIMAL_DT;
+        }
+        /** Other types. */
+        return valueType;
+    }
 }
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages.properties	Fri Aug 29 08:14:19 2014 -0700
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages.properties	Thu Sep 04 14:45:08 2014 -0700
@@ -14,20 +14,18 @@
 
 # Identity constraints
 
-        AbsentKeyValue = Identity Constraint error (cvc-identity-constraint.4.2.1):  element \"{0}\" has a key with no value.
+        AbsentKeyValue = cvc-identity-constraint.4.2.1.a: Element \"{0}\" has no value for the key \"{1}\".
         DuplicateField = Duplicate match in scope for field \"{0}\".
-        DuplicateKey = Duplicate key value [{0}] declared for identity constraint of element \"{1}\".
-        DuplicateUnique = Duplicate unique value [{0}] declared for identity constraint of element \"{1}\".
-        FieldMultipleMatch = Identity constraint error:  field \"{0}\" matches more than one value within the scope of its selector; fields must match unique values.
+        DuplicateKey = cvc-identity-constraint.4.2.2: Duplicate key value [{0}] declared for identity constraint \"{2}\" of element \"{1}\".
+        DuplicateUnique = cvc-identity-constraint.4.1: Duplicate unique value [{0}] declared for identity constraint \"{2}\" of element \"{1}\".
+        FieldMultipleMatch = cvc-identity-constraint.3: Field \"{0}\" of identity constraint \"{1}\" matches more than one value within the scope of its selector; fields must match unique values.
         FixedDiffersFromActual = The content of this element is not equivalent to the value of the \"fixed\" attribute in the element's declaration in the schema.
-        KeyMatchesNillable = Identity Constraint error (cvc-identity-constraint.4.2.3):  element \"{0}\" has a key which matches an element which has nillable set to true.
-        KeyNotEnoughValues = Not enough values specified for <key name=\"{1}\"> identity constraint specified for element \"{0}\".
-        KeyNotFound = Key ''{0}'' with value ''{1}'' not found for identity constraint of element ''{2}''.
-        KeyRefNotEnoughValues = Not enough values specified for <keyref name=\"{1}\"> identity constraint specified for element \"{0}\".
+        KeyMatchesNillable = cvc-identity-constraint.4.2.3: Element \"{0}\" has the key \"{1}\" which matches an element which has nillable set to true.
+        KeyNotEnoughValues = cvc-identity-constraint.4.2.1.b: Not enough values specified for <key name=\"{1}\"> identity constraint specified for element \"{0}\".
+        KeyNotFound = cvc-identity-constraint.4.3: Key ''{0}'' with value ''{1}'' not found for identity constraint of element ''{2}''.
         KeyRefOutOfScope = Identity Constraint error:  identity constraint \"{0}\" has a keyref which refers to a key or unique that is out of scope.
         KeyRefReferNotFound = Key reference declaration \"{0}\" refers to unknown key with name \"{1}\".
-        UniqueNotEnoughValues = Not enough values specified for <unique> identity constraint specified for element \"{0}\".
-        UnknownField = Internal identity constraint error; unknown field \"{0}\".
+        UnknownField = Internal identity constraint error; unknown field \"{0}\" for identity constraint \"{2}\" specified for element \"{1}\".
 
 # Ideally, we should only use the following error keys, not the ones under
 # "Identity constraints". And we should cover all of the following errors.
@@ -79,6 +77,7 @@
         cvc-minLength-valid = cvc-minLength-valid: Value ''{0}'' with length = ''{1}'' is not facet-valid with respect to minLength ''{2}'' for type ''{3}''.
         cvc-pattern-valid = cvc-pattern-valid: Value ''{0}'' is not facet-valid with respect to pattern ''{1}'' for type ''{2}''.
         cvc-totalDigits-valid = cvc-totalDigits-valid: Value ''{0}'' has {1} total digits, but the number of total digits has been limited to {2}.
+        cvc-type.1 = cvc-type.1: The type definition ''{0}'' was not found.
         cvc-type.2 = cvc-type.2: The type definition cannot be abstract for element {0}.
         cvc-type.3.1.1 = cvc-type.3.1.1: Element ''{0}'' is a simple type, so it cannot have attributes, excepting those whose namespace name is identical to ''http://www.w3.org/2001/XMLSchema-instance'' and whose [local name] is one of ''type'', ''nil'', ''schemaLocation'' or ''noNamespaceSchemaLocation''. However, the attribute, ''{1}'' was found.
         cvc-type.3.1.2 = cvc-type.3.1.2: Element ''{0}'' is a simple type, so it must have no element information item [children].
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/validation/ConfigurableValidationState.java	Thu Sep 04 14:45:08 2014 -0700
@@ -0,0 +1,123 @@
+/*
+ * Copyright 2006 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.sun.org.apache.xerces.internal.impl.validation;
+
+/**
+ * <p>An extension of ValidationState which can be configured to turn
+ * off checking for ID/IDREF errors and unparsed entity errors.</p>
+ *
+ * @xerces.internal
+ *
+ * @author Peter McCracken, IBM
+ */
+public final class ConfigurableValidationState extends ValidationState {
+
+    /**
+     * Whether to check for ID/IDREF errors
+     */
+    private boolean fIdIdrefChecking;
+
+    /**
+     * Whether to check for unparsed entity errors
+     */
+    private boolean fUnparsedEntityChecking;
+
+    /**
+     * Creates a new ConfigurableValidationState.
+     * By default, error checking for both ID/IDREFs
+     * and unparsed entities are turned on.
+     */
+    public ConfigurableValidationState() {
+        super();
+        fIdIdrefChecking = true;
+        fUnparsedEntityChecking = true;
+    }
+
+    /**
+     * Turns checking for ID/IDREF errors on and off.
+     * @param setting: true to turn on error checking
+     *                 false to turn off error checking
+     */
+    public void setIdIdrefChecking(boolean setting) {
+        fIdIdrefChecking = setting;
+    }
+
+    /**
+     * Turns checking for unparsed entity errors on and off.
+     * @param setting: true to turn on error checking
+     *                 false to turn off error checking
+     */
+    public void setUnparsedEntityChecking(boolean setting) {
+        fUnparsedEntityChecking = setting;
+    }
+
+    /**
+     * Checks if all IDREFs have a corresponding ID.
+     * @return null, if ID/IDREF checking is turned off
+     *         otherwise, returns the value of the super implementation
+     */
+    public String checkIDRefID() {
+        return (fIdIdrefChecking) ? super.checkIDRefID() : null;
+    }
+
+    /**
+     * Checks if an ID has already been declared.
+     * @return false, if ID/IDREF checking is turned off
+     *         otherwise, returns the value of the super implementation
+     */
+    public boolean isIdDeclared(String name) {
+        return (fIdIdrefChecking) ? super.isIdDeclared(name) : false;
+    }
+
+    /**
+     * Checks if an entity is declared.
+     * @return true, if unparsed entity checking is turned off
+     *         otherwise, returns the value of the super implementation
+     */
+    public boolean isEntityDeclared(String name) {
+        return (fUnparsedEntityChecking) ? super.isEntityDeclared(name) : true;
+    }
+
+    /**
+     * Checks if an entity is unparsed.
+     * @return true, if unparsed entity checking is turned off
+     *         otherwise, returns the value of the super implementation
+     */
+    public boolean isEntityUnparsed(String name) {
+        return (fUnparsedEntityChecking) ? super.isEntityUnparsed(name) : true;
+    }
+
+    /**
+     * Adds the ID, if ID/IDREF checking is enabled.
+     * @param the ID to add
+     */
+    public void addId(String name) {
+        if (fIdIdrefChecking) {
+            super.addId(name);
+        }
+    }
+
+    /**
+     * Adds the IDREF, if ID/IDREF checking is enabled.
+     * @param the IDREF to add
+     */
+    public void addIdRef(String name) {
+        if (fIdIdrefChecking) {
+            super.addIdRef(name);
+        }
+    }
+}
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/XMLSchemaValidator.java	Fri Aug 29 08:14:19 2014 -0700
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/XMLSchemaValidator.java	Thu Sep 04 14:45:08 2014 -0700
@@ -1,13 +1,10 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
- */
-/*
- * Copyright 1999-2005 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
  *
  *      http://www.apache.org/licenses/LICENSE-2.0
  *
@@ -38,6 +35,7 @@
 import com.sun.org.apache.xerces.internal.impl.dv.InvalidDatatypeValueException;
 import com.sun.org.apache.xerces.internal.impl.dv.ValidatedInfo;
 import com.sun.org.apache.xerces.internal.impl.dv.XSSimpleType;
+import com.sun.org.apache.xerces.internal.impl.validation.ConfigurableValidationState;
 import com.sun.org.apache.xerces.internal.impl.validation.ValidationManager;
 import com.sun.org.apache.xerces.internal.impl.validation.ValidationState;
 import com.sun.org.apache.xerces.internal.impl.xs.identity.Field;
@@ -185,6 +183,22 @@
     protected static final String TOLERATE_DUPLICATES =
         Constants.XERCES_FEATURE_PREFIX + Constants.TOLERATE_DUPLICATES_FEATURE;
 
+    /** Feature identifier: whether to ignore xsi:type attributes until a global element declaration is encountered */
+    protected static final String IGNORE_XSI_TYPE =
+        Constants.XERCES_FEATURE_PREFIX + Constants.IGNORE_XSI_TYPE_FEATURE;
+
+    /** Feature identifier: whether to ignore ID/IDREF errors */
+    protected static final String ID_IDREF_CHECKING =
+        Constants.XERCES_FEATURE_PREFIX + Constants.ID_IDREF_CHECKING_FEATURE;
+
+    /** Feature identifier: whether to ignore unparsed entity errors */
+    protected static final String UNPARSED_ENTITY_CHECKING =
+        Constants.XERCES_FEATURE_PREFIX + Constants.UNPARSED_ENTITY_CHECKING_FEATURE;
+
+    /** Feature identifier: whether to ignore identity constraint errors */
+    protected static final String IDENTITY_CONSTRAINT_CHECKING =
+        Constants.XERCES_FEATURE_PREFIX + Constants.IDC_CHECKING_FEATURE;
+
     protected static final String REPORT_WHITESPACE =
             Constants.SUN_SCHEMA_FEATURE_PREFIX + Constants.SUN_REPORT_IGNORED_ELEMENT_CONTENT_WHITESPACE;
 
@@ -228,6 +242,10 @@
     protected static final String JAXP_SCHEMA_LANGUAGE =
         Constants.JAXP_PROPERTY_PREFIX + Constants.SCHEMA_LANGUAGE;
 
+    /** Property identifier: root type definition. */
+    protected static final String ROOT_TYPE_DEF =
+        Constants.XERCES_PROPERTY_PREFIX + Constants.ROOT_TYPE_DEFINITION_PROPERTY;
+
     /** Property identifier: Schema DV Factory */
     protected static final String SCHEMA_DV_FACTORY =
         Constants.XERCES_PROPERTY_PREFIX + Constants.SCHEMA_DV_FACTORY_PROPERTY;
@@ -254,6 +272,10 @@
             VALIDATE_ANNOTATIONS,
             HONOUR_ALL_SCHEMALOCATIONS,
             USE_GRAMMAR_POOL_ONLY,
+            IGNORE_XSI_TYPE,
+            ID_IDREF_CHECKING,
+            IDENTITY_CONSTRAINT_CHECKING,
+            UNPARSED_ENTITY_CHECKING,
             NAMESPACE_GROWTH,
             TOLERATE_DUPLICATES,
             USE_SERVICE_MECHANISM
@@ -267,6 +289,10 @@
         //       those set by the application. This goes against the
         //       whole purpose of XMLComponent#getFeatureDefault but
         //       it can't be helped in this case. -Ac
+        // NOTE: Instead of adding default values here, add them (and
+        //       the corresponding recognized features) to the objects
+        //       that have an XMLSchemaValidator instance as a member,
+        //       such as the parser configurations. -PM
         null, //Boolean.FALSE,
         null, //Boolean.FALSE,
         null, //Boolean.FALSE,
@@ -279,6 +305,10 @@
         null,
         null,
         null,
+        null,
+        null,
+        null,
+        null,
         Boolean.TRUE
     };
 
@@ -293,13 +323,14 @@
             SCHEMA_NONS_LOCATION,
             JAXP_SCHEMA_SOURCE,
             JAXP_SCHEMA_LANGUAGE,
+            ROOT_TYPE_DEF,
             SCHEMA_DV_FACTORY,
             XML_SECURITY_PROPERTY_MANAGER
             };
 
     /** Property defaults. */
     private static final Object[] PROPERTY_DEFAULTS =
-        { null, null, null, null, null, null, null, null, null, null, null, null, null};
+        { null, null, null, null, null, null, null, null, null, null, null};
 
     // this is the number of valuestores of each kind
     // we expect an element to have.  It's almost
@@ -482,7 +513,7 @@
 
     // updated during reset
     protected ValidationManager fValidationManager = null;
-    protected ValidationState fValidationState = new ValidationState();
+    protected ConfigurableValidationState fValidationState = new ConfigurableValidationState();
     protected XMLGrammarPool fGrammarPool;
 
     // schema location property values
@@ -562,6 +593,9 @@
      *                                  this exception.
      */
     public void setProperty(String propertyId, Object value) throws XMLConfigurationException {
+        if (propertyId.equals(ROOT_TYPE_DEF)) {
+            fRootTypeQName = (javax.xml.namespace.QName)value;
+        }
     } // setProperty(String,Object)
 
     /**
@@ -1234,6 +1268,12 @@
     /** temporary qname */
     private final QName fTempQName = new QName();
 
+    private javax.xml.namespace.QName fRootTypeQName = null;
+
+    private int fIgnoreXSITypeDepth;
+
+    private boolean fIDCChecking;
+
     /** temporary validated info */
     private ValidatedInfo fValidatedInfo = new ValidatedInfo();
 
@@ -1384,6 +1424,38 @@
         fValidationManager.addValidationState(fValidationState);
         fValidationState.setSymbolTable(fSymbolTable);
 
+        boolean ignoreXSIType;
+        try {
+            ignoreXSIType = componentManager.getFeature(IGNORE_XSI_TYPE);
+        }
+        catch (XMLConfigurationException e) {
+            ignoreXSIType = false;
+        }
+        // An initial value of -1 means that the root element considers itself
+        // below the depth where xsi:type stopped being ignored (which means that
+        // xsi:type attributes will not be ignored for the entire document)
+        fIgnoreXSITypeDepth = ignoreXSIType ? 0 : -1;
+
+        try {
+            fIDCChecking = componentManager.getFeature(IDENTITY_CONSTRAINT_CHECKING);
+        }
+        catch (XMLConfigurationException e) {
+            fIDCChecking = true;
+        }
+
+        try {
+            fValidationState.setIdIdrefChecking(componentManager.getFeature(ID_IDREF_CHECKING));
+        }
+        catch (XMLConfigurationException e) {
+            fValidationState.setIdIdrefChecking(true);
+        }
+
+        try {
+            fValidationState.setUnparsedEntityChecking(componentManager.getFeature(UNPARSED_ENTITY_CHECKING));
+        }
+        catch (XMLConfigurationException e) {
+            fValidationState.setUnparsedEntityChecking(true);
+        }
 
         // get schema location properties
         try {
@@ -1550,7 +1622,9 @@
 
     // handle start document
     void handleStartDocument(XMLLocator locator, String encoding) {
-        fValueStoreCache.startDocument();
+        if (fIDCChecking) {
+            fValueStoreCache.startDocument();
+        }
         if (fAugPSVI) {
             fCurrentPSVI.fGrammars = null;
             fCurrentPSVI.fSchemaInformation = null;
@@ -1558,7 +1632,9 @@
     } // handleStartDocument(XMLLocator,String)
 
     void handleEndDocument() {
-        fValueStoreCache.endDocument();
+        if (fIDCChecking) {
+            fValueStoreCache.endDocument();
+        }
     } // handleEndDocument()
 
     // handle character contents
@@ -1850,22 +1926,54 @@
             return augs;
         }
 
-        // try again to get the element decl:
-        // case 1: find declaration for root element
-        // case 2: find declaration for element from another namespace
-        if (fCurrentElemDecl == null) {
-            if (sGrammar != null) {
-                fCurrentElemDecl = sGrammar.getGlobalElementDecl(element.localpart);
+        // 1.2.1.1 A type definition was stipulated by the processor
+        if (fElementDepth == 0 && fRootTypeQName != null) {
+            String rootTypeNamespace = fRootTypeQName.getNamespaceURI();
+            if (rootTypeNamespace != null && rootTypeNamespace.equals(XMLConstants.NULL_NS_URI)) {
+                rootTypeNamespace = null;
+            }
+            SchemaGrammar grammarForRootType =
+                findSchemaGrammar(
+                        XSDDescription.CONTEXT_ELEMENT, rootTypeNamespace, null, null, null);
+            if (grammarForRootType != null) {
+                fCurrentType = grammarForRootType.getGlobalTypeDecl(fRootTypeQName.getLocalPart());
+            }
+            if (fCurrentType == null) {
+                String typeName = (fRootTypeQName.getPrefix().equals(XMLConstants.DEFAULT_NS_PREFIX)) ?
+                        fRootTypeQName.getLocalPart() :
+                            fRootTypeQName.getPrefix()+":"+fRootTypeQName.getLocalPart();
+                        reportSchemaError("cvc-type.1", new Object[] {typeName});
             }
         }
 
-        if (fCurrentElemDecl != null) {
-            // then get the type
-            fCurrentType = fCurrentElemDecl.fType;
+        // if there was no processor stipulated type
+        if (fCurrentType == null) {
+            // try again to get the element decl:
+            // case 1: find declaration for root element
+            // case 2: find declaration for element from another namespace
+            if (fCurrentElemDecl == null) {
+                if (sGrammar != null) {
+                    fCurrentElemDecl = sGrammar.getGlobalElementDecl(element.localpart);
+                }
+            }
+
+            if (fCurrentElemDecl != null) {
+                // then get the type
+                fCurrentType = fCurrentElemDecl.fType;
+            }
         }
 
-        // get type from xsi:type
-        String xsiType = attributes.getValue(SchemaSymbols.URI_XSI, SchemaSymbols.XSI_TYPE);
+
+        // check if we should be ignoring xsi:type on this element
+        if (fElementDepth == fIgnoreXSITypeDepth && fCurrentElemDecl == null) {
+            fIgnoreXSITypeDepth++;
+        }
+
+        // process xsi:type attribute information
+        String xsiType = null;
+        if (fElementDepth >= fIgnoreXSITypeDepth) {
+            xsiType = attributes.getValue(SchemaSymbols.URI_XSI, SchemaSymbols.XSI_TYPE);
+        }
 
         // if no decl/type found for the current element
         if (fCurrentType == null && xsiType == null) {
@@ -2044,13 +2152,17 @@
             XSComplexTypeDecl ctype = (XSComplexTypeDecl) fCurrentType;
             attrGrp = ctype.getAttrGrp();
         }
-        // activate identity constraints
-        fValueStoreCache.startElement();
-        fMatcherStack.pushContext();
-        if (fCurrentElemDecl != null && fCurrentElemDecl.fIDCPos > 0) {
-            fIdConstraint = true;
-            // initialize when identity constrains are defined for the elem
-            fValueStoreCache.initValueStoresFor(fCurrentElemDecl, this);
+
+        if (fIDCChecking) {
+            // activate identity constraints
+            fValueStoreCache.startElement();
+            fMatcherStack.pushContext();
+            //if (fCurrentElemDecl != null && fCurrentElemDecl.fIDCPos > 0 && !fIgnoreIDC) {
+            if (fCurrentElemDecl != null && fCurrentElemDecl.fIDCPos > 0) {
+                fIdConstraint = true;
+                // initialize when identity constrains are defined for the elem
+                fValueStoreCache.initValueStoresFor(fCurrentElemDecl, this);
+            }
         }
         processAttributes(element, attributes, attrGrp);
 
@@ -2138,66 +2250,75 @@
         // now validate the content of the element
         processElementContent(element);
 
-        // Element Locally Valid (Element)
-        // 6 The element information item must be valid with respect to each of the {identity-constraint definitions} as per Identity-constraint Satisfied (3.11.4).
-
-        // call matchers and de-activate context
-        int oldCount = fMatcherStack.getMatcherCount();
-        for (int i = oldCount - 1; i >= 0; i--) {
-            XPathMatcher matcher = fMatcherStack.getMatcherAt(i);
-            if (fCurrentElemDecl == null)
-                matcher.endElement(element, null, false, fValidatedInfo.actualValue, fValidatedInfo.actualValueType, fValidatedInfo.itemValueTypes);
-
-            else
-                matcher.endElement(
-                    element,
-                    fCurrentType,
-                    fCurrentElemDecl.getNillable(),
-                    fDefaultValue == null
-                        ? fValidatedInfo.actualValue
-                        : fCurrentElemDecl.fDefault.actualValue,
-                    fDefaultValue == null
-                        ? fValidatedInfo.actualValueType
-                        : fCurrentElemDecl.fDefault.actualValueType,
-                    fDefaultValue == null
-                        ? fValidatedInfo.itemValueTypes
-                        : fCurrentElemDecl.fDefault.itemValueTypes);
-        }
-
-        if (fMatcherStack.size() > 0) {
-            fMatcherStack.popContext();
-        }
-
-        int newCount = fMatcherStack.getMatcherCount();
-        // handle everything *but* keyref's.
-        for (int i = oldCount - 1; i >= newCount; i--) {
-            XPathMatcher matcher = fMatcherStack.getMatcherAt(i);
-            if (matcher instanceof Selector.Matcher) {
-                Selector.Matcher selMatcher = (Selector.Matcher) matcher;
-                IdentityConstraint id;
-                if ((id = selMatcher.getIdentityConstraint()) != null
-                    && id.getCategory() != IdentityConstraint.IC_KEYREF) {
-                    fValueStoreCache.transplant(id, selMatcher.getInitialDepth());
+        if (fIDCChecking) {
+            // Element Locally Valid (Element)
+            // 6 The element information item must be valid with respect to each of the {identity-constraint definitions} as per Identity-constraint Satisfied (3.11.4).
+
+            // call matchers and de-activate context
+            int oldCount = fMatcherStack.getMatcherCount();
+            for (int i = oldCount - 1; i >= 0; i--) {
+                XPathMatcher matcher = fMatcherStack.getMatcherAt(i);
+                if (fCurrentElemDecl == null)
+                    matcher.endElement(element, null, false, fValidatedInfo.actualValue, fValidatedInfo.actualValueType, fValidatedInfo.itemValueTypes);
+
+                else
+                    matcher.endElement(
+                            element,
+                            fCurrentType,
+                            fCurrentElemDecl.getNillable(),
+                            fDefaultValue == null
+                                ? fValidatedInfo.actualValue
+                                : fCurrentElemDecl.fDefault.actualValue,
+                            fDefaultValue == null
+                                ? fValidatedInfo.actualValueType
+                                : fCurrentElemDecl.fDefault.actualValueType,
+                            fDefaultValue == null
+                                ? fValidatedInfo.itemValueTypes
+                                : fCurrentElemDecl.fDefault.itemValueTypes);
+            }
+
+            if (fMatcherStack.size() > 0) {
+                fMatcherStack.popContext();
+            }
+
+            int newCount = fMatcherStack.getMatcherCount();
+            // handle everything *but* keyref's.
+            for (int i = oldCount - 1; i >= newCount; i--) {
+                XPathMatcher matcher = fMatcherStack.getMatcherAt(i);
+                if (matcher instanceof Selector.Matcher) {
+                    Selector.Matcher selMatcher = (Selector.Matcher) matcher;
+                    IdentityConstraint id;
+                    if ((id = selMatcher.getIdentityConstraint()) != null
+                            && id.getCategory() != IdentityConstraint.IC_KEYREF) {
+                        fValueStoreCache.transplant(id, selMatcher.getInitialDepth());
+                    }
                 }
             }
-        }
-
-        // now handle keyref's/...
-        for (int i = oldCount - 1; i >= newCount; i--) {
-            XPathMatcher matcher = fMatcherStack.getMatcherAt(i);
-            if (matcher instanceof Selector.Matcher) {
-                Selector.Matcher selMatcher = (Selector.Matcher) matcher;
-                IdentityConstraint id;
-                if ((id = selMatcher.getIdentityConstraint()) != null
-                    && id.getCategory() == IdentityConstraint.IC_KEYREF) {
-                    ValueStoreBase values =
-                        fValueStoreCache.getValueStoreFor(id, selMatcher.getInitialDepth());
-                    if (values != null) // nothing to do if nothing matched!
-                        values.endDocumentFragment();
+
+            // now handle keyref's/...
+            for (int i = oldCount - 1; i >= newCount; i--) {
+                XPathMatcher matcher = fMatcherStack.getMatcherAt(i);
+                if (matcher instanceof Selector.Matcher) {
+                    Selector.Matcher selMatcher = (Selector.Matcher) matcher;
+                    IdentityConstraint id;
+                    if ((id = selMatcher.getIdentityConstraint()) != null
+                            && id.getCategory() == IdentityConstraint.IC_KEYREF) {
+                        ValueStoreBase values =
+                            fValueStoreCache.getValueStoreFor(id, selMatcher.getInitialDepth());
+                        if (values != null) // nothing to do if nothing matched!
+                            values.endDocumentFragment();
+                    }
                 }
             }
+            fValueStoreCache.endElement();
         }
-        fValueStoreCache.endElement();
+
+        // Check if we should modify the xsi:type ignore depth
+        // This check is independent of whether this is the validation root,
+        // and should be done before the element depth is decremented.
+        if (fElementDepth < fIgnoreXSITypeDepth) {
+            fIgnoreXSITypeDepth--;
+        }
 
         SchemaGrammar[] grammars = null;
         // have we reached the end tag of the validation root?
@@ -2290,7 +2411,14 @@
             // otherwise partial, and anything above this level will be partial
             else {
                 fCurrentPSVI.fValidationAttempted = ElementPSVI.VALIDATION_PARTIAL;
-                fNFullValidationDepth = fNNoneValidationDepth = fElementDepth - 1;
+            }
+
+            // this guarantees that depth settings do not cross-over between sibling nodes
+            if (fNFullValidationDepth == fElementDepth) {
+                fNFullValidationDepth = fElementDepth - 1;
+            }
+            if (fNNoneValidationDepth == fElementDepth) {
+                fNNoneValidationDepth = fElementDepth - 1;
             }
 
             if (fDefaultValue != null)
@@ -2554,14 +2682,22 @@
         // if there is no current type, set this one as current.
         // and we don't need to do extra checking
         if (fCurrentType != null) {
+            short block = XSConstants.DERIVATION_NONE;
             // 4.3 The local type definition must be validly derived from the {type definition} given the union of the {disallowed substitutions} and the {type definition}'s {prohibited substitutions}, as defined in Type Derivation OK (Complex) (3.4.6) (if it is a complex type definition), or given {disallowed substitutions} as defined in Type Derivation OK (Simple) (3.14.6) (if it is a simple type definition).
-            short block = fCurrentElemDecl.fBlock;
-            if (fCurrentType.getTypeCategory() == XSTypeDefinition.COMPLEX_TYPE)
+            // Note: It's possible to have fCurrentType be non-null and fCurrentElemDecl
+            // be null, if the current type is set using the property "root-type-definition".
+            // In that case, we don't disallow any substitutions. -PM
+            if (fCurrentElemDecl != null) {
+                block = fCurrentElemDecl.fBlock;
+            }
+            if (fCurrentType.getTypeCategory() == XSTypeDefinition.COMPLEX_TYPE) {
                 block |= ((XSComplexTypeDecl) fCurrentType).fBlock;
-            if (!XSConstraints.checkTypeDerivationOk(type, fCurrentType, block))
+            }
+            if (!XSConstraints.checkTypeDerivationOk(type, fCurrentType, block)) {
                 reportSchemaError(
-                    "cvc-elt.4.3",
-                    new Object[] { element.rawname, xsiType, fCurrentType.getName()});
+                        "cvc-elt.4.3",
+                        new Object[] { element.rawname, xsiType, fCurrentType.getName()});
+            }
         }
 
         return type;
@@ -2835,9 +2971,10 @@
         }
 
         // get the value constraint from use or decl
-        // 4 The item's actual value must match the value of the {value constraint}, if it is present and fixed.                 // now check the value against the simpleType
+        // 4 The item's actual value must match the value of the {value constraint}, if it is present and fixed.
+        // now check the value against the simpleType
         if (actualValue != null && currDecl.getConstraintType() == XSConstants.VC_FIXED) {
-            if (!isComparable(fValidatedInfo, currDecl.fDefault) || !actualValue.equals(currDecl.fDefault.actualValue)) {
+            if (!ValidatedInfo.isComparable(fValidatedInfo, currDecl.fDefault) || !actualValue.equals(currDecl.fDefault.actualValue)) {
                 reportSchemaError(
                     "cvc-attribute.4",
                     new Object[] {
@@ -2852,7 +2989,7 @@
         if (actualValue != null
             && currUse != null
             && currUse.fConstraintType == XSConstants.VC_FIXED) {
-            if (!isComparable(fValidatedInfo, currUse.fDefault) || !actualValue.equals(currUse.fDefault.actualValue)) {
+            if (!ValidatedInfo.isComparable(fValidatedInfo, currUse.fDefault) || !actualValue.equals(currUse.fDefault.actualValue)) {
                 reportSchemaError(
                     "cvc-complex-type.3.1",
                     new Object[] {
@@ -3083,7 +3220,7 @@
                     }
                     // 5.2.2.2.2 If the {content type} of the actual type definition is a simple type definition, then the actual value of the item must match the canonical lexical representation of the {value constraint} value.
                     else if (ctype.fContentType == XSComplexTypeDecl.CONTENTTYPE_SIMPLE) {
-                        if (actualValue != null && (!isComparable(fValidatedInfo, fCurrentElemDecl.fDefault)
+                        if (actualValue != null && (!ValidatedInfo.isComparable(fValidatedInfo, fCurrentElemDecl.fDefault)
                                 || !actualValue.equals(fCurrentElemDecl.fDefault.actualValue))) {
                             reportSchemaError(
                                 "cvc-elt.5.2.2.2.2",
@@ -3094,7 +3231,7 @@
                         }
                     }
                 } else if (fCurrentType.getTypeCategory() == XSTypeDefinition.SIMPLE_TYPE) {
-                    if (actualValue != null && (!isComparable(fValidatedInfo, fCurrentElemDecl.fDefault)
+                    if (actualValue != null && (!ValidatedInfo.isComparable(fValidatedInfo, fCurrentElemDecl.fDefault)
                             || !actualValue.equals(fCurrentElemDecl.fDefault.actualValue))) {
                         // REVISIT: the spec didn't mention this case: fixed
                         //          value with simple type
@@ -3240,53 +3377,6 @@
                 XMLErrorReporter.SEVERITY_ERROR);
     }
 
-    /** Returns true if the two ValidatedInfo objects can be compared in the same value space. **/
-    private boolean isComparable(ValidatedInfo info1, ValidatedInfo info2) {
-        final short primitiveType1 = convertToPrimitiveKind(info1.actualValueType);
-        final short primitiveType2 = convertToPrimitiveKind(info2.actualValueType);
-        if (primitiveType1 != primitiveType2) {
-            return (primitiveType1 == XSConstants.ANYSIMPLETYPE_DT && primitiveType2 == XSConstants.STRING_DT ||
-                    primitiveType1 == XSConstants.STRING_DT && primitiveType2 == XSConstants.ANYSIMPLETYPE_DT);
-        }
-        else if (primitiveType1 == XSConstants.LIST_DT || primitiveType1 == XSConstants.LISTOFUNION_DT) {
-            final ShortList typeList1 = info1.itemValueTypes;
-            final ShortList typeList2 = info2.itemValueTypes;
-            final int typeList1Length = typeList1 != null ? typeList1.getLength() : 0;
-            final int typeList2Length = typeList2 != null ? typeList2.getLength() : 0;
-            if (typeList1Length != typeList2Length) {
-                return false;
-            }
-            for (int i = 0; i < typeList1Length; ++i) {
-                final short primitiveItem1 = convertToPrimitiveKind(typeList1.item(i));
-                final short primitiveItem2 = convertToPrimitiveKind(typeList2.item(i));
-                if (primitiveItem1 != primitiveItem2) {
-                    if (primitiveItem1 == XSConstants.ANYSIMPLETYPE_DT && primitiveItem2 == XSConstants.STRING_DT ||
-                        primitiveItem1 == XSConstants.STRING_DT && primitiveItem2 == XSConstants.ANYSIMPLETYPE_DT) {
-                        continue;
-                    }
-                    return false;
-                }
-            }
-        }
-        return true;
-    }
-
-    private short convertToPrimitiveKind(short valueType) {
-        /** Primitive datatypes. */
-        if (valueType <= XSConstants.NOTATION_DT) {
-            return valueType;
-        }
-        /** Types derived from string. */
-        if (valueType <= XSConstants.ENTITY_DT) {
-            return XSConstants.STRING_DT;
-        }
-        /** Types derived from decimal. */
-        if (valueType <= XSConstants.POSITIVEINTEGER_DT) {
-            return XSConstants.DECIMAL_DT;
-        }
-        /** Other types. */
-        return valueType;
-    }
 
     private String expectedStr(Vector expected) {
         StringBuffer ret = new StringBuffer("{");
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/validation/XMLSchema.java	Fri Aug 29 08:14:19 2014 -0700
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/validation/XMLSchema.java	Thu Sep 04 14:45:08 2014 -0700
@@ -1,13 +1,10 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
- */
-/*
- * Copyright 2005 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
  *
  *      http://www.apache.org/licenses/LICENSE-2.0
  *
@@ -32,11 +29,19 @@
     /** The grammar pool is immutable */
     private final XMLGrammarPool fGrammarPool;
 
+    /** Whether to consider this schema to be fully composed */
+    private final boolean fFullyComposed;
+
     /** Constructor */
     public XMLSchema(XMLGrammarPool grammarPool) {
-        fGrammarPool = grammarPool;
+        this(grammarPool, true);
     }
 
+    public XMLSchema(XMLGrammarPool grammarPool, boolean fullyComposed) {
+         fGrammarPool = grammarPool;
+        fFullyComposed = fullyComposed;
+     }
+
     /*
      * XSGrammarPoolContainer methods
      */
@@ -60,7 +65,7 @@
      * can be considered to be a fully composed schema
      */
     public boolean isFullyComposed() {
-        return true;
+        return fFullyComposed;
     }
 
 } // XMLSchema
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/validation/XMLSchemaFactory.java	Fri Aug 29 08:14:19 2014 -0700
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/validation/XMLSchemaFactory.java	Thu Sep 04 14:45:08 2014 -0700
@@ -1,13 +1,10 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
- */
-/*
- * Copyright 2005 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
  *
  *      http://www.apache.org/licenses/LICENSE-2.0
  *
@@ -68,12 +65,21 @@
  */
 public final class XMLSchemaFactory extends SchemaFactory {
 
-    // property identifiers
+    // feature identifiers
+
+    /** JAXP Source feature prefix. */
+    private static final String JAXP_SOURCE_FEATURE_PREFIX = "http://javax.xml.transform";
 
     /** Feature identifier: schema full checking. */
     private static final String SCHEMA_FULL_CHECKING =
         Constants.XERCES_FEATURE_PREFIX + Constants.SCHEMA_FULL_CHECKING;
 
+    /** Feature identifier: use grammar pool only. */
+    private static final String USE_GRAMMAR_POOL_ONLY =
+        Constants.XERCES_FEATURE_PREFIX + Constants.USE_GRAMMAR_POOL_ONLY_FEATURE;
+
+    // property identifiers
+
     /** Property identifier: grammar pool. */
     private static final String XMLGRAMMAR_POOL =
         Constants.XERCES_PROPERTY_PREFIX + Constants.XMLGRAMMAR_POOL_PROPERTY;
@@ -104,7 +110,7 @@
     private final DOMEntityResolverWrapper fDOMEntityResolverWrapper;
 
     /** The ErrorHandlerWrapper */
-    private ErrorHandlerWrapper fErrorHandlerWrapper;
+    private final ErrorHandlerWrapper fErrorHandlerWrapper;
 
     /** The SecurityManager. */
     private XMLSecurityManager fSecurityManager;
@@ -113,7 +119,10 @@
     private XMLSecurityPropertyManager fSecurityPropertyMgr;
 
     /** The container for the real grammar pool. */
-    private XMLGrammarPoolWrapper fXMLGrammarPoolWrapper;
+    private final XMLGrammarPoolWrapper fXMLGrammarPoolWrapper;
+
+    /** Whether or not to allow new schemas to be added to the grammar pool */
+    private boolean fUseGrammarPoolOnly;
 
     /**
      * Indicates whether implementation parts should use
@@ -138,6 +147,7 @@
         fXMLSchemaLoader.setProperty(XMLGRAMMAR_POOL, fXMLGrammarPoolWrapper);
         fXMLSchemaLoader.setEntityResolver(fDOMEntityResolverWrapper);
         fXMLSchemaLoader.setErrorHandler(fErrorHandlerWrapper);
+        fUseGrammarPoolOnly = true;
 
         // Enable secure processing feature by default
         fSecurityManager = new XMLSecurityManager(true);
@@ -170,7 +180,8 @@
                     "SchemaLanguageLengthZero", null));
         }
         // only W3C XML Schema 1.0 is supported
-        return schemaLanguage.equals(XMLConstants.W3C_XML_SCHEMA_NS_URI);
+        return schemaLanguage.equals(XMLConstants.W3C_XML_SCHEMA_NS_URI) ||
+                schemaLanguage.equals(Constants.W3C_XML_SCHEMA10_NS_URI);
     }
 
     public LSResourceResolver getResourceResolver() {
@@ -202,7 +213,7 @@
         XMLInputSource[] xmlInputSources = new XMLInputSource[schemas.length];
         InputStream inputStream;
         Reader reader;
-        for( int i=0; i<schemas.length; i++ ) {
+        for (int i = 0; i < schemas.length; ++i) {
             Source source = schemas[i];
             if (source instanceof StreamSource) {
                 StreamSource streamSource = (StreamSource) source;
@@ -210,9 +221,10 @@
                 String systemId = streamSource.getSystemId();
                 inputStream = streamSource.getInputStream();
                 reader = streamSource.getReader();
-                xmlInputSources[i] = new XMLInputSource(publicId, systemId, null);
-                xmlInputSources[i].setByteStream(inputStream);
-                xmlInputSources[i].setCharacterStream(reader);
+                XMLInputSource xmlInputSource = new XMLInputSource(publicId, systemId, null);
+                xmlInputSource.setByteStream(inputStream);
+                xmlInputSource.setCharacterStream(reader);
+                xmlInputSources[i] = xmlInputSource;
             }
             else if (source instanceof SAXSource) {
                 SAXSource saxSource = (SAXSource) source;
@@ -260,7 +272,9 @@
         catch (IOException e) {
             // this hasn't been reported, so do so now.
             SAXParseException se = new SAXParseException(e.getMessage(),null,e);
-            fErrorHandler.error(se);
+            if (fErrorHandler != null) {
+                fErrorHandler.error(se);
+            }
             throw se; // and we must throw it.
         }
 
@@ -270,15 +284,20 @@
         // Select Schema implementation based on grammar count.
         final int grammarCount = pool.getGrammarCount();
         AbstractXMLSchema schema = null;
-        if (grammarCount > 1) {
-            schema = new XMLSchema(new ReadOnlyGrammarPool(pool));
-        }
-        else if (grammarCount == 1) {
-            Grammar[] grammars = pool.retrieveInitialGrammarSet(XMLGrammarDescription.XML_SCHEMA);
-            schema = new SimpleXMLSchema(grammars[0]);
+        if (fUseGrammarPoolOnly) {
+            if (grammarCount > 1) {
+                schema = new XMLSchema(new ReadOnlyGrammarPool(pool));
+            }
+            else if (grammarCount == 1) {
+                Grammar[] grammars = pool.retrieveInitialGrammarSet(XMLGrammarDescription.XML_SCHEMA);
+                schema = new SimpleXMLSchema(grammars[0]);
+            }
+            else {
+                schema = new EmptyXMLSchema();
+            }
         }
         else {
-            schema = new EmptyXMLSchema();
+            schema = new XMLSchema(new ReadOnlyGrammarPool(pool), false);
         }
         propagateFeatures(schema);
         propagateProperties(schema);
@@ -286,6 +305,14 @@
     }
 
     public Schema newSchema() throws SAXException {
+        /*
+         * It would make sense to return an EmptyXMLSchema object here, if
+         * fUseGrammarPoolOnly is set to true. However, because the default
+         * value of this feature is true, doing so would change the default
+         * behaviour of this method. Thus, we return a WeakReferenceXMLSchema
+         * regardless of the value of fUseGrammarPoolOnly. -PM
+         */
+
         // Use a Schema that uses the system id as the equality source.
         AbstractXMLSchema schema = new WeakReferenceXMLSchema();
         propagateFeatures(schema);
@@ -293,15 +320,38 @@
         return schema;
     }
 
+    public Schema newSchema(XMLGrammarPool pool) throws SAXException {
+        // If the "use-grammar-pool-only" feature is set to true
+        // prevent the application's grammar pool from being mutated
+        // by wrapping it in a ReadOnlyGrammarPool.
+        final AbstractXMLSchema schema = (fUseGrammarPoolOnly) ?
+            new XMLSchema(new ReadOnlyGrammarPool(pool)) :
+            new XMLSchema(pool, false);
+        propagateFeatures(schema);
+        return schema;
+    }
+
     public boolean getFeature(String name)
         throws SAXNotRecognizedException, SAXNotSupportedException {
         if (name == null) {
             throw new NullPointerException(JAXPValidationMessageFormatter.formatMessage(fXMLSchemaLoader.getLocale(),
                     "FeatureNameNull", null));
         }
+        if (name.startsWith(JAXP_SOURCE_FEATURE_PREFIX)) {
+            // Indicates to the caller that this SchemaFactory supports a specific JAXP Source.
+            if (name.equals(StreamSource.FEATURE) ||
+                name.equals(SAXSource.FEATURE) ||
+                name.equals(DOMSource.FEATURE) ||
+                name.equals(StAXSource.FEATURE)) {
+                return true;
+            }
+        }
         if (name.equals(XMLConstants.FEATURE_SECURE_PROCESSING)) {
             return (fSecurityManager != null && fSecurityManager.isSecureProcessing());
         }
+        else if (name.equals(USE_GRAMMAR_POOL_ONLY)) {
+            return fUseGrammarPoolOnly;
+        }
         try {
             return fXMLSchemaLoader.getFeature(name);
         }
@@ -358,6 +408,16 @@
             throw new NullPointerException(JAXPValidationMessageFormatter.formatMessage(fXMLSchemaLoader.getLocale(),
                     "FeatureNameNull", null));
         }
+        if (name.startsWith(JAXP_SOURCE_FEATURE_PREFIX)) {
+            if (name.equals(StreamSource.FEATURE) ||
+                name.equals(SAXSource.FEATURE) ||
+                name.equals(DOMSource.FEATURE) ||
+                name.equals(StAXSource.FEATURE)) {
+                throw new SAXNotSupportedException(
+                        SAXMessageFormatter.formatMessage(fXMLSchemaLoader.getLocale(),
+                        "feature-read-only", new Object [] {name}));
+            }
+        }
         if (name.equals(XMLConstants.FEATURE_SECURE_PROCESSING)) {
             if (System.getSecurityManager() != null && (!value)) {
                 throw new SAXNotSupportedException(
@@ -377,7 +437,12 @@
 
             fXMLSchemaLoader.setProperty(SECURITY_MANAGER, fSecurityManager);
             return;
-        } else if (name.equals(Constants.ORACLE_FEATURE_SERVICE_MECHANISM)) {
+        }
+        else if (name.equals(USE_GRAMMAR_POOL_ONLY)) {
+            fUseGrammarPoolOnly = value;
+            return;
+        }
+        else if (name.equals(Constants.ORACLE_FEATURE_SERVICE_MECHANISM)) {
             //in secure mode, let _useServicesMechanism be determined by the constructor
             if (System.getSecurityManager() != null)
                 return;
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/validation/XMLSchemaValidatorComponentManager.java	Fri Aug 29 08:14:19 2014 -0700
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/validation/XMLSchemaValidatorComponentManager.java	Thu Sep 04 14:45:08 2014 -0700
@@ -1,13 +1,10 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
- */
-/*
- * Copyright 2005 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
  *
  *      http://www.apache.org/licenses/LICENSE-2.0
  *
@@ -69,13 +66,41 @@
     private static final String VALIDATION =
         Constants.SAX_FEATURE_PREFIX + Constants.VALIDATION_FEATURE;
 
+    /** Feature identifier: use grammar pool only. */
+    private static final String USE_GRAMMAR_POOL_ONLY =
+        Constants.XERCES_FEATURE_PREFIX + Constants.USE_GRAMMAR_POOL_ONLY_FEATURE;
+
+    /** Feature identifier: whether to ignore xsi:type attributes until a global element declaration is encountered */
+    protected static final String IGNORE_XSI_TYPE =
+        Constants.XERCES_FEATURE_PREFIX + Constants.IGNORE_XSI_TYPE_FEATURE;
+
+    /** Feature identifier: whether to ignore ID/IDREF errors */
+    protected static final String ID_IDREF_CHECKING =
+        Constants.XERCES_FEATURE_PREFIX + Constants.ID_IDREF_CHECKING_FEATURE;
+
+    /** Feature identifier: whether to ignore unparsed entity errors */
+    protected static final String UNPARSED_ENTITY_CHECKING =
+        Constants.XERCES_FEATURE_PREFIX + Constants.UNPARSED_ENTITY_CHECKING_FEATURE;
+
+    /** Feature identifier: whether to ignore identity constraint errors */
+    protected static final String IDENTITY_CONSTRAINT_CHECKING =
+        Constants.XERCES_FEATURE_PREFIX + Constants.IDC_CHECKING_FEATURE;
+
+    /** Feature identifier: disallow DOCTYPE declaration */
+    private static final String DISALLOW_DOCTYPE_DECL_FEATURE =
+        Constants.XERCES_FEATURE_PREFIX + Constants.DISALLOW_DOCTYPE_DECL_FEATURE;
+
+    /** Feature identifier: expose schema normalized value */
+    private static final String NORMALIZE_DATA =
+        Constants.XERCES_FEATURE_PREFIX + Constants.SCHEMA_NORMALIZED_VALUE;
+
     /** Feature identifier: send element default value via characters() */
     private static final String SCHEMA_ELEMENT_DEFAULT =
         Constants.XERCES_FEATURE_PREFIX + Constants.SCHEMA_ELEMENT_DEFAULT;
 
-    /** Feature identifier: use grammar pool only. */
-    private static final String USE_GRAMMAR_POOL_ONLY =
-        Constants.XERCES_FEATURE_PREFIX + Constants.USE_GRAMMAR_POOL_ONLY_FEATURE;
+    /** Feature identifier: augment PSVI */
+    private static final String SCHEMA_AUGMENT_PSVI =
+        Constants.XERCES_FEATURE_PREFIX + Constants.SCHEMA_AUGMENT_PSVI;
 
     // property identifiers
 
@@ -230,10 +255,32 @@
         fErrorReporter.putMessageFormatter(XSMessageFormatter.SCHEMA_DOMAIN, new XSMessageFormatter());
 
         // add all recognized features and properties and apply their defaults
+        final String [] recognizedFeatures = {
+                DISALLOW_DOCTYPE_DECL_FEATURE,
+                NORMALIZE_DATA,
+                SCHEMA_ELEMENT_DEFAULT,
+                SCHEMA_AUGMENT_PSVI
+        };
+        addRecognizedFeatures(recognizedFeatures);
+        fFeatures.put(DISALLOW_DOCTYPE_DECL_FEATURE, Boolean.FALSE);
+        fFeatures.put(NORMALIZE_DATA, Boolean.FALSE);
+        fFeatures.put(SCHEMA_ELEMENT_DEFAULT, Boolean.FALSE);
+        fFeatures.put(SCHEMA_AUGMENT_PSVI, Boolean.TRUE);
+
         addRecognizedParamsAndSetDefaults(fEntityManager, grammarContainer);
         addRecognizedParamsAndSetDefaults(fErrorReporter, grammarContainer);
         addRecognizedParamsAndSetDefaults(fSchemaValidator, grammarContainer);
 
+        /* TODO: are other XMLSchemaValidator default values never set?
+         * Initial investigation indicates that they aren't set, but
+         * that they all have default values of false, so it works out
+         * anyway -PM
+         */
+        fFeatures.put(IGNORE_XSI_TYPE, Boolean.FALSE);
+        fFeatures.put(ID_IDREF_CHECKING, Boolean.TRUE);
+        fFeatures.put(IDENTITY_CONSTRAINT_CHECKING, Boolean.TRUE);
+        fFeatures.put(UNPARSED_ENTITY_CHECKING, Boolean.TRUE);
+
         boolean secureProcessing = grammarContainer.getFeature(XMLConstants.FEATURE_SECURE_PROCESSING);
         if (System.getSecurityManager() != null) {
             _isSecureMode = true;
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/parsers/StandardParserConfiguration.java	Fri Aug 29 08:14:19 2014 -0700
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/parsers/StandardParserConfiguration.java	Thu Sep 04 14:45:08 2014 -0700
@@ -1,13 +1,10 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
- */
-/*
- * Copyright 2001-2004 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
  *
  *      http://www.apache.org/licenses/LICENSE-2.0
  *
@@ -109,6 +106,22 @@
     protected static final String HONOUR_ALL_SCHEMALOCATIONS =
         Constants.XERCES_FEATURE_PREFIX + Constants.HONOUR_ALL_SCHEMALOCATIONS_FEATURE;
 
+    /** Feature identifier: whether to ignore xsi:type attributes until a global element declaration is encountered */
+    protected static final String IGNORE_XSI_TYPE =
+        Constants.XERCES_FEATURE_PREFIX + Constants.IGNORE_XSI_TYPE_FEATURE;
+
+    /** Feature identifier: whether to ignore ID/IDREF errors */
+    protected static final String ID_IDREF_CHECKING =
+        Constants.XERCES_FEATURE_PREFIX + Constants.ID_IDREF_CHECKING_FEATURE;
+
+    /** Feature identifier: whether to ignore unparsed entity errors */
+    protected static final String UNPARSED_ENTITY_CHECKING =
+        Constants.XERCES_FEATURE_PREFIX + Constants.UNPARSED_ENTITY_CHECKING_FEATURE;
+
+    /** Feature identifier: whether to ignore identity constraint errors */
+    protected static final String IDENTITY_CONSTRAINT_CHECKING =
+        Constants.XERCES_FEATURE_PREFIX + Constants.IDC_CHECKING_FEATURE;
+
     /** Feature identifier: namespace growth */
     protected static final String NAMESPACE_GROWTH =
         Constants.XERCES_FEATURE_PREFIX + Constants.NAMESPACE_GROWTH_FEATURE;
@@ -135,6 +148,10 @@
     protected static final String SCHEMA_DV_FACTORY =
         Constants.XERCES_PROPERTY_PREFIX + Constants.SCHEMA_DV_FACTORY_PROPERTY;
 
+    /** Property identifier: root type definition. */
+    protected static final String ROOT_TYPE_DEF =
+        Constants.XERCES_PROPERTY_PREFIX + Constants.ROOT_TYPE_DEFINITION_PROPERTY;
+
     //
     // Data
     //
@@ -211,6 +228,10 @@
             //       not-recognized exception to be thrown. -Ac
             XMLSCHEMA_VALIDATION,
             XMLSCHEMA_FULL_CHECKING,
+            IGNORE_XSI_TYPE,
+            ID_IDREF_CHECKING,
+            IDENTITY_CONSTRAINT_CHECKING,
+            UNPARSED_ENTITY_CHECKING,
         };
         addRecognizedFeatures(recognizedFeatures);
 
@@ -221,6 +242,10 @@
         setFeature(GENERATE_SYNTHETIC_ANNOTATIONS, false);
         setFeature(VALIDATE_ANNOTATIONS, false);
         setFeature(HONOUR_ALL_SCHEMALOCATIONS, false);
+        setFeature(IGNORE_XSI_TYPE, false);
+        setFeature(ID_IDREF_CHECKING, true);
+        setFeature(IDENTITY_CONSTRAINT_CHECKING, true);
+        setFeature(UNPARSED_ENTITY_CHECKING, true);
         setFeature(NAMESPACE_GROWTH, false);
         setFeature(TOLERATE_DUPLICATES, false);
 
@@ -233,11 +258,11 @@
             //       not-recognized exception to be thrown. -Ac
             SCHEMA_LOCATION,
             SCHEMA_NONS_LOCATION,
+            ROOT_TYPE_DEF,
             SCHEMA_DV_FACTORY,
-            };
+        };
 
-                        addRecognizedProperties(recognizedProperties);
-
+        addRecognizedProperties(recognizedProperties);
     } // <init>(SymbolTable,XMLGrammarPool)
 
     //
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/parsers/XML11Configuration.java	Fri Aug 29 08:14:19 2014 -0700
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/parsers/XML11Configuration.java	Thu Sep 04 14:45:08 2014 -0700
@@ -1,13 +1,10 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
- */
-/*
- * Copyright 2001-2005 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
  *
  *      http://www.apache.org/licenses/LICENSE-2.0
  *
@@ -184,7 +181,21 @@
         protected static final String EXTERNAL_PARAMETER_ENTITIES =
                 Constants.SAX_FEATURE_PREFIX + Constants.EXTERNAL_PARAMETER_ENTITIES_FEATURE;
 
+        /** Feature identifier: whether to ignore xsi:type attributes until a global element declaration is encountered */
+        protected static final String IGNORE_XSI_TYPE =
+            Constants.XERCES_FEATURE_PREFIX + Constants.IGNORE_XSI_TYPE_FEATURE;
 
+        /** Feature identifier: whether to ignore ID/IDREF errors */
+        protected static final String ID_IDREF_CHECKING =
+            Constants.XERCES_FEATURE_PREFIX + Constants.ID_IDREF_CHECKING_FEATURE;
+
+        /** Feature identifier: whether to ignore unparsed entity errors */
+        protected static final String UNPARSED_ENTITY_CHECKING =
+            Constants.XERCES_FEATURE_PREFIX + Constants.UNPARSED_ENTITY_CHECKING_FEATURE;
+
+        /** Feature identifier: whether to ignore identity constraint errors */
+        protected static final String IDENTITY_CONSTRAINT_CHECKING =
+            Constants.XERCES_FEATURE_PREFIX + Constants.IDC_CHECKING_FEATURE;
 
     // property identifiers
 
@@ -267,6 +278,10 @@
     protected static final String JAXP_SCHEMA_SOURCE =
         Constants.JAXP_PROPERTY_PREFIX + Constants.SCHEMA_SOURCE;
 
+    /** Property identifier: root type definition. */
+    protected static final String ROOT_TYPE_DEF =
+        Constants.XERCES_PROPERTY_PREFIX + Constants.ROOT_TYPE_DEFINITION_PROPERTY;
+
     /** Property identifier: locale. */
     protected static final String LOCALE =
         Constants.XERCES_PROPERTY_PREFIX + Constants.LOCALE_PROPERTY;
@@ -467,25 +482,27 @@
 
         // add default recognized features
         final String[] recognizedFeatures =
-            {
-                CONTINUE_AFTER_FATAL_ERROR, LOAD_EXTERNAL_DTD, // from XMLDTDScannerImpl
-                VALIDATION,
-                NAMESPACES,
-                NORMALIZE_DATA, SCHEMA_ELEMENT_DEFAULT, SCHEMA_AUGMENT_PSVI,
-                GENERATE_SYNTHETIC_ANNOTATIONS, VALIDATE_ANNOTATIONS,
-                HONOUR_ALL_SCHEMALOCATIONS, NAMESPACE_GROWTH,
-                TOLERATE_DUPLICATES,
-                USE_GRAMMAR_POOL_ONLY,
-                // NOTE: These shouldn't really be here but since the XML Schema
-                //       validator is constructed dynamically, its recognized
-                //       features might not have been set and it would cause a
-                //       not-recognized exception to be thrown. -Ac
-                XMLSCHEMA_VALIDATION, XMLSCHEMA_FULL_CHECKING,
-                EXTERNAL_GENERAL_ENTITIES,
-                EXTERNAL_PARAMETER_ENTITIES,
-                PARSER_SETTINGS,
-                XMLConstants.FEATURE_SECURE_PROCESSING
-                        };
+        {
+            CONTINUE_AFTER_FATAL_ERROR, LOAD_EXTERNAL_DTD, // from XMLDTDScannerImpl
+            VALIDATION,
+            NAMESPACES,
+            NORMALIZE_DATA, SCHEMA_ELEMENT_DEFAULT, SCHEMA_AUGMENT_PSVI,
+            GENERATE_SYNTHETIC_ANNOTATIONS, VALIDATE_ANNOTATIONS,
+            HONOUR_ALL_SCHEMALOCATIONS, IGNORE_XSI_TYPE,
+            ID_IDREF_CHECKING, IDENTITY_CONSTRAINT_CHECKING,
+            UNPARSED_ENTITY_CHECKING,
+            NAMESPACE_GROWTH, TOLERATE_DUPLICATES,
+            USE_GRAMMAR_POOL_ONLY,
+            // NOTE: These shouldn't really be here but since the XML Schema
+            //       validator is constructed dynamically, its recognized
+            //       features might not have been set and it would cause a
+            //       not-recognized exception to be thrown. -Ac
+            XMLSCHEMA_VALIDATION, XMLSCHEMA_FULL_CHECKING,
+            EXTERNAL_GENERAL_ENTITIES,
+            EXTERNAL_PARAMETER_ENTITIES,
+            PARSER_SETTINGS,
+            XMLConstants.FEATURE_SECURE_PROCESSING
+        };
         addRecognizedFeatures(recognizedFeatures);
         // set state for default features
         fFeatures.put(VALIDATION, Boolean.FALSE);
@@ -500,6 +517,10 @@
         fFeatures.put(GENERATE_SYNTHETIC_ANNOTATIONS, Boolean.FALSE);
         fFeatures.put(VALIDATE_ANNOTATIONS, Boolean.FALSE);
         fFeatures.put(HONOUR_ALL_SCHEMALOCATIONS, Boolean.FALSE);
+        fFeatures.put(IGNORE_XSI_TYPE, Boolean.FALSE);
+        fFeatures.put(ID_IDREF_CHECKING, Boolean.TRUE);
+        fFeatures.put(IDENTITY_CONSTRAINT_CHECKING, Boolean.TRUE);
+        fFeatures.put(UNPARSED_ENTITY_CHECKING, Boolean.TRUE);
         fFeatures.put(NAMESPACE_GROWTH, Boolean.FALSE);
         fFeatures.put(TOLERATE_DUPLICATES, Boolean.FALSE);
         fFeatures.put(USE_GRAMMAR_POOL_ONLY, Boolean.FALSE);
@@ -508,41 +529,42 @@
 
         // add default recognized properties
         final String[] recognizedProperties =
-            {
-                                SYMBOL_TABLE,
-                                ERROR_HANDLER,
-                                ENTITY_RESOLVER,
-                ERROR_REPORTER,
-                ENTITY_MANAGER,
-                DOCUMENT_SCANNER,
-                DTD_SCANNER,
-                DTD_PROCESSOR,
-                DTD_VALIDATOR,
-                                DATATYPE_VALIDATOR_FACTORY,
-                                VALIDATION_MANAGER,
-                                SCHEMA_VALIDATOR,
-                                XML_STRING,
-                XMLGRAMMAR_POOL,
-                JAXP_SCHEMA_SOURCE,
-                JAXP_SCHEMA_LANGUAGE,
-                // NOTE: These shouldn't really be here but since the XML Schema
-                //       validator is constructed dynamically, its recognized
-                //       properties might not have been set and it would cause a
-                //       not-recognized exception to be thrown. -Ac
-                SCHEMA_LOCATION,
-                SCHEMA_NONS_LOCATION,
-                LOCALE,
-                SCHEMA_DV_FACTORY,
-                SECURITY_MANAGER,
-                XML_SECURITY_PROPERTY_MANAGER
+        {
+            SYMBOL_TABLE,
+            ERROR_HANDLER,
+            ENTITY_RESOLVER,
+            ERROR_REPORTER,
+            ENTITY_MANAGER,
+            DOCUMENT_SCANNER,
+            DTD_SCANNER,
+            DTD_PROCESSOR,
+            DTD_VALIDATOR,
+            DATATYPE_VALIDATOR_FACTORY,
+            VALIDATION_MANAGER,
+            SCHEMA_VALIDATOR,
+            XML_STRING,
+            XMLGRAMMAR_POOL,
+            JAXP_SCHEMA_SOURCE,
+            JAXP_SCHEMA_LANGUAGE,
+            // NOTE: These shouldn't really be here but since the XML Schema
+            //       validator is constructed dynamically, its recognized
+            //       properties might not have been set and it would cause a
+            //       not-recognized exception to be thrown. -Ac
+            SCHEMA_LOCATION,
+            SCHEMA_NONS_LOCATION,
+            ROOT_TYPE_DEF,
+            LOCALE,
+            SCHEMA_DV_FACTORY,
+            SECURITY_MANAGER,
+            XML_SECURITY_PROPERTY_MANAGER
         };
         addRecognizedProperties(recognizedProperties);
 
-                if (symbolTable == null) {
-                        symbolTable = new SymbolTable();
-                }
-                fSymbolTable = symbolTable;
-                fProperties.put(SYMBOL_TABLE, fSymbolTable);
+        if (symbolTable == null) {
+                symbolTable = new SymbolTable();
+        }
+        fSymbolTable = symbolTable;
+        fProperties.put(SYMBOL_TABLE, fSymbolTable);
 
         fGrammarPool = grammarPool;
         if (fGrammarPool != null) {
@@ -597,8 +619,7 @@
             // REVISIT: What is the right thing to do? -Ac
         }
 
-                fConfigUpdated = false;
-
+        fConfigUpdated = false;
     } // <init>(SymbolTable,XMLGrammarPool)
 
     //
--- a/jaxws/.hgtags	Fri Aug 29 08:14:19 2014 -0700
+++ b/jaxws/.hgtags	Thu Sep 04 14:45:08 2014 -0700
@@ -272,3 +272,5 @@
 0b35542d6bf32af23a9fc59a37c52aa091fee388 jdk9-b24
 ab8726a0fcde897e4cfd1ea581ed90b0d8a7cbb7 jdk9-b25
 9b43f3993b96c2213428e95127a2d3fd0e709d3a jdk9-b26
+dcaa586ab756420e9a62643793bacef2c84bf637 jdk9-b27
+5282a14f131f897cc9575872c0fae72d47dc4e65 jdk9-b28
--- a/jdk/.hgtags	Fri Aug 29 08:14:19 2014 -0700
+++ b/jdk/.hgtags	Thu Sep 04 14:45:08 2014 -0700
@@ -269,3 +269,5 @@
 875450e7ef8dde8f59db662ec1351ea30b8cb35d jdk9-b24
 a31efe49556a7c12f9ea2c9ee8b4fae8aa67723a jdk9-b25
 dde9f5cfde5f46e62ceb5fab81151578e5277aef jdk9-b26
+f0870554049807d3392bd7976ab114f7f2b7bafa jdk9-b27
+1828f73b35cfe35e460e41fd6e087ab1f83e0621 jdk9-b28
--- a/jdk/make/Bundles.gmk	Fri Aug 29 08:14:19 2014 -0700
+++ b/jdk/make/Bundles.gmk	Thu Sep 04 14:45:08 2014 -0700
@@ -35,7 +35,7 @@
 
   # JDK_BUNDLE_DIR and JRE_BUNDLE_DIR are defined in SPEC.
 
-  MACOSX_PLIST_SRC := $(JDK_TOPDIR)/make/bundle
+  MACOSX_PLIST_SRC := $(JDK_TOPDIR)/make/data/bundle
 
   # All these OPENJDK checks are needed since there is no coherency between
   # these values in open and closed. Should probably be fixed.
--- a/jdk/make/CompileDemos.gmk	Fri Aug 29 08:14:19 2014 -0700
+++ b/jdk/make/CompileDemos.gmk	Thu Sep 04 14:45:08 2014 -0700
@@ -29,9 +29,7 @@
 include MakeBase.gmk
 include JavaCompilation.gmk
 include NativeCompilation.gmk
-
-# Setup the java compilers for the JDK build.
-include SetupJava.gmk
+include SetupJavaCompilers.gmk
 
 # Prepare the find cache.
 $(eval $(call FillCacheFind, $(JDK_TOPDIR)/src))
@@ -316,19 +314,6 @@
 $(eval $(call SetupJVMTIDemo,gctest, agent_util))
 $(eval $(call SetupJVMTIDemo,heapTracker, agent_util java_crw_demo))
 $(eval $(call SetupJVMTIDemo,heapViewer, agent_util))
-
-# On AIX, hprof requires 'dladdr' from src/aix/porting/porting_aix.cpp
-BUILD_LIBHPROF_AIX_EXTRA_SRC :=
-BUILD_LIBHPROF_AIX_EXTRA_CFLAGS :=
-ifeq ($(OPENJDK_TARGET_OS), aix)
-  BUILD_LIBHPROF_AIX_EXTRA_SRC += $(JDK_TOPDIR)/src/aix/porting
-  BUILD_LIBHPROF_AIX_EXTRA_CFLAGS += -I$(JDK_TOPDIR)/src/aix/porting
-endif
-
-$(eval $(call SetupJVMTIDemo,hprof, java_crw_demo, \
-    $(BUILD_LIBHPROF_AIX_EXTRA_CFLAGS), C, \
-    -ldl, ws2_32.lib winmm.lib, -lsocket -lnsl, -lpthread, $(BUILD_LIBHPROF_AIX_EXTRA_SRC)))
-
 $(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++))
@@ -336,34 +321,6 @@
 
 ##################################################################################################
 
-$(JDK_OUTPUTDIR)/demo/jpda/com/sun/tools/example/README: \
-    $(JDK_TOPDIR)/src/demo/share/jpda/com/sun/tools/example/README
-	$(call install-file)
-	$(CHMOD) -f ug+w $@
-
-$(eval $(call SetupArchive,JPDA_JAR, \
-    $(JDK_OUTPUTDIR)/demo/jpda/com/sun/tools/example/README, \
-    SRCS := $(JDK_TOPDIR)/src/demo/share/jpda \
-        $(JDK_TOPDIR)/src/jdk.jdi/share/classes \
-        $(JDK_OUTPUTDIR)/demo/jpda/com/sun/tools/example, \
-    INCLUDES := com/sun/tools/example README, \
-    SUFFIXES := .java .html .jj README, \
-    JAR := $(JDK_OUTPUTDIR)/demo/jpda/examples.jar, \
-    MANIFEST := $(JDK_TOPDIR)/make/data/mainmanifest/manifest.mf, \
-    EXTRA_MANIFEST_ATTR := Main-Class:$$(SPACE), \
-    SKIP_METAINF := true))
-
-$(eval $(call SetupZipArchive,JPDA_ZIP, \
-    SRC := $(JDK_TOPDIR)/src/demo/share/jpda \
-        $(JDK_TOPDIR)/src/jdk.jdi/share/classes, \
-    INCLUDES := com/sun/tools/example, \
-    SUFFIXES := .java .html .jj README, \
-    ZIP := $(JDK_OUTPUTDIR)/demo/jpda/src.zip))
-
-BUILD_DEMOS += $(JPDA_JAR) $(JPDA_ZIP)
-
-##################################################################################################
-
 $(JDK_OUTPUTDIR)/demo/management/index.html: $(DEMO_SHARE_SRC)/management/index.html
 	$(call install-file)
 	$(CHMOD) -f ug+w $@
--- a/jdk/make/CompileInterimRmic.gmk	Fri Aug 29 08:14:19 2014 -0700
+++ b/jdk/make/CompileInterimRmic.gmk	Thu Sep 04 14:45:08 2014 -0700
@@ -28,7 +28,7 @@
 include $(SPEC)
 include MakeBase.gmk
 include JavaCompilation.gmk
-include SetupJava.gmk
+include SetupJavaCompilers.gmk
 
 ##########################################################################################
 
--- a/jdk/make/CopyIntoClasses.gmk	Fri Aug 29 08:14:19 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,202 +0,0 @@
-#
-# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.  Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Copy icu and _dict files used by the text break iterator
-
-COPY_PATTERNS := .icu _dict .dat _options .js aliasmap .spp .wav .css \
-    .png .gif .xml .dtd .txt oqlhelp.html content-types.properties
-
-# These directories should not be copied at all
-EXCLUDES += \
-    java/awt/doc-files \
-    java/lang/doc-files \
-    javax/swing/doc-files \
-    javax/swing/text/doc-files \
-    javax/swing/plaf/synth/doc-files \
-    javax/swing/undo/doc-files \
-    sun/awt/X11/doc-files \
-    sun/util/cldr/resources \
-    #
-
-# These files should never be included
-EXFILES += build.xml README.txt version.txt
-
-# These icons are handled in GensrcIcons.gmk
-EXFILES += \
-    sun/awt/X11/java-icon16.png \
-    sun/awt/X11/java-icon24.png \
-    sun/awt/X11/java-icon32.png \
-    sun/awt/X11/java-icon48.png \
-    $(wildcard $(JDK_TOPDIR)/src/share/classes/sun/awt/resources/*.png) \
-    #
-
-ifndef OPENJDK
-  # Theses icons have closed replacements
-  SWING_PLAF_MOTIF_RESOURCES_DIR := $(JDK_TOPDIR)/src/share/classes/com/sun/java/swing/plaf/motif
-  EXFILES += \
-      $(JDK_TOPDIR)/src/share/classes/com/sun/java/swing/plaf/windows/icons/JavaCup32.png \
-      $(JDK_TOPDIR)/src/share/classes/javax/swing/plaf/basic/icons/JavaCup16.png \
-      $(wildcard $(SWING_PLAF_MOTIF_RESOURCES_DIR)/icons/*.gif) \
-      $(wildcard $(SWING_PLAF_MOTIF_RESOURCES_DIR)/icons/*.png) \
-      #
-
-  EXFILES += mib_core.txt
-endif
-
-ifeq ($(ENABLE_JFR), true)
-  JFR_CONFIGURATION_DIR_CLOSED := $(JDK_TOPDIR)/src/closed/share/classes/oracle/jrockit/jfr/settings
-  COPY_FILES += \
-      $(JFR_CONFIGURATION_DIR_CLOSED)/jfc.xsd
-endif
-
-SWING_BEANINFO_RESOURCES_SRC_DIR = $(JDK_TOPDIR)/make/data/swingbeaninfo/images
-SWING_BEANINFO_RESOURCES_SRC = $(wildcard $(SWING_BEANINFO_RESOURCES_SRC_DIR)/*.gif)
-OUT_BEANINFO_RESOURCES = $(patsubst $(SWING_BEANINFO_RESOURCES_SRC_DIR)%, \
-    $(JDK_OUTPUTDIR)/classes/javax/swing/beaninfo/images/%, \
-    $(SWING_BEANINFO_RESOURCES_SRC))
-
-COPY_EXTRA += $(OUT_BEANINFO_RESOURCES)
-
-# The exception handling of swing beaninfo
-# These resources violates the convention of having code and resources together under
-# $(JDK_TOPDIR)/src/.../classes directories
-$(JDK_OUTPUTDIR)/classes/javax/swing/beaninfo/images/%.gif: \
-    $(JDK_TOPDIR)/make/data/swingbeaninfo/images/%.gif
-	$(call install-file)
-
-##########################################################################################
-#
-# Copy the META-INF/services configuration files that are scattered around the source tree
-# into classes/META-INF/services. Be aware that META-INF directories that are located at a
-# source root (.../classes/META-INF) are automatically copied verbatim by the
-# SetupJavaCompilation macro.
-#
-# Any other META-INF/services configuration file is found here and platform specific comments
-# are uncommented and the configuration file is stored in the output META-INF directory.
-
-# Make sure the output directory is created.
-$(eval $(call MakeDir, $(JDK_OUTPUTDIR)/classes/META-INF/services))
-# Find all META-INF/services/* files
-ALL_META-INF_DIRS_share := $(shell $(FIND) $(JDK_TOPDIR)/src/share/classes -type d -a -name META-INF)
-ALL_META-INF_DIRS_targetapi := $(shell $(FIND) $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/classes -type d -a -name META-INF)
-# Platform specific overrides shared
-ifneq ($(ALL_META-INF_DIRS_targetapi), )
-  ALL_META-INF_DIRS := $(ALL_META-INF_DIRS_targetapi) \
-      $(filter-out %$(patsubst $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/classes%,%,$(ALL_META-INF_DIRS_targetapi)), \
-      $(ALL_META-INF_DIRS_share))
-else
-  ALL_META-INF_DIRS := $(ALL_META-INF_DIRS_share)
-endif
-
-SRC_SERVICES_FILES := $(wildcard $(addsuffix /services/*, $(ALL_META-INF_DIRS)))
-
-# The number of services files are relatively few. If the increase in numbers, then
-# we have to use ListPathsSafelyNow here.
-# Change $(JDK_TOPDIR)/src/.../META-INF/services/yyyy into $(JDK_OUTPUTDIR)/classes/META-INF/services/yyyy
-# The \n in the printf command is needed to make sed work on Solaris.
-OUT_SERVICES_FILES := $(addprefix $(JDK_OUTPUTDIR)/classes/META-INF/services/, \
-    $(shell $(PRINTF) "$(SRC_SERVICES_FILES)\n" | $(SED) -e 's|/[^ ]*/META-INF/services/||g'))
-OUT_SERVICES_FILES_COLON := $(addsuffix :, $(OUT_SERVICES_FILES))
-# Exception handling for print services with no META-INF directory
-SRC_SERVICES_FILES_PRINT = $(wildcard $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/classes/sun/print/services/*)
-OUT_SERVICES_FILES_PRINT = $(addprefix $(JDK_OUTPUTDIR)/classes/META-INF/services/, \
-    $(patsubst $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/classes/sun/print/services/%, %, \
-    $(SRC_SERVICES_FILES_PRINT)))
-OUT_SERVICES_FILES_PRINT_COLON = $(addsuffix :, $(OUT_SERVICES_FILES_PRINT))
-RULES_SERVICES_PRINT = $(join $(OUT_SERVICES_FILES_PRINT_COLON), $(SRC_SERVICES_FILES_PRINT))
-
-# Now setup the dependency rules to generate a META-INF/services/... from the correct source.
-META-INF_RULES_SERVICES := $(RULES_SERVICES_PRINT) $(join $(OUT_SERVICES_FILES_COLON), $(SRC_SERVICES_FILES))
-# Eval the newly created rules to incorporate them into the make tree.
-define addto_meta-inf_services
-  $1
-	echo $(LOG_INFO) Installing META-INF/services/$$(@F)
-	$(CAT) $$< | $(SED) -e "s/^#\[$(OPENJDK_TARGET_OS)\]//" > $$@
-endef
-$(foreach i, $(META-INF_RULES_SERVICES), $(eval $(call addto_meta-inf_services, $i)))
-# Here is the generic rule, whose receipt the above rules will trigger.
-
-COPY_EXTRA += $(OUT_SERVICES_FILES)
-COPY_EXTRA += $(OUT_SERVICES_FILES_PRINT)
-
-################################################################################
-
-JAVAX_SOUND_SRC := $(JDK_TOPDIR)/src/share/classes/com/sun/media/sound/services
-
-JAVAX_SOUND_SRC_FILES := \
-    javax.sound.midi.spi.MidiDeviceProvider \
-    javax.sound.midi.spi.MidiFileReader \
-    javax.sound.midi.spi.MidiFileWriter \
-    javax.sound.midi.spi.SoundbankReader \
-    javax.sound.sampled.spi.AudioFileReader \
-    javax.sound.sampled.spi.AudioFileWriter \
-    javax.sound.sampled.spi.FormatConversionProvider \
-    javax.sound.sampled.spi.MixerProvider
-
-COPY_EXTRA += $(addprefix $(JDK_OUTPUTDIR)/classes/META-INF/services/, $(JAVAX_SOUND_SRC_FILES))
-
-JAVAX_SOUND_RULES := $(foreach F, $(JAVAX_SOUND_SRC_FILES), $(JDK_OUTPUTDIR)/classes/META-INF/services/$(notdir $F):$(JAVAX_SOUND_SRC)/$F)
-
-$(foreach R, $(JAVAX_SOUND_RULES), $(eval $(call addto_meta-inf_services, $R)))
-
-################################################################################
-
-ifneq ($(OPENJDK_TARGET_OS), macosx)
-  OPENJDK_TARGET_OS_FLAVORMAP_PROPERTIES = $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/classes/sun/awt/datatransfer/flavormap.properties
-else
-  OPENJDK_TARGET_OS_FLAVORMAP_PROPERTIES = $(JDK_TOPDIR)/src/macosx/classes/sun/awt/datatransfer/flavormap.properties
-endif
-
-$(JDK_OUTPUTDIR)/classes/sun/awt/datatransfer/flavormap.properties: $(OPENJDK_TARGET_OS_FLAVORMAP_PROPERTIES)
-	$(install-file)
-
-COPY_EXTRA += $(JDK_OUTPUTDIR)/classes/sun/awt/datatransfer/flavormap.properties
-
-################################################################################
-
-CLEAN_FILES := $(wildcard \
-    $(JDK_TOPDIR)/src/share/classes/com/sun/imageio/plugins/common/*.properties \
-    $(JDK_TOPDIR)/src/share/classes/com/sun/java/util/jar/pack/*.properties \
-    $(JDK_TOPDIR)/src/share/classes/com/sun/jndi/cosnaming/jndiprovider.properties \
-    $(JDK_TOPDIR)/src/share/classes/com/sun/jndi/ldap/jndiprovider.properties \
-    $(JDK_TOPDIR)/src/share/classes/com/sun/org/apache/xml/internal/security/resource/*.properties \
-    $(JDK_TOPDIR)/src/share/classes/com/sun/rowset/*.properties \
-    $(JDK_TOPDIR)/src/share/classes/com/sun/tools/script/shell/*.properties \
-    $(JDK_TOPDIR)/src/share/classes/javax/sql/rowset/*.properties \
-    $(JDK_TOPDIR)/src/share/classes/sun/rmi/registry/resources/*.properties \
-    $(JDK_TOPDIR)/src/share/classes/sun/rmi/rmic/resources/*.properties \
-    $(JDK_TOPDIR)/src/share/classes/sun/rmi/server/resources/*.properties \
-    $(JDK_TOPDIR)/src/share/classes/sun/tools/javac/resources/*.properties \
-    $(JDK_TOPDIR)/src/share/classes/sun/tools/jconsole/resources/*.properties \
-    $(JDK_TOPDIR)/src/share/classes/sun/tools/serialver/resources/*.properties \
-    )
-
-# Copy zh_HK files from zh_TW
-
-$(JDK_OUTPUTDIR)/classes/%_zh_HK.properties: $(JDK_OUTPUTDIR)/classes/%_zh_TW.properties
-	$(install-file)
-
-COPY_EXTRA += $(patsubst $(JDK_TOPDIR)/src/share/classes/%, $(JDK_OUTPUTDIR)/classes/%, \
-    $(subst _zh_TW,_zh_HK, $(filter %_zh_TW.properties, $(CLEAN_FILES))))
--- a/jdk/make/CreateJars.gmk	Fri Aug 29 08:14:19 2014 -0700
+++ b/jdk/make/CreateJars.gmk	Thu Sep 04 14:45:08 2014 -0700
@@ -524,7 +524,6 @@
     EXCLUDES := $(TOOLS_JAR_EXCLUDES), \
     EXTRA_FILES := \
         $(JDK_OUTPUTDIR)/modules/jdk.jdi/META-INF/services/com.sun.jdi.connect.Connector \
-        $(JDK_OUTPUTDIR)/classes/META-INF/services/com.sun.jdi.connect.Connector \
         META-INF/services/com.sun.jdi.connect.spi.TransportService \
         META-INF/services/com.sun.tools.attach.spi.AttachProvider \
         META-INF/services/com.sun.tools.internal.ws.wscompile.Plugin \
--- a/jdk/make/CreateSecurityJars.gmk	Fri Aug 29 08:14:19 2014 -0700
+++ b/jdk/make/CreateSecurityJars.gmk	Thu Sep 04 14:45:08 2014 -0700
@@ -32,8 +32,6 @@
 # The jars created in this file are required for the exploded jdk image to function and
 # cannot wait to be built in the images target.
 
-SECURITY_CLASSES_SUBDIR := modules
-
 ##########################################################################################
 # Create manifest for security jars
 #
@@ -67,7 +65,7 @@
 SUNPKCS11_JAR_UNSIGNED := $(JDK_OUTPUTDIR)/jce/unsigned/sunpkcs11.jar
 
 $(eval $(call SetupArchive,BUILD_SUNPKCS11_JAR, , \
-    SRCS := $(JDK_OUTPUTDIR)/$(SECURITY_CLASSES_SUBDIR)/jdk.crypto.pkcs11, \
+    SRCS := $(JDK_OUTPUTDIR)/modules/jdk.crypto.pkcs11, \
     SUFFIXES := .class, \
     INCLUDES := sun/security/pkcs11, \
     JAR := $(SUNPKCS11_JAR_UNSIGNED), \
@@ -94,7 +92,7 @@
 SUNEC_JAR_UNSIGNED := $(JDK_OUTPUTDIR)/jce/unsigned/sunec.jar
 
 $(eval $(call SetupArchive,BUILD_SUNEC_JAR, , \
-    SRCS := $(JDK_OUTPUTDIR)/$(SECURITY_CLASSES_SUBDIR)/jdk.crypto.ec, \
+    SRCS := $(JDK_OUTPUTDIR)/modules/jdk.crypto.ec, \
     SUFFIXES := .class, \
     INCLUDES := sun/security/ec, \
     JAR := $(SUNEC_JAR_UNSIGNED), \
@@ -122,7 +120,7 @@
 
 ifneq ($(BUILD_CRYPTO), no)
   $(eval $(call SetupArchive,BUILD_SUNJCE_PROVIDER_JAR, , \
-      SRCS := $(JDK_OUTPUTDIR)/$(SECURITY_CLASSES_SUBDIR)/java.base, \
+      SRCS := $(JDK_OUTPUTDIR)/modules/java.base, \
       SUFFIXES := .class, \
       INCLUDES := com/sun/crypto/provider, \
       JAR := $(SUNJCE_PROVIDER_JAR_UNSIGNED), \
@@ -153,7 +151,7 @@
 
 ifneq ($(BUILD_CRYPTO), no)
   $(eval $(call SetupArchive,BUILD_JCE_JAR, , \
-      SRCS := $(JDK_OUTPUTDIR)/$(SECURITY_CLASSES_SUBDIR)/java.base, \
+      SRCS := $(JDK_OUTPUTDIR)/modules/java.base, \
       SUFFIXES := .class, \
       INCLUDES := javax/crypto sun/security/internal, \
       JAR := $(JCE_JAR_UNSIGNED), \
@@ -185,7 +183,7 @@
   SUNMSCAPI_JAR_UNSIGNED := $(JDK_OUTPUTDIR)/jce/unsigned/sunmscapi.jar
 
   $(eval $(call SetupArchive,BUILD_SUNMSCAPI_JAR, , \
-      SRCS := $(JDK_OUTPUTDIR)/$(SECURITY_CLASSES_SUBDIR)/jdk.crypto.mscapi, \
+      SRCS := $(JDK_OUTPUTDIR)/modules/jdk.crypto.mscapi, \
       SUFFIXES := .class, \
       INCLUDES := sun/security/mscapi, \
       JAR := $(SUNMSCAPI_JAR_UNSIGNED), \
@@ -218,7 +216,7 @@
     UCRYPTO_JAR_SRC := $(JDK_TOPDIR)/make/closed/tools/crypto/ucrypto/ucrypto.jar
 
     $(eval $(call SetupArchive,BUILD_UCRYPTO_JAR, , \
-        SRCS := $(JDK_OUTPUTDIR)/$(SECURITY_CLASSES_SUBDIR)/jdk.crypto.ucrypto, \
+        SRCS := $(JDK_OUTPUTDIR)/modules/jdk.crypto.ucrypto, \
         SUFFIXES := .class, \
         INCLUDES := com/oracle/security/ucrypto, \
         JAR := $(UCRYPTO_JAR_UNSIGNED), \
--- a/jdk/make/ModulesXml.gmk	Fri Aug 29 08:14:19 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,69 +0,0 @@
-#
-# Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.  Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Default target declared first
-default: all
-
-include $(SPEC)
-include MakeBase.gmk
-include Tools.gmk
-
-#
-# Generate modules.xml for jdeps to use
-# It augments $(TOPDIR)/modules.xml to include module membership
-#
-JDEPS_MODULES_XML := $(JDK_OUTPUTDIR)/modules/jdk.dev/com/sun/tools/jdeps/resources/modules.xml
-
-METADATA := $(JDK_OUTPUTDIR)/btclasses/build/tools/module/modules.xml
-$(METADATA): $(TOPDIR)/modules.xml
-	$(call install-file)
-
-METADATA_FILES := $(METADATA)
-
-ifndef OPENJDK
-  CLOSED_METADATA := $(JDK_OUTPUTDIR)/btclasses/build/tools/module/closed/modules.xml
-  $(CLOSED_METADATA): $(TOPDIR)/closed/modules.xml
-	$(call install-file)
-
-  METADATA_FILES += $(CLOSED_METADATA)
-endif
-
-$(JDEPS_MODULES_XML): $(BUILD_TOOLS_JDK) $(METADATA_FILES)
-	$(MKDIR) -p $(@D)
-	$(RM) $@
-	$(TOOL_GENMODULESXML) $@ $(JDK_OUTPUTDIR)/modules
-
-#
-# Verify access across module boundaries
-#
-checkdeps: $(JDEPS_MODULES_XML)
-	$(ECHO) "Checking dependencies across JDK modules"
-	$(FIXPATH) $(JDK_OUTPUTDIR)/bin/jdeps -verify:access -mp $(JDK_OUTPUTDIR)/modules
-
-gen-modules-xml: $(JDEPS_MODULES_XML)
-
-all: checkdeps
-
-.PHONY: all
--- a/jdk/make/Tools.gmk	Fri Aug 29 08:14:19 2014 -0700
+++ b/jdk/make/Tools.gmk	Thu Sep 04 14:45:08 2014 -0700
@@ -32,10 +32,7 @@
 include MakeBase.gmk
 include JavaCompilation.gmk
 include NativeCompilation.gmk
-include SetupJava.gmk
-
-# Cache all finds nee