changeset 10507:39ce82dad57d

Merge
author jlaskey
date Tue, 09 Apr 2013 08:36:20 -0300
parents 3e5a18c3e599 (diff) efbbcd5848cf (current diff)
children ff9683b6854c
files
diffstat 159 files changed, 2682 insertions(+), 1784 deletions(-) [+]
line wrap: on
line diff
--- a/.hgtags	Mon Apr 01 10:09:27 2013 -0300
+++ b/.hgtags	Tue Apr 09 08:36:20 2013 -0300
@@ -203,3 +203,6 @@
 c933505d75c2a0a671f06d6dac5d2237a9228d2d jdk8-b79
 dfb40f066c6ce129822f0f5dc2ac89173808781a jdk8-b80
 c0f8022eba536dcdc8aae659005b33f3982b9368 jdk8-b81
+624bcb4800065c6656171948e31ebb2925f25c7a jdk8-b82
+ac519af51769e92c51b597a730974e8607357709 jdk8-b83
+7b4721e4edb4e1c65e9c839a70d7cc67f81c7632 jdk8-b84
--- a/make/com/sun/org/apache/xml/Makefile	Mon Apr 01 10:09:27 2013 -0300
+++ b/make/com/sun/org/apache/xml/Makefile	Tue Apr 09 08:36:20 2013 -0300
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2003, 2011, 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
@@ -34,6 +34,8 @@
 JAVAC_WARNINGS_FATAL = true
 include $(BUILDDIR)/common/Defs.gmk
 
+JAVAC_LINT_OPTIONS += -Xlint:-overrides
+
 #
 # Files to compile
 #
--- a/make/javax/others/Makefile	Mon Apr 01 10:09:27 2013 -0300
+++ b/make/javax/others/Makefile	Tue Apr 09 08:36:20 2013 -0300
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1998, 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
@@ -33,6 +33,8 @@
 
 include $(BUILDDIR)/common/Defs.gmk
 
+JAVAC_LINT_OPTIONS += -Xlint:-deprecation
+
 #
 # Files to compile
 #
--- a/make/sun/xawt/FILES_c_unix.gmk	Mon Apr 01 10:09:27 2013 -0300
+++ b/make/sun/xawt/FILES_c_unix.gmk	Tue Apr 09 08:36:20 2013 -0300
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2002, 2010, 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
@@ -76,6 +76,7 @@
 	debug_trace.c \
 	debug_util.c \
 	awt_Plugin.c \
+        gnome_interface.c \
 	gtk2_interface.c \
         swing_GTKEngine.c \
         swing_GTKStyle.c \
--- a/makefiles/CompileNativeLibraries.gmk	Mon Apr 01 10:09:27 2013 -0300
+++ b/makefiles/CompileNativeLibraries.gmk	Tue Apr 09 08:36:20 2013 -0300
@@ -843,6 +843,7 @@
 	debug_trace.c \
 	debug_util.c \
 	awt_Plugin.c \
+        gnome_interface.c \
 	gtk2_interface.c \
         swing_GTKEngine.c \
         swing_GTKStyle.c \
@@ -2385,18 +2386,23 @@
 
 ifndef BUILD_HEADLESS_ONLY
 LIBSPLASHSCREEN_DIRS:=\
-	$(JDK_TOPDIR)/src/share/native/sun/awt/giflib \
 	$(JDK_TOPDIR)/src/share/native/sun/awt/image/jpeg \
 	$(JDK_TOPDIR)/src/share/native/sun/awt/libpng \
 	$(JDK_TOPDIR)/src/share/native/sun/awt/splashscreen
 
+ifeq ($(USE_EXTERNAL_LIBGIF),true)
+    GIFLIB_LDFLAGS := -lgif
+else
+    LIBSPLASHSCREEN_DIRS += $(JDK_TOPDIR)/src/share/native/sun/awt/giflib
+    GIFLIB_CFLAGS := -I$(JDK_TOPDIR)/src/share/native/sun/awt/giflib
+endif
+
 ifneq ($(OPENJDK_TARGET_OS), macosx)
     LIBSPLASHSCREEN_DIRS += $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/awt/splashscreen
 else
     LIBSPLASHSCREEN_DIRS += $(JDK_TOPDIR)/src/macosx/native/sun/awt/splashscreen
 endif
 
-
 LIBSPLASHSCREEN_CFLAGS:=-DSPLASHSCREEN -DPNG_NO_MMX_CODE \
 	$(foreach dir,$(LIBSPLASHSCREEN_DIRS),-I$(dir))
 
@@ -2448,11 +2454,11 @@
 		EXCLUDE_FILES:=imageioJPEG.c jpegdecoder.c pngtest.c,\
 		LANG:=C,\
 		OPTIMIZATION:=LOW, \
-		CFLAGS:=$(LIBSPLASHSCREEN_CFLAGS) $(CFLAGS_JDKLIB),\
+		CFLAGS:=$(LIBSPLASHSCREEN_CFLAGS) $(CFLAGS_JDKLIB) $(GIFLIB_CFLAGS),\
 		MAPFILE:=$(JDK_TOPDIR)/makefiles/mapfiles/libsplashscreen/mapfile-vers, \
 		LDFLAGS:=$(LDFLAGS_JDKLIB) \
 			 $(call SET_SHARED_LIBRARY_ORIGIN),\
-		LDFLAGS_SUFFIX:=$(LIBSPLASHSCREEN_LDFLAGS_SUFFIX) $(LIBZ),\
+		LDFLAGS_SUFFIX:=$(LIBSPLASHSCREEN_LDFLAGS_SUFFIX) $(LIBZ) $(GIFLIB_LDFLAGS),\
 		LDFLAGS_SUFFIX_solaris:=-lc,\
 		VERSIONINFO_RESOURCE:=$(JDK_TOPDIR)/src/windows/resource/version.rc,\
 		RC_FLAGS:=$(RC_FLAGS)\
@@ -2663,11 +2669,8 @@
 
 ##########################################################################################
 
-ifndef DISABLE_INTREE_EC
-#
-# TODO Set DISABLE_INTREE_EC in configure if src/share/native/sun/security/ec/impl
-#      is not present
-#
+ifeq ($(ENABLE_INTREE_EC),yes)
+
 BUILD_LIBSUNEC_FLAGS:= -I$(JDK_TOPDIR)/src/share/native/sun/security/ec \
                        -I$(JDK_TOPDIR)/src/share/native/sun/security/ec/impl
 
--- a/makefiles/Images.gmk	Mon Apr 01 10:09:27 2013 -0300
+++ b/makefiles/Images.gmk	Tue Apr 09 08:36:20 2013 -0300
@@ -649,7 +649,7 @@
         EXEC_LIST_BIN:=$(filter-out %$(notdir $(MSVCR_DLL)),$(filter %.exe %.dll,$(ALL_BIN_LIST)))
     else
         # Find all executables in JDK_OUTPUTDIR since they exist when this makefile is parsed
-        EXEC_LIST_BIN:=$(shell $(FILE) `$(FIND) $(JDK_OUTPUTDIR)/bin -type f -name \*$(EXE_SUFFIX)` \
+        EXEC_LIST_BIN:=$(shell $(FILE) `$(FIND) $(JDK_OUTPUTDIR)/bin -type f -name \*$(EXE_SUFFIX) ! -name \*.debuginfo` \
 		| $(EGREP) 'ELF' | $(CUT) -d':' -f1)
         # On mac, the old build searches for static libraries for stripping instead of shared.
         # Not clear if it's intentional.
--- a/src/macosx/classes/apple/laf/JRSUIConstants.java	Mon Apr 01 10:09:27 2013 -0300
+++ b/src/macosx/classes/apple/laf/JRSUIConstants.java	Tue Apr 09 08:36:20 2013 -0300
@@ -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
@@ -28,27 +28,25 @@
 import java.lang.reflect.Field;
 import java.nio.ByteBuffer;
 
-import javax.tools.annotation.GenerateNativeHeader;
+import java.lang.annotation.Native;
 
 public final class JRSUIConstants {
     private static native long getPtrForConstant(final int constant);
 
-    /* No native methods here, but the constants are needed in the supporting JNI code */
-    @GenerateNativeHeader
     static class Key {
-        protected static final int _value = 20;
+        @Native protected static final int _value = 20;
         public static final Key VALUE = new Key(_value);
 
-        protected static final int _thumbProportion = 24;
+        @Native protected static final int _thumbProportion = 24;
         public static final Key THUMB_PROPORTION = new Key(_thumbProportion);
 
-        protected static final int _thumbStart = 25;
+        @Native protected static final int _thumbStart = 25;
         public static final Key THUMB_START = new Key(_thumbStart);
 
-        protected static final int _windowTitleBarHeight = 28;
+        @Native protected static final int _windowTitleBarHeight = 28;
         public static final Key WINDOW_TITLE_BAR_HEIGHT = new Key(_windowTitleBarHeight);
 
-        protected static final int _animationFrame = 23;
+        @Native protected static final int _animationFrame = 23;
         public static final Key ANIMATION_FRAME = new Key(_animationFrame);
 
         final int constant;
@@ -70,10 +68,8 @@
         }
     }
 
-    /* No native methods here, but the constants are needed in the supporting JNI code */
-    @GenerateNativeHeader
     static class DoubleValue {
-        protected static final byte TYPE_CODE = 1;
+        @Native protected static final byte TYPE_CODE = 1;
 
         final double doubleValue;
 
@@ -139,684 +135,634 @@
         }
     }
 
-    /* No native methods here, but the constants are needed in the supporting JNI code */
-    @GenerateNativeHeader
     public static class Size extends Property {
-        private static final byte SHIFT = 0;
-        private static final byte SIZE = 3;
-        private static final long MASK = (long)0x7 << SHIFT;
+        @Native private static final byte SHIFT = 0;
+        @Native private static final byte SIZE = 3;
+        @Native private static final long MASK = (long)0x7 << SHIFT;
         private static final PropertyEncoding size = new PropertyEncoding(MASK, SHIFT);
 
         Size(final byte value) {
             super(size, value);
         }
 
-        private static final byte _mini = 1;
+        @Native private static final byte _mini = 1;
         public static final Size MINI = new Size(_mini);
-        private static final byte _small = 2;
+        @Native private static final byte _small = 2;
         public static final Size SMALL = new Size(_small);
-        private static final byte _regular = 3;
+        @Native private static final byte _regular = 3;
         public static final Size REGULAR = new Size(_regular);
-        private static final byte _large = 4;
+        @Native private static final byte _large = 4;
         public static final Size LARGE = new Size(_large);
     }
 
-    /* No native methods here, but the constants are needed in the supporting JNI code */
-    @GenerateNativeHeader
     public static class State extends Property {
-        private static final byte SHIFT = Size.SHIFT + Size.SIZE;
-        private static final byte SIZE = 4;
-        private static final long MASK = (long)0xF << SHIFT;
+        @Native private static final byte SHIFT = Size.SHIFT + Size.SIZE;
+        @Native private static final byte SIZE = 4;
+        @Native private static final long MASK = (long)0xF << SHIFT;
         private static final PropertyEncoding state = new PropertyEncoding(MASK, SHIFT);
 
         State(final byte value) {
             super(state, value);
         }
 
-        private static final byte _active = 1;
+        @Native private static final byte _active = 1;
         public static final State ACTIVE = new State(_active);
-        private static final byte _inactive = 2;
+        @Native private static final byte _inactive = 2;
         public static final State INACTIVE = new State(_inactive);
-        private static final byte _disabled = 3;
+        @Native private static final byte _disabled = 3;
         public static final State DISABLED = new State(_disabled);
-        private static final byte _pressed = 4;
+        @Native private static final byte _pressed = 4;
         public static final State PRESSED = new State(_pressed);
-        private static final byte _pulsed = 5;
+        @Native private static final byte _pulsed = 5;
         public static final State PULSED = new State(_pulsed);
-        private static final byte _rollover = 6;
+        @Native private static final byte _rollover = 6;
         public static final State ROLLOVER = new State(_rollover);
-        private static final byte _drag = 7;
+        @Native private static final byte _drag = 7;
         public static final State DRAG = new State(_drag);
     }
 
-    /* No native methods here, but the constants are needed in the supporting JNI code */
-    @GenerateNativeHeader
     public static class Direction extends Property {
-        private static final byte SHIFT = State.SHIFT + State.SIZE;
-        private static final byte SIZE = 4;
-        private static final long MASK = (long)0xF << SHIFT;
+        @Native private static final byte SHIFT = State.SHIFT + State.SIZE;
+        @Native private static final byte SIZE = 4;
+        @Native private static final long MASK = (long)0xF << SHIFT;
         private static final PropertyEncoding direction = new PropertyEncoding(MASK, SHIFT);
 
         Direction(final byte value) {
             super(direction, value);
         }
 
-        private static final byte _none = 1;
+        @Native private static final byte _none = 1;
         public static final Direction NONE = new Direction(_none);
-        private static final byte _up = 2;
+        @Native private static final byte _up = 2;
         public static final Direction UP = new Direction(_up);
-        private static final byte _down = 3;
+        @Native private static final byte _down = 3;
         public static final Direction DOWN = new Direction(_down);
-        private static final byte _left = 4;
+        @Native private static final byte _left = 4;
         public static final Direction LEFT = new Direction(_left);
-        private static final byte _right = 5;
+        @Native private static final byte _right = 5;
         public static final Direction RIGHT = new Direction(_right);
-        private static final byte _north = 6;
+        @Native private static final byte _north = 6;
         public static final Direction NORTH = new Direction(_north);
-        private static final byte _south = 7;
+        @Native private static final byte _south = 7;
         public static final Direction SOUTH = new Direction(_south);
-        private static final byte _east = 8;
+        @Native private static final byte _east = 8;
         public static final Direction EAST = new Direction(_east);
-        private static final byte _west = 9;
+        @Native private static final byte _west = 9;
         public static final Direction WEST = new Direction(_west);
     }
 
-    /* No native methods here, but the constants are needed in the supporting JNI code */
-    @GenerateNativeHeader
     public static class Orientation extends Property {
-        private static final byte SHIFT = Direction.SHIFT + Direction.SIZE;
-        private static final byte SIZE = 2;
-        private static final long MASK = (long)0x3 << SHIFT;
+        @Native private static final byte SHIFT = Direction.SHIFT + Direction.SIZE;
+        @Native private static final byte SIZE = 2;
+        @Native private static final long MASK = (long)0x3 << SHIFT;
         private static final PropertyEncoding orientation = new PropertyEncoding(MASK, SHIFT);
 
         Orientation(final byte value) {
             super(orientation, value);
         }
 
-        private static final byte _horizontal = 1;
+        @Native private static final byte _horizontal = 1;
         public static final Orientation HORIZONTAL = new Orientation(_horizontal);
-        private static final byte _vertical = 2;
+        @Native private static final byte _vertical = 2;
         public static final Orientation VERTICAL = new Orientation(_vertical);
     }
 
-    /* No native methods here, but the constants are needed in the supporting JNI code */
-    @GenerateNativeHeader
     public static class AlignmentVertical extends Property {
-        private static final byte SHIFT = Orientation.SHIFT + Orientation.SIZE;
-        private static final byte SIZE = 2;
-        private static final long MASK = (long)0x3 << SHIFT;
+        @Native private static final byte SHIFT = Orientation.SHIFT + Orientation.SIZE;
+        @Native private static final byte SIZE = 2;
+        @Native private static final long MASK = (long)0x3 << SHIFT;
         private static final PropertyEncoding alignmentVertical = new PropertyEncoding(MASK, SHIFT);
 
         AlignmentVertical(final byte value){
             super(alignmentVertical, value);
         }
 
-        private static final byte _top = 1;
+        @Native private static final byte _top = 1;
         public static final AlignmentVertical TOP = new AlignmentVertical(_top);
-        private static final byte _center = 2;
+        @Native private static final byte _center = 2;
         public static final AlignmentVertical CENTER = new AlignmentVertical(_center);
-        private static final byte _bottom = 3;
+        @Native private static final byte _bottom = 3;
         public static final AlignmentVertical BOTTOM = new AlignmentVertical(_bottom);
     }
 
-    /* No native methods here, but the constants are needed in the supporting JNI code */
-    @GenerateNativeHeader
     public static class AlignmentHorizontal extends Property {
-        private static final byte SHIFT = AlignmentVertical.SHIFT + AlignmentVertical.SIZE;
-        private static final byte SIZE = 2;
-        private static final long MASK = (long)0x3 << SHIFT;
+        @Native private static final byte SHIFT = AlignmentVertical.SHIFT + AlignmentVertical.SIZE;
+        @Native private static final byte SIZE = 2;
+        @Native private static final long MASK = (long)0x3 << SHIFT;
         private static final PropertyEncoding alignmentHorizontal = new PropertyEncoding(MASK, SHIFT);
 
         AlignmentHorizontal(final byte value){
             super(alignmentHorizontal, value);
         }
 
-        private static final byte _left = 1;
+        @Native private static final byte _left = 1;
         public static final AlignmentHorizontal LEFT = new AlignmentHorizontal(_left);
-        private static final byte _center =  2;
+        @Native private static final byte _center =  2;
         public static final AlignmentHorizontal CENTER = new AlignmentHorizontal(_center);
-        private static final byte _right = 3;
+        @Native private static final byte _right = 3;
         public static final AlignmentHorizontal RIGHT = new AlignmentHorizontal(_right);
     }
 
-    /* No native methods here, but the constants are needed in the supporting JNI code */
-    @GenerateNativeHeader
     public static class SegmentPosition extends Property {
-        private static final byte SHIFT = AlignmentHorizontal.SHIFT + AlignmentHorizontal.SIZE;
-        private static final byte SIZE = 3;
-        private static final long MASK = (long)0x7 << SHIFT;
+        @Native private static final byte SHIFT = AlignmentHorizontal.SHIFT + AlignmentHorizontal.SIZE;
+        @Native private static final byte SIZE = 3;
+        @Native private static final long MASK = (long)0x7 << SHIFT;
         private static final PropertyEncoding segmentPosition = new PropertyEncoding(MASK, SHIFT);
 
         SegmentPosition(final byte value) {
             super(segmentPosition, value);
         }
 
-        private static final byte _first = 1;
+        @Native private static final byte _first = 1;
         public static final SegmentPosition FIRST = new SegmentPosition(_first);
-        private static final byte _middle = 2;
+        @Native private static final byte _middle = 2;
         public static final SegmentPosition MIDDLE = new SegmentPosition(_middle);
-        private static final byte _last = 3;
+        @Native private static final byte _last = 3;
         public static final SegmentPosition LAST = new SegmentPosition(_last);
-        private static final byte _only = 4;
+        @Native private static final byte _only = 4;
         public static final SegmentPosition ONLY = new SegmentPosition(_only);
     }
 
-    /* No native methods here, but the constants are needed in the supporting JNI code */
-    @GenerateNativeHeader
     public static class ScrollBarPart extends Property {
-        private static final byte SHIFT = SegmentPosition.SHIFT + SegmentPosition.SIZE;
-        private static final byte SIZE = 4;
-        private static final long MASK = (long)0xF << SHIFT;
+        @Native private static final byte SHIFT = SegmentPosition.SHIFT + SegmentPosition.SIZE;
+        @Native private static final byte SIZE = 4;
+        @Native private static final long MASK = (long)0xF << SHIFT;
         private static final PropertyEncoding scrollBarPart = new PropertyEncoding(MASK, SHIFT);
 
         ScrollBarPart(final byte value) {
             super(scrollBarPart, value);
         }
 
-        private static final byte _none = 1;
+        @Native private static final byte _none = 1;
         public static final ScrollBarPart NONE = new ScrollBarPart(_none);
-        private static final byte _thumb = 2;
+        @Native private static final byte _thumb = 2;
         public static final ScrollBarPart THUMB = new ScrollBarPart(_thumb);
-        private static final byte _arrowMin = 3;
+        @Native private static final byte _arrowMin = 3;
         public static final ScrollBarPart ARROW_MIN = new ScrollBarPart(_arrowMin);
-        private static final byte _arrowMax = 4;
+        @Native private static final byte _arrowMax = 4;
         public static final ScrollBarPart ARROW_MAX = new ScrollBarPart(_arrowMax);
-        private static final byte _arrowMaxInside = 5;
+        @Native private static final byte _arrowMaxInside = 5;
         public static final ScrollBarPart ARROW_MAX_INSIDE = new ScrollBarPart(_arrowMaxInside);
-        private static final byte _arrowMinInside = 6;
+        @Native private static final byte _arrowMinInside = 6;
         public static final ScrollBarPart ARROW_MIN_INSIDE = new ScrollBarPart(_arrowMinInside);
-        private static final byte _trackMin = 7;
+        @Native private static final byte _trackMin = 7;
         public static final ScrollBarPart TRACK_MIN = new ScrollBarPart(_trackMin);
-        private static final byte _trackMax = 8;
+        @Native private static final byte _trackMax = 8;
         public static final ScrollBarPart TRACK_MAX = new ScrollBarPart(_trackMax);
     }
 
-    /* No native methods here, but the constants are needed in the supporting JNI code */
-    @GenerateNativeHeader
     public static class Variant extends Property {
-        private static final byte SHIFT = ScrollBarPart.SHIFT + ScrollBarPart.SIZE;
-        private static final byte SIZE = 4;
-        private static final long MASK = (long)0xF << SHIFT;
+        @Native private static final byte SHIFT = ScrollBarPart.SHIFT + ScrollBarPart.SIZE;
+        @Native private static final byte SIZE = 4;
+        @Native private static final long MASK = (long)0xF << SHIFT;
         private static final PropertyEncoding variant = new PropertyEncoding(MASK, SHIFT);
 
         Variant(final byte value) {
             super(variant, value);
         }
 
-        private static final byte _menuGlyph = 1;
+        @Native private static final byte _menuGlyph = 1;
         public static final Variant MENU_GLYPH = new Variant(_menuGlyph);
-        private static final byte _menuPopup = Variant._menuGlyph + 1;
+        @Native private static final byte _menuPopup = Variant._menuGlyph + 1;
         public static final Variant MENU_POPUP = new Variant(_menuPopup);
-        private static final byte _menuPulldown = Variant._menuPopup + 1;
+        @Native private static final byte _menuPulldown = Variant._menuPopup + 1;
         public static final Variant MENU_PULLDOWN = new Variant(_menuPulldown);
-        private static final byte _menuHierarchical = Variant._menuPulldown + 1;
+        @Native private static final byte _menuHierarchical = Variant._menuPulldown + 1;
         public static final Variant MENU_HIERARCHICAL = new Variant(_menuHierarchical);
 
-        private static final byte _gradientListBackgroundEven = Variant._menuHierarchical + 1;
+        @Native private static final byte _gradientListBackgroundEven = Variant._menuHierarchical + 1;
         public static final Variant GRADIENT_LIST_BACKGROUND_EVEN = new Variant(_gradientListBackgroundEven);
-        private static final byte _gradientListBackgroundOdd = Variant._gradientListBackgroundEven + 1;
+        @Native private static final byte _gradientListBackgroundOdd = Variant._gradientListBackgroundEven + 1;
         public static final Variant GRADIENT_LIST_BACKGROUND_ODD = new Variant(_gradientListBackgroundOdd);
-        private static final byte _gradientSideBar = Variant._gradientListBackgroundOdd + 1;
+        @Native private static final byte _gradientSideBar = Variant._gradientListBackgroundOdd + 1;
         public static final Variant GRADIENT_SIDE_BAR = new Variant(_gradientSideBar);
-        private static final byte _gradientSideBarSelection = Variant._gradientSideBar + 1;
+        @Native private static final byte _gradientSideBarSelection = Variant._gradientSideBar + 1;
         public static final Variant GRADIENT_SIDE_BAR_SELECTION = new Variant(_gradientSideBarSelection);
-        private static final byte _gradientSideBarFocusedSelection = Variant._gradientSideBarSelection + 1;
+        @Native private static final byte _gradientSideBarFocusedSelection = Variant._gradientSideBarSelection + 1;
         public static final Variant GRADIENT_SIDE_BAR_FOCUSED_SELECTION = new Variant(_gradientSideBarFocusedSelection);
     }
 
-    /* No native methods here, but the constants are needed in the supporting JNI code */
-    @GenerateNativeHeader
     public static class WindowType extends Property {
-        private static final byte SHIFT = Variant.SHIFT + Variant.SIZE;
-        private static final byte SIZE = 2;
-        private static final long MASK = (long)0x3 << SHIFT;
+        @Native private static final byte SHIFT = Variant.SHIFT + Variant.SIZE;
+        @Native private static final byte SIZE = 2;
+        @Native private static final long MASK = (long)0x3 << SHIFT;
         private static final PropertyEncoding windowType = new PropertyEncoding(MASK, SHIFT);
 
         WindowType(final byte value){
             super(windowType, value);
         }
 
-        private static final byte _document = 1;
+        @Native private static final byte _document = 1;
         public static final WindowType DOCUMENT = new WindowType(_document);
-        private static final byte _utility = 2;
+        @Native private static final byte _utility = 2;
         public static final WindowType UTILITY = new WindowType(_utility);
-        private static final byte _titlelessUtility = 3;
+        @Native private static final byte _titlelessUtility = 3;
         public static final WindowType TITLELESS_UTILITY = new WindowType(_titlelessUtility);
     }
 
-    /* No native methods here, but the constants are needed in the supporting JNI code */
-    @GenerateNativeHeader
     public static class Focused extends Property {
-        private static final byte SHIFT = WindowType.SHIFT + WindowType.SIZE;
-        private static final byte SIZE = 1;
-        private static final long MASK = (long)0x1 << SHIFT;
+        @Native private static final byte SHIFT = WindowType.SHIFT + WindowType.SIZE;
+        @Native private static final byte SIZE = 1;
+        @Native private static final long MASK = (long)0x1 << SHIFT;
         private static final PropertyEncoding focused = new PropertyEncoding(MASK, SHIFT);
 
         Focused(final byte value) {
             super(focused, value);
         }
 
-        private static final byte _no = 0;
+        @Native private static final byte _no = 0;
         public static final Focused NO = new Focused(_no);
-        private static final byte _yes = 1;
+        @Native private static final byte _yes = 1;
         public static final Focused YES = new Focused(_yes);
     }
 
-    /* No native methods here, but the constants are needed in the supporting JNI code */
-    @GenerateNativeHeader
     public static class IndicatorOnly extends Property {
-        private static final byte SHIFT = Focused.SHIFT + Focused.SIZE;
-        private static final byte SIZE = 1;
-        private static final long MASK = (long)0x1 << SHIFT;
+        @Native private static final byte SHIFT = Focused.SHIFT + Focused.SIZE;
+        @Native private static final byte SIZE = 1;
+        @Native private static final long MASK = (long)0x1 << SHIFT;
         private static final PropertyEncoding indicatorOnly = new PropertyEncoding(MASK, SHIFT);
 
         IndicatorOnly(final byte value) {
             super(indicatorOnly, value);
         }
 
-        private static final byte _no = 0;
+        @Native private static final byte _no = 0;
         public static final IndicatorOnly NO = new IndicatorOnly(_no);
-        private static final byte _yes = 1;
+        @Native private static final byte _yes = 1;
         public static final IndicatorOnly YES = new IndicatorOnly(_yes);
     }
 
-    /* No native methods here, but the constants are needed in the supporting JNI code */
-    @GenerateNativeHeader
     public static class NoIndicator extends Property {
-        private static final byte SHIFT = IndicatorOnly.SHIFT + IndicatorOnly.SIZE;
-        private static final byte SIZE = 1;
-        private static final long MASK = (long)0x1 << SHIFT;
+        @Native private static final byte SHIFT = IndicatorOnly.SHIFT + IndicatorOnly.SIZE;
+        @Native private static final byte SIZE = 1;
+        @Native private static final long MASK = (long)0x1 << SHIFT;
         private static final PropertyEncoding noIndicator = new PropertyEncoding(MASK, SHIFT);
 
         NoIndicator(final byte value) {
             super(noIndicator, value);
         }
 
-        private static final byte _no = 0;
+        @Native private static final byte _no = 0;
         public static final NoIndicator NO = new NoIndicator(_no);
-        private static final byte _yes = 1;
+        @Native private static final byte _yes = 1;
         public static final NoIndicator YES = new NoIndicator(_yes);
     }
 
-    /* No native methods here, but the constants are needed in the supporting JNI code */
-    @GenerateNativeHeader
     public static class ArrowsOnly extends Property {
-        private static final byte SHIFT = NoIndicator.SHIFT + NoIndicator.SIZE;
-        private static final byte SIZE = 1;
-        private static final long MASK = (long)0x1 << SHIFT;
+        @Native private static final byte SHIFT = NoIndicator.SHIFT + NoIndicator.SIZE;
+        @Native private static final byte SIZE = 1;
+        @Native private static final long MASK = (long)0x1 << SHIFT;
         private static final PropertyEncoding focused = new PropertyEncoding(MASK, SHIFT);
 
         ArrowsOnly(final byte value) {
             super(focused, value);
         }
 
-        private static final byte _no = 0;
+        @Native private static final byte _no = 0;
         public static final ArrowsOnly NO = new ArrowsOnly(_no);
-        private static final byte _yes = 1;
+        @Native private static final byte _yes = 1;
         public static final ArrowsOnly YES = new ArrowsOnly(_yes);
     }
 
-    /* No native methods here, but the constants are needed in the supporting JNI code */
-    @GenerateNativeHeader
     public static class FrameOnly extends Property {
-        private static final byte SHIFT = ArrowsOnly.SHIFT + ArrowsOnly.SIZE;
-        private static final byte SIZE = 1;
-        private static final long MASK = (long)0x1 << SHIFT;
+        @Native private static final byte SHIFT = ArrowsOnly.SHIFT + ArrowsOnly.SIZE;
+        @Native private static final byte SIZE = 1;
+        @Native private static final long MASK = (long)0x1 << SHIFT;
         private static final PropertyEncoding focused = new PropertyEncoding(MASK, SHIFT);
 
         FrameOnly(final byte value) {
             super(focused, value);
         }
 
-        private static final byte _no = 0;
+        @Native private static final byte _no = 0;
         public static final FrameOnly NO = new FrameOnly(_no);
-        private static final byte _yes = 1;
+        @Native private static final byte _yes = 1;
         public static final FrameOnly YES = new FrameOnly(_yes);
     }
 
-    /* No native methods here, but the constants are needed in the supporting JNI code */
-    @GenerateNativeHeader
     public static class SegmentTrailingSeparator extends Property {
-        private static final byte SHIFT = FrameOnly.SHIFT + FrameOnly.SIZE;
-        private static final byte SIZE = 1;
-        private static final long MASK = (long)0x1 << SHIFT;
+        @Native private static final byte SHIFT = FrameOnly.SHIFT + FrameOnly.SIZE;
+        @Native private static final byte SIZE = 1;
+        @Native private static final long MASK = (long)0x1 << SHIFT;
         private static final PropertyEncoding focused = new PropertyEncoding(MASK, SHIFT);
 
         SegmentTrailingSeparator(final byte value) {
             super(focused, value);
         }
 
-        private static final byte _no = 0;
+        @Native private static final byte _no = 0;
         public static final SegmentTrailingSeparator NO = new SegmentTrailingSeparator(_no);
-        private static final byte _yes = 1;
+        @Native private static final byte _yes = 1;
         public static final SegmentTrailingSeparator YES = new SegmentTrailingSeparator(_yes);
     }
 
-    /* No native methods here, but the constants are needed in the supporting JNI code */
-    @GenerateNativeHeader
     public static class SegmentLeadingSeparator extends Property {
-        private static final byte SHIFT = SegmentTrailingSeparator.SHIFT + SegmentTrailingSeparator.SIZE;
-        private static final byte SIZE = 1;
-        private static final long MASK = (long)0x1 << SHIFT;
+        @Native private static final byte SHIFT = SegmentTrailingSeparator.SHIFT + SegmentTrailingSeparator.SIZE;
+        @Native private static final byte SIZE = 1;
+        @Native private static final long MASK = (long)0x1 << SHIFT;
         private static final PropertyEncoding leadingSeparator = new PropertyEncoding(MASK, SHIFT);
 
         SegmentLeadingSeparator(final byte value) {
             super(leadingSeparator, value);
         }
 
-        private static final byte _no = 0;
+        @Native private static final byte _no = 0;
         public static final SegmentLeadingSeparator NO = new SegmentLeadingSeparator(_no);
-        private static final byte _yes = 1;
+        @Native private static final byte _yes = 1;
         public static final SegmentLeadingSeparator YES = new SegmentLeadingSeparator(_yes);
     }
 
-    /* No native methods here, but the constants are needed in the supporting JNI code */
-    @GenerateNativeHeader
     public static class NothingToScroll extends Property {
-        private static final byte SHIFT = SegmentLeadingSeparator.SHIFT + SegmentLeadingSeparator.SIZE;
-        private static final byte SIZE = 1;
-        private static final long MASK = (long)0x1 << SHIFT;
+        @Native private static final byte SHIFT = SegmentLeadingSeparator.SHIFT + SegmentLeadingSeparator.SIZE;
+        @Native private static final byte SIZE = 1;
+        @Native private static final long MASK = (long)0x1 << SHIFT;
         private static final PropertyEncoding focused = new PropertyEncoding(MASK, SHIFT);
 
         NothingToScroll(final byte value) {
             super(focused, value);
         }
 
-        private static final byte _no = 0;
+        @Native private static final byte _no = 0;
         public static final NothingToScroll NO = new NothingToScroll(_no);
-        private static final byte _yes = 1;
+        @Native private static final byte _yes = 1;
         public static final NothingToScroll YES = new NothingToScroll(_yes);
     }
 
-    /* No native methods here, but the constants are needed in the supporting JNI code */
-    @GenerateNativeHeader
     public static class WindowTitleBarSeparator extends Property {
-        private static final byte SHIFT = NothingToScroll.SHIFT + NothingToScroll.SIZE;
-        private static final byte SIZE = 1;
-        private static final long MASK = (long)0x1 << SHIFT;
+        @Native private static final byte SHIFT = NothingToScroll.SHIFT + NothingToScroll.SIZE;
+        @Native private static final byte SIZE = 1;
+        @Native private static final long MASK = (long)0x1 << SHIFT;
         private static final PropertyEncoding focused = new PropertyEncoding(MASK, SHIFT);
 
         WindowTitleBarSeparator(final byte value) {
             super(focused, value);
         }
 
-        private static final byte _no = 0;
+        @Native private static final byte _no = 0;
         public static final WindowTitleBarSeparator NO = new WindowTitleBarSeparator(_no);
-        private static final byte _yes = 1;
+        @Native private static final byte _yes = 1;
         public static final WindowTitleBarSeparator YES = new WindowTitleBarSeparator(_yes);
     }
 
-    /* No native methods here, but the constants are needed in the supporting JNI code */
-    @GenerateNativeHeader
     public static class WindowClipCorners extends Property {
-        private static final byte SHIFT = WindowTitleBarSeparator.SHIFT + WindowTitleBarSeparator.SIZE;
-        private static final byte SIZE = 1;
-        private static final long MASK = (long)0x1 << SHIFT;
+        @Native private static final byte SHIFT = WindowTitleBarSeparator.SHIFT + WindowTitleBarSeparator.SIZE;
+        @Native private static final byte SIZE = 1;
+        @Native private static final long MASK = (long)0x1 << SHIFT;
         private static final PropertyEncoding focused = new PropertyEncoding(MASK, SHIFT);
 
         WindowClipCorners(final byte value) {
             super(focused, value);
         }
 
-        private static final byte _no = 0;
+        @Native private static final byte _no = 0;
         public static final WindowClipCorners NO = new WindowClipCorners(_no);
-        private static final byte _yes = 1;
+        @Native private static final byte _yes = 1;
         public static final WindowClipCorners YES = new WindowClipCorners(_yes);
     }
 
-    /* No native methods here, but the constants are needed in the supporting JNI code */
-    @GenerateNativeHeader
     public static class ShowArrows extends Property {
-        private static final byte SHIFT = WindowClipCorners.SHIFT + WindowClipCorners.SIZE;
-        private static final byte SIZE = 1;
-        private static final long MASK = (long)0x1 << SHIFT;
+        @Native private static final byte SHIFT = WindowClipCorners.SHIFT + WindowClipCorners.SIZE;
+        @Native private static final byte SIZE = 1;
+        @Native private static final long MASK = (long)0x1 << SHIFT;
         private static final PropertyEncoding showArrows = new PropertyEncoding(MASK, SHIFT);
 
         ShowArrows(final byte value) {
             super(showArrows, value);
         }
 
-        private static final byte _no = 0;
+        @Native private static final byte _no = 0;
         public static final ShowArrows NO = new ShowArrows(_no);
-        private static final byte _yes = 1;
+        @Native private static final byte _yes = 1;
         public static final ShowArrows YES = new ShowArrows(_yes);
     }
 
-    /* No native methods here, but the constants are needed in the supporting JNI code */
-    @GenerateNativeHeader
     public static class BooleanValue extends Property {
-        private static final byte SHIFT = ShowArrows.SHIFT + ShowArrows.SIZE;
-        private static final byte SIZE = 1;
-        private static final long MASK = (long)0x1 << SHIFT;
+        @Native private static final byte SHIFT = ShowArrows.SHIFT + ShowArrows.SIZE;
+        @Native private static final byte SIZE = 1;
+        @Native private static final long MASK = (long)0x1 << SHIFT;
         private static final PropertyEncoding booleanValue = new PropertyEncoding(MASK, SHIFT);
 
         BooleanValue(final byte value) {
             super(booleanValue, value);
         }
 
-        private static final byte _no = 0;
+        @Native private static final byte _no = 0;
         public static final BooleanValue NO = new BooleanValue(_no);
-        private static final byte _yes = 1;
+        @Native private static final byte _yes = 1;
         public static final BooleanValue YES = new BooleanValue(_yes);
     }
 
-    /* No native methods here, but the constants are needed in the supporting JNI code */
-    @GenerateNativeHeader
     public static class Animating extends Property {
-        private static final byte SHIFT = BooleanValue.SHIFT + BooleanValue.SIZE;
-        private static final byte SIZE = 1;
-        private static final long MASK = (long)0x1 << SHIFT;
+        @Native private static final byte SHIFT = BooleanValue.SHIFT + BooleanValue.SIZE;
+        @Native private static final byte SIZE = 1;
+        @Native private static final long MASK = (long)0x1 << SHIFT;
         private static final PropertyEncoding animating = new PropertyEncoding(MASK, SHIFT);
 
         Animating(final byte value) {
             super(animating, value);
         }
 
-        private static final byte _no = 0;
+        @Native private static final byte _no = 0;
         public static final Animating NO = new Animating(_no);
-        private static final byte _yes = 1;
+        @Native private static final byte _yes = 1;
         public static final Animating YES = new Animating(_yes);
     }
 
-    /* No native methods here, but the constants are needed in the supporting JNI code */
-    @GenerateNativeHeader
     public static class Widget extends Property {
-        private static final byte SHIFT = Animating.SHIFT + Animating.SIZE;
-        private static final byte SIZE = 7;
-        private static final long MASK = (long)0x7F << SHIFT;
+        @Native private static final byte SHIFT = Animating.SHIFT + Animating.SIZE;
+        @Native private static final byte SIZE = 7;
+        @Native private static final long MASK = (long)0x7F << SHIFT;
         private static final PropertyEncoding widget = new PropertyEncoding(MASK, SHIFT);
 
         Widget(final byte constant) {
             super(widget, constant);
         }
 
-        private static final byte _background = 1;
+        @Native private static final byte _background = 1;
         public static final Widget BACKGROUND = new Widget(_background);
 
-        private static final byte _buttonBevel = _background + 1;
+        @Native private static final byte _buttonBevel = _background + 1;
         public static final Widget BUTTON_BEVEL = new Widget(_buttonBevel);
-        private static final byte _buttonBevelInset = _buttonBevel + 1;
+        @Native private static final byte _buttonBevelInset = _buttonBevel + 1;
         public static final Widget BUTTON_BEVEL_INSET = new Widget(_buttonBevelInset);
-        private static final byte _buttonBevelRound = _buttonBevelInset + 1;
+        @Native private static final byte _buttonBevelRound = _buttonBevelInset + 1;
         public static final Widget BUTTON_BEVEL_ROUND = new Widget(_buttonBevelRound);
 
-        private static final byte _buttonCheckBox = _buttonBevelRound + 1;
+        @Native private static final byte _buttonCheckBox = _buttonBevelRound + 1;
         public static final Widget BUTTON_CHECK_BOX = new Widget(_buttonCheckBox);
 
-        private static final byte _buttonComboBox = _buttonCheckBox + 1;
+        @Native private static final byte _buttonComboBox = _buttonCheckBox + 1;
         public static final Widget BUTTON_COMBO_BOX = new Widget(_buttonComboBox);
-        private static final byte _buttonComboBoxInset = _buttonComboBox + 1;
+        @Native private static final byte _buttonComboBoxInset = _buttonComboBox + 1;
         public static final Widget BUTTON_COMBO_BOX_INSET = new Widget(_buttonComboBoxInset); // not hooked up in JRSUIConstants.m
 
-        private static final byte _buttonDisclosure = _buttonComboBoxInset + 1;
+        @Native private static final byte _buttonDisclosure = _buttonComboBoxInset + 1;
         public static final Widget BUTTON_DISCLOSURE = new Widget(_buttonDisclosure);
 
-        private static final byte _buttonListHeader = _buttonDisclosure + 1;
+        @Native private static final byte _buttonListHeader = _buttonDisclosure + 1;
         public static final Widget BUTTON_LIST_HEADER = new Widget(_buttonListHeader);
 
-        private static final byte _buttonLittleArrows = _buttonListHeader + 1;
+        @Native private static final byte _buttonLittleArrows = _buttonListHeader + 1;
         public static final Widget BUTTON_LITTLE_ARROWS = new Widget(_buttonLittleArrows);
 
-        private static final byte _buttonPopDown = _buttonLittleArrows + 1;
+        @Native private static final byte _buttonPopDown = _buttonLittleArrows + 1;
         public static final Widget BUTTON_POP_DOWN = new Widget(_buttonPopDown);
-        private static final byte _buttonPopDownInset = _buttonPopDown + 1;
+        @Native private static final byte _buttonPopDownInset = _buttonPopDown + 1;
         public static final Widget BUTTON_POP_DOWN_INSET = new Widget(_buttonPopDownInset);
-        private static final byte _buttonPopDownSquare = _buttonPopDownInset + 1;
+        @Native private static final byte _buttonPopDownSquare = _buttonPopDownInset + 1;
         public static final Widget BUTTON_POP_DOWN_SQUARE = new Widget(_buttonPopDownSquare);
 
-        private static final byte _buttonPopUp = _buttonPopDownSquare + 1;
+        @Native private static final byte _buttonPopUp = _buttonPopDownSquare + 1;
         public static final Widget BUTTON_POP_UP = new Widget(_buttonPopUp);
-        private static final byte _buttonPopUpInset = _buttonPopUp + 1;
+        @Native private static final byte _buttonPopUpInset = _buttonPopUp + 1;
         public static final Widget BUTTON_POP_UP_INSET = new Widget(_buttonPopUpInset);
-        private static final byte _buttonPopUpSquare = _buttonPopUpInset + 1;
+        @Native private static final byte _buttonPopUpSquare = _buttonPopUpInset + 1;
         public static final Widget BUTTON_POP_UP_SQUARE = new Widget(_buttonPopUpSquare);
 
-        private static final byte _buttonPush = _buttonPopUpSquare + 1;
+        @Native private static final byte _buttonPush = _buttonPopUpSquare + 1;
         public static final Widget BUTTON_PUSH = new Widget(_buttonPush);
-        private static final byte _buttonPushScope = _buttonPush + 1;
+        @Native private static final byte _buttonPushScope = _buttonPush + 1;
         public static final Widget BUTTON_PUSH_SCOPE = new Widget(_buttonPushScope);
-        private static final byte _buttonPushScope2 = _buttonPushScope + 1;
+        @Native private static final byte _buttonPushScope2 = _buttonPushScope + 1;
         public static final Widget BUTTON_PUSH_SCOPE2 = new Widget(_buttonPushScope2);
-        private static final byte _buttonPushTextured = _buttonPushScope2 + 1;
+        @Native private static final byte _buttonPushTextured = _buttonPushScope2 + 1;
         public static final Widget BUTTON_PUSH_TEXTURED = new Widget(_buttonPushTextured);
-        private static final byte _buttonPushInset = _buttonPushTextured + 1;
+        @Native private static final byte _buttonPushInset = _buttonPushTextured + 1;
         public static final Widget BUTTON_PUSH_INSET = new Widget(_buttonPushInset);
-        private static final byte _buttonPushInset2 = _buttonPushInset + 1;
+        @Native private static final byte _buttonPushInset2 = _buttonPushInset + 1;
         public static final Widget BUTTON_PUSH_INSET2 = new Widget(_buttonPushInset2);
 
-        private static final byte _buttonRadio = _buttonPushInset2 + 1;
+        @Native private static final byte _buttonRadio = _buttonPushInset2 + 1;
         public static final Widget BUTTON_RADIO = new Widget(_buttonRadio);
 
-        private static final byte _buttonRound = _buttonRadio + 1;
+        @Native private static final byte _buttonRound = _buttonRadio + 1;
         public static final Widget BUTTON_ROUND = new Widget(_buttonRound);
-        private static final byte _buttonRoundHelp = _buttonRound + 1;
+        @Native private static final byte _buttonRoundHelp = _buttonRound + 1;
         public static final Widget BUTTON_ROUND_HELP = new Widget(_buttonRoundHelp);
-        private static final byte _buttonRoundInset = _buttonRoundHelp + 1;
+        @Native private static final byte _buttonRoundInset = _buttonRoundHelp + 1;
         public static final Widget BUTTON_ROUND_INSET = new Widget(_buttonRoundInset);
-        private static final byte _buttonRoundInset2 =_buttonRoundInset + 1;
+        @Native private static final byte _buttonRoundInset2 =_buttonRoundInset + 1;
         public static final Widget BUTTON_ROUND_INSET2 = new Widget(_buttonRoundInset2);
 
-        private static final byte _buttonSearchFieldCancel = _buttonRoundInset2 + 1;
+        @Native private static final byte _buttonSearchFieldCancel = _buttonRoundInset2 + 1;
         public static final Widget BUTTON_SEARCH_FIELD_CANCEL = new Widget(_buttonSearchFieldCancel);
-        private static final byte _buttonSearchFieldFind = _buttonSearchFieldCancel + 1;
+        @Native private static final byte _buttonSearchFieldFind = _buttonSearchFieldCancel + 1;
         public static final Widget BUTTON_SEARCH_FIELD_FIND = new Widget(_buttonSearchFieldFind);
 
-        private static final byte _buttonSegmented = _buttonSearchFieldFind + 1;
+        @Native private static final byte _buttonSegmented = _buttonSearchFieldFind + 1;
         public static final Widget BUTTON_SEGMENTED = new Widget(_buttonSegmented);
-        private static final byte _buttonSegmentedInset = _buttonSegmented + 1;
+        @Native private static final byte _buttonSegmentedInset = _buttonSegmented + 1;
         public static final Widget BUTTON_SEGMENTED_INSET = new Widget(_buttonSegmentedInset);
-        private static final byte _buttonSegmentedInset2 = _buttonSegmentedInset + 1;
+        @Native private static final byte _buttonSegmentedInset2 = _buttonSegmentedInset + 1;
         public static final Widget BUTTON_SEGMENTED_INSET2 = new Widget(_buttonSegmentedInset2);
-        private static final byte _buttonSegmentedSCurve = _buttonSegmentedInset2 + 1;
+        @Native private static final byte _buttonSegmentedSCurve = _buttonSegmentedInset2 + 1;
         public static final Widget BUTTON_SEGMENTED_SCURVE = new Widget(_buttonSegmentedSCurve);
-        private static final byte _buttonSegmentedTextured = _buttonSegmentedSCurve + 1;
+        @Native private static final byte _buttonSegmentedTextured = _buttonSegmentedSCurve + 1;
         public static final Widget BUTTON_SEGMENTED_TEXTURED = new Widget(_buttonSegmentedTextured);
-        private static final byte _buttonSegmentedToolbar = _buttonSegmentedTextured + 1;
+        @Native private static final byte _buttonSegmentedToolbar = _buttonSegmentedTextured + 1;
         public static final Widget BUTTON_SEGMENTED_TOOLBAR = new Widget(_buttonSegmentedToolbar);
 
-        private static final byte _dial = _buttonSegmentedToolbar + 1;
+        @Native private static final byte _dial = _buttonSegmentedToolbar + 1;
         public static final Widget DIAL = new Widget(_dial);
 
-        private static final byte _disclosureTriangle = _dial + 1;
+        @Native private static final byte _disclosureTriangle = _dial + 1;
         public static final Widget DISCLOSURE_TRIANGLE = new Widget(_disclosureTriangle);
 
-        private static final byte _dividerGrabber = _disclosureTriangle + 1;
+        @Native private static final byte _dividerGrabber = _disclosureTriangle + 1;
         public static final Widget DIVIDER_GRABBER = new Widget(_dividerGrabber);
-        private static final byte _dividerSeparatorBar = _dividerGrabber + 1;
+        @Native private static final byte _dividerSeparatorBar = _dividerGrabber + 1;
         public static final Widget DIVIDER_SEPARATOR_BAR = new Widget(_dividerSeparatorBar);
-        private static final byte _dividerSplitter = _dividerSeparatorBar + 1;
+        @Native private static final byte _dividerSplitter = _dividerSeparatorBar + 1;
         public static final Widget DIVIDER_SPLITTER = new Widget(_dividerSplitter);
 
-        private static final byte _focus = _dividerSplitter + 1;
+        @Native private static final byte _focus = _dividerSplitter + 1;
         public static final Widget FOCUS = new Widget(_focus);
 
-        private static final byte _frameGroupBox = _focus + 1;
+        @Native private static final byte _frameGroupBox = _focus + 1;
         public static final Widget FRAME_GROUP_BOX = new Widget(_frameGroupBox);
-        private static final byte _frameGroupBoxSecondary = _frameGroupBox + 1;
+        @Native private static final byte _frameGroupBoxSecondary = _frameGroupBox + 1;
         public static final Widget FRAME_GROUP_BOX_SECONDARY = new Widget(_frameGroupBoxSecondary);
 
-        private static final byte _frameListBox = _frameGroupBoxSecondary + 1;
+        @Native private static final byte _frameListBox = _frameGroupBoxSecondary + 1;
         public static final Widget FRAME_LIST_BOX = new Widget(_frameListBox);
 
-        private static final byte _framePlacard = _frameListBox + 1;
+        @Native private static final byte _framePlacard = _frameListBox + 1;
         public static final Widget FRAME_PLACARD = new Widget(_framePlacard);
 
-        private static final byte _frameTextField = _framePlacard + 1;
+        @Native private static final byte _frameTextField = _framePlacard + 1;
         public static final Widget FRAME_TEXT_FIELD = new Widget(_frameTextField);
-        private static final byte _frameTextFieldRound = _frameTextField + 1;
+        @Native private static final byte _frameTextFieldRound = _frameTextField + 1;
         public static final Widget FRAME_TEXT_FIELD_ROUND = new Widget(_frameTextFieldRound);
 
-        private static final byte _frameWell = _frameTextFieldRound + 1;
+        @Native private static final byte _frameWell = _frameTextFieldRound + 1;
         public static final Widget FRAME_WELL = new Widget(_frameWell);
 
-        private static final byte _growBox = _frameWell + 1;
+        @Native private static final byte _growBox = _frameWell + 1;
         public static final Widget GROW_BOX = new Widget(_growBox);
-        private static final byte _growBoxTextured = _growBox + 1;
+        @Native private static final byte _growBoxTextured = _growBox + 1;
         public static final Widget GROW_BOX_TEXTURED = new Widget(_growBoxTextured);
 
-        private static final byte _gradient = _growBoxTextured + 1;
+        @Native private static final byte _gradient = _growBoxTextured + 1;
         public static final Widget GRADIENT = new Widget(_gradient);
 
-        private static final byte _menu = _gradient + 1;
+        @Native private static final byte _menu = _gradient + 1;
         public static final Widget MENU = new Widget(_menu);
-        private static final byte _menuItem = _menu + 1;
+        @Native private static final byte _menuItem = _menu + 1;
         public static final Widget MENU_ITEM = new Widget(_menuItem);
-        private static final byte _menuBar = _menuItem + 1;
+        @Native private static final byte _menuBar = _menuItem + 1;
         public static final Widget MENU_BAR = new Widget(_menuBar);
-        private static final byte _menuTitle = _menuBar + 1;
+        @Native private static final byte _menuTitle = _menuBar + 1;
         public static final Widget MENU_TITLE = new Widget(_menuTitle);
 
-        private static final byte _progressBar = _menuTitle + 1;
+        @Native private static final byte _progressBar = _menuTitle + 1;
         public static final Widget PROGRESS_BAR = new Widget(_progressBar);
-        private static final byte _progressIndeterminateBar = _progressBar + 1;
+        @Native private static final byte _progressIndeterminateBar = _progressBar + 1;
         public static final Widget PROGRESS_INDETERMINATE_BAR = new Widget(_progressIndeterminateBar);
-        private static final byte _progressRelevance = _progressIndeterminateBar + 1;
+        @Native private static final byte _progressRelevance = _progressIndeterminateBar + 1;
         public static final Widget PROGRESS_RELEVANCE = new Widget(_progressRelevance);
-        private static final byte _progressSpinner = _progressRelevance + 1;
+        @Native private static final byte _progressSpinner = _progressRelevance + 1;
         public static final Widget PROGRESS_SPINNER = new Widget(_progressSpinner);
 
-        private static final byte _scrollBar = _progressSpinner + 1;
+        @Native private static final byte _scrollBar = _progressSpinner + 1;
         public static final Widget SCROLL_BAR = new Widget(_scrollBar);
 
-        private static final byte _scrollColumnSizer = _scrollBar + 1;
+        @Native private static final byte _scrollColumnSizer = _scrollBar + 1;
         public static final Widget SCROLL_COLUMN_SIZER = new Widget(_scrollColumnSizer);
 
-        private static final byte _slider = _scrollColumnSizer + 1;
+        @Native private static final byte _slider = _scrollColumnSizer + 1;
         public static final Widget SLIDER = new Widget(_slider);
-        private static final byte _sliderThumb = _slider + 1;
+        @Native private static final byte _sliderThumb = _slider + 1;
         public static final Widget SLIDER_THUMB = new Widget(_sliderThumb);
 
-        private static final byte _synchronization = _sliderThumb + 1;
+        @Native private static final byte _synchronization = _sliderThumb + 1;
         public static final Widget SYNCHRONIZATION = new Widget(_synchronization);
 
-        private static final byte _tab = _synchronization + 1;
+        @Native private static final byte _tab = _synchronization + 1;
         public static final Widget TAB = new Widget(_tab);
 
-        private static final byte _titleBarCloseBox = _tab + 1;
+        @Native private static final byte _titleBarCloseBox = _tab + 1;
         public static final Widget TITLE_BAR_CLOSE_BOX = new Widget(_titleBarCloseBox);
-        private static final byte _titleBarCollapseBox = _titleBarCloseBox + 1;
+        @Native private static final byte _titleBarCollapseBox = _titleBarCloseBox + 1;
         public static final Widget TITLE_BAR_COLLAPSE_BOX = new Widget(_titleBarCollapseBox);
-        private static final byte _titleBarZoomBox = _titleBarCollapseBox + 1;
+        @Native private static final byte _titleBarZoomBox = _titleBarCollapseBox + 1;
         public static final Widget TITLE_BAR_ZOOM_BOX = new Widget(_titleBarZoomBox);
 
-        private static final byte _titleBarToolbarButton = _titleBarZoomBox + 1;
+        @Native private static final byte _titleBarToolbarButton = _titleBarZoomBox + 1;
         public static final Widget TITLE_BAR_TOOLBAR_BUTTON = new Widget(_titleBarToolbarButton);
 
-        private static final byte _toolbarItemWell = _titleBarToolbarButton + 1;
+        @Native private static final byte _toolbarItemWell = _titleBarToolbarButton + 1;
         public static final Widget TOOLBAR_ITEM_WELL = new Widget(_toolbarItemWell);
 
-        private static final byte _windowFrame = _toolbarItemWell + 1;
+        @Native private static final byte _windowFrame = _toolbarItemWell + 1;
         public static final Widget WINDOW_FRAME = new Widget(_windowFrame);
     }
 
-    /* No native methods here, but the constants are needed in the supporting JNI code */
-    @GenerateNativeHeader
     public static class Hit {
-        private static final int _unknown = -1;
+        @Native private static final int _unknown = -1;
         public static final Hit UNKNOWN = new Hit(_unknown);
-        private static final int _none = 0;
+        @Native private static final int _none = 0;
         public static final Hit NONE = new Hit(_none);
-        private static final int _hit = 1;
+        @Native private static final int _hit = 1;
         public static final Hit HIT = new Hit(_hit);
 
         final int hit;
@@ -831,24 +777,22 @@
         }
     }
 
-    /* No native methods here, but the constants are needed in the supporting JNI code */
-    @GenerateNativeHeader
     public static class ScrollBarHit extends Hit {
-        private static final int _thumb = 2;
+        @Native private static final int _thumb = 2;
         public static final ScrollBarHit THUMB = new ScrollBarHit(_thumb);
 
-        private static final int _trackMin = 3;
+        @Native private static final int _trackMin = 3;
         public static final ScrollBarHit TRACK_MIN = new ScrollBarHit(_trackMin);
-        private static final int _trackMax = 4;
+        @Native private static final int _trackMax = 4;
         public static final ScrollBarHit TRACK_MAX = new ScrollBarHit(_trackMax);
 
-        private static final int _arrowMin = 5;
+        @Native private static final int _arrowMin = 5;
         public static final ScrollBarHit ARROW_MIN = new ScrollBarHit(_arrowMin);
-        private static final int _arrowMax = 6;
+        @Native private static final int _arrowMax = 6;
         public static final ScrollBarHit ARROW_MAX = new ScrollBarHit(_arrowMax);
-        private static final int _arrowMaxInside = 7;
+        @Native private static final int _arrowMaxInside = 7;
         public static final ScrollBarHit ARROW_MAX_INSIDE = new ScrollBarHit(_arrowMaxInside);
-        private static final int _arrowMinInside = 8;
+        @Native private static final int _arrowMinInside = 8;
         public static final ScrollBarHit ARROW_MIN_INSIDE = new ScrollBarHit(_arrowMinInside);
 
         ScrollBarHit(final int hit) { super(hit); }
--- a/src/macosx/classes/com/apple/eawt/FullScreenHandler.java	Mon Apr 01 10:09:27 2013 -0300
+++ b/src/macosx/classes/com/apple/eawt/FullScreenHandler.java	Tue Apr 09 08:36:20 2013 -0300
@@ -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
@@ -33,17 +33,15 @@
 
 import com.apple.eawt.AppEvent.FullScreenEvent;
 
-import javax.tools.annotation.GenerateNativeHeader;
+import java.lang.annotation.Native;
 
-/* No native methods here, but the constants are needed in the supporting JNI code */
-@GenerateNativeHeader
 final class FullScreenHandler {
     private static final String CLIENT_PROPERTY = "com.apple.eawt.event.internalFullScreenHandler";
 
-    static final int FULLSCREEN_WILL_ENTER = 1;
-    static final int FULLSCREEN_DID_ENTER = 2;
-    static final int FULLSCREEN_WILL_EXIT = 3;
-    static final int FULLSCREEN_DID_EXIT = 4;
+    @Native static final int FULLSCREEN_WILL_ENTER = 1;
+    @Native static final int FULLSCREEN_DID_ENTER = 2;
+    @Native static final int FULLSCREEN_WILL_EXIT = 3;
+    @Native static final int FULLSCREEN_DID_EXIT = 4;
 
     // installs a private instance of the handler, if necessary
     static void addFullScreenListenerTo(final RootPaneContainer window, final FullScreenListener listener) {
--- a/src/macosx/classes/com/apple/eawt/event/GestureHandler.java	Mon Apr 01 10:09:27 2013 -0300
+++ b/src/macosx/classes/com/apple/eawt/event/GestureHandler.java	Tue Apr 09 08:36:20 2013 -0300
@@ -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
@@ -31,18 +31,16 @@
 
 import javax.swing.*;
 
-import javax.tools.annotation.GenerateNativeHeader;
+import java.lang.annotation.Native;
 
-/* No native methods here, but the constants are needed in the supporting JNI code */
-@GenerateNativeHeader
 final class GestureHandler {
     private static final String CLIENT_PROPERTY = "com.apple.eawt.event.internalGestureHandler";
 
     // native constants for the supported types of high-level gestures
-    static final int PHASE = 1;
-    static final int ROTATE = 2;
-    static final int MAGNIFY = 3;
-    static final int SWIPE = 4;
+    @Native static final int PHASE = 1;
+    @Native static final int ROTATE = 2;
+    @Native static final int MAGNIFY = 3;
+    @Native static final int SWIPE = 4;
 
     // installs a private instance of GestureHandler, if necessary
     static void addGestureListenerTo(final JComponent component, final GestureListener listener) {
--- a/src/macosx/classes/com/apple/laf/AquaButtonBorder.java	Mon Apr 01 10:09:27 2013 -0300
+++ b/src/macosx/classes/com/apple/laf/AquaButtonBorder.java	Tue Apr 09 08:36:20 2013 -0300
@@ -83,14 +83,19 @@
         painter.state.set(state);
         painter.state.set((state != State.DISABLED && state != State.INACTIVE) && b.isFocusPainted() && isFocused(b) ? Focused.YES : Focused.NO);
 
+        // Full border size of the component.
+        // g.setColor(new Color(0, 255, 0, 70));
+        // g.drawRect(x, y, width - 1, height - 1);
+
         final Insets subInsets = sizeVariant.insets;
         x += subInsets.left;
         y += subInsets.top;
         width -= (subInsets.left + subInsets.right);
         height -= (subInsets.top + subInsets.bottom);
 
-//        g.setColor(Color.magenta);
-//        g.drawRect(x, y, width - 1, height - 1);
+        // Where the native border should start to paint.
+        // g.setColor(new Color(255, 0, 255, 70));
+        // g.drawRect(x, y, width - 1, height - 1);
 
         doButtonPaint(b, model, g, x, y, width, height);
     }
--- a/src/macosx/classes/com/apple/laf/AquaButtonExtendedTypes.java	Mon Apr 01 10:09:27 2013 -0300
+++ b/src/macosx/classes/com/apple/laf/AquaButtonExtendedTypes.java	Tue Apr 09 08:36:20 2013 -0300
@@ -184,30 +184,30 @@
             new BorderDefinedTypeSpecifier("round", Widget.BUTTON_ROUND, new SizeVariant().alterInsets(2, 0, 0, 0).alterMinSize(28, 28), -3, -3, -3, -3),
             new BorderDefinedTypeSpecifier("texturedRound", Widget.BUTTON_ROUND_INSET, new SizeVariant().alterInsets(0, 0, 0, 0).alterMinSize(26, 26), -2, -2, 0, 0),
 
-            new SegmentedBorderDefinedTypeSpecifier("segmented-first", Widget.BUTTON_SEGMENTED, SegmentPosition.FIRST, new SizeVariant().alterMargins(6, 16, 6, 10).alterInsets(5, 3, 5, 0).alterMinSize(0, 28), 0, -3, 0, -3),
-            new SegmentedBorderDefinedTypeSpecifier("segmented-middle", Widget.BUTTON_SEGMENTED, SegmentPosition.MIDDLE, new SizeVariant().alterMargins(6, 9, 6, 10).alterInsets(5, 0, 5, 0).alterMinSize(0, 28), 0, -3, 0, -3),
-            new SegmentedBorderDefinedTypeSpecifier("segmented-last", Widget.BUTTON_SEGMENTED, SegmentPosition.LAST, new SizeVariant().alterMargins(6, 9, 6, 16).alterInsets(5, 0, 5, 3).alterMinSize(0, 28), 0, -3, 0, -3),
-            new SegmentedBorderDefinedTypeSpecifier("segmented-only", Widget.BUTTON_SEGMENTED, SegmentPosition.ONLY, new SizeVariant().alterMargins(6, 16, 6, 16).alterInsets(5, 3, 5, 3).alterMinSize(34, 28), 0, -3, 0, -3),
+            new SegmentedBorderDefinedTypeSpecifier("segmented-first", Widget.BUTTON_SEGMENTED, SegmentPosition.FIRST, new SizeVariant().alterMargins(6, 16, 6, 10).alterInsets(2, 3, 2, 0).alterMinSize(0, 28), 0, -3, 0, -3),
+            new SegmentedBorderDefinedTypeSpecifier("segmented-middle", Widget.BUTTON_SEGMENTED, SegmentPosition.MIDDLE, new SizeVariant().alterMargins(6, 9, 6, 10).alterInsets(2, 0, 2, 0).alterMinSize(0, 28), 0, -3, 0, -3),
+            new SegmentedBorderDefinedTypeSpecifier("segmented-last", Widget.BUTTON_SEGMENTED, SegmentPosition.LAST, new SizeVariant().alterMargins(6, 9, 6, 16).alterInsets(2, 0, 2, 3).alterMinSize(0, 28), 0, -3, 0, -3),
+            new SegmentedBorderDefinedTypeSpecifier("segmented-only", Widget.BUTTON_SEGMENTED, SegmentPosition.ONLY, new SizeVariant().alterMargins(6, 16, 6, 16).alterInsets(2, 3, 2, 3).alterMinSize(34, 28), 0, -3, 0, -3),
 
-            new SegmentedBorderDefinedTypeSpecifier("segmentedRoundRect-first", Widget.BUTTON_SEGMENTED_INSET, SegmentPosition.FIRST, new SizeVariant().alterMargins(6, 12, 6, 8).alterInsets(5, 2, 5, 0).alterMinSize(0, 28), 0, -3, 0, -3),
-            new SegmentedBorderDefinedTypeSpecifier("segmentedRoundRect-middle", Widget.BUTTON_SEGMENTED_INSET, SegmentPosition.MIDDLE, new SizeVariant().alterMargins(6, 8, 6, 8).alterInsets(5, 0, 5, 0).alterMinSize(0, 28), 0, -3, 0, -3),
-            new SegmentedBorderDefinedTypeSpecifier("segmentedRoundRect-last", Widget.BUTTON_SEGMENTED_INSET, SegmentPosition.LAST, new SizeVariant().alterMargins(6, 8, 6, 12).alterInsets(5, 0, 5, 2).alterMinSize(0, 28), 0, -3, 0, -3),
-            new SegmentedBorderDefinedTypeSpecifier("segmentedRoundRect-only", Widget.BUTTON_SEGMENTED_INSET, SegmentPosition.ONLY, new SizeVariant().alterMargins(6, 12, 6, 12).alterInsets(5, 2, 5, 2).alterMinSize(0, 28), 0, -3, 0, -3),
+            new SegmentedBorderDefinedTypeSpecifier("segmentedRoundRect-first", Widget.BUTTON_SEGMENTED_INSET, SegmentPosition.FIRST, new SizeVariant().alterMargins(6, 12, 6, 8).alterInsets(2, 2, 2, 0).alterMinSize(0, 28), 0, -3, 0, -3),
+            new SegmentedBorderDefinedTypeSpecifier("segmentedRoundRect-middle", Widget.BUTTON_SEGMENTED_INSET, SegmentPosition.MIDDLE, new SizeVariant().alterMargins(6, 8, 6, 8).alterInsets(2, 0, 2, 0).alterMinSize(0, 28), 0, -3, 0, -3),
+            new SegmentedBorderDefinedTypeSpecifier("segmentedRoundRect-last", Widget.BUTTON_SEGMENTED_INSET, SegmentPosition.LAST, new SizeVariant().alterMargins(6, 8, 6, 12).alterInsets(2, 0, 2, 2).alterMinSize(0, 28), 0, -3, 0, -3),
+            new SegmentedBorderDefinedTypeSpecifier("segmentedRoundRect-only", Widget.BUTTON_SEGMENTED_INSET, SegmentPosition.ONLY, new SizeVariant().alterMargins(6, 12, 6, 12).alterInsets(2, 2, 2, 2).alterMinSize(0, 28), 0, -3, 0, -3),
 
-            new SegmentedBorderDefinedTypeSpecifier("segmentedTexturedRounded-first", Widget.BUTTON_SEGMENTED_SCURVE, SegmentPosition.FIRST, new SizeVariant().alterMargins(6, 12, 6, 8).alterInsets(5, 2, 5, 0).alterMinSize(0, 28), 0, -3, 0, -3),
-            new SegmentedBorderDefinedTypeSpecifier("segmentedTexturedRounded-middle", Widget.BUTTON_SEGMENTED_SCURVE, SegmentPosition.MIDDLE, new SizeVariant().alterMargins(6, 8, 6, 8).alterInsets(5, 0, 5, 0).alterMinSize(0, 28), 0, -3, 0, -3),
-            new SegmentedBorderDefinedTypeSpecifier("segmentedTexturedRounded-last", Widget.BUTTON_SEGMENTED_SCURVE, SegmentPosition.LAST, new SizeVariant().alterMargins(6, 8, 6, 12).alterInsets(5, 0, 5, 2).alterMinSize(0, 28), 0, -3, 0, -3),
-            new SegmentedBorderDefinedTypeSpecifier("segmentedTexturedRounded-only", Widget.BUTTON_SEGMENTED_SCURVE, SegmentPosition.ONLY, new SizeVariant().alterMargins(6, 12, 6, 12).alterInsets(5, 2, 5, 2).alterMinSize(0, 28), 0, -3, 0, -3),
+            new SegmentedBorderDefinedTypeSpecifier("segmentedTexturedRounded-first", Widget.BUTTON_SEGMENTED_SCURVE, SegmentPosition.FIRST, new SizeVariant().alterMargins(6, 12, 6, 8).alterInsets(2, 2, 2, 0).alterMinSize(0, 28), 0, -3, 0, -3),
+            new SegmentedBorderDefinedTypeSpecifier("segmentedTexturedRounded-middle", Widget.BUTTON_SEGMENTED_SCURVE, SegmentPosition.MIDDLE, new SizeVariant().alterMargins(6, 8, 6, 8).alterInsets(2, 0, 2, 0).alterMinSize(0, 28), 0, -3, 0, -3),
+            new SegmentedBorderDefinedTypeSpecifier("segmentedTexturedRounded-last", Widget.BUTTON_SEGMENTED_SCURVE, SegmentPosition.LAST, new SizeVariant().alterMargins(6, 8, 6, 12).alterInsets(2, 0, 2, 2).alterMinSize(0, 28), 0, -3, 0, -3),
+            new SegmentedBorderDefinedTypeSpecifier("segmentedTexturedRounded-only", Widget.BUTTON_SEGMENTED_SCURVE, SegmentPosition.ONLY, new SizeVariant().alterMargins(6, 12, 6, 12).alterInsets(2, 2, 2, 2).alterMinSize(0, 28), 0, -3, 0, -3),
 
-            new SegmentedBorderDefinedTypeSpecifier("segmentedTextured-first", Widget.BUTTON_SEGMENTED_TEXTURED, SegmentPosition.FIRST, new SizeVariant().alterMargins(6, 12, 6, 8).alterInsets(6, 3, 6, 0).alterMinSize(0, 28), 0, -3, 0, -3),
-            new SegmentedBorderDefinedTypeSpecifier("segmentedTextured-middle", Widget.BUTTON_SEGMENTED_TEXTURED, SegmentPosition.MIDDLE, new SizeVariant().alterMargins(6, 8, 6, 8).alterInsets(6, 0, 6, 0).alterMinSize(0, 28), 0, -3, 0, -3),
-            new SegmentedBorderDefinedTypeSpecifier("segmentedTextured-last", Widget.BUTTON_SEGMENTED_TEXTURED, SegmentPosition.LAST, new SizeVariant().alterMargins(6, 8, 6, 12).alterInsets(6, 0, 6, 3).alterMinSize(0, 28), 0, -3, 0, -3),
-            new SegmentedBorderDefinedTypeSpecifier("segmentedTextured-only", Widget.BUTTON_SEGMENTED_TEXTURED, SegmentPosition.ONLY, new SizeVariant().alterMargins(6, 12, 6, 12).alterInsets(6, 3, 6, 3).alterMinSize(0, 28), 0, -3, 0, -3),
+            new SegmentedBorderDefinedTypeSpecifier("segmentedTextured-first", Widget.BUTTON_SEGMENTED_TEXTURED, SegmentPosition.FIRST, new SizeVariant().alterMargins(6, 12, 6, 8).alterInsets(2, 3, 2, 0).alterMinSize(0, 28), 0, -3, 0, -3),
+            new SegmentedBorderDefinedTypeSpecifier("segmentedTextured-middle", Widget.BUTTON_SEGMENTED_TEXTURED, SegmentPosition.MIDDLE, new SizeVariant().alterMargins(6, 8, 6, 8).alterInsets(2, 0, 2, 0).alterMinSize(0, 28), 0, -3, 0, -3),
+            new SegmentedBorderDefinedTypeSpecifier("segmentedTextured-last", Widget.BUTTON_SEGMENTED_TEXTURED, SegmentPosition.LAST, new SizeVariant().alterMargins(6, 8, 6, 12).alterInsets(2, 0, 2, 3).alterMinSize(0, 28), 0, -3, 0, -3),
+            new SegmentedBorderDefinedTypeSpecifier("segmentedTextured-only", Widget.BUTTON_SEGMENTED_TEXTURED, SegmentPosition.ONLY, new SizeVariant().alterMargins(6, 12, 6, 12).alterInsets(2, 3, 2, 3).alterMinSize(0, 28), 0, -3, 0, -3),
 
-            new SegmentedBorderDefinedTypeSpecifier("segmentedCapsule-first", Widget.BUTTON_SEGMENTED_TOOLBAR, SegmentPosition.FIRST, new SizeVariant().alterMargins(6, 12, 6, 8).alterInsets(5, 2, 5, 0).alterMinSize(0, 28), 0, 0, 0, 0),
-            new SegmentedBorderDefinedTypeSpecifier("segmentedCapsule-middle", Widget.BUTTON_SEGMENTED_TOOLBAR, SegmentPosition.MIDDLE, new SizeVariant().alterMargins(6, 8, 6, 8).alterInsets(5, 0, 5, 0).alterMinSize(0, 28), 0, 0, 0, 0),
-            new SegmentedBorderDefinedTypeSpecifier("segmentedCapsule-last", Widget.BUTTON_SEGMENTED_TOOLBAR, SegmentPosition.LAST, new SizeVariant().alterMargins(6, 8, 6, 12).alterInsets(5, 0, 5, 2).alterMinSize(0, 28), 0, 0, 0, 0),
-            new SegmentedBorderDefinedTypeSpecifier("segmentedCapsule-only", Widget.BUTTON_SEGMENTED_TOOLBAR, SegmentPosition.ONLY, new SizeVariant().alterMargins(6, 12, 6, 12).alterInsets(5, 2, 5, 2).alterMinSize(34, 28), 0, 0, 0, 0),
+            new SegmentedBorderDefinedTypeSpecifier("segmentedCapsule-first", Widget.BUTTON_SEGMENTED_TOOLBAR, SegmentPosition.FIRST, new SizeVariant().alterMargins(6, 12, 6, 8).alterInsets(2, 2, 2, 0).alterMinSize(0, 28), 0, 0, 0, 0),
+            new SegmentedBorderDefinedTypeSpecifier("segmentedCapsule-middle", Widget.BUTTON_SEGMENTED_TOOLBAR, SegmentPosition.MIDDLE, new SizeVariant().alterMargins(6, 8, 6, 8).alterInsets(2, 0, 2, 0).alterMinSize(0, 28), 0, 0, 0, 0),
+            new SegmentedBorderDefinedTypeSpecifier("segmentedCapsule-last", Widget.BUTTON_SEGMENTED_TOOLBAR, SegmentPosition.LAST, new SizeVariant().alterMargins(6, 8, 6, 12).alterInsets(2, 0, 2, 2).alterMinSize(0, 28), 0, 0, 0, 0),
+            new SegmentedBorderDefinedTypeSpecifier("segmentedCapsule-only", Widget.BUTTON_SEGMENTED_TOOLBAR, SegmentPosition.ONLY, new SizeVariant().alterMargins(6, 12, 6, 12).alterInsets(2, 2, 2, 2).alterMinSize(34, 28), 0, 0, 0, 0),
 
             new BorderDefinedTypeSpecifier("segmentedGradient-first", Widget.BUTTON_BEVEL_INSET, new SizeVariant(18, 18).alterMargins(4, 5, 4, 5).replaceInsets(new Insets(-2,-0,-2,-0))),
             new BorderDefinedTypeSpecifier("segmentedGradient-middle", Widget.BUTTON_BEVEL_INSET, new SizeVariant(18, 18).alterMargins(4, 5, 4, 5).replaceInsets(new Insets(-2,-1,-2,-0))),
--- a/src/macosx/classes/sun/java2d/OSXSurfaceData.java	Mon Apr 01 10:09:27 2013 -0300
+++ b/src/macosx/classes/sun/java2d/OSXSurfaceData.java	Tue Apr 09 08:36:20 2013 -0300
@@ -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
@@ -37,13 +37,11 @@
 import sun.java2d.pipe.*;
 import sun.lwawt.macosx.*;
 
-import javax.tools.annotation.GenerateNativeHeader;
+import java.lang.annotation.Native;
 
 /*
  * This is the SurfaceData for a CGContextRef.
  */
-/* No native methods here, but the constants are needed in the supporting JNI code */
-@GenerateNativeHeader
 public abstract class OSXSurfaceData extends BufImgSurfaceData {
     final static float UPPER_BND = Float.MAX_VALUE / 2.0f;
     final static float LOWER_BND = -UPPER_BND;
@@ -198,147 +196,147 @@
      // graphics primitives drawing implementation:
 
     // certain primitives don't care about all the states (ex. drawing an image needs not involve setting current paint)
-    static final int kPrimitive = 0;
-    static final int kImage = 1;
-    static final int kText = 2;
-    static final int kCopyArea = 3;
-    static final int kExternal = 4;
+    @Native static final int kPrimitive = 0;
+    @Native static final int kImage = 1;
+    @Native static final int kText = 2;
+    @Native static final int kCopyArea = 3;
+    @Native static final int kExternal = 4;
 
-    static final int kLine = 5; // belongs to kPrimitive
-    static final int kRect = 6; // belongs to kPrimitive
-    static final int kRoundRect = 7; // belongs to kPrimitive
-    static final int kOval = 8; // belongs to kPrimitive
-    static final int kArc = 9; // belongs to kPrimitive
-    static final int kPolygon = 10; // belongs to kPrimitive
-    static final int kShape = 11; // belongs to kPrimitive
+    @Native static final int kLine = 5; // belongs to kPrimitive
+    @Native static final int kRect = 6; // belongs to kPrimitive
+    @Native static final int kRoundRect = 7; // belongs to kPrimitive
+    @Native static final int kOval = 8; // belongs to kPrimitive
+    @Native static final int kArc = 9; // belongs to kPrimitive
+    @Native static final int kPolygon = 10; // belongs to kPrimitive
+    @Native static final int kShape = 11; // belongs to kPrimitive
     // static final int kImage = 12; // belongs to kImage
-    static final int kString = 13; // belongs to kText
-    static final int kGlyphs = 14; // belongs to kText
-    static final int kUnicodes = 15; // belongs to kText
+    @Native static final int kString = 13; // belongs to kText
+    @Native static final int kGlyphs = 14; // belongs to kText
+    @Native static final int kUnicodes = 15; // belongs to kText
     // static final int kCopyArea = 16; // belongs to kCopyArea
     // static final int kExternal = 17; // belongs to kExternal
 
-    static final int kCommonParameterCount = 1 + 1 + 4 + 4; // type + change flags + color info (type(1) align(1) and
+    @Native static final int kCommonParameterCount = 1 + 1 + 4 + 4; // type + change flags + color info (type(1) align(1) and
                                                             // value(2)) + parameters ((x1, y1, x2, y2) OR (x, y, w, h))
-    static final int kLineParametersCount = kCommonParameterCount; // kCommonParameterCount
-    static final int kRectParametersCount = kCommonParameterCount + 1; // kCommonParameterCount + isfill
-    static final int kRoundRectParametersCount = kCommonParameterCount + 2 + 1; // kCommonParameterCount + arcW + arcH +
+    @Native static final int kLineParametersCount = kCommonParameterCount; // kCommonParameterCount
+    @Native static final int kRectParametersCount = kCommonParameterCount + 1; // kCommonParameterCount + isfill
+    @Native static final int kRoundRectParametersCount = kCommonParameterCount + 2 + 1; // kCommonParameterCount + arcW + arcH +
                                                                                 // isfill
-    static final int kOvalParametersCount = kCommonParameterCount + 1; // kCommonParameterCount + isfill
-    static final int kArcParametersCount = kCommonParameterCount + 2 + 1 + 1;// kCommonParameterCount + startAngle +
+    @Native static final int kOvalParametersCount = kCommonParameterCount + 1; // kCommonParameterCount + isfill
+    @Native static final int kArcParametersCount = kCommonParameterCount + 2 + 1 + 1;// kCommonParameterCount + startAngle +
                                                                              // arcAngle + isfill + type
-    static final int kPolygonParametersCount = 0; // not supported
-    static final int kShapeParametersCount = 0; // not supported
-    static final int kImageParametersCount = kCommonParameterCount + 2 + 2 + 4 + 4; // flip horz vert + w&h + src + dst
-    static final int kStringParametersCount = 0; // not supported
-    static final int kGlyphsParametersCount = 0; // not supported
-    static final int kUnicodesParametersCount = 0; // not supported
-    static final int kPixelParametersCount = 0; // not supported
-    static final int kExternalParametersCount = 0; // not supported
+    @Native static final int kPolygonParametersCount = 0; // not supported
+    @Native static final int kShapeParametersCount = 0; // not supported
+    @Native static final int kImageParametersCount = kCommonParameterCount + 2 + 2 + 4 + 4; // flip horz vert + w&h + src + dst
+    @Native static final int kStringParametersCount = 0; // not supported
+    @Native static final int kGlyphsParametersCount = 0; // not supported
+    @Native static final int kUnicodesParametersCount = 0; // not supported
+    @Native static final int kPixelParametersCount = 0; // not supported
+    @Native static final int kExternalParametersCount = 0; // not supported
 
     // for intParameters
     // states info
-    static final int kChangeFlagIndex = 0; // kBoundsChangedBit | .. | kFontChangedBit
+    @Native static final int kChangeFlagIndex = 0; // kBoundsChangedBit | .. | kFontChangedBit
     // bounds info
-    static final int kBoundsXIndex = 1;
-    static final int kBoundsYIndex = 2;
-    static final int kBoundsWidthIndex = 3;
-    static final int kBoundsHeightIndex = 4;
+    @Native static final int kBoundsXIndex = 1;
+    @Native static final int kBoundsYIndex = 2;
+    @Native static final int kBoundsWidthIndex = 3;
+    @Native static final int kBoundsHeightIndex = 4;
     // clip info
-    static final int kClipStateIndex = 5;
-    static final int kClipNumTypesIndex = 6;
-    static final int kClipNumCoordsIndex = 7;
-    static final int kClipWindingRuleIndex = 8;
-    static final int kClipXIndex = 9;
-    static final int kClipYIndex = 10;
-    static final int kClipWidthIndex = 11;
-    static final int kClipHeightIndex = 12;
+    @Native static final int kClipStateIndex = 5;
+    @Native static final int kClipNumTypesIndex = 6;
+    @Native static final int kClipNumCoordsIndex = 7;
+    @Native static final int kClipWindingRuleIndex = 8;
+    @Native static final int kClipXIndex = 9;
+    @Native static final int kClipYIndex = 10;
+    @Native static final int kClipWidthIndex = 11;
+    @Native static final int kClipHeightIndex = 12;
     // ctm info
-    static final int kCTMaIndex = 13;
-    static final int kCTMbIndex = 14;
-    static final int kCTMcIndex = 15;
-    static final int kCTMdIndex = 16;
-    static final int kCTMtxIndex = 17;
-    static final int kCTMtyIndex = 18;
+    @Native static final int kCTMaIndex = 13;
+    @Native static final int kCTMbIndex = 14;
+    @Native static final int kCTMcIndex = 15;
+    @Native static final int kCTMdIndex = 16;
+    @Native static final int kCTMtxIndex = 17;
+    @Native static final int kCTMtyIndex = 18;
     // color info
-    static final int kColorStateIndex = 19; // kColorSimple or kColorGradient or kColorTexture
-    static final int kColorRGBValueIndex = 20; // if kColorSimple
-    static final int kColorIndexValueIndex = 21; // if kColorSystem
-    static final int kColorPointerIndex = 22; //
-    static final int kColorPointerIndex2 = 23; //
-    static final int kColorRGBValue1Index = 24; // if kColorGradient
-    static final int kColorWidthIndex = 25; // if kColorTexture
-    static final int kColorRGBValue2Index = 26; // if kColorGradient
-    static final int kColorHeightIndex = 27; // if kColorTexture
-    static final int kColorIsCyclicIndex = 28; // if kColorGradient (kColorNonCyclic or kColorCyclic)
-    static final int kColorx1Index = 29;
-    static final int kColortxIndex = 30;
-    static final int kColory1Index = 31;
-    static final int kColortyIndex = 32;
-    static final int kColorx2Index = 33;
-    static final int kColorsxIndex = 34;
-    static final int kColory2Index = 35;
-    static final int kColorsyIndex = 36;
+    @Native static final int kColorStateIndex = 19; // kColorSimple or kColorGradient or kColorTexture
+    @Native static final int kColorRGBValueIndex = 20; // if kColorSimple
+    @Native static final int kColorIndexValueIndex = 21; // if kColorSystem
+    @Native static final int kColorPointerIndex = 22; //
+    @Native static final int kColorPointerIndex2 = 23; //
+    @Native static final int kColorRGBValue1Index = 24; // if kColorGradient
+    @Native static final int kColorWidthIndex = 25; // if kColorTexture
+    @Native static final int kColorRGBValue2Index = 26; // if kColorGradient
+    @Native static final int kColorHeightIndex = 27; // if kColorTexture
+    @Native static final int kColorIsCyclicIndex = 28; // if kColorGradient (kColorNonCyclic or kColorCyclic)
+    @Native static final int kColorx1Index = 29;
+    @Native static final int kColortxIndex = 30;
+    @Native static final int kColory1Index = 31;
+    @Native static final int kColortyIndex = 32;
+    @Native static final int kColorx2Index = 33;
+    @Native static final int kColorsxIndex = 34;
+    @Native static final int kColory2Index = 35;
+    @Native static final int kColorsyIndex = 36;
     // composite info
-    static final int kCompositeRuleIndex = 37; // kCGCompositeClear or ... or kCGCompositeXor
-    static final int kCompositeValueIndex = 38;
+    @Native static final int kCompositeRuleIndex = 37; // kCGCompositeClear or ... or kCGCompositeXor
+    @Native static final int kCompositeValueIndex = 38;
     // stroke info
-    static final int kStrokeJoinIndex = 39; // see BasicStroke.java
-    static final int kStrokeCapIndex = 40; // see BasicStroke.java
-    static final int kStrokeWidthIndex = 41;
-    static final int kStrokeDashPhaseIndex = 42;
-    static final int kStrokeLimitIndex = 43;
+    @Native static final int kStrokeJoinIndex = 39; // see BasicStroke.java
+    @Native static final int kStrokeCapIndex = 40; // see BasicStroke.java
+    @Native static final int kStrokeWidthIndex = 41;
+    @Native static final int kStrokeDashPhaseIndex = 42;
+    @Native static final int kStrokeLimitIndex = 43;
     // hints info
-    static final int kHintsAntialiasIndex = 44;
-    static final int kHintsTextAntialiasIndex = 45;
-    static final int kHintsFractionalMetricsIndex = 46;
-    static final int kHintsRenderingIndex = 47;
-    static final int kHintsInterpolationIndex = 48;
+    @Native static final int kHintsAntialiasIndex = 44;
+    @Native static final int kHintsTextAntialiasIndex = 45;
+    @Native static final int kHintsFractionalMetricsIndex = 46;
+    @Native static final int kHintsRenderingIndex = 47;
+    @Native static final int kHintsInterpolationIndex = 48;
     // live resizing info
-    static final int kCanDrawDuringLiveResizeIndex = 49;
+    @Native static final int kCanDrawDuringLiveResizeIndex = 49;
 
-    static final int kSizeOfParameters = kCanDrawDuringLiveResizeIndex + 1;
+    @Native static final int kSizeOfParameters = kCanDrawDuringLiveResizeIndex + 1;
 
     // for objectParameters
-    static final int kClipCoordinatesIndex = 0;
-    static final int kClipTypesIndex = 1;
-    static final int kTextureImageIndex = 2;
-    static final int kStrokeDashArrayIndex = 3;
-    static final int kFontIndex = 4;
-    static final int kFontPaintIndex = 5;
+    @Native static final int kClipCoordinatesIndex = 0;
+    @Native static final int kClipTypesIndex = 1;
+    @Native static final int kTextureImageIndex = 2;
+    @Native static final int kStrokeDashArrayIndex = 3;
+    @Native static final int kFontIndex = 4;
+    @Native static final int kFontPaintIndex = 5;
 
     // possible state changes
-    static final int kBoundsChangedBit = 1 << 0;
-    static final int kBoundsNotChangedBit = ~kBoundsChangedBit;
-    static final int kClipChangedBit = 1 << 1;
-    static final int kClipNotChangedBit = ~kClipChangedBit;
-    static final int kCTMChangedBit = 1 << 2;
-    static final int kCTMNotChangedBit = ~kCTMChangedBit;
-    static final int kColorChangedBit = 1 << 3;
-    static final int kColorNotChangedBit = ~kColorChangedBit;
-    static final int kCompositeChangedBit = 1 << 4;
-    static final int kCompositeNotChangedBit = ~kCompositeChangedBit;
-    static final int kStrokeChangedBit = 1 << 5;
-    static final int kStrokeNotChangedBit = ~kStrokeChangedBit;
-    static final int kHintsChangedBit = 1 << 6;
-    static final int kHintsNotChangedBit = ~kHintsChangedBit;
-    static final int kFontChangedBit = 1 << 7;
-    static final int kFontNotChangedBit = ~kFontChangedBit;
-    static final int kEverythingChangedFlag = 0xffffffff;
+    @Native static final int kBoundsChangedBit = 1 << 0;
+    @Native static final int kBoundsNotChangedBit = ~kBoundsChangedBit;
+    @Native static final int kClipChangedBit = 1 << 1;
+    @Native static final int kClipNotChangedBit = ~kClipChangedBit;
+    @Native static final int kCTMChangedBit = 1 << 2;
+    @Native static final int kCTMNotChangedBit = ~kCTMChangedBit;
+    @Native static final int kColorChangedBit = 1 << 3;
+    @Native static final int kColorNotChangedBit = ~kColorChangedBit;
+    @Native static final int kCompositeChangedBit = 1 << 4;
+    @Native static final int kCompositeNotChangedBit = ~kCompositeChangedBit;
+    @Native static final int kStrokeChangedBit = 1 << 5;
+    @Native static final int kStrokeNotChangedBit = ~kStrokeChangedBit;
+    @Native static final int kHintsChangedBit = 1 << 6;
+    @Native static final int kHintsNotChangedBit = ~kHintsChangedBit;
+    @Native static final int kFontChangedBit = 1 << 7;
+    @Native static final int kFontNotChangedBit = ~kFontChangedBit;
+    @Native static final int kEverythingChangedFlag = 0xffffffff;
 
     // possible color states
-    static final int kColorSimple = 0;
-    static final int kColorSystem = 1;
-    static final int kColorGradient = 2;
-    static final int kColorTexture = 3;
+    @Native static final int kColorSimple = 0;
+    @Native static final int kColorSystem = 1;
+    @Native static final int kColorGradient = 2;
+    @Native static final int kColorTexture = 3;
 
     // possible gradient color states
-    static final int kColorNonCyclic = 0;
-    static final int kColorCyclic = 1;
+    @Native static final int kColorNonCyclic = 0;
+    @Native static final int kColorCyclic = 1;
 
     // possible clip states
-    static final int kClipRect = 0;
-    static final int kClipShape = 1;
+    @Native static final int kClipRect = 0;
+    @Native static final int kClipShape = 1;
 
     static int getRendererTypeForPrimitive(int primitiveType) {
         switch (primitiveType) {
--- a/src/macosx/classes/sun/lwawt/macosx/CocoaConstants.java	Mon Apr 01 10:09:27 2013 -0300
+++ b/src/macosx/classes/sun/lwawt/macosx/CocoaConstants.java	Tue Apr 09 08:36:20 2013 -0300
@@ -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,10 +25,7 @@
 
 package sun.lwawt.macosx;
 
-import javax.tools.annotation.GenerateNativeHeader;
 
-/* No native methods here, but the constants are needed in the supporting JNI code */
-@GenerateNativeHeader
 public final class CocoaConstants {
     private CocoaConstants(){}
 
--- a/src/macosx/native/jobjc/src/core/PrimitiveCoder.hs	Mon Apr 01 10:09:27 2013 -0300
+++ b/src/macosx/native/jobjc/src/core/PrimitiveCoder.hs	Tue Apr 09 08:36:20 2013 -0300
@@ -2,7 +2,7 @@
 
 {-
 /*
- * 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
@@ -34,7 +34,7 @@
 
 import Data.List
 import Data.Maybe
-import Char
+import Data.Char
 
 data Width = W32 | W64
              deriving (Show, Eq, Bounded, Enum)
@@ -196,8 +196,6 @@
 c2java ntype =
     unlines [
  "// native " ++ ntypeS ++ " -> java " ++ jprimS,
- "/* No native methods here, but the constants are needed in the supporting JNI code */",
- "@GenerateNativeHeader",
  "public static final class " ++ className ++ " extends PrimitiveCoder<" ++ jclassS ++ ">{",
  "\tpublic static final " ++ className ++ " INST = new " ++ className ++ "();",
  "\tpublic " ++ className ++ "(){ super("++ffitypeVal ntype++", \"" ++ [encoding ntype] ++ "\", "++jclassS++".class, "++jprimS++".class); }",
@@ -248,13 +246,10 @@
   putStrLn "package com.apple.jobjc;"
 
   putStrLn "import com.apple.jobjc.JObjCRuntime.Width;"
-  putStrLn "import javax.tools.annotation.GenerateNativeHeader;"
 
   putStrLn "// Auto generated by PrimitiveCoder.hs"
   putStrLn "// Do not edit by hand."
 
-  putStrLn "/* No native methods here, but the constants are needed in the supporting JNI code */"
-  putStrLn "@GenerateNativeHeader"
   putStrLn "public abstract class PrimitiveCoder<T> extends Coder<T>{"
 
   putStrLn "\tpublic PrimitiveCoder(int ffiTypeCode, String objCEncoding, Class jclass, Class jprim){"
--- a/src/macosx/native/jobjc/src/core/java/com/apple/jobjc/CFType.java	Mon Apr 01 10:09:27 2013 -0300
+++ b/src/macosx/native/jobjc/src/core/java/com/apple/jobjc/CFType.java	Tue Apr 09 08:36:20 2013 -0300
@@ -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
@@ -24,10 +24,7 @@
  */
 package com.apple.jobjc;
 
-import javax.tools.annotation.GenerateNativeHeader;
 
-/* No native methods here, but the constants are needed in the supporting JNI code */
-@GenerateNativeHeader
 public class CFType extends Pointer<Void> {
     protected CFType(long ptr) { super(ptr); }
     protected CFType(Pointer<?> ptr) { super(ptr.ptr); }
--- a/src/macosx/native/jobjc/src/core/java/com/apple/jobjc/Coder.java	Mon Apr 01 10:09:27 2013 -0300
+++ b/src/macosx/native/jobjc/src/core/java/com/apple/jobjc/Coder.java	Tue Apr 09 08:36:20 2013 -0300
@@ -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
@@ -35,7 +35,6 @@
 import com.apple.jobjc.PrimitiveCoder.SIntCoder;
 import com.apple.jobjc.PrimitiveCoder.SLongLongCoder;
 import com.apple.jobjc.PrimitiveCoder.SShortCoder;
-import javax.tools.annotation.GenerateNativeHeader;
 
 public abstract class Coder<T> {
     private static native long getNativeFFITypePtrForCode(final int code);
@@ -143,8 +142,6 @@
 
     //
 
-    /* No native methods here, but the constants are needed in the supporting JNI code */
-    @GenerateNativeHeader
     public static final class VoidCoder extends Coder<Object>{
         public static final VoidCoder INST = new VoidCoder();
         public VoidCoder(){ super(FFI_VOID, "v", Void.class, void.class); }
@@ -153,8 +150,6 @@
         @Override public void push(JObjCRuntime runtime, long addr, Object x) { throw new RuntimeException("Trying to push a Void."); }
     }
 
-    /* No native methods here, but the constants are needed in the supporting JNI code */
-    @GenerateNativeHeader
     public static final class UnknownCoder extends Coder<Object> {
         public static final UnknownCoder INST = new UnknownCoder();
         public UnknownCoder(){ super(-1, "?", null, null); }
@@ -163,8 +158,6 @@
         @Override public Object pop(JObjCRuntime runtime, long addr) { throw new RuntimeException("Coder not implemented"); }
     }
 
-    /* No native methods here, but the constants are needed in the supporting JNI code */
-    @GenerateNativeHeader
     public static final class PrimitivePointerCoder extends Coder<Long> {
         public static final PrimitivePointerCoder INST = new PrimitivePointerCoder();
         public PrimitivePointerCoder(){ super(Coder.FFI_PTR, "^?", Long.class, long.class); }
@@ -194,8 +187,6 @@
         @Override public void push(JObjCRuntime runtime, long addr, Long x) { push(runtime, addr, (long) x); }
     }
 
-    /* No native methods here, but the constants are needed in the supporting JNI code */
-    @GenerateNativeHeader
     public static final class PointerCoder extends Coder<Pointer> {
         public static final PointerCoder INST = new PointerCoder();
         public PointerCoder(){ super(FFI_PTR, "^?", Pointer.class); }
@@ -209,8 +200,6 @@
         }
     }
 
-    /* No native methods here, but the constants are needed in the supporting JNI code */
-    @GenerateNativeHeader
     public static final class SELCoder extends Coder<SEL> {
         public static final SELCoder INST = new SELCoder();
         public SELCoder(){ super(FFI_PTR, ":", SEL.class); }
@@ -224,8 +213,6 @@
         }
     }
 
-    /* No native methods here, but the constants are needed in the supporting JNI code */
-    @GenerateNativeHeader
     public static abstract class StructCoder extends Coder<Struct> {
         private final FFIType ffiType;
         final int sizeof;
@@ -267,8 +254,6 @@
         }
     }
 
-    /* No native methods here, but the constants are needed in the supporting JNI code */
-    @GenerateNativeHeader
     public static final class IDCoder extends Coder<ID>{
         public static final IDCoder INST = new IDCoder();
         public IDCoder(){ super(FFI_PTR, "@", ID.class); }
@@ -287,8 +272,6 @@
         }
     }
 
-    /* No native methods here, but the constants are needed in the supporting JNI code */
-    @GenerateNativeHeader
     public static final class NSClassCoder extends Coder<NSClass>{
         public static final NSClassCoder INST = new NSClassCoder();
         public NSClassCoder(){ super(FFI_PTR, "#", NSClass.class); }
--- a/src/macosx/native/jobjc/src/core/java/com/apple/jobjc/FFIType.java	Mon Apr 01 10:09:27 2013 -0300
+++ b/src/macosx/native/jobjc/src/core/java/com/apple/jobjc/FFIType.java	Tue Apr 09 08:36:20 2013 -0300
@@ -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
@@ -26,10 +26,7 @@
 
 import com.apple.jobjc.Coder.PrimitivePointerCoder;
 
-import javax.tools.annotation.GenerateNativeHeader;
 
-/* No native methods here, but the constants are needed in the supporting JNI code */
-@GenerateNativeHeader
 class FFIType{
     private static native void makeFFIType(long ffi_type_buf, long elements_buf);
     private static native int  getFFITypeSizeof();
--- a/src/macosx/native/jobjc/src/core/java/com/apple/jobjc/Function.java	Mon Apr 01 10:09:27 2013 -0300
+++ b/src/macosx/native/jobjc/src/core/java/com/apple/jobjc/Function.java	Tue Apr 09 08:36:20 2013 -0300
@@ -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
@@ -24,10 +24,7 @@
  */
 package com.apple.jobjc;
 
-import javax.tools.annotation.GenerateNativeHeader;
 
-/* No native methods here, but the constants are needed in the supporting JNI code */
-@GenerateNativeHeader
 public class Function {
     private static native long getFxnPtrForFunctionName(final String functionName);
     private static native long getFxnPtrForFunctionNameAndLib(final long libPtr, final String functionName);
--- a/src/macosx/native/jobjc/src/core/java/com/apple/jobjc/ID.java	Mon Apr 01 10:09:27 2013 -0300
+++ b/src/macosx/native/jobjc/src/core/java/com/apple/jobjc/ID.java	Tue Apr 09 08:36:20 2013 -0300
@@ -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,10 +29,7 @@
 import java.util.LinkedHashMap;
 import java.util.Map;
 
-import javax.tools.annotation.GenerateNativeHeader;
 
-/* No native methods here, but the constants are needed in the supporting JNI code */
-@GenerateNativeHeader
 public class ID extends Pointer<Void>{
     static native String getNativeDescription(final long objPtr);
 
--- a/src/macosx/native/jobjc/src/core/java/com/apple/jobjc/Invoke.java	Mon Apr 01 10:09:27 2013 -0300
+++ b/src/macosx/native/jobjc/src/core/java/com/apple/jobjc/Invoke.java	Tue Apr 09 08:36:20 2013 -0300
@@ -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
@@ -30,18 +30,13 @@
 import com.apple.jobjc.Coder.SELCoder;
 import com.apple.jobjc.Coder.StructCoder;
 
-import javax.tools.annotation.GenerateNativeHeader;
 
-/* No native methods here, but the constants are needed in the supporting JNI code */
-@GenerateNativeHeader
 public abstract class Invoke {
     public abstract void invoke(NativeArgumentBuffer argBuf);
     public abstract void invoke(NativeArgumentBuffer buffer, Struct retvalStruct);
 
     //
 
-    /* No native methods here, but the constants are needed in the supporting JNI code */
-    @GenerateNativeHeader
     public static final class FunCall extends Invoke{
         static native void invoke(long cifPtr, long fxnPtr, long retValPtr, long argsPtr);
 
@@ -78,8 +73,6 @@
         }
     }
 
-    /* No native methods here, but the constants are needed in the supporting JNI code */
-    @GenerateNativeHeader
     public static final class MsgSend extends Invoke{
         static{ System.load("/usr/lib/libobjc.dylib"); }
 
@@ -165,8 +158,6 @@
         }
     }
 
-    /* No native methods here, but the constants are needed in the supporting JNI code */
-    @GenerateNativeHeader
     public static final class MsgSendSuper extends Invoke{
         static{ System.load("/usr/lib/libobjc.dylib"); }
 
--- a/src/macosx/native/jobjc/src/core/java/com/apple/jobjc/JObjCRuntime.java	Mon Apr 01 10:09:27 2013 -0300
+++ b/src/macosx/native/jobjc/src/core/java/com/apple/jobjc/JObjCRuntime.java	Tue Apr 09 08:36:20 2013 -0300
@@ -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
@@ -31,16 +31,11 @@
 
 import sun.misc.Unsafe;
 
-import javax.tools.annotation.GenerateNativeHeader;
 
-/* No native methods here, but the constants are needed in the supporting JNI code */
-@GenerateNativeHeader
 public final class JObjCRuntime {
     static { System.loadLibrary("JObjC"); }
 
-    @GenerateNativeHeader
     public static enum Arch{ ppc, i386, x86_64 };
-    @GenerateNativeHeader
     public static enum Width{ W32, W64 };
 
     public static final Arch ARCH = getArch();
--- a/src/macosx/native/jobjc/src/core/java/com/apple/jobjc/MacOSXFramework.java	Mon Apr 01 10:09:27 2013 -0300
+++ b/src/macosx/native/jobjc/src/core/java/com/apple/jobjc/MacOSXFramework.java	Tue Apr 09 08:36:20 2013 -0300
@@ -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
@@ -25,10 +25,7 @@
 package com.apple.jobjc;
 
 
-import javax.tools.annotation.GenerateNativeHeader;
 
-/* No native methods here, but the constants are needed in the supporting JNI code */
-@GenerateNativeHeader
 public class MacOSXFramework {
     private static native long retainFramework(final String frameworkName);
     private static native void releaseFramework(final long frameworkPtr);
--- a/src/macosx/native/jobjc/src/core/java/com/apple/jobjc/NSClass.java	Mon Apr 01 10:09:27 2013 -0300
+++ b/src/macosx/native/jobjc/src/core/java/com/apple/jobjc/NSClass.java	Tue Apr 09 08:36:20 2013 -0300
@@ -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
@@ -27,13 +27,8 @@
 import java.lang.ref.WeakReference;
 import java.lang.reflect.Constructor;
 
-import javax.tools.annotation.GenerateNativeHeader;
 
-/* No native methods here, but the constants are needed in the supporting JNI code */
-@GenerateNativeHeader
 public class NSClass<T extends ID> extends ID {
-    /* No native methods here, but the constants are needed in the supporting JNI code */
-    @GenerateNativeHeader
     public static class NSClassNotFoundException extends RuntimeException{
         public NSClassNotFoundException(String m){ super(m); }
         public NSClassNotFoundException(String m, Throwable cause){ super(m, cause); }
--- a/src/macosx/native/jobjc/src/core/java/com/apple/jobjc/NativeArgumentBuffer.java	Mon Apr 01 10:09:27 2013 -0300
+++ b/src/macosx/native/jobjc/src/core/java/com/apple/jobjc/NativeArgumentBuffer.java	Tue Apr 09 08:36:20 2013 -0300
@@ -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
@@ -28,10 +28,7 @@
 
 import com.apple.jobjc.Coder.PrimitivePointerCoder;
 
-import javax.tools.annotation.GenerateNativeHeader;
 
-/* No native methods here, but the constants are needed in the supporting JNI code */
-@GenerateNativeHeader
 public final class NativeArgumentBuffer{
     private static final ThreadLocal<NativeArgumentBuffer> threadLocal = new ThreadLocal<NativeArgumentBuffer>();
 
--- a/src/macosx/native/jobjc/src/core/java/com/apple/jobjc/NativeBuffer.java	Mon Apr 01 10:09:27 2013 -0300
+++ b/src/macosx/native/jobjc/src/core/java/com/apple/jobjc/NativeBuffer.java	Tue Apr 09 08:36:20 2013 -0300
@@ -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
@@ -27,13 +27,10 @@
 import java.nio.ByteBuffer;
 import java.nio.ByteOrder;
 
-import javax.tools.annotation.GenerateNativeHeader;
 
 /**
  * A wrapper around a direct ByteBuffer and its native pointer. For documentation, @see java.nio.ByteBuffer
  */
-/* No native methods here, but the constants are needed in the supporting JNI code */
-@GenerateNativeHeader
 public class NativeBuffer {
     static native long getPtrOfBuffer(final ByteBuffer byteBuffer);
 
--- a/src/macosx/native/jobjc/src/core/java/com/apple/jobjc/NativeObjectLifecycleManager.java	Mon Apr 01 10:09:27 2013 -0300
+++ b/src/macosx/native/jobjc/src/core/java/com/apple/jobjc/NativeObjectLifecycleManager.java	Tue Apr 09 08:36:20 2013 -0300
@@ -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
@@ -24,10 +24,7 @@
  */
 package com.apple.jobjc;
 
-import javax.tools.annotation.GenerateNativeHeader;
 
-/* No native methods here, but the constants are needed in the supporting JNI code */
-@GenerateNativeHeader
 public abstract class NativeObjectLifecycleManager {
     private static native void retainNativeObject(final long ptr);
     private static native void releaseNativeObject(final long ptr);
@@ -37,8 +34,6 @@
     abstract void end(final long ptr);
     boolean shouldPreRetain() { return false; }
 
-    /* No native methods here, but the constants are needed in the supporting JNI code */
-    @GenerateNativeHeader
     public static class CFRetainRelease extends NativeObjectLifecycleManager {
         public static final NativeObjectLifecycleManager INST = new CFRetainRelease();
         @Override void begin(final long ptr) { retainNativeObject(ptr); }
@@ -46,16 +41,12 @@
         @Override boolean shouldPreRetain() { return true; }
     }
 
-    /* No native methods here, but the constants are needed in the supporting JNI code */
-    @GenerateNativeHeader
     public static class Free extends NativeObjectLifecycleManager {
         public static final NativeObjectLifecycleManager INST = new Free();
         @Override void begin(final long ptr) { }
         @Override void end(final long ptr) { freeNativeObject(ptr); }
     }
 
-    /* No native methods here, but the constants are needed in the supporting JNI code */
-    @GenerateNativeHeader
     public static class Nothing extends NativeObjectLifecycleManager {
         public static final NativeObjectLifecycleManager INST = new Nothing();
         @Override void begin(final long ptr) { }
--- a/src/macosx/native/jobjc/src/core/java/com/apple/jobjc/Opaque.java	Mon Apr 01 10:09:27 2013 -0300
+++ b/src/macosx/native/jobjc/src/core/java/com/apple/jobjc/Opaque.java	Tue Apr 09 08:36:20 2013 -0300
@@ -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
@@ -24,10 +24,7 @@
  */
 package com.apple.jobjc;
 
-import javax.tools.annotation.GenerateNativeHeader;
 
-/* No native methods here, but the constants are needed in the supporting JNI code */
-@GenerateNativeHeader
 public class Opaque extends Pointer<Void> {
     protected Opaque(long ptr) { super(ptr); }
     protected Opaque(Pointer<?> ptr) { super(ptr.ptr); }
--- a/src/macosx/native/jobjc/src/core/java/com/apple/jobjc/Pointer.java	Mon Apr 01 10:09:27 2013 -0300
+++ b/src/macosx/native/jobjc/src/core/java/com/apple/jobjc/Pointer.java	Tue Apr 09 08:36:20 2013 -0300
@@ -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
@@ -24,10 +24,7 @@
  */
 package com.apple.jobjc;
 
-import javax.tools.annotation.GenerateNativeHeader;
 
-/* No native methods here, but the constants are needed in the supporting JNI code */
-@GenerateNativeHeader
 public class Pointer <T> implements Comparable<Pointer<T>>{
     long ptr;
 
--- a/src/macosx/native/jobjc/src/core/java/com/apple/jobjc/PrimitiveCoder.java	Mon Apr 01 10:09:27 2013 -0300
+++ b/src/macosx/native/jobjc/src/core/java/com/apple/jobjc/PrimitiveCoder.java	Tue Apr 09 08:36:20 2013 -0300
@@ -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
@@ -24,11 +24,8 @@
  */
 package com.apple.jobjc;
 import com.apple.jobjc.JObjCRuntime.Width;
-import javax.tools.annotation.GenerateNativeHeader;
 // Auto generated by PrimitiveCoder.hs
 // Do not edit by hand.
-/* No native methods here, but the constants are needed in the supporting JNI code */
-@GenerateNativeHeader
 public abstract class PrimitiveCoder<T> extends Coder<T>{
     public PrimitiveCoder(int ffiTypeCode, String objCEncoding, Class jclass, Class jprim){
         super(ffiTypeCode, objCEncoding, jclass, jprim);
@@ -130,8 +127,6 @@
 
 
 // native BOOL -> java boolean
-/* No native methods here, but the constants are needed in the supporting JNI code */
-@GenerateNativeHeader
 public static final class BoolCoder extends PrimitiveCoder<Boolean>{
     public static final BoolCoder INST = new BoolCoder();
     public BoolCoder(){ super(FFI_SINT8, "B", Boolean.class, boolean.class); }
@@ -175,8 +170,6 @@
 }
 
 // native schar -> java byte
-/* No native methods here, but the constants are needed in the supporting JNI code */
-@GenerateNativeHeader
 public static final class SCharCoder extends PrimitiveCoder<Byte>{
     public static final SCharCoder INST = new SCharCoder();
     public SCharCoder(){ super(FFI_SINT8, "c", Byte.class, byte.class); }
@@ -220,8 +213,6 @@
 }
 
 // native uchar -> java byte
-/* No native methods here, but the constants are needed in the supporting JNI code */
-@GenerateNativeHeader
 public static final class UCharCoder extends PrimitiveCoder<Byte>{
     public static final UCharCoder INST = new UCharCoder();
     public UCharCoder(){ super(FFI_UINT8, "C", Byte.class, byte.class); }
@@ -265,8 +256,6 @@
 }
 
 // native sshort -> java short
-/* No native methods here, but the constants are needed in the supporting JNI code */
-@GenerateNativeHeader
 public static final class SShortCoder extends PrimitiveCoder<Short>{
     public static final SShortCoder INST = new SShortCoder();
     public SShortCoder(){ super(FFI_SINT16, "s", Short.class, short.class); }
@@ -310,8 +299,6 @@
 }
 
 // native ushort -> java short
-/* No native methods here, but the constants are needed in the supporting JNI code */
-@GenerateNativeHeader
 public static final class UShortCoder extends PrimitiveCoder<Short>{
     public static final UShortCoder INST = new UShortCoder();
     public UShortCoder(){ super(FFI_UINT16, "S", Short.class, short.class); }
@@ -355,8 +342,6 @@
 }
 
 // native sint -> java int
-/* No native methods here, but the constants are needed in the supporting JNI code */
-@GenerateNativeHeader
 public static final class SIntCoder extends PrimitiveCoder<Integer>{
     public static final SIntCoder INST = new SIntCoder();
     public SIntCoder(){ super(FFI_SINT32, "i", Integer.class, int.class); }
@@ -400,8 +385,6 @@
 }
 
 // native uint -> java int
-/* No native methods here, but the constants are needed in the supporting JNI code */
-@GenerateNativeHeader
 public static final class UIntCoder extends PrimitiveCoder<Integer>{
     public static final UIntCoder INST = new UIntCoder();
     public UIntCoder(){ super(FFI_UINT32, "I", Integer.class, int.class); }
@@ -445,8 +428,6 @@
 }
 
 // native slong -> java long
-/* No native methods here, but the constants are needed in the supporting JNI code */
-@GenerateNativeHeader
 public static final class SLongCoder extends PrimitiveCoder<Long>{
     public static final SLongCoder INST = new SLongCoder();
     public SLongCoder(){ super((JObjCRuntime.IS64 ? (FFI_SINT64) : (FFI_SINT32)), "l", Long.class, long.class); }
@@ -496,8 +477,6 @@
 }
 
 // native ulong -> java long
-/* No native methods here, but the constants are needed in the supporting JNI code */
-@GenerateNativeHeader
 public static final class ULongCoder extends PrimitiveCoder<Long>{
     public static final ULongCoder INST = new ULongCoder();
     public ULongCoder(){ super((JObjCRuntime.IS64 ? (FFI_UINT64) : (FFI_UINT32)), "L", Long.class, long.class); }
@@ -547,8 +526,6 @@
 }
 
 // native slonglong -> java long
-/* No native methods here, but the constants are needed in the supporting JNI code */
-@GenerateNativeHeader
 public static final class SLongLongCoder extends PrimitiveCoder<Long>{
     public static final SLongLongCoder INST = new SLongLongCoder();
     public SLongLongCoder(){ super(FFI_SINT64, "q", Long.class, long.class); }
@@ -592,8 +569,6 @@
 }
 
 // native ulonglong -> java long
-/* No native methods here, but the constants are needed in the supporting JNI code */
-@GenerateNativeHeader
 public static final class ULongLongCoder extends PrimitiveCoder<Long>{
     public static final ULongLongCoder INST = new ULongLongCoder();
     public ULongLongCoder(){ super(FFI_UINT64, "Q", Long.class, long.class); }
@@ -637,8 +612,6 @@
 }
 
 // native float -> java float
-/* No native methods here, but the constants are needed in the supporting JNI code */
-@GenerateNativeHeader
 public static final class FloatCoder extends PrimitiveCoder<Float>{
     public static final FloatCoder INST = new FloatCoder();
     public FloatCoder(){ super(FFI_FLOAT, "f", Float.class, float.class); }
@@ -682,8 +655,6 @@
 }
 
 // native double -> java double
-/* No native methods here, but the constants are needed in the supporting JNI code */
-@GenerateNativeHeader
 public static final class DoubleCoder extends PrimitiveCoder<Double>{
     public static final DoubleCoder INST = new DoubleCoder();
     public DoubleCoder(){ super(FFI_DOUBLE, "d", Double.class, double.class); }
--- a/src/macosx/native/jobjc/src/core/java/com/apple/jobjc/SEL.java	Mon Apr 01 10:09:27 2013 -0300
+++ b/src/macosx/native/jobjc/src/core/java/com/apple/jobjc/SEL.java	Tue Apr 09 08:36:20 2013 -0300
@@ -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
@@ -24,10 +24,7 @@
  */
 package com.apple.jobjc;
 
-import javax.tools.annotation.GenerateNativeHeader;
 
-/* No native methods here, but the constants are needed in the supporting JNI code */
-@GenerateNativeHeader
 public class SEL {
     static native long getSelectorPtr(String selectorName);
     static native String getSelectorName(long ptr);
--- a/src/macosx/native/jobjc/src/core/java/com/apple/jobjc/Struct.java	Mon Apr 01 10:09:27 2013 -0300
+++ b/src/macosx/native/jobjc/src/core/java/com/apple/jobjc/Struct.java	Tue Apr 09 08:36:20 2013 -0300
@@ -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
@@ -24,13 +24,10 @@
  */
 package com.apple.jobjc;
 
-import javax.tools.annotation.GenerateNativeHeader;
 
 /**
  * A struct is malloced on the C heap and accessed in Java through a ByteBuffer.
  */
-/* No native methods here, but the constants are needed in the supporting JNI code */
-@GenerateNativeHeader
 public abstract class Struct{
     protected final NativeBuffer raw;
     private final JObjCRuntime runtime;
--- a/src/macosx/native/jobjc/src/core/java/com/apple/jobjc/Subclassing.java	Mon Apr 01 10:09:27 2013 -0300
+++ b/src/macosx/native/jobjc/src/core/java/com/apple/jobjc/Subclassing.java	Tue Apr 09 08:36:20 2013 -0300
@@ -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
@@ -33,10 +33,7 @@
 import com.apple.jobjc.Coder.VoidCoder;
 import com.apple.jobjc.Invoke.MsgSend;
 
-import javax.tools.annotation.GenerateNativeHeader;
 
-/* No native methods here, but the constants are needed in the supporting JNI code */
-@GenerateNativeHeader
 final class Subclassing {
     static native long allocateClassPair(long superClass, String name);
     static native boolean addIVarForJObj(long clazz);
--- a/src/macosx/native/jobjc/src/core/native/Invoke.m	Mon Apr 01 10:09:27 2013 -0300
+++ b/src/macosx/native/jobjc/src/core/native/Invoke.m	Tue Apr 09 08:36:20 2013 -0300
@@ -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
@@ -24,8 +24,6 @@
  */
 
 #include "com_apple_jobjc_Invoke_FunCall.h"
-#include "com_apple_jobjc_Invoke_MsgSend.h"
-#include "com_apple_jobjc_Invoke_MsgSendSuper.h"
 #include <ffi/ffi.h>
 #include <objc/message.h>
 #include <JavaNativeFoundation/JavaNativeFoundation.h>
--- a/src/macosx/native/jobjc/src/core/native/JObjCRuntime.m	Mon Apr 01 10:09:27 2013 -0300
+++ b/src/macosx/native/jobjc/src/core/native/JObjCRuntime.m	Tue Apr 09 08:36:20 2013 -0300
@@ -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,6 +23,5 @@
  * questions.
  */
 
-#include "com_apple_jobjc_JObjCRuntime.h"
 #include "Cocoa/Cocoa.h"
 
--- a/src/macosx/native/sun/awt/CGraphicsDevice.m	Mon Apr 01 10:09:27 2013 -0300
+++ b/src/macosx/native/sun/awt/CGraphicsDevice.m	Tue Apr 09 08:36:20 2013 -0300
@@ -49,6 +49,42 @@
     return 0;
 }
 
+static BOOL isValidDisplayMode(CGDisplayModeRef mode){
+    return (1 < CGDisplayModeGetWidth(mode) && 1 < CGDisplayModeGetHeight(mode));
+}
+
+static CFMutableArrayRef getAllValidDisplayModes(jint displayID){
+    CFArrayRef allModes = CGDisplayCopyAllDisplayModes(displayID, NULL);
+
+    CFIndex numModes = CFArrayGetCount(allModes);
+    CFMutableArrayRef validModes = CFArrayCreateMutable(kCFAllocatorDefault, numModes + 1, NULL);
+
+    CFIndex n;
+    for (n=0; n < numModes; n++) {
+        CGDisplayModeRef cRef = (CGDisplayModeRef) CFArrayGetValueAtIndex(allModes, n);
+        if (cRef != NULL && isValidDisplayMode(cRef)) {
+            CFArrayAppendValue(validModes, cRef);
+        }
+    }
+
+    CGDisplayModeRef currentMode = CGDisplayCopyDisplayMode(displayID);
+
+    BOOL containsCurrentMode = NO;
+    numModes = CFArrayGetCount(validModes);
+    for (n=0; n < numModes; n++) {
+        if(CFArrayGetValueAtIndex(validModes, n) == currentMode){
+            containsCurrentMode = YES;
+            break;
+        }
+    }
+
+    if (!containsCurrentMode) {
+        CFArrayAppendValue(validModes, currentMode);
+    }
+
+    return validModes;
+}
+
 /*
  * Find the best possible match in the list of display modes that we can switch to based on
  * the provided parameters.
@@ -198,28 +234,30 @@
 (JNIEnv *env, jclass class, jint displayID, jint w, jint h, jint bpp, jint refrate)
 {
     JNF_COCOA_ENTER(env);
-    CFArrayRef allModes = CGDisplayCopyAllDisplayModes(displayID, NULL);
+    CFArrayRef allModes = getAllValidDisplayModes(displayID);
+
     CGDisplayModeRef closestMatch = getBestModeForParameters(allModes, (int)w, (int)h, (int)bpp, (int)refrate);
+    __block CGError retCode = kCGErrorSuccess;
     if (closestMatch != NULL) {
         [JNFRunLoop performOnMainThreadWaiting:YES withBlock:^(){
             CGDisplayConfigRef config;
-            CGError retCode = CGBeginDisplayConfiguration(&config);
+            retCode = CGBeginDisplayConfiguration(&config);
             if (retCode == kCGErrorSuccess) {
                 CGConfigureDisplayWithDisplayMode(config, displayID, closestMatch, NULL);
-                CGCompleteDisplayConfiguration(config, kCGConfigureForAppOnly);
-                if (config != NULL) {
-                    CFRelease(config);
-                }
+                retCode = CGCompleteDisplayConfiguration(config, kCGConfigureForAppOnly);
             }
         }];
     } else {
         [JNFException raise:env as:kIllegalArgumentException reason:"Invalid display mode"];
     }
 
+    if (retCode != kCGErrorSuccess){
+        [JNFException raise:env as:kIllegalArgumentException reason:"Unable to set display mode!"];
+    }    
+
     CFRelease(allModes);
     JNF_COCOA_EXIT(env);
 }
-
 /*
  * Class:     sun_awt_CGraphicsDevice
  * Method:    nativeGetDisplayMode
@@ -247,7 +285,8 @@
 {
     jobjectArray jreturnArray = NULL;
     JNF_COCOA_ENTER(env);
-    CFArrayRef allModes = CGDisplayCopyAllDisplayModes(displayID, NULL);
+    CFArrayRef allModes = getAllValidDisplayModes(displayID);
+
     CFIndex numModes = CFArrayGetCount(allModes);
     static JNF_CLASS_CACHE(jc_DisplayMode, "java/awt/DisplayMode");
 
--- a/src/macosx/native/sun/awt/PrinterView.m	Mon Apr 01 10:09:27 2013 -0300
+++ b/src/macosx/native/sun/awt/PrinterView.m	Tue Apr 09 08:36:20 2013 -0300
@@ -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
@@ -26,7 +26,6 @@
 #import "PrinterView.h"
 
 #import "java_awt_print_Pageable.h"
-#import "java_awt_print_Printable.h"
 #import "java_awt_print_PageFormat.h"
 
 #import <JavaNativeFoundation/JavaNativeFoundation.h>
--- a/src/macosx/native/sun/util/locale/provider/HostLocaleProviderAdapter_md.c	Mon Apr 01 10:09:27 2013 -0300
+++ b/src/macosx/native/sun/util/locale/provider/HostLocaleProviderAdapter_md.c	Tue Apr 09 08:36:20 2013 -0300
@@ -32,8 +32,8 @@
 static CFDateFormatterStyle convertDateFormatterStyle(jint javaStyle);
 static CFNumberFormatterStyle convertNumberFormatterStyle(jint javaStyle);
 static void copyArrayElements(JNIEnv *env, CFArrayRef cfarray, jobjectArray jarray, CFIndex sindex, int dindex, int count);
-static jstring getNumberSymbolString(JNIEnv *env, jstring jdefault, CFStringRef type);
-static jchar getNumberSymbolChar(jchar jdefault, CFStringRef type);
+static jstring getNumberSymbolString(JNIEnv *env, jstring jlangtag, jstring jdefault, CFStringRef type);
+static jchar getNumberSymbolChar(JNIEnv *env, jstring jlangtag, jchar jdefault, CFStringRef type);
 
 // from java_props_macosx.c
 extern char * getMacOSXLocale(int cat);
@@ -322,7 +322,7 @@
  */
 JNIEXPORT jstring JNICALL Java_sun_util_locale_provider_HostLocaleProviderAdapterImpl_getCurrencySymbol
   (JNIEnv *env, jclass cls, jstring jlangtag, jstring currencySymbol) {
-    return getNumberSymbolString(env, currencySymbol, kCFNumberFormatterCurrencySymbol);
+    return getNumberSymbolString(env, jlangtag, currencySymbol, kCFNumberFormatterCurrencySymbol);
 }
 
 /*
@@ -332,7 +332,7 @@
  */
 JNIEXPORT jchar JNICALL Java_sun_util_locale_provider_HostLocaleProviderAdapterImpl_getDecimalSeparator
   (JNIEnv *env, jclass cls, jstring jlangtag, jchar decimalSeparator) {
-    return getNumberSymbolChar(decimalSeparator, kCFNumberFormatterDecimalSeparator);
+    return getNumberSymbolChar(env, jlangtag, decimalSeparator, kCFNumberFormatterDecimalSeparator);
 }
 
 /*
@@ -342,7 +342,7 @@
  */
 JNIEXPORT jchar JNICALL Java_sun_util_locale_provider_HostLocaleProviderAdapterImpl_getGroupingSeparator
   (JNIEnv *env, jclass cls, jstring jlangtag, jchar groupingSeparator) {
-    return getNumberSymbolChar(groupingSeparator, kCFNumberFormatterGroupingSeparator);
+    return getNumberSymbolChar(env, jlangtag, groupingSeparator, kCFNumberFormatterGroupingSeparator);
 }
 
 /*
@@ -352,7 +352,7 @@
  */
 JNIEXPORT jstring JNICALL Java_sun_util_locale_provider_HostLocaleProviderAdapterImpl_getInfinity
   (JNIEnv *env, jclass cls, jstring jlangtag, jstring infinity) {
-    return getNumberSymbolString(env, infinity, kCFNumberFormatterInfinitySymbol);
+    return getNumberSymbolString(env, jlangtag, infinity, kCFNumberFormatterInfinitySymbol);
 }
 
 /*
@@ -362,7 +362,7 @@
  */
 JNIEXPORT jstring JNICALL Java_sun_util_locale_provider_HostLocaleProviderAdapterImpl_getInternationalCurrencySymbol
   (JNIEnv *env, jclass cls, jstring jlangtag, jstring internationalCurrencySymbol) {
-    return getNumberSymbolString(env, internationalCurrencySymbol, kCFNumberFormatterInternationalCurrencySymbol);
+    return getNumberSymbolString(env, jlangtag, internationalCurrencySymbol, kCFNumberFormatterInternationalCurrencySymbol);
 }
 
 /*
@@ -372,7 +372,7 @@
  */
 JNIEXPORT jchar JNICALL Java_sun_util_locale_provider_HostLocaleProviderAdapterImpl_getMinusSign
   (JNIEnv *env, jclass cls, jstring jlangtag, jchar minusSign) {
-    return getNumberSymbolChar(minusSign, kCFNumberFormatterMinusSign);
+    return getNumberSymbolChar(env, jlangtag, minusSign, kCFNumberFormatterMinusSign);
 }
 
 /*
@@ -382,7 +382,7 @@
  */
 JNIEXPORT jchar JNICALL Java_sun_util_locale_provider_HostLocaleProviderAdapterImpl_getMonetaryDecimalSeparator
   (JNIEnv *env, jclass cls, jstring jlangtag, jchar monetaryDecimalSeparator) {
-    return getNumberSymbolChar(monetaryDecimalSeparator, kCFNumberFormatterCurrencyDecimalSeparator);
+    return getNumberSymbolChar(env, jlangtag, monetaryDecimalSeparator, kCFNumberFormatterCurrencyDecimalSeparator);
 }
 
 /*
@@ -392,7 +392,7 @@
  */
 JNIEXPORT jstring JNICALL Java_sun_util_locale_provider_HostLocaleProviderAdapterImpl_getNaN
   (JNIEnv *env, jclass cls, jstring jlangtag, jstring nan) {
-    return getNumberSymbolString(env, nan, kCFNumberFormatterNaNSymbol);
+    return getNumberSymbolString(env, jlangtag, nan, kCFNumberFormatterNaNSymbol);
 }
 
 /*
@@ -402,7 +402,7 @@
  */
 JNIEXPORT jchar JNICALL Java_sun_util_locale_provider_HostLocaleProviderAdapterImpl_getPercent
   (JNIEnv *env, jclass cls, jstring jlangtag, jchar percent) {
-    return getNumberSymbolChar(percent, kCFNumberFormatterPercentSymbol);
+    return getNumberSymbolChar(env, jlangtag, percent, kCFNumberFormatterPercentSymbol);
 }
 
 /*
@@ -412,7 +412,7 @@
  */
 JNIEXPORT jchar JNICALL Java_sun_util_locale_provider_HostLocaleProviderAdapterImpl_getPerMill
   (JNIEnv *env, jclass cls, jstring jlangtag, jchar perMill) {
-    return getNumberSymbolChar(perMill, kCFNumberFormatterPerMillSymbol);
+    return getNumberSymbolChar(env, jlangtag, perMill, kCFNumberFormatterPerMillSymbol);
 }
 
 /*
@@ -422,7 +422,36 @@
  */
 JNIEXPORT jchar JNICALL Java_sun_util_locale_provider_HostLocaleProviderAdapterImpl_getZeroDigit
   (JNIEnv *env, jclass cls, jstring jlangtag, jchar zeroDigit) {
-    return getNumberSymbolChar(zeroDigit, kCFNumberFormatterZeroSymbol);
+    // The following code *should* work, but not for some reason :o
+    //
+    //return getNumberSymbolChar(env, jlangtag, zeroDigit, kCFNumberFormatterZeroSymbol);
+    //
+    // so here is a workaround.
+    jchar ret = zeroDigit;
+    CFLocaleRef cflocale = CFLocaleCopyCurrent();
+
+    if (cflocale != NULL) {
+        CFNumberFormatterRef nf = CFNumberFormatterCreate(kCFAllocatorDefault,
+                                                  cflocale,
+                                                  kCFNumberFormatterNoStyle);
+        if (nf != NULL) {
+            int zero = 0;
+            CFStringRef str = CFNumberFormatterCreateStringWithValue(kCFAllocatorDefault,
+                              nf, kCFNumberIntType, &zero);
+            if (str != NULL) {
+                if (CFStringGetLength(str) > 0) {
+                    ret = CFStringGetCharacterAtIndex(str, 0);
+                }
+                CFRelease(str);
+            }
+
+            CFRelease(nf);
+        }
+
+        CFRelease(cflocale);
+    }
+
+    return ret;
 }
 
 /*
@@ -432,7 +461,7 @@
  */
 JNIEXPORT jstring JNICALL Java_sun_util_locale_provider_HostLocaleProviderAdapterImpl_getExponentSeparator
   (JNIEnv *env, jclass cls, jstring jlangtag, jstring exponent) {
-    return getNumberSymbolString(env, exponent, kCFNumberFormatterExponentSymbol);
+    return getNumberSymbolString(env, jlangtag, exponent, kCFNumberFormatterExponentSymbol);
 }
 
 /*
@@ -625,7 +654,7 @@
     }
 }
 
-static jstring getNumberSymbolString(JNIEnv *env, jstring jdefault, CFStringRef type) {
+static jstring getNumberSymbolString(JNIEnv *env, jstring jlangtag, jstring jdefault, CFStringRef type) {
     char buf[BUFLEN];
     jstring ret = jdefault;
     CFLocaleRef cflocale = CFLocaleCopyCurrent();
@@ -633,7 +662,7 @@
     if (cflocale != NULL) {
         CFNumberFormatterRef nf = CFNumberFormatterCreate(kCFAllocatorDefault,
                                                   cflocale,
-                                                  kCFNumberFormatterDecimalStyle);
+                                                  kCFNumberFormatterNoStyle);
         if (nf != NULL) {
             CFStringRef str = CFNumberFormatterCopyProperty(nf, type);
             if (str != NULL) {
@@ -651,21 +680,21 @@
     return ret;
 }
 
-static jchar getNumberSymbolChar(jchar jdefault, CFStringRef type) {
-    char buf[BUFLEN];
+static jchar getNumberSymbolChar(JNIEnv *env, jstring jlangtag, jchar jdefault, CFStringRef type) {
     jchar ret = jdefault;
     CFLocaleRef cflocale = CFLocaleCopyCurrent();
 
     if (cflocale != NULL) {
         CFNumberFormatterRef nf = CFNumberFormatterCreate(kCFAllocatorDefault,
                                                   cflocale,
-                                                  kCFNumberFormatterDecimalStyle);
+                                                  kCFNumberFormatterNoStyle);
         if (nf != NULL) {
             CFStringRef str = CFNumberFormatterCopyProperty(nf, type);
             if (str != NULL) {
-                CFStringGetCString(str, buf, BUFLEN, kCFStringEncodingUTF8);
+                if (CFStringGetLength(str) > 0) {
+                    ret = CFStringGetCharacterAtIndex(str, 0);
+                }
                 CFRelease(str);
-                ret = buf[0];
             }
 
             CFRelease(nf);
--- a/src/share/back/export/sys.h	Mon Apr 01 10:09:27 2013 -0300
+++ b/src/share/back/export/sys.h	Tue Apr 09 08:36:20 2013 -0300
@@ -37,7 +37,7 @@
 
 /* Implemented in linker_md.c */
 
-void    dbgsysBuildLibName(char *, int, char *, char *);
+void    dbgsysBuildLibName(char *, int, const char *, const char *);
 void *  dbgsysLoadLibrary(const char *, char *err_buf, int err_buflen);
 void    dbgsysUnloadLibrary(void *);
 void *  dbgsysFindLibraryEntry(void *, const char *);
--- a/src/share/back/transport.c	Mon Apr 01 10:09:27 2013 -0300
+++ b/src/share/back/transport.c	Tue Apr 09 08:36:20 2013 -0300
@@ -97,12 +97,12 @@
 
 /* Load transport library (directory=="" means do system search) */
 static void *
-loadTransportLibrary(char *libdir, char *name)
+loadTransportLibrary(const char *libdir, const char *name)
 {
     void *handle;
     char libname[MAXPATHLEN+2];
     char buf[MAXPATHLEN*2+100];
-    char *plibdir;
+    const char *plibdir;
 
     /* Convert libdir from UTF-8 to platform encoding */
     plibdir = NULL;
@@ -131,12 +131,12 @@
  * JDK 1.2 javai.c v1.61
  */
 static jdwpError
-loadTransport(char *name, jdwpTransportEnv **transportPtr)
+loadTransport(const char *name, jdwpTransportEnv **transportPtr)
 {
     JNIEnv                 *env;
     jdwpTransport_OnLoad_t  onLoad;
     void                   *handle;
-    char                   *libdir;
+    const char             *libdir;
 
     /* Make sure library name is not empty */
     if (name == NULL) {
--- a/src/share/classes/java/awt/Adjustable.java	Mon Apr 01 10:09:27 2013 -0300
+++ b/src/share/classes/java/awt/Adjustable.java	Tue Apr 09 08:36:20 2013 -0300
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2003, 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
@@ -27,7 +27,7 @@
 
 import java.awt.event.*;
 
-import javax.tools.annotation.GenerateNativeHeader;
+import java.lang.annotation.Native;
 
 /**
  * The interface for objects which have an adjustable numeric value
@@ -36,24 +36,22 @@
  * @author Amy Fowler
  * @author Tim Prinzing
  */
-/* No native methods here, but the constants are needed in the supporting JNI code */
-@GenerateNativeHeader
 public interface Adjustable {
 
     /**
      * Indicates that the <code>Adjustable</code> has horizontal orientation.
      */
-    public static final int HORIZONTAL = 0;
+    @Native public static final int HORIZONTAL = 0;
 
     /**
      * Indicates that the <code>Adjustable</code> has vertical orientation.
      */
-    public static final int VERTICAL = 1;
+    @Native public static final int VERTICAL = 1;
 
     /**
      * Indicates that the <code>Adjustable</code> has no orientation.
      */
-    public static final int NO_ORIENTATION = 2;
+    @Native public static final int NO_ORIENTATION = 2;
 
     /**
      * Gets the orientation of the adjustable object.
--- a/src/share/classes/java/awt/AlphaComposite.java	Mon Apr 01 10:09:27 2013 -0300
+++ b/src/share/classes/java/awt/AlphaComposite.java	Tue Apr 09 08:36:20 2013 -0300
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 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
@@ -26,7 +26,7 @@
 package java.awt;
 
 import java.awt.image.ColorModel;
-import javax.tools.annotation.GenerateNativeHeader;
+import java.lang.annotation.Native;
 import sun.java2d.SunCompositeContext;
 
 /**
@@ -350,8 +350,6 @@
  * @see CompositeContext
  */
 
-/* No native methods here, but the constants are needed in the supporting JNI code */
-@GenerateNativeHeader
 public final class AlphaComposite implements Composite {
     /**
      * Both the color and the alpha of the destination are cleared
@@ -364,7 +362,7 @@
      *  <em>C<sub>r</sub></em> = 0
      *</pre>
      */
-    public static final int     CLEAR           = 1;
+    @Native public static final int     CLEAR           = 1;
 
     /**
      * The source is copied to the destination
@@ -377,7 +375,7 @@
      *  <em>C<sub>r</sub></em> = <em>C<sub>s</sub></em>
      *</pre>
      */
-    public static final int     SRC             = 2;
+    @Native public static final int     SRC             = 2;
 
     /**
      * The destination is left untouched
@@ -390,7 +388,7 @@
      *</pre>
      * @since 1.4
      */
-    public static final int     DST             = 9;
+    @Native public static final int     DST             = 9;
     // Note that DST was added in 1.4 so it is numbered out of order...
 
     /**
@@ -403,7 +401,7 @@
      *  <em>C<sub>r</sub></em> = <em>C<sub>s</sub></em> + <em>C<sub>d</sub></em>*(1-<em>A<sub>s</sub></em>)
      *</pre>
      */
-    public static final int     SRC_OVER        = 3;
+    @Native public static final int     SRC_OVER        = 3;
 
     /**
      * The destination is composited over the source and
@@ -416,7 +414,7 @@
      *  <em>C<sub>r</sub></em> = <em>C<sub>s</sub></em>*(1-<em>A<sub>d</sub></em>) + <em>C<sub>d</sub></em>
      *</pre>
      */
-    public static final int     DST_OVER        = 4;
+    @Native public static final int     DST_OVER        = 4;
 
     /**
      * The part of the source lying inside of the destination replaces
@@ -429,7 +427,7 @@
      *  <em>C<sub>r</sub></em> = <em>C<sub>s</sub></em>*<em>A<sub>d</sub></em>
      *</pre>
      */
-    public static final int     SRC_IN          = 5;
+    @Native public static final int     SRC_IN          = 5;
 
     /**
      * The part of the destination lying inside of the source
@@ -442,7 +440,7 @@
      *  <em>C<sub>r</sub></em> = <em>C<sub>d</sub></em>*<em>A<sub>s</sub></em>
      *</pre>
      */
-    public static final int     DST_IN          = 6;
+    @Native public static final int     DST_IN          = 6;
 
     /**
      * The part of the source lying outside of the destination
@@ -455,7 +453,7 @@
      *  <em>C<sub>r</sub></em> = <em>C<sub>s</sub></em>*(1-<em>A<sub>d</sub></em>)
      *</pre>
      */
-    public static final int     SRC_OUT         = 7;
+    @Native public static final int     SRC_OUT         = 7;
 
     /**
      * The part of the destination lying outside of the source
@@ -468,7 +466,7 @@
      *  <em>C<sub>r</sub></em> = <em>C<sub>d</sub></em>*(1-<em>A<sub>s</sub></em>)
      *</pre>
      */
-    public static final int     DST_OUT         = 8;
+    @Native public static final int     DST_OUT         = 8;
 
     // Rule 9 is DST which is defined above where it fits into the
     // list logically, rather than numerically
@@ -487,7 +485,7 @@
      *</pre>
      * @since 1.4
      */
-    public static final int     SRC_ATOP        = 10;
+    @Native public static final int     SRC_ATOP        = 10;
 
     /**
      * The part of the destination lying inside of the source
@@ -501,7 +499,7 @@
      *</pre>
      * @since 1.4
      */
-    public static final int     DST_ATOP        = 11;
+    @Native public static final int     DST_ATOP        = 11;
 
     /**
      * The part of the source that lies outside of the destination
@@ -516,7 +514,7 @@
      *</pre>
      * @since 1.4
      */
-    public static final int     XOR             = 12;
+    @Native public static final int     XOR             = 12;
 
     /**
      * <code>AlphaComposite</code> object that implements the opaque CLEAR rule
@@ -606,8 +604,8 @@
      */
     public static final AlphaComposite Xor      = new AlphaComposite(XOR);
 
-    private static final int MIN_RULE = CLEAR;
-    private static final int MAX_RULE = XOR;
+    @Native private static final int MIN_RULE = CLEAR;
+    @Native private static final int MAX_RULE = XOR;
 
     float extraAlpha;
     int rule;
--- a/src/share/classes/java/awt/BasicStroke.java	Mon Apr 01 10:09:27 2013 -0300
+++ b/src/share/classes/java/awt/BasicStroke.java	Tue Apr 09 08:36:20 2013 -0300
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 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,7 +27,7 @@
 
 import java.beans.ConstructorProperties;
 
-import javax.tools.annotation.GenerateNativeHeader;
+import java.lang.annotation.Native;
 
 /**
  * The <code>BasicStroke</code> class defines a basic set of rendering
@@ -111,47 +111,45 @@
  * @see Graphics2D
  * @author Jim Graham
  */
-/* No native methods here, but the constants are needed in the supporting JNI code */
-@GenerateNativeHeader
 public class BasicStroke implements Stroke {
 
     /**
      * Joins path segments by extending their outside edges until
      * they meet.
      */
-    public final static int JOIN_MITER = 0;
+    @Native public final static int JOIN_MITER = 0;
 
     /**
      * Joins path segments by rounding off the corner at a radius
      * of half the line width.
      */
-    public final static int JOIN_ROUND = 1;
+    @Native public final static int JOIN_ROUND = 1;
 
     /**
      * Joins path segments by connecting the outer corners of their
      * wide outlines with a straight segment.
      */
-    public final static int JOIN_BEVEL = 2;
+    @Native public final static int JOIN_BEVEL = 2;
 
     /**
      * Ends unclosed subpaths and dash segments with no added
      * decoration.
      */
-    public final static int CAP_BUTT = 0;
+    @Native public final static int CAP_BUTT = 0;
 
     /**
      * Ends unclosed subpaths and dash segments with a round
      * decoration that has a radius equal to half of the width
      * of the pen.
      */
-    public final static int CAP_ROUND = 1;
+    @Native public final static int CAP_ROUND = 1;
 
     /**
      * Ends unclosed subpaths and dash segments with a square
      * projection that extends beyond the end of the segment
      * to a distance equal to half of the line width.
      */
-    public final static int CAP_SQUARE = 2;
+    @Native public final static int CAP_SQUARE = 2;
 
     float width;
 
--- a/src/share/classes/java/awt/Choice.java	Mon Apr 01 10:09:27 2013 -0300
+++ b/src/share/classes/java/awt/Choice.java	Tue Apr 09 08:36:20 2013 -0300
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1995, 2008, 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
@@ -34,7 +34,6 @@
 
 import javax.accessibility.*;
 
-import javax.tools.annotation.GenerateNativeHeader;
 
 /**
  * The <code>Choice</code> class presents a pop-up menu of choices.
@@ -71,8 +70,6 @@
  * @author      Arthur van Hoff
  * @since       JDK1.0
  */
-/* No native methods here, but the constants are needed in the supporting JNI code */
-@GenerateNativeHeader
 public class Choice extends Component implements ItemSelectable, Accessible {
     /**
      * The items for the <code>Choice</code>.
--- a/src/share/classes/java/awt/DisplayMode.java	Mon Apr 01 10:09:27 2013 -0300
+++ b/src/share/classes/java/awt/DisplayMode.java	Tue Apr 09 08:36:20 2013 -0300
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 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,7 +25,7 @@
 
 package java.awt;
 
-import javax.tools.annotation.GenerateNativeHeader;
+import java.lang.annotation.Native;
 
 /**
  * The <code>DisplayMode</code> class encapsulates the bit depth, height,
@@ -46,8 +46,6 @@
  * @since 1.4
  */
 
-/* No native methods here, but the constants are needed in the supporting JNI code */
-@GenerateNativeHeader
 public final class DisplayMode {
 
     private Dimension size;
@@ -94,7 +92,7 @@
      * display mode.
      * @see #getBitDepth
      */
-    public final static int BIT_DEPTH_MULTI = -1;
+    @Native public final static int BIT_DEPTH_MULTI = -1;
 
     /**
      * Returns the bit depth of the display, in bits per pixel.  This may be
@@ -112,7 +110,7 @@
      * Value of the refresh rate if not known.
      * @see #getRefreshRate
      */
-    public final static int REFRESH_RATE_UNKNOWN = 0;
+    @Native public final static int REFRESH_RATE_UNKNOWN = 0;
 
     /**
      * Returns the refresh rate of the display, in hertz.  This may be
--- a/src/share/classes/java/awt/Image.java	Mon Apr 01 10:09:27 2013 -0300
+++ b/src/share/classes/java/awt/Image.java	Tue Apr 09 08:36:20 2013 -0300
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1995, 2007, 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
@@ -33,7 +33,6 @@
 
 import sun.awt.image.SurfaceManager;
 
-import javax.tools.annotation.GenerateNativeHeader;
 
 /**
  * The abstract class <code>Image</code> is the superclass of all
@@ -44,8 +43,6 @@
  * @author      Arthur van Hoff
  * @since       JDK1.0
  */
-/* No native methods here, but the constants are needed in the supporting JNI code */
-@GenerateNativeHeader
 public abstract class Image {
 
     /**
--- a/src/share/classes/java/awt/List.java	Mon Apr 01 10:09:27 2013 -0300
+++ b/src/share/classes/java/awt/List.java	Tue Apr 09 08:36:20 2013 -0300
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1995, 2007, 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
@@ -33,7 +33,6 @@
 import java.io.ObjectInputStream;
 import java.io.IOException;
 import javax.accessibility.*;
-import javax.tools.annotation.GenerateNativeHeader;
 
 
 /**
@@ -107,8 +106,6 @@
  * @see         java.awt.event.ActionListener
  * @since       JDK1.0
  */
-/* No native methods here, but the constants are needed in the supporting JNI code */
-@GenerateNativeHeader
 public class List extends Component implements ItemSelectable, Accessible {
     /**
      * A vector created to contain items which will become
--- a/src/share/classes/java/awt/PopupMenu.java	Mon Apr 01 10:09:27 2013 -0300
+++ b/src/share/classes/java/awt/PopupMenu.java	Tue Apr 09 08:36:20 2013 -0300
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2006, 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
@@ -28,7 +28,6 @@
 import java.awt.peer.PopupMenuPeer;
 import javax.accessibility.*;
 
-import javax.tools.annotation.GenerateNativeHeader;
 
 import sun.awt.AWTAccessor;
 
@@ -44,8 +43,6 @@
  *
  * @author      Amy Fowler
  */
-/* No native methods here, but the constants are needed in the supporting JNI code */
-@GenerateNativeHeader
 public class PopupMenu extends Menu {
 
     private static final String base = "popup";
--- a/src/share/classes/java/awt/SystemColor.java	Mon Apr 01 10:09:27 2013 -0300
+++ b/src/share/classes/java/awt/SystemColor.java	Tue Apr 09 08:36:20 2013 -0300
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2007, 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
@@ -26,7 +26,7 @@
 
 import java.io.ObjectStreamException;
 
-import javax.tools.annotation.GenerateNativeHeader;
+import java.lang.annotation.Native;
 
 /**
  * A class to encapsulate symbolic colors representing the color of
@@ -49,8 +49,6 @@
  * @author      Carl Quinn
  * @author      Amy Fowler
  */
-/* No native methods here, but the constants are needed in the supporting JNI code */
-@GenerateNativeHeader
 public final class SystemColor extends Color implements java.io.Serializable {
 
    /**
@@ -58,187 +56,187 @@
      * {@link #desktop} system color.
      * @see SystemColor#desktop
      */
-    public final static int DESKTOP = 0;
+    @Native public final static int DESKTOP = 0;
 
     /**
      * The array index for the
      * {@link #activeCaption} system color.
      * @see SystemColor#activeCaption
      */
-    public final static int ACTIVE_CAPTION = 1;
+    @Native public final static int ACTIVE_CAPTION = 1;
 
     /**
      * The array index for the
      * {@link #activeCaptionText} system color.
      * @see SystemColor#activeCaptionText
      */
-    public final static int ACTIVE_CAPTION_TEXT = 2;
+    @Native public final static int ACTIVE_CAPTION_TEXT = 2;
 
     /**
      * The array index for the
      * {@link #activeCaptionBorder} system color.
      * @see SystemColor#activeCaptionBorder
      */
-    public final static int ACTIVE_CAPTION_BORDER = 3;
+    @Native public final static int ACTIVE_CAPTION_BORDER = 3;
 
     /**
      * The array index for the
      * {@link #inactiveCaption} system color.
      * @see SystemColor#inactiveCaption
      */
-    public final static int INACTIVE_CAPTION = 4;
+    @Native public final static int INACTIVE_CAPTION = 4;
 
     /**
      * The array index for the
      * {@link #inactiveCaptionText} system color.
      * @see SystemColor#inactiveCaptionText
      */
-    public final static int INACTIVE_CAPTION_TEXT = 5;
+    @Native public final static int INACTIVE_CAPTION_TEXT = 5;
 
     /**
      * The array index for the
      * {@link #inactiveCaptionBorder} system color.
      * @see SystemColor#inactiveCaptionBorder
      */
-    public final static int INACTIVE_CAPTION_BORDER = 6;
+    @Native public final static int INACTIVE_CAPTION_BORDER = 6;
 
     /**
      * The array index for the
      * {@link #window} system color.
      * @see SystemColor#window
      */
-    public final static int WINDOW = 7;
+    @Native public final static int WINDOW = 7;
 
     /**
      * The array index for the
      * {@link #windowBorder} system color.
      * @see SystemColor#windowBorder
      */
-    public final static int WINDOW_BORDER = 8;
+    @Native public final static int WINDOW_BORDER = 8;
 
     /**
      * The array index for the
      * {@link #windowText} system color.
      * @see SystemColor#windowText
      */
-    public final static int WINDOW_TEXT = 9;
+    @Native public final static int WINDOW_TEXT = 9;
 
     /**
      * The array index for the
      * {@link #menu} system color.
      * @see SystemColor#menu
      */
-    public final static int MENU = 10;
+    @Native public final static int MENU = 10;
 
     /**
      * The array index for the
      * {@link #menuText} system color.
      * @see SystemColor#menuText
      */
-    public final static int MENU_TEXT = 11;
+    @Native public final static int MENU_TEXT = 11;
 
     /**
      * The array index for the
      * {@link #text} system color.
      * @see SystemColor#text
      */
-    public final static int TEXT = 12;
+    @Native public final static int TEXT = 12;
 
     /**
      * The array index for the
      * {@link #textText} system color.
      * @see SystemColor#textText
      */
-    public final static int TEXT_TEXT = 13;
+    @Native public final static int TEXT_TEXT = 13;
 
     /**
      * The array index for the
      * {@link #textHighlight} system color.
      * @see SystemColor#textHighlight
      */
-    public final static int TEXT_HIGHLIGHT = 14;
+    @Native public final static int TEXT_HIGHLIGHT = 14;
 
     /**
      * The array index for the
      * {@link #textHighlightText} system color.
      * @see SystemColor#textHighlightText
      */
-    public final static int TEXT_HIGHLIGHT_TEXT = 15;
+    @Native public final static int TEXT_HIGHLIGHT_TEXT = 15;
 
     /**
      * The array index for the
      * {@link #textInactiveText} system color.
      * @see SystemColor#textInactiveText
      */
-    public final static int TEXT_INACTIVE_TEXT = 16;
+    @Native public final static int TEXT_INACTIVE_TEXT = 16;
 
     /**
      * The array index for the
      * {@link #control} system color.
      * @see SystemColor#control
      */
-    public final static int CONTROL = 17;
+    @Native public final static int CONTROL = 17;
 
     /**
      * The array index for the
      * {@link #controlText} system color.
      * @see SystemColor#controlText
      */
-    public final static int CONTROL_TEXT = 18;
+    @Native public final static int CONTROL_TEXT = 18;
 
     /**
      * The array index for the
      * {@link #controlHighlight} system color.
      * @see SystemColor#controlHighlight
      */
-    public final static int CONTROL_HIGHLIGHT = 19;
+    @Native public final static int CONTROL_HIGHLIGHT = 19;
 
     /**
      * The array index for the
      * {@link #controlLtHighlight} system color.
      * @see SystemColor#controlLtHighlight
      */
-    public final static int CONTROL_LT_HIGHLIGHT = 20;
+    @Native public final static int CONTROL_LT_HIGHLIGHT = 20;
 
     /**
      * The array index for the
      * {@link #controlShadow} system color.
      * @see SystemColor#controlShadow
      */
-    public final static int CONTROL_SHADOW = 21;
+    @Native public final static int CONTROL_SHADOW = 21;
 
     /**
      * The array index for the
      * {@link #controlDkShadow} system color.
      * @see SystemColor#controlDkShadow
      */
-    public final static int CONTROL_DK_SHADOW = 22;
+    @Native public final static int CONTROL_DK_SHADOW = 22;
 
     /**
      * The array index for the
      * {@link #scrollbar} system color.
      * @see SystemColor#scrollbar
      */
-    public final static int SCROLLBAR = 23;
+    @Native public final static int SCROLLBAR = 23;
 
     /**
      * The array index for the
      * {@link #info} system color.
      * @see SystemColor#info
      */
-    public final static int INFO = 24;
+    @Native public final static int INFO = 24;
 
     /**
      * The array index for the
      * {@link #infoText} system color.
      * @see SystemColor#infoText
      */
-    public final static int INFO_TEXT = 25;
+    @Native public final static int INFO_TEXT = 25;
 
     /**
      * The number of system colors in the array.
      */
-    public final static int NUM_COLORS = 26;
+    @Native public final static int NUM_COLORS = 26;
 
     /******************************************************************************************/
 
--- a/src/share/classes/java/awt/TextComponent.java	Mon Apr 01 10:09:27 2013 -0300
+++ b/src/share/classes/java/awt/TextComponent.java	Tue Apr 09 08:36:20 2013 -0300
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1995, 2006, 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
@@ -35,7 +35,6 @@
 import javax.swing.text.AttributeSet;
 import javax.accessibility.*;
 import java.awt.im.InputMethodRequests;
-import javax.tools.annotation.GenerateNativeHeader;
 
 /**
  * The <code>TextComponent</code> class is the superclass of
@@ -57,8 +56,6 @@
  * @author      Arthur van Hoff
  * @since       JDK1.0
  */
-/* No native methods here, but the constants are needed in the supporting JNI code */
-@GenerateNativeHeader
 public class TextComponent extends Component implements Accessible {
 
     /**
--- a/src/share/classes/java/awt/Transparency.java	Mon Apr 01 10:09:27 2013 -0300
+++ b/src/share/classes/java/awt/Transparency.java	Tue Apr 09 08:36:20 2013 -0300
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 1999, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 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,34 +25,32 @@
 
 package java.awt;
 
-import javax.tools.annotation.GenerateNativeHeader;
+import java.lang.annotation.Native;
 
 /**
  * The <code>Transparency</code> interface defines the common transparency
  * modes for implementing classes.
  */
-/* No native methods here, but the constants are needed in the supporting JNI code */
-@GenerateNativeHeader
 public interface Transparency {
 
     /**
      * Represents image data that is guaranteed to be completely opaque,
      * meaning that all pixels have an alpha value of 1.0.
      */
-    public final static int OPAQUE            = 1;
+    @Native public final static int OPAQUE            = 1;
 
     /**
      * Represents image data that is guaranteed to be either completely
      * opaque, with an alpha value of 1.0, or completely transparent,
      * with an alpha value of 0.0.
      */
-    public final static int BITMASK = 2;
+    @Native public final static int BITMASK = 2;
 
     /**
      * Represents image data that contains or might contain arbitrary
      * alpha values between and including 0.0 and 1.0.
      */
-    public final static int TRANSLUCENT        = 3;
+    @Native public final static int TRANSLUCENT        = 3;
 
     /**
      * Returns the type of this <code>Transparency</code>.
--- a/src/share/classes/java/awt/color/ColorSpace.java	Mon Apr 01 10:09:27 2013 -0300
+++ b/src/share/classes/java/awt/color/ColorSpace.java	Tue Apr 09 08:36:20 2013 -0300
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 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
@@ -35,7 +35,7 @@
 
 package java.awt.color;
 
-import javax.tools.annotation.GenerateNativeHeader;
+import java.lang.annotation.Native;
 
 import sun.java2d.cmm.PCMM;
 import sun.java2d.cmm.CMSManager;
@@ -95,8 +95,6 @@
  * @see ICC_ColorSpace
  */
 
-/* No native methods here, but the constants are needed in the supporting JNI code */
-@GenerateNativeHeader
 public abstract class ColorSpace implements java.io.Serializable {
 
     static final long serialVersionUID = -409452704308689724L;
@@ -115,127 +113,127 @@
     /**
      * Any of the family of XYZ color spaces.
      */
-    public static final int TYPE_XYZ = 0;
+    @Native public static final int TYPE_XYZ = 0;
 
     /**
      * Any of the family of Lab color spaces.
      */
-    public static final int TYPE_Lab = 1;
+    @Native public static final int TYPE_Lab = 1;
 
     /**
      * Any of the family of Luv color spaces.
      */
-    public static final int TYPE_Luv = 2;
+    @Native public static final int TYPE_Luv = 2;
 
     /**
      * Any of the family of YCbCr color spaces.
      */
-    public static final int TYPE_YCbCr = 3;
+    @Native public static final int TYPE_YCbCr = 3;
 
     /**
      * Any of the family of Yxy color spaces.
      */
-    public static final int TYPE_Yxy = 4;
+    @Native public static final int TYPE_Yxy = 4;
 
     /**
      * Any of the family of RGB color spaces.
      */
-    public static final int TYPE_RGB = 5;
+    @Native public static final int TYPE_RGB = 5;
 
     /**
      * Any of the family of GRAY color spaces.
      */
-    public static final int TYPE_GRAY = 6;
+    @Native public static final int TYPE_GRAY = 6;
 
     /**
      * Any of the family of HSV color spaces.
      */
-    public static final int TYPE_HSV = 7;
+    @Native public static final int TYPE_HSV = 7;
 
     /**
      * Any of the family of HLS color spaces.
      */
-    public static final int TYPE_HLS = 8;
+    @Native public static final int TYPE_HLS = 8;
 
     /**
      * Any of the family of CMYK color spaces.
      */
-    public static final int TYPE_CMYK = 9;
+    @Native public static final int TYPE_CMYK = 9;
 
     /**
      * Any of the family of CMY color spaces.
      */
-    public static final int TYPE_CMY = 11;
+    @Native public static final int TYPE_CMY = 11;
 
     /**
      * Generic 2 component color spaces.
      */
-    public static final int TYPE_2CLR = 12;
+    @Native public static final int TYPE_2CLR = 12;
 
     /**
      * Generic 3 component color spaces.
      */
-    public static final int TYPE_3CLR = 13;
+    @Native public static final int TYPE_3CLR = 13;
 
     /**
      * Generic 4 component color spaces.
      */
-    public static final int TYPE_4CLR = 14;
+    @Native public static final int TYPE_4CLR = 14;
 
     /**
      * Generic 5 component color spaces.
      */
-    public static final int TYPE_5CLR = 15;
+    @Native public static final int TYPE_5CLR = 15;
 
     /**
      * Generic 6 component color spaces.
      */
-    public static final int TYPE_6CLR = 16;
+    @Native public static final int TYPE_6CLR = 16;
 
     /**
      * Generic 7 component color spaces.
      */
-    public static final int TYPE_7CLR = 17;
+    @Native public static final int TYPE_7CLR = 17;
 
     /**
      * Generic 8 component color spaces.
      */
-    public static final int TYPE_8CLR = 18;
+    @Native public static final int TYPE_8CLR = 18;
 
     /**
      * Generic 9 component color spaces.
      */
-    public static final int TYPE_9CLR = 19;
+    @Native public static final int TYPE_9CLR = 19;
 
     /**
      * Generic 10 component color spaces.
      */
-    public static final int TYPE_ACLR = 20;
+    @Native public static final int TYPE_ACLR = 20;
 
     /**
      * Generic 11 component color spaces.
      */
-    public static final int TYPE_BCLR = 21;
+    @Native public static final int TYPE_BCLR = 21;
 
     /**
      * Generic 12 component color spaces.
      */
-    public static final int TYPE_CCLR = 22;
+    @Native public static final int TYPE_CCLR = 22;
 
     /**
      * Generic 13 component color spaces.
      */
-    public static final int TYPE_DCLR = 23;
+    @Native public static final int TYPE_DCLR = 23;
 
     /**
      * Generic 14 component color spaces.
      */
-    public static final int TYPE_ECLR = 24;
+    @Native public static final int TYPE_ECLR = 24;
 
     /**
      * Generic 15 component color spaces.
      */
-    public static final int TYPE_FCLR = 25;
+    @Native public static final int TYPE_FCLR = 25;
 
     /**
      * The sRGB color space defined at
@@ -243,28 +241,28 @@
      * http://www.w3.org/pub/WWW/Graphics/Color/sRGB.html
      * </A>.
      */
-    public static final int CS_sRGB = 1000;
+    @Native public static final int CS_sRGB = 1000;
 
     /**
      * A built-in linear RGB color space.  This space is based on the
      * same RGB primaries as CS_sRGB, but has a linear tone reproduction curve.
      */
-    public static final int CS_LINEAR_RGB = 1004;
+    @Native public static final int CS_LINEAR_RGB = 1004;
 
     /**
      * The CIEXYZ conversion color space defined above.
      */
-    public static final int CS_CIEXYZ = 1001;
+    @Native public static final int CS_CIEXYZ = 1001;
 
     /**
      * The Photo YCC conversion color space.
      */
-    public static final int CS_PYCC = 1002;
+    @Native public static final int CS_PYCC = 1002;
 
     /**
      * The built-in linear gray scale color space.
      */
-    public static final int CS_GRAY = 1003;
+    @Native public static final int CS_GRAY = 1003;
 
 
     /**
--- a/src/share/classes/java/awt/color/ICC_Profile.java	Mon Apr 01 10:09:27 2013 -0300
+++ b/src/share/classes/java/awt/color/ICC_Profile.java	Tue Apr 09 08:36:20 2013 -0300
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 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
@@ -58,7 +58,6 @@
 import java.security.AccessController;
 import java.security.PrivilegedAction;
 
-import javax.tools.annotation.GenerateNativeHeader;
 
 /**
  * A representation of color profile data for device independent and
@@ -90,8 +89,6 @@
  */
 
 
-/* No native methods here, but the constants are needed in the supporting JNI code */
-@GenerateNativeHeader
 public class ICC_Profile implements Serializable {
 
     private static final long serialVersionUID = -3938515861990936766L;
--- a/src/share/classes/java/awt/datatransfer/StringSelection.java	Mon Apr 01 10:09:27 2013 -0300
+++ b/src/share/classes/java/awt/datatransfer/StringSelection.java	Tue Apr 09 08:36:20 2013 -0300
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2006, 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
@@ -27,7 +27,6 @@
 
 import java.io.*;
 
-import javax.tools.annotation.GenerateNativeHeader;
 
 /**
  * A <code>Transferable</code> which implements the capability required
@@ -43,8 +42,6 @@
  * @see java.awt.datatransfer.DataFlavor#stringFlavor
  * @see java.awt.datatransfer.DataFlavor#plainTextFlavor
  */
-/* No native methods here, but the constants are needed in the supporting JNI code */
-@GenerateNativeHeader
 public class StringSelection implements Transferable, ClipboardOwner {
 
     private static final int STRING = 0;
--- a/src/share/classes/java/awt/dnd/DnDConstants.java	Mon Apr 01 10:09:27 2013 -0300
+++ b/src/share/classes/java/awt/dnd/DnDConstants.java	Tue Apr 09 08:36:20 2013 -0300
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 1999, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 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,15 +25,13 @@
 
 package java.awt.dnd;
 
-import javax.tools.annotation.GenerateNativeHeader;
+import java.lang.annotation.Native;
 
 /**
  * This class contains constant values representing
  * the type of action(s) to be performed by a Drag and Drop operation.
  * @since 1.2
  */
-/* No native methods here, but the constants are needed in the supporting JNI code */
-@GenerateNativeHeader
 public final class DnDConstants {
 
     private DnDConstants() {} // define null private constructor.
@@ -41,23 +39,23 @@
     /**
      * An <code>int</code> representing no action.
      */
-    public static final int ACTION_NONE         = 0x0;
+    @Native public static final int ACTION_NONE         = 0x0;
 
     /**
      * An <code>int</code> representing a &quot;copy&quot; action.
      */
-    public static final int ACTION_COPY         = 0x1;
+    @Native public static final int ACTION_COPY         = 0x1;
 
     /**
      * An <code>int</code> representing a &quot;move&quot; action.
      */
-    public static final int ACTION_MOVE         = 0x2;
+    @Native public static final int ACTION_MOVE         = 0x2;
 
     /**
      * An <code>int</code> representing a &quot;copy&quot; or
      * &quot;move&quot; action.
      */
-    public static final int ACTION_COPY_OR_MOVE = ACTION_COPY | ACTION_MOVE;
+    @Native public static final int ACTION_COPY_OR_MOVE = ACTION_COPY | ACTION_MOVE;
 
     /**
      * An <code>int</code> representing a &quot;link&quot; action.
@@ -75,12 +73,12 @@
      * results for the user.
      */
 
-    public static final int ACTION_LINK         = 0x40000000;
+    @Native public static final int ACTION_LINK         = 0x40000000;
 
     /**
      * An <code>int</code> representing a &quot;reference&quot;
      * action (synonym for ACTION_LINK).
      */
-    public static final int ACTION_REFERENCE    = ACTION_LINK;
+    @Native public static final int ACTION_REFERENCE    = ACTION_LINK;
 
 }
--- a/src/share/classes/java/awt/event/ActionEvent.java	Mon Apr 01 10:09:27 2013 -0300
+++ b/src/share/classes/java/awt/event/ActionEvent.java	Tue Apr 09 08:36:20 2013 -0300
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2010, 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
@@ -27,7 +27,7 @@
 
 import java.awt.AWTEvent;
 import java.awt.Event;
-import javax.tools.annotation.GenerateNativeHeader;
+import java.lang.annotation.Native;
 
 /**
  * A semantic event which indicates that a component-defined action occurred.
@@ -57,8 +57,6 @@
  * @author Carl Quinn
  * @since 1.1
  */
-/* No native methods here, but the constants are needed in the supporting JNI code */
-@GenerateNativeHeader
 public class ActionEvent extends AWTEvent {
 
     /**
@@ -99,7 +97,7 @@
     /**
      * This event id indicates that a meaningful action occured.
      */
-    public static final int ACTION_PERFORMED    = ACTION_FIRST; //Event.ACTION_EVENT
+    @Native public static final int ACTION_PERFORMED    = ACTION_FIRST; //Event.ACTION_EVENT
 
     /**
      * The nonlocalized string that gives more details
--- a/src/share/classes/java/awt/event/AdjustmentEvent.java	Mon Apr 01 10:09:27 2013 -0300
+++ b/src/share/classes/java/awt/event/AdjustmentEvent.java	Tue Apr 09 08:36:20 2013 -0300
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2008, 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
@@ -27,9 +27,8 @@
 
 import java.awt.Adjustable;
 import java.awt.AWTEvent;
-import javax.tools.annotation.GenerateNativeHeader;
+import java.lang.annotation.Native;
 
-import javax.tools.annotation.GenerateNativeHeader;
 
 /**
  * The adjustment event emitted by Adjustable objects like
@@ -57,8 +56,6 @@
  * @author Amy Fowler
  * @since 1.1
  */
-/* No native methods here, but the constants are needed in the supporting JNI code */
-@GenerateNativeHeader
 public class AdjustmentEvent extends AWTEvent {
 
     /**
@@ -79,27 +76,27 @@
     /**
      * The unit increment adjustment type.
      */
-    public static final int UNIT_INCREMENT      = 1;
+    @Native public static final int UNIT_INCREMENT      = 1;
 
     /**
      * The unit decrement adjustment type.
      */
-    public static final int UNIT_DECREMENT      = 2;
+    @Native public static final int UNIT_DECREMENT      = 2;
 
     /**
      * The block decrement adjustment type.
      */
-    public static final int BLOCK_DECREMENT     = 3;
+    @Native public static final int BLOCK_DECREMENT     = 3;
 
     /**
      * The block increment adjustment type.
      */
-    public static final int BLOCK_INCREMENT     = 4;
+    @Native public static final int BLOCK_INCREMENT     = 4;
 
     /**
      * The absolute tracking adjustment type.
      */
-    public static final int TRACK               = 5;
+    @Native public static final int TRACK               = 5;
 
     /**
      * The adjustable object that fired the event.
--- a/src/share/classes/java/awt/event/ComponentEvent.java	Mon Apr 01 10:09:27 2013 -0300
+++ b/src/share/classes/java/awt/event/ComponentEvent.java	Tue Apr 09 08:36:20 2013 -0300
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2008, 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
@@ -28,7 +28,7 @@
 import java.awt.AWTEvent;
 import java.awt.Component;
 import java.awt.Rectangle;
-import javax.tools.annotation.GenerateNativeHeader;
+import java.lang.annotation.Native;
 
 /**
  * A low-level event which indicates that a component moved, changed
@@ -65,8 +65,6 @@
  * @author Carl Quinn
  * @since 1.1
  */
-/* No native methods here, but the constants are needed in the supporting JNI code */
-@GenerateNativeHeader
 public class ComponentEvent extends AWTEvent {
 
     /**
@@ -82,22 +80,22 @@
    /**
      * This event indicates that the component's position changed.
      */
-    public static final int COMPONENT_MOVED     = COMPONENT_FIRST;
+    @Native public static final int COMPONENT_MOVED     = COMPONENT_FIRST;
 
     /**
      * This event indicates that the component's size changed.
      */
-    public static final int COMPONENT_RESIZED   = 1 + COMPONENT_FIRST;
+    @Native public static final int COMPONENT_RESIZED   = 1 + COMPONENT_FIRST;
 
     /**
      * This event indicates that the component was made visible.
      */
-    public static final int COMPONENT_SHOWN     = 2 + COMPONENT_FIRST;
+    @Native public static final int COMPONENT_SHOWN     = 2 + COMPONENT_FIRST;
 
     /**
      * This event indicates that the component was rendered invisible.
      */
-    public static final int COMPONENT_HIDDEN    = 3 + COMPONENT_FIRST;
+    @Native public static final int COMPONENT_HIDDEN    = 3 + COMPONENT_FIRST;
 
     /*
      * JDK 1.1 serialVersionUID
--- a/src/share/classes/java/awt/event/FocusEvent.java	Mon Apr 01 10:09:27 2013 -0300
+++ b/src/share/classes/java/awt/event/FocusEvent.java	Tue Apr 09 08:36:20 2013 -0300
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2008, 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
@@ -26,7 +26,6 @@
 package java.awt.event;
 
 import java.awt.Component;
-import javax.tools.annotation.GenerateNativeHeader;
 import sun.awt.AppContext;
 import sun.awt.SunToolkit;
 
@@ -64,8 +63,6 @@
  * @author Amy Fowler
  * @since 1.1
  */
-/* No native methods here, but the constants are needed in the supporting JNI code */
-@GenerateNativeHeader
 public class FocusEvent extends ComponentEvent {
 
     /**
--- a/src/share/classes/java/awt/event/InputMethodEvent.java	Mon Apr 01 10:09:27 2013 -0300
+++ b/src/share/classes/java/awt/event/InputMethodEvent.java	Tue Apr 09 08:36:20 2013 -0300
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2007, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 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
@@ -33,7 +33,7 @@
 import java.io.ObjectInputStream;
 import java.text.AttributedCharacterIterator;
 import java.text.CharacterIterator;
-import javax.tools.annotation.GenerateNativeHeader;
+import java.lang.annotation.Native;
 
 /**
  * Input method events contain information about text that is being
@@ -56,8 +56,6 @@
  * @author JavaSoft Asia/Pacific
  * @since 1.2
  */
-/* No native methods here, but the constants are needed in the supporting JNI code */
-@GenerateNativeHeader
 public class InputMethodEvent extends AWTEvent {
 
     /**
@@ -68,25 +66,25 @@
     /**
      * Marks the first integer id for the range of input method event ids.
      */
-    public static final int INPUT_METHOD_FIRST = 1100;
+    @Native public static final int INPUT_METHOD_FIRST = 1100;
 
     /**
      * The event type indicating changed input method text. This event is
      * generated by input methods while processing input.
      */
-    public static final int INPUT_METHOD_TEXT_CHANGED = INPUT_METHOD_FIRST;
+    @Native public static final int INPUT_METHOD_TEXT_CHANGED = INPUT_METHOD_FIRST;
 
     /**
      * The event type indicating a changed insertion point in input method text.
      * This event is
      * generated by input methods while processing input if only the caret changed.
      */
-    public static final int CARET_POSITION_CHANGED = INPUT_METHOD_FIRST + 1;
+    @Native public static final int CARET_POSITION_CHANGED = INPUT_METHOD_FIRST + 1;
 
     /**
      * Marks the last integer id for the range of input method event ids.
      */
-    public static final int INPUT_METHOD_LAST = INPUT_METHOD_FIRST + 1;
+    @Native public static final int INPUT_METHOD_LAST = INPUT_METHOD_FIRST + 1;
 
     /**
      * The time stamp that indicates when the event was created.
--- a/src/share/classes/java/awt/event/MouseWheelEvent.java	Mon Apr 01 10:09:27 2013 -0300
+++ b/src/share/classes/java/awt/event/MouseWheelEvent.java	Tue Apr 09 08:36:20 2013 -0300
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 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,7 +27,7 @@
 
 import java.awt.Component;
 
-import javax.tools.annotation.GenerateNativeHeader;
+import java.lang.annotation.Native;
 
 /**
  * An event which indicates that the mouse wheel was rotated in a component.
@@ -99,8 +99,6 @@
  * @since 1.4
  */
 
-/* No native methods here, but the constants are needed in the supporting JNI code */
-@GenerateNativeHeader
 public class MouseWheelEvent extends MouseEvent {
 
     /**
@@ -109,7 +107,7 @@
      *
      * @see #getScrollType
      */
-    public static final int WHEEL_UNIT_SCROLL = 0;
+    @Native public static final int WHEEL_UNIT_SCROLL = 0;
 
     /**
      * Constant representing scrolling by a "block" (like scrolling
@@ -117,7 +115,7 @@
      *
      * @see #getScrollType
      */
-    public static final int WHEEL_BLOCK_SCROLL = 1;
+    @Native public static final int WHEEL_BLOCK_SCROLL = 1;
 
     /**
      * Indicates what sort of scrolling should take place in response to this
--- a/src/share/classes/java/awt/event/WindowEvent.java	Mon Apr 01 10:09:27 2013 -0300
+++ b/src/share/classes/java/awt/event/WindowEvent.java	Tue Apr 09 08:36:20 2013 -0300
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2008, 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
@@ -26,7 +26,7 @@
 package java.awt.event;
 
 import java.awt.Window;
-import javax.tools.annotation.GenerateNativeHeader;
+import java.lang.annotation.Native;
 import sun.awt.AppContext;
 import sun.awt.SunToolkit;
 
@@ -56,8 +56,6 @@
  *
  * @since JDK1.1
  */
-/* No native methods here, but the constants are needed in the supporting JNI code */
-@GenerateNativeHeader
 public class WindowEvent extends ComponentEvent {
 
     /**
@@ -69,7 +67,7 @@
      * The window opened event.  This event is delivered only
      * the first time a window is made visible.
      */
-    public static final int WINDOW_OPENED       = WINDOW_FIRST; // 200
+    @Native public static final int WINDOW_OPENED       = WINDOW_FIRST; // 200
 
     /**
      * The "window is closing" event. This event is delivered when
@@ -78,13 +76,13 @@
      * while processing this event, the window close operation will be
      * cancelled.
      */
-    public static final int WINDOW_CLOSING      = 1 + WINDOW_FIRST; //Event.WINDOW_DESTROY
+    @Native public static final int WINDOW_CLOSING      = 1 + WINDOW_FIRST; //Event.WINDOW_DESTROY
 
     /**
      * The window closed event. This event is delivered after
      * the window has been closed as the result of a call to dispose.
      */
-    public static final int WINDOW_CLOSED       = 2 + WINDOW_FIRST;
+    @Native public static final int WINDOW_CLOSED       = 2 + WINDOW_FIRST;
 
     /**
      * The window iconified event. This event is delivered when
@@ -93,13 +91,13 @@
      * the icon specified in the window's iconImage property.
      * @see java.awt.Frame#setIconImage
      */
-    public static final int WINDOW_ICONIFIED    = 3 + WINDOW_FIRST; //Event.WINDOW_ICONIFY
+    @Native public static final int WINDOW_ICONIFIED    = 3 + WINDOW_FIRST; //Event.WINDOW_ICONIFY
 
     /**
      * The window deiconified event type. This event is delivered when
      * the window has been changed from a minimized to a normal state.
      */
-    public static final int WINDOW_DEICONIFIED  = 4 + WINDOW_FIRST; //Event.WINDOW_DEICONIFY
+    @Native public static final int WINDOW_DEICONIFIED  = 4 + WINDOW_FIRST; //Event.WINDOW_DEICONIFY
 
     /**
      * The window-activated event type. This event is delivered when the Window
@@ -109,7 +107,7 @@
      * active Window is always either the focused Window, or the first Frame or
      * Dialog that is an owner of the focused Window.
      */
-    public static final int WINDOW_ACTIVATED    = 5 + WINDOW_FIRST;
+    @Native public static final int WINDOW_ACTIVATED    = 5 + WINDOW_FIRST;
 
     /**
      * The window-deactivated event type. This event is delivered when the
@@ -119,21 +117,21 @@
      * title bar. The active Window is always either the focused Window, or the
      * first Frame or Dialog that is an owner of the focused Window.
      */
-    public static final int WINDOW_DEACTIVATED  = 6 + WINDOW_FIRST;
+    @Native public static final int WINDOW_DEACTIVATED  = 6 + WINDOW_FIRST;
 
     /**
      * The window-gained-focus event type. This event is delivered when the
      * Window becomes the focused Window, which means that the Window, or one
      * of its subcomponents, will receive keyboard events.
      */
-    public static final int WINDOW_GAINED_FOCUS = 7 + WINDOW_FIRST;
+    @Native public static final int WINDOW_GAINED_FOCUS = 7 + WINDOW_FIRST;
 
     /**
      * The window-lost-focus event type. This event is delivered when a Window
      * is no longer the focused Window, which means keyboard events will no
      * longer be delivered to the Window or any of its subcomponents.
      */
-    public static final int WINDOW_LOST_FOCUS   = 8 + WINDOW_FIRST;
+    @Native public static final int WINDOW_LOST_FOCUS   = 8 + WINDOW_FIRST;
 
     /**
      * The window-state-changed event type.  This event is delivered
@@ -141,7 +139,7 @@
      * iconified, maximized etc.
      * @since 1.4
      */
-    public static final int WINDOW_STATE_CHANGED = 9 + WINDOW_FIRST;
+    @Native public static final int WINDOW_STATE_CHANGED = 9 + WINDOW_FIRST;
 
     /**
      * The last number in the range of ids used for window events.
--- a/src/share/classes/java/awt/geom/PathIterator.java	Mon Apr 01 10:09:27 2013 -0300
+++ b/src/share/classes/java/awt/geom/PathIterator.java	Tue Apr 09 08:36:20 2013 -0300
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2000, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 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,7 +25,7 @@
 
 package java.awt.geom;
 
-import javax.tools.annotation.GenerateNativeHeader;
+import java.lang.annotation.Native;
 
 /**
  * The <code>PathIterator</code> interface provides the mechanism
@@ -59,8 +59,6 @@
  *
  * @author Jim Graham
  */
-/* No native methods here, but the constants are needed in the supporting JNI code */
-@GenerateNativeHeader
 public interface PathIterator {
     /**
      * The winding rule constant for specifying an even-odd rule
@@ -69,7 +67,7 @@
      * path if a ray drawn in any direction from that point to
      * infinity is crossed by path segments an odd number of times.
      */
-    public static final int WIND_EVEN_ODD       = 0;
+    @Native public static final int WIND_EVEN_ODD       = 0;
 
     /**
      * The winding rule constant for specifying a non-zero rule
@@ -80,20 +78,20 @@
      * of times in the counter-clockwise direction than the
      * clockwise direction.
      */
-    public static final int WIND_NON_ZERO       = 1;
+    @Native public static final int WIND_NON_ZERO       = 1;
 
     /**
      * The segment type constant for a point that specifies the
      * starting location for a new subpath.
      */
-    public static final int SEG_MOVETO          = 0;
+    @Native public static final int SEG_MOVETO          = 0;
 
     /**
      * The segment type constant for a point that specifies the
      * end point of a line to be drawn from the most recently
      * specified point.
      */
-    public static final int SEG_LINETO          = 1;
+    @Native public static final int SEG_LINETO          = 1;
 
     /**
      * The segment type constant for the pair of points that specify
@@ -115,7 +113,7 @@
      *               = n! / (m! * (n-m)!)
      * </pre>
      */
-    public static final int SEG_QUADTO          = 2;
+    @Native public static final int SEG_QUADTO          = 2;
 
     /**
      * The segment type constant for the set of 3 points that specify
@@ -139,14 +137,14 @@
      * </pre>
      * This form of curve is commonly known as a B&eacute;zier curve.
      */
-    public static final int SEG_CUBICTO         = 3;
+    @Native public static final int SEG_CUBICTO         = 3;
 
     /**
      * The segment type constant that specifies that
      * the preceding subpath should be closed by appending a line segment
      * back to the point corresponding to the most recent SEG_MOVETO.
      */
-    public static final int SEG_CLOSE           = 4;
+    @Native public static final int SEG_CLOSE           = 4;
 
     /**
      * Returns the winding rule for determining the interior of the
--- a/src/share/classes/java/awt/image/AffineTransformOp.java	Mon Apr 01 10:09:27 2013 -0300
+++ b/src/share/classes/java/awt/image/AffineTransformOp.java	Tue Apr 09 08:36:20 2013 -0300
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2005, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 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
@@ -34,7 +34,7 @@
 import java.awt.Rectangle;
 import java.awt.RenderingHints;
 import java.awt.Transparency;
-import javax.tools.annotation.GenerateNativeHeader;
+import java.lang.annotation.Native;
 import sun.awt.image.ImagingLib;
 
 /**
@@ -63,8 +63,6 @@
  * @see java.awt.RenderingHints#KEY_COLOR_RENDERING
  * @see java.awt.RenderingHints#KEY_DITHERING
  */
-/* No native methods here, but the constants are needed in the supporting JNI code */
-@GenerateNativeHeader
 public class AffineTransformOp implements BufferedImageOp, RasterOp {
     private AffineTransform xform;
     RenderingHints hints;
@@ -72,17 +70,17 @@
     /**
      * Nearest-neighbor interpolation type.
      */
-    public static final int TYPE_NEAREST_NEIGHBOR = 1;
+    @Native public static final int TYPE_NEAREST_NEIGHBOR = 1;
 
     /**
      * Bilinear interpolation type.
      */
-    public static final int TYPE_BILINEAR = 2;
+    @Native public static final int TYPE_BILINEAR = 2;
 
     /**
      * Bicubic interpolation type.
      */
-    public static final int TYPE_BICUBIC = 3;
+    @Native public static final int TYPE_BICUBIC = 3;
 
     int interpolationType = TYPE_NEAREST_NEIGHBOR;
 
--- a/src/share/classes/java/awt/image/ConvolveOp.java	Mon Apr 01 10:09:27 2013 -0300
+++ b/src/share/classes/java/awt/image/ConvolveOp.java	Tue Apr 09 08:36:20 2013 -0300
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2000, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 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
@@ -30,7 +30,7 @@
 import java.awt.Rectangle;
 import java.awt.RenderingHints;
 import java.awt.geom.Point2D;
-import javax.tools.annotation.GenerateNativeHeader;
+import java.lang.annotation.Native;
 import sun.awt.image.ImagingLib;
 
 /**
@@ -66,8 +66,6 @@
  * @see java.awt.RenderingHints#KEY_COLOR_RENDERING
  * @see java.awt.RenderingHints#KEY_DITHERING
  */
-/* No native methods here, but the constants are needed in the supporting JNI code */
-@GenerateNativeHeader
 public class ConvolveOp implements BufferedImageOp, RasterOp {
     Kernel kernel;
     int edgeHint;
@@ -81,13 +79,13 @@
      * is the default.
      */
 
-    public static final int EDGE_ZERO_FILL = 0;
+    @Native public static final int EDGE_ZERO_FILL = 0;
 
     /**
      * Pixels at the edge of the source image are copied to
      * the corresponding pixels in the destination without modification.
      */
-    public static final int EDGE_NO_OP     = 1;
+    @Native public static final int EDGE_NO_OP     = 1;
 
     /**
      * Constructs a ConvolveOp given a Kernel, an edge condition, and a
--- a/src/share/classes/java/awt/image/DataBuffer.java	Mon Apr 01 10:09:27 2013 -0300
+++ b/src/share/classes/java/awt/image/DataBuffer.java	Tue Apr 09 08:36:20 2013 -0300
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 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
@@ -41,7 +41,7 @@
 
 import sun.awt.image.SunWritableRaster;
 
-import javax.tools.annotation.GenerateNativeHeader;
+import java.lang.annotation.Native;
 
 /**
  * This class exists to wrap one or more data arrays.  Each data array in
@@ -67,30 +67,28 @@
  * @see java.awt.image.Raster
  * @see java.awt.image.SampleModel
  */
-/* No native methods here, but the constants are needed in the supporting JNI code */
-@GenerateNativeHeader
 public abstract class DataBuffer {
 
     /** Tag for unsigned byte data. */
-    public static final int TYPE_BYTE  = 0;
+    @Native public static final int TYPE_BYTE  = 0;
 
     /** Tag for unsigned short data. */
-    public static final int TYPE_USHORT = 1;
+    @Native public static final int TYPE_USHORT = 1;
 
     /** Tag for signed short data.  Placeholder for future use. */
-    public static final int TYPE_SHORT = 2;
+    @Native public static final int TYPE_SHORT = 2;
 
     /** Tag for int data. */
-    public static final int TYPE_INT   = 3;
+    @Native public static final int TYPE_INT   = 3;
 
     /** Tag for float data.  Placeholder for future use. */
-    public static final int TYPE_FLOAT  = 4;
+    @Native public static final int TYPE_FLOAT  = 4;
 
     /** Tag for double data.  Placeholder for future use. */
-    public static final int TYPE_DOUBLE  = 5;
+    @Native public static final int TYPE_DOUBLE  = 5;
 
     /** Tag for undefined data. */
-    public static final int TYPE_UNDEFINED = 32;
+    @Native public static final int TYPE_UNDEFINED = 32;
 
     /** The data type of this DataBuffer. */
     protected int dataType;
--- a/src/share/classes/java/awt/image/ImageConsumer.java	Mon Apr 01 10:09:27 2013 -0300
+++ b/src/share/classes/java/awt/image/ImageConsumer.java	Tue Apr 09 08:36:20 2013 -0300
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1995, 2006, 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
@@ -27,7 +27,6 @@
 
 import java.util.Hashtable;
 
-import javax.tools.annotation.GenerateNativeHeader;
 
 /**
  * The interface for objects expressing interest in image data through
@@ -39,8 +38,6 @@
  *
  * @author      Jim Graham
  */
-/* No native methods here, but the constants are needed in the supporting JNI code */
-@GenerateNativeHeader
 public interface ImageConsumer {
     /**
      * The dimensions of the source image are reported using the
--- a/src/share/classes/java/awt/image/ImageObserver.java	Mon Apr 01 10:09:27 2013 -0300
+++ b/src/share/classes/java/awt/image/ImageObserver.java	Tue Apr 09 08:36:20 2013 -0300
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1995, 1999, 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
@@ -27,7 +27,6 @@
 
 import java.awt.Image;
 
-import javax.tools.annotation.GenerateNativeHeader;
 
 /**
  * An asynchronous update interface for receiving notifications about
@@ -35,8 +34,6 @@
  *
  * @author      Jim Graham
  */
-/* No native methods here, but the constants are needed in the supporting JNI code */
-@GenerateNativeHeader
 public interface ImageObserver {
     /**
      * This method is called when information about an image which was
--- a/src/share/classes/java/awt/peer/ComponentPeer.java	Mon Apr 01 10:09:27 2013 -0300
+++ b/src/share/classes/java/awt/peer/ComponentPeer.java	Tue Apr 09 08:36:20 2013 -0300
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1995, 2008, 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
@@ -32,7 +32,6 @@
 import java.awt.image.ColorModel;
 import java.awt.image.VolatileImage;
 import java.awt.GraphicsConfiguration;
-import javax.tools.annotation.GenerateNativeHeader;
 import sun.awt.CausedFocusEvent;
 import sun.java2d.pipe.Region;
 
@@ -50,8 +49,6 @@
  * nor invoke any of the peer methods directly on the peer
  * instances.
  */
-/* No native methods here, but the constants are needed in the supporting JNI code */
-@GenerateNativeHeader
 public interface ComponentPeer {
 
     /**
--- a/src/share/classes/java/awt/print/PageFormat.java	Mon Apr 01 10:09:27 2013 -0300
+++ b/src/share/classes/java/awt/print/PageFormat.java	Tue Apr 09 08:36:20 2013 -0300
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2000, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 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,14 +29,12 @@
 import java.awt.geom.Point2D;
 import java.awt.geom.Rectangle2D;
 
-import javax.tools.annotation.GenerateNativeHeader;
+import java.lang.annotation.Native;
 
 /**
  * The <code>PageFormat</code> class describes the size and
  * orientation of a page to be printed.
  */
-/* No native methods here, but the constants are needed in the supporting JNI code */
-@GenerateNativeHeader
 public class PageFormat implements Cloneable
 {
 
@@ -48,21 +46,21 @@
      *  Note that this is not the Macintosh landscape but
      *  is the Window's and PostScript landscape.
      */
-    public static final int LANDSCAPE = 0;
+    @Native public static final int LANDSCAPE = 0;
 
     /**
      *  The origin is at the top left of the paper with
      *  x running to the right and y running down the
      *  paper.
      */
-    public static final int PORTRAIT = 1;
+    @Native public static final int PORTRAIT = 1;
 
     /**
      *  The origin is at the top right of the paper with x
      *  running top to bottom and y running right to left.
      *  Note that this is the Macintosh landscape.
      */
-    public static final int REVERSE_LANDSCAPE = 2;
+    @Native public static final int REVERSE_LANDSCAPE = 2;
 
  /* Instance Variables */
 
--- a/src/share/classes/java/awt/print/Pageable.java	Mon Apr 01 10:09:27 2013 -0300
+++ b/src/share/classes/java/awt/print/Pageable.java	Tue Apr 09 08:36:20 2013 -0300
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2000, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 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,7 +25,7 @@
 
 package java.awt.print;
 
-import javax.tools.annotation.GenerateNativeHeader;
+import java.lang.annotation.Native;
 
 /**
  * The <code>Pageable</code> implementation represents a set of
@@ -35,8 +35,6 @@
  * @see java.awt.print.PageFormat
  * @see java.awt.print.Printable
  */
-/* No native methods here, but the constants are needed in the supporting JNI code */
-@GenerateNativeHeader
 public interface Pageable {
 
     /**
@@ -45,7 +43,7 @@
      * method if a <code>Pageable</code> implementation does not know
      * the number of pages in its set.
      */
-    int UNKNOWN_NUMBER_OF_PAGES = -1;
+    @Native int UNKNOWN_NUMBER_OF_PAGES = -1;
 
     /**
      * Returns the number of pages in the set.
--- a/src/share/classes/java/awt/print/Printable.java	Mon Apr 01 10:09:27 2013 -0300
+++ b/src/share/classes/java/awt/print/Printable.java	Tue Apr 09 08:36:20 2013 -0300
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2005, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 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,7 +27,6 @@
 
 import java.awt.Graphics;
 
-import javax.tools.annotation.GenerateNativeHeader;
 
 /**
  * The <code>Printable</code> interface is implemented
@@ -100,8 +99,6 @@
  * @see java.awt.print.PageFormat
  * @see java.awt.print.PrinterJob
  */
-/* No native methods here, but the constants are needed in the supporting JNI code */
-@GenerateNativeHeader
 public interface Printable {
 
     /**
--- a/src/share/classes/java/lang/AbstractStringBuilder.java	Mon Apr 01 10:09:27 2013 -0300
+++ b/src/share/classes/java/lang/AbstractStringBuilder.java	Tue Apr 09 08:36:20 2013 -0300
@@ -415,7 +415,8 @@
      * @return  a reference to this object.
      */
     public AbstractStringBuilder append(String str) {
-        if (str == null) str = "null";
+        if (str == null)
+            return appendNull();
         int len = str.length();
         ensureCapacityInternal(count + len);
         str.getChars(0, len, value, count);
@@ -426,7 +427,7 @@
     // Documentation in subclasses because of synchro difference
     public AbstractStringBuilder append(StringBuffer sb) {
         if (sb == null)
-            return append("null");
+            return appendNull();
         int len = sb.length();
         ensureCapacityInternal(count + len);
         sb.getChars(0, len, value, count);
@@ -439,7 +440,7 @@
      */
     AbstractStringBuilder append(AbstractStringBuilder asb) {
         if (asb == null)
-            return append("null");
+            return appendNull();
         int len = asb.length();
         ensureCapacityInternal(count + len);
         asb.getChars(0, len, value, count);
@@ -451,7 +452,7 @@
     @Override
     public AbstractStringBuilder append(CharSequence s) {
         if (s == null)
-            s = "null";
+            return appendNull();
         if (s instanceof String)
             return this.append((String)s);
         if (s instanceof AbstractStringBuilder)
@@ -460,6 +461,18 @@
         return this.append(s, 0, s.length());
     }
 
+    private AbstractStringBuilder appendNull() {
+        int c = count;
+        ensureCapacityInternal(c + 4);
+        final char[] value = this.value;
+        value[c++] = 'n';
+        value[c++] = 'u';
+        value[c++] = 'l';
+        value[c++] = 'l';
+        count = c;
+        return this;
+    }
+
     /**
      * Appends a subsequence of the specified {@code CharSequence} to this
      * sequence.
--- a/src/share/classes/java/lang/Class.java	Mon Apr 01 10:09:27 2013 -0300
+++ b/src/share/classes/java/lang/Class.java	Tue Apr 09 08:36:20 2013 -0300
@@ -113,8 +113,7 @@
  * @see     java.lang.ClassLoader#defineClass(byte[], int, int)
  * @since   JDK1.0
  */
-public final
-    class Class<T> implements java.io.Serializable,
+public final class Class<T> implements java.io.Serializable,
                               java.lang.reflect.GenericDeclaration,
                               java.lang.reflect.Type,
                               java.lang.reflect.AnnotatedElement {
@@ -150,6 +149,75 @@
             + getName();
     }
 
+    /**
+     * Returns a string describing this {@code Class}, including
+     * information about modifiers and type parameters.
+     *
+     * The string is formatted as a list of type modifiers, if any,
+     * followed by the kind of type (empty string for primitive types
+     * and {@code class}, {@code enum}, {@code interface}, or {@code
+     * &#64;interface}, as appropriate), followed by the type's name,
+     * followed by an angle-bracketed comma-separated list of the
+     * type's type parameters, if any.
+     *
+     * A space is used to separate modifiers from one another and to
+     * separate any modifiers from the kind of type. The modifiers
+     * occur in canonical order. If there are no type parameters, the
+     * type parameter list is elided.
+     *
+     * <p>Note that since information about the runtime representation
+     * of a type is being generated, modifiers not present on the
+     * originating source code or illegal on the originating source
+     * code may be present.
+     *
+     * @return a string describing this {@code Class}, including
+     * information about modifiers and type parameters
+     *
+     * @since 1.8
+     */
+    public String toGenericString() {
+        if (isPrimitive()) {
+            return toString();
+        } else {
+            StringBuilder sb = new StringBuilder();
+
+            // Class modifiers are a superset of interface modifiers
+            int modifiers = getModifiers() & Modifier.classModifiers();
+            if (modifiers != 0) {
+                sb.append(Modifier.toString(modifiers));
+                sb.append(' ');
+            }
+
+            if (isAnnotation()) {
+                sb.append('@');
+            }
+            if (isInterface()) { // Note: all annotation types are interfaces
+                sb.append("interface");
+            } else {
+                if (isEnum())
+                    sb.append("enum");
+                else
+                    sb.append("class");
+            }
+            sb.append(' ');
+            sb.append(getName());
+
+            TypeVariable<?>[] typeparms = getTypeParameters();
+            if (typeparms.length > 0) {
+                boolean first = true;
+                sb.append('<');
+                for(TypeVariable<?> typeparm: typeparms) {
+                    if (!first)
+                        sb.append(',');
+                    sb.append(typeparm.getTypeName());
+                    first = false;
+                }
+                sb.append('>');
+            }
+
+            return sb.toString();
+        }
+    }
 
     /**
      * Returns the {@code Class} object associated with the class or
@@ -1164,6 +1232,32 @@
     }
 
     /**
+     * Return an informative string for the name of this type.
+     *
+     * @return an informative string for the name of this type
+     * @since 1.8
+     */
+    public String getTypeName() {
+        if (isArray()) {
+            try {
+                Class<?> cl = this;
+                int dimensions = 0;
+                while (cl.isArray()) {
+                    dimensions++;
+                    cl = cl.getComponentType();
+                }
+                StringBuilder sb = new StringBuilder();
+                sb.append(cl.getName());
+                for (int i = 0; i < dimensions; i++) {
+                    sb.append("[]");
+                }
+                return sb.toString();
+            } catch (Throwable e) { /*FALLTHRU*/ }
+        }
+        return getName();
+    }
+
+    /**
      * Character.isDigit answers {@code true} to some non-ascii
      * digits.  This one does not.
      */
--- a/src/share/classes/java/lang/reflect/Constructor.java	Mon Apr 01 10:09:27 2013 -0300
+++ b/src/share/classes/java/lang/reflect/Constructor.java	Tue Apr 09 08:36:20 2013 -0300
@@ -284,16 +284,20 @@
      * modifiers {@code public}, {@code protected} or
      * {@code private}.  Only one of these may appear, or none if the
      * constructor has default (package) access.
+     *
+     * @return a string describing this {@code Constructor}
+     * @jls 8.8.3. Constructor Modifiers
      */
     public String toString() {
         return sharedToString(Modifier.constructorModifiers(),
+                              false,
                               parameterTypes,
                               exceptionTypes);
     }
 
     @Override
     void specificToStringHeader(StringBuilder sb) {
-        sb.append(Field.getTypeName(getDeclaringClass()));
+        sb.append(getDeclaringClass().getTypeName());
     }
 
     /**
@@ -328,10 +332,11 @@
      * include type parameters
      *
      * @since 1.5
+     * @jls 8.8.3. Constructor Modifiers
      */
     @Override
     public String toGenericString() {
-        return sharedToGenericString(Modifier.constructorModifiers());
+        return sharedToGenericString(Modifier.constructorModifiers(), false);
     }
 
     @Override
--- a/src/share/classes/java/lang/reflect/Executable.java	Mon Apr 01 10:09:27 2013 -0300
+++ b/src/share/classes/java/lang/reflect/Executable.java	Tue Apr 09 08:36:20 2013 -0300
@@ -82,27 +82,38 @@
 
     void separateWithCommas(Class<?>[] types, StringBuilder sb) {
         for (int j = 0; j < types.length; j++) {
-            sb.append(Field.getTypeName(types[j]));
+            sb.append(types[j].getTypeName());
             if (j < (types.length - 1))
                 sb.append(",");
         }
 
     }
 
-    void printModifiersIfNonzero(StringBuilder sb, int mask) {
+    void printModifiersIfNonzero(StringBuilder sb, int mask, boolean isDefault) {
         int mod = getModifiers() & mask;
-        if (mod != 0) {
+
+        if (mod != 0 && !isDefault) {
             sb.append(Modifier.toString(mod)).append(' ');
+        } else {
+            int access_mod = mod & Modifier.ACCESS_MODIFIERS;
+            if (access_mod != 0)
+                sb.append(Modifier.toString(access_mod)).append(' ');
+            if (isDefault)
+                sb.append("default ");
+            mod = (mod & ~Modifier.ACCESS_MODIFIERS);
+            if (mod != 0)
+                sb.append(Modifier.toString(mod)).append(' ');
         }
     }
 
     String sharedToString(int modifierMask,
+                          boolean isDefault,
                           Class<?>[] parameterTypes,
                           Class<?>[] exceptionTypes) {
         try {
             StringBuilder sb = new StringBuilder();
 
-            printModifiersIfNonzero(sb, modifierMask);
+            printModifiersIfNonzero(sb, modifierMask, isDefault);
             specificToStringHeader(sb);
 
             sb.append('(');
@@ -124,11 +135,11 @@
      */
     abstract void specificToStringHeader(StringBuilder sb);
 
-    String sharedToGenericString(int modifierMask) {
+    String sharedToGenericString(int modifierMask, boolean isDefault) {
         try {
             StringBuilder sb = new StringBuilder();
 
-            printModifiersIfNonzero(sb, modifierMask);
+            printModifiersIfNonzero(sb, modifierMask, isDefault);
 
             TypeVariable<?>[] typeparms = getTypeParameters();
             if (typeparms.length > 0) {
@@ -150,9 +161,7 @@
             sb.append('(');
             Type[] params = getGenericParameterTypes();
             for (int j = 0; j < params.length; j++) {
-                String param = (params[j] instanceof Class)?
-                    Field.getTypeName((Class)params[j]):
-                    (params[j].toString());
+                String param = params[j].getTypeName();
                 if (isVarArgs() && (j == params.length - 1)) // replace T[] with T...
                     param = param.replaceFirst("\\[\\]$", "...");
                 sb.append(param);
--- a/src/share/classes/java/lang/reflect/Field.java	Mon Apr 01 10:09:27 2013 -0300
+++ b/src/share/classes/java/lang/reflect/Field.java	Tue Apr 09 08:36:20 2013 -0300
@@ -288,12 +288,15 @@
      * {@code protected} or {@code private} first, and then other
      * modifiers in the following order: {@code static}, {@code final},
      * {@code transient}, {@code volatile}.
+     *
+     * @return a string describing this {@code Field}
+     * @jls 8.3.1 Field Modifiers
      */
     public String toString() {
         int mod = getModifiers();
         return (((mod == 0) ? "" : (Modifier.toString(mod) + " "))
-            + getTypeName(getType()) + " "
-            + getTypeName(getDeclaringClass()) + "."
+            + getType().getTypeName() + " "
+            + getDeclaringClass().getTypeName() + "."
             + getName());
     }
 
@@ -315,14 +318,14 @@
      * its generic type
      *
      * @since 1.5
+     * @jls 8.3.1 Field Modifiers
      */
     public String toGenericString() {
         int mod = getModifiers();
         Type fieldType = getGenericType();
         return (((mod == 0) ? "" : (Modifier.toString(mod) + " "))
-            +  ((fieldType instanceof Class) ?
-                getTypeName((Class)fieldType): fieldType.toString())+ " "
-            + getTypeName(getDeclaringClass()) + "."
+            + fieldType.getTypeName() + " "
+            + getDeclaringClass().getTypeName() + "."
             + getName());
     }
 
@@ -992,29 +995,6 @@
         }
     }
 
-    /*
-     * Utility routine to paper over array type names
-     */
-    static String getTypeName(Class<?> type) {
-        if (type.isArray()) {
-            try {
-                Class<?> cl = type;
-                int dimensions = 0;
-                while (cl.isArray()) {
-                    dimensions++;
-                    cl = cl.getComponentType();
-                }
-                StringBuffer sb = new StringBuffer();
-                sb.append(cl.getName());
-                for (int i = 0; i < dimensions; i++) {
-                    sb.append("[]");
-                }
-                return sb.toString();
-            } catch (Throwable e) { /*FALLTHRU*/ }
-        }
-        return type.getName();
-    }
-
     /**
      * @throws NullPointerException {@inheritDoc}
      * @since 1.5
--- a/src/share/classes/java/lang/reflect/Method.java	Mon Apr 01 10:09:27 2013 -0300
+++ b/src/share/classes/java/lang/reflect/Method.java	Tue Apr 09 08:36:20 2013 -0300
@@ -342,19 +342,24 @@
      * specified by "The Java Language Specification".  This is
      * {@code public}, {@code protected} or {@code private} first,
      * and then other modifiers in the following order:
-     * {@code abstract}, {@code static}, {@code final},
+     * {@code abstract}, {@code default}, {@code static}, {@code final},
      * {@code synchronized}, {@code native}, {@code strictfp}.
+     *
+     * @return a string describing this {@code Method}
+     *
+     * @jls 8.4.3 Method Modifiers
      */
     public String toString() {
         return sharedToString(Modifier.methodModifiers(),
+                              isDefault(),
                               parameterTypes,
                               exceptionTypes);
     }
 
     @Override
     void specificToStringHeader(StringBuilder sb) {
-        sb.append(Field.getTypeName(getReturnType())).append(' ');
-        sb.append(Field.getTypeName(getDeclaringClass())).append('.');
+        sb.append(getReturnType().getTypeName()).append(' ');
+        sb.append(getDeclaringClass().getTypeName()).append('.');
         sb.append(getName());
     }
 
@@ -381,34 +386,32 @@
      * class name.  If the method is declared to throw exceptions, the
      * parameter list is followed by a space, followed by the word
      * throws followed by a comma-separated list of the generic thrown
-     * exception types.  If there are no type parameters, the type
-     * parameter list is elided.
+     * exception types.
      *
      * <p>The access modifiers are placed in canonical order as
      * specified by "The Java Language Specification".  This is
      * {@code public}, {@code protected} or {@code private} first,
      * and then other modifiers in the following order:
-     * {@code abstract}, {@code static}, {@code final},
+     * {@code abstract}, {@code default}, {@code static}, {@code final},
      * {@code synchronized}, {@code native}, {@code strictfp}.
      *
      * @return a string describing this {@code Method},
      * include type parameters
      *
      * @since 1.5
+     *
+     * @jls 8.4.3 Method Modifiers
      */
     @Override
     public String toGenericString() {
-        return sharedToGenericString(Modifier.methodModifiers());
+        return sharedToGenericString(Modifier.methodModifiers(), isDefault());
     }
 
     @Override
     void specificToGenericStringHeader(StringBuilder sb) {
         Type genRetType = getGenericReturnType();
-        sb.append( ((genRetType instanceof Class<?>)?
-                    Field.getTypeName((Class<?>)genRetType):genRetType.toString()))
-            .append(' ');
-
-        sb.append(Field.getTypeName(getDeclaringClass())).append('.');
+        sb.append(genRetType.getTypeName()).append(' ');
+        sb.append(getDeclaringClass().getTypeName()).append('.');
         sb.append(getName());
     }
 
--- a/src/share/classes/java/lang/reflect/Modifier.java	Mon Apr 01 10:09:27 2013 -0300
+++ b/src/share/classes/java/lang/reflect/Modifier.java	Tue Apr 09 08:36:20 2013 -0300
@@ -43,8 +43,7 @@
  * @author Nakul Saraiya
  * @author Kenneth Russell
  */
-public
-class Modifier {
+public class Modifier {
 
     /*
      * Bootstrapping protocol between java.lang and java.lang.reflect
@@ -233,7 +232,7 @@
      * represented by {@code mod}
      */
     public static String toString(int mod) {
-        StringBuffer sb = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
         int len;
 
         if ((mod & PUBLIC) != 0)        sb.append("public ");
@@ -390,6 +389,12 @@
         Modifier.VOLATILE;
 
     /**
+     *
+     */
+    static final int ACCESS_MODIFIERS =
+        Modifier.PUBLIC | Modifier.PROTECTED | Modifier.PRIVATE;
+
+    /**
      * Return an {@code int} value OR-ing together the source language
      * modifiers that can be applied to a class.
      * @return an {@code int} value OR-ing together the source language
--- a/src/share/classes/java/lang/reflect/Parameter.java	Mon Apr 01 10:09:27 2013 -0300
+++ b/src/share/classes/java/lang/reflect/Parameter.java	Tue Apr 09 08:36:20 2013 -0300
@@ -110,21 +110,19 @@
     public String toString() {
         final StringBuilder sb = new StringBuilder();
         final Type type = getParameterizedType();
-        final String typename = (type instanceof Class)?
-            Field.getTypeName((Class)type):
-            (type.toString());
+        final String typename = type.getTypeName();
 
         sb.append(Modifier.toString(getModifiers()));
 
         if(0 != modifiers)
-            sb.append(" ");
+            sb.append(' ');
 
         if(isVarArgs())
             sb.append(typename.replaceFirst("\\[\\]$", "..."));
         else
             sb.append(typename);
 
-        sb.append(" ");
+        sb.append(' ');
         sb.append(getName());
 
         return sb.toString();
--- a/src/share/classes/java/lang/reflect/Type.java	Mon Apr 01 10:09:27 2013 -0300
+++ b/src/share/classes/java/lang/reflect/Type.java	Tue Apr 09 08:36:20 2013 -0300
@@ -32,6 +32,17 @@
  *
  * @since 1.5
  */
-
 public interface Type {
+    /**
+     * Returns a string describing this type, including information
+     * about any type parameters.
+     *
+     * @implSpec The default implementation calls {@code toString}.
+     *
+     * @return a string describing this type
+     * @since 1.8
+     */
+    default String getTypeName() {
+        return toString();
+    }
 }
--- a/src/share/classes/java/util/Base64.java	Mon Apr 01 10:09:27 2013 -0300
+++ b/src/share/classes/java/util/Base64.java	Tue Apr 09 08:36:20 2013 -0300
@@ -620,7 +620,10 @@
      * required. So if the final unit of the encoded byte data only has
      * two or three Base64 characters (without the corresponding padding
      * character(s) padded), they are decoded as if followed by padding
-     * character(s).
+     * character(s). If there is padding character present in the
+     * final unit, the correct number of padding character(s) must be
+     * present, otherwise {@code IllegalArgumentException} is thrown
+     * during decoding.
      *
      * <p> Instances of {@link Decoder} class are safe for use by
      * multiple concurrent threads.
@@ -1034,23 +1037,26 @@
                 throw new IllegalArgumentException(
                     "Input byte[] should at least have 2 bytes for base64 bytes");
             }
-            if (src[sl - 1] == '=') {
-                paddings++;
-                if (src[sl - 2] == '=')
-                    paddings++;
-            }
             if (isMIME) {
                 // scan all bytes to fill out all non-alphabet. a performance
                 // trade-off of pre-scan or Arrays.copyOf
                 int n = 0;
                 while (sp < sl) {
                     int b = src[sp++] & 0xff;
-                    if (b == '=')
+                    if (b == '=') {
+                        len -= (sl - sp + 1);
                         break;
+                    }
                     if ((b = base64[b]) == -1)
                         n++;
                 }
                 len -= n;
+            } else {
+                if (src[sl - 1] == '=') {
+                    paddings++;
+                    if (src[sl - 2] == '=')
+                        paddings++;
+                }
             }
             if (paddings == 0 && (len & 0x3) !=  0)
                 paddings = 4 - (len & 0x3);
--- a/src/share/classes/java/util/logging/LoggingProxyImpl.java	Mon Apr 01 10:09:27 2013 -0300
+++ b/src/share/classes/java/util/logging/LoggingProxyImpl.java	Tue Apr 09 08:36:20 2013 -0300
@@ -106,6 +106,11 @@
     }
 
     @Override
+    public int getLevelValue(Object level) {
+        return ((Level) level).intValue();
+    }
+
+    @Override
     public String getProperty(String key) {
         return LogManager.getLogManager().getProperty(key);
     }
--- a/src/share/classes/javax/sql/rowset/serial/SerialClob.java	Mon Apr 01 10:09:27 2013 -0300
+++ b/src/share/classes/javax/sql/rowset/serial/SerialClob.java	Tue Apr 09 08:36:20 2013 -0300
@@ -508,7 +508,7 @@
      *
      * @param length the length, in bytes, to which the <code>CLOB</code>
      *        value should be truncated
-     * @throws SerialLException if there is an error accessing the
+     * @throws SerialException if there is an error accessing the
      *        <code>CLOB</code> value;
      * if the {@code free} method had been previously called on this object
      */
--- a/src/share/classes/javax/swing/plaf/synth/SynthScrollBarUI.java	Mon Apr 01 10:09:27 2013 -0300
+++ b/src/share/classes/javax/swing/plaf/synth/SynthScrollBarUI.java	Tue Apr 09 08:36:20 2013 -0300
@@ -57,6 +57,7 @@
      */
     @Override
     protected void installDefaults() {
+        super.installDefaults();
         trackHighlight = NO_HIGHLIGHT;
         if (scrollbar.getLayout() == null ||
                      (scrollbar.getLayout() instanceof UIResource)) {
--- a/src/share/classes/sun/awt/EmbeddedFrame.java	Mon Apr 01 10:09:27 2013 -0300
+++ b/src/share/classes/sun/awt/EmbeddedFrame.java	Tue Apr 09 08:36:20 2013 -0300
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2010, 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
@@ -34,7 +34,6 @@
 import java.util.Set;
 import java.awt.AWTKeyStroke;
 import java.applet.Applet;
-import javax.tools.annotation.GenerateNativeHeader;
 import sun.applet.AppletPanel;
 
 /**
@@ -54,8 +53,6 @@
  *
  * @author      Thomas Ball
  */
-/* No native methods here, but the constants are needed in the supporting JNI code */
-@GenerateNativeHeader
 public abstract class EmbeddedFrame extends Frame
                           implements KeyEventDispatcher, PropertyChangeListener {
 
--- a/src/share/classes/sun/awt/SunHints.java	Mon Apr 01 10:09:27 2013 -0300
+++ b/src/share/classes/sun/awt/SunHints.java	Tue Apr 09 08:36:20 2013 -0300
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2005, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 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
@@ -26,7 +26,7 @@
 package sun.awt;
 
 import java.awt.RenderingHints;
-import javax.tools.annotation.GenerateNativeHeader;
+import java.lang.annotation.Native;
 
 /**
  * This class contains rendering hints that can be used by the
@@ -34,8 +34,6 @@
  * {@link java.awt.image.BufferedImageOp} and
  * {@link java.awt.image.Raster}.
  */
-/* No native methods here, but the constants are needed in the supporting JNI code */
-@GenerateNativeHeader
 public class SunHints {
     /**
      * Defines the type of all keys used to control various
@@ -180,86 +178,86 @@
     /**
      * Rendering hint key and values
      */
-    public static final int INTKEY_RENDERING = 0;
-    public static final int INTVAL_RENDER_DEFAULT = 0;
-    public static final int INTVAL_RENDER_SPEED = 1;
-    public static final int INTVAL_RENDER_QUALITY = 2;
+    @Native public static final int INTKEY_RENDERING = 0;
+    @Native public static final int INTVAL_RENDER_DEFAULT = 0;
+    @Native public static final int INTVAL_RENDER_SPEED = 1;
+    @Native public static final int INTVAL_RENDER_QUALITY = 2;
 
     /**
      * Antialiasing hint key and values
      */
-    public static final int INTKEY_ANTIALIASING = 1;
-    public static final int INTVAL_ANTIALIAS_DEFAULT = 0;
-    public static final int INTVAL_ANTIALIAS_OFF = 1;
-    public static final int INTVAL_ANTIALIAS_ON = 2;
+    @Native public static final int INTKEY_ANTIALIASING = 1;
+    @Native public static final int INTVAL_ANTIALIAS_DEFAULT = 0;
+    @Native public static final int INTVAL_ANTIALIAS_OFF = 1;
+    @Native public static final int INTVAL_ANTIALIAS_ON = 2;
 
     /**
      * Text antialiasing hint key and values
      */
-    public static final int INTKEY_TEXT_ANTIALIASING = 2;
-    public static final int INTVAL_TEXT_ANTIALIAS_DEFAULT = 0;
-    public static final int INTVAL_TEXT_ANTIALIAS_OFF = 1;
-    public static final int INTVAL_TEXT_ANTIALIAS_ON = 2;
-    public static final int INTVAL_TEXT_ANTIALIAS_GASP = 3;
-    public static final int INTVAL_TEXT_ANTIALIAS_LCD_HRGB = 4;
-    public static final int INTVAL_TEXT_ANTIALIAS_LCD_HBGR = 5;
-    public static final int INTVAL_TEXT_ANTIALIAS_LCD_VRGB = 6;
-    public static final int INTVAL_TEXT_ANTIALIAS_LCD_VBGR = 7;
+    @Native public static final int INTKEY_TEXT_ANTIALIASING = 2;
+    @Native public static final int INTVAL_TEXT_ANTIALIAS_DEFAULT = 0;
+    @Native public static final int INTVAL_TEXT_ANTIALIAS_OFF = 1;
+    @Native public static final int INTVAL_TEXT_ANTIALIAS_ON = 2;
+    @Native public static final int INTVAL_TEXT_ANTIALIAS_GASP = 3;
+    @Native public static final int INTVAL_TEXT_ANTIALIAS_LCD_HRGB = 4;
+    @Native public static final int INTVAL_TEXT_ANTIALIAS_LCD_HBGR = 5;
+    @Native public static final int INTVAL_TEXT_ANTIALIAS_LCD_VRGB = 6;
+    @Native public static final int INTVAL_TEXT_ANTIALIAS_LCD_VBGR = 7;
 
     /**
      * Font fractional metrics hint key and values
      */
-    public static final int INTKEY_FRACTIONALMETRICS = 3;
-    public static final int INTVAL_FRACTIONALMETRICS_DEFAULT = 0;
-    public static final int INTVAL_FRACTIONALMETRICS_OFF = 1;
-    public static final int INTVAL_FRACTIONALMETRICS_ON = 2;
+    @Native public static final int INTKEY_FRACTIONALMETRICS = 3;
+    @Native public static final int INTVAL_FRACTIONALMETRICS_DEFAULT = 0;
+    @Native public static final int INTVAL_FRACTIONALMETRICS_OFF = 1;
+    @Native public static final int INTVAL_FRACTIONALMETRICS_ON = 2;
 
     /**
      * Dithering hint key and values
      */
-    public static final int INTKEY_DITHERING = 4;
-    public static final int INTVAL_DITHER_DEFAULT = 0;
-    public static final int INTVAL_DITHER_DISABLE = 1;
-    public static final int INTVAL_DITHER_ENABLE = 2;
+    @Native public static final int INTKEY_DITHERING = 4;
+    @Native public static final int INTVAL_DITHER_DEFAULT = 0;
+    @Native public static final int INTVAL_DITHER_DISABLE = 1;
+    @Native public static final int INTVAL_DITHER_ENABLE = 2;
 
     /**
      * Interpolation hint key and values
      */
-    public static final int INTKEY_INTERPOLATION = 5;
-    public static final int INTVAL_INTERPOLATION_NEAREST_NEIGHBOR = 0;
-    public static final int INTVAL_INTERPOLATION_BILINEAR = 1;
-    public static final int INTVAL_INTERPOLATION_BICUBIC = 2;
+    @Native public static final int INTKEY_INTERPOLATION = 5;
+    @Native public static final int INTVAL_INTERPOLATION_NEAREST_NEIGHBOR = 0;
+    @Native public static final int INTVAL_INTERPOLATION_BILINEAR = 1;
+    @Native public static final int INTVAL_INTERPOLATION_BICUBIC = 2;
 
     /**
      * Alpha interpolation hint key and values
      */
-    public static final int INTKEY_ALPHA_INTERPOLATION = 6;
-    public static final int INTVAL_ALPHA_INTERPOLATION_DEFAULT = 0;
-    public static final int INTVAL_ALPHA_INTERPOLATION_SPEED = 1;
-    public static final int INTVAL_ALPHA_INTERPOLATION_QUALITY = 2;
+    @Native public static final int INTKEY_ALPHA_INTERPOLATION = 6;
+    @Native public static final int INTVAL_ALPHA_INTERPOLATION_DEFAULT = 0;
+    @Native public static final int INTVAL_ALPHA_INTERPOLATION_SPEED = 1;
+    @Native public static final int INTVAL_ALPHA_INTERPOLATION_QUALITY = 2;
 
     /**
      * Color rendering hint key and values
      */
-    public static final int INTKEY_COLOR_RENDERING = 7;
-    public static final int INTVAL_COLOR_RENDER_DEFAULT = 0;
-    public static final int INTVAL_COLOR_RENDER_SPEED = 1;
-    public static final int INTVAL_COLOR_RENDER_QUALITY = 2;
+    @Native public static final int INTKEY_COLOR_RENDERING = 7;
+    @Native public static final int INTVAL_COLOR_RENDER_DEFAULT = 0;
+    @Native public static final int INTVAL_COLOR_RENDER_SPEED = 1;
+    @Native public static final int INTVAL_COLOR_RENDER_QUALITY = 2;
 
     /**
      * Stroke normalization control hint key and values
      */
-    public static final int INTKEY_STROKE_CONTROL = 8;
-    public static final int INTVAL_STROKE_DEFAULT = 0;
-    public static final int INTVAL_STROKE_NORMALIZE = 1;
-    public static final int INTVAL_STROKE_PURE = 2;
+    @Native public static final int INTKEY_STROKE_CONTROL = 8;
+    @Native public static final int INTVAL_STROKE_DEFAULT = 0;
+    @Native public static final int INTVAL_STROKE_NORMALIZE = 1;
+    @Native public static final int INTVAL_STROKE_PURE = 2;
 
     /**
      * LCD text contrast control hint key.
      * Value is "100" to make discontiguous with the others which
      * are all enumerative and are of a different class.
      */
-    public static final int INTKEY_AATEXT_LCD_CONTRAST = 100;
+    @Native public static final int INTKEY_AATEXT_LCD_CONTRAST = 100;
 
     /**
      * Rendering hint key and value objects
--- a/src/share/classes/sun/awt/dnd/SunDragSourceContextPeer.java	Mon Apr 01 10:09:27 2013 -0300
+++ b/src/share/classes/sun/awt/dnd/SunDragSourceContextPeer.java	Tue Apr 09 08:36:20 2013 -0300
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 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
@@ -54,7 +54,6 @@
 import sun.awt.datatransfer.DataTransferer;
 import java.awt.datatransfer.DataFlavor;
 
-import javax.tools.annotation.GenerateNativeHeader;
 
 /**
  * <p>
@@ -64,8 +63,6 @@
  * @since JDK1.3.1
  *
  */
-/* No native methods here, but the constants are needed in the supporting JNI code */
-@GenerateNativeHeader
 public abstract class SunDragSourceContextPeer implements DragSourceContextPeer {
 
     private DragGestureEvent  trigger;
--- a/src/share/classes/sun/awt/image/BufImgSurfaceData.java	Mon Apr 01 10:09:27 2013 -0300
+++ b/src/share/classes/sun/awt/image/BufImgSurfaceData.java	Tue Apr 09 08:36:20 2013 -0300
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2010, 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
@@ -45,10 +45,7 @@
 import sun.java2d.loops.CompositeType;
 import sun.java2d.loops.RenderLoops;
 
-import javax.tools.annotation.GenerateNativeHeader;
 
-/* No native methods here, but the constants are needed in the supporting JNI code */
-@GenerateNativeHeader
 public class BufImgSurfaceData extends SurfaceData {
     BufferedImage bufImg;
     private BufferedImageGraphicsConfig graphicsConfig;
--- a/src/share/classes/sun/font/FontManager.java	Mon Apr 01 10:09:27 2013 -0300
+++ b/src/share/classes/sun/font/FontManager.java	Tue Apr 09 08:36:20 2013 -0300
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2008, 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
@@ -32,14 +32,11 @@
 
 import javax.swing.plaf.FontUIResource;
 
-import javax.tools.annotation.GenerateNativeHeader;
 
 /**
  * Interface between Java Fonts (java.awt.Font) and the underlying
  * font files/native font resources and the Java and native font scalers.
  */
-/* No native methods here, but the constants are needed in the supporting JNI code */
-@GenerateNativeHeader
 public interface FontManager {
 
     // These constants are used in findFont().
--- a/src/share/classes/sun/java2d/SunGraphics2D.java	Mon Apr 01 10:09:27 2013 -0300
+++ b/src/share/classes/sun/java2d/SunGraphics2D.java	Tue Apr 09 08:36:20 2013 -0300
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2008, 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
@@ -92,7 +92,7 @@
 import sun.java2d.DestSurfaceProvider;
 import sun.misc.PerformanceLogger;
 
-import javax.tools.annotation.GenerateNativeHeader;
+import java.lang.annotation.Native;
 
 /**
  * This is a the master Graphics2D superclass for all of the Sun
@@ -103,8 +103,6 @@
  *
  * @author Jim Graham
  */
-/* No native methods here, but the constants are needed in the supporting JNI code */
-@GenerateNativeHeader
 public final class SunGraphics2D
     extends Graphics2D
     implements ConstrainableGraphics, Cloneable, DestSurfaceProvider
@@ -113,18 +111,29 @@
      * Attribute States
      */
     /* Paint */
+    @Native
     public static final int PAINT_CUSTOM       = 6; /* Any other Paint object */
+    @Native
     public static final int PAINT_TEXTURE      = 5; /* Tiled Image */
+    @Native
     public static final int PAINT_RAD_GRADIENT = 4; /* Color RadialGradient */
+    @Native
     public static final int PAINT_LIN_GRADIENT = 3; /* Color LinearGradient */
+    @Native
     public static final int PAINT_GRADIENT     = 2; /* Color Gradient */
+    @Native
     public static final int PAINT_ALPHACOLOR   = 1; /* Non-opaque Color */
+    @Native
     public static final int PAINT_OPAQUECOLOR  = 0; /* Opaque Color */
 
     /* Composite*/
+    @Native
     public static final int COMP_CUSTOM = 3;/* Custom Composite */
+    @Native
     public static final int COMP_XOR    = 2;/* XOR Mode Composite */
+    @Native
     public static final int COMP_ALPHA  = 1;/* AlphaComposite */
+    @Native
     public static final int COMP_ISCOPY = 0;/* simple stores into destination,
                                              * i.e. Src, SrcOverNoEa, and other
                                              * alpha modes which replace
@@ -132,21 +141,33 @@
                                              */
 
     /* Stroke */
+    @Native
     public static final int STROKE_CUSTOM = 3; /* custom Stroke */
+    @Native
     public static final int STROKE_WIDE   = 2; /* BasicStroke */
+    @Native
     public static final int STROKE_THINDASHED   = 1; /* BasicStroke */
+    @Native
     public static final int STROKE_THIN   = 0; /* BasicStroke */
 
     /* Transform */
+    @Native
     public static final int TRANSFORM_GENERIC = 4; /* any 3x2 */
+    @Native
     public static final int TRANSFORM_TRANSLATESCALE = 3; /* scale XY */
+    @Native
     public static final int TRANSFORM_ANY_TRANSLATE = 2; /* non-int translate */
+    @Native
     public static final int TRANSFORM_INT_TRANSLATE = 1; /* int translate */
+    @Native
     public static final int TRANSFORM_ISIDENT = 0; /* Identity */
 
     /* Clipping */
+    @Native
     public static final int CLIP_SHAPE       = 2; /* arbitrary clip */
+    @Native
     public static final int CLIP_RECTANGULAR = 1; /* rectangular clip */
+    @Native
     public static final int CLIP_DEVICE      = 0; /* no clipping set */
 
     /* The following fields are used when the current Paint is a Color. */
--- a/src/share/classes/sun/java2d/opengl/OGLBlitLoops.java	Mon Apr 01 10:09:27 2013 -0300
+++ b/src/share/classes/sun/java2d/opengl/OGLBlitLoops.java	Tue Apr 09 08:36:20 2013 -0300
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2007, 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
@@ -45,10 +45,8 @@
 import sun.java2d.pipe.RenderBuffer;
 import sun.java2d.pipe.RenderQueue;
 import static sun.java2d.pipe.BufferedOpCodes.*;
-import javax.tools.annotation.GenerateNativeHeader;
+import java.lang.annotation.Native;
 
-/* No native methods here, but the constants are needed in the supporting JNI code */
-@GenerateNativeHeader
 class OGLBlitLoops {
 
     static void register() {
@@ -190,12 +188,12 @@
      * createPackedParams().  (They are also used at the native level when
      * unpacking the params.)
      */
-    private static final int OFFSET_SRCTYPE = 16;
-    private static final int OFFSET_HINT    =  8;
-    private static final int OFFSET_TEXTURE =  3;
-    private static final int OFFSET_RTT     =  2;
-    private static final int OFFSET_XFORM   =  1;
-    private static final int OFFSET_ISOBLIT =  0;
+    @Native private static final int OFFSET_SRCTYPE = 16;
+    @Native private static final int OFFSET_HINT    =  8;
+    @Native private static final int OFFSET_TEXTURE =  3;
+    @Native private static final int OFFSET_RTT     =  2;
+    @Native private static final int OFFSET_XFORM   =  1;
+    @Native private static final int OFFSET_ISOBLIT =  0;
 
     /**
      * Packs the given parameters into a single int value in order to save
--- a/src/share/classes/sun/java2d/opengl/OGLContext.java	Mon Apr 01 10:09:27 2013 -0300
+++ b/src/share/classes/sun/java2d/opengl/OGLContext.java	Tue Apr 09 08:36:20 2013 -0300
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2004, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 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 @@
 import static sun.java2d.pipe.BufferedOpCodes.*;
 import static sun.java2d.pipe.hw.ContextCapabilities.*;
 
-import javax.tools.annotation.GenerateNativeHeader;
+import java.lang.annotation.Native;
 
 /**
  * Note that the RenderQueue lock must be acquired before calling any of
@@ -155,39 +155,44 @@
         rq.flushNow();
     }
 
-    /* No native methods here, but the constants are needed in the supporting JNI code */
-    @GenerateNativeHeader
     static class OGLContextCaps extends ContextCapabilities {
         /**
          * Indicates the presence of the GL_EXT_framebuffer_object extension.
          * This cap will only be set if the fbobject system property has been
          * enabled and we are able to create an FBO with depth buffer.
          */
+        @Native
         static final int CAPS_EXT_FBOBJECT     =
                 (CAPS_RT_TEXTURE_ALPHA | CAPS_RT_TEXTURE_OPAQUE);
         /** Indicates that the context supports a stored alpha channel. */
+        @Native
         static final int CAPS_STORED_ALPHA     = CAPS_RT_PLAIN_ALPHA;
         /** Indicates that the context is doublebuffered. */
+        @Native
         static final int CAPS_DOUBLEBUFFERED   = (FIRST_PRIVATE_CAP << 0);
         /**
          * Indicates the presence of the GL_ARB_fragment_shader extension.
          * This cap will only be set if the lcdshader system property has been
          * enabled and the hardware supports the minimum number of texture units
          */
+        @Native
         static final int CAPS_EXT_LCD_SHADER   = (FIRST_PRIVATE_CAP << 1);
         /**
          * Indicates the presence of the GL_ARB_fragment_shader extension.
          * This cap will only be set if the biopshader system property has been
          * enabled and the hardware meets our minimum requirements.
          */
+        @Native
         static final int CAPS_EXT_BIOP_SHADER  = (FIRST_PRIVATE_CAP << 2);
         /**
          * Indicates the presence of the GL_ARB_fragment_shader extension.
          * This cap will only be set if the gradshader system property has been
          * enabled and the hardware meets our minimum requirements.
          */
+        @Native
         static final int CAPS_EXT_GRAD_SHADER  = (FIRST_PRIVATE_CAP << 3);
         /** Indicates the presence of the GL_ARB_texture_rectangle extension. */
+        @Native
         static final int CAPS_EXT_TEXRECT      = (FIRST_PRIVATE_CAP << 4);
 
         OGLContextCaps(int caps, String adapterId) {
--- a/src/share/classes/sun/java2d/pipe/BufferedContext.java	Mon Apr 01 10:09:27 2013 -0300
+++ b/src/share/classes/sun/java2d/pipe/BufferedContext.java	Tue Apr 09 08:36:20 2013 -0300
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2008, Oracle and/or its affiliates. All rights reserved.
+ * 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
@@ -37,7 +37,7 @@
 import static sun.java2d.pipe.BufferedOpCodes.*;
 import static sun.java2d.pipe.BufferedRenderPipe.BYTES_PER_SPAN;
 
-import javax.tools.annotation.GenerateNativeHeader;
+import java.lang.annotation.Native;
 
 /**
  * Base context class for managing state in a single-threaded rendering
@@ -49,8 +49,6 @@
  *
  * @see RenderQueue
  */
-/* No native methods here, but the constants are needed in the supporting JNI code */
-@GenerateNativeHeader
 public abstract class BufferedContext {
 
     /*
@@ -63,19 +61,19 @@
     /**
      * Indicates that no flags are needed; take all default code paths.
      */
-    public static final int NO_CONTEXT_FLAGS = (0 << 0);
+    @Native public static final int NO_CONTEXT_FLAGS = (0 << 0);
     /**
      * Indicates that the source surface (or color value, if it is a simple
      * rendering operation) is opaque (has an alpha value of 1.0).  If this
      * flag is present, it allows us to disable blending in certain
      * situations in order to improve performance.
      */
-    public static final int SRC_IS_OPAQUE    = (1 << 0);
+    @Native public static final int SRC_IS_OPAQUE    = (1 << 0);
     /**
      * Indicates that the operation uses an alpha mask, which may determine
      * the code path that is used when setting up the current paint state.
      */
-    public static final int USE_MASK         = (1 << 1);
+    @Native public static final int USE_MASK         = (1 << 1);
 
     protected RenderQueue rq;
     protected RenderBuffer buf;
--- a/src/share/classes/sun/java2d/pipe/BufferedOpCodes.java	Mon Apr 01 10:09:27 2013 -0300
+++ b/src/share/classes/sun/java2d/pipe/BufferedOpCodes.java	Tue Apr 09 08:36:20 2013 -0300
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2008, Oracle and/or its affiliates. All rights reserved.
+ * 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
@@ -25,79 +25,77 @@
 
 package sun.java2d.pipe;
 
-import javax.tools.annotation.GenerateNativeHeader;
+import java.lang.annotation.Native;
 
-/* No native methods here, but the constants are needed in the supporting JNI code */
-@GenerateNativeHeader
 public class BufferedOpCodes {
     // draw ops
-    public static final int DRAW_LINE            = 10;
-    public static final int DRAW_RECT            = 11;
-    public static final int DRAW_POLY            = 12;
-    public static final int DRAW_PIXEL           = 13;
-    public static final int DRAW_SCANLINES       = 14;
-    public static final int DRAW_PARALLELOGRAM   = 15;
-    public static final int DRAW_AAPARALLELOGRAM = 16;
+    @Native public static final int DRAW_LINE            = 10;
+    @Native public static final int DRAW_RECT            = 11;
+    @Native public static final int DRAW_POLY            = 12;
+    @Native public static final int DRAW_PIXEL           = 13;
+    @Native public static final int DRAW_SCANLINES       = 14;
+    @Native public static final int DRAW_PARALLELOGRAM   = 15;
+    @Native public static final int DRAW_AAPARALLELOGRAM = 16;
 
     // fill ops
-    public static final int FILL_RECT            = 20;
-    public static final int FILL_SPANS           = 21;
-    public static final int FILL_PARALLELOGRAM   = 22;
-    public static final int FILL_AAPARALLELOGRAM = 23;
+    @Native public static final int FILL_RECT            = 20;
+    @Native public static final int FILL_SPANS           = 21;
+    @Native public static final int FILL_PARALLELOGRAM   = 22;
+    @Native public static final int FILL_AAPARALLELOGRAM = 23;
 
     // copy-related ops
-    public static final int COPY_AREA            = 30;
-    public static final int BLIT                 = 31;
-    public static final int MASK_FILL            = 32;
-    public static final int MASK_BLIT            = 33;
-    public static final int SURFACE_TO_SW_BLIT   = 34;
+    @Native public static final int COPY_AREA            = 30;
+    @Native public static final int BLIT                 = 31;
+    @Native public static final int MASK_FILL            = 32;
+    @Native public static final int MASK_BLIT            = 33;
+    @Native public static final int SURFACE_TO_SW_BLIT   = 34;
 
     // text-related ops
-    public static final int DRAW_GLYPH_LIST      = 40;
+    @Native public static final int DRAW_GLYPH_LIST      = 40;
 
     // state-related ops
-    public static final int SET_RECT_CLIP        = 51;
-    public static final int BEGIN_SHAPE_CLIP     = 52;
-    public static final int SET_SHAPE_CLIP_SPANS = 53;
-    public static final int END_SHAPE_CLIP       = 54;
-    public static final int RESET_CLIP           = 55;
-    public static final int SET_ALPHA_COMPOSITE  = 56;
-    public static final int SET_XOR_COMPOSITE    = 57;
-    public static final int RESET_COMPOSITE      = 58;
-    public static final int SET_TRANSFORM        = 59;
-    public static final int RESET_TRANSFORM      = 60;
+    @Native public static final int SET_RECT_CLIP        = 51;
+    @Native public static final int BEGIN_SHAPE_CLIP     = 52;
+    @Native public static final int SET_SHAPE_CLIP_SPANS = 53;
+    @Native public static final int END_SHAPE_CLIP       = 54;
+    @Native public static final int RESET_CLIP           = 55;
+    @Native public static final int SET_ALPHA_COMPOSITE  = 56;
+    @Native public static final int SET_XOR_COMPOSITE    = 57;
+    @Native public static final int RESET_COMPOSITE      = 58;
+    @Native public static final int SET_TRANSFORM        = 59;
+    @Native public static final int RESET_TRANSFORM      = 60;
 
     // context-related ops
-    public static final int SET_SURFACES         = 70;
-    public static final int SET_SCRATCH_SURFACE  = 71;
-    public static final int FLUSH_SURFACE        = 72;
-    public static final int DISPOSE_SURFACE      = 73;
-    public static final int DISPOSE_CONFIG       = 74;
-    public static final int INVALIDATE_CONTEXT   = 75;
-    public static final int SYNC                 = 76;
-    public static final int RESTORE_DEVICES      = 77;
-    public static final int SAVE_STATE           = 78;
-    public static final int RESTORE_STATE        = 79;
+    @Native public static final int SET_SURFACES         = 70;
+    @Native public static final int SET_SCRATCH_SURFACE  = 71;
+    @Native public static final int FLUSH_SURFACE        = 72;
+    @Native public static final int DISPOSE_SURFACE      = 73;
+    @Native public static final int DISPOSE_CONFIG       = 74;
+    @Native public static final int INVALIDATE_CONTEXT   = 75;
+    @Native public static final int SYNC                 = 76;
+    @Native public static final int RESTORE_DEVICES      = 77;
+    @Native public static final int SAVE_STATE           = 78;
+    @Native public static final int RESTORE_STATE        = 79;
 
     // multibuffering ops
-    public static final int SWAP_BUFFERS         = 80;
+    @Native public static final int SWAP_BUFFERS         = 80;
 
     // special no-op op code (mainly used for achieving 8-byte alignment)
-    public static final int NOOP                 = 90;
+    @Native public static final int NOOP                 = 90;
 
     // paint-related ops
-    public static final int RESET_PAINT               = 100;
-    public static final int SET_COLOR                 = 101;
-    public static final int SET_GRADIENT_PAINT        = 102;
-    public static final int SET_LINEAR_GRADIENT_PAINT = 103;
-    public static final int SET_RADIAL_GRADIENT_PAINT = 104;
-    public static final int SET_TEXTURE_PAINT         = 105;
+    @Native public static final int RESET_PAINT               = 100;
+    @Native public static final int SET_COLOR                 = 101;
+    @Native public static final int SET_GRADIENT_PAINT        = 102;
+    @Native public static final int SET_LINEAR_GRADIENT_PAINT = 103;
+    @Native public static final int SET_RADIAL_GRADIENT_PAINT = 104;
+    @Native public static final int SET_TEXTURE_PAINT         = 105;
 
     // BufferedImageOp-related ops
-    public static final int ENABLE_CONVOLVE_OP     = 120;
-    public static final int DISABLE_CONVOLVE_OP    = 121;
-    public static final int ENABLE_RESCALE_OP      = 122;
-    public static final int DISABLE_RESCALE_OP     = 123;
-    public static final int ENABLE_LOOKUP_OP       = 124;
-    public static final int DISABLE_LOOKUP_OP      = 125;
+    @Native public static final int ENABLE_CONVOLVE_OP     = 120;
+    @Native public static final int DISABLE_CONVOLVE_OP    = 121;
+    @Native public static final int ENABLE_RESCALE_OP      = 122;
+    @Native public static final int DISABLE_RESCALE_OP     = 123;
+    @Native public static final int ENABLE_LOOKUP_OP       = 124;
+    @Native public static final int DISABLE_LOOKUP_OP      = 125;
 }
--- a/src/share/classes/sun/java2d/pipe/BufferedPaints.java	Mon Apr 01 10:09:27 2013 -0300
+++ b/src/share/classes/sun/java2d/pipe/BufferedPaints.java	Tue Apr 09 08:36:20 2013 -0300
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 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
@@ -46,10 +46,8 @@
 import sun.java2d.loops.SurfaceType;
 import static sun.java2d.pipe.BufferedOpCodes.*;
 
-import javax.tools.annotation.GenerateNativeHeader;
+import java.lang.annotation.Native;
 
-/* No native methods here, but the constants are needed in the supporting JNI code */
-@GenerateNativeHeader
 public class BufferedPaints {
 
     static void setPaint(RenderQueue rq, SunGraphics2D sg2d,
@@ -304,7 +302,7 @@
      * shaders.  So for now we will cap this value at 12, but we can
      * re-evaluate this in the future as hardware becomes more capable.
      */
-    public static final int MULTI_MAX_FRACTIONS = 12;
+    @Native public static final int MULTI_MAX_FRACTIONS = 12;
 
     /**
      * Helper function to convert a color component in sRGB space to
--- a/src/share/classes/sun/java2d/pipe/BufferedTextPipe.java	Mon Apr 01 10:09:27 2013 -0300
+++ b/src/share/classes/sun/java2d/pipe/BufferedTextPipe.java	Tue Apr 09 08:36:20 2013 -0300
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 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,24 +32,22 @@
 import sun.java2d.SurfaceData;
 import static sun.java2d.pipe.BufferedOpCodes.*;
 
-import javax.tools.annotation.GenerateNativeHeader;
+import java.lang.annotation.Native;
 
-/* No native methods here, but the constants are needed in the supporting JNI code */
-@GenerateNativeHeader
 public abstract class BufferedTextPipe extends GlyphListPipe {
 
-    private static final int BYTES_PER_GLYPH_IMAGE = 8;
-    private static final int BYTES_PER_GLYPH_POSITION = 8;
+    @Native private static final int BYTES_PER_GLYPH_IMAGE = 8;
+    @Native private static final int BYTES_PER_GLYPH_POSITION = 8;
 
     /**
      * The following offsets are used to pack the parameters in
      * createPackedParams().  (They are also used at the native level when
      * unpacking the params.)
      */
-    private static final int OFFSET_CONTRAST  = 8;
-    private static final int OFFSET_RGBORDER  = 2;
-    private static final int OFFSET_SUBPIXPOS = 1;
-    private static final int OFFSET_POSITIONS = 0;
+    @Native private static final int OFFSET_CONTRAST  = 8;
+    @Native private static final int OFFSET_RGBORDER  = 2;
+    @Native private static final int OFFSET_SUBPIXPOS = 1;
+    @Native private static final int OFFSET_POSITIONS = 0;
 
     /**
      * Packs the given parameters into a single int value in order to save
--- a/src/share/classes/sun/java2d/pipe/RenderBuffer.java	Mon Apr 01 10:09:27 2013 -0300
+++ b/src/share/classes/sun/java2d/pipe/RenderBuffer.java	Tue Apr 09 08:36:20 2013 -0300
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
+ * 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
@@ -27,7 +27,6 @@
 
 import sun.misc.Unsafe;
 
-import javax.tools.annotation.GenerateNativeHeader;
 
 /**
  * The RenderBuffer class is a simplified, high-performance, Unsafe wrapper
@@ -44,8 +43,6 @@
  * single-threaded rendering.  For example, there is no put(double[]) method
  * because we currently have no need for such a method in the STR classes.
  */
-/* No native methods here, but the constants are needed in the supporting JNI code */
-@GenerateNativeHeader
 public class RenderBuffer {
 
     /**
--- a/src/share/classes/sun/java2d/pipe/hw/AccelDeviceEventNotifier.java	Mon Apr 01 10:09:27 2013 -0300
+++ b/src/share/classes/sun/java2d/pipe/hw/AccelDeviceEventNotifier.java	Tue Apr 09 08:36:20 2013 -0300
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 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
@@ -30,16 +30,13 @@
 import java.util.Iterator;
 import java.util.Map;
 import java.util.Set;
-import javax.tools.annotation.GenerateNativeHeader;
+import java.lang.annotation.Native;
 
-import javax.tools.annotation.GenerateNativeHeader;
 
 /**
  * This class is used to notify listeners about accelerated device's
  * events such as device reset or dispose that are about to occur.
  */
-/* No native methods here, but the constants are needed in the supporting JNI code */
-@GenerateNativeHeader
 public class AccelDeviceEventNotifier {
 
     private static AccelDeviceEventNotifier theInstance;
@@ -49,13 +46,13 @@
      * resources associated with the device which are required for the device
      * to be reset.
      */
-    public static final int DEVICE_RESET = 0;
+    @Native public static final int DEVICE_RESET = 0;
 
     /**
      * A device is about to be disposed. The listeners have to release all
      * resources associated with the device.
      */
-    public static final int DEVICE_DISPOSED = 1;
+    @Native public static final int DEVICE_DISPOSED = 1;
 
     private final Map<AccelDeviceEventListener, Integer> listeners;
 
--- a/src/share/classes/sun/java2d/pipe/hw/AccelSurface.java	Mon Apr 01 10:09:27 2013 -0300
+++ b/src/share/classes/sun/java2d/pipe/hw/AccelSurface.java	Tue Apr 09 08:36:20 2013 -0300
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 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
@@ -28,41 +28,39 @@
 import java.awt.Rectangle;
 import sun.java2d.Surface;
 
-import javax.tools.annotation.GenerateNativeHeader;
+import java.lang.annotation.Native;
 
 /**
  * Abstraction for a hardware accelerated surface.
  */
-/* No native methods here, but the constants are needed in the supporting JNI code */
-@GenerateNativeHeader
 public interface AccelSurface extends BufferedContextProvider, Surface {
     /**
      * Undefined
      */
-    public static final int UNDEFINED       = 0;
+    @Native public static final int UNDEFINED       = 0;
     /**
      * Window (or window substitute) surface
      */
-    public static final int WINDOW          = 1;
+    @Native public static final int WINDOW          = 1;
     /**
      * Render-To Plain surface (pbuffer for OpenGL, Render Target surface
      * for Direct3D)
      */
-    public static final int RT_PLAIN        = 2;
+    @Native public static final int RT_PLAIN        = 2;
     /**
      * Texture surface
      */
-    public static final int TEXTURE         = 3;
+    @Native public static final int TEXTURE         = 3;
     /**
      * A back-buffer surface (SwapChain surface for Direct3D, backbuffer for
      * OpenGL)
      */
-    public static final int FLIP_BACKBUFFER = 4;
+    @Native public static final int FLIP_BACKBUFFER = 4;
     /**
      * Render-To Texture surface (fbobject for OpenGL, texture with render-to
      * attribute for Direct3D)
      */
-    public static final int RT_TEXTURE      = 5;
+    @Native public static final int RT_TEXTURE      = 5;
 
     /**
      * Returns {@code int} representing surface's type as defined by constants
--- a/src/share/classes/sun/java2d/pipe/hw/ContextCapabilities.java	Mon Apr 01 10:09:27 2013 -0300
+++ b/src/share/classes/sun/java2d/pipe/hw/ContextCapabilities.java	Tue Apr 09 08:36:20 2013 -0300
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 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,7 +25,6 @@
 
 package sun.java2d.pipe.hw;
 
-import javax.tools.annotation.GenerateNativeHeader;
 
 /**
  * Represents a set of capabilities of a BufferedContext and associated
@@ -33,8 +32,6 @@
  *
  * @see AccelGraphicsConfig
  */
-/* No native methods here, but the constants are needed in the supporting JNI code */
-@GenerateNativeHeader
 public class ContextCapabilities {
     /** Indicates that the context has no capabilities. */
     public static final int CAPS_EMPTY             = (0 << 0);
--- a/src/share/classes/sun/misc/Version.java.template	Mon Apr 01 10:09:27 2013 -0300
+++ b/src/share/classes/sun/misc/Version.java.template	Tue Apr 09 08:36:20 2013 -0300
@@ -52,8 +52,6 @@
         System.setProperty("java.version", java_version);
         System.setProperty("java.runtime.version", java_runtime_version);
         System.setProperty("java.runtime.name", java_runtime_name);
-        if (java_profile_name.length() > 0)
-            System.setProperty("java.runtime.profile", java_profile_name);
     }
 
     private static boolean versionsInitialized = false;
--- a/src/share/classes/sun/net/ftp/impl/FtpClient.java	Mon Apr 01 10:09:27 2013 -0300
+++ b/src/share/classes/sun/net/ftp/impl/FtpClient.java	Tue Apr 09 08:36:20 2013 -0300
@@ -1299,16 +1299,16 @@
      *         <code>null</code> if the command was unsuccessful.
      * @throws IOException if an error occured during the transmission.
      */
-    public OutputStream putFileStream(String name, boolean unique) throws sun.net.ftp.FtpProtocolException, IOException {
+    public OutputStream putFileStream(String name, boolean unique)
+        throws sun.net.ftp.FtpProtocolException, IOException
+    {
         String cmd = unique ? "STOU " : "STOR ";
         Socket s = openDataConnection(cmd + name);
         if (s == null) {
             return null;
         }
-        if (type == TransferType.BINARY) {
-            return s.getOutputStream();
-        }
-        return new sun.net.TelnetOutputStream(s.getOutputStream(), false);
+        boolean bm = (type == TransferType.BINARY);
+        return new sun.net.TelnetOutputStream(s.getOutputStream(), bm);
     }
 
     /**
--- a/src/share/classes/sun/net/spi/DefaultProxySelector.java	Mon Apr 01 10:09:27 2013 -0300
+++ b/src/share/classes/sun/net/spi/DefaultProxySelector.java	Tue Apr 09 08:36:20 2013 -0300
@@ -124,6 +124,7 @@
         final String defaultVal;
         static NonProxyInfo ftpNonProxyInfo = new NonProxyInfo("ftp.nonProxyHosts", null, null, defStringVal);
         static NonProxyInfo httpNonProxyInfo = new NonProxyInfo("http.nonProxyHosts", null, null, defStringVal);
+        static NonProxyInfo socksNonProxyInfo = new NonProxyInfo("socksNonProxyHosts", null, null, defStringVal);
 
         NonProxyInfo(String p, String s, RegexpPool pool, String d) {
             property = p;
@@ -186,6 +187,8 @@
             pinfo = NonProxyInfo.httpNonProxyInfo;
         } else if ("ftp".equalsIgnoreCase(protocol)) {
             pinfo = NonProxyInfo.ftpNonProxyInfo;
+        } else if ("socket".equalsIgnoreCase(protocol)) {
+            pinfo = NonProxyInfo.socksNonProxyInfo;
         }
 
         /**
--- a/src/share/classes/sun/nio/ch/DatagramChannelImpl.java	Mon Apr 01 10:09:27 2013 -0300
+++ b/src/share/classes/sun/nio/ch/DatagramChannelImpl.java	Tue Apr 09 08:36:20 2013 -0300
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 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,15 +32,12 @@
 import java.nio.channels.*;
 import java.nio.channels.spi.*;
 import java.util.*;
-import javax.tools.annotation.GenerateNativeHeader;
 import sun.net.ResourceManager;
 
 /**
  * An implementation of DatagramChannels.
  */
 
-/* No native methods here, but the constants are needed in the supporting JNI code */
-@GenerateNativeHeader
 class DatagramChannelImpl
     extends DatagramChannel
     implements SelChImpl
--- a/src/share/classes/sun/nio/ch/sctp/SctpStdSocketOption.java	Mon Apr 01 10:09:27 2013 -0300
+++ b/src/share/classes/sun/nio/ch/sctp/SctpStdSocketOption.java	Tue Apr 09 08:36:20 2013 -0300
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 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,21 +25,19 @@
 package sun.nio.ch.sctp;
 
 import com.sun.nio.sctp.SctpSocketOption;
-import javax.tools.annotation.GenerateNativeHeader;
+import java.lang.annotation.Native;
 
-/* No native methods here, but the constants are needed in the supporting JNI code */
-@GenerateNativeHeader
 public class SctpStdSocketOption<T>
     implements SctpSocketOption<T>
 {
     /* for native mapping of int options */
-    public static final int SCTP_DISABLE_FRAGMENTS = 1;
-    public static final int SCTP_EXPLICIT_COMPLETE = 2;
-    public static final int SCTP_FRAGMENT_INTERLEAVE = 3;
-    public static final int SCTP_NODELAY = 4;
-    public static final int SO_SNDBUF = 5;
-    public static final int SO_RCVBUF = 6;
-    public static final int SO_LINGER = 7;
+    @Native public static final int SCTP_DISABLE_FRAGMENTS = 1;
+    @Native public static final int SCTP_EXPLICIT_COMPLETE = 2;
+    @Native public static final int SCTP_FRAGMENT_INTERLEAVE = 3;
+    @Native public static final int SCTP_NODELAY = 4;
+    @Native public static final int SO_SNDBUF = 5;
+    @Native public static final int SO_RCVBUF = 6;
+    @Native public static final int SO_LINGER = 7;
 
     private final String name;
     private final Class<T> type;
--- a/src/share/classes/sun/security/pkcs11/Secmod.java	Mon Apr 01 10:09:27 2013 -0300
+++ b/src/share/classes/sun/security/pkcs11/Secmod.java	Tue Apr 09 08:36:20 2013 -0300
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
+ * 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
@@ -35,7 +35,6 @@
 import sun.security.pkcs11.wrapper.*;
 import static sun.security.pkcs11.wrapper.PKCS11Constants.*;
 
-import javax.tools.annotation.GenerateNativeHeader;
 
 /**
  * The Secmod class defines the interface to the native NSS
@@ -57,8 +56,6 @@
  * @since   1.6
  * @author  Andreas Sterbenz
  */
-/* No native methods here, but the constants are needed in the supporting JNI code */
-@GenerateNativeHeader
 public final class Secmod {
 
     private final static boolean DEBUG = false;
--- a/src/share/classes/sun/security/pkcs11/wrapper/PKCS11.java	Mon Apr 01 10:09:27 2013 -0300
+++ b/src/share/classes/sun/security/pkcs11/wrapper/PKCS11.java	Tue Apr 09 08:36:20 2013 -0300
@@ -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.
  */
 
 /* Copyright  (c) 2002 Graz University of Technology. All rights reserved.
@@ -55,7 +55,6 @@
 import java.security.PrivilegedAction;
 
 import static sun.security.pkcs11.wrapper.PKCS11Constants.*;
-import javax.tools.annotation.GenerateNativeHeader;
 
 /**
  * This is the default implementation of the PKCS11 interface. IT connects to
@@ -68,8 +67,6 @@
  * @author Martin Schlaeffer <schlaeff@sbox.tugraz.at>
  * @invariants (pkcs11ModulePath_ <> null)
  */
-/* No native methods here, but the constants are needed in the supporting JNI code */
-@GenerateNativeHeader
 public class PKCS11 {
 
     /**
--- a/src/share/classes/sun/util/logging/LoggingProxy.java	Mon Apr 01 10:09:27 2013 -0300
+++ b/src/share/classes/sun/util/logging/LoggingProxy.java	Tue Apr 09 08:36:20 2013 -0300
@@ -61,6 +61,8 @@
 
     public String getLevelName(Object level);
 
+    public int getLevelValue(Object level);
+
     // return the logging property
     public String getProperty(String key);
 }
--- a/src/share/classes/sun/util/logging/LoggingSupport.java	Mon Apr 01 10:09:27 2013 -0300
+++ b/src/share/classes/sun/util/logging/LoggingSupport.java	Tue Apr 09 08:36:20 2013 -0300
@@ -140,6 +140,11 @@
         return proxy.getLevelName(level);
     }
 
+    public static int getLevelValue(Object level) {
+        ensureAvailable();
+        return proxy.getLevelValue(level);
+    }
+
     private static final String DEFAULT_FORMAT =
         "%1$tb %1$td, %1$tY %1$tl:%1$tM:%1$tS %1$Tp %2$s%n%4$s: %5$s%6$s%n";
 
--- a/src/share/classes/sun/util/logging/PlatformLogger.java	Mon Apr 01 10:09:27 2013 -0300
+++ b/src/share/classes/sun/util/logging/PlatformLogger.java	Tue Apr 09 08:36:20 2013 -0300
@@ -32,6 +32,7 @@
 import java.io.StringWriter;
 import java.security.AccessController;
 import java.security.PrivilegedAction;
+import java.util.Arrays;
 import java.util.Date;
 import java.util.HashMap;
 import java.util.Map;
@@ -84,31 +85,38 @@
  * @since 1.7
  */
 public class PlatformLogger {
-    // shortcut to PlatformLogger.Level enums
-    public static final Level OFF     = Level.OFF;
-    public static final Level SEVERE  = Level.SEVERE;
-    public static final Level WARNING = Level.WARNING;
-    public static final Level INFO    = Level.INFO;
-    public static final Level CONFIG  = Level.CONFIG;
-    public static final Level FINE    = Level.FINE;
-    public static final Level FINER   = Level.FINER;
-    public static final Level FINEST  = Level.FINEST;
-    public static final Level ALL     = Level.ALL;
+    /*
+     * These constants should be shortcuts to Level enum constants that
+     * the clients of sun.util.logging.PlatformLogger require no source
+     * modification and avoid the conversion from int to Level enum.
+     *
+     * This can be done when JavaFX is converted to use the new PlatformLogger.Level API.
+     */
+    public static final int OFF     = Integer.MAX_VALUE;
+    public static final int SEVERE  = 1000;
+    public static final int WARNING = 900;
+    public static final int INFO    = 800;
+    public static final int CONFIG  = 700;
+    public static final int FINE    = 500;
+    public static final int FINER   = 400;
+    public static final int FINEST  = 300;
+    public static final int ALL     = Integer.MIN_VALUE;
 
     /**
      * PlatformLogger logging levels.
      */
     public static enum Level {
-        // The name and value must match that of {@code java.util.logging.Level} objects.
-        ALL(Integer.MIN_VALUE),
-        FINEST(300),
-        FINER(400),
-        FINE(500),
-        CONFIG(700),
-        INFO(800),
-        WARNING(900),
-        SEVERE(1000),
-        OFF(Integer.MAX_VALUE);
+        // The name and value must match that of {@code java.util.logging.Level}s.
+        // Declare in ascending order of the given value for binary search.
+        ALL,
+        FINEST,
+        FINER,
+        FINE,
+        CONFIG,
+        INFO,
+        WARNING,
+        SEVERE,
+        OFF;
 
         /**
          * Associated java.util.logging.Level lazily initialized in
@@ -118,17 +126,39 @@
          */
         /* java.util.logging.Level */ Object javaLevel;
 
-        private final int value;
+        // ascending order for binary search matching the list of enum constants
+        private static final int[] levelValues = new int[] {
+            PlatformLogger.ALL, PlatformLogger.FINEST, PlatformLogger.FINER,
+            PlatformLogger.FINE, PlatformLogger.CONFIG, PlatformLogger.INFO,
+            PlatformLogger.WARNING, PlatformLogger.SEVERE, PlatformLogger.OFF
+        };
+
         public int intValue() {
-            return value;
+            return levelValues[this.ordinal()];
         }
 
-        Level(int value) {
-            this.value = value;
+        static Level valueOf(int level) {
+            switch (level) {
+                // ordering per the highest occurences in the jdk source
+                // finest, fine, finer, info first
+                case PlatformLogger.FINEST  : return Level.FINEST;
+                case PlatformLogger.FINE    : return Level.FINE;
+                case PlatformLogger.FINER   : return Level.FINER;
+                case PlatformLogger.INFO    : return Level.INFO;
+                case PlatformLogger.WARNING : return Level.WARNING;
+                case PlatformLogger.CONFIG  : return Level.CONFIG;
+                case PlatformLogger.SEVERE  : return Level.SEVERE;
+                case PlatformLogger.OFF     : return Level.OFF;
+                case PlatformLogger.ALL     : return Level.ALL;
+            }
+            // return the nearest Level value >= the given level,
+            // for level > SEVERE, return SEVERE and exclude OFF
+            int i = Arrays.binarySearch(levelValues, 0, levelValues.length-2, level);
+            return values()[i >= 0 ? i : (-i-1)];
         }
     }
 
-    private static final Level DEFAULT_LEVEL = INFO;
+    private static final Level DEFAULT_LEVEL = Level.INFO;
     private static boolean loggingEnabled;
     static {
         loggingEnabled = AccessController.doPrivileged(
@@ -234,8 +264,44 @@
     /**
      * Returns true if a message of the given level would actually
      * be logged by this logger.
+     *
+     * @deprecated Use isLoggable(Level) instead.
+     */
+    @Deprecated
+    public boolean isLoggable(int levelValue) {
+        return isLoggable(Level.valueOf(levelValue));
+    }
+
+    /**
+     * Gets the current log level. Returns 0 if the current effective level is
+     * not set (equivalent to Logger.getLevel() returns null).
+     *
+     * @deprecated Use level() instead
+     */
+    @Deprecated
+    public int getLevel() {
+        Level level = loggerProxy.getLevel();
+        return level != null ? level.intValue() : 0;
+    }
+
+    /**
+     * Sets the log level.
+     *
+     * @deprecated Use setLevel(Level) instead
+     */
+    @Deprecated
+    public void setLevel(int newLevel) {
+        loggerProxy.setLevel(newLevel == 0 ? null : Level.valueOf(newLevel));
+    }
+
+    /**
+     * Returns true if a message of the given level would actually
+     * be logged by this logger.
      */
     public boolean isLoggable(Level level) {
+        if (level == null) {
+            throw new NullPointerException();
+        }
         // performance-sensitive method: use two monomorphic call-sites
         JavaLoggerProxy jlp = javaLoggerProxy;
         return jlp != null ? jlp.isLoggable(level) : loggerProxy.isLoggable(level);
@@ -246,15 +312,9 @@
      * The result may be null, which means that this logger's
      * effective level will be inherited from its parent.
      *
-     * This method is primarily for testing purpose and not recommended
-     * to be used at runtime since it does not support custom j.u.l.Level.
-     *
      * @return  this PlatformLogger's level
-     *
-     * @throw IllegalArgumentException if j.u.l.Logger is set to
-     *        a custom j.u.l.Level when java.util.logging facility is enabled
      */
-    public Level getLevel() {
+    public Level level() {
         return loggerProxy.getLevel();
     }
 
@@ -278,105 +338,105 @@
      * Logs a SEVERE message.
      */
     public void severe(String msg) {
-        loggerProxy.doLog(SEVERE, msg);
+        loggerProxy.doLog(Level.SEVERE, msg);
     }
 
     public void severe(String msg, Throwable t) {
-        loggerProxy.doLog(SEVERE, msg, t);
+        loggerProxy.doLog(Level.SEVERE, msg, t);
     }
 
     public void severe(String msg, Object... params) {
-        loggerProxy.doLog(SEVERE, msg, params);
+        loggerProxy.doLog(Level.SEVERE, msg, params);
     }
 
     /**
      * Logs a WARNING message.
      */
     public void warning(String msg) {
-        loggerProxy.doLog(WARNING, msg);
+        loggerProxy.doLog(Level.WARNING, msg);
     }
 
     public void warning(String msg, Throwable t) {
-        loggerProxy.doLog(WARNING, msg, t);
+        loggerProxy.doLog(Level.WARNING, msg, t);
     }
 
     public void warning(String msg, Object... params) {
-        loggerProxy.doLog(WARNING, msg, params);
+        loggerProxy.doLog(Level.WARNING, msg, params);
     }
 
     /**
      * Logs an INFO message.
      */
     public void info(String msg) {
-        loggerProxy.doLog(INFO, msg);
+        loggerProxy.doLog(Level.INFO, msg);
     }
 
     public void info(String msg, Throwable t) {
-        loggerProxy.doLog(INFO, msg, t);
+        loggerProxy.doLog(Level.INFO, msg, t);
     }
 
     public void info(String msg, Object... params) {
-        loggerProxy.doLog(INFO, msg, params);
+        loggerProxy.doLog(Level.INFO, msg, params);
     }
 
     /**
      * Logs a CONFIG message.
      */
     public void config(String msg) {
-        loggerProxy.doLog(CONFIG, msg);
+        loggerProxy.doLog(Level.CONFIG, msg);
     }
 
     public void config(String msg, Throwable t) {
-        loggerProxy.doLog(CONFIG, msg, t);
+        loggerProxy.doLog(Level.CONFIG, msg, t);
     }
 
     public void config(String msg, Object... params) {
-        loggerProxy.doLog(CONFIG, msg, params);
+        loggerProxy.doLog(Level.CONFIG, msg, params);
     }
 
     /**
      * Logs a FINE message.
      */
     public void fine(String msg) {
-        loggerProxy.doLog(FINE, msg);
+        loggerProxy.doLog(Level.FINE, msg);
     }
 
     public void fine(String msg, Throwable t) {
-        loggerProxy.doLog(FINE, msg, t);
+        loggerProxy.doLog(Level.FINE, msg, t);
     }
 
     public void fine(String msg, Object... params) {
-        loggerProxy.doLog(FINE, msg, params);
+        loggerProxy.doLog(Level.FINE, msg, params);
     }
 
     /**
      * Logs a FINER message.
      */
     public void finer(String msg) {
-        loggerProxy.doLog(FINER, msg);
+        loggerProxy.doLog(Level.FINER, msg);
     }
 
     public void finer(String msg, Throwable t) {
-        loggerProxy.doLog(FINER, msg, t);
+        loggerProxy.doLog(Level.FINER, msg, t);
     }
 
     public void finer(String msg, Object... params) {
-        loggerProxy.doLog(FINER, msg, params);
+        loggerProxy.doLog(Level.FINER, msg, params);
     }
 
     /**
      * Logs a FINEST message.
      */
     public void finest(String msg) {
-        loggerProxy.doLog(FINEST, msg);
+        loggerProxy.doLog(Level.FINEST, msg);
     }
 
     public void finest(String msg, Throwable t) {
-        loggerProxy.doLog(FINEST, msg, t);
+        loggerProxy.doLog(Level.FINEST, msg, t);
     }
 
     public void finest(String msg, Object... params) {
-        loggerProxy.doLog(FINEST, msg, params);
+        loggerProxy.doLog(Level.FINEST, msg, params);
     }
 
     /**
@@ -421,7 +481,7 @@
         }
 
         boolean isEnabled() {
-            return effectiveLevel != OFF;
+            return effectiveLevel != Level.OFF;
         }
 
         Level getLevel() {
@@ -457,7 +517,7 @@
 
         boolean isLoggable(Level level) {
             Level effectiveLevel = this.effectiveLevel;
-            return level.intValue() >= effectiveLevel.intValue() && effectiveLevel != OFF;
+            return level.intValue() >= effectiveLevel.intValue() && effectiveLevel != Level.OFF;
         }
 
         // derive effective level (could do inheritance search like j.u.l.Logger)
@@ -611,15 +671,18 @@
 
         /**
          * Returns the PlatformLogger.Level mapped from j.u.l.Level
-         * set in the logger.
-         * @throw IllegalArgumentException if j.u.l.Logger is set to
-         *        a custom j.u.l.Level
+         * set in the logger.  If the j.u.l.Logger is set to a custom Level,
+         * this method will return the nearest Level.
          */
         Level getLevel() {
             Object javaLevel = LoggingSupport.getLevel(javaLogger);
-            return javaLevel == null
-                    ? null
-                    : Level.valueOf(LoggingSupport.getLevelName(javaLevel));
+            if (javaLevel == null) return null;
+
+            try {
+                return Level.valueOf(LoggingSupport.getLevelName(javaLevel));
+            } catch (IllegalArgumentException e) {
+                return Level.valueOf(LoggingSupport.getLevelValue(javaLevel));
+            }
         }
 
         void setLevel(Level level) {
--- a/src/share/demo/jvmti/hprof/hprof_md.h	Mon Apr 01 10:09:27 2013 -0300
+++ b/src/share/demo/jvmti/hprof/hprof_md.h	Tue Apr 09 08:36:20 2013 -0300
@@ -69,7 +69,7 @@
 unsigned md_ntohs(unsigned short s);
 unsigned md_ntohl(unsigned l);
 
-void   md_build_library_name(char *holder, int holderlen, char *pname, char *fname);
+void   md_build_library_name(char *holder, int holderlen, const char *pname, const char *fname);
 void * md_load_library(const char *name, char *err_buf, int err_buflen);
 void   md_unload_library(void *handle);
 void * md_find_library_entry(void *handle, const char *name);
--- a/src/share/native/sun/awt/splashscreen/splashscreen_gif.c	Mon Apr 01 10:09:27 2013 -0300
+++ b/src/share/native/sun/awt/splashscreen/splashscreen_gif.c	Tue Apr 09 08:36:20 2013 -0300
@@ -26,7 +26,7 @@
 #include "splashscreen_impl.h"
 #include "splashscreen_gfx.h"
 
-#include "../giflib/gif_lib.h"
+#include <gif_lib.h>
 
 #define GIF_TRANSPARENT     0x01
 #define GIF_USER_INPUT      0x02
--- a/src/solaris/back/linker_md.c	Mon Apr 01 10:09:27 2013 -0300
+++ b/src/solaris/back/linker_md.c	Tue Apr 09 08:36:20 2013 -0300
@@ -55,34 +55,27 @@
 #endif
 
 static void dll_build_name(char* buffer, size_t buflen,
-                           const char* pname, const char* fname) {
-    // Based on os_solaris.cpp
+                           const char* paths, const char* fname) {
+    char *path, *paths_copy, *next_token;
 
-    char *path_sep = PATH_SEPARATOR;
-    char *pathname = (char *)pname;
-    *buffer = '\0';
-    while (strlen(pathname) > 0) {
-        char *p = strchr(pathname, *path_sep);
-        if (p == NULL) {
-            p = pathname + strlen(pathname);
-        }
-        /* check for NULL path */
-        if (p == pathname) {
-            continue;
-        }
-        (void)snprintf(buffer, buflen, "%.*s/lib%s." LIB_SUFFIX, (int)(p - pathname),
-                       pathname, fname);
+    paths_copy = strdup(paths);
+    if (paths_copy == NULL) {
+        return;
+    }
 
+    next_token = NULL;
+    path = strtok_r(paths_copy, PATH_SEPARATOR, &next_token);
+
+    while (path != NULL) {
+        snprintf(buffer, buflen, "%s/lib%s." LIB_SUFFIX, path, fname);
         if (access(buffer, F_OK) == 0) {
             break;
         }
-        if (*p == '\0') {
-            pathname = p;
-        } else {
-            pathname = p + 1;
-        }
         *buffer = '\0';
+        path = strtok_r(NULL, PATH_SEPARATOR, &next_token);
     }
+
+    free(paths_copy);
 }
 
 /*
@@ -103,7 +96,7 @@
  * appropriate pre and extensions to a filename and the path
  */
 void
-dbgsysBuildLibName(char *holder, int holderlen, char *pname, char *fname)
+dbgsysBuildLibName(char *holder, int holderlen, const char *pname, const char *fname)
 {
     const int pnamelen = pname ? strlen(pname) : 0;
 
--- a/src/solaris/classes/sun/awt/X11/XComponentPeer.java	Mon Apr 01 10:09:27 2013 -0300
+++ b/src/solaris/classes/sun/awt/X11/XComponentPeer.java	Tue Apr 09 08:36:20 2013 -0300
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2011, 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
@@ -70,10 +70,7 @@
 import sun.java2d.BackBufferCapsProvider;
 import sun.java2d.pipe.Region;
 
-import javax.tools.annotation.GenerateNativeHeader;
 
-/* No native methods here, but the constants are needed in the supporting JNI code */
-@GenerateNativeHeader
 public class XComponentPeer extends XWindow implements ComponentPeer, DropTargetPeer,
     BackBufferCapsProvider
 {
--- a/src/solaris/classes/sun/nio/ch/sctp/AssociationChange.java	Mon Apr 01 10:09:27 2013 -0300
+++ b/src/solaris/classes/sun/nio/ch/sctp/AssociationChange.java	Tue Apr 09 08:36:20 2013 -0300
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 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
@@ -26,22 +26,20 @@
 
 import com.sun.nio.sctp.Association;
 import com.sun.nio.sctp.AssociationChangeNotification;
-import javax.tools.annotation.GenerateNativeHeader;
+import java.lang.annotation.Native;
 
 /**
  * An implementation of AssociationChangeNotification
  */
-/* No native methods here, but the constants are needed in the supporting JNI code */
-@GenerateNativeHeader
 public class AssociationChange extends AssociationChangeNotification
     implements SctpNotification
 {
     /* static final ints so that they can be referenced from native */
-    private final static int SCTP_COMM_UP = 1;
-    private final static int SCTP_COMM_LOST = 2;
-    private final static int SCTP_RESTART = 3;
-    private final static int SCTP_SHUTDOWN = 4;
-    private final static int SCTP_CANT_START = 5;
+    @Native private final static int SCTP_COMM_UP = 1;
+    @Native private final static int SCTP_COMM_LOST = 2;
+    @Native private final static int SCTP_RESTART = 3;
+    @Native private final static int SCTP_SHUTDOWN = 4;
+    @Native private final static int SCTP_CANT_START = 5;
 
     private Association association;
 
--- a/src/solaris/classes/sun/nio/ch/sctp/PeerAddrChange.java	Mon Apr 01 10:09:27 2013 -0300
+++ b/src/solaris/classes/sun/nio/ch/sctp/PeerAddrChange.java	Tue Apr 09 08:36:20 2013 -0300
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 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,23 +27,21 @@
 import java.net.SocketAddress;
 import com.sun.nio.sctp.Association;
 import com.sun.nio.sctp.PeerAddressChangeNotification;
-import javax.tools.annotation.GenerateNativeHeader;
+import java.lang.annotation.Native;
 
 /**
  * An implementation of PeerAddressChangeNotification
  */
-/* No native methods here, but the constants are needed in the supporting JNI code */
-@GenerateNativeHeader
 public class PeerAddrChange extends PeerAddressChangeNotification
     implements SctpNotification
 {
     /* static final ints so that they can be referenced from native */
-    private final static int SCTP_ADDR_AVAILABLE = 1;
-    private final static int SCTP_ADDR_UNREACHABLE = 2;
-    private final static int SCTP_ADDR_REMOVED = 3;
-    private final static int SCTP_ADDR_ADDED = 4;
-    private final static int SCTP_ADDR_MADE_PRIM = 5;
-    private final static int SCTP_ADDR_CONFIRMED =6;
+    @Native private final static int SCTP_ADDR_AVAILABLE = 1;
+    @Native private final static int SCTP_ADDR_UNREACHABLE = 2;
+    @Native private final static int SCTP_ADDR_REMOVED = 3;
+    @Native private final static int SCTP_ADDR_ADDED = 4;
+    @Native private final static int SCTP_ADDR_MADE_PRIM = 5;
+    @Native private final static int SCTP_ADDR_CONFIRMED =6;
 
     private Association association;
 
--- a/src/solaris/classes/sun/nio/ch/sctp/ResultContainer.java	Mon Apr 01 10:09:27 2013 -0300
+++ b/src/solaris/classes/sun/nio/ch/sctp/ResultContainer.java	Tue Apr 09 08:36:20 2013 -0300
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 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
@@ -24,22 +24,20 @@
  */
 package sun.nio.ch.sctp;
 
-import javax.tools.annotation.GenerateNativeHeader;
+import java.lang.annotation.Native;
 
 /**
  * Wraps the actual message or notification so that it can be
  * set and returned from the native receive implementation.
  */
-/* No native methods here, but the constants are needed in the supporting JNI code */
-@GenerateNativeHeader
 public class ResultContainer {
     /* static final ints so that they can be referenced from native */
-    static final int NOTHING = 0;
-    static final int MESSAGE = 1;
-    static final int SEND_FAILED = 2;
-    static final int ASSOCIATION_CHANGED = 3;
-    static final int PEER_ADDRESS_CHANGED = 4;
-    static final int SHUTDOWN = 5;
+    @Native static final int NOTHING = 0;
+    @Native static final int MESSAGE = 1;
+    @Native static final int SEND_FAILED = 2;
+    @Native static final int ASSOCIATION_CHANGED = 3;
+    @Native static final int PEER_ADDRESS_CHANGED = 4;
+    @Native static final int SHUTDOWN = 5;
 
     private Object value;
     private int type;
--- a/src/solaris/demo/jvmti/hprof/hprof_md.c	Mon Apr 01 10:09:27 2013 -0300
+++ b/src/solaris/demo/jvmti/hprof/hprof_md.c	Tue Apr 09 08:36:20 2013 -0300
@@ -381,38 +381,32 @@
 }
 
 static void dll_build_name(char* buffer, size_t buflen,
-                           const char* pname, const char* fname) {
-    // Loosely based on os_solaris.cpp
+                           const char* paths, const char* fname) {
+    char *path, *paths_copy, *next_token;
+
+    paths_copy = strdup(paths);
+    if (paths_copy == NULL) {
+        return;
+    }
+
+    next_token = NULL;
+    path = strtok_r(paths_copy, ":", &next_token);
 
-      char *pathname = (char *)pname;
-      *buffer = '\0';
-      while (strlen(pathname) > 0) {
-          char *p = strchr(pathname, ':');
-          if (p == NULL) {
-              p = pathname + strlen(pathname);
-          }
-          /* check for NULL path */
-          if (p == pathname) {
-              continue;
-          }
-          (void)snprintf(buffer, buflen, "%.*s/lib%s" JNI_LIB_SUFFIX,
-                         (int)(p - pathname), pathname, fname);
+    while (path != NULL) {
+        snprintf(buffer, buflen, "%s/lib%s" JNI_LIB_SUFFIX, path, fname);
+        if (access(buffer, F_OK) == 0) {
+            break;
+        }
+        *buffer = '\0';
+        path = strtok_r(NULL, ":", &next_token);
+    }
 
-          if (access(buffer, F_OK) == 0) {
-              break;
-          }
-          if (*p == '\0') {
-              pathname = p;
-          } else {
-              pathname = p + 1;
-          }
-          *buffer = '\0';
-      }
+    free(paths_copy);
 }
 
 /* Create the actual fill filename for a dynamic library.  */
 void
-md_build_library_name(char *holder, int holderlen, char *pname, char *fname)
+md_build_library_name(char *holder, int holderlen, const char *pname, const char *fname)
 {
     int   pnamelen;
 
--- a/src/solaris/native/sun/awt/awt_InputMethod.c	Mon Apr 01 10:09:27 2013 -0300
+++ b/src/solaris/native/sun/awt/awt_InputMethod.c	Tue Apr 09 08:36:20 2013 -0300
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 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
@@ -36,7 +36,6 @@
 #include "awt_p.h"
 
 #include <sun_awt_X11InputMethod.h>
-#include <sun_awt_X11_XComponentPeer.h>
 #include <sun_awt_X11_XInputMethod.h>
 
 #define THROW_OUT_OF_MEMORY_ERROR() \
--- a/src/solaris/native/sun/awt/fontpath.c	Mon Apr 01 10:09:27 2013 -0300
+++ b/src/solaris/native/sun/awt/fontpath.c	Tue Apr 09 08:36:20 2013 -0300
@@ -41,7 +41,6 @@
 #include <jni.h>
 #include <jni_util.h>
 #include <jvm_md.h>
-#include <sun_font_FontManager.h>
 #ifndef HEADLESS
 #include <X11/Xlib.h>
 #include <awt.h>
--- a/src/solaris/native/sun/awt/gtk2_interface.c	Mon Apr 01 10:09:27 2013 -0300
+++ b/src/solaris/native/sun/awt/gtk2_interface.c	Tue Apr 09 08:36:20 2013 -0300
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
+ * 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
@@ -438,6 +438,39 @@
 }
 
 /**
+ * Functions for awt_Desktop.c
+ */
+gboolean gtk2_show_uri_load() {
+     gboolean success = FALSE;
+     dlerror();
+     const char *gtk_version = fp_gtk_check_version(2, 14, 0);
+     if (gtk_version != NULL) {
+         // The gtk_show_uri is available from GTK+ 2.14
+#ifdef INTERNAL_BUILD
+         fprintf (stderr, "The version of GTK is %s. "
+             "The gtk_show_uri function is supported "
+             "since GTK+ 2.14.\n", gtk_version);
+#endif /* INTERNAL_BUILD */
+     } else {
+         // Loading symbols only if the GTK version is 2.14 and higher
+         fp_gtk_show_uri = dl_symbol("gtk_show_uri");
+         const char *dlsym_error = dlerror();
+         if (dlsym_error) {
+#ifdef INTERNAL_BUILD
+             fprintf (stderr, "Cannot load symbol: %s \n", dlsym_error);
+#endif /* INTERNAL_BUILD */
+         } else if (fp_gtk_show_uri == NULL) {
+#ifdef INTERNAL_BUILD
+             fprintf(stderr, "dlsym(gtk_show_uri) returned NULL\n");
+#endif /* INTERNAL_BUILD */
+         } else {
+             success = TRUE;
+         }
+     }
+     return success;
+}
+
+/**
  * Functions for sun_awt_X11_GtkFileDialogPeer.c
  */
 void gtk2_file_chooser_load()
--- a/src/solaris/native/sun/awt/gtk2_interface.h	Mon Apr 01 10:09:27 2013 -0300
+++ b/src/solaris/native/sun/awt/gtk2_interface.h	Tue Apr 09 08:36:20 2013 -0300
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
+ * 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
@@ -42,6 +42,7 @@
 #define GTK_STOCK_CANCEL           "gtk-cancel"
 #define GTK_STOCK_SAVE             "gtk-save"
 #define GTK_STOCK_OPEN             "gtk-open"
+#define GDK_CURRENT_TIME           0L
 
 typedef enum _WidgetType
 {
@@ -280,6 +281,7 @@
 typedef void GdkColormap;
 typedef void GdkDrawable;
 typedef void GdkGC;
+typedef void GdkScreen;
 typedef void GdkPixbuf;
 typedef void GdkPixmap;
 typedef void GdkWindow;
@@ -664,6 +666,15 @@
 gboolean gtk2_load();
 
 /*
+ * Loads fp_gtk_show_uri function pointer. This initialization is
+ * separated because the function is required only
+ * for java.awt.Desktop API. The function relies on initialization in
+ * gtk2_load, so it must be invoked only after a successful gtk2_load
+ * invocation
+ */
+gboolean gtk2_show_uri_load();
+
+/*
  * Unload the gtk2 library.  If the library is already unloaded this method has
  * no effect and returns success.
  * Returns FALSE on failure and TRUE on success.
@@ -795,4 +806,7 @@
 void (*fp_gdk_threads_enter)(void);
 void (*fp_gdk_threads_leave)(void);
 
+gboolean (*fp_gtk_show_uri)(GdkScreen *screen, const gchar *uri,
+    guint32 timestamp, GError **error);
+
 #endif /* !_GTK2_INTERFACE_H */
--- a/src/solaris/native/sun/security/pkcs11/wrapper/p11_md.c	Mon Apr 01 10:09:27 2013 -0300
+++ b/src/solaris/native/sun/security/pkcs11/wrapper/p11_md.c	Tue Apr 09 08:36:20 2013 -0300
@@ -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.
  */
 
 /* Copyright  (c) 2002 Graz University of Technology. All rights reserved.
@@ -104,6 +104,10 @@
     if (hModule == NULL) {
         systemErrorMessage = dlerror();
         exceptionMessage = (char *) malloc(sizeof(char) * (strlen(systemErrorMessage) + strlen(libraryNameStr) + 1));
+        if (exceptionMessage == NULL) {
+            throwOutOfMemoryError(env, 0);
+            return;
+        }
         strcpy(exceptionMessage, systemErrorMessage);
         strcat(exceptionMessage, libraryNameStr);
         throwIOException(env, exceptionMessage);
@@ -134,6 +138,11 @@
      * Get function pointers to all PKCS #11 functions
      */
     moduleData = (ModuleData *) malloc(sizeof(ModuleData));
+    if (moduleData == NULL) {
+        dlclose(hModule);
+        throwOutOfMemoryError(env, 0);
+        return;
+    }
     moduleData->hModule = hModule;
     moduleData->applicationMutexHandler = NULL;
     rv = (C_GetFunctionList)(&(moduleData->ckFunctionListPtr));
--- a/src/solaris/native/sun/xawt/awt_Desktop.c	Mon Apr 01 10:09:27 2013 -0300
+++ b/src/solaris/native/sun/xawt/awt_Desktop.c	Tue Apr 09 08:36:20 2013 -0300
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
+ * 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
@@ -23,71 +23,11 @@
  * questions.
  */
 
-#include <jni.h>
-#include <jvm_md.h>
-#include <dlfcn.h>
-
-typedef int gboolean;
-
-typedef gboolean (GNOME_URL_SHOW_TYPE)(const char *, void **);
-typedef gboolean (GNOME_VFS_INIT_TYPE)(void);
-
-GNOME_URL_SHOW_TYPE *gnome_url_show;
-GNOME_VFS_INIT_TYPE *gnome_vfs_init;
-
-int init(){
-    void *vfs_handle;
-    void *gnome_handle;
-    const char *errmsg;
+#include "gtk2_interface.h"
+#include "gnome_interface.h"
 
-    vfs_handle = dlopen(VERSIONED_JNI_LIB_NAME("gnomevfs-2", "0"), RTLD_LAZY);
-    if (vfs_handle == NULL) {
-        vfs_handle = dlopen(JNI_LIB_NAME("gnomevfs-2"), RTLD_LAZY);
-        if (vfs_handle == NULL) {
-#ifdef INTERNAL_BUILD
-            fprintf(stderr, "can not load libgnomevfs-2.so\n");
-#endif
-            return 0;
-        }
-    }
-    dlerror(); /* Clear errors */
-    gnome_vfs_init = (GNOME_VFS_INIT_TYPE*)dlsym(vfs_handle, "gnome_vfs_init");
-    if (gnome_vfs_init == NULL){
-#ifdef INTERNAL_BUILD
-        fprintf(stderr, "dlsym( gnome_vfs_init) returned NULL\n");
-#endif
-        return 0;
-    }
-    if ((errmsg = dlerror()) != NULL) {
-#ifdef INTERNAL_BUILD
-        fprintf(stderr, "can not find symbol gnome_vfs_init %s \n", errmsg);
-#endif
-        return 0;
-    }
-    // call gonme_vfs_init()
-    (*gnome_vfs_init)();
-
-    gnome_handle = dlopen(VERSIONED_JNI_LIB_NAME("gnome-2", "0"), RTLD_LAZY);
-    if (gnome_handle == NULL) {
-        gnome_handle = dlopen(JNI_LIB_NAME("gnome-2"), RTLD_LAZY);
-        if (gnome_handle == NULL) {
-#ifdef INTERNAL_BUILD
-            fprintf(stderr, "can not load libgnome-2.so\n");
-#endif
-            return 0;
-        }
-    }
-    dlerror(); /* Clear errors */
-    gnome_url_show = (GNOME_URL_SHOW_TYPE*)dlsym(gnome_handle, "gnome_url_show");
-    if ((errmsg = dlerror()) != NULL) {
-#ifdef INTERNAL_BUILD
-        fprintf(stderr, "can not find symble gnome_url_show\n");
-#endif
-        return 0;
-    }
-
-    return 1;
-}
+static gboolean gtk_has_been_loaded = FALSE;
+static gboolean gnome_has_been_loaded = FALSE;
 
 /*
  * Class:     sun_awt_X11_XDesktopPeer
@@ -97,8 +37,20 @@
 JNIEXPORT jboolean JNICALL Java_sun_awt_X11_XDesktopPeer_init
   (JNIEnv *env, jclass cls)
 {
-    int init_ok = init();
-    return init_ok ? JNI_TRUE : JNI_FALSE;
+
+    if (gtk_has_been_loaded || gnome_has_been_loaded) {
+        return JNI_TRUE;
+    }
+
+    if (gtk2_load() && gtk2_show_uri_load()) {
+        gtk_has_been_loaded = TRUE;
+        return JNI_TRUE;
+    } else if (gnome_load()) {
+        gnome_has_been_loaded = TRUE;
+        return JNI_TRUE;
+    }
+
+    return JNI_FALSE;
 }
 
 /*
@@ -109,16 +61,19 @@
 JNIEXPORT jboolean JNICALL Java_sun_awt_X11_XDesktopPeer_gnome_1url_1show
   (JNIEnv *env, jobject obj, jbyteArray url_j)
 {
-    gboolean success;
-    const char* url_c;
+    gboolean success = FALSE;
+    const gchar* url_c;
+
+    url_c = (char*)(*env)->GetByteArrayElements(env, url_j, NULL);
 
-    if (gnome_url_show == NULL) {
-        return JNI_FALSE;
+    if (gtk_has_been_loaded) {
+        fp_gdk_threads_enter();
+        success = fp_gtk_show_uri(NULL, url_c, GDK_CURRENT_TIME, NULL);
+        fp_gdk_threads_leave();
+    } else if (gnome_has_been_loaded) {
+        success = (*gnome_url_show)(url_c, NULL);
     }
 
-    url_c = (char*)(*env)->GetByteArrayElements(env, url_j, NULL);
-    // call gnome_url_show(const char* , GError**)
-    success = (*gnome_url_show)(url_c, NULL);
     (*env)->ReleaseByteArrayElements(env, url_j, (signed char*)url_c, 0);
 
     return success ? JNI_TRUE : JNI_FALSE;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/solaris/native/sun/xawt/gnome_interface.c	Tue Apr 09 08:36:20 2013 -0300
@@ -0,0 +1,87 @@
+/*
+ * 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.
+ */
+
+#include "gnome_interface.h"
+
+GNOME_URL_SHOW_TYPE *gnome_url_show = NULL;
+
+gboolean gnome_load() {
+     void *vfs_handle;
+     void *gnome_handle;
+     const char *errmsg;
+     GNOME_VFS_INIT_TYPE *gnome_vfs_init;
+
+     // trying to open the gnomevfs. VERSIONED_JNI_LIB_NAME
+     // macros formats the library name in a system specific manner
+     // see jdk/src/solaris/javavm/export/jvm_md.h for more details
+     vfs_handle = dlopen(VERSIONED_JNI_LIB_NAME("gnomevfs-2", "0"), RTLD_LAZY);
+     if (vfs_handle == NULL) {
+         // if we cannot load the library using a version assumed by JNI
+         // we are trying to load the library without a version suffix
+         vfs_handle = dlopen(JNI_LIB_NAME("gnomevfs-2"), RTLD_LAZY);
+         if (vfs_handle == NULL) {
+ #ifdef INTERNAL_BUILD
+             fprintf(stderr, "can not load libgnomevfs-2.so\n");
+ #endif
+             return FALSE;
+         }
+     }
+     dlerror(); /* Clear errors */
+     gnome_vfs_init = (GNOME_VFS_INIT_TYPE*)dlsym(vfs_handle, "gnome_vfs_init");
+     if (gnome_vfs_init == NULL){
+ #ifdef INTERNAL_BUILD
+         fprintf(stderr, "dlsym( gnome_vfs_init) returned NULL\n");
+ #endif
+         return FALSE;
+     }
+     if ((errmsg = dlerror()) != NULL) {
+ #ifdef INTERNAL_BUILD
+         fprintf(stderr, "can not find symbol gnome_vfs_init %s \n", errmsg);
+ #endif
+         return FALSE;
+     }
+     // call gonme_vfs_init()
+     (*gnome_vfs_init)();
+
+     gnome_handle = dlopen(VERSIONED_JNI_LIB_NAME("gnome-2", "0"), RTLD_LAZY);
+     if (gnome_handle == NULL) {
+         gnome_handle = dlopen(JNI_LIB_NAME("gnome-2"), RTLD_LAZY);
+         if (gnome_handle == NULL) {
+ #ifdef INTERNAL_BUILD
+             fprintf(stderr, "can not load libgnome-2.so\n");
+ #endif
+             return FALSE;
+         }
+     }
+     dlerror(); /* Clear errors */
+     gnome_url_show = (GNOME_URL_SHOW_TYPE*)dlsym(gnome_handle, "gnome_url_show");
+     if ((errmsg = dlerror()) != NULL) {
+ #ifdef INTERNAL_BUILD
+         fprintf(stderr, "can not find symble gnome_url_show\n");
+ #endif
+         return FALSE;
+     }
+     return TRUE;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/solaris/native/sun/xawt/gnome_interface.h	Tue Apr 09 08:36:20 2013 -0300
@@ -0,0 +1,39 @@
+/*
+ * 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.
+ */
+
+#ifndef _GNOME_INTERFACE_H
+#define _GNOME_INTERFACE_H
+#include "gtk2_interface.h"
+#include <dlfcn.h>
+#include <jvm_md.h>
+#include <jni.h>
+
+typedef gboolean (GNOME_URL_SHOW_TYPE)(const char *, void **);
+typedef gboolean (GNOME_VFS_INIT_TYPE)(void);
+
+extern GNOME_URL_SHOW_TYPE *gnome_url_show;
+gboolean gnome_load();
+
+#endif /* !_GNOME_INTERFACE_H */
--- a/src/windows/back/linker_md.c	Mon Apr 01 10:09:27 2013 -0300
+++ b/src/windows/back/linker_md.c	Tue Apr 09 08:36:20 2013 -0300
@@ -39,38 +39,27 @@
 #include "path_md.h"
 
 static void dll_build_name(char* buffer, size_t buflen,
-                           const char* pname, const char* fname) {
-    // Based on os_windows.cpp
+                           const char* paths, const char* fname) {
+    char *path, *paths_copy, *next_token;
 
-    char *path_sep = PATH_SEPARATOR;
-    char *pathname = (char *)pname;
-    *buffer = '\0';
-    while (strlen(pathname) > 0) {
-        char *p = strchr(pathname, *path_sep);
-        if (p == NULL) {
-            p = pathname + strlen(pathname);
-        }
-        /* check for NULL path */
-        if (p == pathname) {
-            continue;
-        }
-        if (*(p-1) == ':' || *(p-1) == '\\') {
-            (void)_snprintf(buffer, buflen, "%.*s%s.dll", (int)(p - pathname),
-                            pathname, fname);
-        } else {
-            (void)_snprintf(buffer, buflen, "%.*s\\%s.dll", (int)(p - pathname),
-                            pathname, fname);
-        }
+    paths_copy = strdup(paths);
+    if (paths_copy == NULL) {
+        return;
+    }
+
+    next_token = NULL;
+    path = strtok_s(paths_copy, PATH_SEPARATOR, &next_token);
+
+    while (path != NULL) {
+        _snprintf(buffer, buflen, "%s\\%s.dll", path, fname);
         if (_access(buffer, 0) == 0) {
             break;
         }
-        if (*p == '\0') {
-            pathname = p;
-        } else {
-            pathname = p + 1;
-        }
         *buffer = '\0';
+        path = strtok_s(NULL, PATH_SEPARATOR, &next_token);
     }
+
+    free(paths_copy);
 }
 
 /*
@@ -113,7 +102,7 @@
  * Build a machine dependent library name out of a path and file name.
  */
 void
-dbgsysBuildLibName(char *holder, int holderlen, char *pname, char *fname)
+dbgsysBuildLibName(char *holder, int holderlen, const char *pname, const char *fname)
 {
     const int pnamelen = pname ? (int)strlen(pname) : 0;
 
--- a/src/windows/classes/sun/awt/windows/WDesktopPeer.java	Mon Apr 01 10:09:27 2013 -0300
+++ b/src/windows/classes/sun/awt/windows/WDesktopPeer.java	Tue Apr 09 08:36:20 2013 -0300
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
+ * 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
@@ -51,15 +51,15 @@
     }
 
     public void open(File file) throws IOException {
-        this.ShellExecute(file.toURI(), ACTION_OPEN_VERB);
+        this.ShellExecute(file, ACTION_OPEN_VERB);
     }
 
     public void edit(File file) throws IOException {
-        this.ShellExecute(file.toURI(), ACTION_EDIT_VERB);
+        this.ShellExecute(file, ACTION_EDIT_VERB);
     }
 
     public void print(File file) throws IOException {
-        this.ShellExecute(file.toURI(), ACTION_PRINT_VERB);
+        this.ShellExecute(file, ACTION_PRINT_VERB);
     }
 
     public void mail(URI uri) throws IOException {
@@ -70,6 +70,13 @@
         this.ShellExecute(uri, ACTION_OPEN_VERB);
     }
 
+    private void ShellExecute(File file, String verb) throws IOException {
+        String errMsg = ShellExecute(file.getAbsolutePath(), verb);
+        if (errMsg != null) {
+            throw new IOException("Failed to " + verb + " " + file + ". Error message: " + errMsg);
+        }
+    }
+
     private void ShellExecute(URI uri, String verb) throws IOException {
         String errmsg = ShellExecute(uri.toString(), verb);
 
@@ -79,6 +86,6 @@
         }
     }
 
-    private static native String ShellExecute(String uri, String verb);
+    private static native String ShellExecute(String fileOrUri, String verb);
 
 }
--- a/src/windows/classes/sun/java2d/d3d/D3DBlitLoops.java	Mon Apr 01 10:09:27 2013 -0300
+++ b/src/windows/classes/sun/java2d/d3d/D3DBlitLoops.java	Tue Apr 09 08:36:20 2013 -0300
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 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 @@
 import java.awt.image.BufferedImage;
 import java.awt.image.BufferedImageOp;
 import java.lang.ref.WeakReference;
-import javax.tools.annotation.GenerateNativeHeader;
+import java.lang.annotation.Native;
 import sun.java2d.ScreenUpdateManager;
 import sun.java2d.SurfaceData;
 import sun.java2d.loops.Blit;
@@ -48,8 +48,6 @@
 import static sun.java2d.pipe.BufferedOpCodes.*;
 import sun.java2d.windows.GDIWindowSurfaceData;
 
-/* No native methods here, but the constants are needed in the supporting JNI code */
-@GenerateNativeHeader
 class D3DBlitLoops {
 
     static void register() {
@@ -179,12 +177,12 @@
      * createPackedParams().  (They are also used at the native level when
      * unpacking the params.)
      */
-    private static final int OFFSET_SRCTYPE = 16;
-    private static final int OFFSET_HINT    =  8;
-    private static final int OFFSET_TEXTURE =  3;
-    private static final int OFFSET_RTT     =  2;
-    private static final int OFFSET_XFORM   =  1;
-    private static final int OFFSET_ISOBLIT =  0;
+    @Native private static final int OFFSET_SRCTYPE = 16;
+    @Native private static final int OFFSET_HINT    =  8;
+    @Native private static final int OFFSET_TEXTURE =  3;
+    @Native private static final int OFFSET_RTT     =  2;
+    @Native private static final int OFFSET_XFORM   =  1;
+    @Native private static final int OFFSET_ISOBLIT =  0;
 
     /**
      * Packs the given parameters into a single int value in order to save
--- a/src/windows/classes/sun/java2d/d3d/D3DContext.java	Mon Apr 01 10:09:27 2013 -0300
+++ b/src/windows/classes/sun/java2d/d3d/D3DContext.java	Tue Apr 09 08:36:20 2013 -0300
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 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,7 +25,7 @@
 
 package sun.java2d.d3d;
 
-import javax.tools.annotation.GenerateNativeHeader;
+import java.lang.annotation.Native;
 import sun.java2d.pipe.BufferedContext;
 import sun.java2d.pipe.RenderBuffer;
 import sun.java2d.pipe.RenderQueue;
@@ -38,8 +38,6 @@
  * Note that the RenderQueue lock must be acquired before calling any of
  * the methods in this class.
  */
-/* No native methods here, but the constants are needed in the supporting JNI code */
-@GenerateNativeHeader
 class D3DContext extends BufferedContext {
 
     private final D3DGraphicsDevice device;
@@ -143,31 +141,29 @@
         return device;
     }
 
-    /* No native methods here, but the constants are needed in the supporting JNI code */
-    @GenerateNativeHeader
     static class D3DContextCaps extends ContextCapabilities {
         /**
          * Indicates the presence of pixel shaders (v2.0 or greater).
          * This cap will only be set if the hardware supports the minimum number
          * of texture units.
          */
-        static final int CAPS_LCD_SHADER       = (FIRST_PRIVATE_CAP << 0);
+    @Native static final int CAPS_LCD_SHADER       = (FIRST_PRIVATE_CAP << 0);
         /**
          * Indicates the presence of pixel shaders (v2.0 or greater).
          * This cap will only be set if the hardware meets our
          * minimum requirements.
          */
-        static final int CAPS_BIOP_SHADER      = (FIRST_PRIVATE_CAP << 1);
+    @Native static final int CAPS_BIOP_SHADER      = (FIRST_PRIVATE_CAP << 1);
         /**
          * Indicates that the device was successfully initialized and can
          * be safely used.
          */
-        static final int CAPS_DEVICE_OK        = (FIRST_PRIVATE_CAP << 2);
+    @Native static final int CAPS_DEVICE_OK        = (FIRST_PRIVATE_CAP << 2);
         /**
          * Indicates that the device has all of the necessary capabilities
          * to support the Antialiasing Pixel Shader program.
          */
-        static final int CAPS_AA_SHADER        = (FIRST_PRIVATE_CAP << 3);
+    @Native static final int CAPS_AA_SHADER        = (FIRST_PRIVATE_CAP << 3);
 
         D3DContextCaps(int caps, String adapterId) {
             super(caps, adapterId);
--- a/src/windows/classes/sun/java2d/d3d/D3DPaints.java	Mon Apr 01 10:09:27 2013 -0300
+++ b/src/windows/classes/sun/java2d/d3d/D3DPaints.java	Tue Apr 09 08:36:20 2013 -0300
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 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
@@ -33,7 +33,7 @@
 import java.awt.image.BufferedImage;
 import java.util.HashMap;
 import java.util.Map;
-import javax.tools.annotation.GenerateNativeHeader;
+import java.lang.annotation.Native;
 import sun.java2d.SunGraphics2D;
 import sun.java2d.SurfaceData;
 import sun.java2d.loops.CompositeType;
@@ -158,8 +158,6 @@
 
 /****************** Shared MultipleGradientPaint support ********************/
 
-    /* No native methods here, but the constants are needed in the supporting JNI code */
-    @GenerateNativeHeader
     private static abstract class MultiGradient extends D3DPaints {
 
         /**
@@ -170,7 +168,7 @@
          * all versions of the shader can be compiled for PS 2.0 hardware,
          * we need to cap this maximum value at 8.
          */
-        public static final int MULTI_MAX_FRACTIONS_D3D = 8;
+    @Native public static final int MULTI_MAX_FRACTIONS_D3D = 8;
 
         protected MultiGradient() {}
 
--- a/src/windows/classes/sun/util/locale/provider/HostLocaleProviderAdapterImpl.java	Mon Apr 01 10:09:27 2013 -0300
+++ b/src/windows/classes/sun/util/locale/provider/HostLocaleProviderAdapterImpl.java	Tue Apr 09 08:36:20 2013 -0300
@@ -303,9 +303,7 @@
                     dfs.setNaN(getNaN(langTag, dfs.getNaN()));
                     dfs.setPercent(getPercent(langTag, dfs.getPercent()));
                     dfs.setPerMill(getPerMill(langTag, dfs.getPerMill()));
-                    if (isNativeDigit(langTag)) {
-                        dfs.setZeroDigit(getZeroDigit(langTag, dfs.getZeroDigit()));
-                    }
+                    dfs.setZeroDigit(getZeroDigit(langTag, dfs.getZeroDigit()));
                     ref = new SoftReference<>(dfs);
                     decimalFormatSymbolsCache.put(locale, ref);
                 }
@@ -420,9 +418,13 @@
             return false;
         }
 
+        int calid = getCalendarID(locale.toLanguageTag());
+        if (calid <= 0 || calid >= calIDToLDML.length) {
+            return false;
+        }
+
         String requestedCalType = locale.getUnicodeLocaleType("ca");
-        String nativeCalType =
-                calIDToLDML[getCalendarID(locale.toLanguageTag())]
+        String nativeCalType = calIDToLDML[calid]
                 .replaceFirst("_.*", ""); // remove locale part.
 
         if (requestedCalType == null) {
--- a/src/windows/demo/jvmti/hprof/hprof_md.c	Mon Apr 01 10:09:27 2013 -0300
+++ b/src/windows/demo/jvmti/hprof/hprof_md.c	Tue Apr 09 08:36:20 2013 -0300
@@ -368,42 +368,32 @@
 }
 
 static void dll_build_name(char* buffer, size_t buflen,
-                           const char* pname, const char* fname) {
-    // Loosley based on os_windows.cpp
+                           const char* paths, const char* fname) {
+    char *path, *paths_copy, *next_token;
 
-    char *pathname = (char *)pname;
-    *buffer = '\0';
-    while (strlen(pathname) > 0) {
-        char *p = strchr(pathname, ';');
-        if (p == NULL) {
-            p = pathname + strlen(pathname);
-        }
-        /* check for NULL path */
-        if (p == pathname) {
-            continue;
-        }
-        if (*(p-1) == ':' || *(p-1) == '\\') {
-          (void)_snprintf(buffer, buflen, "%.*s%s.dll", (int)(p - pathname),
-                            pathname, fname);
-        } else {
-          (void)_snprintf(buffer, buflen, "%.*s\\%s.dll", (int)(p - pathname),
-                            pathname, fname);
-        }
+    paths_copy = strdup(paths);
+    if (paths_copy == NULL) {
+        return;
+    }
+
+    next_token = NULL;
+    path = strtok_s(paths_copy, ";", &next_token);
+
+    while (path != NULL) {
+        _snprintf(buffer, buflen, "%s\\%s.dll", path, fname);
         if (_access(buffer, 0) == 0) {
             break;
         }
-        if (*p == '\0') {
-            pathname = p;
-        } else {
-            pathname = p + 1;
-        }
         *buffer = '\0';
+        path = strtok_s(NULL, ";", &next_token);
     }
+
+    free(paths_copy);
 }
 
 /* Build a machine dependent library name out of a path and file name.  */
 void
-md_build_library_name(char *holder, int holderlen, char *pname, char *fname)
+md_build_library_name(char *holder, int holderlen, const char *pname, const char *fname)
 {
     int   pnamelen;
 
--- a/src/windows/native/sun/java2d/d3d/D3DContext.h	Mon Apr 01 10:09:27 2013 -0300
+++ b/src/windows/native/sun/java2d/d3d/D3DContext.h	Tue Apr 09 08:36:20 2013 -0300
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 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
@@ -28,7 +28,6 @@
 
 #include "java_awt_Transparency.h"
 #include "sun_java2d_pipe_BufferedContext.h"
-#include "sun_java2d_d3d_D3DContext.h"
 #include "sun_java2d_d3d_D3DContext_D3DContextCaps.h"
 #include "sun_java2d_d3d_D3DSurfaceData.h"
 #include "sun_java2d_pipe_hw_AccelDeviceEventNotifier.h"
--- a/src/windows/native/sun/windows/awt_Component.h	Mon Apr 01 10:09:27 2013 -0300
+++ b/src/windows/native/sun/windows/awt_Component.h	Tue Apr 09 08:36:20 2013 -0300
@@ -37,7 +37,6 @@
 #include "java_awt_Component.h"
 #include "sun_awt_windows_WComponentPeer.h"
 #include "java_awt_event_KeyEvent.h"
-#include "java_awt_event_FocusEvent.h"
 #include "java_awt_event_MouseEvent.h"
 #include "java_awt_event_WindowEvent.h"
 #include "java_awt_Dimension.h"
--- a/src/windows/native/sun/windows/awt_Desktop.cpp	Mon Apr 01 10:09:27 2013 -0300
+++ b/src/windows/native/sun/windows/awt_Desktop.cpp	Tue Apr 09 08:36:20 2013 -0300
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
+ * 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
@@ -38,17 +38,17 @@
  * Signature: (Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
  */
 JNIEXPORT jstring JNICALL Java_sun_awt_windows_WDesktopPeer_ShellExecute
-  (JNIEnv *env, jclass cls, jstring uri_j, jstring verb_j)
+  (JNIEnv *env, jclass cls, jstring fileOrUri_j, jstring verb_j)
 {
-    LPCWSTR uri_c = JNU_GetStringPlatformChars(env, uri_j, JNI_FALSE);
+    LPCWSTR fileOrUri_c = JNU_GetStringPlatformChars(env, fileOrUri_j, JNI_FALSE);
     LPCWSTR verb_c = JNU_GetStringPlatformChars(env, verb_j, JNI_FALSE);
 
     // 6457572: ShellExecute possibly changes FPU control word - saving it here
     unsigned oldcontrol87 = _control87(0, 0);
-    HINSTANCE retval = ::ShellExecute(NULL, verb_c, uri_c, NULL, NULL, SW_SHOWNORMAL);
+    HINSTANCE retval = ::ShellExecute(NULL, verb_c, fileOrUri_c, NULL, NULL, SW_SHOWNORMAL);
     _control87(oldcontrol87, 0xffffffff);
 
-    JNU_ReleaseStringPlatformChars(env, uri_j, uri_c);
+    JNU_ReleaseStringPlatformChars(env, fileOrUri_j, fileOrUri_c);
     JNU_ReleaseStringPlatformChars(env, verb_j, verb_c);
 
     if ((int)retval <= 32) {
--- a/src/windows/native/sun/windows/awt_DnDDS.cpp	Mon Apr 01 10:09:27 2013 -0300
+++ b/src/windows/native/sun/windows/awt_DnDDS.cpp	Tue Apr 09 08:36:20 2013 -0300
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 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
@@ -52,7 +52,6 @@
 
 #include "java_awt_event_InputEvent.h"
 #include "java_awt_dnd_DnDConstants.h"
-#include "sun_awt_dnd_SunDragSourceContextPeer.h"
 #include "sun_awt_windows_WDragSourceContextPeer.h"
 
 #include "awt_ole.h"
--- a/src/windows/native/sun/windows/awt_Frame.cpp	Mon Apr 01 10:09:27 2013 -0300
+++ b/src/windows/native/sun/windows/awt_Frame.cpp	Tue Apr 09 08:36:20 2013 -0300
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2011, 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
@@ -34,7 +34,6 @@
 #include <windowsx.h>
 
 #include <java_lang_Integer.h>
-#include <sun_awt_EmbeddedFrame.h>
 #include <sun_awt_windows_WEmbeddedFrame.h>
 #include <sun_awt_windows_WEmbeddedFramePeer.h>
 
--- a/src/windows/native/sun/windows/awt_List.h	Mon Apr 01 10:09:27 2013 -0300
+++ b/src/windows/native/sun/windows/awt_List.h	Tue Apr 09 08:36:20 2013 -0300
@@ -28,7 +28,6 @@
 
 #include "awt_Component.h"
 
-#include "java_awt_List.h"
 #include "sun_awt_windows_WListPeer.h"
 
 
--- a/src/windows/native/sun/windows/awt_PopupMenu.cpp	Mon Apr 01 10:09:27 2013 -0300
+++ b/src/windows/native/sun/windows/awt_PopupMenu.cpp	Tue Apr 09 08:36:20 2013 -0300
@@ -28,7 +28,6 @@
 #include "awt_Event.h"
 #include "awt_Window.h"
 
-#include <java_awt_PopupMenu.h>
 #include <sun_awt_windows_WPopupMenuPeer.h>
 #include <java_awt_Event.h>
 
--- a/src/windows/native/sun/windows/awt_PopupMenu.h	Mon Apr 01 10:09:27 2013 -0300
+++ b/src/windows/native/sun/windows/awt_PopupMenu.h	Tue Apr 09 08:36:20 2013 -0300
@@ -30,7 +30,6 @@
 
 #include <java_awt_MenuItem.h>
 #include <sun_awt_windows_WMenuItemPeer.h>
-#include <java_awt_PopupMenu.h>
 #include <sun_awt_windows_WPopupMenuPeer.h>
 
 
--- a/src/windows/native/sun/windows/awt_TextComponent.h	Mon Apr 01 10:09:27 2013 -0300
+++ b/src/windows/native/sun/windows/awt_TextComponent.h	Tue Apr 09 08:36:20 2013 -0300
@@ -28,7 +28,6 @@
 
 #include "awt_Component.h"
 
-#include "java_awt_TextComponent.h"
 #include "sun_awt_windows_WTextComponentPeer.h"
 
 #include <ole2.h>
--- a/src/windows/native/sun/windows/awt_Toolkit.cpp	Mon Apr 01 10:09:27 2013 -0300
+++ b/src/windows/native/sun/windows/awt_Toolkit.cpp	Tue Apr 09 08:36:20 2013 -0300
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2011, 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
@@ -62,7 +62,6 @@
 
 #include <java_awt_Toolkit.h>
 #include <java_awt_event_InputMethodEvent.h>
-#include <java_awt_peer_ComponentPeer.h>
 
 extern void initScreens(JNIEnv *env);
 extern "C" void awt_dnd_initialize();
--- a/test/Makefile	Mon Apr 01 10:09:27 2013 -0300
+++ b/test/Makefile	Tue Apr 09 08:36:20 2013 -0300
@@ -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
@@ -336,7 +336,7 @@
 	@$(ECHO) "Testing completed successfully"
 
 # Prep for output
-prep: clean
+prep:
 	@$(MKDIR) -p $(ABS_TEST_OUTPUT_DIR)
 	@$(MKDIR) -p `$(DIRNAME) $(ARCHIVE_BUNDLE)`
 
@@ -704,200 +704,6 @@
 
 ################################################################
 
-# packtest
-
-# Expect JPRT to set JPRT_PACKTEST_HOME.
-PACKTEST_HOME = /net/jprt-web.sfbay.sun.com/jprt/allproducts/packtest
-ifdef JPRT_PACKTEST_HOME
-  PACKTEST_HOME = $(JPRT_PACKTEST_HOME)
-endif
-
-packtest: prep $(PACKTEST_HOME)/ptest $(PRODUCT_HOME)
-	( $(CD) $(PACKTEST_HOME) &&            \
-	    $(PACKTEST_HOME)/ptest             \
-		 -t "$(PRODUCT_HOME)"          \
-	         $(PACKTEST_STRESS_OPTION)     \
-		 $(EXTRA_PACKTEST_OPTIONS)     \
-		 -W $(ABS_TEST_OUTPUT_DIR)     \
-                 $(JAVA_ARGS:%=-J %)           \
-                 $(JAVA_VM_ARGS:%=-J %)        \
-	 ) ; $(BUNDLE_UP_AND_EXIT)
-
-packtest_stress: PACKTEST_STRESS_OPTION=-s
-packtest_stress: packtest
-
-PHONY_LIST += packtest packtest_stress
-
-################################################################
-
-# perftest to collect statistics
-
-# Expect JPRT to set JPRT_PACKTEST_HOME.
-PERFTEST_HOME = $(TEST_ROOT)/perf
-ifdef JPRT_PERFTEST_HOME
-  PERFTEST_HOME = $(JPRT_PERFTEST_HOME)
-endif
-
-perftest: ( $(PERFTEST_HOME)/perftest          \
-                 -t $(shell $(GETMIXEDPATH) "$(PRODUCT_HOME)")               \
-                 -w $(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)") \
-                 -h $(PERFTEST_HOME) \
-	 ) ; $(BUNDLE_UP_AND_EXIT)
-
-
-PHONY_LIST += perftest
-
-################################################################
-
-# vmsqe tests
-
-# Expect JPRT to set JPRT_VMSQE_HOME.
-VMSQE_HOME = $(SLASH_JAVA)/sqe/comp/vm/testbase/sqe/vm/current/build/latest/vm
-ifdef JPRT_VMSQE_HOME
-  VMSQE_HOME = $(JPRT_VMSQE_HOME)
-endif
-
-# Expect JPRT to set JPRT_RUNVMSQE_HOME.
-RUNVMSQE_HOME = /net/jprt-web.sfbay.sun.com/jprt/allproducts/runvmsqe
-ifdef JPRT_RUNVMSQE_HOME
-  RUNVMSQE_HOME = $(JPRT_RUNVMSQE_HOME)
-endif
-
-# Expect JPRT to set JPRT_TONGA3_HOME.
-TONGA3_HOME = $(SLASH_JAVA)/sqe/tools/gtee/harness/tonga
-ifdef JPRT_TONGA3_HOME
-  TONGA3_HOME = $(JPRT_TONGA3_HOME)
-endif
-
-RUNVMSQE_BIN = $(RUNVMSQE_HOME)/bin/runvmsqe
-
-vmsqe_tests: prep $(VMSQE_HOME)/vm $(TONGA3_HOME) $(RUNVMSQE_BIN) $(PRODUCT_HOME)
-	$(RM) -r $(ABS_TEST_OUTPUT_DIR)/vmsqe
-	( $(CD) $(ABS_TEST_OUTPUT_DIR) &&          \
-	    $(RUNVMSQE_BIN)                        \
-		 -jdk "$(PRODUCT_HOME)"            \
-		 -o "$(ABS_TEST_OUTPUT_DIR)/vmsqe" \
-		 -testbase "$(VMSQE_HOME)/vm"      \
-		 -tonga "$(TONGA3_HOME)"           \
-		 -tongajdk "$(ALT_BOOTDIR)"        \
-                 $(JAVA_ARGS)                      \
-                 $(JAVA_VM_ARGS)                   \
-	         $(RUNVMSQE_TEST_OPTION)           \
-		 $(EXTRA_RUNVMSQE_OPTIONS)         \
-	 ) ; $(BUNDLE_UP_AND_EXIT)
-
-vmsqe_jdwp: RUNVMSQE_TEST_OPTION=-jdwp
-vmsqe_jdwp: vmsqe_tests
-
-vmsqe_jdi: RUNVMSQE_TEST_OPTION=-jdi
-vmsqe_jdi: vmsqe_tests
-
-vmsqe_jdb: RUNVMSQE_TEST_OPTION=-jdb
-vmsqe_jdb: vmsqe_tests
-
-vmsqe_quick-jdi: RUNVMSQE_TEST_OPTION=-quick-jdi
-vmsqe_quick-jdi: vmsqe_tests
-
-vmsqe_sajdi: RUNVMSQE_TEST_OPTION=-sajdi
-vmsqe_sajdi: vmsqe_tests
-
-vmsqe_jvmti: RUNVMSQE_TEST_OPTION=-jvmti
-vmsqe_jvmti: vmsqe_tests
-
-vmsqe_hprof: RUNVMSQE_TEST_OPTION=-hprof
-vmsqe_hprof: vmsqe_tests
-
-vmsqe_monitoring: RUNVMSQE_TEST_OPTION=-monitoring
-vmsqe_monitoring: vmsqe_tests
-
-PHONY_LIST += vmsqe_jdwp vmsqe_jdi vmsqe_jdb vmsqe_quick-jdi vmsqe_sajdi \
-              vmsqe_jvmti vmsqe_hprof vmsqe_monitoring vmsqe_tests
-
-################################################################
-
-# jck tests
-
-# Default is to use jck 7 from /java/re
-JCK7_DEFAULT_HOME = $(SLASH_JAVA)/re/jck/7/promoted/latest/binaries
-
-# Expect JPRT to set JPRT_JCK7COMPILER_HOME.
-JCK7COMPILER_HOME = $(JCK7_DEFAULT_HOME)/JCK-compiler-7
-ifdef JPRT_JCK7COMPILER_HOME
-  JCK7COMPILER_HOME = $(JPRT_JCK7COMPILER_HOME)/JCK-compiler-7
-endif
-
-# Expect JPRT to set JPRT_JCK7RUNTIME_HOME.
-JCK7RUNTIME_HOME = $(JCK7_DEFAULT_HOME)/JCK-runtime-7
-ifdef JPRT_JCK7RUNTIME_HOME
-  JCK7RUNTIME_HOME = $(JPRT_JCK7RUNTIME_HOME)/JCK-runtime-7
-endif
-
-# Expect JPRT to set JPRT_JCK7DEVTOOLS_HOME.
-JCK7DEVTOOLS_HOME = $(JCK7_DEFAULT_HOME)/JCK-devtools-7
-ifdef JPRT_JCK7DEVTOOLS_HOME
-  JCK7DEVTOOLS_HOME = $(JPRT_JCK7DEVTOOLS_HOME)/JCK-devtools-7
-endif
-
-# The jtjck.jar utility to use to run the tests
-JTJCK_JAR = $(JCK_HOME)/lib/jtjck.jar
-JTJCK_JAVA_ARGS =  -XX:MaxPermSize=256m -Xmx512m
-JTJCK_OPTIONS = -headless -v
-
-# Default tests to run
-ifndef JCK_COMPILER_TESTS
-  JCK_COMPILER_TESTS =
-endif
-ifndef JCK_RUNTIME_TESTS
-  JCK_RUNTIME_TESTS  =
-endif
-ifndef JCK_DEVTOOLS_TESTS
-  JCK_DEVTOOLS_TESTS =
-endif
-
-# Generic rule used to run jck tests
-_generic_jck_tests: prep $(PRODUCT_HOME) $(EXCLUDELIST)
-	@$(EXPAND) $(EXCLUDELIST) \
-            | $(CUT) -d' ' -f1 \
-            | $(SED) -e 's@^@Excluding: @'
-	( $(CD) $(ABS_TEST_OUTPUT_DIR) &&          			   \
-	  $(PRODUCT_HOME)/bin/java $(JTJCK_JAVA_ARGS) 			   \
-	    -jar "$(JTJCK_JAR)" 					   \
-	    $(JTJCK_OPTIONS) 						   \
-            -r:$(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)")/JTreport  \
-            -w:$(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)")/JTwork    \
-            -jdk:$(shell $(GETMIXEDPATH) "$(PRODUCT_HOME)")                \
-	    $(TESTDIRS) 						   \
-        ) ; $(BUNDLE_UP_AND_EXIT)
-
-# JCK7 compiler tests
-jck7compiler:
-	$(MAKE) UNIQUE_DIR=$@ \
-	        JCK_HOME=$(JCK7COMPILER_HOME) \
-	        TESTDIRS="$(JCK_COMPILER_TESTS)" \
-                _generic_jck_tests
-
-# JCK7 runtime tests
-jck7runtime:
-	$(MAKE) UNIQUE_DIR=$@ \
-	        JCK_HOME=$(JCK7RUNTIME_HOME) \
-	        TESTDIRS="$(JCK_RUNTIME_TESTS)" \
-                _generic_jck_tests
-
-# JCK7 devtools tests
-jck7devtools:
-	$(MAKE) UNIQUE_DIR=$@ \
-	        JCK_HOME=$(JCK7DEVTOOLS_HOME) \
-                TESTDIRS="$(JCK_DEVTOOLS_TESTS)" \
-                _generic_jck_tests
-
-# Run all 3 sets of JCK7 tests
-jck_all: jck7runtime jck7devtools jck7compiler
-
-PHONY_LIST += jck_all _generic_jck_tests \
-	      jck7compiler jck7runtime jck7devtools
-
-################################################################
-
 # Phony targets (e.g. these are not filenames)
 .PHONY: all clean prep $(PHONY_LIST)
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/awt/Desktop/OpenByUNCPathNameTest/OpenByUNCPathNameTest.java	Tue Apr 09 08:36:20 2013 -0300
@@ -0,0 +1,98 @@
+/*
+ * 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.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/* @test
+   @bug 6550588
+   @summary java.awt.Desktop cannot open file with Windows UNC filename
+   @author Anton Litvinov
+*/
+
+import java.awt.*;
+import java.awt.event.*;
+import java.io.*;
+
+public class OpenByUNCPathNameTest {
+    private static boolean validatePlatform() {
+        String osName = System.getProperty("os.name");
+        if (osName == null) {
+            throw new RuntimeException("Name of the current OS could not be retrieved.");
+        }
+        return osName.startsWith("Windows");
+    }
+
+    private static void openFile() throws IOException {
+        if (!Desktop.isDesktopSupported()) {
+            System.out.println("java.awt.Desktop is not supported on this platform.");
+        } else {
+            Desktop desktop = Desktop.getDesktop();
+            File file = File.createTempFile("Read Me File", ".txt");
+            try {
+                // Test opening of the file with Windows local file path.
+                desktop.open(file);
+                Robot robot = null;
+                try {
+                    Thread.sleep(5000);
+                    robot = new Robot();
+                } catch (Exception e) {
+                    e.printStackTrace();
+                }
+                pressAltF4Keys(robot);
+
+                // Test opening of the file with Windows UNC pathname.
+                String uncFilePath = "\\\\127.0.0.1\\" + file.getAbsolutePath().replace(':', '$');
+                File uncFile = new File(uncFilePath);
+                if (!uncFile.exists()) {
+                    throw new RuntimeException(String.format(
+                        "File with UNC pathname '%s' does not exist.", uncFilePath));
+                }
+                desktop.open(uncFile);
+                try {
+                    Thread.sleep(5000);
+                } catch (InterruptedException ie) {
+                    ie.printStackTrace();
+                }
+                pressAltF4Keys(robot);
+            } finally {
+                file.delete();
+            }
+        }
+    }
+
+    private static void pressAltF4Keys(Robot robot) {
+        if (robot != null) {
+            robot.keyPress(KeyEvent.VK_ALT);
+            robot.keyPress(KeyEvent.VK_F4);
+            robot.delay(50);
+            robot.keyRelease(KeyEvent.VK_F4);
+            robot.keyRelease(KeyEvent.VK_ALT);
+        }
+    }
+
+    public static void main(String[] args) throws IOException {
+        if (!validatePlatform()) {
+            System.out.println("This test is only for MS Windows OS.");
+        } else {
+            openFile();
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/awt/GraphicsDevice/CheckDisplayModes.java	Tue Apr 09 08:36:20 2013 -0300
@@ -0,0 +1,64 @@
+/*
+ * 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.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8007146
+ * @summary [macosx] Setting a display mode crashes JDK under VNC
+ * @author Alexander Scherbatiy
+ * @run main CheckDisplayModes
+ */
+import java.awt.DisplayMode;
+import java.awt.GraphicsDevice;
+import java.awt.GraphicsEnvironment;
+
+public class CheckDisplayModes {
+
+    public static void main(String[] args) {
+        GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
+        GraphicsDevice graphicDevice = ge.getDefaultScreenDevice();
+        DisplayMode defaultDisplayMode = graphicDevice.getDisplayMode();
+        checkDisplayMode(defaultDisplayMode);
+        graphicDevice.setDisplayMode(defaultDisplayMode);
+
+        DisplayMode[] displayModes = graphicDevice.getDisplayModes();
+        boolean isDefaultDisplayModeIncluded = false;
+        for (DisplayMode displayMode : displayModes) {
+            checkDisplayMode(displayMode);
+            graphicDevice.setDisplayMode(displayMode);
+            if (defaultDisplayMode.equals(displayMode)) {
+                isDefaultDisplayModeIncluded = true;
+            }
+        }
+
+        if (!isDefaultDisplayModeIncluded) {
+            throw new RuntimeException("Default display mode is not included");
+        }
+    }
+
+    static void checkDisplayMode(DisplayMode displayMode) {
+        if (displayMode == null || displayMode.getWidth() <= 1 || displayMode.getHeight() <= 1) {
+            throw new RuntimeException("invalid display mode");
+        }
+    }
+}
--- a/test/java/beans/Introspector/TestTypeResolver.java	Mon Apr 01 10:09:27 2013 -0300
+++ b/test/java/beans/Introspector/TestTypeResolver.java	Tue Apr 09 08:36:20 2013 -0300
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 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
@@ -30,6 +30,7 @@
 import com.sun.beans.TypeResolver;
 
 import java.lang.annotation.Annotation;
+import java.lang.reflect.AnnotatedType;
 import java.lang.reflect.Field;
 import java.lang.reflect.GenericDeclaration;
 import java.lang.reflect.Method;
@@ -199,6 +200,19 @@
         public Annotation[] getDeclaredAnnotations() {
             return null; // not used
         }
+
+        public AnnotatedType[] getAnnotatedBounds() {
+            return null; // not used
+        }
+
+        public <T extends Annotation> T[] getAnnotationsByType(Class<T> annotationClass) {
+            return null; // not used
+        }
+
+        public <T extends Annotation> T[] getDeclaredAnnotationsByType(Class<T> annotationClass) {
+            return null; // not used
+        }
+
     }
 
     private static class ClassTypeVariable extends TypeVariableImpl<Class<?>> {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/lang/Class/GenericStringTest.java	Tue Apr 09 08:36:20 2013 -0300
@@ -0,0 +1,90 @@
+/*
+ * 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.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 6298888 6992705
+ * @summary Check Class.toGenericString()
+ * @author Joseph D. Darcy
+ */
+
+import java.lang.reflect.*;
+import java.lang.annotation.*;
+import java.util.*;
+
+@ExpectedGenericString("public class GenericStringTest")
+public class GenericStringTest {
+    public static void main(String... args){
+        int failures = 0;
+
+        failures += checkToGenericString(int.class, "int");
+
+        Class<?>[] types = {
+            GenericStringTest.class,
+            AnInterface.class,
+            LocalMap.class,
+            AnEnum.class,
+            AnotherEnum.class,
+        };
+
+        for(Class<?> clazz : types) {
+            failures += checkToGenericString(clazz, clazz.getAnnotation(ExpectedGenericString.class).value());
+        }
+
+        if (failures > 0) {
+            throw new RuntimeException();
+        }
+    }
+
+    private static int checkToGenericString(Class<?> clazz, String expected) {
+        String genericString = clazz.toGenericString();
+        if (!genericString.equals(expected)) {
+            System.err.printf("Unexpected Class.toGenericString output; expected '%s', got '%s'.%n",
+                              expected,
+                              genericString);
+            return 1;
+        } else
+            return 0;
+    }
+}
+
+@Retention(RetentionPolicy.RUNTIME)
+@interface ExpectedGenericString {
+    String value();
+}
+
+@ExpectedGenericString("abstract interface AnInterface")
+strictfp interface AnInterface {}
+
+@ExpectedGenericString("abstract interface LocalMap<K,V>")
+interface LocalMap<K,V> {}
+
+@ExpectedGenericString("final enum AnEnum")
+enum AnEnum {
+    FOO;
+}
+
+@ExpectedGenericString("enum AnotherEnum")
+enum AnotherEnum {
+    BAR{};
+}
--- a/test/java/lang/Runtime/exec/WinCommand.java	Mon Apr 01 10:09:27 2013 -0300
+++ b/test/java/lang/Runtime/exec/WinCommand.java	Tue Apr 09 08:36:20 2013 -0300
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 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
@@ -135,19 +135,24 @@
 
         // Win9x systems don't have a cmd.exe
         if (new File(systemDirW, "cmd.exe").exists()) {
-            out.println("Running cmd.exe tests...");
-            writeFile("cdcmd.cmd", "@echo off\r\nCD\r\n");
-            writeFile("cdbat.bat", "@echo off\r\nCD\r\n");
-            checkCD("cmd",
-                    "cmd.exe",
-                    systemDirW + "\\cmd.exe",
-                    // Only the ".exe" extension can be omitted
-                    systemDirW + "\\cmd",
-                    systemDirM + "/cmd.exe",
-                    systemDirM + "/cmd",
-                    "/" + systemDirM + "/cmd",
-                    "cdcmd.cmd", "./cdcmd.cmd", ".\\cdcmd.cmd",
-                    "cdbat.bat", "./cdbat.bat", ".\\cdbat.bat");
+            try {
+                out.println("Running cmd.exe tests...");
+                writeFile("cdcmd.cmd", "@echo off\r\nCD\r\n");
+                writeFile("cdbat.bat", "@echo off\r\nCD\r\n");
+                checkCD("cmd",
+                        "cmd.exe",
+                        systemDirW + "\\cmd.exe",
+                        // Only the ".exe" extension can be omitted
+                        systemDirW + "\\cmd",
+                        systemDirM + "/cmd.exe",
+                        systemDirM + "/cmd",
+                        "/" + systemDirM + "/cmd",
+                        "cdcmd.cmd", "./cdcmd.cmd", ".\\cdcmd.cmd",
+                        "cdbat.bat", "./cdbat.bat", ".\\cdbat.bat");
+            } finally {
+                new File("cdcmd.cmd").delete();
+                new File("cdbat.bat").delete();
+            }
         }
 
         // 16-bit apps like command.com must have a console;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/lang/reflect/Method/DefaultMethodModeling.java	Tue Apr 09 08:36:20 2013 -0300
@@ -0,0 +1,224 @@
+/*
+ * 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.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8011590
+ * @summary Check modeling of default methods
+ * @author Joseph D. Darcy
+ */
+
+import java.util.Objects;
+import java.lang.reflect.*;
+import java.lang.annotation.*;
+
+import static java.lang.reflect.Modifier.*;
+
+public class DefaultMethodModeling {
+    public static void main(String... args) {
+        int failures = 0;
+
+        Class<?>[] classes = {SuperC.class, SuperCchild.class,
+                              SuperI.class, SuperIchild.class,
+                              SuperIwithDefault.class, SuperIwithDefaultChild.class,
+                              Base.class, Combo1.class, Combo2.class,
+                              SonSuperIwithDefault.class, DaughterSuperIwithDefault.class, GrandchildSuperIwithDefault.class, D.class,
+                              B.class, C.class
+        };
+
+        for(Class<?> clazz : classes) {
+            System.err.println(clazz.toString());
+            for(Method m : clazz.getMethods()) {
+                if (m.getDeclaringClass() != java.lang.Object.class)
+                    failures += testMethod(m);
+            }
+        }
+
+        if (failures > 0)
+            throw new RuntimeException();
+    }
+
+    private static int testMethod(Method m) {
+        ExpectedModel em = Objects.requireNonNull(m.getAnnotation(ExpectedModel.class));
+        boolean failed = false;
+
+        if (m.getModifiers() != em.modifiers()) {
+            failed = true;
+            System.err.printf("Unexpected modifiers %d; expected %d%n", m.getModifiers(), em.modifiers());
+        }
+
+        if (m.isDefault() != em.isDefault()) {
+            failed = true;
+            System.err.printf("Unexpected isDefualt %b; expected b%n", m.isDefault(), em.isDefault());
+        }
+
+        if (!m.getDeclaringClass().equals(em.declaringClass())) {
+            failed = true;
+            System.err.printf("Unexpected isDefualt %s; expected %s%n",
+                              m.getDeclaringClass().toString(), em.declaringClass().toString());
+        }
+
+        return (!failed) ? 0 :1;
+    }
+}
+
+@Retention(RetentionPolicy.RUNTIME)
+@interface ExpectedModel {
+    boolean isDefault() default false;
+    int modifiers() default PUBLIC;
+    Class<?> declaringClass();
+}
+
+abstract class SuperC {
+    @ExpectedModel(modifiers=PUBLIC|ABSTRACT, declaringClass=SuperC.class)
+    public abstract void foo();
+
+    @ExpectedModel(declaringClass=SuperC.class)
+    public void bar() {
+        ;
+    }
+}
+
+class SuperCchild extends SuperC {
+    @ExpectedModel(declaringClass=SuperCchild.class)
+    @Override
+    public void foo() {;}
+}
+
+// -=-=-=-
+
+interface SuperI {
+    @ExpectedModel(modifiers=PUBLIC|ABSTRACT, declaringClass=SuperI.class)
+    void foo();
+
+    @ExpectedModel(modifiers=PUBLIC|ABSTRACT, declaringClass=SuperI.class)
+    void bar();
+}
+
+class SuperIchild implements SuperI {
+    @ExpectedModel(declaringClass=SuperIchild.class)
+    public void foo() {;}
+
+    @ExpectedModel(declaringClass=SuperIchild.class)
+    public void bar() {;}
+}
+
+// -=-=-=-
+
+interface SuperIwithDefault {
+    @ExpectedModel(modifiers=PUBLIC|ABSTRACT, declaringClass=SuperIwithDefault.class)
+    void foo();
+
+    @ExpectedModel(isDefault=true, declaringClass=SuperIwithDefault.class)
+    default void bar() {
+        ;
+    }
+}
+
+class SuperIwithDefaultChild implements SuperIwithDefault {
+    @ExpectedModel(declaringClass=SuperIwithDefaultChild.class)
+    @Override
+    public void foo() {;}
+}
+
+// -=-=-=-
+
+abstract class Base {
+    @ExpectedModel(modifiers=PUBLIC|ABSTRACT, declaringClass=Base.class)
+    abstract public void baz();
+
+    @ExpectedModel(declaringClass=Base.class)
+    public void quux() {;}
+}
+
+abstract class Combo1 extends Base implements SuperI {
+    @ExpectedModel(declaringClass=Combo1.class)
+    public void wombat() {}
+}
+
+abstract class Combo2 extends Base implements SuperIwithDefault {
+    @ExpectedModel(declaringClass=Combo2.class)
+    public void wombat() {}
+}
+
+// -=-=-=-
+
+interface SonSuperIwithDefault extends SuperIwithDefault {
+    @ExpectedModel(modifiers=PUBLIC|ABSTRACT, declaringClass=SonSuperIwithDefault.class)
+    void baz();
+
+    @ExpectedModel(isDefault=true, declaringClass=SonSuperIwithDefault.class)
+    default void bazD() {;}
+}
+
+interface DaughterSuperIwithDefault extends SuperIwithDefault {
+    @ExpectedModel(modifiers=PUBLIC|ABSTRACT, declaringClass=DaughterSuperIwithDefault.class)
+    void quux();
+
+    @ExpectedModel(isDefault=true, declaringClass=DaughterSuperIwithDefault.class)
+    default void quuxD() {;}
+}
+
+interface GrandchildSuperIwithDefault extends SonSuperIwithDefault, DaughterSuperIwithDefault {
+    @ExpectedModel(modifiers=PUBLIC|ABSTRACT, declaringClass=GrandchildSuperIwithDefault.class)
+    void wombat();
+
+    @ExpectedModel(isDefault=true, declaringClass=GrandchildSuperIwithDefault.class)
+    default void wombatD() {;}
+
+}
+
+class D implements GrandchildSuperIwithDefault {
+    @ExpectedModel(declaringClass=D.class)
+    public void wombat(){}
+
+    @ExpectedModel(declaringClass=D.class)
+    public void  baz(){}
+
+    @ExpectedModel(declaringClass=D.class)
+    public void foo(){}
+
+    @ExpectedModel(declaringClass=D.class)
+    public void quux(){}
+}
+
+// -=-=-=-
+
+// What does re-abstraction look like?
+
+class A implements SuperIwithDefault {
+    @ExpectedModel(declaringClass=A.class)
+    @Override
+    public void foo(){;}
+}
+
+abstract class B extends A {
+    @ExpectedModel(modifiers=PUBLIC|ABSTRACT, declaringClass=B.class)
+    @Override
+    public abstract void bar();
+}
+
+class C extends B implements SuperIwithDefault {
+    @ExpectedModel(declaringClass=C.class)
+    public void bar(){}
+}
--- a/test/java/lang/reflect/Method/GenericStringTest.java	Mon Apr 01 10:09:27 2013 -0300
+++ b/test/java/lang/reflect/Method/GenericStringTest.java	Tue Apr 09 08:36:20 2013 -0300
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2004, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 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,7 +23,7 @@
 
 /*
  * @test
- * @bug 5033583 6316717 6470106
+ * @bug 5033583 6316717 6470106 8004979
  * @summary Check toGenericString() and toString() methods
  * @author Joseph D. Darcy
  */
@@ -39,6 +39,7 @@
         classList.add(TestClass1.class);
         classList.add(TestClass2.class);
         classList.add(Roebling.class);
+        classList.add(TestInterface1.class);
 
 
         for(Class<?> clazz: classList)
@@ -129,6 +130,27 @@
     void varArg(Object ... arg) {}
 }
 
+interface TestInterface1 {
+    @ExpectedGenericString(
+   "public default void TestInterface1.foo()")
+    @ExpectedString(
+   "public default void TestInterface1.foo()")
+    public default void foo(){;}
+
+    @ExpectedString(
+   "public default java.lang.Object TestInterface1.bar()")
+    @ExpectedGenericString(
+   "public default <A> A TestInterface1.bar()")
+    default <A> A bar(){return null;}
+
+    @ExpectedString(
+   "public default strictfp double TestInterface1.quux()")
+    @ExpectedGenericString(
+    "public default strictfp double TestInterface1.quux()")
+    strictfp default double quux(){return 1.0;}
+
+}
+
 @Retention(RetentionPolicy.RUNTIME)
 @interface ExpectedGenericString {
     String value();
--- a/test/java/net/Socks/SocksProxyVersion.java	Mon Apr 01 10:09:27 2013 -0300
+++ b/test/java/net/Socks/SocksProxyVersion.java	Tue Apr 09 08:36:20 2013 -0300
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug 6964547
+ * @bug 6964547 5001942
  * @run main/othervm SocksProxyVersion
  * @summary test socksProxyVersion system property
  */
@@ -34,6 +34,7 @@
 import java.net.SocketException;
 import java.io.DataInputStream;
 import java.io.IOException;
+import java.net.InetAddress;
 
 public class SocksProxyVersion implements Runnable {
     final ServerSocket ss;
@@ -56,13 +57,19 @@
         Thread serverThread = new Thread(this);
         serverThread.start();
 
-        System.setProperty("socksProxyHost", "localhost");
+        /*
+         * Retreving the IP Address of the machine
+         * since "localhost" is bypassed as a non-proxy host
+         */
+        String addr = InetAddress.getLocalHost().getHostAddress();
+
+        System.setProperty("socksProxyHost", addr);
         System.setProperty("socksProxyPort", Integer.toString(port));
 
         // SOCKS V4
         System.setProperty("socksProxyVersion", Integer.toString(4));
         try (Socket s = new Socket()) {
-            s.connect(new InetSocketAddress("localhost", port));
+            s.connect(new InetSocketAddress(addr, port));
         } catch (SocketException e) {
             // java.net.SocketException: Malformed reply from SOCKS server
             // This exception is OK, since the "server" does not implement
@@ -72,7 +79,7 @@
         // SOCKS V5
         System.setProperty("socksProxyVersion", Integer.toString(5));
         try (Socket s = new Socket()) {
-            s.connect(new InetSocketAddress("localhost", port));
+            s.connect(new InetSocketAddress(addr, port));
         } catch (SocketException e) { /* OK */ }
 
         serverThread.join();
--- a/test/java/util/Base64/TestBase64.java	Mon Apr 01 10:09:27 2013 -0300
+++ b/test/java/util/Base64/TestBase64.java	Tue Apr 09 08:36:20 2013 -0300
@@ -22,7 +22,7 @@
  */
 
 /**
- * @test 4235519 8004212 8005394 8007298 8006295 8006315 8006530
+ * @test 4235519 8004212 8005394 8007298 8006295 8006315 8006530 8007379 8008925
  * @summary tests java.util.Base64
  */
 
@@ -107,6 +107,9 @@
         checkIAE(new Runnable() { public void run() {
             Base64.getDecoder().decode(ByteBuffer.wrap(decoded), ByteBuffer.allocateDirect(1024)); }});
 
+        // illegal ending unit
+        checkIAE(new Runnable() { public void run() { Base64.getMimeDecoder().decode("$=#"); }});
+
         // test return value from decode(ByteBuffer, ByteBuffer)
         testDecBufRet();
 
@@ -115,7 +118,6 @@
 
         // test decoding of unpadded data
         testDecodeUnpadded();
-
         // test mime decoding with ignored character after padding
         testDecodeIgnoredAfterPadding();
     }
@@ -384,6 +386,10 @@
                 encoded = Arrays.copyOf(encoded, encoded.length + 1);
                 encoded[encoded.length - 1] = nonBase64;
                 checkEqual(decM.decode(encoded), src[i], "Non-base64 char is not ignored");
+                byte[] decoded = new byte[src[i].length];
+                decM.decode(encoded, decoded);
+                checkEqual(decoded, src[i], "Non-base64 char is not ignored");
+
                 try {
                     dec.decode(encoded);
                     throw new RuntimeException("No IAE for non-base64 char");
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/javax/swing/JMenu/4515762/bug4515762.java	Tue Apr 09 08:36:20 2013 -0300
@@ -0,0 +1,172 @@
+/*
+ * 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.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import java.awt.*;
+import java.awt.event.*;
+import javax.swing.*;
+import sun.awt.SunToolkit;
+
+/**
+ * @test
+ * @bug 4515762
+ * @author Mark Davidson
+ * @summary Tests the ability to support duplicate mnemonics
+ * @library ../../regtesthelpers
+ * @build Util
+ * @run main bug4515762
+ */
+public class bug4515762 {
+
+    private static volatile boolean actionExpected = false;
+    private static volatile boolean actionRecieved = false;
+
+    /**
+     * @param str name of Menu
+     */
+    private static JMenuBar createMenuBar() {
+        JMenuBar menubar = new JMenuBar();
+
+        // Duplicate menu item test for 4515762
+        JMenu menu = new JMenu("Duplicate Menu");
+        menu.setMnemonic('D');
+        menu.add(createMenuItem("Sunday", 'S'));
+        menu.add(createMenuItem("Monday", 'M'));
+
+        menu.add(createMenuItem("Tuesday", 'S'));
+        menu.add(createMenuItem("Wednesday", 'S'));
+        menu.add(createMenuItem("Thursday", 'S'));
+        menu.add(createMenuItem("Friday", 'F'));
+        menu.add(createMenuItem("Saturday", 'S'));
+
+        // Control with unique menu
+        JMenu menu2 = new JMenu("Unique Menu");
+        menu2.setMnemonic('U');
+        menu2.add(createMenuItem("Sunday", 'S'));
+        menu2.add(createMenuItem("Monday", 'M'));
+
+        menu2.add(createMenuItem("Tuesday", 'T'));
+        menu2.add(createMenuItem("Wednesday", 'W'));
+        menu2.add(createMenuItem("Thursday", 'U'));
+        menu2.add(createMenuItem("Friday", 'F'));
+        menu2.add(createMenuItem("Saturday", 'A'));
+
+        menubar.add(menu);
+        menubar.add(menu2);
+
+        return menubar;
+    }
+
+    /**
+     * Creates and returns the menu item.
+     */
+    private static JMenuItem createMenuItem(String name, char mnemonic) {
+        JMenuItem menuItem = new JMenuItem(name, mnemonic);
+        menuItem.addActionListener(new ActionListener() {
+
+            @Override
+            public void actionPerformed(ActionEvent evt) {
+                JMenuItem item = (JMenuItem) evt.getSource();
+                if (actionExpected == false) {
+                    throw new RuntimeException("Menu Action: "
+                            + item.getText() + " should not be called");
+                } else {
+                    actionRecieved = true;
+                }
+            }
+        });
+
+        return menuItem;
+    }
+
+    public static void checkAction() {
+        if (actionRecieved == true) {
+            actionRecieved = false;
+        } else {
+            throw new RuntimeException("Action has not been received");
+        }
+    }
+
+    public static void main(String[] args) throws Throwable {
+        SunToolkit toolkit = (SunToolkit) Toolkit.getDefaultToolkit();
+        Robot robot = new Robot();
+        robot.setAutoDelay(250);
+
+        SwingUtilities.invokeAndWait(new Runnable() {
+
+            @Override
+            public void run() {
+                JFrame frame = new JFrame("Test");
+                frame.setJMenuBar(createMenuBar());
+                frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
+                frame.pack();
+                frame.setVisible(true);
+            }
+        });
+
+        toolkit.realSync();
+
+        Util.hitMnemonics(robot, KeyEvent.VK_D);
+        toolkit.realSync();
+
+        // Press the S key many times (should not cause an action peformed)
+        int TIMES = 5;
+        for (int i = 0; i < TIMES; i++) {
+            Util.hitKeys(robot, KeyEvent.VK_S);
+        }
+        toolkit.realSync();
+
+        // Unique menu items.
+        actionExpected = true;
+        Util.hitMnemonics(robot, KeyEvent.VK_U);
+
+        robot.keyPress(KeyEvent.VK_S);
+        robot.keyRelease(KeyEvent.VK_S);
+        toolkit.realSync();
+
+        checkAction();
+
+        Util.hitMnemonics(robot, KeyEvent.VK_U);
+        robot.keyPress(KeyEvent.VK_M);
+        robot.keyRelease(KeyEvent.VK_M);
+        toolkit.realSync();
+
+        checkAction();
+
+        Util.hitMnemonics(robot, KeyEvent.VK_U);
+        Util.hitKeys(robot, KeyEvent.VK_T);
+        toolkit.realSync();
+
+        checkAction();
+        Util.hitMnemonics(robot, KeyEvent.VK_U);
+        Util.hitKeys(robot, KeyEvent.VK_W);
+        toolkit.realSync();
+
+        checkAction();
+
+        Util.hitMnemonics(robot, KeyEvent.VK_U);
+        Util.hitKeys(robot, KeyEvent.VK_U);
+        toolkit.realSync();
+
+        checkAction();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/javax/swing/JRootPane/4670486/bug4670486.java	Tue Apr 09 08:36:20 2013 -0300
@@ -0,0 +1,145 @@
+/*
+ * 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.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import java.awt.*;
+import java.awt.event.*;
+import javax.swing.*;
+import sun.awt.SunToolkit;
+
+/**
+ * @test
+ * @bug 4670486
+ * @author Mark Davidson
+ * @summary Regression: Popup menu bindings doesn't work when a default button has been defined.
+ * @library ../../regtesthelpers
+ * @build Util
+ * @run main bug4670486
+ */
+public class bug4670486 {
+
+    public static volatile boolean actionExpected = false;
+    public static volatile boolean actionRecieved = false;
+
+    private static JMenuBar createMenuBar() {
+        JMenuBar menubar = new JMenuBar();
+
+        // Control with unique menu
+        JMenu menu = new JMenu("Unique Menu");
+        menu.setMnemonic('U');
+        menu.add(createMenuItem("Sunday", 'S'));
+        menu.add(createMenuItem("Monday", 'M'));
+
+        menu.add(createMenuItem("Tuesday", 'T'));
+        menu.add(createMenuItem("Wednesday", 'W'));
+        menu.add(createMenuItem("Thursday", 'U'));
+        menu.add(createMenuItem("Friday", 'F'));
+        menu.add(createMenuItem("Saturday", 'A'));
+
+        menubar.add(menu);
+
+        return menubar;
+    }
+
+    private static JPanel createPanel(JFrame frame) {
+        JPanel panel = new JPanel();
+        JButton button = new JButton("Button");
+        JButton button2 = new JButton("Button 2");
+        JButton button3 = new JButton("Button 3");
+
+        JRootPane root = frame.getRootPane();
+        root.setDefaultButton(button);
+
+        panel.add(button);
+        panel.add(button2);
+        panel.add(button3);
+
+        return panel;
+    }
+
+    /**
+     * Creates and returns the menu item.
+     */
+    private static JMenuItem createMenuItem(String name, char mnemonic) {
+        JMenuItem menuItem = new JMenuItem(name, mnemonic);
+        menuItem.addActionListener(new ActionListener() {
+
+            @Override
+            public void actionPerformed(ActionEvent evt) {
+                actionRecieved = true;
+            }
+        });
+
+        return menuItem;
+    }
+
+    public static void checkAction() {
+        if (actionRecieved == true) {
+            actionRecieved = false;
+        } else {
+            throw new RuntimeException("Action has not been received");
+        }
+    }
+
+    public static void main(String[] args) throws Throwable {
+        SunToolkit toolkit = (SunToolkit) Toolkit.getDefaultToolkit();
+        Robot robot = new Robot();
+        robot.setAutoDelay(250);
+
+        UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
+
+        SwingUtilities.invokeAndWait(new Runnable() {
+
+            @Override
+            public void run() {
+                JFrame frame = new JFrame("Test");
+                frame.setContentPane(createPanel(frame));
+                frame.setJMenuBar(createMenuBar());
+                frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
+                frame.pack();
+                frame.setVisible(true);
+            }
+        });
+
+        toolkit.realSync();
+
+        // Change the default button to
+        // force a call to BasicRootPaneUI.updateDefaultButtonBindings()
+        Util.hitKeys(robot, KeyEvent.VK_TAB);
+
+        // If the bug exists, then as soon as the menu appears,
+        // the VK_ENTER, VK_DOWN, VK_UP and VK_ESC will have no
+        // effect.
+        Util.hitMnemonics(robot, KeyEvent.VK_U);
+        Util.hitKeys(robot, KeyEvent.VK_ENTER);
+        toolkit.realSync();
+
+        checkAction();
+
+        Util.hitMnemonics(robot, KeyEvent.VK_U);
+        Util.hitKeys(robot, KeyEvent.VK_DOWN);
+        Util.hitKeys(robot, KeyEvent.VK_ENTER);
+        toolkit.realSync();
+
+        checkAction();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/javax/swing/JScrollBar/7163696/Test7163696.java	Tue Apr 09 08:36:20 2013 -0300
@@ -0,0 +1,103 @@
+/*
+ * 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.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 7163696
+ * @summary Tests that JScrollBar scrolls to the left
+ * @author Sergey Malenkov
+ */
+
+import sun.awt.SunToolkit;
+
+import java.awt.Dimension;
+import java.awt.Point;
+import java.awt.Robot;
+import java.awt.Toolkit;
+import java.awt.event.InputEvent;
+
+import javax.swing.JFrame;
+import javax.swing.JScrollBar;
+import javax.swing.SwingUtilities;
+import javax.swing.UIManager;
+import javax.swing.UIManager.LookAndFeelInfo;
+
+public class Test7163696 implements Runnable {
+
+    private static final boolean AUTO = null != System.getProperty("test.src", null);
+
+    public static void main(String[] args) throws Exception {
+        new Test7163696().test();
+    }
+
+    private JScrollBar bar;
+
+    private void test() throws Exception {
+        Robot robot = new Robot();
+        SunToolkit toolkit = (SunToolkit) Toolkit.getDefaultToolkit();
+        for (LookAndFeelInfo info : UIManager.getInstalledLookAndFeels()) {
+            UIManager.setLookAndFeel(info.getClassName());
+
+            SwingUtilities.invokeAndWait(this);
+            toolkit.realSync(500); // after creation
+
+            Point point = this.bar.getLocation();
+            SwingUtilities.convertPointToScreen(point, this.bar);
+            point.x += this.bar.getWidth() >> 2;
+            point.y += this.bar.getHeight() >> 1;
+            robot.mouseMove(point.x, point.y);
+            robot.mousePress(InputEvent.BUTTON1_MASK);
+            robot.mouseRelease(InputEvent.BUTTON1_MASK);
+
+            toolkit.realSync(500); // before validation
+            SwingUtilities.invokeAndWait(this);
+
+            if (this.bar != null) {
+                this.bar = null; // allows to reuse the instance
+                if (AUTO) { // error reporting only for automatic testing
+                    throw new Error("TEST FAILED");
+                }
+            }
+        }
+    }
+
+    public void run() {
+        if (this.bar == null) {
+            this.bar = new JScrollBar(JScrollBar.HORIZONTAL, 50, 10, 0, 100);
+            this.bar.setPreferredSize(new Dimension(400, 20));
+
+            JFrame frame = new JFrame();
+            frame.add(this.bar);
+            frame.pack();
+            frame.setVisible(true);
+        }
+        else if (40 != this.bar.getValue()) {
+            System.out.println("name = " + UIManager.getLookAndFeel().getName());
+            System.out.println("value = " + this.bar.getValue());
+        }
+        else {
+            SwingUtilities.getWindowAncestor(this.bar).dispose();
+            this.bar = null;
+        }
+    }
+}
--- a/test/javax/swing/JTree/8004298/bug8004298.java	Mon Apr 01 10:09:27 2013 -0300
+++ b/test/javax/swing/JTree/8004298/bug8004298.java	Tue Apr 09 08:36:20 2013 -0300
@@ -48,8 +48,13 @@
         Robot robot = new Robot();
         robot.setAutoDelay(50);
         SunToolkit toolkit = (SunToolkit) Toolkit.getDefaultToolkit();
-        UIManager.setLookAndFeel(new WindowsLookAndFeel());
-
+        try {
+            UIManager.setLookAndFeel(new WindowsLookAndFeel());
+        } catch (javax.swing.UnsupportedLookAndFeelException ulafe) {
+            System.out.println(ulafe.getMessage());
+            System.out.println("The test is considered PASSED");
+            return;
+        }
         SwingUtilities.invokeAndWait(new Runnable() {
 
             @Override
@@ -113,4 +118,4 @@
             return super.getPathBounds(tree, path);
         }
     }
-}
\ No newline at end of file
+}
--- a/test/javax/swing/regtesthelpers/Util.java	Mon Apr 01 10:09:27 2013 -0300
+++ b/test/javax/swing/regtesthelpers/Util.java	Tue Apr 09 08:36:20 2013 -0300
@@ -146,6 +146,23 @@
     }
 
      /**
+     * Hits mnemonics by robot.
+     */
+    public static void hitMnemonics(Robot robot, int... keys) {
+
+        ArrayList<Integer> mnemonicKeyCodes = getSystemMnemonicKeyCodes();
+        for (Integer mnemonic : mnemonicKeyCodes) {
+            robot.keyPress(mnemonic);
+        }
+
+        hitKeys(robot, keys);
+
+        for (Integer mnemonic : mnemonicKeyCodes) {
+            robot.keyRelease(mnemonic);
+        }
+    }
+
+     /**
      * Hits keys by robot.
      */
     public static void hitKeys(Robot robot, int... keys) {
--- a/test/sun/util/logging/PlatformLoggerTest.java	Mon Apr 01 10:09:27 2013 -0300
+++ b/test/sun/util/logging/PlatformLoggerTest.java	Tue Apr 09 08:36:20 2013 -0300
@@ -36,6 +36,7 @@
 import java.lang.reflect.Field;
 import java.util.logging.*;
 import sun.util.logging.PlatformLogger;
+import static sun.util.logging.PlatformLogger.Level.*;
 
 public class PlatformLoggerTest {
     public static void main(String[] args) throws Exception {
@@ -69,40 +70,63 @@
         checkLogger(GOO_PLATFORM_LOGGER, null);
         checkLogger(BAR_LOGGER, Level.WARNING);
 
-        foo.setLevel(PlatformLogger.SEVERE);
+        foo.setLevel(PlatformLogger.Level.SEVERE);
         checkLogger(FOO_PLATFORM_LOGGER, Level.SEVERE);
 
         checkPlatformLoggerLevels(foo, bar);
     }
 
+    // don't use java.util.logging here to prevent it from initialized
     private static void checkPlatformLogger(PlatformLogger logger, String name) {
         if (!logger.getName().equals(name)) {
             throw new RuntimeException("Invalid logger's name " +
                 logger.getName() + " but expected " + name);
         }
 
-        if (logger.getLevel() != null) {
+        if (logger.level() != null) {
             throw new RuntimeException("Invalid default level for logger " +
-                logger.getName() + ": " + logger.getLevel());
+                logger.getName() + ": " + logger.level());
         }
 
-        if (logger.isLoggable(PlatformLogger.FINE) != false) {
-            throw new RuntimeException("isLoggerable(FINE) returns true for logger " +
-                logger.getName() + " but expected false");
+        checkLoggable(logger, FINE, false);
+
+        logger.setLevel(FINER);
+        checkLevel(logger, FINER);
+        checkLoggable(logger, FINER, true);
+        checkLoggable(logger, FINE, true);
+        checkLoggable(logger, FINEST, false);
+
+        logger.info("OK: Testing log message");
+    }
+
+    private static void checkLoggable(PlatformLogger logger, PlatformLogger.Level level, boolean expected) {
+        if (logger.isLoggable(level) != expected) {
+            throw new RuntimeException("logger " + logger.getName() + ": " + level +
+                (expected ? " not loggable" : " loggable"));
         }
 
-        logger.setLevel(PlatformLogger.FINER);
-        if (logger.getLevel() != PlatformLogger.FINER) {
-            throw new RuntimeException("Invalid level for logger " +
-                logger.getName() + " " + logger.getLevel());
+        if (logger.isLoggable(level.intValue()) != expected) {
+            throw new RuntimeException("logger " + logger.getName() + ": " + level.intValue() +
+                (expected ? " not loggable" : " loggable"));
         }
 
-        if (logger.isLoggable(PlatformLogger.FINE) != true) {
-            throw new RuntimeException("isLoggerable(FINE) returns false for logger " +
-                logger.getName() + " but expected true");
+        int value = level.intValue() + 5; // custom level value
+        if (expected && !logger.isLoggable(value)) {
+            throw new RuntimeException("logger " + logger.getName() + ": " + value +
+                " not loggable");
+        }
+    }
+
+    private static void checkLevel(PlatformLogger logger, PlatformLogger.Level level) {
+        if (logger.level() != level) {
+            throw new RuntimeException("Invalid level for logger " +
+                logger.getName() + ": " + logger.level() + " != " + level);
         }
 
-        logger.info("OK: Testing log message");
+        if (logger.getLevel() != level.intValue()) {
+            throw new RuntimeException("Invalid level for logger " +
+                logger.getName() + ": " + logger.getLevel() + " != " + level.intValue());
+        }
     }
 
     private static void checkLogger(String name, Level level) {
@@ -146,23 +170,29 @@
         for (Level level : levels) {
             PlatformLogger.Level platformLevel = PlatformLogger.Level.valueOf(level.getName());
             for (PlatformLogger logger : loggers) {
-                // verify PlatformLogger.setLevel to a given level
-                logger.setLevel(platformLevel);
-                PlatformLogger.Level retrievedPlatformLevel = logger.getLevel();
-                if (platformLevel != retrievedPlatformLevel) {
-                    throw new RuntimeException("Retrieved PlatformLogger level " +
-                            retrievedPlatformLevel +
-                            " is not the same as set level " + platformLevel);
-                }
+                logger.setLevel(platformLevel);       // setLevel(PlatformLogger.Level)
+                checkLoggerLevel(logger, level);
+
+                logger.setLevel(ALL);  // setLevel(int)
+                checkLoggerLevel(logger, Level.ALL);
+            }
+        }
+    }
 
-                // check the level set in java.util.logging.Logger
-                Logger javaLogger = LogManager.getLogManager().getLogger(logger.getName());
-                Level javaLevel = javaLogger.getLevel();
-                if (javaLogger.getLevel() != level) {
-                    throw new RuntimeException("Retrieved backing java.util.logging.Logger level " +
-                            javaLevel + " is not the expected " + level);
-                }
-            }
+    private static void checkLoggerLevel(PlatformLogger logger, Level level) {
+        PlatformLogger.Level plevel = PlatformLogger.Level.valueOf(level.getName());
+        if (plevel != logger.level()) {
+            throw new RuntimeException("Retrieved PlatformLogger level "
+                    + logger.level()
+                    + " is not the same as set level " + plevel);
+        }
+
+        // check the level set in java.util.logging.Logger
+        Logger javaLogger = LogManager.getLogManager().getLogger(logger.getName());
+        Level javaLevel = javaLogger.getLevel();
+        if (javaLogger.getLevel() != level) {
+            throw new RuntimeException("Retrieved backing java.util.logging.Logger level "
+                    + javaLevel + " is not the expected " + level);
         }
     }
 
@@ -174,21 +204,23 @@
                     + " PlatformLogger.Level" + platformLevel);
         }
 
-        PlatformLogger.Level plevel;
         try {
             // validate if there is a public static final field in PlatformLogger
-            // matching the level name
-            Field platformLevelField = PlatformLogger.class.getField(level.getName());
-            plevel = (PlatformLogger.Level) platformLevelField.get(null);
+            Field constantField = PlatformLogger.class.getField(level.getName());
+            int l = (int) constantField.get(null);
+            if (l != platformLevel.intValue()) {
+                throw new RuntimeException("static final " + level.getName() + " (" +
+                    l + ") != " + platformLevel.intValue());
+            }
         } catch (Exception e) {
             throw new RuntimeException("No public static PlatformLogger." + level.getName() +
                                        " field", e);
         }
-        if (!plevel.name().equals(level.getName()))
+        if (!platformLevel.name().equals(level.getName()))
             throw new RuntimeException("The value of PlatformLogger." + level.getName() + ".name() is "
                                        + platformLevel.name() + " but expected " + level.getName());
 
-        if (plevel.intValue() != level.intValue())
+        if (platformLevel.intValue() != level.intValue())
             throw new RuntimeException("The value of PlatformLogger." + level.intValue() + ".intValue() is "
                                        + platformLevel.intValue() + " but expected " + level.intValue());
     }