Merge
authorlana
Fri, 15 Jan 2010 15:36:54 -0800
changeset 4676 4cdcce877ba7
parent 4675 68f287672813 (diff)
parent 4595 84bc8a58537f (current diff)
child 4677 1b6ce3fbc01b
Merge
jdk/src/share/classes/sun/dyn/util/BytecodeSignature.java
langtools/src/share/classes/com/sun/tools/javac/file/CloseableURLClassLoader.java
--- a/jdk/make/com/sun/crypto/provider/Makefile	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/make/com/sun/crypto/provider/Makefile	Fri Jan 15 15:36:54 2010 -0800
@@ -249,7 +249,7 @@
 else
 $(JAR_DESTFILE): $(SIGNED_DIR)/sunjce_provider.jar
 endif
-	$(install-file)
+	$(install-non-module-file)
 
 ifndef OPENJDK
 install-prebuilt:
--- a/jdk/make/com/sun/java/pack/Makefile	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/make/com/sun/java/pack/Makefile	Fri Jan 15 15:36:54 2010 -0800
@@ -28,6 +28,7 @@
 #
 
 BUILDDIR = ../../../..
+MODULE  = pack200
 PACKAGE = com.sun.java.util.jar.pack
 LIBRARY = unpack
 PRODUCT = sun
@@ -123,11 +124,14 @@
 
 all: build
 
-build: prop
+build: prop pack200-tool
 
 prop:
 	$(MAKE) -C prop
 
+pack200-tool:
+	$(call make-launcher, pack200, com.sun.java.util.jar.pack.Driver, , --pack)
+
 unpacker:
 	$(MAKE) $(UNPACK_EXE) STANDALONE=true LDMAPFLAGS_OPT= LDMAPFLAGS_DBG=
 
@@ -151,6 +155,7 @@
 	$(MT) /manifest $(TEMPDIR)/unpack200$(EXE_SUFFIX).manifest /outputresource:$(TEMPDIR)/unpack200$(EXE_SUFFIX);#1
 endif
 	$(CP) $(TEMPDIR)/unpack200$(EXE_SUFFIX) $(UNPACK_EXE)
+	$(install-module-file)
 
 ifeq ($(PLATFORM), windows) 
 $(RES):: $(VERSIONINFO_RESOURCE)
--- a/jdk/make/com/sun/java/pack/prop/Makefile	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/make/com/sun/java/pack/prop/Makefile	Fri Jan 15 15:36:54 2010 -0800
@@ -29,6 +29,7 @@
 # to a collision of rules with Classes.gmk and Library.gmk
 
 BUILDDIR = ../../../../..
+MODULE  = pack200
 PACKAGE = com.sun.java.util.jar.pack
 PRODUCT = sun
 include $(BUILDDIR)/common/Defs.gmk
--- a/jdk/make/com/sun/jndi/cosnaming/Makefile	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/make/com/sun/jndi/cosnaming/Makefile	Fri Jan 15 15:36:54 2010 -0800
@@ -28,6 +28,7 @@
 #
 
 BUILDDIR = ../../../..
+MODULE  = jndi-cosnaming
 PACKAGE = com.sun.jndi.cosnaming
 PRODUCT = sun
 include $(BUILDDIR)/common/Defs.gmk
--- a/jdk/make/com/sun/jndi/dns/Makefile	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/make/com/sun/jndi/dns/Makefile	Fri Jan 15 15:36:54 2010 -0800
@@ -28,6 +28,7 @@
 #
 
 BUILDDIR = ../../../..
+MODULE  = jndi-dns
 PACKAGE = com.sun.jndi.dns
 PRODUCT = sun
 include $(BUILDDIR)/common/Defs.gmk
--- a/jdk/make/com/sun/jndi/ldap/Makefile	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/make/com/sun/jndi/ldap/Makefile	Fri Jan 15 15:36:54 2010 -0800
@@ -28,6 +28,7 @@
 #
 
 BUILDDIR = ../../../..
+MODULE  = jndi-ldap
 PACKAGE = com.sun.jndi.ldap
 PRODUCT = sun
 include $(BUILDDIR)/common/Defs.gmk
--- a/jdk/make/com/sun/jndi/rmi/registry/Makefile	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/make/com/sun/jndi/rmi/registry/Makefile	Fri Jan 15 15:36:54 2010 -0800
@@ -28,6 +28,7 @@
 #
 
 BUILDDIR = ../../../../..
+MODULE  = jndi-rmiregistry
 PACKAGE = com.sun.jndi.rmi.registry
 PRODUCT = sun
 include $(BUILDDIR)/common/Defs.gmk
--- a/jdk/make/com/sun/nio/sctp/FILES_java.gmk	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/make/com/sun/nio/sctp/FILES_java.gmk	Fri Jan 15 15:36:54 2010 -0800
@@ -57,8 +57,7 @@
 	sun/nio/ch/SctpResultContainer.java \
 	sun/nio/ch/SctpSendFailed.java \
 	sun/nio/ch/SctpServerChannelImpl.java \
-	sun/nio/ch/SctpShutdown.java \
-	sun/nio/ch/SctpSocketDispatcher.java
+	sun/nio/ch/SctpShutdown.java
 else
 FILES_java += \
 	sun/nio/ch/SctpChannelImpl.java \
--- a/jdk/make/com/sun/nio/sctp/Makefile	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/make/com/sun/nio/sctp/Makefile	Fri Jan 15 15:36:54 2010 -0800
@@ -28,6 +28,7 @@
 #
 
 BUILDDIR = ../../../..
+MODULE  = sctp
 PACKAGE = com.sun.nio.sctp
 LIBRARY = sctp
 PRODUCT = sun
--- a/jdk/make/com/sun/nio/sctp/mapfile-vers	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/make/com/sun/nio/sctp/mapfile-vers	Fri Jan 15 15:36:54 2010 -0800
@@ -25,9 +25,14 @@
 
 SUNWprivate_1.1 {
 	global:
+		Java_sun_nio_ch_SctpNet_init;
 		Java_sun_nio_ch_SctpNet_socket0;
 		Java_sun_nio_ch_SctpNet_bindx;
 		Java_sun_nio_ch_SctpNet_branch0;
+		Java_sun_nio_ch_SctpNet_listen0;
+		Java_sun_nio_ch_SctpNet_connect0;
+		Java_sun_nio_ch_SctpNet_close0;
+		Java_sun_nio_ch_SctpNet_preClose0;
 		Java_sun_nio_ch_SctpNet_getLocalAddresses0;
 		Java_sun_nio_ch_SctpNet_getRemoteAddresses0;
 		Java_sun_nio_ch_SctpNet_getPrimAddrOption0;
--- a/jdk/make/com/sun/org/apache/xml/Makefile	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/make/com/sun/org/apache/xml/Makefile	Fri Jan 15 15:36:54 2010 -0800
@@ -28,6 +28,7 @@
 #
 
 BUILDDIR = ../../../../..
+MODULE  = security-xmldsig
 PACKAGE = com.sun.org.apache.xml
 PRODUCT = xml
 include $(BUILDDIR)/common/Defs.gmk
--- a/jdk/make/com/sun/rowset/Makefile	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/make/com/sun/rowset/Makefile	Fri Jan 15 15:36:54 2010 -0800
@@ -28,6 +28,7 @@
 #
 
 BUILDDIR = ../../..
+MODULE  = jdbc-enterprise
 PACKAGE = com.sun.rowset
 PRODUCT = sun
 include $(BUILDDIR)/common/Defs.gmk
--- a/jdk/make/com/sun/script/Makefile	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/make/com/sun/script/Makefile	Fri Jan 15 15:36:54 2010 -0800
@@ -25,6 +25,7 @@
 
 
 BUILDDIR = ../../..
+MODULE  = scripting-rhino
 PACKAGE = com.sun.script
 PRODUCT = sun
 include $(BUILDDIR)/common/Defs.gmk
--- a/jdk/make/com/sun/security/auth/module/Makefile	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/make/com/sun/security/auth/module/Makefile	Fri Jan 15 15:36:54 2010 -0800
@@ -26,6 +26,7 @@
 # Makefile for building auth modules.
 
 BUILDDIR = ../../../../..
+MODULE  = security-auth
 PACKAGE = com.sun.security.auth.module
 PRODUCT = sun
 
--- a/jdk/make/com/sun/servicetag/Makefile	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/make/com/sun/servicetag/Makefile	Fri Jan 15 15:36:54 2010 -0800
@@ -22,6 +22,7 @@
 # have any questions.
 
 BUILDDIR = ../../..
+MODULE  = servicetag
 PACKAGE = com.sun.servicetag
 PRODUCT = sun
 include $(BUILDDIR)/common/Defs.gmk
@@ -68,7 +69,7 @@
 
 $(SERVICETAG_LIBDIR)/jdk_header.png: $(SHARE_SRC)/classes/com/sun/servicetag/resources/jdk_header.png
 	$(install-file)
-	$(CHMOD) 444 $@
+	$(call chmod-file, 444)
 
 install-servicetag-lib:
 	@$(RM) -rf $(SERVICETAG_LIBDIR)
--- a/jdk/make/com/sun/tools/attach/Makefile	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/make/com/sun/tools/attach/Makefile	Fri Jan 15 15:36:54 2010 -0800
@@ -25,6 +25,7 @@
 
 
 BUILDDIR = ../../../..
+MODULE  = attach
 PACKAGE = com.sun.tools.attach
 LIBRARY = attach
 PRODUCT = sun
@@ -65,6 +66,7 @@
 	@$(MKDIR) -p $(@D)
 	@$(RM) $@
 	@$(CAT) $< | $(SED) -e "s/^#\[$(PLATFORM)\]//" > $@
+	@$(install-module-file)
                                                                                                 
 .PHONY: copy-files
 
--- a/jdk/make/common/Defs.gmk	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/make/common/Defs.gmk	Fri Jan 15 15:36:54 2010 -0800
@@ -225,12 +225,6 @@
     endif
   endif 
 
-  ifeq ($(PLATFORM), windows)
-    FREETYPE_LIB = $(FREETYPE_LIB_PATH)/freetype.lib
-  else
-    FREETYPE_LIB = -L$(FREETYPE_LIB_PATH) -lfreetype
-  endif
-
   ifdef ALT_FREETYPE_HEADERS_PATH
     FREETYPE_HEADERS_PATH = $(ALT_FREETYPE_HEADERS_PATH)
   else
@@ -388,6 +382,14 @@
   UNIQUE_LOCATION_STRING += /$(THREADDIR)
 endif
 
+#
+# Build units may or may not define MODULE.  Default to "other".
+#
+ifndef MODULE
+  MODULE = other
+endif
+override MODULE_DEST_DIR = $(OUTPUTDIR)/tmp/modules/$(MODULE)
+
 # the use of += above makes a space separated list which we need to 
 # remove for filespecs.
 #
@@ -498,6 +500,58 @@
 include $(JDK_MAKE_SHARED_DIR)/Defs-java.gmk
 
 #
+# Macros to find the module that $@ belongs to
+#
+
+UNIQUE_PATH_PATTERN = $(subst /,.,$(UNIQUE_PATH))
+MODULE_PATH_PATTERN = -e 's%.*\/classes\/%classes\/%' \
+		      -e 's%.*\/$(UNIQUE_PATH_PATTERN)\/%classes\/%' \
+		      -e 's%.*\/lib\/%lib\/%' \
+	              -e 's%.*\/bin\/%bin\/%' \
+	              -e 's%.*\/include\/%include\/%' \
+		      -e 's%.*\/demo\/%demo\/%' \
+		      -e 's%.*\/sample\/%sample\/%'
+
+# Install a file to its module
+define install-module-file
+dest=`echo $(@D)/ | $(SED) $(MODULE_PATH_PATTERN)` ; \
+$(MKDIR) -p $(MODULE_DEST_DIR)/$$dest; \
+$(CP) $@ $(MODULE_DEST_DIR)/$$dest
+endef
+
+# Install all files from the directory to its module
+define install-module-dir
+dest=`echo $(@D)/ | $(SED) $(MODULE_PATH_PATTERN)` ; \
+$(MKDIR) -p $(MODULE_DEST_DIR)/$$dest; \
+$(CP) -rf $(@D)/* $(MODULE_DEST_DIR)/$$dest
+endef
+
+# chmod the file in its module
+define chmod-module-file
+dest=`echo $@ | $(SED) $(MODULE_PATH_PATTERN)` ; \
+$(CHMOD) $1 $(MODULE_DEST_DIR)/$$dest
+endef
+
+# install a sym link in its module
+define install-module-sym-link
+dest=`echo $@ | $(SED) $(MODULE_PATH_PATTERN)` ; \
+$(LN) -s $1 $(MODULE_DEST_DIR)/$$dest
+endef
+
+
+# Run MAKE $@ for a launcher:
+#   $(call make-launcher, name, mainclass, java-args, main-args)
+define make-launcher
+$(CD) $(BUILDDIR)/launchers && \
+$(MAKE) -f Makefile.launcher \
+        MODULE=$(MODULE) \
+        PROGRAM=$(strip $1) \
+        MAIN_CLASS=$(strip $2) \
+        MAIN_JAVA_ARGS="$(strip $3)" \
+        MAIN_ARGS="$(strip $4)"
+endef
+
+#
 # Convenient macros
 #
 
@@ -511,6 +565,28 @@
 define install-file
 $(prep-target)
 $(CP) $< $@
+$(install-module-file)
+endef
+
+define chmod-file
+$(CHMOD) $1 $@
+$(call chmod-module-file, $1)
+endef
+
+define install-sym-link
+$(LN) -s $1 $@
+$(call install-module-sym-link, $1)
+endef
+
+#
+# Marcos for files not belonging to any module 
+define install-non-module-file
+$(prep-target)
+$(CP) $< $@
+endef
+
+define install-manifest-file
+$(install-non-module-file)
 endef
 
 # Cleanup rule for after debug java run (hotspot.log file is left around)
@@ -712,7 +788,7 @@
 endif
 
 # Install of imported file (JDK_IMPORT_PATH, or some other external location)
-define install-import-file
+define install-importonly-file
 @$(ECHO) "ASSEMBLY_IMPORT: $@"
 $(prep-target)
 $(CP) $< $@
@@ -730,4 +806,9 @@
 fi
 endef
 
+define install-import-file
+$(install-importonly-file)
+$(install-module-file)
+endef
+
 .PHONY: all build clean clobber
--- a/jdk/make/common/Demo.gmk	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/make/common/Demo.gmk	Fri Jan 15 15:36:54 2010 -0800
@@ -25,6 +25,8 @@
 
 # JDK Demo building jar file.
   
+MODULE = demos
+
 # Some names are defined with LIBRARY inside the Defs.gmk file
 LIBRARY=$(DEMONAME)
 OBJDIR=$(TEMPDIR)/$(DEMONAME)
--- a/jdk/make/common/Library.gmk	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/make/common/Library.gmk	Fri Jan 15 15:36:54 2010 -0800
@@ -193,9 +193,18 @@
 	$(MT) /manifest $(OBJDIR)/$(@F).manifest /outputresource:$(OBJDIR)/$(@F);#2
 endif
 	$(CP) $(OBJDIR)/$(@F) $@
+	$(install-module-file)
 	$(CP) $(OBJDIR)/$(LIBRARY).map $(@D)
 	$(CP) $(OBJDIR)/$(LIBRARY).pdb $(@D)
 
+$(ACTUAL_LIBRARY):: $(ACTUAL_LIBRARY_DIR)/$(LIBRARY).map $(ACTUAL_LIBRARY_DIR)/$(LIBRARY).pdb
+
+$(ACTUAL_LIBRARY_DIR)/%.map: FORCE
+	$(install-module-file)
+
+$(ACTUAL_LIBRARY_DIR)/%.pdb: FORCE
+	$(install-module-file)
+
 endif # LIBRARY
 
 $(OBJDIR)/$(LIBRARY).lcf: $(OBJDIR)/$(LIBRARY).res $(COMPILE_FILES_o) $(FILES_m)
@@ -250,6 +259,7 @@
 	$(AR) -r $@ $(FILES_o)
 else # LIBRARY
 	$(LINKER) $(SHARED_LIBRARY_FLAG) -o $@ $(FILES_o) $(LDLIBS)
+	$(install-module-file)
 ifeq ($(WRITE_LIBVERSION),true)
 	$(MCS) -d -a "$(FULL_VERSION)" $@
 endif # WRITE_LIBVERSION
@@ -353,5 +363,7 @@
 openjdk:
 	$(MAKE) OPENJDK=true build
 
+FORCE:
+
 .PHONY: all build debug fastdebug
 
--- a/jdk/make/common/Modules.gmk	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/make/common/Modules.gmk	Fri Jan 15 15:36:54 2010 -0800
@@ -34,12 +34,10 @@
 #
 # Open issues that need further investigation:
 # 1. Classes in jre/lib/ext/dnsns.jar are currently put in jre/lib/jndi-dns
-#    module.
+#    module.  META-INF/services file is not installed.
 # 2. Signed jars
 #    For JDK build, signed jars are copied to the build.
 #    All jars in the module image are unsigned.
-# 3. jre/lib/security/US_export_policy.jar and local_policy.jar
-#    are not included in the module image yet.
 
 MODULE_IMAGEBINDIR = bin
 
@@ -63,7 +61,8 @@
 	@$(ECHO) ">>>Making "$@" @ `$(DATE)` ..."
 
 # Order is important here, trim jre after jdk image is created
-modules:: sanity-module-images post-sanity-module-images  \
+modules:: gen-modules \
+	 sanity-module-images post-sanity-module-images  \
 	 $(INITIAL_MODULE_IMAGE_JRE) $(INITIAL_MODULE_IMAGE_JDK) \
 	 trim-module-image-jre trim-module-image-jdk \
 	 process-module-image-jre process-module-image-jdk
@@ -124,6 +123,33 @@
 
 MODULES_TEMPDIR=$(ABS_TEMPDIR)/modules
 MODULES_LIB = $(ABS_OUTPUTDIR)/modules
+MODULES_LIST = $(MODULES_TEMPDIR)/classlist/modules.list
+
+# Modules in the jre/lib/security directory
+POLICY_MODULES = US_export_policy local_policy
+
+# Modules in the modules/ext directory
+EXT_MODULES = localedata security-sunec security-sunjce
+
+# Build PKCS#11 on all platforms except 64-bit Windows.
+PKCS11 = security-sunpkcs11
+ifeq ($(ARCH_DATA_MODEL), 64)
+  ifeq ($(PLATFORM), windows)
+    PKCS11 =
+  endif
+endif
+
+EXT_MODULES += $(PKCS11)
+
+# Build Microsoft CryptoAPI provider only on (non-64-bit) Windows platform.
+ifeq ($(PLATFORM), windows)
+  ifneq ($(ARCH_DATA_MODEL), 64)
+    EXT_MODULES += security-sunmscapi
+  endif
+endif
+
+# Modules for JDK only
+JDK_MODULES = tools
 
 gen-modules:
 	$(CD) modules; $(MAKE) all
@@ -151,7 +177,6 @@
 # Construct an initial jre image (initial jdk jre) no trimming or stripping
 initial-module-image-jre:: initial-module-image-jre-setup \
 		    $(JRE_LICENSES) $(JRE_MODULE_DOCFILES) \
-		    gen-modules \
 		    $(BUILDMETAINDEX_JARFILE)
 	@# Copy in bin directory
 	$(CD) $(OUTPUTDIR) && $(FIND) bin -depth | $(CPIO) -pdum $(JRE_MODULE_IMAGE_DIR)
@@ -162,7 +187,21 @@
 	@#
 	@# copy modules to jre/lib
 	@#
-	$(CP) -rf $(MODULES_LIB)/jre/lib/* $(JRE_MODULE_IMAGE_DIR)/lib 
+	for m in `$(NAWK) '{print $$1}' $(MODULES_LIST)` ; do \
+	    $(CP) $(MODULES_LIB)/$$m/lib/$$m.jar $(JRE_MODULE_IMAGE_DIR)/lib ; \
+	done
+	$(MKDIR) -p $(JRE_MODULE_IMAGE_DIR)/lib/ext
+	for m in $(EXT_MODULES) ; do \
+           $(MV) $(JRE_MODULE_IMAGE_DIR)/lib/$$m.jar $(JRE_MODULE_IMAGE_DIR)/lib/ext ; \
+        done
+	for m in $(POLICY_MODULES) ; do \
+           $(MV) $(JRE_MODULE_IMAGE_DIR)/lib/$$m.jar $(JRE_MODULE_IMAGE_DIR)/lib/security; \
+        done
+	@# Remove jdk modules
+	for m in $(JDK_MODULES) ; do \
+           $(RM) $(JRE_MODULE_IMAGE_DIR)/lib/$$m.jar ; \
+        done
+
 	@# Make sure all directories are read/execute for everyone
 	$(CHMOD) a+rx `$(FIND) $(JRE_MODULE_IMAGE_DIR) -type d`
 	@# Remove some files from the jre area
@@ -304,7 +343,9 @@
 	@# copy jdk modules to jdk/lib
 	@#
 	$(MKDIR) -p $(JDK_MODULE_IMAGE_DIR)/lib
-	$(CP) -rf $(MODULES_LIB)/lib/* $(JDK_MODULE_IMAGE_DIR)/lib 
+	for m in $(JDK_MODULES) ; do \
+	    $(CP) $(MODULES_LIB)/$$m/lib/$$m.jar $(JDK_MODULE_IMAGE_DIR)/lib ; \
+        done
   ifeq ($(PLATFORM), windows)
 	@#
 	@# lib/
--- a/jdk/make/common/Program.gmk	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/make/common/Program.gmk	Fri Jan 15 15:36:54 2010 -0800
@@ -50,8 +50,6 @@
 ACTUAL_PROGRAM_DIR  = $(BINDIR)
 ACTUAL_PROGRAM      = $(ACTUAL_PROGRAM_DIR)/$(ACTUAL_PROGRAM_NAME)
 
-JVMCFG = $(LIBDIR)/$(LIBARCH)/jvm.cfg
-
 # Make sure the default rule is all
 program_default_rule: all
 
@@ -116,7 +114,7 @@
 
 ifeq ($(COMPILE_IT),true)
 
-$(ACTUAL_PROGRAM):: classes $(JVMCFG) $(INIT) 
+$(ACTUAL_PROGRAM):: classes $(INIT) 
 
 #
 # Windows only
@@ -190,12 +188,13 @@
 	@$(MKDIR) -p $(TEMPDIR)
 	$(LINK_PRE_CMD) $(CC) $(CC_OBJECT_OUTPUT_FLAG)$@ $(LDFLAGS) \
 	    $(FILES_o) $(THREADLIBS) $(LDLIBS)
+	$(install-module-file)
 
 endif # PLATFORM
 
 else  # COMPILE_IT
 
-$(ACTUAL_PROGRAM):: $(JVMCFG)
+$(ACTUAL_PROGRAM)::
 
 # Copies in the file from the JDK_IMPORT_PATH area
 $(ACTUAL_PROGRAM_DIR)/%: $(JDK_IMPORT_PATH)/jre/bin/%
@@ -272,18 +271,6 @@
 		$(VERSION_DEFINES) $<
 
 #
-# How to install jvm.cfg. 
-#
-ifeq ($(ZERO_BUILD), true)
-JVMCFG_ARCH = zero
-else
-JVMCFG_ARCH = $(ARCH)
-endif
-
-$(JVMCFG): $(LAUNCHER_PLATFORM_SRC)/bin/$(JVMCFG_ARCH)/jvm.cfg 
-	$(install-file)
-
-#
 # Default dependencies
 #
 
--- a/jdk/make/common/internal/BinaryPlugs.gmk	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/make/common/internal/BinaryPlugs.gmk	Fri Jan 15 15:36:54 2010 -0800
@@ -116,7 +116,7 @@
 
 define import-binary-plug-file
 @$(ECHO) "PLUG IMPORT: $(@F)"
-$(install-file)
+$(install-non-module-file)
 endef # import-binary-plug-file
 
 # Import classes command
@@ -184,7 +184,7 @@
 
 define export-binary-plug-file
 @$(ECHO) "PLUG EXPORT: $(@F)"
-$(install-file)
+$(install-non-module-file)
 endef # export-binary-plug-file
 
 # OpenJDK Binary Plug License
--- a/jdk/make/common/internal/Resources.gmk	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/make/common/internal/Resources.gmk	Fri Jan 15 15:36:54 2010 -0800
@@ -139,7 +139,7 @@
 STRIP_PROP_options=$(TEMPDIR)/strip_prop_options
 define install-properties-file
 $(install-file)
-$(CHMOD) a+rw $@
+$(call chmod-file, a+rw)
 @$(ECHO) "# Adding to strip properties list: $@"
 $(ECHO) "$@" >> $(STRIP_PROP_options)
 endef
--- a/jdk/make/common/shared/Sanity.gmk	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/make/common/shared/Sanity.gmk	Fri Jan 15 15:36:54 2010 -0800
@@ -1117,7 +1117,7 @@
 #    be checked when this represents a full control build (i.e. the
 #    HOTSPOT_IMPORT_PATH includes these files in it's 'include' directory).
 $(TEMPDIR)/%.h: $(SHARE_SRC)/javavm/export/%.h
-	@$(install-file)
+	@$(install-non-module-file)
 	@$(RM) $@.IMPORT
 	@if [ -r $(HOTSPOT_IMPORT_PATH)/include/$(@F) ]; then \
 	  $(CP) $(HOTSPOT_IMPORT_PATH)/include/$(@F) $@.IMPORT ; \
@@ -1131,7 +1131,7 @@
 	fi
 
 $(TEMPDIR)/%.h: $(PLATFORM_SRC)/javavm/export/%.h
-	@$(install-file)
+	@$(install-non-module-file)
 	@$(RM) $@.IMPORT
 	@if [ -r $(HOTSPOT_IMPORT_PATH)/include/$(PLATFORM_INCLUDE_NAME)/$(@F) ]; then \
 	  $(CP) $(HOTSPOT_IMPORT_PATH)/include/$(PLATFORM_INCLUDE_NAME)/$(@F) $@.IMPORT ; \
--- a/jdk/make/java/awt/Makefile	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/make/java/awt/Makefile	Fri Jan 15 15:36:54 2010 -0800
@@ -24,6 +24,7 @@
 #
 
 BUILDDIR = ../..
+MODULE  = awt
 PACKAGE = java.awt
 PRODUCT = sun
 include $(BUILDDIR)/common/Defs.gmk
--- a/jdk/make/java/fdlibm/Makefile	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/make/java/fdlibm/Makefile	Fri Jan 15 15:36:54 2010 -0800
@@ -31,6 +31,7 @@
 #
 
 BUILDDIR     = ../..
+MODULE       = base
 LIBRARY      = fdlibm
 PRODUCT      = java
 
--- a/jdk/make/java/hpi/native/Makefile	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/make/java/hpi/native/Makefile	Fri Jan 15 15:36:54 2010 -0800
@@ -28,6 +28,7 @@
 #
 
 BUILDDIR     = ../../..
+MODULE       = base
 LIBRARY      = hpi
 PRODUCT      = java
 THREADDIR    = native_threads
--- a/jdk/make/java/hpi/windows/Makefile	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/make/java/hpi/windows/Makefile	Fri Jan 15 15:36:54 2010 -0800
@@ -26,8 +26,9 @@
 #
 # Makefile for Windows HPI DLL
 #
-BUILDDIR = ../../..
-LIBRARY   = hpi
+BUILDDIR     = ../../..
+MODULE       = base
+LIBRARY      = hpi
 PRODUCT      = java
 THREADDIR    = windows_threads
 LIB_LOCATION = $(BINDIR)
--- a/jdk/make/java/instrument/Makefile	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/make/java/instrument/Makefile	Fri Jan 15 15:36:54 2010 -0800
@@ -27,6 +27,7 @@
 # agent, supporting java.lang.instrument
 
 BUILDDIR = ../..
+MODULE  = instrument
 PACKAGE = sun.instrument
 LIBRARY = instrument
 PRODUCT = sun
--- a/jdk/make/java/java/Makefile	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/make/java/java/Makefile	Fri Jan 15 15:36:54 2010 -0800
@@ -29,6 +29,7 @@
 #
 
 BUILDDIR = ../..
+MODULE  = base
 PACKAGE = java.lang
 LIBRARY = java
 PRODUCT = java
@@ -241,7 +242,7 @@
 
 $(GENSRCDIR)/java/lang/UNIXProcess.java: \
     $(PLATFORM_SRC)/classes/java/lang/UNIXProcess.java.$(PLATFORM)
-	$(install-file)
+	$(install-non-module-file)
 
 clean:: 
 	$(RM) $(GENSRCDIR)/java/lang/UNIXProcess.java
@@ -285,7 +286,7 @@
 
 $(TZMAP): $(TZMAPFILE)
 	$(install-file)
-	$(CHMOD) 444 $@
+	$(call chmod-file, 444)
 endif
 
 build: $(LIBDIR)/$(PROPS) $(LIBDIR)/$(CAL_PROPS) $(TZMAP)
@@ -315,7 +316,8 @@
 	$(BOOT_JAVA_CMD) -jar $(GENERATECURRENCYDATA_JARFILE) -o $@.temp \
 		< $(SHARE_SRC)/classes/java/util/CurrencyData.properties
 	$(MV) $@.temp $@
-	$(CHMOD) 444 $@
+	$(install-module-file)
+	$(call chmod-file, 444)
 
 clean:: 
 	$(RM) $(CURDATA)
@@ -369,7 +371,7 @@
 		-usecharforbyte 11 4 1
 
 $(GENSRCDIR)/java/lang/%.java : $(CHARACTERDATA)/%.java.template
-	$(install-file)
+	$(install-non-module-file)
 
 clean::
 	$(RM) $(GENSRCDIR)/java/lang/CharacterDataLatin1.java 
--- a/jdk/make/java/java_crw_demo/Makefile	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/make/java/java_crw_demo/Makefile	Fri Jan 15 15:36:54 2010 -0800
@@ -24,6 +24,8 @@
 #
 
 BUILDDIR = ../..
+
+MODULE  = demos
 LIBRARY = java_crw_demo
 PRODUCT = sun
 LIBRARY_OUTPUT = java_crw_demo
--- a/jdk/make/java/java_hprof_demo/Makefile	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/make/java/java_hprof_demo/Makefile	Fri Jan 15 15:36:54 2010 -0800
@@ -24,6 +24,7 @@
 #
 
 BUILDDIR = ../..
+MODULE  = instrument
 LIBRARY = hprof
 PRODUCT = sun
 LIBRARY_OUTPUT = hprof_jvmti
--- a/jdk/make/java/jli/Makefile	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/make/java/jli/Makefile	Fri Jan 15 15:36:54 2010 -0800
@@ -30,6 +30,7 @@
 # its manifestations (java, javaw, javac, ...).
 #
 BUILDDIR = ../..
+MODULE  = base
 LIBRARY = jli
 PRODUCT = java
 
--- a/jdk/make/java/jvm/Makefile	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/make/java/jvm/Makefile	Fri Jan 15 15:36:54 2010 -0800
@@ -24,6 +24,8 @@
 #
 
 BUILDDIR = ../..
+MODULE   = base
+
 include $(BUILDDIR)/common/Defs.gmk
 
 #
@@ -36,15 +38,29 @@
 	  $(INCLUDEDIR)/classfile_constants.h
 
 $(INCLUDEDIR)/%.h: $(SHARE_SRC)/javavm/export/%.h
-	$(install-file)
+	$(install-non-module-file)
 
 $(PLATFORM_INCLUDE)/%.h: $(PLATFORM_SRC)/javavm/export/%.h
+	$(install-non-module-file)
+
+JVMCFG = $(LIBDIR)/$(LIBARCH)/jvm.cfg
+
+#
+# How to install jvm.cfg.
+#
+ifeq ($(ZERO_BUILD), true)
+JVMCFG_ARCH = zero
+else
+JVMCFG_ARCH = $(ARCH)
+endif
+
+$(JVMCFG): $(PLATFORM_SRC)/bin/$(JVMCFG_ARCH)/jvm.cfg
 	$(install-file)
 
 all: build
 
-build: $(FILES_h)
+build: $(FILES_h) $(JVMCFG)
 
 clean clobber:: 
-	$(RM) $(FILES_h)
+	$(RM) $(FILES_h) $(JVMCFG)
 
--- a/jdk/make/java/logging/Makefile	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/make/java/logging/Makefile	Fri Jan 15 15:36:54 2010 -0800
@@ -24,6 +24,7 @@
 #
 
 BUILDDIR = ../..
+MODULE  = logging
 PACKAGE = java.util.logging
 PRODUCT = java
 include $(BUILDDIR)/common/Defs.gmk
--- a/jdk/make/java/main/java/Makefile	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/make/java/main/java/Makefile	Fri Jan 15 15:36:54 2010 -0800
@@ -24,6 +24,7 @@
 #
 
 BUILDDIR = ../../..
+MODULE  = base
 PROGRAM = java
 PRODUCT = java
 
--- a/jdk/make/java/main/javaw/Makefile	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/make/java/main/javaw/Makefile	Fri Jan 15 15:36:54 2010 -0800
@@ -28,6 +28,7 @@
 #
 
 BUILDDIR = ../../..
+MODULE  = base
 PROGRAM = javaw
 PRODUCT = java
 
--- a/jdk/make/java/management/Makefile	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/make/java/management/Makefile	Fri Jan 15 15:36:54 2010 -0800
@@ -24,6 +24,7 @@
 #
 
 BUILDDIR = ../..
+MODULE  = management
 PACKAGE = java.lang.management
 LIBRARY = management
 PRODUCT = java
@@ -99,7 +100,7 @@
 	@$(java-vm-cleanup)
 
 $(TEMPDIR)/manifest: $(MANIFEST)
-	$(install-file)
+	$(install-manifest-file)
 
 build: $(AGENTJAR)
 
--- a/jdk/make/java/net/Makefile	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/make/java/net/Makefile	Fri Jan 15 15:36:54 2010 -0800
@@ -24,6 +24,7 @@
 #
 
 BUILDDIR = ../..
+MODULE  = base
 PACKAGE = java.net
 LIBRARY = net
 PRODUCT = sun
@@ -111,8 +112,7 @@
 MISC_FILES = $(LIBDIR) $(LIBDIR)/net.properties
 
 $(LIBDIR)/net.properties: $(SHARE_SRC)/lib/net.properties
-	@$(RM) $@
-	$(CP) $< $@
+	$(install-file)
 
 # 
 # SDP configuration template
--- a/jdk/make/java/nio/Makefile	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/make/java/nio/Makefile	Fri Jan 15 15:36:54 2010 -0800
@@ -28,6 +28,7 @@
 #
 
 BUILDDIR = ../..
+MODULE  = nio
 PACKAGE = java.nio
 LIBRARY = nio
 PRODUCT = java
@@ -816,7 +817,7 @@
 	$(NAWK) '/^.*Copyright.*Sun/ { print $$3 }') 
 
 $(TEMPDIR)/$(GENSOR_SRC) : $(GENSOR_SRC)
-	$(install-file)
+	$(install-non-module-file)
 
 $(GENSOR_EXE) : $(TEMPDIR)/$(GENSOR_SRC)
 	$(prep-target)
--- a/jdk/make/java/npt/Makefile	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/make/java/npt/Makefile	Fri Jan 15 15:36:54 2010 -0800
@@ -24,6 +24,9 @@
 #
 
 BUILDDIR = ../..
+
+# It's currently used by jpda and hprof.  Put it in base module for now.
+MODULE  = base
 LIBRARY = npt
 PRODUCT = sun
 LIBRARY_OUTPUT = npt
--- a/jdk/make/java/redist/FILES.gmk	Fri Jan 15 09:06:57 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,56 +0,0 @@
-#
-# Copyright 1998-2003 Sun Microsystems, Inc.  All Rights Reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.  Sun designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
-# CA 95054 USA or visit www.sun.com if you need additional information or
-# have any questions.
-#
-
-#
-# List of lucida font files that we redistribute.
-#
-
-SHARED_FONTFILES =					\
-	$(LIBDIR)/fonts/LucidaTypewriterRegular.ttf	\
-	$(LIBDIR)/fonts/LucidaTypewriterBold.ttf        \
-	$(LIBDIR)/fonts/LucidaBrightRegular.ttf         \
-	$(LIBDIR)/fonts/LucidaBrightDemiBold.ttf        \
-	$(LIBDIR)/fonts/LucidaBrightItalic.ttf          \
-	$(LIBDIR)/fonts/LucidaBrightDemiItalic.ttf	\
-	$(LIBDIR)/fonts/LucidaSansRegular.ttf       	\
-	$(LIBDIR)/fonts/LucidaSansDemiBold.ttf       	\
-
-ifeq ($(PLATFORM), linux)
-
-# The oblique versions of the font are derived from the base versions
-# and since 2D can do this derivation on the fly at run time there is no
-# need to redistribute the fonts. An exception to this is on Linux.
-# The reason is that the Lucidas are specified in the font.properties files
-# on Linux, and so AWT/Motif components expect to be able to ask the Xserver
-# for these oblique fonts, but the Xserver cannot do the same derivation as
-# 2D can.
-
-OBLIQUE_FONTFILES =                                             \
-	$(LIBDIR)/oblique-fonts/LucidaTypewriterOblique.ttf     \
-	$(LIBDIR)/oblique-fonts/LucidaTypewriterBoldOblique.ttf \
-	$(LIBDIR)/oblique-fonts/LucidaSansOblique.ttf       	\
-	$(LIBDIR)/oblique-fonts/LucidaSansDemiOblique.ttf       \
-
-endif
--- a/jdk/make/java/redist/Makefile	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/make/java/redist/Makefile	Fri Jan 15 15:36:54 2010 -0800
@@ -35,6 +35,7 @@
 # 
 
 BUILDDIR = ../..
+MODULE   = base
 PRODUCT  = java
 include $(BUILDDIR)/common/Defs.gmk
 
@@ -61,7 +62,11 @@
 # Needed to do file copy
 ABS_BUILDDIR :=$(call FullPath,$(BUILDDIR))
 
-all: build
+SUBDIRS = fonts sajdi
+all clean clobber::
+	$(SUBDIRS-loop)
+
+all:: build
 
 # List of files created here or coming from BUILDDIR area (this workspace)
 INTERNAL_IMPORT_LIST = $(LIBDIR)/classlist
@@ -70,30 +75,6 @@
 IMPORT_LIST = $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVM_NAME) \
               $(LIB_LOCATION)/$(SERVER_LOCATION)/Xusage.txt
 
-# INCLUDE_SA is false on platforms where SA is not supported.
-# On platforms where it is supported, we want to allow it to
-# not be present, at least temporarily.  So,
-# if the SA files (well, just sa-jdi.jar) do not exist 
-# in the HOTSPOT_IMPORT_PATH, then we won't build SA.
-SA_EXISTS := $(shell if [ -r $(HOTSPOT_IMPORT_PATH)/lib/sa-jdi.jar ] ; then \
-                          $(ECHO) true; \
-                        else \
-                          $(ECHO) false; \
-                        fi)
-
-ifeq ($(SA_EXISTS), false)
-  INCLUDE_SA := false
-endif
-
-ifeq ($(INCLUDE_SA), true)
-  IMPORT_LIST += $(LIBDIR)/sa-jdi.jar \
-                 $(LIB_LOCATION)/$(SALIB_NAME)
-  ifeq ($(PLATFORM), windows)
-    IMPORT_LIST += $(LIB_LOCATION)/$(SAMAP_NAME) \
-                   $(LIB_LOCATION)/$(SAPDB_NAME)
-  endif
-endif # INCLUDE_SA
-
 # Hotspot client is only available on 32-bit non-Zero builds
 ifneq ($(ZERO_BUILD), true)
 ifeq ($(ARCH_DATA_MODEL), 32)
@@ -110,10 +91,10 @@
 # NOTE: These might actually come from BUILDDIR, depends on the settings.
 $(BINDIR)/msvcrt.dll: $(MSVCRT_DLL_PATH)/msvcrt.dll
 	$(install-import-file)
-	$(CHMOD) a+x $@
+	$(call chmod-file, a+x)
 $(BINDIR)/$(MSVCRNN_DLL): $(MSVCRNN_DLL_PATH)/$(MSVCRNN_DLL)
 	$(install-import-file)
-	$(CHMOD) a+x $@
+	$(call chmod-file, a+x)
 
 # Get the hotspot .map and .pdb files for client and server
 IMPORT_LIST += \
@@ -140,26 +121,32 @@
 $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVMMAP_NAME):
 	@$(prep-target)
 	-$(CP) $(HOTSPOT_CLIENT_PATH)/$(JVMMAP_NAME)  $@
+	@$(install-module-file)
 
 $(LIB_LOCATION)/$(KERNEL_LOCATION)/$(JVMMAP_NAME):
 	@$(prep-target)
 	-$(CP) $(HOTSPOT_KERNEL_PATH)/$(JVMMAP_NAME)  $@
+	@$(install-module-file)
 
 $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMMAP_NAME):
 	@$(prep-target)
 	-$(CP) $(HOTSPOT_SERVER_PATH)/$(JVMMAP_NAME) $@
+	@$(install-module-file)
 
 $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVMPDB_NAME):
 	@$(prep-target)
 	-$(CP) $(HOTSPOT_CLIENT_PATH)/$(JVMPDB_NAME)  $@
+	@$(install-module-file)
 
 $(LIB_LOCATION)/$(KERNEL_LOCATION)/$(JVMPDB_NAME):
 	@$(prep-target)
 	-$(CP) $(HOTSPOT_KERNEL_PATH)/$(JVMPDB_NAME)  $@
+	@$(install-module-file)
 
 $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMPDB_NAME): 
 	@$(prep-target)
 	-$(CP) $(HOTSPOT_SERVER_PATH)/$(JVMPDB_NAME) $@
+	@$(install-module-file)
 
 #  Windows     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  Windows
 else # PLATFORM
@@ -220,7 +207,7 @@
 $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(LIBJSIG_NAME) \
 $(LIB_LOCATION)/$(SERVER_LOCATION)/$(LIBJSIG_NAME):
 	@$(prep-target)
-	$(LN) -s ../$(LIBJSIG_NAME) $@
+	$(call install-sym-link, ../$(LIBJSIG_NAME))
 
 $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVMDB_NAME): $(HOTSPOT_CLIENT_PATH)/$(JVMDB_NAME)
 	$(install-import-file)
@@ -246,28 +233,6 @@
 $(LIB_LOCATION)/$(KERNEL_LOCATION)/Xusage.txt : $(HOTSPOT_KERNEL_PATH)/Xusage.txt
 	$(install-file)
 
-ifeq ($(INCLUDE_SA), true)
-# The Serviceability Agent is built in the Hotspot workspace.
-# It contains two files:
-#  - sa-jdi.jar:  This goes into the same dir as tools.jar.
-#  - a shared library:  sawindbg.dll on windows / libproc.sa on unix
-#		        This goes into the same dir as the other
-#			shared libs, eg. libjdwp.so.
-$(LIBDIR)/sa-jdi.jar: $(HOTSPOT_IMPORT_PATH)/lib/sa-jdi.jar
-	$(install-import-file)
-
-$(LIB_LOCATION)/$(SALIB_NAME): $(HOTSPOT_SALIB_PATH)/$(SALIB_NAME)
-	$(install-import-file)
-
-ifeq ($(PLATFORM), windows)
-$(LIB_LOCATION)/$(SAPDB_NAME): $(HOTSPOT_SALIB_PATH)/$(SAPDB_NAME)
-	$(install-import-file)
-
-$(LIB_LOCATION)/$(SAMAP_NAME): $(HOTSPOT_SALIB_PATH)/$(SAMAP_NAME)
-	$(install-import-file)
-endif # windows
-endif # INCLUDE_SA
-
 #
 # Specific to OpenJDK building
 #
@@ -288,7 +253,7 @@
 
 $(LIBDIR)/jce.jar: \
 	    $(BUILDDIR)/closed/tools/crypto/jce/jce.jar
-	$(install-file)
+	$(install-non-module-file)
 $(LIBDIR)/security/US_export_policy.jar: \
 	    $(BUILDDIR)/closed/tools/crypto/jce/US_export_policy.jar
 	$(install-file)
@@ -310,46 +275,6 @@
 	    $(CLASSSHARINGDATA_DIR)/classlist.$(PLATFORM) $@.temp
 	$(MV) $@.temp $@
 
-ifndef OPENJDK
-
-# Lucida font files are not included in the OpenJDK distribution.
-# Get names of font files
-include FILES.gmk
-
-# Copy font files into OUTPUTDIR area
-
-FONTFILES = $(SHARED_FONTFILES)
-FONTSDIR  = $(LIBDIR)/fonts
-FONTSDIRFILE  = $(FONTSDIR)/fonts.dir
-INTERNAL_IMPORT_LIST += $(FONTFILES) 
-
-ifneq ($(PLATFORM), windows)
-  INTERNAL_IMPORT_LIST += $(FONTSDIRFILE)
-endif
-
-$(LIBDIR)/fonts/%.ttf: $(CLOSED_SRC)/share/lib/fonts/%.ttf
-	$(install-file)
-
-$(FONTSDIRFILE): $(PLATFORM_SRC)/classes/sun/awt/motif/java.fonts.dir
-	$(install-file)
-
-ifeq ($(PLATFORM), linux)
-
-# The oblique fonts are only needed/wanted on Linux.
-
-OBLFONTSDIR  = $(LIBDIR)/oblique-fonts
-OBLFONTSDIRFILE	 = $(OBLFONTSDIR)/fonts.dir
-INTERNAL_IMPORT_LIST += $(OBLIQUE_FONTFILES) $(OBLFONTSDIRFILE)
-
-$(LIBDIR)/oblique-fonts/%.ttf: $(CLOSED_SRC)/share/lib/fonts/oblique/%.ttf
-	$(install-file)
-
-$(OBLFONTSDIRFILE): $(PLATFORM_SRC)/classes/sun/awt/motif/java.oblique-fonts.dir
-	$(install-file)
-
-endif # linux
-endif # !OPENJDK
-
 # Import internal files (ones that are stashed in this source tree)
 import_internal_files : $(INTERNAL_IMPORT_LIST)
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/make/java/redist/fonts/Makefile	Fri Jan 15 15:36:54 2010 -0800
@@ -0,0 +1,111 @@
+#
+# Copyright 2009 Sun Microsystems, Inc.  All Rights Reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation.  Sun designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+# CA 95054 USA or visit www.sun.com if you need additional information or
+# have any questions.
+#
+
+BUILDDIR = ../../..
+MODULE   = font
+PRODUCT  = java
+include $(BUILDDIR)/common/Defs.gmk
+
+
+#
+# List of lucida font files that we redistribute.
+#
+
+SHARED_FONTFILES =					\
+	$(LIBDIR)/fonts/LucidaTypewriterRegular.ttf	\
+	$(LIBDIR)/fonts/LucidaTypewriterBold.ttf        \
+	$(LIBDIR)/fonts/LucidaBrightRegular.ttf         \
+	$(LIBDIR)/fonts/LucidaBrightDemiBold.ttf        \
+	$(LIBDIR)/fonts/LucidaBrightItalic.ttf          \
+	$(LIBDIR)/fonts/LucidaBrightDemiItalic.ttf	\
+	$(LIBDIR)/fonts/LucidaSansRegular.ttf       	\
+	$(LIBDIR)/fonts/LucidaSansDemiBold.ttf       	\
+
+ifeq ($(PLATFORM), linux)
+
+# The oblique versions of the font are derived from the base versions
+# and since 2D can do this derivation on the fly at run time there is no
+# need to redistribute the fonts. An exception to this is on Linux.
+# The reason is that the Lucidas are specified in the font.properties files
+# on Linux, and so AWT/Motif components expect to be able to ask the Xserver
+# for these oblique fonts, but the Xserver cannot do the same derivation as
+# 2D can.
+
+OBLIQUE_FONTFILES =                                             \
+	$(LIBDIR)/oblique-fonts/LucidaTypewriterOblique.ttf     \
+	$(LIBDIR)/oblique-fonts/LucidaTypewriterBoldOblique.ttf \
+	$(LIBDIR)/oblique-fonts/LucidaSansOblique.ttf       	\
+	$(LIBDIR)/oblique-fonts/LucidaSansDemiOblique.ttf       \
+
+endif
+
+ifndef OPENJDK
+
+# Lucida font files are not included in the OpenJDK distribution.
+# Get names of font files
+
+# Copy font files into OUTPUTDIR area
+
+FONTFILES = $(SHARED_FONTFILES)
+FONTSDIR  = $(LIBDIR)/fonts
+FONTSDIRFILE  = $(FONTSDIR)/fonts.dir
+INTERNAL_IMPORT_LIST = $(FONTFILES) 
+
+ifneq ($(PLATFORM), windows)
+  INTERNAL_IMPORT_LIST += $(FONTSDIRFILE)
+endif
+
+$(LIBDIR)/fonts/%.ttf: $(CLOSED_SRC)/share/lib/fonts/%.ttf
+	$(install-file)
+
+$(FONTSDIRFILE): $(PLATFORM_SRC)/classes/sun/awt/motif/java.fonts.dir
+	$(install-file)
+
+ifeq ($(PLATFORM), linux)
+
+# The oblique fonts are only needed/wanted on Linux.
+
+OBLFONTSDIR  = $(LIBDIR)/oblique-fonts
+OBLFONTSDIRFILE	 = $(OBLFONTSDIR)/fonts.dir
+INTERNAL_IMPORT_LIST += $(OBLIQUE_FONTFILES) $(OBLFONTSDIRFILE)
+
+$(LIBDIR)/oblique-fonts/%.ttf: $(CLOSED_SRC)/share/lib/fonts/oblique/%.ttf
+	$(install-file)
+
+$(OBLFONTSDIRFILE): $(PLATFORM_SRC)/classes/sun/awt/motif/java.oblique-fonts.dir
+	$(install-file)
+
+endif # linux
+
+all build : $(INTERNAL_IMPORT_LIST)
+
+clean clobber::
+	$(RM) $(INTERNAL_IMPORT_LIST)
+
+else 
+
+all build clean clobber :
+
+endif # !OPENJDK
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/make/java/redist/sajdi/Makefile	Fri Jan 15 15:36:54 2010 -0800
@@ -0,0 +1,87 @@
+#
+# Copyright 1997-2009 Sun Microsystems, Inc.  All Rights Reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation.  Sun designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+# CA 95054 USA or visit www.sun.com if you need additional information or
+# have any questions.
+#
+
+BUILDDIR = ../../..
+MODULE   = sajdi
+PRODUCT  = java
+include $(BUILDDIR)/common/Defs.gmk
+
+ifeq ($(PLATFORM), windows)
+  LIB_LOCATION = $(BINDIR)
+else
+  LIB_LOCATION = $(LIBDIR)/$(LIBARCH)
+endif
+
+# INCLUDE_SA is false on platforms where SA is not supported.
+# On platforms where it is supported, we want to allow it to
+# not be present, at least temporarily.  So,
+# if the SA files (well, just sa-jdi.jar) do not exist
+# in the HOTSPOT_IMPORT_PATH, then we won't build SA.
+SA_EXISTS := $(shell if [ -r $(HOTSPOT_IMPORT_PATH)/lib/sa-jdi.jar ] ; then \
+                          $(ECHO) true; \
+                        else \
+                          $(ECHO) false; \
+                        fi)
+
+ifeq ($(SA_EXISTS), false)
+  INCLUDE_SA := false
+endif
+
+IMPORT_LIST =
+ifeq ($(INCLUDE_SA), true)
+  IMPORT_LIST += $(LIBDIR)/sa-jdi.jar \
+                 $(LIB_LOCATION)/$(SALIB_NAME)
+  ifeq ($(PLATFORM), windows)
+    IMPORT_LIST += $(LIB_LOCATION)/$(SAMAP_NAME) \
+                   $(LIB_LOCATION)/$(SAPDB_NAME)
+  endif
+endif # INCLUDE_SA
+
+
+ifeq ($(INCLUDE_SA), true)
+# The Serviceability Agent is built in the Hotspot workspace.
+# It contains two files:
+#  - sa-jdi.jar:  This goes into the same dir as tools.jar.
+#  - a shared library:  sawindbg.dll on windows / libproc.sa on unix
+#		        This goes into the same dir as the other
+#			shared libs, eg. libjdwp.so.
+$(LIBDIR)/sa-jdi.jar: $(HOTSPOT_IMPORT_PATH)/lib/sa-jdi.jar
+	$(install-importonly-file)
+
+$(LIB_LOCATION)/$(SALIB_NAME): $(HOTSPOT_SALIB_PATH)/$(SALIB_NAME)
+	$(install-import-file)
+
+ifeq ($(PLATFORM), windows)
+$(LIB_LOCATION)/$(SAPDB_NAME): $(HOTSPOT_SALIB_PATH)/$(SAPDB_NAME)
+	$(install-import-file)
+
+$(LIB_LOCATION)/$(SAMAP_NAME): $(HOTSPOT_SALIB_PATH)/$(SAMAP_NAME)
+	$(install-import-file)
+endif # windows
+endif # INCLUDE_SA
+
+all: $(IMPORT_LIST)
+
+clean clobber::
--- a/jdk/make/java/security/Makefile	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/make/java/security/Makefile	Fri Jan 15 15:36:54 2010 -0800
@@ -24,6 +24,7 @@
 #
 
 BUILDDIR = ../..
+MODULE  = base
 PACKAGE = java.security
 PRODUCT = sun
 include $(BUILDDIR)/common/Defs.gmk
@@ -38,11 +39,9 @@
 #
 
 PROPS_SRC   = $(TOPDIR)/src/share/lib/security/java.security
-SUNPKCS11   =
 
 ifeq ($(PLATFORM), solaris)
 PROPS_SRC   = $(TOPDIR)/src/share/lib/security/java.security-solaris
-SUNPKCS11   = sunpkcs11
 
 else # PLATFORM
 
@@ -57,9 +56,6 @@
 
 PROPS_BUILD = $(LIBDIR)/security/java.security
 
-SUNPKCS11_SRC   = $(TOPDIR)/src/share/lib/security/sunpkcs11-solaris.cfg
-SUNPKCS11_BUILD = $(LIBDIR)/security/sunpkcs11-solaris.cfg
-
 POLICY_SRC =	$(TOPDIR)/src/share/lib/security/java.policy
 POLICY_BUILD = $(LIBDIR)/security/java.policy
 
@@ -73,14 +69,12 @@
 #
 include $(BUILDDIR)/common/Rules.gmk
 
-build: properties $(SUNPKCS11) policy cacerts
+build: properties policy cacerts
 
 install: all
 
 properties: classes  $(PROPS_BUILD)
 
-sunpkcs11: classes $(SUNPKCS11_BUILD)
-
 policy: classes  $(POLICY_BUILD)
 
 cacerts: classes $(CACERTS_BUILD)
@@ -88,9 +82,6 @@
 $(PROPS_BUILD): $(PROPS_SRC)
 	$(install-file)
 
-$(SUNPKCS11_BUILD): $(SUNPKCS11_SRC)
-	$(install-file)
-
 $(POLICY_BUILD): $(POLICY_SRC)
 	$(install-file)
 
@@ -99,7 +90,7 @@
 
 clean clobber:: .delete.classlist
 	$(RM) -r $(CLASSBINDIR)/java/security
-	$(RM) $(PROPS_BUILD) $(POLICY_BUILD) $(CACERTS_BUILD) $(SUNPKCS11_BUILD)
+	$(RM) $(PROPS_BUILD) $(POLICY_BUILD) $(CACERTS_BUILD)
 
 # Additional Rule for building sun.security.util
 $(CLASSBINDIR)/%.class: $(SHARE_SRC)/sun/%.java
--- a/jdk/make/java/sql/Makefile	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/make/java/sql/Makefile	Fri Jan 15 15:36:54 2010 -0800
@@ -28,6 +28,7 @@
 #
 
 BUILDDIR = ../..
+MODULE  = jdbc-base
 PACKAGE = java.sql
 PRODUCT = sun
 include $(BUILDDIR)/common/Defs.gmk
--- a/jdk/make/java/text/Makefile	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/make/java/text/Makefile	Fri Jan 15 15:36:54 2010 -0800
@@ -24,7 +24,7 @@
 #
 
 BUILDDIR = ../..
-
+MODULE  = base
 PACKAGE = java.text
 PRODUCT = sun
 
--- a/jdk/make/java/verify/Makefile	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/make/java/verify/Makefile	Fri Jan 15 15:36:54 2010 -0800
@@ -28,6 +28,7 @@
 #
 
 BUILDDIR = ../..
+MODULE  = base
 PRODUCT = java
 LIBRARY = verify
 include $(BUILDDIR)/common/Defs.gmk
--- a/jdk/make/java/zip/Makefile	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/make/java/zip/Makefile	Fri Jan 15 15:36:54 2010 -0800
@@ -25,6 +25,7 @@
 
 
 BUILDDIR = ../..
+MODULE  = base
 PACKAGE = java.util.zip
 LIBRARY = zip
 PRODUCT = sun
--- a/jdk/make/javax/crypto/Makefile	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/make/javax/crypto/Makefile	Fri Jan 15 15:36:54 2010 -0800
@@ -108,6 +108,7 @@
 #
 
 BUILDDIR = ../..
+MODULE  = base
 PACKAGE = javax.crypto
 PRODUCT = sun
 
@@ -293,7 +294,7 @@
 
 $(UNSIGNED_POLICY_BUILDDIR)/limited/US_export_policy.jar:		\
 	    $(UNSIGNED_POLICY_BUILDDIR)/unlimited/US_export_policy.jar
-	$(install-file)
+	$(install-non-module-file)
 
 $(UNSIGNED_POLICY_BUILDDIR)/limited/local_policy.jar:			\
 	    policy/limited/default_local.policy				\
@@ -414,7 +415,7 @@
 else
 $(JAR_DESTFILE): $(SIGNED_DIR)/jce.jar
 endif
-	$(install-file)
+	$(install-non-module-file)
 
 #
 # Install the appropriate policy file, depending on the type of build.
@@ -425,7 +426,7 @@
 INSTALL_POLICYDIR = $(SIGNED_POLICY_BUILDDIR)
 endif
 
-install-limited: \
+install-limited-jars: \
 	    $(INSTALL_POLICYDIR)/limited/US_export_policy.jar	\
 	    $(INSTALL_POLICYDIR)/limited/local_policy.jar
 	$(MKDIR) -p $(POLICY_DESTDIR)
@@ -433,24 +434,28 @@
 	    $(POLICY_DESTDIR)/US_export_policy.jar		\
 	    $(POLICY_DESTDIR)/local_policy.jar
 	$(CP) $^ $(POLICY_DESTDIR)
+
+install-limited: install-limited-jars install-module-files
 ifndef OPENJDK
 	$(release-warning)
 endif
 
-install-unlimited: \
+install-unlimited-jars: \
 	    $(INSTALL_POLICYDIR)/unlimited/US_export_policy.jar	\
-	    $(INSTALL_POLICYDIR)/unlimited/local_policy.jar
+	    $(INSTALL_POLICYDIR)/unlimited/local_policy.jar 
 	$(MKDIR) -p $(POLICY_DESTDIR)
 	$(RM) \
 	    $(POLICY_DESTDIR)/US_export_policy.jar		\
 	    $(POLICY_DESTDIR)/local_policy.jar
 	$(CP) $^ $(POLICY_DESTDIR)
+
+install-unlimited: install-unlimited-jars install-module-files
 ifndef OPENJDK
 	$(release-warning)
 endif
 
 ifndef OPENJDK
-install-prebuilt:
+install-prebuilt-jars:
 	@$(ECHO) "\n>>>Installing prebuilt JCE framework..."
 	$(RM) $(JAR_DESTFILE) \
 	    $(POLICY_DESTDIR)/US_export_policy.jar \
@@ -460,8 +465,16 @@
 	    $(PREBUILT_DIR)/jce/US_export_policy.jar \
 	    $(PREBUILT_DIR)/jce/local_policy.jar \
 	    $(POLICY_DESTDIR)
+
+install-prebuilt: install-prebuilt-jars install-module-files
 endif
 
+install-module-files: \
+	   $(POLICY_DESTDIR)/US_export_policy.jar \
+	   $(POLICY_DESTDIR)/local_policy.jar
+
+$(POLICY_DESTDIR)/%.jar :
+	$(install-module-file)
 
 # =====================================================
 # Support routines.
--- a/jdk/make/javax/imageio/Makefile	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/make/javax/imageio/Makefile	Fri Jan 15 15:36:54 2010 -0800
@@ -28,6 +28,7 @@
 #
 
 BUILDDIR = ../..
+MODULE  = imageio
 PACKAGE = javax.imageio
 PRODUCT = jiio
 include $(BUILDDIR)/common/Defs.gmk
--- a/jdk/make/javax/print/Makefile	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/make/javax/print/Makefile	Fri Jan 15 15:36:54 2010 -0800
@@ -28,6 +28,7 @@
 #
 
 BUILDDIR = ../..
+MODULE  = print
 PACKAGE = javax.print
 PRODUCT = sun
 include $(BUILDDIR)/common/Defs.gmk
--- a/jdk/make/javax/sound/Makefile	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/make/javax/sound/Makefile	Fri Jan 15 15:36:54 2010 -0800
@@ -26,6 +26,7 @@
 # WARNING: Make sure the OPENJDK plugs are up-to-date, see make/common/internal/BinaryPlugs.gmk
 
 BUILDDIR = ../..
+MODULE  = sound
 PACKAGE = javax.sound
 LIBRARY = jsound
 PRODUCT = sun
--- a/jdk/make/javax/sound/jsoundalsa/Makefile	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/make/javax/sound/jsoundalsa/Makefile	Fri Jan 15 15:36:54 2010 -0800
@@ -24,6 +24,7 @@
 #
 
 BUILDDIR = ../../..
+MODULE  = sound
 PACKAGE = javax.sound
 LIBRARY = jsoundalsa
 PRODUCT = sun
--- a/jdk/make/javax/sound/jsoundds/Makefile	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/make/javax/sound/jsoundds/Makefile	Fri Jan 15 15:36:54 2010 -0800
@@ -24,6 +24,7 @@
 #
 
 BUILDDIR = ../../..
+MODULE  = sound
 PACKAGE = javax.sound
 LIBRARY = jsoundds
 PRODUCT = sun
--- a/jdk/make/javax/sql/Makefile	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/make/javax/sql/Makefile	Fri Jan 15 15:36:54 2010 -0800
@@ -28,6 +28,7 @@
 #
 
 BUILDDIR = ../..
+MODULE  = jdbc-enterprise
 PACKAGE = javax.sql
 PRODUCT = sun
 include $(BUILDDIR)/common/Defs.gmk
--- a/jdk/make/javax/swing/Makefile	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/make/javax/swing/Makefile	Fri Jan 15 15:36:54 2010 -0800
@@ -24,6 +24,7 @@
 #
 
 BUILDDIR  = ../..
+MODULE    = swing
 PACKAGE   = javax.swing
 PRODUCT   = com
 SWING_SRC = $(SHARE_SRC)/classes/javax/swing
--- a/jdk/make/javax/swing/plaf/Makefile	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/make/javax/swing/plaf/Makefile	Fri Jan 15 15:36:54 2010 -0800
@@ -24,6 +24,7 @@
 #
 
 BUILDDIR  = ../../..
+MODULE    = swing
 PACKAGE   = javax.swing.plaf
 PRODUCT   = com
 SWING_SRC = $(SHARE_SRC)/classes/javax/swing
--- a/jdk/make/jpda/back/Makefile	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/make/jpda/back/Makefile	Fri Jan 15 15:36:54 2010 -0800
@@ -28,6 +28,7 @@
 #
 
 BUILDDIR = ../..
+MODULE  = debugging
 LIBRARY = jdwp
 PRODUCT = jpda
 
--- a/jdk/make/jpda/transport/Makefile	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/make/jpda/transport/Makefile	Fri Jan 15 15:36:54 2010 -0800
@@ -28,6 +28,7 @@
 #
 
 BUILDDIR = ../..
+MODULE  = debugging
 PRODUCT = jpda
 include $(BUILDDIR)/common/Defs.gmk
 
--- a/jdk/make/jpda/transport/shmem/Makefile	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/make/jpda/transport/shmem/Makefile	Fri Jan 15 15:36:54 2010 -0800
@@ -28,6 +28,7 @@
 #
 
 BUILDDIR = ../../..
+MODULE   = debugging
 LIBRARY  = dt_shmem
 PRODUCT = jbug
 
--- a/jdk/make/jpda/transport/socket/Makefile	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/make/jpda/transport/socket/Makefile	Fri Jan 15 15:36:54 2010 -0800
@@ -28,6 +28,7 @@
 #
 
 BUILDDIR = ../../..
+MODULE  = debugging
 LIBRARY = dt_socket
 PRODUCT = jbug
 
--- a/jdk/make/jpda/tty/Makefile	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/make/jpda/tty/Makefile	Fri Jan 15 15:36:54 2010 -0800
@@ -28,6 +28,7 @@
 #
 
 BUILDDIR = ../..
+MODULE  = jdb
 PACKAGE = com.sun.tools.example.debug.tty
 PRODUCT = jpda
 PROGRAM = jdb
--- a/jdk/make/launchers/Makefile	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/make/launchers/Makefile	Fri Jan 15 15:36:54 2010 -0800
@@ -28,33 +28,23 @@
 #
 
 BUILDDIR = ..
+MODULE  = tools
 PACKAGE = launchers
 PRODUCT = sun
 include $(BUILDDIR)/common/Defs.gmk
 
-# Run MAKE $@ for a launcher: 
+# Run MAKE $@ for a launcher for the corba module:
 #   $(call make-launcher, name, mainclass, java-args, main-args)
-define make-launcher
+define make-corba-launcher
+$(CD) $(BUILDDIR)/launchers && \
 $(MAKE) -f Makefile.launcher \
-	PROGRAM=$(strip $1) \
-	MAIN_CLASS=$(strip $2) \
-	MAIN_JAVA_ARGS="$(strip $3)" \
-	MAIN_ARGS="$(strip $4)" $@
+        MODULE=corba \
+        PROGRAM=$(strip $1) \
+        MAIN_CLASS=$(strip $2) \
+        MAIN_JAVA_ARGS="$(strip $3)" \
+        MAIN_ARGS="$(strip $4)"
 endef
 
-# Run MAKE $@ for all launchers
-ifeq ($(PLATFORM),windows)
-# Run MAKE $@ for all platform specific launchers
-define make-platform-specific-launchers
-$(call make-launcher, kinit, sun.security.krb5.internal.tools.Kinit, , )
-$(call make-launcher, klist, sun.security.krb5.internal.tools.Klist, , )
-$(call make-launcher, ktab, sun.security.krb5.internal.tools.Ktab, , )
-endef
-else
-# Run MAKE $@ for all platform specific launchers
-define make-platform-specific-launchers
-endef
-endif
 # Run MAKE $@ for all generic launchers
 define make-all-launchers
 $(call make-launcher, appletviewer, sun.applet.Main, , )
@@ -85,36 +75,29 @@
   -J-Dsun.jvm.hotspot.debugger.useWindbgDebugger, )
 $(call make-launcher, jstat, sun.tools.jstat.Jstat, , )
 $(call make-launcher, jstatd, sun.tools.jstatd.Jstatd, , )
-$(call make-launcher, keytool, sun.security.tools.KeyTool, , )
 $(call make-launcher, native2ascii, sun.tools.native2ascii.Main, , )
-$(call make-launcher, orbd, com.sun.corba.se.impl.activation.ORBD, \
+$(call make-launcher, rmic, sun.rmi.rmic.Main, , )
+$(call make-launcher, schemagen, com.sun.tools.internal.jxc.SchemaGenerator, , )
+$(call make-launcher, serialver, sun.tools.serialver.SerialVer, , )
+$(call make-launcher, xjc, com.sun.tools.internal.xjc.Driver, , )
+$(call make-launcher, wsgen, com.sun.tools.internal.ws.WsGen, , )
+$(call make-launcher, wsimport, com.sun.tools.internal.ws.WsImport, , )
+$(call make-corba-launcher, orbd, com.sun.corba.se.impl.activation.ORBD, \
   -J-Dcom.sun.CORBA.activation.DbDir=./orb.db \
   -J-Dcom.sun.CORBA.activation.Port=1049 \
   -J-Dcom.sun.CORBA.POA.ORBServerId=1, )
-$(call make-launcher, pack200, com.sun.java.util.jar.pack.Driver, , --pack)
-$(call make-launcher, policytool, sun.security.tools.PolicyTool, , )
-$(call make-launcher, rmic, sun.rmi.rmic.Main, , )
-$(call make-launcher, rmid, sun.rmi.server.Activation, , )
-$(call make-launcher, rmiregistry, sun.rmi.registry.RegistryImpl, , )
-$(call make-launcher, schemagen, com.sun.tools.internal.jxc.SchemaGenerator, , )
-$(call make-launcher, serialver, sun.tools.serialver.SerialVer, , )
-$(call make-launcher, servertool, com.sun.corba.se.impl.activation.ServerTool, , )
-$(call make-launcher, tnameserv, com.sun.corba.se.impl.naming.cosnaming.TransientNameServer, \
+$(call make-corba-launcher, servertool, com.sun.corba.se.impl.activation.ServerTool, , )
+$(call make-corba-launcher, tnameserv, com.sun.corba.se.impl.naming.cosnaming.TransientNameServer, \
   -J-Dcom.sun.CORBA.activation.DbDir=./orb.db \
   -J-Djava.util.logging.LoggingPermission=contol \
   -J-Dcom.sun.CORBA.POA.ORBServerId=1, )
-$(call make-launcher, wsgen, com.sun.tools.internal.ws.WsGen, , )
-$(call make-launcher, wsimport, com.sun.tools.internal.ws.WsImport, , )
-$(call make-launcher, xjc, com.sun.tools.internal.xjc.Driver, , )
 endef
 
 build:
 	$(make-all-launchers)
-	$(make-platform-specific-launchers)
 
 clean clobber::
 	$(make-all-launchers)
-	$(make-platform-specific-launchers)
 
 include $(BUILDDIR)/common/Rules.gmk
 
--- a/jdk/make/mkdemo/jvmti/Makefile	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/make/mkdemo/jvmti/Makefile	Fri Jan 15 15:36:54 2010 -0800
@@ -28,6 +28,7 @@
 #
 
 BUILDDIR = ../..
+MODULE  = demos
 PRODUCT = demos
 include $(BUILDDIR)/common/Defs.gmk
 
--- a/jdk/make/mkdemo/management/Makefile	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/make/mkdemo/management/Makefile	Fri Jan 15 15:36:54 2010 -0800
@@ -28,6 +28,7 @@
 #
 
 BUILDDIR = ../..
+MODULE  = demos
 PRODUCT = demos
 include $(BUILDDIR)/common/Defs.gmk
 
--- a/jdk/make/mksample/dtrace/Makefile	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/make/mksample/dtrace/Makefile	Fri Jan 15 15:36:54 2010 -0800
@@ -29,6 +29,7 @@
 
 BUILDDIR = ../..
 
+MODULE  = samples
 PRODUCT = java
 
 include $(BUILDDIR)/common/Defs.gmk
--- a/jdk/make/mksample/jmx/jmx-scandir/Makefile	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/make/mksample/jmx/jmx-scandir/Makefile	Fri Jan 15 15:36:54 2010 -0800
@@ -29,6 +29,7 @@
 
 BUILDDIR = ../../..
 
+MODULE  = samples
 PRODUCT = java
 
 include $(BUILDDIR)/common/Defs.gmk
--- a/jdk/make/mksample/nbproject/Makefile	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/make/mksample/nbproject/Makefile	Fri Jan 15 15:36:54 2010 -0800
@@ -29,6 +29,7 @@
 
 BUILDDIR = ../..
 
+MODULE  = samples
 PRODUCT = java
 
 include $(BUILDDIR)/common/Defs.gmk
--- a/jdk/make/mksample/nio/file/Makefile	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/make/mksample/nio/file/Makefile	Fri Jan 15 15:36:54 2010 -0800
@@ -29,6 +29,7 @@
 
 BUILDDIR = ../../..
 
+MODULE  = samples
 PRODUCT = java
 
 include $(BUILDDIR)/common/Defs.gmk
--- a/jdk/make/mksample/nio/multicast/Makefile	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/make/mksample/nio/multicast/Makefile	Fri Jan 15 15:36:54 2010 -0800
@@ -29,6 +29,7 @@
 
 BUILDDIR = ../../..
 
+MODULE  = samples
 PRODUCT = java
 
 include $(BUILDDIR)/common/Defs.gmk
--- a/jdk/make/mksample/nio/server/Makefile	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/make/mksample/nio/server/Makefile	Fri Jan 15 15:36:54 2010 -0800
@@ -29,6 +29,7 @@
 
 BUILDDIR = ../../..
 
+MODULE  = samples
 PRODUCT = java
 
 include $(BUILDDIR)/common/Defs.gmk
--- a/jdk/make/mksample/scripting/scriptpad/Makefile	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/make/mksample/scripting/scriptpad/Makefile	Fri Jan 15 15:36:54 2010 -0800
@@ -29,6 +29,7 @@
 
 BUILDDIR = ../../..
 
+MODULE  = samples
 PRODUCT = java
 
 include $(BUILDDIR)/common/Defs.gmk
--- a/jdk/make/mksample/webservices/EbayClient/Makefile	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/make/mksample/webservices/EbayClient/Makefile	Fri Jan 15 15:36:54 2010 -0800
@@ -29,6 +29,7 @@
 
 BUILDDIR = ../../..
 
+MODULE  = samples
 PRODUCT = java
 
 include $(BUILDDIR)/common/Defs.gmk
--- a/jdk/make/mksample/webservices/EbayServer/Makefile	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/make/mksample/webservices/EbayServer/Makefile	Fri Jan 15 15:36:54 2010 -0800
@@ -29,6 +29,7 @@
 
 BUILDDIR = ../../..
 
+MODULE  = samples
 PRODUCT = java
 
 include $(BUILDDIR)/common/Defs.gmk
--- a/jdk/make/modules/Makefile	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/make/modules/Makefile	Fri Jan 15 15:36:54 2010 -0800
@@ -40,32 +40,7 @@
 TMP=$(ABS_TEMPDIR)/modules
 MODULE_CLASSLIST = $(TMP)/classlist
 MODULE_CLASSES = $(TMP)/classes
-MODULE_LIST = $(MODULE_CLASSLIST)/modules.list
-
-# Modules in the modules/ext directory
-EXT_MODULES = localedata security-sunec security-sunjce
-
-# Build PKCS#11 on all platforms except 64-bit Windows.
-# We exclude windows-amd64 because we don't have any
-# 64-bit PKCS#11 implementations to test with on that platform.
-PKCS11 = security-sunpkcs11
-ifeq ($(ARCH_DATA_MODEL), 64)
-  ifeq ($(PLATFORM), windows)
-    PKCS11 =
-  endif
-endif
-
-EXT_MODULES += $(PKCS11)
-
-# Build Microsoft CryptoAPI provider only on (non-64-bit) Windows platform.
-ifeq ($(PLATFORM), windows)
-  ifneq ($(ARCH_DATA_MODEL), 64)
-    EXT_MODULES += security-sunmscapi
-  endif
-endif
-
-
-JDK_MODULES = tools
+MODULES_LIST = $(MODULE_CLASSLIST)/modules.list
 
 SUBDIRS = tools
 all build clean clobber::
@@ -76,7 +51,7 @@
 $(CLASSANALYZER_JAR):
 	$(CD) tools && $(MAKE) all
 
-JAR_LIST := $(shell $(FIND) $(ABS_OUTPUTDIR)/lib -name \*.jar -depth) 
+JAR_LIST := $(shell $(FIND) $(ABS_OUTPUTDIR)/lib -name \*.jar -print) 
 unpack-jars:
 	$(RM) -rf $(MODULE_CLASSES)
 	$(MKDIR) -p $(MODULE_CLASSES)
@@ -107,31 +82,29 @@
 modularize: $(MODULE_JAR_MANIFEST_FILE)
 	@$(ECHO) ">>>Making "$@" @ `$(DATE)` ..."
 	@$(RM) -rf $(MODULE_LIB)
-	@$(MKDIR) -p $(MODULE_LIB)/lib
-	@$(MKDIR) -p $(MODULE_LIB)/jre/lib/ext
 
-	@# create modules
-	for m in `$(NAWK) '{print $$1}' $(MODULE_LIST)` ; do \
+	@# create jar file for modules and
+	@# copy other files from all members of this module 
+	for m in `$(NAWK) '{print $$1}' $(MODULES_LIST)` ; do \
    	   $(ECHO) "Creating module $$m" ; \
    	   $(SED) -e 's%\\%\/%g' < $(MODULE_CLASSLIST)/$$m.classlist > $(TMP)/tmp.cf ; \
 	   if [ -f $(MODULE_CLASSLIST)/$$m.resources ] ; then \
    	       $(SED) -e 's%\\%\/%g' < $(MODULE_CLASSLIST)/$$m.resources >> $(TMP)/tmp.cf ; \
            fi ; \
+           $(MKDIR) -p $(MODULE_LIB)/$$m/lib; \
 	   $(CD) $(MODULE_CLASSES) && \
                $(BOOT_JAR_CMD) c0mf $(MODULE_JAR_MANIFEST_FILE) \
-		   $(MODULE_LIB)/$$m.jar \
-		   @$(TMP)/tmp.cf \
-                   $(BOOT_JAR_JFLAGS) ; \
-	done
+		   $(MODULE_LIB)/$$m/lib/$$m.jar \
+	           @$(TMP)/tmp.cf \
+                   $(BOOT_JAR_JFLAGS); \
+	   for s in `$(GREP) "^$$m" $(MODULES_LIST)` ; do \
+               if [ -d $(TMP)/$$s ] ; then \
+               	   $(CP) -rf $(TMP)/$$s/*  $(MODULE_LIB)/$$m; \
+		   $(RM) -rf $(MODULE_LIB)/$$m/classes; \
+	       fi \
+	   done \
+        done
 	@$(CD) $(MODULE_CLASSES) && $(java-vm-cleanup)
-	@# move modules to lib, jre/lib, or jre/lib/ext
-	for m in $(EXT_MODULES) ; do \
-	   $(MV) $(MODULE_LIB)/$$m.jar $(MODULE_LIB)/jre/lib/ext ; \
-	done
-	for m in $(JDK_MODULES) ; do \
-	   $(MV) $(MODULE_LIB)/$$m.jar $(MODULE_LIB)/lib ; \
-	done
-	$(MV) $(MODULE_LIB)/*.jar $(MODULE_LIB)/jre/lib
 	@$(ECHO) ">>>Finished making "$@" @ `$(DATE)` ..."
 
 $(MODULE_JAR_MANIFEST_FILE):
@@ -140,6 +113,5 @@
 clean clobber::
 	$(RM) -rf $(MODULE_CLASSLIST)
 	$(RM) -rf $(MODULE_LIB)
-	$(RM) -f $(MODULE_JAR_MANIFEST_FILE)
-	$(RM) -f $(CLASSANALYZER_JAR)
-
+	$(RM) $(MODULE_JAR_MANIFEST_FILE)
+	$(RM) $(CLASSANALYZER_JAR)
--- a/jdk/make/modules/modules.config	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/make/modules/modules.config	Fri Jan 15 15:36:54 2010 -0800
@@ -372,15 +372,19 @@
 
 /**************************************************************************/
 
+module tracing {
+    // tracing
+    include com.sun.tracing.**, sun.tracing.**;
+}
+
 module instrument {
     // java.lang.instrument
     include java.lang.instrument.*, sun.instrument.*;
 
-    // tracing
-    include com.sun.tracing.**, sun.tracing.**;
-
     // HPROF support
     include com.sun.demo.jvmti.hprof.*;
+
+    include tracing;
 }
 
 /**************************************************************************/
@@ -391,15 +395,17 @@
             sun.rmi.server.InactiveGroupException;
 }
 
+module rmic {
+    // rmic is included in tools
+    include sun.rmi.rmic.**;
+}
+
 module rmi {
     include java.rmi.**, sun.rmi.**, com.sun.rmi.**;
 
     // SSL factories are in rmi
     include javax.rmi.ssl.**;
 
-    // rmic is in tools
-    exclude sun.rmi.rmic.**;
-
     // supporting classes in sun.misc and dependencies
     include sun.misc.GC;
 }
@@ -468,9 +474,14 @@
     include javax.smartcardio.**, sun.security.smartcardio.**;
 }
 
+module security-auth {
+    include com.sun.security.auth.**, sun.security.util.AuthResources_*;
+}
+
 module security-misc {
-    include com.sun.security.auth.**, sun.security.util.AuthResources_*,
-            sun.security.pkcs.*,
+    include security-auth;
+
+    include sun.security.pkcs.*,
             sun.security.pkcs12.*;
 
     // this class is a candidate to be removed.
@@ -500,9 +511,8 @@
 }
 
 module jndi-dns {
+    include net-dns;
     include com.sun.jndi.dns.**, com.sun.jndi.url.dns.**;
-    include sun.net.dns.**;                 // to access DNS config.
-    include sun.net.spi.nameservice.dns.**; // for DNS-only name service.
 }
 
 module jndi-cosnaming {
@@ -677,31 +687,69 @@
 
 /**************************************************************************/
 
-module client {
+module applet {
     include java.applet.**,
-            java.awt.**,
-            javax.accessibility.*,
-            javax.imageio.**,
-            javax.print.**,
-            javax.sound.**,
-            javax.swing.**,
-            sun.applet.**,
-            sun.audio.**,
+            sun.applet.**;
+}
+
+module awt {
+    include java.awt.**,
             sun.awt.**,
-            sun.dc.**,
-            sun.font.**,
+            com.sun.awt.**;
+}
+
+module font {
+    include sun.font.**;
+}
+
+module imageio {
+    include javax.imageio.**,
+            com.sun.imageio.**;
+}
+
+module java2d {
+    include sun.dc.**,
             sun.java2d.**,
-            sun.print.**,
+            com.sun.image.**;
+}
+
+module media {
+    include com.sun.media.**;
+}
+
+module print {
+    include javax.print.**,
+            sun.print.**;
+}
+
+module sound {
+    include javax.sound.**;
+}
+
+module swing {
+    include javax.swing.**,
             sun.swing.**,
-            com.sun.accessibility.**,
-            com.sun.awt.**,
-            com.sun.image.**,
-            com.sun.imageio.**,
-            com.sun.java.swing.*,       // sajdi also contains classes in a subpackage;
-                                        // so use '*' instead of '**' 
+            // sajdi also contains classes in subpackages of com.sun.java.swing;
+            // so use '*' instead of '**' 
+            com.sun.java.swing.*,
             com.sun.java.swing.plaf.**,
-            com.sun.media.**,
             com.sun.swing.**;
+}
+
+module client {
+    include applet,
+            awt,
+            font,
+            imageio,
+            java2d,
+            media,
+            print,
+            sound,
+            swing;
+
+    include javax.accessibility.*,
+            sun.audio.**,
+            com.sun.accessibility.**;
 
     // Bidi class in client module for now
     include java.text.Bidi, sun.text.bidi.*;
@@ -723,7 +771,13 @@
 
 /**************************************************************************/
 
+module jkernel {
+    include sun.jkernel.*;
+}
+
 module deploy {
+    include jkernel;
+
     // For now, all plugin and JNLP
     include com.sun.java.browser.**,
             netscape.**,
@@ -732,8 +786,7 @@
             com.sun.deploy.**,
             com.sun.javaws.**,
             javax.jnlp.*,
-            com.sun.jnlp.*,
-            sun.jkernel.*;
+            com.sun.jnlp.*;
 
     // Hook for http authentication
     include sun.net.www.protocol.http.AuthCacheBridge;
@@ -741,6 +794,11 @@
 
 /**************************************************************************/
 
+module net-dns {
+    include sun.net.dns.**;                 // to access DNS config.
+    include sun.net.spi.nameservice.dns.**; // for DNS-only name service.
+}
+
 module net-compat {
     // NTLM authentication support
     include sun.net.www.protocol.http.ntlm.*;
@@ -824,6 +882,7 @@
             debugging,
             jaxws-tools,
             jdb,
+            rmic,
             sajdi;
 
     // include gui-tools in tools module unless the tool binaries
@@ -834,8 +893,7 @@
             com.sun.jarsigner.**,
             com.sun.javac.**,
             com.sun.javadoc.**, com.sun.source.**,
-            sun.jvmstat.**,
-            sun.rmi.rmic.**;
+            sun.jvmstat.**;
 }
 
 /**************************************************************************/
@@ -853,6 +911,19 @@
 
 /**************************************************************************/
 
+// Workaround for US export and local policy files 
+// They are currently in signed jars under the jre/lib/security directory
+module US_export_policy {
+    include default_US_export.policy;
+}
+
+module local_policy {
+    include default_local.policy,
+            exempt_local.policy;
+}
+
+/**************************************************************************/
+
 module other {
     include **;
 }
--- a/jdk/make/modules/tools/build.xml	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/make/modules/tools/build.xml	Fri Jan 15 15:36:54 2010 -0800
@@ -1,32 +1,28 @@
-<!--
- Copyright 2009 Sun Microsystems, Inc.  All Rights Reserved.
+<?xml version="1.0" encoding="UTF-8"?>
 
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions
- are met:
+<!--
+  Copyright 2009 Sun Microsystems, Inc.  All Rights Reserved.
+  DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 
-   - Redistributions of source code must retain the above copyright
-     notice, this list of conditions and the following disclaimer.
-
-   - Redistributions in binary form must reproduce the above copyright
-     notice, this list of conditions and the following disclaimer in the
-     documentation and/or other materials provided with the distribution.
+  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.  Sun designates this
+  particular file as subject to the "Classpath" exception as provided
+  by Sun in the LICENSE file that accompanied this code.
 
-   - Neither the name of Sun Microsystems nor the names of its
-     contributors may be used to endorse or promote products derived
-     from this software without specific prior written permission.
+  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).
 
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
- IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+  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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+  CA 95054 USA or visit www.sun.com if you need additional information or
+  have any questions.
 -->
 
 <project name="classanalyzer" default="build" basedir=".">
--- a/jdk/make/modules/tools/nbproject/project.properties	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/make/modules/tools/nbproject/project.properties	Fri Jan 15 15:36:54 2010 -0800
@@ -1,32 +1,26 @@
 #
 # Copyright 2009 Sun Microsystems, Inc.  All Rights Reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
-#   - Redistributions of source code must retain the above copyright
-#     notice, this list of conditions and the following disclaimer.
-#
-#   - Redistributions in binary form must reproduce the above copyright
-#     notice, this list of conditions and the following disclaimer in the
-#     documentation and/or other materials provided with the distribution.
+# 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.  Sun designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Sun in the LICENSE file that accompanied this code.
 #
-#   - Neither the name of Sun Microsystems nor the names of its
-#     contributors may be used to endorse or promote products derived
-#     from this software without specific prior written permission.
+# 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).
 #
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
-# IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-# PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR
-# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+# CA 95054 USA or visit www.sun.com if you need additional information or
+# have any questions.
 #
 
 application.title=classanalyzer
--- a/jdk/make/modules/tools/nbproject/project.xml	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/make/modules/tools/nbproject/project.xml	Fri Jan 15 15:36:54 2010 -0800
@@ -1,35 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
 <!--
- Copyright 2009 Sun Microsystems, Inc.  All Rights Reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions
- are met:
-
-   - Redistributions of source code must retain the above copyright
-     notice, this list of conditions and the following disclaimer.
-
-   - Redistributions in binary form must reproduce the above copyright
-     notice, this list of conditions and the following disclaimer in the
-     documentation and/or other materials provided with the distribution.
-
-   - Neither the name of Sun Microsystems nor the names of its
-     contributors may be used to endorse or promote products derived
-     from this software without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
- IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+  Copyright 2009 Sun Microsystems, Inc.  All Rights Reserved.
+  DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ 
+  This code is free software; you can redistribute it and/or modify it
+  under the terms of the GNU General Public License version 2 only, as
+  published by the Free Software Foundation.  Sun designates this
+  particular file as subject to the "Classpath" exception as provided
+  by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+  CA 95054 USA or visit www.sun.com if you need additional information or
+  have any questions.
 -->
 
-<?xml version="1.0" encoding="UTF-8"?>
 <project xmlns="http://www.netbeans.org/ns/project/1">
     <type>org.netbeans.modules.java.j2seproject</type>
     <configuration>
--- a/jdk/make/modules/tools/src/com/sun/classanalyzer/Module.java	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/make/modules/tools/src/com/sun/classanalyzer/Module.java	Fri Jan 15 15:36:54 2010 -0800
@@ -444,8 +444,8 @@
     }
 
     void printClassListTo(String output) throws IOException {
-        // no file created if the module doesn't have any class
-        if (classes.isEmpty()) {
+        // no file created if the module doesn't have any class nor resource
+        if (isEmpty()) {
             return;
         }
 
@@ -482,7 +482,7 @@
 
     void printDependenciesTo(String output, boolean showDynamic) throws IOException {
         // no file created if the module doesn't have any class
-        if (classes.isEmpty()) {
+        if (isEmpty()) {
             return;
         }
 
--- a/jdk/make/sun/applet/Makefile	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/make/sun/applet/Makefile	Fri Jan 15 15:36:54 2010 -0800
@@ -28,6 +28,7 @@
 #
 
 BUILDDIR = ../..
+MODULE  = applet
 PACKAGE = sun.applet
 PRODUCT = sun
 include $(BUILDDIR)/common/Defs.gmk
--- a/jdk/make/sun/awt/Makefile	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/make/sun/awt/Makefile	Fri Jan 15 15:36:54 2010 -0800
@@ -24,6 +24,7 @@
 #
 
 BUILDDIR = ../..
+MODULE  = awt
 PACKAGE = sun.awt
 LIBRARY = awt
 PRODUCT = sun
@@ -312,15 +313,15 @@
 
 $(LIBDIR)/$(LIBARCH)/libxinerama.so: $(CLOSED_SRC)/solaris/lib/$(ARCH)/libxinerama.so
 	$(install-file)
-	$(CHMOD) a+x $@
+	$(call chmod-file, a+x)
 
 $(LIBDIR)/$(LIBARCH)/libjdgaSUNW%.so: $(CLOSED_SRC)/solaris/lib/$(ARCH)/libjdgaSUNW%.so
 	$(install-file)
-	$(CHMOD) a+x $@
+	$(call chmod-file, a+x)
 
 $(LIBDIR)/$(LIBARCH)/libjdgaSUNWafb.so: $(LIBDIR)/$(LIBARCH)/libjdgaSUNWffb.so
 	$(prep-target)
-	$(LN) -s libjdgaSUNWffb.so $(LIBDIR)/$(LIBARCH)/libjdgaSUNWafb.so
+	$(call install-sym-link, libjdgaSUNWffb.so)
 
 clean:: dgalib.clean
 
@@ -404,7 +405,8 @@
     $(COMPILEFONTCONFIG_JARFILE)
 	$(prep-target)
 	$(BOOT_JAVA_CMD) -jar $(COMPILEFONTCONFIG_JARFILE) $< $@
-	$(CHMOD) 444 $(@)
+	$(install-module-file)
+	$(call chmod-file, 444)
 	@$(java-vm-cleanup)
 
 fontconfigs.clean :
--- a/jdk/make/sun/cmm/Makefile	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/make/sun/cmm/Makefile	Fri Jan 15 15:36:54 2010 -0800
@@ -24,6 +24,7 @@
 #
 
 BUILDDIR = ../..
+MODULE   = java2d
 PRODUCT  = sun
 include $(BUILDDIR)/common/Defs.gmk
 
@@ -45,34 +46,24 @@
 	     $(ICCPROFILE_DEST_DIR)/LINEAR_RGB.pf
 
 $(ICCPROFILE_DEST_DIR)/sRGB.pf: $(ICCPROFILE_SRC_DIR)/sRGB.pf
-	$(RM) $(ICCPROFILE_DEST_DIR)/sRGB.pf
-	-$(MKDIR) -p $(ICCPROFILE_DEST_DIR)
-	$(CP) $(ICCPROFILE_SRC_DIR)/sRGB.pf $(ICCPROFILE_DEST_DIR)
-	$(CHMOD) 444 $(ICCPROFILE_DEST_DIR)/sRGB.pf
+	$(install-file)
+	$(call chmod-file, 444)
 
 $(ICCPROFILE_DEST_DIR)/GRAY.pf: $(ICCPROFILE_SRC_DIR)/GRAY.pf
-	$(RM) $(ICCPROFILE_DEST_DIR)/GRAY.pf
-	-$(MKDIR) -p $(ICCPROFILE_DEST_DIR)
-	$(CP) $(ICCPROFILE_SRC_DIR)/GRAY.pf $(ICCPROFILE_DEST_DIR)
-	$(CHMOD) 444 $(ICCPROFILE_DEST_DIR)/GRAY.pf
+	$(install-file)
+	$(call chmod-file, 444)
 
 $(ICCPROFILE_DEST_DIR)/CIEXYZ.pf: $(ICCPROFILE_SRC_DIR)/CIEXYZ.pf
-	$(RM) $(ICCPROFILE_DEST_DIR)/CIEXYZ.pf
-	-$(MKDIR) -p $(ICCPROFILE_DEST_DIR)
-	$(CP) $(ICCPROFILE_SRC_DIR)/CIEXYZ.pf $(ICCPROFILE_DEST_DIR)
-	$(CHMOD) 444 $(ICCPROFILE_DEST_DIR)/CIEXYZ.pf
+	$(install-file)
+	$(call chmod-file, 444)
 
 $(ICCPROFILE_DEST_DIR)/PYCC.pf: $(ICCPROFILE_SRC_DIR)/PYCC.pf
-	$(RM) $(ICCPROFILE_DEST_DIR)/PYCC.pf
-	-$(MKDIR) -p $(ICCPROFILE_DEST_DIR)
-	$(CP) $(ICCPROFILE_SRC_DIR)/PYCC.pf $(ICCPROFILE_DEST_DIR)
-	$(CHMOD) 444 $(ICCPROFILE_DEST_DIR)/PYCC.pf
+	$(install-file)
+	$(call chmod-file, 444)
 
 $(ICCPROFILE_DEST_DIR)/LINEAR_RGB.pf: $(ICCPROFILE_SRC_DIR)/LINEAR_RGB.pf
-	$(RM) $(ICCPROFILE_DEST_DIR)/LINEAR_RGB.pf
-	-$(MKDIR) -p $(ICCPROFILE_DEST_DIR)
-	$(CP) $(ICCPROFILE_SRC_DIR)/LINEAR_RGB.pf $(ICCPROFILE_DEST_DIR)
-	$(CHMOD) 444 $(ICCPROFILE_DEST_DIR)/LINEAR_RGB.pf
+	$(install-file)
+	$(call chmod-file, 444)
 
 iccprofiles.clean:
 	$(RM) -r $(ICCPROFILE_DEST_DIR)
--- a/jdk/make/sun/cmm/kcms/Makefile	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/make/sun/cmm/kcms/Makefile	Fri Jan 15 15:36:54 2010 -0800
@@ -24,6 +24,7 @@
 #
 
 BUILDDIR = ../../..
+MODULE  = java2d
 PACKAGE = sun.java2d.cmm.kcms
 LIBRARY = kcms
 PRODUCT = sun
--- a/jdk/make/sun/cmm/lcms/Makefile	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/make/sun/cmm/lcms/Makefile	Fri Jan 15 15:36:54 2010 -0800
@@ -24,6 +24,7 @@
 #
 
 BUILDDIR = ../../..
+MODULE  = java2d
 PACKAGE = sun.java2d.cmm.lcms
 LIBRARY = lcms
 PRODUCT = sun
--- a/jdk/make/sun/dcpr/Makefile	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/make/sun/dcpr/Makefile	Fri Jan 15 15:36:54 2010 -0800
@@ -26,6 +26,7 @@
 # WARNING: Make sure the OPENJDK plugs are up-to-date, see make/common/internal/BinaryPlugs.gmk
 
 BUILDDIR = ../..
+MODULE  = java2d
 PACKAGE = sun.dc
 LIBRARY = dcpr
 PRODUCT = sun
--- a/jdk/make/sun/font/Makefile	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/make/sun/font/Makefile	Fri Jan 15 15:36:54 2010 -0800
@@ -28,6 +28,7 @@
 #
 
 BUILDDIR = ../..
+MODULE  = font
 PACKAGE = sun.font
 LIBRARY = fontmanager
 PRODUCT = sun
@@ -121,16 +122,21 @@
 #
 #TODO: rework this to avoid hardcoding library name in the makefile
 #
-library:: $(LIB_LOCATION)/$(LIB_PREFIX)freetype.$(LIBRARY_SUFFIX)
-
-$(LIB_LOCATION)/$(LIB_PREFIX)freetype.$(LIBRARY_SUFFIX):
 ifeq ($(PLATFORM), windows)
-	$(CP) $(FREETYPE_LIB_PATH)/$(LIB_PREFIX)freetype.$(LIBRARY_SUFFIX) $@
+    FREETYPE_LIB = $(LIB_LOCATION)/$(LIB_PREFIX)freetype.$(LIBRARY_SUFFIX)
+    OTHER_LDLIBS += $(FREETYPE_LIB_PATH)/freetype.lib
 else 
   ifeq ($(USING_SYSTEM_FT_LIB), false)
-	$(CP) $(FREETYPE_LIB_PATH)/$(LIB_PREFIX)freetype.$(LIBRARY_SUFFIX) $@.6
+    FREETYPE_LIB = $(LIB_LOCATION)/$(LIB_PREFIX)freetype.$(LIBRARY_SUFFIX).6
   endif
+  OTHER_LDLIBS += -L$(FREETYPE_LIB_PATH) -lfreetype
 endif 
+
+library:: $(FREETYPE_LIB)
+
+$(FREETYPE_LIB):
+	$(CP) $(FREETYPE_LIB_PATH)/$(LIB_PREFIX)freetype.$(LIBRARY_SUFFIX) $@
+	$(install-module-file)
 endif
 
 #ifeq ($(PLATFORM), solaris)
@@ -158,7 +164,6 @@
   CPPFLAGS += -I$(CLOSED_SRC)/share/native/$(PKGDIR)/t2k
 else
   CPPFLAGS += -I$(FREETYPE_HEADERS_PATH) -I$(FREETYPE_HEADERS_PATH)/freetype2
-  OTHER_LDLIBS += $(FREETYPE_LIB)
 endif
 
 ifeq ($(PLATFORM), windows)
--- a/jdk/make/sun/font/t2k/Makefile	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/make/sun/font/t2k/Makefile	Fri Jan 15 15:36:54 2010 -0800
@@ -30,6 +30,7 @@
 #
 
 BUILDDIR = ../../..
+MODULE  = font
 PACKAGE = sun.font
 LIBRARY = t2k
 PRODUCT = sun
--- a/jdk/make/sun/headless/Makefile	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/make/sun/headless/Makefile	Fri Jan 15 15:36:54 2010 -0800
@@ -30,6 +30,7 @@
 MOTIF_VERSION_STRING=none
 LIB_LOCATION = $(LIBDIR)/$(LIBARCH)/headless
 
+MODULE  = awt
 PACKAGE = sun.awt
 LIBRARY = mawt
 LIBRARY_OUTPUT = headless
--- a/jdk/make/sun/image/generic/Makefile	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/make/sun/image/generic/Makefile	Fri Jan 15 15:36:54 2010 -0800
@@ -28,6 +28,7 @@
 #
 
 BUILDDIR = ../../..
+MODULE  = media
 PACKAGE = sun.awt.medialib
 LIBRARY = mlib_image
 PRODUCT = sun
--- a/jdk/make/sun/image/vis/Makefile	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/make/sun/image/vis/Makefile	Fri Jan 15 15:36:54 2010 -0800
@@ -27,6 +27,7 @@
 # Makefile for building the VIS (solaris-only) version of medialib
 #
 BUILDDIR = ../../..
+MODULE  = media
 PACKAGE = sun.awt.medialib
 LIBRARY = mlib_image_v
 PRODUCT = sun
--- a/jdk/make/sun/jar/Makefile	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/make/sun/jar/Makefile	Fri Jan 15 15:36:54 2010 -0800
@@ -28,6 +28,7 @@
 #
 
 BUILDDIR = ../..
+MODULE  = jar-tool
 PACKAGE = sun.tools
 PRODUCT = sun
 include $(BUILDDIR)/common/Defs.gmk
--- a/jdk/make/sun/javazic/Makefile	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/make/sun/javazic/Makefile	Fri Jan 15 15:36:54 2010 -0800
@@ -27,6 +27,7 @@
 
 
 BUILDDIR = ../..
+MODULE  = base
 PACKAGE = sun.javazic
 PRODUCT = sun
 include $(BUILDDIR)/common/Defs.gmk
@@ -69,6 +70,7 @@
 	$(RM) -r $(@D)
 	$(prep-target)
 	$(CP) -r $(WORKDIR)/* $(@D)
+	$(install-module-dir)
 
 clean clobber::
 	$(RM) -r $(TEMPDIR) $(INSTALLDIR)
--- a/jdk/make/sun/jawt/Makefile	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/make/sun/jawt/Makefile	Fri Jan 15 15:36:54 2010 -0800
@@ -24,6 +24,7 @@
 #
 
 BUILDDIR = ../..
+MODULE  = awt
 PACKAGE = sun.awt
 LIBRARY = jawt
 PRODUCT = sun
--- a/jdk/make/sun/jconsole/Makefile	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/make/sun/jconsole/Makefile	Fri Jan 15 15:36:54 2010 -0800
@@ -28,6 +28,7 @@
 #
 
 BUILDDIR = ../..
+MODULE  = jconsole
 PACKAGE = sun.tools.jconsole
 PRODUCT = sun
 include $(BUILDDIR)/common/Defs.gmk
@@ -79,7 +80,7 @@
 	$(install-file)
 
 $(TEMPDIR)/manifest: $(SHARE_SRC)/classes/$(PKGDIR)/manifest
-	$(install-file)
+	$(install-manifest-file)
 
 #
 # Extra rule to build jconsole.jar
--- a/jdk/make/sun/jdbc/Makefile	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/make/sun/jdbc/Makefile	Fri Jan 15 15:36:54 2010 -0800
@@ -33,6 +33,7 @@
 #
 
 BUILDDIR = ../..
+MODULE  = jdbc-odbc
 PACKAGE = sun.jdbc.odbc
 LIBRARY = JdbcOdbc
 PRODUCT = sun
--- a/jdk/make/sun/jdga/Makefile	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/make/sun/jdga/Makefile	Fri Jan 15 15:36:54 2010 -0800
@@ -25,6 +25,7 @@
 
 
 BUILDDIR = ../..
+MODULE  = java2d
 PACKAGE = sun.jdga
 LIBRARY = sunwjdga
 PRODUCT = sun
--- a/jdk/make/sun/jkernel/Makefile	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/make/sun/jkernel/Makefile	Fri Jan 15 15:36:54 2010 -0800
@@ -24,6 +24,7 @@
 #
 
 BUILDDIR = ../..
+MODULE  = jkernel
 PACKAGE = sun.jkernel
 LIBRARY = jkernel
 PRODUCT = sun
--- a/jdk/make/sun/jpeg/Makefile	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/make/sun/jpeg/Makefile	Fri Jan 15 15:36:54 2010 -0800
@@ -24,6 +24,7 @@
 #
 
 BUILDDIR = ../..
+MODULE  = java2d
 PACKAGE = sun.awt
 LIBRARY = jpeg
 PRODUCT = sun
--- a/jdk/make/sun/launcher/Makefile	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/make/sun/launcher/Makefile	Fri Jan 15 15:36:54 2010 -0800
@@ -24,6 +24,7 @@
 #
 
 BUILDDIR = ../..
+MODULE  = base
 PACKAGE = sun.launcher
 PRODUCT = sun
 include $(BUILDDIR)/common/Defs.gmk
--- a/jdk/make/sun/management/Makefile	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/make/sun/management/Makefile	Fri Jan 15 15:36:54 2010 -0800
@@ -28,6 +28,8 @@
 #
 
 BUILDDIR = ../..
+MODULE   = management
+
 include $(BUILDDIR)/common/Defs.gmk
 
 MGMT_LIBDIR = $(LIBDIR)/management
@@ -56,17 +58,17 @@
 
 $(MGMT_LIBDIR)/management.properties: $(MGMT_LIB_SRC)/management.properties
 	$(install-file)
-	$(CHMOD) 644 $@
+	$(call chmod-file, 644)
 
 $(MGMT_LIBDIR)/snmp.acl.template: $(MGMT_LIB_SRC)/snmp.acl.template
 	$(install-file)
-	$(CHMOD) 444 $@
+	$(call chmod-file, 444)
 
 $(MGMT_LIBDIR)/jmxremote.password.template: $(MGMT_LIB_SRC)/jmxremote.password.template
 	$(install-file)
-	$(CHMOD) 444 $@
+	$(call chmod-file, 444)
 
 $(MGMT_LIBDIR)/jmxremote.access: $(MGMT_LIB_SRC)/jmxremote.access 
 	$(install-file)
-	$(CHMOD) 644 $@
+	$(call chmod-file, 644)
 
--- a/jdk/make/sun/native2ascii/Makefile	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/make/sun/native2ascii/Makefile	Fri Jan 15 15:36:54 2010 -0800
@@ -28,6 +28,7 @@
 #
 
 BUILDDIR = ../..
+MODULE  = tools
 PACKAGE = sun.tools.native2ascii
 PRODUCT = sun
 OTHER_JAVACFLAGS += -Xlint:serial -Werror
--- a/jdk/make/sun/net/others/Makefile	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/make/sun/net/others/Makefile	Fri Jan 15 15:36:54 2010 -0800
@@ -24,6 +24,7 @@
 #
 
 BUILDDIR = ../../..
+MODULE  = base
 PACKAGE = sun.net
 PRODUCT = sun
 include $(BUILDDIR)/common/Defs.gmk
--- a/jdk/make/sun/net/spi/nameservice/dns/Makefile	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/make/sun/net/spi/nameservice/dns/Makefile	Fri Jan 15 15:36:54 2010 -0800
@@ -28,6 +28,9 @@
 #
 
 BUILDDIR = ../../../../..
+
+# dns should probably be its own module
+MODULE  = net-dns
 PACKAGE = sun.net.spi.nameservice.dns
 PRODUCT = sun
 include $(BUILDDIR)/common/Defs.gmk
--- a/jdk/make/sun/nio/FILES_java.gmk	Fri Jan 15 09:06:57 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,400 +0,0 @@
-#
-# Copyright 2005-2006 Sun Microsystems, Inc.  All Rights Reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.  Sun designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
-# CA 95054 USA or visit www.sun.com if you need additional information or
-# have any questions.
-#
-
-#
-# Character converters for lib/charsets.jar
-#
-# Core character converters are built from make/java/java.
-#
-
-FILES_src = \
-	sun/io/ByteToCharDoubleByte.java \
-	sun/io/ByteToCharDBCS_ASCII.java \
-	sun/io/ByteToCharDBCS_EBCDIC.java \
-	sun/io/ByteToCharEUC.java \
-	sun/io/CharToByteDoubleByte.java \
-	sun/io/CharToByteDBCS_ASCII.java \
-	sun/io/CharToByteDBCS_EBCDIC.java \
-	sun/io/CharToByteEUC.java \
-	sun/io/ByteToCharBig5.java \
-	sun/io/ByteToCharBig5_Solaris.java \
-	sun/io/ByteToCharBig5_HKSCS.java \
-	sun/io/ByteToCharMS950_HKSCS.java \
-	sun/io/ByteToCharHKSCS.java \
-	sun/io/ByteToCharHKSCS_2001.java \
-	sun/io/ByteToCharGB18030.java \
-	sun/io/ByteToCharGB18030DB.java \
-	sun/io/ByteToCharCp037.java \
-	sun/io/ByteToCharCp1006.java \
-	sun/io/ByteToCharCp1025.java \
-	sun/io/ByteToCharCp1026.java \
-	sun/io/ByteToCharCp1046.java \
-	sun/io/ByteToCharCp1047.java \
-	sun/io/ByteToCharCp1097.java \
-	sun/io/ByteToCharCp1098.java \
-	sun/io/ByteToCharCp1112.java \
-	sun/io/ByteToCharCp1122.java \
-	sun/io/ByteToCharCp1123.java \
-	sun/io/ByteToCharCp1124.java \
-	sun/io/ByteToCharCp1140.java \
-	sun/io/ByteToCharCp1141.java \
-	sun/io/ByteToCharCp1142.java \
-	sun/io/ByteToCharCp1143.java \
-	sun/io/ByteToCharCp1144.java \
-	sun/io/ByteToCharCp1145.java \
-	sun/io/ByteToCharCp1146.java \
-	sun/io/ByteToCharCp1147.java \
-	sun/io/ByteToCharCp1148.java \
-	sun/io/ByteToCharCp1149.java \
-	sun/io/ByteToCharCp1255.java \
-	sun/io/ByteToCharCp1256.java \
-	sun/io/ByteToCharCp1258.java \
-	sun/io/ByteToCharCp1381.java \
-	sun/io/ByteToCharCp1383.java \
-	sun/io/ByteToCharCp273.java \
-	sun/io/ByteToCharCp277.java \
-	sun/io/ByteToCharCp278.java \
-	sun/io/ByteToCharCp280.java \
-	sun/io/ByteToCharCp284.java \
-	sun/io/ByteToCharCp285.java \
-	sun/io/ByteToCharCp297.java \
-	sun/io/ByteToCharCp33722.java \
-	sun/io/ByteToCharCp420.java \
-	sun/io/ByteToCharCp424.java \
-	sun/io/ByteToCharCp437.java \
-	sun/io/ByteToCharCp500.java \
-	sun/io/ByteToCharCp737.java \
-	sun/io/ByteToCharCp775.java \
-	sun/io/ByteToCharCp834.java \
-	sun/io/ByteToCharCp838.java \
-	sun/io/ByteToCharCp850.java \
-	sun/io/ByteToCharCp852.java \
-	sun/io/ByteToCharCp855.java \
-	sun/io/ByteToCharCp856.java \
-	sun/io/ByteToCharCp857.java \
-	sun/io/ByteToCharCp858.java \
-	sun/io/ByteToCharCp860.java \
-	sun/io/ByteToCharCp861.java \
-	sun/io/ByteToCharCp862.java \
-	sun/io/ByteToCharCp863.java \
-	sun/io/ByteToCharCp864.java \
-	sun/io/ByteToCharCp865.java \
-	sun/io/ByteToCharCp866.java \
-	sun/io/ByteToCharCp868.java \
-	sun/io/ByteToCharCp869.java \
-	sun/io/ByteToCharCp870.java \
-	sun/io/ByteToCharCp871.java \
-	sun/io/ByteToCharCp874.java \
-	sun/io/ByteToCharCp875.java \
-	sun/io/ByteToCharCp918.java \
-	sun/io/ByteToCharCp921.java \
-	sun/io/ByteToCharCp922.java \
-	sun/io/ByteToCharCp930.java \
-	sun/io/ByteToCharCp933.java \
-	sun/io/ByteToCharCp935.java \
-	sun/io/ByteToCharCp937.java \
-	sun/io/ByteToCharCp939.java \
-	sun/io/ByteToCharCp942.java \
-	sun/io/ByteToCharCp942C.java \
-	sun/io/ByteToCharCp943.java \
-	sun/io/ByteToCharCp943C.java \
-	sun/io/ByteToCharCp948.java \
-	sun/io/ByteToCharCp949.java \
-	sun/io/ByteToCharCp949C.java \
-	sun/io/ByteToCharCp950.java \
-	sun/io/ByteToCharCp964.java \
-	sun/io/ByteToCharCp970.java \
-	sun/io/ByteToCharJIS0201.java \
-	sun/io/ByteToCharJIS0208.java \
-	sun/io/ByteToCharJIS0208_Solaris.java \
-	sun/io/ByteToCharJIS0212.java \
-	sun/io/ByteToCharJIS0212_Solaris.java \
-	sun/io/ByteToCharEUC_CN.java \
-	sun/io/ByteToCharEUC_JP.java \
-	sun/io/ByteToCharEUC_JP_LINUX.java \
-	sun/io/ByteToCharEUC_JP_Solaris.java \
-	sun/io/ByteToCharEUC_KR.java \
-	sun/io/ByteToCharEUC_TW.java \
-	sun/io/ByteToCharSJIS.java \
-	sun/io/ByteToCharPCK.java \
-	sun/io/ByteToCharGBK.java \
-	sun/io/ByteToCharISCII91.java \
-	sun/io/ByteToCharISO2022.java \
-	sun/io/ByteToCharISO2022CN.java \
-	sun/io/ByteToCharISO2022JP.java \
-	sun/io/ByteToCharISO2022KR.java \
-	sun/io/ByteToCharISO8859_3.java \
-	sun/io/ByteToCharISO8859_6.java \
-	sun/io/ByteToCharISO8859_8.java \
-	sun/io/ByteToCharJISAutoDetect.java \
-	sun/io/ByteToCharJohab.java \
-	sun/io/ByteToCharMS874.java \
-	sun/io/ByteToCharMS932.java \
-	sun/io/ByteToCharMS936.java \
-	sun/io/ByteToCharMS949.java \
-	sun/io/ByteToCharMS950.java \
-	sun/io/ByteToCharMacArabic.java \
-	sun/io/ByteToCharMacCentralEurope.java \
-	sun/io/ByteToCharMacCroatian.java \
-	sun/io/ByteToCharMacCyrillic.java \
-	sun/io/ByteToCharMacDingbat.java \
-	sun/io/ByteToCharMacGreek.java \
-	sun/io/ByteToCharMacHebrew.java \
-	sun/io/ByteToCharMacIceland.java \
-	sun/io/ByteToCharMacRoman.java \
-	sun/io/ByteToCharMacRomania.java \
-	sun/io/ByteToCharMacSymbol.java \
-	sun/io/ByteToCharMacThai.java \
-	sun/io/ByteToCharMacTurkish.java \
-	sun/io/ByteToCharMacUkraine.java \
-	sun/io/ByteToCharTIS620.java \
-	sun/io/CharToByteBig5.java \
-	sun/io/CharToByteBig5_Solaris.java \
-	sun/io/CharToByteBig5_HKSCS.java \
-	sun/io/CharToByteHKSCS.java \
-	sun/io/CharToByteHKSCS_2001.java \
-	sun/io/CharToByteMS950_HKSCS.java \
-	sun/io/CharToByteGB18030.java \
-	sun/io/CharToByteCp037.java \
-	sun/io/CharToByteCp1006.java \
-	sun/io/CharToByteCp1025.java \
-	sun/io/CharToByteCp1026.java \
-	sun/io/CharToByteCp1046.java \
-	sun/io/CharToByteCp1047.java \
-	sun/io/CharToByteCp1097.java \
-	sun/io/CharToByteCp1098.java \
-	sun/io/CharToByteCp1112.java \
-	sun/io/CharToByteCp1122.java \
-	sun/io/CharToByteCp1123.java \
-	sun/io/CharToByteCp1124.java \
-	sun/io/CharToByteCp1140.java \
-	sun/io/CharToByteCp1141.java \
-	sun/io/CharToByteCp1142.java \
-	sun/io/CharToByteCp1143.java \
-	sun/io/CharToByteCp1144.java \
-	sun/io/CharToByteCp1145.java \
-	sun/io/CharToByteCp1146.java \
-	sun/io/CharToByteCp1147.java \
-	sun/io/CharToByteCp1148.java \
-	sun/io/CharToByteCp1149.java \
-	sun/io/CharToByteCp1255.java \
-	sun/io/CharToByteCp1256.java \
-	sun/io/CharToByteCp1258.java \
-	sun/io/CharToByteCp1381.java \
-	sun/io/CharToByteCp1383.java \
-	sun/io/CharToByteCp273.java \
-	sun/io/CharToByteCp277.java \
-	sun/io/CharToByteCp278.java \
-	sun/io/CharToByteCp280.java \
-	sun/io/CharToByteCp284.java \
-	sun/io/CharToByteCp285.java \
-	sun/io/CharToByteCp297.java \
-	sun/io/CharToByteCp33722.java \
-	sun/io/CharToByteCp420.java \
-	sun/io/CharToByteCp424.java \
-	sun/io/CharToByteCp437.java \
-	sun/io/CharToByteCp500.java \
-	sun/io/CharToByteCp737.java \
-	sun/io/CharToByteCp775.java \
-	sun/io/CharToByteCp834.java \
-	sun/io/CharToByteCp838.java \
-	sun/io/CharToByteCp850.java \
-	sun/io/CharToByteCp852.java \
-	sun/io/CharToByteCp855.java \
-	sun/io/CharToByteCp856.java \
-	sun/io/CharToByteCp857.java \
-	sun/io/CharToByteCp858.java \
-	sun/io/CharToByteCp860.java \
-	sun/io/CharToByteCp861.java \
-	sun/io/CharToByteCp862.java \
-	sun/io/CharToByteCp863.java \
-	sun/io/CharToByteCp864.java \
-	sun/io/CharToByteCp865.java \
-	sun/io/CharToByteCp866.java \
-	sun/io/CharToByteCp868.java \
-	sun/io/CharToByteCp869.java \
-	sun/io/CharToByteCp870.java \
-	sun/io/CharToByteCp871.java \
-	sun/io/CharToByteCp874.java \
-	sun/io/CharToByteCp875.java \
-	sun/io/CharToByteCp918.java \
-	sun/io/CharToByteCp921.java \
-	sun/io/CharToByteCp922.java \
-	sun/io/CharToByteCp930.java \
-	sun/io/CharToByteCp933.java \
-	sun/io/CharToByteCp935.java \
-	sun/io/CharToByteCp937.java \
-	sun/io/CharToByteCp939.java \
-	sun/io/CharToByteCp942.java \
-	sun/io/CharToByteCp942C.java \
-	sun/io/CharToByteCp943.java \
-	sun/io/CharToByteCp943C.java \
-	sun/io/CharToByteCp948.java \
-	sun/io/CharToByteCp949.java \
-	sun/io/CharToByteCp949C.java \
-	sun/io/CharToByteCp950.java \
-	sun/io/CharToByteCp964.java \
-	sun/io/CharToByteCp970.java \
-	sun/io/CharToByteJIS0201.java \
-	sun/io/CharToByteJIS0208.java \
-	sun/io/CharToByteJIS0208_Solaris.java \
-	sun/io/CharToByteJIS0212.java \
-	sun/io/CharToByteJIS0212_Solaris.java \
-	sun/io/CharToByteEUC_CN.java \
-	sun/io/CharToByteEUC_JP.java \
-	sun/io/CharToByteEUC_JP_LINUX.java \
-	sun/io/CharToByteEUC_JP_Solaris.java \
-	sun/io/CharToByteEUC_KR.java \
-	sun/io/CharToByteEUC_TW.java \
-	sun/io/CharToByteSJIS.java \
-	sun/io/CharToBytePCK.java \
-	sun/io/CharToByteGBK.java \
-	sun/io/CharToByteISCII91.java \
-	sun/io/CharToByteISO2022.java \
-	sun/io/CharToByteISO2022CN_CNS.java \
-	sun/io/CharToByteISO2022CN_GB.java \
-	sun/io/CharToByteISO2022JP.java \
-	sun/io/CharToByteISO2022KR.java \
-	sun/io/CharToByteISO8859_3.java \
-	sun/io/CharToByteISO8859_6.java \
-	sun/io/CharToByteISO8859_8.java \
-	sun/io/CharToByteJohab.java \
-	sun/io/CharToByteMS874.java \
-	sun/io/CharToByteMS932.java \
-	sun/io/CharToByteMS936.java \
-	sun/io/CharToByteMS949.java \
-	sun/io/CharToByteMS950.java \
-	sun/io/CharToByteMacArabic.java \
-	sun/io/CharToByteMacCentralEurope.java \
-	sun/io/CharToByteMacCroatian.java \
-	sun/io/CharToByteMacCyrillic.java \
-	sun/io/CharToByteMacDingbat.java \
-	sun/io/CharToByteMacGreek.java \
-	sun/io/CharToByteMacHebrew.java \
-	sun/io/CharToByteMacIceland.java \
-	sun/io/CharToByteMacRoman.java \
-	sun/io/CharToByteMacRomania.java \
-	sun/io/CharToByteMacSymbol.java \
-	sun/io/CharToByteMacThai.java \
-	sun/io/CharToByteMacTurkish.java \
-	sun/io/CharToByteMacUkraine.java \
-	sun/io/CharToByteTIS620.java
-
-FILES_gen_extcs = \
-	sun/nio/cs/ext/IBM037.java \
-	sun/nio/cs/ext/IBM1006.java \
-	sun/nio/cs/ext/IBM1025.java \
-	sun/nio/cs/ext/IBM1026.java \
-	sun/nio/cs/ext/IBM1046.java \
-	sun/nio/cs/ext/IBM1047.java \
-	sun/nio/cs/ext/IBM1097.java \
-	sun/nio/cs/ext/IBM1098.java \
-	sun/nio/cs/ext/IBM1112.java \
-	sun/nio/cs/ext/IBM1122.java \
-	sun/nio/cs/ext/IBM1123.java \
-	sun/nio/cs/ext/IBM1124.java \
-	sun/nio/cs/ext/IBM1140.java \
-	sun/nio/cs/ext/IBM1141.java \
-	sun/nio/cs/ext/IBM1142.java \
-	sun/nio/cs/ext/IBM1143.java \
-	sun/nio/cs/ext/IBM1144.java \
-	sun/nio/cs/ext/IBM1145.java \
-	sun/nio/cs/ext/IBM1146.java \
-	sun/nio/cs/ext/IBM1147.java \
-	sun/nio/cs/ext/IBM1148.java \
-	sun/nio/cs/ext/IBM1149.java \
-	sun/nio/cs/ext/IBM273.java \
-	sun/nio/cs/ext/IBM277.java \
-	sun/nio/cs/ext/IBM278.java \
-	sun/nio/cs/ext/IBM280.java \
-	sun/nio/cs/ext/IBM284.java \
-	sun/nio/cs/ext/IBM285.java \
-	sun/nio/cs/ext/IBM297.java \
-	sun/nio/cs/ext/IBM420.java \
-	sun/nio/cs/ext/IBM424.java \
-	sun/nio/cs/ext/IBM500.java \
-	sun/nio/cs/ext/IBM838.java \
-	sun/nio/cs/ext/IBM856.java \
-	sun/nio/cs/ext/IBM860.java \
-	sun/nio/cs/ext/IBM861.java \
-	sun/nio/cs/ext/IBM863.java \
-	sun/nio/cs/ext/IBM864.java \
-	sun/nio/cs/ext/IBM865.java \
-	sun/nio/cs/ext/IBM868.java \
-	sun/nio/cs/ext/IBM869.java \
-	sun/nio/cs/ext/IBM870.java \
-	sun/nio/cs/ext/IBM871.java \
-	sun/nio/cs/ext/IBM875.java \
-	sun/nio/cs/ext/IBM918.java \
-	sun/nio/cs/ext/IBM921.java \
-	sun/nio/cs/ext/IBM922.java \
-	sun/nio/cs/ext/ISO_8859_11.java \
-	sun/nio/cs/ext/ISO_8859_3.java \
-	sun/nio/cs/ext/ISO_8859_6.java \
-	sun/nio/cs/ext/ISO_8859_8.java \
-	sun/nio/cs/ext/MS1255.java \
-	sun/nio/cs/ext/MS1256.java \
-	sun/nio/cs/ext/MS1258.java \
-	sun/nio/cs/ext/MS874.java \
-	sun/nio/cs/ext/MacArabic.java \
-	sun/nio/cs/ext/MacCentralEurope.java \
-	sun/nio/cs/ext/MacCroatian.java \
-	sun/nio/cs/ext/MacCyrillic.java \
-	sun/nio/cs/ext/MacDingbat.java \
-	sun/nio/cs/ext/MacGreek.java \
-	sun/nio/cs/ext/MacHebrew.java \
-	sun/nio/cs/ext/MacIceland.java \
-	sun/nio/cs/ext/MacRoman.java \
-	sun/nio/cs/ext/MacRomania.java \
-	sun/nio/cs/ext/MacSymbol.java \
-	sun/nio/cs/ext/MacThai.java \
-	sun/nio/cs/ext/MacTurkish.java \
-	sun/nio/cs/ext/MacUkraine.java \
-	sun/nio/cs/ext/TIS_620.java \
-        sun/nio/cs/ext/EUC_TWMapping.java \
-	sun/nio/cs/ext/IBM1381.java \
-	sun/nio/cs/ext/IBM1383.java \
-	sun/nio/cs/ext/IBM930.java \
-	sun/nio/cs/ext/IBM933.java \
-	sun/nio/cs/ext/IBM935.java \
-	sun/nio/cs/ext/IBM937.java \
-	sun/nio/cs/ext/IBM939.java \
-	sun/nio/cs/ext/IBM942.java \
-	sun/nio/cs/ext/IBM943.java \
-	sun/nio/cs/ext/IBM948.java \
-	sun/nio/cs/ext/IBM949.java \
-	sun/nio/cs/ext/IBM950.java \
-	sun/nio/cs/ext/IBM970.java \
-	sun/nio/cs/ext/EUC_CN.java \
-	sun/nio/cs/ext/EUC_KR.java \
-	sun/nio/cs/ext/Johab.java \
-	sun/nio/cs/ext/MS932.java \
-	sun/nio/cs/ext/MS936.java \
-	sun/nio/cs/ext/MS949.java \
-	sun/nio/cs/ext/MS950.java \
-	sun/nio/cs/ext/GBK.java
-
-FILES_java = $(FILES_src) $(FILES_gen_extcs)
-
--- a/jdk/make/sun/nio/Makefile	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/make/sun/nio/Makefile	Fri Jan 15 15:36:54 2010 -0800
@@ -1,5 +1,5 @@
 #
-# Copyright 1996-2008 Sun Microsystems, Inc.  All Rights Reserved.
+# Copyright 2009 Sun Microsystems, Inc.  All Rights Reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -23,88 +23,12 @@
 # have any questions.
 #
 
-#
-# Makefile for character converters.
-#
-
 BUILDDIR = ../..
-
 PACKAGE = sun.nio
 PRODUCT = sun
-
-# This re-directs all the class files to a separate location
-CLASSDESTDIR = $(TEMPDIR)/classes
-
-OTHER_JAVACFLAGS += -Xlint:serial -Werror
 include $(BUILDDIR)/common/Defs.gmk
 
-#
-# Files
-#
-include FILES_java.gmk
-AUTO_FILES_JAVA_DIRS = sun/nio/cs/ext
-
-# For Cygwin, command line arguments that are paths must be converted to
-# windows style paths. These paths cannot be used as targets, however, because 
-# the ":" in them  will interfere with GNU Make rules, generating "multiple
-# target pattern" errors.
-
-# this define is for the rule:
-CHARSETS_JAR = $(LIBDIR)/charsets.jar
-
-# extcs
-FILES_genout_extcs = $(FILES_gen_extcs:%.java=$(GENSRCDIR)/%.java)
-
-#
-# Rules
-#
-include $(BUILDDIR)/common/Classes.gmk
-
-build: $(FILES_genout_extcs) $(CHARSETS_JAR)
-
-#
-# Extra rules to build character converters.
-
-SERVICE_DESCRIPTION = java.nio.charset.spi.CharsetProvider
-SERVICE_DESCRIPTION_PATH = META-INF/services/$(SERVICE_DESCRIPTION)
-
-GENCSDATASRC = $(BUILDDIR)/tools/CharsetMapping
-GENCSSRCDIR = $(BUILDDIR)/tools/src/build/tools/charsetmapping
-GENCSEXT = $(GENSRCDIR)/sun/nio/cs/ext
+SUBDIRS = cs
+all build clean clobber::
+	$(SUBDIRS-loop)
 
-FILES_MAP = $(GENCSDATASRC)/sjis0213.map
-FILES_DAT = $(CLASSDESTDIR)/sun/nio/cs/ext/sjis0213.dat
-CHARSETMAPPING_JARFILE = $(BUILDTOOLJARDIR)/charsetmapping.jar
-
-$(FILES_DAT): $(FILES_MAP)
-	@$(prep-target)
-	$(BOOT_JAVA_CMD) -jar $(CHARSETMAPPING_JARFILE) \
-		$(FILES_MAP) $(FILES_DAT) sjis0213
-
-
-$(FILES_genout_extcs): \
-                $(GENCSDATASRC)/SingleByte-X.java.template  \
-		$(GENCSDATASRC)/DoubleByte-X.java.template \
-		$(GENCSDATASRC)/extsbcs $(GENCSDATASRC)/dbcs
-	@$(prep-target)
-	$(RM) -r $(GENCSEXT)
-	$(MKDIR) -p $(GENCSEXT)
-	$(BOOT_JAVA_CMD) -jar $(CHARSETMAPPING_JARFILE)	$(GENCSDATASRC) $(GENCSEXT) extsbcs
-	$(BOOT_JAVA_CMD) -jar $(CHARSETMAPPING_JARFILE) $(GENCSDATASRC) $(GENCSEXT) euctw \
-		$(GENCSSRCDIR)/GenerateEUC_TW.java
-	$(BOOT_JAVA_CMD) -jar $(CHARSETMAPPING_JARFILE) $(GENCSDATASRC) $(GENCSEXT) dbcs
-
-$(CLASSDESTDIR)/$(SERVICE_DESCRIPTION_PATH): \
-  $(SHARE_SRC)/classes/sun/nio/cs/ext/$(SERVICE_DESCRIPTION_PATH)
-	$(install-file)
-
-$(CHARSETS_JAR): $(FILES_class) $(CLASSDESTDIR)/$(SERVICE_DESCRIPTION_PATH) $(FILES_DAT)
-	$(BOOT_JAR_CMD) cf0 $(CHARSETS_JAR) \
-	      -C $(CLASSDESTDIR) sun \
-	      -C $(CLASSDESTDIR) $(SERVICE_DESCRIPTION_PATH)  \
-	      $(BOOT_JAR_JFLAGS)
-	@$(java-vm-cleanup)
-
-clean::
-	$(RM) -r $(CLASSDESTDIR)
-	$(RM) $(CHARSETS_JAR)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/make/sun/nio/cs/FILES_java.gmk	Fri Jan 15 15:36:54 2010 -0800
@@ -0,0 +1,400 @@
+#
+# Copyright 2005-2006 Sun Microsystems, Inc.  All Rights Reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation.  Sun designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+# CA 95054 USA or visit www.sun.com if you need additional information or
+# have any questions.
+#
+
+#
+# Character converters for lib/charsets.jar
+#
+# Core character converters are built from make/java/java.
+#
+
+FILES_src = \
+	sun/io/ByteToCharDoubleByte.java \
+	sun/io/ByteToCharDBCS_ASCII.java \
+	sun/io/ByteToCharDBCS_EBCDIC.java \
+	sun/io/ByteToCharEUC.java \
+	sun/io/CharToByteDoubleByte.java \
+	sun/io/CharToByteDBCS_ASCII.java \
+	sun/io/CharToByteDBCS_EBCDIC.java \
+	sun/io/CharToByteEUC.java \
+	sun/io/ByteToCharBig5.java \
+	sun/io/ByteToCharBig5_Solaris.java \
+	sun/io/ByteToCharBig5_HKSCS.java \
+	sun/io/ByteToCharMS950_HKSCS.java \
+	sun/io/ByteToCharHKSCS.java \
+	sun/io/ByteToCharHKSCS_2001.java \
+	sun/io/ByteToCharGB18030.java \
+	sun/io/ByteToCharGB18030DB.java \
+	sun/io/ByteToCharCp037.java \
+	sun/io/ByteToCharCp1006.java \
+	sun/io/ByteToCharCp1025.java \
+	sun/io/ByteToCharCp1026.java \
+	sun/io/ByteToCharCp1046.java \
+	sun/io/ByteToCharCp1047.java \
+	sun/io/ByteToCharCp1097.java \
+	sun/io/ByteToCharCp1098.java \
+	sun/io/ByteToCharCp1112.java \
+	sun/io/ByteToCharCp1122.java \
+	sun/io/ByteToCharCp1123.java \
+	sun/io/ByteToCharCp1124.java \
+	sun/io/ByteToCharCp1140.java \
+	sun/io/ByteToCharCp1141.java \
+	sun/io/ByteToCharCp1142.java \
+	sun/io/ByteToCharCp1143.java \
+	sun/io/ByteToCharCp1144.java \
+	sun/io/ByteToCharCp1145.java \
+	sun/io/ByteToCharCp1146.java \
+	sun/io/ByteToCharCp1147.java \
+	sun/io/ByteToCharCp1148.java \
+	sun/io/ByteToCharCp1149.java \
+	sun/io/ByteToCharCp1255.java \
+	sun/io/ByteToCharCp1256.java \
+	sun/io/ByteToCharCp1258.java \
+	sun/io/ByteToCharCp1381.java \
+	sun/io/ByteToCharCp1383.java \
+	sun/io/ByteToCharCp273.java \
+	sun/io/ByteToCharCp277.java \
+	sun/io/ByteToCharCp278.java \
+	sun/io/ByteToCharCp280.java \
+	sun/io/ByteToCharCp284.java \
+	sun/io/ByteToCharCp285.java \
+	sun/io/ByteToCharCp297.java \
+	sun/io/ByteToCharCp33722.java \
+	sun/io/ByteToCharCp420.java \
+	sun/io/ByteToCharCp424.java \
+	sun/io/ByteToCharCp437.java \
+	sun/io/ByteToCharCp500.java \
+	sun/io/ByteToCharCp737.java \
+	sun/io/ByteToCharCp775.java \
+	sun/io/ByteToCharCp834.java \
+	sun/io/ByteToCharCp838.java \
+	sun/io/ByteToCharCp850.java \
+	sun/io/ByteToCharCp852.java \
+	sun/io/ByteToCharCp855.java \
+	sun/io/ByteToCharCp856.java \
+	sun/io/ByteToCharCp857.java \
+	sun/io/ByteToCharCp858.java \
+	sun/io/ByteToCharCp860.java \
+	sun/io/ByteToCharCp861.java \
+	sun/io/ByteToCharCp862.java \
+	sun/io/ByteToCharCp863.java \
+	sun/io/ByteToCharCp864.java \
+	sun/io/ByteToCharCp865.java \
+	sun/io/ByteToCharCp866.java \
+	sun/io/ByteToCharCp868.java \
+	sun/io/ByteToCharCp869.java \
+	sun/io/ByteToCharCp870.java \
+	sun/io/ByteToCharCp871.java \
+	sun/io/ByteToCharCp874.java \
+	sun/io/ByteToCharCp875.java \
+	sun/io/ByteToCharCp918.java \
+	sun/io/ByteToCharCp921.java \
+	sun/io/ByteToCharCp922.java \
+	sun/io/ByteToCharCp930.java \
+	sun/io/ByteToCharCp933.java \
+	sun/io/ByteToCharCp935.java \
+	sun/io/ByteToCharCp937.java \
+	sun/io/ByteToCharCp939.java \
+	sun/io/ByteToCharCp942.java \
+	sun/io/ByteToCharCp942C.java \
+	sun/io/ByteToCharCp943.java \
+	sun/io/ByteToCharCp943C.java \
+	sun/io/ByteToCharCp948.java \
+	sun/io/ByteToCharCp949.java \
+	sun/io/ByteToCharCp949C.java \
+	sun/io/ByteToCharCp950.java \
+	sun/io/ByteToCharCp964.java \
+	sun/io/ByteToCharCp970.java \
+	sun/io/ByteToCharJIS0201.java \
+	sun/io/ByteToCharJIS0208.java \
+	sun/io/ByteToCharJIS0208_Solaris.java \
+	sun/io/ByteToCharJIS0212.java \
+	sun/io/ByteToCharJIS0212_Solaris.java \
+	sun/io/ByteToCharEUC_CN.java \
+	sun/io/ByteToCharEUC_JP.java \
+	sun/io/ByteToCharEUC_JP_LINUX.java \
+	sun/io/ByteToCharEUC_JP_Solaris.java \
+	sun/io/ByteToCharEUC_KR.java \
+	sun/io/ByteToCharEUC_TW.java \
+	sun/io/ByteToCharSJIS.java \
+	sun/io/ByteToCharPCK.java \
+	sun/io/ByteToCharGBK.java \
+	sun/io/ByteToCharISCII91.java \
+	sun/io/ByteToCharISO2022.java \
+	sun/io/ByteToCharISO2022CN.java \
+	sun/io/ByteToCharISO2022JP.java \
+	sun/io/ByteToCharISO2022KR.java \
+	sun/io/ByteToCharISO8859_3.java \
+	sun/io/ByteToCharISO8859_6.java \
+	sun/io/ByteToCharISO8859_8.java \
+	sun/io/ByteToCharJISAutoDetect.java \
+	sun/io/ByteToCharJohab.java \
+	sun/io/ByteToCharMS874.java \
+	sun/io/ByteToCharMS932.java \
+	sun/io/ByteToCharMS936.java \
+	sun/io/ByteToCharMS949.java \
+	sun/io/ByteToCharMS950.java \
+	sun/io/ByteToCharMacArabic.java \
+	sun/io/ByteToCharMacCentralEurope.java \
+	sun/io/ByteToCharMacCroatian.java \
+	sun/io/ByteToCharMacCyrillic.java \
+	sun/io/ByteToCharMacDingbat.java \
+	sun/io/ByteToCharMacGreek.java \
+	sun/io/ByteToCharMacHebrew.java \
+	sun/io/ByteToCharMacIceland.java \
+	sun/io/ByteToCharMacRoman.java \
+	sun/io/ByteToCharMacRomania.java \
+	sun/io/ByteToCharMacSymbol.java \
+	sun/io/ByteToCharMacThai.java \
+	sun/io/ByteToCharMacTurkish.java \
+	sun/io/ByteToCharMacUkraine.java \
+	sun/io/ByteToCharTIS620.java \
+	sun/io/CharToByteBig5.java \
+	sun/io/CharToByteBig5_Solaris.java \
+	sun/io/CharToByteBig5_HKSCS.java \
+	sun/io/CharToByteHKSCS.java \
+	sun/io/CharToByteHKSCS_2001.java \
+	sun/io/CharToByteMS950_HKSCS.java \
+	sun/io/CharToByteGB18030.java \
+	sun/io/CharToByteCp037.java \
+	sun/io/CharToByteCp1006.java \
+	sun/io/CharToByteCp1025.java \
+	sun/io/CharToByteCp1026.java \
+	sun/io/CharToByteCp1046.java \
+	sun/io/CharToByteCp1047.java \
+	sun/io/CharToByteCp1097.java \
+	sun/io/CharToByteCp1098.java \
+	sun/io/CharToByteCp1112.java \
+	sun/io/CharToByteCp1122.java \
+	sun/io/CharToByteCp1123.java \
+	sun/io/CharToByteCp1124.java \
+	sun/io/CharToByteCp1140.java \
+	sun/io/CharToByteCp1141.java \
+	sun/io/CharToByteCp1142.java \
+	sun/io/CharToByteCp1143.java \
+	sun/io/CharToByteCp1144.java \
+	sun/io/CharToByteCp1145.java \
+	sun/io/CharToByteCp1146.java \
+	sun/io/CharToByteCp1147.java \
+	sun/io/CharToByteCp1148.java \
+	sun/io/CharToByteCp1149.java \
+	sun/io/CharToByteCp1255.java \
+	sun/io/CharToByteCp1256.java \
+	sun/io/CharToByteCp1258.java \
+	sun/io/CharToByteCp1381.java \
+	sun/io/CharToByteCp1383.java \
+	sun/io/CharToByteCp273.java \
+	sun/io/CharToByteCp277.java \
+	sun/io/CharToByteCp278.java \
+	sun/io/CharToByteCp280.java \
+	sun/io/CharToByteCp284.java \
+	sun/io/CharToByteCp285.java \
+	sun/io/CharToByteCp297.java \
+	sun/io/CharToByteCp33722.java \
+	sun/io/CharToByteCp420.java \
+	sun/io/CharToByteCp424.java \
+	sun/io/CharToByteCp437.java \
+	sun/io/CharToByteCp500.java \
+	sun/io/CharToByteCp737.java \
+	sun/io/CharToByteCp775.java \
+	sun/io/CharToByteCp834.java \
+	sun/io/CharToByteCp838.java \
+	sun/io/CharToByteCp850.java \
+	sun/io/CharToByteCp852.java \
+	sun/io/CharToByteCp855.java \
+	sun/io/CharToByteCp856.java \
+	sun/io/CharToByteCp857.java \
+	sun/io/CharToByteCp858.java \
+	sun/io/CharToByteCp860.java \
+	sun/io/CharToByteCp861.java \
+	sun/io/CharToByteCp862.java \
+	sun/io/CharToByteCp863.java \
+	sun/io/CharToByteCp864.java \
+	sun/io/CharToByteCp865.java \
+	sun/io/CharToByteCp866.java \
+	sun/io/CharToByteCp868.java \
+	sun/io/CharToByteCp869.java \
+	sun/io/CharToByteCp870.java \
+	sun/io/CharToByteCp871.java \
+	sun/io/CharToByteCp874.java \
+	sun/io/CharToByteCp875.java \
+	sun/io/CharToByteCp918.java \
+	sun/io/CharToByteCp921.java \
+	sun/io/CharToByteCp922.java \
+	sun/io/CharToByteCp930.java \
+	sun/io/CharToByteCp933.java \
+	sun/io/CharToByteCp935.java \
+	sun/io/CharToByteCp937.java \
+	sun/io/CharToByteCp939.java \
+	sun/io/CharToByteCp942.java \
+	sun/io/CharToByteCp942C.java \
+	sun/io/CharToByteCp943.java \
+	sun/io/CharToByteCp943C.java \
+	sun/io/CharToByteCp948.java \
+	sun/io/CharToByteCp949.java \
+	sun/io/CharToByteCp949C.java \
+	sun/io/CharToByteCp950.java \
+	sun/io/CharToByteCp964.java \
+	sun/io/CharToByteCp970.java \
+	sun/io/CharToByteJIS0201.java \
+	sun/io/CharToByteJIS0208.java \
+	sun/io/CharToByteJIS0208_Solaris.java \
+	sun/io/CharToByteJIS0212.java \
+	sun/io/CharToByteJIS0212_Solaris.java \
+	sun/io/CharToByteEUC_CN.java \
+	sun/io/CharToByteEUC_JP.java \
+	sun/io/CharToByteEUC_JP_LINUX.java \
+	sun/io/CharToByteEUC_JP_Solaris.java \
+	sun/io/CharToByteEUC_KR.java \
+	sun/io/CharToByteEUC_TW.java \
+	sun/io/CharToByteSJIS.java \
+	sun/io/CharToBytePCK.java \
+	sun/io/CharToByteGBK.java \
+	sun/io/CharToByteISCII91.java \
+	sun/io/CharToByteISO2022.java \
+	sun/io/CharToByteISO2022CN_CNS.java \
+	sun/io/CharToByteISO2022CN_GB.java \
+	sun/io/CharToByteISO2022JP.java \
+	sun/io/CharToByteISO2022KR.java \
+	sun/io/CharToByteISO8859_3.java \
+	sun/io/CharToByteISO8859_6.java \
+	sun/io/CharToByteISO8859_8.java \
+	sun/io/CharToByteJohab.java \
+	sun/io/CharToByteMS874.java \
+	sun/io/CharToByteMS932.java \
+	sun/io/CharToByteMS936.java \
+	sun/io/CharToByteMS949.java \
+	sun/io/CharToByteMS950.java \
+	sun/io/CharToByteMacArabic.java \
+	sun/io/CharToByteMacCentralEurope.java \
+	sun/io/CharToByteMacCroatian.java \
+	sun/io/CharToByteMacCyrillic.java \
+	sun/io/CharToByteMacDingbat.java \
+	sun/io/CharToByteMacGreek.java \
+	sun/io/CharToByteMacHebrew.java \
+	sun/io/CharToByteMacIceland.java \
+	sun/io/CharToByteMacRoman.java \
+	sun/io/CharToByteMacRomania.java \
+	sun/io/CharToByteMacSymbol.java \
+	sun/io/CharToByteMacThai.java \
+	sun/io/CharToByteMacTurkish.java \
+	sun/io/CharToByteMacUkraine.java \
+	sun/io/CharToByteTIS620.java
+
+FILES_gen_extcs = \
+	sun/nio/cs/ext/IBM037.java \
+	sun/nio/cs/ext/IBM1006.java \
+	sun/nio/cs/ext/IBM1025.java \
+	sun/nio/cs/ext/IBM1026.java \
+	sun/nio/cs/ext/IBM1046.java \
+	sun/nio/cs/ext/IBM1047.java \
+	sun/nio/cs/ext/IBM1097.java \
+	sun/nio/cs/ext/IBM1098.java \
+	sun/nio/cs/ext/IBM1112.java \
+	sun/nio/cs/ext/IBM1122.java \
+	sun/nio/cs/ext/IBM1123.java \
+	sun/nio/cs/ext/IBM1124.java \
+	sun/nio/cs/ext/IBM1140.java \
+	sun/nio/cs/ext/IBM1141.java \
+	sun/nio/cs/ext/IBM1142.java \
+	sun/nio/cs/ext/IBM1143.java \
+	sun/nio/cs/ext/IBM1144.java \
+	sun/nio/cs/ext/IBM1145.java \
+	sun/nio/cs/ext/IBM1146.java \
+	sun/nio/cs/ext/IBM1147.java \
+	sun/nio/cs/ext/IBM1148.java \
+	sun/nio/cs/ext/IBM1149.java \
+	sun/nio/cs/ext/IBM273.java \
+	sun/nio/cs/ext/IBM277.java \
+	sun/nio/cs/ext/IBM278.java \
+	sun/nio/cs/ext/IBM280.java \
+	sun/nio/cs/ext/IBM284.java \
+	sun/nio/cs/ext/IBM285.java \
+	sun/nio/cs/ext/IBM297.java \
+	sun/nio/cs/ext/IBM420.java \
+	sun/nio/cs/ext/IBM424.java \
+	sun/nio/cs/ext/IBM500.java \
+	sun/nio/cs/ext/IBM838.java \
+	sun/nio/cs/ext/IBM856.java \
+	sun/nio/cs/ext/IBM860.java \
+	sun/nio/cs/ext/IBM861.java \
+	sun/nio/cs/ext/IBM863.java \
+	sun/nio/cs/ext/IBM864.java \
+	sun/nio/cs/ext/IBM865.java \
+	sun/nio/cs/ext/IBM868.java \
+	sun/nio/cs/ext/IBM869.java \
+	sun/nio/cs/ext/IBM870.java \
+	sun/nio/cs/ext/IBM871.java \
+	sun/nio/cs/ext/IBM875.java \
+	sun/nio/cs/ext/IBM918.java \
+	sun/nio/cs/ext/IBM921.java \
+	sun/nio/cs/ext/IBM922.java \
+	sun/nio/cs/ext/ISO_8859_11.java \
+	sun/nio/cs/ext/ISO_8859_3.java \
+	sun/nio/cs/ext/ISO_8859_6.java \
+	sun/nio/cs/ext/ISO_8859_8.java \
+	sun/nio/cs/ext/MS1255.java \
+	sun/nio/cs/ext/MS1256.java \
+	sun/nio/cs/ext/MS1258.java \
+	sun/nio/cs/ext/MS874.java \
+	sun/nio/cs/ext/MacArabic.java \
+	sun/nio/cs/ext/MacCentralEurope.java \
+	sun/nio/cs/ext/MacCroatian.java \
+	sun/nio/cs/ext/MacCyrillic.java \
+	sun/nio/cs/ext/MacDingbat.java \
+	sun/nio/cs/ext/MacGreek.java \
+	sun/nio/cs/ext/MacHebrew.java \
+	sun/nio/cs/ext/MacIceland.java \
+	sun/nio/cs/ext/MacRoman.java \
+	sun/nio/cs/ext/MacRomania.java \
+	sun/nio/cs/ext/MacSymbol.java \
+	sun/nio/cs/ext/MacThai.java \
+	sun/nio/cs/ext/MacTurkish.java \
+	sun/nio/cs/ext/MacUkraine.java \
+	sun/nio/cs/ext/TIS_620.java \
+        sun/nio/cs/ext/EUC_TWMapping.java \
+	sun/nio/cs/ext/IBM1381.java \
+	sun/nio/cs/ext/IBM1383.java \
+	sun/nio/cs/ext/IBM930.java \
+	sun/nio/cs/ext/IBM933.java \
+	sun/nio/cs/ext/IBM935.java \
+	sun/nio/cs/ext/IBM937.java \
+	sun/nio/cs/ext/IBM939.java \
+	sun/nio/cs/ext/IBM942.java \
+	sun/nio/cs/ext/IBM943.java \
+	sun/nio/cs/ext/IBM948.java \
+	sun/nio/cs/ext/IBM949.java \
+	sun/nio/cs/ext/IBM950.java \
+	sun/nio/cs/ext/IBM970.java \
+	sun/nio/cs/ext/EUC_CN.java \
+	sun/nio/cs/ext/EUC_KR.java \
+	sun/nio/cs/ext/Johab.java \
+	sun/nio/cs/ext/MS932.java \
+	sun/nio/cs/ext/MS936.java \
+	sun/nio/cs/ext/MS949.java \
+	sun/nio/cs/ext/MS950.java \
+	sun/nio/cs/ext/GBK.java
+
+FILES_java = $(FILES_src) $(FILES_gen_extcs)
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/make/sun/nio/cs/Makefile	Fri Jan 15 15:36:54 2010 -0800
@@ -0,0 +1,112 @@
+#
+# Copyright 1996-2008 Sun Microsystems, Inc.  All Rights Reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation.  Sun designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+# CA 95054 USA or visit www.sun.com if you need additional information or
+# have any questions.
+#
+
+#
+# Makefile for character converters.
+#
+
+BUILDDIR = ../../..
+
+# charsets should be separated from nio module 
+MODULE  = charsets
+PACKAGE = sun.nio
+PRODUCT = sun
+
+# This re-directs all the class files to a separate location
+CLASSDESTDIR = $(TEMPDIR)/classes
+
+OTHER_JAVACFLAGS += -Xlint:serial -Werror
+include $(BUILDDIR)/common/Defs.gmk
+
+#
+# Files
+#
+include FILES_java.gmk
+AUTO_FILES_JAVA_DIRS = sun/nio/cs/ext
+
+# For Cygwin, command line arguments that are paths must be converted to
+# windows style paths. These paths cannot be used as targets, however, because 
+# the ":" in them  will interfere with GNU Make rules, generating "multiple
+# target pattern" errors.
+
+# this define is for the rule:
+CHARSETS_JAR = $(LIBDIR)/charsets.jar
+
+# extcs
+FILES_genout_extcs = $(FILES_gen_extcs:%.java=$(GENSRCDIR)/%.java)
+
+#
+# Rules
+#
+include $(BUILDDIR)/common/Classes.gmk
+
+build: $(FILES_genout_extcs) $(CHARSETS_JAR)
+
+#
+# Extra rules to build character converters.
+
+SERVICE_DESCRIPTION = java.nio.charset.spi.CharsetProvider
+SERVICE_DESCRIPTION_PATH = META-INF/services/$(SERVICE_DESCRIPTION)
+
+GENCSDATASRC = $(BUILDDIR)/tools/CharsetMapping
+GENCSSRCDIR = $(BUILDDIR)/tools/src/build/tools/charsetmapping
+GENCSEXT = $(GENSRCDIR)/sun/nio/cs/ext
+
+FILES_MAP = $(GENCSDATASRC)/sjis0213.map
+FILES_DAT = $(CLASSDESTDIR)/sun/nio/cs/ext/sjis0213.dat
+CHARSETMAPPING_JARFILE = $(BUILDTOOLJARDIR)/charsetmapping.jar
+
+$(FILES_DAT): $(FILES_MAP)
+	@$(prep-target)
+	$(BOOT_JAVA_CMD) -jar $(CHARSETMAPPING_JARFILE) \
+		$(FILES_MAP) $(FILES_DAT) sjis0213
+
+
+$(FILES_genout_extcs): \
+                $(GENCSDATASRC)/SingleByte-X.java.template  \
+		$(GENCSDATASRC)/DoubleByte-X.java.template \
+		$(GENCSDATASRC)/extsbcs $(GENCSDATASRC)/dbcs
+	@$(prep-target)
+	$(RM) -r $(GENCSEXT)
+	$(MKDIR) -p $(GENCSEXT)
+	$(BOOT_JAVA_CMD) -jar $(CHARSETMAPPING_JARFILE)	$(GENCSDATASRC) $(GENCSEXT) extsbcs
+	$(BOOT_JAVA_CMD) -jar $(CHARSETMAPPING_JARFILE) $(GENCSDATASRC) $(GENCSEXT) euctw \
+		$(GENCSSRCDIR)/GenerateEUC_TW.java
+	$(BOOT_JAVA_CMD) -jar $(CHARSETMAPPING_JARFILE) $(GENCSDATASRC) $(GENCSEXT) dbcs
+
+$(CLASSDESTDIR)/$(SERVICE_DESCRIPTION_PATH): \
+  $(SHARE_SRC)/classes/sun/nio/cs/ext/$(SERVICE_DESCRIPTION_PATH)
+	$(install-file)
+
+$(CHARSETS_JAR): $(FILES_class) $(CLASSDESTDIR)/$(SERVICE_DESCRIPTION_PATH) $(FILES_DAT)
+	$(BOOT_JAR_CMD) cf0 $(CHARSETS_JAR) \
+	      -C $(CLASSDESTDIR) sun \
+	      -C $(CLASSDESTDIR) $(SERVICE_DESCRIPTION_PATH)  \
+	      $(BOOT_JAR_JFLAGS)
+	@$(java-vm-cleanup)
+
+clean::
+	$(RM) -r $(CLASSDESTDIR)
+	$(RM) $(CHARSETS_JAR)
--- a/jdk/make/sun/org/mozilla/javascript/Makefile	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/make/sun/org/mozilla/javascript/Makefile	Fri Jan 15 15:36:54 2010 -0800
@@ -28,6 +28,7 @@
 #
 
 BUILDDIR = ../../../..
+MODULE  = scripting-rhino
 PACKAGE = sun.org.mozilla.javascript.internal
 PRODUCT = sun
 include $(BUILDDIR)/common/Defs.gmk
--- a/jdk/make/sun/pisces/Makefile	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/make/sun/pisces/Makefile	Fri Jan 15 15:36:54 2010 -0800
@@ -24,6 +24,7 @@
 #
 
 BUILDDIR = ../..
+MODULE  = java2d
 PACKAGE = sun.pisces
 PRODUCT = sun
 include $(BUILDDIR)/common/Defs.gmk
--- a/jdk/make/sun/rmi/cgi/Makefile	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/make/sun/rmi/cgi/Makefile	Fri Jan 15 15:36:54 2010 -0800
@@ -28,6 +28,8 @@
 #
 
 BUILDDIR = ../../..
+# java-rmi.cgi is a JDK tool
+MODULE  = tools
 PACKAGE = sun.rmi
 PRODUCT = sun
 PROGRAM = java-rmi
--- a/jdk/make/sun/rmi/oldtools/Makefile	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/make/sun/rmi/oldtools/Makefile	Fri Jan 15 15:36:54 2010 -0800
@@ -28,6 +28,7 @@
 #
 
 BUILDDIR = ../../..
+MODULE   = oldjavac
 PRODUCT	 = oldjavac
 
 include $(BUILDDIR)/common/Defs.gmk
--- a/jdk/make/sun/rmi/registry/Makefile	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/make/sun/rmi/registry/Makefile	Fri Jan 15 15:36:54 2010 -0800
@@ -28,6 +28,7 @@
 #
 
 BUILDDIR = ../../..
+MODULE  = rmi
 PACKAGE = sun.rmi.registry
 PRODUCT = sun
 include $(BUILDDIR)/common/Defs.gmk
@@ -48,3 +49,7 @@
 #
 include $(BUILDDIR)/common/Classes.gmk
 
+build: rmiregistry
+
+rmiregistry:
+	$(call make-launcher, rmiregistry, sun.rmi.registry.RegistryImpl, , )
--- a/jdk/make/sun/rmi/rmi/Makefile	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/make/sun/rmi/rmi/Makefile	Fri Jan 15 15:36:54 2010 -0800
@@ -28,6 +28,7 @@
 #
 
 BUILDDIR = ../../..
+MODULE  = rmi
 PACKAGE = sun.rmi
 PRODUCT = sun
 LIBRARY = rmi
@@ -124,7 +125,7 @@
 
 $(BINDIR)/java-rmi.cgi: $(PLATFORM_SRC)/bin/java-rmi.cgi.sh
 	$(install-file)
-	$(CHMOD) a+x $@
+	$(call chmod-file, a+x)
 
 bin.clean:
 	$(RM) $(BINDIR)/java-rmi.cgi
--- a/jdk/make/sun/rmi/rmic/Makefile	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/make/sun/rmi/rmic/Makefile	Fri Jan 15 15:36:54 2010 -0800
@@ -28,6 +28,7 @@
 #
 
 BUILDDIR = ../../..
+MODULE  = rmic
 PACKAGE = sun.rmi.rmic
 PRODUCT = sun
 include $(BUILDDIR)/common/Defs.gmk
--- a/jdk/make/sun/rmi/rmid/Makefile	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/make/sun/rmi/rmid/Makefile	Fri Jan 15 15:36:54 2010 -0800
@@ -29,11 +29,12 @@
 #
 
 BUILDDIR = ../../..
+MODULE  = rmi-activation
 PACKAGE = sun.rmi.activation
 PRODUCT = sun
 include $(BUILDDIR)/common/Defs.gmk
 
-build: stubs 
+build: stubs rmid
 
 #
 # Resources
@@ -75,4 +76,5 @@
 #
 include $(BUILDDIR)/common/Classes.gmk
 
-
+rmid:
+	$(call make-launcher, rmid, sun.rmi.server.Activation, , )
--- a/jdk/make/sun/security/ec/Makefile	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/make/sun/security/ec/Makefile	Fri Jan 15 15:36:54 2010 -0800
@@ -89,6 +89,7 @@
 #
 
 BUILDDIR = ../../..
+MODULE  = security-sunec
 PACKAGE = sun.security.ec
 PRODUCT = sun
 
@@ -308,7 +309,7 @@
 else
 $(JAR_DESTFILE): $(SIGNED_DIR)/sunec.jar
 endif
-	$(install-file)
+	$(install-non-module-file)
 
 ifndef OPENJDK
 install-prebuilt:
--- a/jdk/make/sun/security/jgss/wrapper/Makefile	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/make/sun/security/jgss/wrapper/Makefile	Fri Jan 15 15:36:54 2010 -0800
@@ -24,6 +24,7 @@
 #
 
 BUILDDIR = ../../../..
+MODULE  = security-kerberos
 PACKAGE = sun.security.jgss.wrapper
 PRODUCT = sun
 
--- a/jdk/make/sun/security/krb5/Makefile	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/make/sun/security/krb5/Makefile	Fri Jan 15 15:36:54 2010 -0800
@@ -24,6 +24,7 @@
 #
 
 BUILDDIR = ../../..
+MODULE  = security-kerberos
 PACKAGE = sun.security.krb5
 PRODUCT = sun
 include $(BUILDDIR)/common/Defs.gmk
@@ -77,3 +78,10 @@
 else
   OTHER_LDLIBS = -ldl $(JVMLIB)
 endif
+
+build:
+ifeq ($(PLATFORM),windows)
+	$(call make-launcher, kinit, sun.security.krb5.internal.tools.Kinit, , )
+	$(call make-launcher, klist, sun.security.krb5.internal.tools.Klist, , )
+	$(call make-launcher, ktab, sun.security.krb5.internal.tools.Ktab, , )
+endif
--- a/jdk/make/sun/security/mscapi/Makefile	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/make/sun/security/mscapi/Makefile	Fri Jan 15 15:36:54 2010 -0800
@@ -89,6 +89,7 @@
 #
 
 BUILDDIR = ../../..
+MODULE  = security-sunmscapi
 PACKAGE = sun.security.mscapi
 LIBRARY = sunmscapi
 PRODUCT = sun
@@ -271,7 +272,7 @@
 else
 $(JAR_DESTFILE): $(SIGNED_DIR)/sunmscapi.jar
 endif
-	$(install-file)
+	$(install-non-module-file)
 
 ifndef OPENJDK
 install-prebuilt:
--- a/jdk/make/sun/security/pkcs11/Makefile	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/make/sun/security/pkcs11/Makefile	Fri Jan 15 15:36:54 2010 -0800
@@ -89,6 +89,7 @@
 #
 
 BUILDDIR = ../../..
+MODULE  = security-sunpkcs11
 PACKAGE = sun.security.pkcs11
 LIBRARY = j2pkcs11
 PRODUCT = sun
@@ -161,6 +162,16 @@
   OTHER_LDLIBS = -ldl $(JVMLIB)
 endif
 
+# Other config files
+SUNPKCS11_CFG   =
+
+ifeq ($(PLATFORM), solaris)
+SUNPKCS11_CFG   = sunpkcs11-cfg
+endif # PLATFORM
+
+SUNPKCS11_CFG_SRC   = $(TOPDIR)/src/share/lib/security/sunpkcs11-solaris.cfg
+SUNPKCS11_CFG_BUILD = $(LIBDIR)/security/sunpkcs11-solaris.cfg
+
 #
 # We use a variety of subdirectories in the $(TEMPDIR) depending on what
 # part of the build we're doing.  Both OPENJDK/JDK builds are initially
@@ -174,12 +185,17 @@
 #
 
 ifdef OPENJDK
-all: build-jar install-jar
+all: $(SUNPKCS11_CFG) build-jar install-jar
 else
-all: build-jar install-prebuilt
+all: $(SUNPKCS11_CFG) build-jar install-prebuilt
 	$(build-warning)
 endif
 
+sunpkcs11-cfg: $(SUNPKCS11_CFG_BUILD)
+
+$(SUNPKCS11_CFG_BUILD): $(SUNPKCS11_CFG_SRC)
+	$(install-file)
+
 include $(BUILDDIR)/javax/crypto/Defs-jce.gmk
 
 
@@ -271,7 +287,7 @@
 else
 $(JAR_DESTFILE): $(SIGNED_DIR)/sunpkcs11.jar
 endif
-	$(install-file)
+	$(install-non-module-file)
 
 ifndef OPENJDK
 install-prebuilt:
@@ -287,6 +303,7 @@
 
 clobber clean::
 	$(RM) -r $(JAR_DESTFILE) $(TEMPDIR) $(JCE_BUILD_DIR)
+	$(RM) $(SUNPKCS11_CFG_BUILD) 
 
 .PHONY: build-jar jar install-jar
 ifndef OPENJDK
--- a/jdk/make/sun/security/smartcardio/Makefile	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/make/sun/security/smartcardio/Makefile	Fri Jan 15 15:36:54 2010 -0800
@@ -24,6 +24,7 @@
 #
 
 BUILDDIR = ../../..
+MODULE  = security-smartcardio
 PACKAGE = sun.security.smartcardio
 LIBRARY = j2pcsc
 PRODUCT = sun
--- a/jdk/make/sun/security/tools/Makefile	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/make/sun/security/tools/Makefile	Fri Jan 15 15:36:54 2010 -0800
@@ -24,6 +24,7 @@
 #
 
 BUILDDIR = ../../..
+MODULE  = security-tools
 PACKAGE = sun.security.tools
 PRODUCT = sun
 include $(BUILDDIR)/common/Defs.gmk
@@ -44,3 +45,7 @@
 #
 include $(BUILDDIR)/common/Classes.gmk
 
+build:
+	$(call make-launcher, keytool, sun.security.tools.KeyTool, , )
+	$(call make-launcher, policytool, sun.security.tools.PolicyTool, , )
+
--- a/jdk/make/sun/serialver/Makefile	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/make/sun/serialver/Makefile	Fri Jan 15 15:36:54 2010 -0800
@@ -28,6 +28,7 @@
 #
 
 BUILDDIR = ../..
+MODULE  = serialver
 PACKAGE = sun.tools.serialver
 PRODUCT = sun
 include $(BUILDDIR)/common/Defs.gmk
--- a/jdk/make/sun/splashscreen/Makefile	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/make/sun/splashscreen/Makefile	Fri Jan 15 15:36:54 2010 -0800
@@ -24,6 +24,7 @@
 #
 
 BUILDDIR = ../..
+MODULE  = awt
 PACKAGE = sun.awt
 LIBRARY = splashscreen
 PRODUCT = sun
--- a/jdk/make/sun/text/Makefile	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/make/sun/text/Makefile	Fri Jan 15 15:36:54 2010 -0800
@@ -29,6 +29,7 @@
 
 BUILDDIR = ../..
 
+MODULE  = localedata
 PACKAGE = sun.text
 PRODUCT = sun
 
--- a/jdk/make/sun/tools/Makefile	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/make/sun/tools/Makefile	Fri Jan 15 15:36:54 2010 -0800
@@ -28,6 +28,7 @@
 #
 
 BUILDDIR = ../..
+MODULE  = tools
 PACKAGE = sun.tools
 PRODUCT = sun
 include $(BUILDDIR)/common/Defs.gmk
--- a/jdk/make/sun/tracing/dtrace/Makefile	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/make/sun/tracing/dtrace/Makefile	Fri Jan 15 15:36:54 2010 -0800
@@ -27,6 +27,7 @@
 # Makefile for building dtrace extension
 #
 BUILDDIR = ../../..
+MODULE  = tracing
 PACKAGE = sun.tracing.dtrace
 LIBRARY = jsdt
 PRODUCT = sun
--- a/jdk/make/sun/xawt/Makefile	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/make/sun/xawt/Makefile	Fri Jan 15 15:36:54 2010 -0800
@@ -24,6 +24,7 @@
 #
 
 BUILDDIR = ../..
+MODULE  = awt
 PACKAGE = sun.awt.X11
 LIBRARY = mawt
 LIBRARY_OUTPUT = xawt
--- a/jdk/src/share/classes/java/lang/Deprecated.java	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/src/share/classes/java/lang/Deprecated.java	Fri Jan 15 15:36:54 2010 -0800
@@ -26,6 +26,7 @@
 package java.lang;
 
 import java.lang.annotation.*;
+import static java.lang.annotation.ElementType.*;
 
 /**
  * A program element annotated &#64;Deprecated is one that programmers
@@ -38,5 +39,6 @@
  */
 @Documented
 @Retention(RetentionPolicy.RUNTIME)
+@Target(value={CONSTRUCTOR, FIELD, LOCAL_VARIABLE, METHOD, PACKAGE, PARAMETER, TYPE})
 public @interface Deprecated {
 }
--- a/jdk/src/share/classes/java/lang/Error.java	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/src/share/classes/java/lang/Error.java	Fri Jan 15 15:36:54 2010 -0800
@@ -26,27 +26,31 @@
 package java.lang;
 
 /**
- * An <code>Error</code> is a subclass of <code>Throwable</code>
+ * An {@code Error} is a subclass of {@code Throwable}
  * that indicates serious problems that a reasonable application
  * should not try to catch. Most such errors are abnormal conditions.
- * The <code>ThreadDeath</code> error, though a "normal" condition,
- * is also a subclass of <code>Error</code> because most applications
+ * The {@code ThreadDeath} error, though a "normal" condition,
+ * is also a subclass of {@code Error} because most applications
  * should not try to catch it.
  * <p>
- * A method is not required to declare in its <code>throws</code>
- * clause any subclasses of <code>Error</code> that might be thrown
+ * A method is not required to declare in its {@code throws}
+ * clause any subclasses of {@code Error} that might be thrown
  * during the execution of the method but not caught, since these
  * errors are abnormal conditions that should never occur.
  *
+ * That is, {@code Error} and its subclasses are regarded as unchecked
+ * exceptions for the purposes of compile-time checking of exceptions.
+ *
  * @author  Frank Yellin
  * @see     java.lang.ThreadDeath
+ * @jls3 11.2 Compile-Time Checking of Exceptions
  * @since   JDK1.0
  */
 public class Error extends Throwable {
     static final long serialVersionUID = 4980196508277280342L;
 
     /**
-     * Constructs a new error with <code>null</code> as its detail message.
+     * Constructs a new error with {@code null} as its detail message.
      * The cause is not initialized, and may subsequently be initialized by a
      * call to {@link #initCause}.
      */
@@ -69,7 +73,7 @@
     /**
      * Constructs a new error with the specified detail message and
      * cause.  <p>Note that the detail message associated with
-     * <code>cause</code> is <i>not</i> automatically incorporated in
+     * {@code cause} is <i>not</i> automatically incorporated in
      * this error's detail message.
      *
      * @param  message the detail message (which is saved for later retrieval
--- a/jdk/src/share/classes/java/lang/Exception.java	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/src/share/classes/java/lang/Exception.java	Fri Jan 15 15:36:54 2010 -0800
@@ -26,19 +26,27 @@
 package java.lang;
 
 /**
- * The class <code>Exception</code> and its subclasses are a form of
- * <code>Throwable</code> that indicates conditions that a reasonable
+ * The class {@code Exception} and its subclasses are a form of
+ * {@code Throwable} that indicates conditions that a reasonable
  * application might want to catch.
  *
+ * <p>The class {@code Exception} and any subclasses that are not also
+ * subclasses of {@link RuntimeException} are <em>checked
+ * exceptions</em>.  Checked exceptions need to be declared in a
+ * method or constructor's {@code throws} clause if they can be thrown
+ * by the execution of the method or constructor and propagate outside
+ * the method or constructor boundary.
+ *
  * @author  Frank Yellin
  * @see     java.lang.Error
+ * @jls3 11.2 Compile-Time Checking of Exceptions
  * @since   JDK1.0
  */
 public class Exception extends Throwable {
     static final long serialVersionUID = -3387516993124229948L;
 
     /**
-     * Constructs a new exception with <code>null</code> as its detail message.
+     * Constructs a new exception with {@code null} as its detail message.
      * The cause is not initialized, and may subsequently be initialized by a
      * call to {@link #initCause}.
      */
@@ -61,7 +69,7 @@
     /**
      * Constructs a new exception with the specified detail message and
      * cause.  <p>Note that the detail message associated with
-     * <code>cause</code> is <i>not</i> automatically incorporated in
+     * {@code cause} is <i>not</i> automatically incorporated in
      * this exception's detail message.
      *
      * @param  message the detail message (which is saved for later retrieval
--- a/jdk/src/share/classes/java/lang/RuntimeException.java	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/src/share/classes/java/lang/RuntimeException.java	Fri Jan 15 15:36:54 2010 -0800
@@ -26,22 +26,24 @@
 package java.lang;
 
 /**
- * <code>RuntimeException</code> is the superclass of those
+ * {@code RuntimeException} is the superclass of those
  * exceptions that can be thrown during the normal operation of the
  * Java Virtual Machine.
- * <p>
- * A method is not required to declare in its <code>throws</code>
- * clause any subclasses of <code>RuntimeException</code> that might
- * be thrown during the execution of the method but not caught.
  *
+ * <p>{@code RuntimeException} and its subclasses are <em>unchecked
+ * exceptions</em>.  Unchecked exceptions do <em>not</em> need to be
+ * declared in a method or constructor's {@code throws} clause if they
+ * can be thrown by the execution of the method or constructor and
+ * propagate outside the method or constructor boundary.
  *
  * @author  Frank Yellin
+ * @jls3 11.2 Compile-Time Checking of Exceptions
  * @since   JDK1.0
  */
 public class RuntimeException extends Exception {
     static final long serialVersionUID = -7034897190745766939L;
 
-    /** Constructs a new runtime exception with <code>null</code> as its
+    /** Constructs a new runtime exception with {@code null} as its
      * detail message.  The cause is not initialized, and may subsequently be
      * initialized by a call to {@link #initCause}.
      */
@@ -63,7 +65,7 @@
     /**
      * Constructs a new runtime exception with the specified detail message and
      * cause.  <p>Note that the detail message associated with
-     * <code>cause</code> is <i>not</i> automatically incorporated in
+     * {@code cause} is <i>not</i> automatically incorporated in
      * this runtime exception's detail message.
      *
      * @param  message the detail message (which is saved for later retrieval
--- a/jdk/src/share/classes/java/lang/SuppressWarnings.java	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/src/share/classes/java/lang/SuppressWarnings.java	Fri Jan 15 15:36:54 2010 -0800
@@ -26,7 +26,6 @@
 package java.lang;
 
 import java.lang.annotation.*;
-import java.lang.annotation.ElementType;
 import static java.lang.annotation.ElementType.*;
 
 /**
@@ -45,7 +44,7 @@
  * @since 1.5
  * @author Josh Bloch
  */
-@Target({TYPE, FIELD, METHOD, PARAMETER, CONSTRUCTOR, LOCAL_VARIABLE})
+@Target({TYPE, FIELD, METHOD, PARAMETER, CONSTRUCTOR, LOCAL_VARIABLE, TYPE_PARAMETER})
 @Retention(RetentionPolicy.SOURCE)
 public @interface SuppressWarnings {
     /**
--- a/jdk/src/share/classes/java/lang/Throwable.java	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/src/share/classes/java/lang/Throwable.java	Fri Jan 15 15:36:54 2010 -0800
@@ -34,6 +34,11 @@
  * this class or one of its subclasses can be the argument type in a
  * <code>catch</code> clause.
  *
+ * For the purposes of compile-time checking of exceptions, {@code
+ * Throwable} and any subclass of {@code Throwable} that is not also a
+ * subclass of either {@link RuntimeException} or {@link Error} are
+ * regarded as checked exceptions.
+ *
  * <p>Instances of two subclasses, {@link java.lang.Error} and
  * {@link java.lang.Exception}, are conventionally used to indicate
  * that exceptional situations have occurred. Typically, these instances
@@ -142,6 +147,7 @@
  * @author  unascribed
  * @author  Josh Bloch (Added exception chaining and programmatic access to
  *          stack trace in 1.4.)
+ * @jls3 11.2 Compile-Time Checking of Exceptions
  * @since JDK1.0
  */
 public class Throwable implements Serializable {
--- a/jdk/src/share/classes/java/util/NavigableMap.java	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/src/share/classes/java/util/NavigableMap.java	Fri Jan 15 15:36:54 2010 -0800
@@ -298,7 +298,7 @@
      * Returns a view of the portion of this map whose keys range from
      * {@code fromKey} to {@code toKey}.  If {@code fromKey} and
      * {@code toKey} are equal, the returned map is empty unless
-     * {@code fromExclusive} and {@code toExclusive} are both true.  The
+     * {@code fromInclusive} and {@code toInclusive} are both true.  The
      * returned map is backed by this map, so changes in the returned map are
      * reflected in this map, and vice-versa.  The returned map supports all
      * optional map operations that this map supports.
--- a/jdk/src/share/classes/java/util/NavigableSet.java	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/src/share/classes/java/util/NavigableSet.java	Fri Jan 15 15:36:54 2010 -0800
@@ -192,7 +192,7 @@
      * Returns a view of the portion of this set whose elements range from
      * {@code fromElement} to {@code toElement}.  If {@code fromElement} and
      * {@code toElement} are equal, the returned set is empty unless {@code
-     * fromExclusive} and {@code toExclusive} are both true.  The returned set
+     * fromInclusive} and {@code toInclusive} are both true.  The returned set
      * is backed by this set, so changes in the returned set are reflected in
      * this set, and vice-versa.  The returned set supports all optional set
      * operations that this set supports.
--- a/jdk/src/share/classes/sun/nio/fs/AbstractWatchKey.java	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/src/share/classes/sun/nio/fs/AbstractWatchKey.java	Fri Jan 15 15:36:54 2010 -0800
@@ -88,26 +88,24 @@
     final void signalEvent(WatchEvent.Kind<?> kind, Object context) {
         synchronized (this) {
             int size = events.size();
-            if (size > 1) {
-                // don't let list get too big
-                if (size >= MAX_EVENT_LIST_SIZE) {
-                    kind = StandardWatchEventKind.OVERFLOW;
-                    context = null;
+            if (size > 0) {
+                // if the previous event is an OVERFLOW event or this is a
+                // repeated event then we simply increment the counter
+                WatchEvent<?> prev = events.get(size-1);
+                if ((prev.kind() == StandardWatchEventKind.OVERFLOW) ||
+                    ((kind == prev.kind() &&
+                     Objects.equals(context, prev.context()))))
+                {
+                    ((Event<?>)prev).increment();
+                    return;
                 }
 
-                // repeated event
-                WatchEvent<?> prev = events.get(size-1);
-                if (kind == prev.kind()) {
-                    boolean isRepeat;
-                    if (context == null) {
-                        isRepeat = (prev.context() == null);
-                    } else {
-                        isRepeat = context.equals(prev.context());
-                    }
-                    if (isRepeat) {
-                        ((Event<?>)prev).increment();
-                        return;
-                    }
+                // if the list has reached the limit then drop pending events
+                // and queue an OVERFLOW event
+                if (size >= MAX_EVENT_LIST_SIZE) {
+                    events.clear();
+                    kind = StandardWatchEventKind.OVERFLOW;
+                    context = null;
                 }
             }
 
--- a/jdk/src/share/classes/sun/security/provider/certpath/OCSPResponse.java	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/src/share/classes/sun/security/provider/certpath/OCSPResponse.java	Fri Jan 15 15:36:54 2010 -0800
@@ -574,10 +574,18 @@
                             (singleExtDer.length);
                     for (int i = 0; i < singleExtDer.length; i++) {
                         Extension ext = new Extension(singleExtDer[i]);
-                        singleExtensions.put(ext.getId(), ext);
                         if (DEBUG != null) {
                             DEBUG.println("OCSP single extension: " + ext);
                         }
+                        // We don't support any extensions yet. Therefore, if it
+                        // is critical we must throw an exception because we
+                        // don't know how to process it.
+                        if (ext.isCritical()) {
+                            throw new IOException(
+                                "Unsupported OCSP critical extension: " +
+                                ext.getExtensionId());
+                        }
+                        singleExtensions.put(ext.getId(), ext);
                     }
                 } else {
                     singleExtensions = Collections.emptyMap();
--- a/jdk/src/solaris/classes/sun/nio/ch/SctpChannelImpl.java	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/src/solaris/classes/sun/nio/ch/SctpChannelImpl.java	Fri Jan 15 15:36:54 2010 -0800
@@ -38,7 +38,6 @@
 import java.nio.channels.ClosedChannelException;
 import java.nio.channels.ConnectionPendingException;
 import java.nio.channels.NoConnectionPendingException;
-import java.nio.channels.AlreadyBoundException;
 import java.nio.channels.AlreadyConnectedException;
 import java.nio.channels.NotYetBoundException;
 import java.nio.channels.NotYetConnectedException;
@@ -54,7 +53,6 @@
 import com.sun.nio.sctp.NotificationHandler;
 import com.sun.nio.sctp.SctpChannel;
 import com.sun.nio.sctp.SctpSocketOption;
-import sun.nio.ch.NativeDispatcher;
 import sun.nio.ch.PollArrayWrapper;
 import sun.nio.ch.SelChImpl;
 import static com.sun.nio.sctp.SctpStandardSocketOption.*;
@@ -69,9 +67,6 @@
 public class SctpChannelImpl extends SctpChannel
     implements SelChImpl
 {
-    /* Used to make native close and preClose calls */
-    private static NativeDispatcher nd;
-
     private final FileDescriptor fd;
 
     private final int fdVal;
@@ -182,7 +177,7 @@
                 synchronized (stateLock) {
                     ensureOpenAndUnconnected();
                     if (isBound())
-                        throw new AlreadyBoundException();
+                        SctpNet.throwAlreadyBoundException();
                     InetSocketAddress isa = (local == null) ?
                         new InetSocketAddress(0) : Net.checkAddress(local);
                     Net.bind(fd, isa.getAddress(), isa.getPort());
@@ -234,7 +229,7 @@
                     if (add) {
                         for (InetSocketAddress addr : localAddresses) {
                             if (addr.getAddress().equals(address)) {
-                                throw new AlreadyBoundException();
+                                SctpNet.throwAlreadyBoundException();
                             }
                         }
                     } else { /*removing */
@@ -370,7 +365,7 @@
                                 InetAddress ia = isa.getAddress();
                                 if (ia.isAnyLocalAddress())
                                     ia = InetAddress.getLocalHost();
-                                n = Net.connect(fd, ia, isa.getPort());
+                                n = SctpNet.connect(fdVal, ia, isa.getPort());
                                 if (  (n == IOStatus.INTERRUPTED)
                                       && isOpen())
                                     continue;
@@ -556,7 +551,7 @@
     @Override
     public void implCloseSelectableChannel() throws IOException {
         synchronized (stateLock) {
-            nd.preClose(fd);
+            SctpNet.preClose(fdVal);
 
             if (receiverThread != 0)
                 NativeThread.signal(receiverThread);
@@ -662,7 +657,7 @@
             /* Postpone the kill if there is a waiting reader
              * or writer thread. */
             if (receiverThread == 0 && senderThread == 0) {
-                nd.close(fd);
+                SctpNet.close(fdVal);
                 state = ChannelState.KILLED;
             } else {
                 state = ChannelState.KILLPENDING;
@@ -1097,6 +1092,5 @@
         java.security.AccessController.doPrivileged(
                 new sun.security.action.LoadLibraryAction("sctp"));
         initIDs();
-        nd = new SctpSocketDispatcher();
     }
 }
--- a/jdk/src/solaris/classes/sun/nio/ch/SctpMultiChannelImpl.java	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/src/solaris/classes/sun/nio/ch/SctpMultiChannelImpl.java	Fri Jan 15 15:36:54 2010 -0800
@@ -38,7 +38,6 @@
 import java.util.HashMap;
 import java.nio.ByteBuffer;
 import java.nio.channels.SelectionKey;
-import java.nio.channels.AlreadyBoundException;
 import java.nio.channels.ClosedChannelException;
 import java.nio.channels.NotYetBoundException;
 import java.nio.channels.spi.SelectorProvider;
@@ -63,9 +62,6 @@
 public class SctpMultiChannelImpl extends SctpMultiChannel
     implements SelChImpl
 {
-    /* Used to make native close and preClose calls */
-    private static NativeDispatcher nd;
-
     private final FileDescriptor fd;
 
     private final int fdVal;
@@ -140,7 +136,7 @@
                 synchronized (stateLock) {
                     ensureOpen();
                     if (isBound())
-                        throw new AlreadyBoundException();
+                        SctpNet.throwAlreadyBoundException();
                     InetSocketAddress isa = (local == null) ?
                         new InetSocketAddress(0) : Net.checkAddress(local);
 
@@ -155,7 +151,7 @@
                     if (isa.getAddress().isAnyLocalAddress())
                         wildcard = true;
 
-                    Net.listen(fd, backlog < 1 ? 50 : backlog);
+                    SctpNet.listen(fdVal, backlog < 1 ? 50 : backlog);
                 }
             }
         }
@@ -196,7 +192,7 @@
                     if (add) {
                         for (InetSocketAddress addr : localAddresses) {
                             if (addr.getAddress().equals(address)) {
-                                throw new AlreadyBoundException();
+                                SctpNet.throwAlreadyBoundException();
                             }
                         }
                     } else { /*removing */
@@ -284,7 +280,7 @@
     @Override
     public void implCloseSelectableChannel() throws IOException {
         synchronized (stateLock) {
-            nd.preClose(fd);
+            SctpNet.preClose(fdVal);
 
             if (receiverThread != 0)
                 NativeThread.signal(receiverThread);
@@ -375,7 +371,7 @@
 
             /* Postpone the kill if there is a thread sending or receiving. */
             if (receiverThread == 0 && senderThread == 0) {
-                nd.close(fd);
+                SctpNet.close(fdVal);
                 state = ChannelState.KILLED;
             } else {
                 state = ChannelState.KILLPENDING;
@@ -981,6 +977,5 @@
         Util.load();   /* loads nio & net native libraries */
         java.security.AccessController.doPrivileged(
                 new sun.security.action.LoadLibraryAction("sctp"));
-        nd = new SctpSocketDispatcher();
     }
 }
--- a/jdk/src/solaris/classes/sun/nio/ch/SctpNet.java	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/src/solaris/classes/sun/nio/ch/SctpNet.java	Fri Jan 15 15:36:54 2010 -0800
@@ -29,6 +29,7 @@
 import java.net.InetAddress;
 import java.net.InetSocketAddress;
 import java.net.SocketAddress;
+import java.nio.channels.AlreadyBoundException;
 import java.util.Set;
 import java.util.HashSet;
 import java.security.AccessController;
@@ -52,8 +53,29 @@
         return false;
     }
 
+    static boolean throwAlreadyBoundException() throws IOException {
+        throw new AlreadyBoundException();
+    }
+
+    static void listen(int fd, int backlog) throws IOException {
+        listen0(fd, backlog);
+    }
+
+    static int connect(int fd, InetAddress remote, int remotePort)
+            throws IOException {
+        return connect0(fd, remote, remotePort);
+    }
+
+    static void close(int fd) throws IOException {
+        close0(fd);
+    }
+
+    static void preClose(int fd) throws IOException {
+        preClose0(fd);
+    }
+
     /**
-     * @param  oneToone
+     * @param  oneToOne
      *         if {@code true} returns a one-to-one sctp socket, otherwise
      *         returns a one-to-many sctp socket
      */
@@ -240,6 +262,15 @@
     /* Native Methods */
     static native int socket0(boolean oneToOne) throws IOException;
 
+    static native void listen0(int fd, int backlog) throws IOException;
+
+    static native int connect0(int fd, InetAddress remote, int remotePort)
+        throws IOException;
+
+    static native void close0(int fd) throws IOException;
+
+    static native void preClose0(int fd) throws IOException;
+
     static native void bindx(int fd, InetAddress[] addrs, int port, int length,
             boolean add, boolean preferIPv6) throws IOException;
 
@@ -271,5 +302,11 @@
             throws IOException;
 
     static native void shutdown0(int fd, int assocId);
+
+    static native void init();
+
+    static {
+        init();
+    }
 }
 
--- a/jdk/src/solaris/classes/sun/nio/ch/SctpServerChannelImpl.java	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/src/solaris/classes/sun/nio/ch/SctpServerChannelImpl.java	Fri Jan 15 15:36:54 2010 -0800
@@ -33,7 +33,6 @@
 import java.util.Set;
 import java.util.HashSet;
 import java.nio.channels.SelectionKey;
-import java.nio.channels.AlreadyBoundException;
 import java.nio.channels.ClosedChannelException;
 import java.nio.channels.NotYetBoundException;
 import java.nio.channels.spi.SelectorProvider;
@@ -49,9 +48,6 @@
 public class SctpServerChannelImpl extends SctpServerChannel
     implements SelChImpl
 {
-    /* Used to make native close and preClose calls */
-    private static NativeDispatcher nd;
-
     private final FileDescriptor fd;
 
     private final int fdVal;
@@ -103,7 +99,7 @@
                 if (!isOpen())
                     throw new ClosedChannelException();
                 if (isBound())
-                    throw new AlreadyBoundException();
+                    SctpNet.throwAlreadyBoundException();
 
                 InetSocketAddress isa = (local == null) ?
                     new InetSocketAddress(0) : Net.checkAddress(local);
@@ -118,7 +114,7 @@
                     if (isa.getAddress().isAnyLocalAddress())
                         wildcard = true;
 
-                Net.listen(fd, backlog < 1 ? 50 : backlog);
+                SctpNet.listen(fdVal, backlog < 1 ? 50 : backlog);
             }
         }
         return this;
@@ -156,7 +152,7 @@
                 if (add) {
                     for (InetSocketAddress addr : localAddresses) {
                         if (addr.getAddress().equals(address)) {
-                            throw new AlreadyBoundException();
+                            SctpNet.throwAlreadyBoundException();
                         }
                     }
                 } else { /*removing */
@@ -261,7 +257,7 @@
     @Override
     public void implCloseSelectableChannel() throws IOException {
         synchronized (stateLock) {
-            nd.preClose(fd);
+            SctpNet.preClose(fdVal);
             if (thread != 0)
                 NativeThread.signal(thread);
             if (!isRegistered())
@@ -282,7 +278,7 @@
 
             // Postpone the kill if there is a thread in accept
             if (thread == 0) {
-                nd.close(fd);
+                SctpNet.close(fdVal);
                 state = ChannelState.KILLED;
             } else {
                 state = ChannelState.KILLPENDING;
@@ -423,7 +419,6 @@
         Util.load();   // loads nio & net native libraries
         java.security.AccessController.doPrivileged(
                 new sun.security.action.LoadLibraryAction("sctp"));
-        nd = new SctpSocketDispatcher();
         initIDs();
     }
 }
--- a/jdk/src/solaris/classes/sun/nio/ch/SctpSocketDispatcher.java	Fri Jan 15 09:06:57 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,68 +0,0 @@
-/*
- * Copyright 2009 Sun Microsystems, Inc.  All Rights Reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Sun designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
- * CA 95054 USA or visit www.sun.com if you need additional information or
- * have any questions.
- */
-package sun.nio.ch;
-
-import java.io.IOException;
-import java.io.FileDescriptor;
-
-/**
- * Only used for {@code close} and {@code preclose}. All other methods
- * throw {@code IOException}.
- */
-class SctpSocketDispatcher extends NativeDispatcher {
-    @Override
-    @SuppressWarnings("unused")
-    int read(FileDescriptor fd, long address, int len) throws IOException {
-         throw new IOException("Operation Unsupported");
-    }
-
-    @Override
-    @SuppressWarnings("unused")
-    long readv(FileDescriptor fd, long address, int len) throws IOException {
-         throw new IOException("Operation Unsupported");
-    }
-
-    @Override
-    @SuppressWarnings("unused")
-    int write(FileDescriptor fd, long address, int len) throws IOException {
-         throw new IOException("Operation Unsupported");
-    }
-
-    @Override
-    @SuppressWarnings("unused")
-    long writev(FileDescriptor fd, long address, int len) throws IOException {
-         throw new IOException("Operation Unsupported");
-    }
-
-    @Override
-    void close(FileDescriptor fd) throws IOException {
-        FileDispatcherImpl.close0(fd);
-    }
-
-    @Override
-    void preClose(FileDescriptor fd) throws IOException {
-        FileDispatcherImpl.preClose0(fd);
-    }
-}
--- a/jdk/src/solaris/native/sun/nio/ch/SctpNet.c	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/src/solaris/native/sun/nio/ch/SctpNet.c	Fri Jan 15 15:36:54 2010 -0800
@@ -48,6 +48,9 @@
     return JNI_VERSION_1_2;
 }
 
+static int preCloseFD = -1;     /* File descriptor to which we dup other fd's
+                                   before closing them for real */
+
 /**
  * Loads the native sctp library that contains the socket extension
  * functions, as well as locating the individual functions.
@@ -109,6 +112,23 @@
 
 /*
  * Class:     sun_nio_ch_SctpNet
+ * Method:    init
+ * Signature: ()V
+ */
+JNIEXPORT void JNICALL
+Java_sun_nio_ch_SctpNet_init
+  (JNIEnv *env, jclass cl) {
+    int sp[2];
+    if (socketpair(PF_UNIX, SOCK_STREAM, 0, sp) < 0) {
+        JNU_ThrowIOExceptionWithLastError(env, "socketpair failed");
+        return;
+    }
+    preCloseFD = sp[0];
+    close(sp[1]);
+}
+
+/*
+ * Class:     sun_nio_ch_SctpNet
  * Method:    socket0
  * Signature: (Z)I
  */
@@ -184,6 +204,76 @@
     free(sap);
 }
 
+/*
+ * Class:     sun_nio_ch_SctpNet
+ * Method:    listen0
+ * Signature: (II)V
+ */
+JNIEXPORT void JNICALL
+Java_sun_nio_ch_SctpNet_listen0
+  (JNIEnv *env, jclass cl, jint fd, jint backlog) {
+    if (listen(fd, backlog) < 0)
+        handleSocketError(env, errno);
+}
+
+/*
+ * Class:     sun_nio_ch_SctpNet
+ * Method:    connect0
+ * Signature: (ILjava/net/InetAddress;I)I
+ */
+JNIEXPORT jint JNICALL
+Java_sun_nio_ch_SctpNet_connect0
+  (JNIEnv *env, jclass clazz, int fd, jobject iao, jint port) {
+    SOCKADDR sa;
+    int sa_len = SOCKADDR_LEN;
+    int rv;
+
+    if (NET_InetAddressToSockaddr(env, iao, port, (struct sockaddr *) &sa,
+                                  &sa_len, JNI_TRUE) != 0) {
+        return IOS_THROWN;
+    }
+
+    rv = connect(fd, (struct sockaddr *)&sa, sa_len);
+    if (rv != 0) {
+        if (errno == EINPROGRESS) {
+            return IOS_UNAVAILABLE;
+        } else if (errno == EINTR) {
+            return IOS_INTERRUPTED;
+        }
+        return handleSocketError(env, errno);
+    }
+    return 1;
+}
+
+/*
+ * Class:     sun_nio_ch_SctpNet
+ * Method:    close0
+ * Signature: (I)V
+ */
+JNIEXPORT void JNICALL
+Java_sun_nio_ch_SctpNet_close0
+  (JNIEnv *env, jclass clazz, jint fd) {
+    if (fd != -1) {
+        int rv = close(fd);
+        if (rv < 0)
+            JNU_ThrowIOExceptionWithLastError(env, "Close failed");
+    }
+}
+
+/*
+ * Class:     sun_nio_ch_SctpNet
+ * Method:    preClose0
+ * Signature: (I)V
+ */
+JNIEXPORT void JNICALL
+Java_sun_nio_ch_SctpNet_preClose0
+  (JNIEnv *env, jclass clazz, jint fd) {
+    if (preCloseFD >= 0) {
+        if (dup2(preCloseFD, fd) < 0)
+            JNU_ThrowIOExceptionWithLastError(env, "dup2 failed");
+    }
+}
+
 void initializeISA
   (JNIEnv* env) {
     if (isaCls == 0) {
@@ -394,7 +484,7 @@
         arglen = sizeof(arg);
     }
 
-    if (setsockopt(fd, klevel, kopt, parg, arglen) < 0) {
+    if (NET_SetSockOpt(fd, klevel, kopt, parg, arglen) < 0) {
         JNU_ThrowByNameWithLastError(env, JNU_JAVANETPKG "SocketException",
                                      "sun_nio_ch_SctpNet.setIntOption0");
     }
@@ -427,7 +517,7 @@
         arglen = sizeof(result);
     }
 
-    if (getsockopt(fd, klevel, kopt, arg, &arglen) < 0) {
+    if (NET_GetSockOpt(fd, klevel, kopt, arg, &arglen) < 0) {
         JNU_ThrowByNameWithLastError(env, JNU_JAVANETPKG "SocketException",
                                      "sun.nio.ch.Net.getIntOption");
         return -1;
--- a/jdk/src/windows/classes/sun/nio/ch/WindowsAsynchronousFileChannelImpl.java	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/src/windows/classes/sun/nio/ch/WindowsAsynchronousFileChannelImpl.java	Fri Jan 15 15:36:54 2010 -0800
@@ -445,20 +445,17 @@
                 // allocate OVERLAPPED
                 overlapped = ioCache.add(result);
 
-                // synchronize on result to allow this thread handle the case
-                // where the read completes immediately.
-                synchronized (result) {
-                    n = readFile(handle, address, rem, position, overlapped);
-                    if (n == IOStatus.UNAVAILABLE) {
-                        // I/O is pending
-                        return;
-                    }
-                    // read completed immediately:
-                    // 1. update buffer position
-                    // 2. release waiters
-                    updatePosition(n);
+                // initiate read
+                n = readFile(handle, address, rem, position, overlapped);
+                if (n == IOStatus.UNAVAILABLE) {
+                    // I/O is pending
+                    return;
+                } else if (n == IOStatus.EOF) {
                     result.setResult(n);
+                } else {
+                    throw new InternalError("Unexpected result: " + n);
                 }
+
             } catch (Throwable x) {
                 // failed to initiate read
                 result.setFailure(toIOException(x));
@@ -466,12 +463,9 @@
                 end();
             }
 
-            // read failed or EOF so completion port will not be notified
-            if (n < 0 && overlapped != 0L) {
+            // release resources
+            if (overlapped != 0L)
                 ioCache.remove(overlapped);
-            }
-
-            // return direct buffer to cache if substituted
             releaseBufferIfSubstituted();
 
             // invoke completion handler
@@ -634,20 +628,15 @@
                 // allocate an OVERLAPPED structure
                 overlapped = ioCache.add(result);
 
-                // synchronize on result to allow this thread handle the case
-                // where the read completes immediately.
-                synchronized (result) {
-                    n = writeFile(handle, address, rem, position, overlapped);
-                    if (n == IOStatus.UNAVAILABLE) {
-                        // I/O is pending
-                        return;
-                    }
-                    // read completed immediately:
-                    // 1. update buffer position
-                    // 2. release waiters
-                    updatePosition(n);
-                    result.setResult(n);
+                // initiate the write
+                n = writeFile(handle, address, rem, position, overlapped);
+                if (n == IOStatus.UNAVAILABLE) {
+                    // I/O is pending
+                    return;
+                } else {
+                    throw new InternalError("Unexpected result: " + n);
                 }
+
             } catch (Throwable x) {
                 // failed to initiate read:
                 result.setFailure(toIOException(x));
--- a/jdk/src/windows/native/sun/nio/ch/WindowsAsynchronousFileChannelImpl.c	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/src/windows/native/sun/nio/ch/WindowsAsynchronousFileChannelImpl.c	Fri Jan 15 15:36:54 2010 -0800
@@ -39,7 +39,6 @@
     jlong handle, jlong address, jint len, jlong offset, jlong ov)
 {
     BOOL res;
-    DWORD nread = 0;
 
     OVERLAPPED* lpOverlapped = (OVERLAPPED*)jlong_to_ptr(ov);
     lpOverlapped->Offset = (DWORD)offset;
@@ -49,7 +48,7 @@
     res = ReadFile((HANDLE) jlong_to_ptr(handle),
                    (LPVOID) jlong_to_ptr(address),
                    (DWORD)len,
-                   &nread,
+                   NULL,
                    lpOverlapped);
 
     if (res == 0) {
@@ -62,7 +61,7 @@
         return IOS_THROWN;
     }
 
-    return (jint)nread;
+    return IOS_UNAVAILABLE;
 }
 
 JNIEXPORT jint JNICALL
@@ -70,7 +69,6 @@
     jlong handle, jlong address, jint len, jlong offset, jlong ov)
 {
     BOOL res;
-    DWORD nwritten = 0;
 
     OVERLAPPED* lpOverlapped = (OVERLAPPED*)jlong_to_ptr(ov);
     lpOverlapped->Offset = (DWORD)offset;
@@ -80,18 +78,18 @@
     res = WriteFile((HANDLE)jlong_to_ptr(handle),
                    (LPVOID) jlong_to_ptr(address),
                    (DWORD)len,
-                   &nwritten,
+                   NULL,
                    lpOverlapped);
 
     if (res == 0) {
         int error = GetLastError();
-        if (error == ERROR_IO_PENDING) {
+        if (error == ERROR_IO_PENDING)
             return IOS_UNAVAILABLE;
-        }
         JNU_ThrowIOExceptionWithLastError(env, "WriteFile failed");
         return IOS_THROWN;
     }
-    return (jint)nwritten;
+
+    return IOS_UNAVAILABLE;
 }
 
 JNIEXPORT jint JNICALL
--- a/jdk/test/com/sun/jdi/ProcessAttachTest.sh	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/test/com/sun/jdi/ProcessAttachTest.sh	Fri Jan 15 15:36:54 2010 -0800
@@ -54,10 +54,14 @@
 OS=`uname -s`
 
 case "$OS" in
-  Windows* | CYGWIN_NT*)
+  Windows*)
     PS=";"
     OS="Windows"
     ;;
+  CYGWIN*)
+    PS=";"
+    OS="CYGWIN"
+    ;;
   * )
     PS=":"
     ;;
@@ -67,16 +71,23 @@
 {
   OUTPUTFILE=${TESTCLASSES}/Debuggee.out
   ${JAVA} "$@" > ${OUTPUTFILE} &
-  pid="$!"
+  startpid="$!"
+  pid="${startpid}"
                                                                                                      
+  # CYGWIN startpid is not the native windows PID we want, get the WINPID
+  if [ "${OS}" = "CYGWIN" ]; then
+    sleep 2
+    ps -l -p ${startpid}
+    pid=`ps -l -p ${startpid} | tail -1 | awk '{print $4;}'`
+  fi
+  
   # MKS creates an intermediate shell to launch ${JAVA} so
-  # ${pid} is not the actual pid. We have put in a small sleep
+  # ${startpid} is not the actual pid. We have put in a small sleep
   # to give the intermediate shell process time to launch the
   # "java" process.
   if [ "$OS" = "Windows" ]; then
     sleep 2
-    realpid=`ps -o pid,ppid,comm|grep ${pid}|grep "java"|cut -c1-6`
-    pid=${realpid}
+    pid=`ps -o pid,ppid,comm|grep ${startpid}|grep "java"|cut -c1-6`
   fi
                                                                                                      
   echo "Waiting for Debuggee to initialize..."
@@ -91,7 +102,7 @@
     echo "Waiting $attempts second(s) ..."
   done
 
-  echo "Debuggee is process $pid"
+  echo "Debuggee is process $pid (startpid=${startpid})"
 }
 
 stopDebuggee()
@@ -100,7 +111,7 @@
   if [ $? != 0 ] ; then
     echo "Error: ShutdownDebuggee failed"
     failures=`expr $failures + 1`
-    kill -9 $pid
+    kill -9 ${startpid}
   fi
 }
 
@@ -123,7 +134,7 @@
   -agentlib:jdwp=transport=dt_socket,server=y,suspend=n \
   -classpath "${TESTCLASSES}" ProcessAttachDebuggee "${PORTFILE}"
 
-$JAVA -classpath ${TESTCLASSES}${PS}${TESTJAVA}/lib/tools.jar \
+$JAVA -classpath "${TESTCLASSES}${PS}${TESTJAVA}/lib/tools.jar" \
   ProcessAttachDebugger $pid 2>&1
 if [ $? != 0 ]; then failures=`expr $failures + 1`; fi
 
@@ -141,7 +152,7 @@
   -agentlib:jdwp=transport=dt_socket,server=y,suspend=y \
   -classpath "${TESTCLASSES}" ProcessAttachDebuggee "${PORTFILE}"
 
-$JAVA -classpath ${TESTCLASSES}${PS}${TESTJAVA}/lib/tools.jar \
+$JAVA -classpath "${TESTCLASSES}${PS}${TESTJAVA}/lib/tools.jar" \
   ProcessAttachDebugger $pid 2>&1
 
 # The debuggee is suspended and doesn't run until the debugger
--- a/jdk/test/com/sun/jdi/connect/spi/JdiLoadedByCustomLoader.sh	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/test/com/sun/jdi/connect/spi/JdiLoadedByCustomLoader.sh	Fri Jan 15 15:36:54 2010 -0800
@@ -51,7 +51,7 @@
   Linux )
     PS=":"
     ;;
-  Windows* )
+  Windows* | CYGWIN*)
     PS=";"
     ;;
   * )
@@ -71,7 +71,7 @@
 $JAVAC -d "${TESTCLASSES}" "${TESTSRC}"/JdiLoadedByCustomLoader.java
 
 mkdir "${SOMEOTHERDIR}"
-$JAVAC -d "${SOMEOTHERDIR}" -classpath ${TESTSRC}${PS}${TESTJAVA}/lib/tools.jar \
+$JAVAC -d "${SOMEOTHERDIR}" -classpath "${TESTSRC}${PS}${TESTJAVA}/lib/tools.jar" \
     "${TESTSRC}"/ListConnectors.java
 
 # Run the test 
--- a/jdk/test/com/sun/nio/sctp/SctpChannel/SocketOptionTests.java	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/test/com/sun/nio/sctp/SctpChannel/SocketOptionTests.java	Fri Jan 15 15:36:54 2010 -0800
@@ -104,7 +104,9 @@
             sc.setOption(SCTP_NODELAY, true);
             checkOption(sc, SCTP_NODELAY, true);
             sc.setOption(SO_SNDBUF, 16*1024);
+            checkOption(sc, SO_SNDBUF, 16*1024);
             sc.setOption(SO_RCVBUF, 16*1024);
+            checkOption(sc, SO_RCVBUF, 16*1024);
             checkOption(sc, SO_LINGER, -1);  /* default should be negative */
             sc.setOption(SO_LINGER, 2000);
             checkOption(sc, SO_LINGER, 2000);
--- a/jdk/test/com/sun/tools/attach/ApplicationSetup.sh	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/test/com/sun/tools/attach/ApplicationSetup.sh	Fri Jan 15 15:36:54 2010 -0800
@@ -49,7 +49,11 @@
   # "java" process.
   if [ "$OS" = "Windows" ]; then
     sleep 2
-    realpid=`ps -o pid,ppid,comm|grep ${pid}|grep "java"|cut -c1-6`
+    if [ "${isCygwin}" = "true" ] ; then
+      realpid=`ps -p ${pid} | tail -1 | awk '{print $4;}'`
+    else
+      realpid=`ps -o pid,ppid,comm|grep ${pid}|grep "java"|cut -c1-6`
+    fi
     pid=${realpid}
   fi
                                                                                                                   
@@ -57,7 +61,7 @@
   attempts=0
   while true; do
     sleep 1
-    port=`tail -1 ${OUTPUTFILE}`
+    port=`tail -1 ${OUTPUTFILE} | sed -e 's@\\r@@g' `
     if [ ! -z "$port" ]; then
       # In case of errors wait time for output to be flushed
       sleep 1
--- a/jdk/test/com/sun/tools/attach/BasicTests.sh	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/test/com/sun/tools/attach/BasicTests.sh	Fri Jan 15 15:36:54 2010 -0800
@@ -48,7 +48,7 @@
 
 echo "Running tests ..."
 
-$JAVA -classpath ${TESTCLASSES}${PS}${TESTJAVA}/lib/tools.jar \
+$JAVA -classpath "${TESTCLASSES}${PS}${TESTJAVA}/lib/tools.jar" \
   BasicTests $pid $agent $badagent $redefineagent 2>&1
 if [ $? != 0 ]; then failures=`expr $failures + 1`; fi
 
--- a/jdk/test/com/sun/tools/attach/CommonSetup.sh	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/test/com/sun/tools/attach/CommonSetup.sh	Fri Jan 15 15:36:54 2010 -0800
@@ -49,6 +49,12 @@
     OS="Windows"
     FS="\\"
     ;;
+  CYGWIN* )
+    PS=";"
+    OS="Windows"
+    FS="\\"
+    isCygwin=true
+    ;;
   * )
     echo "Unrecognized system!"
     exit 1;
--- a/jdk/test/com/sun/tools/attach/PermissionTests.sh	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/test/com/sun/tools/attach/PermissionTests.sh	Fri Jan 15 15:36:54 2010 -0800
@@ -48,7 +48,7 @@
 
 echo "Deny test"
 # deny 
-$JAVA -classpath ${TESTCLASSES}${PS}${TESTJAVA}/lib/tools.jar \
+$JAVA -classpath "${TESTCLASSES}${PS}${TESTJAVA}/lib/tools.jar" \
     -Djava.security.manager \
     -Djava.security.policy=${TESTSRC}/java.policy.deny \
     PermissionTest $pid true 2>&1
@@ -56,7 +56,7 @@
 
 # allow
 echo "Allow test"
-$JAVA -classpath ${TESTCLASSES}${PS}${TESTJAVA}/lib/tools.jar \
+$JAVA -classpath "${TESTCLASSES}${PS}${TESTJAVA}/lib/tools.jar" \
     -Djava.security.manager \
     -Djava.security.policy=${TESTSRC}/java.policy.allow \
     PermissionTest $pid false 2>&1 
--- a/jdk/test/com/sun/tools/attach/ProviderTests.sh	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/test/com/sun/tools/attach/ProviderTests.sh	Fri Jan 15 15:36:54 2010 -0800
@@ -46,6 +46,6 @@
 echo "Running test ..."
 
 $JAVA -classpath \
-  ${TESTCLASSES}${PS}${TESTCLASSES}/SimpleProvider.jar${PS}${TESTJAVA}/lib/tools.jar \
+  "${TESTCLASSES}${PS}${TESTCLASSES}/SimpleProvider.jar${PS}${TESTJAVA}/lib/tools.jar" \
   ProviderTest
 
--- a/jdk/test/java/beans/Introspector/Test5102804.java	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/test/java/beans/Introspector/Test5102804.java	Fri Jan 15 15:36:54 2010 -0800
@@ -24,6 +24,7 @@
 /*
  * @test
  * @bug 5102804
+ * @ignore This test is not predictable with regards to GC
  * @summary Tests memory leak
  * @author Sergey Malenkov
  */
--- a/jdk/test/java/io/File/Basic.java	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/test/java/io/File/Basic.java	Fri Jan 15 15:36:54 2010 -0800
@@ -75,7 +75,7 @@
         if (!f.canRead()) fail(f, "is not readable");
         if (f.canWrite() != writeable)
             fail(f, writeable ? "is not writeable" : "is writeable");
-        int rwLen = (File.separatorChar == '/' ? 6 : 7);
+        int rwLen = 6;
         if (f.length() != length) fail(f, "has wrong length");
     }
 
@@ -89,7 +89,7 @@
         if (nonExistantFile.exists()) fail(nonExistantFile, "exists");
 
         show(rwFile);
-        testFile(rwFile, true, File.separatorChar == '/' ? 6 : 7);
+        testFile(rwFile, true, 6);
         rwFile.delete();
         if (rwFile.exists())
             fail(rwFile, "could not delete");
--- a/jdk/test/java/io/File/basic.sh	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/test/java/io/File/basic.sh	Fri Jan 15 15:36:54 2010 -0800
@@ -32,10 +32,10 @@
 
 rm -rf x.Basic.*
 rm -f x.Basic.non
-echo xyzzy > x.Basic.rw
+printf "%s" "xyzzyN" > x.Basic.rw
 touch x.Basic.ro; chmod ugo-w x.Basic.ro
 mkdir x.Basic.dir
-if $TESTJAVA/bin/java $* -classpath $TESTCLASSES Basic; then
+if $TESTJAVA/bin/java $* -classpath "$TESTCLASSES" Basic; then
   [ -f x.Basic.rw ] && (echo "x.Basic.rw not deleted"; exit 1)
   ([ -d x.Basic.dir ] || [ \! -d x.Basic.dir2 ]) \
     && (echo "x.Basic.dir not renamed"; exit 1)
--- a/jdk/test/java/io/Serializable/evolution/RenamePackage/run.sh	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/test/java/io/Serializable/evolution/RenamePackage/run.sh	Fri Jan 15 15:36:54 2010 -0800
@@ -43,7 +43,7 @@
 case "$OS" in
 SunOS | Linux )
   PS=":"  ;;
-Windows* )
+Windows* | CYGWIN* )
   PS=";"  ;;
 * )
   echo "Unrecognized system!"
@@ -85,14 +85,14 @@
 ${JAVAC} -d ${TESTCLASSES}/nclasses ${TESTSRC}/install/SerialDriver.java
 
 # Run Case 1. Map test.SerialDriver within stream to install.SerialDriver.
-CLASSPATH=${TESTCLASSES}/oclasses${PS}${TESTCLASSES}/share; export CLASSPATH;
+CLASSPATH="${TESTCLASSES}/oclasses${PS}${TESTCLASSES}/share"; export CLASSPATH;
 ${JAVA} test.SerialDriver -s
-CLASSPATH=${TESTCLASSES}/nclasses${PS}${TESTCLASSES}/share; export CLASSPATH;
+CLASSPATH="${TESTCLASSES}/nclasses${PS}${TESTCLASSES}/share"; export CLASSPATH;
 ${JAVA} install.SerialDriver -d
 rm stream.ser
 
 # Run Case 2. Map install.SerialDriver within stream to test.SerialDriver.
-CLASSPATH=${TESTCLASSES}/nclasses${PS}${TESTCLASSES}/share; export CLASSPATH;
+CLASSPATH="${TESTCLASSES}/nclasses${PS}${TESTCLASSES}/share"; export CLASSPATH;
 ${JAVA} install.SerialDriver -s
-CLASSPATH=${TESTCLASSES}/oclasses${PS}${TESTCLASSES}/share; export CLASSPATH;
+CLASSPATH="${TESTCLASSES}/oclasses${PS}${TESTCLASSES}/share"; export CLASSPATH;
 ${JAVA} test.SerialDriver -d
--- a/jdk/test/java/io/Serializable/serialver/classpath/run.sh	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/test/java/io/Serializable/serialver/classpath/run.sh	Fri Jan 15 15:36:54 2010 -0800
@@ -49,7 +49,7 @@
 case "$OS" in
   SunOS | Linux )
     PS=":"    ;;
-  Windows* )
+  Windows* | CYGWIN* )
     PS=";"    ;;
   * )
     echo "Unrecognized system!"
--- a/jdk/test/java/io/Serializable/serialver/nested/run.sh	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/test/java/io/Serializable/serialver/nested/run.sh	Fri Jan 15 15:36:54 2010 -0800
@@ -49,7 +49,7 @@
 case "$OS" in
   SunOS | Linux )
     PS=":"    ;;
-  Windows* )
+  Windows* | CYGWIN* )
     PS=";"    ;;
   * )
     echo "Unrecognized system!"
--- a/jdk/test/java/lang/ClassLoader/deadlock/TestOneWayDelegate.sh	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/test/java/lang/ClassLoader/deadlock/TestOneWayDelegate.sh	Fri Jan 15 15:36:54 2010 -0800
@@ -55,7 +55,7 @@
   Linux )
     FS="/"
     ;;
-  Windows* )
+  Windows* | CYGWIN* )
     FS="\\"
     ;;
 esac
--- a/jdk/test/java/lang/StringCoding/CheckEncodings.sh	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/test/java/lang/StringCoding/CheckEncodings.sh	Fri Jan 15 15:36:54 2010 -0800
@@ -31,7 +31,7 @@
 OS=`uname -s`
 case "$OS" in
   SunOS | Linux ) ;;
-  Windows* )
+  Windows* | CYGWIN* )
     echo "Passed"; exit 0 ;;
   * ) echo "Unrecognized system!" ;  exit 1 ;;
 esac
--- a/jdk/test/java/lang/System/finalization/FinExit.sh	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/test/java/lang/System/finalization/FinExit.sh	Fri Jan 15 15:36:54 2010 -0800
@@ -24,7 +24,9 @@
 #
 
 #
-x=`$TESTJAVA/bin/java -cp $TESTCLASSES FinExit`
+
+# We only want the first character, Windows might add CRLF
+x=`$TESTJAVA/bin/java -cp "$TESTCLASSES" FinExit | cut -c1`
 echo $x
 if [ "x$x" != "x1" ]; then
   echo On-exit finalizer invoked twice
--- a/jdk/test/java/lang/annotation/loaderLeak/LoaderLeak.sh	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/test/java/lang/annotation/loaderLeak/LoaderLeak.sh	Fri Jan 15 15:36:54 2010 -0800
@@ -49,6 +49,11 @@
     PS=":"
     FS="/"
     ;;
+  CYGWIN* )
+    NULL=/dev/null
+    PS=";"
+    FS="/"
+    ;;
   Windows* )
     NULL=NUL
     PS=";"
--- a/jdk/test/java/lang/instrument/appendToClassLoaderSearch/CommonSetup.sh	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/test/java/lang/instrument/appendToClassLoaderSearch/CommonSetup.sh	Fri Jan 15 15:36:54 2010 -0800
@@ -43,11 +43,17 @@
     PS=":"
     FS="/"
     ;;
-  Windows* | CYGWIN*)
+  Windows*)
     PS=";"
     OS="Windows"
     FS="\\"
     ;;
+  CYGWIN*)
+    PS=";"
+    OS="Windows"
+    FS="\\"
+    isCygwin=true
+    ;;
   * )
     echo "Unrecognized system!"
     exit 1;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/nio/channels/AsynchronousFileChannel/LotsOfWrites.java	Fri Jan 15 15:36:54 2010 -0800
@@ -0,0 +1,162 @@
+/*
+ * Copyright 2010 Sun Microsystems, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/* @test
+ * @bug 6913877
+ * @summary Stress AsynchronousFileChannel.write
+ */
+
+import java.io.*;
+import java.nio.ByteBuffer;
+import static java.nio.file.StandardOpenOption.*;
+import java.nio.channels.*;
+import java.util.Random;
+import java.util.concurrent.CountDownLatch;
+
+public class LotsOfWrites {
+    static final Random rand = new Random();
+
+    /**
+     * Asynchronously writes a known pattern to a file up to a given size,
+     * counting down a latch to release waiters when done.
+     */
+    static class Writer implements CompletionHandler<Integer,ByteBuffer> {
+        private final File file;
+        private final long size;
+        private final CountDownLatch latch;
+        private final AsynchronousFileChannel channel;
+
+        private volatile long position;
+        private volatile byte nextByte;
+
+        private long updatePosition(long nwrote) {
+            position += nwrote;
+            return position;
+        }
+
+        private ByteBuffer genNextBuffer() {
+            int n = Math.min(8192 + rand.nextInt(8192), (int)(size - position));
+            ByteBuffer buf = ByteBuffer.allocate(n);
+            for (int i=0; i<n; i++) {
+                buf.put(nextByte++);
+            }
+            buf.flip();
+            return buf;
+        }
+
+        // close channel and release any waiters
+        private void done() {
+            try {
+                channel.close();
+            } catch (IOException ignore) { }
+            latch.countDown();
+        }
+
+        Writer(File file, long size, CountDownLatch latch) throws IOException {
+            this.file = file;
+            this.size = size;
+            this.latch = latch;
+            this.channel = AsynchronousFileChannel.open(file.toPath(), WRITE);
+        }
+
+        File file() {
+            return file;
+        }
+
+        long size() {
+            return size;
+        }
+
+        // initiate first write
+        void start() {
+            ByteBuffer buf = genNextBuffer();
+            channel.write(buf, 0L, buf, this);
+        }
+
+        @Override
+        public void completed(Integer nwrote, ByteBuffer buf) {
+            long pos = updatePosition(nwrote);
+            if (!buf.hasRemaining()) {
+                // buffer has been completely written; decide if we need to
+                // write more
+                if (position >= size) {
+                    done();
+                    return;
+                }
+                buf = genNextBuffer();
+            }
+            channel.write(buf, pos, buf, this);
+        }
+
+        @Override
+        public void failed(Throwable exc, ByteBuffer buf) {
+            exc.printStackTrace();
+            done();
+        }
+    }
+
+    public static void main(String[] args) throws Exception {
+        // random number of writers
+        int count = 20 + rand.nextInt(16);
+        Writer[] writers = new Writer[count];
+        CountDownLatch latch = new CountDownLatch(count);
+
+        // initiate writing to each file
+        for (int i=0; i<count; i++) {
+            long size = 512*1024 + rand.nextInt(512*1024);
+            File blah = File.createTempFile("blah", null);
+            blah.deleteOnExit();
+            Writer writer = new Writer(blah, size, latch);
+            writers[i] = writer;
+            writer.start();
+        }
+
+        // wait for writing to complete
+        latch.await();
+
+        // verify content of each file
+        byte[] buf = new byte[8192];
+        for (int i=0; i<count ;i++) {
+            Writer writer = writers[i];
+            FileInputStream in = new FileInputStream(writer.file());
+            try {
+                long size = 0L;
+                byte expected = 0;
+                int nread = in.read(buf);
+                while (nread > 0) {
+                    for (int j=0; j<nread; j++) {
+                        if (buf[j] != expected)
+                            throw new RuntimeException("Unexpected byte");
+                        expected++;
+                    }
+                    size += nread;
+                    nread = in.read(buf);
+                }
+                if (size != writer.size())
+                    throw new RuntimeException("Unexpected size");
+            } finally {
+                in.close();
+            }
+        }
+    }
+}
--- a/jdk/test/java/nio/channels/Selector/lots_of_updates.sh	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/test/java/nio/channels/Selector/lots_of_updates.sh	Fri Jan 15 15:36:54 2010 -0800
@@ -30,7 +30,7 @@
 
 OS=`uname -s`
 case "$OS" in
-    Windows_* )
+    Windows_* | CYGWIN* )
         echo "ulimit not on Windows"
         exit 0
         ;;
--- a/jdk/test/java/nio/channels/spi/AsynchronousChannelProvider/custom_provider.sh	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/test/java/nio/channels/spi/AsynchronousChannelProvider/custom_provider.sh	Fri Jan 15 15:36:54 2010 -0800
@@ -38,7 +38,7 @@
 
 OS=`uname -s`
 case "$OS" in
-    Windows_* )
+    Windows_* | CYGWIN* )
         CLASSPATH="${TESTCLASSES};${TESTSRC}"
         ;;
     * )
--- a/jdk/test/java/nio/file/Files/walk_file_tree.sh	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/test/java/nio/file/Files/walk_file_tree.sh	Fri Jan 15 15:36:54 2010 -0800
@@ -39,7 +39,7 @@
 
 OS=`uname -s`
 case "$OS" in
-    Windows_* )
+    Windows_* | CYGWIN* )
         echo "This test does not run on Windows" 
         exit 0
         ;;
--- a/jdk/test/java/nio/file/Path/delete_on_close.sh	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/test/java/nio/file/Path/delete_on_close.sh	Fri Jan 15 15:36:54 2010 -0800
@@ -40,7 +40,7 @@
 
 OS=`uname -s`
 case "$OS" in
-    Windows_* )
+    Windows_* | CYGWIN* )
         CLASSPATH="${TESTCLASSES};${TESTSRC}"
         ;;
     * )
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/nio/file/WatchService/OverflowEventIsLoner.java	Fri Jan 15 15:36:54 2010 -0800
@@ -0,0 +1,122 @@
+/*
+ * Copyright 2010 Sun Microsystems, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/* @test
+ * @bug 6907760
+ * @summary Check that the OVERFLOW event is not retrieved with other events
+ * @library ..
+ */
+
+import java.nio.file.*;
+import static java.nio.file.StandardWatchEventKind.*;
+import java.io.IOException;
+import java.util.List;
+import java.util.concurrent.TimeUnit;
+
+public class OverflowEventIsLoner {
+
+    static void drainEvents(WatchService watcher,
+                            WatchEvent.Kind<?> expectedKind,
+                            int count)
+        throws IOException, InterruptedException
+    {
+        // wait for key to be signalled - the timeout is long to allow for
+        // polling implementations
+        WatchKey key = watcher.poll(15, TimeUnit.SECONDS);
+        if (key != null && count == 0)
+            throw new RuntimeException("Key was signalled (unexpected)");
+        if (key == null && count > 0)
+            throw new RuntimeException("Key not signalled (unexpected)");
+
+        int nread = 0;
+        boolean gotOverflow = false;
+        do {
+            List<WatchEvent<?>> events = key.pollEvents();
+            for (WatchEvent<?> event: events) {
+                WatchEvent.Kind<?> kind = event.kind();
+                if (kind == expectedKind) {
+                    // expected event kind
+                    if (++nread > count)
+                        throw new RuntimeException("More events than expected!!");
+                } else if (kind == OVERFLOW) {
+                    // overflow event should not be retrieved with other events
+                    if (events.size() > 1)
+                        throw new RuntimeException("Overflow retrieved with other events");
+                    gotOverflow = true;
+                } else {
+                    throw new RuntimeException("Unexpected event '" + kind + "'");
+                }
+            }
+            if (!key.reset())
+                throw new RuntimeException("Key is no longer valid");
+            key = watcher.poll(2, TimeUnit.SECONDS);
+        } while (key != null);
+
+        // check that all expected events were received or there was an overflow
+        if (nread < count && !gotOverflow)
+            throw new RuntimeException("Insufficient events");
+    }
+
+
+    static void test(Path dir) throws IOException, InterruptedException {
+        WatchService watcher = dir.getFileSystem().newWatchService();
+        try {
+            WatchKey key = dir.register(watcher, ENTRY_CREATE, ENTRY_DELETE);
+
+            // create a lot of files
+            int n = 1024;
+            Path[] files = new Path[n];
+            for (int i=0; i<n; i++) {
+                files[i] = dir.resolve("foo" + i).createFile();
+            }
+
+            // give time for events to accumulate (improve chance of overflow)
+            Thread.sleep(1000);
+
+            // check that we see the create events (or overflow)
+            drainEvents(watcher, ENTRY_CREATE, n);
+
+            // delete the files
+            for (int i=0; i<n; i++) {
+                files[i].delete();
+            }
+
+            // give time for events to accumulate (improve chance of overflow)
+            Thread.sleep(1000);
+
+            // check that we see the delete events (or overflow)
+            drainEvents(watcher, ENTRY_DELETE, n);
+        } finally {
+            watcher.close();
+        }
+    }
+
+    public static void main(String[] args) throws Exception {
+        Path dir = TestUtil.createTemporaryDirectory();
+        try {
+            test(dir);
+        } finally {
+            TestUtil.removeAll(dir);
+        }
+    }
+}
--- a/jdk/test/java/util/Currency/PropertiesTest.sh	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/test/java/util/Currency/PropertiesTest.sh	Fri Jan 15 15:36:54 2010 -0800
@@ -34,7 +34,7 @@
     PS=":"
     FS="/"
     ;;
-  Windows* )
+  Windows* | CYGWIN* )
     PS=";"
     FS="\\"
     ;;
--- a/jdk/test/java/util/PluggableLocale/ExecTest.sh	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/test/java/util/PluggableLocale/ExecTest.sh	Fri Jan 15 15:36:54 2010 -0800
@@ -62,7 +62,7 @@
     PS=":"
     FS="/"
     ;;
-  Windows* )
+  Windows* | CYGWIN* )
     PS=";"
     FS="\\"
     ;;
--- a/jdk/test/java/util/ResourceBundle/Bug6299235Test.sh	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/test/java/util/ResourceBundle/Bug6299235Test.sh	Fri Jan 15 15:36:54 2010 -0800
@@ -35,7 +35,7 @@
     PATHSEP=":"
     FILESEP="/"
     ;;
-  Windows* )
+  Windows* | CYGWIN* )
     PATHSEP=";"
     FILESEP="\\"
     ;;
@@ -63,7 +63,7 @@
 fi
 
 if [ -d "${JRE_EXT_DIR}" ]; then
-    NEW_EXT_DIR=${JRE_EXT_DIR}${PATHSEP}${TESTSRC}
+    NEW_EXT_DIR="${JRE_EXT_DIR}${PATHSEP}${TESTSRC}"
 else
     NEW_EXT_DIR=${TESTSRC}
 fi
--- a/jdk/test/java/util/ResourceBundle/Control/ExpirationTest.sh	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/test/java/util/ResourceBundle/Control/ExpirationTest.sh	Fri Jan 15 15:36:54 2010 -0800
@@ -69,7 +69,7 @@
 HAS_S=NO
 
 case "`uname`" in
-Windows*)
+Windows* | CYGWIN* )
     DEL=";"
     ;;
 SunOS)
--- a/jdk/test/java/util/ServiceLoader/basic.sh	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/test/java/util/ServiceLoader/basic.sh	Fri Jan 15 15:36:54 2010 -0800
@@ -50,9 +50,9 @@
       SEP='\;' ;;
 esac
 
-JARD=`pwd`/x.jar
-EXTD=`pwd`/x.ext
-TESTD=`pwd`/x.test
+JARD=x.jar
+EXTD=x.ext
+TESTD=x.test
 
 if [ \! -d $EXTD ]; then
     # Initialize
--- a/jdk/test/javax/imageio/stream/StreamCloserLeak/run_test.sh	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/test/javax/imageio/stream/StreamCloserLeak/run_test.sh	Fri Jan 15 15:36:54 2010 -0800
@@ -92,7 +92,7 @@
       TMP="/tmp"
       ;;
 
-   Windows_95 | Windows_98 | Windows_NT | Windows_ME )
+   Windows_95 | Windows_98 | Windows_NT | Windows_ME | CYGWIN* )
       VAR="A different value for Win32"
       DEFAULT_JDK=/usr/local/java/jdk1.2/win32
       FILESEP="\\"
--- a/jdk/test/javax/script/CommonSetup.sh	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/test/javax/script/CommonSetup.sh	Fri Jan 15 15:36:54 2010 -0800
@@ -49,6 +49,12 @@
     OS="Windows"
     FS="\\"
     ;;
+  CYGWIN* )
+    PS=";"
+    OS="Windows"
+    FS="\\"
+    isCygwin=true
+    ;;
   * )
     echo "Unrecognized system!"
     exit 1;
--- a/jdk/test/javax/script/ProviderTest.sh	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/test/javax/script/ProviderTest.sh	Fri Jan 15 15:36:54 2010 -0800
@@ -46,5 +46,5 @@
 echo "Running test ..."
 
 $JAVA -classpath \
-  ${TESTCLASSES}${PS}${TESTCLASSES}/dummy.jar \
+  "${TESTCLASSES}${PS}${TESTCLASSES}/dummy.jar" \
   ProviderTest
--- a/jdk/test/sun/jvmstat/testlibrary/utils.sh	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/test/sun/jvmstat/testlibrary/utils.sh	Fri Jan 15 15:36:54 2010 -0800
@@ -40,7 +40,7 @@
 
     OS=`uname -s`
     case ${OS} in
-    Windows_*)
+    Windows_* | CYGWIN*)
         PS=";"
         FS="\\"
         ;;
@@ -54,7 +54,7 @@
 verify_os() {
     OS=`uname -s`
     case ${OS} in
-    Windows_95 | Windows_98 | Windows_ME)
+    Windows_95 | Windows_98 | Windows_ME | CYGWIN* )
         echo "Test bypassed: jvmstat feature not supported on ${OS}"
         exit 0
         ;;
--- a/jdk/test/sun/management/jmxremote/bootstrap/GeneratePropertyPassword.sh	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/test/sun/management/jmxremote/bootstrap/GeneratePropertyPassword.sh	Fri Jan 15 15:36:54 2010 -0800
@@ -45,7 +45,7 @@
 s^@TEST-SRC@/^${TESTCLASSES}${DFILESEP}^g
 EOF
     ;;
-Windows_95 | Windows_98 | Windows_NT | Windows_ME)
+Windows_95 | Windows_98 | Windows_NT | Windows_ME | CYGWIN*)
     PATHSEP=";"
     FILESEP="\\"
     DFILESEP=$FILESEP$FILESEP
--- a/jdk/test/sun/misc/URLClassPath/ClassnameCharTest.sh	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/test/sun/misc/URLClassPath/ClassnameCharTest.sh	Fri Jan 15 15:36:54 2010 -0800
@@ -44,7 +44,7 @@
     PS=":"
     FS="/"
     ;;
-  Windows* )
+  Windows* | CYGWIN* )
     PS=";"
     FS="\\"
     ;;
@@ -59,6 +59,6 @@
 ${TESTJAVA}${FS}bin${FS}jar xvf testclasses.jar "fo o.class"
 ${TESTJAVA}${FS}bin${FS}javac -d ${TESTCLASSES} ${TESTSRC}${FS}ClassnameCharTest.java
 
-${TESTJAVA}${FS}bin${FS}java -classpath ${TESTCLASSES}${PS}${TESTCLASSES}${FS}sun${FS}misc${FS}URLClassPath ClassnameCharTest
+${TESTJAVA}${FS}bin${FS}java -classpath "${TESTCLASSES}${PS}${TESTCLASSES}${FS}sun${FS}misc${FS}URLClassPath" ClassnameCharTest
 
 rm -rf "fo o.class" testclasses.jar
--- a/jdk/test/sun/tools/common/ApplicationSetup.sh	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/test/sun/tools/common/ApplicationSetup.sh	Fri Jan 15 15:36:54 2010 -0800
@@ -45,7 +45,11 @@
   # "java" process.
   if [ "$OS" = "Windows" ]; then
     sleep 2
-    realpid=`ps -o pid,ppid,comm|grep ${pid}|grep "java"|cut -c1-6`
+    if [ "${isCygwin}" = "true" ] ; then
+      realpid=`ps -p ${pid} | tail -1 | awk '{print $4;}'`
+    else
+      realpid=`ps -o pid,ppid,comm|grep ${pid}|grep "java"|cut -c1-6`
+    fi
     pid=${realpid}
   fi
                                                                                                      
--- a/jdk/test/sun/tools/common/CommonSetup.sh	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/test/sun/tools/common/CommonSetup.sh	Fri Jan 15 15:36:54 2010 -0800
@@ -67,6 +67,11 @@
     PS=";"
     OS="Windows"
     ;;
+  CYGWIN* )
+    PS=";"
+    OS="Windows"
+    isCygwin=true
+    ;;
   * )
     PS=":"
     ;;
--- a/jdk/test/sun/tools/jps/jps-help.sh	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/test/sun/tools/jps/jps-help.sh	Fri Jan 15 15:36:54 2010 -0800
@@ -35,7 +35,7 @@
 rm -f jps.out 2>/dev/null
 ${JPS} -? > jps.out 2>&1
 
-diff jps.out ${TESTSRC}/usage.out
+diff -w jps.out ${TESTSRC}/usage.out
 if [ $? != 0 ]
 then
   echo "Output of jps -? differ from expected output. Failed."
@@ -46,7 +46,7 @@
 rm -f jps.out 2>/dev/null
 ${JPS} -help > jps.out 2>&1
 
-diff jps.out ${TESTSRC}/usage.out
+diff -w jps.out ${TESTSRC}/usage.out
 if [ $? != 0 ]
 then
   echo "Output of jps -help differ from expected output. Failed."
--- a/jdk/test/sun/tools/jstat/jstatHelp.sh	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/test/sun/tools/jstat/jstatHelp.sh	Fri Jan 15 15:36:54 2010 -0800
@@ -35,7 +35,7 @@
 rm -f jstat.out 2>/dev/null
 ${JSTAT} -? > jstat.out 2>&1
 
-diff jstat.out ${TESTSRC}/usage.out
+diff -w jstat.out ${TESTSRC}/usage.out
 if [ $? != 0 ]
 then
   echo "Output of jstat -? differ from expected output. Failed."
@@ -45,7 +45,7 @@
 rm -f jstat.out 2>/dev/null
 ${JSTAT} -help > jstat.out 2>&1
 
-diff jstat.out ${TESTSRC}/usage.out
+diff -w jstat.out ${TESTSRC}/usage.out
 if [ $? != 0 ]
 then
   echo "Output of jstat -help differ from expected output. Failed."
--- a/jdk/test/sun/tools/jstat/jstatOptions1.sh	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/test/sun/tools/jstat/jstatOptions1.sh	Fri Jan 15 15:36:54 2010 -0800
@@ -35,4 +35,4 @@
 rm -f jstat.out 2>/dev/null
 ${JSTAT} -options > jstat.out 2>&1
 
-diff jstat.out ${TESTSRC}/options1.out
+diff -w jstat.out ${TESTSRC}/options1.out
--- a/jdk/test/sun/tools/jstatd/jstatdUsage1.sh	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/test/sun/tools/jstatd/jstatdUsage1.sh	Fri Jan 15 15:36:54 2010 -0800
@@ -37,7 +37,7 @@
 
 ${JSTATD} -? > ${JSTATD_1_OUT} 2>&1
 
-diff ${JSTATD_1_OUT} ${TESTSRC}/usage.out
+diff -w ${JSTATD_1_OUT} ${TESTSRC}/usage.out
 if [ $? != 0 ]
 then
   echo "Output of jstatd -? differs from expected output. Failed."
@@ -46,7 +46,7 @@
 
 ${JSTATD} -help > ${JSTATD_2_OUT} 2>&1
 
-diff ${JSTATD_2_OUT} ${TESTSRC}/usage.out
+diff -w ${JSTATD_2_OUT} ${TESTSRC}/usage.out
 if [ $? != 0 ]
 then
   echo "Output of jstatd -help differs from expected output. Failed."
--- a/jdk/test/sun/tools/native2ascii/Native2AsciiTests.sh	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/test/sun/tools/native2ascii/Native2AsciiTests.sh	Fri Jan 15 15:36:54 2010 -0800
@@ -32,7 +32,7 @@
 if [ "${TESTJAVA}" = "" ]; then TESTJAVA=$1; shift; fi
 
 case `uname -s` in
-  Windows*) OS=Windows;;
+  Windows* | CYGWIN*) OS=Windows;;
   SunOS|Linux) OS=Unix;;
 esac
 
@@ -45,12 +45,14 @@
 
   # Strip carriage returns from output when comparing with n2a test output
   # on win32 systems
-  if [ OS = Windows ]; then
-     tr -d '\015' <$out >$out.1
+  if [ ${OS} = Windows ]; then
+     sed -e 's@\\r@@g' $out >$out.1
+     sed -e 's@\\r@@g' $expected >$out.expected
   else
      cp $out $out.1
+     cp $expected $out.expected
   fi
-  if (set -x; diff -c $expected $out.1); then
+  if (set -x; diff -c $out.expected $out.1); then
     echo "$bug passed"
   else
     echo "$bug failed"
--- a/jdk/test/tools/launcher/ChangeDataModel.sh	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/test/tools/launcher/ChangeDataModel.sh	Fri Jan 15 15:36:54 2010 -0800
@@ -29,6 +29,9 @@
 
 OS=`uname -s`;
 
+# To remove CR from output, needed for java apps in CYGWIN, harmless otherwise
+SED_CR="sed -e s@\\r@@g"
+
 case "$OS" in
 	Windows* | CYGWIN* )
 	  PATHSEP=";"
@@ -79,10 +82,10 @@
 
 # Verify data model flag for default data model is accepted
 
-DM=`$JAVA GetDataModel`
+DM=`$JAVA GetDataModel | ${SED_CR}`
 case "$DM" in
         32 )
-		DM2=`${JAVA} -d32 GetDataModel`	
+		DM2=`${JAVA} -d32 GetDataModel | ${SED_CR}`	
 		if [ "${DM2}" != "32" ]
 		then
 	  	echo "Data model flag -d32 not accepted or had improper effect."
@@ -91,7 +94,7 @@
         ;;
 
         64 )
-		DM2=`${JAVA} -d64 GetDataModel`	
+		DM2=`${JAVA} -d64 GetDataModel | ${SED_CR}`	
 		if [ "${DM2}" != "64" ]
 		then
 	  	echo "Data model flag -d64 not accepted or had improper effect."
@@ -227,10 +230,10 @@
 else
 # Negative tests for non-dual mode platforms to ensure the other data model is 
 # rejected
-	DM=`$JAVA GetDataModel`
+	DM=`$JAVA GetDataModel | ${SED_CR}`
 	case "$DM" in
 	   32 )
-		DM2=`${JAVA} -d64 GetDataModel`	
+		DM2=`${JAVA} -d64 GetDataModel | ${SED_CR}`	
 		if [ "x${DM2}" != "x" ]
 		then
 		   echo "Data model flag -d64 was accepted."
@@ -239,7 +242,7 @@
            ;;
 
 	   64 )
-		DM2=`${JAVA} -d32 GetDataModel`	
+		DM2=`${JAVA} -d32 GetDataModel | ${SED_CR}`	
 		if [ "x${DM2}" != "x" ]
 		  then
 		    echo "Data model flag -d32 was accepted."
--- a/jdk/test/tools/launcher/ClassPathWildCard.sh	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/test/tools/launcher/ClassPathWildCard.sh	Fri Jan 15 15:36:54 2010 -0800
@@ -145,7 +145,7 @@
 
 OS=`uname -s`
 case $OS in 
-    Windows*|Cygwin*)
+    Windows*|CYGWIN*)
         PATHSEP=";"
         ExecJava "" "${PATHSEP}NOOPDIR"
         ExecJava "w" "${PATHSEP}NOOPDIR"
--- a/jdk/test/tools/launcher/DefaultLocaleTest.sh	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/test/tools/launcher/DefaultLocaleTest.sh	Fri Jan 15 15:36:54 2010 -0800
@@ -48,7 +48,7 @@
 OS=`uname`
 
 case "$OS" in
-        Windows* | CYGWIN* )
+        Windows* )
             JAVAC="${TESTJAVA}/bin/javac -d . "
             JAVA="${TESTJAVA}/bin/java -classpath . "
             JAVAW="${TESTJAVA}/bin/javaw -classpath . "
@@ -64,6 +64,22 @@
             echo "Test passes"
             exit 0
         ;;
+        CYGWIN* )
+            JAVAC="${TESTJAVA}/bin/javac -d . "
+            JAVA="${TESTJAVA}/bin/java -classpath . "
+            JAVAW="${TESTJAVA}/bin/javaw -classpath . "
+
+            ${JAVAC} ${TESTSRC}/DefaultLocaleTest.java
+            ${JAVA} DefaultLocaleTest | sed -e s@\\r@@g > x.out
+            ${JAVAW} DefaultLocaleTest `cat x.out`
+            if [ $? -ne 0 ]
+            then
+                echo "Test fails"
+                exit 1
+            fi
+            echo "Test passes"
+            exit 0
+        ;;
         * )
         echo "Non-windows environment; test vacuously succeeds."
         exit 0;
--- a/jdk/test/tools/launcher/UnicodeTest.sh	Fri Jan 15 09:06:57 2010 -0800
+++ b/jdk/test/tools/launcher/UnicodeTest.sh	Fri Jan 15 15:36:54 2010 -0800
@@ -54,7 +54,7 @@
 
 echo "creating test source files"
 "$JAVAC" -d . "${TESTSRC}"/UnicodeTest.java
-CLASS_NAME=`"$JAVA" UnicodeTest`
+CLASS_NAME=`"$JAVA" UnicodeTest | sed -e 's@\\r@@g' `
 
 if [ "$CLASS_NAME" = "" ]
 then