changeset 7504:6f22501ca73c icedtea-2.6pre02

Merge
author andrew
date Wed, 23 Apr 2014 15:10:18 +0100
parents 6f559527c035 (current diff) 726e38af4020 (diff)
children ab270c6cf64f
files .hgtags src/share/classes/java/awt/KeyboardFocusManager.java src/share/classes/sun/java2d/SunGraphics2D.java test/java/lang/Runtime/exec/CloseRace.java test/lib/testlibrary/jdk/testlibrary/JdkFinder.java
diffstat 92 files changed, 4789 insertions(+), 561 deletions(-) [+]
line wrap: on
line diff
--- a/.hgtags	Fri Apr 18 23:39:11 2014 +0100
+++ b/.hgtags	Wed Apr 23 15:10:18 2014 +0100
@@ -404,3 +404,12 @@
 b1bcc999a8f1b4b4452b59c6636153bb0154cf5a jdk7u60-b03
 efc8886310cbccb941f826acfad2ad51a2891be5 jdk7u60-b04
 9b6aff2241bf0d6fa9eab38a75a4eccdf9bb7335 icedtea-2.6pre01
+4fb749a3110727d5334c69793578a3254a053bf5 jdk7u60-b05
+46ca1ce7550f1463d60c3eacaf7b8cdc44b0c66e jdk7u60-b06
+d5a2f60006e3c4243abeee0f623e5c3f79372fd8 jdk7u60-b07
+0dd27693876d66d176457749d0f2161b219eba2d jdk7u60-b08
+7b571638b0f51bcbe04c088dfff569b4cba6bbdf jdk7u60-b09
+fb4981489b09594d2449527e2d511834cf8ad370 jdk7u60-b10
+c2bb87dae8a08eab6f4f336ce5a59865aa0214d6 jdk7u60-b11
+1a90de8005e3de2475fd9355dcdb6f5e60bf89cc jdk7u60-b12
+b06d4ed71ae0bc6e13f5a8437cb6388f17c66e84 jdk7u60-b13
--- a/make/sun/javazic/tzdata/VERSION	Fri Apr 18 23:39:11 2014 +0100
+++ b/make/sun/javazic/tzdata/VERSION	Wed Apr 23 15:10:18 2014 +0100
@@ -21,4 +21,4 @@
 # or visit www.oracle.com if you need additional information or have any
 # questions.
 #
-tzdata2013i
+tzdata2014a
--- a/make/sun/javazic/tzdata/asia	Fri Apr 18 23:39:11 2014 +0100
+++ b/make/sun/javazic/tzdata/asia	Wed Apr 23 15:10:18 2014 +0100
@@ -1113,8 +1113,13 @@
 Rule	Zion	1986	only	-	Sep	 7	0:00	0	S
 Rule	Zion	1987	only	-	Apr	15	0:00	1:00	D
 Rule	Zion	1987	only	-	Sep	13	0:00	0	S
-Rule	Zion	1988	only	-	Apr	 9	0:00	1:00	D
-Rule	Zion	1988	only	-	Sep	 3	0:00	0	S
+
+# From Avigdor Finkelstein (2014-03-05):
+# I check the Parliament (Knesset) records and there it's stated that the
+# [1988] transition should take place on Saturday night, when the Sabbath
+# ends and changes to Sunday.
+Rule	Zion	1988	only	-	Apr	10	0:00	1:00	D
+Rule	Zion	1988	only	-	Sep	 4	0:00	0	S
 
 # From Ephraim Silverberg
 # (1997-03-04, 1998-03-16, 1998-12-28, 2000-01-17, 2000-07-25, 2004-12-22,
--- a/make/sun/javazic/tzdata/australasia	Fri Apr 18 23:39:11 2014 +0100
+++ b/make/sun/javazic/tzdata/australasia	Wed Apr 23 15:10:18 2014 +0100
@@ -377,16 +377,18 @@
 # http://www.fiji.gov.fj/index.php?option=com_content&view=article&id=6702&catid=71&Itemid=155
 
 # From the Fijian Government Media Center (2013-08-30) via David Wheeler:
-# Fiji will start daylight savings on Sunday 27th October, 2013 and end at 3am
-# on Sunday 19th January, 2014....  move clocks forward by one hour from 2am
+# Fiji will start daylight savings on Sunday 27th October, 2013 ...
+# move clocks forward by one hour from 2am
 # http://www.fiji.gov.fj/Media-Center/Press-Releases/DAYLIGHT-SAVING-STARTS-ON-SUNDAY,-27th-OCTOBER-201.aspx
-#
-# From Paul Eggert (2013-09-09):
+
+# From Steffen Thorsen (2013-01-10):
+# Fiji will end DST on 2014-01-19 02:00:
+# http://www.fiji.gov.fj/Media-Center/Press-Releases/DAYLIGHT-SAVINGS-TO-END-THIS-MONTH-%281%29.aspx
+
+# From Paul Eggert (2014-01-10):
 # For now, guess that Fiji springs forward the Sunday before the fourth
-# Monday in October.  This matches both recent practice and
-# timeanddate.com's current spring-forward prediction.
-# For the January 2014 transition we guessed right while timeanddate.com
-# guessed wrong, so leave the fall-back prediction alone.
+# Monday in October, and springs back the penultimate Sunday in January.
+# This is ad hoc, but matches recent practice.
 
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	Fiji	1998	1999	-	Nov	Sun>=1	2:00	1:00	S
@@ -395,7 +397,8 @@
 Rule	Fiji	2010	only	-	Mar	lastSun	3:00	0	-
 Rule	Fiji	2010	max	-	Oct	Sun>=21	2:00	1:00	S
 Rule	Fiji	2011	only	-	Mar	Sun>=1	3:00	0	-
-Rule	Fiji	2012	max	-	Jan	Sun>=18	3:00	0	-
+Rule	Fiji	2012	2013	-	Jan	Sun>=18	3:00	0	-
+Rule	Fiji	2014	max	-	Jan	Sun>=18	2:00	0	-
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Pacific/Fiji	11:55:44 -	LMT	1915 Oct 26	# Suva
 			12:00	Fiji	FJ%sT	# Fiji Time
--- a/make/sun/javazic/tzdata/europe	Fri Apr 18 23:39:11 2014 +0100
+++ b/make/sun/javazic/tzdata/europe	Wed Apr 23 15:10:18 2014 +0100
@@ -2768,14 +2768,18 @@
 # According to the articles linked below, Turkey will change into summer
 # time zone (GMT+3) on March 28, 2011 at 3:00 a.m. instead of March 27.
 # This change is due to a nationwide exam on 27th.
-#
-# <a href="http://www.worldbulletin.net/?aType=haber&ArticleID=70872">
 # http://www.worldbulletin.net/?aType=haber&ArticleID=70872
-# </a>
 # Turkish:
-# <a href="http://www.hurriyet.com.tr/ekonomi/17230464.asp?gid=373">
 # http://www.hurriyet.com.tr/ekonomi/17230464.asp?gid=373
-# </a>
+
+# From Faruk Pasin (2014-02-14):
+# The DST for Turkey has been changed for this year because of the
+# Turkish Local election....
+# http://www.sabah.com.tr/Ekonomi/2014/02/12/yaz-saatinde-onemli-degisiklik
+# ... so Turkey will move clocks forward one hour on March 31 at 3:00 a.m.
+# From Paul Eggert (2014-02-17):
+# Here is an English-language source:
+# http://www.worldbulletin.net/turkey/129016/turkey-switches-to-daylight-saving-time-march-31
 
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	Turkey	1916	only	-	May	 1	0:00	1:00	S
@@ -2844,6 +2848,8 @@
 			2:00	Turkey	EE%sT	2007
 			2:00	EU	EE%sT	2011 Mar 27 1:00u
 			2:00	-	EET	2011 Mar 28 1:00u
+			2:00	EU	EE%sT	2014 Mar 30 1:00u
+			2:00	-	EET	2014 Mar 31 1:00u
 			2:00	EU	EE%sT
 Link	Europe/Istanbul	Asia/Istanbul	# Istanbul is in both continents.
 
@@ -2865,19 +2871,13 @@
 # approval from 266 deputies.
 #
 # Ukraine abolishes transter back to the winter time (in Russian)
-# <a href="http://news.mail.ru/politics/6861560/">
 # http://news.mail.ru/politics/6861560/
-# </a>
 #
 # The Ukrainians will no longer change the clock (in Russian)
-# <a href="http://www.segodnya.ua/news/14290482.html">
 # http://www.segodnya.ua/news/14290482.html
-# </a>
 #
 # Deputies cancelled the winter time (in Russian)
-# <a href="http://www.pravda.com.ua/rus/news/2011/09/20/6600616/">
 # http://www.pravda.com.ua/rus/news/2011/09/20/6600616/
-# </a>
 #
 # From Philip Pizzey (2011-10-18):
 # Today my Ukrainian colleagues have informed me that the
@@ -2888,18 +2888,39 @@
 # As far as I understand, the recent change to the Ukrainian time zone
 # (Europe/Kiev) to introduce permanent daylight saving time (similar
 # to Russia) was reverted today:
-#
-# <a href="http://portal.rada.gov.ua/rada/control/en/publish/article/info_left?art_id=287324&cat_id=105995">
 # http://portal.rada.gov.ua/rada/control/en/publish/article/info_left?art_id=287324&cat_id=105995
-# </a>
 #
 # Also reported by Alexander Bokovoy (2011-10-18) who also noted:
 # The law documents themselves are at
+# http://w1.c1.rada.gov.ua/pls/zweb_n/webproc4_1?id=&pf3511=41484
+
+# From Vladimir in Moscow via Alois Treindl re Kiev time 1991/2 (2014-02-28):
+# First in Ukraine they changed Time zone from UTC+3 to UTC+2 with DST:
+#       03 25 1990 02:00 -03.00 1       Time Zone 3 with DST
+#       07 01 1990 02:00 -02.00 1       Time Zone 2 with DST
+# * Ukrainian Government's Resolution of 18.06.1990, No. 134.
+# http://search.ligazakon.ua/l_doc2.nsf/link1/T001500.html
 #
-# <a href="http://w1.c1.rada.gov.ua/pls/zweb_n/webproc4_1?id=&pf3511=41484">
-# http://w1.c1.rada.gov.ua/pls/zweb_n/webproc4_1?id=&pf3511=41484
-# </a>
-
+# They did not end DST in September, 1990 (according to the law,
+# "summer time" was still in action):
+#       09 30 1990 03:00 -02.00 1       Time Zone 2 with DST
+# * Ukrainian Government's Resolution of 21.09.1990, No. 272.
+# http://search.ligazakon.ua/l_doc2.nsf/link1/KP900272.html
+#
+# Again no change in March, 1991 ("summer time" in action):
+#       03 31 1991 02:00 -02.00 1       Time Zone 2 with DST
+#
+# DST ended in September 1991 ("summer time" ended):
+#       09 29 1991 03:00 -02.00 0       Time Zone 2, no DST
+# * Ukrainian Government's Resolution of 25.09.1991, No. 225.
+# http://www.uazakon.com/documents/date_21/pg_iwgdoc.htm
+# This is an answer.
+#
+# Since 1992 they had normal DST procedure:
+#       03 29 1992 02:00 -02.00 1       DST started
+#       09 27 1992 03:00 -02.00 0       DST ended
+# * Ukrainian Government's Resolution of 20.03.1992, No. 139.
+# http://www.uazakon.com/documents/date_8u/pg_grcasa.htm
 
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 # Most of Ukraine since 1970 has been like Kiev.
@@ -2910,9 +2931,8 @@
 			2:00	-	EET	1930 Jun 21
 			3:00	-	MSK	1941 Sep 20
 			1:00	C-Eur	CE%sT	1943 Nov  6
-			3:00	Russia	MSK/MSD	1990
-			3:00	-	MSK	1990 Jul  1 2:00
-			2:00	-	EET	1992
+			3:00	Russia	MSK/MSD	1990 Jul  1 2:00
+			2:00	1:00	EEST	1991 Sep 29 3:00
 			2:00	E-Eur	EE%sT	1995
 			2:00	EU	EE%sT
 # Ruthenia used CET 1990/1991.
--- a/make/sun/javazic/tzdata/northamerica	Fri Apr 18 23:39:11 2014 +0100
+++ b/make/sun/javazic/tzdata/northamerica	Wed Apr 23 15:10:18 2014 +0100
@@ -414,9 +414,10 @@
 # US Pacific time, represented by Los Angeles
 #
 # California, northern Idaho (Benewah, Bonner, Boundary, Clearwater,
-# Idaho, Kootenai, Latah, Lewis, Nez Perce, and Shoshone counties,
-# and the northern three-quarters of Idaho county),
-# most of Nevada, most of Oregon, and Washington
+# Kootenai, Latah, Lewis, Nez Perce, and Shoshone counties, Idaho county
+# north of the Salmon River, and the towns of Burgdorf and Warren),
+# Nevada (except West Wendover), Oregon (except the northern 3/4 of
+# Malheur county), and Washington
 #
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER
 Rule	CA	1948	only	-	Mar	14	2:00	1:00	D
--- a/make/sun/javazic/tzdata/southamerica	Fri Apr 18 23:39:11 2014 +0100
+++ b/make/sun/javazic/tzdata/southamerica	Wed Apr 23 15:10:18 2014 +0100
@@ -1298,6 +1298,13 @@
 # start date is 2013-09-08 00:00....
 # http://www.gob.cl/informa/2013/02/15/gobierno-anuncia-fechas-de-cambio-de-hora-para-el-ano-2013.htm
 
+# From Jose Miguel Garrido (2014-02-19):
+# Today appeared in the Diario Oficial a decree amending the time change
+# dates to 2014.
+# DST End: last Saturday of April 2014 (Sun 27 Apr 2014 03:00 UTC)
+# DST Start: first Saturday of September 2014 (Sun 07 Sep 2014 04:00 UTC)
+# http://www.diariooficial.interior.gob.cl//media/2014/02/19/do-20140219.pdf
+
 # NOTE: ChileAQ rules for Antarctic bases are stored separately in the
 # 'antarctica' file.
 
@@ -1631,6 +1638,9 @@
 # From Carlos Raul Perasso (2013-03-15):
 # The change in Paraguay is now final.  Decree number 10780
 # http://www.presidencia.gov.py/uploads/pdf/presidencia-3b86ff4b691c79d4f5927ca964922ec74772ce857c02ca054a52a37b49afc7fb.pdf
+# From Carlos Raul Perasso (2014-02-28):
+# Decree 1264 can be found at:
+# http://www.presidencia.gov.py/archivos/documentos/DECRETO1264_ey9r8zai.pdf
 Rule	Para	2013	max	-	Mar	Sun>=22	0:00	0	-
 
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
@@ -1689,18 +1699,19 @@
 Zone America/Port_of_Spain -4:06:04 -	LMT	1912 Mar 2
 			-4:00	-	AST
 
+# These all agree with Trinidad and Tobago since 1970.
 Link America/Port_of_Spain America/Anguilla
 Link America/Port_of_Spain America/Dominica
 Link America/Port_of_Spain America/Grenada
 Link America/Port_of_Spain America/Guadeloupe
-Link America/Port_of_Spain America/Marigot
+Link America/Port_of_Spain America/Marigot	# St Martin (French part)
 Link America/Port_of_Spain America/Montserrat
 Link America/Port_of_Spain America/St_Barthelemy
-Link America/Port_of_Spain America/St_Kitts
+Link America/Port_of_Spain America/St_Kitts	# St Kitts & Nevis
 Link America/Port_of_Spain America/St_Lucia
-Link America/Port_of_Spain America/St_Thomas
+Link America/Port_of_Spain America/St_Thomas	# Virgin Islands (US)
 Link America/Port_of_Spain America/St_Vincent
-Link America/Port_of_Spain America/Tortola
+Link America/Port_of_Spain America/Tortola	# Virgin Islands (UK)
 
 # Uruguay
 # From Paul Eggert (1993-11-18):
--- a/src/share/classes/com/sun/accessibility/internal/resources/accessibility_de.properties	Fri Apr 18 23:39:11 2014 +0100
+++ b/src/share/classes/com/sun/accessibility/internal/resources/accessibility_de.properties	Wed Apr 23 15:10:18 2014 +0100
@@ -17,7 +17,7 @@
 awtcomponent=AWT-Komponente
 checkbox=Kontrollk\u00E4stchen
 colorchooser=Farbauswahl
-columnheader=Spalten-Header
+columnheader=Spaltenheader
 combobox=Kombinationsfeld
 canvas=Leinwand
 desktopicon=Desktopsymbol
@@ -46,7 +46,7 @@
 pushbutton=Schaltfl\u00E4che
 radiobutton=Optionsfeld
 rootpane=Root-Bereich
-rowheader=Zeilen-Header
+rowheader=Zeilenheader
 scrollbar=Bildlaufleiste
 scrollpane=Bildlaufbereich
 separator=Trennzeichen
--- a/src/share/classes/com/sun/java/swing/plaf/windows/resources/windows_fr.properties	Fri Apr 18 23:39:11 2014 +0100
+++ b/src/share/classes/com/sun/java/swing/plaf/windows/resources/windows_fr.properties	Wed Apr 23 15:10:18 2014 +0100
@@ -25,8 +25,8 @@
 FileChooser.filesOfTypeLabel.textAndMnemonic=&Type de fichier :
 FileChooser.upFolderToolTip.textAndMnemonic=Remonte d'un niveau.
 FileChooser.upFolderAccessibleName=Monter
-FileChooser.homeFolderToolTip.textAndMnemonic=R\u00E9pertoire d'origine
-FileChooser.homeFolderAccessibleName=R\u00E9pertoire d'origine
+FileChooser.homeFolderToolTip.textAndMnemonic=R\u00E9pertoire de base
+FileChooser.homeFolderAccessibleName=R\u00E9pertoire de base
 FileChooser.newFolderToolTip.textAndMnemonic=Cr\u00E9e un dossier.
 FileChooser.newFolderAccessibleName=Nouveau dossier
 FileChooser.newFolderActionLabel.textAndMnemonic=Nouveau dossier
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/com/sun/java/util/jar/pack/DriverResource_ja.java	Wed Apr 23 15:10:18 2014 +0100
@@ -0,0 +1,131 @@
+/*
+ * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package com.sun.java.util.jar.pack;
+
+import java.util.ListResourceBundle;
+
+public class DriverResource_ja extends ListResourceBundle {
+        public static final String VERSION ="VERSION";
+        public static final String BAD_ARGUMENT ="BAD_ARGUMENT";
+        public static final String BAD_OPTION ="BAD_OPTION";
+        public static final String BAD_REPACK_OUTPUT="BAD_REPACK_OUTPUT";
+        public static final String DETECTED_ZIP_COMMENT="DETECTED_ZIP_COMMENT";
+        public static final String SKIP_FOR_REPACKED ="SKIP_FOR_REPACKED";
+        public static final String WRITE_PACK_FILE ="WRITE_PACK_FILE";
+        public static final String WIRTE_PACKGZ_FILE="WIRTE_PACKGZ_FILE";
+        public static final String SKIP_FOR_MOVE_FAILED="SKIP_FOR_MOVE_FAILED";
+        public static final String PACK_HELP="PACK_HELP";
+        public static final String UNPACK_HELP ="UNPACK_HELP";
+        public static final String MORE_INFO = "MORE_INFO";
+        public static final String DUPLICATE_OPTION = "DUPLICATE_OPTION";
+        public static final String BAD_SPEC = "BAD_SPEC";
+
+        //The following string is duplicate in PACK and UNPACK comment,which was draw out to ruduce translation work.
+        private static final String PARAMETER_V = "  -v, --verbose                   increase program verbosity";
+        private static final String PARAMETER_Q = "  -q, --quiet                     set verbosity to lowest level";
+        private static final String PARAMETER_LF = "  -l{F}, --log-file={F}           output to the given log file, or '-' for System.out";
+        private static final String PARAMETER_H = "  -?, -h, --help                  print this message";
+        private static final String PARAMETER_VER = "  -V, --version                   print program version";
+        private static final String PARAMETER_J = "  -J{X}                           pass option X to underlying Java VM";
+
+
+        //The following are outputs of command 'pack200' and 'unpack200'.
+        //Don't translate command arguments ,words with a prefix of '-' or '--'.
+        //
+        private static final Object[][] resource= {
+                {VERSION,"{0}\u30D0\u30FC\u30B8\u30E7\u30F3{1}"},//parameter 0:class name;parameter 1: version value
+                {BAD_ARGUMENT,"\u7121\u52B9\u306A\u5F15\u6570: {0}"},
+                {BAD_OPTION,"\u7121\u52B9\u306A\u30AA\u30D7\u30B7\u30E7\u30F3: {0}={1}"},//parameter 0:option name;parameter 1:option value
+                {BAD_REPACK_OUTPUT,"\u7121\u52B9\u306A--repack\u51FA\u529B: {0}"},//parameter 0:filename
+                {DETECTED_ZIP_COMMENT,"\u691C\u51FA\u3055\u308C\u305FZIP\u30B3\u30E1\u30F3\u30C8: {0}"},//parameter 0:comment
+                {SKIP_FOR_REPACKED,"\u3059\u3067\u306B\u518D\u5727\u7E2E\u3055\u308C\u3066\u3044\u308B\u305F\u3081\u30B9\u30AD\u30C3\u30D7\u3057\u3066\u3044\u307E\u3059: {0}"},//parameter 0:filename
+                {WRITE_PACK_FILE,"*.pack\u30D5\u30A1\u30A4\u30EB\u3092\u66F8\u304D\u8FBC\u3080\u306B\u306F\u3001--no-gzip\u3092\u6307\u5B9A\u3057\u307E\u3059: {0}"},//parameter 0:filename
+                {WIRTE_PACKGZ_FILE,"*.pack.gz\u30D5\u30A1\u30A4\u30EB\u3092\u66F8\u304D\u8FBC\u3080\u306B\u306F\u3001--gzip\u3092\u6307\u5B9A\u3057\u307E\u3059: {0}"},//parameter 0:filename
+                {SKIP_FOR_MOVE_FAILED,"\u79FB\u52D5\u304C\u5931\u6557\u3057\u305F\u305F\u3081\u89E3\u51CD\u3092\u30B9\u30AD\u30C3\u30D7\u3057\u3066\u3044\u307E\u3059: {0}"},//parameter 0:filename
+                {PACK_HELP,new String[]{
+                                "\u4F7F\u7528\u65B9\u6CD5:  pack200 [-opt... | --option=value]... x.pack[.gz] y.jar",
+                                "",
+                                "\u5727\u7E2E\u30AA\u30D7\u30B7\u30E7\u30F3",
+                                "  -g\u3001--no-gzip                   \u30D7\u30EC\u30FC\u30F3\u306A*.pack\u30D5\u30A1\u30A4\u30EB\u3092\u5727\u7E2E\u305B\u305A\u306B\u51FA\u529B\u3057\u307E\u3059",
+                                "  --gzip                          (\u30C7\u30D5\u30A9\u30EB\u30C8)\u5727\u7E2E\u51FA\u529B\u3092gzip\u3067\u5F8C\u51E6\u7406\u3057\u307E\u3059",
+                                "  -G\u3001--strip-debug               \u5727\u7E2E\u4E2D\u306B\u30C7\u30D0\u30C3\u30B0\u5C5E\u6027\u3092\u524A\u9664\u3057\u307E\u3059",
+                                "  -O\u3001--no-keep-file-order        \u30D5\u30A1\u30A4\u30EB\u306E\u9806\u5E8F\u4ED8\u3051\u60C5\u5831\u3092\u8EE2\u9001\u3057\u307E\u305B\u3093",
+                                "  --keep-file-order               (\u30C7\u30D5\u30A9\u30EB\u30C8)\u5165\u529B\u30D5\u30A1\u30A4\u30EB\u306E\u9806\u5E8F\u4ED8\u3051\u3092\u4FDD\u6301\u3057\u307E\u3059",
+                                "  -S{N}\u3001--segment-limit={N}       \u30BB\u30B0\u30E1\u30F3\u30C8\u5236\u9650\u3092\u51FA\u529B\u3057\u307E\u3059(\u30C7\u30D5\u30A9\u30EB\u30C8N=1Mb)",
+                                "  -E{N}\u3001--effort={N}             \u5727\u7E2E\u306E\u8A66\u884C(\u30C7\u30D5\u30A9\u30EB\u30C8N=5)",
+                                "  -H{h}\u3001--deflate-hint={h}       \u30C7\u30D5\u30EC\u30FC\u30C8\u30FB\u30D2\u30F3\u30C8\u3092\u8EE2\u9001\u3057\u307E\u3059: true\u3001false\u307E\u305F\u306Fkeep(\u30C7\u30D5\u30A9\u30EB\u30C8)",
+                                "  -m{V}\u3001--modification-time={V}  \u5909\u66F4\u6642\u9593\u3092\u8EE2\u9001\u3057\u307E\u3059: latest\u307E\u305F\u306Fkeep(\u30C7\u30D5\u30A9\u30EB\u30C8)",
+                                "  -P{F}\u3001--pass-file={F}          \u6307\u5B9A\u3055\u308C\u305F\u5727\u7E2E\u3055\u308C\u3066\u3044\u306A\u3044\u5165\u529B\u8981\u7D20\u3092\u8EE2\u9001\u3057\u307E\u3059",
+                                "  -U{a}\u3001--unknown-attribute={a}  \u4E0D\u660E\u306E\u5C5E\u6027\u30A2\u30AF\u30B7\u30E7\u30F3: error\u3001strip\u307E\u305F\u306Fpass(\u30C7\u30D5\u30A9\u30EB\u30C8)",
+                                "  -C{N}={L}\u3001--class-attribute={N}={L}  (\u30E6\u30FC\u30B6\u30FC\u5B9A\u7FA9\u5C5E\u6027)",
+                                "  -F{N}={L}\u3001--field-attribute={N}={L}  (\u30E6\u30FC\u30B6\u30FC\u5B9A\u7FA9\u5C5E\u6027)",
+                                "  -M{N}={L}\u3001--method-attribute={N}={L} (\u30E6\u30FC\u30B6\u30FC\u5B9A\u7FA9\u5C5E\u6027)",
+                                "  -D{N}={L}\u3001--code-attribute={N}={L}   (\u30E6\u30FC\u30B6\u30FC\u5B9A\u7FA9\u5C5E\u6027)",
+                                "  -f{F}\u3001--config-file={F}        Pack200.Packer\u30D7\u30ED\u30D1\u30C6\u30A3\u306B\u30D5\u30A1\u30A4\u30EBF\u3092\u8AAD\u307F\u8FBC\u307F\u307E\u3059",
+                                PARAMETER_V ,
+                                PARAMETER_Q ,
+                                PARAMETER_LF ,
+                                PARAMETER_H ,
+                                PARAMETER_VER ,
+                                PARAMETER_J,
+                                "",
+                                "\u6CE8\u610F:",
+                                "  -P\u3001-C\u3001-F\u3001-M\u304A\u3088\u3073-D\u30AA\u30D7\u30B7\u30E7\u30F3\u306F\u7D2F\u7A4D\u3055\u308C\u307E\u3059\u3002",
+                                "  \u5C5E\u6027\u5B9A\u7FA9\u306E\u4F8B:  -C SourceFile=RUH .",
+                                "  Config.\u30D5\u30A1\u30A4\u30EB\u30FB\u30D7\u30ED\u30D1\u30C6\u30A3\u306F\u3001Pack200 API\u306B\u3088\u3063\u3066\u5B9A\u7FA9\u3055\u308C\u307E\u3059\u3002",
+                                "  -S\u3001-E\u3001-H\u3001-m\u3001-U\u306E\u5024\u306E\u610F\u5473\u306F\u3001Pack200 API\u3092\u53C2\u7167\u3057\u3066\u304F\u3060\u3055\u3044\u3002",
+                                "  \u30EC\u30A4\u30A2\u30A6\u30C8\u5B9A\u7FA9(RUH\u306A\u3069)\u306FJSR 200\u306B\u3088\u3063\u3066\u5B9A\u7FA9\u3055\u308C\u307E\u3059\u3002",
+                                "",
+                                "\u518D\u5727\u7E2E\u30E2\u30FC\u30C9\u3067\u306F\u3001JAR\u30D5\u30A1\u30A4\u30EB\u304C\u5727\u7E2E/\u89E3\u51CD\u30B5\u30A4\u30AF\u30EB\u3067\u66F4\u65B0\u3055\u308C\u307E\u3059:",
+                                "    pack200 [-r|--repack] [-opt | --option=value]... [repackedy.jar] y.jar\n"
+                                }
+                },
+                {UNPACK_HELP,new String[]{
+                                "\u4F7F\u7528\u65B9\u6CD5:  unpack200 [-opt... | --option=value]... x.pack[.gz] y.jar\n",
+                                "",
+                                "\u89E3\u51CD\u30AA\u30D7\u30B7\u30E7\u30F3",
+                                "  -H{h}\u3001--deflate-hint={h}     \u8EE2\u9001\u3055\u308C\u305F\u30C7\u30D5\u30EC\u30FC\u30C8\u30FB\u30D2\u30F3\u30C8\u3092\u30AA\u30FC\u30D0\u30FC\u30E9\u30A4\u30C9\u3057\u307E\u3059: true\u3001false\u307E\u305F\u306Fkeep(\u30C7\u30D5\u30A9\u30EB\u30C8)",
+                                "  -r\u3001--remove-pack-file        \u89E3\u51CD\u5F8C\u306B\u5165\u529B\u30D5\u30A1\u30A4\u30EB\u3092\u524A\u9664\u3057\u307E\u3059",
+                                PARAMETER_V ,
+                                PARAMETER_Q ,
+                                PARAMETER_LF ,
+                                PARAMETER_H ,
+                                PARAMETER_VER ,
+                                PARAMETER_J,
+                            }
+                },
+
+                {MORE_INFO,"(\u8A73\u7D30\u306F\u3001{0} --help\u3092\u5B9F\u884C\u3057\u3066\u304F\u3060\u3055\u3044\u3002)"},//parameter 0:command name
+                {DUPLICATE_OPTION,"\u91CD\u8907\u30AA\u30D7\u30B7\u30E7\u30F3: {0}"},//parameter 0:option
+                {BAD_SPEC,"{0}\u306E\u7121\u52B9\u306A\u4ED5\u69D8: {1}"},//parameter 0:option;parameter 1:specifier
+        };
+
+        protected Object[][] getContents() {
+                return resource;
+        }
+
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/com/sun/java/util/jar/pack/DriverResource_zh_CN.java	Wed Apr 23 15:10:18 2014 +0100
@@ -0,0 +1,131 @@
+/*
+ * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package com.sun.java.util.jar.pack;
+
+import java.util.ListResourceBundle;
+
+public class DriverResource_zh_CN extends ListResourceBundle {
+        public static final String VERSION ="VERSION";
+        public static final String BAD_ARGUMENT ="BAD_ARGUMENT";
+        public static final String BAD_OPTION ="BAD_OPTION";
+        public static final String BAD_REPACK_OUTPUT="BAD_REPACK_OUTPUT";
+        public static final String DETECTED_ZIP_COMMENT="DETECTED_ZIP_COMMENT";
+        public static final String SKIP_FOR_REPACKED ="SKIP_FOR_REPACKED";
+        public static final String WRITE_PACK_FILE ="WRITE_PACK_FILE";
+        public static final String WIRTE_PACKGZ_FILE="WIRTE_PACKGZ_FILE";
+        public static final String SKIP_FOR_MOVE_FAILED="SKIP_FOR_MOVE_FAILED";
+        public static final String PACK_HELP="PACK_HELP";
+        public static final String UNPACK_HELP ="UNPACK_HELP";
+        public static final String MORE_INFO = "MORE_INFO";
+        public static final String DUPLICATE_OPTION = "DUPLICATE_OPTION";
+        public static final String BAD_SPEC = "BAD_SPEC";
+
+        //The following string is duplicate in PACK and UNPACK comment,which was draw out to ruduce translation work.
+        private static final String PARAMETER_V = "  -v, --verbose                   increase program verbosity";
+        private static final String PARAMETER_Q = "  -q, --quiet                     set verbosity to lowest level";
+        private static final String PARAMETER_LF = "  -l{F}, --log-file={F}           output to the given log file, or '-' for System.out";
+        private static final String PARAMETER_H = "  -?, -h, --help                  print this message";
+        private static final String PARAMETER_VER = "  -V, --version                   print program version";
+        private static final String PARAMETER_J = "  -J{X}                           pass option X to underlying Java VM";
+
+
+        //The following are outputs of command 'pack200' and 'unpack200'.
+        //Don't translate command arguments ,words with a prefix of '-' or '--'.
+        //
+        private static final Object[][] resource= {
+                {VERSION,"{0}\u7248\u672C {1}"},//parameter 0:class name;parameter 1: version value
+                {BAD_ARGUMENT,"\u9519\u8BEF\u53C2\u6570: {0}"},
+                {BAD_OPTION,"\u9519\u8BEF\u9009\u9879: {0}={1}"},//parameter 0:option name;parameter 1:option value
+                {BAD_REPACK_OUTPUT,"--repack \u8F93\u51FA\u9519\u8BEF: {0}"},//parameter 0:filename
+                {DETECTED_ZIP_COMMENT,"\u68C0\u6D4B\u5230 ZIP \u6CE8\u91CA: {0}"},//parameter 0:comment
+                {SKIP_FOR_REPACKED,"\u7531\u4E8E\u5DF2\u91CD\u65B0\u6253\u5305\u800C\u8DF3\u8FC7: {0}"},//parameter 0:filename
+                {WRITE_PACK_FILE,"\u8981\u5199\u5165 *.pack \u6587\u4EF6, \u8BF7\u6307\u5B9A --no-gzip: {0}"},//parameter 0:filename
+                {WIRTE_PACKGZ_FILE,"\u8981\u5199\u5165 *.pack.gz \u6587\u4EF6, \u8BF7\u6307\u5B9A --gzip: {0}"},//parameter 0:filename
+                {SKIP_FOR_MOVE_FAILED,"\u7531\u4E8E\u79FB\u52A8\u5931\u8D25\u800C\u8DF3\u8FC7\u91CD\u65B0\u6253\u5305: {0}"},//parameter 0:filename
+                {PACK_HELP,new String[]{
+                                "\u7528\u6CD5:  pack200 [-opt... | --option=value]... x.pack[.gz] y.jar",
+                                "",
+                                "\u6253\u5305\u9009\u9879",
+                                "  -g, --no-gzip                   \u8F93\u51FA\u65E0\u683C\u5F0F\u7684 *.pack \u6587\u4EF6, \u4E0D\u538B\u7F29",
+                                "  --gzip                          (\u9ED8\u8BA4\u503C) \u4F7F\u7528 gzip \u5BF9\u6253\u5305\u8FDB\u884C\u540E\u5904\u7406",
+                                "  -G, --strip-debug               \u6253\u5305\u65F6\u5220\u9664\u8C03\u8BD5\u5C5E\u6027",
+                                "  -O, --no-keep-file-order        \u4E0D\u4F20\u8F93\u6587\u4EF6\u6392\u5E8F\u4FE1\u606F",
+                                "  --keep-file-order               (\u9ED8\u8BA4\u503C) \u4FDD\u7559\u8F93\u5165\u6587\u4EF6\u6392\u5E8F",
+                                "  -S{N}, --segment-limit={N}      \u8F93\u51FA\u6BB5\u9650\u5236 (\u9ED8\u8BA4\u503C N=1Mb)",
+                                "  -E{N}, --effort={N}             \u6253\u5305\u6548\u679C (\u9ED8\u8BA4\u503C N=5)",
+                                "  -H{h}, --deflate-hint={h}       \u4F20\u8F93\u538B\u7F29\u63D0\u793A: true, false \u6216 keep (\u9ED8\u8BA4\u503C)",
+                                "  -m{V}, --modification-time={V}  \u4F20\u8F93 modtimes: latest \u6216 keep (\u9ED8\u8BA4\u503C)",
+                                "  -P{F}, --pass-file={F}          \u4F20\u8F93\u672A\u89E3\u538B\u7F29\u7684\u7ED9\u5B9A\u8F93\u5165\u5143\u7D20",
+                                "  -U{a}, --unknown-attribute={a}  \u672A\u77E5\u5C5E\u6027\u64CD\u4F5C: error, strip \u6216 pass (\u9ED8\u8BA4\u503C)",
+                                "  -C{N}={L}, --class-attribute={N}={L}  (\u7528\u6237\u5B9A\u4E49\u7684\u5C5E\u6027)",
+                                "  -F{N}={L}, --field-attribute={N}={L}  (\u7528\u6237\u5B9A\u4E49\u7684\u5C5E\u6027)",
+                                "  -M{N}={L}, --method-attribute={N}={L} (\u7528\u6237\u5B9A\u4E49\u7684\u5C5E\u6027)",
+                                "  -D{N}={L}, --code-attribute={N}={L}   (\u7528\u6237\u5B9A\u4E49\u7684\u5C5E\u6027)",
+                                "  -f{F}, --config-file={F}        \u8BFB\u53D6\u6587\u4EF6 F \u7684 Pack200.Packer \u5C5E\u6027",
+                                PARAMETER_V ,
+                                PARAMETER_Q ,
+                                PARAMETER_LF ,
+                                PARAMETER_H ,
+                                PARAMETER_VER ,
+                                PARAMETER_J,
+                                "",
+                                "\u6CE8:",
+                                "  -P, -C, -F, -M \u548C -D \u9009\u9879\u7D2F\u8BA1\u3002",
+                                "  \u793A\u4F8B\u5C5E\u6027\u5B9A\u4E49:  -C SourceFile=RUH\u3002",
+                                "  Config. \u6587\u4EF6\u5C5E\u6027\u7531 Pack200 API \u5B9A\u4E49\u3002",
+                                "  \u6709\u5173 -S, -E, -H-, -m, -U \u503C\u7684\u542B\u4E49, \u8BF7\u53C2\u9605 Pack200 API\u3002",
+                                "  \u5E03\u5C40\u5B9A\u4E49 (\u4F8B\u5982 RUH) \u7531 JSR 200 \u5B9A\u4E49\u3002",
+                                "",
+                                "\u91CD\u65B0\u6253\u5305\u6A21\u5F0F\u901A\u8FC7\u6253\u5305/\u89E3\u5305\u5468\u671F\u66F4\u65B0 JAR \u6587\u4EF6:",
+                                "    pack200 [-r|--repack] [-opt | --option=value]... [repackedy.jar] y.jar\n"
+                                }
+                },
+                {UNPACK_HELP,new String[]{
+                                "\u7528\u6CD5:  unpack200 [-opt... | --option=value]... x.pack[.gz] y.jar\n",
+                                "",
+                                "\u89E3\u5305\u9009\u9879",
+                                "  -H{h}, --deflate-hint={h}     \u8986\u76D6\u5DF2\u4F20\u8F93\u7684\u538B\u7F29\u63D0\u793A: true, false \u6216 keep (\u9ED8\u8BA4\u503C)",
+                                "  -r, --remove-pack-file        \u89E3\u5305\u4E4B\u540E\u5220\u9664\u8F93\u5165\u6587\u4EF6",
+                                PARAMETER_V ,
+                                PARAMETER_Q ,
+                                PARAMETER_LF ,
+                                PARAMETER_H ,
+                                PARAMETER_VER ,
+                                PARAMETER_J,
+                            }
+                },
+
+                {MORE_INFO,"(\u6709\u5173\u8BE6\u7EC6\u4FE1\u606F, \u8BF7\u8FD0\u884C {0} --help\u3002)"},//parameter 0:command name
+                {DUPLICATE_OPTION,"\u91CD\u590D\u7684\u9009\u9879: {0}"},//parameter 0:option
+                {BAD_SPEC,"{0}\u7684\u89C4\u8303\u9519\u8BEF: {1}"},//parameter 0:option;parameter 1:specifier
+        };
+
+        protected Object[][] getContents() {
+                return resource;
+        }
+
+
+}
--- a/src/share/classes/com/sun/rowset/RowSetResourceBundle_de.properties	Fri Apr 18 23:39:11 2014 +0100
+++ b/src/share/classes/com/sun/rowset/RowSetResourceBundle_de.properties	Wed Apr 23 15:10:18 2014 +0100
@@ -140,7 +140,7 @@
 #WebRowSetXmlReader exception
 wrsxmlreader.invalidcp = Ende von RowSet wurde erreicht. Ung\u00FCltige Cursorposition
 wrsxmlreader.readxml = readXML: {0}
-wrsxmlreader.parseerr = ** Parsing-Fehler: {0}, Zeile: {1} , URI: {2}
+wrsxmlreader.parseerr = ** Parsingfehler: {0}, Zeile: {1} , URI: {2}
 
 #WebRowSetXmlWriter exceptions
 wrsxmlwriter.ioex = IOException: {0}
--- a/src/share/classes/com/sun/rowset/RowSetResourceBundle_ja.properties	Fri Apr 18 23:39:11 2014 +0100
+++ b/src/share/classes/com/sun/rowset/RowSetResourceBundle_ja.properties	Wed Apr 23 15:10:18 2014 +0100
@@ -51,8 +51,8 @@
 cachedrowsetimpl.last = last: TYPE_FORWARD_ONLY
 cachedrowsetimpl.absolute = absolute: \u7121\u52B9\u306A\u30AB\u30FC\u30BD\u30EB\u4F4D\u7F6E
 cachedrowsetimpl.relative = relative: \u7121\u52B9\u306A\u30AB\u30FC\u30BD\u30EB\u4F4D\u7F6E
-cachedrowsetimpl.asciistream = ascii\u30B9\u30C8\u30EA\u30FC\u30E0\u306E\u8AAD\u8FBC\u307F\u306B\u5931\u6557\u3057\u307E\u3057\u305F
-cachedrowsetimpl.binstream = \u30D0\u30A4\u30CA\u30EA\u30FB\u30B9\u30C8\u30EA\u30FC\u30E0\u306E\u8AAD\u8FBC\u307F\u306B\u5931\u6557\u3057\u307E\u3057\u305F
+cachedrowsetimpl.asciistream = ascii\u30B9\u30C8\u30EA\u30FC\u30E0\u306E\u8AAD\u8FBC\u307F\u304C\u5931\u6557\u3057\u307E\u3057\u305F
+cachedrowsetimpl.binstream = \u30D0\u30A4\u30CA\u30EA\u30FB\u30B9\u30C8\u30EA\u30FC\u30E0\u306E\u8AAD\u8FBC\u307F\u304C\u5931\u6557\u3057\u307E\u3057\u305F
 cachedrowsetimpl.failedins = \u884C\u306E\u633F\u5165\u306B\u5931\u6557
 cachedrowsetimpl.updateins = \u633F\u5165\u884C\u306B\u304A\u3044\u3066updateRow\u304C\u547C\u3073\u51FA\u3055\u308C\u307E\u3057\u305F
 cachedrowsetimpl.movetoins = moveToInsertRow: CONCUR_READ_ONLY
@@ -101,7 +101,7 @@
 
 #JdbcRowSetImpl exceptions
 jdbcrowsetimpl.invalstate = \u7121\u52B9\u306A\u72B6\u614B
-jdbcrowsetimpl.connect = JdbcRowSet(connect): JNDI\u304C\u63A5\u7D9A\u3067\u304D\u307E\u305B\u3093
+jdbcrowsetimpl.connect = JdbcRowSet (connect): JNDI\u304C\u63A5\u7D9A\u3067\u304D\u307E\u305B\u3093
 jdbcrowsetimpl.paramtype = \u30D1\u30E9\u30E1\u30FC\u30BF\u30FB\u30BF\u30A4\u30D7\u3092\u63A8\u5B9A\u3067\u304D\u307E\u305B\u3093
 jdbcrowsetimpl.matchcols = \u4E00\u81F4\u5217\u304C\u5217\u306E\u30BB\u30C3\u30C8\u3068\u540C\u3058\u3067\u306F\u3042\u308A\u307E\u305B\u3093
 jdbcrowsetimpl.setmatchcols = \u4E00\u81F4\u5217\u3092\u53D6\u5F97\u3059\u308B\u524D\u306B\u8A2D\u5B9A\u3057\u3066\u304F\u3060\u3055\u3044
--- a/src/share/classes/com/sun/rowset/RowSetResourceBundle_sv.properties	Fri Apr 18 23:39:11 2014 +0100
+++ b/src/share/classes/com/sun/rowset/RowSetResourceBundle_sv.properties	Wed Apr 23 15:10:18 2014 +0100
@@ -29,11 +29,11 @@
 cachedrowsetimpl.nullhash = Kan inte instansiera CachedRowSetImpl. Null-hashtabell skickades till konstruktor
 cachedrowsetimpl.invalidop = En ogiltig \u00E5tg\u00E4rd utf\u00F6rdes p\u00E5 infogad rad
 cachedrowsetimpl.accfailed = acceptChanges utf\u00F6rdes inte
-cachedrowsetimpl.invalidcp = Mark\u00F6rpositionen \u00E4r ogiltig
+cachedrowsetimpl.invalidcp = Ogiltigt mark\u00F6rl\u00E4ge
 cachedrowsetimpl.illegalop = En otill\u00E5ten \u00E5tg\u00E4rd utf\u00F6rdes p\u00E5 en icke infogad rad
 cachedrowsetimpl.clonefail = Kloningen utf\u00F6rdes inte: {0}
-cachedrowsetimpl.invalidcol = Kolumnindexet \u00E4r ogiltigt
-cachedrowsetimpl.invalcolnm = Kolumnnamnet \u00E4r ogiltigt
+cachedrowsetimpl.invalidcol = Ogiltigt kolumnindex
+cachedrowsetimpl.invalcolnm = Ogiltigt kolumnnamn
 cachedrowsetimpl.boolfail = getBoolen utf\u00F6rdes inte f\u00F6r v\u00E4rdet ({0}) i kolumnen {1}
 cachedrowsetimpl.bytefail = getByte utf\u00F6rdes inte f\u00F6r v\u00E4rdet ({0}) i kolumnen {1}
 cachedrowsetimpl.shortfail = getShort utf\u00F6rdes inte f\u00F6r v\u00E4rdet ({0}) i kolumnen {1}
@@ -60,7 +60,7 @@
 cachedrowsetimpl.movetoins2 = moveToInsertRow: ogiltigt antal kolumner
 cachedrowsetimpl.tablename = Tabellnamnet kan inte vara null
 cachedrowsetimpl.keycols = Ogiltiga nyckelkolumner
-cachedrowsetimpl.invalidcol = Kolumnindexet \u00E4r ogiltigt
+cachedrowsetimpl.invalidcol = Ogiltigt kolumnindex
 cachedrowsetimpl.opnotsupp = Databasen har inte st\u00F6d f\u00F6r denna \u00E5tg\u00E4rd
 cachedrowsetimpl.matchcols = Matchningskolumnerna \u00E4r inte samma som de som st\u00E4llts in
 cachedrowsetimpl.setmatchcols = St\u00E4ll in matchningskolumnerna innan du h\u00E4mtar dem
@@ -81,7 +81,7 @@
 
 # WebRowSetImpl exceptions
 webrowsetimpl.nullhash = Kan inte instansiera WebRowSetImpl. Null-hashtabell skickades till konstruktor.
-webrowsetimpl.invalidwr = Ogiltig f\u00F6rfattare
+webrowsetimpl.invalidwr = Ogiltig skrivfunktion
 webrowsetimpl.invalidrd = Ogiltig l\u00E4sare
 
 #FilteredRowSetImpl exceptions
--- a/src/share/classes/com/sun/swing/internal/plaf/metal/resources/metal_fr.properties	Fri Apr 18 23:39:11 2014 +0100
+++ b/src/share/classes/com/sun/swing/internal/plaf/metal/resources/metal_fr.properties	Wed Apr 23 15:10:18 2014 +0100
@@ -25,8 +25,8 @@
 FileChooser.filesOfTypeLabel.textAndMnemonic=&Type de fichier :
 FileChooser.upFolderToolTip.textAndMnemonic=Remonte d'un niveau.
 FileChooser.upFolderAccessibleName=Monter
-FileChooser.homeFolderToolTip.textAndMnemonic=R\u00E9pertoire d'origine
-FileChooser.homeFolderAccessibleName=R\u00E9pertoire d'origine
+FileChooser.homeFolderToolTip.textAndMnemonic=R\u00E9pertoire de base
+FileChooser.homeFolderAccessibleName=R\u00E9pertoire de base
 FileChooser.newFolderToolTip.textAndMnemonic=Cr\u00E9e un dossier.
 FileChooser.newFolderAccessibleName=Nouveau dossier
 FileChooser.newFolderActionLabel.textAndMnemonic=Nouveau dossier
--- a/src/share/classes/com/sun/swing/internal/plaf/synth/resources/synth_fr.properties	Fri Apr 18 23:39:11 2014 +0100
+++ b/src/share/classes/com/sun/swing/internal/plaf/synth/resources/synth_fr.properties	Wed Apr 23 15:10:18 2014 +0100
@@ -25,8 +25,8 @@
 FileChooser.filesOfTypeLabel.textAndMnemonic=&Type de fichier :
 FileChooser.upFolderToolTip.textAndMnemonic=Remonte d'un niveau.
 FileChooser.upFolderAccessibleName=Monter
-FileChooser.homeFolderToolTip.textAndMnemonic=R\u00E9pertoire d'origine
-FileChooser.homeFolderAccessibleName=R\u00E9pertoire d'origine
+FileChooser.homeFolderToolTip.textAndMnemonic=R\u00E9pertoire de base
+FileChooser.homeFolderAccessibleName=R\u00E9pertoire de base
 FileChooser.newFolderToolTip.textAndMnemonic=Cr\u00E9e un dossier.
 FileChooser.newFolderAccessibleName=Nouveau dossier
 FileChooser.newFolderActionLabel.textAndMnemonic=Nouveau dossier
--- a/src/share/classes/com/sun/tools/jdi/resources/jdi_ja.properties	Fri Apr 18 23:39:11 2014 +0100
+++ b/src/share/classes/com/sun/tools/jdi/resources/jdi_ja.properties	Wed Apr 23 15:10:18 2014 +0100
@@ -47,6 +47,6 @@
 memory_listening.name = VM\u3078\u306E\u63A5\u7D9A\u3092\u30EA\u30B9\u30CB\u30F3\u30B0\u3059\u308B\u305F\u3081\u306E\u5171\u6709\u30E1\u30E2\u30EA\u30FC\u9818\u57DF\u540D
 memory_listening.name.label = \u540D\u524D
 memory_listening.description = \u305D\u306E\u4ED6\u306EVM\u306B\u3088\u308A\u958B\u59CB\u3055\u308C\u308B\u5171\u6709\u30E1\u30E2\u30EA\u30FC\u63A5\u7D9A\u3092\u53D7\u3051\u5165\u308C\u307E\u3059
-process_attaching.description = \u30C7\u30D0\u30C3\u30B0\u3059\u308B\u30D7\u30ED\u30BB\u30B9\u306B\u30D7\u30ED\u30BB\u30B9ID(pid)\u3092\u4F7F\u7528\u3057\u3066\u63A5\u7D9A\u3057\u307E\u3059
+process_attaching.description = \u30C7\u30D0\u30C3\u30B0\u3059\u308B\u30D7\u30ED\u30BB\u30B9\u306B\u30D7\u30ED\u30BB\u30B9ID (pid)\u3092\u4F7F\u7528\u3057\u3066\u63A5\u7D9A\u3057\u307E\u3059
 process_attaching.pid = pid
-process_attaching.pid.label = \u30C7\u30D0\u30C3\u30B0\u3059\u308B\u30D7\u30ED\u30BB\u30B9ID(pid)
+process_attaching.pid.label = \u30C7\u30D0\u30C3\u30B0\u3059\u308B\u30D7\u30ED\u30BB\u30B9ID (pid)
--- a/src/share/classes/java/awt/KeyboardFocusManager.java	Fri Apr 18 23:39:11 2014 +0100
+++ b/src/share/classes/java/awt/KeyboardFocusManager.java	Wed Apr 23 15:10:18 2014 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -2368,7 +2368,8 @@
                 focusLog.finest("Request {0}", String.valueOf(hwFocusRequest));
             }
             if (hwFocusRequest == null &&
-                heavyweight == nativeFocusOwner)
+                heavyweight == nativeFocusOwner &&
+                heavyweight.getContainingWindow() == nativeFocusedWindow)
             {
                 if (descendant == currentFocusOwner) {
                     // Redundant request.
--- a/src/share/classes/java/awt/Toolkit.java	Fri Apr 18 23:39:11 2014 +0100
+++ b/src/share/classes/java/awt/Toolkit.java	Wed Apr 23 15:10:18 2014 +0100
@@ -2559,30 +2559,26 @@
         public void firePropertyChange(final PropertyChangeEvent evt) {
             Object oldValue = evt.getOldValue();
             Object newValue = evt.getNewValue();
-            String propertyName = evt.getPropertyName();
             if (oldValue != null && newValue != null && oldValue.equals(newValue)) {
                 return;
             }
-            Runnable updater = new Runnable() {
-                public void run() {
-                    PropertyChangeSupport pcs = (PropertyChangeSupport)
-                            AppContext.getAppContext().get(PROP_CHANGE_SUPPORT_KEY);
-                    if (null != pcs) {
-                        pcs.firePropertyChange(evt);
-                    }
-                }
-            };
-            final AppContext currentAppContext = AppContext.getAppContext();
             for (AppContext appContext : AppContext.getAppContexts()) {
                 if (null == appContext || appContext.isDisposed()) {
                     continue;
                 }
-                if (currentAppContext == appContext) {
-                    updater.run();
-                } else {
-                    final PeerEvent e = new PeerEvent(source, updater, PeerEvent.ULTIMATE_PRIORITY_EVENT);
-                    SunToolkit.postEvent(appContext, e);
-                }
+                final PeerEvent e = new PeerEvent(source,
+                        new Runnable() {
+                            @Override
+                            public void run() {
+                                PropertyChangeSupport pcs = (PropertyChangeSupport)
+                                        AppContext.getAppContext().get(PROP_CHANGE_SUPPORT_KEY);
+                                if (null != pcs) {
+                                    pcs.firePropertyChange(evt);
+                                }
+                            }
+                        },
+                        PeerEvent.ULTIMATE_PRIORITY_EVENT);
+                SunToolkit.postEvent(appContext, e);
             }
         }
     }
--- a/src/share/classes/javax/swing/JComboBox.java	Fri Apr 18 23:39:11 2014 +0100
+++ b/src/share/classes/javax/swing/JComboBox.java	Wed Apr 23 15:10:18 2014 +0100
@@ -1418,6 +1418,28 @@
     }
 
     /**
+     * {@inheritDoc}
+     */
+    @Override
+    protected boolean processKeyBinding(KeyStroke ks, KeyEvent e, int condition, boolean pressed) {
+        if (super.processKeyBinding(ks, e, condition, pressed)) {
+            return true;
+        }
+
+        if (!isEditable() || condition != WHEN_FOCUSED || getEditor() == null
+                || !Boolean.TRUE.equals(getClientProperty("JComboBox.isTableCellEditor"))) {
+            return false;
+        }
+
+        Component editorComponent = getEditor().getEditorComponent();
+        if (editorComponent instanceof JComponent) {
+            JComponent component = (JComponent) editorComponent;
+            return component.processKeyBinding(ks, e, WHEN_FOCUSED, pressed);
+        }
+        return false;
+    }
+
+    /**
      * Sets the object that translates a keyboard character into a list
      * selection. Typically, the first selection with a matching first
      * character becomes the selected item.
--- a/src/share/classes/sun/applet/resources/MsgAppletViewer_ja.java	Fri Apr 18 23:39:11 2014 +0100
+++ b/src/share/classes/sun/applet/resources/MsgAppletViewer_ja.java	Wed Apr 23 15:10:18 2014 +0100
@@ -57,9 +57,9 @@
             {"appletviewer.appletinfo.applet", "-- \u30A2\u30D7\u30EC\u30C3\u30C8\u60C5\u5831\u306A\u3057 --"},
             {"appletviewer.appletinfo.param", "-- \u30D1\u30E9\u30E1\u30FC\u30BF\u60C5\u5831\u306A\u3057 --"},
             {"appletviewer.appletinfo.textframe", "\u30A2\u30D7\u30EC\u30C3\u30C8\u60C5\u5831"},
-            {"appletviewer.appletprint.fail", "\u5370\u5237\u306B\u5931\u6557\u3057\u307E\u3057\u305F\u3002"},
-            {"appletviewer.appletprint.finish", "\u5370\u5237\u304C\u5B8C\u4E86\u3057\u307E\u3057\u305F\u3002"},
-            {"appletviewer.appletprint.cancel", "\u5370\u5237\u304C\u4E2D\u6B62\u3055\u308C\u307E\u3057\u305F\u3002"},
+            {"appletviewer.appletprint.fail", "\u5370\u5237\u304C\u5931\u6557\u3057\u307E\u3057\u305F\u3002"},
+            {"appletviewer.appletprint.finish", "\u5370\u5237\u3092\u7D42\u4E86\u3057\u307E\u3057\u305F\u3002"},
+            {"appletviewer.appletprint.cancel", "\u5370\u5237\u304C\u53D6\u308A\u6D88\u3055\u308C\u307E\u3057\u305F\u3002"},
             {"appletviewer.appletencoding", "\u6587\u5B57\u30A8\u30F3\u30B3\u30FC\u30C7\u30A3\u30F3\u30B0: {0}"},
             {"appletviewer.parse.warning.requiresname", "\u8B66\u544A: <param name=... value=...>\u30BF\u30B0\u306Bname\u5C5E\u6027\u304C\u5FC5\u8981\u3067\u3059\u3002"},
             {"appletviewer.parse.warning.paramoutside", "\u8B66\u544A: <param>\u30BF\u30B0\u304C<applet> ... </applet>\u306E\u5916\u5074\u3067\u3059\u3002"},
@@ -98,7 +98,7 @@
             {"appletioexception.loadclass.throw.notloaded", "\u30AF\u30E9\u30B9\u304C\u30ED\u30FC\u30C9\u3055\u308C\u307E\u305B\u3093: {0}"},
             {"appletclassloader.loadcode.verbose", "{1}\u3092\u53D6\u5F97\u3059\u308B\u305F\u3081\u306E{0}\u3078\u306E\u30B9\u30C8\u30EA\u30FC\u30E0\u3092\u958B\u304D\u307E\u3059"},
             {"appletclassloader.filenotfound", "{0}\u306E\u691C\u7D22\u4E2D\u306B\u30D5\u30A1\u30A4\u30EB\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093"},
-            {"appletclassloader.fileformat", "{0}\u306E\u30ED\u30FC\u30C9\u4E2D\u306B\u30D5\u30A1\u30A4\u30EB\u30FB\u30D5\u30A9\u30FC\u30DE\u30C3\u30C8\u4F8B\u5916\u304C\u767A\u751F\u3057\u307E\u3057\u305F"},
+            {"appletclassloader.fileformat", "{0}\u306E\u30ED\u30FC\u30C9\u4E2D\u306B\u30D5\u30A1\u30A4\u30EB\u5F62\u5F0F\u4F8B\u5916\u304C\u767A\u751F\u3057\u307E\u3057\u305F"},
             {"appletclassloader.fileioexception", "{0}\u306E\u30ED\u30FC\u30C9\u4E2D\u306B\u5165\u51FA\u529B\u4F8B\u5916\u304C\u767A\u751F\u3057\u307E\u3057\u305F"},
             {"appletclassloader.fileexception", "{1}\u306E\u30ED\u30FC\u30C9\u4E2D\u306B{0}\u4F8B\u5916\u304C\u767A\u751F\u3057\u307E\u3057\u305F"},
             {"appletclassloader.filedeath", "{1}\u306E\u30ED\u30FC\u30C9\u4E2D\u306B{0}\u304C\u5F37\u5236\u7D42\u4E86\u3057\u307E\u3057\u305F"},
@@ -132,7 +132,7 @@
             {"appletpanel.notdisposed", "\u30ED\u30FC\u30C9: \u30A2\u30D7\u30EC\u30C3\u30C8\u304C\u7834\u68C4\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002"},
             {"appletpanel.bail", "\u4E2D\u65AD\u6E08: \u7D42\u4E86\u3057\u3066\u3044\u307E\u3059\u3002"},
             {"appletpanel.filenotfound", "{0}\u306E\u691C\u7D22\u4E2D\u306B\u30D5\u30A1\u30A4\u30EB\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093"},
-            {"appletpanel.fileformat", "{0}\u306E\u30ED\u30FC\u30C9\u4E2D\u306B\u30D5\u30A1\u30A4\u30EB\u30FB\u30D5\u30A9\u30FC\u30DE\u30C3\u30C8\u4F8B\u5916\u304C\u767A\u751F\u3057\u307E\u3057\u305F"},
+            {"appletpanel.fileformat", "{0}\u306E\u30ED\u30FC\u30C9\u4E2D\u306B\u30D5\u30A1\u30A4\u30EB\u5F62\u5F0F\u4F8B\u5916\u304C\u767A\u751F\u3057\u307E\u3057\u305F"},
             {"appletpanel.fileioexception", "{0}\u306E\u30ED\u30FC\u30C9\u4E2D\u306B\u5165\u51FA\u529B\u4F8B\u5916\u304C\u767A\u751F\u3057\u307E\u3057\u305F"},
             {"appletpanel.fileexception", "{1}\u306E\u30ED\u30FC\u30C9\u4E2D\u306B{0}\u4F8B\u5916\u304C\u767A\u751F\u3057\u307E\u3057\u305F"},
             {"appletpanel.filedeath", "{1}\u306E\u30ED\u30FC\u30C9\u4E2D\u306B{0}\u304C\u5F37\u5236\u7D42\u4E86\u3057\u307E\u3057\u305F"},
--- a/src/share/classes/sun/applet/resources/MsgAppletViewer_pt_BR.java	Fri Apr 18 23:39:11 2014 +0100
+++ b/src/share/classes/sun/applet/resources/MsgAppletViewer_pt_BR.java	Wed Apr 23 15:10:18 2014 +0100
@@ -93,7 +93,7 @@
             {"appletviewer.main.nosecmgr", "Advert\u00EAncia: SecurityManager n\u00E3o instalado!"},
             {"appletviewer.main.warning", "Advert\u00EAncia: Nenhum applet iniciado. Certifique-se de que a entrada contenha uma tag <applet>."},
             {"appletviewer.main.warn.prop.overwrite", "Advert\u00EAncia: Substituindo a propriedade do sistema temporariamente a pedido do usu\u00E1rio: chave: {0} valor antigo: {1} valor novo: {2}"},
-            {"appletviewer.main.warn.cantreadprops", "Advert\u00EAncia: N\u00E3o \u00E9 poss\u00EDvel ler o arquivo de propriedades AppletViewer: {0} Usando defaults."},
+            {"appletviewer.main.warn.cantreadprops", "Advert\u00EAncia: N\u00E3o \u00E9 poss\u00EDvel ler o arquivo de propriedades AppletViewer: {0} Usando padr\u00F5es."},
             {"appletioexception.loadclass.throw.interrupted", "carregamento de classe interrompido: {0}"},
             {"appletioexception.loadclass.throw.notloaded", "classe n\u00E3o carregada: {0}"},
             {"appletclassloader.loadcode.verbose", "Fluxo de abertura para: {0} para obter {1}"},
--- a/src/share/classes/sun/applet/resources/MsgAppletViewer_sv.java	Fri Apr 18 23:39:11 2014 +0100
+++ b/src/share/classes/sun/applet/resources/MsgAppletViewer_sv.java	Wed Apr 23 15:10:18 2014 +0100
@@ -85,7 +85,7 @@
             {"appletviewer.main.prop.store", "Anv\u00E4ndarspecifika egenskaper f\u00F6r AppletViewer"},
             {"appletviewer.main.err.prop.cantread", "Kan inte l\u00E4sa egenskapsfilen: {0}"},
             {"appletviewer.main.err.prop.cantsave", "Kan inte spara egenskapsfilen: {0}"},
-            {"appletviewer.main.warn.nosecmgr", "Varning: s\u00E4kerheten inaktiveras."},
+            {"appletviewer.main.warn.nosecmgr", "Varning! S\u00E4kerheten avaktiveras."},
             {"appletviewer.main.debug.cantfinddebug", "Hittar inte fels\u00F6kningsprogrammet!"},
             {"appletviewer.main.debug.cantfindmain", "Hittar inte huvudmetoden i fels\u00F6kningsprogrammet!"},
             {"appletviewer.main.debug.exceptionindebug", "Undantag i fels\u00F6kningsprogrammet!"},
--- a/src/share/classes/sun/awt/AppContext.java	Fri Apr 18 23:39:11 2014 +0100
+++ b/src/share/classes/sun/awt/AppContext.java	Wed Apr 23 15:10:18 2014 +0100
@@ -167,6 +167,9 @@
     */
     private static volatile AppContext mainAppContext = null;
 
+    private static class GetAppContextLock {};
+    private final static Object getAppContextLock = new GetAppContextLock();
+
     /*
      * The hash map associated with this AppContext.  A private delegate
      * is used instead of subclassing HashMap so as to avoid all of
@@ -308,14 +311,16 @@
                     // if no contexts have been created yet. This covers standalone apps
                     // and excludes applets because by the time applet starts
                     // a number of contexts have already been created by the plugin.
-                    if (numAppContexts.get() == 0) {
-                        if (System.getProperty("javaplugin.version") == null &&
-                                System.getProperty("javawebstart.version") == null) {
-                            initMainAppContext();
-                        } else if (System.getProperty("javafx.version") != null &&
-                                threadGroup.getParent() != null) {
-                            // Swing inside JavaFX case
-                            SunToolkit.createNewAppContext();
+                    synchronized (getAppContextLock) {
+                        if (numAppContexts.get() == 0) {
+                            if (System.getProperty("javaplugin.version") == null &&
+                                    System.getProperty("javawebstart.version") == null) {
+                                initMainAppContext();
+                            } else if (System.getProperty("javafx.version") != null &&
+                                    threadGroup.getParent() != null) {
+                                // Swing inside JavaFX case
+                                SunToolkit.createNewAppContext();
+                            }
                         }
                     }
 
--- a/src/share/classes/sun/awt/resources/awt_pt_BR.properties	Fri Apr 18 23:39:11 2014 +0100
+++ b/src/share/classes/sun/awt/resources/awt_pt_BR.properties	Wed Apr 23 15:10:18 2014 +0100
@@ -151,7 +151,7 @@
 AWT.undefined=Indefinido
 
 # Predefined cursor names
-AWT.DefaultCursor=Cursor Default
+AWT.DefaultCursor=Cursor Padr\u00E3o
 AWT.CrosshairCursor=Cursor em Forma de Cruz
 AWT.TextCursor=Cursor de Texto
 AWT.WaitCursor=Cursor em Forma de Ampulheta
@@ -165,9 +165,9 @@
 AWT.EResizeCursor=Cursor de Seta Que Aponta \u00E0 Direita
 AWT.HandCursor=Cursor em Forma de M\u00E3o
 AWT.MoveCursor=Cursor de Movimento
-AWT.DefaultDragCursor=Cursor Default de Arrastar
-AWT.DefaultNoDropCursor=Cursor Default sem Arrastar
-AWT.DefaultDropCursor=Cursor Default de Soltar
+AWT.DefaultDragCursor=Cursor Padr\u00E3o de Arrastar
+AWT.DefaultNoDropCursor=Cursor Padr\u00E3o sem Arrastar
+AWT.DefaultDropCursor=Cursor Padr\u00E3o de Soltar
 
 # Input method related strings
 AWT.CompositionWindowTitle=Janela de Entrada
--- a/src/share/classes/sun/java2d/SunGraphics2D.java	Fri Apr 18 23:39:11 2014 +0100
+++ b/src/share/classes/sun/java2d/SunGraphics2D.java	Wed Apr 23 15:10:18 2014 +0100
@@ -2388,6 +2388,8 @@
                 surfaceData = NullSurfaceData.theInstance;
             }
 
+            invalidatePipe();
+
             // this will recalculate the composite clip
             setDevClip(surfaceData.getBounds());
 
--- a/src/share/classes/sun/launcher/resources/launcher_de.properties	Fri Apr 18 23:39:11 2014 +0100
+++ b/src/share/classes/sun/launcher/resources/launcher_de.properties	Wed Apr 23 15:10:18 2014 +0100
@@ -37,7 +37,7 @@
 java.launcher.opt.footer     =\    -cp <Klassensuchpfad von Verzeichnissen und ZIP-/JAR-Dateien>\n    -classpath <Klassensuchpfad von Verzeichnissen und ZIP-/JAR-Dateien>\n                  Eine durch {0} getrennte Liste mit Verzeichnissen, JAR-Archiven\n                  und ZIP-Archiven zur Suche nach Klassendateien.\n    -D<name>=<value>\n                  Legt eine Systemeigenschaft fest\n    -verbose:[class|gc|jni]\n                  Aktiviert die Verbose-Ausgabe\n    -version      Druckt Produktversion und beendet das Programm\n    -version:<value>\n                  Erfordert die angegebene Version zur Ausf\u00FChrung\n    -showversion  Druckt Produktversion und f\u00E4hrt fort\n    -jre-restrict-search | -no-jre-restrict-search\n                  Bezieht private JREs des Benutzers in Versionssuche ein bzw. schlie\u00DFt sie aus\n    -? -help      Druckt diese Hilfemeldung\n    -X            Druckt Hilfe zu Nicht-Standardoptionen\n    -ea[:<packagename>...|:<classname>]\n    -enableassertions[:<packagename>...|:<classname>]\n                  Aktiviert Assertionen mit angegebener Granularit\u00E4t\n    -da[:<packagename>...|:<classname>]\n    -disableassertions[:<packagename>...|:<classname>]\n                  Deaktiviert Assertionen mit angegebener Granularit\u00E4t\n    -esa | -enablesystemassertions\n                  Aktiviert Systemassertionen\n    -dsa | -disablesystemassertions\n                  Deaktiviert Systemassertionen\n    -agentlib:<libname>[=<options>]\n                  L\u00E4dt native Agent Library <libname>, z.B. -agentlib:hprof\n                  siehe auch -agentlib:jdwp=help und -agentlib:hprof=help\n    -agentpath:<pathname>[=<options>]\n                  L\u00E4dt native Agent Library nach vollem Pfadnamen\n    -javaagent:<jarpath>[=<options>]\n                  L\u00E4dt Java-Programmiersprachen-Agent, siehe java.lang.instrument\n    -splash:<imagepath>\n                  Zeigt Startbildschirm mit angegebenem Bild\nWeitere Einzelheiten finden Sie unter http://www.oracle.com/technetwork/java/javase/documentation/index.html
 
 # Translators please note do not translate the options themselves
-java.launcher.X.usage=\    -Xmixed           Ausf\u00FChrung im gemischten Modus (Standard)\n    -Xint             Nur Ausf\u00FChrung im interpretierten Modus\n    -Xbootclasspath:<Verzeichnisse und ZIP-/JAR-Dateien durch {0} getrennt>\n                      Legt Suchpfad f\u00FCr Bootstrap-Klassen und Ressourcen fest\n    -Xbootclasspath/a:<Verzeichnisse und ZIP-/JAR-Dateien durch {0} getrennt>\n                      H\u00E4ngt an das Ende des Bootstrap Classpath an\n    -Xbootclasspath/p:<Verzeichnisse und ZIP-/JAR-Dateien durch {0} getrennt>\n                      Stellt Bootstrap Classpath voran\n    -Xdiag            Zeigt zus\u00E4tzliche Diagnosemeldungen an\n    -Xnoclassgc       Deaktiviert Klassen-Garbage Collection\n    -Xincgc           Aktiviert inkrementelle Garbage Collection\n    -Xloggc:<file>    Loggt GC-Status in einer Datei mit Zeitstempeln\n    -Xbatch           Deaktiviert Hintergrundkompilierung\n    -Xms<size>        Legt anf\u00E4ngliche Java Heap-Gr\u00F6\u00DFe fest\n    -Xmx<size>        Legt maximale Java Heap-Gr\u00F6\u00DFe fest\n    -Xss<size>        Legt Java-Thread-Stackgr\u00F6\u00DFe fest\n    -Xprof            Gibt CPU-Profiling-Daten aus\n    -Xfuture          Aktiviert strengste Pr\u00FCfungen, antizipiert zuk\u00FCnftigen Standardwert\n    -Xrs              Reduziert Verwendung von BS-Signalen durch Java/VM (siehe Dokumentation)\n    -Xcheck:jni       F\u00FChrt zus\u00E4tzliche Pr\u00FCfungen f\u00FCr JNI-Funktionen durch\n    -Xshare:off       Kein Versuch, gemeinsame Klassendaten zu verwenden\n    -Xshare:auto      Verwendet gemeinsame Klassendaten, wenn m\u00F6glich (Standard)\n    -Xshare:on        Erfordert die Verwendung gemeinsamer Klassendaten, sonst verl\u00E4uft der Vorgang nicht erfolgreich.\n    -XshowSettings    Zeigt alle Einstellungen und f\u00E4hrt fort\n    -XshowSettings:all\n                      Zeigt alle Einstellungen und f\u00E4hrt fort\n    -XshowSettings:vm Zeigt alle VM-bezogenen Einstellungen und f\u00E4hrt fort\n    -XshowSettings:properties\n                      Zeigt alle Eigenschaftseinstellungen und f\u00E4hrt fort\n    -XshowSettings:locale\n                      Zeigt alle gebietsschemabezogenen Einstellungen und f\u00E4hrt fort\n\nDie -X-Optionen sind keine Standardoptionen und k\u00F6nnen ohne Vorank\u00FCndigung ge\u00E4ndert werden.\n
+java.launcher.X.usage=\    -Xmixed           Ausf\u00FChrung im gemischten Modus (Standard)\n    -Xint             Nur Ausf\u00FChrung im interpretierten Modus\n    -Xbootclasspath:<Verzeichnisse und ZIP-/JAR-Dateien durch {0} getrennt>\n                      Legt Suchpfad f\u00FCr Bootstrap-Klassen und Ressourcen fest\n    -Xbootclasspath/a:<Verzeichnisse und ZIP-/JAR-Dateien durch {0} getrennt>\n                      H\u00E4ngt an das Ende des Bootstrap Classpath an\n    -Xbootclasspath/p:<Verzeichnisse und ZIP-/JAR-Dateien durch {0} getrennt>\n                      Stellt Bootstrap Classpath voran\n    -Xdiag            Zeigt zus\u00E4tzliche Diagnosemeldungen an\n    -Xnoclassgc       Deaktiviert Klassen-Garbage Collection\n    -Xincgc           Aktiviert inkrementelle Garbage Collection\n    -Xloggc:<file>    Loggt GC-Status in einer Datei mit Zeitstempeln\n    -Xbatch           Deaktiviert Hintergrundkompilierung\n    -Xms<size>        Legt anf\u00E4ngliche Java Heap-Gr\u00F6\u00DFe fest\n    -Xmx<size>        Legt maximale Java Heap-Gr\u00F6\u00DFe fest\n    -Xss<size>        Legt Java-Threadstackgr\u00F6\u00DFe fest\n    -Xprof            Gibt CPU-Profiling-Daten aus\n    -Xfuture          Aktiviert strengste Pr\u00FCfungen, antizipiert zuk\u00FCnftigen Standardwert\n    -Xrs              Reduziert Verwendung von BS-Signalen durch Java/VM (siehe Dokumentation)\n    -Xcheck:jni       F\u00FChrt zus\u00E4tzliche Pr\u00FCfungen f\u00FCr JNI-Funktionen durch\n    -Xshare:off       Kein Versuch, gemeinsame Klassendaten zu verwenden\n    -Xshare:auto      Verwendet gemeinsame Klassendaten, wenn m\u00F6glich (Standard)\n    -Xshare:on        Erfordert die Verwendung gemeinsamer Klassendaten, sonst verl\u00E4uft der Vorgang nicht erfolgreich.\n    -XshowSettings    Zeigt alle Einstellungen und f\u00E4hrt fort\n    -XshowSettings:all\n                      Zeigt alle Einstellungen und f\u00E4hrt fort\n    -XshowSettings:vm Zeigt alle VM-bezogenen Einstellungen und f\u00E4hrt fort\n    -XshowSettings:properties\n                      Zeigt alle Eigenschaftseinstellungen und f\u00E4hrt fort\n    -XshowSettings:locale\n                      Zeigt alle gebietsschemabezogenen Einstellungen und f\u00E4hrt fort\n\nDie -X-Optionen sind keine Standardoptionen und k\u00F6nnen ohne Vorank\u00FCndigung ge\u00E4ndert werden.\n
 
 # Translators please note do not translate the options themselves
 java.launcher.X.macosx.usage=\nDie folgenden Optionen sind f\u00FCr Mac OS X spezifisch:\n    -XstartOnFirstThread\n                      f\u00FChrt die main()-Methode f\u00FCr den ersten (AppKit) Thread aus\n    -Xdock:name=<Anwendungsname>"\n                      \u00DCberschreibt den in der Uhr angezeigten Standardanwendungsnamen\n    -Xdock:icon=<Pfad zu Symboldatei>\n                      \u00DCberschreibt das in der Uhr angezeigte Standardsymbol\n\n
--- a/src/share/classes/sun/launcher/resources/launcher_pt_BR.properties	Fri Apr 18 23:39:11 2014 +0100
+++ b/src/share/classes/sun/launcher/resources/launcher_pt_BR.properties	Wed Apr 23 15:10:18 2014 +0100
@@ -30,17 +30,17 @@
 java.launcher.opt.vmselect   =\    {0}\t  para selecionar a VM "{1}"\n
 java.launcher.opt.hotspot    =\    {0}\t  \u00E9 um sin\u00F4nimo da VM "{1}" [obsoleto]\n
 
-java.launcher.ergo.message1  =\                  A VM default \u00E9 {0}
+java.launcher.ergo.message1  =\                  A VM padr\u00E3o \u00E9 {0}
 java.launcher.ergo.message2  =\                  porque a execu\u00E7\u00E3o est\u00E1 sendo feita em uma m\u00E1quina de classe de servidor.\n
 
 # Translators please note do not translate the options themselves
 java.launcher.opt.footer     =\    -cp <caminho de pesquisa da classe dos diret\u00F3rios e arquivos zip/jar>\n    -classpath <caminho de pesquisa da classe dos diret\u00F3rios e arquivos zip/jar>\n                  Uma lista separada por {0} de diret\u00F3rios, archives JAR\n                  e archives ZIP nos quais ser\u00E3o procurados os arquivos de classe.\n    -D<nome>=<valor>\n                  define uma propriedade do sistema\n    -verbose:[class|gc|jni]\n                  ativa a sa\u00EDda detalhada\n    -version      imprime a vers\u00E3o do produto e sai do programa\n    -version:<valor>\n                  requer a execu\u00E7\u00E3o da vers\u00E3o especificada\n    -showversion  imprime a vers\u00E3o do produto e continua\n    -jre-restrict-search | -no-jre-restrict-search\n                  inclui/exclui JREs privados do usu\u00E1rio na pesquisa de vers\u00E3o\n    -? -help      imprime esta mensagem de ajuda\n    -X            imprime a ajuda sobre op\u00E7\u00F5es n\u00E3o padronizadas\n    -ea[:<nome do pacote>...|:<nome da classe>]\n    -enableassertions[:<nome do pacote>...|:<nome da classe>]\n                  ativa asser\u00E7\u00F5es com granularidade especificada\n    -da[:<nome do pacote>...|:<nome da classe>]\n    -disableassertions[:<nome do pacote>...|:<nome da classe>]\n                  desativa asser\u00E7\u00F5es com granularidade especificada\n    -esa | -enablesystemassertions\n                  ativa asser\u00E7\u00F5es do sistema\n    -dsa | -disablesystemassertions\n                  desativa asser\u00E7\u00F5es do sistema\n    -agentlib:<nome da biblioteca>[=<op\u00E7\u00F5es>]\n                  carrega a biblioteca de agentes nativa <nome da biblioteca>, por exemplo: -agentlib:hprof\n                  consulte tamb\u00E9m: -agentlib:jdwp=help e -agentlib:hprof=help\n    -agentpath:<nome do caminho>[=<op\u00E7\u00F5es>]\n                  carrega a biblioteca de agentes nativa com base no nome do caminho completo\n    -javaagent:<caminho do arquivo jar>[=<op\u00E7\u00F5es>]\n                  carrega o agente da linguagem de programa\u00E7\u00E3o Java; consulte java.lang.instrument\n    -splash:<caminho da imagem>\n                  mostra a tela de abertura com a imagem especificada\nConsulte http://www.oracle.com/technetwork/java/javase/documentation/index.html para obter mais detalhes.
 
 # Translators please note do not translate the options themselves
-java.launcher.X.usage=\    -Xmixed           execu\u00E7\u00E3o no modo misto (default)\n    -Xint             execu\u00E7\u00E3o somente no modo interpretado\n    -Xbootclasspath:<diret\u00F3rios e arquivos zip/jar separados por {0}>\n                      define o caminho de pesquisa para classes e recursos de inicializa\u00E7\u00E3o\n    -Xbootclasspath/a:<diret\u00F3rios e arquivos zip/jar separados por {0}>\n                      anexa no final do caminho da classe de inicializa\u00E7\u00E3o\n    -Xbootclasspath/p:<diret\u00F3rios e arquivos zip/jar separados por {0}>\n                      anexa no in\u00EDcio do caminho da classe de inicializa\u00E7\u00E3o\n    -Xdiag            mostra mensagens de diagn\u00F3stico adicionais\n    -Xnoclassgc       desativa a coleta de lixo da classe\n    -Xincgc           ativa a coleta de lixo incremental\n    -Xloggc:<arquivo>    registra o status do GC status em um arquivo com marca\u00E7\u00F5es de data e hor\u00E1rio\n    -Xbatch           desativa a compila\u00E7\u00E3o em segundo plano\n    -Xms<tamanho>        define o tamanho inicial do heap Java\n    -Xmx<tamanho>        define o tamanho m\u00E1ximo do heap Java\n    -Xss<tamanho>        define o tamanho da pilha de threads java\n    -Xprof            produz dados de perfil da cpu\n    -Xfuture          ativa verifica\u00E7\u00F5es de n\u00EDvel m\u00E1ximo de exig\u00EAncia, prevendo o valor default futuro\n    -Xrs              reduz o uso de sinais do SO pelo(a) Java/VM (consulte a documenta\u00E7\u00E3o)\n    -Xcheck:jni       executa verifica\u00E7\u00F5es adicionais de fun\u00E7\u00F5es da JNI\n    -Xshare:off       n\u00E3o tenta usar dados da classe compartilhada\n    -Xshare:auto      se poss\u00EDvel, usa dados da classe compartilhada (default)\n    -Xshare:on        requer o uso de dados da classe compartilhada, caso contr\u00E1rio haver\u00E1 falha.\n    -XshowSettings    mostra todas as defini\u00E7\u00F5es e continua\n    -XshowSettings:all\n                      mostra todas as defini\u00E7\u00F5es e continua\n    -XshowSettings:vm mostra todas as defini\u00E7\u00F5es relacionadas \u00E0 vm e continua\n    -XshowSettings:properties\n                      mostra todas as defini\u00E7\u00F5es da propriedade e continua\n    -XshowSettings:locale\n                      mostra todas as defini\u00E7\u00F5es relativas \u00E0s configura\u00E7\u00F5es regionais e continua\n\nAs -X options n\u00E3o s\u00E3o padronizadas e est\u00E3o sujeitas a altera\u00E7\u00F5es sem aviso.\n
+java.launcher.X.usage=\    -Xmixed           execu\u00E7\u00E3o no modo misto (padr\u00E3o)\n    -Xint             execu\u00E7\u00E3o somente no modo interpretado\n    -Xbootclasspath:<diret\u00F3rios e arquivos zip/jar separados por {0}>\n                      define o caminho de pesquisa para classes e recursos de inicializa\u00E7\u00E3o\n    -Xbootclasspath/a:<diret\u00F3rios e arquivos zip/jar separados por {0}>\n                      anexa no final do caminho da classe de inicializa\u00E7\u00E3o\n    -Xbootclasspath/p:<diret\u00F3rios e arquivos zip/jar separados por {0}>\n                      anexa no in\u00EDcio do caminho da classe de inicializa\u00E7\u00E3o\n    -Xdiag            mostra mensagens de diagn\u00F3stico adicionais\n    -Xnoclassgc       desativa a coleta de lixo da classe\n    -Xincgc           ativa a coleta de lixo incremental\n    -Xloggc:<arquivo>    registra o status do GC status em um arquivo com marca\u00E7\u00F5es de data e hor\u00E1rio\n    -Xbatch           desativa a compila\u00E7\u00E3o em segundo plano\n    -Xms<tamanho>        define o tamanho inicial do heap Java\n    -Xmx<tamanho>        define o tamanho m\u00E1ximo do heap Java\n    -Xss<tamanho>        define o tamanho da pilha de threads java\n    -Xprof            produz dados de perfil da cpu\n    -Xfuture          ativa verifica\u00E7\u00F5es de n\u00EDvel m\u00E1ximo de exig\u00EAncia, prevendo o valor padr\u00E3o futuro\n    -Xrs              reduz o uso de sinais do SO pelo(a) Java/VM (consulte a documenta\u00E7\u00E3o)\n    -Xcheck:jni       executa verifica\u00E7\u00F5es adicionais de fun\u00E7\u00F5es da JNI\n    -Xshare:off       n\u00E3o tenta usar dados da classe compartilhada\n    -Xshare:auto      se poss\u00EDvel, usa dados da classe compartilhada (padr\u00E3o)\n    -Xshare:on        requer o uso de dados da classe compartilhada, caso contr\u00E1rio haver\u00E1 falha.\n    -XshowSettings    mostra todas as defini\u00E7\u00F5es e continua\n    -XshowSettings:all\n                      mostra todas as defini\u00E7\u00F5es e continua\n    -XshowSettings:vm mostra todas as defini\u00E7\u00F5es relacionadas \u00E0 vm e continua\n    -XshowSettings:properties\n                      mostra todas as defini\u00E7\u00F5es da propriedade e continua\n    -XshowSettings:locale\n                      mostra todas as defini\u00E7\u00F5es relativas \u00E0s configura\u00E7\u00F5es regionais e continua\n\nAs -X options n\u00E3o s\u00E3o padronizadas e est\u00E3o sujeitas a altera\u00E7\u00F5es sem aviso.\n
 
 # Translators please note do not translate the options themselves
-java.launcher.X.macosx.usage=\nAs op\u00E7\u00F5es a seguir s\u00E3o espec\u00EDficas para o Mac OS X:\n    -XstartOnFirstThread\n                      executa o m\u00E9todo main() no primeiro thread (AppKit)\n    -Xdock:name=<nome da aplica\u00E7\u00E3o>"\n                      substitui o nome da aplica\u00E7\u00E3o default exibido no encaixe\n    -Xdock:icon=<caminho para o arquivo do \u00EDcone>\n                      substitui o \u00EDcone exibido no encaixe\n\n
+java.launcher.X.macosx.usage=\nAs op\u00E7\u00F5es a seguir s\u00E3o espec\u00EDficas para o Mac OS X:\n    -XstartOnFirstThread\n                      executa o m\u00E9todo main() no primeiro thread (AppKit)\n    -Xdock:name=<nome da aplica\u00E7\u00E3o>"\n                      substitui o nome da aplica\u00E7\u00E3o padr\u00E3o exibido no encaixe\n    -Xdock:icon=<caminho para o arquivo do \u00EDcone>\n                      substitui o \u00EDcone exibido no encaixe\n\n
 
 java.launcher.cls.error1=Erro: N\u00E3o foi poss\u00EDvel localizar nem carregar a classe principal {0}
 java.launcher.cls.error2=Erro: o m\u00E9todo main n\u00E3o \u00E9 {0} na classe {1}; defina o m\u00E9todo main como:\n   public static void main(String[] args)
--- a/src/share/classes/sun/management/resources/agent_ja.properties	Fri Apr 18 23:39:11 2014 +0100
+++ b/src/share/classes/sun/management/resources/agent_ja.properties	Wed Apr 23 15:10:18 2014 +0100
@@ -36,7 +36,7 @@
 agent.err.configfile.closed.failed = \u69CB\u6210\u30D5\u30A1\u30A4\u30EB\u3092\u9589\u3058\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F
 agent.err.configfile.access.denied = \u69CB\u6210\u30D5\u30A1\u30A4\u30EB\u3078\u306E\u30A2\u30AF\u30BB\u30B9\u304C\u62D2\u5426\u3055\u308C\u307E\u3057\u305F
 
-agent.err.exportaddress.failed	   = JMX\u30B3\u30CD\u30AF\u30BF\u30FB\u30A2\u30C9\u30EC\u30B9\u306E\u8A08\u6E2C\u30D0\u30C3\u30D5\u30A1\u3078\u306E\u30A8\u30AF\u30B9\u30DD\u30FC\u30C8\u306B\u5931\u6557\u3057\u307E\u3057\u305F
+agent.err.exportaddress.failed	   = JMX\u30B3\u30CD\u30AF\u30BF\u30FB\u30A2\u30C9\u30EC\u30B9\u306E\u8A08\u6E2C\u30D0\u30C3\u30D5\u30A1\u3078\u306E\u30A8\u30AF\u30B9\u30DD\u30FC\u30C8\u304C\u5931\u6557\u3057\u307E\u3057\u305F
 
 agent.err.agentclass.notfound      = \u7BA1\u7406\u30A8\u30FC\u30B8\u30A7\u30F3\u30C8\u30FB\u30AF\u30E9\u30B9\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093
 agent.err.agentclass.failed        = \u7BA1\u7406\u30A8\u30FC\u30B8\u30A7\u30F3\u30C8\u30FB\u30AF\u30E9\u30B9\u304C\u5931\u6557\u3057\u307E\u3057\u305F 
--- a/src/share/classes/sun/net/www/protocol/http/NegotiateAuthentication.java	Fri Apr 18 23:39:11 2014 +0100
+++ b/src/share/classes/sun/net/www/protocol/http/NegotiateAuthentication.java	Wed Apr 23 15:10:18 2014 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -32,6 +32,7 @@
 import sun.net.www.HeaderParser;
 import sun.misc.BASE64Decoder;
 import sun.misc.BASE64Encoder;
+import sun.util.logging.PlatformLogger;
 import static sun.net.www.protocol.http.AuthScheme.NEGOTIATE;
 import static sun.net.www.protocol.http.AuthScheme.KERBEROS;
 
@@ -45,6 +46,7 @@
 class NegotiateAuthentication extends AuthenticationInfo {
 
     private static final long serialVersionUID = 100L;
+    private static final PlatformLogger logger = HttpURLConnection.getHttpLogger();
 
     final private HttpCallerInfo hci;
 
@@ -80,6 +82,31 @@
     }
 
     /**
+     * Find out if the HttpCallerInfo supports Negotiate protocol.
+     * @return true if supported
+     */
+    public static boolean isSupported(HttpCallerInfo hci) {
+        ClassLoader loader = null;
+        try {
+            loader = Thread.currentThread().getContextClassLoader();
+        } catch (SecurityException se) {
+            if (logger.isLoggable(PlatformLogger.Level.FINER)) {
+                logger.finer("NegotiateAuthentication: " +
+                    "Attempt to get the context class loader failed - " + se);
+            }
+        }
+
+        if (loader != null) {
+            // Lock on the class loader instance to avoid the deadlock engaging
+            // the lock in "ClassLoader.loadClass(String, boolean)" method.
+            synchronized (loader) {
+                return isSupportedImpl(hci);
+            }
+        }
+        return isSupportedImpl(hci);
+    }
+
+    /**
      * Find out if the HttpCallerInfo supports Negotiate protocol. In order to
      * find out yes or no, an initialization of a Negotiator object against it
      * is tried. The generated object will be cached under the name of ths
@@ -90,7 +117,7 @@
      *
      * @return true if supported
      */
-    synchronized public static boolean isSupported(HttpCallerInfo hci) {
+    private static synchronized boolean isSupportedImpl(HttpCallerInfo hci) {
         if (supported == null) {
             supported = new HashMap <String, Boolean>();
             cache = new HashMap <String, Negotiator>();
--- a/src/share/classes/sun/security/tools/JarSignerResources_zh_CN.java	Fri Apr 18 23:39:11 2014 +0100
+++ b/src/share/classes/sun/security/tools/JarSignerResources_zh_CN.java	Wed Apr 23 15:10:18 2014 +0100
@@ -55,7 +55,7 @@
         {"Usage.jarsigner.options.jar.file.alias",
                 "\u7528\u6CD5: jarsigner [\u9009\u9879] jar-file \u522B\u540D"},
         {".jarsigner.verify.options.jar.file.alias.",
-                "       jarsigner -verify [options] jar-file [alias...]"},
+                "       jarsigner -verify [\u9009\u9879] jar-file [\u522B\u540D...]"},
         {".keystore.url.keystore.location",
                 "[-keystore <url>]           \u5BC6\u94A5\u5E93\u4F4D\u7F6E"},
         {".storepass.password.password.for.keystore.integrity",
@@ -65,7 +65,7 @@
         {".keypass.password.password.for.private.key.if.different.",
                 "[-keypass <\u53E3\u4EE4>]           \u79C1\u6709\u5BC6\u94A5\u7684\u53E3\u4EE4 (\u5982\u679C\u4E0D\u540C)"},
         {".certchain.file.name.of.alternative.certchain.file",
-                "[-certchain <file>]         \u66FF\u4EE3 certchain \u6587\u4EF6\u7684\u540D\u79F0"},
+                "[-certchain <\u6587\u4EF6>]         \u66FF\u4EE3\u8BC1\u4E66\u94FE\u6587\u4EF6\u7684\u540D\u79F0"},
         {".sigfile.file.name.of.SF.DSA.file",
                 "[-sigfile <\u6587\u4EF6>]           .SF/.DSA \u6587\u4EF6\u7684\u540D\u79F0"},
         {".signedjar.file.name.of.signed.JAR.file",
--- a/src/share/classes/sun/tools/jar/resources/jar_pt_BR.properties	Fri Apr 18 23:39:11 2014 +0100
+++ b/src/share/classes/sun/tools/jar/resources/jar_pt_BR.properties	Wed Apr 23 15:10:18 2014 +0100
@@ -44,4 +44,4 @@
 out.inflated=\ inflado: {0}
 out.size=(entrada = {0}) (sa\u00EDda= {1})
 
-usage=Uso: jar {ctxui}[vfm0Me] [jar-file] [manifest-file] [entry-point] [-C dir] arquivos ...\nOp\u00E7\u00F5es:\n    -c  cria novo arquivo compactado\n    -t  lista o sum\u00E1rio do arquivo compactado\n    -x  extrai arquivos com o nome (ou todos) do arquivo compactado\n    -u  atualizar o arquivo compactado existente\n    -v  gera sa\u00EDda detalhada na sa\u00EDda padr\u00E3o\n    -f  especifica o nome do arquivo do arquivo compactado\n    -m  inclui as informa\u00E7\u00F5es do manifesto do arquivo de manifesto especificado\n    -e  especifica o ponto de entrada da aplica\u00E7\u00E3o para aplica\u00E7\u00E3o independente \n        empacotando em um arquivo jar execut\u00E1vel\n    -0  armazena somente; n\u00E3o usa compacta\u00E7\u00E3o ZIP\n    -M  n\u00E3o cria um arquivo de manifesto para as entradas\n    -i  gera informa\u00E7\u00F5es de \u00EDndice para os arquivos especificados\n    -C  altera para o diret\u00F3rio e inclui o arquivo seguinte\nSe nenhum arquivo for um diret\u00F3rio, ent\u00E3o ser\u00E1 processado repetidamente.\nO nome do arquivo de manifesto, o nome do arquivo compactado e o nome do ponto de entrada s\u00E3o\nespecificados na mesma ordem dos flags  'm', 'f' e 'e'.\n\nExemplo 1: para arquivar dois arquivos de classe em um arquivo compactado com o nome classes.jar: \n       jar cvf classes.jar Foo.class Bar.class \nExemplo 2: use um arquivo de manifesto existente 'mymanifest' e arquive todos os\n           arquivos no diret\u00F3rio foo/ na 'classes.jar': \n       jar cvfm classes.jar mymanifest -C foo/ .\n
+usage=Uso: jar {ctxui}[vfm0Me] [jar-file] [manifest-file] [entry-point] [-C dir] arquivos ...\nOp\u00E7\u00F5es:\n    -c  cria novo arquivo compactado\n    -t  lista o sum\u00E1rio do arquivo compactado\n    -x  extrai arquivos com o nome (ou todos) do arquivo compactado\n    -u  atualiza o arquivo compactado existente\n    -v  gera sa\u00EDda detalhada na sa\u00EDda padr\u00E3o\n    -f  especifica o nome do arquivo do arquivo compactado\n    -m  inclui as informa\u00E7\u00F5es do manifesto do arquivo de manifesto especificado\n    -e  especifica o ponto de entrada da aplica\u00E7\u00E3o para aplica\u00E7\u00E3o independente \n        empacotando em um arquivo jar execut\u00E1vel\n    -0  armazena somente; n\u00E3o usa compacta\u00E7\u00E3o ZIP\n    -M  n\u00E3o cria um arquivo de manifesto para as entradas\n    -i  gera informa\u00E7\u00F5es de \u00EDndice para os arquivos especificados\n    -C  passa para o diret\u00F3rio especificado e inclui o arquivo a seguir\nSe um arquivo tamb\u00E9m for um diret\u00F3rio, ele ser\u00E1 processado repetidamente.\nO nome do arquivo de manifesto, o nome do arquivo compactado e o nome do ponto de entrada s\u00E3o\nespecificados na mesma ordem dos flags 'm', 'f' e 'e'.\n\nExemplo 1: para arquivar dois arquivos de classe em um arquivo compactado denominado classes.jar: \n       jar cvf classes.jar Foo.class Bar.class \nExemplo 2: use um arquivo de manifesto existente 'mymanifest' e arquive todos os\n           arquivos no diret\u00F3rio foo/ na 'classes.jar': \n       jar cvfm classes.jar mymanifest -C foo/ .\n
--- a/src/share/classes/sun/tools/jconsole/resources/messages_ja.properties	Fri Apr 18 23:39:11 2014 +0100
+++ b/src/share/classes/sun/tools/jconsole/resources/messages_ja.properties	Wed Apr 23 15:10:18 2014 +0100
@@ -52,7 +52,7 @@
 CONNECT_DIALOG_STATUS_BAR_ACCESSIBLE_NAME=\u30B9\u30C6\u30FC\u30BF\u30B9\u30FB\u30D0\u30FC
 CONNECT_DIALOG_TITLE=JConsole: \u65B0\u898F\u63A5\u7D9A
 CONNECTED_PUNCTUATION_CLICK_TO_DISCONNECT_=\u63A5\u7D9A\u3055\u308C\u3066\u3044\u307E\u3059\u3002\u30AF\u30EA\u30C3\u30AF\u3059\u308B\u3068\u5207\u65AD\u3057\u307E\u3059\u3002
-CONNECTION_FAILED=\u63A5\u7D9A\u306B\u5931\u6557\u3057\u307E\u3057\u305F
+CONNECTION_FAILED=\u63A5\u7D9A\u304C\u5931\u6557\u3057\u307E\u3057\u305F
 CONNECTION=\u63A5\u7D9A(&C)
 CONNECTION_NAME=\u63A5\u7D9A\u540D
 CONNECTION_NAME__DISCONNECTED_={0} (\u5207\u65AD\u6E08)
@@ -88,8 +88,8 @@
 FILE_CHOOSER_FILE_EXISTS_OK_OPTION=\u7F6E\u63DB
 FILE_CHOOSER_FILE_EXISTS_TITLE=\u30D5\u30A1\u30A4\u30EB\u304C\u5B58\u5728\u3057\u3066\u3044\u307E\u3059
 FILE_CHOOSER_SAVED_FILE=<html>\u30D5\u30A1\u30A4\u30EB\u306B\u4FDD\u5B58\u3057\u307E\u3057\u305F:<br>{0}<br>({1}\u30D0\u30A4\u30C8)
-FILE_CHOOSER_SAVE_FAILED_MESSAGE=<html><center>\u30D5\u30A1\u30A4\u30EB\u3078\u306E\u4FDD\u5B58\u306B\u5931\u6557\u3057\u307E\u3057\u305F:<br>{0}<br>{1}
-FILE_CHOOSER_SAVE_FAILED_TITLE=\u4FDD\u5B58\u306B\u5931\u6557\u3057\u307E\u3057\u305F
+FILE_CHOOSER_SAVE_FAILED_MESSAGE=<html><center>\u30D5\u30A1\u30A4\u30EB\u3078\u306E\u4FDD\u5B58\u304C\u5931\u6557\u3057\u307E\u3057\u305F:<br>{0}<br>{1}
+FILE_CHOOSER_SAVE_FAILED_TITLE=\u4FDD\u5B58\u304C\u5931\u6557\u3057\u307E\u3057\u305F
 FREE_PHYSICAL_MEMORY=\u7A7A\u304D\u7269\u7406\u30E1\u30E2\u30EA\u30FC
 FREE_SWAP_SPACE=\u7A7A\u304D\u30B9\u30EF\u30C3\u30D7\u30FB\u30B9\u30DA\u30FC\u30B9
 GARBAGE_COLLECTOR=\u30AC\u30D9\u30FC\u30B8\u30FB\u30B3\u30EC\u30AF\u30BF
@@ -161,7 +161,7 @@
 MESSAGE=\u30E1\u30C3\u30BB\u30FC\u30B8
 METHOD_SUCCESSFULLY_INVOKED=\u30E1\u30BD\u30C3\u30C9\u304C\u6B63\u5E38\u306B\u8D77\u52D5\u3055\u308C\u307E\u3057\u305F
 MINIMIZE_ALL=\u3059\u3079\u3066\u6700\u5C0F\u5316(&M)
-MONITOR_LOCKED=\ \ \ - \u30ED\u30C3\u30AF\u6E08{0}\n
+MONITOR_LOCKED=\   - \u30ED\u30C3\u30AF\u6E08{0}\n
 NAME=\u540D\u524D
 NAME_AND_BUILD={0} (\u30D3\u30EB\u30C9{1})
 NAME_STATE=\u540D\u524D: {0}\n\u72B6\u614B: {1}\n
@@ -205,6 +205,7 @@
 PROCESS_CPU_TIME=\u30D7\u30ED\u30BB\u30B9CPU\u6642\u9593
 READABLE=\u8AAD\u53D6\u308A\u53EF\u80FD
 RECONNECT=\u518D\u63A5\u7D9A
+INSECURE=\u975E\u30BB\u30AD\u30E5\u30A2
 REMOTE_PROCESS_COLON=\u30EA\u30E2\u30FC\u30C8\u30FB\u30D7\u30ED\u30BB\u30B9(&R):
 REMOTE_PROCESS_TEXT_FIELD_ACCESSIBLE_NAME=\u30EA\u30E2\u30FC\u30C8\u30FB\u30D7\u30ED\u30BB\u30B9
 RESTORE_ALL=\u3059\u3079\u3066\u5FA9\u5143(&R)
@@ -244,7 +245,7 @@
 UNREGISTER=\u767B\u9332\u89E3\u9664
 UPTIME=\u7A3C\u50CD\u6642\u9593
 USAGE_THRESHOLD=\u4F7F\u7528\u3057\u304D\u3044\u5024
-REMOTE_TF_USAGE=<b>\u4F7F\u7528\u65B9\u6CD5</b>: &&lt;hostname&&gt;:&&lt;port&&gt;\u307E\u305F\u306Fservice:jmx:&&lt;protocol&&gt;:&&lt;sap&&gt;
+REMOTE_TF_USAGE=<b>\u4F7F\u7528\u65B9\u6CD5</b>: &&lt;hostname&&gt;:&&lt;port&&gt; OR service:jmx:&&lt;protocol&&gt;:&&lt;sap&&gt;
 USED=\u4F7F\u7528\u6E08
 USERNAME_COLON_=\u30E6\u30FC\u30B6\u30FC\u540D(&U):
 USERNAME_ACCESSIBLE_NAME=\u30E6\u30FC\u30B6\u30FC\u540D
@@ -260,8 +261,10 @@
 WINDOW=\u30A6\u30A3\u30F3\u30C9\u30A6(&W)
 WINDOWS=\u30A6\u30A3\u30F3\u30C9\u30A6
 WRITABLE=\u66F8\u8FBC\u307F\u53EF\u80FD
-CONNECTION_FAILED1=\u63A5\u7D9A\u306B\u5931\u6557\u3057\u307E\u3057\u305F: \u518D\u8A66\u884C\u3057\u307E\u3059\u304B\u3002
-CONNECTION_FAILED2={0}\u3078\u306E\u63A5\u7D9A\u304C\u6210\u529F\u3057\u307E\u305B\u3093\u3067\u3057\u305F\u3002<br>\u3082\u3046\u4E00\u5EA6\u8A66\u3057\u307E\u3059\u304B\u3002
+CONNECTION_FAILED1=\u63A5\u7D9A\u304C\u5931\u6557\u3057\u307E\u3057\u305F: \u518D\u8A66\u884C\u3057\u307E\u3059\u304B\u3002
+CONNECTION_FAILED2={0}\u3078\u306E\u63A5\u7D9A\u304C\u6210\u529F\u3057\u307E\u305B\u3093\u3067\u3057\u305F\u3002<br>\u518D\u8A66\u884C\u3057\u307E\u3059\u304B\u3002
+CONNECTION_FAILED_SSL1=\u30BB\u30AD\u30E5\u30A2\u306A\u63A5\u7D9A\u304C\u5931\u6557\u3057\u307E\u3057\u305F\u3002\u975E\u30BB\u30AD\u30E5\u30A2\u3067\u518D\u8A66\u884C\u3057\u307E\u3059\u304B\u3002
+CONNECTION_FAILED_SSL2=SSL\u3092\u4F7F\u7528\u3057\u3066{0}\u306B\u63A5\u7D9A\u3067\u304D\u307E\u305B\u3093\u3002<br>SSL\u306A\u3057\u3067\u63A5\u7D9A\u3057\u307E\u3059\u304B\u3002<br>(\u30E6\u30FC\u30B6\u30FC\u540D\u304A\u3088\u3073\u30D1\u30B9\u30EF\u30FC\u30C9\u306F\u30D7\u30EC\u30FC\u30F3\u30FB\u30C6\u30AD\u30B9\u30C8\u3067\u9001\u4FE1\u3055\u308C\u307E\u3059\u3002)
 CONNECTION_LOST1=\u63A5\u7D9A\u304C\u5931\u308F\u308C\u307E\u3057\u305F: \u518D\u63A5\u7D9A\u3057\u307E\u3059\u304B\u3002
 CONNECTING_TO1={0}\u306B\u63A5\u7D9A\u4E2D
 CONNECTING_TO2={0}\u306B\u73FE\u5728\u63A5\u7D9A\u4E2D\u3067\u3059\u3002<br>\u3053\u308C\u306B\u306F\u6570\u5206\u304B\u304B\u308A\u307E\u3059\u3002
@@ -271,4 +274,4 @@
 KBYTES={0} KB
 PLOT=\u30D7\u30ED\u30C3\u30C8
 VISUALIZE=\u8996\u899A\u5316
-ZZ_USAGE_TEXT=\u4F7F\u7528\u65B9\u6CD5: {0} [ -interval=n ] [ -notile ] [ -pluginpath <path> ] [ -version ] [ connection ... ]\n\n  -interval   \u66F4\u65B0\u9593\u9694\u3092n\u79D2\u306B\u8A2D\u5B9A\u3059\u308B(\u30C7\u30D5\u30A9\u30EB\u30C8\u306F4\u79D2)\n  -notile     \u30A6\u30A3\u30F3\u30C9\u30A6\u3092\u6700\u521D\u306B\u4E26\u3079\u3066\u8868\u793A\u3057\u306A\u3044(2\u3064\u4EE5\u4E0A\u306E\u63A5\u7D9A\u306B\u3064\u3044\u3066)\n  -pluginpath JConsole\u304C\u30D7\u30E9\u30B0\u30A4\u30F3\u3092\u53C2\u7167\u3059\u308B\u305F\u3081\u306B\u4F7F\u7528\u3059\u308B\u30D1\u30B9\u3092\u6307\u5B9A\u3059\u308B\n  -version    \u30D7\u30ED\u30B0\u30E9\u30E0\u30FB\u30D0\u30FC\u30B8\u30E7\u30F3\u3092\u5370\u5237\u3059\u308B\n\n  connection = pid || host:port || JMX URL (service:jmx:<protocol>://...)\n  pid         \u30BF\u30FC\u30B2\u30C3\u30C8\u30FB\u30D7\u30ED\u30BB\u30B9\u306E\u30D7\u30ED\u30BB\u30B9ID\n  host        \u30EA\u30E2\u30FC\u30C8\u30FB\u30DB\u30B9\u30C8\u540D\u307E\u305F\u306FIP\u30A2\u30C9\u30EC\u30B9\n  port        \u30EA\u30E2\u30FC\u30C8\u63A5\u7D9A\u7528\u306E\u30DD\u30FC\u30C8\u756A\u53F7\n\n  -J          JConsole\u304C\u5B9F\u884C\u4E2D\u306EJava\u4EEE\u60F3\u30DE\u30B7\u30F3\u3078\u306E\n              \u5165\u529B\u5F15\u6570\u3092\u6307\u5B9A\u3059\u308B
+ZZ_USAGE_TEXT=\u4F7F\u7528\u65B9\u6CD5: {0} [ -interval=n ] [ -notile ] [ -pluginpath <path> ] [ -version ] [ connection ... ]\n\n  -interval   \u66F4\u65B0\u9593\u9694\u3092n\u79D2\u306B\u8A2D\u5B9A\u3059\u308B(\u30C7\u30D5\u30A9\u30EB\u30C8\u306F4\u79D2)\n  -notile     \u30A6\u30A3\u30F3\u30C9\u30A6\u3092\u6700\u521D\u306B\u4E26\u3079\u3066\u8868\u793A\u3057\u306A\u3044(2\u3064\u4EE5\u4E0A\u306E\u63A5\u7D9A\u306B\u3064\u3044\u3066)\n  -pluginpath JConsole\u304C\u30D7\u30E9\u30B0\u30A4\u30F3\u3092\u53C2\u7167\u3059\u308B\u305F\u3081\u306B\u4F7F\u7528\u3059\u308B\u30D1\u30B9\u3092\u6307\u5B9A\u3059\u308B\n  -version    \u30D7\u30ED\u30B0\u30E9\u30E0\u30FB\u30D0\u30FC\u30B8\u30E7\u30F3\u3092\u51FA\u529B\u3059\u308B\n\n  connection = pid || host:port || JMX URL (service:jmx:<protocol>://...)\n  pid         \u30BF\u30FC\u30B2\u30C3\u30C8\u30FB\u30D7\u30ED\u30BB\u30B9\u306E\u30D7\u30ED\u30BB\u30B9ID\n  host        \u30EA\u30E2\u30FC\u30C8\u30FB\u30DB\u30B9\u30C8\u540D\u307E\u305F\u306FIP\u30A2\u30C9\u30EC\u30B9\n  port        \u30EA\u30E2\u30FC\u30C8\u63A5\u7D9A\u7528\u306E\u30DD\u30FC\u30C8\u756A\u53F7\n\n  -J          JConsole\u304C\u5B9F\u884C\u4E2D\u306EJava\u4EEE\u60F3\u30DE\u30B7\u30F3\u3078\u306E\n              \u5165\u529B\u5F15\u6570\u3092\u6307\u5B9A\u3059\u308B
--- a/src/share/classes/sun/tools/jconsole/resources/messages_zh_CN.properties	Fri Apr 18 23:39:11 2014 +0100
+++ b/src/share/classes/sun/tools/jconsole/resources/messages_zh_CN.properties	Wed Apr 23 15:10:18 2014 +0100
@@ -161,7 +161,7 @@
 MESSAGE=\u6D88\u606F
 METHOD_SUCCESSFULLY_INVOKED=\u5DF2\u6210\u529F\u8C03\u7528\u65B9\u6CD5
 MINIMIZE_ALL=\u5168\u90E8\u6700\u5C0F\u5316(&M)
-MONITOR_LOCKED=\ \ \ - \u5DF2\u9501\u5B9A {0}\n
+MONITOR_LOCKED=\   - \u5DF2\u9501\u5B9A {0}\n
 NAME=\u540D\u79F0
 NAME_AND_BUILD={0} (\u5DE5\u4F5C\u7248\u672C {1})
 NAME_STATE=\u540D\u79F0: {0}\n\u72B6\u6001: {1}\n
@@ -205,6 +205,7 @@
 PROCESS_CPU_TIME=\u8FDB\u7A0B CPU \u65F6\u95F4
 READABLE=\u53EF\u8BFB
 RECONNECT=\u91CD\u65B0\u8FDE\u63A5
+INSECURE=\u4E0D\u5B89\u5168
 REMOTE_PROCESS_COLON=\u8FDC\u7A0B\u8FDB\u7A0B(&R):
 REMOTE_PROCESS_TEXT_FIELD_ACCESSIBLE_NAME=\u8FDC\u7A0B\u8FDB\u7A0B
 RESTORE_ALL=\u5168\u90E8\u8FD8\u539F(&R)
@@ -262,6 +263,8 @@
 WRITABLE=\u53EF\u5199\u5165
 CONNECTION_FAILED1=\u8FDE\u63A5\u5931\u8D25: \u662F\u5426\u91CD\u8BD5?
 CONNECTION_FAILED2=\u672A\u6210\u529F\u8FDE\u63A5\u5230{0}\u3002<br>\u662F\u5426\u8981\u91CD\u8BD5?
+CONNECTION_FAILED_SSL1=\u5B89\u5168\u8FDE\u63A5\u5931\u8D25\u3002\u662F\u5426\u4EE5\u4E0D\u5B89\u5168\u7684\u65B9\u5F0F\u91CD\u8BD5?
+CONNECTION_FAILED_SSL2=\u65E0\u6CD5\u4F7F\u7528 SSL \u8FDE\u63A5\u5230{0}\u3002<br>\u662F\u5426\u5728\u4E0D\u4F7F\u7528 SSL \u7684\u60C5\u51B5\u4E0B\u8FDB\u884C\u5C1D\u8BD5?<br>(\u7528\u6237\u540D\u548C\u53E3\u4EE4\u5C06\u4EE5\u7EAF\u6587\u672C\u683C\u5F0F\u53D1\u9001\u3002)
 CONNECTION_LOST1=\u8FDE\u63A5\u4E22\u5931: \u662F\u5426\u91CD\u65B0\u8FDE\u63A5?
 CONNECTING_TO1=\u6B63\u5728\u8FDE\u63A5\u5230{0}
 CONNECTING_TO2=\u60A8\u5F53\u524D\u6B63\u5728\u8FDE\u63A5\u5230{0}\u3002<br>\u8FD9\u5C06\u9700\u8981\u51E0\u5206\u949F\u7684\u65F6\u95F4\u3002
--- a/src/share/classes/sun/util/logging/resources/logging_zh_TW.properties	Fri Apr 18 23:39:11 2014 +0100
+++ b/src/share/classes/sun/util/logging/resources/logging_zh_TW.properties	Wed Apr 23 15:10:18 2014 +0100
@@ -27,7 +27,7 @@
 # these are the same as the non-localized level name.
 
 # The following ALL CAPS words should be translated.
-ALL=\u5168\u90E8
+ALL=\u6240\u6709
 # The following ALL CAPS words should be translated.
 SEVERE=\u56B4\u91CD
 # The following ALL CAPS words should be translated.
--- a/src/share/instrument/Reentrancy.c	Fri Apr 18 23:39:11 2014 +0100
+++ b/src/share/instrument/Reentrancy.c	Wed Apr 23 15:10:18 2014 +0100
@@ -130,6 +130,7 @@
             error = confirmingTLSSet (  jvmtienv,
                                         thread,
                                         JPLIS_CURRENTLY_INSIDE_TOKEN);
+            check_phase_ret_false(error);
             jplis_assert(error == JVMTI_ERROR_NONE);
             if ( error != JVMTI_ERROR_NONE ) {
                 result = JNI_FALSE;
@@ -158,6 +159,7 @@
     error = confirmingTLSSet(   jvmtienv,
                                 thread,
                                 JPLIS_CURRENTLY_OUTSIDE_TOKEN);
+    check_phase_ret(error);
     jplis_assert(error == JVMTI_ERROR_NONE);
 
 }
--- a/src/solaris/classes/java/lang/UNIXProcess.java.bsd	Fri Apr 18 23:39:11 2014 +0100
+++ b/src/solaris/classes/java/lang/UNIXProcess.java.bsd	Wed Apr 23 15:10:18 2014 +0100
@@ -308,47 +308,39 @@
         ProcessPipeInputStream(int fd) {
             super(new FileInputStream(newFileDescriptor(fd)));
         }
-
-        private InputStream drainInputStream(InputStream in)
+        private static byte[] drainInputStream(InputStream in)
                 throws IOException {
             int n = 0;
             int j;
             byte[] a = null;
-            synchronized (closeLock) {
-                if (buf == null) // asynchronous close()?
-                    return null; // discard
-                j = in.available();
-            }
-            while (j > 0) {
+            while ((j = in.available()) > 0) {
                 a = (a == null) ? new byte[j] : Arrays.copyOf(a, n + j);
-                synchronized (closeLock) {
-                    if (buf == null) // asynchronous close()?
-                        return null; // discard
-                    n += in.read(a, n, j);
-                    j = in.available();
-                }
+                n += in.read(a, n, j);
             }
-            return (a == null) ?
-                    ProcessBuilder.NullInputStream.INSTANCE :
-                    new ByteArrayInputStream(n == a.length ? a : Arrays.copyOf(a, n));
+            return (a == null || n == a.length) ? a : Arrays.copyOf(a, n);
         }
 
         /** Called by the process reaper thread when the process exits. */
         synchronized void processExited() {
-            try {
-                InputStream in = this.in;
-                if (in != null) {
-                    InputStream stragglers = drainInputStream(in);
-                    in.close();
-                    this.in = stragglers;
-                }
-            } catch (IOException ignored) { }
+            synchronized (closeLock) {
+                try {
+                    InputStream in = this.in;
+                    // this stream is closed if and only if: in == null
+                    if (in != null) {
+                        byte[] stragglers = drainInputStream(in);
+                        in.close();
+                        this.in = (stragglers == null) ?
+                            ProcessBuilder.NullInputStream.INSTANCE :
+                            new ByteArrayInputStream(stragglers);
+                    }
+                } catch (IOException ignored) {}
+            }
         }
 
         @Override
         public void close() throws IOException {
             // BufferedInputStream#close() is not synchronized unlike most other methods.
-            // Synchronizing helps avoid racing with drainInputStream().
+            // Synchronizing helps avoid race with processExited().
             synchronized (closeLock) {
                 super.close();
             }
--- a/src/solaris/classes/java/lang/UNIXProcess.java.linux	Fri Apr 18 23:39:11 2014 +0100
+++ b/src/solaris/classes/java/lang/UNIXProcess.java.linux	Wed Apr 23 15:10:18 2014 +0100
@@ -310,47 +310,39 @@
         ProcessPipeInputStream(int fd) {
             super(new FileInputStream(newFileDescriptor(fd)));
         }
-
-        private InputStream drainInputStream(InputStream in)
+        private static byte[] drainInputStream(InputStream in)
                 throws IOException {
             int n = 0;
             int j;
             byte[] a = null;
-            synchronized (closeLock) {
-                if (buf == null) // asynchronous close()?
-                    return null; // discard
-                j = in.available();
-            }
-            while (j > 0) {
+            while ((j = in.available()) > 0) {
                 a = (a == null) ? new byte[j] : Arrays.copyOf(a, n + j);
-                synchronized (closeLock) {
-                    if (buf == null) // asynchronous close()?
-                        return null; // discard
-                    n += in.read(a, n, j);
-                    j = in.available();
-                }
+                n += in.read(a, n, j);
             }
-            return (a == null) ?
-                    ProcessBuilder.NullInputStream.INSTANCE :
-                    new ByteArrayInputStream(n == a.length ? a : Arrays.copyOf(a, n));
+            return (a == null || n == a.length) ? a : Arrays.copyOf(a, n);
         }
 
         /** Called by the process reaper thread when the process exits. */
         synchronized void processExited() {
-            try {
-                InputStream in = this.in;
-                if (in != null) {
-                    InputStream stragglers = drainInputStream(in);
-                    in.close();
-                    this.in = stragglers;
-                }
-            } catch (IOException ignored) { }
+            synchronized (closeLock) {
+                try {
+                    InputStream in = this.in;
+                    // this stream is closed if and only if: in == null
+                    if (in != null) {
+                        byte[] stragglers = drainInputStream(in);
+                        in.close();
+                        this.in = (stragglers == null) ?
+                            ProcessBuilder.NullInputStream.INSTANCE :
+                            new ByteArrayInputStream(stragglers);
+                    }
+                } catch (IOException ignored) {}
+            }
         }
 
         @Override
         public void close() throws IOException {
             // BufferedInputStream#close() is not synchronized unlike most other methods.
-            // Synchronizing helps avoid racing with drainInputStream().
+            // Synchronizing helps avoid race with processExited().
             synchronized (closeLock) {
                 super.close();
             }
--- a/src/solaris/native/sun/nio/ch/SctpChannelImpl.c	Fri Apr 18 23:39:11 2014 +0100
+++ b/src/solaris/native/sun/nio/ch/SctpChannelImpl.c	Wed Apr 23 15:10:18 2014 +0100
@@ -38,8 +38,7 @@
 #include "sun_nio_ch_SctpResultContainer.h"
 #include "sun_nio_ch_SctpPeerAddrChange.h"
 
-/* sizeof(union sctp_notification */
-#define NOTIFICATION_BUFFER_SIZE 280
+static int SCTP_NOTIFICATION_SIZE = sizeof(union sctp_notification);
 
 #define MESSAGE_IMPL_CLASS              "sun/nio/ch/SctpMessageInfoImpl"
 #define RESULT_CONTAINER_CLASS          "sun/nio/ch/SctpResultContainer"
@@ -458,20 +457,47 @@
         if (msg->msg_flags & MSG_NOTIFICATION) {
             char *bufp = (char*)addr;
             union sctp_notification *snp;
+            jboolean allocated = JNI_FALSE;
 
-            if (!(msg->msg_flags & MSG_EOR) && length < NOTIFICATION_BUFFER_SIZE) {
-                char buf[NOTIFICATION_BUFFER_SIZE];
+            if (rv > SCTP_NOTIFICATION_SIZE) {
+                JNU_ThrowInternalError(env, "should not reach here");
+                return -1;
+            }
+
+            if (!(msg->msg_flags & MSG_EOR) && length < SCTP_NOTIFICATION_SIZE) {
+                char* newBuf;
                 int rvSAVE = rv;
-                memcpy(buf, addr, rv);
-                iov->iov_base = buf + rv;
-                iov->iov_len = NOTIFICATION_BUFFER_SIZE - rv;
+
+                if ((newBuf = malloc(SCTP_NOTIFICATION_SIZE)) == NULL) {
+                    JNU_ThrowOutOfMemoryError(env, "Out of native heap space.");
+                    return -1;
+                }
+                allocated = JNI_TRUE;
+
+                memcpy(newBuf, addr, rv);
+                iov->iov_base = newBuf + rv;
+                iov->iov_len = SCTP_NOTIFICATION_SIZE - rv;
                 if ((rv = recvmsg(fd, msg, flags)) < 0) {
                     handleSocketError(env, errno);
                     return 0;
                 }
-                bufp = buf;
+                bufp = newBuf;
                 rv += rvSAVE;
             }
+#ifdef __sparc
+              else if ((intptr_t)addr & 0x3) {
+                /* the given buffer is not 4 byte aligned */
+                char* newBuf;
+                if ((newBuf = malloc(SCTP_NOTIFICATION_SIZE)) == NULL) {
+                    JNU_ThrowOutOfMemoryError(env, "Out of native heap space.");
+                    return -1;
+                }
+                allocated = JNI_TRUE;
+
+                memcpy(newBuf, addr, rv);
+                bufp = newBuf;
+            }
+#endif
             snp = (union sctp_notification *) bufp;
             if (handleNotification(env, fd, resultContainerObj, snp, rv,
                                    (msg->msg_flags & MSG_EOR),
@@ -479,9 +505,16 @@
                 /* We have received a notification that is of interest to
                    to the Java API. The appropriate notification will be
                    set in the result container. */
+                if (allocated == JNI_TRUE) {
+                    free(bufp);
+                }
                 return 0;
             }
 
+            if (allocated == JNI_TRUE) {
+                free(bufp);
+            }
+
             // set iov back to addr, and reset msg_controllen
             iov->iov_base = addr;
             iov->iov_len = length;
--- a/src/windows/bin/cmdtoargs.c	Fri Apr 18 23:39:11 2014 +0100
+++ b/src/windows/bin/cmdtoargs.c	Wed Apr 23 15:10:18 2014 +0100
@@ -53,6 +53,16 @@
 static StdArg *stdargs;
 static int    stdargc;
 
+static int copyCh(USHORT ch, char* dest) {
+    if (HIBYTE(ch) == 0) {
+        *dest = (char)ch;
+        return 1;
+    } else {
+        *((USHORT *)dest) = ch;
+        return 2;
+    }
+}
+
 static char* next_arg(char* cmdline, char* arg, jboolean* wildcard) {
 
     char* src = cmdline;
@@ -61,31 +71,43 @@
     int quotes = 0;
     int slashes = 0;
 
-    char prev = 0;
-    char ch = 0;
+    // "prev"/"ch" may contain either a single byte, or a double byte
+    // character encoded in CP_ACP.
+    USHORT prev = 0;
+    USHORT ch = 0;
     int i;
     jboolean done = JNI_FALSE;
+    int charLength;
 
     *wildcard = JNI_FALSE;
-    while ((ch = *src) != 0 && !done) {
+    while (!done) {
+        charLength = CharNextExA(CP_ACP, src, 0) - src;
+        if (charLength == 0) {
+            break;
+        } else if (charLength == 1) {
+            ch = (USHORT)(UCHAR)src[0];
+        } else {
+            ch = ((USHORT *)src)[0];
+        }
+
         switch (ch) {
-        case '"':
+        case L'"':
             if (separator) {
                 done = JNI_TRUE;
                 break;
             }
-            if (prev == '\\') {
+            if (prev == L'\\') {
                 for (i = 1; i < slashes; i += 2) {
-                    *dest++ = prev;
+                    dest += copyCh(prev, dest);
                 }
                 if (slashes % 2 == 1) {
-                    *dest++ = ch;
+                    dest += copyCh(ch, dest);
                 } else {
                     quotes++;
                 }
-            } else if (prev == '"' && quotes % 2 == 0) {
+            } else if (prev == L'"' && quotes % 2 == 0) {
                 quotes++;
-                *dest++ = ch; // emit every other consecutive quote
+                dest += copyCh(ch, dest); // emit every other consecutive quote
             } else if (quotes == 0) {
                 quotes++; // starting quote
             } else {
@@ -94,7 +116,7 @@
             slashes = 0;
             break;
 
-        case '\\':
+        case L'\\':
             slashes++;
             if (separator) {
                 done = JNI_TRUE;
@@ -102,23 +124,23 @@
             }
             break;
 
-        case ' ':
-        case '\t':
-            if (prev == '\\') {
+        case L' ':
+        case L'\t':
+            if (prev == L'\\') {
                 for (i = 0 ; i < slashes; i++) {
-                   *dest++ = prev;
+                    dest += copyCh(prev, dest);
                 }
             }
             if (quotes % 2 == 1) {
-                *dest++ = ch;
+                dest += copyCh(ch, dest);
             } else {
                 separator = JNI_TRUE;
             }
             slashes = 0;
             break;
 
-        case '*':
-        case '?':
+        case L'*':
+        case L'?':
             if (separator) {
                 done = JNI_TRUE;
                 separator = JNI_FALSE;
@@ -127,36 +149,36 @@
             if (quotes % 2 == 0) {
                 *wildcard = JNI_TRUE;
             }
-            if (prev == '\\') {
+            if (prev == L'\\') {
                 for (i = 0 ; i < slashes ; i++) {
-                    *dest++ = prev;
+                    dest += copyCh(prev, dest);
                 }
             }
-            *dest++ = ch;
+            dest += copyCh(ch, dest);
             break;
 
         default:
-            if (prev == '\\') {
+            if (prev == L'\\') {
                 for (i = 0 ; i < slashes ; i++) {
-                   *dest++ = prev;
+                    dest += copyCh(prev, dest);
                 }
-                *dest++ = ch;
+                dest += copyCh(ch, dest);
             } else if (separator) {
                 done = JNI_TRUE;
             } else {
-                *dest++ = ch;
+                dest += copyCh(ch, dest);
             }
             slashes = 0;
         }
 
         if (!done) {
             prev = ch;
-            src++;
+            src += charLength;
         }
     }
-    if (prev == '\\') {
+    if (prev == L'\\') {
         for (i = 0; i < slashes; i++) {
-            *dest++ = prev;
+            dest += copyCh(prev, dest);
         }
     }
     *dest = 0;
--- a/src/windows/classes/sun/awt/windows/WToolkit.java	Fri Apr 18 23:39:11 2014 +0100
+++ b/src/windows/classes/sun/awt/windows/WToolkit.java	Wed Apr 23 15:10:18 2014 +0100
@@ -855,11 +855,7 @@
      * Windows doesn't always send WM_SETTINGCHANGE when it should.
      */
     private void windowsSettingChange() {
-        EventQueue.invokeLater(new Runnable() {
-            public void run() {
-                updateProperties();
-            }
-        });
+        updateProperties();
     }
 
     private synchronized void updateProperties() {
--- a/src/windows/native/sun/windows/awt_Component.cpp	Fri Apr 18 23:39:11 2014 +0100
+++ b/src/windows/native/sun/windows/awt_Component.cpp	Wed Apr 23 15:10:18 2014 +0100
@@ -1719,9 +1719,11 @@
       case WM_IME_SETCONTEXT:
           // lParam is passed as pointer and it can be modified.
           mr = WmImeSetContext(static_cast<BOOL>(wParam), &lParam);
+          CallProxyDefWindowProc(message, wParam, lParam, retValue, mr);
           break;
       case WM_IME_NOTIFY:
           mr = WmImeNotify(wParam, lParam);
+          CallProxyDefWindowProc(message, wParam, lParam, retValue, mr);
           break;
       case WM_IME_STARTCOMPOSITION:
           mr = WmImeStartComposition();
@@ -4066,7 +4068,7 @@
 {
     if (mr != mrConsume)  {
         HWND proxy = GetProxyFocusOwner();
-        if (proxy != NULL) {
+        if (proxy != NULL && ::IsWindowEnabled(proxy)) {
             retVal = ComCtl32Util::GetInstance().DefWindowProc(NULL, proxy, message, wParam, lParam);
             mr = mrConsume;
         }
--- a/src/windows/native/sun/windows/awt_Frame.cpp	Fri Apr 18 23:39:11 2014 +0100
+++ b/src/windows/native/sun/windows/awt_Frame.cpp	Wed Apr 23 15:10:18 2014 +0100
@@ -319,6 +319,8 @@
         case WM_IME_STARTCOMPOSITION:
         case WM_IME_ENDCOMPOSITION:
         case WM_IME_COMPOSITION:
+        case WM_IME_SETCONTEXT:
+        case WM_IME_NOTIFY:
         case WM_IME_CONTROL:
         case WM_IME_COMPOSITIONFULL:
         case WM_IME_SELECT:
--- a/test/ProblemList.txt	Fri Apr 18 23:39:11 2014 +0100
+++ b/test/ProblemList.txt	Wed Apr 23 15:10:18 2014 +0100
@@ -369,15 +369,6 @@
 # 7147060
 com/sun/org/apache/xml/internal/security/transforms/ClassLoaderTest.java        generic-all
 
-# 8000439: NPG: REGRESSION : sun/security/krb5/auto/MaxRetries.java fails with timeout
-sun/security/krb5/auto/MaxRetries.java                          solaris-sparcv9
-
-# 8006690: sun/security/krb5/auto/BadKdc1.java fails intermittently
-sun/security/krb5/auto/BadKdc1.java                             solaris-sparcv9
-sun/security/krb5/auto/BadKdc2.java                             solaris-sparcv9
-sun/security/krb5/auto/BadKdc3.java                             solaris-sparcv9
-sun/security/krb5/auto/BadKdc4.java                             solaris-sparcv9
-
 ############################################################################
 
 # jdk_swing
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/com/sun/nio/sctp/SctpChannel/ReceiveIntoDirect.java	Wed Apr 23 15:10:18 2014 +0100
@@ -0,0 +1,276 @@
+/*
+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * 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 8034181
+ * @summary SIGBUS in SctpChannelImpl receive
+ * @author chegar
+ */
+
+import java.net.InetSocketAddress;
+import java.net.SocketAddress;
+import java.io.IOException;
+import java.nio.ByteBuffer;
+import com.sun.nio.sctp.AbstractNotificationHandler;
+import com.sun.nio.sctp.AssociationChangeNotification;
+import com.sun.nio.sctp.AssociationChangeNotification.AssocChangeEvent;
+import com.sun.nio.sctp.HandlerResult;
+import com.sun.nio.sctp.MessageInfo;
+import com.sun.nio.sctp.Notification;
+import com.sun.nio.sctp.PeerAddressChangeNotification;
+import com.sun.nio.sctp.SctpChannel;
+import com.sun.nio.sctp.SctpServerChannel;
+import com.sun.nio.sctp.ShutdownNotification;
+import static java.lang.System.out;
+import static java.lang.System.err;
+import static java.nio.charset.StandardCharsets.US_ASCII;
+
+public class ReceiveIntoDirect {
+    /* suitably small message to NOT overrun small buffers */
+    final byte[] msgBytes =  "Hello".getBytes(US_ASCII);
+
+    /* number of client connections/combinations (accepted by the server) */
+    final int NUM_CONNECTIONS = 75;
+
+    void test(String[] args) throws IOException {
+        SocketAddress address = null;
+        Server server;
+
+        if (!Util.isSCTPSupported()) {
+            out.println("SCTP protocol is not supported");
+            out.println("Test cannot be run");
+            return;
+        }
+
+        if (args.length == 2) {
+            /* requested to connecct to a specific address */
+            try {
+                int port = Integer.valueOf(args[1]);
+                address = new InetSocketAddress(args[0], port);
+            } catch (NumberFormatException nfe) {
+                err.println(nfe);
+            }
+        } else {
+            /* start server on local machine, default */
+            server = new Server();
+            server.start();
+            address = server.address();
+            debug("Server started and listening on " + address);
+        }
+
+        /* many combinations with varing buffer sizes, and offsets */
+        runWithManyOffsets(address, 20);
+        runWithManyOffsets(address, 49);
+        runWithManyOffsets(address, 50);
+        runWithManyOffsets(address, 51);
+        runWithManyOffsets(address, 1024);
+    }
+
+    void runWithManyOffsets(SocketAddress addr, int bufferSize)
+        throws IOException
+    {
+        doTest(addr, bufferSize, 1);
+        doTest(addr, bufferSize, 2);
+        doTest(addr, bufferSize, 3);
+        doTest(addr, bufferSize, 4);
+        doTest(addr, bufferSize, 5);
+        doTest(addr, bufferSize, 6);
+        doTest(addr, bufferSize, 7);
+        doTest(addr, bufferSize, 8);
+        doTest(addr, bufferSize, 9);
+        doTest(addr, bufferSize, 10);
+        doTest(addr, bufferSize, 11);
+        doTest(addr, bufferSize, 12);
+        doTest(addr, bufferSize, 13);
+        doTest(addr, bufferSize, 14);
+        doTest(addr, bufferSize, 15);
+    }
+
+    void doTest(SocketAddress peerAddress, int bufferSize, int bufferOffset)
+        throws IOException
+    {
+        debug("\n\nTesting with bufferSize " + bufferSize + " and offset " + bufferOffset);
+        assert bufferOffset + msgBytes.length <= bufferSize :
+               "buffer offset + message length greater than buffer size ";
+
+        ByteBuffer buffer = ByteBuffer.allocateDirect(bufferSize);
+        MessageInfo info;
+
+        try (SctpChannel channel = SctpChannel.open()) {
+            channel.connect(peerAddress);
+
+            ReceiveNotificationHandler handler =
+                new ReceiveNotificationHandler();
+
+            /* TEST 1: Assoc/peer change notif into direct buffer with offest */
+            do {
+                debug("Test 1: Assoc/peer change with offset " + bufferOffset);
+                buffer.position(bufferOffset);
+                info = channel.receive(buffer, null, handler);
+                if (info == null) {
+                    fail("unexpected null from receive");
+                    return;
+                }
+            } while (!info.isComplete());
+
+            buffer.flip().position(bufferOffset);
+            check(handler.receivedCommUp(), "SCTP_COMM_UP not received");
+            check(info != null, "info is null");
+            check(info.address() != null, "address is null");
+            check(info.association() != null, "association is null");
+            check(info.isComplete(), "message is not complete");
+            check(info.isUnordered() != true,
+                  "message should not be unordered");
+            check(info.streamNumber() >= 0, "invalid stream number");
+            check(info.bytes() == msgBytes.length,
+                  "bytes received not equal to message length");
+            check(info.bytes() == buffer.remaining(), "bytes != remaining");
+            check(Util.compare(buffer, msgBytes),
+                  "received message not the same as sent message");
+
+            /* TEST 2: shutdown notification with offset */
+            debug("Test 2: shutdown notif with offset " + bufferOffset);
+            buffer.clear().position(bufferOffset);
+            while ((info = channel.receive(buffer, null, handler )) != null &&
+                    info.bytes() != -1 );
+        }
+    }
+
+    class Server implements Runnable
+    {
+        private final InetSocketAddress serverAddr;
+        private final SctpServerChannel ssc;
+
+        public Server() throws IOException {
+            ssc = SctpServerChannel.open().bind(null);
+            java.util.Set<SocketAddress> addrs = ssc.getAllLocalAddresses();
+            if (addrs.isEmpty())
+                debug("addrs should not be empty");
+
+            serverAddr = (InetSocketAddress) addrs.iterator().next();
+        }
+
+        public void start() {
+            (new Thread(this, "Server-"  + serverAddr.getPort())).start();
+        }
+
+        public InetSocketAddress address() {
+            return serverAddr;
+        }
+
+        @Override
+        public void run() {
+            try {
+                for (int i=0; i<NUM_CONNECTIONS; i++) {
+                    SctpChannel sc = ssc.accept();
+
+                    /* send a small message */
+                    MessageInfo info = MessageInfo.createOutgoing(null, 0);
+                    ByteBuffer buf = ByteBuffer.allocateDirect(Util.SMALL_BUFFER);
+                    buf.put(msgBytes);
+                    buf.flip();
+
+                    debug("sending small message: " + buf);
+                    sc.send(buf, info);
+
+                    sc.shutdown();
+                    sc.close();
+                }
+            } catch (IOException x) {
+                unexpected(x);
+            } finally {
+                try { ssc.close(); }
+                catch (IOException x) { unexpected(x); }
+            }
+        }
+    }
+
+    class ReceiveNotificationHandler extends AbstractNotificationHandler<Object>
+    {
+        boolean receivedCommUp;  // false
+
+        public ReceiveNotificationHandler() { }
+
+        public boolean receivedCommUp() {
+            return receivedCommUp;
+        }
+
+        @Override
+        public HandlerResult handleNotification(
+                Notification notification, Object attachment) {
+            fail("Unknown notification type");
+            return HandlerResult.CONTINUE;
+        }
+
+        @Override
+        public HandlerResult handleNotification(
+                AssociationChangeNotification notification, Object attachment) {
+            AssocChangeEvent event = notification.event();
+            debug("AssociationChangeNotification");
+            debug("  Association: " + notification.association());
+            debug("  Event: " + event);
+
+            if (event.equals(AssocChangeEvent.COMM_UP))
+                receivedCommUp = true;
+
+            return HandlerResult.CONTINUE;
+        }
+
+        @Override
+        public HandlerResult handleNotification(
+                PeerAddressChangeNotification pacn, Object unused)
+        {
+            debug("PeerAddressChangeNotification: " +  pacn);
+            return HandlerResult.CONTINUE;
+        }
+
+        @Override
+        public HandlerResult handleNotification(
+                ShutdownNotification notification, Object attachment) {
+            debug("ShutdownNotification");
+            debug("  Association: " + notification.association());
+            return HandlerResult.CONTINUE;
+        }
+    }
+        //--------------------- Infrastructure ---------------------------
+    boolean debug = true;
+    volatile int passed = 0, failed = 0;
+    void pass() {passed++;}
+    void fail() {failed++; Thread.dumpStack();}
+    void fail(String msg) {System.err.println(msg); fail();}
+    void unexpected(Throwable t) {failed++; t.printStackTrace();}
+    void check(boolean cond) {if (cond) pass(); else fail();}
+    void check(boolean cond, String failMessage) {if (cond) pass(); else fail(failMessage);}
+    void debug(String message) {if(debug) {
+          System.out.println(Thread.currentThread() + " " + message); } }
+    public static void main(String[] args) throws Throwable {
+        Class<?> k = new Object(){}.getClass().getEnclosingClass();
+        try {k.getMethod("instanceMain",String[].class)
+                .invoke( k.newInstance(), (Object) args);}
+        catch (Throwable e) {throw e.getCause();}}
+    public void instanceMain(String[] args) throws Throwable {
+        try {test(args);} catch (Throwable t) {unexpected(t);}
+        System.out.printf("%nPassed = %d, failed = %d%n%n", passed, failed);
+        if (failed > 0) throw new AssertionError("Some tests failed");}
+
+}
--- a/test/java/awt/FileDialog/SaveFileNameOverrideTest/SaveFileNameOverrideTest.java	Fri Apr 18 23:39:11 2014 +0100
+++ b/test/java/awt/FileDialog/SaveFileNameOverrideTest/SaveFileNameOverrideTest.java	Wed Apr 23 15:10:18 2014 +0100
@@ -1,6 +1,29 @@
+/*
+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * 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 6998877
+  @bug 6998877 8022531
   @summary After double-click on the folder names, FileNameOverrideTest FAILED
   @author Sergey.Bylokhov@oracle.com area=awt.filedialog
   @library ../../regtesthelpers
@@ -36,7 +59,8 @@
 
         String[] instructions = {
                 "1) Click on 'Show File Dialog' button. A file dialog will come up.",
-                "2) Double-click on '" + clickDirName + "' and click OK.",
+                "2) Double-click on '" + clickDirName + "' and click a confirmation",
+                "   button, it can be 'OK', 'Save' or any other platform-dependent name.",
                 "3) See result of the test below"
         };
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/awt/Focus/8013611/JDK8013611.java	Wed Apr 23 15:10:18 2014 +0100
@@ -0,0 +1,111 @@
+/*
+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * 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      8013611
+  @summary  Tests showing a modal dialog with requesting focus in frame.
+  @author   Anton.Tarasov: area=awt.focus
+  @library  ../../regtesthelpers
+  @build    Util
+  @run      main JDK8013611
+*/
+
+import java.awt.*;
+import java.awt.event.*;
+import javax.swing.*;
+import test.java.awt.regtesthelpers.Util;
+
+import java.awt.*;
+
+public class JDK8013611 extends JFrame {
+    static JTextField textField = new JTextField("text");
+    static JButton button1 = new JButton("button1");
+    static JButton button2 = new JButton("button2");
+    static Robot robot;
+
+    static JDialog dialog;
+    static JButton button3 = new JButton("button3");
+
+    public static void main(String[] args) {
+        robot = Util.createRobot();
+
+        JDK8013611 frame = new JDK8013611();
+        frame.setLayout(new FlowLayout());
+        frame.add(textField);
+        frame.add(button1);
+        frame.add(button2);
+        frame.pack();
+
+        dialog = new JDialog(frame, true);
+        dialog.add(button3);
+        dialog.pack();
+
+        textField.addFocusListener(new FocusAdapter() {
+            @Override
+            public void focusLost(FocusEvent e) {
+                dialog.setVisible(true);
+            }
+        });
+
+        button1.addFocusListener(new FocusAdapter() {
+            @Override
+            public void focusGained(FocusEvent e) {
+                button2.requestFocusInWindow();
+            }
+        });
+
+        frame.setVisible(true);
+
+        frame.test();
+    }
+
+    public void test() {
+        if (!testFocused(textField)) {
+            Util.clickOnComp(textField, robot);
+            if (!testFocused(textField)) {
+                throw new RuntimeException("Error: couldn't focus " + textField);
+            }
+        }
+
+        robot.keyPress(KeyEvent.VK_TAB);
+        robot.delay(50);
+        robot.keyRelease(KeyEvent.VK_TAB);
+
+        if (!testFocused(button3)) {
+            throw new RuntimeException("Test failed: dialog didn't get focus!");
+        }
+
+        System.out.println("Test passed.");
+    }
+
+    boolean testFocused(Component c) {
+        for (int i=0; i<10; i++) {
+            if (KeyboardFocusManager.getCurrentKeyboardFocusManager().getFocusOwner() == c) {
+                return true;
+            }
+            Util.waitForIdle(robot);
+        }
+        return false;
+    }
+}
--- a/test/java/awt/Frame/7024749/bug7024749.java	Fri Apr 18 23:39:11 2014 +0100
+++ b/test/java/awt/Frame/7024749/bug7024749.java	Wed Apr 23 15:10:18 2014 +0100
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug 7024749 7184326
+ * @bug 7024749 7184326 8019990
  * @summary JDK7 b131---a crash in: Java_sun_awt_windows_ThemeReader_isGetThemeTransitionDurationDefined+0x75
  * @library ../../regtesthelpers
  * @build Util
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/awt/Toolkit/ToolkitPropertyTest/NoAppContextTest.java	Wed Apr 23 15:10:18 2014 +0100
@@ -0,0 +1,198 @@
+/*
+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * 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 8032960
+ * @summary checks that desktop properties work if Toolkit thread has no AppContext
+ * @author Petr Pchelko
+ */
+
+import sun.awt.OSInfo;
+import sun.awt.SunToolkit;
+
+import javax.swing.*;
+import java.awt.*;
+import java.beans.PropertyChangeEvent;
+import java.beans.PropertyChangeListener;
+import java.util.concurrent.atomic.AtomicBoolean;
+import java.util.concurrent.atomic.AtomicReference;
+
+public class NoAppContextTest {
+
+    private static final ThreadGroup stubGroup = new ThreadGroup("stub");
+    private static final ThreadGroup awtGroup = new ThreadGroup("AWT");
+    private static final AtomicBoolean propertyChangeFired = new AtomicBoolean(false);
+    private static Frame frame;
+
+    private static final Object LOCK = new Object();
+
+    public static void main(String[] args) throws Exception {
+
+        if (OSInfo.getOSType() != OSInfo.OSType.WINDOWS) {
+            // The test is for Windows platform only
+            return;
+        }
+
+        createStubContext();
+
+        Thread awtThread = new Thread(awtGroup, new Runnable() {
+            @Override
+            public void run() {
+                SunToolkit.createNewAppContext();
+                SwingUtilities.invokeLater(new Runnable() {
+                    @Override
+                    public void run() {
+                        synchronized (LOCK) {
+                            frame = new Frame();
+                            frame.setBounds(100, 100, 100, 100);
+                            frame.setVisible(true);
+                            Toolkit.getDefaultToolkit().addPropertyChangeListener("win.propNames", new PropertyChangeListener() {
+                                @Override
+                                public void propertyChange(PropertyChangeEvent ev) {
+                                    propertyChangeFired.set(true);
+                                }
+                            });
+                        }
+                    }
+                });
+            }
+        });
+        awtThread.start();
+        awtThread.join();
+        sync();
+
+        final GraphicsDevice device = GraphicsEnvironment.getLocalGraphicsEnvironment()
+                .getDefaultScreenDevice();
+
+        final AtomicReference<DisplayMode> originalRef = new AtomicReference<>();
+        try {
+            final AtomicBoolean isSupported = new AtomicBoolean(true);
+            invokeInAWT(new Runnable() {
+                @Override
+                public void run() {
+                    if (device.isFullScreenSupported()) {
+                        device.setFullScreenWindow(frame);
+                    } else {
+                        isSupported.set(false);
+                    }
+                }
+            });
+            if (!isSupported.get()) {
+                return;
+            }
+            invokeInAWT(new Runnable() {
+                @Override
+                public void run() {
+                    if (device.isDisplayChangeSupported()) {
+                        DisplayMode original = device.getDisplayMode();
+                        originalRef.set(original);
+                        try {
+                            DisplayMode[] modes = device.getDisplayModes();
+                            for (DisplayMode mode : modes) {
+                                if (!mode.equals(original)) {
+                                    device.setDisplayMode(mode);
+                                    break;
+                                }
+                            }
+                        } finally {
+                            device.setDisplayMode(original);
+                        }
+                    } else {
+                        isSupported.set(false);
+                    }
+                }
+            });
+            if (!isSupported.get()) {
+                return;
+            }
+        } finally {
+            invokeInAWT(new Runnable() {
+                @Override
+                public void run() {
+                    device.setDisplayMode(originalRef.get());
+                    frame.dispose();
+                }
+            });
+        }
+
+        if (!propertyChangeFired.get()) {
+            throw new RuntimeException("Failed: PropertyChange did not fire");
+        }
+    }
+
+    private static void invokeInAWT(final Runnable r) throws InterruptedException {
+        Thread awtThread = new Thread(awtGroup, new Runnable() {
+            @Override
+            public void run() {
+                SwingUtilities.invokeLater(new Runnable() {
+                    @Override
+                    public void run() {
+                        synchronized (LOCK) {
+                            r.run();
+                        }
+                    }
+                });
+            }
+        });
+        awtThread.start();
+        awtThread.join();
+        sync();
+    }
+
+    private static void createStubContext() throws InterruptedException {
+        Thread stub = new Thread(stubGroup, new Runnable() {
+            @Override
+            public void run() {
+                SunToolkit.createNewAppContext();
+            }
+        });
+        stub.start();
+        stub.join();
+    }
+
+    /**
+     * Runs realSync on a thread with an AppContext and waits for it to finish
+     */
+    private static void sync() throws InterruptedException {
+        final AtomicReference<InterruptedException> exc = new AtomicReference<>(null);
+
+        Thread syncThread = new Thread(awtGroup, new Runnable() {
+            @Override
+            public void run() {
+                try {
+                    ((SunToolkit) Toolkit.getDefaultToolkit()).realSync();
+                    Thread.sleep(2000);
+                } catch (InterruptedException e) {
+                    exc.set(e);
+                }
+            }
+        });
+        syncThread.start();
+        syncThread.join();
+        if (exc.get() != null) {
+            throw exc.get();
+        }
+    }
+}
+
--- a/test/java/awt/event/KeyEvent/SwallowKeyEvents/SwallowKeyEvents.java	Fri Apr 18 23:39:11 2014 +0100
+++ b/test/java/awt/event/KeyEvent/SwallowKeyEvents/SwallowKeyEvents.java	Wed Apr 23 15:10:18 2014 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -23,7 +23,7 @@
 
 /*
   @test
-  @bug       7154072
+  @bug       7154072 7161320
   @summary   Tests that key events with modifiers are not swallowed.
   @author    anton.tarasov: area=awt.focus
   @library   ../../../regtesthelpers
@@ -49,6 +49,11 @@
     static Robot r;
 
     public static void main(String[] args) {
+        if (sun.awt.OSInfo.getOSType() == sun.awt.OSInfo.OSType.WINDOWS) {
+            System.out.println("Skipped. Test not for MS Windows.");
+            return;
+        }
+
         f.add(t);
         f.pack();
         f.setVisible(true);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/lang/ProcessBuilder/CloseRace.java	Wed Apr 23 15:10:18 2014 +0100
@@ -0,0 +1,182 @@
+/*
+ * Copyright (c) 2013, 2014 Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * 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 8024521
+ * @summary Closing ProcessPipeInputStream at the time the process exits is racy
+ *          and leads to data corruption. Run this test manually (as
+ *          an ordinary java program) with  -Xmx8M  to repro bug 8024521.
+ * @run main/othervm -Xmx8M -Dtest.duration=2 CloseRace
+ */
+
+import java.io.*;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.CountDownLatch;
+
+public class CloseRace {
+    private static final String BIG_FILE = "bigfile";
+
+    private static final int[] procFDs = new int[6];
+
+    /** default value sufficient to repro bug 8024521. */
+    private static final int testDurationSeconds
+        = Integer.getInteger("test.duration", 600);
+
+    private static final CountDownLatch threadsStarted
+        = new CountDownLatch(2);
+
+    static boolean fdInUse(int i) {
+        return new File("/proc/self/fd/" + i).exists();
+    }
+
+    static boolean[] procFDsInUse() {
+        boolean[] inUse = new boolean[procFDs.length];
+        for (int i = 0; i < procFDs.length; i++)
+            inUse[i] = fdInUse(procFDs[i]);
+        return inUse;
+    }
+
+    static int count(boolean[] bits) {
+        int count = 0;
+        for (int i = 0; i < bits.length; i++)
+            count += bits[i] ? 1 : 0;
+        return count;
+    }
+
+    static void dumpAllStacks() {
+        System.err.println("Start of dump");
+        final Map<Thread, StackTraceElement[]> allStackTraces
+                = Thread.getAllStackTraces();
+        for (Thread thread : allStackTraces.keySet()) {
+            System.err.println("Thread " + thread.getName());
+            for (StackTraceElement element : allStackTraces.get(thread))
+                System.err.println("\t" + element);
+        }
+        System.err.println("End of dump");
+    }
+
+    public static void main(String args[]) throws Exception {
+        if (!(new File("/proc/self/fd").isDirectory()))
+            return;
+
+        // Catch Errors from process reaper
+        Thread.setDefaultUncaughtExceptionHandler(
+                new Thread.UncaughtExceptionHandler() {
+                    @Override
+                    public void uncaughtException(Thread t, Throwable e) {
+                        e.printStackTrace();
+                        System.exit(1);
+                    }
+                });
+
+        try (RandomAccessFile f = new RandomAccessFile(BIG_FILE, "rw")) {
+            f.setLength(Runtime.getRuntime().maxMemory()); // provoke OOME
+        }
+
+        for (int i = 0, j = 0; j < procFDs.length; i++)
+            if (!fdInUse(i))
+                procFDs[j++] = i;
+
+        Thread[] threads = {
+            new Thread(new OpenLoop()),
+            new Thread(new ExecLoop()),
+        };
+        for (Thread thread : threads)
+            thread.start();
+
+        threadsStarted.await();
+        Thread.sleep(testDurationSeconds * 1000);
+
+        for (Thread thread : threads)
+            thread.interrupt();
+        for (Thread thread : threads) {
+            thread.join(10_000);
+            if (thread.isAlive()) {
+                dumpAllStacks();
+                throw new Error("At least one child thread ("
+                        + thread.getName()
+                        + ") failed to finish gracefully");
+            }
+        }
+    }
+
+    static class OpenLoop implements Runnable {
+        public void run() {
+            threadsStarted.countDown();
+            while (!Thread.interrupted()) {
+                try {
+                    // wait for ExecLoop to finish creating process
+                    do {
+                        if (Thread.interrupted())
+                            return;
+                    } while (count(procFDsInUse()) != 3);
+                    List<InputStream> iss = new ArrayList<>(4);
+
+                    // eat up three "holes" (closed ends of pipe fd pairs)
+                    for (int i = 0; i < 3; i++)
+                        iss.add(new FileInputStream(BIG_FILE));
+                    do {
+                        if (Thread.interrupted())
+                            return;
+                    } while (count(procFDsInUse()) == procFDs.length);
+                    // hopefully this will racily occupy empty fd slot
+                    iss.add(new FileInputStream(BIG_FILE));
+                    Thread.sleep(1); // Widen race window
+                    for (InputStream is : iss)
+                        is.close();
+                } catch (InterruptedException e) {
+                    break;
+                } catch (Exception e) {
+                    throw new Error(e);
+                }
+            }
+        }
+    }
+
+    static class ExecLoop implements Runnable {
+        public void run() {
+            threadsStarted.countDown();
+            ProcessBuilder builder = new ProcessBuilder("/bin/true");
+            while (!Thread.interrupted()) {
+                try {
+                    // wait for OpenLoop to finish
+                    do {
+                        if (Thread.interrupted())
+                            return;
+                    } while (count(procFDsInUse()) > 0);
+                    Process process = builder.start();
+                    InputStream is = process.getInputStream();
+                    process.waitFor();
+                    is.close();
+                } catch (InterruptedException e) {
+                    break;
+                } catch (Exception e) {
+                    throw new Error(e);
+                }
+            }
+        }
+    }
+}
--- a/test/java/lang/Runtime/exec/CloseRace.java	Fri Apr 18 23:39:11 2014 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,146 +0,0 @@
-/*
- * 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 8024521
- * @summary Closing ProcessPipeInputStream at the time the process exits is racy
- *          and leads to the data corruption.
- * @library /lib/testlibrary
- * @run main/othervm/timeout=80 CloseRace
- */
-
-/**
- * This test has a little chance to catch the race during the given default
- * time gap of 20 seconds. To increase the time gap, set the system property
- * CloseRaceTimeGap=N to the number of seconds.
- * Jtreg's timeoutFactor should also be set appropriately.
- *
- * For example, to run the test for 10 minutes:
- * > jtreg \
- *       -testjdk:$(PATH_TO_TESTED_JDK) \
- *       -timeoutFactor:10 \
- *       -DCloseRaceTimeGap=600 \
- *       $(PATH_TO_TESTED_JDK_SOURCE)/test/java/lang/Runtime/exec/CloseRace.java
- */
-
-import java.io.*;
-import java.nio.file.Files;
-import java.nio.file.Path;
-import java.nio.file.Paths;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.LinkedList;
-import java.util.List;
-import jdk.testlibrary.OutputAnalyzer;
-import static jdk.testlibrary.ProcessTools.*;
-
-public class CloseRace {
-
-    public static void main(String args[]) throws Exception {
-        ProcessBuilder pb = createJavaProcessBuilder("-Xmx64M", "CloseRace$Child",
-                System.getProperty("CloseRaceTimeGap", "20"));
-        OutputAnalyzer oa = new OutputAnalyzer(pb.start());
-        oa.stderrShouldNotContain("java.lang.OutOfMemoryError");
-    }
-
-    public static class Child {
-        private static final String BIG_FILE = "bigfile";
-        private static final String SMALL_FILE = "smallfile";
-        private static int timeGap = 20; // seconds
-
-        public static void main(String args[]) throws Exception {
-            if (args.length > 0) {
-                try {
-                    timeGap = Integer.parseInt(args[0]);
-                    timeGap = Math.max(timeGap, 10);
-                    timeGap = Math.min(timeGap, 10 * 60 * 60); // no more than 10 hours
-                } catch (NumberFormatException ignore) {}
-            }
-            try (RandomAccessFile f = new RandomAccessFile(BIG_FILE, "rw")) {
-                f.setLength(1024 * 1024 * 1024); // 1 Gb, greater than max heap size
-            }
-            try (FileOutputStream fs = new FileOutputStream(SMALL_FILE);
-                 PrintStream ps = new PrintStream(fs)) {
-                for (int i = 0; i < 128; ++i)
-                    ps.println("line of text");
-            }
-
-            List<Thread> threads = new LinkedList<>();
-            for (int i = 0; i < 99; ++i) {
-                Thread t = new Thread (new OpenLoop());
-                t.start();
-                threads.add(t);
-            }
-            Thread t2 = new Thread (new ExecLoop());
-            t2.start();
-            threads.add(t2);
-
-            Thread.sleep(timeGap);
-
-            for (Thread t : threads) {
-                t.interrupt();
-                t.join();
-            }
-        }
-
-        private static class OpenLoop implements Runnable {
-            public void run() {
-                final Path bigFilePath = Paths.get(BIG_FILE);
-                while (!Thread.interrupted()) {
-                    try (InputStream in = Files.newInputStream(bigFilePath)) {
-                        // Widen the race window by sleeping 1ms
-                        Thread.sleep(1);
-                    } catch (InterruptedException e) {
-                        break;
-                    } catch (Exception e) {
-                        System.err.println(e);
-                    }
-                }
-            }
-        }
-
-        private static class ExecLoop implements Runnable {
-            public void run() {
-                List<String> command = new ArrayList<>(
-                        Arrays.asList("/bin/cat", SMALL_FILE));
-                while (!Thread.interrupted()) {
-                    try {
-                        ProcessBuilder builder = new ProcessBuilder(command);
-                        final Process process = builder.start();
-                        InputStream is = process.getInputStream();
-                        InputStreamReader isr = new InputStreamReader(is);
-                        BufferedReader br = new BufferedReader(isr);
-                        while (br.readLine() != null) {}
-                        process.waitFor();
-                        isr.close();
-                    } catch (InterruptedException e) {
-                        break;
-                    } catch (Exception e) {
-                        System.err.println(e);
-                    }
-                }
-            }
-        }
-    }
-}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/lang/instrument/DaemonThread/DummyAgent.java	Wed Apr 23 15:10:18 2014 +0100
@@ -0,0 +1,46 @@
+/*
+ * Copyright 2014 Goldman Sachs.
+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * 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.lang.instrument.ClassFileTransformer;
+import java.lang.instrument.IllegalClassFormatException;
+import java.lang.instrument.Instrumentation;
+import java.security.ProtectionDomain;
+
+public class DummyAgent implements ClassFileTransformer {
+    @Override
+    public byte[] transform(ClassLoader loader, String className,
+                            Class<?> classBeingRedefined, ProtectionDomain protectionDomain,
+                            byte[] classfileBuffer) throws IllegalClassFormatException {
+
+        /* The Daemon Thread bug is timing dependent and you want the transform method
+         * to return ASAP - so just return the buffer will be fine
+         */
+        return classfileBuffer;
+    }
+
+    public static void premain(String agentArgs, Instrumentation inst) {
+        inst.addTransformer(new DummyAgent(), false);
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/lang/instrument/DaemonThread/DummyClass.java	Wed Apr 23 15:10:18 2014 +0100
@@ -0,0 +1,27 @@
+/*
+ * Copyright 2014 Goldman Sachs.
+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * 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.
+ */
+
+/* Just a dummy class for loading */
+public class DummyClass {
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/lang/instrument/DaemonThread/TestDaemonThread.java	Wed Apr 23 15:10:18 2014 +0100
@@ -0,0 +1,72 @@
+/*
+ * Copyright 2014 Goldman Sachs.
+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * 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 7142035
+ * @summary Assert in java.lang.instrument agents during shutdown when classloading occurs after shutdown
+ * @library /lib/testlibrary
+ *
+ * @build DummyAgent DummyClass TestDaemonThreadLauncher TestDaemonThread
+ * @run shell ../MakeJAR3.sh DummyAgent
+ * @run main TestDaemonThreadLauncher /timeout=240
+ *
+ */
+import java.io.File;
+import java.net.URL;
+import java.net.URLClassLoader;
+
+public class TestDaemonThread implements Runnable{
+    File classpath;
+
+    public TestDaemonThread(File classpath) {
+        this.classpath = classpath;
+    }
+
+    @Override
+    public void run() {
+
+
+        try {
+            URL u = this.getClass().getClassLoader().getResource("DummyClass.class");
+            String path = u.getPath();
+            String parent = u.getPath().substring(0, path.lastIndexOf('/')+1);
+            URL parentURL = new URL(u, parent);
+            System.out.println(parentURL);
+            /* Load lots of class by creating multiple classloaders */
+            for(;;) {
+                ClassLoader cl = new URLClassLoader(new URL[] {parentURL}, null);
+                cl.loadClass("DummyClass");
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+    }
+
+    public static void main(String[] args) throws Exception {
+           Thread t = new Thread(new TestDaemonThread(new File(args[0])));
+           /* The important part of the bug is that a Daemon thread can continue to load classes after shutdown */
+           t.setDaemon(true);
+           t.start();
+           Thread.sleep(200);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/lang/instrument/DaemonThread/TestDaemonThreadLauncher.java	Wed Apr 23 15:10:18 2014 +0100
@@ -0,0 +1,44 @@
+/*
+ * Copyright 2014 Goldman Sachs.
+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * 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 jdk.testlibrary.JDKToolLauncher;
+import jdk.testlibrary.OutputAnalyzer;
+import jdk.testlibrary.ProcessTools;
+
+import java.io.IOException;
+import java.nio.file.Path;
+
+public class TestDaemonThreadLauncher {
+
+    private static ProcessBuilder processBuilder = new ProcessBuilder();
+
+    public static void main(String args[]) throws Exception {
+        for(int i=0; i<50; i++) {
+            ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-javaagent:DummyAgent.jar", "TestDaemonThread", ".");
+            OutputAnalyzer analyzer = new OutputAnalyzer(pb.start());
+            analyzer.shouldNotContain("ASSERTION FAILED");
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/javax/swing/JComboBox/8032878/bug8032878.java	Wed Apr 23 15:10:18 2014 +0100
@@ -0,0 +1,136 @@
+/*
+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * 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 8032878
+ * @summary Checks that JComboBox as JTable cell editor processes key events
+ *          even where setSurrendersFocusOnKeystroke flag in JTable is false and
+ *          that it does not lose the first key press where the flag is true.
+ * @library ../../regtesthelpers
+ * @build Util
+ * @author Alexey Ivanov
+ */
+
+import java.awt.*;
+import java.awt.event.KeyEvent;
+import javax.swing.*;
+import javax.swing.text.JTextComponent;
+
+import sun.awt.SunToolkit;
+
+public class bug8032878 implements Runnable {
+    private static final String ONE = "one";
+    private static final String TWO = "two";
+    private static final String THREE = "three";
+
+    private static final String EXPECTED = "one123";
+
+    private final Robot robot;
+
+    private JFrame frame;
+    private JComboBox cb;
+
+    private volatile boolean surrender;
+    private volatile String text;
+
+    public static void main(String[] args) throws Exception {
+        final bug8032878 test = new bug8032878();
+
+        test.test(false);
+        test.test(true);
+    }
+
+    public bug8032878() throws AWTException {
+        robot = new Robot();
+        robot.setAutoDelay(100);
+    }
+
+    private void setupUI() {
+        frame = new JFrame();
+        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
+
+        JTable table = new JTable(new String[][] {{ONE}, {TWO}, {THREE}},
+                                  new String[] { "#"});
+        table.setSurrendersFocusOnKeystroke(surrender);
+
+        cb = new JComboBox(new String[]{ONE, TWO, THREE});
+        cb.setEditable(true);
+        DefaultCellEditor comboEditor = new DefaultCellEditor(cb);
+        comboEditor.setClickCountToStart(1);
+        table.getColumnModel().getColumn(0).setCellEditor(comboEditor);
+        frame.add(table);
+
+        frame.pack();
+        frame.setVisible(true);
+    }
+
+    private void test(final boolean flag) throws Exception {
+        try {
+            surrender = flag;
+            SwingUtilities.invokeAndWait(this);
+
+            runTest();
+            checkResult();
+        } finally {
+            if (frame != null) {
+                frame.dispose();
+            }
+        }
+    }
+
+    private void runTest() throws Exception {
+        realSync();
+        // Select 'one'
+        Util.hitKeys(robot, KeyEvent.VK_TAB);
+        realSync();
+        Util.hitKeys(robot, KeyEvent.VK_1);
+        Util.hitKeys(robot, KeyEvent.VK_2);
+        Util.hitKeys(robot, KeyEvent.VK_3);
+        Util.hitKeys(robot, KeyEvent.VK_ENTER);
+        realSync();
+    }
+
+    private void checkResult() throws Exception {
+        SwingUtilities.invokeAndWait(new Runnable() {
+            public void run() {
+                text = ((JTextComponent) cb.getEditor().getEditorComponent()).getText();
+            }
+        });
+        if (text.equals(EXPECTED)) {
+            System.out.println("Test with surrender = " + surrender + " passed");
+        } else {
+            System.out.println("Test with surrender = " + surrender + " failed");
+            throw new RuntimeException("Expected value in JComboBox editor '" +
+                    EXPECTED + "' but found '" + text + "'.");
+        }
+    }
+
+    private static void realSync() {
+        ((SunToolkit) (Toolkit.getDefaultToolkit())).realSync();
+    }
+
+    @Override
+    public void run() {
+        setupUI();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/javax/swing/text/GlyphView/4984669/bug4984669.html	Wed Apr 23 15:10:18 2014 +0100
@@ -0,0 +1,30 @@
+<html>
+<!--
+  Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+  DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ 
+  This code is free software; you can redistribute it and/or modify it
+  under the terms of the GNU General Public License version 2 only, as
+  published by the Free Software Foundation.
+ 
+  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.
+-->
+<body>
+<applet  code="bug4984669.class" width=300 height=300></applet>
+The four lines printed above in a bold typeface should all be underlined.
+It is a bug if any of these lines is underlined only partially.
+The very first line should not be underlined at all.
+</body>
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/javax/swing/text/GlyphView/4984669/bug4984669.java	Wed Apr 23 15:10:18 2014 +0100
@@ -0,0 +1,55 @@
+/*
+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * 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 4984669 8002148
+   @summary Tests HTML underlining
+   @author Peter Zhelezniakov
+   @run applet/manual=yesno bug4984669.html
+*/
+import javax.swing.*;
+import javax.swing.text.*;
+
+public class bug4984669 extends JApplet
+{
+    public void init() {
+        JEditorPane pane = new JEditorPane();
+        this.getContentPane().add(new JScrollPane(pane));
+        pane.setEditorKit(new StyledEditorKit());
+
+        try {
+            pane.getDocument().insertString(0,"12   \n",null);
+            MutableAttributeSet attrs = new SimpleAttributeSet();
+
+            StyleConstants.setFontSize(attrs, 36);
+            StyleConstants.setBold(attrs, true);
+            StyleConstants.setUnderline(attrs, true);
+            pane.getDocument().insertString(6, "aa\n", attrs);
+            pane.getDocument().insertString(9, "bbb\n", attrs);
+            pane.getDocument().insertString(13, "cccc\n", attrs);
+            pane.getDocument().insertString(18, "ddddd\n", attrs);
+        } catch (Exception e) {
+            throw new Error("Failed: Unexpected Exception", e);
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/javax/xml/jaxp/parsers/8027359/XML11EntityScannerTest.java	Wed Apr 23 15:10:18 2014 +0100
@@ -0,0 +1,184 @@
+/*
+ * 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 8027359
+ * @summary test that the XML11EntityScanner refreshes cache when it loads new data
+ * @run main XML11EntityScannerTest
+ */
+
+import java.io.*;
+import java.util.regex.Pattern;
+import javax.xml.parsers.DocumentBuilderFactory;
+import org.w3c.dom.*;
+
+
+/**
+ * XML11EntityScanner functions similarly as XMLEntityScanner in handling data
+ * cache
+ */
+public class XML11EntityScannerTest {
+    static final String rawXML =
+            "<?xml version=\"1.1\" encoding=\"UTF-8\" standalone=\"no\"?>"
+            + "<WebOfTrustRC2 Version=\"4004\">"
+            + "<Identity Name=\"maggot\" PublishesTrustList=\"true\" Version=\"1\">"
+            + "<Context Name=\"Introduction\"/>"
+            + "<Context Name=\"FreetalkRC2\"/>"
+            + "<Property Name=\"IntroductionPuzzleCount\" Value=\"10\"/>"
+            + "<TrustList>"
+            + "<Trust Comment=\"\" Identity=\"USK@fdZ2In5mnLVG6RTc5hq9P~M1EG0WuH-itZ7mnQx2iuM,aUG-57VqxQLhQ4N1uNmH9kSI2syEfVFrVOIPAKTY2Yg,AQACAAE/WebOfTrustRC2/5\" Value=\"100\"/>"
+            + "<Trust Comment=\"\" Identity=\"USK@YwwRkHSo-xU8CvSFcLqlU2FFsQ3ztjr0X~xPXkX-klY,poB3tdcXrBU9naI0pyNVYp~zQmHaFkRRTj8xB8tuiPc,AQACAAE/WebOfTrustRC2/7\" Value=\"100\"/>"
+            + "<Trust Comment=\"\" Identity=\"USK@lsd~~79wrGvfb99FnAEY4VhJg2b5KFUloCOUff-Q2fk,71eV-F580euOtaCgim69Yw~2Rjh43DT49sl6zNamjk0,AQACAAE/WebOfTrustRC2/47\" Value=\"100\"/>"
+            + "<Trust Comment=\"Automatically assigned trust to a seed identity.\" Identity=\"USK@xyzElfFQnwBb4ZuSEh1aSNsbRjEGCTa-2rcjeW58A4E,TiYrXSCcoGETPf0TWLNthaimJEP1PW7nJ2tYXKxdC4s,AQACAAE/WebOfTrustRC2/456\" Value=\"100\"/>"
+            + "<Trust Comment=\"\" Identity=\"USK@pTtYoCsMO-~~2Grqya6Y7cf7nIU3VlL4168-c6EIwA8,QabBgrH1LYKKyBROnWz1r6iI8N7WFTt-mKD-0Qxsw1w,AQACAAE/WebOfTrustRC2/133\" Value=\"100\"/>"
+            + "<Trust Comment=\"\" Identity=\"USK@m~lDSvnetPNy77wsoxDZDUf7OkgX6ZAd7ob9orm3J4Y,SEX20g148KGJg3bsxvXNPNbUsVs1yQ5LfVUOGMh~1Q0,AQACAAE/WebOfTrustRC2/7\" Value=\"100\"/>"
+            + "<Trust Comment=\"\" Identity=\"USK@ss5yQit~bQL5easM68d4sImnPAxHNUbi99XtDMhpzgQ,CnpuD8dO29KvpkQyxtz1llAxHCB7yXfqrQLNRIELZow,AQACAAE/WebOfTrustRC2/2\" Value=\"100\"/>"
+            + "<Trust Comment=\"\" Identity=\"USK@krPcyGts~~wZTbABTAJ59nSplmum2~EkSD5IzinrFko,7YEbm-YEx1LFoZVHtGmIa5q0KbEjw48Rgwx2NqwrH~o,AQACAAE/WebOfTrustRC2/15\" Value=\"100\"/>"
+            + "<Trust Comment=\"\" Identity=\"USK@Usl-yNWc3VtuQWQ9srowZaWyfB6MiD9fzM5WexrlKE8,qMS83aGFsN~aFGajUmGrnbXvRIYZMd8N8IjnGmEvi-s,AQACAAE/WebOfTrustRC2/68\" Value=\"100\"/>"
+            + "<Trust Comment=\"\" Identity=\"USK@St0yKRdQJ3Lq17yoVt9h08bMfhqRhH1vtrcVVInoZVU,BaYM72qM3CYO1yzfVyO1UDUobL56CMbt9EQt3sEXabA,AQACAAE/WebOfTrustRC2/7\" Value=\"100\"/>"
+            + "<Trust Comment=\"\" Identity=\"USK@P8v4ZHUBPYGylYC-KHeWmeu5ZvB6RPYGgKcI5639Wz8,OM9PvjwMlt4L6jKRhqpvyblwpVMYumUgYFrAu3NxY~o,AQACAAE/WebOfTrustRC2/54\" Value=\"100\"/>"
+            + "<Trust Comment=\"\" Identity=\"USK@u2vn3Lh6Kte2-TgBSNKorbsKkuAt34ckoLmgx0ndXO0,4~q8q~3wIHjX9DT0yCNfQmr9oxmYrDZoQVLOdNg~yk0,AQACAAE/WebOfTrustRC2/2\" Value=\"100\"/>"
+            + "<Trust Comment=\"\" Identity=\"USK@MotrIucaZk37pJNS~HHpW5Vea3q0EZpfENPNGSjWh9s,RkFyDjl6-l7V-xYMWtGypmDYk-VehAU1LXmNYdIlHJs,AQACAAE/WebOfTrustRC2/108\" Value=\"100\"/>"
+            + "<Trust Comment=\"\" Identity=\"USK@KXAWN8DJxJ48XzZu7IBBpZ7SFc4n-OXqu4HhQC0V9Ww,DyklyACbgDCZyFpq-LeNqmuve7KWv-WDvJicd37ycn4,AQACAAE/WebOfTrustRC2/11\" Value=\"100\"/>"
+            + "<Trust Comment=\"\" Identity=\"USK@D6BZ1sSEmDMKNMPUN9I~7AalkkXockAdtbxONEN315w,0LiGUSSv4Ln4O7Xe4GQjpMEflNN7okKAH42Vlpv8d8s,AQACAAE/WebOfTrustRC2/56\" Value=\"100\"/>"
+            + "<Trust Comment=\"\" Identity=\"USK@sDehmSJoiaKYT455GIGHIVNKMs7KmiiwXXcCIcDhZ3o,upypWy-ze9Cz7WiCnbbJmoZOh7Xtveitftc5bE~p0Ug,AQACAAE/WebOfTrustRC2/6\" Value=\"100\"/>"
+            + "<Trust Comment=\"\" Identity=\"USK@GsTGXzIm9BTM5~KSZJknfTcPpJtlRs62aJtkNp05T5A,wuQcDjsdPQD9Fa21zWGB5GiiDlmf56vI9Niu5jl8eiM,AQACAAE/WebOfTrustRC2/31\" Value=\"100\"/>"
+            + "<Trust Comment=\"\" Identity=\"USK@eLFdT9VWP60iPNf8a3AkZrzgkcgje2n3Ca1yS8Tc5HU,5D0PISp19VkgzD4VSrRFTmo2CCvRoIuxlQzgMZBmj74,AQACAAE/WebOfTrustRC2/62\" Value=\"100\"/>"
+            + "<Trust Comment=\"\" Identity=\"USK@rz12UCXn-lG53i-6JswD98Kk9Zp0kt05gqIMNYc~9d0,42hoYZ5f~1fPuyvTOVYGJ~28MgYBSfoyzceR8-u1Z2I,AQACAAE/WebOfTrustRC2/126\" Value=\"100\"/>"
+            + "<Trust Comment=\"\" Identity=\"USK@5CYp3t28N5ZbPss9XhOkwUjD~T65q6-nc4aGwbV~-O0,CBfwMjYBiqKunzj3k6Ofpo9pyQsVFPz0OUWVzfd5a0c,AQACAAE/WebOfTrustRC2/0\" Value=\"100\"/>"
+            + "<Trust Comment=\"\" Identity=\"USK@dSSrRL9BY7JmTQD0dCpcIgVaLFF7pqU8EJzVUp1BYPA,EkTPkLrhEBQLPq-dRVPB1f2CAVdFGbXbUBlIww6re60,AQACAAE/WebOfTrustRC2/5\" Value=\"100\"/>"
+            + "<Trust Comment=\"\" Identity=\"USK@cw2rrCAcYTBjlO-I8DfEj-txttebZMG2LwuPGJV3Qlg,5ZcXLJW8G-R2SFqg4TEQX7IMs~e3Q4DjxUXGuHr9fxA,AQACAAE/WebOfTrustRC2/7\" Value=\"100\"/>"
+            + "<Trust Comment=\"\" Identity=\"USK@7zpRmhkkd5XcAUY6yUwp-53t7to3UN96w98~KQEwha0,30VpXev32s2mhmM5aBRJ---I0OlYbbN6~18j8rJ6qMU,AQACAAE/WebOfTrustRC2/8\" Value=\"100\"/>"
+            + "<Trust Comment=\"\" Identity=\"USK@YmCWYwlaSeE8o~8GawGYWeuPwsgVQtlBwlBkhGQFX04,H3DthY0MZXTe4rL0vsUOOMQDaj6UB9wK59yEwG8Q6No,AQACAAE/WebOfTrustRC2/13\" Value=\"100\"/>"
+            + "<Trust Comment=\"\" Identity=\"USK@aO9svsQEWmib~UyF1ihRUHA8i6uZprGy-tIS-Od9MMk,kwaMemPMVp-jcIRgGLAdF6PZimNE2cZFbvM6ShXAuZw,AQACAAE/WebOfTrustRC2/7\" Value=\"100\"/>"
+            + "<Trust Comment=\"\" Identity=\"USK@6J7FWPHwiCElTRXAO77tMGYAiLxerNF~5olAG0alQxQ,cz72iTz9FT~H57TgroVFv1eZlN5Ia5dhCtRa8bLh1KQ,AQACAAE/WebOfTrustRC2/0\" Value=\"100\"/>"
+            + "<Trust Comment=\"\" Identity=\"USK@kukYpNG56TNUnQzQe1RZvSYoqQ5B9lcoMZyDlh7xfO4,DNybejZVcWBAaByMRYYLZlgzUjQg28V8j6Zu1CtBc~g,AQACAAE/WebOfTrustRC2/27\" Value=\"100\"/>"
+            + "<Trust Comment=\"\" Identity=\"USK@a-tin0kMl1I~8xn5lkQDqYZRExKLzJITrxcNsr4T~fY,0VmnI67gAzIpdXlZFq~hYD8ikR5IEAg5QTwQv5Ifv5M,AQACAAE/WebOfTrustRC2/24\" Value=\"100\"/>"
+            + "<Trust Comment=\"\" Identity=\"USK@g~4XXw0hjp9TLocYZzunYWX6Don2AQhG-zplmzoCmY0,lyNjClSjRCrBZXVcmPKEAfvH01ySPgv1NWqL8wd11L8,AQACAAE/WebOfTrustRC2/115\" Value=\"100\"/>"
+            + "<Trust Comment=\"\" Identity=\"USK@UXgNMPe1YbVpXHOBXgMlcm9XcGY0G3gUtu43IO-YLLA,7EHSp20GHupg0rWrGPRY1g0TFJcRs-kubVtAcQRMxAc,AQACAAE/WebOfTrustRC2/69\" Value=\"100\"/>"
+            + "<Trust Comment=\"\" Identity=\"USK@lHrF2trsC9gyVeT2zpoL6IlZMz0aKlhN4xa2Ig70rmA,niASdKFC3nDfW6KMvzcv6VmRoHakE7GQAFpfz~2-v3Y,AQACAAE/WebOfTrustRC2/0\" Value=\"100\"/>"
+            + "<Trust Comment=\"\" Identity=\"USK@hp7IFNYSA97cHNAnHcreTJjQE5fF5sbsFlvbcZXaoxQ,O5h6cAcl5MvxuE2-xOkuvUP4JkT59NQNtaSmtuAS2Y8,AQACAAE/WebOfTrustRC2/16\" Value=\"100\"/>"
+            + "<Trust Comment=\"\" Identity=\"USK@QKPxALYrv6UyAGJs7tor8YlcikFzmy2msZ~42JMT~80,vx01piijkj0o3K8gzNaAOIIZ7NAtQVvPBxlRKtc4iP0,AQACAAE/WebOfTrustRC2/35\" Value=\"100\"/>"
+            + "<Trust Comment=\"\" Identity=\"USK@NmNfUNIr2WwIb9Ej1038Pk0M5gS1M0eHKvxdWqRUfTg,JUJYTsWuNQPOHK039Rczp6oPZDbfPdbO62gSaCuBXFQ,AQACAAE/WebOfTrustRC2/69\" Value=\"100\"/>"
+            + "<Trust Comment=\"\" Identity=\"USK@ONB7kRFo7mI0O3~QLRWlTbo1oB91XmGGS7KtSzz4XVI,yGiqMWRwR~i6ffAXOTBvrngHGC6nYOETUXj4L6Izj64,AQACAAE/WebOfTrustRC2/122\" Value=\"100\"/>"
+            + "<Trust Comment=\"\" Identity=\"USK@k-i0PmxoxO6Mahx8s850Rd7TEe0r4cnEohqC66aMDKw,IlTVYmQ9OSHjiu5pOLq4t-8r50SsVPNMlXn56zfpfDI,AQACAAE/WebOfTrustRC2/0\" Value=\"100\"/>"
+            + "<Trust Comment=\"\" Identity=\"USK@GtzvV-VHMGQILkpZ3O4CWBTWlhB423UUwpIlzRDgBLs,HUxBDT-Hhy6GqjBV24NRMjlK-o76YGMEgO~ZS6yighU,AQACAAE/WebOfTrustRC2/6\" Value=\"100\"/>"
+            + "<Trust Comment=\"\" Identity=\"USK@Ws0yzkcOYw6ax~kCtnzyX4MgLBHiQd5a6u9FMUmqLG4,zqNjNNGLz7HE4pdSPTovX2AwzGQWJ3-LI7YZt7aq3gg,AQACAAE/WebOfTrustRC2/30\" Value=\"100\"/>"
+            + "<Trust Comment=\"\" Identity=\"USK@6brkdrKlglWHnqMjWG6wrdLMWGPooc~7wQ7ID-PIsJk,X3RRBIdOQ5zthpkk8FjLL33LyoVVI4csJ1~g~sZ1msc,AQACAAE/WebOfTrustRC2/63\" Value=\"100\"/>"
+            + "<Trust Comment=\"\" Identity=\"USK@4DO0Yp1a3RZeAUAjeoPVu~GqpKhaX8RYqe~mwcWgjsM,klsqky963KI6uG3JqE1crihSeBbKBgkJHkIZ2xkWJ4A,AQACAAE/WebOfTrustRC2/36\" Value=\"100\"/>"
+            + "<Trust Comment=\"\" Identity=\"USK@axtoU6zHIkx3bicWK-hLNOj0br4xi0HW1qZ8H6CEv0U,SuPIncAHyYXmR9jQkTFUJd-QgGm0g9lW5ESUjzFOl~Q,AQACAAE/WebOfTrustRC2/8\" Value=\"100\"/>"
+            + "<Trust Comment=\"\" Identity=\"USK@BYsosP8TA22rSz1uA0KGbp6OVFZXhdgAlpH4R4hX9zE,o~qV5IzMR3m7ZOnnG5FPnDqpdffEpu7yOM7VEU9j6lQ,AQACAAE/WebOfTrustRC2/7\" Value=\"100\"/>"
+            + "<Trust Comment=\"\" Identity=\"USK@EilKmVin5cVL7b4FoEQ7ZoHS932O8OI880Qkd~tmzWs,8WK34lo95u~b60GLVczYU6EiRpY0LH7130~ASP9F6dU,AQACAAE/WebOfTrustRC2/75\" Value=\"100\"/>"
+            + "<Trust Comment=\"\" Identity=\"USK@xDYiCplSPLvFGC2dQjAC6eeaYVyQMtV-HmkpuKIJPgQ,CYKZcPacSNfB67IK10xlq7~bAqR-aOnZIA~yhHs2Hj0,AQACAAE/WebOfTrustRC2/71\" Value=\"100\"/>"
+            + "<Trust Comment=\"\" Identity=\"USK@DfCUA1sEJgiGzijEO0BWgeGjjHi28GGgv76H4rLujp8,1lnaOtPiXmvhpRZkBamZNF47uETNKIBgjSzElxcLhZc,AQACAAE/WebOfTrustRC2/0\" Value=\"100\"/>"
+            + "<Trust Comment=\"\" Identity=\"USK@F45FWNz9rs6TmafG~6n5Bg3Sr69YCHY9v01KTyK17lw,ikIvUS079Qw3aQknvdM8yKgr0XwjcqHgW0pWLu-1osA,AQACAAE/WebOfTrustRC2/13\" Value=\"100\"/>"
+            + "<Trust Comment=\"\" Identity=\"USK@VTDWbj9C5FUEXZBQRXmSsV1aEdOfsB9QHKzZ7-CnCh4,aDjtAVMuGPpCmw1rnCAj5myEnq9HYZeIzrfrhJO2JNw,AQACAAE/WebOfTrustRC2/52\" Value=\"100\"/>"
+            + "<Trust Comment=\"\" Identity=\"USK@dhYMUELq~HtJOweiV2JkGcoFS6hulHd9O~7a9LpGIxM,M-H3ySL8BdCctDUvwvbFNwHUyO1zghSNyotLqkKowi8,AQACAAE/WebOfTrustRC2/20\" Value=\"100\"/>"
+            + "<Trust Comment=\"\" Identity=\"USK@oRpTFVvCqp8qFWiZyCh2QhQ85eh3eP8C8G4YTFhm~rw,kyyeUPuksdt7omGFYFxoWPz3lu6e0q~G1HBx8wFztFc,AQACAAE/WebOfTrustRC2/0\" Value=\"100\"/>"
+            + "<Trust Comment=\"\" Identity=\"USK@RINL4YHPkTUGBWSoohAoO7Knzk89XSnqnQ6pUZkRY~w,OvIyTUUf4T2Tm46-em~A7zn1zBksIwe-hJP3KKdCe6s,AQACAAE/WebOfTrustRC2/4\" Value=\"100\"/>"
+            + "<Trust Comment=\"\" Identity=\"USK@sEZ-eWgUcQSj-To7lClNN6QNoKuvt0Cz3iTGKv63wQo,krEwvob7MhJ-pGvIk-RM8pVDPFSuXYTZw58oc2Lc49o,AQACAAE/WebOfTrustRC2/1\" Value=\"100\"/>"
+            + "<Trust Comment=\"\" Identity=\"USK@gNTVpdblFLSKMzUBEQM8YTfrO2fQQNIZeV7yJRTqYTQ,EKJhCmbQ5hpMU3cd-J91uneBF7CxTLPqffPs6DxoSMs,AQACAAE/WebOfTrustRC2/21\" Value=\"100\"/>"
+            + "<Trust Comment=\"\" Identity=\"USK@AV8Ubs8pbsMQ1F028a~pSJqtatznLjvhnwfSAtm1QKg,lUHPp~mgzV-pVoG9lYpceL6oOUtFRpvyQjGQdfx1GjY,AQACAAE/WebOfTrustRC2/41\" Value=\"100\"/>"
+            + "<Trust Comment=\"\" Identity=\"USK@xb3QGWdoUpeX9Fn1ZKeDwGN884c2XAMTpYLM9z4OIKo,aWNEDvjhhacFKAjiYJLaUnK1e7dQ9sCk-cnqkGZd7F8,AQACAAE/WebOfTrustRC2/9\" Value=\"100\"/>"
+            + "<Trust Comment=\"\" Identity=\"USK@MrxyFFM~n-kZ4kYvOOZodsvAA2vwp2XtAQJCrkEEU6s,tSHvx3u7uJN8ciaTqBIzt3lLmonM9mj6I7pz88MtBXc,AQACAAE/WebOfTrustRC2/0\" Value=\"100\"/>"
+            + "<Trust Comment=\"\" Identity=\"USK@-tpkd0enlFMTnjANRjzMKyfE3uyXU-WDX8VUqk3MXEg,J6h7edIdQCsiuc53qahzMzxsyNayXL~9IR0x5QoJVxk,AQACAAE/WebOfTrustRC2/15\" Value=\"100\"/>"
+            + "<Trust Comment=\"\" Identity=\"USK@gBQsXbnA9HX6wQB8x7DIEJT6e7lOxq5jGF353Po~p90,HjdyCLfG9r-zSBN6-AXwA1he9blIO2WEN9u7dMQ7H1w,AQACAAE/WebOfTrustRC2/13\" Value=\"100\"/>"
+            + "<Trust Comment=\"\" Identity=\"USK@ye~rQ4m~pu2Iu3O2TH-GOLBbSeKoQ~QR~vC6tJbKmDg,YSuI-J1nKZjGB2zmIa9Bh2Wtud~jzYBuR7OVhXYh7qM,AQACAAE/WebOfTrustRC2/99\" Value=\"100\"/>"
+            + "<Trust Comment=\"\" Identity=\"USK@HwgX8mU9A7bd2sCsM9And7fotpMGqfba9LzxZtOHHOU,10nYjjfKDH5RB3YvCCi5bpq4GPR-myd8ea7n8DRvx~c,AQACAAE/WebOfTrustRC2/0\" Value=\"100\"/>"
+            + "<Trust Comment=\"\" Identity=\"USK@qQArPJZuODDeM6C2ndbSczsFLWmLDm2SoaE-9F1hwQU,E3x6TbIvBj~6D9GrMUWSYgnNkLRg85BXXy5~mncoNEI,AQACAAE/WebOfTrustRC2/7\" Value=\"100\"/>"
+            + "<Trust Comment=\"\" Identity=\"USK@4hm9fo4IN0akORyJECttbEGZ~rPCPQ9KKAAH2AWMy8E,klvTyVp-GJznJq8Sln4W2GUfV6tVX2TI2sPCGBFU4tM,AQACAAE/WebOfTrustRC2/0\" Value=\"100\"/>"
+            + "<Trust Comment=\"\" Identity=\"USK@x7SDH5rL2-tGOaOKFFNMRrylCq94OfiZTWt4t3nwRHk,~E-kX9VqlANo4MeccvNlXDIjJ5xTWTEDNW-Qk04Ke6U,AQACAAE/WebOfTrustRC2/17\" Value=\"100\"/>"
+            + "<Trust Comment=\"\" Identity=\"USK@A9RAAKmky5yroigSupz6Bvrmc4q5FN1SXSrSXa6oRUg,s3RfurouqPnKmlGRkERao6jOJv9kcrVBBKAHqZVuQH4,AQACAAE/WebOfTrustRC2/1\" Value=\"100\"/>"
+            + "<Trust Comment=\"\" Identity=\"USK@yEstdNIW54-3~YA7QnYodpyWgPZStskrN9WXLHujUrE,j4PciAtpUHOjR2wmaaCKwiryJAi~exjETJ13UPGJLTg,AQACAAE/WebOfTrustRC2/58\" Value=\"100\"/>"
+            + "<Trust Comment=\"\" Identity=\"USK@NZSwPe8RJQOTSQ-~cAuxy97ieuX9reSft0cyD0vfbJg,99y8KOdRJmVLCWqryDzB8NdBrQGY7V9JDFtgCQBuGsU,AQACAAE/WebOfTrustRC2/0\" Value=\"100\"/>"
+            + "<Trust Comment=\"\" Identity=\"USK@Nq6iEvHP0B2VCszLCenQrfyJmkD0vas~00-9MoWgcTA,6dI2kB1z9mtjwITkhc9~V86QE5gM9CJBMjdpvRzKAoY,AQACAAE/WebOfTrustRC2/29\" Value=\"100\"/>"
+            + "<Trust Comment=\"\" Identity=\"USK@ZaNXnLCT7OQrwhp4I9V-rI1ZAV9WzegFj0HSaEJQ-Z4,i23K-dQupDenVE8O3xGv92vVanfDeyjLYWescevMbGg,AQACAAE/WebOfTrustRC2/14\" Value=\"100\"/>"
+            + "<Trust Comment=\"\" Identity=\"USK@53e9r9zEkJ0TRW~Tq8XIWjZ3WkL7Jv5Ez8LDhdwwzwM,7a0vL0OmWkHy3gC5Zs~MxB4k0QppwK4igrH6iuwls68,AQACAAE/WebOfTrustRC2/7\" Value=\"100\"/>"
+            + "<Trust Comment=\"\" Identity=\"USK@W1c~RYRC09xIHiHIucfV~Rj4J8uKAGrUeHmrH-q-U1c,niOrI75WMQ-Dtl9luIbKBmnvf6chkQEKvUvoKvSjhxI,AQACAAE/WebOfTrustRC2/4\" Value=\"100\"/>"
+            + "<Trust Comment=\"\" Identity=\"USK@G6zv74PaPcVZcf78lWp-e1TfrCSNZa1ZaPvmjm7DVzk,f4Ft3sLQ6cUEwpumpTMt5N17UORfZoXjGfmke5PJbdc,AQACAAE/WebOfTrustRC2/5\" Value=\"100\"/>"
+            + "<Trust Comment=\"\" Identity=\"USK@m5ILsPVAlcOY5D91J2iQu~PIntZb3L-B1VkONjEZs2k,592dl39JXIF1kpC4OMkw7ELOhdPrn~WXBsZln20pM7Q,AQACAAE/WebOfTrustRC2/0\" Value=\"100\"/>"
+            + "<Trust Comment=\"\" Identity=\"USK@iK69tf7gzQ53oZV60rF6ZSwwCfADMRsJeG2YmODdmJc,5czI5ZmWbWLDr2L9JdDmkt7qrr8fs55VDt3tXnrFw0E,AQACAAE/WebOfTrustRC2/0\" Value=\"100\"/>"
+            + "<Trust Comment=\"\" Identity=\"USK@bloE1LJ~qzSYUkU2nt7sB9kq060D4HTQC66pk5Q8NpA,DOOASUnp0kj6tOdhZJ-h5Tk7Ka50FSrUgsH7tCG1usU,AQACAAE/WebOfTrustRC2/58\" Value=\"100\"/>"
+            + "<Trust Comment=\"\" Identity=\"USK@0j-H~zKeP9mh6LEJUl4HSJYC-lQWstYRJeC~5E2F5~c,VbjnSixETRzKp80jYYXD-bqsTUWzxwcYmI9ZSWsBrik,AQACAAE/WebOfTrustRC2/13\" Value=\"100\"/>"
+            + "<Trust Comment=\"\" Identity=\"USK@~4ZW0eji3~hYAakiCI056soETGPf9O94GtoIpE2NGEg,GdtKsS~WeDlBS~OL1egxqZ4pr-iPXHjT2zcy8pjvEK4,AQACAAE/WebOfTrustRC2/88\" Value=\"100\"/>"
+            + "<Trust Comment=\"\" Identity=\"USK@YommlOi4fTYx9axhnl9iAi9BNHRvnM5XWjl21i0563k,5FswxS7hPf2erR8KkrBobG8R9bekaakeY1tM8DDNsjI,AQACAAE/WebOfTrustRC2/2\" Value=\"100\"/>"
+            + "<Trust Comment=\"\" Identity=\"USK@-ucM1bn8sICGRAemM8wZ~BVHgX3ZPUoutjZY64mBIcQ,Ko~kC54wZ-joCpfdc67Vds8LkAIxvTJGpMtfQSl4mAA,AQACAAE/WebOfTrustRC2/2\" Value=\"100\"/>"
+            + "<Trust Comment=\"\" Identity=\"USK@VwcZEhjtMuFcYIa8r0yksTs~FvMWB7swEz6tK67Vmsw,0blSLTQDms-WWbw1IBuKIoR2ZvSHpI21lMFeByQPuII,AQACAAE/WebOfTrustRC2/56\" Value=\"100\"/>"
+            + "<Trust Comment=\"\" Identity=\"USK@HAoXk-dW6~j5eLdAZCEjyKTVC974wkdl-4QqrPcbyzE,NlS05DkGK8QzL~EVUOfb~Jl1EZoVJTQBQBzA6N2qMn4,AQACAAE/WebOfTrustRC2/7\" Value=\"100\"/>"
+            + "<Trust Comment=\"\" Identity=\"USK@2PK-12eJFcVziT6eMpiUpOpTlmDNAoVOKZvA~8s7VSg,EaHdnKfKoWQDclX1mwcQeGr5jo1ijxyExYqL7Vsf-o8,AQACAAE/WebOfTrustRC2/33\" Value=\"100\"/>"
+            + "<Trust Comment=\"\" Identity=\"USK@8D3L5TDTyp5jnbT4imUWK12QC-B0iaSxFPOstMX2URg,ZtSShNkEVV8whaGQtIxiJ3FBroihw8YDyZrWvqncs0s,AQACAAE/WebOfTrustRC2/12\" Value=\"100\"/>"
+            + "<Trust Comment=\"\" Identity=\"USK@HKv7Hp94hFz8CKlINXCImq~XIBL9VfsPSgqfR0QIZFQ,vFM45qVvCajf3iqZm~ykZYwqM0KhaUSkU3RGaxJzHLI,AQACAAE/WebOfTrustRC2/4\" Value=\"100\"/>"
+            + "<Trust Comment=\"\" Identity=\"USK@NJu4xYtC3cgZo8s2xqmap3eh1dy60tFQFoxU8aeSnq8,fp~WLcrSSUKnr9wDDz-geb8FDwADCMCA9fjKt04Cyg8,AQACAAE/WebOfTrustRC2/4\" Value=\"100\"/>"
+            + "<Trust Comment=\"\" Identity=\"USK@IazjsmIK8VnIjDkq3-ecMEKHmi0dBT1QsNBq2mp2Fuo,uu24sWwNW~tjszdw19Mz18NBGx1MSADi03BHZnttwFo,AQACAAE/WebOfTrustRC2/8\" Value=\"100\"/>"
+            + "<Trust Comment=\"\" Identity=\"USK@IfxF-y7PNV97WUiHLqlIwXQyfVsHjI-Am4unZ0AK-Qk,Xm78gNC236A3wZ1RWBnft4oBGHU1R88Yt9AlphmtJPo,AQACAAE/WebOfTrustRC2/36\" Value=\"100\"/>"
+            + "<Trust Comment=\"\" Identity=\"USK@i1YvNnlMkd0i~0SiXiDHlGaxbtYd8ZqEUij~VzxyXmM,rxi19mph9KtHA6~gVGJ1rZ6kytff~kJDm6~NrA4YQaI,AQACAAE/WebOfTrustRC2/9\" Value=\"100\"/>"
+            + "<Trust Comment=\"\" Identity=\"USK@nXf5sbMSDqE~OkCQ~8JaMgPbj2LQJcuouvO56ADo28s,uEMqVaBzpA06TaC8A0cqKuv~lSfqZBiijasA3nlQ0Fc,AQACAAE/WebOfTrustRC2/8\" Value=\"100\"/>"
+            + "<Trust Comment=\"\" Identity=\"USK@Y8fLVylNs~pB6sdA5Dl1l6T~hXQrLNZLMgfDl5-E5Z0,n0zdN5XUa-D5Puf0L9wu~xQQmU~A5TpfqJ4RFHJLjLs,AQACAAE/WebOfTrustRC2/1\" Value=\"100\"/>"
+            + "<Trust Comment=\"\" Identity=\"USK@F0ixRao2hQlvTQDkN6rPcwLTG2nA6x0r8RrTQ0443IQ,LxN-gYvq4eWRuhjAgejmgNqYJdIw0q8IJ2XNwwVHhmQ,AQACAAE/WebOfTrustRC2/12\" Value=\"100\"/>"
+            + "<Trust Comment=\"\" Identity=\"USK@Pgk~nJzSVNAjFHh-qTovvm6muY08igdOCEWuyUrbFvk,NlwUDwfQlbXRjIaFAVljD5E1loXi31Xq6dG8YC7JOR0,AQACAAE/WebOfTrustRC2/5\" Value=\"100\"/>"
+            + "<Trust Comment=\"\" Identity=\"USK@m9gYemmVNXe32Ao6jeUgW8ttgGlMSIAW1608YZ19olE,LnEWPRzsPlPfq2~gIYQ5SVV-V2lthAx254dht9EZgyU,AQACAAE/WebOfTrustRC2/0\" Value=\"100\"/>"
+            + "<Trust Comment=\"\" Identity=\"USK@Pwiulr-xlPJelS5CO4~do78zZHTL5TNIChF5hpz8nkY,z77V~KhcKZRWLSWtVzaWO-dt~TzCCJFCHUDhHXI715M,AQACAAE/WebOfTrustRC2/8\" Value=\"100\"/>"
+            + "<Trust Comment=\"\" Identity=\"USK@OH3ZkrLAkMJbQTjVW3e9ioH04F7jpUVNMekiQAAvRjs,J6qOC05GoqRgST93M1V90HWxq9VK4PCKIpltkL8GAhg,AQACAAE/WebOfTrustRC2/5\" Value=\"100\"/>"
+            + "<Trust Comment=\"\" Identity=\"USK@nirNdzBgVyqMpnuT5UrmX~TU354qDIY7XAp04Kutysg,vpf1npG3nUARPSkFRx9xbVT~w1ELw0jQhdiXbxWcafg,AQACAAE/WebOfTrustRC2/1\" Value=\"100\"/>"
+            + "<Trust Comment=\"\" Identity=\"USK@ozK579KUDjjxkve1gKeV8IDd5qe0NPtxlFVV2-8iXrM,hlU82qnHi5ZnIfSD5~hr4wmUjNFJjQYted7FJWBj8z8,AQACAAE/WebOfTrustRC2/12\" Value=\"100\"/>"
+            + "<Trust Comment=\"\" Identity=\"USK@D6JSlrnlDDXfnGhijswHC5a4-EBuYNFhg2IyoFhzRRM,tCJy6EvZRhk-Og9CIkR3jfLD4VYxwOY5Wf991XMLdmE,AQACAAE/WebOfTrustRC2/0\" Value=\"100\"/>"
+            + "<Trust Comment=\"\" Identity=\"USK@Bn1Ozb4~Q639N~GvSXrbzZoVx9ziFfbkiKf1akXr9dQ,DrwwRjH~WrErR595BqxyDeisgcTLRZjCsQUBQSdnPLk,AQACAAE/WebOfTrustRC2/10\" Value=\"100\"/>"
+            + "<Trust Comment=\"\" Identity=\"USK@~aHztTNobVhKiaJ2eE-k6LLMy3qrRzL0zvk1UZp1xAU,xs3tuQsYRrTgxoU5qrayiwoOYEOLE6bTHvIKBQLIwco,AQACAAE/WebOfTrustRC2/3\" Value=\"100\"/>"
+            + "<Trust Comment=\"\" Identity=\"USK@jr3FrHPhtxP-IYQ-A12A3jjNNK4-KcHsUH8qNpBGHJ0,WK9IlZuG17JZ3YvaRUR-3uHf1YqkxxyGxkpkLW56ZTY,AQACAAE/WebOfTrustRC2/1\" Value=\"100\"/>"
+            + "<Trust Comment=\"\" Identity=\"USK@iBBjdbuuabx3v7iy-Pt3WZjWuixqo2-rzH~2kV4FkwE,Hll6SNQ~FXY5mrOY2W0GTfyNhJSlOrYutJmoXeSKseE,AQACAAE/WebOfTrustRC2/4\" Value=\"100\"/>"
+            + "<Trust Comment=\"\" Identity=\"USK@TKOVixP3xx6nA3-cgl2fksatQzxg4LlReoK0GFl7uAo,r~MCdO2rhGxBgRYv2EPuIE-tP7-0z6vuwbS04oyoAyI,AQACAAE/WebOfTrustRC2/0\" Value=\"100\"/>"
+            + "<Trust Comment=\"\" Identity=\"USK@bK9LQT2mqilUY4DxwmlKvKi5Jfwf4Brr~EQGa8RLIRU,Ni90~c4q-VNFrxFS7cDimQwCcRsqdScHoElWQgBpoT8,AQACAAE/WebOfTrustRC2/6\" Value=\"100\"/>"
+            + "<Trust Comment=\"\" Identity=\"USK@DYXv~V1jDo0XBhaiaGeRvy-~snqMbBiFR~R8TK8VBNg,4YYHZfVVYZmudSCOetDlNxnvbLy6IULV1SOgeC1zXmI,AQACAAE/WebOfTrustRC2/4\" Value=\"100\"/>"
+            + "<Trust Comment=\"\" Identity=\"USK@CSWvDlm9RM31O9NPpZomFvpTVM8cV0brixDXxpwnJ7A,4wfD~qxb5hFgCBN0JWgK6p11wUCpOHGOWhJ4i2FgFhY,AQACAAE/WebOfTrustRC2/0\" Value=\"100\"/>"
+            + "<Trust Comment=\"\" Identity=\"USK@sFsqYnIVQ9FwULsp3e-q0M46fRw2jVsLJYF9PUyHVME,aDhfrzYPt4O0BTuuRF3aCPTR0A~zr2rqHtPpJXeSqFU,AQACAAE/WebOfTrustRC2/4\" Value=\"100\"/>"
+            + "<Trust Comment=\"\" Identity=\"USK@1QwMtp0oc4jIh6DFUjec~U0O3ldWHrRmhh5OZd41MMo,GZ-QOMc4mAkHhG4LwJWU~-rl0zJIp90YcB5hn3M9tlg,AQACAAE/WebOfTrustRC2/4\" Value=\"100\"/>"
+            + "</TrustList>"
+            + "</Identity>"
+            + "</WebOfTrustRC2>";
+
+    /**
+     * main method.
+     *
+     * @param args Standard args.
+     */
+    public static void main(String[] args) {
+        try {
+            final Document xmlDoc = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(new ByteArrayInputStream(rawXML.getBytes("UTF-8")));
+            final Element identityElement = (Element) xmlDoc.getElementsByTagName("Identity").item(0);
+            final Element trustListElement = (Element) identityElement.getElementsByTagName("TrustList").item(0);
+            final NodeList trustList = trustListElement.getElementsByTagName("Trust");
+            final Pattern keyPattern = Pattern.compile("USK@[%,~" + "*-_./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz" + "]+");
+            for (int i = 0; i < trustList.getLength(); ++i) {
+                Element trustElement = (Element) trustList.item(i);
+                final String identity = trustElement.getAttribute("Identity");
+                if (!keyPattern.matcher(identity).matches()) {
+                    throw new RuntimeException("Parsing failure: Instead of USK URI I got: " + identity);
+                }
+            }
+        } catch (Exception ex) {
+            throw new RuntimeException(ex.getMessage());
+        }
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/javax/xml/jaxp/parsers/8032909/XSLT.java	Wed Apr 23 15:10:18 2014 +0100
@@ -0,0 +1,54 @@
+/*
+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * 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 8032909
+ * @summary Test for XSLT string-length function with complementary chars
+ * @compile XSLT.java
+ * @run main/othervm XSLT a_utf16.xml a_utf16.xsl 1270
+ * @run main/othervm XSLT a_utf8.xml a_utf8.xsl 130
+ * @run main/othervm XSLT a_windows1252.xml a_windows1252.xsl 200
+ */
+
+import java.io.ByteArrayOutputStream;
+import javax.xml.transform.stream.StreamResult;
+import javax.xml.transform.stream.StreamSource;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerFactory;
+
+public class XSLT {
+    public static void main(String[] args) throws Exception {
+
+        ByteArrayOutputStream resStream = new ByteArrayOutputStream();
+        TransformerFactory trf = TransformerFactory.newInstance();
+        Transformer tr = trf.newTransformer(new StreamSource(System.getProperty("test.src", ".")+"/"+args[1]));
+        String res, expectedRes;
+        tr.transform( new StreamSource(System.getProperty("test.src", ".")+"/"+args[0]), new StreamResult(resStream));
+        res = resStream.toString();
+        System.out.println("Transformation completed. Result:"+res);
+
+        if (!res.replaceAll("\\s","").equals(args[2]))
+            throw new RuntimeException("Incorrect transformation result. Expected:"+args[2]+" Observed:"+res);
+    }
+}
Binary file test/javax/xml/jaxp/parsers/8032909/a_utf16.xml has changed
Binary file test/javax/xml/jaxp/parsers/8032909/a_utf16.xsl has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/javax/xml/jaxp/parsers/8032909/a_utf8.xml	Wed Apr 23 15:10:18 2014 +0100
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<testxml>
+<Element>UTF-8_Element</Element>
+<Element2></Element2>
+</testxml>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/javax/xml/jaxp/parsers/8032909/a_utf8.xsl	Wed Apr 23 15:10:18 2014 +0100
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+<xsl:output method="text" />
+
+<xsl:template match="Element">
+<xsl:value-of select="string-length(.)"/>
+</xsl:template>
+<xsl:template match="Element2">
+<xsl:value-of select="string-length(.)"/>
+</xsl:template>
+
+</xsl:stylesheet>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/javax/xml/jaxp/parsers/8032909/a_windows1252.xml	Wed Apr 23 15:10:18 2014 +0100
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="windows-1252"?>
+<testxml>
+<Element>Windows-1252_Element</Element>
+<Element2></Element2>
+</testxml>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/javax/xml/jaxp/parsers/8032909/a_windows1252.xsl	Wed Apr 23 15:10:18 2014 +0100
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="windows-1252"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+<xsl:output method="text" />
+
+<xsl:template match="Element">
+<xsl:value-of select="string-length(.)"/>
+</xsl:template>
+<xsl:template match="Element2">
+<xsl:value-of select="string-length(.)"/>
+</xsl:template>
+
+</xsl:stylesheet>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/lib/testlibrary/AssertsTest.java	Wed Apr 23 15:10:18 2014 +0100
@@ -0,0 +1,237 @@
+/*
+ * 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 static jdk.testlibrary.Asserts.*;
+
+/* @test
+ * @summary Tests the different assertions in the Assert class
+ * @library /testlibrary
+ */
+public class AssertsTest {
+    private static class Foo implements Comparable<Foo> {
+        final int id;
+        public Foo(int id) {
+            this.id = id;
+        }
+
+        public int compareTo(Foo f) {
+            return new Integer(id).compareTo(new Integer(f.id));
+        }
+    }
+
+    public static void main(String[] args) throws Exception {
+        testLessThan();
+        testLessThanOrEqual();
+        testEquals();
+        testGreaterThanOrEqual();
+        testGreaterThan();
+        testNotEquals();
+        testNull();
+        testNotNull();
+        testTrue();
+        testFalse();
+    }
+
+    private static void testLessThan() throws Exception {
+        expectPass(Assertion.LT, 1, 2);
+
+        expectFail(Assertion.LT, 2, 2);
+        expectFail(Assertion.LT, 2, 1);
+        expectFail(Assertion.LT, null, 2);
+        expectFail(Assertion.LT, 2, null);
+    }
+
+    private static void testLessThanOrEqual() throws Exception {
+        expectPass(Assertion.LTE, 1, 2);
+        expectPass(Assertion.LTE, 2, 2);
+
+        expectFail(Assertion.LTE, 3, 2);
+        expectFail(Assertion.LTE, null, 2);
+        expectFail(Assertion.LTE, 2, null);
+    }
+
+    private static void testEquals() throws Exception {
+        expectPass(Assertion.EQ, 1, 1);
+        expectPass(Assertion.EQ, null, null);
+
+        Foo f1 = new Foo(1);
+        expectPass(Assertion.EQ, f1, f1);
+
+        Foo f2 = new Foo(1);
+        expectFail(Assertion.EQ, f1, f2);
+        expectFail(Assertion.LTE, null, 2);
+        expectFail(Assertion.LTE, 2, null);
+    }
+
+    private static void testGreaterThanOrEqual() throws Exception {
+        expectPass(Assertion.GTE, 1, 1);
+        expectPass(Assertion.GTE, 2, 1);
+
+        expectFail(Assertion.GTE, 1, 2);
+        expectFail(Assertion.GTE, null, 2);
+        expectFail(Assertion.GTE, 2, null);
+    }
+
+    private static void testGreaterThan() throws Exception {
+        expectPass(Assertion.GT, 2, 1);
+
+        expectFail(Assertion.GT, 1, 1);
+        expectFail(Assertion.GT, 1, 2);
+        expectFail(Assertion.GT, null, 2);
+        expectFail(Assertion.GT, 2, null);
+    }
+
+    private static void testNotEquals() throws Exception {
+        expectPass(Assertion.NE, null, 1);
+        expectPass(Assertion.NE, 1, null);
+
+        Foo f1 = new Foo(1);
+        Foo f2 = new Foo(1);
+        expectPass(Assertion.NE, f1, f2);
+
+        expectFail(Assertion.NE, null, null);
+        expectFail(Assertion.NE, f1, f1);
+        expectFail(Assertion.NE, 1, 1);
+    }
+
+    private static void testNull() throws Exception {
+        expectPass(Assertion.NULL, null);
+
+        expectFail(Assertion.NULL, 1);
+    }
+
+    private static void testNotNull() throws Exception {
+        expectPass(Assertion.NOTNULL, 1);
+
+        expectFail(Assertion.NOTNULL, null);
+    }
+
+    private static void testTrue() throws Exception {
+        expectPass(Assertion.TRUE, true);
+
+        expectFail(Assertion.TRUE, false);
+    }
+
+    private static void testFalse() throws Exception {
+        expectPass(Assertion.FALSE, false);
+
+        expectFail(Assertion.FALSE, true);
+    }
+
+    private static <T extends Comparable<T>> void expectPass(Assertion assertion, T ... args)
+        throws Exception {
+        Assertion.run(assertion, args);
+    }
+
+    private static <T extends Comparable<T>> void expectFail(Assertion assertion, T ... args)
+        throws Exception {
+        try {
+            Assertion.run(assertion, args);
+        } catch (RuntimeException e) {
+            return;
+        }
+        throw new Exception("Expected " + Assertion.format(assertion, (Object[]) args) +
+                            " to throw a RuntimeException");
+    }
+
+}
+
+enum Assertion {
+    LT, LTE, EQ, GTE, GT, NE, NULL, NOTNULL, FALSE, TRUE;
+
+    public static <T extends Comparable<T>> void run(Assertion assertion, T ... args) {
+        String msg = "Expected " + format(assertion, args) + " to pass";
+        switch (assertion) {
+            case LT:
+                assertLessThan(args[0], args[1], msg);
+                break;
+            case LTE:
+                assertLessThanOrEqual(args[0], args[1], msg);
+                break;
+            case EQ:
+                assertEquals(args[0], args[1], msg);
+                break;
+            case GTE:
+                assertGreaterThanOrEqual(args[0], args[1], msg);
+                break;
+            case GT:
+                assertGreaterThan(args[0], args[1], msg);
+                break;
+            case NE:
+                assertNotEquals(args[0], args[1], msg);
+                break;
+            case NULL:
+                assertNull(args == null ? args : args[0], msg);
+                break;
+            case NOTNULL:
+                assertNotNull(args == null ? args : args[0], msg);
+                break;
+            case FALSE:
+                assertFalse((Boolean) args[0], msg);
+                break;
+            case TRUE:
+                assertTrue((Boolean) args[0], msg);
+                break;
+            default:
+                // do nothing
+        }
+    }
+
+    public static String format(Assertion assertion, Object ... args) {
+        switch (assertion) {
+            case LT:
+                return asString("assertLessThan", args);
+            case LTE:
+                return asString("assertLessThanOrEqual", args);
+            case EQ:
+                return asString("assertEquals", args);
+            case GTE:
+                return asString("assertGreaterThanOrEquals", args);
+            case GT:
+                return asString("assertGreaterThan", args);
+            case NE:
+                return asString("assertNotEquals", args);
+            case NULL:
+                return asString("assertNull", args);
+            case NOTNULL:
+                return asString("assertNotNull", args);
+            case FALSE:
+                return asString("assertFalse", args);
+            case TRUE:
+                return asString("assertTrue", args);
+            default:
+                return "";
+        }
+    }
+
+    private static String asString(String assertion, Object ... args) {
+        if (args == null) {
+            return String.format("%s(null)", assertion);
+        }
+        if (args.length == 1) {
+            return String.format("%s(%s)", assertion, args[0]);
+        } else {
+            return String.format("%s(%s, %s)", assertion, args[0], args[1]);
+        }
+    }
+}
--- a/test/lib/testlibrary/ClassFileInstaller.java	Fri Apr 18 23:39:11 2014 +0100
+++ b/test/lib/testlibrary/ClassFileInstaller.java	Wed Apr 23 15:10:18 2014 +0100
@@ -45,7 +45,10 @@
 
             // Create the class file's package directory
             Path p = Paths.get(pathName);
-            Files.createDirectories(p.getParent());
+            Path parent = p.getParent();
+            if (parent != null) {
+                Files.createDirectories(parent);
+            }
             // Create the class file
             Files.copy(is, p, StandardCopyOption.REPLACE_EXISTING);
         }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/lib/testlibrary/OutputAnalyzerReportingTest.java	Wed Apr 23 15:10:18 2014 +0100
@@ -0,0 +1,122 @@
+/*
+ * 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
+ * @summary Test the OutputAnalyzer reporting functionality,
+ *     such as printing additional diagnostic info
+ *     (exit code, stdout, stderr, command line, etc.)
+ * @library /testlibrary
+ */
+
+import java.io.ByteArrayOutputStream;
+import java.io.PrintStream;
+
+import jdk.testlibrary.OutputAnalyzer;
+
+public class OutputAnalyzerReportingTest {
+
+    public static void main(String[] args) throws Exception {
+        // Create the output analyzer under test
+        String stdout = "aaaaaa";
+        String stderr = "bbbbbb";
+        OutputAnalyzer output = new OutputAnalyzer(stdout, stderr);
+
+        // Expected summary values should be the same for all cases,
+        // since the outputAnalyzer object is the same
+        String expectedExitValue = "-1";
+        String expectedSummary =
+                " stdout: [" + stdout + "];\n" +
+                " stderr: [" + stderr + "]\n" +
+                " exitValue = " + expectedExitValue + "\n";
+
+
+        DiagnosticSummaryTestRunner testRunner =
+                new DiagnosticSummaryTestRunner();
+
+        // should have exit value
+        testRunner.init(expectedSummary);
+        int unexpectedExitValue = 2;
+        try {
+            output.shouldHaveExitValue(unexpectedExitValue);
+        } catch (RuntimeException e) { }
+        testRunner.closeAndCheckResults();
+
+        // should not contain
+        testRunner.init(expectedSummary);
+        try {
+            output.shouldNotContain(stdout);
+        } catch (RuntimeException e) { }
+        testRunner.closeAndCheckResults();
+
+        // should contain
+        testRunner.init(expectedSummary);
+        try {
+            output.shouldContain("unexpected-stuff");
+        } catch (RuntimeException e) { }
+        testRunner.closeAndCheckResults();
+
+        // should not match
+        testRunner.init(expectedSummary);
+        try {
+            output.shouldNotMatch("[a]");
+        } catch (RuntimeException e) { }
+        testRunner.closeAndCheckResults();
+
+        // should match
+        testRunner.init(expectedSummary);
+        try {
+            output.shouldMatch("[qwerty]");
+        } catch (RuntimeException e) { }
+        testRunner.closeAndCheckResults();
+
+    }
+
+    private static class DiagnosticSummaryTestRunner {
+        private ByteArrayOutputStream byteStream =
+                new ByteArrayOutputStream(10000);
+
+        private String expectedSummary = "";
+        private PrintStream errStream;
+
+
+        public void init(String expectedSummary) {
+            this.expectedSummary = expectedSummary;
+            byteStream.reset();
+            errStream = new PrintStream(byteStream);
+            System.setErr(errStream);
+        }
+
+        public void closeAndCheckResults() {
+            // check results
+            errStream.close();
+            String stdErrStr = byteStream.toString();
+            if (!stdErrStr.contains(expectedSummary)) {
+                throw new RuntimeException("The output does not contain "
+                    + "the diagnostic message, or the message is incorrect");
+            }
+        }
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/lib/testlibrary/jdk/testlibrary/Asserts.java	Wed Apr 23 15:10:18 2014 +0100
@@ -0,0 +1,395 @@
+/*
+ * 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.
+ */
+
+package jdk.testlibrary;
+
+/**
+ * Asserts that can be used for verifying assumptions in tests.
+ *
+ * An assertion will throw a {@link RuntimeException} if the assertion isn't
+ * valid.  All the asserts can be imported into a test by using a static
+ * import:
+ *
+ * <pre>
+ * {@code
+ * import static com.oracle.java.testlibrary.Asserts.*;
+ * }
+ *
+ * Always provide a message describing the assumption if the line number of the
+ * failing assertion isn't enough to understand why the assumption failed. For
+ * example, if the assertion is in a loop or in a method that is called
+ * multiple times, then the line number won't provide enough context to
+ * understand the failure.
+ * </pre>
+ */
+public class Asserts {
+
+    /**
+     * Shorthand for {@link #assertLessThan(T, T)}.
+     *
+     * @see #assertLessThan(T, T)
+     */
+    public static <T extends Comparable<T>> void assertLT(T lhs, T rhs) {
+        assertLessThan(lhs, rhs);
+    }
+
+    /**
+     * Shorthand for {@link #assertLessThan(T, T, String)}.
+     *
+     * @see #assertLessThan(T, T, String)
+     */
+    public static <T extends Comparable<T>> void assertLT(T lhs, T rhs, String msg) {
+        assertLessThan(lhs, rhs, msg);
+    }
+
+    /**
+     * Calls {@link #assertLessThan(T, T, String)} with a default message.
+     *
+     * @see #assertLessThan(T, T, String)
+     */
+    public static <T extends Comparable<T>> void assertLessThan(T lhs, T rhs) {
+        String msg = "Expected that " + format(lhs) + " < " + format(rhs);
+        assertLessThan(lhs, rhs, msg);
+    }
+
+    /**
+     * Asserts that {@code lhs} is less than {@code rhs}.
+     *
+     * @param lhs The left hand side of the comparison.
+     * @param rhs The right hand side of the comparison.
+     * @param msg A description of the assumption.
+     * @throws RuntimeException if the assertion isn't valid.
+     */
+    public static <T extends Comparable<T>>void assertLessThan(T lhs, T rhs, String msg) {
+        assertTrue(compare(lhs, rhs, msg) < 0, msg);
+    }
+
+    /**
+     * Shorthand for {@link #assertLessThanOrEqual(T, T)}.
+     *
+     * @see #assertLessThanOrEqual(T, T)
+     */
+    public static <T extends Comparable<T>> void assertLTE(T lhs, T rhs) {
+        assertLessThanOrEqual(lhs, rhs);
+    }
+
+    /**
+     * Shorthand for {@link #assertLessThanOrEqual(T, T, String)}.
+     *
+     * @see #assertLessThanOrEqual(T, T, String)
+     */
+    public static <T extends Comparable<T>> void assertLTE(T lhs, T rhs, String msg) {
+        assertLessThanOrEqual(lhs, rhs, msg);
+    }
+
+    /**
+     * Calls {@link #assertLessThanOrEqual(T, T, String)} with a default message.
+     *
+     * @see #assertLessThanOrEqual(T, T, String)
+     */
+    public static <T extends Comparable<T>> void assertLessThanOrEqual(T lhs, T rhs) {
+        String msg = "Expected that " + format(lhs) + " <= " + format(rhs);
+        assertLessThanOrEqual(lhs, rhs, msg);
+    }
+
+    /**
+     * Asserts that {@code lhs} is less than or equal to {@code rhs}.
+     *
+     * @param lhs The left hand side of the comparison.
+     * @param rhs The right hand side of the comparison.
+     * @param msg A description of the assumption.
+     * @throws RuntimeException if the assertion isn't valid.
+     */
+    public static <T extends Comparable<T>> void assertLessThanOrEqual(T lhs, T rhs, String msg) {
+        assertTrue(compare(lhs, rhs, msg) <= 0, msg);
+    }
+
+    /**
+     * Shorthand for {@link #assertEquals(T, T)}.
+     *
+     * @see #assertEquals(T, T)
+     */
+    public static void assertEQ(Object lhs, Object rhs) {
+        assertEquals(lhs, rhs);
+    }
+
+    /**
+     * Shorthand for {@link #assertEquals(T, T, String)}.
+     *
+     * @see #assertEquals(T, T, String)
+     */
+    public static void assertEQ(Object lhs, Object rhs, String msg) {
+        assertEquals(lhs, rhs, msg);
+    }
+
+    /**
+     * Calls {@link #assertEquals(T, T, String)} with a default message.
+     *
+     * @see #assertEquals(T, T, String)
+     */
+    public static void assertEquals(Object lhs, Object rhs) {
+        String msg = "Expected " + format(lhs) + " to equal " + format(rhs);
+        assertEquals(lhs, rhs, msg);
+    }
+
+    /**
+     * Asserts that {@code lhs} is equal to {@code rhs}.
+     *
+     * @param lhs The left hand side of the comparison.
+     * @param rhs The right hand side of the comparison.
+     * @param msg A description of the assumption.
+     * @throws RuntimeException if the assertion isn't valid.
+     */
+    public static void assertEquals(Object lhs, Object rhs, String msg) {
+        if (lhs == null) {
+            if (rhs != null) {
+                error(msg);
+            }
+        } else {
+            assertTrue(lhs.equals(rhs), msg);
+        }
+    }
+
+    /**
+     * Shorthand for {@link #assertGreaterThanOrEqual(T, T)}.
+     *
+     * @see #assertGreaterThanOrEqual(T, T)
+     */
+    public static <T extends Comparable<T>> void assertGTE(T lhs, T rhs) {
+        assertGreaterThanOrEqual(lhs, rhs);
+    }
+
+    /**
+     * Shorthand for {@link #assertGreaterThanOrEqual(T, T, String)}.
+     *
+     * @see #assertGreaterThanOrEqual(T, T, String)
+     */
+    public static <T extends Comparable<T>> void assertGTE(T lhs, T rhs, String msg) {
+        assertGreaterThanOrEqual(lhs, rhs, msg);
+    }
+
+    /**
+     * Calls {@link #assertGreaterThanOrEqual(T, T, String)} with a default message.
+     *
+     * @see #assertGreaterThanOrEqual(T, T, String)
+     */
+    public static <T extends Comparable<T>> void assertGreaterThanOrEqual(T lhs, T rhs) {
+        String msg = "Expected that " + format(lhs) + " >= " + format(rhs);
+        assertGreaterThanOrEqual(lhs, rhs, msg);
+    }
+
+    /**
+     * Asserts that {@code lhs} is greater than or equal to {@code rhs}.
+     *
+     * @param lhs The left hand side of the comparison.
+     * @param rhs The right hand side of the comparison.
+     * @param msg A description of the assumption.
+     * @throws RuntimeException if the assertion isn't valid.
+     */
+    public static <T extends Comparable<T>> void assertGreaterThanOrEqual(T lhs, T rhs, String msg) {
+        assertTrue(compare(lhs, rhs, msg) >= 0, msg);
+    }
+
+    /**
+     * Shorthand for {@link #assertGreaterThan(T, T)}.
+     *
+     * @see #assertGreaterThan(T, T)
+     */
+    public static <T extends Comparable<T>> void assertGT(T lhs, T rhs) {
+        assertGreaterThan(lhs, rhs);
+    }
+
+    /**
+     * Shorthand for {@link #assertGreaterThan(T, T, String)}.
+     *
+     * @see #assertGreaterThan(T, T, String)
+     */
+    public static <T extends Comparable<T>> void assertGT(T lhs, T rhs, String msg) {
+        assertGreaterThan(lhs, rhs, msg);
+    }
+
+    /**
+     * Calls {@link #assertGreaterThan(T, T, String)} with a default message.
+     *
+     * @see #assertGreaterThan(T, T, String)
+     */
+    public static <T extends Comparable<T>> void assertGreaterThan(T lhs, T rhs) {
+        String msg = "Expected that " + format(lhs) + " > " + format(rhs);
+        assertGreaterThan(lhs, rhs, msg);
+    }
+
+    /**
+     * Asserts that {@code lhs} is greater than {@code rhs}.
+     *
+     * @param lhs The left hand side of the comparison.
+     * @param rhs The right hand side of the comparison.
+     * @param msg A description of the assumption.
+     * @throws RuntimeException if the assertion isn't valid.
+     */
+    public static <T extends Comparable<T>> void assertGreaterThan(T lhs, T rhs, String msg) {
+        assertTrue(compare(lhs, rhs, msg) > 0, msg);
+    }
+
+    /**
+     * Shorthand for {@link #assertNotEquals(T, T)}.
+     *
+     * @see #assertNotEquals(T, T)
+     */
+    public static void assertNE(Object lhs, Object rhs) {
+        assertNotEquals(lhs, rhs);
+    }
+
+    /**
+     * Shorthand for {@link #assertNotEquals(T, T, String)}.
+     *
+     * @see #assertNotEquals(T, T, String)
+     */
+    public static void assertNE(Object lhs, Object rhs, String msg) {
+        assertNotEquals(lhs, rhs, msg);
+    }
+
+    /**
+     * Calls {@link #assertNotEquals(T, T, String)} with a default message.
+     *
+     * @see #assertNotEquals(T, T, String)
+     */
+    public static void assertNotEquals(Object lhs, Object rhs) {
+        String msg = "Expected " + format(lhs) + " to not equal " + format(rhs);
+        assertNotEquals(lhs, rhs, msg);
+    }
+
+    /**
+     * Asserts that {@code lhs} is not equal to {@code rhs}.
+     *
+     * @param lhs The left hand side of the comparison.
+     * @param rhs The right hand side of the comparison.
+     * @param msg A description of the assumption.
+     * @throws RuntimeException if the assertion isn't valid.
+     */
+    public static void assertNotEquals(Object lhs, Object rhs, String msg) {
+        if (lhs == null) {
+            if (rhs == null) {
+                error(msg);
+            }
+        } else {
+            assertFalse(lhs.equals(rhs), msg);
+        }
+    }
+
+    /**
+     * Calls {@link #assertNull(Object, String)} with a default message.
+     *
+     * @see #assertNull(Object, String)
+     */
+    public static void assertNull(Object o) {
+        assertNull(o, "Expected " + format(o) + " to be null");
+    }
+
+    /**
+     * Asserts that {@code o} is null.
+     *
+     * @param o The reference assumed to be null.
+     * @param msg A description of the assumption.
+     * @throws RuntimeException if the assertion isn't valid.
+     */
+    public static void assertNull(Object o, String msg) {
+        assertEquals(o, null, msg);
+    }
+
+    /**
+     * Calls {@link #assertNotNull(Object, String)} with a default message.
+     *
+     * @see #assertNotNull(Object, String)
+     */
+    public static void assertNotNull(Object o) {
+        assertNotNull(o, "Expected non null reference");
+    }
+
+    /**
+     * Asserts that {@code o} is <i>not</i> null.
+     *
+     * @param o The reference assumed <i>not</i> to be null,
+     * @param msg A description of the assumption.
+     * @throws RuntimeException if the assertion isn't valid.
+     */
+    public static void assertNotNull(Object o, String msg) {
+        assertNotEquals(o, null, msg);
+    }
+
+    /**
+     * Calls {@link #assertFalse(boolean, String)} with a default message.
+     *
+     * @see #assertFalse(boolean, String)
+     */
+    public static void assertFalse(boolean value) {
+        assertFalse(value, "Expected value to be false");
+    }
+
+    /**
+     * Asserts that {@code value} is {@code false}.
+     *
+     * @param value The value assumed to be false.
+     * @param msg A description of the assumption.
+     * @throws RuntimeException if the assertion isn't valid.
+     */
+    public static void assertFalse(boolean value, String msg) {
+        assertTrue(!value, msg);
+    }
+
+    /**
+     * Calls {@link #assertTrue(boolean, String)} with a default message.
+     *
+     * @see #assertTrue(boolean, String)
+     */
+    public static void assertTrue(boolean value) {
+        assertTrue(value, "Expected value to be true");
+    }
+
+    /**
+     * Asserts that {@code value} is {@code true}.
+     *
+     * @param value The value assumed to be true.
+     * @param msg A description of the assumption.
+     * @throws RuntimeException if the assertion isn't valid.
+     */
+    public static void assertTrue(boolean value, String msg) {
+        if (!value) {
+            error(msg);
+        }
+    }
+
+    private static <T extends Comparable<T>> int compare(T lhs, T rhs, String msg) {
+        assertNotNull(lhs, msg);
+        assertNotNull(rhs, msg);
+        return lhs.compareTo(rhs);
+    }
+
+    private static String format(Object o) {
+        return o == null? "null" : o.toString();
+    }
+
+    private static void error(String msg) {
+        throw new RuntimeException(msg);
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/lib/testlibrary/jdk/testlibrary/InputArguments.java	Wed Apr 23 15:10:18 2014 +0100
@@ -0,0 +1,88 @@
+/*
+ * 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.
+ */
+
+package jdk.testlibrary;
+
+import java.lang.management.RuntimeMXBean;
+import java.lang.management.ManagementFactory;
+import java.util.List;
+
+/**
+ * This class provides access to the input arguments to the VM.
+ */
+public class InputArguments {
+    private static final List<String> args;
+
+    static {
+        RuntimeMXBean runtimeMxBean = ManagementFactory.getRuntimeMXBean();
+        args = runtimeMxBean.getInputArguments();
+    }
+
+    /**
+     * Returns true if {@code arg} is an input argument to the VM.
+     *
+     * This is useful for checking boolean flags such as -XX:+UseSerialGC or
+     * -XX:-UsePerfData.
+     *
+     * @param arg The name of the argument.
+     * @return {@code true} if the given argument is an input argument,
+     *         otherwise {@code false}.
+     */
+    public static boolean contains(String arg) {
+        return args.contains(arg);
+    }
+
+    /**
+     * Returns true if {@code prefix} is the start of an input argument to the
+     * VM.
+     *
+     * This is useful for checking if flags describing a quantity, such as
+     * -XX:+MaxMetaspaceSize=100m, is set without having to know the quantity.
+     * To check if the flag -XX:MaxMetaspaceSize is set, use
+     * {@code InputArguments.containsPrefix("-XX:MaxMetaspaceSize")}.
+     *
+     * @param prefix The start of the argument.
+     * @return {@code true} if the given argument is the start of an input
+     *         argument, otherwise {@code false}.
+     */
+    public static boolean containsPrefix(String prefix) {
+        for (String arg : args) {
+            if (arg.startsWith(prefix)) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    /**
+     * Get the string containing input arguments passed to the VM
+     */
+    public static String getInputArguments() {
+        StringBuilder result = new StringBuilder();
+        for (String arg : args)
+            result.append(arg).append(' ');
+
+        return result.toString();
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/lib/testlibrary/jdk/testlibrary/JDKToolFinder.java	Wed Apr 23 15:10:18 2014 +0100
@@ -0,0 +1,106 @@
+/*
+ * 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.
+ */
+
+package jdk.testlibrary;
+
+import java.io.FileNotFoundException;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+
+public final class JDKToolFinder {
+
+    private JDKToolFinder() {
+    }
+
+    /**
+     * Returns the full path to an executable in jdk/bin based on System
+     * property {@code test.jdk} or {@code compile.jdk} (both are set by the jtreg test suite)
+     *
+     * @return Full path to an executable in jdk/bin
+     */
+    public static String getJDKTool(String tool) {
+
+        // First try to find the executable in test.jdk
+        try {
+            return getTool(tool, "test.jdk");
+        } catch (FileNotFoundException e) {
+
+        }
+
+        // Now see if it's available in compile.jdk
+        try {
+            return getTool(tool, "compile.jdk");
+        } catch (FileNotFoundException e) {
+            throw new RuntimeException("Failed to find " + tool +
+                    ", looked in test.jdk (" + System.getProperty("test.jdk") +
+                    ") and compile.jdk (" + System.getProperty("compile.jdk") + ")");
+        }
+    }
+
+    /**
+     * Returns the full path to an executable in jdk/bin based on System
+     * property {@code compile.jdk}
+     *
+     * @return Full path to an executable in jdk/bin
+     */
+    public static String getCompileJDKTool(String tool) {
+        try {
+            return getTool(tool, "compile.jdk");
+        } catch (FileNotFoundException e) {
+            throw new RuntimeException(e);
+        }
+    }
+
+    /**
+     * Returns the full path to an executable in jdk/bin based on System
+     * property {@code test.jdk}
+     *
+     * @return Full path to an executable in jdk/bin
+     */
+    public static String getTestJDKTool(String tool) {
+        try {
+            return getTool(tool, "test.jdk");
+        } catch (FileNotFoundException e) {
+            throw new RuntimeException(e);
+        }
+    }
+
+    private static String getTool(String tool, String property) throws FileNotFoundException {
+        String jdkPath = System.getProperty(property);
+
+        if (jdkPath == null) {
+            throw new RuntimeException(
+                    "System property '" + property + "' not set. This property is normally set by jtreg. "
+                    + "When running test separately, set this property using '-D" + property + "=/path/to/jdk'.");
+        }
+
+        Path toolName = Paths.get("bin", tool + (Platform.isWindows() ? ".exe" : ""));
+
+        Path jdkTool = Paths.get(jdkPath, toolName.toString());
+        if (!jdkTool.toFile().exists()) {
+            throw new FileNotFoundException("Could not find file " + jdkTool.toAbsolutePath());
+        }
+
+        return jdkTool.toAbsolutePath().toString();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/lib/testlibrary/jdk/testlibrary/JDKToolLauncher.java	Wed Apr 23 15:10:18 2014 +0100
@@ -0,0 +1,134 @@
+/*
+ * 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.
+ */
+
+package jdk.testlibrary;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+/**
+ * A utility for constructing command lines for starting JDK tool processes.
+ *
+ * The JDKToolLauncher can in particular be combined with a
+ * java.lang.ProcessBuilder to easily run a JDK tool. For example, the following
+ * code run {@code jmap -heap} against a process with GC logging turned on for
+ * the {@code jmap} process:
+ *
+ * <pre>
+ * {@code
+ * JDKToolLauncher jmap = JDKToolLauncher.create("jmap")
+ *                                       .addVMArg("-XX:+PrintGC");
+ *                                       .addVMArg("-XX:+PrintGCDetails")
+ *                                       .addToolArg("-heap")
+ *                                       .addToolArg(pid);
+ * ProcessBuilder pb = new ProcessBuilder(jmap.getCommand());
+ * Process p = pb.start();
+ * }
+ * </pre>
+ */
+public class JDKToolLauncher {
+    private final String executable;
+    private final List<String> vmArgs = new ArrayList<String>();
+    private final List<String> toolArgs = new ArrayList<String>();
+
+    private JDKToolLauncher(String tool, boolean useCompilerJDK) {
+        if (useCompilerJDK) {
+            executable = JDKToolFinder.getJDKTool(tool);
+        } else {
+            executable = JDKToolFinder.getTestJDKTool(tool);
+        }
+        vmArgs.addAll(Arrays.asList(ProcessTools.getPlatformSpecificVMArgs()));
+    }
+
+    /**
+     * Creates a new JDKToolLauncher for the specified tool. Using tools path
+     * from the compiler JDK.
+     *
+     * @param tool
+     *            The name of the tool
+     * @return A new JDKToolLauncher
+     */
+    public static JDKToolLauncher create(String tool) {
+        return new JDKToolLauncher(tool, true);
+    }
+
+    /**
+     * Creates a new JDKToolLauncher for the specified tool in the Tested JDK.
+     *
+     * @param tool
+     *            The name of the tool
+     *
+     * @return A new JDKToolLauncher
+     */
+    public static JDKToolLauncher createUsingTestJDK(String tool) {
+        return new JDKToolLauncher(tool, false);
+    }
+
+    /**
+     * Adds an argument to the JVM running the tool.
+     *
+     * The JVM arguments are passed to the underlying JVM running the tool.
+     * Arguments will automatically be prepended with "-J".
+     *
+     * Any platform specific arguments required for running the tool are
+     * automatically added.
+     *
+     *
+     * @param arg
+     *            The argument to VM running the tool
+     * @return The JDKToolLauncher instance
+     */
+    public JDKToolLauncher addVMArg(String arg) {
+        vmArgs.add(arg);
+        return this;
+    }
+
+    /**
+     * Adds an argument to the tool.
+     *
+     * @param arg
+     *            The argument to the tool
+     * @return The JDKToolLauncher instance
+     */
+    public JDKToolLauncher addToolArg(String arg) {
+        toolArgs.add(arg);
+        return this;
+    }
+
+    /**
+     * Returns the command that can be used for running the tool.
+     *
+     * @return An array whose elements are the arguments of the command.
+     */
+    public String[] getCommand() {
+        List<String> command = new ArrayList<String>();
+        command.add(executable);
+        // Add -J in front of all vmArgs
+        for (String arg : vmArgs) {
+            command.add("-J" + arg);
+        }
+        command.addAll(toolArgs);
+        return command.toArray(new String[command.size()]);
+    }
+}
--- a/test/lib/testlibrary/jdk/testlibrary/JcmdBase.java	Fri Apr 18 23:39:11 2014 +0100
+++ b/test/lib/testlibrary/jdk/testlibrary/JcmdBase.java	Wed Apr 23 15:10:18 2014 +0100
@@ -23,8 +23,11 @@
 
 package jdk.testlibrary;
 
-import java.util.ArrayList;
+import java.util.Arrays;
 
+/**
+ * Super class for tests which need to attach jcmd to the current process.
+ */
 public class JcmdBase {
 
     private static ProcessBuilder processBuilder = new ProcessBuilder();
@@ -32,46 +35,24 @@
     /**
      * Attach jcmd to the current process
      *
-     * @param commandArgs
-     *            jcmd command line parameters, e.g. JFR.start
+     * @param toolArgs
+     *            jcmd command line parameters, e.g. VM.flags
      * @return jcmd output
      * @throws Exception
      */
-    public final static OutputAnalyzer jcmd(String... commandArgs)
+    public final static OutputAnalyzer jcmd(String... toolArgs)
             throws Exception {
-        ArrayList<String> cmd = new ArrayList<String>();
-        String cmdString = "";
-
-        // jcmd from the jdk to be tested
-        String jcmdPath = JdkFinder.getTool("jcmd", false);
-        cmd.add(jcmdPath);
-        cmdString += jcmdPath;
-
-        String pid = Integer.toString(ProcessTools.getProcessId());
-        cmd.add(pid);
-        cmdString += " " + pid;
-
-        for (int i = 0; i < commandArgs.length; i++) {
-            cmd.add(commandArgs[i]);
-            cmdString += " " + commandArgs[i];
+        JDKToolLauncher launcher = JDKToolLauncher.createUsingTestJDK("jcmd");
+        launcher.addToolArg(Integer.toString(ProcessTools.getProcessId()));
+        for (String toolArg : toolArgs) {
+            launcher.addToolArg(toolArg);
         }
-
-        // Log command line for debugging purpose
-        System.out.println("Command line:");
-        System.out.println(cmdString);
-
-        processBuilder.command(cmd);
+        processBuilder.command(launcher.getCommand());
+        System.out.println(Arrays.toString(processBuilder.command().toArray()).replace(",", ""));
         OutputAnalyzer output = new OutputAnalyzer(processBuilder.start());
-
-        // Log output for debugging purpose
-        System.out.println("Command output:");
         System.out.println(output.getOutput());
 
-        if (output.getExitValue() != 0) {
-            throw new Exception(processBuilder.command()
-                    + " resulted in exit value " + output.getExitValue()
-                    + " , expected to get 0");
-        }
+        output.shouldHaveExitValue(0);
 
         return output;
     }
--- a/test/lib/testlibrary/jdk/testlibrary/JdkFinder.java	Fri Apr 18 23:39:11 2014 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,78 +0,0 @@
-/*
- * 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.
- */
-
-package jdk.testlibrary;
-
-import java.io.File;
-
-public final class JdkFinder {
-
-    private JdkFinder() {
-    }
-
-    private static String getExecutable(String executable, String property) {
-        String binPath = System.getProperty(property);
-        if (binPath == null) {
-            throw new RuntimeException(
-                    "System property '" + property + "' not set");
-        }
-
-        binPath += File.separatorChar + "bin" + File.separatorChar + executable;
-
-        return binPath;
-    }
-
-    /**
-     * Returns the full path to a java launcher in jdk/bin based on system
-     * property.
-     *
-     * @param stableJdk
-     *            see {@link #getTool(String, boolean)}
-     * @return Full path to a java launcher in jdk/bin.
-     */
-    public static String getJavaLauncher(boolean stableJdk) {
-        return getTool("java", stableJdk);
-    }
-
-    /**
-     * Returns the full path to an executable in jdk/bin based on system
-     * property. Depending on value of {@code stableJdk} the method will look for
-     * either 'compile.jdk' or 'test.jdk' system properties.
-     * 'test.jdk' is normally set by jtreg. When running test separately,
-     * set this property using '-Dtest.jdk=/path/to/jdk'.
-     *
-     * @param stableJdk
-     *            If {@code true} the {@code tool} will be retrieved
-     *            from the compile (stable) JDK.
-     *            If {@code false} the {@code tool} will be retrieved
-     *            from the test JDK.
-     * @return Full path to an executable in jdk/bin.
-     */
-    public static String getTool(String tool, boolean stableJdk) {
-        if (stableJdk) {
-            return getExecutable(tool, "compile.jdk");
-        } else {
-            return getExecutable(tool, "test.jdk");
-        }
-    }
-}
--- a/test/lib/testlibrary/jdk/testlibrary/OutputAnalyzer.java	Fri Apr 18 23:39:11 2014 +0100
+++ b/test/lib/testlibrary/jdk/testlibrary/OutputAnalyzer.java	Wed Apr 23 15:10:18 2014 +0100
@@ -27,6 +27,9 @@
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
+/**
+ * Utility class for verifying output and exit value from a {@code Process}.
+ */
 public final class OutputAnalyzer {
 
     private final String stdout;
@@ -85,9 +88,9 @@
     public void shouldContain(String expectedString) {
         if (!stdout.contains(expectedString)
                 && !stderr.contains(expectedString)) {
+            reportDiagnosticSummary();
             throw new RuntimeException("'" + expectedString
-                    + "' missing from stdout/stderr: [" + stdout + stderr
-                    + "]\n");
+                    + "' missing from stdout/stderr \n");
         }
     }
 
@@ -101,8 +104,9 @@
      */
     public void stdoutShouldContain(String expectedString) {
         if (!stdout.contains(expectedString)) {
+            reportDiagnosticSummary();
             throw new RuntimeException("'" + expectedString
-                    + "' missing from stdout: [" + stdout + "]\n");
+                    + "' missing from stdout \n");
         }
     }
 
@@ -116,8 +120,9 @@
      */
     public void stderrShouldContain(String expectedString) {
         if (!stderr.contains(expectedString)) {
+            reportDiagnosticSummary();
             throw new RuntimeException("'" + expectedString
-                    + "' missing from stderr: [" + stderr + "]\n");
+                    + "' missing from stderr \n");
         }
     }
 
@@ -132,12 +137,14 @@
      */
     public void shouldNotContain(String notExpectedString) {
         if (stdout.contains(notExpectedString)) {
+            reportDiagnosticSummary();
             throw new RuntimeException("'" + notExpectedString
-                    + "' found in stdout: [" + stdout + "]\n");
+                    + "' found in stdout \n");
         }
         if (stderr.contains(notExpectedString)) {
+            reportDiagnosticSummary();
             throw new RuntimeException("'" + notExpectedString
-                    + "' found in stderr: [" + stderr + "]\n");
+                    + "' found in stderr \n");
         }
     }
 
@@ -152,8 +159,9 @@
      */
     public void stdoutShouldNotContain(String notExpectedString) {
         if (stdout.contains(notExpectedString)) {
+            reportDiagnosticSummary();
             throw new RuntimeException("'" + notExpectedString
-                    + "' found in stdout: [" + stdout + "]\n");
+                    + "' found in stdout \n");
         }
     }
 
@@ -168,55 +176,63 @@
      */
     public void stderrShouldNotContain(String notExpectedString) {
         if (stderr.contains(notExpectedString)) {
+            reportDiagnosticSummary();
             throw new RuntimeException("'" + notExpectedString
-                    + "' found in stderr: [" + stderr + "]\n");
+                    + "' found in stderr \n");
         }
     }
 
     /**
-     * Verify that the stdout and stderr contents of output buffer matches
-     * the pattern
+     * Verify that the stdout and stderr contents of output buffer matches the
+     * pattern
      *
      * @param pattern
-     * @throws RuntimeException If the pattern was not found
+     * @throws RuntimeException
+     *             If the pattern was not found
      */
     public void shouldMatch(String pattern) {
-        Matcher stdoutMatcher = Pattern.compile(pattern, Pattern.MULTILINE).matcher(stdout);
-        Matcher stderrMatcher = Pattern.compile(pattern, Pattern.MULTILINE).matcher(stderr);
+        Matcher stdoutMatcher = Pattern.compile(pattern, Pattern.MULTILINE)
+                .matcher(stdout);
+        Matcher stderrMatcher = Pattern.compile(pattern, Pattern.MULTILINE)
+                .matcher(stderr);
         if (!stdoutMatcher.find() && !stderrMatcher.find()) {
+            reportDiagnosticSummary();
             throw new RuntimeException("'" + pattern
-                    + "' missing from stdout/stderr: [" + stdout + stderr
-                    + "]\n");
+                    + "' missing from stdout/stderr \n");
         }
     }
 
     /**
-     * Verify that the stdout contents of output buffer matches the
-     * pattern
+     * Verify that the stdout contents of output buffer matches the pattern
      *
      * @param pattern
-     * @throws RuntimeException If the pattern was not found
+     * @throws RuntimeException
+     *             If the pattern was not found
      */
     public void stdoutShouldMatch(String pattern) {
-        Matcher matcher = Pattern.compile(pattern, Pattern.MULTILINE).matcher(stdout);
+        Matcher matcher = Pattern.compile(pattern, Pattern.MULTILINE).matcher(
+                stdout);
         if (!matcher.find()) {
+            reportDiagnosticSummary();
             throw new RuntimeException("'" + pattern
-                    + "' missing from stdout: [" + stdout + "]\n");
+                    + "' missing from stdout \n");
         }
     }
 
     /**
-     * Verify that the stderr contents of output buffer matches the
-     * pattern
+     * Verify that the stderr contents of output buffer matches the pattern
      *
      * @param pattern
-     * @throws RuntimeException If the pattern was not found
+     * @throws RuntimeException
+     *             If the pattern was not found
      */
     public void stderrShouldMatch(String pattern) {
-        Matcher matcher = Pattern.compile(pattern, Pattern.MULTILINE).matcher(stderr);
+        Matcher matcher = Pattern.compile(pattern, Pattern.MULTILINE).matcher(
+                stderr);
         if (!matcher.find()) {
+            reportDiagnosticSummary();
             throw new RuntimeException("'" + pattern
-                    + "' missing from stderr: [" + stderr + "]\n");
+                    + "' missing from stderr \n");
         }
     }
 
@@ -225,18 +241,22 @@
      * match the pattern
      *
      * @param pattern
-     * @throws RuntimeException If the pattern was found
+     * @throws RuntimeException
+     *             If the pattern was found
      */
     public void shouldNotMatch(String pattern) {
-        Matcher matcher = Pattern.compile(pattern, Pattern.MULTILINE).matcher(stdout);
+        Matcher matcher = Pattern.compile(pattern, Pattern.MULTILINE).matcher(
+                stdout);
         if (matcher.find()) {
-            throw new RuntimeException("'" + pattern
-                    + "' found in stdout: [" + stdout + "]\n");
+            reportDiagnosticSummary();
+            throw new RuntimeException("'" + pattern + "' found in stdout: '"
+                    + matcher.group() + "' \n");
         }
         matcher = Pattern.compile(pattern, Pattern.MULTILINE).matcher(stderr);
         if (matcher.find()) {
-            throw new RuntimeException("'" + pattern
-                    + "' found in stderr: [" + stderr + "]\n");
+            reportDiagnosticSummary();
+            throw new RuntimeException("'" + pattern + "' found in stderr: '"
+                    + matcher.group() + "' \n");
         }
     }
 
@@ -245,13 +265,15 @@
      * pattern
      *
      * @param pattern
-     * @throws RuntimeException If the pattern was found
+     * @throws RuntimeException
+     *             If the pattern was found
      */
     public void stdoutShouldNotMatch(String pattern) {
-        Matcher matcher = Pattern.compile(pattern, Pattern.MULTILINE).matcher(stdout);
+        Matcher matcher = Pattern.compile(pattern, Pattern.MULTILINE).matcher(
+                stdout);
         if (matcher.find()) {
-            throw new RuntimeException("'" + pattern
-                    + "' found in stdout: [" + stdout + "]\n");
+            reportDiagnosticSummary();
+            throw new RuntimeException("'" + pattern + "' found in stdout \n");
         }
     }
 
@@ -260,18 +282,56 @@
      * pattern
      *
      * @param pattern
-     * @throws RuntimeException If the pattern was found
+     * @throws RuntimeException
+     *             If the pattern was found
      */
     public void stderrShouldNotMatch(String pattern) {
-        Matcher matcher = Pattern.compile(pattern, Pattern.MULTILINE).matcher(stderr);
+        Matcher matcher = Pattern.compile(pattern, Pattern.MULTILINE).matcher(
+                stderr);
         if (matcher.find()) {
-            throw new RuntimeException("'" + pattern
-                    + "' found in stderr: [" + stderr + "]\n");
+            reportDiagnosticSummary();
+            throw new RuntimeException("'" + pattern + "' found in stderr \n");
         }
     }
 
     /**
-     * Verifiy the exit value of the process
+     * Get the captured group of the first string matching the pattern. stderr
+     * is searched before stdout.
+     *
+     * @param pattern
+     *            The multi-line pattern to match
+     * @param group
+     *            The group to capture
+     * @return The matched string or null if no match was found
+     */
+    public String firstMatch(String pattern, int group) {
+        Matcher stderrMatcher = Pattern.compile(pattern, Pattern.MULTILINE)
+                .matcher(stderr);
+        Matcher stdoutMatcher = Pattern.compile(pattern, Pattern.MULTILINE)
+                .matcher(stdout);
+        if (stderrMatcher.find()) {
+            return stderrMatcher.group(group);
+        }
+        if (stdoutMatcher.find()) {
+            return stdoutMatcher.group(group);
+        }
+        return null;
+    }
+
+    /**
+     * Get the first string matching the pattern. stderr is searched before
+     * stdout.
+     *
+     * @param pattern
+     *            The multi-line pattern to match
+     * @return The matched string or null if no match was found
+     */
+    public String firstMatch(String pattern) {
+        return firstMatch(pattern, 0);
+    }
+
+    /**
+     * Verify the exit value of the process
      *
      * @param expectedExitValue
      *            Expected exit value from process
@@ -281,12 +341,25 @@
      */
     public void shouldHaveExitValue(int expectedExitValue) {
         if (getExitValue() != expectedExitValue) {
-            throw new RuntimeException("Exit value " + getExitValue()
-                    + " , expected to get " + expectedExitValue);
+            reportDiagnosticSummary();
+            throw new RuntimeException("Expected to get exit value of ["
+                    + expectedExitValue + "]\n");
         }
     }
 
     /**
+     * Report summary that will help to diagnose the problem Currently includes:
+     * - standard input produced by the process under test - standard output -
+     * exit code Note: the command line is printed by the ProcessTools
+     */
+    private void reportDiagnosticSummary() {
+        String msg = " stdout: [" + stdout + "];\n" + " stderr: [" + stderr
+                + "]\n" + " exitValue = " + getExitValue() + "\n";
+
+        System.err.println(msg);
+    }
+
+    /**
      * Get the contents of the output buffer (stdout and stderr)
      *
      * @return Content of the output buffer
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/lib/testlibrary/jdk/testlibrary/Platform.java	Wed Apr 23 15:10:18 2014 +0100
@@ -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.
+ */
+
+package jdk.testlibrary;
+
+public class Platform {
+    private static final String osName      = System.getProperty("os.name");
+    private static final String dataModel   = System.getProperty("sun.arch.data.model");
+    private static final String vmVersion   = System.getProperty("java.vm.version");
+    private static final String osArch      = System.getProperty("os.arch");
+
+    public static boolean is32bit() {
+        return dataModel.equals("32");
+    }
+
+    public static boolean is64bit() {
+        return dataModel.equals("64");
+    }
+
+    public static boolean isSolaris() {
+        return isOs("sunos");
+    }
+
+    public static boolean isWindows() {
+        return isOs("win");
+    }
+
+    public static boolean isOSX() {
+        return isOs("mac");
+    }
+
+    public static boolean isLinux() {
+        return isOs("linux");
+    }
+
+    private static boolean isOs(String osname) {
+        return osName.toLowerCase().startsWith(osname.toLowerCase());
+    }
+
+    public static String getOsName() {
+        return osName;
+    }
+
+    public static boolean isDebugBuild() {
+        return vmVersion.toLowerCase().contains("debug");
+    }
+
+    public static String getVMVersion() {
+        return vmVersion;
+    }
+
+    // Returns true for sparc and sparcv9.
+    public static boolean isSparc() {
+        return isArch("sparc");
+    }
+
+    public static boolean isARM() {
+        return isArch("arm");
+    }
+
+    public static boolean isPPC() {
+        return isArch("ppc");
+    }
+
+    public static boolean isX86() {
+        // On Linux it's 'i386', Windows 'x86'
+        return (isArch("i386") || isArch("x86"));
+    }
+
+    public static boolean isX64() {
+        // On OSX it's 'x86_64' and on other (Linux, Windows and Solaris) platforms it's 'amd64'
+        return (isArch("amd64") || isArch("x86_64"));
+    }
+
+    private static boolean isArch(String archname) {
+        return osArch.toLowerCase().startsWith(archname.toLowerCase());
+    }
+
+    public static String getOsArch() {
+        return osArch;
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/lib/testlibrary/jdk/testlibrary/ProcessThread.java	Wed Apr 23 15:10:18 2014 +0100
@@ -0,0 +1,143 @@
+/*
+ * 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.
+ */
+
+package jdk.testlibrary;
+
+import static jdk.testlibrary.Asserts.assertNotEquals;
+import static jdk.testlibrary.Asserts.assertTrue;
+
+import java.util.List;
+import java.util.concurrent.CountDownLatch;
+
+/**
+ * The helper class for starting and stopping {@link Process} in a separate thread.
+ */
+public class ProcessThread extends TestThread {
+
+    /**
+     * Creates a new {@code ProcessThread} object.
+     *
+     * @param threadName The name of thread
+     * @param cmd The string array of program and its arguments to pass to {@link ProcessBuilder}
+     */
+    public ProcessThread(String threadName, String... cmd) {
+        super(new ProcessRunnable(new ProcessBuilder(cmd)), threadName);
+    }
+
+    /**
+     * Creates a new {@code ProcessThread} object.
+     *
+     * @param threadName The name of thread.
+     * @param pb The ProcessBuilder to execute.
+     */
+    public ProcessThread(String threadName, ProcessBuilder pb) {
+        super(new ProcessRunnable(pb), threadName);
+    }
+
+    /**
+     * Stops {@link Process} started by {@code ProcessRunnable}.
+     *
+     * @throws InterruptedException
+     */
+    public void stopProcess() throws InterruptedException {
+        ((ProcessRunnable) getRunnable()).stopProcess();
+    }
+
+    /**
+     * @return The process output, or null if the process has not yet completed.
+     */
+    public OutputAnalyzer getOutput() {
+        return ((ProcessRunnable) getRunnable()).getOutput();
+    }
+
+    /**
+     * {@link Runnable} interface for starting and stopping {@link Process}.
+     */
+    static class ProcessRunnable extends XRun {
+
+        private final ProcessBuilder processBuilder;
+        private final CountDownLatch latch;
+        private volatile Process process;
+        private volatile OutputAnalyzer output;
+
+        /**
+         * Creates a new {@code ProcessRunnable} object.
+         *
+         * @param pb The {@link ProcessBuilder} to run.
+         */
+        public ProcessRunnable(ProcessBuilder pb) {
+            super();
+            this.processBuilder = pb;
+            this.latch = new CountDownLatch(1);
+        }
+
+        /**
+         * Starts the process in {@code ProcessThread}.
+         * All exceptions which occurs here will be caught and stored in {@code ProcessThread}.
+         *
+         * see {@link XRun}
+         */
+        @Override
+        public void xrun() throws Throwable {
+            this.process = processBuilder.start();
+            // Release when process is started
+            latch.countDown();
+
+            // Will block...
+            try {
+                output = new OutputAnalyzer(this.process);
+            } catch (Throwable t) {
+                String name = Thread.currentThread().getName();
+                System.out.println(String.format("ProcessThread[%s] failed: %s", name, t.toString()));
+                throw t;
+            } finally {
+                String logMsg = ProcessTools.getProcessLog(processBuilder, output);
+                System.out.println(logMsg);
+            }
+        }
+
+        /**
+         * Stops the process.
+         *
+         * @throws InterruptedException
+         */
+        public void stopProcess() throws InterruptedException {
+            // Wait until process is started
+            latch.await();
+            if (this.process != null) {
+                System.out.println("ProcessThread.stopProcess() will kill process");
+                this.process.destroy();
+            }
+        }
+
+        /**
+         * Returns the OutputAnalyzer with stdout/stderr from the process.
+         * @return The process output, or null if process not completed.
+         * @throws InterruptedException
+         */
+        public OutputAnalyzer getOutput() {
+            return output;
+        }
+    }
+
+}
--- a/test/lib/testlibrary/jdk/testlibrary/ProcessTools.java	Fri Apr 18 23:39:11 2014 +0100
+++ b/test/lib/testlibrary/jdk/testlibrary/ProcessTools.java	Wed Apr 23 15:10:18 2014 +0100
@@ -25,24 +25,107 @@
 
 import java.io.ByteArrayOutputStream;
 import java.io.IOException;
+import java.io.PrintStream;
 import java.lang.management.ManagementFactory;
 import java.lang.management.RuntimeMXBean;
 import java.lang.reflect.Field;
 import java.lang.reflect.Method;
 import java.util.ArrayList;
 import java.util.Collections;
+import java.util.Map;
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.Future;
+import java.util.concurrent.Phaser;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.TimeoutException;
 
 import sun.management.VMManagement;
 
 public final class ProcessTools {
+    private static final class LineForwarder extends StreamPumper.LinePump {
+        private final PrintStream ps;
+        private final String prefix;
+        LineForwarder(String prefix, PrintStream os) {
+            this.ps = os;
+            this.prefix = prefix;
+        }
+        @Override
+        protected void processLine(String line) {
+            ps.println("[" + prefix + "] " + line);
+        }
+    }
 
     private ProcessTools() {
     }
 
     /**
+     * <p>Starts a process from its builder.</p>
+     * <span>The default redirects of STDOUT and STDERR are started</span>
+     * @param name The process name
+     * @param processBuilder The process builder
+     * @return Returns the initialized process
+     * @throws IOException
+     */
+    public static Process startProcess(String name,
+                                       ProcessBuilder processBuilder)
+    throws IOException {
+        Process p = null;
+        try {
+            p = startProcess(name, processBuilder, -1, TimeUnit.NANOSECONDS);
+        } catch (InterruptedException | TimeoutException e) {
+            // can't ever happen
+        }
+        return p;
+    }
+
+    /**
+     * <p>Starts a process from its builder.</p>
+     * <span>The default redirects of STDOUT and STDERR are started</span>
+     * @param name The process name
+     * @param processBuilder The process builder
+     * @param timeout The timeout for the warmup waiting
+     * @param unit The timeout {@linkplain TimeUnit}
+     * @return Returns the initialized {@linkplain Process}
+     * @throws IOException
+     * @throws InterruptedException
+     * @throws TimeoutException
+     */
+    public static Process startProcess(String name,
+                                       ProcessBuilder processBuilder,
+                                       long timeout,
+                                       TimeUnit unit)
+    throws IOException, InterruptedException, TimeoutException {
+        Process p = processBuilder.start();
+        StreamPumper stdout = new StreamPumper(p.getInputStream());
+        StreamPumper stderr = new StreamPumper(p.getErrorStream());
+
+        stdout.addPump(new LineForwarder(name, System.out));
+        stderr.addPump(new LineForwarder(name, System.err));
+        final Phaser phs = new Phaser(1);
+        Future<Void> stdoutTask = stdout.process();
+        Future<Void> stderrTask = stderr.process();
+
+        try {
+            if (timeout > -1) {
+                phs.awaitAdvanceInterruptibly(0, timeout, unit);
+            }
+        } catch (TimeoutException | InterruptedException e) {
+            System.err.println("Failed to start a process (thread dump follows)");
+            for(Map.Entry<Thread, StackTraceElement[]> s : Thread.getAllStackTraces().entrySet()) {
+                printStack(s.getKey(), s.getValue());
+            }
+            stdoutTask.cancel(true);
+            stderrTask.cancel(true);
+            throw e;
+        }
+
+        return p;
+    }
+
+    /**
      * Pumps stdout and stderr from running the process into a String.
      *
-     * @param processHandler
+     * @param processBuilder
      *            ProcessHandler to run.
      * @return Output from process.
      * @throws IOException
@@ -69,22 +152,19 @@
                 stdoutBuffer);
         StreamPumper errPumper = new StreamPumper(process.getErrorStream(),
                 stderrBuffer);
-        Thread outPumperThread = new Thread(outPumper);
-        Thread errPumperThread = new Thread(errPumper);
 
-        outPumperThread.setDaemon(true);
-        errPumperThread.setDaemon(true);
-
-        outPumperThread.start();
-        errPumperThread.start();
+        Future<Void> outTask = outPumper.process();
+        Future<Void> errTask = errPumper.process();
 
         try {
             process.waitFor();
-            outPumperThread.join();
-            errPumperThread.join();
+            outTask.get();
+            errTask.get();
         } catch (InterruptedException e) {
             Thread.currentThread().interrupt();
             return null;
+        } catch (ExecutionException e) {
+            throw new IOException(e);
         }
 
         return new OutputBuffer(stdoutBuffer.toString(),
@@ -137,15 +217,106 @@
      */
     public static ProcessBuilder createJavaProcessBuilder(String... command)
             throws Exception {
-        String javapath = JdkFinder.getJavaLauncher(false);
+        String javapath = JDKToolFinder.getJDKTool("java");
 
         ArrayList<String> args = new ArrayList<>();
         args.add(javapath);
         Collections.addAll(args, getPlatformSpecificVMArgs());
         Collections.addAll(args, command);
 
+        // Reporting
+        StringBuilder cmdLine = new StringBuilder();
+        for (String cmd : args)
+            cmdLine.append(cmd).append(' ');
+        System.out.println("Command line: [" + cmdLine.toString() + "]");
+
         return new ProcessBuilder(args.toArray(new String[args.size()]));
+    }
 
+    private static void printStack(Thread t, StackTraceElement[] stack) {
+        System.out.println("\t" +  t +
+                           " stack: (length = " + stack.length + ")");
+        if (t != null) {
+            for (StackTraceElement stack1 : stack) {
+                System.out.println("\t" + stack1);
+            }
+            System.out.println();
+        }
+    }
+
+    /**
+     * Executes a test jvm process, waits for it to finish and returns the process output.
+     * The default jvm options from jtreg, test.vm.opts and test.java.opts, are added.
+     * The java from the test.jdk is used to execute the command.
+     *
+     * The command line will be like:
+     * {test.jdk}/bin/java {test.vm.opts} {test.java.opts} cmds
+     *
+     * @param cmds User specifed arguments.
+     * @return The output from the process.
+     */
+    public static OutputAnalyzer executeTestJvm(String... cmds) throws Throwable {
+        ProcessBuilder pb = createJavaProcessBuilder(Utils.addTestJavaOpts(cmds));
+        return executeProcess(pb);
     }
 
+    /**
+     * Executes a process, waits for it to finish and returns the process output.
+     * @param pb The ProcessBuilder to execute.
+     * @return The output from the process.
+     */
+    public static OutputAnalyzer executeProcess(ProcessBuilder pb) throws Throwable {
+        OutputAnalyzer output = null;
+        try {
+            output = new OutputAnalyzer(pb.start());
+            return output;
+        } catch (Throwable t) {
+            System.out.println("executeProcess() failed: " + t);
+            throw t;
+        } finally {
+            System.out.println(getProcessLog(pb, output));
+        }
+    }
+
+    /**
+     * Executes a process, waits for it to finish and returns the process output.
+     * @param cmds The command line to execute.
+     * @return The output from the process.
+     */
+    public static OutputAnalyzer executeProcess(String... cmds) throws Throwable {
+        return executeProcess(new ProcessBuilder(cmds));
+    }
+
+    /**
+     * Used to log command line, stdout, stderr and exit code from an executed process.
+     * @param pb The executed process.
+     * @param output The output from the process.
+     */
+    public static String getProcessLog(ProcessBuilder pb, OutputAnalyzer output) {
+        String stderr = output == null ? "null" : output.getStderr();
+        String stdout = output == null ? "null" : output.getStdout();
+        String exitValue = output == null ? "null": Integer.toString(output.getExitValue());
+        StringBuilder logMsg = new StringBuilder();
+        final String nl = System.getProperty("line.separator");
+        logMsg.append("--- ProcessLog ---" + nl);
+        logMsg.append("cmd: " + getCommandLine(pb) + nl);
+        logMsg.append("exitvalue: " + exitValue + nl);
+        logMsg.append("stderr: " + stderr + nl);
+        logMsg.append("stdout: " + stdout + nl);
+        return logMsg.toString();
+    }
+
+    /**
+     * @return The full command line for the ProcessBuilder.
+     */
+    public static String getCommandLine(ProcessBuilder pb) {
+        if (pb == null) {
+            return "null";
+        }
+        StringBuilder cmd = new StringBuilder();
+        for (String s : pb.command()) {
+            cmd.append(s).append(" ");
+        }
+        return cmd.toString().trim();
+    }
 }
--- a/test/lib/testlibrary/jdk/testlibrary/StreamPumper.java	Fri Apr 18 23:39:11 2014 +0100
+++ b/test/lib/testlibrary/jdk/testlibrary/StreamPumper.java	Wed Apr 23 15:10:18 2014 +0100
@@ -23,16 +23,65 @@
 
 package jdk.testlibrary;
 
+import java.io.BufferedInputStream;
+import java.io.ByteArrayOutputStream;
 import java.io.OutputStream;
 import java.io.InputStream;
 import java.io.IOException;
+import java.util.HashSet;
+import java.util.Set;
+import java.util.concurrent.Future;
+import java.util.concurrent.FutureTask;
+import java.util.concurrent.atomic.AtomicBoolean;
 
 public final class StreamPumper implements Runnable {
 
     private static final int BUF_SIZE = 256;
 
-    private final OutputStream out;
+    /**
+     * Pump will be called by the StreamPumper to process the incoming data
+     */
+    abstract public static class Pump {
+        abstract void register(StreamPumper d);
+    }
+
+    /**
+     * OutputStream -> Pump adapter
+     */
+    final public static class StreamPump extends Pump {
+        private final OutputStream out;
+        public StreamPump(OutputStream out) {
+            this.out = out;
+        }
+
+        @Override
+        void register(StreamPumper sp) {
+            sp.addOutputStream(out);
+        }
+    }
+
+    /**
+     * Used to process the incoming data line-by-line
+     */
+    abstract public static class LinePump extends Pump {
+        @Override
+        final void register(StreamPumper sp) {
+            sp.addLineProcessor(this);
+        }
+
+        abstract protected void processLine(String line);
+    }
+
     private final InputStream in;
+    private final Set<OutputStream> outStreams = new HashSet<>();
+    private final Set<LinePump> linePumps = new HashSet<>();
+
+    private final AtomicBoolean processing = new AtomicBoolean(false);
+    private final FutureTask<Void> processingTask = new FutureTask(this, null);
+
+    public StreamPumper(InputStream in) {
+        this.in = in;
+    }
 
     /**
      * Create a StreamPumper that reads from in and writes to out.
@@ -43,8 +92,8 @@
      *            The stream to write to.
      */
     public StreamPumper(InputStream in, OutputStream out) {
-        this.in = in;
-        this.out = out;
+        this(in);
+        this.addOutputStream(out);
     }
 
     /**
@@ -54,25 +103,97 @@
      */
     @Override
     public void run() {
-        int length;
-        InputStream localIn = in;
-        OutputStream localOut = out;
-        byte[] buffer = new byte[BUF_SIZE];
+        try (BufferedInputStream is = new BufferedInputStream(in)) {
+            ByteArrayOutputStream lineBos = new ByteArrayOutputStream();
+            byte[] buf = new byte[BUF_SIZE];
+            int len = 0;
+            int linelen = 0;
+
+            while ((len = is.read(buf)) > 0 && !Thread.interrupted()) {
+                for(OutputStream out : outStreams) {
+                    out.write(buf, 0, len);
+                }
+                if (!linePumps.isEmpty()) {
+                    int i = 0;
+                    int lastcrlf = -1;
+                    while (i < len) {
+                        if (buf[i] == '\n' || buf[i] == '\r') {
+                            int bufLinelen = i - lastcrlf - 1;
+                            if (bufLinelen > 0) {
+                                lineBos.write(buf, lastcrlf + 1, bufLinelen);
+                            }
+                            linelen += bufLinelen;
 
-        try {
-            while ((length = localIn.read(buffer)) > 0 && !Thread.interrupted()) {
-                localOut.write(buffer, 0, length);
+                            if (linelen > 0) {
+                                lineBos.flush();
+                                final String line = lineBos.toString();
+                                for (LinePump lp : linePumps) {
+                                    lp.processLine(line);
+                                };
+                                lineBos.reset();
+                                linelen = 0;
+                            }
+                            lastcrlf = i;
+                        }
+
+                        i++;
+                    }
+                    if (lastcrlf == -1) {
+                        lineBos.write(buf, 0, len);
+                        linelen += len;
+                    } else if (lastcrlf < len - 1) {
+                        lineBos.write(buf, lastcrlf + 1, len - lastcrlf - 1);
+                        linelen += len - lastcrlf - 1;
+                    }
+                }
             }
+
         } catch (IOException e) {
-            // Just abort if something like this happens.
             e.printStackTrace();
         } finally {
+            for(OutputStream out : outStreams) {
+                try {
+                    out.flush();
+                } catch (IOException e) {}
+            }
             try {
-                localOut.flush();
                 in.close();
-            } catch (IOException e) {
-                e.printStackTrace();
-            }
+            } catch (IOException e) {}
         }
     }
+
+    final void addOutputStream(OutputStream out) {
+        outStreams.add(out);
+    }
+
+    final void addLineProcessor(LinePump lp) {
+        linePumps.add(lp);
+    }
+
+    final public StreamPumper addPump(Pump ... pump) {
+        if (processing.get()) {
+            throw new IllegalStateException("Can not modify pumper while " +
+                                            "processing is in progress");
+        }
+        for(Pump p : pump) {
+            p.register(this);
+        }
+        return this;
+    }
+
+    final public Future<Void> process() {
+        if (!processing.compareAndSet(false, true)) {
+            throw new IllegalStateException("Can not re-run the processing");
+        }
+        Thread t = new Thread(new Runnable() {
+            @Override
+            public void run() {
+                processingTask.run();
+            }
+        });
+        t.setDaemon(true);
+        t.start();
+
+        return processingTask;
+    }
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/lib/testlibrary/jdk/testlibrary/TestThread.java	Wed Apr 23 15:10:18 2014 +0100
@@ -0,0 +1,249 @@
+/*
+ * 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.
+ */
+
+package jdk.testlibrary;
+
+import java.lang.management.ManagementFactory;
+import java.lang.management.ThreadInfo;
+import java.lang.management.ThreadMXBean;
+import java.util.concurrent.TimeoutException;
+
+/**
+ * Thread which catches exceptions thrown during the execution
+ * and stores them for later analysis.
+ *
+ * <pre>
+ * {@code
+ * TestThread thread = new TestThread(new XRun() {
+ *      public void run() {
+ *      // do something
+ *      }
+ * });
+ * thread.start();
+ * // do something
+ * Throwable uncaught = thread.getUncaught();
+ * }
+ * </pre>
+ */
+public class TestThread extends Thread {
+
+    private final Runnable runnable;
+    private volatile Throwable uncaught;
+
+    /**
+     * Returns {@link Runnable} the thread has been created with.
+     *
+     * @return The object whose {@code run} method is called
+     */
+    public Runnable getRunnable() {
+        return runnable;
+    }
+
+    /**
+     * Creates a new {@code TestThread} object.
+     *
+     * @param target The object whose {@code run} method is called
+     * @param name The thread name
+     */
+    public TestThread(Runnable target, String name) {
+        super(target, name);
+        this.runnable = target;
+    }
+
+    /**
+     * Creates a new {@code TestThread} object.
+     *
+     * @param target The object whose {@code run} method is called
+     */
+    public TestThread(Runnable target) {
+        super(target);
+        this.runnable = target;
+    }
+
+    /**
+     * Creates a new {@code TestThread} object.
+     *
+     * @param group The thread group
+     * @param target The object whose {@code run} method is called
+     * @param name The thread name
+     * @param stackSize Stack size
+     */
+    public TestThread(ThreadGroup group, Runnable target, String name,
+            long stackSize) {
+        super(group, target, name, stackSize);
+        this.runnable = target;
+    }
+
+    /**
+     * Creates a new {@code TestThread} object.
+     *
+     * @param group The thread group
+     * @param target The object whose {@code run} method is called
+     * @param name The thread name
+     */
+    public TestThread(ThreadGroup group, Runnable target, String name) {
+        super(group, target, name);
+        this.runnable = target;
+    }
+
+    /**
+     * Creates a new {@code TestThread} object.
+     *
+     * @param group The thread group
+     * @param target The object whose {@code run} method is called
+     */
+    public TestThread(ThreadGroup group, Runnable target) {
+        super(group, target);
+        this.runnable = target;
+    }
+
+    /**
+     * The thread executor.
+     */
+    @Override
+    public void run() {
+        try {
+            super.run();
+        } catch (Throwable t) {
+            uncaught = t;
+        }
+    }
+
+    /**
+     * Returns exception caught during the execution.
+     *
+     * @return {@link Throwable}
+     */
+    public Throwable getUncaught() {
+        return uncaught;
+    }
+
+    /**
+     * Waits for {@link TestThread} to die
+     * and throws exception caught during the execution.
+     *
+     * @throws InterruptedException
+     * @throws Throwable
+     */
+    public void joinAndThrow() throws InterruptedException, Throwable {
+        join();
+        if (uncaught != null) {
+            throw uncaught;
+        }
+    }
+
+    /**
+     * Waits during {@code timeout} for {@link TestThread} to die
+     * and throws exception caught during the execution.
+     *
+     * @param timeout The time to wait in milliseconds
+     * @throws InterruptedException
+     * @throws Throwable
+     */
+    public void joinAndThrow(long timeout) throws InterruptedException,
+            Throwable {
+        join(timeout);
+        if (isAlive()) {
+            throw new TimeoutException();
+        }
+        if (uncaught != null) {
+            throw uncaught;
+        }
+    }
+
+    /**
+     * Waits for {@link TestThread} to die
+     * and returns exception caught during the execution.
+     *
+     * @return Exception caught during the execution
+     * @throws InterruptedException
+     */
+    public Throwable joinAndReturn() throws InterruptedException {
+        join();
+        if (uncaught != null) {
+            return uncaught;
+        }
+        return null;
+    }
+
+    /**
+     * Waits during {@code timeout} for {@link TestThread} to die
+     * and returns exception caught during the execution.
+     *
+     * @param timeout The time to wait in milliseconds
+     * @return Exception caught during the execution
+     * @throws InterruptedException
+     */
+    public Throwable joinAndReturn(long timeout) throws InterruptedException {
+        join(timeout);
+        if (isAlive()) {
+            return new TimeoutException();
+        }
+        if (uncaught != null) {
+            return uncaught;
+        }
+        return null;
+    }
+
+    /**
+     * Waits until {@link TestThread} is in the certain {@link State}
+     * and blocking on {@code object}.
+     *
+     * @param state The thread state
+     * @param object The object to block on
+     */
+    public void waitUntilBlockingOnObject(Thread.State state, Object object) {
+        String want = object == null ? null : object.getClass().getName() + '@'
+                + Integer.toHexString(System.identityHashCode(object));
+        ThreadMXBean tmx = ManagementFactory.getThreadMXBean();
+        while (isAlive()) {
+            ThreadInfo ti = tmx.getThreadInfo(getId());
+            if (ti.getThreadState() == state
+                    && (want == null || want.equals(ti.getLockName()))) {
+                return;
+            }
+            try {
+                Thread.sleep(1);
+            } catch (InterruptedException e) {
+            }
+        }
+    }
+
+    /**
+     * Waits until {@link TestThread} is in native.
+     */
+    public void waitUntilInNative() {
+        ThreadMXBean tmx = ManagementFactory.getThreadMXBean();
+        while (isAlive()) {
+            ThreadInfo ti = tmx.getThreadInfo(getId());
+            if (ti.isInNative()) {
+                return;
+            }
+            try {
+                Thread.sleep(1);
+            } catch (InterruptedException e) {
+            }
+        }
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/lib/testlibrary/jdk/testlibrary/Utils.java	Wed Apr 23 15:10:18 2014 +0100
@@ -0,0 +1,232 @@
+/*
+ * 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.
+ */
+
+package jdk.testlibrary;
+
+import static jdk.testlibrary.Asserts.assertTrue;
+
+import java.io.IOException;
+import java.net.InetAddress;
+import java.net.ServerSocket;
+import java.net.UnknownHostException;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.regex.Pattern;
+import java.util.regex.Matcher;
+
+/**
+ * Common library for various test helper functions.
+ */
+public final class Utils {
+
+    /**
+     * Returns the sequence used by operating system to separate lines.
+     */
+    public static final String NEW_LINE = System.getProperty("line.separator");
+
+    /**
+     * Returns the value of 'test.vm.opts'system property.
+     */
+    public static final String VM_OPTIONS = System.getProperty("test.vm.opts", "").trim();
+
+    /**
+     * Returns the value of 'test.java.opts'system property.
+     */
+    public static final String JAVA_OPTIONS = System.getProperty("test.java.opts", "").trim();
+
+
+    private Utils() {
+        // Private constructor to prevent class instantiation
+    }
+
+    /**
+     * Returns the list of VM options.
+     *
+     * @return List of VM options
+     */
+    public static List<String> getVmOptions() {
+        return Arrays.asList(safeSplitString(VM_OPTIONS));
+    }
+
+    /**
+     * Returns the list of VM options with -J prefix.
+     *
+     * @return The list of VM options with -J prefix
+     */
+    public static List<String> getForwardVmOptions() {
+        String[] opts = safeSplitString(VM_OPTIONS);
+        for (int i = 0; i < opts.length; i++) {
+            opts[i] = "-J" + opts[i];
+        }
+        return Arrays.asList(opts);
+    }
+
+    /**
+     * Returns the default JTReg arguments for a jvm running a test.
+     * This is the combination of JTReg arguments test.vm.opts and test.java.opts.
+     * @return An array of options, or an empty array if no opptions.
+     */
+    public static String[] getTestJavaOpts() {
+        List<String> opts = new ArrayList<String>();
+        Collections.addAll(opts, safeSplitString(VM_OPTIONS));
+        Collections.addAll(opts, safeSplitString(JAVA_OPTIONS));
+        return opts.toArray(new String[0]);
+    }
+
+    /**
+     * Combines given arguments with default JTReg arguments for a jvm running a test.
+     * This is the combination of JTReg arguments test.vm.opts and test.java.opts
+     * @return The combination of JTReg test java options and user args.
+     */
+    public static String[] addTestJavaOpts(String... userArgs) {
+        List<String> opts = new ArrayList<String>();
+        Collections.addAll(opts, getTestJavaOpts());
+        Collections.addAll(opts, userArgs);
+        return opts.toArray(new String[0]);
+    }
+
+    /**
+     * Splits a string by white space.
+     * Works like String.split(), but returns an empty array
+     * if the string is null or empty.
+     */
+    private static String[] safeSplitString(String s) {
+        if (s == null || s.trim().isEmpty()) {
+            return new String[] {};
+        }
+        return s.trim().split("\\s+");
+    }
+
+    /**
+     * @return The full command line for the ProcessBuilder.
+     */
+    public static String getCommandLine(ProcessBuilder pb) {
+        StringBuilder cmd = new StringBuilder();
+        for (String s : pb.command()) {
+            cmd.append(s).append(" ");
+        }
+        return cmd.toString();
+    }
+
+    /**
+     * Returns the free port on the local host.
+     * The function will spin until a valid port number is found.
+     *
+     * @return The port number
+     * @throws InterruptedException if any thread has interrupted the current thread
+     * @throws IOException if an I/O error occurs when opening the socket
+     */
+    public static int getFreePort() throws InterruptedException, IOException {
+        int port = -1;
+
+        while (port <= 0) {
+            Thread.sleep(100);
+
+            ServerSocket serverSocket = null;
+            try {
+                serverSocket = new ServerSocket(0);
+                port = serverSocket.getLocalPort();
+            } finally {
+                serverSocket.close();
+            }
+        }
+
+        return port;
+    }
+
+    /**
+     * Returns the name of the local host.
+     *
+     * @return The host name
+     * @throws UnknownHostException if IP address of a host could not be determined
+     */
+    public static String getHostname() throws UnknownHostException {
+        InetAddress inetAddress = InetAddress.getLocalHost();
+        String hostName = inetAddress.getHostName();
+
+        assertTrue((hostName != null && !hostName.isEmpty()),
+                "Cannot get hostname");
+
+        return hostName;
+    }
+
+    /**
+     * Uses "jcmd -l" to search for a jvm pid. This function will wait
+     * forever (until jtreg timeout) for the pid to be found.
+     * @param key Regular expression to search for
+     * @return The found pid.
+     */
+    public static int waitForJvmPid(String key) throws Throwable {
+        final long iterationSleepMillis = 250;
+        System.out.println("waitForJvmPid: Waiting for key '" + key + "'");
+        System.out.flush();
+        while (true) {
+            int pid = tryFindJvmPid(key);
+            if (pid >= 0) {
+                return pid;
+            }
+            Thread.sleep(iterationSleepMillis);
+        }
+    }
+
+    /**
+     * Searches for a jvm pid in the output from "jcmd -l".
+     *
+     * Example output from jcmd is:
+     * 12498 sun.tools.jcmd.JCmd -l
+     * 12254 /tmp/jdk8/tl/jdk/JTwork/classes/com/sun/tools/attach/Application.jar
+     *
+     * @param key A regular expression to search for.
+     * @return The found pid, or -1 if Enot found.
+     * @throws Exception If multiple matching jvms are found.
+     */
+    public static int tryFindJvmPid(String key) throws Throwable {
+        ProcessBuilder pb = null;
+        OutputAnalyzer output = null;
+        try {
+            JDKToolLauncher jcmdLauncher = JDKToolLauncher.create("jcmd");
+            jcmdLauncher.addToolArg("-l");
+            output = ProcessTools.executeProcess(jcmdLauncher.getCommand());
+            output.shouldHaveExitValue(0);
+
+            // Search for a line starting with numbers (pid), follwed by the key.
+            Pattern pattern = Pattern.compile("([0-9]+)\\s.*(" + key + ").*\\r?\\n");
+            Matcher matcher = pattern.matcher(output.getStdout());
+
+            int pid = -1;
+            if (matcher.find()) {
+                pid = Integer.parseInt(matcher.group(1));
+                System.out.println("findJvmPid.pid: " + pid);
+                if (matcher.find()) {
+                    throw new Exception("Found multiple JVM pids for key: " + key);
+                }
+            }
+            return pid;
+        } catch (Throwable t) {
+            System.out.println(String.format("Utils.findJvmPid(%s) failed: %s", key, t));
+            throw t;
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/lib/testlibrary/jdk/testlibrary/XRun.java	Wed Apr 23 15:10:18 2014 +0100
@@ -0,0 +1,56 @@
+/*
+ * 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.
+ */
+
+package jdk.testlibrary;
+
+/**
+ * This type serves no other purpose than to simply allow automatically running
+ * something in a thread, and have all exceptions propagated to
+ * RuntimeExceptions, which are thrown up to thread, which in turn should
+ * probably be a {@link TestThread} to they are stored.
+ */
+public abstract class XRun implements Runnable {
+
+    /**
+     * Invokes {@code xrun()} and throws all exceptions caught in it
+     * up to the thread.
+     */
+    public final void run() {
+        try {
+            xrun();
+        } catch (Error e) {
+            throw e;
+        } catch (RuntimeException e) {
+            throw e;
+        } catch (Throwable e) {
+            throw new RuntimeException(e);
+        }
+    }
+
+    /**
+     * Override this method to implement what to run in the thread.
+     *
+     * @throws Throwable
+     */
+    protected abstract void xrun() throws Throwable;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/sun/awt/AppContext/MultiThread/MultiThreadTest.java	Wed Apr 23 15:10:18 2014 +0100
@@ -0,0 +1,100 @@
+/*
+ * 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 8019623
+ * @summary Tests that AppContext.getAppContext() works correctly in multi-threads scenario.
+ * @author Leonid Romanov
+ */
+
+import sun.awt.AppContext;
+
+public class MultiThreadTest {
+    private static final int NUM_THREADS = 2;
+
+    private static AppContextGetter[] getters = new AppContextGetter[NUM_THREADS];
+
+    public static void main(String[] args) {
+        createAndStartThreads();
+        compareAppContexts();
+    }
+
+    private static void createAndStartThreads() {
+        ThreadGroup systemGroup = getSystemThreadGroup();
+        for (int i = 0; i < NUM_THREADS; ++i) {
+            ThreadGroup tg = new ThreadGroup(systemGroup, "AppContextGetter" + i);
+            getters[i] = new AppContextGetter(tg);
+        }
+
+        for (int i = 0; i < NUM_THREADS; ++i) {
+            getters[i].start();
+        }
+
+        for (int i = 0; i < NUM_THREADS; ++i) {
+            try {
+                getters[i].join();
+            } catch (InterruptedException e) {
+                // ignore
+            }
+        }
+    }
+
+    private static ThreadGroup getSystemThreadGroup() {
+        ThreadGroup currentThreadGroup =
+                Thread.currentThread().getThreadGroup();
+        ThreadGroup parentThreadGroup = currentThreadGroup.getParent();
+        while (parentThreadGroup != null) {
+            currentThreadGroup = parentThreadGroup;
+            parentThreadGroup = currentThreadGroup.getParent();
+        }
+
+        return currentThreadGroup;
+    }
+
+    private static void compareAppContexts() {
+        AppContext ctx = getters[0].getAppContext();
+        for (int i = 1; i < NUM_THREADS; ++i) {
+            if (!ctx.equals(getters[i].getAppContext())) {
+                throw new RuntimeException("Unexpected AppContexts difference, could be a race condition");
+            }
+        }
+    }
+
+    private static class AppContextGetter extends Thread {
+        private AppContext appContext;
+
+        public AppContextGetter(ThreadGroup tg) {
+            super(tg, tg.getName());
+        }
+
+        AppContext getAppContext() {
+            return appContext;
+        }
+
+        @Override
+        public void run() {
+            appContext = AppContext.getAppContext();
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/sun/java2d/DrawXORModeTest.java	Wed Apr 23 15:10:18 2014 +0100
@@ -0,0 +1,110 @@
+/*
+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * 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     8036022
+ * @summary Test verifies that drawing shapes with XOR composite
+ *          does not trigger an InternalError in GDI surface data.
+ * @run main/othervm -Dsun.java2d.d3d=True DrawXORModeTest
+ */
+import java.awt.BasicStroke;
+import java.awt.Color;
+import java.awt.Component;
+import java.awt.Dimension;
+import java.awt.Frame;
+import java.awt.Graphics;
+import java.awt.Graphics2D;
+import java.awt.Stroke;
+import java.awt.geom.Line2D;
+import java.util.concurrent.CountDownLatch;
+
+public class DrawXORModeTest extends Component {
+
+    public static void main(String[] args) {
+        final DrawXORModeTest c = new DrawXORModeTest();
+
+        final Frame f = new Frame("XOR mode test");
+        f.add(c);
+        f.pack();
+
+        f.setVisible(true);
+
+        try {
+            c.checkResult();
+        } finally {
+            f.dispose();
+        }
+    }
+
+    @Override
+    public void paint(Graphics g) {
+        if (g == null || !(g instanceof Graphics2D)) {
+            return;
+        }
+        g.setColor(Color.white);
+        g.setXORMode(Color.black);
+        Graphics2D dg = (Graphics2D) g;
+        Stroke stroke = new BasicStroke(1, BasicStroke.CAP_BUTT,
+                BasicStroke.JOIN_MITER,
+                10.0f,
+                new float[]{1.0f, 1.0f},
+                0.0f);
+        dg.setStroke(stroke);
+        try {
+            dg.draw(new Line2D.Float(10, 10, 20, 20));
+        } catch (Throwable e) {
+            synchronized (this) {
+                theError = e;
+            }
+        } finally {
+            didDraw.countDown();
+        }
+    }
+
+    @Override
+    public Dimension getPreferredSize() {
+        return new Dimension(400, 100);
+    }
+
+    public void checkResult() {
+        try {
+            didDraw.await();
+        } catch (InterruptedException e) {
+        }
+
+        synchronized (this) {
+            if (theError != null) {
+                System.out.println("Error: " + theError);
+
+                throw new RuntimeException("Test FAILED.");
+            }
+        }
+        System.out.println("Test PASSED.");
+
+    }
+
+    private Throwable theError = null;
+
+    private final CountDownLatch didDraw = new CountDownLatch(1);
+}
--- a/test/sun/security/krb5/auto/BadKdc.java	Fri Apr 18 23:39:11 2014 +0100
+++ b/test/sun/security/krb5/auto/BadKdc.java	Wed Apr 23 15:10:18 2014 +0100
@@ -39,7 +39,29 @@
     //                                               ^ kdc#         ^ timeout
     static final Pattern re = Pattern.compile(
             ">>> KDCCommunication: kdc=kdc.rabbit.hole UDP:(\\d)...., " +
-            "timeout=(\\d)000,");
+            "timeout=(\\d+),");
+
+    // Ratio for timeout values of all timeout tests. Not final so that
+    // each test can choose their own.
+    static float ratio = 2f;
+
+    static void setRatio(float ratio) {
+        BadKdc.ratio = ratio;
+    }
+
+    static float getRatio() {
+        return ratio;
+    }
+
+    // Gets real timeout value. This method is called when writing krb5.conf
+    static int toReal(int from) {
+        return (int)(from * ratio + .5);
+    }
+
+    // De-ratio a millisecond value to second
+    static int toSymbolicSec(int from) {
+        return (int)(from / ratio / 1000f + 0.5);
+    }
 
     /*
      * There are several cases this test fails:
@@ -97,7 +119,7 @@
 
         fw.write("[libdefaults]\n" +
                 "default_realm = " + OneKDC.REALM + "\n" +
-                "kdc_timeout = 2000\n");
+                "kdc_timeout = " + toReal(2000) + "\n");
         fw.write("[realms]\n" + OneKDC.REALM + " = {\n" +
                 "kdc = " + OneKDC.KDCHOST + ":" + p1 + "\n" +
                 "kdc = " + OneKDC.KDCHOST + ":" + p2 + "\n" +
@@ -171,7 +193,8 @@
             Matcher m = re.matcher(line);
             if (m.find()) {
                 System.out.println(line);
-                sb.append(m.group(1)).append(m.group(2));
+                sb.append(m.group(1))
+                        .append(toSymbolicSec(Integer.parseInt(m.group(2))));
             }
         }
         if (failed) sb.append('-');
--- a/test/sun/security/krb5/auto/BadKdc1.java	Fri Apr 18 23:39:11 2014 +0100
+++ b/test/sun/security/krb5/auto/BadKdc1.java	Wed Apr 23 15:10:18 2014 +0100
@@ -28,14 +28,21 @@
  * @summary krb5 should not try to access unavailable kdc too often
  */
 
-import java.io.*;
 import java.security.Security;
 
 public class BadKdc1 {
 
    public static void main(String[] args)
            throws Exception {
-       Security.setProperty("krb5.kdc.bad.policy", "tryLess");
+
+       // 5 sec is default timeout for tryLess
+       if (BadKdc.getRatio() > 2.5) {
+           Security.setProperty("krb5.kdc.bad.policy",
+                   "tryLess:1," + BadKdc.toReal(2000));
+       } else {
+           Security.setProperty("krb5.kdc.bad.policy", "tryLess");
+       }
+
        BadKdc.go(
                "121212222222(32){1,2}1222(32){1,2}", // 1 2
                // The above line means try kdc1 for 2 seconds then kdc1
--- a/test/sun/security/krb5/auto/BadKdc2.java	Fri Apr 18 23:39:11 2014 +0100
+++ b/test/sun/security/krb5/auto/BadKdc2.java	Wed Apr 23 15:10:18 2014 +0100
@@ -35,7 +35,12 @@
 
     public static void main(String[] args)
             throws Exception {
-        Security.setProperty("krb5.kdc.bad.policy", "tryLess:2,1000");
+
+        // 1 sec is too short.
+        BadKdc.setRatio(3.0f);
+
+        Security.setProperty(
+                "krb5.kdc.bad.policy", "tryLess:2," + BadKdc.toReal(1000));
         BadKdc.go(
                 "121212222222(32){1,2}11112121(32){1,2}", // 1 2
                 "11112121(32){1,2}11112121(32){1,2}", // 1 2
--- a/test/sun/security/krb5/auto/MaxRetries.java	Fri Apr 18 23:39:11 2014 +0100
+++ b/test/sun/security/krb5/auto/MaxRetries.java	Wed Apr 23 15:10:18 2014 +0100
@@ -54,7 +54,7 @@
         test1(5000, 2);         // 2 2
 
         // For tryLess
-        Security.setProperty("krb5.kdc.bad.policy", "tryless");
+        Security.setProperty("krb5.kdc.bad.policy", "tryless:1," + BadKdc.toReal(5000));
         rewriteMaxRetries(4);
         test1(4000, 7);         // 1 1 1 1 2 1 2
         test1(4000, 4);         // 1 2 1 2
@@ -86,7 +86,7 @@
      * @param count the expected total try
      */
     private static void test1(int timeout, int count) throws Exception {
-        String timeoutTag = "timeout=" + timeout;
+        String timeoutTag = "timeout=" + BadKdc.toReal(timeout);
         ByteArrayOutputStream bo = new ByteArrayOutputStream();
         PrintStream oldout = System.out;
         System.setOut(new PrintStream(bo));
@@ -184,12 +184,12 @@
             if (s.startsWith("[realms]")) {
                 // Reconfig global setting
                 fw.write("max_retries = 2\n");
-                fw.write("kdc_timeout = 5000\n");
+                fw.write("kdc_timeout = " + BadKdc.toReal(5000) + "\n");
             } else if (s.trim().startsWith("kdc = ")) {
                 if (value != -1) {
                     // Reconfig for realm
                     fw.write("    max_retries = " + value + "\n");
-                    fw.write("    kdc_timeout = " + (value*1000) + "\n");
+                    fw.write("    kdc_timeout = " + BadKdc.toReal(value*1000) + "\n");
                 }
                 // Add a bad KDC as the first candidate
                 fw.write("    kdc = localhost:33333\n");
--- a/test/sun/security/krb5/auto/TcpTimeout.java	Fri Apr 18 23:39:11 2014 +0100
+++ b/test/sun/security/krb5/auto/TcpTimeout.java	Wed Apr 23 15:10:18 2014 +0100
@@ -63,7 +63,7 @@
                     "udp_preference_limit = 1\n" +
                     "max_retries = 2\n" +
                     "default_realm = " + OneKDC.REALM + "\n" +
-                    "kdc_timeout = 5000\n");
+                    "kdc_timeout = " + BadKdc.toReal(5000) + "\n");
             fw.write("[realms]\n" + OneKDC.REALM + " = {\n" +
                     "kdc = " + OneKDC.KDCHOST + ":" + p1 + "\n" +
                     "kdc = " + OneKDC.KDCHOST + ":" + p2 + "\n" +
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/launcher/I18NArgTest.java	Wed Apr 23 15:10:18 2014 +0100
@@ -0,0 +1,111 @@
+/*
+ * 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 8016110
+ * @summary verify Japanese character in an argument are treated correctly
+ * @compile -XDignore.symbol.file I18NArgTest.java
+ * @run main I18NArgTest
+ */
+import java.io.IOException;
+
+public class I18NArgTest extends TestHelper {
+    public static void main(String... args) throws IOException {
+        if (!isWindows) {
+            return;
+        }
+        if (!"MS932".equals(System.getProperty("sun.jnu.encoding"))) {
+            System.err.println("MS932 encoding not set, test skipped");
+            return;
+        }
+        if (args.length == 0) {
+            execTest(0x30bd); // MS932 Katakana SO, 0x835C
+        } else {
+            testCharacters(args);
+        }
+    }
+    static void execTest(int unicodeValue) {
+        String hexValue = Integer.toHexString(unicodeValue);
+        String unicodeStr = Character.toString((char)unicodeValue);
+        execTest("\"" + unicodeStr + "\"", hexValue);
+        execTest("\\" + unicodeStr + "\\", hexValue);
+        execTest(" " + unicodeStr + " ", hexValue);
+        execTest("'" + unicodeStr + "'", hexValue);
+        execTest("\t" + unicodeStr + "\t", hexValue);
+        execTest("*" + unicodeStr + "*", hexValue);
+        execTest("?" + unicodeStr + "?", hexValue);
+
+        execTest("\"" + unicodeStr + unicodeStr + "\"", hexValue + hexValue);
+        execTest("\\" + unicodeStr + unicodeStr + "\\", hexValue + hexValue);
+        execTest(" " + unicodeStr + unicodeStr + " ", hexValue + hexValue);
+        execTest("'" + unicodeStr + unicodeStr + "'", hexValue + hexValue);
+        execTest("\t" + unicodeStr + unicodeStr + "\t", hexValue + hexValue);
+        execTest("*" + unicodeStr + unicodeStr + "*", hexValue + hexValue);
+        execTest("?" + unicodeStr + unicodeStr + "?", hexValue + hexValue);
+
+        execTest("\"" + unicodeStr + "a" + unicodeStr + "\"", hexValue + "61" + hexValue);
+        execTest("\\" + unicodeStr + "a" + unicodeStr + "\\", hexValue + "61" + hexValue);
+        execTest(" " + unicodeStr + "a" + unicodeStr + " ", hexValue + "61"+ hexValue);
+        execTest("'" + unicodeStr + "a" + unicodeStr + "'", hexValue + "61"+ hexValue);
+        execTest("\t" + unicodeStr + "a" + unicodeStr + "\t", hexValue + "61"+ hexValue);
+        execTest("*" + unicodeStr + "a" + unicodeStr + "*", hexValue + "61"+ hexValue);
+        execTest("?" + unicodeStr + "a" + unicodeStr + "?", hexValue + "61"+ hexValue);
+
+        execTest("\"" + unicodeStr + "\u00b1" + unicodeStr + "\"", hexValue + "b1" + hexValue);
+        execTest("\\" + unicodeStr + "\u00b1" + unicodeStr + "\\", hexValue + "b1" + hexValue);
+        execTest(" " + unicodeStr + "\u00b1" + unicodeStr + " ", hexValue + "b1"+ hexValue);
+        execTest("'" + unicodeStr + "\u00b1" + unicodeStr + "'", hexValue + "b1"+ hexValue);
+        execTest("\t" + unicodeStr + "\u00b1" + unicodeStr + "\t", hexValue + "b1"+ hexValue);
+        execTest("*" + unicodeStr + "\u00b1" + unicodeStr + "*", hexValue + "b1"+ hexValue);
+        execTest("?" + unicodeStr + "\u00b1" + unicodeStr + "?", hexValue + "b1"+ hexValue);
+    }
+    static void execTest(String unicodeStr, String hexValue) {
+        TestResult tr = doExec(javaCmd,
+                "-Dtest.src=" + TEST_SOURCES_DIR.getAbsolutePath(),
+                "-Dtest.classes=" + TEST_CLASSES_DIR.getAbsolutePath(),
+                "-cp", TEST_CLASSES_DIR.getAbsolutePath(),
+                "I18NArgTest", unicodeStr, hexValue);
+        System.out.println(tr.testOutput);
+        if (!tr.isOK()) {
+            System.err.println(tr);
+            throw new RuntimeException("test fails");
+        }
+    }
+    static void testCharacters(String... args) {
+        String input = args[0];
+        String expected = args[1];
+        String hexValue = "";
+        for (int i = 0; i < input.length(); i++) {
+            hexValue = hexValue.concat(Integer.toHexString((int)input.charAt(i)));
+        }
+        System.out.println("input:" + input);
+        System.out.println("expected:" + expected);
+        System.out.println("obtained:" + hexValue);
+        if (!hexValue.contains(expected)) {
+            String message = "Error: output does not contain expected value" +
+                "expected:" + expected + " obtained:" + hexValue;
+            throw new RuntimeException(message);
+        }
+    }
+}