changeset 9440:22a391706a0b

Merge
author mullan
date Thu, 25 Jul 2013 11:09:28 -0400
parents a834ab2c1354 fd1b5adcfdf0
children 21120e3682ef
files make/sun/xawt/ToBin.java makefiles/sun/awt/X11/ToBin.java src/share/classes/com/sun/org/apache/xml/internal/security/resource/log4j.properties src/share/classes/com/sun/org/apache/xml/internal/security/transforms/implementations/FuncHereContext.java src/share/classes/com/sun/org/apache/xml/internal/security/utils/CachedXPathAPIHolder.java src/share/classes/com/sun/org/apache/xml/internal/security/utils/CachedXPathFuncHereAPI.java src/share/classes/com/sun/org/apache/xml/internal/security/utils/XPathFuncHereAPI.java src/share/classes/java/security/acl/package.html src/share/classes/java/security/cert/package.html src/share/classes/java/security/interfaces/package.html src/share/classes/java/security/package.html src/share/classes/java/security/spec/package.html src/share/classes/java/util/stream/StreamBuilder.java src/share/classes/javax/security/auth/callback/package.html src/share/classes/javax/security/auth/kerberos/package.html src/share/classes/javax/security/auth/login/package.html src/share/classes/javax/security/auth/package.html src/share/classes/javax/security/auth/spi/package.html src/share/classes/javax/security/auth/x500/package.html src/share/classes/javax/security/cert/package.html src/share/classes/javax/security/sasl/package.html src/share/classes/sun/misc/Hashing.java src/share/classes/sun/security/krb5/internal/rcache/CacheTable.java src/share/classes/sun/security/krb5/internal/rcache/ReplayCache.java src/share/classes/sun/security/provider/certpath/RevocationChecker.java src/solaris/classes/sun/awt/X11/XIconInfo.java src/solaris/classes/sun/awt/X11/security-icon-bw16.png src/solaris/classes/sun/awt/X11/security-icon-bw24.png src/solaris/classes/sun/awt/X11/security-icon-bw32.png src/solaris/classes/sun/awt/X11/security-icon-bw48.png src/solaris/classes/sun/awt/X11/security-icon-interim16.png src/solaris/classes/sun/awt/X11/security-icon-interim24.png src/solaris/classes/sun/awt/X11/security-icon-interim32.png src/solaris/classes/sun/awt/X11/security-icon-interim48.png src/solaris/classes/sun/awt/X11/security-icon-yellow16.png src/solaris/classes/sun/awt/X11/security-icon-yellow24.png src/solaris/classes/sun/awt/X11/security-icon-yellow32.png src/solaris/classes/sun/awt/X11/security-icon-yellow48.png src/solaris/classes/sun/awt/fontconfigs/linux.fontconfig.Fedora.properties src/solaris/classes/sun/awt/fontconfigs/linux.fontconfig.SuSE.properties src/solaris/classes/sun/awt/fontconfigs/linux.fontconfig.Ubuntu.properties src/solaris/classes/sun/awt/fontconfigs/linux.fontconfig.properties test/java/lang/invoke/7196190/MHProxyTest.java test/java/util/Collections/EmptySortedSet.java test/java/util/Comparators/BasicTest.java test/sun/misc/Hashing.java test/sun/security/krb5/auto/ReplayCache.java
diffstat 1840 files changed, 85945 insertions(+), 53853 deletions(-) [+]
line wrap: on
line diff
--- a/.hgtags	Thu Jul 25 10:58:00 2013 -0400
+++ b/.hgtags	Thu Jul 25 11:09:28 2013 -0400
@@ -214,3 +214,9 @@
 c63eda8f63008a4398d2c22ac8d72f7fef6f9238 jdk8-b90
 169451cf0cc53bde5af24f9820ea3f35ec4b4df4 jdk8-b91
 a2a2a91075ad85becbe10a39d7fd04ef9bea8df5 jdk8-b92
+691d6c6cd332d98b0f0221445a73906776f31f72 jdk8-b93
+51479fa56b7c4363c6d87c2e8b898d8185cf4b22 jdk8-b94
+42aa9f1828852bb8b77e98ec695211493ae0759d jdk8-b95
+4a5d3cf2b3af1660db0237e8da324c140e534fa4 jdk8-b96
+978a95239044f26dcc8a6d59246be07ad6ca6be2 jdk8-b97
+c4908732fef5235f1b98cafe0ce507771ef7892c jdk8-b98
--- a/make/com/oracle/jfr/Makefile	Thu Jul 25 10:58:00 2013 -0400
+++ b/make/com/oracle/jfr/Makefile	Thu Jul 25 11:09:28 2013 -0400
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -42,6 +42,11 @@
 
 AUTO_FILES_JAVA_DIRS = com/oracle/jrockit/jfr oracle/jrockit/jfr
 
+JFC_XSD = oracle/jrockit/jfr/settings/jfc.xsd
+JFC_XSD_SRC = $(CLOSED_SHARE_SRC)/classes/$(JFC_XSD)
+JFC_XSD_FILE = $(CLASSDESTDIR)/$(JFC_XSD)
+
+
 # Find C source files
 #
 vpath %.c $(CLOSED_SHARE_SRC)/native/oracle/jfr
@@ -59,15 +64,17 @@
 	$(RM) -r $(CLASSDESTDIR)/com/oracle/jrockit/jfr
 	$(RM) -r $(CLASSDESTDIR)/oracle/jrockit/jfr
 
+# Copy pre-shipped .jfc files
+JFR_LIBDIR = $(LIBDIR)/jfr
+JFC_SRCDIR = $(CLOSED_SHARE_SRC)/classes/oracle/jrockit/jfr/settings
 
-# Copy pre-shipped .jfs files
-JFR_LIBDIR = $(LIBDIR)/jfr
-JFR_SRCDIR = $(CLOSED_SHARE_SRC)/lib/jfr
-
-$(JFR_LIBDIR)/%.jfs: $(JFR_SRCDIR)/%.jfs
+$(JFR_LIBDIR)/%.jfc: $(JFC_SRCDIR)/%.jfc
 	$(install-file)
 
-JFS_FILES := $(subst $(JFR_SRCDIR),$(JFR_LIBDIR),$(wildcard $(JFR_SRCDIR)/*.jfs))
+JFC_FILES := $(subst $(JFC_SRCDIR),$(JFR_LIBDIR),$(wildcard $(JFC_SRCDIR)/*.jfc))
 
-all build : $(JFS_FILES)
+$(JFC_XSD_FILE) : $(JFC_XSD_SRC)
+	$(install-file)
 
+all build : $(JFC_FILES) $(JFC_XSD_FILE)
+
--- a/make/common/Defs-windows.gmk	Thu Jul 25 10:58:00 2013 -0400
+++ b/make/common/Defs-windows.gmk	Thu Jul 25 11:09:28 2013 -0400
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -432,40 +432,3 @@
             -d "JDK_COPYRIGHT=$(JDK_RC_COPYRIGHT)" \
             -d "JDK_NAME=$(JDK_RC_NAME)" \
             -d "JDK_FVER=$(JDK_RC_FVER)"
-
-# Enable 7-Zip LZMA file (de)compression for Java Kernel if it is available
-ifeq ($(ARCH_DATA_MODEL), 32)
-  ifneq ($(KERNEL), off)
-    # This is a hack to use until  7-Zip (and UPX) bundles can be put
-    # under /java/devtools.
-    ifndef DEPLOY_TOPDIR
-      DEPLOY_TOPDIR=$(JDK_TOPDIR)/../deploy
-    endif
-    # Uncomment this block to cause build failure if above assumption false
-    #DCHK = $(shell if [ ! -d $(DEPLOY_TOPDIR) ] ; then \
-    #  $(ECHO) deploy_not_a_peer_of_j2se ; \
-    #fi )
-    #ifeq ($(DCHK), deploy_not_a_peer_of_j2se)
-    #  If a build failure points to control coming here it means
-    #  it means deploy is not in the same directory
-    #  as j2se. Java Kernel can't tolerate that for the time being.
-    #endif
-    EC_TMP = $(shell if [ -d $(DEPLOY_TOPDIR)/make/lzma ] ; then \
-      $(ECHO) true ; \
-    else \
-      $(ECHO) false ; \
-    fi )
-    ifeq ($(EC_TMP), true)
-      EXTRA_COMP_INSTALL_PATH = lib\\\\deploy\\\\lzma.dll
-      # Crazy but true: deploy/make/plugin/jinstall/Makefile.jkernel does
-      # not include deploy/make/common/Defs-windows.gmk, either directly
-      # or indirectly. But it does include this file, so redundantly declare
-      # these variables that are in deploy/make/common/Defs-windows.gmk for
-      # the sake of the Java Kernel part of the deploy build. Whew!
-      EXTRA_COMP_LIB_NAME = lzma.dll
-      EXTRA_COMP_PATH = $(OUTPUTDIR)/tmp/deploy/lzma/win32/obj
-      EXTRA_COMP_CMD_PATH = $(EXTRA_COMP_PATH)/lzma.exe
-      EXTRA_COMP_LIB_PATH = $(EXTRA_COMP_PATH)/$(EXTRA_COMP_LIB_NAME)
-    endif
-  endif
-endif
--- a/make/common/Release.gmk	Thu Jul 25 10:58:00 2013 -0400
+++ b/make/common/Release.gmk	Thu Jul 25 11:09:28 2013 -0400
@@ -252,7 +252,7 @@
 	 $(INITIAL_IMAGE_JRE) $(INITIAL_IMAGE_JDK) \
 	 trim-image-jre trim-image-jdk \
          identify-image-jre identify-image-jdk \
-	 process-image-jre process-image-jdk sec-files sec-files-win jgss-files 
+	 process-image-jre process-image-jdk sec-files sec-files-win jgss-files
 endif
 
 # Don't use these
@@ -400,7 +400,8 @@
 # classes that go into jfr.jar
 JFR_CLASSES_DIRS= \
 	com/oracle/jrockit/jfr \
-	oracle/jrockit/jfr
+	oracle/jrockit/jfr \
+	jdk/jfr
 
 # classes that go into jsse.jar
 JSSE_CLASSES_DIRS = \
@@ -612,6 +613,7 @@
 	$(ECHO) "oracle/jrockit/jfr/parser/" >> $@
 	$(ECHO) "oracle/jrockit/jfr/settings/" >> $@
 	$(ECHO) "oracle/jrockit/jfr/tools/" >> $@
+	$(ECHO) "jdk/jfr/" >> $@
 endif
 endif
 
--- a/make/java/java/FILES_java.gmk	Thu Jul 25 10:58:00 2013 -0400
+++ b/make/java/java/FILES_java.gmk	Thu Jul 25 11:09:28 2013 -0400
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1996, 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -529,7 +529,6 @@
     sun/misc/JavaNioAccess.java \
     sun/misc/Perf.java \
     sun/misc/PerfCounter.java \
-    sun/misc/Hashing.java \
     sun/net/www/protocol/jar/Handler.java \
     sun/net/www/protocol/jar/JarURLConnection.java \
     sun/net/www/protocol/file/Handler.java \
--- a/make/java/nio/mapfile-bsd	Thu Jul 25 10:58:00 2013 -0400
+++ b/make/java/nio/mapfile-bsd	Thu Jul 25 11:09:28 2013 -0400
@@ -109,6 +109,7 @@
 		Java_sun_nio_ch_Net_getInterface6;
 		Java_sun_nio_ch_Net_shutdown;
 		Java_sun_nio_ch_Net_poll;
+                Java_sun_nio_ch_Net_isExclusiveBindAvailable;
                 Java_sun_nio_ch_PollArrayWrapper_interrupt;
                 Java_sun_nio_ch_PollArrayWrapper_poll0;
                 Java_sun_nio_ch_ServerSocketChannelImpl_accept0;
--- a/make/java/nio/mapfile-linux	Thu Jul 25 10:58:00 2013 -0400
+++ b/make/java/nio/mapfile-linux	Thu Jul 25 11:09:28 2013 -0400
@@ -117,6 +117,7 @@
 		Java_sun_nio_ch_Net_getInterface6;
 		Java_sun_nio_ch_Net_shutdown;
 		Java_sun_nio_ch_Net_poll;
+                Java_sun_nio_ch_Net_isExclusiveBindAvailable;
                 Java_sun_nio_ch_PollArrayWrapper_interrupt;
                 Java_sun_nio_ch_PollArrayWrapper_poll0;
                 Java_sun_nio_ch_ServerSocketChannelImpl_accept0;
--- a/make/java/nio/mapfile-solaris	Thu Jul 25 10:58:00 2013 -0400
+++ b/make/java/nio/mapfile-solaris	Thu Jul 25 11:09:28 2013 -0400
@@ -105,6 +105,7 @@
 		Java_sun_nio_ch_Net_getInterface6;
 		Java_sun_nio_ch_Net_shutdown;
 		Java_sun_nio_ch_Net_poll;
+                Java_sun_nio_ch_Net_isExclusiveBindAvailable;
                 Java_sun_nio_ch_PollArrayWrapper_interrupt;
                 Java_sun_nio_ch_PollArrayWrapper_poll0;
                 Java_sun_nio_ch_ServerSocketChannelImpl_accept0;
--- a/make/java/zip/mapfile-vers	Thu Jul 25 10:58:00 2013 -0400
+++ b/make/java/zip/mapfile-vers	Thu Jul 25 11:09:28 2013 -0400
@@ -65,6 +65,7 @@
 		Java_java_util_zip_ZipFile_initIDs;
 		Java_java_util_zip_ZipFile_open;
 		Java_java_util_zip_ZipFile_read;
+		Java_java_util_zip_ZipFile_startsWithLOC;
 
 		ZIP_Close;
 		ZIP_CRC32;
--- a/make/java/zip/reorder-i586	Thu Jul 25 10:58:00 2013 -0400
+++ b/make/java/zip/reorder-i586	Thu Jul 25 11:09:28 2013 -0400
@@ -19,6 +19,7 @@
 text: .text%Java_java_util_zip_ZipFile_initIDs;
 text: .text%Java_java_util_zip_ZipFile_open;
 text: .text%Java_java_util_zip_ZipFile_getTotal;
+text: .text%Java_java_util_zip_ZipFile_startsWithLOC;
 text: .text%Java_java_util_zip_ZipFile_getEntry;
 text: .text%Java_java_util_zip_ZipFile_freeEntry;
 text: .text%Java_java_util_zip_ZipFile_getEntryTime;
--- a/make/java/zip/reorder-sparc	Thu Jul 25 10:58:00 2013 -0400
+++ b/make/java/zip/reorder-sparc	Thu Jul 25 11:09:28 2013 -0400
@@ -18,6 +18,7 @@
 text: .text%Java_java_util_zip_ZipFile_initIDs;
 text: .text%Java_java_util_zip_ZipFile_open;
 text: .text%Java_java_util_zip_ZipFile_getTotal;
+text: .text%Java_java_util_zip_ZipFile_startsWithLOC;
 text: .text%Java_java_util_zip_ZipFile_getEntry;
 text: .text%Java_java_util_zip_ZipFile_freeEntry;
 text: .text%Java_java_util_zip_ZipFile_getEntryTime;
--- a/make/java/zip/reorder-sparcv9	Thu Jul 25 10:58:00 2013 -0400
+++ b/make/java/zip/reorder-sparcv9	Thu Jul 25 11:09:28 2013 -0400
@@ -18,6 +18,7 @@
 text: .text%Java_java_util_zip_ZipFile_initIDs;
 text: .text%Java_java_util_zip_ZipFile_open;
 text: .text%Java_java_util_zip_ZipFile_getTotal;
+text: .text%Java_java_util_zip_ZipFile_startsWithLOC;
 text: .text%Java_java_util_zip_ZipFile_getEntry;
 text: .text%Java_java_util_zip_ZipFile_freeEntry;
 text: .text%Java_java_util_zip_ZipFile_getEntryTime;
--- a/make/jpda/back/Makefile	Thu Jul 25 10:58:00 2013 -0400
+++ b/make/jpda/back/Makefile	Thu Jul 25 11:09:28 2013 -0400
@@ -31,6 +31,8 @@
 LIBRARY = jdwp
 PRODUCT = jpda
 
+LIBRARY_SUPPORTS_FULL_DEBUG_SYMBOLS=1
+
 FILES_m = mapfile-vers
 
 include $(BUILDDIR)/common/Defs.gmk
--- a/make/netbeans/common/shared.xml	Thu Jul 25 10:58:00 2013 -0400
+++ b/make/netbeans/common/shared.xml	Thu Jul 25 11:09:28 2013 -0400
@@ -77,7 +77,7 @@
         <echo level="verbose">System configuration claims architecture is ${platform}-${arch}</echo>
         <property name="build.dir" location="${root}/build/${platform}-${arch}"/>
         <property name="bin.dir" location="${build.dir}/bin"/>
-        <property name="make.dir" location="${root}/make"/>
+        <property name="make.dir" location="${root}/make"/> <!-- this is old build make files! -->
         <property name="gensrc.dir" location="${build.dir}/gensrc"/>
         <property name="classes.dir" location="${build.dir}/classes"/>
         <property name="jtreg.dir" location="${build.dir}/jtreg/${ant.project.name}"/>
@@ -126,7 +126,7 @@
             <attribute name="classesdir" default="${classes.dir}"/>
             <sequential>
                 <mkdir dir="@{classesdir}"/>
-                <javac srcdir="@{srcdir}" includes="@{includes}" excludes="@{excludes}" sourcepath="" 
+                <javac srcdir="@{srcdir}" includes="@{includes}" excludes="@{excludes}" sourcepath=""
                     destdir="@{classesdir}" fork="true" executable="${bootstrap.javac}"
                     debug="${javac.debug}" debuglevel="${javac.debuglevel}">
                     <!-- Mandatory for compiling partial JDK sources against a snapshot; should NEVER be used for any other purpose: -->
@@ -146,7 +146,7 @@
         <!-- Empty placeholder for easier customization. -->
         <!-- You can override this target in the ../build.xml file. -->
     </target>
-    
+
     <target name="build" depends="-init,-pre-compile,-build-ant,-build-make,-post-compile" description="Build sources."/>
     <target name="-do-build-ant">
         <depend srcdir="${share.src.dir}:${platform.src.dir}:${root}/src/closed/share/classes:${gensrc.dir}" destdir="${classes.dir}" cache="${build.dir}/depcache" includes="${includes}" excludes="${excludes}"/>
@@ -312,7 +312,7 @@
             <param name="jtreg.vm.options" value="-Xdebug -Xrunjdwp:transport=dt_socket,address=${jpda.address}"/>
         </antcall>
     </target>
-    
+
     <target name="debug" depends="-init" if="netbeans.home">
         <!-- No package decls -> "source root" is immediately containing dir -->
         <dirname file="${root}/test/${jtreg.tests}" property="test.dir"/>
--- a/make/netbeans/j2se/build.xml	Thu Jul 25 10:58:00 2013 -0400
+++ b/make/netbeans/j2se/build.xml	Thu Jul 25 11:09:28 2013 -0400
@@ -37,11 +37,11 @@
     <import file="../common/shared.xml"/>
 
     <target name="-build-make" depends="-make.init" if="use.make">
-        <make-run target="all" dir="${make.dir}"/>
+        <make-run target="jdk" dir="${root}/.."/>
     </target>
 
     <target name="-clean-make" depends="-make.init" if="use.make">
-        <make-run target="clean" dir="${make.dir}"/>
+        <make-run target="clean-jdk" dir="${root}/.."/>
     </target>
 
 </project>
--- a/make/sun/awt/Makefile	Thu Jul 25 10:58:00 2013 -0400
+++ b/make/sun/awt/Makefile	Thu Jul 25 11:09:28 2013 -0400
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1995, 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -38,6 +38,10 @@
 
 OTHER_CFLAGS += -D__MEDIALIB_OLD_NAMES -D__USE_J2D_NAMES
 
+ifneq  ($(PLATFORM), windows)
+CLASSES_INIT += $(TEMPDIR)/.gen_icons
+endif
+
 #
 # Files
 #
@@ -208,6 +212,79 @@
 endif
 build: fontconfigs
 
+ifneq ($(PLATFORM), windows)
+
+GEN_DIR=$(GENSRCDIR)/sun/awt/
+
+ifdef OPENJDK
+    ICONS_PATH_PREFIX=$(PLATFORM_SRC)
+else
+    ICONS_PATH_PREFIX=$(CLOSED_SRC)/solaris
+endif
+
+ICONS = \
+    $(ICONS_PATH_PREFIX)/classes/sun/awt/X11/java-icon16.png \
+    $(ICONS_PATH_PREFIX)/classes/sun/awt/X11/java-icon24.png \
+    $(ICONS_PATH_PREFIX)/classes/sun/awt/X11/java-icon32.png \
+    $(ICONS_PATH_PREFIX)/classes/sun/awt/X11/java-icon48.png
+
+ICONPATH=$(SHARE_SRC)/classes/sun/awt/resources
+
+ICONS += \
+   $(ICONPATH)/security-icon-bw16.png \
+   $(ICONPATH)/security-icon-interim16.png \
+   $(ICONPATH)/security-icon-yellow16.png \
+   $(ICONPATH)/security-icon-bw24.png \
+   $(ICONPATH)/security-icon-interim24.png \
+   $(ICONPATH)/security-icon-yellow24.png \
+   $(ICONPATH)/security-icon-bw32.png \
+   $(ICONPATH)/security-icon-interim32.png \
+   $(ICONPATH)/security-icon-yellow32.png \
+   $(ICONPATH)/security-icon-bw48.png \
+   $(ICONPATH)/security-icon-interim48.png \
+   $(ICONPATH)/security-icon-yellow48.png
+
+TEMPDIR_CLASSES = $(TEMPDIR)/classes
+   
+generated.clean:
+	$(RM) -r $(GEN_DIR)/*.java
+	$(RM) -r $(TEMPDIR)/.gen_icons   
+
+$(TEMPDIR_CLASSES)/sun/awt/ToBin.class: ToBin.java
+	@$(prep-target)
+	$(BOOT_JAVAC_CMD) -d $(TEMPDIR_CLASSES) $<
+
+$(TEMPDIR)/.gen_icons: $(TEMPDIR_CLASSES)/sun/awt/ToBin.class $(ICONS)
+	$(prep-target)
+	for i in $(ICONS); do \
+            filename=`basename $$i`; \
+	    name=`$(ECHO) $$filename | $(TR) '\-.' '__'`;  \
+            classname=$(GEN_DIR)/AWTIcon32_$$name.java; \
+	    $(RM) $$classname; \
+	    $(ECHO) "package sun.awt;" >> $$classname ; \
+	    $(ECHO) "public class AWTIcon32_$$name {" >> $$classname; \
+	    $(ECHO) "public final static int[] $$name = { " >> $$classname;  \
+	    $(CAT) $$i | \
+	      $(BOOT_JAVA_CMD) -cp $(TEMPDIR_CLASSES)  \
+		-Djava.awt.headless=true \
+		sun.awt.ToBin >> $$classname; \
+	    $(ECHO) "}; }" >> $$classname;  \
+            classname=$(GEN_DIR)/AWTIcon64_$$name.java; \
+	    $(RM) $$classname; \
+	    $(ECHO) "package sun.awt;" >> $$classname ; \
+	    $(ECHO) "public class AWTIcon64_$$name {" >> $$classname; \
+	    $(ECHO) "public final static long[] $$name = { " >> $$classname;  \
+	    $(CAT) $$i | \
+	      $(BOOT_JAVA_CMD) -cp $(TEMPDIR_CLASSES)  \
+		-Djava.awt.headless=true \
+		sun.awt.ToBin >> $$classname; \
+	    $(ECHO) "}; }" >> $$classname;  \
+	done
+	$(TOUCH) $@
+
+clean clobber:: generated.clean    
+endif
+
 
 ifeq ($(PLATFORM), windows)
 # vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv WINDOWS
@@ -390,12 +467,9 @@
 # vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv LINUX
 ifdef OPENJDK
 
-FONTCONFIGS_SRC	= $(PLATFORM_SRC)/classes/sun/awt/fontconfigs
-_FONTCONFIGS	= \
-	fontconfig.properties				\
-	fontconfig.SuSE.properties                      \
-	fontconfig.Ubuntu.properties                    \
-	fontconfig.Fedora.properties
+FONTCONFIGS_SRC	= 
+_FONTCONFIGS	= 
+
 else
 
 FONTCONFIGS_SRC	= $(CLOSED_SRC)/solaris/classes/sun/awt/fontconfigs
@@ -441,7 +515,11 @@
 FONTCONFIGS     = $(_FONTCONFIGS:%=$(LIBDIR)/%.src)
 BINARYFONTCONFIGS = $(_FONTCONFIGS:%.properties=$(LIBDIR)/%.bfc)
 
+ifneq ("x$(_FONTCONFIGS)", "x")
 fontconfigs: $(FONTCONFIGS) $(BINARYFONTCONFIGS)
+else
+fontconfigs:
+endif
 
 $(LIBDIR)/%.src: $(FONTCONFIGS_SRC)/$(FONTCONFIGS_SRC_PREFIX)%
 	$(install-file)
@@ -455,9 +533,13 @@
 	$(call chmod-file, 444)
 	@$(java-vm-cleanup)
 
+ifneq ("x$(_FONTCONFIGS)", "x")
 fontconfigs.clean :
 	$(RM) $(FONTCONFIGS)
 	$(RM) $(BINARYFONTCONFIGS)
+else
+fontconfigs.clean :
+endif
 
 ifeq ($(PLATFORM), windows)
 # vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv WINDOWS
@@ -565,5 +647,5 @@
 		  java.lang.Integer \
 		  java.lang.ThreadGroup
 
-.PHONY: dgalibs dgalib.clean fontconfigs fontconfigs.clean
+.PHONY: dgalibs dgalib.clean fontconfigs fontconfigs.clean generated.clean
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/make/sun/awt/ToBin.java	Thu Jul 25 11:09:28 2013 -0400
@@ -0,0 +1,59 @@
+/*
+ * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package sun.awt;
+
+import java.io.*;
+import java.awt.image.*;
+import javax.imageio.*;
+import java.awt.*;
+
+public class ToBin {
+    public static void main(String[] args) throws Exception {
+        BufferedImage im = ImageIO.read(System.in);
+        BufferedImage bi = null;
+        int iconWidth = im.getWidth(null);
+        int iconHeight = im.getHeight(null);
+        if (im != null && iconHeight != 0 &&  iconWidth != 0) {
+            bi = new BufferedImage(iconWidth, iconHeight, BufferedImage.TYPE_INT_ARGB);
+            Graphics g = bi.getGraphics();
+            try {
+                g.drawImage(im, 0, 0, iconWidth, iconHeight, null);
+            } finally {
+                g.dispose();
+            }
+        }
+        DataBuffer srcBuf = bi.getData().getDataBuffer();
+        int[] buf = ((DataBufferInt)srcBuf).getData();
+        System.out.print(iconWidth + ",");
+        System.out.println(iconHeight + ",");
+        for (int i = 0; i < buf.length; i++) {
+            System.out.print("0x" + Integer.toHexString(buf[i]) + ", ");
+            if (i % 10 == 0) {
+                System.out.println();
+            }
+        }
+    }
+}
--- a/make/sun/font/Makefile	Thu Jul 25 10:58:00 2013 -0400
+++ b/make/sun/font/Makefile	Thu Jul 25 11:09:28 2013 -0400
@@ -36,7 +36,11 @@
 CPLUSPLUSLIBRARY=true
 
 # Use higher optimization level
+ifeq ($(PLATFORM), windows)
+OPTIMIZATION_LEVEL = HIGHEST
+else
 OPTIMIZATION_LEVEL = HIGHER
+endif
 
 include $(BUILDDIR)/common/Defs.gmk
 
--- a/make/sun/lwawt/FILES_export_macosx.gmk	Thu Jul 25 10:58:00 2013 -0400
+++ b/make/sun/lwawt/FILES_export_macosx.gmk	Thu Jul 25 11:09:28 2013 -0400
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -109,6 +109,7 @@
         sun/lwawt/LWToolkit.java \
         sun/lwawt/LWWindowPeer.java \
         sun/lwawt/PlatformWindow.java \
+        sun/lwawt/SecurityWarningWindow.java \
         sun/lwawt/SelectionClearListener.java \
         sun/lwawt/macosx/CPrinterDevice.java \
         sun/lwawt/macosx/CPrinterDialog.java \
@@ -143,6 +144,7 @@
         sun/lwawt/macosx/CMouseInfoPeer.java \
         sun/lwawt/macosx/CPlatformView.java \
         sun/lwawt/macosx/CPlatformWindow.java \
+        sun/lwawt/macosx/CWarningWindow.java \
         sun/lwawt/macosx/CPlatformComponent.java \
         sun/lwawt/macosx/CEmbeddedFrame.java \
         sun/lwawt/macosx/CPlatformEmbeddedFrame.java \
--- a/make/sun/security/pkcs11/mapfile-vers	Thu Jul 25 10:58:00 2013 -0400
+++ b/make/sun/security/pkcs11/mapfile-vers	Thu Jul 25 11:09:28 2013 -0400
@@ -102,7 +102,7 @@
 		Java_sun_security_pkcs11_Secmod_nssGetLibraryHandle;
 		Java_sun_security_pkcs11_Secmod_nssLoadLibrary;
 		Java_sun_security_pkcs11_Secmod_nssVersionCheck;
-		Java_sun_security_pkcs11_Secmod_nssInit;
+		Java_sun_security_pkcs11_Secmod_nssInitialize;
 		Java_sun_security_pkcs11_Secmod_nssGetModuleList;
 
 	local:
--- a/make/sun/xawt/Makefile	Thu Jul 25 10:58:00 2013 -0400
+++ b/make/sun/xawt/Makefile	Thu Jul 25 11:09:28 2013 -0400
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -32,7 +32,7 @@
 
 GEN_DIR=$(GENSRCDIR)/sun/awt/X11
 
-CLASSES_INIT += $(TEMPDIR)/.gen.wrappers $(TEMPDIR)/.gen_icons touch.wrappers
+CLASSES_INIT += $(TEMPDIR)/.gen.wrappers touch.wrappers
 
 .PHONY: generated.clean
 
@@ -317,70 +317,7 @@
 	$(RM) -r $(WRAPPER_GENERATOR_TEMPDIR)
 	$(RM) -r $(WRAPPER_GENERATOR_DIR)
 	$(RM) -r $(GEN_DIR)/*.java
-	$(RM) -r $(TEMPDIR)/.gen_icons
 
-ifdef OPENJDK
-    ICONS_PATH_PREFIX=$(PLATFORM_SRC)
-else
-    ICONS_PATH_PREFIX=$(CLOSED_SRC)/solaris
-endif
-
-ICONS = \
-    $(ICONS_PATH_PREFIX)/classes/sun/awt/X11/java-icon16.png \
-    $(ICONS_PATH_PREFIX)/classes/sun/awt/X11/java-icon24.png \
-    $(ICONS_PATH_PREFIX)/classes/sun/awt/X11/java-icon32.png \
-    $(ICONS_PATH_PREFIX)/classes/sun/awt/X11/java-icon48.png
-
-
-ICONPATH=$(PLATFORM_SRC)/classes/sun/awt/X11
-
-ICONS += \
-   $(ICONPATH)/security-icon-bw16.png \
-   $(ICONPATH)/security-icon-interim16.png \
-   $(ICONPATH)/security-icon-yellow16.png \
-   $(ICONPATH)/security-icon-bw24.png \
-   $(ICONPATH)/security-icon-interim24.png \
-   $(ICONPATH)/security-icon-yellow24.png \
-   $(ICONPATH)/security-icon-bw32.png \
-   $(ICONPATH)/security-icon-interim32.png \
-   $(ICONPATH)/security-icon-yellow32.png \
-   $(ICONPATH)/security-icon-bw48.png \
-   $(ICONPATH)/security-icon-interim48.png \
-   $(ICONPATH)/security-icon-yellow48.png
-
-TEMPDIR_CLASSES = $(TEMPDIR)/classes
-
-$(TEMPDIR_CLASSES)/sun/awt/X11/ToBin.class: ToBin.java
-	@$(prep-target)
-	$(BOOT_JAVAC_CMD) -d $(TEMPDIR_CLASSES) $<
-
-$(TEMPDIR)/.gen_icons: $(TEMPDIR_CLASSES)/sun/awt/X11/ToBin.class $(ICONS)
-	$(prep-target)
-	for i in $(ICONS); do \
-            filename=`basename $$i`; \
-	    name=`$(ECHO) $$filename | $(TR) '\-.' '__'`;  \
-            classname=$(GEN_DIR)/XAWTIcon32_$$name.java; \
-	    $(RM) $$classname; \
-	    $(ECHO) "package sun.awt.X11;" >> $$classname ; \
-	    $(ECHO) "public class XAWTIcon32_$$name {" >> $$classname; \
-	    $(ECHO) "public static int[] $$name = { " >> $$classname;  \
-	    $(CAT) $$i | \
-	      $(BOOT_JAVA_CMD) -cp $(TEMPDIR_CLASSES)  \
-		-Djava.awt.headless=true \
-		sun.awt.X11.ToBin >> $$classname; \
-	    $(ECHO) "}; }" >> $$classname;  \
-            classname=$(GEN_DIR)/XAWTIcon64_$$name.java; \
-	    $(RM) $$classname; \
-	    $(ECHO) "package sun.awt.X11;" >> $$classname ; \
-	    $(ECHO) "public class XAWTIcon64_$$name {" >> $$classname; \
-	    $(ECHO) "public static long[] $$name = { " >> $$classname;  \
-	    $(CAT) $$i | \
-	      $(BOOT_JAVA_CMD) -cp $(TEMPDIR_CLASSES)  \
-		-Djava.awt.headless=true \
-		sun.awt.X11.ToBin >> $$classname; \
-	    $(ECHO) "}; }" >> $$classname;  \
-	done
-	$(TOUCH) $@
 
 clean clobber:: generated.clean
 
--- a/make/sun/xawt/ToBin.java	Thu Jul 25 10:58:00 2013 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,59 +0,0 @@
-/*
- * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package sun.awt.X11;
-
-import java.io.*;
-import java.awt.image.*;
-import javax.imageio.*;
-import java.awt.*;
-
-public class ToBin {
-    public static void main(String[] args) throws Exception {
-        BufferedImage im = ImageIO.read(System.in);
-        BufferedImage bi = null;
-        int iconWidth = im.getWidth(null);
-        int iconHeight = im.getHeight(null);
-        if (im != null && iconHeight != 0 &&  iconWidth != 0) {
-            bi = new BufferedImage(iconWidth, iconHeight, BufferedImage.TYPE_INT_ARGB);
-            Graphics g = bi.getGraphics();
-            try {
-                g.drawImage(im, 0, 0, iconWidth, iconHeight, null);
-            } finally {
-                g.dispose();
-            }
-        }
-        DataBuffer srcBuf = bi.getData().getDataBuffer();
-        int[] buf = ((DataBufferInt)srcBuf).getData();
-        System.out.print(iconWidth + ",");
-        System.out.println(iconHeight + ",");
-        for (int i = 0; i < buf.length; i++) {
-            System.out.print("0x" + Integer.toHexString(buf[i]) + ", ");
-            if (i % 10 == 0) {
-                System.out.println();
-            }
-        }
-    }
-}
--- a/makefiles/CompileLaunchers.gmk	Thu Jul 25 10:58:00 2013 -0400
+++ b/makefiles/CompileLaunchers.gmk	Thu Jul 25 11:09:28 2013 -0400
@@ -95,6 +95,9 @@
         $1_PLIST_FILE:=Info-cmdline.plist
         ifneq ($(11),)
             $1_PLIST_FILE:=$(11)
+            ifneq ($$(findstring privileged,$$($1_PLIST_FILE)),)
+                $1_CODESIGN:=true
+            endif
         endif
 
         $1_LDFLAGS += -Wl,-all_load $(JDK_OUTPUTDIR)/objs/libjli_static.a \
@@ -174,7 +177,8 @@
 		  -D "JDK_INTERNAL_NAME=$1" \
 		  -D "JDK_FTYPE=0x1L" \
 		  $7,\
-	MANIFEST:=$(JDK_TOPDIR)/src/windows/resource/java.manifest)
+	MANIFEST:=$(JDK_TOPDIR)/src/windows/resource/java.manifest,\
+	CODESIGN:=$$($1_CODESIGN))
 
     BUILD_LAUNCHERS += $$(BUILD_LAUNCHER_$1)
 
--- a/makefiles/CompileNativeLibraries.gmk	Thu Jul 25 10:58:00 2013 -0400
+++ b/makefiles/CompileNativeLibraries.gmk	Thu Jul 25 11:09:28 2013 -0400
@@ -1143,7 +1143,7 @@
 			  -D "JDK_INTERNAL_NAME=jdwp" \
 			  -D "JDK_FTYPE=0x2L",\
 		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libjdwp,\
-		DEBUG_SYMBOLS:=$(DEBUG_ALL_BINARIES)))
+		DEBUG_SYMBOLS:=true))
 
 $(BUILD_LIBJDWP) : $(BUILD_LIBJAVA)
 
@@ -1332,7 +1332,7 @@
 ifeq ($(OPENJDK_TARGET_OS),windows)
     LIBFONTMANAGER_EXCLUDE_FILES += X11FontScaler.c \
 				    X11TextRenderer.c
-    LIBFONTMANAGER_OPTIMIZATION:=LOW
+LIBFONTMANAGER_OPTIMIZATION:=HIGHEST
 else
     LIBFONTMANAGER_EXCLUDE_FILES += fontpath.c \
 				    lcdglyph.c
@@ -2055,7 +2055,7 @@
 
 ifeq ($(OPENJDK_TARGET_OS), windows)
 	BUILD_LIBJLI_FILES += java_md.c \
-			      cmdtoargs.c
+			      cmdtoargs.c	
         # Staticically link with c runtime on windows.
 	LIBJLI_CFLAGS:=$(filter-out -MD,$(LIBJLI_CFLAGS))
 else ifneq ($(OPENJDK_TARGET_OS), macosx)
@@ -2609,21 +2609,22 @@
 
 ##########################################################################################
 
-BUILD_LIBKRB5_NAME:=
-ifeq ($(OPENJDK_TARGET_OS), windows)
+ifneq ($(BUILD_CRYPTO),no)
+  BUILD_LIBKRB5_NAME:=
+  ifeq ($(OPENJDK_TARGET_OS), windows)
      BUILD_LIBKRB5_NAME:=w2k_lsa_auth
      BUILD_LIBKRB5_SRC:=$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/security/krb5
      BUILD_LIBKRB5_LIBS:=advapi32.lib Secur32.lib netapi32.lib kernel32.lib user32.lib \
 			 gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib \
 			 ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib
-else ifeq ($(OPENJDK_TARGET_OS), macosx)
+  else ifeq ($(OPENJDK_TARGET_OS), macosx)
      BUILD_LIBKRB5_NAME:=osxkrb5
      BUILD_LIBKRB5_SRC:=$(JDK_TOPDIR)/src/share/native/sun/security/krb5
      BUILD_LIBKRB5_LIBS:=-framework Kerberos
-endif
-
-ifneq ($(BUILD_LIBKRB5_NAME),)
-$(eval $(call SetupNativeCompilation,BUILD_LIBKRB5,\
+  endif
+
+  ifneq ($(BUILD_LIBKRB5_NAME),)
+    $(eval $(call SetupNativeCompilation,BUILD_LIBKRB5,\
 		LIBRARY:=$(BUILD_LIBKRB5_NAME),\
                 OUTPUT_DIR:=$(INSTALL_LIBRARIES_HERE),\
 		SRC:=$(BUILD_LIBKRB5_SRC),\
@@ -2643,7 +2644,8 @@
 		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libkrb5,\
 		DEBUG_SYMBOLS:=$(DEBUG_ALL_BINARIES)))
 
-BUILD_LIBRARIES += $(BUILD_LIBKRB5)
+    BUILD_LIBRARIES += $(BUILD_LIBKRB5)
+  endif
 endif
 
 ##########################################################################################
@@ -2914,7 +2916,7 @@
 				PLATFORM_API_LinuxOS_ALSA_Ports.c,\
 		LANG:=C,\
 		OPTIMIZATION:=LOW, \
-		CFLAGS:=$(CFLAGS_JDKLIB) \
+		CFLAGS:=$(CFLAGS_JDKLIB) $(ALSA_CFLAGS) \
 			$(LIBJSOUND_CFLAGS) \
 			-DUSE_DAUDIO=TRUE \
 			-DUSE_PORTS=TRUE  \
@@ -2923,7 +2925,7 @@
 		MAPFILE:=$(JDK_TOPDIR)/makefiles/mapfiles/libjsoundalsa/mapfile-vers, \
 		LDFLAGS:=$(LDFLAGS_JDKLIB)\
 			 $(call SET_SHARED_LIBRARY_ORIGIN),\
-		LDFLAGS_SUFFIX:=-lasound -ljava -ljvm,\
+		LDFLAGS_SUFFIX:=$(ALSA_LIBS) -ljava -ljvm,\
 		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libjsoundalsa,\
 		DEBUG_SYMBOLS:=$(DEBUG_ALL_BINARIES)))
 
--- a/makefiles/CopyFiles.gmk	Thu Jul 25 10:58:00 2013 -0400
+++ b/makefiles/CopyFiles.gmk	Thu Jul 25 11:09:28 2013 -0400
@@ -200,7 +200,7 @@
 
 ifdef OPENJDK
     ICCPROFILE_SRC_DIR := $(JDK_TOPDIR)/src/share/lib/cmm/lcms
-else 
+else
     ICCPROFILE_SRC_DIR := $(JDK_TOPDIR)/src/closed/share/lib/cmm/kcms
 endif
 
@@ -217,29 +217,29 @@
 
 #make sure freetype dll will be available at runtime as well as link time
 #
-#NB: Default freetype build system uses -h linker option and 
-#   result .so contains hardcoded library name that is later 
-#   used for adding dependencies to other objects 
+#NB: Default freetype build system uses -h linker option and
+#   result .so contains hardcoded library name that is later
+#   used for adding dependencies to other objects
 #   (e.g. libfontmanager.so).
-#   
+#
 #   It is not obvious how to extract that hardcoded name (libfreetype.so.6)
 #   without overcomplicating logic here.
 #   To workaround this we hardcode .6 suffix for now.
 #
 #   Note that .so.6 library will not be found by System.loadLibrary()
-#        but fortunately we need to load FreeType library explicitly 
-#        on windows only  
+#        but fortunately we need to load FreeType library explicitly
+#        on windows only
 #
 #TODO: rework this to avoid hardcoding library name in the makefile
 #
 ifdef OPENJDK
     ifeq ($(OPENJDK_TARGET_OS), windows)
         FREETYPE_LIB = $(JDK_OUTPUTDIR)/bin/$(call SHARED_LIBRARY,freetype)
-    else 
+    else
         ifeq ($(USING_SYSTEM_FT_LIB), false)
             FREETYPE_LIB = $(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR)/$(call SHARED_LIBRARY,freetype).6
         endif
-    endif 
+    endif
 
     $(FREETYPE_LIB): $(FREETYPE2_LIB_PATH)/$(call SHARED_LIBRARY,freetype)
 	$(CP) $(FREETYPE2_LIB_PATH)/$(call SHARED_LIBRARY,freetype) $@
@@ -537,3 +537,5 @@
 COPY_FILES += $(JDK_OUTPUTDIR)/lib/sound.properties
 
 ##########################################################################################
+
+-include $(CUSTOM_MAKE_DIR)/CopyFiles.gmk
--- a/makefiles/CopyIntoClasses.gmk	Thu Jul 25 10:58:00 2013 -0400
+++ b/makefiles/CopyIntoClasses.gmk	Thu Jul 25 11:09:28 2013 -0400
@@ -42,7 +42,7 @@
   $(JSTAT_RESOURCEDIR)/jstat_options \
   $(JSTAT_RESOURCEDIR)/jstat_unsupported_options
 
-# Extra jhat files 
+# Extra jhat files
 JHAT_RESOURCEDIR = $(JDK_TOPDIR)/src/share/classes/com/sun/tools/hat/resources
 COPY_FILES += \
   $(JHAT_RESOURCEDIR)/hat.js \
@@ -53,7 +53,7 @@
 JRUNSCRIPT_RESOURCEDIR = $(JDK_TOPDIR)/src/share/classes/com/sun/tools/script/shell
 COPY_FILES += \
   $(JRUNSCRIPT_RESOURCEDIR)/init.js \
-  $(JRUNSCRIPT_RESOURCEDIR)/messages.properties 
+  $(JRUNSCRIPT_RESOURCEDIR)/messages.properties
 
 # Extra jvmstat files
 COPY_FILES += \
@@ -91,6 +91,12 @@
     $(SWING_PLAF_WINDOWS_RESOURCES_DIR_CLOSED)/icons/JavaCup32.png
 endif
 
+ifndef OPENJDK
+  JFR_CONFIGURATION_DIR_CLOSED = $(JDK_TOPDIR)/src/closed/share/classes/oracle/jrockit/jfr/settings
+  COPY_FILES += \
+    $(JFR_CONFIGURATION_DIR_CLOSED)/jfc.xsd
+endif
+
 SWING_PLAF_BASIC_RESOURCES_DIR = $(JDK_TOPDIR)/src/share/classes/javax/swing/plaf/basic
 COPY_FILES += \
   $(wildcard $(SWING_PLAF_BASIC_RESOURCES_DIR)/icons/*.png)
@@ -154,7 +160,7 @@
 # Copy the META-INF/services configuration files that are scattered around the source tree
 # into classes/META-INF/services. Be aware that META-INF directories that are located at a
 # source root (.../classes/META-INF) are automatically copied verbatim by the
-# SetupJavaCompilation macro. 
+# SetupJavaCompilation macro.
 #
 # Any other META-INF/services configuration file is found here and platform specific comments
 # are uncommented and the configuration file is stored in the output META-INF directory.
@@ -207,7 +213,7 @@
 # Eval the newly created rules to incorporate them into the make tree.
 define addto_meta-inf_services
 $1
-	echo $(LOG_INFO) Installing META-INF/services/$$(@F) 
+	echo $(LOG_INFO) Installing META-INF/services/$$(@F)
 	$(CAT) $$< | $(SED) -e "s/^#\[$(OPENJDK_TARGET_OS)\]//" > $$@
 endef
 $(foreach i,$(META-INF_RULES_SERVICES),$(eval $(call addto_meta-inf_services,$i)))
--- a/makefiles/CreateJars.gmk	Thu Jul 25 10:58:00 2013 -0400
+++ b/makefiles/CreateJars.gmk	Thu Jul 25 11:09:28 2013 -0400
@@ -132,7 +132,7 @@
 ##########################################################################################
 
 # Full JRE exclude list for rt.jar and resources.jar
-# This value should exclude types destined for jars other than rt.jar and resources.jar. 
+# This value should exclude types destined for jars other than rt.jar and resources.jar.
 # When building a Profile this value augments the profile specific exclusions
 RT_JAR_EXCLUDES += \
 	com/oracle/security \
@@ -246,7 +246,8 @@
 	sun/util/resources/cldr \
 	$(LOCALEDATA_INCLUDES) \
 	com/oracle/jrockit/jfr \
-	oracle/jrockit/jfr
+	oracle/jrockit/jfr \
+	jdk/jfr
 
 ifeq ($(OPENJDK_TARGET_OS), macosx)
         RT_JAR_EXCLUDES += com/sun/nio/sctp \
@@ -337,7 +338,7 @@
 
 
 # Support for removing the addPropertyChangeListener and removePropertyChangeListener
-# methods from classes that only go into the profile builds. 
+# methods from classes that only go into the profile builds.
 BEANLESS_CLASSES = $(IMAGES_OUTPUTDIR)/beanless
 
 # When there are $ characters in filenames we have some very subtle interactions between
@@ -352,7 +353,7 @@
     java/util/jar/Pack200\$$Packer.class \
     java/util/jar/Pack200\$$Unpacker.class \
     com/sun/java/util/jar/pack/PackerImpl.class \
-    com/sun/java/util/jar/pack/UnpackerImpl.class 
+    com/sun/java/util/jar/pack/UnpackerImpl.class
 
 ifneq ($(PROFILE),)
     BEANLESS_CLASSES_TARGETS := $(addprefix $(BEANLESS_CLASSES)/, $(CLASSES_TO_DEBEAN))
@@ -426,8 +427,10 @@
 ifeq ($(ENABLE_JFR), true)
     $(eval $(call SetupArchive,BUILD_JFR_JAR,,\
 		SRCS:=$(JDK_OUTPUTDIR)/classes,\
+		SUFFIXES:=.class .jfc .xsd,\
 		INCLUDES:=com/oracle/jrockit/jfr \
-			  oracle/jrockit/jfr,\
+			  oracle/jrockit/jfr \
+			  jdk/jfr,\
 		JAR:=$(IMAGES_OUTPUTDIR)/lib/jfr.jar,\
 		SKIP_METAINF:=true,\
 		MANIFEST:=$(MAINMANIFEST), \
@@ -467,10 +470,15 @@
 	$(MV) $@.tmp $@
 
 ##########################################################################################
-# For all security jars, always build the jar, but for closed, install the prebuilt signed
-# version instead of the newly built jar. Unsigned jars are treated as intermediate targets
-# and explicitly added to the JARS list. For open, signing is not needed. See SignJars.gmk
-# for more information.
+# For security and crypto jars, always build the jar, but for closed, install the prebuilt
+# signed version instead of the newly built jar. Unsigned jars are treated as intermediate
+# targets and explicitly added to the JARS list. For open, signing is not needed. See
+# SignJars.gmk for more information.
+#
+# The source for the crypto jars is not available for all licensees. The BUILD_CRYPTO
+# variable is set to no if these jars can't be built to skip that step of the build.
+# Note that for OPENJDK, the build will fail if BUILD_CRYPTO=no since then there is no
+# other way to get the jars than to build them.
 
 SUNPKCS11_JAR_DST := $(IMAGES_OUTPUTDIR)/lib/ext/sunpkcs11.jar
 SUNPKCS11_JAR_UNSIGNED := $(IMAGES_OUTPUTDIR)/unsigned/sunpkcs11.jar
@@ -540,7 +548,8 @@
 SUNJCE_PROVIDER_JAR_DST := $(IMAGES_OUTPUTDIR)/lib/ext/sunjce_provider.jar
 SUNJCE_PROVIDER_JAR_UNSIGNED := $(IMAGES_OUTPUTDIR)/unsigned/sunjce_provider.jar
 
-$(eval $(call SetupArchive,BUILD_SUNJCE_PROVIDER_JAR,,\
+ifneq ($(BUILD_CRYPTO),no)
+  $(eval $(call SetupArchive,BUILD_SUNJCE_PROVIDER_JAR,,\
 		SRCS:=$(JDK_OUTPUTDIR)/classes, \
 		SUFFIXES:=.class,\
 		INCLUDES:= com/sun/crypto/provider,\
@@ -548,7 +557,10 @@
                 MANIFEST:=$(JCE_MANIFEST), \
 		SKIP_METAINF := true))
 
-$(SUNJCE_PROVIDER_JAR_UNSIGNED): $(JCE_MANIFEST)
+  $(SUNJCE_PROVIDER_JAR_UNSIGNED): $(JCE_MANIFEST)
+
+  JARS += $(SUNJCE_PROVIDER_JAR_UNSIGNED)
+endif
 
 ifndef OPENJDK
     SUNJCE_PROVIDER_JAR_SRC := $(JDK_TOPDIR)/make/closed/tools/crypto/jce/sunjce_provider.jar
@@ -560,14 +572,13 @@
 	$(install-file)
 endif
 
-JARS += $(SUNJCE_PROVIDER_JAR_UNSIGNED)
-
 ##########################################################################################
 
 JCE_JAR_DST := $(IMAGES_OUTPUTDIR)/lib/jce.jar
 JCE_JAR_UNSIGNED := $(IMAGES_OUTPUTDIR)/unsigned/jce.jar
 
-$(eval $(call SetupArchive,BUILD_JCE_JAR,,\
+ifneq ($(BUILD_CRYPTO),no)
+  $(eval $(call SetupArchive,BUILD_JCE_JAR,,\
 		SRCS:=$(JDK_OUTPUTDIR)/classes, \
 		SUFFIXES:=.class,\
 		INCLUDES:= javax/crypto sun/security/internal,\
@@ -575,101 +586,106 @@
                 MANIFEST:=$(JCE_MANIFEST), \
 		SKIP_METAINF := true))
 
-$(JCE_JAR_UNSIGNED): $(JCE_MANIFEST)
+  $(JCE_JAR_UNSIGNED): $(JCE_MANIFEST)
+
+  JARS +=  $(JCE_JAR_UNSIGNED)
+endif
 
 ifndef OPENJDK
-    JCE_JAR_SRC := $(JDK_TOPDIR)/make/closed/tools/crypto/jce/jce.jar
-    $(JCE_JAR_DST) : $(JCE_JAR_SRC)
+  JCE_JAR_SRC := $(JDK_TOPDIR)/make/closed/tools/crypto/jce/jce.jar
+  $(JCE_JAR_DST) : $(JCE_JAR_SRC)
 	@$(ECHO) $(LOG_INFO) "\n>>>Installing prebuilt jce.jar..."
 	$(install-file)
 else
-    $(JCE_JAR_DST) : $(JCE_JAR_UNSIGNED)
+  $(JCE_JAR_DST) : $(JCE_JAR_UNSIGNED)
 	$(install-file)
 endif
 
-JARS +=  $(JCE_JAR_UNSIGNED)
-
 ##########################################################################################
 
 US_EXPORT_POLICY_JAR_DST := $(IMAGES_OUTPUTDIR)/lib/security/US_export_policy.jar
 US_EXPORT_POLICY_JAR_UNSIGNED := $(IMAGES_OUTPUTDIR)/unsigned/US_export_policy.jar
 
-#
-# TODO fix so that SetupArchive does not write files into SRCS
-#   then we don't need this extra copying
-#
-# NOTE:  We currently do not place restrictions on our limited export
-# policy.  This was not a typo.
-#
-US_EXPORT_POLICY_JAR_SRC_DIR := $(JDK_TOPDIR)/make/javax/crypto/policy/unlimited
-US_EXPORT_POLICY_JAR_TMP := $(IMAGES_OUTPUTDIR)/US_export_policy_jar.tmp
+ifneq ($(BUILD_CRYPTO),no)
+  #
+  # TODO fix so that SetupArchive does not write files into SRCS
+  #   then we don't need this extra copying
 
-$(US_EXPORT_POLICY_JAR_TMP)/% : $(US_EXPORT_POLICY_JAR_SRC_DIR)/%
+  # NOTE:  We currently do not place restrictions on our limited export
+  # policy.  This was not a typo.
+  #
+  US_EXPORT_POLICY_JAR_SRC_DIR := $(JDK_TOPDIR)/make/javax/crypto/policy/unlimited
+  US_EXPORT_POLICY_JAR_TMP := $(IMAGES_OUTPUTDIR)/US_export_policy_jar.tmp
+
+  $(US_EXPORT_POLICY_JAR_TMP)/% : $(US_EXPORT_POLICY_JAR_SRC_DIR)/%
 	$(install-file)
 
-US_EXPORT_POLICY_JAR_DEPS := $(US_EXPORT_POLICY_JAR_TMP)/default_US_export.policy
+  US_EXPORT_POLICY_JAR_DEPS := $(US_EXPORT_POLICY_JAR_TMP)/default_US_export.policy
 
-$(eval $(call SetupArchive,BUILD_US_EXPORT_POLICY_JAR,$(US_EXPORT_POLICY_JAR_DEPS),\
+  $(eval $(call SetupArchive,BUILD_US_EXPORT_POLICY_JAR,$(US_EXPORT_POLICY_JAR_DEPS),\
 		SRCS:=$(US_EXPORT_POLICY_JAR_TMP), \
 		SUFFIXES:= .policy,\
 		JAR:=$(US_EXPORT_POLICY_JAR_UNSIGNED), \
 		EXTRA_MANIFEST_ATTR := Crypto-Strength: unlimited, \
 		SKIP_METAINF := true))
 
+  JARS += $(US_EXPORT_POLICY_JAR_UNSIGNED)
+endif
+
 ifndef OPENJDK
-    $(US_EXPORT_POLICY_JAR_DST): $(JDK_TOPDIR)/make/closed/tools/crypto/jce/US_export_policy.jar
+  $(US_EXPORT_POLICY_JAR_DST): $(JDK_TOPDIR)/make/closed/tools/crypto/jce/US_export_policy.jar
 	$(ECHO) $(LOG_INFO) Copying $(@F)
 	$(install-file)
 else
-    $(US_EXPORT_POLICY_JAR_DST): $(US_EXPORT_POLICY_JAR_UNSIGNED)
+  $(US_EXPORT_POLICY_JAR_DST): $(US_EXPORT_POLICY_JAR_UNSIGNED)
 	$(install-file)
 endif
 
-JARS += $(US_EXPORT_POLICY_JAR_UNSIGNED)
-
 ##########################################################################################
 
 LOCAL_POLICY_JAR_DST := $(IMAGES_OUTPUTDIR)/lib/security/local_policy.jar
 LOCAL_POLICY_JAR_UNSIGNED := $(IMAGES_OUTPUTDIR)/unsigned/local_policy.jar
 
-#
-# TODO fix so that SetupArchive does not write files into SRCS
-#   then we don't need this extra copying
-#
-LOCAL_POLICY_JAR_TMP := $(IMAGES_OUTPUTDIR)/local_policy_jar.tmp
+ifneq ($(BUILD_CRYPTO),no)
+  #
+  # TODO fix so that SetupArchive does not write files into SRCS
+  #   then we don't need this extra copying
+  #
+  LOCAL_POLICY_JAR_TMP := $(IMAGES_OUTPUTDIR)/local_policy_jar.tmp
 
-ifeq ($(UNLIMITED_CRYPTO), true)
+  ifeq ($(UNLIMITED_CRYPTO), true)
     LOCAL_POLICY_JAR_SRC_DIR := $(JDK_TOPDIR)/make/javax/crypto/policy/unlimited
     LOCAL_POLICY_JAR_DEPS := $(LOCAL_POLICY_JAR_TMP)/default_local.policy
     LOCAL_POLICY_JAR_ATTR := Crypto-Strength: unlimited
-else
+  else
     LOCAL_POLICY_JAR_SRC_DIR := $(JDK_TOPDIR)/make/javax/crypto/policy/limited
     LOCAL_POLICY_JAR_DEPS := $(LOCAL_POLICY_JAR_TMP)/exempt_local.policy \
                              $(LOCAL_POLICY_JAR_TMP)/default_local.policy
     LOCAL_POLICY_JAR_ATTR := Crypto-Strength: limited
-endif
+  endif
 
-$(LOCAL_POLICY_JAR_TMP)/% : $(LOCAL_POLICY_JAR_SRC_DIR)/%
+  $(LOCAL_POLICY_JAR_TMP)/% : $(LOCAL_POLICY_JAR_SRC_DIR)/%
 	$(install-file)
 
-$(eval $(call SetupArchive,BUILD_LOCAL_POLICY_JAR,$(LOCAL_POLICY_JAR_DEPS),\
+  $(eval $(call SetupArchive,BUILD_LOCAL_POLICY_JAR,$(LOCAL_POLICY_JAR_DEPS),\
 		SRCS:=$(LOCAL_POLICY_JAR_TMP),\
 		SUFFIXES:= .policy,\
 		JAR:=$(LOCAL_POLICY_JAR_UNSIGNED), \
 		EXTRA_MANIFEST_ATTR := $(LOCAL_POLICY_JAR_ATTR), \
 		SKIP_METAINF := true))
 
+  JARS += $(LOCAL_POLICY_JAR_UNSIGNED)
+endif
+
 ifndef OPENJDK
-    $(LOCAL_POLICY_JAR_DST): $(JDK_TOPDIR)/make/closed/tools/crypto/jce/local_policy.jar
+  $(LOCAL_POLICY_JAR_DST): $(JDK_TOPDIR)/make/closed/tools/crypto/jce/local_policy.jar
 	$(ECHO) $(LOG_INFO) Copying $(@F)
 	$(install-file)
 else
-    $(LOCAL_POLICY_JAR_DST): $(LOCAL_POLICY_JAR_UNSIGNED)
+  $(LOCAL_POLICY_JAR_DST): $(LOCAL_POLICY_JAR_UNSIGNED)
 	$(install-file)
 endif
 
-JARS += $(LOCAL_POLICY_JAR_UNSIGNED)
-
 ##########################################################################################
 
 ifeq ($(OPENJDK_TARGET_OS),windows)
@@ -724,7 +740,7 @@
 	@$(ECHO) $(LOG_INFO) "\n>>>Installing prebuilt OracleUcrypto provider..."
 	$(install-file)
 
-JARS += $(UCRYPTO_JAR_UNSIGNED) 
+JARS += $(UCRYPTO_JAR_UNSIGNED)
 
 endif
 endif
--- a/makefiles/GendataFontConfig.gmk	Thu Jul 25 10:58:00 2013 -0400
+++ b/makefiles/GendataFontConfig.gmk	Thu Jul 25 11:09:28 2013 -0400
@@ -36,11 +36,9 @@
   ifdef OPENJDK
     GENDATA_FONT_CONFIG_SRC_DIR   := \
         $(JDK_TOPDIR)/src/solaris/classes/sun/awt/fontconfigs
-    GENDATA_FONT_CONFIG_SRC_FILES := \
-	fontconfig.properties \
-	fontconfig.SuSE.properties \
-	fontconfig.Ubuntu.properties \
-	fontconfig.Fedora.properties
+    # This is placeholder for possible fonconfig files which may
+    # useful for some highly specialized Linux distributions 
+    GENDATA_FONT_CONFIG_SRC_FILES := 
   else
     GENDATA_FONT_CONFIG_SRC_DIR   := \
         $(JDK_TOPDIR)/src/closed/solaris/classes/sun/awt/fontconfigs
--- a/makefiles/GenerateJavaSources.gmk	Thu Jul 25 10:58:00 2013 -0400
+++ b/makefiles/GenerateJavaSources.gmk	Thu Jul 25 11:09:28 2013 -0400
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -67,7 +67,7 @@
 
 ifneq ($(OPENJDK_TARGET_OS),windows)
 include GensrcIcons.gmk
-GENSRC += $(GENSRC_X11_ICONS)
+GENSRC += $(GENSRC_AWT_ICONS)
 
 ifeq ($(OPENJDK_TARGET_OS),macosx)
 GENSRC += $(GENSRC_OSX_ICONS)
--- a/makefiles/GensrcIcons.gmk	Thu Jul 25 10:58:00 2013 -0400
+++ b/makefiles/GensrcIcons.gmk	Thu Jul 25 11:09:28 2013 -0400
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -23,10 +23,10 @@
 # questions.
 #
 
-GENSRC_X11_ICONS :=
-GENSRC_X11_ICONS_SRC :=
-GENSRC_X11_ICONS_TMP := $(JDK_OUTPUTDIR)/gensrc
-GENSRC_X11_ICONS_DST := $(GENSRC_X11_ICONS_TMP)/sun/awt/X11
+GENSRC_AWT_ICONS :=
+GENSRC_AWT_ICONS_SRC :=
+GENSRC_AWT_ICONS_TMP := $(JDK_OUTPUTDIR)/gensrc
+GENSRC_AWT_ICONS_DST := $(GENSRC_AWT_ICONS_TMP)/sun/awt/
 
 ifdef OPENJDK
   X11_ICONS_PATH_PREFIX := $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)
@@ -34,76 +34,76 @@
   X11_ICONS_PATH_PREFIX := $(JDK_TOPDIR)/src/closed/solaris
 endif
 
-GENSRC_X11_ICONS_SRC += \
+GENSRC_AWT_ICONS_SRC += \
     $(X11_ICONS_PATH_PREFIX)/classes/sun/awt/X11/java-icon16.png \
     $(X11_ICONS_PATH_PREFIX)/classes/sun/awt/X11/java-icon24.png \
     $(X11_ICONS_PATH_PREFIX)/classes/sun/awt/X11/java-icon32.png \
     $(X11_ICONS_PATH_PREFIX)/classes/sun/awt/X11/java-icon48.png
 
 
-X11_ICONPATH := $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/classes/sun/awt/X11
+AWT_ICONPATH := $(JDK_TOPDIR)/src/share/classes/sun/awt/resources
 
-GENSRC_X11_ICONS_SRC += \
-   $(X11_ICONPATH)/security-icon-bw16.png \
-   $(X11_ICONPATH)/security-icon-interim16.png \
-   $(X11_ICONPATH)/security-icon-yellow16.png \
-   $(X11_ICONPATH)/security-icon-bw24.png \
-   $(X11_ICONPATH)/security-icon-interim24.png \
-   $(X11_ICONPATH)/security-icon-yellow24.png \
-   $(X11_ICONPATH)/security-icon-bw32.png \
-   $(X11_ICONPATH)/security-icon-interim32.png \
-   $(X11_ICONPATH)/security-icon-yellow32.png \
-   $(X11_ICONPATH)/security-icon-bw48.png \
-   $(X11_ICONPATH)/security-icon-interim48.png \
-   $(X11_ICONPATH)/security-icon-yellow48.png
+GENSRC_AWT_ICONS_SRC += \
+   $(AWT_ICONPATH)/security-icon-bw16.png \
+   $(AWT_ICONPATH)/security-icon-interim16.png \
+   $(AWT_ICONPATH)/security-icon-yellow16.png \
+   $(AWT_ICONPATH)/security-icon-bw24.png \
+   $(AWT_ICONPATH)/security-icon-interim24.png \
+   $(AWT_ICONPATH)/security-icon-yellow24.png \
+   $(AWT_ICONPATH)/security-icon-bw32.png \
+   $(AWT_ICONPATH)/security-icon-interim32.png \
+   $(AWT_ICONPATH)/security-icon-yellow32.png \
+   $(AWT_ICONPATH)/security-icon-bw48.png \
+   $(AWT_ICONPATH)/security-icon-interim48.png \
+   $(AWT_ICONPATH)/security-icon-yellow48.png
 
-GENSRC_X11_ICONS_FILES := $(notdir $(GENSRC_X11_ICONS_SRC))
+GENSRC_AWT_ICONS_FILES := $(notdir $(GENSRC_AWT_ICONS_SRC))
 
-GENSRC_X11_ICONS_SHORT_NAME = $(subst .,_,$(subst -,_,$(1)))
-GENSRC_X11_ICONS_DST_NAME = XAWTIcon$(2)_$(subst .,_,$(subst -,_,$(1)))
+GENSRC_AWT_ICONS_SHORT_NAME = $(subst .,_,$(subst -,_,$(1)))
+GENSRC_AWT_ICONS_DST_NAME = AWTIcon$(2)_$(subst .,_,$(subst -,_,$(1)))
 
 ###
 
-$(GENSRC_X11_ICONS_TMP)/_the.icons.dir :
+$(GENSRC_AWT_ICONS_TMP)/_the.icons.dir :
 	$(ECHO) Generating icon classes
-	$(MKDIR) -p $(GENSRC_X11_ICONS_DST)
+	$(MKDIR) -p $(GENSRC_AWT_ICONS_DST)
 	$(TOUCH) $@
 
 ###
 
-define SetupGensrcX11Icon
+define SetupGensrcAWTIcon
         # param 1 is for src-file
         # param 2 is for src-dir
-	$1_SHORTNAME := $(call GENSRC_X11_ICONS_SHORT_NAME,$1)
-	$1_NAME32 := $(call GENSRC_X11_ICONS_DST_NAME,$1,32)
-	$1_TARGET32 := $(GENSRC_X11_ICONS_DST)/$$($1_NAME32).java
-	$1_NAME64 := $(call GENSRC_X11_ICONS_DST_NAME,$1,64)
-	$1_TARGET64 := $(GENSRC_X11_ICONS_DST)/$$($1_NAME64).java
+	$1_SHORTNAME := $(call GENSRC_AWT_ICONS_SHORT_NAME,$1)
+	$1_NAME32 := $(call GENSRC_AWT_ICONS_DST_NAME,$1,32)
+	$1_TARGET32 := $(GENSRC_AWT_ICONS_DST)/$$($1_NAME32).java
+	$1_NAME64 := $(call GENSRC_AWT_ICONS_DST_NAME,$1,64)
+	$1_TARGET64 := $(GENSRC_AWT_ICONS_DST)/$$($1_NAME64).java
 
-$$($1_TARGET32) : $2/$1 $(GENSRC_X11_ICONS_TMP)/_the.icons.dir
+$$($1_TARGET32) : $2/$1 $(GENSRC_AWT_ICONS_TMP)/_the.icons.dir
 	$(RM) $$@ $$@.tmp
-	$(ECHO) "package sun.awt.X11;" > $$@.tmp
+	$(ECHO) "package sun.awt;" > $$@.tmp
 	$(ECHO) "public class $$($1_NAME32) {" >> $$@.tmp
 	$(ECHO) "public static int[] $$($1_SHORTNAME) = { " >> $$@.tmp
-	$(CAT) $$< | $(TOOL_X11_TOBIN) >> $$@.tmp
+	$(CAT) $$< | $(TOOL_AWT_TOBIN) >> $$@.tmp
 	$(ECHO) "}; }" >> $$@.tmp
 	$(MV) $$@.tmp $$@
 
-GENSRC_X11_ICONS += $$($1_TARGET32)
+GENSRC_AWT_ICONS += $$($1_TARGET32)
 
-$$($1_TARGET64) : $2/$1 $(GENSRC_X11_ICONS_TMP)/_the.icons.dir
+$$($1_TARGET64) : $2/$1 $(GENSRC_AWT_ICONS_TMP)/_the.icons.dir
 	$(RM) $$@ $$@.tmp
-	$(ECHO) "package sun.awt.X11;" > $$@.tmp
+	$(ECHO) "package sun.awt;" > $$@.tmp
 	$(ECHO) "public class $$($1_NAME64) {" >> $$@.tmp
 	$(ECHO) "public static long[] $$($1_SHORTNAME) = { " >> $$@.tmp
-	$(CAT) $$< | $(TOOL_X11_TOBIN) >> $$@.tmp
+	$(CAT) $$< | $(TOOL_AWT_TOBIN) >> $$@.tmp
 	$(ECHO) "}; }" >> $$@.tmp
 	$(MV) $$@.tmp $$@
 
-GENSRC_X11_ICONS += $$($1_TARGET64)
+GENSRC_AWT_ICONS += $$($1_TARGET64)
 endef
 
-$(foreach I,$(GENSRC_X11_ICONS_SRC), $(eval $(call SetupGensrcX11Icon,$(notdir $(I)),$(dir $(I)))))
+$(foreach I,$(GENSRC_AWT_ICONS_SRC), $(eval $(call SetupGensrcAWTIcon,$(notdir $(I)),$(dir $(I)))))
 
 ###
 
--- a/makefiles/Images.gmk	Thu Jul 25 10:58:00 2013 -0400
+++ b/makefiles/Images.gmk	Thu Jul 25 11:09:28 2013 -0400
@@ -50,8 +50,6 @@
 overlay-images: jre-overlay-image jdk-overlay-image
 
 
--include $(CUSTOM_MAKE_DIR)/Images.gmk
-
 
 # Processing license files from source area to image area
 # These will be modified to have the platform specific EOL chars.
@@ -774,3 +772,5 @@
 ################################################################################
 
 .PHONY: default images jre-image jdk-image
+
+-include $(CUSTOM_MAKE_DIR)/Images.gmk
--- a/makefiles/Import.gmk	Thu Jul 25 10:58:00 2013 -0400
+++ b/makefiles/Import.gmk	Thu Jul 25 11:09:28 2013 -0400
@@ -200,6 +200,46 @@
 	$(RM) $(basename $@).debuginfo
 	$(MV) $@.tmp $@
 
-#######
+##########################################################################################
+# Unpack the binary distributions of the crypto classes if they exist.
+SEC_FILES_ZIP:=$(JDK_TOPDIR)/make/tools/crypto/sec-bin.zip
+SEC_FILES_WIN_ZIP:=$(JDK_TOPDIR)/make/tools/crypto/sec-windows-bin.zip
+JGSS_WIN32_FILES_ZIP:=$(JDK_TOPDIR)/make/tools/crypto/jgss-windows-i586-bin.zip
+JGSS_WIN64_FILES_ZIP:=$(JDK_TOPDIR)/make/tools/crypto/jgss-windows-x64-bin.zip
+
+define unzip-sec-file
+	$(ECHO) Unzipping $(<F)
+	$(MKDIR) -p $(@D)
+	$(RM) $@
+	($(CD) $(JDK_OUTPUTDIR) && $(UNZIP) $< > $@.tmp)
+	$(MV) $@.tmp $@
+endef
+
+$(JDK_OUTPUTDIR)/classes/_the.sec-bin.unzipped: $(SEC_FILES_ZIP)
+	$(call unzip-sec-file)
+
+$(JDK_OUTPUTDIR)/classes/_the.sec-windows-bin.unzipped: $(SEC_FILES_WIN_ZIP)
+	$(call unzip-sec-file)
+
+$(JDK_OUTPUTDIR)/classes/_the.jgss-windows-i586-bin.unzipped: $(JGSS_WIN32_FILES_ZIP)
+	$(call unzip-sec-file)
+
+$(JDK_OUTPUTDIR)/classes/_the.jgss-windows-x64-bin.unzipped: $(JGSS_WIN64_FILES_ZIP)
+	$(call unzip-sec-file)
+
+ifneq ($(wildcard $(SEC_FILES_ZIP)),)
+  IMPORT_TARGET_FILES += $(JDK_OUTPUTDIR)/classes/_the.sec-bin.unzipped
+  ifeq ($(OPENJDK_TARGET_OS),windows)
+    IMPORT_TARGET_FILES += $(JDK_OUTPUTDIR)/classes/_the.sec-windows-bin.unzipped
+    ifeq ($(OPENJDK_TARGET_CPU),x86)
+      IMPORT_TARGET_FILES += $(JDK_OUTPUTDIR)/classes/_the.jgss-windows-i586-bin.unzipped
+    endif
+    ifeq ($(OPENJDK_TARGET_CPU),x86_64)
+      IMPORT_TARGET_FILES += $(JDK_OUTPUTDIR)/classes/_the.jgss-windows-x64-bin.unzipped
+    endif
+  endif
+endif
+
+##########################################################################################
 
 all: $(IMPORT_TARGET_FILES)
--- a/makefiles/Setup.gmk	Thu Jul 25 10:58:00 2013 -0400
+++ b/makefiles/Setup.gmk	Thu Jul 25 11:09:28 2013 -0400
@@ -40,7 +40,9 @@
 $(eval $(call SetupJavaCompiler,GENERATE_JDKBYTECODE,\
      JVM:=$(JAVA),\
      JAVAC:=$(NEW_JAVAC),\
-     FLAGS:=-bootclasspath $(JDK_OUTPUTDIR)/classes -source 8 -target 8 -encoding ascii -XDignore.symbol.file=true $(DISABLE_WARNINGS),\
+     FLAGS:=-bootclasspath $(JDK_OUTPUTDIR)/classes -source 8 -target 8 \
+	    -encoding ascii -XDignore.symbol.file=true $(DISABLE_WARNINGS) \
+	    $(GENERATE_JDKBYTECODE_EXTRA_FLAGS),\
      SERVER_DIR:=$(SJAVAC_SERVER_DIR),\
      SERVER_JVM:=$(SJAVAC_SERVER_JAVA)))
 
--- a/makefiles/Tools.gmk	Thu Jul 25 10:58:00 2013 -0400
+++ b/makefiles/Tools.gmk	Thu Jul 25 11:09:28 2013 -0400
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -29,7 +29,7 @@
     $(JDK_TOPDIR)/makefiles/sun))
 
 TOOLS_SRC:=$(JDK_TOPDIR)/make/tools/src \
-           $(JDK_TOPDIR)/makefiles/sun/awt/X11 \
+           $(JDK_TOPDIR)/makefiles/sun/awt/ \
            $(JDK_TOPDIR)/makefiles/sun/osxapp \
            $(JDK_TOPDIR)/make/tools/swing-beans
 
@@ -134,8 +134,8 @@
 TOOL_WRAPPERGENERATOR=$(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
 	WrapperGenerator
 
-TOOL_X11_TOBIN=$(JAVA) -Djava.awt.headless=true -cp $(JDK_OUTPUTDIR)/btclasses \
-	sun.awt.X11.ToBin
+TOOL_AWT_TOBIN=$(JAVA) -Djava.awt.headless=true -cp $(JDK_OUTPUTDIR)/btclasses \
+	sun.awt.ToBin
 
 TOOL_OSX_TOBIN=$(JAVA) -Djava.awt.headless=true -cp $(JDK_OUTPUTDIR)/btclasses \
 	sun.osxapp.ToBin
--- a/makefiles/mapfiles/libj2pkcs11/mapfile-vers	Thu Jul 25 10:58:00 2013 -0400
+++ b/makefiles/mapfiles/libj2pkcs11/mapfile-vers	Thu Jul 25 11:09:28 2013 -0400
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -102,7 +102,7 @@
 		Java_sun_security_pkcs11_Secmod_nssGetLibraryHandle;
 		Java_sun_security_pkcs11_Secmod_nssLoadLibrary;
 		Java_sun_security_pkcs11_Secmod_nssVersionCheck;
-		Java_sun_security_pkcs11_Secmod_nssInit;
+		Java_sun_security_pkcs11_Secmod_nssInitialize;
 		Java_sun_security_pkcs11_Secmod_nssGetModuleList;
 
 	local:
--- a/makefiles/mapfiles/libjfr/mapfile-vers	Thu Jul 25 10:58:00 2013 -0400
+++ b/makefiles/mapfiles/libjfr/mapfile-vers	Thu Jul 25 11:09:28 2013 -0400
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
 # ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
 #
 
@@ -17,7 +17,7 @@
       Java_oracle_jrockit_jfr_VMJFR_addConstPool;
       Java_oracle_jrockit_jfr_VMJFR_removeConstPool;
       Java_oracle_jrockit_jfr_VMJFR_storeConstPool;
-      Java_oracle_jrockit_jfr_VMJFR_classID;
+      Java_oracle_jrockit_jfr_VMJFR_classID0;
       Java_oracle_jrockit_jfr_VMJFR_stackTraceID;
       Java_oracle_jrockit_jfr_VMJFR_threadID;
       Java_oracle_jrockit_jfr_VMJFR_rotate;
@@ -33,7 +33,8 @@
       Java_oracle_jrockit_jfr_VMJFR_setPeriod;
       Java_oracle_jrockit_jfr_VMJFR_getPeriod;
       Java_oracle_jrockit_jfr_VMJFR_descriptors;
-            JNI_OnLoad;
+      Java_oracle_jrockit_jfr_VMJFR_redefineClass0;
+      JNI_OnLoad;
   local:
       *;
 };
--- a/makefiles/mapfiles/libjli/mapfile-vers	Thu Jul 25 10:58:00 2013 -0400
+++ b/makefiles/mapfiles/libjli/mapfile-vers	Thu Jul 25 11:09:28 2013 -0400
@@ -36,6 +36,7 @@
 		JLI_ReportExceptionDescription;
 		JLI_GetStdArgs;
 		JLI_GetStdArgc;
+		
 	local:
 		*;
 };
--- a/makefiles/mapfiles/libnio/mapfile-linux	Thu Jul 25 10:58:00 2013 -0400
+++ b/makefiles/mapfiles/libnio/mapfile-linux	Thu Jul 25 11:09:28 2013 -0400
@@ -117,6 +117,7 @@
 		Java_sun_nio_ch_Net_getInterface6;
 		Java_sun_nio_ch_Net_shutdown;
 		Java_sun_nio_ch_Net_poll;
+                Java_sun_nio_ch_Net_isExclusiveBindAvailable;
                 Java_sun_nio_ch_PollArrayWrapper_interrupt;
                 Java_sun_nio_ch_PollArrayWrapper_poll0;
                 Java_sun_nio_ch_ServerSocketChannelImpl_accept0;
--- a/makefiles/mapfiles/libnio/mapfile-macosx	Thu Jul 25 10:58:00 2013 -0400
+++ b/makefiles/mapfiles/libnio/mapfile-macosx	Thu Jul 25 11:09:28 2013 -0400
@@ -109,6 +109,7 @@
 		Java_sun_nio_ch_Net_getInterface6;
 		Java_sun_nio_ch_Net_shutdown;
 		Java_sun_nio_ch_Net_poll;
+                Java_sun_nio_ch_Net_isExclusiveBindAvailable;
                 Java_sun_nio_ch_PollArrayWrapper_interrupt;
                 Java_sun_nio_ch_PollArrayWrapper_poll0;
                 Java_sun_nio_ch_ServerSocketChannelImpl_accept0;
--- a/makefiles/mapfiles/libnio/mapfile-solaris	Thu Jul 25 10:58:00 2013 -0400
+++ b/makefiles/mapfiles/libnio/mapfile-solaris	Thu Jul 25 11:09:28 2013 -0400
@@ -105,6 +105,7 @@
 		Java_sun_nio_ch_Net_getInterface6;
 		Java_sun_nio_ch_Net_shutdown;
 		Java_sun_nio_ch_Net_poll;
+                Java_sun_nio_ch_Net_isExclusiveBindAvailable;
                 Java_sun_nio_ch_PollArrayWrapper_interrupt;
                 Java_sun_nio_ch_PollArrayWrapper_poll0;
                 Java_sun_nio_ch_ServerSocketChannelImpl_accept0;
--- a/makefiles/mapfiles/libzip/mapfile-vers	Thu Jul 25 10:58:00 2013 -0400
+++ b/makefiles/mapfiles/libzip/mapfile-vers	Thu Jul 25 11:09:28 2013 -0400
@@ -65,6 +65,7 @@
 		Java_java_util_zip_ZipFile_initIDs;
 		Java_java_util_zip_ZipFile_open;
 		Java_java_util_zip_ZipFile_read;
+		Java_java_util_zip_ZipFile_startsWithLOC;
 
 		ZIP_Close;
 		ZIP_CRC32;
--- a/makefiles/mapfiles/libzip/reorder-sparc	Thu Jul 25 10:58:00 2013 -0400
+++ b/makefiles/mapfiles/libzip/reorder-sparc	Thu Jul 25 11:09:28 2013 -0400
@@ -18,6 +18,7 @@
 text: .text%Java_java_util_zip_ZipFile_initIDs;
 text: .text%Java_java_util_zip_ZipFile_open;
 text: .text%Java_java_util_zip_ZipFile_getTotal;
+text: .text%Java_java_util_zip_ZipFile_startsWithLOC;
 text: .text%Java_java_util_zip_ZipFile_getEntry;
 text: .text%Java_java_util_zip_ZipFile_freeEntry;
 text: .text%Java_java_util_zip_ZipFile_getEntryTime;
--- a/makefiles/mapfiles/libzip/reorder-sparcv9	Thu Jul 25 10:58:00 2013 -0400
+++ b/makefiles/mapfiles/libzip/reorder-sparcv9	Thu Jul 25 11:09:28 2013 -0400
@@ -18,6 +18,7 @@
 text: .text%Java_java_util_zip_ZipFile_initIDs;
 text: .text%Java_java_util_zip_ZipFile_open;
 text: .text%Java_java_util_zip_ZipFile_getTotal;
+text: .text%Java_java_util_zip_ZipFile_startsWithLOC;
 text: .text%Java_java_util_zip_ZipFile_getEntry;
 text: .text%Java_java_util_zip_ZipFile_freeEntry;
 text: .text%Java_java_util_zip_ZipFile_getEntryTime;
--- a/makefiles/mapfiles/libzip/reorder-x86	Thu Jul 25 10:58:00 2013 -0400
+++ b/makefiles/mapfiles/libzip/reorder-x86	Thu Jul 25 11:09:28 2013 -0400
@@ -19,6 +19,7 @@
 text: .text%Java_java_util_zip_ZipFile_initIDs;
 text: .text%Java_java_util_zip_ZipFile_open;
 text: .text%Java_java_util_zip_ZipFile_getTotal;
+text: .text%Java_java_util_zip_ZipFile_startsWithLOC;
 text: .text%Java_java_util_zip_ZipFile_getEntry;
 text: .text%Java_java_util_zip_ZipFile_freeEntry;
 text: .text%Java_java_util_zip_ZipFile_getEntryTime;
--- a/makefiles/profile-includes.txt	Thu Jul 25 10:58:00 2013 -0400
+++ b/makefiles/profile-includes.txt	Thu Jul 25 11:09:28 2013 -0400
@@ -125,13 +125,11 @@
     $(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)jaas_unix$(SHARED_LIBRARY_SUFFIX) \
     $(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)java_crw_demo$(SHARED_LIBRARY_SUFFIX) \
     $(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)java_crw_demo.diz \
-    $(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)jfr$(SHARED_LIBRARY_SUFFIX) \
     $(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)jsdt$(SHARED_LIBRARY_SUFFIX) \
     $(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)jsdt.diz \
     $(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)management$(SHARED_LIBRARY_SUFFIX) \
     $(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)management.diz \
     $(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)sctp$(SHARED_LIBRARY_SUFFIX) \
-    jfr.jar \
     jvm.hprof.txt \
     management-agent.jar \
     management/jmxremote.access \
@@ -164,6 +162,7 @@
     $(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)fontmanager$(SHARED_LIBRARY_SUFFIX) \
     $(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)jawt$(SHARED_LIBRARY_SUFFIX) \
     $(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)jdwp$(SHARED_LIBRARY_SUFFIX) \
+    $(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)jfr$(SHARED_LIBRARY_SUFFIX) \
     $(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)jpeg$(SHARED_LIBRARY_SUFFIX) \
     $(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)jsound$(SHARED_LIBRARY_SUFFIX) \
     $(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)jsoundalsa$(SHARED_LIBRARY_SUFFIX) \
@@ -214,6 +213,7 @@
     images/cursors/motif_MoveDrop32x32.gif \
     images/cursors/motif_MoveNoDrop32x32.gif \
     jexec \
+    jfr.jar \
     oblique-fonts/LucidaSansDemiOblique.ttf \
     oblique-fonts/LucidaSansOblique.ttf \
     oblique-fonts/LucidaTypewriterBoldOblique.ttf \
--- a/makefiles/scripts/genExceptions.sh	Thu Jul 25 10:58:00 2013 -0400
+++ b/makefiles/scripts/genExceptions.sh	Thu Jul 25 11:09:28 2013 -0400
@@ -70,7 +70,7 @@
     private $ARG_TYPE $ARG_ID;
 
     /**
-     * Constructs an instance of this class. </p>
+     * Constructs an instance of this class.
      *
      * @param  $ARG_ID
      *         The $ARG_PHRASE
@@ -81,7 +81,7 @@
     }
 
     /**
-     * Retrieves the $ARG_PHRASE. </p>
+     * Retrieves the $ARG_PHRASE.
      *
      * @return  The $ARG_PHRASE
      */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/makefiles/sun/awt/ToBin.java	Thu Jul 25 11:09:28 2013 -0400
@@ -0,0 +1,59 @@
+/*
+ * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package sun.awt;
+
+import java.io.*;
+import java.awt.image.*;
+import javax.imageio.*;
+import java.awt.*;
+
+public class ToBin {
+    public static void main(String[] args) throws Exception {
+        BufferedImage im = ImageIO.read(System.in);
+        BufferedImage bi = null;
+        int iconWidth = im.getWidth(null);
+        int iconHeight = im.getHeight(null);
+        if (im != null && iconHeight != 0 &&  iconWidth != 0) {
+            bi = new BufferedImage(iconWidth, iconHeight, BufferedImage.TYPE_INT_ARGB);
+            Graphics g = bi.getGraphics();
+            try {
+                g.drawImage(im, 0, 0, iconWidth, iconHeight, null);
+            } finally {
+                g.dispose();
+            }
+        }
+        DataBuffer srcBuf = bi.getData().getDataBuffer();
+        int[] buf = ((DataBufferInt)srcBuf).getData();
+        System.out.print(iconWidth + ",");
+        System.out.println(iconHeight + ",");
+        for (int i = 0; i < buf.length; i++) {
+            System.out.print("0x" + Integer.toHexString(buf[i]) + ", ");
+            if (i % 10 == 0) {
+                System.out.println();
+            }
+        }
+    }
+}
--- a/makefiles/sun/awt/X11/ToBin.java	Thu Jul 25 10:58:00 2013 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,59 +0,0 @@
-/*
- * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package sun.awt.X11;
-
-import java.io.*;
-import java.awt.image.*;
-import javax.imageio.*;
-import java.awt.*;
-
-public class ToBin {
-    public static void main(String[] args) throws Exception {
-        BufferedImage im = ImageIO.read(System.in);
-        BufferedImage bi = null;
-        int iconWidth = im.getWidth(null);
-        int iconHeight = im.getHeight(null);
-        if (im != null && iconHeight != 0 &&  iconWidth != 0) {
-            bi = new BufferedImage(iconWidth, iconHeight, BufferedImage.TYPE_INT_ARGB);
-            Graphics g = bi.getGraphics();
-            try {
-                g.drawImage(im, 0, 0, iconWidth, iconHeight, null);
-            } finally {
-                g.dispose();
-            }
-        }
-        DataBuffer srcBuf = bi.getData().getDataBuffer();
-        int[] buf = ((DataBufferInt)srcBuf).getData();
-        System.out.print(iconWidth + ",");
-        System.out.println(iconHeight + ",");
-        for (int i = 0; i < buf.length; i++) {
-            System.out.print("0x" + Integer.toHexString(buf[i]) + ", ");
-            if (i % 10 == 0) {
-                System.out.println();
-            }
-        }
-    }
-}
--- a/src/macosx/classes/com/apple/laf/resources/aqua_pt_BR.properties	Thu Jul 25 10:58:00 2013 -0400
+++ b/src/macosx/classes/com/apple/laf/resources/aqua_pt_BR.properties	Thu Jul 25 11:09:28 2013 -0400
@@ -154,7 +154,7 @@
 ############ Abstract Document Strings ############
 AbstractDocument.styleChange.textAndMnemonic=altera\u00E7\u00E3o de estilo
 AbstractDocument.addition.textAndMnemonic=adi\u00E7\u00E3o
-AbstractDocument.deletion.textAndMnemonic=dele\u00E7\u00E3o
+AbstractDocument.deletion.textAndMnemonic=exclus\u00E3o
 AbstractDocument.undo.textAndMnemonic=Desfazer
 AbstractDocument.redo.textAndMnemonic=Refazer
 
--- a/src/macosx/classes/sun/font/CCharToGlyphMapper.java	Thu Jul 25 10:58:00 2013 -0400
+++ b/src/macosx/classes/sun/font/CCharToGlyphMapper.java	Thu Jul 25 11:09:28 2013 -0400
@@ -130,7 +130,17 @@
     }
 
     public synchronized int charToGlyph(int unicode) {
-        return charToGlyph((char)unicode);
+        if (unicode >= 0x10000) {
+            int[] glyphs = new int[2];
+            char[] surrogates = new char[2];
+            int base = unicode - 0x10000;
+            surrogates[0] = (char)((base >>> 10) + HI_SURROGATE_START);
+            surrogates[1] = (char)((base % 0x400) + LO_SURROGATE_START);
+            charsToGlyphs(2, surrogates, glyphs);
+            return glyphs[0];
+         } else {
+             return charToGlyph((char)unicode);
+         }
     }
 
     public synchronized void charsToGlyphs(int count, char[] unicodes, int[] glyphs) {
@@ -138,9 +148,9 @@
     }
 
     public synchronized void charsToGlyphs(int count, int[] unicodes, int[] glyphs) {
-        final char[] unicodeChars = new char[count];
-        for (int i = 0; i < count; i++) unicodeChars[i] = (char)unicodes[i];
-        cache.get(count, unicodeChars, glyphs);
+        for (int i = 0; i < count; i++) {
+            glyphs[i] = charToGlyph(unicodes[i]);
+        };
     }
 
     // This mapper returns either the glyph code, or if the character can be
@@ -166,7 +176,7 @@
             firstLayerCache[1] = 1;
         }
 
-        public int get(final char index) {
+        public synchronized int get(final int index) {
             if (index < FIRST_LAYER_SIZE) {
                 // catch common glyphcodes
                 return firstLayerCache[index];
@@ -179,12 +189,12 @@
             }
 
             if (generalCache == null) return 0;
-            final Integer value = generalCache.get(new Integer(index));
+            final Integer value = generalCache.get(index);
             if (value == null) return 0;
             return value.intValue();
         }
 
-        public void put(final char index, final int value) {
+        public synchronized void put(final int index, final int value) {
             if (index < FIRST_LAYER_SIZE) {
                 // catch common glyphcodes
                 firstLayerCache[index] = value;
@@ -204,7 +214,7 @@
                 generalCache = new HashMap<Integer, Integer>();
             }
 
-            generalCache.put(new Integer(index), new Integer(value));
+            generalCache.put(index, value);
         }
 
         private class SparseBitShiftingTwoLayerArray {
@@ -220,14 +230,14 @@
                 this.secondLayerLength = size >> shift;
             }
 
-            public int get(final char index) {
+            public int get(final int index) {
                 final int firstIndex = index >> shift;
                 final int[] firstLayerRow = cache[firstIndex];
                 if (firstLayerRow == null) return 0;
                 return firstLayerRow[index - (firstIndex * (1 << shift))];
             }
 
-            public void put(final char index, final int value) {
+            public void put(final int index, final int value) {
                 final int firstIndex = index >> shift;
                 int[] firstLayerRow = cache[firstIndex];
                 if (firstLayerRow == null) {
@@ -237,77 +247,81 @@
             }
         }
 
-        public void get(int count, char[] indicies, int[] values){
+        public synchronized void get(int count, char[] indicies, int[] values)
+        {
+            // "missed" is the count of 'char' that are not mapped.
+            // Surrogates count for 2.
+            // unmappedChars is the unique list of these chars.
+            // unmappedCharIndices is the location in the original array
             int missed = 0;
-            for(int i = 0; i < count; i++){
-                char code = indicies[i];
+            char[] unmappedChars = null;
+            int [] unmappedCharIndices = null;
+
+            for (int i = 0; i < count; i++){
+                int code = indicies[i];
+                if (code >= HI_SURROGATE_START &&
+                    code <= HI_SURROGATE_END && i < count - 1)
+                {
+                    char low = indicies[i + 1];
+                    if (low >= LO_SURROGATE_START && low <= LO_SURROGATE_END) {
+                        code = (code - HI_SURROGATE_START) * 0x400 +
+                            low - LO_SURROGATE_START + 0x10000;
+                    }
+                }
 
                 final int value = get(code);
-                if(value != 0){
+                if (value != 0 && value != -1) {
                     values[i] = value;
-                }else{
-                    // zero this element out, because the caller does not
-                    // promise to keep it clean
+                    if (code >= 0x10000) {
+                        values[i+1] = INVISIBLE_GLYPH_ID;
+                        i++;
+                    }
+                } else {
                     values[i] = 0;
+                    put(code, -1);
+                    if (unmappedChars == null) {
+                        // This is likely to be longer than we need,
+                        // but is the simplest and cheapest option.
+                        unmappedChars = new char[indicies.length];
+                        unmappedCharIndices = new int[indicies.length];
+                    }
+                    unmappedChars[missed] = indicies[i];
+                    unmappedCharIndices[missed] = i;
+                    if (code >= 0x10000) { // was a surrogate pair
+                        unmappedChars[++missed] = indicies[++i];
+                    }
                     missed++;
                 }
             }
 
-            if (missed == 0) return; // horray! everything is already cached!
-
-            final char[] filteredCodes = new char[missed]; // all index codes requested (partially filled)
-            final int[] filteredIndicies = new int[missed]; // local indicies into filteredCodes array (totally filled)
-
-            // scan, mark, and store the index codes again to send into native
-            int j = 0;
-            int dupes = 0;
-            for (int i = 0; i < count; i++){
-                if (values[i] != 0L) continue; // already filled
-
-                final char code = indicies[i];
-
-                // we have already promised to fill this code - this is a dupe
-                if (get(code) == -1){
-                    filteredIndicies[j] = -1;
-                    dupes++;
-                    j++;
-                    continue;
-                }
-
-                // this is a code we have not obtained before
-                // mark this one as "promise to get" in the global cache with a -1
-                final int k = j - dupes;
-                filteredCodes[k] = code;
-                put(code, -1);
-                filteredIndicies[j] = k;
-                j++;
+            if (missed == 0) {
+                return;
             }
 
-            final int filteredRunLen = j - dupes;
-            final int[] filteredValues = new int[filteredRunLen];
+            final int[] glyphCodes = new int[missed];
 
-            // bulk call to fill in the distinct values
-            nativeCharsToGlyphs(fFont.getNativeFontPtr(), filteredRunLen, filteredCodes, filteredValues);
+            // bulk call to fill in the unmapped code points.
+            nativeCharsToGlyphs(fFont.getNativeFontPtr(),
+                                missed, unmappedChars, glyphCodes);
 
-            // scan the requested list, and fill in values from our
-            // distinct code list which has been filled from "getDistinct"
-            j = 0;
-            for (int i = 0; i < count; i++){
-                if (values[i] != 0L && values[i] != -1L) continue; // already placed
-
-                final int k = filteredIndicies[j]; // index into filteredImages array
-                final char code = indicies[i];
-                if(k == -1L){
-                    // we should have already filled the cache with this value
-                    values[i] = get(code);
-                }else{
-                    // fill the particular code request, and store in the cache
-                    final int ptr = filteredValues[k];
-                    values[i] = ptr;
-                    put(code, ptr);
+            for (int m = 0; m < missed; m++){
+                int i = unmappedCharIndices[m];
+                int code = unmappedChars[m];
+                if (code >= HI_SURROGATE_START &&
+                    code <= HI_SURROGATE_END && m < missed - 1)
+                {
+                    char low = indicies[m + 1];
+                    if (low >= LO_SURROGATE_START && low <= LO_SURROGATE_END) {
+                        code = (code - HI_SURROGATE_START) * 0x400 +
+                            low - LO_SURROGATE_START + 0x10000;
+                    }
                 }
-
-                j++;
+               values[i] = glyphCodes[m];
+               put(code, values[i]);
+               if (code >= 0x10000) {
+                   m++;
+                   values[i + 1] = INVISIBLE_GLYPH_ID;
+                }
             }
         }
     }
--- a/src/macosx/classes/sun/java2d/opengl/CGLLayer.java	Thu Jul 25 10:58:00 2013 -0400
+++ b/src/macosx/classes/sun/java2d/opengl/CGLLayer.java	Thu Jul 25 11:09:28 2013 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -73,8 +73,7 @@
     }
 
     public int getTransparency() {
-        return peer.isTranslucent() ? Transparency.TRANSLUCENT :
-               Transparency.OPAQUE;
+        return isOpaque() ? Transparency.OPAQUE : Transparency.TRANSLUCENT;
     }
 
     public Object getDestination() {
@@ -82,14 +81,14 @@
     }
 
     public SurfaceData replaceSurfaceData() {
-        if (peer.getBounds().isEmpty()) {
+        if (getBounds().isEmpty()) {
             surfaceData = NullSurfaceData.theInstance;
             return surfaceData;
         }
 
         // the layer redirects all painting to the buffer's graphics
         // and blits the buffer to the layer surface (in drawInCGLContext callback)
-        CGraphicsConfig gc = (CGraphicsConfig)peer.getGraphicsConfiguration();
+        CGraphicsConfig gc = (CGraphicsConfig)getGraphicsConfiguration();
         surfaceData = gc.createSurfaceData(this);
         setScale(gc.getDevice().getScaleFactor());
         // the layer holds a reference to the buffer, which in
--- a/src/macosx/classes/sun/lwawt/LWComponentPeer.java	Thu Jul 25 10:58:00 2013 -0400
+++ b/src/macosx/classes/sun/lwawt/LWComponentPeer.java	Thu Jul 25 11:09:28 2013 -0400
@@ -899,7 +899,7 @@
                                 boolean focusedWindowChangeAllowed, long time,
                                 CausedFocusEvent.Cause cause)
     {
-        if (focusLog.isLoggable(PlatformLogger.FINEST)) {
+        if (focusLog.isLoggable(PlatformLogger.Level.FINEST)) {
             focusLog.finest("lightweightChild=" + lightweightChild + ", temporary=" + temporary +
                             ", focusedWindowChangeAllowed=" + focusedWindowChangeAllowed +
                             ", time= " + time + ", cause=" + cause);
@@ -940,7 +940,7 @@
                         LWWindowPeer.getOwnerFrameDialog(parentPeer) : parentPeer;
 
                     if (decoratedPeer == null || !decoratedPeer.getPlatformWindow().isActive()) {
-                        if (focusLog.isLoggable(PlatformLogger.FINE)) {
+                        if (focusLog.isLoggable(PlatformLogger.Level.FINE)) {
                             focusLog.fine("request rejected, focusedWindowChangeAllowed==false, " +
                                           "decoratedPeer is inactive: " + decoratedPeer);
                         }
@@ -953,7 +953,7 @@
                 // If parent window can be made focused and has been made focused (synchronously)
                 // then we can proceed with children, otherwise we retreat
                 if (!res || !parentWindow.isFocused()) {
-                    if (focusLog.isLoggable(PlatformLogger.FINE)) {
+                    if (focusLog.isLoggable(PlatformLogger.Level.FINE)) {
                         focusLog.fine("request rejected, res= " + res + ", parentWindow.isFocused()=" +
                                       parentWindow.isFocused());
                     }
--- a/src/macosx/classes/sun/lwawt/LWKeyboardFocusManagerPeer.java	Thu Jul 25 10:58:00 2013 -0400
+++ b/src/macosx/classes/sun/lwawt/LWKeyboardFocusManagerPeer.java	Thu Jul 25 11:09:28 2013 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -44,9 +44,26 @@
 
     @Override
     public void setCurrentFocusedWindow(Window win) {
+        LWWindowPeer from, to;
+
         synchronized (this) {
+            if (focusedWindow == win) {
+                return;
+            }
+
+            from = (LWWindowPeer)LWToolkit.targetToPeer(focusedWindow);
+            to = (LWWindowPeer)LWToolkit.targetToPeer(win);
+
             focusedWindow = win;
         }
+
+        if (from != null) {
+            from.updateSecurityWarningVisibility();
+        }
+
+        if (to != null) {
+            to.updateSecurityWarningVisibility();
+        }
     }
 
     @Override
--- a/src/macosx/classes/sun/lwawt/LWToolkit.java	Thu Jul 25 10:58:00 2013 -0400
+++ b/src/macosx/classes/sun/lwawt/LWToolkit.java	Thu Jul 25 11:09:28 2013 -0400
@@ -513,6 +513,8 @@
         return clipboard;
     }
 
+    protected abstract SecurityWarningWindow createSecurityWarning(Window ownerWindow, LWWindowPeer ownerPeer);
+
     // ---- DELEGATES ---- //
 
     public abstract Clipboard createPlatformClipboard();
--- a/src/macosx/classes/sun/lwawt/LWWindowPeer.java	Thu Jul 25 10:58:00 2013 -0400
+++ b/src/macosx/classes/sun/lwawt/LWWindowPeer.java	Thu Jul 25 11:09:28 2013 -0400
@@ -41,7 +41,7 @@
 
 public class LWWindowPeer
     extends LWContainerPeer<Window, JComponent>
-    implements FramePeer, DialogPeer, FullScreenCapable, DisplayChangedListener
+    implements FramePeer, DialogPeer, FullScreenCapable, DisplayChangedListener, PlatformEventNotifier
 {
     public static enum PeerType {
         SIMPLEWINDOW,
@@ -112,6 +112,8 @@
 
     private final PeerType peerType;
 
+    private final SecurityWarningWindow warningWindow;
+
     /**
      * Current modal blocker or null.
      *
@@ -158,11 +160,26 @@
         }
 
         platformWindow.initialize(target, this, ownerDelegate);
+
+        // Init warning window(for applets)
+        SecurityWarningWindow warn = null;
+        if (((Window)target).getWarningString() != null) {
+            // accessSystemTray permission allows to display TrayIcon, TrayIcon tooltip
+            // and TrayIcon balloon windows without a warning window.
+            if (!AWTAccessor.getWindowAccessor().isTrayIconWindow((Window)target)) {
+                LWToolkit toolkit = (LWToolkit)Toolkit.getDefaultToolkit();
+                warn = toolkit.createSecurityWarning(target, this);
+            }
+        }
+
+        warningWindow = warn;
     }
 
     @Override
     void initializeImpl() {
         super.initializeImpl();
+
+
         if (getTarget() instanceof Frame) {
             setTitle(((Frame) getTarget()).getTitle());
             setState(((Frame) getTarget()).getExtendedState());
@@ -217,12 +234,20 @@
         if (isGrabbing()) {
             ungrab();
         }
+        if (warningWindow != null) {
+            warningWindow.dispose();
+        }
+
         platformWindow.dispose();
         super.disposeImpl();
     }
 
     @Override
     protected void setVisibleImpl(final boolean visible) {
+        if (!visible && warningWindow != null) {
+            warningWindow.setVisible(false, false);
+        }
+
         super.setVisibleImpl(visible);
         // TODO: update graphicsConfig, see 4868278
         platformWindow.setVisible(visible);
@@ -453,7 +478,15 @@
 
     @Override
     public void repositionSecurityWarning() {
-        throw new RuntimeException("not implemented");
+        if (warningWindow != null) {
+            AWTAccessor.ComponentAccessor compAccessor = AWTAccessor.getComponentAccessor();
+            Window target = getTarget();
+            int x = compAccessor.getX(target);
+            int y = compAccessor.getY(target);
+            int width = compAccessor.getWidth(target);
+            int height = compAccessor.getHeight(target);
+            warningWindow.reposition(x, y, width, height);
+        }
     }
 
     // ---- FRAME PEER METHODS ---- //
@@ -513,6 +546,7 @@
 
     // ---- PEER NOTIFICATIONS ---- //
 
+    @Override
     public void notifyIconify(boolean iconify) {
         //The toplevel target is Frame and states are applicable to it.
         //Otherwise, the target is Window and it don't have state property.
@@ -537,6 +571,7 @@
         }
     }
 
+    @Override
     public void notifyZoom(boolean isZoomed) {
         int newWindowState = isZoomed ? Frame.MAXIMIZED_BOTH : Frame.NORMAL;
         postWindowStateChangedEvent(newWindowState);
@@ -546,7 +581,8 @@
      * Called by the {@code PlatformWindow} when any part of the window should
      * be repainted.
      */
-    public final void notifyExpose(final Rectangle r) {
+    @Override
+    public void notifyExpose(final Rectangle r) {
         repaintPeer(r);
     }
 
@@ -556,7 +592,8 @@
      * LWComponentPeer as the only components which could be resized by user are
      * top-level windows.
      */
-    public final void notifyReshape(int x, int y, int w, int h) {
+    @Override
+    public void notifyReshape(int x, int y, int w, int h) {
         final boolean moved;
         final boolean resized;
         final boolean invalid = updateInsets(platformWindow.getInsets());
@@ -590,6 +627,8 @@
             handleResize(w, h, true);
             repaintPeer();
         }
+
+        repositionSecurityWarning();
     }
 
     private void clearBackground(final int w, final int h) {
@@ -617,16 +656,19 @@
         }
     }
 
+    @Override
     public void notifyUpdateCursor() {
         getLWToolkit().getCursorManager().updateCursorLater(this);
     }
 
+    @Override
     public void notifyActivation(boolean activation, LWWindowPeer opposite) {
         Window oppositeWindow = (opposite == null)? null : opposite.getTarget();
         changeFocusedWindow(activation, oppositeWindow);
     }
 
     // MouseDown in non-client area
+    @Override
     public void notifyNCMouseDown() {
         // Ungrab except for a click on a Dialog with the grabbing owner
         if (grabbingWindow != null &&
@@ -643,10 +685,11 @@
      * coordinates are relative to non-client window are, i.e. the top-left
      * point of the client area is (insets.top, insets.left).
      */
-    public void dispatchMouseEvent(int id, long when, int button,
-                                   int x, int y, int screenX, int screenY,
-                                   int modifiers, int clickCount, boolean popupTrigger,
-                                   byte[] bdata)
+    @Override
+    public void notifyMouseEvent(int id, long when, int button,
+                                 int x, int y, int screenX, int screenY,
+                                 int modifiers, int clickCount, boolean popupTrigger,
+                                 byte[] bdata)
     {
         // TODO: fill "bdata" member of AWTEvent
         Rectangle r = getBounds();
@@ -659,11 +702,9 @@
                 if (lastMouseEventPeer.isEnabled()) {
                     Point lp = lastMouseEventPeer.windowToLocal(x, y,
                             this);
-                    postEvent(new MouseEvent(lastMouseEventPeer.getTarget(),
-                            MouseEvent.MOUSE_EXITED, when,
-                            modifiers, lp.x, lp.y, screenX,
-                            screenY, clickCount, popupTrigger,
-                            button));
+                    Component target = lastMouseEventPeer.getTarget();
+                    postMouseExitedEvent(target, when, modifiers, lp,
+                            screenX, screenY, clickCount, popupTrigger, button);
                 }
 
                 // Sometimes we may get MOUSE_EXITED after lastCommonMouseEventPeer is switched
@@ -679,11 +720,9 @@
             if (targetPeer != null) {
                 if (targetPeer.isEnabled()) {
                     Point lp = targetPeer.windowToLocal(x, y, this);
-                        postEvent(new MouseEvent(targetPeer.getTarget(),
-                            MouseEvent.MOUSE_ENTERED, when,
-                            modifiers, lp.x, lp.y, screenX,
-                            screenY, clickCount, popupTrigger,
-                            button));
+                    Component target = targetPeer.getTarget();
+                    postMouseEnteredEvent(target, when, modifiers, lp,
+                            screenX, screenY, clickCount, popupTrigger, button);
                 }
                 lastCommonMouseEventPeer = targetPeer;
                 lastMouseEventPeer = targetPeer;
@@ -810,11 +849,9 @@
         // Generate Mouse Exit for components
         if (lastMouseEventPeer != null && lastMouseEventPeer.isEnabled()) {
             Point oldp = lastMouseEventPeer.windowToLocal(x, y, this);
-            postEvent(new MouseEvent(lastMouseEventPeer.getTarget(),
-                    MouseEvent.MOUSE_EXITED,
-                    when, modifiers,
-                    oldp.x, oldp.y, screenX, screenY,
-                    clickCount, popupTrigger, button));
+            Component target = lastMouseEventPeer.getTarget();
+            postMouseExitedEvent(target, when, modifiers, oldp, screenX, screenY,
+                    clickCount, popupTrigger, button);
         }
         lastCommonMouseEventPeer = targetPeer;
         lastMouseEventPeer = targetPeer;
@@ -822,18 +859,42 @@
         // Generate Mouse Enter for components
         if (targetPeer != null && targetPeer.isEnabled()) {
             Point newp = targetPeer.windowToLocal(x, y, this);
-            postEvent(new MouseEvent(targetPeer.getTarget(),
-                    MouseEvent.MOUSE_ENTERED,
-                    when, modifiers,
-                    newp.x, newp.y, screenX, screenY,
-                    clickCount, popupTrigger, button));
+            Component target = targetPeer.getTarget();
+            postMouseEnteredEvent(target, when, modifiers, newp, screenX, screenY, clickCount, popupTrigger, button);
         }
     }
 
-    public void dispatchMouseWheelEvent(long when, int x, int y, int modifiers,
-                                        int scrollType, int scrollAmount,
-                                        int wheelRotation, double preciseWheelRotation,
-                                        byte[] bdata)
+    private void postMouseEnteredEvent(Component target, long when, int modifiers,
+                                       Point loc, int xAbs, int yAbs,
+                                       int clickCount, boolean popupTrigger, int button) {
+
+        updateSecurityWarningVisibility();
+
+        postEvent(new MouseEvent(target,
+                MouseEvent.MOUSE_ENTERED,
+                when, modifiers,
+                loc.x, loc.y, xAbs, yAbs,
+                clickCount, popupTrigger, button));
+    }
+
+    private void postMouseExitedEvent(Component target, long when, int modifiers,
+                                      Point loc, int xAbs, int yAbs,
+                                      int clickCount, boolean popupTrigger, int button) {
+
+        updateSecurityWarningVisibility();
+
+        postEvent(new MouseEvent(target,
+                MouseEvent.MOUSE_EXITED,
+                when, modifiers,
+                loc.x, loc.y, xAbs, yAbs,
+                clickCount, popupTrigger, button));
+    }
+
+    @Override
+    public void notifyMouseWheelEvent(long when, int x, int y, int modifiers,
+                                      int scrollType, int scrollAmount,
+                                      int wheelRotation, double preciseWheelRotation,
+                                      byte[] bdata)
     {
         // TODO: could we just use the last mouse event target here?
         Rectangle r = getBounds();
@@ -859,8 +920,9 @@
     /*
      * Called by the delegate when a key is pressed.
      */
-    public void dispatchKeyEvent(int id, long when, int modifiers,
-                                 int keyCode, char keyChar, int keyLocation)
+    @Override
+    public void notifyKeyEvent(int id, long when, int modifiers,
+                               int keyCode, char keyChar, int keyLocation)
     {
         LWKeyboardFocusManagerPeer kfmPeer = LWKeyboardFocusManagerPeer.getInstance();
         Component focusOwner = kfmPeer.getCurrentFocusOwner();
@@ -874,7 +936,6 @@
         postEvent(new KeyEvent(focusOwner, id, when, modifiers, keyCode, keyChar, keyLocation));
     }
 
-
     // ---- UTILITY METHODS ---- //
 
     private void activateDisplayListener() {
@@ -894,11 +955,14 @@
             AWTAccessor.getFrameAccessor().setExtendedState(
                     (Frame)getTarget(), newWindowState);
         }
+
         WindowEvent stateChangedEvent = new WindowEvent(getTarget(),
                 WindowEvent.WINDOW_STATE_CHANGED,
                 windowState, newWindowState);
         postEvent(stateChangedEvent);
         windowState = newWindowState;
+
+        updateSecurityWarningVisibility();
     }
 
     private static int getGraphicsConfigScreen(GraphicsConfiguration gc) {
@@ -1059,7 +1123,7 @@
      * In case of a simple window, triggers appropriate java focus change.
      */
     public boolean requestWindowFocus(CausedFocusEvent.Cause cause) {
-        if (focusLog.isLoggable(PlatformLogger.FINE)) {
+        if (focusLog.isLoggable(PlatformLogger.Level.FINE)) {
             focusLog.fine("requesting native focus to " + this);
         }
 
@@ -1085,7 +1149,7 @@
             // If owner is not natively active, request native
             // activation on it w/o sending events up to java.
             if (owner != null && !owner.platformWindow.isActive()) {
-                if (focusLog.isLoggable(PlatformLogger.FINE)) {
+                if (focusLog.isLoggable(PlatformLogger.Level.FINE)) {
                     focusLog.fine("requesting native focus to the owner " + owner);
                 }
                 LWWindowPeer currentActivePeer = (currentActive != null ?
@@ -1093,7 +1157,7 @@
 
                 // Ensure the opposite is natively active and suppress sending events.
                 if (currentActivePeer != null && currentActivePeer.platformWindow.isActive()) {
-                    if (focusLog.isLoggable(PlatformLogger.FINE)) {
+                    if (focusLog.isLoggable(PlatformLogger.Level.FINE)) {
                         focusLog.fine("the opposite is " + currentActivePeer);
                     }
                     currentActivePeer.skipNextFocusChange = true;
@@ -1150,7 +1214,7 @@
      * Changes focused window on java level.
      */
     protected void changeFocusedWindow(boolean becomesFocused, Window opposite) {
-        if (focusLog.isLoggable(PlatformLogger.FINE)) {
+        if (focusLog.isLoggable(PlatformLogger.Level.FINE)) {
             focusLog.fine((becomesFocused?"gaining":"loosing") + " focus window: " + this);
         }
         if (skipNextFocusChange) {
@@ -1165,7 +1229,7 @@
         if (becomesFocused) {
             synchronized (getPeerTreeLock()) {
                 if (blocker != null) {
-                    if (focusLog.isLoggable(PlatformLogger.FINEST)) {
+                    if (focusLog.isLoggable(PlatformLogger.Level.FINEST)) {
                         focusLog.finest("the window is blocked by " + blocker);
                     }
                     return;
@@ -1179,7 +1243,7 @@
         if (!becomesFocused &&
             (isGrabbing() || getOwnerFrameDialog(grabbingWindow) == this))
         {
-            if (focusLog.isLoggable(PlatformLogger.FINE)) {
+            if (focusLog.isLoggable(PlatformLogger.Level.FINE)) {
                 focusLog.fine("ungrabbing on " + grabbingWindow);
             }
             // ungrab a simple window if its owner looses activation.
@@ -1222,10 +1286,12 @@
 
     public void enterFullScreenMode() {
         platformWindow.enterFullScreenMode();
+        updateSecurityWarningVisibility();
     }
 
     public void exitFullScreenMode() {
         platformWindow.exitFullScreenMode();
+        updateSecurityWarningVisibility();
     }
 
     public long getLayerPtr() {
@@ -1260,6 +1326,33 @@
         return peerType;
     }
 
+    public void updateSecurityWarningVisibility() {
+        if (warningWindow == null) {
+            return;
+        }
+
+        if (!isVisible()) {
+            return; // The warning window should already be hidden.
+        }
+
+        boolean show = false;
+
+        if (!platformWindow.isFullScreenMode()) {
+            if (isVisible()) {
+                if (LWKeyboardFocusManagerPeer.getInstance().getCurrentFocusedWindow() ==
+                        getTarget()) {
+                    show = true;
+                }
+
+                if (platformWindow.isUnderMouse() || warningWindow.isUnderMouse()) {
+                    show = true;
+                }
+            }
+        }
+
+        warningWindow.setVisible(show, true);
+    }
+
     @Override
     public String toString() {
         return super.toString() + " [target is " + getTarget() + "]";
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/macosx/classes/sun/lwawt/PlatformEventNotifier.java	Thu Jul 25 11:09:28 2013 -0400
@@ -0,0 +1,65 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package sun.lwawt;
+
+import java.awt.Rectangle;
+
+public interface PlatformEventNotifier {
+    void notifyIconify(boolean iconify);
+
+    void notifyZoom(boolean isZoomed);
+
+    void notifyExpose(Rectangle r);
+
+    void notifyReshape(int x, int y, int w, int h);
+
+    void notifyUpdateCursor();
+
+    void notifyActivation(boolean activation, LWWindowPeer opposite);
+
+    // MouseDown in non-client area
+    void notifyNCMouseDown();
+
+    /*
+     * Called by the delegate to dispatch the event to Java. Event
+     * coordinates are relative to non-client window are, i.e. the top-left
+     * point of the client area is (insets.top, insets.left).
+     */
+    void notifyMouseEvent(int id, long when, int button,
+                          int x, int y, int screenX, int screenY,
+                          int modifiers, int clickCount, boolean popupTrigger,
+                          byte[] bdata);
+
+    void notifyMouseWheelEvent(long when, int x, int y, int modifiers,
+                               int scrollType, int scrollAmount,
+                               int wheelRotation, double preciseWheelRotation,
+                               byte[] bdata);
+    /*
+     * Called by the delegate when a key is pressed.
+     */
+    void notifyKeyEvent(int id, long when, int modifiers,
+                        int keyCode, char keyChar, int keyLocation);
+}
--- a/src/macosx/classes/sun/lwawt/PlatformWindow.java	Thu Jul 25 10:58:00 2013 -0400
+++ b/src/macosx/classes/sun/lwawt/PlatformWindow.java	Thu Jul 25 11:09:28 2013 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -146,6 +146,8 @@
 
     public void exitFullScreenMode();
 
+    public boolean isFullScreenMode();
+
     public void setWindowState(int windowState);
 
     public long getLayerPtr();
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/macosx/classes/sun/lwawt/SecurityWarningWindow.java	Thu Jul 25 11:09:28 2013 -0400
@@ -0,0 +1,35 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package sun.lwawt;
+
+public interface SecurityWarningWindow extends PlatformWindow {
+    /**
+     * @param x,y,w,h coordinates of the untrusted window
+     */
+    public void reposition(int x, int y, int w, int h);
+
+    public void setVisible(boolean visible, boolean doSchedule);
+}
--- a/src/macosx/classes/sun/lwawt/macosx/CEmbeddedFrame.java	Thu Jul 25 10:58:00 2013 -0400
+++ b/src/macosx/classes/sun/lwawt/macosx/CEmbeddedFrame.java	Thu Jul 25 11:09:28 2013 -0400
@@ -38,7 +38,8 @@
 public class CEmbeddedFrame extends EmbeddedFrame {
 
     private CPlatformResponder responder;
-    private boolean focused = true;
+    private static final Object classLock = new Object();
+    private static volatile CEmbeddedFrame focusedWindow;
     private boolean parentWindowActive = true;
 
     public CEmbeddedFrame() {
@@ -104,9 +105,16 @@
         responder.handleInputEvent(text);
     }
 
+    // handleFocusEvent is called when the applet becames focused/unfocused.
+    // This method can be called from different threads.
     public void handleFocusEvent(boolean focused) {
-        this.focused = focused;
-        if (focused) {
+        synchronized (classLock) {
+            // In some cases an applet may not receive the focus lost event
+            // from the parent window (see 8012330)
+            focusedWindow = (focused) ? this
+                    : ((focusedWindow == this) ? null : focusedWindow);
+        }
+        if (focusedWindow == this) {
             // see bug 8010925
             // we can't put this to handleWindowFocusEvent because
             // it won't be invoced if focuse is moved to a html element
@@ -119,11 +127,27 @@
         }
     }
 
+    /**
+     * When the parent window is activated this method is called for all EmbeddedFrames in it.
+     *
+     * For the CEmbeddedFrame which had focus before the deactivation this method triggers
+     * focus events in the following order:
+     *  1. WINDOW_ACTIVATED for this EmbeddedFrame
+     *  2. WINDOW_GAINED_FOCUS for this EmbeddedFrame
+     *  3. FOCUS_GAINED for the most recent focus owner in this EmbeddedFrame
+     *
+     * The caller must not requestFocus on the EmbeddedFrame together with calling this method.
+     *
+     * @param parentWindowActive true if the window is activated, false otherwise
+     */
+    // handleWindowFocusEvent is called for all applets, when the browser
+    // becomes active/inactive. This event should be filtered out for
+    // non-focused applet. This method can be called from different threads.
     public void handleWindowFocusEvent(boolean parentWindowActive) {
         this.parentWindowActive = parentWindowActive;
         // ignore focus "lost" native request as it may mistakenly
         // deactivate active window (see 8001161)
-        if (focused && parentWindowActive) {
+        if (focusedWindow == this && parentWindowActive) {
             responder.handleWindowFocusEvent(parentWindowActive, null);
         }
     }
--- a/src/macosx/classes/sun/lwawt/macosx/CPlatformEmbeddedFrame.java	Thu Jul 25 10:58:00 2013 -0400
+++ b/src/macosx/classes/sun/lwawt/macosx/CPlatformEmbeddedFrame.java	Thu Jul 25 11:09:28 2013 -0400
@@ -186,6 +186,11 @@
     public void exitFullScreenMode() {}
 
     @Override
+    public boolean isFullScreenMode() {
+        return false;
+    }
+
+    @Override
     public void setWindowState(int windowState) {}
 
     @Override
--- a/src/macosx/classes/sun/lwawt/macosx/CPlatformResponder.java	Thu Jul 25 10:58:00 2013 -0400
+++ b/src/macosx/classes/sun/lwawt/macosx/CPlatformResponder.java	Thu Jul 25 11:09:28 2013 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,7 @@
 
 import sun.awt.SunToolkit;
 import sun.lwawt.LWWindowPeer;
+import sun.lwawt.PlatformEventNotifier;
 import sun.lwawt.macosx.event.NSEvent;
 import java.awt.Toolkit;
 import java.awt.event.MouseEvent;
@@ -39,12 +40,13 @@
  */
 final class CPlatformResponder {
 
-    private final LWWindowPeer peer;
+    private final PlatformEventNotifier eventNotifier;
     private final boolean isNpapiCallback;
     private int lastKeyPressCode = KeyEvent.VK_UNDEFINED;
 
-    CPlatformResponder(final LWWindowPeer peer, final boolean isNpapiCallback) {
-        this.peer = peer;
+    CPlatformResponder(final PlatformEventNotifier eventNotifier,
+                       final boolean isNpapiCallback) {
+        this.eventNotifier = eventNotifier;
         this.isNpapiCallback = isNpapiCallback;
     }
 
@@ -78,9 +80,9 @@
                                                         modifierFlags);
         boolean jpopupTrigger = NSEvent.isPopupTrigger(jmodifiers);
 
-        peer.dispatchMouseEvent(jeventType, System.currentTimeMillis(), jbuttonNumber,
-                                x, y, absoluteX, absoluteY, jmodifiers, jclickCount,
-                                jpopupTrigger, null);
+        eventNotifier.notifyMouseEvent(jeventType, System.currentTimeMillis(), jbuttonNumber,
+                x, y, absoluteX, absoluteY, jmodifiers, jclickCount,
+                jpopupTrigger, null);
     }
 
     /**
@@ -116,8 +118,8 @@
             wheelRotation = signum;
         }
         // invert the wheelRotation for the peer
-        peer.dispatchMouseWheelEvent(when, x, y, modifiers, scrollType,
-                                     scrollAmount, -wheelRotation, -delta, null);
+        eventNotifier.notifyMouseWheelEvent(when, x, y, modifiers, scrollType,
+                scrollAmount, -wheelRotation, -delta, null);
     }
 
     /**
@@ -187,8 +189,8 @@
         if (jeventType == KeyEvent.KEY_PRESSED) {
             lastKeyPressCode = jkeyCode;
         }
-        peer.dispatchKeyEvent(jeventType, when, jmodifiers,
-                              jkeyCode, javaChar, jkeyLocation);
+        eventNotifier.notifyKeyEvent(jeventType, when, jmodifiers,
+                jkeyCode, javaChar, jkeyLocation);
 
         // Current browser may be sending input events, so don't
         // post the KEY_TYPED here.
@@ -206,12 +208,12 @@
             if (needsKeyReleased && (jkeyCode == KeyEvent.VK_ENTER || jkeyCode == KeyEvent.VK_SPACE)) {
                 return;
             }
-            peer.dispatchKeyEvent(KeyEvent.KEY_TYPED, when, jmodifiers,
-                                  KeyEvent.VK_UNDEFINED, javaChar,
-                                  KeyEvent.KEY_LOCATION_UNKNOWN);
+            eventNotifier.notifyKeyEvent(KeyEvent.KEY_TYPED, when, jmodifiers,
+                    KeyEvent.VK_UNDEFINED, javaChar,
+                    KeyEvent.KEY_LOCATION_UNKNOWN);
             //If events come from Firefox, released events should also be generated.
             if (needsKeyReleased) {
-                peer.dispatchKeyEvent(KeyEvent.KEY_RELEASED, when, jmodifiers,
+                eventNotifier.notifyKeyEvent(KeyEvent.KEY_RELEASED, when, jmodifiers,
                         jkeyCode, javaChar,
                         KeyEvent.KEY_LOCATION_UNKNOWN);
             }
@@ -224,13 +226,13 @@
             char c = 0;
             while (index < length) {
                 c = text.charAt(index);
-                peer.dispatchKeyEvent(KeyEvent.KEY_TYPED,
+                eventNotifier.notifyKeyEvent(KeyEvent.KEY_TYPED,
                         System.currentTimeMillis(),
                         0, KeyEvent.VK_UNDEFINED, c,
                         KeyEvent.KEY_LOCATION_UNKNOWN);
                 index++;
             }
-            peer.dispatchKeyEvent(KeyEvent.KEY_RELEASED,
+            eventNotifier.notifyKeyEvent(KeyEvent.KEY_RELEASED,
                     System.currentTimeMillis(),
                     0, lastKeyPressCode, c,
                     KeyEvent.KEY_LOCATION_UNKNOWN);
@@ -238,6 +240,6 @@
     }
 
     void handleWindowFocusEvent(boolean gained, LWWindowPeer opposite) {
-        peer.notifyActivation(gained, opposite);
+        eventNotifier.notifyActivation(gained, opposite);
     }
 }
--- a/src/macosx/classes/sun/lwawt/macosx/CPlatformView.java	Thu Jul 25 10:58:00 2013 -0400
+++ b/src/macosx/classes/sun/lwawt/macosx/CPlatformView.java	Thu Jul 25 11:09:28 2013 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -57,11 +57,15 @@
         initializeBase(peer, responder);
 
         if (!LWCToolkit.getSunAwtDisableCALayers()) {
-            this.windowLayer = new CGLLayer(peer);
+            this.windowLayer = createCGLayer();
         }
         setPtr(nativeCreateView(0, 0, 0, 0, getWindowLayerPtr()));
     }
 
+    public CGLLayer createCGLayer() {
+        return new CGLLayer(peer);
+    }
+
     protected void initializeBase(LWWindowPeer peer, CPlatformResponder responder) {
         this.peer = peer;
         this.responder = responder;
@@ -69,7 +73,7 @@
 
     public long getAWTView() {
         return ptr;
-        }
+    }
 
     public boolean isOpaque() {
         return !peer.isTranslucent();
@@ -100,6 +104,10 @@
         CWrapper.NSView.exitFullScreenMode(ptr);
     }
 
+    public void setToolTip(String msg) {
+        CWrapper.NSView.setToolTip(ptr, msg);
+    }
+
     // ----------------------------------------------------------------------
     // PAINTING METHODS
     // ----------------------------------------------------------------------
@@ -108,7 +116,7 @@
             surfaceData = windowLayer.replaceSurfaceData();
         } else {
             if (surfaceData == null) {
-                CGraphicsConfig graphicsConfig = (CGraphicsConfig)peer.getGraphicsConfiguration();
+                CGraphicsConfig graphicsConfig = (CGraphicsConfig)getGraphicsConfiguration();
                 surfaceData = graphicsConfig.createSurfaceData(this);
             } else {
                 validateSurface();
--- a/src/macosx/classes/sun/lwawt/macosx/CPlatformWindow.java	Thu Jul 25 10:58:00 2013 -0400
+++ b/src/macosx/classes/sun/lwawt/macosx/CPlatformWindow.java	Thu Jul 25 11:09:28 2013 -0400
@@ -204,9 +204,9 @@
 
     private Window target;
     private LWWindowPeer peer;
-    private CPlatformView contentView;
-    private CPlatformWindow owner;
-    private boolean visible = false; // visibility status from native perspective
+    protected CPlatformView contentView;
+    protected CPlatformWindow owner;
+    protected boolean visible = false; // visibility status from native perspective
     private boolean undecorated; // initialized in getInitialStyleBits()
     private Rectangle normalBounds = null; // not-null only for undecorated maximized windows
     private CPlatformResponder responder;
@@ -226,19 +226,13 @@
 
         final int styleBits = getInitialStyleBits();
 
-        // TODO: handle these misc properties
-        final long parentNSWindowPtr = (owner != null ? owner.getNSWindowPtr() : 0);
-        String warningString = target.getWarningString();
-
-        responder = new CPlatformResponder(peer, false);
+        responder = createPlatformResponder();
+        contentView = createContentView();
         contentView.initialize(peer, responder);
 
         final long nativeWindowPtr = nativeCreateNSWindow(contentView.getAWTView(), styleBits, 0, 0, 0, 0);
         setPtr(nativeWindowPtr);
 
-        // TODO: implement on top of JObjC bridged class
-    //    NSWindow window = JObjC.getInstance().AppKit().NSWindow().getInstance(nativeWindowPtr, JObjCRuntime.getInstance());
-
         if (target instanceof javax.swing.RootPaneContainer) {
             final javax.swing.JRootPane rootpane = ((javax.swing.RootPaneContainer)target).getRootPane();
             if (rootpane != null) rootpane.addPropertyChangeListener("ancestor", new PropertyChangeListener() {
@@ -261,7 +255,15 @@
         this.contentView = view;
     }
 
-    private int getInitialStyleBits() {
+    protected CPlatformResponder createPlatformResponder() {
+        return new CPlatformResponder(peer, false);
+    }
+
+    protected CPlatformView createContentView() {
+        return new CPlatformView();
+    }
+
+    protected int getInitialStyleBits() {
         // defaults style bits
         int styleBits = DECORATED | HAS_SHADOW | CLOSEABLE | MINIMIZABLE | ZOOMABLE | RESIZABLE;
 
@@ -467,7 +469,7 @@
     }
 
     private void maximize() {
-        if (isMaximized()) {
+        if (peer == null || isMaximized()) {
             return;
         }
         if (!undecorated) {
@@ -502,7 +504,7 @@
         }
     }
 
-    private boolean isVisible() {
+    public boolean isVisible() {
         return this.visible;
     }
 
@@ -534,7 +536,7 @@
         updateFocusabilityForAutoRequestFocus(false);
 
         // Actually show or hide the window
-        LWWindowPeer blocker = peer.getBlocker();
+        LWWindowPeer blocker = (peer == null)? null : peer.getBlocker();
         if (blocker == null || !visible) {
             // If it ain't blocked, or is being hidden, go regular way
             if (visible) {
@@ -633,7 +635,7 @@
     public long getNSWindowPtr() {
         final long nsWindowPtr = ptr;
         if (nsWindowPtr == 0L) {
-            if(logger.isLoggable(PlatformLogger.FINE)) {
+            if(logger.isLoggable(PlatformLogger.Level.FINE)) {
                 logger.fine("NSWindow already disposed?", new Exception("Pointer to native NSWindow is invalid."));
             }
         }
@@ -726,7 +728,8 @@
     @Override
     public void setOpaque(boolean isOpaque) {
         CWrapper.NSWindow.setOpaque(getNSWindowPtr(), isOpaque);
-        if (!isOpaque && !peer.isTextured()) {
+        boolean isTextured = (peer == null)? false : peer.isTextured();
+        if (!isOpaque && !isTextured) {
             long clearColor = CWrapper.NSColor.clearColor();
             CWrapper.NSWindow.setBackgroundColor(getNSWindowPtr(), clearColor);
         }
@@ -766,8 +769,13 @@
     }
 
     @Override
+    public boolean isFullScreenMode() {
+        return isFullScreenMode;
+    }
+
+    @Override
     public void setWindowState(int windowState) {
-        if (!peer.isVisible()) {
+        if (peer == null || !peer.isVisible()) {
             // setVisible() applies the state
             return;
         }
@@ -804,8 +812,6 @@
                 throw new RuntimeException("Unknown window state: " + windowState);
         }
 
-        nativeSynthesizeMouseEnteredExitedEvents();
-
         // NOTE: the SWP.windowState field gets updated to the newWindowState
         //       value when the native notification comes to us
     }
@@ -914,7 +920,7 @@
         responder.handleWindowFocusEvent(gained, oppositePeer);
     }
 
-    private void deliverMoveResizeEvent(int x, int y, int width, int height,
+    protected void deliverMoveResizeEvent(int x, int y, int width, int height,
                                         boolean byUser) {
         // when the content view enters the full-screen mode, the native
         // move/resize notifications contain a bounds smaller than
@@ -927,9 +933,13 @@
         final Rectangle oldB = nativeBounds;
         nativeBounds = new Rectangle(x, y, width, height);
         final GraphicsConfiguration oldGC = peer.getGraphicsConfiguration();
-        peer.notifyReshape(x, y, width, height);
+
         final GraphicsConfiguration newGC = peer.getGraphicsConfiguration();
         // System-dependent appearance optimization.
+        if (peer != null) {
+            peer.notifyReshape(x, y, width, height);
+        }
+
         if ((byUser && !oldB.getSize().equals(nativeBounds.getSize()))
             || isFullScreenAnimationOn || !Objects.equals(newGC, oldGC)) {
             flushBuffers();
@@ -937,21 +947,29 @@
     }
 
     private void deliverWindowClosingEvent() {
-        if (peer.getBlocker() == null)  {
-            peer.postEvent(new WindowEvent(target, WindowEvent.WINDOW_CLOSING));
+        if (peer != null) {
+            if (peer.getBlocker() == null)  {
+                peer.postEvent(new WindowEvent(target, WindowEvent.WINDOW_CLOSING));
+            }
         }
     }
 
     private void deliverIconify(final boolean iconify) {
-        peer.notifyIconify(iconify);
+        if (peer != null) {
+            peer.notifyIconify(iconify);
+        }
     }
 
     private void deliverZoom(final boolean isZoomed) {
-        peer.notifyZoom(isZoomed);
+        if (peer != null) {
+            peer.notifyZoom(isZoomed);
+        }
     }
 
     private void deliverNCMouseDown() {
-        peer.notifyNCMouseDown();
+        if (peer != null) {
+            peer.notifyNCMouseDown();
+        }
     }
 
     /*
@@ -959,6 +977,10 @@
      * may become natively focusable window.
      */
     private boolean isNativelyFocusableWindow() {
+        if (peer == null) {
+            return false;
+        }
+
         return !peer.isSimpleWindow() && target.getFocusableWindowState();
     }
 
@@ -973,7 +995,7 @@
     }
 
     private boolean checkBlocking() {
-        LWWindowPeer blocker = peer.getBlocker();
+        LWWindowPeer blocker = (peer == null)? null : peer.getBlocker();
         if (blocker == null) {
             return false;
         }
--- a/src/macosx/classes/sun/lwawt/macosx/CTrayIcon.java	Thu Jul 25 10:58:00 2013 -0400
+++ b/src/macosx/classes/sun/lwawt/macosx/CTrayIcon.java	Thu Jul 25 11:09:28 2013 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
 
 package sun.lwawt.macosx;
 
+import sun.awt.AWTAccessor;
 import sun.awt.SunToolkit;
 import sun.lwawt.macosx.event.NSEvent;
 
@@ -339,6 +340,9 @@
 
         dialog.addWindowListener(handler);
 
+        // suppress security warning for untrusted windows
+        AWTAccessor.getWindowAccessor().setTrayIconWindow(dialog, true);
+
         dialog.pack();
 
         return dialog;
--- a/src/macosx/classes/sun/lwawt/macosx/CViewPlatformEmbeddedFrame.java	Thu Jul 25 10:58:00 2013 -0400
+++ b/src/macosx/classes/sun/lwawt/macosx/CViewPlatformEmbeddedFrame.java	Thu Jul 25 11:09:28 2013 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -201,6 +201,11 @@
     }
 
     @Override
+    public boolean isFullScreenMode() {
+        return false;
+    }
+
+    @Override
     public void setWindowState(int windowState) {
     }
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/macosx/classes/sun/lwawt/macosx/CWarningWindow.java	Thu Jul 25 11:09:28 2013 -0400
@@ -0,0 +1,444 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package sun.lwawt.macosx;
+
+import sun.awt.AWTAccessor;
+import sun.awt.IconInfo;
+import sun.awt.SunToolkit;
+import sun.java2d.SunGraphics2D;
+import sun.java2d.SurfaceData;
+import sun.java2d.opengl.CGLLayer;
+import sun.lwawt.LWWindowPeer;
+import sun.lwawt.PlatformEventNotifier;
+import sun.lwawt.SecurityWarningWindow;
+
+import java.awt.*;
+import java.awt.event.MouseEvent;
+import java.awt.geom.Point2D;
+import java.lang.ref.WeakReference;
+import java.util.concurrent.Executors;
+import java.util.concurrent.ScheduledExecutorService;
+import java.util.concurrent.ScheduledFuture;
+import java.util.concurrent.TimeUnit;
+
+public final class CWarningWindow extends CPlatformWindow
+        implements SecurityWarningWindow, PlatformEventNotifier {
+
+    private static class Lock {};
+    private final Lock lock = new Lock();
+
+    private final static int SHOWING_DELAY = 300;
+    private final static int HIDING_DELAY = 2000;
+
+    private Rectangle bounds = new Rectangle();
+    private final WeakReference<LWWindowPeer> ownerPeer;
+    private final Window ownerWindow;
+
+    /**
+     * Animation stage.
+     */
+    private volatile int currentIcon = 0;
+
+    /* -1 - uninitialized.
+     * 0 - 16x16
+     * 1 - 24x24
+     * 2 - 32x32
+     * 3 - 48x48
+     */
+    private int currentSize = -1;
+    private static IconInfo[][] icons;
+    private static IconInfo getSecurityIconInfo(int size, int num) {
+        synchronized (CWarningWindow.class) {
+            if (icons == null) {
+                icons = new IconInfo[4][3];
+                icons[0][0] = new IconInfo(sun.awt.AWTIcon32_security_icon_bw16_png.security_icon_bw16_png);
+                icons[0][1] = new IconInfo(sun.awt.AWTIcon32_security_icon_interim16_png.security_icon_interim16_png);
+                icons[0][2] = new IconInfo(sun.awt.AWTIcon32_security_icon_yellow16_png.security_icon_yellow16_png);
+                icons[1][0] = new IconInfo(sun.awt.AWTIcon32_security_icon_bw24_png.security_icon_bw24_png);
+                icons[1][1] = new IconInfo(sun.awt.AWTIcon32_security_icon_interim24_png.security_icon_interim24_png);
+                icons[1][2] = new IconInfo(sun.awt.AWTIcon32_security_icon_yellow24_png.security_icon_yellow24_png);
+                icons[2][0] = new IconInfo(sun.awt.AWTIcon32_security_icon_bw32_png.security_icon_bw32_png);
+                icons[2][1] = new IconInfo(sun.awt.AWTIcon32_security_icon_interim32_png.security_icon_interim32_png);
+                icons[2][2] = new IconInfo(sun.awt.AWTIcon32_security_icon_yellow32_png.security_icon_yellow32_png);
+                icons[3][0] = new IconInfo(sun.awt.AWTIcon32_security_icon_bw48_png.security_icon_bw48_png);
+                icons[3][1] = new IconInfo(sun.awt.AWTIcon32_security_icon_interim48_png.security_icon_interim48_png);
+                icons[3][2] = new IconInfo(sun.awt.AWTIcon32_security_icon_yellow48_png.security_icon_yellow48_png);
+            }
+        }
+        final int sizeIndex = size % icons.length;
+        return icons[sizeIndex][num % icons[sizeIndex].length];
+    }
+
+    public CWarningWindow(final Window _ownerWindow, final LWWindowPeer _ownerPeer) {
+        super();
+
+        this.ownerPeer = new WeakReference<LWWindowPeer>(_ownerPeer);
+        this.ownerWindow = _ownerWindow;
+
+        initialize(null, null, _ownerPeer.getPlatformWindow());
+
+        setOpaque(false);
+
+        String warningString = ownerWindow.getWarningString();
+        if (warningString != null) {
+            contentView.setToolTip(ownerWindow.getWarningString());
+        }
+
+        updateIconSize();
+    }
+
+    /**
+     * @param x,y,w,h coordinates of the untrusted window
+     */
+    public void reposition(int x, int y, int w, int h) {
+        final Point2D point = AWTAccessor.getWindowAccessor().
+                calculateSecurityWarningPosition(ownerWindow, x, y, w, h);
+        setBounds((int)point.getX(), (int)point.getY(), getWidth(), getHeight());
+    }
+
+    public void setVisible(boolean visible, boolean doSchedule) {
+        synchronized (scheduler) {
+            if (showingTaskHandle != null) {
+                showingTaskHandle.cancel(false);
+                showingTaskHandle = null;
+            }
+
+            if (hidingTaskHandle != null) {
+                hidingTaskHandle.cancel(false);
+                hidingTaskHandle = null;
+            }
+
+            if (visible) {
+                if (isVisible()) {
+                    currentIcon = 0;
+                } else {
+                    currentIcon = 2;
+                }
+
+                showingTaskHandle = scheduler.schedule(showingTask, 50,
+                        TimeUnit.MILLISECONDS);
+
+            } else {
+                if (!isVisible()) {
+                    return;
+                }
+
+                if (doSchedule) {
+                    hidingTaskHandle = scheduler.schedule(hidingTask, HIDING_DELAY,
+                            TimeUnit.MILLISECONDS);
+                } else {
+                    hidingTaskHandle = scheduler.schedule(hidingTask, 50,
+                            TimeUnit.MILLISECONDS);
+                }
+            }
+        }
+    }
+
+    @Override
+    public void notifyIconify(boolean iconify) {
+    }
+
+    @Override
+    public void notifyZoom(boolean isZoomed) {
+    }
+
+    @Override
+    public void notifyExpose(final Rectangle r) {
+        repaint();
+    }
+
+    @Override
+    public void notifyReshape(int x, int y, int w, int h) {
+    }
+
+    @Override
+    public void notifyUpdateCursor() {
+    }
+
+    @Override
+    public void notifyActivation(boolean activation, LWWindowPeer opposite) {
+    }
+
+    @Override
+    public void notifyNCMouseDown() {
+    }
+
+    @Override
+    public void notifyMouseEvent(int id, long when, int button, int x, int y,
+                                 int screenX, int screenY, int modifiers,
+                                 int clickCount, boolean popupTrigger,
+                                 byte[] bdata) {
+        LWWindowPeer peer = ownerPeer.get();
+        if (id == MouseEvent.MOUSE_EXITED) {
+            if (peer != null) {
+                peer.updateSecurityWarningVisibility();
+            }
+        } else if(id == MouseEvent.MOUSE_ENTERED) {
+            if (peer != null) {
+                peer.updateSecurityWarningVisibility();
+            }
+        }
+    }
+
+    public Rectangle getBounds() {
+        synchronized (lock) {
+            return bounds.getBounds();
+        }
+    }
+
+    @Override
+    public boolean isVisible() {
+        synchronized (lock) {
+            return visible;
+        }
+    }
+
+    @Override
+    public void setVisible(boolean visible) {
+        synchronized (lock) {
+            final long nsWindowPtr = getNSWindowPtr();
+
+            // Process parent-child relationship when hiding
+            if (!visible) {
+                // Unparent myself
+                if (owner != null && owner.isVisible()) {
+                    CWrapper.NSWindow.removeChildWindow(
+                            owner.getNSWindowPtr(), nsWindowPtr);
+                }
+            }
+
+            // Actually show or hide the window
+            if (visible) {
+                CWrapper.NSWindow.orderFront(nsWindowPtr);
+            } else {
+                CWrapper.NSWindow.orderOut(nsWindowPtr);
+            }
+
+            this.visible = visible;
+
+            // Manage parent-child relationship when showing
+            if (visible) {
+                // Add myself as a child
+                if (owner != null && owner.isVisible()) {
+                    CWrapper.NSWindow.addChildWindow(owner.getNSWindowPtr(),
+                            nsWindowPtr, CWrapper.NSWindow.NSWindowAbove);
+
+                    // do not allow security warning to be obscured by other windows
+                    if (ownerWindow.isAlwaysOnTop()) {
+                        CWrapper.NSWindow.setLevel(nsWindowPtr,
+                                CWrapper.NSWindow.NSFloatingWindowLevel);
+                    }