changeset 2400:2805db6e6ff6

Merge
author asaha
date Wed, 24 Mar 2010 14:16:57 -0700
parents c5c6f8fa92ae c40572afb29e
children 1dccfa00dc64
files make/java/redist/FILES.gmk make/java/text/FILES_java.gmk make/sun/nio/FILES_java.gmk src/share/classes/java/beans/Statement.java src/share/classes/java/util/zip/Deflater.java src/share/classes/javax/swing/plaf/synth/DefaultMenuLayout.java src/share/classes/sun/awt/ComponentAccessor.java src/share/classes/sun/awt/WindowAccessor.java src/share/classes/sun/dyn/util/BytecodeSignature.java src/share/classes/sun/security/provider/IdentityDatabase.java src/share/classes/sun/security/provider/PolicyFile.java src/share/classes/sun/security/provider/SystemIdentity.java src/share/classes/sun/security/provider/SystemSigner.java src/share/classes/sun/security/x509/X500Signer.java src/share/classes/sun/security/x509/X509Cert.java src/share/classes/sun/swing/plaf/synth/SynthUI.java src/share/classes/sun/tools/jar/JarVerifierStream.java src/solaris/classes/sun/nio/ch/SctpSocketDispatcher.java test/java/awt/regtesthelpers/process/ProcessCommunicator.java test/java/net/Socket/FDClose.java
diffstat 852 files changed, 68811 insertions(+), 11358 deletions(-) [+]
line wrap: on
line diff
--- a/.hgignore	Sat Mar 06 03:37:53 2010 +0300
+++ b/.hgignore	Wed Mar 24 14:16:57 2010 -0700
@@ -1,6 +1,5 @@
 ^build/
 ^dist/
-^nbproject/private/
-^make/netbeans/.*/nbproject/private/
+/nbproject/private/
 ^make/netbeans/.*/build/
 ^make/netbeans/.*/dist/
--- a/.hgtags	Sat Mar 06 03:37:53 2010 +0300
+++ b/.hgtags	Wed Mar 24 14:16:57 2010 -0700
@@ -51,3 +51,12 @@
 eacb36e30327e7ae33baa068e82ddccbd91eaae2 jdk7-b74
 8885b22565077236a927e824ef450742e434a230 jdk7-b75
 8fb602395be0f7d5af4e7e93b7df2d960faf9d17 jdk7-b76
+e6a5d095c356a547cf5b3c8885885aca5e91e09b jdk7-b77
+1143e498f813b8223b5e3a696d79da7ff7c25354 jdk7-b78
+918920710d65432a2d54fdf407c1524a5571c4ad jdk7-b79
+049cfaaa9a7374e3768a79969a799e8b59ad52fa jdk7-b80
+10b993d417fcdb40480dad7032ac241f4b87f1af jdk7-b81
+69ef657320ad5c35cfa12e4d8322d877e778f8b3 jdk7-b82
+9027c6b9d7e2c9ca04a1add691b5b50d0f22b1aa jdk7-b83
+7cb9388bb1a16365fa5118c5efa38b1cd58be40d jdk7-b84
+b396584a3e64988839cca21ea1f7fbdcc9248783 jdk7-b85
--- a/make/Makefile	Sat Mar 06 03:37:53 2010 +0300
+++ b/make/Makefile	Wed Mar 24 14:16:57 2010 -0700
@@ -74,6 +74,7 @@
 import_product    -- copy in the product components \n\
 import_fastdebug  -- copy in the fastdebug components \n\
 import_debug      -- copy in the debug components \n\
+modules           -- build the jdk and jre module images (experimental) \n\
 sccs_get          -- make sure all SCCS files are up-to-date (need SCCS) \n\
 create_links      -- create softlinks in Solaris 32bit build to 64bit dirs \n\
 "
@@ -239,7 +240,12 @@
 
 all build:: sanity-all post-sanity-all
 
-SUBDIRS    = tools java javax org sun sunw com jpda mkdemo mksample launchers
+SUBDIRS       = tools java javax sun com
+SUBDIRS_tools = launchers
+SUBDIRS_misc  = org sunw jpda mkdemo mksample
+
+include $(BUILDDIR)/common/Subdirs.gmk
+
 all build::
 	$(SUBDIRS-loop)
 
@@ -257,6 +263,7 @@
 # Release engineering targets.
 #
 include $(BUILDDIR)/common/Release.gmk
+include $(BUILDDIR)/common/Modules.gmk
 
 #
 # Cscope targets.
--- a/make/com/Makefile	Sat Mar 06 03:37:53 2010 +0300
+++ b/make/com/Makefile	Wed Mar 24 14:16:57 2010 -0700
@@ -32,6 +32,8 @@
 include $(BUILDDIR)/common/Defs.gmk
 
 SUBDIRS = sun
+include $(BUILDDIR)/common/Subdirs.gmk
+
 all build clean clobber::
 	$(SUBDIRS-loop)
 
--- a/make/com/sun/Makefile	Sat Mar 06 03:37:53 2010 +0300
+++ b/make/com/sun/Makefile	Wed Mar 24 14:16:57 2010 -0700
@@ -38,10 +38,19 @@
   endif
 endif
 
+# jarsigner is part of JRE
+SUBDIRS = java security net/ssl jarsigner
+
+SUBDIRS_management = jmx
+SUBDIRS_desktop    = image inputmethods
+SUBDIRS_enterprise = crypto/provider jndi \
+                     org xml rowset net/httpserver
+SUBDIRS_misc       = $(SCRIPT_SUBDIR) tracing servicetag nio demo
+
 # Omit mirror since it's built with the apt tool.
-SUBDIRS = $(SCRIPT_SUBDIR) image security crypto/provider jndi jmx \
-    java inputmethods org xml rowset net/httpserver net/ssl demo \
-    tools jarsigner tracing servicetag nio
+SUBDIRS_tools      = tools
+
+include $(BUILDDIR)/common/Subdirs.gmk
 
 all build clean clobber::
 	$(SUBDIRS-loop)
--- a/make/com/sun/crypto/provider/Makefile	Sat Mar 06 03:37:53 2010 +0300
+++ b/make/com/sun/crypto/provider/Makefile	Wed Mar 24 14:16:57 2010 -0700
@@ -249,7 +249,7 @@
 else
 $(JAR_DESTFILE): $(SIGNED_DIR)/sunjce_provider.jar
 endif
-	$(install-file)
+	$(install-non-module-file)
 
 ifndef OPENJDK
 install-prebuilt:
--- a/make/com/sun/demo/Makefile	Sat Mar 06 03:37:53 2010 +0300
+++ b/make/com/sun/demo/Makefile	Wed Mar 24 14:16:57 2010 -0700
@@ -38,6 +38,8 @@
 include $(BUILDDIR)/common/Defs.gmk
 
 SUBDIRS = jvmti
+include $(BUILDDIR)/common/Subdirs.gmk
+
 all build clean clobber::
 	$(SUBDIRS-loop)
 
--- a/make/com/sun/demo/jvmti/Makefile	Sat Mar 06 03:37:53 2010 +0300
+++ b/make/com/sun/demo/jvmti/Makefile	Wed Mar 24 14:16:57 2010 -0700
@@ -38,6 +38,8 @@
 include $(BUILDDIR)/common/Defs.gmk
 
 SUBDIRS = hprof
+include $(BUILDDIR)/common/Subdirs.gmk
+
 all build clean clobber::
 	$(SUBDIRS-loop)
 
--- a/make/com/sun/inputmethods/Makefile	Sat Mar 06 03:37:53 2010 +0300
+++ b/make/com/sun/inputmethods/Makefile	Wed Mar 24 14:16:57 2010 -0700
@@ -32,6 +32,8 @@
 include $(BUILDDIR)/common/Defs.gmk
 
 SUBDIRS = indicim thaiim
+include $(BUILDDIR)/common/Subdirs.gmk
+
 all build clean clobber::
 	$(SUBDIRS-loop)
 
--- a/make/com/sun/java/Makefile	Sat Mar 06 03:37:53 2010 +0300
+++ b/make/com/sun/java/Makefile	Wed Mar 24 14:16:57 2010 -0700
@@ -31,7 +31,10 @@
 PRODUCT = plugin
 include $(BUILDDIR)/common/Defs.gmk
 
-SUBDIRS = browser pack
+SUBDIRS = pack
+SUBDIRS_misc = browser
+include $(BUILDDIR)/common/Subdirs.gmk
+
 all build clean clobber::
 	$(SUBDIRS-loop)
 
--- a/make/com/sun/java/browser/Makefile	Sat Mar 06 03:37:53 2010 +0300
+++ b/make/com/sun/java/browser/Makefile	Wed Mar 24 14:16:57 2010 -0700
@@ -32,6 +32,8 @@
 include $(BUILDDIR)/common/Defs.gmk
 
 SUBDIRS = dom net
+include $(BUILDDIR)/common/Subdirs.gmk
+
 all build clean clobber::
 	$(SUBDIRS-loop)
 
--- a/make/com/sun/java/pack/Makefile	Sat Mar 06 03:37:53 2010 +0300
+++ b/make/com/sun/java/pack/Makefile	Wed Mar 24 14:16:57 2010 -0700
@@ -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/make/com/sun/java/pack/prop/Makefile	Sat Mar 06 03:37:53 2010 +0300
+++ b/make/com/sun/java/pack/prop/Makefile	Wed Mar 24 14:16:57 2010 -0700
@@ -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/make/com/sun/jmx/Makefile	Sat Mar 06 03:37:53 2010 +0300
+++ b/make/com/sun/jmx/Makefile	Wed Mar 24 14:16:57 2010 -0700
@@ -51,6 +51,8 @@
   SUBDIRS = snmp
 endif
 
+include $(BUILDDIR)/common/Subdirs.gmk
+
 all build:
 	$(SUBDIRS-loop)
 
--- a/make/com/sun/jndi/Makefile	Sat Mar 06 03:37:53 2010 +0300
+++ b/make/com/sun/jndi/Makefile	Wed Mar 24 14:16:57 2010 -0700
@@ -31,6 +31,8 @@
 include $(BUILDDIR)/common/Defs.gmk
 
 SUBDIRS = toolkit cosnaming ldap rmi dns
+include $(BUILDDIR)/common/Subdirs.gmk
+
 all build clean clobber::
 	$(SUBDIRS-loop)
 
--- a/make/com/sun/jndi/cosnaming/Makefile	Sat Mar 06 03:37:53 2010 +0300
+++ b/make/com/sun/jndi/cosnaming/Makefile	Wed Mar 24 14:16:57 2010 -0700
@@ -28,6 +28,7 @@
 #
 
 BUILDDIR = ../../../..
+MODULE  = jndi-cosnaming
 PACKAGE = com.sun.jndi.cosnaming
 PRODUCT = sun
 include $(BUILDDIR)/common/Defs.gmk
--- a/make/com/sun/jndi/dns/Makefile	Sat Mar 06 03:37:53 2010 +0300
+++ b/make/com/sun/jndi/dns/Makefile	Wed Mar 24 14:16:57 2010 -0700
@@ -28,6 +28,7 @@
 #
 
 BUILDDIR = ../../../..
+MODULE  = jndi-dns
 PACKAGE = com.sun.jndi.dns
 PRODUCT = sun
 include $(BUILDDIR)/common/Defs.gmk
--- a/make/com/sun/jndi/ldap/Makefile	Sat Mar 06 03:37:53 2010 +0300
+++ b/make/com/sun/jndi/ldap/Makefile	Wed Mar 24 14:16:57 2010 -0700
@@ -28,6 +28,7 @@
 #
 
 BUILDDIR = ../../../..
+MODULE  = jndi-ldap
 PACKAGE = com.sun.jndi.ldap
 PRODUCT = sun
 include $(BUILDDIR)/common/Defs.gmk
--- a/make/com/sun/jndi/rmi/Makefile	Sat Mar 06 03:37:53 2010 +0300
+++ b/make/com/sun/jndi/rmi/Makefile	Wed Mar 24 14:16:57 2010 -0700
@@ -31,6 +31,8 @@
 include $(BUILDDIR)/common/Defs.gmk
 
 SUBDIRS = registry
+include $(BUILDDIR)/common/Subdirs.gmk
+
 all build clean clobber::
 	$(SUBDIRS-loop)
 
--- a/make/com/sun/jndi/rmi/registry/Makefile	Sat Mar 06 03:37:53 2010 +0300
+++ b/make/com/sun/jndi/rmi/registry/Makefile	Wed Mar 24 14:16:57 2010 -0700
@@ -28,6 +28,7 @@
 #
 
 BUILDDIR = ../../../../..
+MODULE  = jndi-rmiregistry
 PACKAGE = com.sun.jndi.rmi.registry
 PRODUCT = sun
 include $(BUILDDIR)/common/Defs.gmk
--- a/make/com/sun/nio/Makefile	Sat Mar 06 03:37:53 2010 +0300
+++ b/make/com/sun/nio/Makefile	Wed Mar 24 14:16:57 2010 -0700
@@ -31,6 +31,8 @@
 include $(BUILDDIR)/common/Defs.gmk
 
 SUBDIRS = sctp
+include $(BUILDDIR)/common/Subdirs.gmk
+
 all build clean clobber::
 	$(SUBDIRS-loop)
 
--- a/make/com/sun/nio/sctp/FILES_java.gmk	Sat Mar 06 03:37:53 2010 +0300
+++ b/make/com/sun/nio/sctp/FILES_java.gmk	Wed Mar 24 14:16:57 2010 -0700
@@ -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/make/com/sun/nio/sctp/Makefile	Sat Mar 06 03:37:53 2010 +0300
+++ b/make/com/sun/nio/sctp/Makefile	Wed Mar 24 14:16:57 2010 -0700
@@ -28,6 +28,7 @@
 #
 
 BUILDDIR = ../../../..
+MODULE  = sctp
 PACKAGE = com.sun.nio.sctp
 LIBRARY = sctp
 PRODUCT = sun
--- a/make/com/sun/nio/sctp/mapfile-vers	Sat Mar 06 03:37:53 2010 +0300
+++ b/make/com/sun/nio/sctp/mapfile-vers	Wed Mar 24 14:16:57 2010 -0700
@@ -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/make/com/sun/org/Makefile	Sat Mar 06 03:37:53 2010 +0300
+++ b/make/com/sun/org/Makefile	Wed Mar 24 14:16:57 2010 -0700
@@ -32,6 +32,8 @@
 include $(BUILDDIR)/common/Defs.gmk
 
 SUBDIRS =  apache
+include $(BUILDDIR)/common/Subdirs.gmk
+
 all build clean clobber::
 	$(SUBDIRS-loop)
 
--- a/make/com/sun/org/apache/Makefile	Sat Mar 06 03:37:53 2010 +0300
+++ b/make/com/sun/org/apache/Makefile	Wed Mar 24 14:16:57 2010 -0700
@@ -31,6 +31,7 @@
 include $(BUILDDIR)/common/Defs.gmk
 
 SUBDIRS = xml
+include $(BUILDDIR)/common/Subdirs.gmk
 
 all build clean clobber::
 	$(SUBDIRS-loop)
--- a/make/com/sun/org/apache/xml/Makefile	Sat Mar 06 03:37:53 2010 +0300
+++ b/make/com/sun/org/apache/xml/Makefile	Wed Mar 24 14:16:57 2010 -0700
@@ -28,6 +28,7 @@
 #
 
 BUILDDIR = ../../../../..
+MODULE  = security-xmldsig
 PACKAGE = com.sun.org.apache.xml
 PRODUCT = xml
 include $(BUILDDIR)/common/Defs.gmk
--- a/make/com/sun/rowset/Makefile	Sat Mar 06 03:37:53 2010 +0300
+++ b/make/com/sun/rowset/Makefile	Wed Mar 24 14:16:57 2010 -0700
@@ -28,6 +28,7 @@
 #
 
 BUILDDIR = ../../..
+MODULE  = jdbc-enterprise
 PACKAGE = com.sun.rowset
 PRODUCT = sun
 include $(BUILDDIR)/common/Defs.gmk
--- a/make/com/sun/script/Makefile	Sat Mar 06 03:37:53 2010 +0300
+++ b/make/com/sun/script/Makefile	Wed Mar 24 14:16:57 2010 -0700
@@ -25,6 +25,7 @@
 
 
 BUILDDIR = ../../..
+MODULE  = scripting-rhino
 PACKAGE = com.sun.script
 PRODUCT = sun
 include $(BUILDDIR)/common/Defs.gmk
--- a/make/com/sun/security/Makefile	Sat Mar 06 03:37:53 2010 +0300
+++ b/make/com/sun/security/Makefile	Wed Mar 24 14:16:57 2010 -0700
@@ -30,7 +30,10 @@
 BUILDDIR = ../../..
 include $(BUILDDIR)/common/Defs.gmk
 
-SUBDIRS = jgss sasl auth auth/module
+SUBDIRS = auth
+SUBDIRS_misc = jgss sasl auth/module
+include $(BUILDDIR)/common/Subdirs.gmk
+
 all build clean clobber::
 	$(SUBDIRS-loop)
 
--- a/make/com/sun/security/auth/module/Makefile	Sat Mar 06 03:37:53 2010 +0300
+++ b/make/com/sun/security/auth/module/Makefile	Wed Mar 24 14:16:57 2010 -0700
@@ -26,6 +26,7 @@
 # Makefile for building auth modules.
 
 BUILDDIR = ../../../../..
+MODULE  = security-auth
 PACKAGE = com.sun.security.auth.module
 PRODUCT = sun
 
--- a/make/com/sun/servicetag/Makefile	Sat Mar 06 03:37:53 2010 +0300
+++ b/make/com/sun/servicetag/Makefile	Wed Mar 24 14:16:57 2010 -0700
@@ -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/make/com/sun/tools/Makefile	Sat Mar 06 03:37:53 2010 +0300
+++ b/make/com/sun/tools/Makefile	Wed Mar 24 14:16:57 2010 -0700
@@ -35,6 +35,8 @@
 AUTO_FILES_JAVA_DIRS = com/sun/tools/extcheck
 
 SUBDIRS = attach
+include $(BUILDDIR)/common/Subdirs.gmk
+
 all build:
 	$(SUBDIRS-loop)
 clean clobber::
--- a/make/com/sun/tools/attach/Makefile	Sat Mar 06 03:37:53 2010 +0300
+++ b/make/com/sun/tools/attach/Makefile	Wed Mar 24 14:16:57 2010 -0700
@@ -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/make/com/sun/tracing/Makefile	Sat Mar 06 03:37:53 2010 +0300
+++ b/make/com/sun/tracing/Makefile	Wed Mar 24 14:16:57 2010 -0700
@@ -33,6 +33,8 @@
 include $(BUILDDIR)/common/Defs.gmk
 
 SUBDIRS = dtrace
+include $(BUILDDIR)/common/Subdirs.gmk
+
 all build:
 	$(SUBDIRS-loop)
 clean clobber::
--- a/make/common/Defs.gmk	Sat Mar 06 03:37:53 2010 +0300
+++ b/make/common/Defs.gmk	Wed Mar 24 14:16:57 2010 -0700
@@ -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
@@ -313,6 +307,9 @@
 # for generated class files
 CLASSBINDIR         = $(OUTPUTDIR)/classes
 DEMOCLASSDIR        = $(OUTPUTDIR)/democlasses
+# for modules
+MODULES_DIR         = $(OUTPUTDIR)/modules
+ABS_MODULES_DIR     = $(ABS_OUTPUTDIR)/modules
 # for generated tool class files
 BUILDTOOLCLASSDIR   = $(OUTPUTDIR)/btclasses
 # for build tool jar files
@@ -388,6 +385,22 @@
   UNIQUE_LOCATION_STRING += /$(THREADDIR)
 endif
 
+#
+# Build units may or may not define MODULE.  Default to "other".
+#
+# MODULE variable defines the lowest-level module name that
+# might or might not be the name of the modules created in
+# the modules build (see make/modules/modules.config and
+# modules.group).
+#
+MODULES_TEMPDIR     = $(OUTPUTDIR)/tmp/modules
+ABS_MODULES_TEMPDIR = $(ABS_OUTPUTDIR)/tmp/modules
+
+ifndef MODULE
+  MODULE = other
+endif
+override MODULE_DEST_DIR = $(MODULES_TEMPDIR)/$(MODULE)
+
 # the use of += above makes a space separated list which we need to 
 # remove for filespecs.
 #
@@ -498,6 +511,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) -f $@ $(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) -sf $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 +576,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)
@@ -520,131 +607,9 @@
 if [ -w $(HOTSPOT_LOG_NAME) ] ; then $(RM) $(HOTSPOT_LOG_NAME); fi
 endef
 
-# Default make settings for processing SUBDIRS with clobber or clean names
-SUBDIRS_MAKEFLAGS-clobber = INCREMENTAL_BUILD=false
-SUBDIRS_MAKEFLAGS-clean   = INCREMENTAL_BUILD=false
-
 # Current directory
 CURRENT_DIRECTORY := $(shell $(PWD))
 
-# If no timing wanted, we need to define these as empty
-ifdef NO_TIMING
-
-TIMING_ID:=NA
-
-define TIMING_start
-t=0:0:0:0
-endef
-
-define TIMING_end
-time_used=0
-endef
-
-else # NO_TIMING
-
-# Default timing id
-TIMING_ID:=$(shell $(BASENAME) $(CURRENT_DIRECTORY))
-
-# Timing start (must be used in same shell, e.g. same command line)
-#    Defines the shell variable $1 to have the start time.
-define TIMING_start
-$1=`$(DATE) +%j:%H:%M:%S`
-endef
-
-# Timing end (must be used in same shell, e.g. same command line)
-#    Expects shell variable $1 to have been defined as the start time.
-#    Expects shell variable $2 to have timing id string
-#    Sets total_seconds shell variable as the total seconds used.
-#    Sets time_used shell variable to contain format "%dh%dm%ds"
-define TIMING_end
-begTime="$${$1}"; \
-timing_id="$${$2}"; \
-endTime=`$(DATE) +%j:%H:%M:%S`; \
-d1=`$(ECHO) $${begTime} | $(CUT) -d':' -f1 | $(SED) -e 's@^0*@@'`; \
-if [ "$${d1}" = "" ] ; then d1=0; fi; \
-h1=`$(ECHO) $${begTime} | $(CUT) -d':' -f2 | $(SED) -e 's@^0*@@'`; \
-if [ "$${h1}" = "" ] ; then h1=0; fi; \
-m1=`$(ECHO) $${begTime} | $(CUT) -d':' -f3 | $(SED) -e 's@^0*@@'`; \
-if [ "$${m1}" = "" ] ; then m1=0; fi; \
-s1=`$(ECHO) $${begTime} | $(CUT) -d':' -f4 | $(SED) -e 's@^0*@@'`; \
-if [ "$${s1}" = "" ] ; then s1=0; fi; \
-d2=`$(ECHO) $${endTime} | $(CUT) -d':' -f1 | $(SED) -e 's@^0*@@'`; \
-if [ "$${d2}" = "" ] ; then d2=0; fi; \
-h2=`$(ECHO) $${endTime} | $(CUT) -d':' -f2 | $(SED) -e 's@^0*@@'`; \
-if [ "$${h2}" = "" ] ; then h2=0; fi; \
-m2=`$(ECHO) $${endTime} | $(CUT) -d':' -f3 | $(SED) -e 's@^0*@@'`; \
-if [ "$${m2}" = "" ] ; then m2=0; fi; \
-s2=`$(ECHO) $${endTime} | $(CUT) -d':' -f4 | $(SED) -e 's@^0*@@'`; \
-if [ "$${s2}" = "" ] ; then s2=0; fi; \
-t1_secs=`$(EXPR) $${d1} '*' 60 '*' 60 '*' 24 '+' $${h1} '*' 60 '*' 60 \
-		 '+' $${m1} '*' 60 '+' $${s1}`; \
-t2_secs=`$(EXPR) $${d2} '*' 60 '*' 60 '*' 24 '+' $${h2} '*' 60 '*' 60 \
-		 '+' $${m2} '*' 60 '+' $${s2}`; \
-total_seconds=`$(EXPR) $${t2_secs} '-' $${t1_secs}`; \
-if [ "$${total_seconds}" -lt 0 ] ; then total_seconds=0; fi; \
-t_hour=`$(EXPR) $${total_seconds} '/' '(' 60 '*' 60 ')'`h; \
-t_min=`$(EXPR) '(' $${total_seconds} '%' '(' 60 '*' 60 ')' ')' '/' 60`m; \
-t_sec=`$(EXPR) $${total_seconds} '%' 60`s; \
-time_used=$${t_sec}; \
-if [ "$${t_hour}" != "0h" ] ; then \
-time_used=$${t_hour}$${t_min}$${t_sec}; \
-elif [ "$${t_min}" != "0m" ] ; then \
-time_used=$${t_min}$${t_sec}; \
-else \
-time_used=$${t_sec}; \
-fi; \
-$(PRINTF) "  Timing: %05d seconds or %s for %s\n" \
-    $${total_seconds} $${time_used} $${timing_id}
-endef
-
-endif # NO_TIMING
-
-# Given a SUBDIRS list, cd into them and make them
-#   SUBDIRS_MAKEFLAGS      Make settings for a subdir make
-#   SUBDIRS_MAKEFLAGS-$@   Make settings specific to this target
-define SUBDIRS-loop
-@$(ECHO) "Begin Processing SUBDIRS: $(SUBDIRS)"
-@for i in DUMMY $(SUBDIRS) ; do \
-  if [ "$$i" != "DUMMY" ] ; then \
-    $(ECHO) ">>>Recursively making "$$i" "$@" @ `$(DATE)` ..."; \
-    timing_id="$(TIMING_ID)-`$(BASENAME) $${i}`"; \
-    $(call TIMING_start,startTime); \
-    curDir=$(CURRENT_DIRECTORY); \
-    $(CD) $$i; $(MAKE) $@ TIMING_ID=$${timing_id} \
-			  $(SUBDIRS_MAKEFLAGS) \
-			  $(SUBDIRS_MAKEFLAGS-$@) \
-			  FULL_VERSION=$(FULL_VERSION) \
-			  RELEASE=$(RELEASE) || exit 1; \
-	       $(CD) $${curDir}; \
-    $(call TIMING_end,startTime,timing_id); \
-    $(ECHO) "<<<Finished Recursively making "$$i" "$@" @ `$(DATE)`." ; \
-  fi ; \
-done
-@$(ECHO) "Done Processing SUBDIRS: $(SUBDIRS)"
-endef
-
-# Given a OTHERSUBDIRS list, cd into them and make them (extra loop define)
-#   OTHERSUBDIRS_MAKEFLAGS      Make settings for a subdir make
-define OTHERSUBDIRS-loop
-@$(ECHO) "Begin Processing OTHERSUBDIRS: $(OTHERSUBDIRS)"
-@for i in DUMMY $(OTHERSUBDIRS) ; do \
-  if [ "$$i" != "DUMMY" ] ; then \
-    $(ECHO) ">>>Recursively making "$$i" "$@" @ `$(DATE)` ..."; \
-    timing_id="$(TIMING_ID)-`$(BASENAME) $${i}`"; \
-    $(call TIMING_start,startTime); \
-    curDir=$(CURRENT_DIRECTORY); \
-    $(CD) $$i; $(MAKE) $@ TIMING_ID=$${timing_id} \
-		          $(OTHERSUBDIRS_MAKEFLAGS) \
-			  FULL_VERSION=$(FULL_VERSION) \
-			  RELEASE=$(RELEASE) || exit 1; \
-	       $(CD) $${curDir}; \
-    $(call TIMING_end,startTime,timing_id); \
-    $(ECHO) "<<<Finished Recursively making "$$i" "$@" @ `$(DATE)`." ; \
-  fi ; \
-done
-@$(ECHO) "Done Processing OTHERSUBDIRS: $(OTHERSUBDIRS)"
-endef
-
 #
 # Create BYFILE OPT and DBG settings, if CFLAGS_OPT/foobar.o is set then it is
 #    used for this file, otherwise the default settings are used.
@@ -712,7 +677,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 +695,9 @@
 fi
 endef
 
+define install-import-file
+$(install-importonly-file)
+@$(install-module-file)
+endef
+
 .PHONY: all build clean clobber
--- a/make/common/Demo.gmk	Sat Mar 06 03:37:53 2010 +0300
+++ b/make/common/Demo.gmk	Wed Mar 24 14:16:57 2010 -0700
@@ -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/make/common/Library.gmk	Sat Mar 06 03:37:53 2010 +0300
+++ b/make/common/Library.gmk	Wed Mar 24 14:16:57 2010 -0700
@@ -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
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/make/common/Modules.gmk	Wed Mar 24 14:16:57 2010 -0700
@@ -0,0 +1,481 @@
+#
+# 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.
+#
+
+JDK_MODULE_IMAGE_DIR = $(ABS_OUTPUTDIR)/jdk-module-image
+JRE_MODULE_IMAGE_DIR = $(ABS_OUTPUTDIR)/jre-module-image
+
+#
+# modules   Target to build jdk and jre module image
+#
+#           There is one jar file per module containing classes only.
+#           All module jars are currently placed under jre/lib directory.
+#
+# Open issues that need further investigation:
+# 1. Classes in jre/lib/ext/dnsns.jar are currently put in jre/lib/jndi-dns
+#    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.
+
+MODULE_IMAGEBINDIR = bin
+
+#
+# Targets.
+#
+INITIAL_MODULE_IMAGE_JRE=initial-module-image-jre
+INITIAL_MODULE_IMAGE_JDK=initial-module-image-jdk
+ifeq ($(PLATFORM), solaris)
+  ifeq ($(ARCH_DATA_MODEL), 64)
+    INITIAL_MODULE_IMAGE_JRE=initial-module-image-jre-sol64
+    INITIAL_MODULE_IMAGE_JDK=initial-module-image-jdk-sol64
+  endif
+endif
+
+modules modules-clobber \
+initial-module-image-jre initial-module-image-jdk \
+initial-module-image-jre-sol64 initial-module-image-jdk-sol64 \
+trim-module-image-jre trim-module-image-jdk \
+process-module-image-jre process-module-image-jdk ::
+	@$(ECHO) ">>>Making "$@" @ `$(DATE)` ..."
+
+# Order is important here, trim jre after jdk image is created
+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
+
+# Don't use these
+module-image-jre:: initial-module-image-jre trim-module-image-jre process-module-image-jre
+module-image-jdk:: initial-module-image-jdk trim-module-image-jdk process-module-image-jdk
+
+#
+# Paths to these files we need
+JDK_MODULE_LICENSES   = $(LICENSE_DOCLIST_JDK:%=$(JDK_MODULE_IMAGE_DIR)/%)
+JDK_MODULE_64_LICENSES = $(LICENSE_DOCLIST_JDK:%=$(JDK_MODULE_IMAGE_DIR)/%64)
+JDK_MODULE_DOCFILES   = $(OTHER_DOCLIST_JDK:%=$(JDK_MODULE_IMAGE_DIR)/%)
+
+JRE_MODULE_LICENSES   = $(LICENSE_DOCLIST_JRE:%=$(JRE_MODULE_IMAGE_DIR)/%)
+JRE_MODULE_64_LICENSES = $(LICENSE_DOCLIST_JRE:%=$(JRE_MODULE_IMAGE_DIR)/%64)
+JRE_MODULE_DOCFILES   = $(OTHER_DOCLIST_JRE:%=$(JRE_MODULE_IMAGE_DIR)/%)
+JRE_MODULE_DOCFILES  += $(JRE_NAMECHANGE_DOCLIST:%=$(JRE_MODULE_IMAGE_DIR)/%$(TEXT_SUFFIX))
+
+###### RULES
+
+# JDK files
+$(JDK_MODULE_IMAGE_DIR)/%: $(SHARE_JDK_DOC_SRC)/%
+	$(process-doc-file)
+# Removes LICENSE_VERSION or not
+ifdef LICENSE_VERSION
+$(JDK_MODULE_IMAGE_DIR)/%: $(SHARE_JDK_DOC_SRC)/%$(LICENSE_VERSION)
+	$(process-doc-file)
+$(JDK_MODULE_IMAGE_DIR)/%64: $(SHARE_JDK_DOC_SRC)/%$(LICENSE_VERSION)
+	$(process-doc-file)
+else
+$(JDK_MODULE_IMAGE_DIR)/%64: $(SHARE_JDK_DOC_SRC)/%
+	$(process-doc-file)
+endif
+
+# JRE files 
+$(JRE_MODULE_IMAGE_DIR)/%: $(SHARE_JRE_DOC_SRC)/%
+	$(process-doc-file)
+# Add $(TEXT_SUFFIX) suffix
+ifdef TEXT_SUFFIX
+$(JRE_MODULE_IMAGE_DIR)/%$(TEXT_SUFFIX): $(SHARE_JRE_DOC_SRC)/%
+	$(process-doc-file)
+endif
+# Removes LICENSE_VERSION or not
+ifdef LICENSE_VERSION
+$(JRE_MODULE_IMAGE_DIR)/%: $(SHARE_JRE_DOC_SRC)/%$(LICENSE_VERSION)
+	$(process-doc-file)
+$(JRE_MODULE_IMAGE_DIR)/%64: $(SHARE_JRE_DOC_SRC)/%$(LICENSE_VERSION)
+	$(process-doc-file)
+else
+$(JRE_MODULE_IMAGE_DIR)/%64: $(SHARE_JRE_DOC_SRC)/%
+	$(process-doc-file)
+endif
+
+######################################################
+# JRE Image
+######################################################
+
+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
+
+initial-module-image-jre-setup:
+	$(RM) -r $(JRE_MODULE_IMAGE_DIR)
+	$(MKDIR) -p $(JRE_MODULE_IMAGE_DIR)
+
+# 64-bit solaris jre image contains only the 64-bit add-on files.
+initial-module-image-jre-sol64:: initial-module-image-jre-setup \
+			  $(JRE_MODULE_LICENSES) $(JRE_MODULE_64_LICENSES)
+	@# Use tar instead of cp to preserve the symbolic links
+	for dir in bin lib ; do \
+	  ( $(CD) $(OUTPUTDIR) && \
+		$(TAR) cf - `$(FIND) $$dir -name '$(ARCH)' -print` | \
+		($(CD) $(JRE_MODULE_IMAGE_DIR) && $(TAR) xf -) ) ; \
+	done
+	@# Remove some files from the jre area
+	for t in $(NOTJRETOOLS) ; do \
+	    $(RM) $(JRE_MODULE_IMAGE_DIR)/bin$(ISA_DIR)/$$t ; \
+	done
+	$(RM) `$(FIND) $(JRE_MODULE_IMAGE_DIR)/lib -name 'orb.idl'`
+	$(RM) `$(FIND) $(JRE_MODULE_IMAGE_DIR)/lib -name 'ir.idl'`
+
+# 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) \
+		    $(BUILDMETAINDEX_JARFILE)
+	@# Copy in bin directory
+	$(CD) $(OUTPUTDIR) && $(FIND) bin -depth | $(CPIO) -pdum $(JRE_MODULE_IMAGE_DIR)
+	@# CTE plugin security change require new empty directory lib/applet
+	$(MKDIR) -p $(JRE_MODULE_IMAGE_DIR)/lib/applet
+	@# Copy files but not .jar in lib directory 
+	$(CD) $(OUTPUTDIR) && $(FIND) lib -depth | $(EGREP) -v ".jar$$" | $(CPIO) -pdum $(JRE_MODULE_IMAGE_DIR)
+	@#
+	@# copy modules to jre/lib
+	@#
+	for m in `$(NAWK) '{print $$1}' $(MODULES_LIST)` ; do \
+	    $(CP) $(MODULES_DIR)/$$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
+	for t in $(NOTJRETOOLS) ; do \
+	    $(RM) $(JRE_MODULE_IMAGE_DIR)/bin$(ISA_DIR)/$$t ; \
+	done
+	@# Remove orb.idl and ir.idl from jre
+	$(FIND) $(JRE_MODULE_IMAGE_DIR)/lib -name 'orb.idl' -exec $(RM) \{} \;
+	$(FIND) $(JRE_MODULE_IMAGE_DIR)/lib -name 'ir.idl' -exec $(RM) \{} \;
+	@# Generate meta-index to make boot and extension class loaders lazier
+	$(CD) $(JRE_MODULE_IMAGE_DIR)/lib && \
+	    $(BOOT_JAVA_CMD) -jar $(BUILDMETAINDEX_JARFILE) \
+		-o meta-index *.jar
+	@$(CD) $(JRE_MODULE_IMAGE_DIR)/lib && $(java-vm-cleanup)
+	$(CD) $(JRE_MODULE_IMAGE_DIR)/lib/ext && \
+	    $(BOOT_JAVA_CMD) -jar $(BUILDMETAINDEX_JARFILE) \
+		-o meta-index *.jar
+	@$(CD) $(JRE_MODULE_IMAGE_DIR)/lib/ext && $(java-vm-cleanup)
+ifeq ($(PLATFORM), windows)
+	@# Remove certain *.lib files
+	$(CD) $(JRE_MODULE_IMAGE_DIR)/lib && \
+            $(RM) java.$(LIB_SUFFIX) jvm.$(LIB_SUFFIX) \
+                  hpi.$(LIB_SUFFIX) awt.$(LIB_SUFFIX) jawt.$(LIB_SUFFIX)
+  ifeq ($(ARCH_DATA_MODEL), 32)
+	@# The Java Kernel JRE image ships with a special VM.  It is not included
+	@# in the full JRE image, so remove it.  Also, is it only for 32-bit windows.
+	$(CD) $(JRE_MODULE_IMAGE_DIR)/bin && $(RM) -r kernel
+  endif
+endif # Windows
+ifneq ($(PLATFORM), windows)
+	$(call copy-man-pages,$(JRE_MODULE_IMAGE_DIR),$(JRE_MAN_PAGES))
+endif # !windows
+
+# Trim out any extra files not for the jre shipment but wanted in the jdk jre.
+#   (Note the jdk WILL want the jre image before this trimming)
+#   Removes server VM on Windows 32bit.
+#   Remove certain shared libraries that should not be in the jre image
+#      but should be in the jdk jre image.
+trim-module-image-jre::
+ifeq ($(PLATFORM), windows)
+  ifeq ($(ARCH_DATA_MODEL), 32)
+	$(RM) -r $(JRE_MODULE_IMAGE_DIR)/bin/server
+  endif
+  ifdef NOTJRE_SHARED_LIBS
+	for l in $(NOTJRE_SHARED_LIBS) ; do \
+	    $(RM) $(JRE_MODULE_IMAGE_DIR)/bin/$$l ; \
+	done ;
+  endif
+else # PLATFORM
+  ifdef NOTJRE_SHARED_LIBS
+	for l in $(NOTJRE_SHARED_LIBS) ; do \
+	    $(RM) $(JRE_MODULE_IMAGE_DIR)/lib/$(LIBARCH)/$$l ; \
+	done ;
+  endif
+endif # PLATFORM
+
+# Get list of all Elf files in the jre
+JRE_MODULE_ELF_LIST=$(MODULES_TEMPDIR)/jre-elf-files.list
+$(JRE_MODULE_ELF_LIST):
+	@$(prep-target)
+ifneq ($(PLATFORM), windows)
+	$(RM) $@
+	$(FIND) $(JRE_MODULE_IMAGE_DIR)/lib -type f -name \*.$(LIB_SUFFIX) >> $@
+	$(FILE) `$(FIND) $(JRE_MODULE_IMAGE_DIR)/bin -type f -name \*$(EXE_SUFFIX)` \
+	    | $(EGREP) 'ELF' | $(CUT) -d':' -f1 >> $@
+endif
+
+# Post process the image (strips and mcs on Elf files we are shipping)
+#   (Note the jdk WILL want the jre image before this processing)
+process-module-image-jre:: $(JRE_MODULE_ELF_LIST)
+ifneq ($(POST_STRIP_PROCESS), )
+	for f in `$(CAT) $(JRE_MODULE_ELF_LIST)`; do \
+	  $(CHMOD) u+w $${f}; \
+	  $(ECHO) $(POST_STRIP_PROCESS) $${f}; \
+	  $(POST_STRIP_PROCESS) $${f}; \
+	  $(CHMOD) go-w $${f}; \
+	done
+endif
+ifneq ($(POST_MCS_PROCESS), )
+	for f in `$(CAT) $(JRE_MODULE_ELF_LIST)`; do \
+	  $(CHMOD) u+w $${f}; \
+	  $(ECHO) $(POST_MCS_PROCESS) $${f}; \
+	  $(POST_MCS_PROCESS) $${f}; \
+	  $(CHMOD) go-w $${f}; \
+	done
+endif
+	$(RM) $(JRE_MODULE_ELF_LIST)
+
+######################################################
+# JDK Image
+######################################################
+# Note: cpio ($(CPIO)) sometimes leaves directories without rx access.
+
+initial-module-image-jdk-setup:
+	$(RM) -r $(JDK_MODULE_IMAGE_DIR)
+	$(MKDIR) -p $(JDK_MODULE_IMAGE_DIR)/jre
+	($(CD) $(JRE_MODULE_IMAGE_DIR) && $(FIND) . -depth -print \
+	      | $(CPIO) -pdum $(JDK_MODULE_IMAGE_DIR)/jre )
+	$(RM) -rf $(JDK_MODULE_IMAGE_DIR)/jre/man
+	$(CHMOD) a+rx `$(FIND) $(JDK_MODULE_IMAGE_DIR) -type d`
+
+initial-module-image-jdk64-bindemos:
+	for dir in bin demo ; do \
+	  ( $(CD) $(OUTPUTDIR) && \
+		$(TAR) cf - `$(FIND) $$dir -name '$(LIBARCH)' -print` | \
+		($(CD) $(JDK_MODULE_IMAGE_DIR) && $(TAR) xf -) ) ; \
+        done
+
+# Solaris 64 bit image is special
+initial-module-image-jdk-sol64:: initial-module-image-jdk-setup \
+			  initial-module-image-jdk64-bindemos \
+			  $(JDK_MODULE_LICENSES) $(JDK_MODULARLIZED_64_LICENSES)
+
+# DB files to add
+ifeq ($(OPENJDK),true)
+
+initial-module-image-jdk-db:
+
+else
+
+# Create the list of db *.zip files to bundle with jdk
+ABS_DB_PATH  :=$(call FullPath,$(CLOSED_SHARE_SRC)/db)
+DB_ZIP_LIST = $(shell $(LS) $(ABS_DB_PATH)/*.zip 2>/dev/null)
+
+initial-module-image-jdk-db: $(DB_ZIP_LIST)
+	$(MKDIR) -p $(JDK_MODULE_IMAGE_DIR)/db
+	for d in $(DB_ZIP_LIST); do \
+          ($(CD) $(JDK_MODULE_IMAGE_DIR)/db && $(UNZIP) -o $$d); \
+	done
+
+endif
+
+# Standard jdk image
+initial-module-image-jdk:: initial-module-image-jdk-setup \
+		    initial-module-image-jdk-db \
+		    $(JDK_MODULE_LICENSES) $(JDK_MODULE_DOCFILES)
+	$(MKDIR) $(JDK_MODULE_IMAGE_DIR)/lib
+	@#
+	@# copy jdk modules to jdk/lib
+	@#
+	$(MKDIR) -p $(JDK_MODULE_IMAGE_DIR)/lib
+	for m in $(JDK_MODULES) ; do \
+	    $(CP) $(MODULES_DIR)/$$m/lib/$$m.jar $(JDK_MODULE_IMAGE_DIR)/lib ; \
+        done
+  ifeq ($(PLATFORM), windows)
+	@#
+	@# lib/
+	@#
+	$(CP) $(LIBDIR)/$(LIB_PREFIX)jvm.$(LIB_SUFFIX) $(JDK_MODULE_IMAGE_DIR)/lib
+	$(CP) $(LIBDIR)/$(LIB_PREFIX)jawt.$(LIB_SUFFIX) $(JDK_MODULE_IMAGE_DIR)/lib
+	@#
+	@# bin/
+	@#
+	@# copy all EXE files and only certain DLL files from BINDIR
+	$(MKDIR) -p $(JDK_MODULE_IMAGE_DIR)/bin
+	$(CP) $(BINDIR)/*$(EXE_SUFFIX) $(JDK_MODULE_IMAGE_DIR)/bin
+	$(CP) $(BINDIR)/jli.$(LIBRARY_SUFFIX) $(JDK_MODULE_IMAGE_DIR)/bin
+    ifeq ($(ARCH_DATA_MODEL), 32)
+      ifeq ($(COMPILER_VERSION), VS2003)
+	$(CP) $(BINDIR)/msvc*71.$(LIBRARY_SUFFIX) $(JDK_MODULE_IMAGE_DIR)/bin
+      endif
+    endif
+  else # PLATFORM
+	@#
+	@# bin/
+	@#
+	($(CD) $(BINDIR)/.. && $(TAR) cf - \
+	    `$(FIND) bin \( -type f -o -type l \) -print `) | \
+	    ($(CD) $(JDK_MODULE_IMAGE_DIR) && $(TAR) xf -)
+  endif # PLATFORM
+	@#
+	@# lib/ct.sym
+	@#
+	$(MKDIR) -p $(OUTPUTDIR)/symbols/META-INF/sym
+	$(JAVAC_CMD) -XDprocess.packages -proc:only \
+	    -processor com.sun.tools.javac.sym.CreateSymbols \
+	    -Acom.sun.tools.javac.sym.Jar=$(RT_JAR) \
+	    -Acom.sun.tools.javac.sym.Dest=$(OUTPUTDIR)/symbols/META-INF/sym/rt.jar \
+	    $(CORE_PKGS) $(NON_CORE_PKGS) $(EXCLUDE_PROPWARN_PKGS)
+	$(BOOT_JAR_CMD) c0f $(LIBDIR)/ct.sym \
+	    -C $(OUTPUTDIR)/symbols META-INF $(BOOT_JAR_JFLAGS)
+	@$(java-vm-cleanup)
+	$(CP) $(LIBDIR)/ct.sym $(JDK_MODULE_IMAGE_DIR)/lib/ct.sym
+	@#
+	@# CORBA supported orb.idl and ir.idl should be copied to lib
+	@#
+	$(CP) $(LIBDIR)/orb.idl $(JDK_MODULE_IMAGE_DIR)/lib/orb.idl
+	$(CP) $(LIBDIR)/ir.idl $(JDK_MODULE_IMAGE_DIR)/lib/ir.idl
+  ifeq ($(PLATFORM), linux)
+	@#
+	@# on Linux copy jexec from jre/lib to /lib
+	@#
+	$(CP) $(LIBDIR)/jexec $(JDK_MODULE_IMAGE_DIR)/lib/jexec
+  endif # PLATFORM
+	@#
+	@# demo, include
+	@#
+	$(CP) -r -f $(DEMODIR) $(JDK_MODULE_IMAGE_DIR)
+	$(CP) -r -f $(SAMPLEDIR) $(JDK_MODULE_IMAGE_DIR)
+	$(CP) -r $(INCLUDEDIR) $(JDK_MODULE_IMAGE_DIR)
+	@#
+	@# Swing BeanInfo generation
+	@#
+	$(CD) javax/swing/beaninfo && $(MAKE) JDK_IMAGE_DIR=$(JDK_MODULE_IMAGE_DIR) swing-1.2-beans
+ifneq ($(PLATFORM), windows)
+	$(call copy-man-pages,$(JDK_MODULE_IMAGE_DIR),$(JDK_MAN_PAGES))
+endif # !windows
+
+# Trim out files we don't want to ship
+trim-module-image-jdk::
+	@# Remove tools that should not be part of SDK.
+	for t in $(NOTJDKTOOLS); do \
+	    $(RM) $(JDK_MODULE_IMAGE_DIR)/bin/$${t}$(EXE_SUFFIX) \
+		  $(JDK_MODULE_IMAGE_DIR)/bin/*/native_threads/$${t}$(EXE_SUFFIX); \
+	done
+
+# Get list of Elf files in the jdk
+JDK_MODULE_ELF_LIST=$(MODULES_TEMPDIR)/jdk-elf-files.list
+$(JDK_MODULE_ELF_LIST):
+	@$(prep-target)
+ifneq ($(PLATFORM), windows)
+	$(RM) $@
+	$(FIND) $(JDK_MODULE_IMAGE_DIR)/jre/lib -type f -name \*.$(LIB_SUFFIX) >> $@
+	$(FILE) `$(FIND) $(JDK_MODULE_IMAGE_DIR)/jre/bin -type f -name \*$(EXE_SUFFIX)` \
+	    | $(EGREP) 'ELF' | $(CUT) -d':' -f1 >> $@
+	file `$(FIND) $(JDK_MODULE_IMAGE_DIR)/bin -type f -name \*$(EXE_SUFFIX)` \
+	    | $(EGREP) 'ELF' | $(CUT) -d':' -f1 >> $@
+endif
+
+# Post process the image (strips and mcs on files we are shipping)
+process-module-image-jdk:: $(JDK_MODULE_ELF_LIST)
+ifneq ($(POST_STRIP_PROCESS), )
+	for f in `$(CAT) $(JDK_MODULE_ELF_LIST)`; do \
+	  $(CHMOD) u+w $${f}; \
+	  $(ECHO) $(POST_STRIP_PROCESS) $${f}; \
+	  $(POST_STRIP_PROCESS) $${f}; \
+	  $(CHMOD) go-w $${f}; \
+	done
+endif
+ifneq ($(POST_MCS_PROCESS), )
+	for f in `$(CAT) $(JDK_MODULE_ELF_LIST)`; do \
+	  $(CHMOD) u+w $${f}; \
+	  $(ECHO) $(POST_MCS_PROCESS) $${f}; \
+	  $(POST_MCS_PROCESS) $${f}; \
+	  $(CHMOD) go-w $${f}; \
+	done
+endif
+	$(RM) $(JDK_MODULE_ELF_LIST)
+
+######################################################
+# clobber
+######################################################
+modules-clobber::
+	$(RM) -r $(JDK_MODULE_IMAGE_DIR)
+	$(RM) -r $(JRE_MODULE_IMAGE_DIR)
+
+#
+# TODO - nop for now
+sanity-module-images post-sanity-module-images:
+
+modules modules-clobber::
+	@$(ECHO) ">>>Finished making "$@" @ `$(DATE)` ..."
+	@$(java-vm-cleanup)
+
+.PHONY: modules module-image-jre module-image-jdk \
+	initial-module-image-jre initial-module-image-jdk \
+	initial-module-image-jre-sol64 initial-module-image-jdk-sol64 \
+        initial-module-image-jdk-setup \
+	initial-module-image-jdk-db \
+        initial-module-image-jdk64-bindemos \
+        initial-module-image-jre-setup \
+	trim-module-image-jre trim-module-image-jdk \
+	process-module-image-jre process-module-image-jdk \
+	install-previous-jre install-previous-jdk \
+	modules-clobber
+
+# Force rule
+FRC:
+
--- a/make/common/Program.gmk	Sat Mar 06 03:37:53 2010 +0300
+++ b/make/common/Program.gmk	Wed Mar 24 14:16:57 2010 -0700
@@ -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/make/common/Sanity.gmk	Sat Mar 06 03:37:53 2010 +0300
+++ b/make/common/Sanity.gmk	Wed Mar 24 14:16:57 2010 -0700
@@ -71,7 +71,8 @@
     sane-cacerts \
     sane-ant_version \
     sane-zip_version \
-    sane-msvcrt_path
+    sane-msvcrt_path \
+    sane-build_modules
 
 # The rules sanity-* have a one-to-one correspondence with the major targets
 # Each sanity-* rule should have no body to ensure that the post-sanity-* is the
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/make/common/Subdirs.gmk	Wed Mar 24 14:16:57 2010 -0700
@@ -0,0 +1,204 @@
+# 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.  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
+#
+
+#
+# Generic makefile for building subdirectories.
+#
+# SUBDIRS variables to specify the subdirectories to build recursively.
+# Makefile has to include Subdirs.gmk AFTER all SUBDIRS variables are
+# defined.
+#
+# This file does not contain any rule.
+#
+# WARNING: This file is shared with other workspaces.
+#          So when it includes other files, it must use JDK_TOPDIR.
+
+#
+# SUBDIRS          subdirs for the base module always get built
+# SUBDIRS_<group>  subdirs for the named group
+#
+# By default, subdirs specified in the SUBDIRS and all SUBDIRS_* 
+# variables will be built.
+# 
+# BUILD_MODULES variable can be used to specify one or more groups
+# to be built (BUILD_MODULES=all will build all groups).
+#
+# Variables of the currently supported groups are:
+#  SUBDIRS_desktop    
+#  SUBDIRS_management
+#  SUBDIRS_enterprise
+#  SUBDIRS_misc
+#  SUBDIRS_tools
+# 
+# Change to the above list also need to update 
+# make/common/shared/Sanity.gmk.  NOTE: this list is subject
+# to change till the JDK 7 SE profiles/modules are finalized.
+# 
+# Eventually we want to restructure the make directory
+# according to these grouping (e.g. make/desktop/...) and
+# the SUBDIRS_<group> variables would not be needed.
+# 
+# To build the desktop and tools groups only, you can do:
+# gnumake BUILD_MODULES="desktop tools" ...
+# 
+
+# Iterate the subdirectories specified in $1.
+# - cd into each subdir and make them
+
+# Given a SUBDIRS* list (first argument), cd into them and make them
+#   SUBDIRS_MAKEFLAGS      Make settings for a subdir make
+#   SUBDIRS_MAKEFLAGS-$@   Make settings specific to this target
+#
+define subdirs-group-loop
+@$(ECHO) "Begin Processing SUBDIRS: $($1)"
+@for i in DUMMY $($1) ; do \
+  if [ "$$i" != "DUMMY" ] ; then \
+    $(MAKE) -C $$i $@ $(SUBDIRS_MAKEFLAGS) $(SUBDIRS_MAKEFLAGS-$@) \
+            FULL_VERSION=$(FULL_VERSION) RELEASE=$(RELEASE) || exit 1; \
+  fi ; \
+done
+@$(ECHO) "Done Processing SUBDIRS: $($1)"
+endef
+
+# Given a OTHERSUBDIRS list, cd into them and make them (extra loop define)
+#   OTHERSUBDIRS_MAKEFLAGS      Make settings for a subdir make
+define OTHERSUBDIRS-loop
+@$(ECHO) "Begin Processing OTHERSUBDIRS: $(OTHERSUBDIRS)"
+@for i in DUMMY $(OTHERSUBDIRS) ; do \
+  if [ "$$i" != "DUMMY" ] ; then \
+    $(MAKE) -C $$i $@ $(OTHERSUBDIRS_MAKEFLAGS) \
+            FULL_VERSION=$(FULL_VERSION) RELEASE=$(RELEASE) || exit 1; \
+  fi ; \
+done
+@$(ECHO) "Done Processing OTHERSUBDIRS: $(OTHERSUBDIRS)"
+endef
+
+#
+# Iterate the list specified in SUBDIRS_<group> only if
+# SUBDIRS_<group> is set and <group> or "all" is specified
+# in the BUILD_MODULES variable
+#
+ifdef SUBDIRS_desktop 
+  ifneq (,$(findstring desktop, $(BUILD_MODULES)))
+      define subdirs-desktop-loop
+         @$(call subdirs-group-loop,SUBDIRS_desktop)
+      endef
+  else
+    define subdirs-desktop-loop
+    endef
+  endif
+else   
+  define subdirs-desktop-loop
+  endef
+endif   # SUBDIRS_desktop 
+
+ifdef SUBDIRS_enterprise 
+  ifneq (,$(findstring enterprise, $(BUILD_MODULES)))
+      define subdirs-enterprise-loop
+         @$(call subdirs-group-loop,SUBDIRS_enterprise)
+      endef
+  else
+    define subdirs-enterprise-loop
+    endef
+  endif
+else   
+define subdirs-enterprise-loop
+endef
+endif   # SUBDIRS_enterprise 
+
+ifdef SUBDIRS_management 
+  ifneq (,$(findstring management, $(BUILD_MODULES)))
+      define subdirs-management-loop
+         @$(call subdirs-group-loop,SUBDIRS_management)
+      endef
+  else
+    define subdirs-management-loop
+    endef
+  endif
+else   
+define subdirs-management-loop
+endef
+endif   # SUBDIRS_management 
+
+ifdef SUBDIRS_misc 
+  ifneq (,$(findstring misc, $(BUILD_MODULES)))
+      define subdirs-misc-loop
+         @$(call subdirs-group-loop,SUBDIRS_misc)
+      endef
+  else
+    define subdirs-misc-loop
+    endef
+  endif
+else   
+define subdirs-misc-loop
+endef
+endif   # SUBDIRS_misc 
+
+ifdef SUBDIRS_tools 
+  ifneq (,$(findstring tools, $(BUILD_MODULES)))
+      define subdirs-tools-loop
+         @$(call subdirs-group-loop,SUBDIRS_tools)
+      endef
+  else
+    define subdirs-tools-loop
+    endef
+  endif
+else   
+define subdirs-tools-loop
+endef
+endif   # SUBDIRS_tools 
+
+#
+# If BUILD_MODULES is not set or it's set to "all",
+# iterate all groups.
+SUBDIRS_all = $(SUBDIRS) $(SUBDIRS_desktop) $(SUBDIRS_enterprise) \
+	      $(SUBDIRS_management) $(SUBDIRS_misc) $(SUBDIRS_tools)
+
+ifndef BUILD_MODULES
+define SUBDIRS-loop
+  @$(call subdirs-group-loop,SUBDIRS_all)
+endef
+
+else
+
+ifneq (,$(findstring all, $(BUILD_MODULES)))
+define SUBDIRS-loop
+  @$(call subdirs-group-loop,SUBDIRS_all)
+endef
+
+else # BUILD_MODULES set 
+#
+# Iterate SUBDIRS and the groups specified in BUILD_MODULES
+#
+define SUBDIRS-loop
+  @$(call subdirs-group-loop,SUBDIRS)
+  @$(subdirs-desktop-loop)
+  @$(subdirs-enterprise-loop)
+  @$(subdirs-management-loop)
+  @$(subdirs-misc-loop)
+  @$(subdirs-tools-loop)
+endef
+
+endif
+endif # BUILD_MODULES
--- a/make/common/internal/BinaryPlugs.gmk	Sat Mar 06 03:37:53 2010 +0300
+++ b/make/common/internal/BinaryPlugs.gmk	Wed Mar 24 14:16:57 2010 -0700
@@ -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/make/common/internal/Resources.gmk	Sat Mar 06 03:37:53 2010 +0300
+++ b/make/common/internal/Resources.gmk	Wed Mar 24 14:16:57 2010 -0700
@@ -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/make/common/shared/Defs-java.gmk	Sat Mar 06 03:37:53 2010 +0300
+++ b/make/common/shared/Defs-java.gmk	Wed Mar 24 14:16:57 2010 -0700
@@ -138,6 +138,10 @@
 # Needed for javah
 JAVAHFLAGS += -bootclasspath $(CLASSBINDIR)
 
+# Needed for javadoc to ensure it builds documentation
+# against the newly built classes
+JAVADOCFLAGS += -bootclasspath $(CLASSBINDIR)
+
 # Needed for JAVADOC and BOOT_JAVACFLAGS
 NO_PROPRIETARY_API_WARNINGS = -XDignore.symbol.file=true
 
@@ -155,14 +159,15 @@
 		-jar $(JAVAH_JAR) $(JAVAHFLAGS)
   JAVADOC_CMD = $(BOOT_JAVA_CMD) \
 		"-Xbootclasspath/p:$(JAVADOC_JAR)$(CLASSPATH_SEPARATOR)$(JAVAC_JAR)$(CLASSPATH_SEPARATOR)$(DOCLETS_JAR)" \
-		-jar $(JAVADOC_JAR)
+		-jar $(JAVADOC_JAR) $(JAVADOCFLAGS)
 else
   # If no explicit tools, use boot tools (add VM flags in this case)
   JAVAC_CMD     = $(JAVA_TOOLS_DIR)/javac $(JAVAC_JVM_FLAGS) \
 		  $(JAVACFLAGS)
   JAVAH_CMD     = $(JAVA_TOOLS_DIR)/javah \
 		  $(JAVAHFLAGS)
-  JAVADOC_CMD   = $(JAVA_TOOLS_DIR)/javadoc $(JAVA_TOOLS_FLAGS:%=-J%)
+  JAVADOC_CMD   = $(JAVA_TOOLS_DIR)/javadoc $(JAVA_TOOLS_FLAGS:%=-J%) \
+  		  $(JAVADOCFLAGS)
 endif
 
 # Override of what javac to use (see deploy workspace)
--- a/make/common/shared/Platform.gmk	Sat Mar 06 03:37:53 2010 +0300
+++ b/make/common/shared/Platform.gmk	Wed Mar 24 14:16:57 2010 -0700
@@ -165,6 +165,9 @@
                 sparc*) \
                     echo sparc \
                     ;; \
+                arm*) \
+                    echo arm \
+                    ;; \
                 *) \
                     echo $(mach) \
                     ;; \
--- a/make/common/shared/Sanity.gmk	Sat Mar 06 03:37:53 2010 +0300
+++ b/make/common/shared/Sanity.gmk	Wed Mar 24 14:16:57 2010 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright 2005-2009 Sun Microsystems, Inc.  All Rights Reserved.
+# Copyright 2005-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
@@ -218,7 +218,8 @@
 	sane-zip_version \
 	sane-unzip_version \
  	sane-msvcrt_path \
-        sane-freetype
+        sane-freetype \
+        sane-build_modules
 
 ######################################################
 # check for COPYRIGHT_YEAR variable
@@ -686,13 +687,13 @@
 ######################################################
 sane-alt_outputdir:
 ifdef ALT_OUTPUTDIR
-	@if [ `$(ECHO) $(subst \,/,$(ALT_OUTPUTDIR)) | $(EGREP) -ci '^([a-z]:)?/'` -ne 1 ]; then \
+	@if [ `$(ECHO) $(subst \,/,$(ALT_OUTPUTDIR)) | $(EGREP) -c '^([A-Za-z]:)?/'` -ne 1 ]; then \
 	  $(ECHO) "ERROR: ALT_OUTPUTDIR must be an Absolute Path Name, \n" \
 	    "      not a Relative Path Name. \n" \
 	    "" >> $(ERROR_FILE) ; \
 	fi
   ifeq ($(PLATFORM), windows)
-	@if [ `$(ECHO) $(subst \,/,$(ALT_OUTPUTDIR)) | $(EGREP) -ci '^([a-z]:)'` -ne 1 ]; then \
+	@if [ `$(ECHO) $(subst \,/,$(ALT_OUTPUTDIR)) | $(EGREP) -c '^([A-Za-z]:)'` -ne 1 ]; then \
 	  $(ECHO) "ERROR: On windows, ALT_OUTPUTDIR must contain the drive letter. \n" \
 	    "" >> $(ERROR_FILE) ; \
 	fi
@@ -741,7 +742,7 @@
 ######################################################
 sane-alt_bootdir:
 ifdef ALT_BOOTDIR
-	@if [ `$(ECHO) $(subst \,/,$(ALT_BOOTDIR)) | $(EGREP) -ci '^([a-z]:)?/'` -ne 1 ]; then \
+	@if [ `$(ECHO) $(subst \,/,$(ALT_BOOTDIR)) | $(EGREP) -c '^([A-Za-z]:)?/'` -ne 1 ]; then \
 	  $(ECHO) "ERROR: ALT_BOOTDIR must be an Absolute Path Name, \n" \
 	    "      not a Relative Path Name. \n" \
 	    "      The current value of ALT_BOOTDIR is \n" \
@@ -771,7 +772,7 @@
 ######################################################
 sane-local-bootdir:
 ifeq ($(PLATFORM), windows)
-	@if [ `$(ECHO) $(BOOTDIR) | $(EGREP) -ci '^J:'` -ne 0 ]; then \
+	@if [ `$(ECHO) $(BOOTDIR) | $(EGREP) -c '^[jJ]:'` -ne 0 ]; then \
 	  $(ECHO) "WARNING: Your BOOTDIR is located on the J: drive. Often the J:\n" \
 	    "        drive is mapped over a network. Using a mapped drive for\n" \
 	    "        the BOOTDIR may significantly slow down the build process.\n" \
@@ -788,7 +789,7 @@
 ######################################################
 sane-cacerts:
   ifdef ALT_CACERTS_FILE
-	@if [ `$(ECHO) $(subst \,/,$(ALT_CACERTS_FILE)) | $(EGREP) -ci '^([a-z]:)?/'` -ne 1 ]; then \
+	@if [ `$(ECHO) $(subst \,/,$(ALT_CACERTS_FILE)) | $(EGREP) -c '^([A-Za-z]:)?/'` -ne 1 ]; then \
 	  $(ECHO) "ERROR: ALT_CACERTS_FILE must be an Absolute Path Name, \n" \
 	    "      not a Relative Path Name. \n" \
 	    "      The current value of ALT_CACERTS_FILE is \n" \
@@ -845,6 +846,21 @@
 endif
 
 ######################################################
+# if specified, BUILD_MODULES must contain valid values.
+######################################################
+MODULES_REGEX="all|base|desktop|management|enterprise|misc|tools"
+sane-build_modules:
+ifdef BUILD_MODULES
+	@for m in $(BUILD_MODULES) ; do \
+            valid=`$(ECHO) $$m | $(EGREP) $(MODULES_REGEX)`; \
+            if [ "x$$valid" = "x" ] ; then \
+                $(ECHO) "ERROR: $$m set in the BUILD_MODULES variable is invalid.\n" \
+                "" >> $(ERROR_FILE); \
+            fi \
+	done
+endif
+
+######################################################
 # CUPS_HEADERS_PATH must be valid
 ######################################################
 sane-cups:
@@ -1093,6 +1109,7 @@
 # Check for existence of misc Hotspot imported files
 ######################################################
 HOTSPOT_INCLUDE_FILE_LIST  = jvmti.h
+HOTSPOT_INCLUDE_FILE_LIST  += jvmticmlr.h
 #HOTSPOT_INCLUDE_FILE_LIST += jni.h jni_md.h
 #HOTSPOT_INCLUDE_FILE_LIST += jvm.h jvm_md.h
 #HOTSPOT_INCLUDE_FILE_LIST += jmm.h
@@ -1117,7 +1134,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 +1148,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 ; \
@@ -1521,7 +1538,7 @@
 sane-mozilla:
 ifeq ($(ARCH_DATA_MODEL), 32)
   ifdef ALT_MOZILLA_HEADERS_PATH
-	@if [ `$(ECHO) $(subst \,/,$(ALT_MOZILLA_HEADERS_PATH)) | $(EGREP) -ci '^([a-z]:)?/'` -ne 1 ]; then \
+	@if [ `$(ECHO) $(subst \,/,$(ALT_MOZILLA_HEADERS_PATH)) | $(EGREP) -c '^([A-Za-z]:)?/'` -ne 1 ]; then \
 	  $(ECHO) "ERROR: ALT_MOZILLA_HEADERS_PATH must be an Absolute Path Name, \n" \
 	    "      not a Relative Path Name. \n" \
 	    "      The current value of ALT_MOZILLA_HEADERS_PATH is \n" \
--- a/make/docs/Makefile	Sat Mar 06 03:37:53 2010 +0300
+++ b/make/docs/Makefile	Wed Mar 24 14:16:57 2010 -0700
@@ -69,7 +69,7 @@
 THIS_YEAR := $(shell $(DATE) | $(SED) -e 's/  / /g' | $(CUT) -d' ' -f6)
 TRADEMARK = &\#x2122;
 
-IGNORED_TAGS =	beaninfo revised since.unbundled spec Note ToDo
+IGNORED_TAGS =	beaninfo revised since.unbundled spec specdefault Note ToDo
 
 JLS3_URL = http://java.sun.com/docs/books/jls/
 JLS3_CITE = <a href="$(JLS3_URL)"> \
--- a/make/java/Makefile	Sat Mar 06 03:37:53 2010 +0300
+++ b/make/java/Makefile	Wed Mar 24 14:16:57 2010 -0700
@@ -38,9 +38,13 @@
 
 # Others
 #    Note: java_crw_demo java_hprof_demo are demos but must be delivered built in sdk
-SUBDIRS += security npt java_crw_demo java_hprof_demo \
-	    math awt util text applet net nio dyn \
-	    sql rmi jar beans logging management instrument
+
+SUBDIRS += security math util text net nio jar
+
+SUBDIRS_desktop    = awt applet beans
+SUBDIRS_management = management
+SUBDIRS_misc       = npt java_crw_demo java_hprof_demo \
+                     logging instrument dyn sql rmi
 
 
 ifeq ($(PLATFORM), solaris)
@@ -53,6 +57,8 @@
   SUBDIRS += jexec
 endif # PLATFORM
 
+include $(BUILDDIR)/common/Subdirs.gmk
+
 all build clean clobber::
 	$(SUBDIRS-loop)
 
--- a/make/java/awt/Makefile	Sat Mar 06 03:37:53 2010 +0300
+++ b/make/java/awt/Makefile	Wed Mar 24 14:16:57 2010 -0700
@@ -24,6 +24,7 @@
 #
 
 BUILDDIR = ../..
+MODULE  = awt
 PACKAGE = java.awt
 PRODUCT = sun
 include $(BUILDDIR)/common/Defs.gmk
--- a/make/java/fdlibm/Makefile	Sat Mar 06 03:37:53 2010 +0300
+++ b/make/java/fdlibm/Makefile	Wed Mar 24 14:16:57 2010 -0700
@@ -31,6 +31,7 @@
 #
 
 BUILDDIR     = ../..
+MODULE       = base
 LIBRARY      = fdlibm
 PRODUCT      = java
 
--- a/make/java/hpi/Makefile	Sat Mar 06 03:37:53 2010 +0300
+++ b/make/java/hpi/Makefile	Wed Mar 24 14:16:57 2010 -0700
@@ -34,6 +34,8 @@
 # Build specified the HPI implementations
 #
 SUBDIRS = $(HPIS)
+include $(BUILDDIR)/common/Subdirs.gmk
+
 all build clean clobber::
 	$(SUBDIRS-loop)
 
--- a/make/java/hpi/native/Makefile	Sat Mar 06 03:37:53 2010 +0300
+++ b/make/java/hpi/native/Makefile	Wed Mar 24 14:16:57 2010 -0700
@@ -28,6 +28,7 @@
 #
 
 BUILDDIR     = ../../..
+MODULE       = base
 LIBRARY      = hpi
 PRODUCT      = java
 THREADDIR    = native_threads
--- a/make/java/hpi/windows/Makefile	Sat Mar 06 03:37:53 2010 +0300
+++ b/make/java/hpi/windows/Makefile	Wed Mar 24 14:16:57 2010 -0700
@@ -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/make/java/instrument/Makefile	Sat Mar 06 03:37:53 2010 +0300
+++ b/make/java/instrument/Makefile	Wed Mar 24 14:16:57 2010 -0700
@@ -27,6 +27,7 @@
 # agent, supporting java.lang.instrument
 
 BUILDDIR = ../..
+MODULE  = instrument
 PACKAGE = sun.instrument
 LIBRARY = instrument
 PRODUCT = sun
--- a/make/java/java/Makefile	Sat Mar 06 03:37:53 2010 +0300
+++ b/make/java/java/Makefile	Wed Mar 24 14:16:57 2010 -0700
@@ -29,6 +29,7 @@
 #
 
 BUILDDIR = ../..
+MODULE  = base
 PACKAGE = java.lang
 LIBRARY = java
 PRODUCT = java
@@ -217,6 +218,8 @@
 endif
 
 SUBDIRS = reflect
+include $(BUILDDIR)/common/Subdirs.gmk
+
 all build:
 	$(SUBDIRS-loop)
 clean clobber::
@@ -241,7 +244,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 +288,7 @@
 
 $(TZMAP): $(TZMAPFILE)
 	$(install-file)
-	$(CHMOD) 444 $@
+	$(call chmod-file, 444)
 endif
 
 build: $(LIBDIR)/$(PROPS) $(LIBDIR)/$(CAL_PROPS) $(TZMAP)
@@ -315,7 +318,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 +373,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/make/java/java/genlocales.gmk	Sat Mar 06 03:37:53 2010 +0300
+++ b/make/java/java/genlocales.gmk	Wed Mar 24 14:16:57 2010 -0700
@@ -49,7 +49,7 @@
 # $(BUILDDIR)/java/text/FILES_java.gmk contains the "sun.text.resources" for 
 # European language support
 
-include $(BUILDDIR)/java/text/FILES_java.gmk
+include $(BUILDDIR)/java/text/base/FILES_java.gmk
 
 Euro_Resources_java += $(FILES_java)
 
--- a/make/java/java/mapfile-vers	Sat Mar 06 03:37:53 2010 +0300
+++ b/make/java/java/mapfile-vers	Wed Mar 24 14:16:57 2010 -0700
@@ -150,10 +150,8 @@
 		Java_java_lang_StrictMath_asin;
 		Java_java_lang_StrictMath_atan;
 		Java_java_lang_StrictMath_atan2;
-		Java_java_lang_StrictMath_ceil;
 		Java_java_lang_StrictMath_cos;
 		Java_java_lang_StrictMath_exp;
-		Java_java_lang_StrictMath_floor;
 		Java_java_lang_StrictMath_log;
 		Java_java_lang_StrictMath_log10;
 		Java_java_lang_StrictMath_pow;
--- a/make/java/java/reorder-i586	Sat Mar 06 03:37:53 2010 +0300
+++ b/make/java/java/reorder-i586	Wed Mar 24 14:16:57 2010 -0700
@@ -107,4 +107,3 @@
 text: .text%Java_java_util_TimeZone_getSystemTimeZoneID;
 text: .text%findJavaTZ_md;
 text: .text%Java_java_lang_StrictMath_log;
-text: .text%Java_java_lang_StrictMath_floor;
--- a/make/java/java/reorder-sparc	Sat Mar 06 03:37:53 2010 +0300
+++ b/make/java/java/reorder-sparc	Wed Mar 24 14:16:57 2010 -0700
@@ -105,4 +105,3 @@
 text: .text%findJavaTZ_md;
 text: .text%Java_java_lang_StrictMath_log;
 text: .text%Java_java_lang_StrictMath_sqrt;
-text: .text%Java_java_lang_StrictMath_floor;
--- a/make/java/java/reorder-sparcv9	Sat Mar 06 03:37:53 2010 +0300
+++ b/make/java/java/reorder-sparcv9	Wed Mar 24 14:16:57 2010 -0700
@@ -101,4 +101,3 @@
 text: .text%findJavaTZ_md;
 text: .text%Java_java_lang_StrictMath_log;
 text: .text%Java_java_lang_StrictMath_sqrt;
-text: .text%Java_java_lang_StrictMath_floor;
--- a/make/java/java_crw_demo/Makefile	Sat Mar 06 03:37:53 2010 +0300
+++ b/make/java/java_crw_demo/Makefile	Wed Mar 24 14:16:57 2010 -0700
@@ -24,6 +24,8 @@
 #
 
 BUILDDIR = ../..
+
+MODULE  = demos
 LIBRARY = java_crw_demo
 PRODUCT = sun
 LIBRARY_OUTPUT = java_crw_demo
--- a/make/java/java_hprof_demo/Makefile	Sat Mar 06 03:37:53 2010 +0300
+++ b/make/java/java_hprof_demo/Makefile	Wed Mar 24 14:16:57 2010 -0700
@@ -24,6 +24,7 @@
 #
 
 BUILDDIR = ../..
+MODULE  = instrument
 LIBRARY = hprof
 PRODUCT = sun
 LIBRARY_OUTPUT = hprof_jvmti
--- a/make/java/jli/Makefile	Sat Mar 06 03:37:53 2010 +0300
+++ b/make/java/jli/Makefile	Wed Mar 24 14:16:57 2010 -0700
@@ -30,6 +30,7 @@
 # its manifestations (java, javaw, javac, ...).
 #
 BUILDDIR = ../..
+MODULE  = base
 LIBRARY = jli
 PRODUCT = java
 
@@ -152,7 +153,6 @@
 STATIC_LIBRARY = $(STATIC_LIBRARY_DIR)/$(STATIC_LIBRARY_NAME)
 
 $(STATIC_LIBRARY_DIR): $(OBJDIR)
-	@$(prep-target)
 	@$(MKDIR) $(STATIC_LIBRARY_DIR)
 
 $(STATIC_LIBRARY): $(STATIC_LIBRARY_DIR)
--- a/make/java/jvm/Makefile	Sat Mar 06 03:37:53 2010 +0300
+++ b/make/java/jvm/Makefile	Wed Mar 24 14:16:57 2010 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright 1995-2005 Sun Microsystems, Inc.  All Rights Reserved.
+# Copyright 1995-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
@@ -24,6 +24,8 @@
 #
 
 BUILDDIR = ../..
+MODULE   = base
+
 include $(BUILDDIR)/common/Defs.gmk
 
 #
@@ -32,19 +34,34 @@
 
 FILES_h = $(INCLUDEDIR)/jni.h 			\
 	  $(PLATFORM_INCLUDE)/jni_md.h		\
-          $(INCLUDEDIR)/jvmti.h			\
+	  $(INCLUDEDIR)/jvmti.h			\
+	  $(INCLUDEDIR)/jvmticmlr.h		\
 	  $(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/make/java/logging/Makefile	Sat Mar 06 03:37:53 2010 +0300
+++ b/make/java/logging/Makefile	Wed Mar 24 14:16:57 2010 -0700
@@ -24,6 +24,7 @@
 #
 
 BUILDDIR = ../..
+MODULE  = logging
 PACKAGE = java.util.logging
 PRODUCT = java
 include $(BUILDDIR)/common/Defs.gmk
--- a/make/java/main/Makefile	Sat Mar 06 03:37:53 2010 +0300
+++ b/make/java/main/Makefile	Wed Mar 24 14:16:57 2010 -0700
@@ -36,6 +36,8 @@
 else 
 SUBDIRS = java
 endif 
+include $(BUILDDIR)/common/Subdirs.gmk
+
 all build clean clobber::
 	$(SUBDIRS-loop)
 
--- a/make/java/main/java/Makefile	Sat Mar 06 03:37:53 2010 +0300
+++ b/make/java/main/java/Makefile	Wed Mar 24 14:16:57 2010 -0700
@@ -24,6 +24,7 @@
 #
 
 BUILDDIR = ../../..
+MODULE  = base
 PROGRAM = java
 PRODUCT = java
 
--- a/make/java/main/javaw/Makefile	Sat Mar 06 03:37:53 2010 +0300
+++ b/make/java/main/javaw/Makefile	Wed Mar 24 14:16:57 2010 -0700
@@ -28,6 +28,7 @@
 #
 
 BUILDDIR = ../../..
+MODULE  = base
 PROGRAM = javaw
 PRODUCT = java
 
--- a/make/java/management/Makefile	Sat Mar 06 03:37:53 2010 +0300
+++ b/make/java/management/Makefile	Wed Mar 24 14:16:57 2010 -0700
@@ -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/make/java/net/Makefile	Sat Mar 06 03:37:53 2010 +0300
+++ b/make/java/net/Makefile	Wed Mar 24 14:16:57 2010 -0700
@@ -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/make/java/nio/FILES_java.gmk	Sat Mar 06 03:37:53 2010 +0300
+++ b/make/java/nio/FILES_java.gmk	Wed Mar 24 14:16:57 2010 -0700
@@ -26,7 +26,6 @@
 FILES_src = \
 	java/nio/Bits.java \
 	java/nio/Buffer.java \
-	java/nio/BufferPoolMXBean.java \
 	java/nio/ByteOrder.java \
 	java/nio/MappedByteBuffer.java \
 	java/nio/StringCharBuffer.java \
@@ -234,6 +233,7 @@
 	sun/nio/cs/UTF_16BE.java \
 	sun/nio/cs/UTF_16LE.java \
 	sun/nio/cs/UTF_8.java \
+	sun/nio/cs/Unicode.java \
 	sun/nio/cs/UnicodeDecoder.java \
 	sun/nio/cs/UnicodeEncoder.java \
 	sun/nio/cs/UTF_32.java \
--- a/make/java/nio/Makefile	Sat Mar 06 03:37:53 2010 +0300
+++ b/make/java/nio/Makefile	Wed Mar 24 14:16:57 2010 -0700
@@ -28,6 +28,7 @@
 #
 
 BUILDDIR = ../..
+MODULE  = nio
 PACKAGE = java.nio
 LIBRARY = nio
 PRODUCT = java
@@ -303,7 +304,11 @@
 # Rules
 #
 
+SUBDIRS_management = mxbean
+include $(BUILDDIR)/common/Subdirs.gmk
+
 build: sources
+	$(SUBDIRS-loop)
 
 clean clobber::
 	$(RM) -r $(NIO_GEN) $(SNIO_GEN)
@@ -816,7 +821,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/make/java/nio/genBuffer.sh	Sat Mar 06 03:37:53 2010 +0300
+++ b/make/java/nio/genBuffer.sh	Wed Mar 24 14:16:57 2010 -0700
@@ -44,6 +44,7 @@
 
 case $type in
   char)  fulltype=character;;
+  int)   fulltype=integer;;
   *)     fulltype=$type;;
 esac
 
@@ -54,6 +55,11 @@
   long | double)  LBPV=3;;
 esac
 
+case $type in 
+  float|double) floatingPointOrIntegralType=floatingPointType;;
+  *)            floatingPointOrIntegralType=integralType;;
+esac
+
 typesAndBits() {
 
   type="$1"; BO="$2"
@@ -101,6 +107,7 @@
 
 $SPP <$SRC >$DST \
   -K$type \
+  -K$floatingPointOrIntegralType \
   -Dtype=$type \
   -DType=$Type \
   -Dfulltype=$fulltype \
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/make/java/nio/mxbean/Makefile	Wed Mar 24 14:16:57 2010 -0700
@@ -0,0 +1,34 @@
+#
+# 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.  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   = management
+PACKAGE  = java.nio
+PRODUCT  = java
+include $(BUILDDIR)/common/Defs.gmk
+
+FILES_java = java/nio/BufferPoolMXBean.java
+
+include $(BUILDDIR)/common/Classes.gmk
--- a/make/java/npt/Makefile	Sat Mar 06 03:37:53 2010 +0300
+++ b/make/java/npt/Makefile	Wed Mar 24 14:16:57 2010 -0700
@@ -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/make/java/redist/FILES.gmk	Sat Mar 06 03:37:53 2010 +0300
+++ /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/make/java/redist/Makefile	Sat Mar 06 03:37:53 2010 +0300
+++ b/make/java/redist/Makefile	Wed Mar 24 14:16:57 2010 -0700
@@ -35,6 +35,7 @@
 # 
 
 BUILDDIR = ../..
+MODULE   = base
 PRODUCT  = java
 include $(BUILDDIR)/common/Defs.gmk
 
@@ -61,7 +62,14 @@
 # Needed to do file copy
 ABS_BUILDDIR :=$(call FullPath,$(BUILDDIR))
 
-all: build
+SUBDIRS_desktop = fonts
+SUBDIRS_tools   = sajdi
+include $(BUILDDIR)/common/Subdirs.gmk
+
+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 +78,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 +94,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 +124,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 +210,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 +236,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 +256,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 +278,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/make/java/redist/fonts/Makefile	Wed Mar 24 14:16:57 2010 -0700
@@ -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/make/java/redist/sajdi/Makefile	Wed Mar 24 14:16:57 2010 -0700
@@ -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/make/java/security/Makefile	Sat Mar 06 03:37:53 2010 +0300
+++ b/make/java/security/Makefile	Wed Mar 24 14:16:57 2010 -0700
@@ -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/make/java/sql/Makefile	Sat Mar 06 03:37:53 2010 +0300
+++ b/make/java/sql/Makefile	Wed Mar 24 14:16:57 2010 -0700
@@ -28,6 +28,7 @@
 #
 
 BUILDDIR = ../..
+MODULE  = jdbc-base
 PACKAGE = java.sql
 PRODUCT = sun
 include $(BUILDDIR)/common/Defs.gmk
--- a/make/java/sun_nio/Makefile	Sat Mar 06 03:37:53 2010 +0300
+++ b/make/java/sun_nio/Makefile	Wed Mar 24 14:16:57 2010 -0700
@@ -31,7 +31,7 @@
 PACKAGE = sun.nio
 PRODUCT = sun
 
-OTHER_JAVACFLAGS += -Xlint:serial -Werror
+OTHER_JAVACFLAGS += -Xlint:serial,-deprecation -Werror
 include $(BUILDDIR)/common/Defs.gmk
 
 #
--- a/make/java/text/FILES_java.gmk	Sat Mar 06 03:37:53 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,263 +0,0 @@
-#
-# Copyright 1996-2007 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.
-#
-
-FILES_java = \
-    java/text/Annotation.java \
-    java/text/AttributedCharacterIterator.java \
-    java/text/AttributedString.java \
-    java/text/BreakDictionary.java \
-    java/text/BreakIterator.java \
-    java/text/Bidi.java \
-    java/text/CharacterIterator.java \
-    java/text/CharacterIteratorFieldDelegate.java \
-    java/text/ChoiceFormat.java \
-    java/text/Collator.java \
-    java/text/CollationElementIterator.java \
-    java/text/CollationKey.java \
-    java/text/CollationRules.java \
-    java/text/DateFormat.java \
-    java/text/DateFormatSymbols.java \
-    java/text/DecimalFormat.java \
-    java/text/DictionaryBasedBreakIterator.java \
-    java/text/DigitList.java \
-    java/text/EntryPair.java \
-    java/text/Format.java \
-    java/text/FieldPosition.java \
-    java/text/DontCareFieldPosition.java \
-    java/text/MergeCollation.java \
-    java/text/MessageFormat.java \
-    java/text/Normalizer.java \
-    java/text/NumberFormat.java \
-    java/text/DecimalFormatSymbols.java \
-    java/text/ParseException.java \
-    java/text/ParsePosition.java \
-    java/text/PatternEntry.java \
-    java/text/RBCollationTables.java \
-    java/text/RBTableBuilder.java \
-    java/text/RuleBasedBreakIterator.java \
-    java/text/RuleBasedCollator.java \
-    java/text/RuleBasedCollationKey.java \
-    java/text/SimpleDateFormat.java \
-    java/text/StringCharacterIterator.java \
-    java/text/spi/BreakIteratorProvider.java \
-    java/text/spi/CollatorProvider.java \
-    java/text/spi/DateFormatProvider.java \
-    java/text/spi/DateFormatSymbolsProvider.java \
-    java/text/spi/DecimalFormatSymbolsProvider.java \
-    java/text/spi/NumberFormatProvider.java \
-        sun/text/SupplementaryCharacterData.java \
-        sun/text/CodePointIterator.java \
-        sun/text/CollatorUtilities.java \
-        sun/text/CompactByteArray.java \
-        sun/text/ComposedCharIter.java \
-        sun/text/IntHashtable.java \
-        sun/text/Normalizer.java \
-        sun/text/SupplementaryCharacterData.java \
-        sun/text/UCompactIntArray.java \
-            sun/text/bidi/BidiBase.java \
-            sun/text/bidi/BidiLine.java \
-            sun/text/bidi/BidiRun.java \
-            \
-            sun/text/normalizer/CharTrie.java \
-            sun/text/normalizer/CharacterIteratorWrapper.java \
-            sun/text/normalizer/ICUBinary.java \
-            sun/text/normalizer/ICUData.java \
-            sun/text/normalizer/IntTrie.java \
-            sun/text/normalizer/NormalizerBase.java \
-            sun/text/normalizer/NormalizerDataReader.java \
-            sun/text/normalizer/NormalizerImpl.java \
-            sun/text/normalizer/RangeValueIterator.java \
-            sun/text/normalizer/Replaceable.java \
-            sun/text/normalizer/ReplaceableString.java \
-            sun/text/normalizer/ReplaceableUCharacterIterator.java \
-            sun/text/normalizer/RuleCharacterIterator.java \
-            sun/text/normalizer/SymbolTable.java \
-            sun/text/normalizer/Trie.java \
-            sun/text/normalizer/TrieIterator.java \
-            sun/text/normalizer/UBiDiProps.java \
-            sun/text/normalizer/UCharacter.java \
-            sun/text/normalizer/UCharacterIterator.java \
-            sun/text/normalizer/UCharacterProperty.java \
-            sun/text/normalizer/UCharacterPropertyReader.java \
-            sun/text/normalizer/UTF16.java \
-            sun/text/normalizer/UnicodeMatcher.java \
-            sun/text/normalizer/UnicodeSet.java \
-            sun/text/normalizer/UnicodeSetIterator.java \
-            sun/text/normalizer/Utility.java \
-            sun/text/normalizer/VersionInfo.java \
-	\
-        sun/text/resources/BreakIteratorInfo.java \
-	\
-        sun/text/resources/CollationData.java \
-        sun/text/resources/CollationData_be.java \
-        sun/text/resources/CollationData_bg.java \
-        sun/text/resources/CollationData_ca.java \
-        sun/text/resources/CollationData_cs.java \
-        sun/text/resources/CollationData_da.java \
-        sun/text/resources/CollationData_de.java \
-        sun/text/resources/CollationData_el.java \
-        sun/text/resources/CollationData_en.java \
-        sun/text/resources/CollationData_es.java \
-        sun/text/resources/CollationData_et.java \
-        sun/text/resources/CollationData_fi.java \
-        sun/text/resources/CollationData_fr.java \
-        sun/text/resources/CollationData_hr.java \
-        sun/text/resources/CollationData_hu.java \
-        sun/text/resources/CollationData_is.java \
-        sun/text/resources/CollationData_it.java \
-        sun/text/resources/CollationData_lt.java \
-        sun/text/resources/CollationData_lv.java \
-        sun/text/resources/CollationData_mk.java \
-        sun/text/resources/CollationData_nl.java \
-        sun/text/resources/CollationData_no.java \
-        sun/text/resources/CollationData_pl.java \
-        sun/text/resources/CollationData_pt.java \
-        sun/text/resources/CollationData_ro.java \
-        sun/text/resources/CollationData_ru.java \
-        sun/text/resources/CollationData_sk.java \
-        sun/text/resources/CollationData_sl.java \
-        sun/text/resources/CollationData_sq.java \
-        sun/text/resources/CollationData_sr.java \
-        sun/text/resources/CollationData_sv.java \
-        sun/text/resources/CollationData_tr.java \
-        sun/text/resources/CollationData_uk.java \
-	\
-        sun/text/resources/FormatData.java \
-        sun/text/resources/FormatData_be.java \
-        sun/text/resources/FormatData_be_BY.java \
-        sun/text/resources/FormatData_bg.java \
-        sun/text/resources/FormatData_bg_BG.java \
-        sun/text/resources/FormatData_ca.java \
-        sun/text/resources/FormatData_ca_ES.java \
-        sun/text/resources/FormatData_cs.java \
-        sun/text/resources/FormatData_cs_CZ.java \
-        sun/text/resources/FormatData_da.java \
-        sun/text/resources/FormatData_da_DK.java \
-        sun/text/resources/FormatData_de.java \
-        sun/text/resources/FormatData_de_AT.java \
-        sun/text/resources/FormatData_de_CH.java \
-        sun/text/resources/FormatData_de_DE.java \
-        sun/text/resources/FormatData_de_LU.java \
-        sun/text/resources/FormatData_el.java \
-        sun/text/resources/FormatData_el_CY.java \
-        sun/text/resources/FormatData_el_GR.java \
-        sun/text/resources/FormatData_en.java \
-        sun/text/resources/FormatData_en_US.java \
-        sun/text/resources/FormatData_en_AU.java \
-        sun/text/resources/FormatData_en_CA.java \
-        sun/text/resources/FormatData_en_GB.java \
-        sun/text/resources/FormatData_en_IE.java \
-        sun/text/resources/FormatData_en_IN.java \
-        sun/text/resources/FormatData_en_MT.java \
-        sun/text/resources/FormatData_en_NZ.java \
-        sun/text/resources/FormatData_en_PH.java \
-        sun/text/resources/FormatData_en_SG.java \
-        sun/text/resources/FormatData_en_ZA.java \
-        sun/text/resources/FormatData_es.java \
-        sun/text/resources/FormatData_es_BO.java \
-        sun/text/resources/FormatData_es_AR.java \
-        sun/text/resources/FormatData_es_CL.java \
-        sun/text/resources/FormatData_es_CO.java \
-        sun/text/resources/FormatData_es_CR.java \
-        sun/text/resources/FormatData_es_DO.java \
-        sun/text/resources/FormatData_es_EC.java \
-        sun/text/resources/FormatData_es_ES.java \
-        sun/text/resources/FormatData_es_GT.java \
-        sun/text/resources/FormatData_es_HN.java \
-        sun/text/resources/FormatData_es_MX.java \
-        sun/text/resources/FormatData_es_NI.java \
-        sun/text/resources/FormatData_es_PA.java \
-        sun/text/resources/FormatData_es_PE.java \
-        sun/text/resources/FormatData_es_PR.java \
-        sun/text/resources/FormatData_es_PY.java \
-        sun/text/resources/FormatData_es_SV.java \
-        sun/text/resources/FormatData_es_US.java \
-        sun/text/resources/FormatData_es_UY.java \
-        sun/text/resources/FormatData_es_VE.java \
-        sun/text/resources/FormatData_et.java \
-        sun/text/resources/FormatData_et_EE.java \
-        sun/text/resources/FormatData_fi.java \
-        sun/text/resources/FormatData_fi_FI.java \
-        sun/text/resources/FormatData_fr.java \
-        sun/text/resources/FormatData_fr_BE.java \
-        sun/text/resources/FormatData_fr_CA.java \
-        sun/text/resources/FormatData_fr_CH.java \
-        sun/text/resources/FormatData_fr_FR.java \
-        sun/text/resources/FormatData_fr_LU.java \
-        sun/text/resources/FormatData_ga.java \
-        sun/text/resources/FormatData_ga_IE.java \
-        sun/text/resources/FormatData_hr.java \
-        sun/text/resources/FormatData_hr_HR.java \
-        sun/text/resources/FormatData_hu.java \
-        sun/text/resources/FormatData_hu_HU.java \
-        sun/text/resources/FormatData_in.java \
-        sun/text/resources/FormatData_in_ID.java \
-        sun/text/resources/FormatData_is.java \
-        sun/text/resources/FormatData_is_IS.java \
-        sun/text/resources/FormatData_it.java \
-        sun/text/resources/FormatData_it_CH.java \
-        sun/text/resources/FormatData_it_IT.java \
-        sun/text/resources/FormatData_lt.java \
-        sun/text/resources/FormatData_lt_LT.java \
-        sun/text/resources/FormatData_lv.java \
-        sun/text/resources/FormatData_lv_LV.java \
-        sun/text/resources/FormatData_mk.java \
-        sun/text/resources/FormatData_mk_MK.java \
-        sun/text/resources/FormatData_ms.java \
-        sun/text/resources/FormatData_ms_MY.java \
-        sun/text/resources/FormatData_mt.java \
-        sun/text/resources/FormatData_mt_MT.java \
-        sun/text/resources/FormatData_nl.java \
-        sun/text/resources/FormatData_nl_BE.java \
-        sun/text/resources/FormatData_nl_NL.java \
-        sun/text/resources/FormatData_no.java \
-        sun/text/resources/FormatData_no_NO.java \
-        sun/text/resources/FormatData_no_NO_NY.java \
-        sun/text/resources/FormatData_pl.java \
-        sun/text/resources/FormatData_pl_PL.java \
-        sun/text/resources/FormatData_pt.java \
-        sun/text/resources/FormatData_pt_BR.java \
-        sun/text/resources/FormatData_pt_PT.java \
-        sun/text/resources/FormatData_ro.java \
-        sun/text/resources/FormatData_ro_RO.java \
-        sun/text/resources/FormatData_ru.java \
-        sun/text/resources/FormatData_ru_RU.java \
-        sun/text/resources/FormatData_sk.java \
-        sun/text/resources/FormatData_sk_SK.java \
-        sun/text/resources/FormatData_sl.java \
-        sun/text/resources/FormatData_sl_SI.java \
-        sun/text/resources/FormatData_sq.java \
-        sun/text/resources/FormatData_sq_AL.java \
-        sun/text/resources/FormatData_sr.java \
-        sun/text/resources/FormatData_sr_BA.java \
-        sun/text/resources/FormatData_sr_CS.java \
-        sun/text/resources/FormatData_sr_ME.java \
-        sun/text/resources/FormatData_sr_RS.java \
-        sun/text/resources/FormatData_sv.java \
-        sun/text/resources/FormatData_sv_SE.java \
-        sun/text/resources/FormatData_tr.java \
-        sun/text/resources/FormatData_tr_TR.java \
-        sun/text/resources/FormatData_uk.java \
-        sun/text/resources/FormatData_uk_UA.java
--- a/make/java/text/Makefile	Sat Mar 06 03:37:53 2010 +0300
+++ b/make/java/text/Makefile	Wed Mar 24 14:16:57 2010 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright 1996-2006 Sun Microsystems, Inc.  All Rights Reserved.
+# 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
@@ -23,86 +23,19 @@
 # have any questions.
 #
 
+#
+# Makefile for building all of java.text
+#
+
 BUILDDIR = ../..
-
-PACKAGE = java.text
 PRODUCT = sun
-
 include $(BUILDDIR)/common/Defs.gmk
 
-#
-# Files
-#
-include FILES_java.gmk
+SUBDIRS         = base
+SUBDIRS_desktop = bidi
 
-#
-# Include
-#
-include $(BUILDDIR)/common/Classes.gmk
+include $(BUILDDIR)/common/Subdirs.gmk
 
-#
-# Rules to add data files BreakIterator
-#
-TEXT_CLASSES = $(BUILDTOOLCLASSDIR)/java.text/classes
+all build clean clobber::
+	$(SUBDIRS-loop)
 
-# input
-#
-#   Notes: sun.text.resources.BreakIteratorRules no longer goes to runtime.
-#     They are used at JDK build phase in order to create $(BIFILES) which
-#     are used on runtime instead.
-#
-TEXT_SRCDIR  = $(SHARE_SRC)/classes/sun/text/resources
-TEXT_SOURCES = $(TEXT_SRCDIR)/BreakIteratorRules.java \
-               $(TEXT_SRCDIR)/BreakIteratorInfo.java
-UNICODEDATA  = $(BUILDDIR)/tools/UnicodeData
-
-# output
-TEXT_CLASSDIR  = $(CLASSBINDIR)/sun/text/resources
-BIFILES = $(TEXT_CLASSDIR)/CharacterBreakIteratorData \
-          $(TEXT_CLASSDIR)/WordBreakIteratorData \
-          $(TEXT_CLASSDIR)/LineBreakIteratorData \
-          $(TEXT_CLASSDIR)/SentenceBreakIteratorData
-
-ICU_FILES = $(TEXT_CLASSDIR)/unorm.icu \
-            $(TEXT_CLASSDIR)/uprops.icu \
-            $(TEXT_CLASSDIR)/ubidi.icu
-
-# builder
-GENERATEBREAKITERATORDATA_JARFILE = \
-    $(BUILDTOOLJARDIR)/generatebreakiteratordata.jar
-
-$(BIFILES): $(GENERATEBREAKITERATORDATA_JARFILE) \
-    $(UNICODEDATA)/UnicodeData.txt \
-    $(TEXT_SOURCES)
-	$(prep-target)
-	$(RM) -r $(TEXT_CLASSES)
-	$(MKDIR) -p $(TEXT_CLASSES)
-	$(BOOT_JAVAC_CMD) -d $(TEXT_CLASSES) \
-		-sourcepath $(TEXT_SRCDIR) \
-		$(TEXT_SOURCES)
-	$(MKDIR) -p  $(TEXT_CLASSDIR)
-	$(BOOT_JAVA_CMD) -Xbootclasspath/p:$(TEXT_CLASSES) \
-		-jar $(GENERATEBREAKITERATORDATA_JARFILE) \
-		-o $(TEXT_CLASSDIR) \
-		-spec $(UNICODEDATA)/UnicodeData.txt
-	@$(java-vm-cleanup)
-
-build: $(BIFILES) $(ICU_FILES)
-
-#
-# Extra rules to copy unorm.icu, uprops.icu, and ubidi.icu
-#
-$(TEXT_CLASSDIR)/unorm.icu: $(TEXT_SRCDIR)/unorm.icu
-	$(install-file)
-
-$(TEXT_CLASSDIR)/uprops.icu: $(TEXT_SRCDIR)/uprops.icu
-	$(install-file)
-
-$(TEXT_CLASSDIR)/ubidi.icu: $(TEXT_SRCDIR)/ubidi.icu
-	$(install-file)
-
-clean clobber::
-	$(RM) -r $(TEXT_CLASSES)
-	$(RM) -r $(BIFILES)
-	$(RM) $(ICU_FILES)
-
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/make/java/text/base/FILES_java.gmk	Wed Mar 24 14:16:57 2010 -0700
@@ -0,0 +1,258 @@
+#
+# Copyright 1996-2007 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.
+#
+
+FILES_java = \
+    java/text/Annotation.java \
+    java/text/AttributedCharacterIterator.java \
+    java/text/AttributedString.java \
+    java/text/BreakDictionary.java \
+    java/text/BreakIterator.java \
+    java/text/CharacterIterator.java \
+    java/text/CharacterIteratorFieldDelegate.java \
+    java/text/ChoiceFormat.java \
+    java/text/Collator.java \
+    java/text/CollationElementIterator.java \
+    java/text/CollationKey.java \
+    java/text/CollationRules.java \
+    java/text/DateFormat.java \
+    java/text/DateFormatSymbols.java \
+    java/text/DecimalFormat.java \
+    java/text/DictionaryBasedBreakIterator.java \
+    java/text/DigitList.java \
+    java/text/EntryPair.java \
+    java/text/Format.java \
+    java/text/FieldPosition.java \
+    java/text/DontCareFieldPosition.java \
+    java/text/MergeCollation.java \
+    java/text/MessageFormat.java \
+    java/text/Normalizer.java \
+    java/text/NumberFormat.java \
+    java/text/DecimalFormatSymbols.java \
+    java/text/ParseException.java \
+    java/text/ParsePosition.java \
+    java/text/PatternEntry.java \
+    java/text/RBCollationTables.java \
+    java/text/RBTableBuilder.java \
+    java/text/RuleBasedBreakIterator.java \
+    java/text/RuleBasedCollator.java \
+    java/text/RuleBasedCollationKey.java \
+    java/text/SimpleDateFormat.java \
+    java/text/StringCharacterIterator.java \
+    java/text/spi/BreakIteratorProvider.java \
+    java/text/spi/CollatorProvider.java \
+    java/text/spi/DateFormatProvider.java \
+    java/text/spi/DateFormatSymbolsProvider.java \
+    java/text/spi/DecimalFormatSymbolsProvider.java \
+    java/text/spi/NumberFormatProvider.java \
+        sun/text/SupplementaryCharacterData.java \
+        sun/text/CodePointIterator.java \
+        sun/text/CollatorUtilities.java \
+        sun/text/CompactByteArray.java \
+        sun/text/ComposedCharIter.java \
+        sun/text/IntHashtable.java \
+        sun/text/Normalizer.java \
+        sun/text/SupplementaryCharacterData.java \
+        sun/text/UCompactIntArray.java \
+            sun/text/normalizer/CharTrie.java \
+            sun/text/normalizer/CharacterIteratorWrapper.java \
+            sun/text/normalizer/ICUBinary.java \
+            sun/text/normalizer/ICUData.java \
+            sun/text/normalizer/IntTrie.java \
+            sun/text/normalizer/NormalizerBase.java \
+            sun/text/normalizer/NormalizerDataReader.java \
+            sun/text/normalizer/NormalizerImpl.java \
+            sun/text/normalizer/RangeValueIterator.java \
+            sun/text/normalizer/Replaceable.java \
+            sun/text/normalizer/ReplaceableString.java \
+            sun/text/normalizer/ReplaceableUCharacterIterator.java \
+            sun/text/normalizer/RuleCharacterIterator.java \
+            sun/text/normalizer/SymbolTable.java \
+            sun/text/normalizer/Trie.java \
+            sun/text/normalizer/TrieIterator.java \
+            sun/text/normalizer/UBiDiProps.java \
+            sun/text/normalizer/UCharacter.java \
+            sun/text/normalizer/UCharacterIterator.java \
+            sun/text/normalizer/UCharacterProperty.java \
+            sun/text/normalizer/UCharacterPropertyReader.java \
+            sun/text/normalizer/UTF16.java \
+            sun/text/normalizer/UnicodeMatcher.java \
+            sun/text/normalizer/UnicodeSet.java \
+            sun/text/normalizer/UnicodeSetIterator.java \
+            sun/text/normalizer/Utility.java \
+            sun/text/normalizer/VersionInfo.java \
+	\
+        sun/text/resources/BreakIteratorInfo.java \
+	\
+        sun/text/resources/CollationData.java \
+        sun/text/resources/CollationData_be.java \
+        sun/text/resources/CollationData_bg.java \
+        sun/text/resources/CollationData_ca.java \
+        sun/text/resources/CollationData_cs.java \
+        sun/text/resources/CollationData_da.java \
+        sun/text/resources/CollationData_de.java \
+        sun/text/resources/CollationData_el.java \
+        sun/text/resources/CollationData_en.java \
+        sun/text/resources/CollationData_es.java \
+        sun/text/resources/CollationData_et.java \
+        sun/text/resources/CollationData_fi.java \
+        sun/text/resources/CollationData_fr.java \
+        sun/text/resources/CollationData_hr.java \
+        sun/text/resources/CollationData_hu.java \
+        sun/text/resources/CollationData_is.java \
+        sun/text/resources/CollationData_it.java \
+        sun/text/resources/CollationData_lt.java \
+        sun/text/resources/CollationData_lv.java \
+        sun/text/resources/CollationData_mk.java \
+        sun/text/resources/CollationData_nl.java \
+        sun/text/resources/CollationData_no.java \
+        sun/text/resources/CollationData_pl.java \
+        sun/text/resources/CollationData_pt.java \
+        sun/text/resources/CollationData_ro.java \
+        sun/text/resources/CollationData_ru.java \
+        sun/text/resources/CollationData_sk.java \
+        sun/text/resources/CollationData_sl.java \
+        sun/text/resources/CollationData_sq.java \
+        sun/text/resources/CollationData_sr.java \
+        sun/text/resources/CollationData_sv.java \
+        sun/text/resources/CollationData_tr.java \
+        sun/text/resources/CollationData_uk.java \
+	\
+        sun/text/resources/FormatData.java \
+        sun/text/resources/FormatData_be.java \
+        sun/text/resources/FormatData_be_BY.java \
+        sun/text/resources/FormatData_bg.java \
+        sun/text/resources/FormatData_bg_BG.java \
+        sun/text/resources/FormatData_ca.java \
+        sun/text/resources/FormatData_ca_ES.java \
+        sun/text/resources/FormatData_cs.java \
+        sun/text/resources/FormatData_cs_CZ.java \
+        sun/text/resources/FormatData_da.java \
+        sun/text/resources/FormatData_da_DK.java \
+        sun/text/resources/FormatData_de.java \
+        sun/text/resources/FormatData_de_AT.java \
+        sun/text/resources/FormatData_de_CH.java \
+        sun/text/resources/FormatData_de_DE.java \
+        sun/text/resources/FormatData_de_LU.java \
+        sun/text/resources/FormatData_el.java \
+        sun/text/resources/FormatData_el_CY.java \
+        sun/text/resources/FormatData_el_GR.java \
+        sun/text/resources/FormatData_en.java \
+        sun/text/resources/FormatData_en_US.java \
+        sun/text/resources/FormatData_en_AU.java \
+        sun/text/resources/FormatData_en_CA.java \
+        sun/text/resources/FormatData_en_GB.java \
+        sun/text/resources/FormatData_en_IE.java \
+        sun/text/resources/FormatData_en_IN.java \
+        sun/text/resources/FormatData_en_MT.java \
+        sun/text/resources/FormatData_en_NZ.java \
+        sun/text/resources/FormatData_en_PH.java \
+        sun/text/resources/FormatData_en_SG.java \
+        sun/text/resources/FormatData_en_ZA.java \
+        sun/text/resources/FormatData_es.java \
+        sun/text/resources/FormatData_es_BO.java \
+        sun/text/resources/FormatData_es_AR.java \
+        sun/text/resources/FormatData_es_CL.java \
+        sun/text/resources/FormatData_es_CO.java \
+        sun/text/resources/FormatData_es_CR.java \
+        sun/text/resources/FormatData_es_DO.java \
+        sun/text/resources/FormatData_es_EC.java \
+        sun/text/resources/FormatData_es_ES.java \
+        sun/text/resources/FormatData_es_GT.java \
+        sun/text/resources/FormatData_es_HN.java \
+        sun/text/resources/FormatData_es_MX.java \
+        sun/text/resources/FormatData_es_NI.java \
+        sun/text/resources/FormatData_es_PA.java \
+        sun/text/resources/FormatData_es_PE.java \
+        sun/text/resources/FormatData_es_PR.java \
+        sun/text/resources/FormatData_es_PY.java \
+        sun/text/resources/FormatData_es_SV.java \
+        sun/text/resources/FormatData_es_US.java \
+        sun/text/resources/FormatData_es_UY.java \
+        sun/text/resources/FormatData_es_VE.java \
+        sun/text/resources/FormatData_et.java \
+        sun/text/resources/FormatData_et_EE.java \
+        sun/text/resources/FormatData_fi.java \
+        sun/text/resources/FormatData_fi_FI.java \
+        sun/text/resources/FormatData_fr.java \
+        sun/text/resources/FormatData_fr_BE.java \
+        sun/text/resources/FormatData_fr_CA.java \
+        sun/text/resources/FormatData_fr_CH.java \
+        sun/text/resources/FormatData_fr_FR.java \
+        sun/text/resources/FormatData_fr_LU.java \
+        sun/text/resources/FormatData_ga.java \
+        sun/text/resources/FormatData_ga_IE.java \
+        sun/text/resources/FormatData_hr.java \
+        sun/text/resources/FormatData_hr_HR.java \
+        sun/text/resources/FormatData_hu.java \
+        sun/text/resources/FormatData_hu_HU.java \
+        sun/text/resources/FormatData_in.java \
+        sun/text/resources/FormatData_in_ID.java \
+        sun/text/resources/FormatData_is.java \
+        sun/text/resources/FormatData_is_IS.java \
+        sun/text/resources/FormatData_it.java \
+        sun/text/resources/FormatData_it_CH.java \
+        sun/text/resources/FormatData_it_IT.java \
+        sun/text/resources/FormatData_lt.java \
+        sun/text/resources/FormatData_lt_LT.java \
+        sun/text/resources/FormatData_lv.java \
+        sun/text/resources/FormatData_lv_LV.java \
+        sun/text/resources/FormatData_mk.java \
+        sun/text/resources/FormatData_mk_MK.java \
+        sun/text/resources/FormatData_ms.java \
+        sun/text/resources/FormatData_ms_MY.java \
+        sun/text/resources/FormatData_mt.java \
+        sun/text/resources/FormatData_mt_MT.java \
+        sun/text/resources/FormatData_nl.java \
+        sun/text/resources/FormatData_nl_BE.java \
+        sun/text/resources/FormatData_nl_NL.java \
+        sun/text/resources/FormatData_no.java \
+        sun/text/resources/FormatData_no_NO.java \
+        sun/text/resources/FormatData_no_NO_NY.java \
+        sun/text/resources/FormatData_pl.java \
+        sun/text/resources/FormatData_pl_PL.java \
+        sun/text/resources/FormatData_pt.java \
+        sun/text/resources/FormatData_pt_BR.java \
+        sun/text/resources/FormatData_pt_PT.java \
+        sun/text/resources/FormatData_ro.java \
+        sun/text/resources/FormatData_ro_RO.java \
+        sun/text/resources/FormatData_ru.java \
+        sun/text/resources/FormatData_ru_RU.java \
+        sun/text/resources/FormatData_sk.java \
+        sun/text/resources/FormatData_sk_SK.java \
+        sun/text/resources/FormatData_sl.java \
+        sun/text/resources/FormatData_sl_SI.java \
+        sun/text/resources/FormatData_sq.java \
+        sun/text/resources/FormatData_sq_AL.java \
+        sun/text/resources/FormatData_sr.java \
+        sun/text/resources/FormatData_sr_BA.java \
+        sun/text/resources/FormatData_sr_CS.java \
+        sun/text/resources/FormatData_sr_ME.java \
+        sun/text/resources/FormatData_sr_RS.java \
+        sun/text/resources/FormatData_sv.java \
+        sun/text/resources/FormatData_sv_SE.java \
+        sun/text/resources/FormatData_tr.java \
+        sun/text/resources/FormatData_tr_TR.java \
+        sun/text/resources/FormatData_uk.java \
+        sun/text/resources/FormatData_uk_UA.java
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/make/java/text/base/Makefile	Wed Mar 24 14:16:57 2010 -0700
@@ -0,0 +1,108 @@
+#
+# Copyright 1996-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.
+#
+
+BUILDDIR = ../../..
+MODULE  = base
+PACKAGE = java.text
+PRODUCT = sun
+
+include $(BUILDDIR)/common/Defs.gmk
+
+#
+# Files
+#
+include FILES_java.gmk
+
+#
+# Include
+#
+include $(BUILDDIR)/common/Classes.gmk
+
+#
+# Rules to add data files BreakIterator
+#
+TEXT_CLASSES = $(BUILDTOOLCLASSDIR)/java.text/classes
+
+# input
+#
+#   Notes: sun.text.resources.BreakIteratorRules no longer goes to runtime.
+#     They are used at JDK build phase in order to create $(BIFILES) which
+#     are used on runtime instead.
+#
+TEXT_SRCDIR  = $(SHARE_SRC)/classes/sun/text/resources
+TEXT_SOURCES = $(TEXT_SRCDIR)/BreakIteratorRules.java \
+               $(TEXT_SRCDIR)/BreakIteratorInfo.java
+UNICODEDATA  = $(BUILDDIR)/tools/UnicodeData
+
+# output
+TEXT_CLASSDIR  = $(CLASSBINDIR)/sun/text/resources
+BIFILES = $(TEXT_CLASSDIR)/CharacterBreakIteratorData \
+          $(TEXT_CLASSDIR)/WordBreakIteratorData \
+          $(TEXT_CLASSDIR)/LineBreakIteratorData \
+          $(TEXT_CLASSDIR)/SentenceBreakIteratorData
+
+ICU_FILES = $(TEXT_CLASSDIR)/unorm.icu \
+            $(TEXT_CLASSDIR)/uprops.icu \
+            $(TEXT_CLASSDIR)/ubidi.icu
+
+# builder
+GENERATEBREAKITERATORDATA_JARFILE = \
+    $(BUILDTOOLJARDIR)/generatebreakiteratordata.jar
+
+$(BIFILES): $(GENERATEBREAKITERATORDATA_JARFILE) \
+    $(UNICODEDATA)/UnicodeData.txt \
+    $(TEXT_SOURCES)
+	$(prep-target)
+	$(RM) -r $(TEXT_CLASSES)
+	$(MKDIR) -p $(TEXT_CLASSES)
+	$(BOOT_JAVAC_CMD) -d $(TEXT_CLASSES) \
+		-sourcepath $(TEXT_SRCDIR) \
+		$(TEXT_SOURCES)
+	$(MKDIR) -p  $(TEXT_CLASSDIR)
+	$(BOOT_JAVA_CMD) -Xbootclasspath/p:$(TEXT_CLASSES) \
+		-jar $(GENERATEBREAKITERATORDATA_JARFILE) \
+		-o $(TEXT_CLASSDIR) \
+		-spec $(UNICODEDATA)/UnicodeData.txt
+	@$(java-vm-cleanup)
+
+build: $(BIFILES) $(ICU_FILES)
+
+#
+# Extra rules to copy unorm.icu, uprops.icu, and ubidi.icu
+#
+$(TEXT_CLASSDIR)/unorm.icu: $(TEXT_SRCDIR)/unorm.icu
+	$(install-file)
+
+$(TEXT_CLASSDIR)/uprops.icu: $(TEXT_SRCDIR)/uprops.icu
+	$(install-file)
+
+$(TEXT_CLASSDIR)/ubidi.icu: $(TEXT_SRCDIR)/ubidi.icu
+	$(install-file)
+
+clean clobber::
+	$(RM) -r $(TEXT_CLASSES)
+	$(RM) -r $(BIFILES)
+	$(RM) $(ICU_FILES)
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/make/java/text/bidi/Makefile	Wed Mar 24 14:16:57 2010 -0700
@@ -0,0 +1,44 @@
+#
+# 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.  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 = ../../..
+PACKAGE = java.text
+PRODUCT = sun
+include $(BUILDDIR)/common/Defs.gmk
+
+#
+# Files for Bidi that is not in the base module
+#
+FILES_java = \
+    java/text/Bidi.java \
+    sun/text/bidi/BidiBase.java \
+    sun/text/bidi/BidiLine.java \
+    sun/text/bidi/BidiRun.java \
+    sun/text/CodePointIterator.java
+
+#
+# Include
+#
+include $(BUILDDIR)/common/Classes.gmk
--- a/make/java/verify/Makefile	Sat Mar 06 03:37:53 2010 +0300
+++ b/make/java/verify/Makefile	Wed Mar 24 14:16:57 2010 -0700
@@ -28,6 +28,7 @@
 #
 
 BUILDDIR = ../..
+MODULE  = base
 PRODUCT = java
 LIBRARY = verify
 include $(BUILDDIR)/common/Defs.gmk
--- a/make/java/zip/Makefile	Sat Mar 06 03:37:53 2010 +0300
+++ b/make/java/zip/Makefile	Wed Mar 24 14:16:57 2010 -0700
@@ -25,6 +25,7 @@
 
 
 BUILDDIR = ../..
+MODULE  = base
 PACKAGE = java.util.zip
 LIBRARY = zip
 PRODUCT = sun
--- a/make/javax/Makefile	Sat Mar 06 03:37:53 2010 +0300
+++ b/make/javax/Makefile	Wed Mar 24 14:16:57 2010 -0700
@@ -30,19 +30,24 @@
 BUILDDIR = ..
 include $(BUILDDIR)/common/Defs.gmk
 
+SUBDIRS = others
+
+SUBDIRS_management = management
+
+SUBDIRS_misc = \
+        crypto \
+        sql \
+        rmi
+
 # imageio uses xml, so build it last
+SUBDIRS_desktop = \
+        accessibility \
+        print \
+        swing \
+        sound \
+        imageio
 
-SUBDIRS = \
-	others \
-	accessibility \
-	print \
-	swing \
-	crypto \
-	sound \
-	sql \
-	rmi \
-	management \
-	imageio
+include $(BUILDDIR)/common/Subdirs.gmk
 
 all build:
 	$(SUBDIRS-loop)
--- a/make/javax/crypto/Makefile	Sat Mar 06 03:37:53 2010 +0300
+++ b/make/javax/crypto/Makefile	Wed Mar 24 14:16:57 2010 -0700
@@ -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/make/javax/imageio/Makefile	Sat Mar 06 03:37:53 2010 +0300
+++ b/make/javax/imageio/Makefile	Wed Mar 24 14:16:57 2010 -0700
@@ -28,6 +28,7 @@
 #
 
 BUILDDIR = ../..
+MODULE  = imageio
 PACKAGE = javax.imageio
 PRODUCT = jiio
 include $(BUILDDIR)/common/Defs.gmk
--- a/make/javax/print/Makefile	Sat Mar 06 03:37:53 2010 +0300
+++ b/make/javax/print/Makefile	Wed Mar 24 14:16:57 2010 -0700
@@ -28,6 +28,7 @@
 #
 
 BUILDDIR = ../..
+MODULE  = print
 PACKAGE = javax.print
 PRODUCT = sun
 include $(BUILDDIR)/common/Defs.gmk
--- a/make/javax/rmi/Makefile	Sat Mar 06 03:37:53 2010 +0300
+++ b/make/javax/rmi/Makefile	Wed Mar 24 14:16:57 2010 -0700
@@ -31,6 +31,8 @@
 include $(BUILDDIR)/common/Defs.gmk
 
 SUBDIRS = ssl
+include $(BUILDDIR)/common/Subdirs.gmk
+
 all build clean clobber::
 	$(SUBDIRS-loop)
 
--- a/make/javax/sound/Makefile	Sat Mar 06 03:37:53 2010 +0300
+++ b/make/javax/sound/Makefile	Wed Mar 24 14:16:57 2010 -0700
@@ -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
@@ -108,22 +109,14 @@
 endif # PLATFORM linux
 
 ifeq ($(PLATFORM), solaris)
-  ifneq ($(ARCH), amd64)
-    # build with ports and direct audio
-    CPPFLAGS += -DUSE_PORTS=TRUE 	\
-                -DUSE_DAUDIO=TRUE
+  # build with ports and direct audio
+  CPPFLAGS += -DUSE_PORTS=TRUE 	\
+              -DUSE_DAUDIO=TRUE
 
-    INCLUDE_PORTS = TRUE
-    INCLUDE_DAUDIO = TRUE
-    INCLUDE_MIDI = TRUE
-  else
-    # build with empty MIDI i/o
-    INCLUDE_MIDI = TRUE
-    # build with empty ports
-    INCLUDE_PORTS = TRUE
-    # build with empty direct audio
-    INCLUDE_DAUDIO = TRUE
-  endif
+  INCLUDE_PORTS = TRUE
+  INCLUDE_DAUDIO = TRUE
+  # build with empty MIDI i/o
+  INCLUDE_MIDI = TRUE
 endif # PLATFORM solaris
 
 # for dynamic inclusion of extra sound libs: these
@@ -166,6 +159,7 @@
 # Include rules
 #
 include $(BUILDDIR)/common/Library.gmk
+include $(BUILDDIR)/common/Subdirs.gmk
 
 #
 # Rules that copy files.
--- a/make/javax/sound/jsoundalsa/Makefile	Sat Mar 06 03:37:53 2010 +0300
+++ b/make/javax/sound/jsoundalsa/Makefile	Wed Mar 24 14:16:57 2010 -0700
@@ -24,6 +24,7 @@
 #
 
 BUILDDIR = ../../..
+MODULE  = sound
 PACKAGE = javax.sound
 LIBRARY = jsoundalsa
 PRODUCT = sun
--- a/make/javax/sound/jsoundds/Makefile	Sat Mar 06 03:37:53 2010 +0300
+++ b/make/javax/sound/jsoundds/Makefile	Wed Mar 24 14:16:57 2010 -0700
@@ -24,6 +24,7 @@
 #
 
 BUILDDIR = ../../..
+MODULE  = sound
 PACKAGE = javax.sound
 LIBRARY = jsoundds
 PRODUCT = sun
--- a/make/javax/sql/Makefile	Sat Mar 06 03:37:53 2010 +0300
+++ b/make/javax/sql/Makefile	Wed Mar 24 14:16:57 2010 -0700
@@ -28,6 +28,7 @@
 #
 
 BUILDDIR = ../..
+MODULE  = jdbc-enterprise
 PACKAGE = javax.sql
 PRODUCT = sun
 include $(BUILDDIR)/common/Defs.gmk
--- a/make/javax/swing/Makefile	Sat Mar 06 03:37:53 2010 +0300
+++ b/make/javax/swing/Makefile	Wed Mar 24 14:16:57 2010 -0700
@@ -24,6 +24,7 @@
 #
 
 BUILDDIR  = ../..
+MODULE    = swing
 PACKAGE   = javax.swing
 PRODUCT   = com
 SWING_SRC = $(SHARE_SRC)/classes/javax/swing
@@ -39,6 +40,7 @@
 SUBDIRS = html32dtd plaf
 
 include $(BUILDDIR)/common/Classes.gmk
+include $(BUILDDIR)/common/Subdirs.gmk
 
 build: other_files
 	$(SUBDIRS-loop)
--- a/make/javax/swing/beaninfo/SwingBeans.gmk	Sat Mar 06 03:37:53 2010 +0300
+++ b/make/javax/swing/beaninfo/SwingBeans.gmk	Wed Mar 24 14:16:57 2010 -0700
@@ -25,7 +25,7 @@
 
 #
 # Makefile to build the BeanInfo generation tool (ie, a doclet), and
-# then the beaninfo itself.  Swing versions prior to 1.2 is no longer
+# then the beaninfo itself.  Swing versions prior to 1.2 are no longer
 # built.
 #
 # This makefile could be a lot simpler if we made it more regular.
@@ -44,13 +44,12 @@
 	$(MAKE) DEBUG_FLAG=true make-swing-beans
 
 
-LOCAL_JAVADOC   = $(JAVADOC_CMD) $(JAVADOCFLAGS)
 # get the absolute path to the jar command.
 PREFIX          = 1.2
-JAVADOCFLAGS    = $(NO_PROPRIETARY_API_WARNINGS) $(LANGUAGE_VERSION)
+JAVADOCFLAGS    += $(NO_PROPRIETARY_API_WARNINGS) $(LANGUAGE_VERSION)
 SWINGPKG        = javax/swing
 LOCAL_JAVAC_FLAGS = $(OTHER_JAVACFLAGS)
-# since LOCAL_JAVADOC runs on ALT_BOOTDIR, the doclet and all its classes must be compiled to match
+# since JAVADOC_CMD runs on ALT_BOOTDIR, the doclet and all its classes must be compiled to match
 DOCLET_JAVAC_FLAGS = -source 6 -target 6
 
 include FILES.gmk
@@ -114,7 +113,7 @@
 
 .javadoc.beanlist:
 	if [ -s $(TEMPDIR)/.beans.list ]; \
-	then $(LOCAL_JAVADOC) $(DOCLETFLAGS) -x $(DEBUG_FLAG) -d $(BEANSRCDIR) -t $(DOCLETSRC)/SwingBeanInfo.template -docletpath $(DOCLETDST) \
+	then $(JAVADOC_CMD) $(DOCLETFLAGS) -x $(DEBUG_FLAG) -d $(BEANSRCDIR) -t $(DOCLETSRC)/SwingBeanInfo.template -docletpath $(DOCLETDST) \
 	    $(shell if [ -s $(TEMPDIR)/.beans.list ]; then $(CAT) $(TEMPDIR)/.beans.list; fi); \
 	fi
 	@$(java-vm-cleanup)
--- a/make/javax/swing/plaf/Makefile	Sat Mar 06 03:37:53 2010 +0300
+++ b/make/javax/swing/plaf/Makefile	Wed Mar 24 14:16:57 2010 -0700
@@ -24,6 +24,7 @@
 #
 
 BUILDDIR  = ../../..
+MODULE    = swing
 PACKAGE   = javax.swing.plaf
 PRODUCT   = com
 SWING_SRC = $(SHARE_SRC)/classes/javax/swing
--- a/make/jpda/Makefile	Sat Mar 06 03:37:53 2010 +0300
+++ b/make/jpda/Makefile	Wed Mar 24 14:16:57 2010 -0700
@@ -35,6 +35,7 @@
 # Core.
 #
 SUBDIRS    = jdwp back front transport expr tty bdi gui
+include $(BUILDDIR)/common/Subdirs.gmk
 
 all build clean clobber::
 	$(SUBDIRS-loop)
--- a/make/jpda/back/Makefile	Sat Mar 06 03:37:53 2010 +0300
+++ b/make/jpda/back/Makefile	Wed Mar 24 14:16:57 2010 -0700
@@ -28,6 +28,7 @@
 #
 
 BUILDDIR = ../..
+MODULE  = debugging
 LIBRARY = jdwp
 PRODUCT = jpda
 
--- a/make/jpda/transport/Makefile	Sat Mar 06 03:37:53 2010 +0300
+++ b/make/jpda/transport/Makefile	Wed Mar 24 14:16:57 2010 -0700
@@ -28,6 +28,7 @@
 #
 
 BUILDDIR = ../..
+MODULE  = debugging
 PRODUCT = jpda
 include $(BUILDDIR)/common/Defs.gmk
 
@@ -35,6 +36,8 @@
 ifeq ($(PLATFORM), windows)
 SUBDIRS += shmem
 endif # PLATFORM
+
+include $(BUILDDIR)/common/Subdirs.gmk
 all build clean clobber::
 	$(SUBDIRS-loop)
 
--- a/make/jpda/transport/shmem/Makefile	Sat Mar 06 03:37:53 2010 +0300
+++ b/make/jpda/transport/shmem/Makefile	Wed Mar 24 14:16:57 2010 -0700
@@ -28,6 +28,7 @@
 #
 
 BUILDDIR = ../../..
+MODULE   = debugging
 LIBRARY  = dt_shmem
 PRODUCT = jbug
 
--- a/make/jpda/transport/socket/Makefile	Sat Mar 06 03:37:53 2010 +0300
+++ b/make/jpda/transport/socket/Makefile	Wed Mar 24 14:16:57 2010 -0700
@@ -28,6 +28,7 @@
 #
 
 BUILDDIR = ../../..
+MODULE  = debugging
 LIBRARY = dt_socket
 PRODUCT = jbug
 
--- a/make/jpda/tty/Makefile	Sat Mar 06 03:37:53 2010 +0300
+++ b/make/jpda/tty/Makefile	Wed Mar 24 14:16:57 2010 -0700
@@ -28,6 +28,7 @@
 #
 
 BUILDDIR = ../..
+MODULE  = jdb
 PACKAGE = com.sun.tools.example.debug.tty
 PRODUCT = jpda
 PROGRAM = jdb
--- a/make/launchers/Makefile	Sat Mar 06 03:37:53 2010 +0300
+++ b/make/launchers/Makefile	Wed Mar 24 14:16:57 2010 -0700
@@ -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/make/mkdemo/Makefile	Sat Mar 06 03:37:53 2010 +0300
+++ b/make/mkdemo/Makefile	Wed Mar 24 14:16:57 2010 -0700
@@ -31,7 +31,13 @@
 PRODUCT = demos
 include $(BUILDDIR)/common/Defs.gmk
 
-SUBDIRS = applets jfc jvmti management jni scripting jpda
+SUBDIRS            = jni
+SUBDIRS_desktop    = applets jfc
+SUBDIRS_management = management
+SUBDIRS_misc       = scripting
+SUBDIRS_tools      = jpda jvmti
+
+include $(BUILDDIR)/common/Subdirs.gmk
 
 all build:: nbproject
 	$(SUBDIRS-loop)
--- a/make/mkdemo/applets/Makefile	Sat Mar 06 03:37:53 2010 +0300
+++ b/make/mkdemo/applets/Makefile	Wed Mar 24 14:16:57 2010 -0700
@@ -40,6 +40,7 @@
 
 SUBDIRS_MAKEFLAGS += DEMO_IS_APPLET=true
 
+include $(BUILDDIR)/common/Subdirs.gmk
 all build clean clobber::
 	$(SUBDIRS-loop)
 
--- a/make/mkdemo/jfc/Makefile	Sat Mar 06 03:37:53 2010 +0300
+++ b/make/mkdemo/jfc/Makefile	Wed Mar 24 14:16:57 2010 -0700
@@ -46,6 +46,7 @@
   SUBDIRS += Java2D SwingSet2 Stylepad
 endif
 
+include $(BUILDDIR)/common/Subdirs.gmk
 all build clean clobber::
 	$(SUBDIRS-loop)
 
--- a/make/mkdemo/jni/Makefile	Sat Mar 06 03:37:53 2010 +0300
+++ b/make/mkdemo/jni/Makefile	Wed Mar 24 14:16:57 2010 -0700
@@ -37,6 +37,8 @@
   SUBDIRS += Poller
 endif
 
+include $(BUILDDIR)/common/Subdirs.gmk
+
 all build clean clobber::
 	$(SUBDIRS-loop)
 
--- a/make/mkdemo/jvmti/Makefile	Sat Mar 06 03:37:53 2010 +0300
+++ b/make/mkdemo/jvmti/Makefile	Wed Mar 24 14:16:57 2010 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright 2004-2006 Sun Microsystems, Inc.  All Rights Reserved.
+# Copyright 2004-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
@@ -28,17 +28,19 @@
 #
 
 BUILDDIR = ../..
+MODULE  = demos
 PRODUCT = demos
 include $(BUILDDIR)/common/Defs.gmk
 
 # Can be built in any order, the JRE version of hprof and java_crw_demo are
 #   really built in make/java.
-#   The hprof target here just deliveres the sources and README files.
+#   The hprof target here just delivers the sources and README files.
 #   The java_crw_demo and agent_util files are copied into each demo that
 #   uses them.
 SUBDIRS = \
 	  versionCheck \
-          gctest \
+	  compiledMethodLoad \
+	  gctest \
 	  heapViewer \
 	  heapTracker \
 	  minst \
@@ -46,6 +48,8 @@
 	  waiters \
 	  hprof
 
+include $(BUILDDIR)/common/Subdirs.gmk
+
 all build clean clobber::
 	$(SUBDIRS-loop)
 
--- a/make/mkdemo/jvmti/README.txt	Sat Mar 06 03:37:53 2010 +0300
+++ b/make/mkdemo/jvmti/README.txt	Wed Mar 24 14:16:57 2010 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright 2004 Sun Microsystems, Inc.  All Rights Reserved.
+# Copyright 2004-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
@@ -27,8 +27,8 @@
 
 Basically you want to mimic the jvmti demo agent "mtrace".
 
-* Create and populate a source directory at src/demo/jvmti
-  (Try and re-use code in agent_util area like src/demo/jvmti/mtrace)
+* Create and populate a source directory at src/share/demo/jvmti
+  (Try and re-use code in agent_util area like src/share/demo/jvmti/mtrace)
   (This should include a small README.txt document on what this demo is)
 
 * Make sure the appropriate "demo" copyright notice is added to all the
@@ -44,7 +44,7 @@
 * Create test directory at test/demo/jvmti, create at least one test
   (Use test/demo/jvmti/mtrace as a template)
 
-* Don't forget to SCCS in all the new files
+* Don't forget to check in all the new files
 
 * Build and create images (cd make && gnumake && gnumake images)
   (Do this on Solaris, Linux, and at least one Windows platform)
@@ -54,5 +54,5 @@
 * Run the tests: cd test/demo/jvmti && runregress .
   (Do this on Solaris, Linux, and at least one Windows platform)
 
-Contact: jk-svc-group@sun.com for more information or help.
+Contact: serviceability-dev@openjdk.java.net for more information or help.
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/make/mkdemo/jvmti/compiledMethodLoad/Makefile	Wed Mar 24 14:16:57 2010 -0700
@@ -0,0 +1,41 @@
+#
+# 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.  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 = ../../..
+PRODUCT = demo/jvmti
+DEMONAME = compiledMethodLoad
+include $(BUILDDIR)/common/Defs.gmk
+
+DEMO_ROOT       = $(SHARE_SRC)/demo/jvmti/$(DEMONAME)
+DEMO_TOPFILES   = ./README.txt
+DEMO_DESTDIR    = $(DEMODIR)/jvmti/$(DEMONAME)
+
+DEMO_OBJECTS = agent_util.$(OBJECT_SUFFIX)
+
+#
+# Demo jar building rules.
+#
+include $(BUILDDIR)/common/Demo.gmk
+
--- a/make/mkdemo/management/Makefile	Sat Mar 06 03:37:53 2010 +0300
+++ b/make/mkdemo/management/Makefile	Wed Mar 24 14:16:57 2010 -0700
@@ -28,6 +28,7 @@
 #
 
 BUILDDIR = ../..
+MODULE  = demos
 PRODUCT = demos
 include $(BUILDDIR)/common/Defs.gmk
 
@@ -37,6 +38,8 @@
 	  MemoryMonitor  \
 	  JTop
 
+include $(BUILDDIR)/common/Subdirs.gmk
+
 all build clean clobber::
 	$(SUBDIRS-loop)
 
--- a/make/mkdemo/scripting/Makefile	Sat Mar 06 03:37:53 2010 +0300
+++ b/make/mkdemo/scripting/Makefile	Wed Mar 24 14:16:57 2010 -0700
@@ -32,6 +32,7 @@
 include $(BUILDDIR)/common/Defs.gmk
 
 SUBDIRS = jconsole-plugin
+include $(BUILDDIR)/common/Subdirs.gmk
 
 all build clean clobber::
 	$(SUBDIRS-loop)
--- a/make/mksample/Makefile	Sat Mar 06 03:37:53 2010 +0300
+++ b/make/mksample/Makefile	Wed Mar 24 14:16:57 2010 -0700
@@ -37,13 +37,18 @@
   WEBSERVICES_SUBDIR = webservices
 endif
 
-SUBDIRS = nio jmx scripting $(WEBSERVICES_SUBDIR) nbproject
+SUBDIRS =
+SUBDIRS_misc = nio scripting nbproject
+SUBDIRS_enterprise = $(WEBSERVICES_SUBDIR)
+SUBDIRS_management = jmx
 
 # include dtrace samples in Solaris builds
 ifeq ($(PLATFORM), solaris) 
 	SUBDIRS += dtrace
 endif
 
+include $(BUILDDIR)/common/Subdirs.gmk
+
 all build clean clobber::
 	$(SUBDIRS-loop)
 
--- a/make/mksample/dtrace/Makefile	Sat Mar 06 03:37:53 2010 +0300
+++ b/make/mksample/dtrace/Makefile	Wed Mar 24 14:16:57 2010 -0700
@@ -29,6 +29,7 @@
 
 BUILDDIR = ../..
 
+MODULE  = samples
 PRODUCT = java
 
 include $(BUILDDIR)/common/Defs.gmk
--- a/make/mksample/jmx/Makefile	Sat Mar 06 03:37:53 2010 +0300
+++ b/make/mksample/jmx/Makefile	Wed Mar 24 14:16:57 2010 -0700
@@ -32,6 +32,8 @@
 include $(BUILDDIR)/common/Defs.gmk
 
 SUBDIRS = jmx-scandir
+include $(BUILDDIR)/common/Subdirs.gmk
+
 all build clean clobber::
 	$(SUBDIRS-loop)
 
--- a/make/mksample/jmx/jmx-scandir/Makefile	Sat Mar 06 03:37:53 2010 +0300
+++ b/make/mksample/jmx/jmx-scandir/Makefile	Wed Mar 24 14:16:57 2010 -0700
@@ -29,6 +29,7 @@
 
 BUILDDIR = ../../..
 
+MODULE  = samples
 PRODUCT = java
 
 include $(BUILDDIR)/common/Defs.gmk
--- a/make/mksample/nbproject/Makefile	Sat Mar 06 03:37:53 2010 +0300
+++ b/make/mksample/nbproject/Makefile	Wed Mar 24 14:16:57 2010 -0700
@@ -29,6 +29,7 @@
 
 BUILDDIR = ../..
 
+MODULE  = samples
 PRODUCT = java
 
 include $(BUILDDIR)/common/Defs.gmk
--- a/make/mksample/nio/Makefile	Sat Mar 06 03:37:53 2010 +0300
+++ b/make/mksample/nio/Makefile	Wed Mar 24 14:16:57 2010 -0700
@@ -32,6 +32,8 @@
 include $(BUILDDIR)/common/Defs.gmk
 
 SUBDIRS = file multicast server
+include $(BUILDDIR)/common/Subdirs.gmk
+
 all build clean clobber::
 	$(SUBDIRS-loop)
 
--- a/make/mksample/nio/file/Makefile	Sat Mar 06 03:37:53 2010 +0300
+++ b/make/mksample/nio/file/Makefile	Wed Mar 24 14:16:57 2010 -0700
@@ -29,6 +29,7 @@
 
 BUILDDIR = ../../..
 
+MODULE  = samples
 PRODUCT = java
 
 include $(BUILDDIR)/common/Defs.gmk
--- a/make/mksample/nio/multicast/Makefile	Sat Mar 06 03:37:53 2010 +0300
+++ b/make/mksample/nio/multicast/Makefile	Wed Mar 24 14:16:57 2010 -0700
@@ -29,6 +29,7 @@
 
 BUILDDIR = ../../..
 
+MODULE  = samples
 PRODUCT = java
 
 include $(BUILDDIR)/common/Defs.gmk
--- a/make/mksample/nio/server/Makefile	Sat Mar 06 03:37:53 2010 +0300
+++ b/make/mksample/nio/server/Makefile	Wed Mar 24 14:16:57 2010 -0700
@@ -29,6 +29,7 @@
 
 BUILDDIR = ../../..
 
+MODULE  = samples
 PRODUCT = java
 
 include $(BUILDDIR)/common/Defs.gmk
--- a/make/mksample/scripting/Makefile	Sat Mar 06 03:37:53 2010 +0300
+++ b/make/mksample/scripting/Makefile	Wed Mar 24 14:16:57 2010 -0700
@@ -32,6 +32,8 @@
 include $(BUILDDIR)/common/Defs.gmk
 
 SUBDIRS = scriptpad
+include $(BUILDDIR)/common/Subdirs.gmk
+
 all build clean clobber::
 	$(SUBDIRS-loop)
 
--- a/make/mksample/scripting/scriptpad/Makefile	Sat Mar 06 03:37:53 2010 +0300
+++ b/make/mksample/scripting/scriptpad/Makefile	Wed Mar 24 14:16:57 2010 -0700
@@ -29,6 +29,7 @@
 
 BUILDDIR = ../../..
 
+MODULE  = samples
 PRODUCT = java
 
 include $(BUILDDIR)/common/Defs.gmk
--- a/make/mksample/webservices/EbayClient/Makefile	Sat Mar 06 03:37:53 2010 +0300
+++ b/make/mksample/webservices/EbayClient/Makefile	Wed Mar 24 14:16:57 2010 -0700
@@ -29,6 +29,7 @@
 
 BUILDDIR = ../../..
 
+MODULE  = samples
 PRODUCT = java
 
 include $(BUILDDIR)/common/Defs.gmk
--- a/make/mksample/webservices/EbayServer/Makefile	Sat Mar 06 03:37:53 2010 +0300
+++ b/make/mksample/webservices/EbayServer/Makefile	Wed Mar 24 14:16:57 2010 -0700
@@ -29,6 +29,7 @@
 
 BUILDDIR = ../../..
 
+MODULE  = samples
 PRODUCT = java
 
 include $(BUILDDIR)/common/Defs.gmk
--- a/make/mksample/webservices/Makefile	Sat Mar 06 03:37:53 2010 +0300
+++ b/make/mksample/webservices/Makefile	Wed Mar 24 14:16:57 2010 -0700
@@ -32,6 +32,7 @@
 include $(BUILDDIR)/common/Defs.gmk
 
 SUBDIRS = EbayClient EbayServer
+include $(BUILDDIR)/common/Subdirs.gmk
 
 all build clean clobber::
 	$(SUBDIRS-loop)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/make/modules/Makefile	Wed Mar 24 14:16:57 2010 -0700
@@ -0,0 +1,134 @@
+#
+# 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 = ..
+include $(BUILDDIR)/common/Defs.gmk
+
+#
+# Modularizing the JDK
+# - Post jdk build process until the source tree is restructured
+#   for modules build
+# - <outputdir>/modules/<module> will be created for each module.
+#
+# Steps:
+# 0. During jdk build before this makefile is invoked, classes, 
+#    resource files, and other non-class files such as native libraries,
+#    properties file, images, etc are created.
+#
+#    Non-class files are copied to <outputdir>/tmp/modules/<MODULE>
+#    directory in this step to prepare for the post-build modularization. 
+#
+#    The MODULE variable defined in other makefiles specifies 
+#    the lowest-level module that the non-class files belong to.
+#    The name might or might not be the same as the name of the modules 
+#    in the resulting <outputdir>/modules directory.
+#    
+# 1. Unpack all jars in the <builddir>/lib directory to a temporary 
+#    location (<outputdir>/tmp/modules/classes) to prepare for modules
+#    creation.
+#
+# 2. Run ClassAnalyzer tool to analyze all jdk classes and generate
+#    class list for all modules and also perform dependency analysis. 
+#
+#    Input configuration files :-
+#
+#    modules.config : defines the low-level modules and specifies 
+#       what classes and resource files each module includes.
+#    modules.group  : defines the module groups and its members.
+#    jdk7.depconfig : lists the dynamic dependencies including
+#       use of reflection Class.forName and JNI FindClass and
+#       service provider.
+#    optional.depconfig : lists the optional dependencies
+#
+# 3. Create one directory for each module (<outputdir>/modules/<module>)
+#    based on the output files from (2).
+#       
+#    modules.list lists the modules to be created for the modules
+#    build and its members. For each module (m) in modules.list,
+#    a. create $m/lib/$m.jar with all classes and resource files
+#       listed in $m.classlist and $m.resources respectively.
+#    b. copy all non-class files from its members to 
+#       <outputdir>/modules/$m.
+
+
+MAINMANIFEST=$(JDK_TOPDIR)/make/tools/manifest.mf
+MODULE_JAR_MANIFEST_FILE=$(ABS_TEMPDIR)/manifest.tmp
+
+TMP = $(ABS_MODULES_TEMPDIR)
+MODULE_CLASSLIST = $(ABS_MODULES_TEMPDIR)/classlist
+MODULE_CLASSES = $(ABS_MODULES_TEMPDIR)/classes
+MODULES_LIST = $(MODULE_CLASSLIST)/modules.list
+
+all:: unpack-jars gen-classlist modularize
+
+JAR_LIST := $(shell $(FIND) $(ABS_OUTPUTDIR)/lib -name \*.jar -print) 
+unpack-jars:
+	@$(ECHO) ">>>Making "$@" @ `$(DATE)` ..."
+	$(RM) -rf $(MODULE_CLASSES)
+	$(MKDIR) -p $(MODULE_CLASSES)
+	$(CP) -rf $(CLASSBINDIR)/* $(MODULE_CLASSES)
+	@for jf in  $(JAR_LIST) ; do \
+	   $(CD) $(MODULE_CLASSES) && $(BOOT_JAR_CMD) xf $$jf $(BOOT_JAR_JFLAGS);\
+	done
+	@$(ECHO) ">>>Finished making "$@" @ `$(DATE)` ..."
+
+gen-classlist:
+	$(CD) tools && $(MAKE) all
+
+modularize: $(MODULE_JAR_MANIFEST_FILE)
+	@$(ECHO) ">>>Making "$@" @ `$(DATE)` ..."
+	@$(RM) -rf $(MODULES_DIR)
+
+	@# 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 $(ABS_MODULES_DIR)/$$m/lib; \
+	   $(CD) $(MODULE_CLASSES) && \
+               $(BOOT_JAR_CMD) c0mf $(MODULE_JAR_MANIFEST_FILE) \
+		   $(ABS_MODULES_DIR)/$$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/*  $(ABS_MODULES_DIR)/$$m; \
+		   $(RM) -rf $(ABS_MODULES_DIR)/$$m/classes; \
+	       fi \
+	   done \
+        done
+	@$(CD) $(MODULE_CLASSES) && $(java-vm-cleanup)
+	@$(ECHO) ">>>Finished making "$@" @ `$(DATE)` ..."
+
+$(MODULE_JAR_MANIFEST_FILE):
+	$(SED) -e "s/@@RELEASE@@/$(RELEASE)/" $(MAINMANIFEST) > $@
+
+clean clobber::
+	$(RM) -rf $(MODULE_CLASSLIST)
+	$(RM) -rf $(MODULES_DIR)
+	$(RM) $(MODULE_JAR_MANIFEST_FILE)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/make/modules/bootmodule.roots	Wed Mar 24 14:16:57 2010 -0700
@@ -0,0 +1,199 @@
+#
+# 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.
+#
+# 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 root classes/methods, each line of the following syntax:
+# <class name> 
+# <method name> <signature>|*
+# exclude <class>|<method> 
+
+# The boot module generated based on this rootset does not support
+# - security permission check
+# - non-standard charset
+# - logging output
+# - resource bundles
+#   including error output from the launcher 
+
+# VM preloaded classes
+java.lang.Object
+java.lang.String
+java.lang.Class
+java.lang.Cloneable
+java.lang.ClassLoader
+java.lang.System
+java.lang.Throwable
+java.lang.Error
+java.lang.ThreadDeath
+java.lang.Exception
+java.lang.RuntimeException
+java.security.ProtectionDomain
+java.security.AccessControlContext
+java.lang.ClassNotFoundException
+java.lang.NoClassDefFoundError
+java.lang.ClassCastException
+java.lang.ArrayStoreException
+java.lang.VirtualMachineError
+java.lang.OutOfMemoryError
+java.lang.StackOverflowError
+java.lang.IllegalMonitorStateException
+java.lang.ref.Reference
+java.lang.ref.SoftReference
+java.lang.ref.WeakReference
+java.lang.ref.FinalReference
+java.lang.ref.PhantomReference
+java.lang.ref.Finalizer
+java.lang.Runnable
+java.lang.Thread
+java.lang.ThreadGroup
+java.util.Properties
+java.lang.reflect.AccessibleObject
+java.lang.reflect.Member
+java.lang.reflect.Field
+java.lang.reflect.Method
+java.lang.reflect.Constructor
+java.lang.reflect.Type
+sun.reflect.MagicAccessorImpl
+sun.reflect.MethodAccessorImpl
+sun.reflect.ConstructorAccessorImpl
+sun.reflect.DelegatingClassLoader
+sun.reflect.ConstantPool
+sun.reflect.UnsafeStaticFieldAccessorImpl
+java.util.Vector
+java.lang.StringBuffer
+java.lang.StackTraceElement
+java.nio.Buffer
+java.lang.Boolean
+java.lang.Character
+java.lang.Float
+java.lang.Double
+java.lang.Byte
+java.lang.Short
+java.lang.Integer
+java.lang.Long
+java.lang.NullPointerException
+java.lang.ArithmeticException
+java.lang.Compiler
+
+
+# Root methods
+java.lang.ClassLoader.getSystemClassLoader ()Ljava/lang/ClassLoader;
+java.lang.System.initializeSystemClass ()V
+sun.launcher.LauncherHelper.checkAndLoadMain (ZZLjava/lang/String;)Ljava/lang/Object;
+
+# The tool doesn't automatically find superclasses and parse the method
+# if overridden as it tries to reduce unnecessary classes being pulled in.
+# The following forces the dependency to be included the result.
+sun.net.www.protocol.file.Handler.<init> ()V
+sun.net.www.protocol.jar.Handler.<init> ()V
+sun.net.www.protocol.file.Handler.openConnection *
+sun.net.www.protocol.jar.Handler.openConnection *
+sun.misc.URLClassPath$JarLoader.<init>  (Ljava/net/URL;Ljava/net/URLStreamHandler;Ljava/util/HashMap;)V
+sun.misc.URLClassPath$FileLoader.<init> (Ljava/net/URL;)V
+sun.misc.URLClassPath$FileLoader.getClassPath *
+sun.misc.URLClassPath$FileLoader.getResource *
+sun.misc.URLClassPath$JarLoader.getResource *
+sun.misc.URLClassPath$JarLoader.getClassPath *
+
+# permission collections
+java.io.FilePermission.newPermissionCollection ()Ljava/security/PermissionCollection;
+java.security.BasicPermission.newPermissionCollection ()Ljava/security/PermissionCollection;
+
+# native
+java.io.UnixFileSystem
+java.io.UnixFileSystem.<init> ()V
+java.io.UnixFileSystem.canonicalize *
+java.io.Win32FileSystem
+java.io.Win32FileSystem.<init> ()V
+java.io.Win32FileSystem.canonicalize *
+java.io.WinNTFileSystem
+java.io.WinNTFileSystem.<init> ()V
+java.io.WinNTFileSystem.canonicalize *
+
+# missing
+java.util.HashMap.<init> ()V
+java.util.HashMap$EntrySet.iterator *
+
+# Called from native GetStringPlatformChars (jni_util.c)
+java.lang.String.getBytes *
+
+# charset
+sun.nio.cs.US_ASCII.newEncoder ()Ljava/nio/charset/CharsetEncoder;
+sun.nio.cs.UTF_8.newEncoder ()Ljava/nio/charset/CharsetEncoder;
+sun.nio.cs.UTF_8.newDecoder  *
+sun.nio.cs.UTF_16.newEncoder ()Ljava/nio/charset/CharsetEncoder;
+sun.nio.cs.UTF_16.newDecoder  *
+sun.nio.cs.UTF_32.newEncoder ()Ljava/nio/charset/CharsetEncoder;
+sun.nio.cs.UTF_32.newDecoder  *
+
+# hashcode
+java.util.jar.Attributes$Name.hashCode *
+
+# nio
+sun.nio.ByteBuffered
+sun.nio.ch.DirectBuffer
+java.nio.DirectByteBuffer
+java.nio.MappedByteBuffer
+java.nio.DirectLongBufferU
+
+# resource files
+sun.launcher.resources.launcher
+
+sun.misc.Launcher$AppClassLoader.getPermissions *
+sun.misc.Launcher$AppClassLoader.loadClass  (Ljava/lang/String;)Ljava/lang/Class;
+sun.misc.Launcher$AppClassLoader.findClass  (Ljava/lang/String;)Ljava/lang/Class;
+sun.misc.Launcher$ExtClassLoader.getPermissions *
+sun.misc.Launcher$ExtClassLoader.loadClass  (Ljava/lang/String;)Ljava/lang/Class;
+sun.misc.Launcher$ExtClassLoader.findClass  (Ljava/lang/String;)Ljava/lang/Class;
+java.lang.ClassLoader.checkPackageAccess *
+java.lang.ClassLoader.findClass *
+java.lang.ClassLoader.defineClass *
+java.net.URLClassLoader.getPermissions *
+java.net.URLClassLoader.findClass *
+java.net.URLClassLoader.defineClass *
+java.security.SecureClassLoader.defineClass *
+# need to parse superclasses <init>
+java.security.SecureClassLoader.<init> ()V
+
+exclude sun.security.provider.PolicyFile.<init>
+exclude java.lang.ClassLoader.compareCerts
+exclude java.security.cert.Certificate.equals
+# unsigned jars - no verifier
+exclude java.util.jar.JarFile.initializeVerifier
+exclude java.util.jar.JarVerifier 
+exclude sun.security.util.SignatureFileVerifier.<init>
+
+
+# what about other charset
+exclude sun.misc.Service
+exclude java.util.ServiceLoader
+
+# exclude support for localized messages
+exclude java.util.ResourceBundle.getBundle
+exclude java.text.MessageFormat
+exclude sun.util.logging.PlatformLogger$LoggerProxy.format *
+
+# exclude nio and miscellaneous classes
+exclude java.nio.channels.**
+exclude sun.misc.FloatingDecimal
+exclude sun.misc.FormattedFloatingDecimal
+exclude sun.misc.FDBigInt 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/make/modules/jdk7.depconfig	Wed Mar 24 14:16:57 2010 -0700
@@ -0,0 +1,473 @@
+#
+# 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.
+#
+# 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.
+#
+
+# private java.lang.Object createInetSocketAddress(java.lang.String, int)
+@ClassForName
+  com.sun.jndi.ldap.Connection -> java.net.InetSocketAddress
+  com.sun.jndi.ldap.Connection -> java.net.SocketAddress
+
+# com.sun.jndi.ldap.VersionHelper
+@ClassForName(optional)
+  com.sun.jndi.ldap.VersionHelper -> com.sun.jndi.ldap.VersionHelper*
+
+# private static void initMethodHandles()
+@ClassForName
+  com.sun.jndi.toolkit.corba.CorbaUtils -> javax.rmi.CORBA.Stub
+  com.sun.jndi.toolkit.corba.CorbaUtils -> javax.rmi.PortableRemoteObject
+
+# com.sun.naming.internal.ResourceManager$AppletParameter
+@ClassForName(optional)
+  com.sun.naming.internal.ResourceManager$AppletParameter -> java.applet.Applet
+
+# private static boolean loadProviderAsService()
+@Provider
+  com.sun.net.httpserver.spi.HttpServerProvider -> META-INF/services/com.sun.net.httpserver.spi.HttpServerProvider
+
+# com.sun.org.apache.xml.internal.security.transforms.implementations.TransformXSLT
+@ClassForName
+  com.sun.org.apache.xml.internal.security.transforms.implementations.TransformXSLT -> javax.xml.XMLConstants
+
+# public static java.beans.PersistenceDelegate getPersistenceDelegate(java.lang.Class)
+@ClassForName
+  java.beans.MetaData -> java.beans.*_PersistenceDelegate
+
+# private static java.lang.reflect.Method getNanosMethod()
+@ClassForName(optional)
+  java.beans.java_sql_Timestamp_PersistenceDelegate -> java.sql.Timestamp
+
+# java.beans.java_util_Collections$CheckedCollection_PersistenceDelegate
+@ClassForName
+  java.beans.java_util_Collections$CheckedCollection_PersistenceDelegate -> java.util.Collections$CheckedCollection
+
+# java.beans.java_util_Collections$CheckedMap_PersistenceDelegate
+@ClassForName
+  java.beans.java_util_Collections$CheckedMap_PersistenceDelegate -> java.util.Collections$CheckedMap
+
+# private static java.lang.Object getType(java.lang.Object)
+@ClassForName
+  java.beans.java_util_EnumMap_PersistenceDelegate -> java.util.EnumMap
+
+# private java.lang.Integer getAxis(java.lang.Object)
+@ClassForName
+  java.beans.javax_swing_Box_PersistenceDelegate -> javax.swing.BoxLayout
+
+# java.lang.Double
+@Inline
+  java.lang.Double -> sun.misc.FloatConsts
+  java.lang.Double -> sun.misc.DoubleConsts
+
+# java.lang.Float
+@Inline
+  java.lang.Float -> sun.misc.FloatConsts
+  java.lang.Float -> sun.misc.DoubleConsts
+
+# java.net.DefaultDatagramSocketImplFactory
+@ClassForName(optional)
+  java.net.DefaultDatagramSocketImplFactory -> java.net.*DatagramSocketImpl
+
+# private static sun.net.spi.nameservice.NameService createNSProvider(java.lang.String)
+@Provider
+  java.net.InetAddress -> META-INF/services/sun.net.spi.nameservice.NameServiceDescriptor
+
+# static java.net.InetAddressImpl create()
+@ClassForName
+  java.net.InetAddressImplFactory -> java.net.*Inet[46]AddressImpl
+
+# private static void init()
+@NativeFindClass
+  java.net.PlainDatagramSocketImpl -> java.io.FileDescriptor
+
+# java.net.ProxySelector
+@ClassForName
+  java.net.ProxySelector -> sun.net.spi.DefaultProxySelector
+
+# static java.net.URLStreamHandler getURLStreamHandler(java.lang.String)
+@ClassForName(optional)
+  java.net.URL -> sun.net.www.protocol.*.Handler
+
+# private java.net.ContentHandler lookupContentHandlerClassFor(java.lang.String)
+@ClassForName
+  java.net.URLConnection -> sun.net.www.content.*
+
+# private static java.nio.channels.spi.AsynchronousChannelProvider loadProviderAsService()
+@Provider
+  java.nio.channels.spi.AsynchronousChannelProvider$ProviderHolder -> META-INF/services/java.nio.channels.spi.AsynchronousChannelProvider
+
+# private static boolean loadProviderFromProperty()
+@ClassForName
+  java.nio.channels.spi.SelectorProvider -> sun.nio.ch.DefaultSelectorProvider
+
+# private static boolean loadProviderAsService()
+@Provider
+  java.nio.channels.spi.SelectorProvider -> META-INF/services/java.nio.channels.spi.SelectorProvider
+
+# private static java.util.Iterator providers()
+@Provider
+  java.nio.charset.Charset -> META-INF/services/java.nio.charset.spi.CharsetProvider
+
+# private static void probeExtendedProvider()
+@ClassForName(optional)
+  java.nio.charset.Charset -> sun.nio.cs.ext.ExtendedCharsets
+
+# public static java.nio.file.FileSystem newFileSystem(java.net.URI, java.util.Map<java.lang.String, ?>, java.lang.ClassLoader)
+@Provider
+  java.nio.file.FileSystems -> META-INF/services/java.nio.file.FileSystemProvider
+
+# private static java.util.List<java.nio.file.spi.FileTypeDetector> loadInstalledDetectors()
+@Provider
+  java.nio.file.Files$DefaultFileTypeDetectorHolder -> META-INF/services/java.nio.file.spi.FileTypeDetector
+
+# public static java.util.List<java.nio.file.spi.FileSystemProvider> installedProviders()
+@Provider
+  java.nio.file.spi.FileSystemProvider -> META-INF/services/java.nio.file.FileSystemProvider
+
+# private static java.rmi.server.RMIClassLoaderSpi initializeProvider()
+@Provider
+  java.rmi.server.RMIClassLoader -> META-INF/services/java.rmi.server.RMIClassLoaderSpi
+
+# private static void initializeSystemScope()
+@ClassForName(optional)
+  java.security.IdentityScope -> sun.security.provider.IdentityDatabase
+
+# static java.security.Policy getPolicyNoCheck()
+@ClassForName
+  java.security.Policy -> sun.security.provider.PolicyFile
+
+# private static java.lang.Class getSpiClass(java.lang.String)
+@ClassForName
+  java.security.Security -> java.security.*Spi
+
+# private static void invalidateSMCache(java.lang.String)
+@ClassForName
+  java.security.Security -> java.lang.SecurityManager
+
+# private static void loadInitialDrivers()
+@Provider
+  java.sql.DriverManager -> META-INF/services/java.sql.Driver
+
+# private static java.text.BreakIterator createBreakInstance(java.util.Locale, int, java.lang.String, java.lang.String)
+@Provider
+  java.text.BreakIterator -> META-INF/services/java.util.spi.BreakIteratorProvider
+
+# public static java.text.Collator getInstance(java.util.Locale)
+@Provider
+  java.text.Collator -> META-INF/services/java.util.spi.CollatorProvider
+
+# private static java.text.DateFormat get(int, int, int, java.util.Locale)
+@Provider
+  java.text.DateFormat -> META-INF/services/java.util.spi.DateNameProvider
+
+# public static java.util.Locale[] getAvailableLocales()
+@Provider
+  java.text.DateFormatSymbols -> META-INF/services/java.util.spi.DateFormatSymbolsProvider
+
+# public static java.util.Locale[] getAvailableLocales()
+@Provider
+  java.text.DecimalFormatSymbols -> META-INF/services/java.util.spi.DecimalFormatSymbolsProvider
+
+# public static java.util.Locale[] getAvailableLocales()
+@Provider
+  java.text.NumberFormat -> META-INF/services/java.util.spi.NumberFormatProvider
+
+# public java.lang.String getDisplayName(java.util.Locale)
+@Provider
+  java.util.Currency -> META-INF/services/java.util.spi.CurrencyNameProvider
+
+# java.util.Formatter
+@Inline
+  java.util.Formatter -> sun.misc.DoubleConsts
+
+# java.util.Locale
+@Inline
+  java.util.Locale -> java.util.LocaleISOData
+
+# private java.lang.String getDisplayString(java.lang.String, java.util.Locale, int)
+@Provider
+  java.util.Locale -> META-INF/services/java.util.spi.LocaleNameProvider
+
+# private static java.util.prefs.PreferencesFactory factory1()
+@ClassForName
+  java.util.prefs.Preferences -> java.util.prefs.WindowsPreferencesFactory
+  java.util.prefs.Preferences -> java.util.prefs.FileSystemPreferencesFactory
+
+# private static java.util.prefs.PreferencesFactory factory1()
+@Provider
+  java.util.prefs.Preferences -> META-INF/services/java.util.prefs.PreferencesFactory
+
+# public void registerApplicationClasspathSpis()
+@Provider
+  javax.imageio.spi.IIORegistry -> META-INF/services/javax.imageio.spi.IIOServiceProvider
+
+# private void registerInstalledProviders()
+@Provider
+  javax.imageio.spi.IIORegistry -> META-INF/services/javax.imageio.spi.ImageReaderSpi
+  javax.imageio.spi.IIORegistry -> META-INF/services/javax.imageio.spi.ImageWriterSpi
+  javax.imageio.spi.IIORegistry -> META-INF/services/javax.imageio.spi.ImageReaderWriterSpi
+  javax.imageio.spi.IIORegistry -> META-INF/services/javax.imageio.spi.ImageTranscoderSpi
+  javax.imageio.spi.IIORegistry -> META-INF/services/javax.imageio.spi.ImageInputStreamSpi
+  javax.imageio.spi.IIORegistry -> META-INF/services/javax.imageio.spi.ImageOutputStreamSpi
+
+# public javax.naming.ldap.ExtendedResponse createExtendedResponse(java.lang.String, byte[], int, int)
+@Provider
+  javax.naming.ldap.StartTlsRequest -> META-INF/services/javax.naming.ldap.StartTlsResponse
+
+# private static java.util.ArrayList getAllLookupServices()
+@Provider
+  javax.print.PrintServiceLookup -> META-INF/services/javax.print.PrintServiceLookup
+
+# private static java.util.ArrayList getAllFactories()
+@Provider
+  javax.print.StreamPrintServiceFactory -> META-INF/services/javax.print.StreamPrintServiceFactory
+
+# private void initEngines(java.lang.ClassLoader)
+@Provider
+  javax.script.ScriptEngineManager -> META-INF/services/javax.script.ScriptEngineFactory
+
+# private void initializeInputMethodLocatorList()
+@Provider
+  sun.awt.im.ExecutableInputMethodManager -> META-INF/services/java.awt.im.spi.InputMethodDescriptor
+
+# private static java.lang.Class getConverterClass(int, java.lang.String)
+@ClassForName(optional)
+  sun.io.Converters -> sun.io.*
+
+# public static sun.java2d.cmm.PCMM getModule()
+@Provider
+  sun.java2d.cmm.CMSManager -> META-INF/services/sun.java2d.cmm.PCMM
+
+# public static sun.java2d.pipe.RenderingEngine getInstance()
+@Provider
+  sun.java2d.pipe.RenderingEngine -> META-INF/services/sun.java2d.pipe.RenderingEngine
+
+# public static sun.java2d.pipe.RenderingEngine getInstance()
+@ClassForName(optional)
+  sun.java2d.pipe.RenderingEngine -> sun.dc.DuctusRenderingEngine
+
+# sun.misc.FloatingDecimal
+@Inline
+  sun.misc.FloatingDecimal -> sun.misc.FloatConsts
+  sun.misc.FloatingDecimal -> sun.misc.DoubleConsts
+
+# sun.misc.FormattedFloatingDecimal
+@Inline
+  sun.misc.FormattedFloatingDecimal -> sun.misc.FloatConsts
+  sun.misc.FormattedFloatingDecimal -> sun.misc.DoubleConsts
+
+# sun.misc.FpUtils
+@Inline
+  sun.misc.FpUtils -> sun.misc.FloatConsts
+  sun.misc.FpUtils -> sun.misc.DoubleConsts
+
+# public java.net.URLStreamHandler createURLStreamHandler(java.lang.String)
+@ClassForName(optional)
+  sun.misc.Launcher$Factory -> sun.net.www.protocol.*.Handler
+
+# private static sun.net.NetHooks$Provider loadProvider(java.lang.String)
+@ClassForName(optional)
+  sun.net.NetHooks -> sun.net.spi.SdpProvider
+
+# sun.net.idn.StringPrep
+@Inline
+  sun.net.idn.StringPrep -> sun.net.idn.UCharacterDirection
+
+# private static boolean init()
+@NativeFindClass
+  sun.net.spi.DefaultProxySelector -> java.net.Proxy
+  sun.net.spi.DefaultProxySelector -> java.net.Proxy$Type
+  sun.net.spi.DefaultProxySelector -> java.net.InetSocketAddress
+
+# private static java.nio.channels.Channel createChannel()
+@ClassForName
+  sun.nio.ch.InheritedChannel -> java.io.FileDescriptor
+
+# private static void initDBBConstructor()
+@ClassForName
+  sun.nio.ch.Util -> java.nio.DirectByteBuffer
+
+# private static void initDBBRConstructor()
+@ClassForName
+  sun.nio.ch.Util -> java.nio.DirectByteBufferR
+
+# private java.nio.charset.Charset lookup(java.lang.String)
+@ClassForName(optional)
+  sun.nio.cs.FastCharsetProvider -> sun.nio.cs.*
+
+# sun.nio.cs.ext.ExtendedCharsets
+@ClassForName(optional)
+  sun.nio.cs.ext.ExtendedCharsets -> sun.nio.cs.ext.*
+
+# sun.nio.cs.ext.ExtendedCharsets
+@ClassForName(optional)
+  sun.nio.cs.ext.ExtendedCharsets -> sun.nio.cs.ext.*
+
+# public static java.nio.file.spi.FileSystemProvider create()
+@ClassForName
+  sun.nio.fs.DefaultFileSystemProvider -> sun.nio.fs.SolarisFileSystemProvider
+  sun.nio.fs.DefaultFileSystemProvider -> sun.nio.fs.LinuxFileSystemProvider
+
+# sun.rmi.server.MarshalInputStream
+@ClassForName
+  sun.rmi.server.MarshalInputStream -> sun.rmi.server.Activation$ActivationSystemImpl_Stub
+  sun.rmi.server.MarshalInputStream -> sun.rmi.registry.RegistryImpl_Stub
+
+# private java.security.Provider doLoadProvider()
+@ClassForName(optional)
+  sun.security.jca.ProviderConfig -> sun.security.pkcs11.SunPKCS11
+  sun.security.jca.ProviderConfig -> sun.security.provider.Sun
+  sun.security.jca.ProviderConfig -> sun.security.rsa.SunRsaSign
+  sun.security.jca.ProviderConfig -> sun.security.ec.SunEC
+  sun.security.jca.ProviderConfig -> com.sun.net.ssl.internal.ssl.Provider
+  sun.security.jca.ProviderConfig -> com.sun.crypto.provider.SunJCE
+  sun.security.jca.ProviderConfig -> sun.security.jgss.SunProvider
+  sun.security.jca.ProviderConfig -> com.sun.security.sasl.Provider
+  sun.security.jca.ProviderConfig -> org.jcp.xml.dsig.internal.dom.XMLDSigRI
+  sun.security.jca.ProviderConfig -> sun.security.smartcardio.SunPCSC
+  sun.security.jca.ProviderConfig -> sun.security.mscapi.SunMSCAPI
+
+# public static java.security.Provider getSunProvider()
+@ClassForName
+  sun.security.jca.Providers -> sun.security.provider.Sun
+  sun.security.jca.Providers -> sun.security.provider.VerificationProvider
+
+# private static sun.security.jgss.spi.MechanismFactory getMechFactoryImpl(java.security.Provider, java.lang.String, org.ietf.jgss.Oid, sun.security.jgss.GSSCaller)
+@ClassForName
+  sun.security.jgss.ProviderList -> sun.security.jgss.spi.MechanismFactory
+
+# sun.security.jgss.wrapper.SunNativeProvider
+@NativeFindClass
+  sun.security.jgss.wrapper.SunNativeProvider -> org.ietf.jgss.Oid
+  sun.security.jgss.wrapper.SunNativeProvider -> org.ietf.jgss.GSSException
+  sun.security.jgss.wrapper.SunNativeProvider -> sun.security.jgss.wrapper.GSSNameElement
+  sun.security.jgss.wrapper.SunNativeProvider -> sun.security.jgss.wrapper.GSSCredElement
+  sun.security.jgss.wrapper.SunNativeProvider -> sun.security.jgss.wrapper.NativeGSSContext
+  sun.security.jgss.wrapper.SunNativeProvider -> sun.security.jgss.wrapper.SunNativeProvider
+  sun.security.jgss.wrapper.SunNativeProvider -> org.ietf.jgss.MessageProp
+  sun.security.jgss.wrapper.SunNativeProvider -> org.ietf.jgss.ChannelBinding
+  sun.security.jgss.wrapper.SunNativeProvider -> java.net.InetAddress
+  sun.security.jgss.wrapper.SunNativeProvider -> sun.security.jgss.wrapper.GSSLibStub
+
+# static void ensureLoaded()
+@NativeFindClass
+  sun.security.krb5.Credentials -> sun.security.krb5.internal.Krb5
+  sun.security.krb5.Credentials -> sun.security.krb5.internal.Ticket
+  sun.security.krb5.Credentials -> sun.security.krb5.PrincipalName
+  sun.security.krb5.Credentials -> sun.security.util.DerValue
+  sun.security.krb5.Credentials -> sun.security.krb5.EncryptionKey
+  sun.security.krb5.Credentials -> sun.security.krb5.internal.TicketFlags
+  sun.security.krb5.Credentials -> sun.security.krb5.internal.KerberosTime
+
+# public static java.lang.String getDefaultCacheName()
+@ClassForName(optional)
+  sun.security.krb5.internal.ccache.FileCredentialsCache -> com.sun.security.auth.module.UnixSystem
+
+# sun.security.pkcs.PKCS9Attribute
+@ClassForName
+  sun.security.pkcs.PKCS9Attribute -> sun.security.util.ObjectIdentifier
+  sun.security.pkcs.PKCS9Attribute -> java.util.Date
+  sun.security.pkcs.PKCS9Attribute -> sun.security.pkcs.SignerInfo
+  sun.security.pkcs.PKCS9Attribute -> sun.security.x509.CertificateExtensions
+
+# protected T engineGetKeySpec(java.security.Key, java.lang.Class<T>)
+@ClassForName
+  sun.security.provider.DSAKeyFactory -> java.security.spec.DSAPublicKeySpec
+  sun.security.provider.DSAKeyFactory -> java.security.spec.X509EncodedKeySpec
+  sun.security.provider.DSAKeyFactory -> java.security.spec.DSAPrivateKeySpec
+  sun.security.provider.DSAKeyFactory -> java.security.spec.PKCS8EncodedKeySpec
+
+# protected T engineGetParameterSpec(java.lang.Class<T>)
+@ClassForName
+  sun.security.provider.DSAParameters -> java.security.spec.DSAParameterSpec
+
+# sun.security.provider.VerificationProvider
+@ClassForName(optional)
+  sun.security.provider.VerificationProvider -> sun.security.provider.Sun
+  sun.security.provider.VerificationProvider -> sun.security.rsa.SunRsaSign
+
+# sun.security.provider.certpath.URICertStore$LDAP
+@ClassForName(optional)
+  sun.security.provider.certpath.URICertStore$LDAP -> sun.security.provider.certpath.ldap.LDAPCertStoreHelper
+
+# sun.security.smartcardio.PCSC
+@NativeFindClass
+  sun.security.smartcardio.PCSC -> sun.security.smartcardio.PCSCException
+
+# sun.security.ssl.HandshakeMessage
+@ClassForName
+  sun.security.ssl.HandshakeMessage -> java.security.MessageDigest$Delegate
+
+# sun.security.ssl.JsseJce
+@ClassForName(optional)
+  sun.security.ssl.JsseJce -> sun.security.krb5.PrincipalName
+
+# sun.security.x509.OIDMap$OIDInfo
+@ClassForName
+  sun.security.x509.OIDMap$OIDInfo -> sun.security.x509.SubjectKeyIdentifierExtension
+  sun.security.x509.OIDMap$OIDInfo -> sun.security.x509.KeyUsageExtension
+  sun.security.x509.OIDMap$OIDInfo -> sun.security.x509.PrivateKeyUsageExtension
+  sun.security.x509.OIDMap$OIDInfo -> sun.security.x509.SubjectAlternativeNameExtension
+  sun.security.x509.OIDMap$OIDInfo -> sun.security.x509.IssuerAlternativeNameExtension
+  sun.security.x509.OIDMap$OIDInfo -> sun.security.x509.BasicConstraintsExtension
+  sun.security.x509.OIDMap$OIDInfo -> sun.security.x509.CRLNumberExtension
+  sun.security.x509.OIDMap$OIDInfo -> sun.security.x509.CRLReasonCodeExtension
+  sun.security.x509.OIDMap$OIDInfo -> sun.security.x509.NameConstraintsExtension
+  sun.security.x509.OIDMap$OIDInfo -> sun.security.x509.PolicyMappingsExtension
+  sun.security.x509.OIDMap$OIDInfo -> sun.security.x509.AuthorityKeyIdentifierExtension
+  sun.security.x509.OIDMap$OIDInfo -> sun.security.x509.PolicyConstraintsExtension
+  sun.security.x509.OIDMap$OIDInfo -> sun.security.x509.NetscapeCertTypeExtension
+  sun.security.x509.OIDMap$OIDInfo -> sun.security.x509.CertificatePoliciesExtension
+  sun.security.x509.OIDMap$OIDInfo -> sun.security.x509.ExtendedKeyUsageExtension
+  sun.security.x509.OIDMap$OIDInfo -> sun.security.x509.InhibitAnyPolicyExtension
+  sun.security.x509.OIDMap$OIDInfo -> sun.security.x509.CRLDistributionPointsExtension
+  sun.security.x509.OIDMap$OIDInfo -> sun.security.x509.CertificateIssuerExtension
+  sun.security.x509.OIDMap$OIDInfo -> sun.security.x509.SubjectInfoAccessExtension
+  sun.security.x509.OIDMap$OIDInfo -> sun.security.x509.AuthorityInfoAccessExtension
+  sun.security.x509.OIDMap$OIDInfo -> sun.security.x509.IssuingDistributionPointExtension
+  sun.security.x509.OIDMap$OIDInfo -> sun.security.x509.DeltaCRLIndicatorExtension
+  sun.security.x509.OIDMap$OIDInfo -> sun.security.x509.FreshestCRLExtension
+  sun.security.x509.OIDMap$OIDInfo -> sun.security.x509.OCSPNoCheckExtension
+
+# sun.util.LocaleServiceProviderPool$AllAvailableLocales
+@Provider
+  sun.util.LocaleServiceProviderPool$AllAvailableLocales -> META-INF/services/java.text.spi.BreakIteratorProvider
+  sun.util.LocaleServiceProviderPool$AllAvailableLocales -> META-INF/services/java.text.spi.CollatorProvider
+  sun.util.LocaleServiceProviderPool$AllAvailableLocales -> META-INF/services/java.text.spi.DateFormatProvider
+  sun.util.LocaleServiceProviderPool$AllAvailableLocales -> META-INF/services/java.text.spi.DateFormatSymbolsProvider
+  sun.util.LocaleServiceProviderPool$AllAvailableLocales -> META-INF/services/java.text.spi.DecimalFormatSymbolsProvider
+  sun.util.LocaleServiceProviderPool$AllAvailableLocales -> META-INF/services/java.text.spi.NumberFormatProvider
+  sun.util.LocaleServiceProviderPool$AllAvailableLocales -> META-INF/services/java.util.spi.CurrencyNameProvider
+  sun.util.LocaleServiceProviderPool$AllAvailableLocales -> META-INF/services/java.util.spi.LocaleNameProvider
+  sun.util.LocaleServiceProviderPool$AllAvailableLocales -> META-INF/services/java.util.spi.TimeZoneNameProvider
+
+# private static final java.lang.String[] retrieveDisplayNames(sun.util.resources.OpenListResourceBundle, java.lang.String, java.util.Locale)
+@Provider
+  sun.util.TimeZoneNameUtility -> META-INF/services/java.util.spi.TimeZoneNamePProvider
+
+# public static sun.util.calendar.CalendarSystem forName(java.lang.String)
+@ClassForName
+  sun.util.calendar.CalendarSystem -> sun.util.calendar.Gregorian
+  sun.util.calendar.CalendarSystem -> sun.util.calendar.LocalGregorianCalendar
+  sun.util.calendar.CalendarSystem -> sun.util.calendar.JulianCalendar
+
+# sun.util.logging.LoggingSupport
+@ClassForName(optional)
+  sun.util.logging.LoggingSupport -> java.util.logging.LoggingProxyImpl
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/make/modules/modules.config	Wed Mar 24 14:16:57 2010 -0700
@@ -0,0 +1,929 @@
+/*
+ * 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.
+ *
+ * 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.
+ */
+
+// These classes are not referenced in the JDK but we can't
+// remove them for compatibility reason.  Define this module
+// first so that other modules don't need to exclude these clases
+module private-legacy {
+    include sun.misc.Cache*,
+            sun.misc.ClassLoaderUtil,
+            sun.misc.Compare,
+            sun.misc.ConditionLock,
+            sun.misc.CRC16,
+            sun.misc.Lock,
+            sun.misc.Regexp,
+            sun.misc.RequestProcessor,
+            sun.misc.Sort,
+            sun.misc.Request,
+            sun.misc.Timeable,
+            sun.misc.Timer,
+            sun.misc.TimerThread,
+            sun.misc.TimerTickThread,
+            sun.misc.UCDecoder,
+            sun.misc.UCEncoder,
+            sun.misc.UUDecoder,
+            sun.misc.UUEncoder,
+            com.sun.net.ssl.SSLContext,
+            sun.net.NetworkServer,
+            sun.net.URLCanonicalizer,
+            sun.reflect.misc.ConstructorUtil,
+            sun.reflect.FieldInfo,
+            sun.reflect.SignatureIterator,
+            sun.reflect.generics.reflectiveObjects.NotImplementedException,
+            sunw.io.Serializable,
+            sunw.util.EventListener,
+            sunw.util.EventObject;
+}
+
+// Deprecated classes that aren't referenced/used go here.
+module deprecated {
+    // add deprecated security classes once b78 is promoted
+}
+
+/**************************************************************************/
+
+module base {
+    // core classes
+    include java.lang.*,
+            java.lang.annotation.*,
+            java.lang.ref.*,
+            java.lang.reflect.*,
+            java.math.*,
+            java.net.*,
+            java.util.*,
+            java.util.concurrent.**,
+            java.util.jar.*,
+            java.util.regex.*,
+            java.util.spi.*,
+            java.util.zip.*,
+            java.text.**;
+
+    exclude java.util.jar.Pack200*,
+            java.util.XMLUtils,
+            java.text.Bidi;
+
+    include java.io.*, java.nio.*, java.nio.charset.**;
+    exclude java.io.TempFileHelper, java.nio.BufferPoolMXBean;
+
+    // security APIs
+    // javax.crypto and javax.security.auth are included to avoid inconsistent
+    // spliting of JCA and JAAS. This adds about 85k. Also note that some deprecated
+    // classes must be included for now (see 6876158, 6876170)
+    include java.security.*,
+            java.security.cert.*,
+            java.security.interfaces.*,
+            java.security.spec.*,
+            javax.security.auth.**,
+            javax.crypto.**;
+
+    // Sun and RSA security providers (except LDAP CertStore)
+    // roots sun.security.provider.* sun.security.provider.certpath.* sun.security.rsa.*
+    include com.sun.security.auth.PrincipalComparator,
+            com.sun.security.auth.SubjectCodeSource,
+            com.sun.security.auth.login.**,
+            com.sun.security.auth.Policy*,
+            sun.security.action.*,
+            sun.security.ec.*,
+            sun.security.jca.*,
+            sun.security.pkcs.*,
+            sun.security.provider.*,
+            sun.security.provider.certpath.*,
+            sun.security.rsa.*,
+            sun.security.util.*,
+            sun.security.validator.*,
+            sun.security.x509.*,
+            sun.security.timestamp.*;
+
+    // this list is based on the classlist generated from the rootset
+    // need investigation
+    exclude sun.security.ec.ECD*,
+            sun.security.ec.ECKeyPairGenerator,
+            sun.security.ec.SunEC*,
+            sun.security.pkcs.PKCS10*,
+            sun.security.pkcs.EncodingException,
+            sun.security.util.AuthResources_*,
+            sun.security.util.Resources_*,
+            sun.security.util.BigInt,
+            sun.security.util.HostnameChecker,
+            sun.security.x509.CertAndKeyGen,
+            sun.security.util.PathList;
+
+    // Kerberos not needed
+    exclude javax.security.auth.kerberos.**,
+            sun.security.jgss.**,
+            sun.security.krb5.**,
+            sun.security.ssl.Kerberos*,
+            org.ietf.jgss.**;
+
+   // property events and annotations
+   include java.beans.ChangeListenerMap,
+           java.beans.IndexedPropertyChangeEvent,
+           java.beans.PropertyChange*,
+           java.beans.PropertyVetoException,
+           java.beans.VetoableChange*,
+           java.beans.ConstructorProperties;
+
+    // mandatory charsets
+    include sun.nio.cs.*;
+
+    exclude sun.nio.cs.AbstractCharsetProvider,
+            sun.nio.cs.CharsetMapping,
+            sun.nio.cs.IBM*,
+            sun.nio.cs.ISO*,
+            sun.nio.cs.KOI8_*,
+            sun.nio.cs.MS125*,
+            sun.nio.cs.UTF_32*,
+            sun.nio.cs.SingleByteDecoder,
+            sun.nio.cs.SingleByteEncoder;
+
+    allow   sun.nio.cs.ISO_8859_1,
+            sun.nio.cs.ISO_8859_15,
+            sun.nio.cs.MS1252;
+
+    include sun.text.*,
+            sun.text.normalizer.*;
+
+    // resource files
+    include sun/text/resources/*.icu;
+
+    exclude sun.text.bidi.*,
+            sun.text.CharArrayCodePointIterator,
+            sun.text.CharSequenceCodePointIterator,
+            sun.text.CharacterIteratorCodePointIterator,
+            sun.text.CodePointIterator;
+
+    include sun.util.*,
+            sun.util.calendar.*,
+            sun.util.logging.*,
+            sun.util.resources.LocaleData,
+            sun.util.resources.LocaleNamesBundle,
+            sun.util.resources.OpenListResourceBundle;
+
+    // US_en locale
+    include sun.text.resources.BreakIteratorInfo,
+            sun.text.resources.FormatData,
+            sun.text.resources.FormatData_en_US,
+            sun.util.resources.CalendarData,
+            sun.util.resources.CalendarData_en,
+            sun.util.resources.TimeZoneNames,
+            sun.util.resources.TimeZoneNames_en,
+            sun.util.resources.TimeZoneNamesBundle,
+            sun.util.resources.LocaleNames,
+            sun.util.resources.LocaleNames_en,
+            sun.util.resources.LocalenamesBundles,
+            sun.util.resources.CurrencyNames,
+            sun.util.resources.CurrencyNames_en_US,
+            sun.util.EmptyListResourceBundle;
+
+    // resources file needed by
+    // - sun.misc.ExtensionInfo
+    // - sun.security.provider.PolicyFile
+    // - com.sun.security.auth.PolicyFile
+    include sun.misc.resources.Messages,
+            sun.security.util.Resources,
+            sun.security.util.AuthResources;
+
+    // java.nio.channels and java.nio.file not in base
+    include sun.nio.ch.Interruptible,
+            sun.nio.ch.DirectBuffer,
+            sun.nio.ByteBuffered;
+
+    include sun.reflect.**;
+
+    // protocol handlers
+    include sun.net.www.protocol.file.*,
+            sun.net.www.protocol.jar.*,
+            sun.net.www.protocol.http.*;
+
+    include sun.net.*,
+            sun.net.spi.*,
+            sun.net.idn.*,
+            sun.net.util.*,
+            sun.net.www.*,
+            sun.net.www.http.*,
+            sun.net.spi.nameservice.*;
+
+    // resource file for sun.net.idn
+    include sun/net/idn/*;
+
+    // classes in net-compat
+    exclude sun.net.Telnet*, sun.net.TransferProtocolClient;
+
+    // classes in deploy
+    exclude sun.net.www.protocol.http.AuthCacheBridge;
+
+    // classes in security-jsse
+    exclude java.net.SecureCacheResponse;
+
+    // launcher
+    include sun.launcher.LauncherHelper, sun.launcher.resources.launcher;
+
+    include sun.misc.*;
+    exclude sun.misc.FIFOQueueEnumerator,
+            sun.misc.LIFOQueueEnumerator,
+            sun.misc.GC,
+            sun.misc.PerformanceLogger,
+            sun.misc.Queue,
+            sun.misc.QueueElement,
+            sun.misc.Ref,
+            sun.misc.VMSupport;
+
+    // On Windows, OSEnvironment dependency
+    include sun.io.Win32ErrorMode;
+}
+
+/**************************************************************************/
+
+module charsets {
+    include sun.nio.cs.ext.**;
+
+    include sun.nio.cs.AbstractCharsetProvider,
+            sun.nio.cs.CharsetMapping,
+            sun.nio.cs.IBM*,
+            sun.nio.cs.ISO*,
+            sun.nio.cs.KOI8_*,
+            sun.nio.cs.MS125*,
+            sun.nio.cs.SingleByte*,
+            sun.nio.cs.UTF_32*;
+
+    exclude sun.nio.cs.ISO_8859_1,
+            sun.nio.cs.MS1252;
+
+    // legacy sun.io converters
+    include sun.io.*;
+}
+
+/**************************************************************************/
+
+// For now, retains the current JRE extensions where localedata.jar in jre/lib/ext 
+module localedata {
+    include sun.util.resources.*_ar,
+            sun.util.resources.*_ar_*,
+            sun.util.resources.*_hi,
+            sun.util.resources.*_hi_*,
+            sun.util.resources.*_iw,
+            sun.util.resources.*_iw_*,
+            sun.util.resources.*_ja,
+            sun.util.resources.*_ja_*,
+            sun.util.resources.*_ko,
+            sun.util.resources.*_ko_*,
+            sun.util.resources.*_th,
+            sun.util.resources.*_th_*,
+            sun.util.resources.*_vi,
+            sun.util.resources.*_vi_*,
+            sun.util.resources.*_zh,
+            sun.util.resources.*_zh_*;
+    include sun.text.resources.*_ar,
+            sun.text.resources.*_ar_*,
+            sun.text.resources.*_hi,
+            sun.text.resources.*_hi_*,
+            sun.text.resources.*_iw,
+            sun.text.resources.*_iw_*,
+            sun.text.resources.*_ja,
+            sun.text.resources.*_ja_*,
+            sun.text.resources.*_ko,
+            sun.text.resources.*_ko_*,
+            sun.text.resources.*_th,
+            sun.text.resources.*_th_*,
+            sun.text.resources.*_vi,
+            sun.text.resources.*_vi_*,
+            sun.text.resources.*_zh,
+            sun.text.resources.*_zh_*;
+}
+
+module resources {
+    include sun.text.resources.*, sun.util.resources.*, sun.misc.resources.*;
+}
+
+/**************************************************************************/
+
+module nio {
+    include java.nio.channels.**, java.nio.file.**, com.sun.nio.file.**;
+
+    // this is excluded from base
+    include java.io.TempFileHelper;
+
+    // provider implementations and their dependencies
+    include sun.nio.ch.*, sun.nio.fs.**;
+    exclude sun.nio.ch.Sctp*;
+}
+
+/**************************************************************************/
+
+module pack200 {
+    include java.util.jar.Pack200*, com.sun.java.util.jar.pack.**;
+}
+
+/**************************************************************************/
+
+module logging {
+    include java.util.logging.*, sun.util.logging.**;
+    exclude java.util.logging.PlatformLoggingMXBean;
+
+    // Formatter for HTTP messages
+    include sun.net.www.protocol.http.logging.*;
+}
+
+/**************************************************************************/
+
+module management-snmp {
+    include com.sun.jmx.snmp.**, sun.management.snmp.**;
+}
+
+module management-iiop {
+    include com.sun.jmx.remote.protocol.iiop.*;
+
+    // stubs and ties
+    include javax.management.remote.rmi._*,
+            org.omg.stub.javax.management.remote.rmi.**;
+}
+
+module management {
+    include java.lang.management.*, com.sun.management.**, sun.management.**;
+    include javax.management.**, com.sun.jmx.**;
+
+    // other management interfaces
+    include java.nio.BufferPoolMXBean;
+    include java.util.logging.PlatformLoggingMXBean;
+
+    // supporting classes in sun.misc
+    include sun.misc.VMSupport;
+}
+
+/**************************************************************************/
+
+module tracing {
+    // tracing
+    include com.sun.tracing.**, sun.tracing.**;
+}
+
+module instrument {
+    // java.lang.instrument
+    include java.lang.instrument.*, sun.instrument.*;
+
+    // HPROF support
+    include com.sun.demo.jvmti.hprof.*;
+
+    include tracing;
+}
+
+/**************************************************************************/
+
+module rmi-activation {
+    include java.rmi.activation.**,
+            sun.rmi.server.Act*,
+            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.**;
+
+    // supporting classes in sun.misc and dependencies
+    include sun.misc.GC;
+}
+
+/**************************************************************************/
+
+module prefs {
+    include java.util.prefs.*;
+}
+
+/**************************************************************************/
+
+module security-jsse {
+    include javax.net.**,
+            javax.security.cert.*,
+            java.net.SecureCacheResponse,
+            com.sun.net.ssl.**,
+            com.sun.security.cert.internal.x509.*,
+            sun.security.ssl.*,
+            sun.net.www.protocol.https.**,
+            sun.security.internal.interfaces.Tls*,
+            sun.security.internal.spec.Tls*,
+            sun.security.util.HostnameChecker;
+}
+
+module security-sunpkcs11 {
+    include sun.security.pkcs11.**;
+}
+
+module security-sunjce {
+    include com.sun.crypto.provider.*;
+}
+
+module security-sunec {
+    include sun.security.ec.*;
+}
+
+module security-sunmscapi {
+    include sun.security.mscapi.*;
+}
+
+module security-kerberos {
+    include javax.security.auth.kerberos.*,
+            com.sun.security.jgss.**,
+            com.sun.security.auth.module.Krb5LoginModule,
+            com.sun.security.sasl.gsskerb.**,             // GSSAPI SASL mechanism
+            sun.security.jgss.**,
+            sun.security.ssl.krb5.**,
+            sun.security.krb5.**,
+            org.ietf.jgss.**,
+            sun.net.www.protocol.http.spnego.*;
+}
+
+module security-sasl {
+    include javax.security.sasl.**,
+            com.sun.security.sasl.**;
+}
+
+module security-xmldsig {
+    include javax.xml.crypto.**,
+            org.jcp.xml.dsig.**,
+            com.sun.org.apache.xml.internal.security.**;
+}
+
+module security-smartcardio {
+    include javax.smartcardio.**, sun.security.smartcardio.**;
+}
+
+module security-auth {
+    include com.sun.security.auth.**, sun.security.util.AuthResources_*;
+}
+
+module security-misc {
+    include security-auth;
+
+    include sun.security.pkcs.*,
+            sun.security.pkcs12.*;
+
+    // this class is a candidate to be removed.
+    include sun.security.util.BigInt;
+}
+
+module security-resources {
+    include sun.security.util.Resources_*;
+}
+
+module security-compat {
+    include java.security.acl.*, sun.security.acl.*;
+}
+
+/**************************************************************************/
+
+module jndi-ldap {
+    include javax.naming.ldap.**,
+            com.sun.jndi.ldap.**,
+            com.sun.jndi.url.ldap.*,
+            com.sun.jndi.url.ldaps.*,
+            sun.security.provider.certpath.ldap.**;
+}
+
+module jndi-rmiregistry {
+    include com.sun.jndi.rmi.**, com.sun.jndi.url.rmi.**;
+}
+
+module jndi-dns {
+    include net-dns;
+    include com.sun.jndi.dns.**, com.sun.jndi.url.dns.**;
+}
+
+module jndi-cosnaming {
+    include com.sun.jndi.cosnaming.**,
+            com.sun.jndi.toolkit.corba.**,
+            com.sun.jndi.url.corbaname.**,
+            com.sun.jndi.url.iiop.**,
+            com.sun.jndi.url.iiopname.**;
+}
+
+// framework/API and classes used by providers
+module jndi {
+    include javax.naming.**,
+            com.sun.naming.**,
+            com.sun.jndi.toolkit.ctx.**,
+            com.sun.jndi.toolkit.dir.**,
+            com.sun.jndi.toolkit.url.**;
+}
+
+/**************************************************************************/
+
+module jdbc-base {
+    include java.sql.**, javax.sql.*;
+    exclude javax.sql.XA*;
+}
+
+module jdbc-enterprise {
+    include javax.sql.**, com.sun.rowset.**;
+}
+
+module jdbc-odbc {
+    include sun.jdbc.odbc.**;
+}
+
+/**************************************************************************/
+
+module scripting {
+    include javax.script.**;
+
+    // supporting classes for scripting engines
+    include com.sun.script.util.**;
+}
+
+module scripting-rhino {
+    include com.sun.script.javascript.**, sun.org.mozilla.javascript.**;
+}
+
+/**************************************************************************/
+
+module httpserver {
+    include com.sun.net.httpserver.**, sun.net.httpserver.**;
+}
+
+/**************************************************************************/
+
+module sctp {
+    // API and dependencies
+    include com.sun.nio.sctp.**, sun.nio.ch.Sctp*;
+}
+
+/**************************************************************************/
+
+module langtools {
+    include javax.tools.**, javax.lang.model.**, javax.annotation.processing.**;
+
+    // include mirror API for now
+    include com.sun.mirror.**;
+
+    // include the JSR292 APIs for now
+    include java.dyn.**, sun.dyn.**;
+}
+
+/**************************************************************************/
+
+module beans {
+    include java.beans.**, com.sun.beans.**, sun.beans.**;
+}
+
+/**************************************************************************/
+
+module jaxp-parsers-api {
+    include javax.xml.*, javax.xml.parsers.**,
+            org.w3c.dom.**, org.w3c.sax.**, org.xml.sax.**;
+}
+
+module jaxp-api {
+    include javax.xml.**;
+    exclude javax.xml.crypto.**,   // XML-DSIG
+            javax.xml.bind.**,     // JAX-WS
+            javax.xml.soap.**,
+            javax.xml.ws.**;
+}
+
+module jaxp-xerces-impl {
+    include com.sun.org.apache.xerces.internal.**;
+
+    // include in xerces-impl due to circular dependencies
+    include com.sun.org.apache.xml.internal.serialize.**,
+            com.sun.xml.internal.stream.**;
+    exclude com.sun.xml.internal.stream.buffer.**;  // JAX-WS
+}
+
+// required by Xerces and JAX-WS
+module jaxp-xerces-resolver {
+    include com.sun.org.apache.xml.internal.resolver.**;
+}
+
+module jaxp-xalan {
+    include com.sun.org.apache.xalan.internal.**,
+            com.sun.org.apache.xpath.internal.**,
+            com.sun.org.apache.xml.internal.dtm.**,
+            com.sun.org.apache.xml.internal.res.**,
+            com.sun.org.apache.xml.internal.serializer.**,
+            com.sun.org.apache.xml.internal.utils.**,
+            com.sun.org.apache.bcel.internal.**,
+            com.sun.org.apache.regexp.internal.**,
+            com.sun.java_cup.internal.**;
+}
+
+/**************************************************************************/
+
+module jaxws-tools {
+    include com.sun.codemodel.**,
+            com.sun.xml.internal.dtdparser.**,
+            com.sun.xml.internal.rngom.**,
+            com.sun.xml.internal.xsom.**,
+            com.sun.istack.internal.tools.**,
+            com.sun.istack.internal.ws.**,
+            com.sun.tools.internal.xjc.**,
+            com.sun.tools.internal.ws.**,
+            com.sun.tools.internal.jxc.**,
+            org.relaxng.datatype.**;
+}
+
+module jaxws {
+    include javax.jws.**,
+            javax.xml.bind.**,
+            javax.xml.soap.**,
+            javax.xml.ws.**,
+            org.relaxng.**,
+            com.sun.istack.internal.*,
+            com.sun.istack.internal.localization.*,
+            com.sun.xml.internal.**;
+
+    // include JAF in this module
+    include javax.activation.**, com.sun.activation.**;
+
+    include META-INF/mailcap.default,
+            META-INF/mimetypes.default;
+}
+
+/**************************************************************************/
+module enterprise-base {
+    include javax.transaction.**,  // JTA
+            javax.annotation.*;    // Common annotations (JSR-250)
+}
+
+/**************************************************************************/
+module corba {
+    include javax.activity.**,
+            javax.rmi.*,
+            javax.rmi.CORBA.*,
+            javax.transaction.**,
+            com.sun.corba.**,
+            com.sun.org.omg.**,
+            org.omg.**,
+            sun.corba.**;
+
+    // JMX remote API
+    exclude org.omg.stub.javax.management.**;
+}
+
+/**************************************************************************/
+
+module applet {
+    include java.applet.**,
+            sun.applet.**;
+}
+
+module awt {
+    include java.awt.**,
+            sun.awt.**,
+            com.sun.awt.**;
+}
+
+module font {
+    include sun.font.**;
+}
+
+module imageio {
+    include javax.imageio.**,
+            com.sun.imageio.**;
+}
+
+module java2d {
+    include sun.dc.**,
+            sun.java2d.**,
+            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.**,
+            // 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.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.*;
+
+    // PerformanceLogger and dependencies
+    include sun.misc.Ref, sun.misc.PerformanceLogger;
+
+    // misc. dependencies that we need to examine
+    include sun.text.CodePointIterator,
+            sun.text.Char*,
+            sun.misc.Queue*,
+            sun.misc.FIFOQueueEnumerator,
+            sun.misc.LIFOQueueEnumerator;
+
+    // content handlers
+    include sun.net.www.content.audio.**,
+            sun.net.www.content.image.**;
+}
+
+/**************************************************************************/
+
+module jkernel {
+    include sun.jkernel.*;
+}
+
+module deploy {
+    include jkernel;
+
+    // For now, all plugin and JNLP
+    include com.sun.java.browser.**,
+            netscape.**,
+            sun.plugin.**,
+            sun.plugin2.**,,
+            com.sun.deploy.**,
+            com.sun.javaws.**,
+            javax.jnlp.*,
+            com.sun.jnlp.*;
+
+    // Hook for http authentication
+    include sun.net.www.protocol.http.AuthCacheBridge;
+}
+
+/**************************************************************************/
+
+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.*;
+
+    // ftp and mail clients
+    include sun.net.ftp.**, sun.net.smtp.**;
+
+    // Legacy protocol handlers
+    include sun.net.www.protocol.**;
+
+    // Legacy content handlers
+    include sun.net.www.content.**;
+
+    include sun.net.Telnet*,
+            sun.net.TransferProtocolClient;
+}
+
+/**************************************************************************/
+
+// jar-tool and security-tools are JRE tools
+module jar-tool {
+    include sun.tools.jar.**;
+}
+
+module security-tools {
+    include sun.security.tools.**;
+
+    // Used by security tools
+    include sun.security.util.PathList, sun.security.x509.CertAndKeyGen;
+
+    exclude sun.security.tools.JarBASE64Encoder,
+            sun.security.tools.JarSigner,
+            sun.security.tools.JarSignerParameters,
+            sun.security.tools.JarSignerResources*,
+            sun.security.tools.SignatureFile,
+            sun.security.tools.TimestampedSigner;
+}
+
+module jconsole {
+    include sun.tools.jconsole.**,
+            com.sun.tools.jconsole.*;
+}
+
+module serialver {
+    include sun.tools.serialver.**;
+}
+
+module gui-tools {
+    include jconsole,
+            serialver;
+
+    include com.sun.tools.example.debug.bdi.**,
+            com.sun.tools.example.debug.gui.**,
+            com.sun.tools.internal.xjc.**;
+}
+
+module attach {
+    include com.sun.tools.attach.**,
+            sun.tools.attach.**;
+}
+
+module debugging {
+    include com.sun.jdi.**, com.sun.tools.jdi.**;
+}
+
+module jdb {
+    include com.sun.tools.example.debug.**;
+}
+
+module sajdi {
+    include sun.jvm.hotspot.**,
+            com.sun.java.swing.ui.**,
+            com.sun.java.swing.action.**;
+
+    include toolbarButtonGraphics/**;
+    include sa.properties;
+}
+
+module tools {
+    include attach,
+            debugging,
+            jaxws-tools,
+            jdb,
+            rmic,
+            sajdi;
+
+    // include gui-tools in tools module unless the tool binaries
+    // are modified to load the new gui-tools.jar
+    include gui-tools;
+
+    include com.sun.tools.**, sun.tools.**, sun.security.tools.**,
+            com.sun.jarsigner.**,
+            com.sun.javac.**,
+            com.sun.javadoc.**, com.sun.source.**,
+            sun.jvmstat.**;
+}
+
+/**************************************************************************/
+
+module servicetag {
+    include com.sun.servicetag.**;
+}
+
+/**************************************************************************/
+
+// these classes will be removed from JRE - see 6909002
+module inputmethods-ext {
+    include com.sun.inputmethods.internal.**;
+}
+
+/**************************************************************************/
+
+// 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 **;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/make/modules/modules.group	Wed Mar 24 14:16:57 2010 -0700
@@ -0,0 +1,29 @@
+/*
+ * 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.
+ *
+ * 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.
+ */
+
+/*
+ * Example:
+ *    module jdbc {
+ *        include jdbc-base, jdbc-enterprise, jdbc-odbc;
+ *    }
+ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/make/modules/optional.depconfig	Wed Mar 24 14:16:57 2010 -0700
@@ -0,0 +1,149 @@
+#
+# 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.
+#
+
+# public final java.nio.channels.SocketChannel getChannel()
+@Optional
+  sun.security.ssl.BaseSSLSocketImpl -> java.nio.channels.SocketChannel
+
+# public XMLDecoder(java.io.InputStream)
+# public XMLDecoder(java.io.InputStream, java.lang.Object)
+# public XMLDecoder(java.io.InputStream, java.lang.Object, java.beans.ExceptionListener)
+# public XMLDecoder(java.io.InputStream, java.lang.Object, java.beans.ExceptionListener, java.lang.ClassLoader)
+# public XMLDecoder(org.xml.sax.InputSource)
+@Optional
+  java.beans.XMLDecoder -> com.sun.beans.decoder.DocumentHandler
+  java.beans.XMLDecoder -> org.xml.sax.InputSource
+
+# public static org.xml.sax.helpers.DefaultHandler createHandler(java.lang.Object, java.beans.ExceptionListener, java.lang.ClassLoader)
+@Optional
+  java.beans.XMLDecoder -> com.sun.beans.decoder.DocumentHandler
+  java.beans.XMLDecoder -> org.xml.sax.helpers.DefaultHandler
+
+# public final java.nio.channels.FileChannel getChannel()
+@Optional
+  java.net.SocketInputStream -> java.nio.channels.FileChannel
+
+# public final java.nio.channels.FileChannel getChannel()
+@Optional
+  java.net.SocketOutputStream -> java.nio.channels.FileChannel
+
+# public Scanner(java.io.File)
+# public Scanner(java.io.File, java.lang.String)
+@Optional
+  java.util.Scanner -> java.nio.channels.ReadableByteChannel
+  java.util.Scanner -> java.nio.channels.Channels
+
+# public Scanner(java.nio.file.FileRef)
+# public Scanner(java.nio.file.FileRef, java.lang.String)
+@Optional
+  java.util.Scanner -> java.nio.file.FileRef
+  java.util.Scanner -> java.nio.file.OpenOption
+
+# public Scanner(java.nio.channels.ReadableByteChannel)
+# public Scanner(java.nio.channels.ReadableByteChannel, java.lang.String)
+@Optional
+  java.util.Scanner -> java.nio.channels.ReadableByteChannel
+  java.util.Scanner -> java.nio.channels.Channels
+
+# private static void loadSnmpAgent(java.lang.String, java.util.Properties)
+@Optional
+  sun.management.Agent -> sun.management.snmp.AdaptorBootstrap
+
+# public void connect()
+@Optional
+  sun.net.www.protocol.http.HttpURLConnection -> java.net.SecureCacheResponse
+
+# private static sun.security.util.PermissionFactory<?> permissionFactory()
+@Optional
+  sun.security.util.SecurityConstants$AWT -> sun.awt.AWTPermissionFactory
+
+# sun.util.logging.LoggingSupport
+@Optional
+  sun.util.logging.LoggingSupport -> java.util.logging.LoggingProxyImpl
+
+# public java.nio.channels.DatagramChannel getChannel()
+@Optional
+  java.net.DatagramSocket -> java.nio.channels.DatagramChannel
+
+# public java.nio.channels.SocketChannel getChannel()
+@Optional
+  java.net.Socket -> java.nio.channels.SocketChannel
+
+# public java.nio.channels.ServerSocketChannel getChannel()
+@Optional
+  java.net.ServerSocket -> java.nio.channels.ServerSocketChannel
+
+# public final java.nio.channels.FileChannel getChannel()
+@Optional
+  java.io.RandomAccessFile -> java.nio.channels.FileChannel
+  java.io.RandomAccessFile -> sun.nio.ch.FileChannelImpl
+
+# public static sun.nio.cs.StreamDecoder forDecoder(java.nio.channels.ReadableByteChannel, java.nio.charset.CharsetDecoder, int)
+@Optional
+  sun.nio.cs.StreamDecoder -> java.nio.channels.ReadableByteChannel
+
+# private static java.nio.channels.FileChannel getChannel(java.io.FileInputStream)
+# StreamDecoder(java.io.InputStream, java.lang.Object, java.nio.charset.CharsetDecoder)
+@Optional
+  sun.nio.cs.StreamDecoder -> java.nio.channels.FileChannel
+
+# StreamDecoder(java.nio.channels.ReadableByteChannel, java.nio.charset.CharsetDecoder, int)
+@Optional
+  sun.nio.cs.StreamDecoder -> java.nio.channels.ReadableByteChannel
+
+# public static java.io.File createTemporaryFile(java.lang.String, java.lang.String, java.nio.file.attribute.FileAttribute<?>[])
+@Optional
+  java.io.File -> java.io.TempFileHelper
+  java.io.File -> java.nio.file.attribute.FileAttribute
+
+# public java.nio.file.Path toPath()
+@Optional
+  java.io.File -> java.nio.file.Paths
+  java.io.File -> java.nio.file.Path
+
+# public static sun.nio.cs.StreamEncoder forEncoder(java.nio.channels.WritableByteChannel, java.nio.charset.CharsetEncoder, int)
+# private StreamEncoder(java.nio.channels.WritableByteChannel, java.nio.charset.CharsetEncoder, int)
+@Optional
+  sun.nio.cs.StreamEncoder -> java.nio.channels.WritableByteChannel
+
+# public java.nio.channels.FileChannel getChannel()
+@Optional
+  java.io.FileOutputStream -> java.nio.channels.FileChannel
+  java.io.FileOutputStream -> sun.nio.ch.FileChannelImpl
+
+# public java.nio.channels.FileChannel getChannel()
+@Optional
+  java.io.FileInputStream -> java.nio.channels.FileChannel
+  java.io.FileInputStream -> sun.nio.ch.FileChannelImpl
+
+# public void loadFromXML(java.io.InputStream)
+# public void storeToXML(java.io.OutputStream, java.lang.String, java.lang.String)
+@Optional
+  java.util.Properties -> java.util.XMLUtils
+
+# public static java.nio.channels.Channel inheritedChannel()
+@Optional
+  java.lang.System -> java.nio.channels.Channel
+  java.lang.System -> java.nio.channels.spi.SelectorProvider
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/make/modules/tools/Makefile	Wed Mar 24 14:16:57 2010 -0700
@@ -0,0 +1,154 @@
+#
+# 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.
+#
+
+#
+# Makefile for building the classanalyzer tool
+#
+
+BUILDDIR = ../..
+include $(BUILDDIR)/common/Defs.gmk
+
+PKGDIR = com/sun/classanalyzer
+BUILDTOOL_SOURCE_ROOT = src
+BUILDTOOL_MAIN        = $(PKGDIR)/ClassAnalyzer.java
+BUILTTOOL_MAINCLASS   = $(subst /,.,$(BUILDTOOL_MAIN:%.java=%))
+
+BUILDTOOL_MAIN_SOURCE_FILE = $(BUILDTOOL_SOURCE_ROOT)/$(BUILDTOOL_MAIN)
+BUILDTOOL_MANIFEST_FILE    = $(BUILDTOOLCLASSDIR)/classanalyzer_manifest.mf
+
+FILES_java := $(shell $(CD) $(BUILDTOOL_SOURCE_ROOT) \
+    && $(FIND) $(PKGDIR) -type f -print)
+
+FILES_class = $(FILES_java:%.java=$(BUILDTOOLCLASSDIR)/%.class)
+
+CLASSANALYZER_JAR_FILE     = $(BUILDTOOLJARDIR)/classanalyzer.jar
+
+#
+# ClassAnalyzer depends on the com.sun.tools.classfile API.
+# The tool is compiled with the latest version of the classfile 
+# library in the langtools repo to make sure that synchronized
+# change is made if the classfile API is changed. 
+#
+# If langtools repo exists, build its own copy of the
+# classfile library and use it for compile time and runtime.
+# If not exist (the top level repo is not a forest), use 
+# the built jdk tools that imports tools.jar from the latest
+# promoted build.
+#
+# If the classfile API is changed but not yet in a promoted build,
+# the build might fail and the tool would need the langtools repo
+# to build in that case.
+#
+ifndef LANGTOOLS_TOPDIR
+  LANGTOOLS_TOPDIR=$(JDK_TOPDIR)/../langtools
+endif
+
+LANGTOOLS_TOPDIR_EXISTS := $(shell \
+  if [ -d $(LANGTOOLS_TOPDIR) ] ; then \
+    echo true; \
+  else \
+    echo false; \
+  fi)
+
+CLASSFILE_SRC = $(LANGTOOLS_TOPDIR)/src/share/classes
+CLASSFILE_PKGDIR = com/sun/tools/classfile
+
+ifeq ($(LANGTOOLS_TOPDIR_EXISTS), true)
+  FILES_classfile_java := $(shell \
+       $(CD) $(CLASSFILE_SRC) && \
+           $(FIND) $(CLASSFILE_PKGDIR) -name '*.java' -print)
+  FILES_classfile_class = $(FILES_classfile_java:%.java=$(BUILDTOOLCLASSDIR)/%.class)
+  CLASSFILE_JAR_FILE = $(BUILDTOOLJARDIR)/classfile.jar
+  BUILDTOOL_JAVAC    = $(BOOT_JAVAC_CMD) $(JAVAC_JVM_FLAGS) \
+                          $(BOOT_JAVACFLAGS) -classpath $(CLASSFILE_JAR_FILE)
+  BUILDTOOL_JAVA     = $(BOOT_JAVA_CMD) $(JAVA_TOOLS_FLAGS) \
+                          -Xbootclasspath/p:$(CLASSFILE_JAR_FILE)
+else
+  # if langtools doesn't exist, use tools from the built jdk
+  BUILDTOOL_JAVAC = $(BINDIR)/javac $(JAVAC_JVM_FLAGS) \
+                       $(BOOT_JAVACFLAGS)
+  BUILDTOOL_JAVA  = $(BINDIR)/java $(JAVA_TOOLS_FLAGS)
+endif
+
+# Location of the output modules.list, <module>.classlist
+# and other output files generated by the class analyzer tool.
+#
+MODULE_CLASSLIST = $(MODULES_TEMPDIR)/classlist
+
+all build: classanalyzer gen-classlist
+
+classanalyzer: $(CLASSFILE_JAR_FILE) $(CLASSANALYZER_JAR_FILE) 
+
+gen-classlist:
+	@$(ECHO) ">>>Making "$@" @ `$(DATE)` ..."
+	@$(RM) -rf $(MODULE_CLASSLIST)
+	@$(MKDIR) -p $(MODULE_CLASSLIST)
+	$(BUILDTOOL_JAVA) \
+                -Dclassanalyzer.debug \
+                -jar $(CLASSANALYZER_JAR_FILE) \
+                -jdkhome $(OUTPUTDIR) \
+                -config ../modules.config \
+                -config ../modules.group \
+                -depconfig ../jdk7.depconfig \
+                -depconfig ../optional.depconfig \
+                -showdynamic \
+                -output $(MODULE_CLASSLIST)
+	@$(ECHO) ">>>Finished making "$@" @ `$(DATE)` ..."
+
+$(BUILDTOOL_MANIFEST_FILE): $(BUILDTOOL_MAIN_SOURCE_FILE)
+	@$(prep-target)
+	$(ECHO) "Main-Class: $(BUILTTOOL_MAINCLASS)" > $@
+
+$(BUILDTOOLCLASSDIR)/$(CLASSFILE_PKGDIR)/%.class : $(CLASSFILE_SRC)/$(CLASSFILE_PKGDIR)/%.java
+	@$(prep-target)
+	@$(BUILDTOOL_JAVAC) \
+            -sourcepath $(CLASSFILE_SRC) \
+            -d $(BUILDTOOLCLASSDIR) $<
+
+$(BUILDTOOLCLASSDIR)/%.class : $(BUILDTOOL_SOURCE_ROOT)/%.java
+	@$(prep-target)
+	$(BUILDTOOL_JAVAC) \
+            -sourcepath $(BUILDTOOL_SOURCE_ROOT) \
+            -d $(BUILDTOOLCLASSDIR) $<
+
+$(CLASSANALYZER_JAR_FILE): $(BUILDTOOL_MANIFEST_FILE) $(FILES_class)
+	@$(prep-target)
+	$(BOOT_JAR_CMD) cfm $@ $(BUILDTOOL_MANIFEST_FILE) \
+	    -C $(BUILDTOOLCLASSDIR) $(PKGDIR) $(BOOT_JAR_JFLAGS) || $(RM) $@
+	@$(java-vm-cleanup)
+
+$(BUILDTOOLJARDIR)/classfile.jar: $(FILES_classfile_class)
+	@$(prep-target)
+	$(CD) $(BUILDTOOLCLASSDIR) && \
+	    $(BOOT_JAR_CMD) cf $@ \
+	        $(CLASSFILE_PKGDIR) $(BOOT_JAR_JFLAGS) || $(RM) $@
+	@$(java-vm-cleanup)
+
+clean clobber::
+	@$(RM) -rf $(BUILDTOOLCLASSDIR)/$(PKGDIR)
+	@$(RM) -rf $(BUILDTOOLCLASSDIR)/$(CLASSFILE_PKGDIR)
+	@$(RM) $(BUILDTOOL_MANIFEST_FILE)
+	@$(RM) $(CLASSANALYZER_JAR_FILE)
+	@$(RM) $(CLASSFILE_JAR_FILE)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/make/modules/tools/build.xml	Wed Mar 24 14:16:57 2010 -0700
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+  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.
+-->
+
+<project name="classanalyzer" default="build" basedir=".">
+</project>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/make/modules/tools/nbproject/project.properties	Wed Mar 24 14:16:57 2010 -0700
@@ -0,0 +1,86 @@
+#
+# 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.
+#
+
+application.title=classanalyzer
+application.vendor=mchung
+build.classes.dir=${build.dir}/classes
+build.classes.excludes=**/*.java,**/*.form
+
+# This directory is removed when the project is cleaned:
+build.dir=build
+build.generated.dir=${build.dir}/generated
+build.generated.sources.dir=${build.dir}/generated-sources
+
+# Only compile against the classpath explicitly listed here:
+build.sysclasspath=ignore
+build.test.classes.dir=${build.dir}/test/classes
+build.test.results.dir=${build.dir}/test/results
+
+cp.extra=${tools.jar} 
+
+debug.classpath=\
+    ${run.classpath}
+debug.test.classpath=\
+    ${run.test.classpath}
+
+# This directory is removed when the project is cleaned:
+dist.dir=dist
+dist.jar=${dist.dir}/classanalyzer.jar
+dist.javadoc.dir=${dist.dir}/javadoc
+
+excludes=
+
+file.reference.tools.jar=${jdk.home}/lib/tools.jar
+file.reference.tools-src=src
+includes=**
+jar.compress=false
+javac.classpath=\
+    ${file.reference.tools.jar}
+javac.deprecation=false
+javac.source=1.5
+javac.target=1.5
+javac.test.classpath=
+javadoc.author=false
+javadoc.noindex=false
+javadoc.nonavbar=false
+javadoc.notree=false
+javadoc.private=false
+javadoc.splitindex=false
+javadoc.use=false
+javadoc.version=false
+main.class=com.sun.classanalyzer.ClassAnalyzer
+manifest.file=manifest.mf
+meta.inf.dir=${src.dir}/META-INF
+platform.active=JDK_1.6
+run.classpath=\
+    ${javac.classpath}:\
+    ${build.classes.dir}
+# Space-separated list of JVM arguments used when running the project
+# (you may also define separate properties like run-sys-prop.name=value instead of -Dname=value
+# or test-sys-prop.name=value to set system properties for unit tests):
+run.jvmargs=-Xmx256m
+run.test.classpath=
+source.encoding=UTF-8
+src.dir=${file.reference.tools-src}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/make/modules/tools/nbproject/project.xml	Wed Mar 24 14:16:57 2010 -0700
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  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.
+-->
+
+<project xmlns="http://www.netbeans.org/ns/project/1">
+    <type>org.netbeans.modules.java.j2seproject</type>
+    <configuration>
+        <data xmlns="http://www.netbeans.org/ns/j2se-project/3">
+            <name>classanalyzer</name>
+            <explicit-platform explicit-source-supported="true"/>
+            <source-roots>
+                <root id="src.dir"/>
+            </source-roots>
+            <test-roots/>
+        </data>
+    </configuration>
+</project>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/make/modules/tools/src/com/sun/classanalyzer/AnnotatedDependency.java	Wed Mar 24 14:16:57 2010 -0700
@@ -0,0 +1,627 @@
+/*
+ * 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.
+ *
+ * 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 com.sun.classanalyzer;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.Set;
+import java.util.TreeSet;
+import java.util.Map;
+
+import com.sun.classanalyzer.Module.Reference;
+import java.util.LinkedList;
+import java.util.TreeMap;
+
+/**
+ *
+ * @author Mandy Chung
+ */
+public abstract class AnnotatedDependency implements Comparable<AnnotatedDependency> {
+
+    final Klass from;
+    final List<String> classes;
+    protected boolean optional;
+    String description;
+    Klass.Method method;
+    private List<Filter> filters = null;
+
+    public AnnotatedDependency(Klass klass) {
+        this(klass, false);
+    }
+
+    public AnnotatedDependency(Klass klass, boolean optional) {
+        this.from = klass;
+        this.classes = new ArrayList<String>();
+        this.optional = optional;
+    }
+
+    abstract String getTag();
+
+    abstract boolean isDynamic();
+
+    void setMethod(Klass.Method m) {
+        this.method = m;
+    }
+
+    void addElement(String element, List<String> value) {
+        if (element.equals("value")) {
+            addValue(value);
+        } else if (element.equals("description")) {
+            description = value.get(0);
+        } else if (element.equals("optional")) {
+            optional = value.get(0).equals("1") || Boolean.parseBoolean(value.get(0));
+        }
+    }
+
+    void addValue(List<String> value) {
+        for (String s : value) {
+            if ((s = s.trim()).length() > 0) {
+                classes.add(s);
+            }
+        }
+    }
+
+    List<String> getValue() {
+        return classes;
+    }
+
+    boolean isOptional() {
+        return optional;
+    }
+
+    boolean isEmpty() {
+        return classes.isEmpty();
+    }
+
+    boolean matches(String classname) {
+        synchronized (this) {
+            // initialize filters
+            if (filters == null) {
+                filters = new ArrayList<Filter>();
+                for (String pattern : classes) {
+                    filters.add(new Filter(pattern));
+                }
+
+            }
+        }
+
+        for (Filter f : filters) {
+            if (f.matches(classname)) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder();
+        for (String v : getValue()) {
+            if (sb.length() == 0) {
+                sb.append(getTag());
+                sb.append("\n");
+            } else {
+                sb.append("\n");
+            }
+            sb.append("  ");
+            sb.append(from.getClassName()).append(" -> ");
+            sb.append(v);
+        }
+        return sb.toString();
+    }
+
+    @Override
+    public int compareTo(AnnotatedDependency o) {
+        if (from == o.from) {
+            if (this.getClass().getName().equals(o.getClass().getName())) {
+                String s1 = classes.isEmpty() ? "" : classes.get(0);
+                String s2 = o.classes.isEmpty() ? "" : o.classes.get(0);
+                return s1.compareTo(s2);
+            } else {
+                return this.getClass().getName().compareTo(o.getClass().getName());
+            }
+
+        } else {
+            return from.compareTo(o.from);
+        }
+    }
+
+    @Override
+    public int hashCode() {
+        int hashcode = 7 + 73 * from.hashCode();
+        for (String s : classes) {
+            hashcode ^= s.hashCode();
+        }
+        return hashcode;
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+        if (!(obj instanceof AnnotatedDependency)) {
+            return false;
+        }
+        AnnotatedDependency other = (AnnotatedDependency) obj;
+        boolean ret = this.from.equals(other.from) && this.classes.size() == other.classes.size();
+        if (ret == true) {
+            for (int i = 0; i < this.classes.size(); i++) {
+                ret = ret && this.classes.get(i).equals(other.classes.get(i));
+            }
+        }
+        return ret;
+    }
+
+    static class ClassForName extends AnnotatedDependency {
+
+        public ClassForName(Klass klass, boolean optional) {
+            super(klass, optional);
+        }
+
+        @Override
+        String getTag() {
+            if (this.optional) {
+                return TAG + "(optional)";
+            } else {
+                return TAG;
+            }
+        }
+
+        @Override
+        boolean isDynamic() {
+            return true;
+        }
+        static final String TYPE = "sun.annotation.ClassForName";
+        static final String TAG = "@ClassForName";
+    }
+
+    static class NativeFindClass extends AnnotatedDependency {
+
+        public NativeFindClass(Klass klass, boolean optional) {
+            super(klass, optional);
+        }
+
+        @Override
+        String getTag() {
+            if (this.optional) {
+                return TAG + "(optional)";
+            } else {
+                return TAG;
+            }
+        }
+
+        @Override
+        boolean isDynamic() {
+            return true;
+        }
+        static final String TYPE = "sun.annotation.NativeFindClass";
+        static final String TAG = "@NativeFindClass";
+    }
+
+    static class Provider extends AnnotatedDependency {
+
+        private List<String> services = new ArrayList<String>();
+
+        Provider(Klass klass) {
+            super(klass, true);
+        }
+
+        @Override
+        boolean isDynamic() {
+            return true;
+        }
+
+        public List<String> services() {
+            return services;
+        }
+
+        @Override
+        void addElement(String element, List<String> value) {
+            if (element.equals("service")) {
+                List<String> configFiles = new ArrayList<String>();
+                for (String s : value) {
+                    if ((s = s.trim()).length() > 0) {
+                        configFiles.add(metaInfPath + s);
+                    }
+                }
+                addValue(configFiles);
+            }
+        }
+
+        @Override
+        void addValue(List<String> value) {
+            for (String s : value) {
+                if ((s = s.trim()).length() > 0) {
+                    if (s.startsWith("META-INF")) {
+                        services.add(s);
+                        readServiceConfiguration(s, classes);
+                    } else {
+                        throw new RuntimeException("invalid value" + s);
+                    }
+                }
+            }
+        }
+
+        boolean isEmpty() {
+            return services.isEmpty();
+        }
+        static final String metaInfPath =
+                "META-INF" + File.separator + "services" + File.separator;
+
+        static void readServiceConfiguration(String config, List<String> names) {
+            BufferedReader br = null;
+            try {
+                InputStream is = ClassPath.open(config);
+                if (is != null) {
+                    // Properties doesn't perserve the order of the input file
+                    br = new BufferedReader(new InputStreamReader(is, "utf-8"));
+                    int lc = 1;
+                    while ((lc = parseLine(br, lc, names)) >= 0);
+                }
+            } catch (IOException ex) {
+                throw new RuntimeException(ex);
+            } finally {
+                if (br != null) {
+                    try {
+                        br.close();
+                    } catch (IOException ex) {
+                        throw new RuntimeException(ex);
+                    }
+                }
+            }
+        }
+
+        // Parse a single line from the given configuration file, adding the name
+        // on the line to the names list.
+        //
+        private static int parseLine(BufferedReader r, int lc, List<String> names) throws IOException {
+            String ln = r.readLine();
+            if (ln == null) {
+                return -1;
+            }
+            int ci = ln.indexOf('#');
+            if (ci >= 0) {
+                ln = ln.substring(0, ci);
+            }
+            ln = ln.trim();
+            int n = ln.length();
+            if (n != 0) {
+                if ((ln.indexOf(' ') >= 0) || (ln.indexOf('\t') >= 0)) {
+                    throw new RuntimeException("Illegal configuration-file syntax");
+                }
+                int cp = ln.codePointAt(0);
+                if (!Character.isJavaIdentifierStart(cp)) {
+                    throw new RuntimeException("Illegal provider-class name: " + ln);
+                }
+                for (int i = Character.charCount(cp); i < n; i += Character.charCount(cp)) {
+                    cp = ln.codePointAt(i);
+                    if (!Character.isJavaIdentifierPart(cp) && (cp != '.')) {
+                        throw new RuntimeException("Illegal provider-class name: " + ln);
+                    }
+                }
+                if (!names.contains(ln)) {
+                    names.add(ln);
+                }
+            }
+            return lc + 1;
+        }
+
+        @Override
+        String getTag() {
+            return TAG;
+        }
+
+        @Override
+        public boolean equals(Object obj) {
+            if (!(obj instanceof AnnotatedDependency)) {
+                return false;
+            }
+            Provider other = (Provider) obj;
+            boolean ret = this.from.equals(other.from) &&
+                    this.services.size() == other.services.size();
+            if (ret == true) {
+                for (int i = 0; i < this.services.size(); i++) {
+                    ret = ret && this.services.get(i).equals(other.services.get(i));
+                }
+            }
+            return ret;
+        }
+
+        @Override
+        public int hashCode() {
+            int hashcode = 7 + 73 * from.hashCode();
+            for (String s : services) {
+                hashcode ^= s.hashCode();
+            }
+            return hashcode;
+        }
+
+        @Override
+        public List<String> getValue() {
+            List<String> result = new ArrayList<String>();
+            result.addAll(services);
+            return result;
+        }
+        static final String TYPE = "sun.annotation.Provider";
+        static final String TAG = "@Provider";
+    }
+
+    static class OptionalDependency extends AnnotatedDependency {
+
+        static boolean isOptional(Klass from, Klass to) {
+            synchronized (OptionalDependency.class) {
+                if (optionalDepsMap == null) {
+                    // Build a map of classes to its optional dependencies
+                    initDependencies();
+                }
+            }
+            for (Reference ref : optionalDepsMap.keySet()) {
+                if (ref.referrer() == from && ref.referree() == to) {
+                    return true;
+                }
+            }
+            return false;
+        }
+
+        OptionalDependency(Klass klass) {
+            super(klass, true);
+        }
+
+        @Override
+        boolean isDynamic() {
+            return false;
+        }
+
+        @Override
+        String getTag() {
+            return TAG;
+        }
+        static final String TYPE = "sun.annotation.Optional";
+        static final String TAG = "@Optional";
+    }
+
+    static class CompilerInline extends AnnotatedDependency {
+
+        public CompilerInline(Klass klass) {
+            super(klass);
+        }
+
+        @Override
+        String getTag() {
+            return TAG;
+        }
+
+        @Override
+        boolean isDynamic() {
+            return false;
+        }
+        static final String TYPE = "sun.annotation.Inline";
+        static final String TAG = "@Inline";
+    }
+
+    static class Filter {
+
+        final String pattern;
+        final String regex;
+
+        Filter(String pattern) {
+            this.pattern = pattern;
+
+            boolean isRegex = false;
+            for (int i = 0; i < pattern.length(); i++) {
+                char p = pattern.charAt(i);
+                if (p == '*' || p == '[' || p == ']') {
+                    isRegex = true;
+                    break;
+                }
+            }
+
+            if (isRegex) {
+                this.regex = convertToRegex(pattern);
+            } else {
+                this.regex = null;
+            }
+        }
+
+        private String convertToRegex(String pattern) {
+            StringBuilder sb = new StringBuilder();
+            int i = 0;
+            int index = 0;
+            int plen = pattern.length();
+            while (i < plen) {
+                char p = pattern.charAt(i);
+                if (p == '*') {
+                    sb.append("(").append(pattern.substring(index, i)).append(")");
+                    if (i + 1 < plen && pattern.charAt(i + 1) == '*') {
+                        sb.append(".*");
+                        index = i + 2;
+                    } else {
+                        sb.append("[^\\.]*");
+                        index = i + 1;
+                    }
+                } else if (p == '[') {
+                    int j = i + 1;
+                    while (j < plen) {
+                        if (pattern.charAt(j) == ']') {
+                            break;
+                        }
+                        j++;
+                    }
+                    if (j >= plen || pattern.charAt(j) != ']') {
+                        throw new RuntimeException("Malformed pattern " + pattern);
+                    }
+                    sb.append("(").append(pattern.substring(index, i)).append(")");
+                    sb.append(pattern.substring(i, j + 1));
+                    index = j + 1;
+                    i = j;
+                }
+                i++;
+            }
+            if (index < plen) {
+                sb.append("(").append(pattern.substring(index, plen)).append(")");
+            }
+            return sb.toString();
+        }
+
+        boolean matches(String name) {
+            if (regex == null) {
+                // the pattern is not a regex
+                return name.equals(pattern);
+            } else {
+                return name.matches(regex);
+            }
+        }
+    }
+
+    static boolean isValidType(String type) {
+        if (type.endsWith("(optional)")) {
+            int len = type.length() - "(optional)".length();
+            type = type.substring(0, len);
+        }
+        return type.equals(ClassForName.TYPE) || type.equals(ClassForName.TAG) ||
+                type.equals(NativeFindClass.TYPE) || type.equals(NativeFindClass.TAG) ||
+                type.equals(Provider.TYPE) || type.equals(Provider.TAG) ||
+                type.equals(CompilerInline.TYPE) || type.equals(CompilerInline.TAG) ||
+                type.equals(OptionalDependency.TYPE) || type.equals(OptionalDependency.TAG);
+    }
+
+    static AnnotatedDependency newAnnotatedDependency(String tag, String value, Klass klass) {
+        AnnotatedDependency dep = newAnnotatedDependency(tag, klass);
+        if (dep != null) {
+            dep.addValue(Collections.singletonList(value));
+        }
+        return dep;
+    }
+    static List<AnnotatedDependency> annotatedDependencies = new LinkedList<AnnotatedDependency>();
+    static List<AnnotatedDependency> optionalDependencies = new LinkedList<AnnotatedDependency>();
+
+    static AnnotatedDependency newAnnotatedDependency(String type, Klass klass) {
+        boolean optional = false;
+        if (type.endsWith("(optional)")) {
+            optional = true;
+            int len = type.length() - "(optional)".length();
+            type = type.substring(0, len);
+        }
+
+        if (type.equals(OptionalDependency.TYPE) || type.equals(OptionalDependency.TAG)) {
+            return newOptionalDependency(klass);
+        }
+
+        AnnotatedDependency dep;
+        if (type.equals(ClassForName.TYPE) || type.equals(ClassForName.TAG)) {
+            dep = new ClassForName(klass, optional);
+        } else if (type.equals(NativeFindClass.TYPE) || type.equals(NativeFindClass.TAG)) {
+            dep = new NativeFindClass(klass, optional);
+        } else if (type.equals(Provider.TYPE) || type.equals(Provider.TAG)) {
+            dep = new Provider(klass);
+        } else if (type.equals(CompilerInline.TYPE) || type.equals(CompilerInline.TAG)) {
+            dep = new CompilerInline(klass);
+        } else {
+            return null;
+        }
+        klass.addAnnotatedDep(dep);
+        annotatedDependencies.add(dep);
+        return dep;
+    }
+
+    static OptionalDependency newOptionalDependency(Klass klass) {
+        OptionalDependency dep = new OptionalDependency(klass);
+        optionalDependencies.add(dep);
+        return dep;
+    }
+    static Map<Reference, Set<AnnotatedDependency>> annotatedDepsMap = null;
+    static Map<Reference, Set<AnnotatedDependency>> optionalDepsMap = null;
+
+    static Map<Reference, Set<AnnotatedDependency>> getReferences(Module m) {
+        // ensure it's initialized
+        initDependencies();
+
+        Map<Reference, Set<AnnotatedDependency>> result = new TreeMap<Reference, Set<AnnotatedDependency>>();
+        for (Reference ref : annotatedDepsMap.keySet()) {
+            if (m.contains(ref.referrer()) && m.isModuleDependence(ref.referree())) {
+                result.put(ref, annotatedDepsMap.get(ref));
+            }
+        }
+        return result;
+    }
+
+    static Set<Module.Dependency> getDependencies(Module m) {
+        // ensure it's initialized
+        initDependencies();
+
+        Set<Module.Dependency> deps = new TreeSet<Module.Dependency>();
+        for (Reference ref : annotatedDepsMap.keySet()) {
+            if (m.contains(ref.referrer())) {
+                Module other = m.getModuleDependence(ref.referree());
+                if (other != null) {
+                    for (AnnotatedDependency ad : annotatedDepsMap.get(ref)) {
+                        Module.Dependency d = new Module.Dependency(other, ad.isOptional(), ad.isDynamic());
+                        deps.add(d);
+                    }
+                }
+            }
+        }
+        return deps;
+    }
+
+    synchronized static void initDependencies() {
+        if (annotatedDepsMap != null) {
+            return;
+        }
+
+        // Build a map of references to its dependencies
+        annotatedDepsMap = new TreeMap<Reference, Set<AnnotatedDependency>>();
+        optionalDepsMap = new TreeMap<Reference, Set<AnnotatedDependency>>();
+
+        for (Klass k : Klass.getAllClasses()) {
+            for (AnnotatedDependency ad : annotatedDependencies) {
+                if (ad.matches(k.getClassName())) {
+                    Reference ref = new Reference(ad.from, k);
+                    Set<AnnotatedDependency> set = annotatedDepsMap.get(ref);
+                    if (set == null) {
+                        set = new TreeSet<AnnotatedDependency>();
+                        annotatedDepsMap.put(ref, set);
+                    }
+                    set.add(ad);
+                }
+            }
+
+            for (AnnotatedDependency ad : optionalDependencies) {
+                if (ad.matches(k.getClassName())) {
+                    Reference ref = new Reference(ad.from, k);
+                    Set<AnnotatedDependency> set = optionalDepsMap.get(ref);
+                    if (set == null) {
+                        set = new TreeSet<AnnotatedDependency>();
+                        optionalDepsMap.put(ref, set);
+                    }
+                    set.add(ad);
+                }
+            }
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/make/modules/tools/src/com/sun/classanalyzer/AnnotationParser.java	Wed Mar 24 14:16:57 2010 -0700
@@ -0,0 +1,293 @@
+/*
+ * 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.
+ *
+ * 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 com.sun.classanalyzer;
+
+import com.sun.tools.classfile.*;
+import com.sun.tools.classfile.Annotation;
+import com.sun.tools.classfile.ExtendedAnnotation;
+import com.sun.tools.classfile.Annotation.Annotation_element_value;
+import com.sun.tools.classfile.Annotation.Array_element_value;
+import com.sun.tools.classfile.Annotation.Class_element_value;
+import com.sun.tools.classfile.Annotation.Enum_element_value;
+import com.sun.tools.classfile.Annotation.Primitive_element_value;
+import com.sun.tools.classfile.ConstantPoolException;
+import com.sun.tools.classfile.Descriptor;
+import com.sun.tools.classfile.Descriptor.InvalidDescriptor;
+import java.util.ArrayList;
+import java.util.List;
+
+import com.sun.classanalyzer.AnnotatedDependency.*;
+import java.io.File;
+import java.io.PrintWriter;
+import java.util.Map;
+import java.util.Set;
+
+/**
+ *
+ * @author Mandy Chung
+ */
+public class AnnotationParser {
+
+    static boolean parseAnnotation = false;
+    static void setParseAnnotation(boolean newValue) {
+        parseAnnotation = newValue;
+    }
+
+    private final ClassFileParser cfparser;
+    public AnnotationParser(ClassFileParser cfparser) {
+        this.cfparser = cfparser;
+    }
+
+    private AnnotatedDependency addAnnotation(Annotation annot, Klass.Method method) {
+        String type = getType(annot.type_index);
+        AnnotatedDependency dep = AnnotatedDependency.newAnnotatedDependency(type, cfparser.this_klass);
+        if (dep != null) {
+            for (int i = 0; i < annot.num_element_value_pairs; i++) {
+                Element element = getElement(annot.element_value_pairs[i]);
+                dep.addElement(element.name, element.value);
+            }
+            dep.setMethod(method);
+        }
+        return dep;
+    }
+
+    private AnnotatedDependency addAnnotation(ExtendedAnnotation annot, Klass.Method method) {
+        return addAnnotation(annot.annotation, method);
+    }
+
+    class Element {
+
+        String name;
+        List<String> value;
+
+        Element(String name) {
+            this.name = name;
+            this.value = new ArrayList<String>();
+        }
+
+        void add(String v) {
+            value.add(v);
+        }
+    }
+<