--- a/jdk/.hgtags Sat Jun 03 02:44:55 2017 +0000
+++ b/jdk/.hgtags Sat Jun 03 03:48:03 2017 +0000
@@ -425,3 +425,4 @@
b9409a7daa6c793dd631e52fe6ef79d08a3b337a jdk-10+9
29bbedd4cce8e14742bdb22118c057b877c02f0f jdk-9+171
df64bd4757d0d130d62a22b8143ba31d3a16ac18 jdk-10+10
+0ff9ad7d067cd4fa14450cf208bf019175a0aaba jdk-9+172
--- a/jdk/src/java.base/share/classes/java/io/FileOutputStream.java Sat Jun 03 02:44:55 2017 +0000
+++ b/jdk/src/java.base/share/classes/java/io/FileOutputStream.java Sat Jun 03 03:48:03 2017 +0000
@@ -91,6 +91,10 @@
* If the file exists but is a directory rather than a regular file, does
* not exist but cannot be created, or cannot be opened for any other
* reason then a <code>FileNotFoundException</code> is thrown.
+ * <p>
+ * @implSpec Invoking this constructor with the parameter {@code name} is
+ * equivalent to invoking {@link #FileOutputStream(String,boolean)
+ * new FileOutputStream(name, false)}.
*
* @param name the system-dependent filename
* @exception FileNotFoundException if the file exists but is a directory
--- a/jdk/src/java.base/share/classes/java/io/Serializable.java Sat Jun 03 02:44:55 2017 +0000
+++ b/jdk/src/java.base/share/classes/java/io/Serializable.java Sat Jun 03 03:48:03 2017 +0000
@@ -84,9 +84,9 @@
* correspondingly named fields in the current object. This handles the case
* when the class has evolved to add new fields. The method does not need to
* concern itself with the state belonging to its superclasses or subclasses.
- * State is saved by writing the individual fields to the
- * ObjectOutputStream using the writeObject method or by using the
- * methods for primitive data types supported by DataOutput.
+ * State is restored by reading data from the ObjectInputStream for
+ * the individual fields and making assignments to the appropriate fields
+ * of the object. Reading primitive data types is supported by DataInput.
*
* <p>The readObjectNoData method is responsible for initializing the state of
* the object for its particular class in the event that the serialization
--- a/jdk/src/java.base/share/classes/java/lang/reflect/Constructor.java Sat Jun 03 02:44:55 2017 +0000
+++ b/jdk/src/java.base/share/classes/java/lang/reflect/Constructor.java Sat Jun 03 03:48:03 2017 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2017, 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
@@ -588,19 +588,18 @@
}
@Override
- void handleParameterNumberMismatch(int resultLength, int numParameters) {
+ boolean handleParameterNumberMismatch(int resultLength, int numParameters) {
Class<?> declaringClass = getDeclaringClass();
if (declaringClass.isEnum() ||
declaringClass.isAnonymousClass() ||
declaringClass.isLocalClass() )
- return ; // Can't do reliable parameter counting
+ return false; // Can't do reliable parameter counting
else {
- if (!declaringClass.isMemberClass() || // top-level
- // Check for the enclosing instance parameter for
- // non-static member classes
- (declaringClass.isMemberClass() &&
- ((declaringClass.getModifiers() & Modifier.STATIC) == 0) &&
- resultLength + 1 != numParameters) ) {
+ if (declaringClass.isMemberClass() &&
+ ((declaringClass.getModifiers() & Modifier.STATIC) == 0) &&
+ resultLength + 1 == numParameters) {
+ return true;
+ } else {
throw new AnnotationFormatError(
"Parameter annotations don't match number of parameters");
}
--- a/jdk/src/java.base/share/classes/java/lang/reflect/Executable.java Sat Jun 03 02:44:55 2017 +0000
+++ b/jdk/src/java.base/share/classes/java/lang/reflect/Executable.java Sat Jun 03 03:48:03 2017 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2017, 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
@@ -551,12 +551,18 @@
Annotation[][] result = parseParameterAnnotations(parameterAnnotations);
- if (result.length != numParameters)
- handleParameterNumberMismatch(result.length, numParameters);
+ if (result.length != numParameters &&
+ handleParameterNumberMismatch(result.length, numParameters)) {
+ Annotation[][] tmp = new Annotation[result.length+1][];
+ // Shift annotations down one to account for an implicit leading parameter
+ System.arraycopy(result, 0, tmp, 1, result.length);
+ tmp[0] = new Annotation[0];
+ result = tmp;
+ }
return result;
}
- abstract void handleParameterNumberMismatch(int resultLength, int numParameters);
+ abstract boolean handleParameterNumberMismatch(int resultLength, int numParameters);
/**
* {@inheritDoc}
--- a/jdk/src/java.base/share/classes/java/lang/reflect/Method.java Sat Jun 03 02:44:55 2017 +0000
+++ b/jdk/src/java.base/share/classes/java/lang/reflect/Method.java Sat Jun 03 03:48:03 2017 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1996, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2017, 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
@@ -719,7 +719,7 @@
}
@Override
- void handleParameterNumberMismatch(int resultLength, int numParameters) {
+ boolean handleParameterNumberMismatch(int resultLength, int numParameters) {
throw new AnnotationFormatError("Parameter annotations don't match number of parameters");
}
}
--- a/jdk/src/java.base/share/classes/java/time/Clock.java Sat Jun 03 02:44:55 2017 +0000
+++ b/jdk/src/java.base/share/classes/java/time/Clock.java Sat Jun 03 03:48:03 2017 +0000
@@ -127,10 +127,13 @@
* document whether or not they do support serialization.
*
* @implNote
- * The clock implementation provided here is based on {@link System#currentTimeMillis()}.
- * That method provides little to no guarantee about the accuracy of the clock.
- * Applications requiring a more accurate clock must implement this abstract class
- * themselves using a different external clock, such as an NTP server.
+ * The clock implementation provided here is based on the same underlying clock
+ * as {@link System#currentTimeMillis()}, but may have a precision finer than
+ * milliseconds if available.
+ * However, little to no guarantee is provided about the accuracy of the
+ * underlying clock. Applications requiring a more accurate clock must implement
+ * this abstract class themselves using a different external clock, such as an
+ * NTP server.
*
* @since 1.8
*/
--- a/jdk/src/java.base/share/classes/overview-core.html Sat Jun 03 02:44:55 2017 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
-<html>
-<head>
-<!--
-
-Copyright (c) 1998, 2015, 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.
--->
-
-</head>
-<body bgcolor="white">
-
-This document is the API specification for the Java™
-Platform, Standard Edition.
-
-</body>
-</html>
--- a/jdk/src/java.base/share/classes/sun/launcher/LauncherHelper.java Sat Jun 03 02:44:55 2017 +0000
+++ b/jdk/src/java.base/share/classes/sun/launcher/LauncherHelper.java Sat Jun 03 03:48:03 2017 +0000
@@ -564,7 +564,6 @@
}
validateMainClass(mainClass);
-
return mainClass;
}
@@ -615,7 +614,7 @@
}
} catch (LinkageError le) {
abort(null, "java.launcher.module.error3", mainClass, m.getName(),
- le.getClass().getName() + ": " + le.getLocalizedMessage());
+ le.getClass().getName() + ": " + le.getLocalizedMessage());
}
if (c == null) {
abort(null, "java.launcher.module.error2", mainClass, mainModule);
@@ -703,14 +702,22 @@
// Check the existence and signature of main and abort if incorrect
static void validateMainClass(Class<?> mainClass) {
- Method mainMethod;
+ Method mainMethod = null;
try {
mainMethod = mainClass.getMethod("main", String[].class);
} catch (NoSuchMethodException nsme) {
// invalid main or not FX application, abort with an error
abort(null, "java.launcher.cls.error4", mainClass.getName(),
JAVAFX_APPLICATION_CLASS_NAME);
- return; // Avoid compiler issues
+ } catch (Throwable e) {
+ if (mainClass.getModule().isNamed()) {
+ abort(e, "java.launcher.module.error5",
+ mainClass.getName(), mainClass.getModule(),
+ e.getClass().getName(), e.getLocalizedMessage());
+ } else {
+ abort(e,"java.launcher.cls.error7", mainClass.getName(),
+ e.getClass().getName(), e.getLocalizedMessage());
+ }
}
/*
--- a/jdk/src/java.base/share/classes/sun/launcher/resources/launcher.properties Sat Jun 03 02:44:55 2017 +0000
+++ b/jdk/src/java.base/share/classes/sun/launcher/resources/launcher.properties Sat Jun 03 03:48:03 2017 +0000
@@ -207,6 +207,9 @@
java.launcher.cls.error6=\
Error: LinkageError occurred while loading main class {0}\n\
\t{1}
+java.launcher.cls.error7=\
+ Error: Unable to initialize main class {0}\n\
+ Caused by: {1}: {2}
java.launcher.jar.error1=\
Error: An unexpected error occurred while trying to open file {0}
java.launcher.jar.error2=manifest not found in {0}
@@ -221,7 +224,10 @@
java.launcher.module.error2=\
Error: Could not find or load main class {0} in module {1}
java.launcher.module.error3=\
- Error: Unable to load main class {0} from module {1}\n\
+ Error: Unable to load main class {0} in module {1}\n\
\t{2}
java.launcher.module.error4=\
{0} not found
+java.launcher.module.error5=\
+ Error: Unable to initialize main class {0} in module {1}\n\
+ Caused by: {1}: {2}
--- a/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_de.properties Sat Jun 03 02:44:55 2017 +0000
+++ b/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_de.properties Sat Jun 03 03:48:03 2017 +0000
@@ -24,31 +24,36 @@
#
# Translators please note do not translate the options themselves
-java.launcher.opt.header = Verwendung: {0} [Optionen] Klasse [Argumente...]\n (zur Ausf\u00FChrung einer Klasse)\n oder {0} [Optionen] -jar JAR-Datei [Argumente...]\n (zur Ausf\u00FChrung einer JAR-Datei)\n oder {0} [Optionen] -p <Modulpfad> -m <Modulname>[/<Hauptklasse>] [Argumente...]\n (zur Ausf\u00FChrung der Hauptklasse in einem Modul)\nwobei "Optionen" Folgendes umfasst:\n\n
+java.launcher.opt.header = Verwendung: {0} [Optionen] <mainclass> [args...]\n (zur Ausf\u00FChrung einer Klasse)\n oder {0} [Optionen] -jar <jarfile> [args...]\n (zur Ausf\u00FChrung einer JAR-Datei)\n oder {0} [Optionen] -m <module>[/<mainclass>] [args...]\n {0} [Optionen] --module <module>[/<mainclass>] [args...]\n (zur Ausf\u00FChrung der Hauptklasse in einem Modul)\n\n Argumente, die auf die Hauptklasse folgen, -jar <jarfile>, -m oder --module\n <module>/<mainclass> werden als Argumente f\u00FCr die Hauptklasse \u00FCbergeben.\n\n wobei "Optionen" Folgendes umfasst:\n\n
java.launcher.opt.datamodel =\ -d{0}\t Veraltet, wird in einem zuk\u00FCnftigen Release entfernt\n
java.launcher.opt.vmselect =\ {0}\t zur Auswahl der "{1}" VM\n
java.launcher.opt.hotspot =\ {0}\t ist ein Synonym f\u00FCr die "{1}" VM [verworfen]\n
# Translators please note do not translate the options themselves
-java.launcher.opt.footer =-cp <Klassensuchpfad von Verzeichnissen und ZIP-/JAR-Dateien>\n -classpath <Klassensuchpfad von Verzeichnissen und ZIP-/JAR-Dateien>\n --class-path <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 -p <Modulpfad>\n --module-path <Modulpfad>...\n Eine durch {0} getrennte Liste mit Verzeichnissen, wobei jedes Verzeichnis\n ein Modulverzeichnis ist.\n --upgrade-module-path <Modulpfad>...\n Eine durch {0} getrennte Liste mit Verzeichnissen, wobei jedes Verzeichnis\n ein Verzeichnis mit Modulen ist, die upgradef\u00E4hige\n Module im Laufzeitimage ersetzen\n -m <Modul>[/<Hauptklasse>]\n --module <Modulname>[/<Hauptklasse>]\n Das anf\u00E4ngliche aufzul\u00F6sende Modul und der Name der auszuf\u00FChrenden\n Hauptklasse, wenn nicht durch das Modul angegeben\n --add-modules <Modulname>[,<Modulname>...]\n Zus\u00E4tzlich zum anf\u00E4nglichen Modul aufzul\u00F6sende Root-Module.\n <Modulname> kann auch ALL-DEFAULT, ALL-SYSTEM,\n ALL-MODULE-PATH sein.\n --limit-modules <Modulname>[,<Modulname>...]\n Begrenzt die Gesamtheit der beobachtbaren Module\n --list-modules [<Modulname>[,<Modulname>...]]\n F\u00FChrt die beobachtbaren Module auf und beendet den Vorgang\n --dry-run Erstellt VM, f\u00FChrt jedoch die Hauptmethode nicht aus.\n Diese --dry-run-Option kann zur Validierung der Befehlszeilenoptionen,\n etwa der Modulsystemkonfiguration, n\u00FCtzlich sein.\n -D<Name>=<Wert>\n Legt eine Systemeigenschaft fest\n -verbose:[class|gc|jni]\n Aktiviert Verbose-Ausgabe\n -version Druckt die Produktversion in den Fehlerstream und beendet den Vorgang\n --version Druckt die Produktversion in den Ausgabestream und beendet den Vorgang\n -showversion Druckt die Produktversion in den Fehlerstream und f\u00E4hrt fort\n --show-version\n Druckt die Produktversion in den Ausgabestream und f\u00E4hrt fort\n -? -h -help\n Gibt diese Hilfemeldung in den Fehlerstream aus\n --help Gibt diese Hilfemeldung in den Ausgabestream aus\n -X Gibt Hilfe zu zus\u00E4tzlichen Optionen in den Fehlerstream aus\n --help-extra Gibt Hilfe zu zus\u00E4tzlichen Optionen in den Ausgabestream aus\n -ea[:<Packagename>...|:<Klassenname>]\n -enableassertions[:<Packagename>...|:<Klassenname>]\n Aktiviert Assertions mit angegebener Granularit\u00E4t\n -da[:<Packagename>...|:<Klassenname>]\n -disableassertions[:<Packagename>...|:<Klassenname>]\n Deaktiviert Assertions mit angegebener Granularit\u00E4t\n -esa | -enablesystemassertions\n Aktiviert System-Assertions\n -dsa | -disablesystemassertions\n Deaktiviert System-Assertions\n -agentlib:<Lib-Name>[=<Optionen>]\n L\u00E4dt native Agent Library <Lib-Name>, Beispiel: -agentlib:jdwp\n siehe auch -agentlib:jdwp=help\n -agentpath:<Pfadname>[=<Optionen>]\n L\u00E4dt native Agent Library nach vollst\u00E4ndigem Pfadnamen\n -javaagent:<JAR-Pfad>[=<Optionen>]\n L\u00E4dt Java-Programmiersprachen-Agent, siehe java.lang.instrument\n -splash:<Bildpfad>\n Zeigt Begr\u00FC\u00DFungsbildschirm mit angegebenem Bild an\n HiDPI-skalierte Bilder werden automatisch unterst\u00FCtzt und verwendet,\n sofern verf\u00FCgbar. Der nicht skalierte Bilddateiname, z.B. image.ext,\n muss immer als Argument an die Option -splash \u00FCbergeben \
-werden.\n Das geeignetste skalierte Bild wird automatisch\n ausgew\u00E4hlt.\n Weitere Informationen finden Sie in der Dokumentation zur SplashScreen-API.\n @<Dateipfad> Liest Optionen aus der angegebenen Datei\n\nZur Angabe eines Arguments f\u00FCr eine lange Option k\u00F6nnen Sie --<Name>=<Wert> oder\n--<Name> <Wert> verwenden.\n
+java.launcher.opt.footer = \ -cp <Klassensuchpfad mit Verzeichnissen und ZIP-/JAR-Dateien>\n -classpath <Klassensuchpfad mit Verzeichnissen und ZIP-/JAR-Dateien>\n --class-path <Klassensuchpfad mit Verzeichnissen und ZIP-/JAR-Dateien>\n Eine durch {0} getrennte Liste mit Verzeichnissen, JAR-Archiven\n und ZIP-Archiven, in denen nach Klassendateien gesucht wird.\n -p <Modulpfad>\n --module-path <Modulpfad>...\n Eine durch {0} getrennte Liste mit Verzeichnissen, von denen jedes Verzeichnis\n ein Verzeichnis mit Modulen ist.\n --upgrade-module-path <Modulpfad>...\n Eine durch {0} getrennte Liste mit Verzeichnissen, von denen jedes Verzeichnis\n ein Verzeichnis mit Modulen ist, die upgradef\u00E4hige\n Module im Laufzeitimage ersetzen\n --add-modules <Modulname>[,<Modulname>...]\n Root-Module, die zus\u00E4tzlich zum anf\u00E4nglichen Modul aufgel\u00F6st werden sollen.\n <Modulname> kann auch wie folgt lauten: ALL-DEFAULT, ALL-SYSTEM,\n ALL-MODULE-PATH.\n --list-modules\n Listet beobachtbare Module auf und beendet den Vorgang\n --d <Modulname>\n --describe-module <Modulname>\n Beschreibt ein Modul und beendet den Vorgang\n --dry-run Erstellt eine VM und l\u00E4dt die Hauptklasse, f\u00FChrt aber nicht die Hauptmethode aus.\n Die Option "--dry-run" kann n\u00FCtzlich sein, um die\n Befehlszeilenoptionen, wie die Modulsystemkonfiguration, zu validieren.\n --validate-modules\n Validiert alle Module und beendet den Vorgang\n Die Option "--validate-modules" kann n\u00FCtzlich sein, um\n Konflikte und andere Fehler mit Modulen auf dem Modulpfad zu ermitteln.\n -D<Name>=<Wert>\n Legt eine Systemeigenschaft fest\n -verbose:[class|module|gc|jni]\n Ausgabe im Verbose-Modus aktivieren\n -version Gibt die Produktversion an den Fehlerstream aus und beendet den Vorgang\n --version Gibt die Produktversion an den Outputstream aus und beendet den Vorgang\n -showversion Gibt die Produktversion an den Fehlerstream aus und setzt den Vorgang fort\n --show-version\n Gibt die Produktversion an den Outputstream aus und setzt den Vorgang fort\n --show-module-resolution\n Zeigt die Modulaufl\u00F6sungsausgabe beim Start an\n -? -h -help\n Gibt diese Hilfemeldung an den Fehlerstream aus\n --help Gibt diese Hilfemeldung an den Outputstream aus\n -X Gibt Hilfe zu zus\u00E4tzlichen Optionen an den Fehlerstream aus\n --help-extra Gibt Hilfe zu zus\u00E4tzlichen Optionen an den Outputstream aus\n -ea[:<packagename>...|:<classname>]\n -enableassertions[:<packagename>...|:<classname>]\n Aktiviert Assertions mit angegebener Granularit\u00E4t\n -da[:<packagename>...|:<classname>]\n -disableassertions[:<packagename>...|:<classname>]\n Deaktiviert Assertions mit angegebener Granularit\u00E4t\n -esa | -enablesystemassertions\n Aktiviert System-Assertions\n -dsa | -disablesystemassertions\n Deaktiviert System-Assertions\n -agentlib:<libname>[=<options>]\n L\u00E4dt die native Agent Library <libname>. Beispiel: -agentlib:jdwp\n siehe auch -agentlib:jdwp=help\n -agentpath:<pathname>[=<options>]\n L\u00E4dt die native Agent Library mit dem vollst\u00E4ndigen Pfadnamen\n -javaagent:<jarpath>[=<options>]\n L\u00E4dt den Java-Programmiersprachen-Agent, siehe java.lang.instrument\n -splash:<imagepath>\n Zeigt den Startbildschirm mit einem angegebenen Bild an\n Skalierte HiDPI-Bilder werden automatisch \
+unterst\u00FCtzt und verwendet,\n falls verf\u00FCgbar. Der nicht skalierte Bilddateiname (Beispiel: image.ext)\n muss immer als Argument an die Option "-splash" \u00FCbergeben werden.\n Das am besten geeignete angegebene skalierte Bild wird\n automatisch ausgew\u00E4hlt.\n Weitere Informationen finden Sie in der Dokumentation zur SplashScreen-API\n @argument files\n Eine oder mehrere Argumentdateien mit Optionen\n -disable-@files\n Verhindert die weitere Erweiterung von Argumentdateien\nUm ein Argument f\u00FCr eine lange Option anzugeben, k\u00F6nnen Sie --<Name>=<Wert> oder\n--<Name> <Wert> verwenden.\n
# Translators please note do not translate the options themselves
-java.launcher.X.usage=\n -Xbatch Deaktiviert Hintergrundkompilierung\n -Xbootclasspath/a: <Durch {0} getrennte Verzeichnisse und ZIP-/JAR-Dateien>\n an Ende von Bootstrap-Klassenpfad anh\u00E4ngen\n -Xcheck:jni F\u00FChrt zus\u00E4tzliche Pr\u00FCfungen f\u00FCr JNI-Funktionen aus\n -Xcomp Erzwingt Kompilierung von Methoden beim ersten Aufruf\n -Xdebug Wird zur Abw\u00E4rtskompatiblit\u00E4t bereitgestellt\n -Xdiag Zeigt zus\u00E4tzliche Diagnosemeldungen an\n -Xdiag:resolver Zeigt Resolver-Diagnosemeldungen an\n -Xfuture Aktiviert strengste Pr\u00FCfungen, wird als m\u00F6glicher zuk\u00FCnftiger Standardwert erwartet\n -Xint Nur Ausf\u00FChrung im interpretierten Modus\n -Xinternalversion\n Zeigt detailliertere JVM-Versionsinformationen an als die\n Option -version\n -Xloggc:<Datei> Protokolliert GC-Status in einer Datei mit Zeitstempeln\n -Xmixed Ausf\u00FChrung im gemischten Modus (Standard)\n -Xmn<Gr\u00F6\u00DFe> Legt die anf\u00E4ngliche und maximale Gr\u00F6\u00DFe (in Byte) des Heaps\n f\u00FCr die junge Generation (Nursery) fest\n -Xms<Gr\u00F6\u00DFe> Legt die anf\u00E4ngliche Java-Heap-Gr\u00F6\u00DFe fest\n -Xmx<Gr\u00F6\u00DFe> Legt die maximale Java-Heap-Gr\u00F6\u00DFe fest\n -Xnoclassgc Deaktiviert die Klassen-Garbage Collection\n -Xprof Gibt CPU-Profilierungsdaten aus\n -Xrs Reduziert die Verwendung von BS-Signalen durch Java/VM (siehe Dokumentation)\n -Xshare:auto Verwendet, wenn m\u00F6glich, freigegebene Klassendaten (Standard)\n -Xshare:off Versucht, keine freigegebene Klassendaten zu verwenden\n -Xshare:on Erfordert die Verwendung von freigegebenen Klassendaten, verl\u00E4uft sonst nicht erfolgreich.\n -XshowSettings Zeigt alle Einstellungen an und f\u00E4hrt fort\n -XshowSettings:all\n Zeigt alle Einstellungen an und f\u00E4hrt fort\n -XshowSettings:locale\n Zeigt alle gebietsschemabezogenen Einstellungen an und f\u00E4hrt fort\n -XshowSettings:properties\n Zeigt alle Eigenschaftseinstellungen an und f\u00E4hrt fort\n -XshowSettings:vm Zeigt alle VM-bezogenen Einstellungen an und f\u00E4hrt fort\n -Xss<Gr\u00F6\u00DFe> Legt Stack-Gr\u00F6\u00DFe des Java-Threads fest\n -Xverify Legt den Modus der Bytecodeverifizierung fest\n --add-reads <Modul>=<Zielmodul>(,<Zielmodul>)*\n Aktualisiert <Modul>, damit <Zielmodul> ungeachtet der\n der Moduldeklaration gelesen wird. \n <Zielmodul> kann ALL-UNNAMED sein, um alle unbenannten\n Module zu lesen.\n --add-exports <Modul>/<Package>=<Zielmodul>(,<Zielmodul>)*\n Aktualisiert <Modul>, um <Package> ungeachtet der Moduldeklaration\n in <Zielmodul> zu exportieren.\n <Zielmodul> kann ALL-UNNAMED sein, um in alle \n unbenannten Module zu exportieren.\n --add-opens <Modul>/<Package>=<Zielmodul>(,<Zielmodul>)*\n Aktualisiert <Modul>, um <Package> ungeachtet der Moduldeklaration\n in <Zielmodul> zu \u00F6ffnen.\n --disable-@files Deaktiviert das weitere Einblenden der Argumentdatei\n --patch-module <Modul>=<Datei>({0}<Datei>)*\n \u00DCberschreibt oder erweitert ein Modul in JAR-Dateien\n oder -Verzeichnissen mit Klassen und Ressourcen.\n\nDiese zus\u00E4tzlichen Optionen k\u00F6nnen ohne Vorank\u00FCndigung ge\u00E4ndert werden.
+java.launcher.X.usage=\n -Xbatch Deaktiviert Hintergrundkompilierung\n -Xbootclasspath/a: <Durch {0} getrennte Verzeichnisse und ZIP-/JAR-Dateien>\n an Ende von Bootstrap Classpath anh\u00E4ngen\n -Xcheck:jni F\u00FChrt zus\u00E4tzliche Pr\u00FCfungen f\u00FCr JNI-Funktionen aus\n -Xcomp Erzwingt Kompilierung von Methoden beim ersten Aufruf\n -Xdebug Wird zur Abw\u00E4rtskompatiblit\u00E4t bereitgestellt\n -Xdiag Zeigt zus\u00E4tzliche Diagnosemeldungen an\n -Xfuture Aktiviert strengste Pr\u00FCfungen, wird als m\u00F6glicher zuk\u00FCnftiger Standardwert erwartet\n -Xint Nur Ausf\u00FChrung im interpretierten Modus\n -Xinternalversion\n Zeigt detailliertere JVM-Versionsinformationen an als die\n Option "-version"\n -Xloggc:<Datei> Protokolliert GC-Status in einer Datei mit Zeitstempeln\n -Xmixed Ausf\u00FChrung im gemischten Modus (Standard)\n -Xmn<Gr\u00F6\u00DFe> Legt die anf\u00E4ngliche und die maximale Gr\u00F6\u00DFe (in Byte) des Heaps\n f\u00FCr die junge Generation (Nursery) fest\n -Xms<Gr\u00F6\u00DFe> Legt die anf\u00E4ngliche Java-Heap-Gr\u00F6\u00DFe fest\n -Xmx<Gr\u00F6\u00DFe> Legt die maximale Java-Heap-Gr\u00F6\u00DFe fest\n -Xnoclassgc Deaktiviert die Klassen-Garbage Collection\n -Xprof Gibt CPU-Profilierungsdaten aus (veraltet)\n -Xrs Reduziert die Verwendung von BS-Signalen durch Java/VM (siehe Dokumentation)\n -Xshare:auto Verwendet, wenn m\u00F6glich, freigegebene Klassendaten (Standard)\n -Xshare:off Versucht nicht, freigegebene Klassendaten zu verwenden\n -Xshare:on Erfordert die Verwendung von freigegebenen Klassendaten, verl\u00E4uft sonst nicht erfolgreich.\n -XshowSettings Zeigt alle Einstellungen an und f\u00E4hrt fort\n -XshowSettings:all\n Zeigt alle Einstellungen an und f\u00E4hrt fort\n -XshowSettings:locale\n Zeigt alle gebietsschemabezogenen Einstellungen an und f\u00E4hrt fort\n -XshowSettings:properties\n Zeigt alle Eigenschaftseinstellungen an und f\u00E4hrt fort\n -XshowSettings:vm Zeigt alle VM-bezogenen Einstellungen an und f\u00E4hrt fort\n -Xss<Gr\u00F6\u00DFe> Legt Stack-Gr\u00F6\u00DFe des Java-Threads fest\n -Xverify Legt den Modus der Bytecodeverifizierung fest\n --add-reads <Modul>=<Zielmodul>(,<Zielmodul>)*\n Aktualisiert <Modul>, damit <Zielmodul> ungeachtet der\n Moduldeklaration gelesen wird. \n <Zielmodul> kann ALL-UNNAMED sein, um alle unbenannten\n Module zu lesen.\n --add-exports <Modul>/<Package>=<Zielmodul>(,<Zielmodul>)*\n Aktualisiert <Modul>, um <Package> ungeachtet der Moduldeklaration\n in <Zielmodul> zu exportieren.\n <Zielmodul> kann ALL-UNNAMED sein, um in alle \n unbenannten Module zu exportieren.\n --add-opens <Modul>/<Package>=<Zielmodul>(,<Zielmodul>)*\n Aktualisiert <Modul>, um <Package> ungeachtet der Moduldeklaration\n in <Zielmodul> zu \u00F6ffnen.\n --permit-illegal-access\n L\u00E4sst unzul\u00E4ssigen Zugriff f\u00FCr Mitglieder mit den Typen in den benannten Modulen\n nach Code in unbenannten Modulen zu. Diese Kompatibilit\u00E4tsoption wird\n im n\u00E4chsten Release entfernt.\n --limit-modules <Modulname>[,<Modulname>...]\n Grenzt die Gesamtmenge der beobachtbaren Module ein\n --patch-module <Modul>=<Datei>({0}<Datei>)*\n \u00DCberschreibt oder erweitert ein Modul in JAR-Dateien\n oder -Verzeichnissen mit \
+Klassen und Ressourcen.\n --disable-@files Deaktiviert die weitere Erweiterung von Argumentdateien\n\nDiese zus\u00E4tzlichen Optionen k\u00F6nnen ohne Vorank\u00FCndigung ge\u00E4ndert werden.
# 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 main()-Methode f\u00FCr den ersten (AppKit) Thread ausf\u00FChren\n -Xdock:name=<application name>\n Den im Dock angezeigten Standardanwendungsnamen \u00FCberschreiben\n -Xdock:icon=<Pfad zu Symboldatei>\n Das im Dock angezeigte Standardsymbol \u00FCberschreiben\n\n
-java.launcher.cls.error1=Fehler: Hauptklasse {0} konnte nicht gefunden oder geladen werden
+java.launcher.cls.error1=Fehler: Hauptklasse {0} konnte nicht gefunden oder geladen werden\nUrsache: {1}: {2}
java.launcher.cls.error2=Fehler: Hauptmethode ist nicht {0} in Klasse {1}. Definieren Sie die Hauptmethode als:\n public static void main(String[] args)
java.launcher.cls.error3=Fehler: Hauptmethode muss einen Wert vom Typ void in Klasse {0} zur\u00FCckgeben. Definieren Sie \ndie Hauptmethode als:\n public static void main(String[] args)
java.launcher.cls.error4=Fehler: Hauptmethode in Klasse {0} nicht gefunden. Definieren Sie die Hauptmethode als:\n public static void main(String[] args):\noder eine JavaFX-Anwendung muss {1} erweitern
java.launcher.cls.error5=Fehler: Zum Ausf\u00FChren dieser Anwendung ben\u00F6tigte JavaFX-Runtime-Komponenten fehlen
+java.launcher.cls.error6=Fehler: Beim Laden der Klasse {0} ist ein LinkageError aufgetreten\n\t{1}
java.launcher.jar.error1=Fehler: Beim Versuch, Datei {0} zu \u00F6ffnen, ist ein unerwarteter Fehler aufgetreten
java.launcher.jar.error2=Manifest in {0} nicht gefunden
java.launcher.jar.error3=kein Hauptmanifestattribut, in {0}
+java.launcher.jar.error4=Fehler beim Laden des Java-Agents in {0}
java.launcher.init.error=Initialisierungsfehler
java.launcher.javafx.error1=Fehler: Die JavaFX-Methode launchApplication hat die falsche Signatur, sie\nmuss als statisch deklariert werden und einen Wert vom Typ VOID zur\u00FCckgeben
java.launcher.module.error1=Modul {0} weist kein MainClass-Attribut auf. Verwenden Sie -m <module>/<main-class>
java.launcher.module.error2=Fehler: Hauptklasse {0} konnte in Modul {1} nicht gefunden oder geladen werden
+java.launcher.module.error3=Fehler: Hauptklasse {0} kann nicht aus Modul {1} geladen werden\n\t{2}
+java.launcher.module.error4={0} nicht gefunden
--- a/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_es.properties Sat Jun 03 02:44:55 2017 +0000
+++ b/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_es.properties Sat Jun 03 03:48:03 2017 +0000
@@ -24,32 +24,36 @@
#
# Translators please note do not translate the options themselves
-java.launcher.opt.header = Sintaxis: {0} [opciones] class [argumentos...]\n (para ejecutar una clase)\n o {0} [opciones] -jar jarfile [argumentos...]\n (para ejecutar un archivo jar)\n o {0} [opciones] -p <ruta_m\u00F3dulo> -m <nombre_m\u00F3dulo>[/<clase_principal>] [argumentos...]\n (para ejecutar la clase principal en un m\u00F3dulo)\ndonde las opciones incluyen:\n\n
+java.launcher.opt.header = Sintaxis: {0} [opciones] <clase principal> [argumentos...]\n (para ejecutar una clase)\n o {0} [opciones] -jar <archivo jar> [argumentos...]\n (para ejecutar un archivo jar)\n o {0} [opciones] -m <m\u00F3dulo>[/<clase principal>] [argumentos...]\n {0} [opciones] --module <m\u00F3dulo>[/<clase principal>] [argumentos...]\n (para ejecutar la clase principal en un m\u00F3dulo)\n\n Argumentos que siguen la clase principal, -jar <archivo jar>, -m o --module\n <m\u00F3dulo>/<clase principal> se transfieren como argumentos a una clase principal.\n\n donde las opciones incluyen:\n\n
java.launcher.opt.datamodel =\ -d{0}\t Anticuada, se eliminar\u00E1 en una versi\u00F3n futura\n
java.launcher.opt.vmselect =\ {0}\t para seleccionar la VM "{1}"\n
java.launcher.opt.hotspot =\ {0}\t es un sin\u00F3nimo de la VM "{1}" [anticuada]\n
# Translators please note do not translate the options themselves
-java.launcher.opt.footer =-cp <ruta de b\u00FAsqueda de clases de los directorios y archivos zip/jar>\n -classpath <ruta de b\u00FAsqueda de clases de los directorios y archivos zip/jar>\n --class-path <ruta de b\u00FAsqueda de clases de los directorios y archivos zip/jar>\n Lista separada por {0} de directorios, archivos JAR\n y archivos ZIP para buscar archivos de clase.\n -p <ruta_m\u00F3dulo>\n --module-path <ruta_m\u00F3dulo>...\n Lista separada por {0} de directorios, cada directorio\n es un directorio de m\u00F3dulos.\n --upgrade-module-path <ruta_m\u00F3dulo>...\n Lista separada por {0} de directorios, cada directorio\n es un directorio de m\u00F3dulos que sustituye a los m\u00F3dulos\n actualizables en la imagen de tiempo de ejecuci\u00F3n\n -m <m\u00F3dulo>[/<clase_principal>]\n --module <nombre_m\u00F3dulo>[/<clase_principal>]\n m\u00F3dulo inicial que resolver y nombre de la clase principal\n que ejecutar si el m\u00F3dulo no la especifica\n --add-modules <nombre_m\u00F3dulo>[,<nombre_m\u00F3dulo>...]\n m\u00F3dulos ra\u00EDz que resolver, adem\u00E1s del m\u00F3dulo inicial.\n <nombre_m\u00F3dulo> tambi\u00E9n puede ser ALL-DEFAULT, ALL-SYSTEM,\n ALL-MODULE-PATH.\n --limit-modules <nombre_m\u00F3dulo>[,<nombre_m\u00F3dulo>...]\n limitar el universo de los m\u00F3dulos observables\n --list-modules [<nombre_m\u00F3dulo>[,<nombre_m\u00F3dulo>...]]\n mostrar los m\u00F3dulos observables y salir\n --dry-run crear VM pero no ejecutar m\u00E9todo principal.\n Esta opci\u00F3n --dry-run puede ser \u00FAtil para validar las\n opciones de l\u00EDnea de comandos como la configuraci\u00F3n del sistema de m\u00F3dulo.\n -D<nombre>=<valor>\n definir una propiedad del sistema\n -verbose:[class|gc|jni]\n activar la salida detallada\n -version imprimir la versi\u00F3n del producto en el flujo de errores y salir\n ---version imprimir la versi\u00F3n del producto en el flujo de salida y salir\n -showversion imprimir la versi\u00F3n del producto en el flujo de errores y continuar\n --show-version\n imprimir la versi\u00F3n del producto en el flujo de salida y continuar\n -? -h -help\n imprimir este mensaje de ayuda en el flujo de errores\n --help imprimir este mensaje de ayuda en el flujo de salida\n -X imprimir la ayuda de opciones adicionales en el flujo de errores\n --help-extra imprimir la ayuda de opciones adicionales en el fujo de salida\n -ea[:<nombre_paquete>...|:<nombre_clase>]\n -enableassertions[:<nombre_paquete>...|:<nombre_clase>]\n activar afirmaciones con la granularidad especificada\n -da[:<nombre_paquete>...|:<nombre_clase>]\n -disableassertions[:<nombre_paquete>...|:<nombre_clase>]\n desactivar afirmaciones con la granularidad especificada\n -esa | -enablesystemassertions\n activar afirmaciones del sistema\n -dsa | -disablesystemassertions\n desactivar afirmaciones del sistema\n -agentlib:<nombre_bib>[=<opciones>]\n cargar biblioteca de agentes nativos <nombre_bib>, por ejemplo, -agentlib:jdwp\n ver tambi\u00E9n -agentlib:jdwp=help\n -agentpath:<nombre_ruta>[=<opciones>]\n cargar biblioteca de agentes nativos por nombre de ruta completo\n -javaagent:<ruta_jar>[=<opciones>]\n cargar agente de lenguaje de programaci\u00F3n Java, ver java.lang.instrument\n -splash:<ruta_imagen>\n mostrar pantalla de presentaci\u00F3n con la imagen especificada\n Las im\u00E1genes a escala HiDPI est\u00E1n \
-soportadas y se usan autom\u00E1ticamente\n si est\u00E1n disponibles. El nombre de archivo de la imagen sin escala, por ejemplo, image.ext,\n siempre debe transferirse como el argumento en la opci\u00F3n -splash.\n La imagen a escala m\u00E1s adecuada que se haya proporcionado se escoger\u00E1\n autom\u00E1ticamente.\n Consulte la documentaci\u00F3n de la API de la pantalla de presentaci\u00F3n para obtener m\u00E1s informaci\u00F3n.\n en<ruta_archivo> leer opciones del archivo especificado\nPara especificar un argumento para una opci\u00F3n larga, puede usar --<nombre>=<valor> o\n--<nombre> <valor>.
+java.launcher.opt.footer = \ -cp <ruta de b\u00FAsqueda de clase de directorios y archivos zip/jar>\n -classpath <ruta de b\u00FAsqueda de clase de directorios y archivos zip/jar>\n --class-path <ruta de b\u00FAsqueda de clase de directorios y archivos zip/jar>\n Una lista separada por el car\u00E1cter {0}, archivos JAR\n y archivos ZIP para buscar archivos de clases.\n -p <ruta m\u00F3dulo>\n --module-path <ruta m\u00F3dulo>...\n Una lista de directorios separada por el car\u00E1cter {0}, cada directorio\n es un directorio de m\u00F3dulos.\n --upgrade-module-path <ruta m\u00F3dulo>...\n Una lista de directorios separada por el car\u00E1cter {0}, cada directorio\n es un directorio de m\u00F3dulos que sustituye a\n los m\u00F3dulos actualizables en la imagen de tiempo de ejecuci\u00F3n\n --add-modules <nombre m\u00F3dulo>[,<nombre m\u00F3dulo>...]\n m\u00F3dulos de ra\u00EDz que resolver, adem\u00E1s del m\u00F3dulo inicial.\n <nombre m\u00F3dulo> tambi\u00E9n puede ser ALL-DEFAULT, ALL-SYSTEM,\n ALL-MODULE-PATH.\n --list-modules\n mostrar m\u00F3dulos observables y salir\n --d <nombre m\u00F3dulo>\n --describe-module <nombre m\u00F3dulo>\n describir un m\u00F3dulo y salir\n --dry-run crear VM y cargar la clase principal pero sin ejecutar el m\u00E9todo principal.\n La opci\u00F3n --dry-run puede ser \u00FAtil para validar\n las opciones de l\u00EDnea de comandos, como la configuraci\u00F3n del sistema de m\u00F3dulos.\n --validate-modules\n validar todos los m\u00F3dulos y salir\n La opci\u00F3n --validate-modules puede ser \u00FAtil para encontrar\n conflictos y otros errores con m\u00F3dulos en la ruta de m\u00F3dulos.\n -D<nombre>=<valor>\n definir una propiedad de sistema\n -verbose:[class|module|gc|jni]\n activar la salida en modo verbose\n -version imprimir versi\u00F3n de producto en el flujo de errores y salir\n --version imprimir versi\u00F3n de producto en el flujo de salida y salir\n -showversion imprimir versi\u00F3n de producto en el flujo de errores y continuar\n --show-version\n -showversion imprimir versi\u00F3n de producto en el flujo de salida y continuar\n --show-module-resolution\n mostrar la salida de resoluci\u00F3n de m\u00F3dulo durante el inicio\n -? -h -help\n imprimir este mensaje de ayuda en el flujo de errores\n --help imprimir este mensaje de ayuda en el flujo de salida\n -X imprimir ayuda de opciones adicionales en el flujo de errores\n --help-extra imprimir ayuda de opciones adicionales en el flujo de salida\n -ea[:<nombre paquete>...|:<nombre clase>]\n -enableassertions[:<nombre paquete>...|:<nombre clase>]\n activar afirmaciones con una granularidad especificada\n -da[:<nombre paquete>...|:<nombre clase>]\n -disableassertions[:<nombre paquete>...|:<nombre clase>]\n desactivar afirmaciones con una granularidad especificada\n -esa | -enablesystemassertions\n activar afirmaciones del sistema\n -dsa | -disablesystemassertions\n desactivar afirmaciones del sistema\n -agentlib:<nombre bib>[=<opciones>]\n cargar biblioteca de agente nativo <nombre bib>, por ejemplo, -agentlib:jdwp\n ver tambi\u00E9n -agentlib:jdwp=help\n -agentpath:<nombre ruta>[=<opciones>]\n cargar biblioteca de agente nativo por nombre completo de ruta\n -javaagent:<ruta jar>[=<opciones>]\n cargar agente de lenguaje de programaci\u00F3n Java, ver java.lang.instrument\n -splash:<ruta imagen>\n \
+ mostrar pantalla de presentaci\u00F3n con imagen especificada\n Las im\u00E1genes a escala HiDPI est\u00E1n soportadas y se usan autom\u00E1ticamente\n si est\u00E1n disponibles. El nombre de archivo de la imagen sin escala, por ejemplo, image.ext,\n siempre debe transmitirse como el argumento para la opci\u00F3n -splash.\n La imagen a escala m\u00E1s adecuada que se haya proporcionado se escoger\u00E1\n autom\u00E1ticamente.\n Consulte la documentaci\u00F3n de la API de la pantalla de presentaci\u00F3n para obtener m\u00E1s informaci\u00F3n.\n @argument files\n uno o m\u00E1s archivos de argumentos que contienen opciones\n -disable-@files\n evitar una mayor expansi\u00F3n del archivo de argumentos\nPara especificar un argumento para una opci\u00F3n larga, puede usar --<nombre>=<valor> o\n--<nombre> <valor>.\n
# Translators please note do not translate the options themselves
-java.launcher.X.usage=-Xbatch desactivar compilaci\u00F3n de fondo\n -Xbootclasspath/a:<directorios y archivos zip/jar separados por {0}>\n agregar al final de la ruta de la clase de inicializaci\u00F3n de datos\n -Xcheck:jni realizar comprobaciones adicionales para las funciones de JNI\n -Xcomp fuerza la compilaci\u00F3n de m\u00E9todos en la primera llamada\n -Xdebug se proporciona para ofrecer compatibilidad con versiones anteriores\n -Xdiag mostrar mensajes de diagn\u00F3stico adicionales\n -Xdiag:resolver mostrar mensajes de diagn\u00F3stico de resoluci\u00F3n\n -Xfuture activar las comprobaciones m\u00E1s estrictas, anticip\u00E1ndose al futuro valor por defecto\n -Xint solo ejecuci\u00F3n de modo interpretado\n -Xinternalversion\n muestra una informaci\u00F3n de la versi\u00F3n de JVM m\u00E1s detallada que la\n opci\u00F3n -version\n -Xloggc: registrar el estado de GC en un archivo con registros de hora\n -Xmixed ejecuci\u00F3n de modo mixto (por defecto)\n -Xmn<tama\u00F1o> define el tama\u00F1o inicial y m\u00E1ximo (en bytes) de la pila\n para la generaci\u00F3n m\u00E1s joven (espacio infantil)\n -Xms<size> define el tama\u00F1o inicial de la pila de Java\n -Xmx<size> define el tama\u00F1o m\u00E1ximo de la pila de Java\n -Xnoclassgc desactivar la recolecci\u00F3n de basura de clases\n -Xprof datos de creaci\u00F3n de perfiles de CPU de salida\n -Xrs reducir el uso de se\u00F1ales de sistema operativo por parte de Java/VM (consulte la documentaci\u00F3n)\n -Xshare:auto usar datos de clase compartidos si es posible (valor por defecto)\n -Xshare:off no intentar usar datos de clase compartidos\n -Xshare:on es obligatorio el uso de datos de clase compartidos, de lo contrario se producir\u00E1 un fallo.\n -XshowSettings mostrar toda la configuraci\u00F3n y continuar\n -XshowSettings:all\n mostrar todos los valores y continuar\n -XshowSettings:locale\n mostrar todos los valores relacionados con la configuraci\u00F3n regional y continuar\n -XshowSettings:properties\n mostrar todos los valores de propiedad y continuar\n -XshowSettings:vm mostrar todos los valores relacionados con vm y continuar\n -Xss<tama\u00F1o> definir tama\u00F1o de la pila del thread de Java\n -Xverify define el modo del verificador de c\u00F3digo de bytes\n --add-reads <m\u00F3dulo>=<m\u00F3dulo-destino>(,<m\u00F3dulo-destino>)*\n actualiza <m\u00F3dulo> para leer <m\u00F3dulo-destino>, independientemente\n de la declaraci\u00F3n del m\u00F3dulo. \n <m\u00F3dulo-destino> puede ser ALL-UNNAMED para leer todos los\n m\u00F3dulos sin nombre.\n --add-exports <m\u00F3dulo>/<paquete>=<m\u00F3dulo-destino>(,<m\u00F3dulo-destino>)*\n actualiza <m\u00F3dulo> para exportar <paquete> en <m\u00F3dulo-destino>,\n independientemente de la declaraci\u00F3n del m\u00F3dulo.\n <m\u00F3dulo-destino> puede ser ALL-UNNAMED para exportar a todos los\n m\u00F3dulos sin nombre.\n --add-opens <m\u00F3dulo>/<paquete>=<m\u00F3dulo-destino>(,<m\u00F3dulo-destino>)*\n actualiza <m\u00F3dulo> para abrir <paquete> en\n <m\u00F3dulo-destino>, independientemente de la declaraci\u00F3n del m\u00F3dulo.\n --disable-@files desactivar la ampliaci\u00F3n de archivos de m\u00E1s argumentos\n --patch-module <m\u00F3dulo>=({0})*\n Aumentar o anular un m\u00F3dulo con clases y recursos\n en directorios o archivos JAR\n\nEstas opciones \
-son adicionales y est\u00E1n sujetas a cambio sin previo aviso.
+java.launcher.X.usage=\ -Xbatch desactivar compilaci\u00F3n de fondo\n -Xbootclasspath/a:<directorios y archivos zip/jar separados por {0}>\n agregar al final de la ruta de la clase de inicializaci\u00F3n de datos\n -Xcheck:jni realizar comprobaciones adicionales para las funciones de JNI\n -Xcomp fuerza la compilaci\u00F3n de m\u00E9todos en la primera llamada\n -Xdebug se proporciona para ofrecer compatibilidad con versiones anteriores\n -Xdiag mostrar mensajes de diagn\u00F3stico adicionales\n -Xfuture activar las comprobaciones m\u00E1s estrictas, anticip\u00E1ndose al futuro valor por defecto\n -Xint solo ejecuci\u00F3n de modo interpretado\n -Xinternalversion\n muestra una informaci\u00F3n de la versi\u00F3n de JVM m\u00E1s detallada que la\n opci\u00F3n -version\n -Xloggc:<archivo> registrar el estado de GC en un archivo con registros de hora\n -Xmixed ejecuci\u00F3n de modo mixto (por defecto)\n -Xmn<size> define el tama\u00F1o inicial y m\u00E1ximo (en bytes) de la pila\n para la generaci\u00F3n m\u00E1s joven (espacio infantil)\n -Xms<size> define el tama\u00F1o inicial de la pila de Java\n -Xmx<size> define el tama\u00F1o m\u00E1ximo de la pila de Java\n -Xnoclassgc desactivar la recolecci\u00F3n de basura de clases\n -Xprof datos de creaci\u00F3n de perfiles de CPU de salida (anticuados)\n -Xrs reducir el uso de se\u00F1ales de sistema operativo por parte de Java/VM (consulte la documentaci\u00F3n)\n -Xshare:auto usar datos de clase compartidos si es posible (valor por defecto)\n -Xshare:off no intentar usar datos de clase compartidos\n -Xshare:on es obligatorio el uso de datos de clase compartidos, de lo contrario se producir\u00E1 un fallo.\n -XshowSettings mostrar toda la configuraci\u00F3n y continuar\n -XshowSettings:all\n mostrar todos los valores y continuar\n -XshowSettings:locale\n mostrar todos los valores relacionados con la configuraci\u00F3n regional y continuar\n -XshowSettings:properties\n mostrar todos los valores de propiedad y continuar\n -XshowSettings:vm mostrar todos los valores relacionados con vm y continuar\n -Xss<size> definir tama\u00F1o de la pila del thread de Java\n -Xverify define el modo del verificador de c\u00F3digo de bytes\n --add-reads <m\u00F3dulo>=<m\u00F3dulo-destino>(,<m\u00F3dulo-destino>)*\n actualiza <m\u00F3dulo> para leer <m\u00F3dulo-destino>, independientement\n de la declaraci\u00F3n del m\u00F3dulo. \n <m\u00F3dulo-destino> puede ser ALL-UNNAMED para leer todos los\n m\u00F3dulos sin nombre.\n --add-exports <m\u00F3dulo>/<paquete>=<modulo-destino>(,<m\u00F3dulo-destino>)*\n actualiza <m\u00F3dulo> para exportar <paquete> en <m\u00F3dulo-destino>,\n independientemente de la declaraci\u00F3n del m\u00F3dulo.\n <m\u00F3dulo-destino> puede ser ALL-UNNAMED para exportar a todos los\n m\u00F3dulos sin nombre.\n --add-opens <m\u00F3dulo>/<paquete>=<m\u00F3dulo-destino>(,<m\u00F3dulo-destino>)*\n actualiza <m\u00F3dulo> para abrir <paquete> en\n <m\u00F3dulo-destino>, independientemente de la declaraci\u00F3n del m\u00F3dulo.\n --permit-illegal-access\n permitir el acceso no v\u00E1lido a miembros de tipos en m\u00F3dulos con nombre\n por c\u00F3digo en m\u00F3dulos sin nombre. Esta opci\u00F3n de compatibilidad\n se eliminar\u00E1 en la pr\u00F3xima versi\u00F3n.\n --limit-modules <nombre \
+m\u00F3dulo>[,<nombre m\u00F3dulo>...]\n limitar el universo de m\u00F3dulos observables\n --patch-module <m\u00F3dulo>=<archivo>({0}<archivo>)*\n anular o aumentar un m\u00F3dulo con clases y recursos\n en directorios o archivos JAR.\n --disable-@files desactivar una mayor expansi\u00F3n del archivo de argumentos\n\nEstas opciones adicionales est\u00E1n sujetas a cambios sin previo aviso.\n
# Translators please note do not translate the options themselves
java.launcher.X.macosx.usage=\nLas siguientes opciones son espec\u00EDficas para Mac OS X:\n -XstartOnFirstThread\n ejecutar el m\u00E9todo main() del primer thread (AppKit)\n -Xdock:name=<application name>\n sustituir al nombre por defecto de la aplicaci\u00F3n que se muestra en el Dock\n -Xdock:icon=<ruta de acceso a archivo de icono>\n sustituir al icono por defecto que se muestra en el Dock\n\n
-java.launcher.cls.error1=Error: no se ha encontrado o cargado la clase principal {0}
+java.launcher.cls.error1=Error: no se ha encontrado o cargado la clase principal {0}\nCausado por: {1}: {2}
java.launcher.cls.error2=Error: el m\u00E9todo principal no es {0} en la clase {1}, defina el m\u00E9todo principal del siguiente modo:\n public static void main(String[] args)
java.launcher.cls.error3=Error: el m\u00E9todo principal debe devolver un valor del tipo void en la clase {0}, \ndefina el m\u00E9todo principal del siguiente modo:\n public static void main(String[] args)
java.launcher.cls.error4=Error: no se ha encontrado el m\u00E9todo principal en la clase {0}, defina el m\u00E9todo principal del siguiente modo:\\n public static void main(String[] args)\\nde lo contrario, se deber\u00E1 ampliar una clase de aplicaci\u00F3n JavaFX {1}
java.launcher.cls.error5=Error: faltan los componentes de JavaFX runtime y son necesarios para ejecutar esta aplicaci\u00F3n
+java.launcher.cls.error6=Error: Se ha producido un error de enlace al cargar la clase principal {0}\n\t{1}
java.launcher.jar.error1=Error: se ha producido un error inesperado al intentar abrir el archivo {0}
java.launcher.jar.error2=no se ha encontrado el manifiesto en {0}
java.launcher.jar.error3=no hay ning\u00FAn atributo de manifiesto principal en {0}
+java.launcher.jar.error4=error al cargar el agente de java en {0}
java.launcher.init.error=error de inicializaci\u00F3n
java.launcher.javafx.error1=Error: el m\u00E9todo launchApplication de JavaFX tiene una firma que no es correcta.\\nSe debe declarar est\u00E1tico y devolver un valor de tipo nulo
java.launcher.module.error1=el m\u00F3dulo {0} no tiene ning\u00FAn atributo MainClass, utilice -m <m\u00F3dulo>/<clase-principal>
java.launcher.module.error2=Error: no se ha encontrado o cargado la clase principal {0} en el m\u00F3dulo {1}
+java.launcher.module.error3=Error: No se ha podido cargar la clase principal {0} del m\u00F3dulo {1}\n\t{2}
+java.launcher.module.error4=No se ha encontrado {0}
--- a/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_fr.properties Sat Jun 03 02:44:55 2017 +0000
+++ b/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_fr.properties Sat Jun 03 03:48:03 2017 +0000
@@ -24,32 +24,36 @@
#
# Translators please note do not translate the options themselves
-java.launcher.opt.header = Syntaxe : {0} [options] class [args...]\n (pour l''ex\u00E9cution d''une classe)\n ou {0} [options] -jar jarfile [args...]\n (pour l''ex\u00E9cution d''un fichier JAR)\n ou {0} [options] -p <modulepath> -m <modulename>[/<mainclass>] [args...]\n (pour l''ex\u00E9cution de la classe principale dans un module)\n\no\u00F9 options comprend les \u00E9l\u00E9ments suivants :\n\n
+java.launcher.opt.header = Syntaxe : {0} [options] <mainclass> [args...]\n (pour ex\u00E9cuter une classe)\n ou {0} [options] -jar <jarfile> [args...]\n (pour ex\u00E9cuter un fichier JAR)\n ou {0} [options] -m <module>[/<mainclass>] [args...]\n {0} [options] --module <module>[/<mainclass>] [args...]\n (pour ex\u00E9cuter la classe principale dans un module)\n\n Les arguments suivant la classe principale -jar <jarfile>, -m ou --module\n <module>/<mainclass> sont transmis en tant qu''arguments \u00E0 la classe principale.\n\n o\u00F9 options comprend les \u00E9l\u00E9ments suivants :\n\n
java.launcher.opt.datamodel =\ -d{0}\t En phase d''abandon, sera enlev\u00E9 dans une version future\n
java.launcher.opt.vmselect =\ {0}\t pour s\u00E9lectionner la machine virtuelle "{1}"\n
java.launcher.opt.hotspot =\ {0}\t est un synonyme pour la machine virtuelle "{1}" [en phase d''abandon]\n
# Translators please note do not translate the options themselves
-java.launcher.opt.footer =\ -cp <chemin de recherche de classe de r\u00E9pertoires et de fichiers ZIP/JAR>\n -classpath <chemin de recherche de classe de r\u00E9pertoires et de fichiers ZIP/JAR>\n --class-path <chemin de recherche de classe de r\u00E9pertoires et de fichiers ZIP/JAR>\n Liste de r\u00E9pertoires, d''archives JAR\n et d''archives ZIP s\u00E9par\u00E9s par des {0} dans laquelle rechercher les fichiers de classe.\n -p <chemin de module>\n --module-path <chemin de module>...\n Liste de r\u00E9pertoires s\u00E9par\u00E9s par des {0}, chaque r\u00E9pertoire\n est un r\u00E9pertoire de modules.\n --upgrade-module-path <chemin de module>...\n Liste de r\u00E9pertoires s\u00E9par\u00E9s par des {0}, chaque r\u00E9pertoire\n est un r\u00E9pertoire de modules qui remplacent des modules\n pouvant \u00EAtre mis \u00E0 niveau dans l''image d''ex\u00E9cution\n -m <module>[/<mainclass>]\n --module <modulename>[/<mainclass>]\n module initial \u00E0 r\u00E9soudre et nom de la classe principale\n \u00E0 ex\u00E9cuter si elle n''est pas indiqu\u00E9e par le module\n --add-modules <modulename>[,<modulename>...]\n modules racine \u00E0 r\u00E9soudre en plus du module initial.\n <modulename> peut \u00E9galement \u00EAtre ALL-DEFAULT, ALL-SYSTEM,\n ALL-MODULE-PATH.\n --limit-modules <modulename>[,<modulename>...]\n limitation de l''univers de modules observables\n --list-modules [<modulename>[,<modulename>...]]\n \u00E9num\u00E9ration des modules observables et fin de l''op\u00E9ration\n --dry-run cr\u00E9e une machine virtuelle mais n''ex\u00E9cute pas la m\u00E9thode principale.\n Cette option --dry-run peut s''av\u00E9rer utile pour la validation des\n options de ligne de commandes telles que la configuration syst\u00E8me de module.\n -D<name>=<value>\n d\u00E9finition d''une propri\u00E9t\u00E9 syst\u00E8me\n -verbose:[class|gc|jni]\n activation de la sortie en mode verbose\n -version affichage de la version du produit dans le flux d''erreur et fin de l''op\u00E9ration\n --version affichage de la version du produit dans le flux de sortie et fin de l''op\u00E9ration\n -showversion affichage de la version du produit dans le flux d''erreur et poursuite de l''op\u00E9ration\n --show-version\n affichage de la version du produit dans le flux de sortie et poursuite de l''op\u00E9ration\n -? -h -help\n affichage de ce message d''aide dans le flux d''erreur\n --help affichage de ce message d''aide dans le flux de sortie\n -X affichage de l''aide sur les options suppl\u00E9mentaires dans le flux d''erreur\n --help-extra affichage de l''aide sur les options suppl\u00E9mentaires dans le flux de sortie\n -ea[:<packagename>...|:<classname>]\n -enableassertions[:<packagename>...|:<classname>]\n activation des assertions avec la granularit\u00E9 indiqu\u00E9e\n -da[:<packagename>...|:<classname>]\n -disableassertions[:<packagename>...|:<classname>]\n d\u00E9sactivation des assertions avec la granularit\u00E9 indiqu\u00E9e\n -esa | -enablesystemassertions\n activation des assertions syst\u00E8me\n -dsa | -disablesystemassertions\n d\u00E9sactivation des assertions syst\u00E8me\n -agentlib:<libname>[=<options>]\n chargement de la biblioth\u00E8que d''agents natifs <libname>, par exemple : -agentlib:jdwp\n voir aussi -agentlib:jdwp=help\n -agentpath:<pathname>[=<options>]\n chargement de la biblioth\u00E8que d''agents natifs via le chemin d''acc\u00E8s complet\n \
--javaagent:<jarpath>[=<options>]\n chargement de l''agent de langage de programmation Java, voir java.lang.instrument\n -splash:<imagepath>\n affichage de l''\u00E9cran d''accueil avec l''image indiqu\u00E9e\n Les images redimensionn\u00E9es HiDPI sont automatiquement prises en charge et utilis\u00E9es\n si elles sont disponibles. Le nom de fichier d''une image non redimensionn\u00E9e, par ex. image.ext,\n doit toujours \u00EAtre transmis comme argument \u00E0 l''option -splash.\n L''image redimensionn\u00E9e fournie la plus appropri\u00E9e sera automatiquement\n s\u00E9lectionn\u00E9e.\n Pour plus d''informations, reportez-vous \u00E0 la documentation relative \u00E0 l''API SplashScreen.\n @<filepath> lecture des options \u00E0 partir du fichier indiqu\u00E9\n\nPour indiquer un argument pour une option longue, vous pouvez utiliser --<name>=<value> ou\n--<name> <value>.\n
+java.launcher.opt.footer = \ -cp <chemin de recherche de classe de r\u00E9pertoires et de fichiers ZIP/JAR>\n -classpath <chemin de recherche de classe de r\u00E9pertoires et de fichiers ZIP/JAR>\n --class-path <chemin de recherche de classe de r\u00E9pertoires et de fichiers ZIP/JAR>\n Liste distincte {0} de r\u00E9pertoires, d''archives JAR\n et d'archives ZIP pour rechercher des fichiers de classe.\n -p <chemin de module>\n --module-path <chemin de module>...\n Liste distincte {0} de r\u00E9pertoires, chaque r\u00E9pertoire\n est un r\u00E9pertoire de modules.\n --upgrade-module-path <chemin de module>...\n Liste distincte {0} de r\u00E9pertoires, chaque r\u00E9pertoire\n est un r\u00E9pertoire de module qui remplace les modules\n pouvant \u00EAtre mis \u00E0 niveau dans l'image d'ex\u00E9cution\n --add-modules <nom de module>[,<nom de module>...]\n modules racine \u00E0 r\u00E9soudre en plus du module initial.\n <nom de module> peut \u00E9galement \u00EAtre ALL-DEFAULT, ALL-SYSTEM,\n ALL-MODULE-PATH.\n --list-modules\n r\u00E9pertorier les modules observables et quitter\n --d <nom de module>\n --describe-module <nom de module>\n d\u00E9crire un module et quitter\n --dry-run cr\u00E9er une machine virtuelle et charger la classe principale mais ne pas ex\u00E9cuter la m\u00E9thode principale.\n L'option--dry-run peut \u00EAtre utile pour la validation des\n options de ligne de commande telles que la configuration syst\u00E8me de module.\n --validate-modules\n valider tous les modules et quitter\n L'option --validate-modules peut \u00EAtre utile pour la recherche de\n conflits et d'autres erreurs avec des modules dans le chemin de module.\n -D<name>=<value>\n d\u00E9finir une propri\u00E9t\u00E9 syst\u00E8me\n -verbose:[class|module|gc|jni]\n activer la sortie en mode verbose\n -version afficher la version de produit dans le flux d'erreur et quitter\n --version afficher la version de produit dans le flux de sortie et quitter\n -showversion afficher la version de produit dans le flux d'erreur et continuer\n --show-version\n afficher la version de produit dans le flux de sortie et continuer\n --show-module-resolution\n afficher la sortie de r\u00E9solution de module lors du d\u00E9marrage\n -? -h -help\n afficher ce message d'aide dans le flux d'erreur\n --help afficher ce message d'erreur dans le flux de sortie\n -X afficher l'aide sur des options suppl\u00E9mentaires dans le flux d'erreur\n --help-extra afficher l'aide sur des options suppl\u00E9mentaires dans le flux de sortie\n -ea[:<packagename>...|:<classname>]\n -enableassertions[:<packagename>...|:<classname>]\n activer des assertions avec la granularit\u00E9 sp\u00E9cifi\u00E9e\n -da[:<packagename>...|:<classname>]\n -disableassertions[:<packagename>...|:<classname>]\n d\u00E9sactiver des assertions avec la granularit\u00E9 sp\u00E9cifi\u00E9e\n -esa | -enablesystemassertions\n activer des assertions syst\u00E8me\n -dsa | -disablesystemassertions\n d\u00E9sactiver des assertions syst\u00E8me\n -agentlib:<libname>[=<options>]\n charger la biblioth\u00E8que d'agent natif <libname>, par ex. -agentlib:jdwp\n voir \u00E9galement -agentlib:jdwp=help\n -agentpath:<pathname>[=<options>]\n charger la biblioth\u00E8que d'agent natif par nom de chemin complet\n -javaagent:<jarpath>[=<options>]\n charger l'agent de langage de programmation, voir \
+java.lang.instrument\n -splash:<imagepath>\n afficher l'\u00E9cran d'accueil avec l'image indiqu\u00E9e\n Les images redimensionn\u00E9es HiDPI sont automatiquement prises en charge et utilis\u00E9es\n si elles sont disponibles. Le nom de fichier d'une image non redimensionn\u00E9e, par ex. image.ext,\n doit toujours \u00EAtre transmis comme argument \u00E0 l'option -splash.\n L'image redimensionn\u00E9e fournie la plus appropri\u00E9e sera automatiquement\n s\u00E9lectionn\u00E9e.\n Pour plus d'informations, reportez-vous \u00E0 la documentation relative \u00E0 l'API SplashScreen\n fichiers @argument\n fichiers d'arguments contenant des options\n -disable-@files\n emp\u00EAcher le d\u00E9veloppement suppl\u00E9mentaire de fichiers d'arguments\nAfin d'indiquer un argument pour une option longue, vous pouvez utiliser --<name>=<value> ou\n--<name> <value>.\n
# Translators please note do not translate the options themselves
-java.launcher.X.usage=\n -Xbatch d\u00E9sactivation de la compilation en arri\u00E8re-plan\n -Xbootclasspath/a:<r\u00E9pertoires et fichiers ZIP/JAR s\u00E9par\u00E9s par des {0}>\n ajout \u00E0 la fin du chemin de classe bootstrap\n -Xcheck:jni ex\u00E9cution de contr\u00F4les suppl\u00E9mentaires pour les fonctions JNI\n -Xcomp force la compilation de m\u00E9thodes au premier appel\n -Xdebug fourni pour la compatibilit\u00E9 amont\n -Xdiag affichage de messages de diagnostic suppl\u00E9mentaires\n -Xdiag:resolver affichage de messages de diagnostic du r\u00E9solveur\n -Xfuture activation des contr\u00F4les les plus stricts en vue d''anticiper la future valeur par d\u00E9faut\n -Xint ex\u00E9cution en mode interpr\u00E9t\u00E9 uniquement\n -Xinternalversion\n affiche des informations de version JVM plus d\u00E9taill\u00E9es que\n l''option -version\n -Xloggc:<file> journalisation du statut de l''op\u00E9ration de ramasse-miette dans un fichier avec horodatage\n -Xmixed ex\u00E9cution en mode mixte (valeur par d\u00E9faut)\n -Xmn<size> d\u00E9finit les tailles initiale et maximale (en octets) de la portion de m\u00E9moire\n pour la jeune g\u00E9n\u00E9ration (nursery)\n -Xms<size> d\u00E9finition de la taille initiale des portions de m\u00E9moire Java\n -Xmx<size> d\u00E9finition de la taille maximale des portions de m\u00E9moire Java\n -Xnoclassgc d\u00E9sactivation de l''op\u00E9ration de ramasse-miette de la classe\n -Xprof sortie des donn\u00E9es de profilage d''UC\n -Xrs r\u00E9duction de l''utilisation des signaux OS par Java/la machine virtuelle (voir documentation)\n -Xshare:auto utilisation des donn\u00E9es de classe partag\u00E9es si possible (valeur par d\u00E9faut)\n -Xshare:off aucune tentative d''utilisation des donn\u00E9es de classe partag\u00E9es\n -Xshare:on utilisation des donn\u00E9es de classe partag\u00E9es obligatoire ou \u00E9chec de l''op\u00E9ration\n -XshowSettings affichage de tous les param\u00E8tres et poursuite de l''op\u00E9ration\n -XshowSettings:all\n affichage de tous les param\u00E8tres et poursuite de l''op\u00E9ration\n -XshowSettings:locale\n affichage de tous les param\u00E8tres d''environnement local et poursuite de l''op\u00E9ration\n -XshowSettings:properties\n affichage de tous les param\u00E8tres de propri\u00E9t\u00E9 et poursuite de l''op\u00E9ration\n -XshowSettings:vm affichage de tous les param\u00E8tres de machine virtuelle et poursuite de l''op\u00E9ration\n -Xss<size> d\u00E9finition de la taille de pile de threads Java\n -Xverify d\u00E9finit le mode du v\u00E9rificateur de code ex\u00E9cutable\n --add-reads <module>=<target-module>(,<target-module>)*\n met \u00E0 jour <module> pour lire <target-module>, sans tenir compte\n de la d\u00E9claration de module. \n <target-module> peut \u00EAtre ALL-UNNAMED pour lire tous les modules\n sans nom.\n --add-exports <module>/<package>=<target-module>(,<target-module>)*\n met \u00E0 jour <module> pour exporter <package> vers <target-module>,\n sans tenir compte de la d\u00E9claration de module.\n <target-module> peut \u00EAtre ALL-UNNAMED pour effectuer un export vers tous\n les modules sans nom.\n --add-opens <module>/<package>=<target-module>(,<target-module>)*\n met \u00E0 jour <module> pour ouvrir <package> vers\n \
-<target-module>, sans tenir compte de la d\u00E9claration de module\n --disable-@files d\u00E9sactivation d''autres d\u00E9veloppements de fichier d''argument\n --patch-module <module>=<file>({0}<file>)*\n Remplacement ou augmentation d''un module avec des classes et des ressources\n dans des fichiers ou des r\u00E9pertoires JAR.\n\nCes options suppl\u00E9mentaires peuvent \u00EAtre modifi\u00E9es sans pr\u00E9avis.\n
+java.launcher.X.usage=\n -Xbatch d\u00E9sactivation de la compilation en arri\u00E8re-plan\n -Xbootclasspath/a:<r\u00E9pertoires et fichiers ZIP/JAR s\u00E9par\u00E9s par des {0}>\n ajout \u00E0 la fin du chemin de classe bootstrap\n -Xcheck:jni ex\u00E9cution de contr\u00F4les suppl\u00E9mentaires pour les fonctions JNI\n -Xcomp force la compilation de m\u00E9thodes au premier appel\n -Xdebug fourni pour la compatibilit\u00E9 amont\n -Xdiag affichage de messages de diagnostic suppl\u00E9mentaires\n -Xfuture activation des contr\u00F4les les plus stricts en vue d''anticiper la future valeur par d\u00E9faut\n -Xint ex\u00E9cution en mode interpr\u00E9t\u00E9 uniquement\n -Xinternalversion\n affiche des informations de version JVM plus d\u00E9taill\u00E9es que\n l''option -version\n -Xloggc:<file> journalisation du statut de l''op\u00E9ration de ramasse-miette dans un fichier avec horodatage\n -Xmixed ex\u00E9cution en mode mixte (valeur par d\u00E9faut)\n -Xmn<size> d\u00E9finit les tailles initiale et maximale (en octets) de la portion de m\u00E9moire\n pour la jeune g\u00E9n\u00E9ration (nursery)\n -Xms<size> d\u00E9finition de la taille initiale des portions de m\u00E9moire Java\n -Xmx<size> d\u00E9finition de la taille maximale des portions de m\u00E9moire Java\n -Xnoclassgc d\u00E9sactivation de l''op\u00E9ration de ramasse-miette de la classe\n -Xprof sortie des donn\u00E9es de profilage d''UC (en phase d''abandon)\n -Xrs r\u00E9duction de l''utilisation des signaux OS par Java/la machine virtuelle (voir documentation)\n -Xshare:auto utilisation des donn\u00E9es de classe partag\u00E9es si possible (valeur par d\u00E9faut)\n -Xshare:off aucune tentative d''utilisation des donn\u00E9es de classe partag\u00E9es\n -Xshare:on utilisation des donn\u00E9es de classe partag\u00E9es obligatoire ou \u00E9chec de l''op\u00E9ration.\n -XshowSettings affichage de tous les param\u00E8tres et poursuite de l''op\u00E9ration\n -XshowSettings:all\n affichage de tous les param\u00E8tres et poursuite de l''op\u00E9ration\n -XshowSettings:locale\n affichage de tous les param\u00E8tres d''environnement local et poursuite de l''op\u00E9ration\n -XshowSettings:properties\n affichage de tous les param\u00E8tres de propri\u00E9t\u00E9 et poursuite de l''op\u00E9ration\n -XshowSettings:vm affichage de tous les param\u00E8tres de machine virtuelle et poursuite de l''op\u00E9ration\n -Xss<size> d\u00E9finition de la taille de pile de threads Java\n -Xverify d\u00E9finit le mode du v\u00E9rificateur de code ex\u00E9cutable\n --add-reads <module>=<target-module>(,<target-module>)*\n met \u00E0 jour <module> pour lire <target-module>, sans tenir compte\n de la d\u00E9claration de module. \n <target-module> peut \u00EAtre ALL-UNNAMED pour lire tous les modules\n sans nom.\n --add-exports <module>/<package>=<target-module>(,<target-module>)*\n met \u00E0 jour <module> pour exporter <package> vers <target-module>,\n sans tenir compte de la d\u00E9claration de module.\n <target-module> peut \u00EAtre ALL-UNNAMED pour exporter tous les\n modules sans nom.\n --add-opens <module>/<package>=<target-module>(,<target-module>)*\n met \u00E0 jour <module> pour ouvrir <package> dans\n <target-module>, sans tenir compte de la d\u00E9claration de module.\n --permit-illegal-access\n autoriser l''acc\u00E8s non autoris\u00E9 \u00E0 des \
+membres de types dans des modules nomm\u00E9s\n par code dans des modules sans nom. Cette option de compatibilit\u00E9 sera\n enlev\u00E9e dans la prochaine version.\n --limit-modules <nom de module>[,<nom de module>...]\n limiter l''univers de modules observables\n --patch-module <module>=<file>({0}<file>)*\n Remplacement ou augmentation d''un module avec des classes et des ressources\n dans des fichiers ou des r\u00E9pertoires JAR.\n --disable-@files d\u00E9sactivation d''autres d\u00E9veloppements de fichier d''argument\n\nCes options suppl\u00E9mentaires peuvent \u00EAtre modifi\u00E9es sans pr\u00E9avis.\n
# Translators please note do not translate the options themselves
java.launcher.X.macosx.usage=\nLes options suivantes sont propres \u00E0 Mac OS X :\n -XstartOnFirstThread\n ex\u00E9cute la m\u00E9thode main() sur le premier thread (AppKit)\n -Xdock:name=<nom d'application>\n remplace le nom d'application par d\u00E9faut affich\u00E9 dans l'ancrage\n -Xdock:icon=<chemin vers le fichier d'ic\u00F4ne>\n remplace l'ic\u00F4ne par d\u00E9faut affich\u00E9e dans l'ancrage\n\n
-java.launcher.cls.error1=Erreur : impossible de trouver ou charger la classe principale {0}
+java.launcher.cls.error1=Erreur : impossible de trouver ou de charger la classe principale {0}\nCaus\u00E9 par : {1}: {2}
java.launcher.cls.error2=Erreur : la m\u00E9thode principale n''est pas {0} dans la classe {1}, d\u00E9finissez la m\u00E9thode principale comme suit :\n public static void main(String[] args)
java.launcher.cls.error3=Erreur : la m\u00E9thode principale doit renvoyer une valeur de type void dans la classe {0}, \nd\u00E9finissez la m\u00E9thode principale comme suit :\n public static void main(String[] args)
java.launcher.cls.error4=Erreur : la m\u00E9thode principale est introuvable dans la classe {0}, d\u00E9finissez la m\u00E9thode principale comme suit :\n public static void main(String[] args)\nou une classe d''applications JavaFX doit \u00E9tendre {1}
java.launcher.cls.error5=Erreur : des composants d'ex\u00E9cution JavaFX obligatoires pour ex\u00E9cuter cette application sont manquants.
+java.launcher.cls.error6=Erreur : LinkageError lors du chargement de la classe principale {0}\n\t{1}
java.launcher.jar.error1=Erreur : une erreur inattendue est survenue lors de la tentative d''ouverture du fichier {0}
java.launcher.jar.error2=fichier manifeste introuvable dans {0}
java.launcher.jar.error3=aucun attribut manifest principal dans {0}
+java.launcher.jar.error4=erreur lors du chargement de l''agent Java dans {0}
java.launcher.init.error=erreur d'initialisation
java.launcher.javafx.error1=Erreur : la signature de la m\u00E9thode launchApplication JavaFX est incorrecte, la\nm\u00E9thode doit \u00EAtre d\u00E9clar\u00E9e statique et renvoyer une valeur de type void
java.launcher.module.error1=le module {0} n''a pas d''attribut MainClass, utilisez -m <module>/<main-class>
java.launcher.module.error2=Erreur : impossible de trouver ou charger la classe principale {0} dans le module {1}
+java.launcher.module.error3=Erreur : impossible de charger la classe principale {0} \u00E0 partir du module {1}\n\t{2}
+java.launcher.module.error4={0} introuvable
--- a/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_it.properties Sat Jun 03 02:44:55 2017 +0000
+++ b/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_it.properties Sat Jun 03 03:48:03 2017 +0000
@@ -24,31 +24,36 @@
#
# Translators please note do not translate the options themselves
-java.launcher.opt.header = Uso: {0} [opzioni] class [argomenti...]\n (per eseguire una classe)\n oppure {0} [opzioni] -jar jarfile [argomenti...]\n (per eseguire un file jar)\n oppure {0} [opzioni] -p <percorsomodulo> -m <nomemodulo>[/<classeprincipale>] [argomenti...]\n (per eseguire la classe principale in un modulo)\ndove opzioni include:\n\n
+java.launcher.opt.header = Uso: {0} [opzioni] <classe principale> [argomenti...]\n (per eseguire una classe)\n oppure {0} [opzioni] -jar <file jar> [argomenti...]\n (per eseguire un file jar)\n oppure {0} [opzioni] -m <modulo>[/<classe principale>] [argomenti...]\n {0} [opzioni] --module <modulo>[/<classe principale>] [argomenti...]\n (per eseguire la classe principale in un modulo)\n\n Gli argomenti specificati dopo la classe principale, dopo -jar <file jar>, -m o --module\n <modulo>/<classe principale> vengono passati come argomenti alla classe principale.\n\n dove opzioni include:\n\n
java.launcher.opt.datamodel =\ -d{0}\t opzione non pi\u00F9 valida; verr\u00E0 rimossa in una release futura\n
java.launcher.opt.vmselect =\ {0}\t per selezionare la VM "{1}"\n
java.launcher.opt.hotspot =\ {0}\t \u00E8 un sinonimo per la VM "{1}" [non valido]\n
# Translators please note do not translate the options themselves
-java.launcher.opt.footer =\ -cp <classpath di ricerca di directory e file zip/jar>\n -classpath <classpath di ricerca di directory e file zip/jar>\n --class-path <classpath di ricerca di directory e file zip/jar>\n Lista separata da {0} di directory, archivi JAR\n e archivi ZIP utilizzata per la ricerca di file di classe.\n -p <percorso modulo>\n -module-path <percorso modulo>...\n Lista separata da {0} di directory; ciascuna directory\n \u00E8 una directory di moduli.\n -upgrade-module-path <percorso modulo>...\n Lista separata da {0} di directory; ciascuna directory\n \u00E8 una directory dei moduli che sostituiscono i moduli\n aggiornabili nell''immagine in fase di esecuzione.\n -m <modulo>[/<classe principale>]\n --module <nome modulo>[/<classe principale>]\n Il modulo iniziale da risolvere e il nome della classe\n principale da eseguire se non specificata dal modulo.\n -add-modules <nome modulo>[,<nome modulo>...]\n Moduli root da risolvere in aggiunta al modulo iniziale.\n <nome modulo> pu\u00F2 essere anche ALL-DEFAULT, ALL-SYSTEM,\n ALL-MODULE-PATH.\n -limit-modules <nome modulo>[,<nome modulo>...]\n Limita l''universe dei moduli osservabili.\n -list-modules[:<nome modulo>[,<nome modulo>...]]\n Elenca i moduli osservabili ed esce.\n --dry-run Crea la VM ma non esegue il metodo principale.\n Pu\u00F2 essere utile, ad esempio, per la convalida delle opzioni della\n riga di comando utilizzate per la configurazione del sistema di moduli.\n -D<nome>=<valore>\n Imposta una propriet\u00E0 di sistema.\n -verbose:[class|gc|jni]\n Abilita l''output descrittivo.\n -version Visualizza la versione del prodotto ed esce.\n --version Visualizza la versione del prodotto nel flusso di output ed esce.\n -showversion Visualizza la versione del prodotto nel flusso di errori e continua.\n --show-version\n Visualizza la versione del prodotto nel flusso di output e continua.\n -? -h -help\n Visualizza questo messaggio della Guida nel flusso di errori.\n --help Visualizza questo messaggio della Guida nel flusso di output.\n -X Visualizza la Guida relativa alle opzioni non standard nel flusso di errori.\n --help-extra Visualizza la Guida relativa alle opzioni non standard nel flusso di output.\n -ea[:<nome package>...|:<nome classe>]\n -enableassertions[:<nome package>...|:<nome classe>]\n Abilita le asserzioni con la granularit\u00E0 specificata.\n -da[:<nome package>...|:<nome classe>]\n -disableassertions[:<nome package>...|:<nome classe>]\n Disabilita le asserzioni con la granularit\u00E0 specificata.\n -esa | -enablesystemassertions\n Abilita le asserzioni di sistema.\n -dsa | -disablesystemassertions\n Disabilita le asserzioni di sistema.\n -agentlib:<nome libreria>[=<opzioni>]\n Carica la libreria agenti nativa <nome libreria>, ad esempio -agentlib:jdwp.\n Vedere anche -agentlib:jdwp=help.\n -agentpath:<nome percorso>[=<opzioni>]\n Carica la libreria agenti nativa con il percorso completo.\n -javaagent:<percorso jar>[=<opzioni>]\n Carica l''agente del linguaggio di programmazione Java. Vedere java.lang.instrument.\n -splash:<percorso immagine>\n Mostra la schermata iniziale con l''immagine specificata.\n Le immagini ridimensionate HiDPI sono supportate e utilizzate automaticamente\n se disponibili. I nomi file delle immagini non ridimensionate, ad esempio image.ext,\n devono \
-essere sempre passati come argomenti all''opzione -splash.\n Verr\u00E0 scelta automaticamente l''immagine ridimensionata pi\u00F9 appropriata\n fornita.\n Per ulteriori informazioni, vedere la documentazione relativa all''API SplashScreen.\n @<percorso file> Legge le opzioni dal file specificato.\n\nPer specificare un argomento per un''opzione lunga, \u00E8 possibile utilizzare --<nome>=<valore> o\n--<nome> <valore>.\n
+java.launcher.opt.footer = \ -cp <classpath di ricerca di directory e file zip/jar>\n -classpath <classpath di ricerca di directory e file zip/jar>\n -class-path <classpath di ricerca di directory e file zip/jar>\n Una lista separata da {0} di directory, archivi JAR\n e archivi ZIP in cui cercare i file di classe.\n -p <percorso modulo>\n --module-path <percorso modulo>...\n Una lista separata da {0} di directory. Ogni directory\n \u00E8 una directory di moduli.\n --upgrade-module-path <percorso modulo>...\n Una lista separata da {0} di directory. Ogni directory\n \u00E8 una directory di moduli che sostituiscono i moduli\n aggiornabili nell'immagine in fase di esecuzione\n --add-modules <nome modulo>[,<nome modulo>...]\n I moduli radice da risolvere in aggiunta al modulo iniziale.\n <nome modulo> pu\u00F2 essere anche ALL-DEFAULT, ALL-SYSTEM,\n ALL-MODULE-PATH.\n --list-modules\n Elenca i moduli osservabili ed esce\n --d <nome modulo>\n --describe-module <nome modulo>\n Descrive un modulo ed esce\n --dry-run Crea la VM e carica la classe principale ma non esegue il metodo principale.\n L'opzione --dry-run pu\u00F2 essere utile per la convalida delle\n opzioni della riga di comando, ad esempio quelle utilizzate per la configurazione del sistema di moduli.\n --validate-modules\n Convalida tutti i moduli ed esce\n L'opzione --validate-modules pu\u00F2 essere utile per rilevare\n conflitti e altri errori con i moduli nel percorso dei moduli.\n -D<nome>=<valore>\n Imposta una propriet\u00E0 di sistema\n -verbose:[class|module|gc|jni]\n abilitare output descrittivo\n -version Visualizza la versione del prodotto nel flusso di errori ed esce\n -version Visualizza la versione del prodotto nel flusso di output ed esce\n -showversion Visualizza la versione del prodotto nel flusso di errori e continua\n --show-version\n Visualizza la versione del prodotto nel flusso di output e continua\n --show-module-resolution\n Mostra l'output della risoluzione del modulo durante l'avvio\n -? -h -help\n Visualizza questo messaggio della Guida nel flusso di errori\n --help Visualizza questo messaggio della Guida nel flusso di output\n -X Visualizza la Guida relativa alle opzioni non standard nel flusso di errori\n --help-extra Visualizza la Guida relativa alle opzioni non standard nel flusso di output\n -ea[:<nome package>...|:<nome classe>]\n -enableassertions[:<nome package>...|:<nome classe>]\n Abilita le asserzioni con la granularit\u00E0 specificata\n -da[:<nome package>...|:<nome classe>]\n -disableassertions[:<nome package>...|:<nome classe>]\n Disabilita le asserzioni con la granularit\u00E0 specificata\n -esa | -enablesystemassertions\n Abilita le asserzioni di sistema\n -dsa | -disablesystemassertions\n Disabilita le asserzioni di sistema\n -agentlib:<nome libreria>[=<opzioni>]\n Carica la libreria agenti nativa <nome libreria>, ad esempio -agentlib:jdwp\n Vedere anche -agentlib:jdwp=help\n -agentpath:<nome percorso>[=<opzioni>]\n Carica la libreria agenti nativa con il percorso completo\n -javaagent:<percorso jar>[=<opzioni>]\n Carica l'agente del linguaggio di programmazione Java, vedere java.lang.instrument\n -splash:<percorso immagine>\n Mostra la schermata iniziale con l'immagine specificata\n Le immagini ridimensionate HiDPI sono supportate e utilizzate \
+automaticamente\n se disponibili. I nomi file delle immagini non ridimensionate, ad esempio image.ext,\n devono essere sempre passati come argomenti all'opzione -splash.\n Verr\u00E0 scelta automaticamente l'immagine ridimensionata pi\u00F9 appropriata\n fornita.\n Per ulteriori informazioni, vedere la documentazione relativa all'API SplashScreen\n @file argomenti\n Uno o pi\u00F9 file argomenti contenenti opzioni\n -disable-@files\n Impedisce l'ulteriore espansione di file argomenti\nPer specificare un argomento per un'opzione lunga, \u00E8 possibile usare --<nome>=<valore> oppure\n--<nome> <valore>.\n
# Translators please note do not translate the options themselves
-java.launcher.X.usage=\n -Xbatch Disabilita la compilazione in background.\n -Xbootclasspath/a:<directory e file zip/jar separati da {0}>\n Aggiunge alla fine del classpath di bootstrap.\n -Xcheck:jni Esegue controlli aggiuntivi per le funzioni JNI.\n -Xcomp Forza la compilazione dei metodi al primo richiamo.\n -Xdebug Fornito per la compatibilit\u00E0 con le versioni precedenti.\n -Xdiag Mostra ulteriori messaggi diagnostici.\n -Xdiag:resolver Mostra i messaggi diagnostici del resolver.\n -Xfuture Abilita i controlli pi\u00F9 limitativi anticipando le impostazioni predefinite future.\n -Xint Esecuzione solo in modalit\u00E0 convertita.\n -Xinternalversion\n Visualizza informazioni pi\u00F9 dettagliate sulla versione JVM rispetto\n all''opzione -version.\n -Xloggc:<file> Registra lo stato GC in un file con indicatori orari.\n -Xmixed Esecuzione in modalit\u00E0 mista (impostazione predefinita).\n -Xmn<size> Imposta le dimensioni iniziale e massima (in byte) dell''heap\n per la young generation (nursery).\n -Xms<size> Imposta la dimensione heap Java iniziale.\n -Xmx<size> Imposta la dimensione heap Java massima.\n -Xnoclassgc Disabilta la garbage collection della classe.\n -Xprof Visualizza i dati di profilo della CPU.\n -Xrs Riduce l''uso di segnali del sistema operativo da Java/VM (vedere la documentazione).\n -Xshare:auto Utilizza i dati di classe condivisi se possibile (impostazione predefinita).\n -Xshare:off Non tenta di utilizzare i dati di classe condivisi.\n -Xshare:on Richiede l''uso dei dati di classe condivisi, altrimenti l''esecuzione non riesce.\n -XshowSettings Mostra tutte le impostazioni e continua.\n -XshowSettings:all\n Mostra tutte le impostazioni e continua.\n -XshowSettings:locale\n Mostra tutte le impostazioni correlate alle impostazioni nazionali e continua.\n -XshowSettings:properties\n Mostra tutte le impostazioni delle propriet\u00E0 e continua.\n -XshowSettings:vm Mostra tutte le impostazioni correlate alla VM e continua.\n -Xss<size> Imposta la dimensione dello stack di thread Java.\n -Xverify Imposta la modalit\u00E0 del verificatore bytecode.\n --add-reads:<module>=<target-module>(,<target-module>)*\n Aggiorna <module> per leggere <target-module>, indipendentemente\n dalla dichiarazione del modulo.\n <target-module> pu\u00F2 essere ALL-UNNAMED per leggere tutti i\n moduli senza nome.\n -add-exports:<module>/<package>=<target-module>(,<target-module>)*\n Aggiorna <module> per esportare <package> in <target-module>,\n indipendentemente dalla dichiarazione del modulo.\n <target-module> pu\u00F2 essere ALL-UNNAMED per esportare tutti i\n moduli senza nome.\n --add-opens <module>/<package>=<target-module>(,<target-module>)*\n Aggiorna <module> per aprire <package> in\n <target-module>, indipendentemente dalla dichiarazione del modulo.\n --disable-@files Disabilita l''ulteriore espansione del file di argomenti.\n -patch-module <module>=<file>({0}<file>)*\n Sostituisce o migliora un modulo con classi e risorse\n in file JAR o directory.\n\nQueste opzioni non sono opzioni standard e sono soggette a modifiche senza preavviso.\n
+java.launcher.X.usage=\n -Xbatch Disabilita la compilazione in background.\n -Xbootclasspath/a:<directory e file zip/jar separati da {0}>\n Aggiunge alla fine del classpath di bootstrap.\n -Xcheck:jni Esegue controlli aggiuntivi per le funzioni JNI.\n -Xcomp Forza la compilazione dei metodi al primo richiamo.\n -Xdebug Fornito per la compatibilit\u00E0 con le versioni precedenti.\n -Xdiag Mostra ulteriori messaggi diagnostici.\n -Xfuture Abilita i controlli pi\u00F9 limitativi anticipando le impostazioni predefinite future.\n -Xint Esecuzione solo in modalit\u00E0 convertita.\n -Xinternalversion\n Visualizza informazioni pi\u00F9 dettagliate sulla versione JVM rispetto\n all''opzione -version.\n -Xloggc:<file> Registra lo stato GC in un file con indicatori orari.\n -Xmixed Esecuzione in modalit\u00E0 mista (impostazione predefinita).\n -Xmn<dimensione> Imposta le dimensioni iniziale e massima (in byte) dell''heap\n per la young generation (nursery).\n -Xms<dimensione> Imposta la dimensione heap Java iniziale.\n -Xmx<dimensione> Imposta la dimensione heap Java massima.\n -Xnoclassgc Disabilta la garbage collection della classe.\n -Xprof Visualizza i dati di profilo della CPU (non pi\u00F9 valida).\n -Xrs Riduce l''uso di segnali del sistema operativo da Java/VM (vedere la documentazione).\n -Xshare:auto Utilizza i dati di classe condivisi se possibile (impostazione predefinita).\n -Xshare:off Non tenta di utilizzare i dati di classe condivisi.\n -Xshare:on Richiede l''uso dei dati di classe condivisi, altrimenti l''esecuzione non riesce.\n -XshowSettings Mostra tutte le impostazioni e continua.\n -XshowSettings:all\n Mostra tutte le impostazioni e continua.\n -XshowSettings:locale\n Mostra tutte le impostazioni correlate alle impostazioni nazionali e continua.\n -XshowSettings:properties\n Mostra tutte le impostazioni delle propriet\u00E0 e continua.\n -XshowSettings:vm Mostra tutte le impostazioni correlate alla VM e continua.\n -Xss<dimensione> Imposta la dimensione dello stack di thread Java.\n -Xverify Imposta la modalit\u00E0 del verificatore bytecode.\n --add-reads:<modulo>=<modulo destinazione>(,<modulo destinazione>)*\n Aggiorna <modulo> per leggere <modulo destinazione>, indipendentemente\n dalla dichiarazione del modulo.\n <modulo destinazione> pu\u00F2 essere ALL-UNNAMED per leggere tutti i\n moduli senza nome.\n -add-exports:<modulo>/<package>=<modulo destinazione>(,<modulo destinazione>)*\n Aggiorna <modulo> per esportare <package> in <modulo destinazione>,\n indipendentemente dalla dichiarazione del modulo.\n <modulo destinazione> pu\u00F2 essere ALL-UNNAMED per esportare tutti i\n moduli senza nome.\n --add-opens <modulo>/<package>=<modulo destinazione>(,<modulo destinazione>)*\n Aggiorna <modulo> per aprire <package> in\n <modulo destinazione>, indipendentemente dalla dichiarazione del modulo.\n --permit-illegal-access\n Permette l''accesso non consentito ai membri dei tipi nei moduli denominati\n mediante codice in moduli senza nome. Questa opzione di compatibilit\u00E0 verr\u00E0\n rimossa nella release successiva.\n --limit-modules <nome modulo>[,<nome modulo>...]\n Limita l''universo di moduli osservabili\n -patch-module <modulo>=<file>({0}<file>)*\n Sostituisce o migliora un modulo con \
+classi e risorse\n in file JAR o directory.\n --disable-@files Disabilita l''ulteriore espansione di file argomenti.\n\nQueste opzioni non standard sono soggette a modifiche senza preavviso.\n
# Translators please note do not translate the options themselves
java.launcher.X.macosx.usage=\nLe opzioni riportate di seguito sono specifiche del sistema operativo Mac OS X:\n -XstartOnFirstThread\n Esegue il metodo main() sul primo thread (AppKit).\n -Xdock:name=<nome applicazione>\n Sostituisce il nome applicazione predefinito visualizzato nel dock\n -Xdock:icon=<percorso file icona>\n Sostituisce l'icona predefinita visualizzata nel dock\n\n
-java.launcher.cls.error1=Errore: impossibile trovare o caricare la classe principale {0}
+java.launcher.cls.error1=Errore: impossibile trovare o caricare la classe principale {0}\nCausato da: {1}: {2}
java.launcher.cls.error2=Errore: il metodo principale non \u00E8 {0} nella classe {1}. Definire il metodo principale come:\n public static void main(String[] args)
java.launcher.cls.error3=Errore: il metodo principale deve restituire un valore di tipo void nella classe {0}. \nDefinire il metodo principale come:\n public static void main(String[] args)
java.launcher.cls.error4=Errore: il metodo principale non \u00E8 stato trovato nella classe {0}. Definire il metodo principale come:\n public static void main(String[] args)\naltrimenti una classe applicazione JavaFX deve estendere {1}
java.launcher.cls.error5=Errore: non sono presenti i componenti runtime di JavaFX necessari per eseguire questa applicazione
+java.launcher.cls.error6=Errore: LinkageError durante il caricamento della classe principale {0}\n\t{1}
java.launcher.jar.error1=Errore: si \u00E8 verificato un errore imprevisto durante il tentativo di aprire il file {0}
java.launcher.jar.error2=manifest non trovato in {0}
java.launcher.jar.error3=nessun attributo manifest principale in {0}
+java.launcher.jar.error4=errore durante il caricamento dell''agente java in {0}
java.launcher.init.error=errore di inizializzazione
java.launcher.javafx.error1=Errore: il metodo JavaFX launchApplication dispone di una firma errata, \nla firma deve essere dichiarata static e restituire un valore di tipo void
java.launcher.module.error1=il modulo {0} non dispone di un attributo MainClass. Utilizzare -m <module>/<mail-class>
java.launcher.module.error2=Errore: impossibile trovare o caricare la classe principale {0} nel modulo {1}
+java.launcher.module.error3=Errore: impossibile caricare la classe principale {0} dal modulo {1}\n\t{2}
+java.launcher.module.error4={0} non trovato
--- a/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_ja.properties Sat Jun 03 02:44:55 2017 +0000
+++ b/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_ja.properties Sat Jun 03 03:48:03 2017 +0000
@@ -24,33 +24,37 @@
#
# Translators please note do not translate the options themselves
-java.launcher.opt.header = \u4F7F\u7528\u65B9\u6CD5: {0} [options] class [args...]\n (\u30AF\u30E9\u30B9\u3092\u5B9F\u884C\u3059\u308B\u5834\u5408)\n \u307E\u305F\u306F {0} [options] -jar jarfile [args...]\n (jar\u30D5\u30A1\u30A4\u30EB\u3092\u5B9F\u884C\u3059\u308B\u5834\u5408)\n \u307E\u305F\u306F {0} [options] -p <modulepath> -m <modulename>[/<mainclass>] [args...]\n (\u30E2\u30B8\u30E5\u30FC\u30EB\u306E\u30E1\u30A4\u30F3\u30FB\u30AF\u30E9\u30B9\u3092\u5B9F\u884C\u3059\u308B\u5834\u5408)\n\u30AA\u30D7\u30B7\u30E7\u30F3\u306F\u6B21\u306E\u3068\u304A\u308A\u3067\u3059:\n\n
+java.launcher.opt.header = \u4F7F\u7528\u65B9\u6CD5: {0} [options] <mainclass> [args...]\n (\u30AF\u30E9\u30B9\u3092\u5B9F\u884C\u3059\u308B\u5834\u5408)\n \u307E\u305F\u306F {0} [options] -jar <jarfile> [args...]\n (jar\u30D5\u30A1\u30A4\u30EB\u3092\u5B9F\u884C\u3059\u308B\u5834\u5408)\n \u307E\u305F\u306F {0} [options] -m <module>[/<mainclass>] [args...]\n {0} [options] --module <module>[/<mainclass>] [args...]\n (\u30E2\u30B8\u30E5\u30FC\u30EB\u306E\u30E1\u30A4\u30F3\u30FB\u30AF\u30E9\u30B9\u3092\u5B9F\u884C\u3059\u308B\u5834\u5408)\n\n \u30E1\u30A4\u30F3\u30FB\u30AF\u30E9\u30B9-jar <jarfile>\u3001-m\u307E\u305F\u306F--module\n <module>/<mainclass>\u306B\u7D9A\u304F\u5F15\u6570\u306F\u3001\u30E1\u30A4\u30F3\u30FB\u30AF\u30E9\u30B9\u3078\u306E\u5F15\u6570\u3068\u3057\u3066\u6E21\u3055\u308C\u307E\u3059\u3002\n\n \u30AA\u30D7\u30B7\u30E7\u30F3\u306F\u6B21\u306E\u3068\u304A\u308A\u3067\u3059:\n\n
java.launcher.opt.datamodel =\ -d{0}\t \u63A8\u5968\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002\u4ECA\u5F8C\u306E\u30EA\u30EA\u30FC\u30B9\u3067\u524A\u9664\u3055\u308C\u308B\u4E88\u5B9A\u3067\u3059\n
java.launcher.opt.vmselect =\ {0}\t "{1}" VM\u3092\u9078\u629E\u3059\u308B\u5834\u5408\n
java.launcher.opt.hotspot =\ {0}\t \u306F"{1}" VM\u306E\u30B7\u30CE\u30CB\u30E0\u3067\u3059 [\u975E\u63A8\u5968]\n
# Translators please note do not translate the options themselves
-java.launcher.opt.footer =\ -cp <\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u304A\u3088\u3073zip/jar\u30D5\u30A1\u30A4\u30EB\u306E\u30AF\u30E9\u30B9\u691C\u7D22\u30D1\u30B9>\n -classpath <\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u304A\u3088\u3073zip/jar\u30D5\u30A1\u30A4\u30EB\u306E\u30AF\u30E9\u30B9\u691C\u7D22\u30D1\u30B9>\n --class-path <\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u304A\u3088\u3073zip/jar\u30D5\u30A1\u30A4\u30EB\u306E\u30AF\u30E9\u30B9\u691C\u7D22\u30D1\u30B9>\n \u30AF\u30E9\u30B9\u30FB\u30D5\u30A1\u30A4\u30EB\u3092\u691C\u7D22\u3059\u308B\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u3001JAR\u30A2\u30FC\u30AB\u30A4\u30D6\n \u304A\u3088\u3073ZIP\u30A2\u30FC\u30AB\u30A4\u30D6\u306E{0}\u3067\u533A\u5207\u3089\u308C\u305F\u30EA\u30B9\u30C8\u3002\n -p <\u30E2\u30B8\u30E5\u30FC\u30EB\u30FB\u30D1\u30B9>\n --module-path <\u30E2\u30B8\u30E5\u30FC\u30EB\u30FB\u30D1\u30B9>...\n \u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306E{0}\u3067\u533A\u5207\u3089\u308C\u305F\u30EA\u30B9\u30C8\u3002\u5404\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306F\n \u30E2\u30B8\u30E5\u30FC\u30EB\u306E\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u3067\u3059\u3002\n --upgrade-module-path <\u30E2\u30B8\u30E5\u30FC\u30EB\u30FB\u30D1\u30B9>...\n \u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306E{0}\u3067\u533A\u5207\u3089\u308C\u305F\u30EA\u30B9\u30C8\u3002\u5404\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306F\n \u30E9\u30F3\u30BF\u30A4\u30E0\u30FB\u30A4\u30E1\u30FC\u30B8\u3067\u30A2\u30C3\u30D7\u30B0\u30EC\u30FC\u30C9\u53EF\u80FD\u306A\u30E2\u30B8\u30E5\u30FC\u30EB\u3092\n \u7F6E\u63DB\u3059\u308B\u30E2\u30B8\u30E5\u30FC\u30EB\u306E\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u3067\u3059\n -m <module>[/<mainclass>]\n --module <modulename>[/<mainclass>]\n \u89E3\u6C7A\u3059\u308B\u521D\u671F\u30E2\u30B8\u30E5\u30FC\u30EB\u304A\u3088\u3073\u30E2\u30B8\u30E5\u30FC\u30EB\u3067\u6307\u5B9A\u3055\u308C\u3066\u3044\u306A\u3044\u5834\u5408\u306B\n \u5B9F\u884C\u3059\u308B\u30E1\u30A4\u30F3\u30FB\u30AF\u30E9\u30B9\u306E\u540D\u524D\n --add-modules <modulename>[,<modulename>...]\n \u521D\u671F\u30E2\u30B8\u30E5\u30FC\u30EB\u306B\u52A0\u3048\u3066\u89E3\u6C7A\u3059\u308B\u30EB\u30FC\u30C8\u30FB\u30E2\u30B8\u30E5\u30FC\u30EB\u3002\n <modulename>\u306B\u306F\u3001ALL-DEFAULT\u3001ALL-SYSTEM\u3001\n ALL-MODULE-PATH\u3082\u4F7F\u7528\u3067\u304D\u308B\u3002\n --limit-modules <modulename>[,<modulename>...]\n \u53C2\u7167\u53EF\u80FD\u306A\u30E2\u30B8\u30E5\u30FC\u30EB\u306E\u9818\u57DF\u3092\u5236\u9650\u3059\u308B\n --list-modules [<modulename>[,<modulename>...]]\n \u53C2\u7167\u53EF\u80FD\u306A\u30E2\u30B8\u30E5\u30FC\u30EB\u306E\u4E00\u89A7\u3092\u8868\u793A\u3057\u3066\u7D42\u4E86\u3059\u308B\n --dry-run VM\u3092\u4F5C\u6210\u3059\u308B\u304C\u3001\u30E1\u30A4\u30F3\u30FB\u30E1\u30BD\u30C3\u30C9\u306F\u5B9F\u884C\u3057\u306A\u3044\u3002\n \u3053\u306E--dry-run\u30AA\u30D7\u30B7\u30E7\u30F3\u306F\u3001\u30E2\u30B8\u30E5\u30FC\u30EB\u30FB\u30B7\u30B9\u30C6\u30E0\u69CB\u6210\u306A\u3069\u306E\n \u30B3\u30DE\u30F3\u30C9\u30E9\u30A4\u30F3\u30FB\u30AA\u30D7\u30B7\u30E7\u30F3\u3092\u691C\u8A3C\u3059\u308B\u5834\u5408\u306B\u4FBF\u5229\u3067\u3059\u3002\n -D<name>=<value>\n \u30B7\u30B9\u30C6\u30E0\u30FB\u30D7\u30ED\u30D1\u30C6\u30A3\u3092\u8A2D\u5B9A\u3059\u308B\n -verbose:[class|gc|jni]\n \u8A73\u7D30\u306A\u51FA\u529B\u3092\u884C\u3046\n -version \u88FD\u54C1\u30D0\u30FC\u30B8\u30E7\u30F3\u3092\u30A8\u30E9\u30FC\u30FB\u30B9\u30C8\u30EA\u30FC\u30E0\u306B\u51FA\u529B\u3057\u3066\u7D42\u4E86\u3059\u308B\n --version \u88FD\u54C1\u30D0\u30FC\u30B8\u30E7\u30F3\u3092\u51FA\u529B\u30B9\u30C8\u30EA\u30FC\u30E0\u306B\u51FA\u529B\u3057\u3066\u7D42\u4E86\u3059\u308B\n \
--showversion \u88FD\u54C1\u30D0\u30FC\u30B8\u30E7\u30F3\u3092\u30A8\u30E9\u30FC\u30FB\u30B9\u30C8\u30EA\u30FC\u30E0\u306B\u51FA\u529B\u3057\u3066\u7D9A\u884C\u3059\u308B\n --show-version\n \u88FD\u54C1\u30D0\u30FC\u30B8\u30E7\u30F3\u3092\u51FA\u529B\u30B9\u30C8\u30EA\u30FC\u30E0\u306B\u51FA\u529B\u3057\u3066\u7D9A\u884C\u3059\u308B\n -? -h -help\n \u3053\u306E\u30D8\u30EB\u30D7\u30FB\u30E1\u30C3\u30BB\u30FC\u30B8\u3092\u30A8\u30E9\u30FC\u30FB\u30B9\u30C8\u30EA\u30FC\u30E0\u306B\u51FA\u529B\u3059\u308B\n --help \u3053\u306E\u30D8\u30EB\u30D7\u30FB\u30E1\u30C3\u30BB\u30FC\u30B8\u3092\u51FA\u529B\u30B9\u30C8\u30EA\u30FC\u30E0\u306B\u51FA\u529B\u3059\u308B\n -X \u8FFD\u52A0\u30AA\u30D7\u30B7\u30E7\u30F3\u306B\u95A2\u3059\u308B\u30D8\u30EB\u30D7\u3092\u30A8\u30E9\u30FC\u30FB\u30B9\u30C8\u30EA\u30FC\u30E0\u306B\u51FA\u529B\u3059\u308B\n --help-extra \u8FFD\u52A0\u30AA\u30D7\u30B7\u30E7\u30F3\u306B\u95A2\u3059\u308B\u30D8\u30EB\u30D7\u3092\u51FA\u529B\u30B9\u30C8\u30EA\u30FC\u30E0\u306B\u51FA\u529B\u3059\u308B\n -ea[:<packagename>...|:<classname>]\n -enableassertions[:<packagename>...|:<classname>]\n \u6307\u5B9A\u3057\u305F\u7C92\u5EA6\u3067\u30A2\u30B5\u30FC\u30B7\u30E7\u30F3\u3092\u6709\u52B9\u306B\u3059\u308B\n -da[:<packagename>...|:<classname>]\n -disableassertions[:<packagename>...|:<classname>]\n \u6307\u5B9A\u3057\u305F\u7C92\u5EA6\u3067\u30A2\u30B5\u30FC\u30B7\u30E7\u30F3\u3092\u7121\u52B9\u306B\u3059\u308B\n -esa | -enablesystemassertions\n \u30B7\u30B9\u30C6\u30E0\u30FB\u30A2\u30B5\u30FC\u30B7\u30E7\u30F3\u3092\u6709\u52B9\u306B\u3059\u308B\n -dsa | -disablesystemassertions\n \u30B7\u30B9\u30C6\u30E0\u30FB\u30A2\u30B5\u30FC\u30B7\u30E7\u30F3\u3092\u7121\u52B9\u306B\u3059\u308B\n -agentlib:<libname>[=<options>]\n \u30CD\u30A4\u30C6\u30A3\u30D6\u30FB\u30A8\u30FC\u30B8\u30A7\u30F3\u30C8\u30FB\u30E9\u30A4\u30D6\u30E9\u30EA<libname>\u3092\u30ED\u30FC\u30C9\u3059\u308B\u3002\u4F8B: -agentlib:jdwp\n -agentlib:jdwp=help\u3082\u53C2\u7167\n -agentpath:<pathname>[=<options>]\n \u30D5\u30EB\u30D1\u30B9\u540D\u3067\u30CD\u30A4\u30C6\u30A3\u30D6\u30FB\u30A8\u30FC\u30B8\u30A7\u30F3\u30C8\u30FB\u30E9\u30A4\u30D6\u30E9\u30EA\u3092\u30ED\u30FC\u30C9\u3059\u308B\n -javaagent:<jarpath>[=<options>]\n Java\u30D7\u30ED\u30B0\u30E9\u30DF\u30F3\u30B0\u8A00\u8A9E\u30A8\u30FC\u30B8\u30A7\u30F3\u30C8\u3092\u30ED\u30FC\u30C9\u3059\u308B\u3002java.lang.instrument\u3092\u53C2\u7167\n -splash:<imagepath>\n \u6307\u5B9A\u3057\u305F\u30A4\u30E1\u30FC\u30B8\u3067\u30B9\u30D7\u30E9\u30C3\u30B7\u30E5\u753B\u9762\u3092\u8868\u793A\u3059\u308B\n HiDPI\u306B\u30B9\u30B1\u30FC\u30EA\u30F3\u30B0\u3055\u308C\u305F\u30A4\u30E1\u30FC\u30B8\u304C\u81EA\u52D5\u7684\u306B\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3001\n \u4F7F\u7528\u3067\u304D\u308C\u3070\u4F7F\u7528\u3055\u308C\u307E\u3059\u3002\u5FC5\u305A\u3001\u30B9\u30B1\u30FC\u30EA\u30F3\u30B0\n \u3055\u308C\u306A\u3044\u30A4\u30E1\u30FC\u30B8\u306E\u30D5\u30A1\u30A4\u30EB\u540D\u3001\u305F\u3068\u3048\u3070image.ext\u3092\u3001\n \u5F15\u6570\u3068\u3057\u3066-splash\u30AA\u30D7\u30B7\u30E7\u30F3\u306B\u6E21\u3057\u3066\u304F\u3060\u3055\u3044\u3002\n \u6307\u5B9A\u3055\u308C\u305F\u6700\u3082\u9069\u5207\u306A\u30B9\u30B1\u30FC\u30EA\u30F3\u30B0\u6E08\u30A4\u30E1\u30FC\u30B8\u304C\u81EA\u52D5\u7684\u306B\n \u9078\u629E\u3055\u308C\u307E\u3059\u3002\n \u8A73\u7D30\u306FSplashScreen API\u306E\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u3092\u53C2\u7167\u3057\u3066\u304F\u3060\u3055\u3044\u3002\n @<filepath> \
-\u6307\u5B9A\u3057\u305F\u30D5\u30A1\u30A4\u30EB\u304B\u3089\u30AA\u30D7\u30B7\u30E7\u30F3\u3092\u8AAD\u307F\u53D6\u308B\n\nlong\u30AA\u30D7\u30B7\u30E7\u30F3\u306B\u5F15\u6570\u3092\u6307\u5B9A\u3059\u308B\u306B\u306F\u3001--<name>=<value>\u307E\u305F\u306F--<name> <value>\u3092\u4F7F\u7528\u3067\u304D\u307E\u3059\u3002\n
+java.launcher.opt.footer = \ -cp <\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u304A\u3088\u3073zip/jar\u30D5\u30A1\u30A4\u30EB\u306E\u30AF\u30E9\u30B9\u691C\u7D22\u30D1\u30B9>\n -classpath <\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u304A\u3088\u3073zip/jar\u30D5\u30A1\u30A4\u30EB\u306E\u30AF\u30E9\u30B9\u691C\u7D22\u30D1\u30B9>\n --class-path <\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u304A\u3088\u3073zip/jar\u30D5\u30A1\u30A4\u30EB\u306E\u30AF\u30E9\u30B9\u691C\u7D22\u30D1\u30B9>\n {0}\u533A\u5207\u308A\u30EA\u30B9\u30C8(\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u3001JAR\u30A2\u30FC\u30AB\u30A4\u30D6\u3001\n ZIP\u30A2\u30FC\u30AB\u30A4\u30D6)\u3067\u3001\u30AF\u30E9\u30B9\u30FB\u30D5\u30A1\u30A4\u30EB\u306E\u691C\u7D22\u7528\u3002\n -p <module path>\n --module-path <module path>...\n \u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306E{0}\u533A\u5207\u308A\u30EA\u30B9\u30C8\u3001\u5404\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\n \u306F\u30E2\u30B8\u30E5\u30FC\u30EB\u306E\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u3067\u3059\u3002\n --upgrade-module-path <module path>...\n \u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306E{0}\u533A\u5207\u308A\u30EA\u30B9\u30C8\u3001\u5404\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\n \u306F\u3001\u30E9\u30F3\u30BF\u30A4\u30E0\u30FB\u30A4\u30E1\u30FC\u30B8\u5185\u306E\u30A2\u30C3\u30D7\u30B0\u30EC\u30FC\u30C9\u53EF\u80FD\u306A\n \u30E2\u30B8\u30E5\u30FC\u30EB\u3092\u7F6E\u63DB\u3059\u308B\u30E2\u30B8\u30E5\u30FC\u30EB\u306E\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u3067\u3059\n --add-modules <module name>[,<module name>...]\n \u521D\u671F\u30E2\u30B8\u30E5\u30FC\u30EB\u306B\u52A0\u3048\u3066\u89E3\u6C7A\u3059\u308B\u30EB\u30FC\u30C8\u30FB\u30E2\u30B8\u30E5\u30FC\u30EB\u3002\n <module name>\u306B\u306F\u6B21\u3082\u6307\u5B9A\u3067\u304D\u307E\u3059: ALL-DEFAULT\u3001ALL-SYSTEM\u3001\n ALL-MODULE-PATH.\n --list-modules\n \u53C2\u7167\u53EF\u80FD\u306A\u30E2\u30B8\u30E5\u30FC\u30EB\u3092\u30EA\u30B9\u30C8\u3057\u7D42\u4E86\u3057\u307E\u3059\n --d <module name>\n --describe-module <module name>\n \u30E2\u30B8\u30E5\u30FC\u30EB\u3092\u8AAC\u660E\u3057\u7D42\u4E86\u3057\u307E\u3059\n --dry-run VM\u3092\u4F5C\u6210\u3057\u30E1\u30A4\u30F3\u30FB\u30AF\u30E9\u30B9\u3092\u30ED\u30FC\u30C9\u3057\u307E\u3059\u304C\u3001\u30E1\u30A4\u30F3\u30FB\u30E1\u30BD\u30C3\u30C9\u306F\u5B9F\u884C\u3057\u307E\u305B\u3093\u3002\n --dry-run\u30AA\u30D7\u30B7\u30E7\u30F3\u306F\u3001\u6B21\u306E\u691C\u8A3C\u306B\u5F79\u7ACB\u3064\u5834\u5408\u304C\u3042\u308A\u307E\u3059:\n \u30E2\u30B8\u30E5\u30FC\u30EB\u30FB\u30B7\u30B9\u30C6\u30E0\u69CB\u6210\u306A\u3069\u306E\u30B3\u30DE\u30F3\u30C9\u884C\u30AA\u30D7\u30B7\u30E7\u30F3\u3002\n --validate-modules\n \u3059\u3079\u3066\u306E\u30E2\u30B8\u30E5\u30FC\u30EB\u3092\u691C\u8A3C\u3057\u7D42\u4E86\u3057\u307E\u3059\n --validate-modules\u30AA\u30D7\u30B7\u30E7\u30F3\u306F\u3001\u6B21\u306E\u691C\u7D22\u306B\u5F79\u7ACB\u3064\u5834\u5408\u304C\u3042\u308A\u307E\u3059:\n \u30E2\u30B8\u30E5\u30FC\u30EB\u30FB\u30D1\u30B9\u4E0A\u306E\u30E2\u30B8\u30E5\u30FC\u30EB\u3067\u306E\u7AF6\u5408\u304A\u3088\u3073\u305D\u306E\u4ED6\u306E\u30A8\u30E9\u30FC\u3002\n -D<name>=<value>\n \u30B7\u30B9\u30C6\u30E0\u30FB\u30D7\u30ED\u30D1\u30C6\u30A3\u3092\u8A2D\u5B9A\u3057\u307E\u3059\n -verbose:[class|module|gc|jni]\n \u8A73\u7D30\u51FA\u529B\u3092\u6709\u52B9\u306B\u3057\u307E\u3059\n -version \u88FD\u54C1\u30D0\u30FC\u30B8\u30E7\u30F3\u3092\u30A8\u30E9\u30FC\u30FB\u30B9\u30C8\u30EA\u30FC\u30E0\u306B\u51FA\u529B\u3057\u3066\u7D42\u4E86\u3057\u307E\u3059\n --version \
+\u88FD\u54C1\u30D0\u30FC\u30B8\u30E7\u30F3\u3092\u51FA\u529B\u30B9\u30C8\u30EA\u30FC\u30E0\u306B\u51FA\u529B\u3057\u3066\u7D42\u4E86\u3057\u307E\u3059\n -showversion \u88FD\u54C1\u30D0\u30FC\u30B8\u30E7\u30F3\u3092\u30A8\u30E9\u30FC\u30FB\u30B9\u30C8\u30EA\u30FC\u30E0\u306B\u51FA\u529B\u3057\u3066\u7D9A\u884C\u3057\u307E\u3059\n --show-version\n \u88FD\u54C1\u30D0\u30FC\u30B8\u30E7\u30F3\u3092\u51FA\u529B\u30B9\u30C8\u30EA\u30FC\u30E0\u306B\u51FA\u529B\u3057\u3066\u7D9A\u884C\u3057\u307E\u3059\n --show-module-resolution\n \u8D77\u52D5\u6642\u306B\u30E2\u30B8\u30E5\u30FC\u30EB\u89E3\u6C7A\u51FA\u529B\u3092\u8868\u793A\u3057\u307E\u3059\n -? -h -help\n \u3053\u306E\u30D8\u30EB\u30D7\u30FB\u30E1\u30C3\u30BB\u30FC\u30B8\u3092\u30A8\u30E9\u30FC\u30FB\u30B9\u30C8\u30EA\u30FC\u30E0\u306B\u51FA\u529B\u3057\u307E\u3059\n --help \u3053\u306E\u30D8\u30EB\u30D7\u30FB\u30E1\u30C3\u30BB\u30FC\u30B8\u3092\u51FA\u529B\u30B9\u30C8\u30EA\u30FC\u30E0\u306B\u51FA\u529B\u3057\u307E\u3059\n -X \u8FFD\u52A0\u30AA\u30D7\u30B7\u30E7\u30F3\u306E\u30D8\u30EB\u30D7\u3092\u30A8\u30E9\u30FC\u30FB\u30B9\u30C8\u30EA\u30FC\u30E0\u306B\u51FA\u529B\u3057\u307E\u3059\n --help-extra \u8FFD\u52A0\u30AA\u30D7\u30B7\u30E7\u30F3\u306E\u30D8\u30EB\u30D7\u3092\u51FA\u529B\u30B9\u30C8\u30EA\u30FC\u30E0\u306B\u51FA\u529B\u3057\u307E\u3059\n -ea[:<packagename>...|:<classname>]\n -enableassertions[:<packagename>...|:<classname>]\n \u6307\u5B9A\u3057\u305F\u7C92\u5EA6\u3067\u30A2\u30B5\u30FC\u30B7\u30E7\u30F3\u3092\u6709\u52B9\u306B\u3057\u307E\u3059\n -da[:<packagename>...|:<classname>]\n -disableassertions[:<packagename>...|:<classname>]\n \u6307\u5B9A\u3057\u305F\u7C92\u5EA6\u3067\u30A2\u30B5\u30FC\u30B7\u30E7\u30F3\u3092\u7121\u52B9\u306B\u3057\u307E\u3059\n -esa | -enablesystemassertions\n \u30B7\u30B9\u30C6\u30E0\u30FB\u30A2\u30B5\u30FC\u30B7\u30E7\u30F3\u3092\u6709\u52B9\u306B\u3057\u307E\u3059\n -dsa | -disablesystemassertions\n \u30B7\u30B9\u30C6\u30E0\u30FB\u30A2\u30B5\u30FC\u30B7\u30E7\u30F3\u3092\u7121\u52B9\u306B\u3057\u307E\u3059\n -agentlib:<libname>[=<options>]\n \u30CD\u30A4\u30C6\u30A3\u30D6\u30FB\u30A8\u30FC\u30B8\u30A7\u30F3\u30C8\u30FB\u30E9\u30A4\u30D6\u30E9\u30EA<libname>\u3092\u30ED\u30FC\u30C9\u3057\u307E\u3059\u3002\u4F8B: -agentlib:jdwp\n -agentlib:jdwp=help\u3082\u53C2\u7167\u3057\u3066\u304F\u3060\u3055\u3044\n -agentpath:<pathname>[=<options>]\n \u30D5\u30EB\u30D1\u30B9\u540D\u3092\u4F7F\u7528\u3057\u3066\u3001\u30CD\u30A4\u30C6\u30A3\u30D6\u30FB\u30A8\u30FC\u30B8\u30A7\u30F3\u30C8\u30FB\u30E9\u30A4\u30D6\u30E9\u30EA\u3092\u30ED\u30FC\u30C9\u3057\u307E\u3059\n -javaagent:<jarpath>[=<options>]\n Java\u30D7\u30ED\u30B0\u30E9\u30DF\u30F3\u30B0\u8A00\u8A9E\u30A8\u30FC\u30B8\u30A7\u30F3\u30C8\u3092\u30ED\u30FC\u30C9\u3057\u307E\u3059\u3002java.lang.instrument\u3092\u53C2\u7167\u3057\u3066\u304F\u3060\u3055\u3044\n -splash:<imagepath>\n \u6307\u5B9A\u3055\u308C\u305F\u30A4\u30E1\u30FC\u30B8\u3092\u542B\u3080\u30B9\u30D7\u30E9\u30C3\u30B7\u30E5\u753B\u9762\u3092\u8868\u793A\u3057\u307E\u3059\n HiDPI\u30B9\u30B1\u30FC\u30EB\u306E\u30A4\u30E1\u30FC\u30B8\u304C\u81EA\u52D5\u7684\u306B\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u4F7F\u7528\u3055\u308C\u307E\u3059\n (\u53EF\u80FD\u306A\u5834\u5408)\u3002\u30B9\u30B1\u30FC\u30EA\u30F3\u30B0\u3055\u308C\u306A\u3044\u30A4\u30E1\u30FC\u30B8\u306E\u30D5\u30A1\u30A4\u30EB\u540D(image.ext\u306A\u3069)\u3092\n \u5F15\u6570\u3068\u3057\u3066-splash\u30AA\u30D7\u30B7\u30E7\u30F3\u306B\u5FC5\u305A\u6E21\u3059\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002\n \
+\u6307\u5B9A\u3055\u308C\u305F\u6700\u3082\u9069\u5207\u306A\u30B9\u30B1\u30FC\u30EA\u30F3\u30B0\u6E08\u30A4\u30E1\u30FC\u30B8\u304C\u9078\u629E\u3055\u308C\u307E\u3059\n (\u81EA\u52D5\u7684)\u3002\n \u8A73\u7D30\u306F\u3001SplashScreen API\u306E\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u3092\u53C2\u7167\u3057\u3066\u304F\u3060\u3055\u3044\n @argument\u30D5\u30A1\u30A4\u30EB\n \u30AA\u30D7\u30B7\u30E7\u30F3\u3092\u542B\u30801\u3064\u4EE5\u4E0A\u306E\u5F15\u6570\u30D5\u30A1\u30A4\u30EB\n -disable-@files\n \u3055\u3089\u306A\u308B\u5F15\u6570\u30D5\u30A1\u30A4\u30EB\u62E1\u5F35\u3092\u7121\u52B9\u306B\u3057\u307E\u3059\n\u9577\u3044\u30AA\u30D7\u30B7\u30E7\u30F3\u306E\u5F15\u6570\u3092\u6307\u5B9A\u3059\u308B\u5834\u5408\u3001--<name>=<value>\u307E\u305F\u306F\n--<name> <value>\u3092\u4F7F\u7528\u3067\u304D\u307E\u3059\u3002\n
# Translators please note do not translate the options themselves
-java.launcher.X.usage=\n -Xbatch \u30D0\u30C3\u30AF\u30B0\u30E9\u30A6\u30F3\u30C9\u306E\u30B3\u30F3\u30D1\u30A4\u30EB\u3092\u7121\u52B9\u306B\u3059\u308B\n -Xbootclasspath/a:<{0}\u3067\u533A\u5207\u3089\u308C\u305F\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u304A\u3088\u3073zip/jar\u30D5\u30A1\u30A4\u30EB>\n \u30D6\u30FC\u30C8\u30B9\u30C8\u30E9\u30C3\u30D7\u30FB\u30AF\u30E9\u30B9\u30FB\u30D1\u30B9\u306E\u6700\u5F8C\u306B\u8FFD\u52A0\u3059\u308B\n -Xcheck:jni JNI\u95A2\u6570\u306B\u5BFE\u3059\u308B\u8FFD\u52A0\u306E\u30C1\u30A7\u30C3\u30AF\u3092\u5B9F\u884C\u3059\u308B\n -Xcomp \u521D\u56DE\u547C\u51FA\u3057\u6642\u306B\u30E1\u30BD\u30C3\u30C9\u306E\u30B3\u30F3\u30D1\u30A4\u30EB\u3092\u5F37\u5236\u3059\u308B\n -Xdebug \u4E0B\u4F4D\u4E92\u63DB\u6027\u306E\u305F\u3081\u306B\u63D0\u4F9B\n -Xdiag \u8FFD\u52A0\u306E\u8A3A\u65AD\u30E1\u30C3\u30BB\u30FC\u30B8\u3092\u8868\u793A\u3059\u308B\n -Xdiag:resolver \u30EA\u30BE\u30EB\u30D0\u8A3A\u65AD\u30E1\u30C3\u30BB\u30FC\u30B8\u3092\u8868\u793A\u3059\u308B\n -Xfuture \u5C06\u6765\u306E\u30C7\u30D5\u30A9\u30EB\u30C8\u3092\u898B\u8D8A\u3057\u3066\u3001\u6700\u3082\u53B3\u5BC6\u306A\u30C1\u30A7\u30C3\u30AF\u3092\u6709\u52B9\u306B\u3059\u308B\n -Xint \u30A4\u30F3\u30BF\u30D7\u30EA\u30BF\u30FB\u30E2\u30FC\u30C9\u306E\u5B9F\u884C\u306E\u307F\n -Xinternalversion\n -version\u30AA\u30D7\u30B7\u30E7\u30F3\u3088\u308A\u8A73\u7D30\u306AJVM\u30D0\u30FC\u30B8\u30E7\u30F3\u60C5\u5831\u3092\n \u8868\u793A\u3059\u308B\n -Xloggc:<file> \u30BF\u30A4\u30E0\u30B9\u30BF\u30F3\u30D7\u304C\u4ED8\u3044\u305F\u30D5\u30A1\u30A4\u30EB\u306BGC\u30B9\u30C6\u30FC\u30BF\u30B9\u306E\u30ED\u30B0\u3092\u8A18\u9332\u3059\u308B\n -Xmixed \u6DF7\u5408\u30E2\u30FC\u30C9\u306E\u5B9F\u884C(\u30C7\u30D5\u30A9\u30EB\u30C8)\n -Xmn<size> \u82E5\u3044\u4E16\u4EE3(\u30CA\u30FC\u30B5\u30EA)\u306E\u30D2\u30FC\u30D7\u306E\u521D\u671F\u304A\u3088\u3073\u6700\u5927\u30B5\u30A4\u30BA(\u30D0\u30A4\u30C8\u5358\u4F4D)\n \u3092\u8A2D\u5B9A\u3059\u308B\n -Xms<size> Java\u306E\u521D\u671F\u30D2\u30FC\u30D7\u30FB\u30B5\u30A4\u30BA\u3092\u8A2D\u5B9A\u3059\u308B\n -Xmx<size> Java\u306E\u6700\u5927\u30D2\u30FC\u30D7\u30FB\u30B5\u30A4\u30BA\u3092\u8A2D\u5B9A\u3059\u308B\n -Xnoclassgc \u30AF\u30E9\u30B9\u306E\u30AC\u30D9\u30FC\u30B8\u30FB\u30B3\u30EC\u30AF\u30B7\u30E7\u30F3\u3092\u7121\u52B9\u306B\u3059\u308B\n -Xprof CPU\u30D7\u30ED\u30D5\u30A1\u30A4\u30EB\u30FB\u30C7\u30FC\u30BF\u3092\u51FA\u529B\u3059\u308B\n -Xrs Java/VM\u306B\u3088\u308BOS\u30B7\u30B0\u30CA\u30EB\u306E\u4F7F\u7528\u3092\u524A\u6E1B\u3059\u308B(\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u3092\u53C2\u7167)\n -Xshare:auto \u53EF\u80FD\u3067\u3042\u308C\u3070\u5171\u6709\u30AF\u30E9\u30B9\u306E\u30C7\u30FC\u30BF\u3092\u4F7F\u7528\u3059\u308B(\u30C7\u30D5\u30A9\u30EB\u30C8)\n -Xshare:off \u5171\u6709\u30AF\u30E9\u30B9\u306E\u30C7\u30FC\u30BF\u3092\u4F7F\u7528\u3057\u3088\u3046\u3068\u3057\u306A\u3044\n -Xshare:on \u5171\u6709\u30AF\u30E9\u30B9\u30FB\u30C7\u30FC\u30BF\u306E\u4F7F\u7528\u3092\u5FC5\u9808\u306B\u3057\u3001\u3067\u304D\u306A\u3051\u308C\u3070\u5931\u6557\u3059\u308B\u3002\n -XshowSettings \u3059\u3079\u3066\u306E\u8A2D\u5B9A\u3092\u8868\u793A\u3057\u3066\u7D9A\u884C\u3059\u308B\n -XshowSettings:all\n \u3059\u3079\u3066\u306E\u8A2D\u5B9A\u3092\u8868\u793A\u3057\u3066\u7D9A\u884C\u3059\u308B\n -XshowSettings:locale\n \u3059\u3079\u3066\u306E\u30ED\u30B1\u30FC\u30EB\u95A2\u9023\u306E\u8A2D\u5B9A\u3092\u8868\u793A\u3057\u3066\u7D9A\u884C\u3059\u308B\n -XshowSettings:properties\n \
-\u3059\u3079\u3066\u306E\u30D7\u30ED\u30D1\u30C6\u30A3\u8A2D\u5B9A\u3092\u8868\u793A\u3057\u3066\u7D9A\u884C\u3059\u308B\n -XshowSettings:vm \u3059\u3079\u3066\u306EVM\u95A2\u9023\u306E\u8A2D\u5B9A\u3092\u8868\u793A\u3057\u3066\u7D9A\u884C\u3059\u308B\n -Xss<size> Java\u306E\u30B9\u30EC\u30C3\u30C9\u30FB\u30B9\u30BF\u30C3\u30AF\u30FB\u30B5\u30A4\u30BA\u3092\u8A2D\u5B9A\u3059\u308B\n -Xverify \u30D0\u30A4\u30C8\u30B3\u30FC\u30C9\u691C\u8A3C\u6A5F\u80FD\u306E\u30E2\u30FC\u30C9\u3092\u8A2D\u5B9A\u3059\u308B\n --add-reads <module>=<target-module>(,<target-module>)*\n \u30E2\u30B8\u30E5\u30FC\u30EB\u5BA3\u8A00\u306B\u95A2\u4FC2\u306A\u304F\u3001<module>\u3092\u66F4\u65B0\u3057\u3066<target-module>\n \u3092\u8AAD\u307F\u53D6\u308A\u307E\u3059\u3002 \n <target-module>\u3092ALL-UNNAMED\u306B\u8A2D\u5B9A\u3059\u308B\u3068\u3001\u3059\u3079\u3066\u306E\u540D\u524D\u306E\u306A\u3044\u30E2\u30B8\u30E5\u30FC\u30EB\u3092\n \u8AAD\u307F\u53D6\u308C\u307E\u3059\u3002\n --add-exports <module>/<package>=<target-module>(,<target-module>)*\n \u30E2\u30B8\u30E5\u30FC\u30EB\u5BA3\u8A00\u306B\u95A2\u4FC2\u306A\u304F\u3001<module>\u3092\u66F4\u65B0\u3057\u3066<package>\u3092<target-module>\u306B\n \u30A8\u30AF\u30B9\u30DD\u30FC\u30C8\u3057\u307E\u3059\u3002\n <target-module>\u3092ALL-UNNAMED\u306B\u8A2D\u5B9A\u3059\u308B\u3068\u3001\u3059\u3079\u3066\u306E\u540D\u524D\u306E\u306A\u3044\u30E2\u30B8\u30E5\u30FC\u30EB\u306B\n \u30A8\u30AF\u30B9\u30DD\u30FC\u30C8\u3067\u304D\u307E\u3059\u3002\n --add-opens <module>/<package>=<target-module>(,<target-module>)*\n \u30E2\u30B8\u30E5\u30FC\u30EB\u5BA3\u8A00\u306B\u95A2\u4FC2\u306A\u304F\u3001<module>\u3092\u66F4\u65B0\u3057\u3066\n <package>\u3092<target-module>\u306B\u958B\u304D\u307E\u3059\u3002\n --disable-@files \u3055\u3089\u306A\u308B\u5F15\u6570\u30D5\u30A1\u30A4\u30EB\u62E1\u5F35\u3092\u7121\u52B9\u306B\u3059\u308B\n --patch-module <module>=<file>({0}<file>)*\n JAR\u30D5\u30A1\u30A4\u30EB\u307E\u305F\u306F\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306E\u30AF\u30E9\u30B9\u304A\u3088\u3073\u30EA\u30BD\u30FC\u30B9\u3067\u30E2\u30B8\u30E5\u30FC\u30EB\u3092\n \u30AA\u30FC\u30D0\u30FC\u30E9\u30A4\u30C9\u307E\u305F\u306F\u62E1\u5F35\u3057\u307E\u3059\u3002\n\n\u3053\u308C\u3089\u306F\u8FFD\u52A0\u30AA\u30D7\u30B7\u30E7\u30F3\u3067\u3042\u308A\u4E88\u544A\u306A\u3057\u306B\u5909\u66F4\u3055\u308C\u308B\u3053\u3068\u304C\u3042\u308A\u307E\u3059\u3002\n
+java.launcher.X.usage=\n -Xbatch \u30D0\u30C3\u30AF\u30B0\u30E9\u30A6\u30F3\u30C9\u306E\u30B3\u30F3\u30D1\u30A4\u30EB\u3092\u7121\u52B9\u306B\u3059\u308B\n -Xbootclasspath/a:<{0}\u3067\u533A\u5207\u3089\u308C\u305F\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u304A\u3088\u3073zip/jar\u30D5\u30A1\u30A4\u30EB>\n \u30D6\u30FC\u30C8\u30B9\u30C8\u30E9\u30C3\u30D7\u30FB\u30AF\u30E9\u30B9\u30FB\u30D1\u30B9\u306E\u6700\u5F8C\u306B\u8FFD\u52A0\u3059\u308B\n -Xcheck:jni JNI\u95A2\u6570\u306B\u5BFE\u3059\u308B\u8FFD\u52A0\u306E\u30C1\u30A7\u30C3\u30AF\u3092\u5B9F\u884C\u3059\u308B\n -Xcomp \u521D\u56DE\u547C\u51FA\u3057\u6642\u306B\u30E1\u30BD\u30C3\u30C9\u306E\u30B3\u30F3\u30D1\u30A4\u30EB\u3092\u5F37\u5236\u3059\u308B\n -Xdebug \u4E0B\u4F4D\u4E92\u63DB\u6027\u306E\u305F\u3081\u306B\u63D0\u4F9B\n -Xdiag \u8FFD\u52A0\u306E\u8A3A\u65AD\u30E1\u30C3\u30BB\u30FC\u30B8\u3092\u8868\u793A\u3059\u308B\n -Xfuture \u5C06\u6765\u306E\u30C7\u30D5\u30A9\u30EB\u30C8\u3092\u898B\u8D8A\u3057\u3066\u3001\u6700\u3082\u53B3\u5BC6\u306A\u30C1\u30A7\u30C3\u30AF\u3092\u6709\u52B9\u306B\u3059\u308B\n -Xint \u30A4\u30F3\u30BF\u30D7\u30EA\u30BF\u30FB\u30E2\u30FC\u30C9\u306E\u5B9F\u884C\u306E\u307F\n -Xinternalversion\n -version\u30AA\u30D7\u30B7\u30E7\u30F3\u3088\u308A\u8A73\u7D30\u306AJVM\u30D0\u30FC\u30B8\u30E7\u30F3\u60C5\u5831\u3092\n \u8868\u793A\u3059\u308B\n -Xloggc:<file> \u30BF\u30A4\u30E0\u30B9\u30BF\u30F3\u30D7\u304C\u4ED8\u3044\u305F\u30D5\u30A1\u30A4\u30EB\u306BGC\u30B9\u30C6\u30FC\u30BF\u30B9\u306E\u30ED\u30B0\u3092\u8A18\u9332\u3059\u308B\n -Xmixed \u6DF7\u5408\u30E2\u30FC\u30C9\u306E\u5B9F\u884C(\u30C7\u30D5\u30A9\u30EB\u30C8)\n -Xmn<size> \u82E5\u3044\u4E16\u4EE3(\u30CA\u30FC\u30B5\u30EA)\u306E\u30D2\u30FC\u30D7\u306E\u521D\u671F\u304A\u3088\u3073\u6700\u5927\u30B5\u30A4\u30BA(\u30D0\u30A4\u30C8\u5358\u4F4D)\n \u3092\u8A2D\u5B9A\u3059\u308B\n -Xms<size> Java\u306E\u521D\u671F\u30D2\u30FC\u30D7\u30FB\u30B5\u30A4\u30BA\u3092\u8A2D\u5B9A\u3059\u308B\n -Xmx<size> Java\u306E\u6700\u5927\u30D2\u30FC\u30D7\u30FB\u30B5\u30A4\u30BA\u3092\u8A2D\u5B9A\u3059\u308B\n -Xnoclassgc \u30AF\u30E9\u30B9\u306E\u30AC\u30D9\u30FC\u30B8\u30FB\u30B3\u30EC\u30AF\u30B7\u30E7\u30F3\u3092\u7121\u52B9\u306B\u3059\u308B\n -Xprof CPU\u30D7\u30ED\u30D5\u30A1\u30A4\u30EB\u30FB\u30C7\u30FC\u30BF\u3092\u51FA\u529B\u3059\u308B\n -Xrs Java/VM\u306B\u3088\u308BOS\u30B7\u30B0\u30CA\u30EB\u306E\u4F7F\u7528\u3092\u524A\u6E1B\u3059\u308B(\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u3092\u53C2\u7167)\n -Xshare:auto \u53EF\u80FD\u3067\u3042\u308C\u3070\u5171\u6709\u30AF\u30E9\u30B9\u306E\u30C7\u30FC\u30BF\u3092\u4F7F\u7528\u3059\u308B(\u30C7\u30D5\u30A9\u30EB\u30C8)\n -Xshare:off \u5171\u6709\u30AF\u30E9\u30B9\u306E\u30C7\u30FC\u30BF\u3092\u4F7F\u7528\u3057\u3088\u3046\u3068\u3057\u306A\u3044\n -Xshare:on \u5171\u6709\u30AF\u30E9\u30B9\u30FB\u30C7\u30FC\u30BF\u306E\u4F7F\u7528\u3092\u5FC5\u9808\u306B\u3057\u3001\u3067\u304D\u306A\u3051\u308C\u3070\u5931\u6557\u3059\u308B\u3002\n -XshowSettings \u3059\u3079\u3066\u306E\u8A2D\u5B9A\u3092\u8868\u793A\u3057\u3066\u7D9A\u884C\u3059\u308B\n -XshowSettings:all\n \u3059\u3079\u3066\u306E\u8A2D\u5B9A\u3092\u8868\u793A\u3057\u3066\u7D9A\u884C\u3059\u308B\n -XshowSettings:locale\n \u3059\u3079\u3066\u306E\u30ED\u30B1\u30FC\u30EB\u95A2\u9023\u306E\u8A2D\u5B9A\u3092\u8868\u793A\u3057\u3066\u7D9A\u884C\u3059\u308B\n -XshowSettings:properties\n \u3059\u3079\u3066\u306E\u30D7\u30ED\u30D1\u30C6\u30A3\u8A2D\u5B9A\u3092\u8868\u793A\u3057\u3066\u7D9A\u884C\u3059\u308B\n -XshowSettings:vm \u3059\u3079\u3066\u306EVM\u95A2\u9023\u306E\u8A2D\u5B9A\u3092\u8868\u793A\u3057\u3066\u7D9A\u884C\u3059\u308B\n \
+-Xss<size> Java\u306E\u30B9\u30EC\u30C3\u30C9\u30FB\u30B9\u30BF\u30C3\u30AF\u30FB\u30B5\u30A4\u30BA\u3092\u8A2D\u5B9A\u3059\u308B\n -Xverify \u30D0\u30A4\u30C8\u30B3\u30FC\u30C9\u691C\u8A3C\u6A5F\u80FD\u306E\u30E2\u30FC\u30C9\u3092\u8A2D\u5B9A\u3059\u308B\n --add-reads <module>=<target-module>(,<target-module>)*\n \u30E2\u30B8\u30E5\u30FC\u30EB\u5BA3\u8A00\u306B\u95A2\u4FC2\u306A\u304F\u3001<module>\u3092\u66F4\u65B0\u3057\u3066<target-module>\n \u3092\u8AAD\u307F\u53D6\u308A\u307E\u3059\u3002 \n <target-module>\u3092ALL-UNNAMED\u306B\u8A2D\u5B9A\u3059\u308B\u3068\u3001\u3059\u3079\u3066\u306E\u540D\u524D\u306E\u306A\u3044\u30E2\u30B8\u30E5\u30FC\u30EB\u3092\n \u8AAD\u307F\u53D6\u308C\u307E\u3059\u3002\n --add-exports <module>/<package>=<target-module>(,<target-module>)*\n \u30E2\u30B8\u30E5\u30FC\u30EB\u5BA3\u8A00\u306B\u95A2\u4FC2\u306A\u304F\u3001<module>\u3092\u66F4\u65B0\u3057\u3066<package>\u3092<target-module>\u306B\n \u30A8\u30AF\u30B9\u30DD\u30FC\u30C8\u3057\u307E\u3059\u3002\n <target-module>\u3092ALL-UNNAMED\u306B\u8A2D\u5B9A\u3059\u308B\u3068\u3001\u3059\u3079\u3066\u306E\u540D\u524D\u306E\u306A\u3044\u30E2\u30B8\u30E5\u30FC\u30EB\u306B\n \u30A8\u30AF\u30B9\u30DD\u30FC\u30C8\u3067\u304D\u307E\u3059\u3002\n --add-opens <module>/<package>=<target-module>(,<target-module>)*\n \u30E2\u30B8\u30E5\u30FC\u30EB\u5BA3\u8A00\u306B\u95A2\u4FC2\u306A\u304F\u3001<module>\u3092\u66F4\u65B0\u3057\u3066\n <package>\u3092<target-module>\u306B\u958B\u304D\u307E\u3059\u3002\n --permit-illegal-access\n \u540D\u524D\u306E\u306A\u3044\u30E2\u30B8\u30E5\u30FC\u30EB\u5185\u306E\u30B3\u30FC\u30C9\u306B\u3088\u308B\u3001\u540D\u524D\u306E\u3042\u308B\n \u30E2\u30B8\u30E5\u30FC\u30EB\u5185\u306E\u30BF\u30A4\u30D7\u306E\u30E1\u30F3\u30D0\u30FC\u3078\u306E\u4E0D\u6B63\u30A2\u30AF\u30BB\u30B9\u3092\n \u8A31\u53EF\u3057\u307E\u3059\u3002\u3053\u306E\u4E92\u63DB\u6027\u30AA\u30D7\u30B7\u30E7\u30F3\u306F\u3001\u6B21\u306E\u30EA\u30EA\u30FC\u30B9\u3067\u524A\u9664\u3055\u308C\u307E\u3059\u3002\n --limit-modules <module name>[,<module name>...]\n \u53C2\u7167\u53EF\u80FD\u306A\u30E2\u30B8\u30E5\u30FC\u30EB\u306E\u9818\u57DF\u3092\u5236\u9650\u3057\u307E\u3059\n --patch-module <module>=<file>({0}<file>)*\n JAR\u30D5\u30A1\u30A4\u30EB\u307E\u305F\u306F\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306E\u30AF\u30E9\u30B9\u304A\u3088\u3073\u30EA\u30BD\u30FC\u30B9\u3067\n \u30E2\u30B8\u30E5\u30FC\u30EB\u3092\u30AA\u30FC\u30D0\u30FC\u30E9\u30A4\u30C9\u307E\u305F\u306F\u62E1\u5F35\u3057\u307E\u3059\n --disable-@files \u3055\u3089\u306A\u308B\u30D5\u30A1\u30A4\u30EB\u62E1\u5F35\u3092\u7121\u52B9\u306B\u3057\u307E\u3059\n\n\u3053\u308C\u3089\u306E\u8FFD\u52A0\u30AA\u30D7\u30B7\u30E7\u30F3\u306F\u4E88\u544A\u306A\u304F\u5909\u66F4\u3055\u308C\u308B\u5834\u5408\u304C\u3042\u308A\u307E\u3059\u3002\n
# Translators please note do not translate the options themselves
java.launcher.X.macosx.usage=\n\u6B21\u306E\u30AA\u30D7\u30B7\u30E7\u30F3\u306FMac OS X\u56FA\u6709\u3067\u3059:\n -XstartOnFirstThread\n main()\u30E1\u30BD\u30C3\u30C9\u3092\u6700\u521D(AppKit)\u306E\u30B9\u30EC\u30C3\u30C9\u3067\u5B9F\u884C\u3059\u308B\n -Xdock:name=<application name>\n Dock\u306B\u8868\u793A\u3055\u308C\u308B\u30C7\u30D5\u30A9\u30EB\u30C8\u30FB\u30A2\u30D7\u30EA\u30B1\u30FC\u30B7\u30E7\u30F3\u540D\u3092\u30AA\u30FC\u30D0\u30FC\u30E9\u30A4\u30C9\u3059\u308B\n -Xdock:icon=<path to icon file>\n Dock\u306B\u8868\u793A\u3055\u308C\u308B\u30C7\u30D5\u30A9\u30EB\u30C8\u30FB\u30A2\u30A4\u30B3\u30F3\u3092\u30AA\u30FC\u30D0\u30FC\u30E9\u30A4\u30C9\u3059\u308B\n\n
-java.launcher.cls.error1=\u30A8\u30E9\u30FC: \u30E1\u30A4\u30F3\u30FB\u30AF\u30E9\u30B9{0}\u304C\u898B\u3064\u304B\u3089\u306A\u304B\u3063\u305F\u304B\u30ED\u30FC\u30C9\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F
+java.launcher.cls.error1=\u30A8\u30E9\u30FC: \u30E1\u30A4\u30F3\u30FB\u30AF\u30E9\u30B9{0}\u3092\u691C\u51FA\u304A\u3088\u3073\u30ED\u30FC\u30C9\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F\n\u539F\u56E0: {1}: {2}
java.launcher.cls.error2=\u30A8\u30E9\u30FC: \u30E1\u30A4\u30F3\u30FB\u30E1\u30BD\u30C3\u30C9\u304C\u30AF\u30E9\u30B9{1}\u306E{0}\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002\u6B21\u306E\u3088\u3046\u306B\u30E1\u30A4\u30F3\u30FB\u30E1\u30BD\u30C3\u30C9\u3092\u5B9A\u7FA9\u3057\u3066\u304F\u3060\u3055\u3044\u3002\n public static void main(String[] args)
java.launcher.cls.error3=\u30A8\u30E9\u30FC: \u30E1\u30A4\u30F3\u30FB\u30E1\u30BD\u30C3\u30C9\u306F\u30AF\u30E9\u30B9{0}\u306Evoid\u578B\u306E\u5024\u3092\u8FD4\u3059\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002\n\u6B21\u306E\u3088\u3046\u306B\u30E1\u30A4\u30F3\u30FB\u30E1\u30BD\u30C3\u30C9\u3092\u5B9A\u7FA9\u3057\u3066\u304F\u3060\u3055\u3044\u3002\n public static void main(String[] args)
java.launcher.cls.error4=\u30A8\u30E9\u30FC: \u30E1\u30A4\u30F3\u30FB\u30E1\u30BD\u30C3\u30C9\u304C\u30AF\u30E9\u30B9{0}\u3067\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3002\u6B21\u306E\u3088\u3046\u306B\u30E1\u30A4\u30F3\u30FB\u30E1\u30BD\u30C3\u30C9\u3092\u5B9A\u7FA9\u3057\u3066\u304F\u3060\u3055\u3044\u3002\n public static void main(String[] args)\n\u307E\u305F\u306FJavaFX\u30A2\u30D7\u30EA\u30B1\u30FC\u30B7\u30E7\u30F3\u30FB\u30AF\u30E9\u30B9\u306F{1}\u3092\u62E1\u5F35\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059
java.launcher.cls.error5=\u30A8\u30E9\u30FC: JavaFX\u30E9\u30F3\u30BF\u30A4\u30E0\u30FB\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u304C\u4E0D\u8DB3\u3057\u3066\u304A\u308A\u3001\u3053\u306E\u30A2\u30D7\u30EA\u30B1\u30FC\u30B7\u30E7\u30F3\u306E\u5B9F\u884C\u306B\u5FC5\u8981\u3067\u3059
+java.launcher.cls.error6=\u30A8\u30E9\u30FC: \u30E1\u30A4\u30F3\u30FB\u30AF\u30E9\u30B9{0}\u306E\u30ED\u30FC\u30C9\u4E2D\u306BLinkageError\u304C\u767A\u751F\u3057\u307E\u3057\u305F\n\t{1}
java.launcher.jar.error1=\u30A8\u30E9\u30FC: \u30D5\u30A1\u30A4\u30EB{0}\u3092\u958B\u3053\u3046\u3068\u3057\u3066\u3044\u308B\u3068\u304D\u306B\u3001\u4E88\u671F\u3057\u306A\u3044\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F
java.launcher.jar.error2={0}\u306B\u30DE\u30CB\u30D5\u30A7\u30B9\u30C8\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093
java.launcher.jar.error3={0}\u306B\u30E1\u30A4\u30F3\u30FB\u30DE\u30CB\u30D5\u30A7\u30B9\u30C8\u5C5E\u6027\u304C\u3042\u308A\u307E\u305B\u3093
+java.launcher.jar.error4={0}\u5185\u306EJava\u30A8\u30FC\u30B8\u30A7\u30F3\u30C8\u306E\u30ED\u30FC\u30C9\u4E2D\u306B\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F
java.launcher.init.error=\u521D\u671F\u5316\u30A8\u30E9\u30FC
java.launcher.javafx.error1=\u30A8\u30E9\u30FC: JavaFX launchApplication\u30E1\u30BD\u30C3\u30C9\u306B\u8AA4\u3063\u305F\u30B7\u30B0\u30CD\u30C1\u30E3\u304C\u3042\u308A\u3001\nstatic\u3092\u5BA3\u8A00\u3057\u3066void\u578B\u306E\u5024\u3092\u8FD4\u3059\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059
java.launcher.module.error1=\u30E2\u30B8\u30E5\u30FC\u30EB{0}\u306BMainClass\u5C5E\u6027\u304C\u3042\u308A\u307E\u305B\u3093\u3002-m <module>/<main-class>\u3092\u4F7F\u7528\u3057\u3066\u304F\u3060\u3055\u3044
java.launcher.module.error2=\u30A8\u30E9\u30FC: \u30E2\u30B8\u30E5\u30FC\u30EB{1}\u306B\u30E1\u30A4\u30F3\u30FB\u30AF\u30E9\u30B9{0}\u304C\u898B\u3064\u304B\u3089\u306A\u304B\u3063\u305F\u304B\u30ED\u30FC\u30C9\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F
+java.launcher.module.error3=\u30A8\u30E9\u30FC: \u30E2\u30B8\u30E5\u30FC\u30EB{1}\u304B\u3089\u306E\u30E1\u30A4\u30F3\u30FB\u30AF\u30E9\u30B9{0}\u306E\u30ED\u30FC\u30C9\u306B\u5931\u6557\u3057\u307E\u3057\u305F\n\t{2}
+java.launcher.module.error4={0}\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093
--- a/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_ko.properties Sat Jun 03 02:44:55 2017 +0000
+++ b/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_ko.properties Sat Jun 03 03:48:03 2017 +0000
@@ -24,32 +24,36 @@
#
# Translators please note do not translate the options themselves
-java.launcher.opt.header = \uC0AC\uC6A9\uBC95: {0} [options] class [args...]\n (\uD074\uB798\uC2A4 \uC2E4\uD589)\n \uB610\uB294 {0} [options] -jar jarfile [args...]\n (jar \uD30C\uC77C \uC2E4\uD589)\n \uB610\uB294 {0} [options] -p <modulepath> -m <modulename>[/<mainclass>] [args...]\n (\uBAA8\uB4C8\uC758 \uAE30\uBCF8 \uD074\uB798\uC2A4 \uC2E4\uD589)\n\uC5EC\uAE30\uC11C options\uB294 \uB2E4\uC74C\uACFC \uAC19\uC2B5\uB2C8\uB2E4.\n\n
+java.launcher.opt.header = \uC0AC\uC6A9\uBC95: {0} [\uC635\uC158] <\uAE30\uBCF8 \uD074\uB798\uC2A4> [args...]\n (\uD074\uB798\uC2A4 \uC2E4\uD589)\n \uB610\uB294 {0} [\uC635\uC158] -jar <jar \uD30C\uC77C> [args...]\n (jar \uD30C\uC77C \uC2E4\uD589)\n \uB610\uB294 {0} [\uC635\uC158] -m <\uBAA8\uB4C8>[/<\uAE30\uBCF8 \uD074\uB798\uC2A4>] [args...]\n {0} [\uC635\uC158] --module <\uBAA8\uB4C8>[/<\uAE30\uBCF8 \uD074\uB798\uC2A4>] [args...]\n (\uBAA8\uB4C8\uC758 \uAE30\uBCF8 \uD074\uB798\uC2A4 \uC2E4\uD589)\n\n \uAE30\uBCF8 \uD074\uB798\uC2A4, -jar <jar \uD30C\uC77C>, -m \uB610\uB294 --module\n <\uBAA8\uB4C8>/<\uAE30\uBCF8 \uD074\uB798\uC2A4> \uB4A4\uC5D0 \uB098\uC624\uB294 \uC778\uC218\uB294 \uAE30\uBCF8 \uD074\uB798\uC2A4\uC5D0 \uC778\uC218\uB85C \uC804\uB2EC\uB429\uB2C8\uB2E4.\n\n \uC774 \uACBD\uC6B0 \uC635\uC158\uC5D0\uB294 \uB2E4\uC74C\uC774 \uD3EC\uD568\uB429\uB2C8\uB2E4.\n\n
java.launcher.opt.datamodel =\ -d{0}\t \uB354 \uC774\uC0C1 \uC0AC\uC6A9\uB418\uC9C0 \uC54A\uC74C. \uC774\uD6C4 \uB9B4\uB9AC\uC2A4\uC5D0\uC11C \uC81C\uAC70\uB429\uB2C8\uB2E4.\n
java.launcher.opt.vmselect =\ {0}\t "{1}" VM\uC744 \uC120\uD0DD\uD569\uB2C8\uB2E4.\n
java.launcher.opt.hotspot =\ {0}\t "{1}" VM\uC758 \uB3D9\uC758\uC5B4\uC785\uB2C8\uB2E4[\uC0AC\uC6A9\uB418\uC9C0 \uC54A\uC74C].\n
# Translators please note do not translate the options themselves
-java.launcher.opt.footer =\ -cp <\uB514\uB809\uD1A0\uB9AC \uBC0F zip/jar \uD30C\uC77C\uC758 \uD074\uB798\uC2A4 \uAC80\uC0C9 \uACBD\uB85C>\n -classpath <\uB514\uB809\uD1A0\uB9AC \uBC0F zip/jar \uD30C\uC77C\uC758 \uD074\uB798\uC2A4 \uAC80\uC0C9 \uACBD\uB85C>\n --class-path <\uB514\uB809\uD1A0\uB9AC \uBC0F zip/jar \uD30C\uC77C\uC758 \uD074\uB798\uC2A4 \uAC80\uC0C9 \uACBD\uB85C>\n \uD074\uB798\uC2A4 \uD30C\uC77C\uC744 \uAC80\uC0C9\uD560 {0}(\uC73C)\uB85C \uAD6C\uBD84\uB41C \uB514\uB809\uD1A0\uB9AC,\n JAR \uC544\uCE74\uC774\uBE0C \uBC0F ZIP \uC544\uCE74\uC774\uBE0C \uBAA9\uB85D\uC785\uB2C8\uB2E4.\n -p <\uBAA8\uB4C8 \uACBD\uB85C>\n -module-path <\uBAA8\uB4C8 \uACBD\uB85C>...\n {0}(\uC73C)\uB85C \uAD6C\uBD84\uB41C \uB514\uB809\uD1A0\uB9AC \uBAA9\uB85D\uC785\uB2C8\uB2E4. \uAC01 \uB514\uB809\uD1A0\uB9AC\uB294\n \uBAA8\uB4C8\uC758 \uB514\uB809\uD1A0\uB9AC\uC785\uB2C8\uB2E4.\n -upgrade-module-path <\uBAA8\uB4C8 \uACBD\uB85C>...\n {0}(\uC73C)\uB85C \uAD6C\uBD84\uB41C \uB514\uB809\uD1A0\uB9AC \uBAA9\uB85D\uC785\uB2C8\uB2E4. \uAC01 \uB514\uB809\uD1A0\uB9AC\uB294\n \uBAA8\uB4C8\uC758 \uB514\uB809\uD1A0\uB9AC\uB85C, \uB7F0\uD0C0\uC784 \uC774\uBBF8\uC9C0\uC5D0\uC11C \uC5C5\uADF8\uB808\uC774\uB4DC\n \uAC00\uB2A5\uD55C \uBAA8\uB4C8\uC744 \uB300\uCCB4\uD569\uB2C8\uB2E4.\n -m <\uBAA8\uB4C8>[/<\uAE30\uBCF8 \uD074\uB798\uC2A4>]\n --module <\uBAA8\uB4C8 \uC774\uB984>[/<\uAE30\uBCF8 \uD074\uB798\uC2A4>]\n \uBD84\uC11D\uD560 \uCD08\uAE30 \uBAA8\uB4C8 \uBC0F \uBAA8\uB4C8\uC5D0\uC11C \uC9C0\uC815\uB418\uC9C0 \uC54A\uC740 \uACBD\uC6B0 \uC2E4\uD589\uD560\n \uAE30\uBCF8 \uD074\uB798\uC2A4\uC758 \uC774\uB984\uC785\uB2C8\uB2E4.\n --add-modules <\uBAA8\uB4C8 \uC774\uB984>[,<\uBAA8\uB4C8 \uC774\uB984>...]\n \uCD08\uAE30 \uBAA8\uB4C8 \uC678\uC5D0 \uBD84\uC11D\uD560 \uB8E8\uD2B8 \uBAA8\uB4C8\uC785\uB2C8\uB2E4.\n <\uBAA8\uB4C8 \uC774\uB984>\uC740 ALL-DEFAULT, ALL-SYSTEM,\n ALL-MODULE-PATH\uC77C \uC218\uB3C4 \uC788\uC2B5\uB2C8\uB2E4.\n --limit-modules <\uBAA8\uB4C8 \uC774\uB984>[,<\uBAA8\uB4C8 \uC774\uB984>...]\n \uAD00\uCC30 \uAC00\uB2A5\uD55C \uBAA8\uB4C8\uC744 \uB098\uC5F4\uD558\uACE0 \uC885\uB8CC \uBC94\uC704\uB97C \uC81C\uD55C\uD569\uB2C8\uB2E4.\n --list-modules[<\uBAA8\uB4C8 \uC774\uB984>[,<\uBAA8\uB4C8 \uC774\uB984>...]]\n \uAD00\uCC30 \uAC00\uB2A5\uD55C \uBAA8\uB4C8\uC744 \uB098\uC5F4\uD55C \uD6C4 \uC885\uB8CC\uD569\uB2C8\uB2E4.\n --dry-run VM\uC744 \uC0DD\uC131\uD558\uC9C0\uB9CC \uAE30\uBCF8 \uBA54\uC18C\uB4DC\uB97C \uC2E4\uD589\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.\n \uC774 --dry-run \uC635\uC158\uC740 \uBAA8\uB4C8 \uC2DC\uC2A4\uD15C \uAD6C\uC131\uACFC \uAC19\uC740 \uBA85\uB839\uD589\n \uC635\uC158\uC744 \uAC80\uC99D\uD558\uB294 \uB370 \uC720\uC6A9\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.\n -D<\uC774\uB984>=<\uAC12>\n \uC2DC\uC2A4\uD15C \uC18D\uC131\uC744 \uC124\uC815\uD569\uB2C8\uB2E4.\n -verbose:[class|gc|jni]\n \uC0C1\uC138 \uC815\uBCF4 \uCD9C\uB825\uC744 \uC0AC\uC6A9\uC73C\uB85C \uC124\uC815\uD569\uB2C8\uB2E4.\n -version \uC81C\uD488 \uBC84\uC804\uC744 \uC624\uB958 \uC2A4\uD2B8\uB9BC\uC5D0 \uC778\uC1C4\uD55C \uD6C4 \uC885\uB8CC\uD569\uB2C8\uB2E4.\n --version \uC81C\uD488 \uBC84\uC804\uC744 \uCD9C\uB825 \uC2A4\uD2B8\uB9BC\uC5D0 \uC778\uC1C4\uD55C \uD6C4 \uC885\uB8CC\uD569\uB2C8\uB2E4.\n -showversion \uC81C\uD488 \uBC84\uC804\uC744 \uC624\uB958 \uC2A4\uD2B8\uB9BC\uC5D0 \uC778\uC1C4\uD55C \uD6C4 \uACC4\uC18D\uD569\uB2C8\uB2E4.\n --show-version\n \uC81C\uD488 \uBC84\uC804\uC744 \uCD9C\uB825 \uC2A4\uD2B8\uB9BC\uC5D0 \uC778\uC1C4\uD55C \uD6C4 \uACC4\uC18D\uD569\uB2C8\uB2E4.\n -? -h -help\n \uC774 \uB3C4\uC6C0\uB9D0 \uBA54\uC2DC\uC9C0\uB97C \uC624\uB958 \
-\uC2A4\uD2B8\uB9BC\uC5D0 \uC778\uC1C4\uD569\uB2C8\uB2E4.\n --help \uC774 \uB3C4\uC6C0\uB9D0 \uBA54\uC2DC\uC9C0\uB97C \uCD9C\uB825 \uC2A4\uD2B8\uB9BC\uC5D0 \uC778\uC1C4\uD569\uB2C8\uB2E4.\n -X \uCD94\uAC00 \uC635\uC158\uC5D0 \uB300\uD55C \uB3C4\uC6C0\uB9D0\uC744 \uC624\uB958 \uC2A4\uD2B8\uB9BC\uC5D0 \uC778\uC1C4\uD569\uB2C8\uB2E4.\n --help-extra \uCD94\uAC00 \uC635\uC158\uC5D0 \uB300\uD55C \uB3C4\uC6C0\uB9D0\uC744 \uCD9C\uB825 \uC2A4\uD2B8\uB9BC\uC5D0 \uC778\uC1C4\uD569\uB2C8\uB2E4.\n -ea[:<\uD328\uD0A4\uC9C0 \uC774\uB984>...|:<\uD074\uB798\uC2A4 \uC774\uB984>]\n -enableassertions[:<\uD328\uD0A4\uC9C0 \uC774\uB984>...|:<\uD074\uB798\uC2A4 \uC774\uB984>]\n \uC138\uBD84\uC131\uC774 \uC9C0\uC815\uB41C \uAC80\uC99D\uC744 \uC0AC\uC6A9\uC73C\uB85C \uC124\uC815\uD569\uB2C8\uB2E4.\n -da[:<\uD328\uD0A4\uC9C0 \uC774\uB984>...|:<\uD074\uB798\uC2A4 \uC774\uB984>]\n -disableassertions[:<\uD328\uD0A4\uC9C0 \uC774\uB984>...|:<\uD074\uB798\uC2A4 \uC774\uB984>]\n \uC138\uBD84\uC131\uC774 \uC9C0\uC815\uB41C \uAC80\uC99D\uC744 \uC0AC\uC6A9 \uC548\uD568\uC73C\uB85C \uC124\uC815\uD569\uB2C8\uB2E4.\n -esa | -enablesystemassertions\n \uC2DC\uC2A4\uD15C \uAC80\uC99D\uC744 \uC0AC\uC6A9\uC73C\uB85C \uC124\uC815\uD569\uB2C8\uB2E4.\n -dsa | -disablesystemassertions\n \uC2DC\uC2A4\uD15C \uAC80\uC99D\uC744 \uC0AC\uC6A9 \uC548\uD568\uC73C\uB85C \uC124\uC815\uD569\uB2C8\uB2E4.\n -agentlib:<\uB77C\uC774\uBE0C\uB7EC\uB9AC \uC774\uB984>[=<\uC635\uC158>]\n \uACE0\uC720 \uC5D0\uC774\uC804\uD2B8 \uB77C\uC774\uBE0C\uB7EC\uB9AC <\uB77C\uC774\uBE0C\uB7EC\uB9AC \uC774\uB984>\uC744 \uB85C\uB4DC\uD569\uB2C8\uB2E4(\uC608: -agentlib:jdwp).\n -agentlib:jdwp=help\uB3C4 \uCC38\uC870\uD558\uC2ED\uC2DC\uC624.\n -agentpath:<\uACBD\uB85C \uC774\uB984>[=<\uC635\uC158>]\n \uC804\uCCB4 \uACBD\uB85C \uC774\uB984\uC744 \uC0AC\uC6A9\uD558\uC5EC \uACE0\uC720 \uC5D0\uC774\uC804\uD2B8 \uB77C\uC774\uBE0C\uB7EC\uB9AC\uB97C \uB85C\uB4DC\uD569\uB2C8\uB2E4.\n -javaagent:<jar \uACBD\uB85C>[=<\uC635\uC158>]\n Java \uD504\uB85C\uADF8\uB798\uBC0D \uC5B8\uC5B4 \uC5D0\uC774\uC804\uD2B8\uB97C \uB85C\uB4DC\uD569\uB2C8\uB2E4. java.lang.instrument\uB97C \uCC38\uC870\uD558\uC2ED\uC2DC\uC624.\n -splash:<\uC774\uBBF8\uC9C0 \uACBD\uB85C>\n \uC774\uBBF8\uC9C0\uAC00 \uC9C0\uC815\uB41C \uC2A4\uD50C\uB798\uC2DC \uD654\uBA74\uC744 \uD45C\uC2DC\uD569\uB2C8\uB2E4.\n HiDPI\uB85C \uC870\uC815\uB41C \uC774\uBBF8\uC9C0\uAC00 \uC790\uB3D9\uC73C\uB85C \uC9C0\uC6D0\uB418\uACE0 \uAC00\uB2A5\uD55C \uACBD\uC6B0\n \uC0AC\uC6A9\uB429\uB2C8\uB2E4. \uBBF8\uC870\uC815 \uC774\uBBF8\uC9C0 \uD30C\uC77C \uC774\uB984(\uC608: image.ext)\uC740\n \uD56D\uC0C1 -splash \uC635\uC158\uC5D0 \uC778\uC218\uB85C \uC804\uB2EC\uB418\uC5B4\uC57C \uD569\uB2C8\uB2E4.\n \uAC00\uC7A5 \uC801\uC808\uD788 \uC870\uC815\uB41C \uC774\uBBF8\uC9C0\uAC00 \uC790\uB3D9\uC73C\uB85C\n \uCC44\uD0DD\uB429\uB2C8\uB2E4.\n \uC790\uC138\uD55C \uB0B4\uC6A9\uC740 SplashScreen API \uC124\uBA85\uC11C\uB97C \uCC38\uC870\uD558\uC2ED\uC2DC\uC624.\n @<\uD30C\uC77C \uACBD\uB85C> \uC9C0\uC815\uB41C \uD30C\uC77C\uC5D0\uC11C \uC635\uC158\uC744 \uC77D\uC2B5\uB2C8\uB2E4.\n\nlong \uC635\uC158\uC5D0 \uB300\uD55C \uC778\uC218\uB97C \uC9C0\uC815\uD558\uB824\uBA74 --<\uC774\uB984>=<\uAC12> \uB610\uB294\n--<\uC774\uB984> <\uAC12>\uC744 \uC0AC\uC6A9\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.\n
+java.launcher.opt.footer = \ -cp <\uB514\uB809\uD1A0\uB9AC \uBC0F zip/jar \uD30C\uC77C\uC758 \uD074\uB798\uC2A4 \uAC80\uC0C9 \uACBD\uB85C>\n -classpath <\uB514\uB809\uD1A0\uB9AC \uBC0F zip/jar \uD30C\uC77C\uC758 \uD074\uB798\uC2A4 \uAC80\uC0C9 \uACBD\uB85C>\n --class-path <\uB514\uB809\uD1A0\uB9AC \uBC0F zip/jar \uD30C\uC77C\uC758 \uD074\uB798\uC2A4 \uAC80\uC0C9 \uACBD\uB85C>\n \uD074\uB798\uC2A4 \uD30C\uC77C\uC744 \uAC80\uC0C9\uD558\uAE30 \uC704\uD55C \uB514\uB809\uD1A0\uB9AC, JAR \uC544\uCE74\uC774\uBE0C \uBC0F ZIP \uC544\uCE74\uC774\uBE0C\uC758 {0}(\uC73C)\uB85C\n \uAD6C\uBD84\uB41C \uBAA9\uB85D\uC785\uB2C8\uB2E4.\n -p <\uBAA8\uB4C8 \uACBD\uB85C>\n --module-path <\uBAA8\uB4C8 \uACBD\uB85C>...\n \uB514\uB809\uD1A0\uB9AC\uC758 {0}(\uC73C)\uB85C \uAD6C\uBD84\uB41C \uBAA9\uB85D\uC785\uB2C8\uB2E4. \uAC01 \uB514\uB809\uD1A0\uB9AC\uB294\n \uBAA8\uB4C8\uC758 \uB514\uB809\uD1A0\uB9AC\uC785\uB2C8\uB2E4.\n --upgrade-module-path <\uBAA8\uB4C8 \uACBD\uB85C>...\n \uB514\uB809\uD1A0\uB9AC\uC758 {0}(\uC73C)\uB85C \uAD6C\uBD84\uB41C \uBAA9\uB85D\uC785\uB2C8\uB2E4. \uAC01 \uB514\uB809\uD1A0\uB9AC\uB294\n \uB7F0\uD0C0\uC784 \uC774\uBBF8\uC9C0\uC5D0\uC11C \uC5C5\uADF8\uB808\uC774\uB4DC \uAC00\uB2A5\uD55C \uBAA8\uB4C8\uC744 \uB300\uCCB4\uD558\uB294\n \uBAA8\uB4C8\uC758 \uB514\uB809\uD1A0\uB9AC\uC785\uB2C8\uB2E4.\n --add-modules <\uBAA8\uB4C8 \uC774\uB984>[,<\uBAA8\uB4C8 \uC774\uB984>...]\n \uCD08\uAE30 \uBAA8\uB4C8 \uC774\uC678\uC758 \uD574\uACB0\uD560 \uB8E8\uD2B8 \uBAA8\uB4C8\uC785\uB2C8\uB2E4.\n <\uBAA8\uB4C8 \uC774\uB984>\uC740 ALL-DEFAULT, ALL-SYSTEM\uC77C \uC218 \uC788\uC2B5\uB2C8\uB2E4.\n ALL-MODULE-PATH.\n --list-modules\n \uAD00\uCC30 \uAC00\uB2A5\uD55C \uBAA8\uB4C8\uC744 \uB098\uC5F4\uD558\uACE0 \uC885\uB8CC\uD569\uB2C8\uB2E4.\n --d <\uBAA8\uB4C8 \uC774\uB984>\n --describe-module <\uBAA8\uB4C8 \uC774\uB984>\n \uBAA8\uB4C8\uC744 \uC124\uBA85\uD558\uACE0 \uC885\uB8CC\uD569\uB2C8\uB2E4.\n --dry-run VM\uC744 \uC0DD\uC131\uD558\uACE0 \uAE30\uBCF8 \uD074\uB798\uC2A4\uB97C \uB85C\uB4DC\uD558\uC9C0\uB9CC \uAE30\uBCF8 \uBA54\uC18C\uB4DC\uB97C \uC2E4\uD589\uD558\uC9C0\uB294 \uC54A\uC2B5\uB2C8\uB2E4.\n --dry-run \uC635\uC158\uC740 \uBAA8\uB4C8 \uC2DC\uC2A4\uD15C \uAD6C\uC131\uACFC \uAC19\uC740\n \uBA85\uB839\uC904 \uC635\uC158 \uAC80\uC99D\uC5D0 \uC720\uC6A9\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.\n --validate-modules\n \uBAA8\uB4E0 \uBAA8\uB4C8\uC744 \uAC80\uC99D\uD558\uACE0 \uC885\uB8CC\uD569\uB2C8\uB2E4.\n --validate-modules \uC635\uC158\uC740 \uBAA8\uB4C8 \uACBD\uB85C\uC5D0\uC11C \uBAA8\uB4C8\uC5D0 \uB300\uD55C\n \uCDA9\uB3CC \uBC0F \uAE30\uD0C0 \uC624\uB958\uB97C \uCC3E\uB294 \uB370 \uC720\uC6A9\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.\n -D<\uC774\uB984>=<\uAC12>\n \uC2DC\uC2A4\uD15C \uC18D\uC131\uC744 \uC124\uC815\uD569\uB2C8\uB2E4.\n -verbose:[class|module|gc|jni]\n \uC0C1\uC138 \uC815\uBCF4 \uCD9C\uB825\uC744 \uC0AC\uC6A9\uC73C\uB85C \uC124\uC815\n -version \uC624\uB958 \uC2A4\uD2B8\uB9BC\uC5D0 \uC81C\uD488 \uBC84\uC804\uC744 \uC778\uC1C4\uD558\uACE0 \uC885\uB8CC\uD569\uB2C8\uB2E4.\n --version \uCD9C\uB825 \uC2A4\uD2B8\uB9BC\uC5D0 \uC81C\uD488 \uBC84\uC804\uC744 \uC778\uC1C4\uD558\uACE0 \uC885\uB8CC\uD569\uB2C8\uB2E4.\n -showversion \uC624\uB958 \uC2A4\uD2B8\uB9BC\uC5D0 \uC81C\uD488 \uBC84\uC804\uC744 \uC778\uC1C4\uD558\uACE0 \uACC4\uC18D\uD569\uB2C8\uB2E4.\n --show-version\n \uCD9C\uB825 \uC2A4\uD2B8\uB9BC\uC5D0 \uC81C\uD488 \uBC84\uC804\uC744 \uC778\uC1C4\uD558\uACE0 \uACC4\uC18D\uD569\uB2C8\uB2E4.\n --show-module-resolution\n \uC2DC\uC791 \uC911 \uBAA8\uB4C8 \uBD84\uC11D \uCD9C\uB825\uC744 \
+\uD45C\uC2DC\uD569\uB2C8\uB2E4.\n -? -h -help\n \uC624\uB958 \uC2A4\uD2B8\uB9BC\uC5D0 \uC774 \uB3C4\uC6C0\uB9D0 \uBA54\uC2DC\uC9C0\uB97C \uC778\uC1C4\uD569\uB2C8\uB2E4.\n --help \uCD9C\uB825 \uC2A4\uD2B8\uB9BC\uC5D0 \uC774 \uB3C4\uC6C0\uB9D0 \uBA54\uC2DC\uC9C0\uB97C \uC778\uC1C4\uD569\uB2C8\uB2E4.\n -X \uC624\uB958 \uC2A4\uD2B8\uB9BC\uC5D0 \uCD94\uAC00 \uC635\uC158\uC5D0 \uB300\uD55C \uB3C4\uC6C0\uB9D0\uC744 \uC778\uC1C4\uD569\uB2C8\uB2E4.\n --help-extra \uCD9C\uB825 \uC2A4\uD2B8\uB9BC\uC5D0 \uCD94\uAC00 \uC635\uC158\uC5D0 \uB300\uD55C \uB3C4\uC6C0\uB9D0\uC744 \uC778\uC1C4\uD569\uB2C8\uB2E4.\n -ea[:<\uD328\uD0A4\uC9C0 \uC774\uB984>...|:<\uD074\uB798\uC2A4 \uC774\uB984>]\n -enableassertions[:<\uD328\uD0A4\uC9C0 \uC774\uB984>...|:<\uD074\uB798\uC2A4 \uC774\uB984>]\n \uC138\uBD84\uC131\uC774 \uC9C0\uC815\uB41C \uAC80\uC99D\uC744 \uC0AC\uC6A9\uC73C\uB85C \uC124\uC815\uD569\uB2C8\uB2E4.\n -da[:<\uD328\uD0A4\uC9C0 \uC774\uB984>...|:<\uD074\uB798\uC2A4 \uC774\uB984>]\n -disableassertions[:<\uD328\uD0A4\uC9C0 \uC774\uB984>...|:<\uD074\uB798\uC2A4 \uC774\uB984>]\n \uC138\uBD84\uC131\uC774 \uC9C0\uC815\uB41C \uAC80\uC99D\uC744 \uC0AC\uC6A9 \uC548\uD568\uC73C\uB85C \uC124\uC815\uD569\uB2C8\uB2E4.\n -esa | -enablesystemassertions\n \uC2DC\uC2A4\uD15C \uAC80\uC99D\uC744 \uC0AC\uC6A9\uC73C\uB85C \uC124\uC815\uD569\uB2C8\uB2E4.\n -dsa | -disablesystemassertions\n \uC2DC\uC2A4\uD15C \uAC80\uC99D\uC744 \uC0AC\uC6A9 \uC548\uD568\uC73C\uB85C \uC124\uC815\uD569\uB2C8\uB2E4.\n -agentlib:<\uB77C\uC774\uBE0C\uB7EC\uB9AC \uC774\uB984>[=<\uC635\uC158>]\n \uACE0\uC720 \uC5D0\uC774\uC804\uD2B8 \uB77C\uC774\uBE0C\uB7EC\uB9AC <\uB77C\uC774\uBE0C\uB7EC\uB9AC \uC774\uB984>\uC744 \uB85C\uB4DC\uD569\uB2C8\uB2E4(\uC608: -agentlib:jdwp).\n -agentlib:jdwp=help\uB3C4 \uCC38\uC870\uD558\uC2ED\uC2DC\uC624.\n -agentpath:<\uACBD\uB85C \uC774\uB984>[=<\uC635\uC158>]\n \uC804\uCCB4 \uACBD\uB85C \uC774\uB984\uC744 \uC0AC\uC6A9\uD558\uC5EC \uACE0\uC720 \uC5D0\uC774\uC804\uD2B8 \uB77C\uC774\uBE0C\uB7EC\uB9AC\uB97C \uB85C\uB4DC\uD569\uB2C8\uB2E4.\n -javaagent:<jar \uACBD\uB85C>[=<\uC635\uC158>]\n Java \uD504\uB85C\uADF8\uB798\uBC0D \uC5B8\uC5B4 \uC5D0\uC774\uC804\uD2B8\uB97C \uB85C\uB4DC\uD569\uB2C8\uB2E4. java.lang.instrument\uB97C \uCC38\uC870\uD558\uC2ED\uC2DC\uC624.\n -splash:<\uC774\uBBF8\uC9C0 \uACBD\uB85C>\n \uC774\uBBF8\uC9C0\uAC00 \uC9C0\uC815\uB41C \uC2A4\uD50C\uB798\uC2DC \uD654\uBA74\uC744 \uD45C\uC2DC\uD569\uB2C8\uB2E4.\n HiDPI\uB85C \uC870\uC815\uB41C \uC774\uBBF8\uC9C0\uAC00 \uC790\uB3D9\uC73C\uB85C \uC9C0\uC6D0\uB418\uACE0 \uC0AC\uC6A9 \uAC00\uB2A5\uD55C \uACBD\uC6B0\n \uC0AC\uC6A9\uB429\uB2C8\uB2E4. \uBBF8\uC870\uC815 \uC774\uBBF8\uC9C0 \uD30C\uC77C \uC774\uB984(\uC608: image.ext)\uC740\n \uD56D\uC0C1 -splash \uC635\uC158\uC5D0 \uC778\uC218\uB85C \uC804\uB2EC\uB418\uC5B4\uC57C \uD569\uB2C8\uB2E4.\n \uAC00\uC7A5 \uC801\uC808\uD788 \uC870\uC815\uB41C \uC774\uBBF8\uC9C0\uAC00 \uC790\uB3D9\uC73C\uB85C\n \uCC44\uD0DD\uB429\uB2C8\uB2E4.\n \uC790\uC138\uD55C \uB0B4\uC6A9\uC740 SplashScreen API \uC124\uBA85\uC11C\uB97C \uCC38\uC870\uD558\uC2ED\uC2DC\uC624.\n @\uC778\uC218 \uD30C\uC77C\n -disable-@files \uC635\uC158\uC774 \uD3EC\uD568\uB418\uC5B4 \uC788\uB294 \uD558\uB098 \uC774\uC0C1\uC758\n \uC778\uC218 \uD30C\uC77C\n \uCD94\uAC00 \uC778\uC218 \uD30C\uC77C \uD655\uC7A5\uC744 \uBC29\uC9C0\uD569\uB2C8\uB2E4.\nlong \uC635\uC158\uC5D0 \uB300\uD55C \uC778\uC218\uB97C \uC9C0\uC815\uD558\uB824\uBA74 --<\uC774\uB984>=<\uAC12> \uB610\uB294\n--<\uC774\uB984> <\uAC12>\uC744 \uC0AC\uC6A9\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.\n
# Translators please note do not translate the options themselves
-java.launcher.X.usage=\n -Xbatch \uBC31\uADF8\uB77C\uC6B4\uB4DC \uCEF4\uD30C\uC77C\uC744 \uC0AC\uC6A9 \uC548\uD568\uC73C\uB85C \uC124\uC815\uD569\uB2C8\uB2E4.\n -Xbootclasspath/a:<{0}(\uC73C)\uB85C \uAD6C\uBD84\uB41C \uB514\uB809\uD1A0\uB9AC \uBC0F zip/jar \uD30C\uC77C>\n \uBD80\uD2B8\uC2A4\uD2B8\uB7A9 \uD074\uB798\uC2A4 \uACBD\uB85C \uB05D\uC5D0 \uCD94\uAC00\uD569\uB2C8\uB2E4.\n -Xcheck:jni JNI \uD568\uC218\uC5D0 \uB300\uD55C \uCD94\uAC00 \uAC80\uC0AC\uB97C \uC218\uD589\uD569\uB2C8\uB2E4.\n -Xcomp \uCCAB\uBC88\uC9F8 \uD638\uCD9C\uC5D0\uC11C \uBA54\uC18C\uB4DC \uCEF4\uD30C\uC77C\uC744 \uAC15\uC81C\uD569\uB2C8\uB2E4.\n -Xdebug \uC5ED \uD638\uD658\uC131\uC744 \uC704\uD574 \uC81C\uACF5\uB418\uC5C8\uC2B5\uB2C8\uB2E4.\n -Xdiag \uCD94\uAC00 \uC9C4\uB2E8 \uBA54\uC2DC\uC9C0\uB97C \uD45C\uC2DC\uD569\uB2C8\uB2E4.\n -Xdiag:resolver \uBD84\uC11D\uAE30 \uC9C4\uB2E8 \uBA54\uC2DC\uC9C0\uB97C \uD45C\uC2DC\uD569\uB2C8\uB2E4.\n -Xfuture \uBBF8\uB798 \uAE30\uBCF8\uAC12\uC744 \uC608\uCE21\uD558\uC5EC \uAC00\uC7A5 \uC5C4\uACA9\uD55C \uAC80\uC0AC\uB97C \uC0AC\uC6A9\uC73C\uB85C \uC124\uC815\uD569\uB2C8\uB2E4.\n -Xint \uD574\uC11D\uB41C \uBAA8\uB4DC\uB9CC \uC2E4\uD589\uD569\uB2C8\uB2E4.\n -Xinternalversion\n -version \uC635\uC158\uBCF4\uB2E4 \uC0C1\uC138\uD55C JVM \uBC84\uC804 \uC815\uBCF4\uB97C \uD45C\uC2DC\uD569\uB2C8\uB2E4.\n -Xloggc:<file> \uC2DC\uAC04 \uAE30\uB85D\uACFC \uD568\uAED8 \uD30C\uC77C\uC5D0 GC \uC0C1\uD0DC\uB97C \uAE30\uB85D\uD569\uB2C8\uB2E4.\n -Xmixed \uD63C\uD569 \uBAA8\uB4DC\uB97C \uC2E4\uD589\uD569\uB2C8\uB2E4(\uAE30\uBCF8\uAC12).\n -Xmn<size> \uC80A\uC740 \uC138\uB300(Nursery)\uB97C \uC704\uD574 \uD799\uC758 \uCD08\uAE30 \uBC0F \uCD5C\uB300\n \uD06C\uAE30(\uBC14\uC774\uD2B8)\uB97C \uC124\uC815\uD569\uB2C8\uB2E4.\n -Xms<size> \uCD08\uAE30 Java \uD799 \uD06C\uAE30\uB97C \uC124\uC815\uD569\uB2C8\uB2E4.\n -Xmx<size> \uCD5C\uB300 Java \uD799 \uD06C\uAE30\uB97C \uC124\uC815\uD569\uB2C8\uB2E4.\n -Xnoclassgc \uD074\uB798\uC2A4\uC758 \uBD88\uD544\uC694\uD55C \uC815\uBCF4 \uBAA8\uC74C\uC744 \uC0AC\uC6A9 \uC548\uD568\uC73C\uB85C \uC124\uC815\uD569\uB2C8\uB2E4.\n -Xprof CPU \uD504\uB85C\uD30C\uC77C \uC791\uC131 \uB370\uC774\uD130\uB97C \uCD9C\uB825\uD569\uB2C8\uB2E4.\n -Xrs Java/VM\uC5D0 \uC758\uD55C OS \uC2E0\uD638 \uC0AC\uC6A9\uC744 \uC904\uC785\uB2C8\uB2E4(\uC124\uBA85\uC11C \uCC38\uC870).\n -Xshare:auto \uAC00\uB2A5\uD55C \uACBD\uC6B0 \uACF5\uC720 \uD074\uB798\uC2A4 \uB370\uC774\uD130\uB97C \uC0AC\uC6A9\uD569\uB2C8\uB2E4(\uAE30\uBCF8\uAC12).\n -Xshare:off \uACF5\uC720 \uD074\uB798\uC2A4 \uB370\uC774\uD130 \uC0AC\uC6A9\uC744 \uC2DC\uB3C4\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.\n -Xshare:on \uACF5\uC720 \uD074\uB798\uC2A4 \uB370\uC774\uD130\uB97C \uC0AC\uC6A9\uD574\uC57C \uD569\uB2C8\uB2E4. \uADF8\uB807\uC9C0 \uC54A\uC744 \uACBD\uC6B0 \uC2E4\uD328\uD569\uB2C8\uB2E4.\n -XshowSettings \uBAA8\uB4E0 \uC124\uC815\uC744 \uD45C\uC2DC\uD55C \uD6C4 \uACC4\uC18D\uD569\uB2C8\uB2E4.\n -XshowSettings:all\n \uBAA8\uB4E0 \uC124\uC815\uC744 \uD45C\uC2DC\uD55C \uD6C4 \uACC4\uC18D\uD569\uB2C8\uB2E4.\n -XshowSettings:locale\n \uBAA8\uB4E0 \uB85C\uCF00\uC77C \uAD00\uB828 \uC124\uC815\uC744 \uD45C\uC2DC\uD55C \uD6C4 \uACC4\uC18D\uD569\uB2C8\uB2E4.\n -XshowSettings:properties\n \uBAA8\uB4E0 \uC18D\uC131 \uC124\uC815\uC744 \uD45C\uC2DC\uD55C \uD6C4 \uACC4\uC18D\uD569\uB2C8\uB2E4.\n -XshowSettings:vm \uBAA8\uB4E0 VM \uAD00\uB828 \uC124\uC815\uC744 \uD45C\uC2DC\uD55C \uD6C4 \uACC4\uC18D\uD569\uB2C8\uB2E4.\n -Xss<size> Java \uC2A4\uB808\uB4DC \uC2A4\uD0DD \
-\uD06C\uAE30\uB97C \uC124\uC815\uD569\uB2C8\uB2E4.\n -Xverify \uBC14\uC774\uD2B8\uCF54\uB4DC \uAC80\uC99D\uC790\uC758 \uBAA8\uB4DC\uB97C \uC124\uC815\uD569\uB2C8\uB2E4.\n --add-reads <module>=<target-module>(,<target-module>)*\n \uBAA8\uB4C8 \uC120\uC5B8\uC5D0 \uAD00\uACC4\uC5C6\uC774 <target-module>\uC744 \uC77D\uB3C4\uB85D\n <module>\uC744 \uC5C5\uB370\uC774\uD2B8\uD569\uB2C8\uB2E4.\n <target-module>\uC740 \uC774\uB984\uC774 \uC9C0\uC815\uB418\uC9C0 \uC54A\uC740 \uBAA8\uB4E0 \uBAA8\uB4C8\uC744 \uC77D\uC744 \uC218 \uC788\uB294\n ALL-UNNAMED\uC77C \uC218 \uC788\uC2B5\uB2C8\uB2E4.\n --add-exports <module>/<package>=<target-module>(,<target-module>)*\n \uBAA8\uB4C8 \uC120\uC5B8\uC5D0 \uAD00\uACC4\uC5C6\uC774 <package>\uB97C <target-module>\uB85C \uC775\uC2A4\uD3EC\uD2B8\uD558\uB3C4\uB85D\n <module>\uC744 \uC5C5\uB370\uC774\uD2B8\uD569\uB2C8\uB2E4.\n <target-module>\uC740 \uC774\uB984\uC774 \uC9C0\uC815\uB418\uC9C0 \uC54A\uC740 \uBAA8\uB4E0 \uBAA8\uB4C8\uB85C \uC775\uC2A4\uD3EC\uD2B8\uD560 \uC218 \uC788\uB294\n ALL-UNNAMED\uC77C \uC218 \uC788\uC2B5\uB2C8\uB2E4.\n --add-opens <module>/<package>=<target-module>(,<target-module>)*\n \uBAA8\uB4C8 \uC120\uC5B8\uC5D0 \uAD00\uACC4\uC5C6\uC774 <package>\uB97C <target-module>\uB85C \uC5F4\uB3C4\uB85D\n <module>\uC744 \uC5C5\uB370\uC774\uD2B8\uD569\uB2C8\uB2E4.\n --disable-@files \uCD94\uAC00 \uC778\uC218 \uD30C\uC77C \uD655\uC7A5\uC744 \uC0AC\uC6A9 \uC548\uD568\uC73C\uB85C \uC124\uC815\uD569\uB2C8\uB2E4.\n --patch-module <module>=<file>({0}<file>)*\n JAR \uD30C\uC77C \uB610\uB294 \uB514\uB809\uD1A0\uB9AC\uC758 \uD074\uB798\uC2A4\uC640 \uB9AC\uC18C\uC2A4\uB85C\n \uBAA8\uB4C8\uC744 \uBB34\uD6A8\uD654\uD558\uAC70\uB098 \uC778\uC218\uD654\uD569\uB2C8\uB2E4.\n\n\uC774\uB7EC\uD55C \uCD94\uAC00 \uC635\uC158\uC740 \uD1B5\uC9C0 \uC5C6\uC774 \uBCC0\uACBD\uB420 \uC218 \uC788\uC2B5\uB2C8\uB2E4.\n
+java.launcher.X.usage=\n -Xbatch \uBC31\uADF8\uB77C\uC6B4\uB4DC \uCEF4\uD30C\uC77C\uC744 \uC0AC\uC6A9 \uC548\uD568\uC73C\uB85C \uC124\uC815\uD569\uB2C8\uB2E4.\n -Xbootclasspath/a:<{0}(\uC73C)\uB85C \uAD6C\uBD84\uB41C \uB514\uB809\uD1A0\uB9AC \uBC0F zip/jar \uD30C\uC77C>\n \uBD80\uD2B8\uC2A4\uD2B8\uB7A9 \uD074\uB798\uC2A4 \uACBD\uB85C \uB05D\uC5D0 \uCD94\uAC00\uD569\uB2C8\uB2E4.\n -Xcheck:jni JNI \uD568\uC218\uC5D0 \uB300\uD55C \uCD94\uAC00 \uAC80\uC0AC\uB97C \uC218\uD589\uD569\uB2C8\uB2E4.\n -Xcomp \uCCAB\uBC88\uC9F8 \uD638\uCD9C\uC5D0\uC11C \uBA54\uC18C\uB4DC \uCEF4\uD30C\uC77C\uC744 \uAC15\uC81C\uD569\uB2C8\uB2E4.\n -Xdebug \uC5ED \uD638\uD658\uC131\uC744 \uC704\uD574 \uC81C\uACF5\uB418\uC5C8\uC2B5\uB2C8\uB2E4.\n -Xdiag \uCD94\uAC00 \uC9C4\uB2E8 \uBA54\uC2DC\uC9C0\uB97C \uD45C\uC2DC\uD569\uB2C8\uB2E4.\n -Xfuture \uBBF8\uB798 \uAE30\uBCF8\uAC12\uC744 \uC608\uCE21\uD558\uC5EC \uAC00\uC7A5 \uC5C4\uACA9\uD55C \uAC80\uC0AC\uB97C \uC0AC\uC6A9\uC73C\uB85C \uC124\uC815\uD569\uB2C8\uB2E4.\n -Xint \uD574\uC11D\uB41C \uBAA8\uB4DC\uB9CC \uC2E4\uD589\uD569\uB2C8\uB2E4.\n -Xinternalversion\n -version \uC635\uC158\uBCF4\uB2E4 \uC0C1\uC138\uD55C JVM \uBC84\uC804 \uC815\uBCF4\uB97C \uD45C\uC2DC\uD569\uB2C8\uB2E4.\n -Xloggc:<\uD30C\uC77C> \uC2DC\uAC04 \uAE30\uB85D\uACFC \uD568\uAED8 \uD30C\uC77C\uC5D0 GC \uC0C1\uD0DC\uB97C \uAE30\uB85D\uD569\uB2C8\uB2E4.\n -Xmixed \uD63C\uD569 \uBAA8\uB4DC\uB97C \uC2E4\uD589\uD569\uB2C8\uB2E4(\uAE30\uBCF8\uAC12).\n -Xmn<\uD06C\uAE30> \uC80A\uC740 \uC138\uB300(Nursery)\uB97C \uC704\uD574 \uD799\uC758 \uCD08\uAE30 \uBC0F \uCD5C\uB300\n \uD06C\uAE30(\uBC14\uC774\uD2B8)\uB97C \uC124\uC815\uD569\uB2C8\uB2E4.\n -Xms<\uD06C\uAE30> \uCD08\uAE30 Java \uD799 \uD06C\uAE30\uB97C \uC124\uC815\uD569\uB2C8\uB2E4.\n -Xmx<\uD06C\uAE30> \uCD5C\uB300 Java \uD799 \uD06C\uAE30\uB97C \uC124\uC815\uD569\uB2C8\uB2E4.\n -Xnoclassgc \uD074\uB798\uC2A4\uC758 \uBD88\uD544\uC694\uD55C \uC815\uBCF4 \uBAA8\uC74C\uC744 \uC0AC\uC6A9 \uC548\uD568\uC73C\uB85C \uC124\uC815\uD569\uB2C8\uB2E4.\n -Xprof CPU \uD504\uB85C\uD30C\uC77C \uC791\uC131 \uB370\uC774\uD130\uB97C \uCD9C\uB825\uD569\uB2C8\uB2E4(\uC0AC\uC6A9\uB418\uC9C0 \uC54A\uC74C).\n -Xrs Java/VM\uC5D0 \uC758\uD55C OS \uC2E0\uD638 \uC0AC\uC6A9\uC744 \uC904\uC785\uB2C8\uB2E4(\uC124\uBA85\uC11C \uCC38\uC870).\n -Xshare:auto \uAC00\uB2A5\uD55C \uACBD\uC6B0 \uACF5\uC720 \uD074\uB798\uC2A4 \uB370\uC774\uD130\uB97C \uC0AC\uC6A9\uD569\uB2C8\uB2E4(\uAE30\uBCF8\uAC12).\n -Xshare:off \uACF5\uC720 \uD074\uB798\uC2A4 \uB370\uC774\uD130 \uC0AC\uC6A9\uC744 \uC2DC\uB3C4\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.\n -Xshare:on \uACF5\uC720 \uD074\uB798\uC2A4 \uB370\uC774\uD130\uB97C \uC0AC\uC6A9\uD574\uC57C \uD569\uB2C8\uB2E4. \uADF8\uB807\uC9C0 \uC54A\uC744 \uACBD\uC6B0 \uC2E4\uD328\uD569\uB2C8\uB2E4.\n -XshowSettings \uBAA8\uB4E0 \uC124\uC815\uC744 \uD45C\uC2DC\uD55C \uD6C4 \uACC4\uC18D\uD569\uB2C8\uB2E4.\n -XshowSettings:all\n \uBAA8\uB4E0 \uC124\uC815\uC744 \uD45C\uC2DC\uD55C \uD6C4 \uACC4\uC18D\uD569\uB2C8\uB2E4.\n -XshowSettings:locale\n \uBAA8\uB4E0 \uB85C\uCF00\uC77C \uAD00\uB828 \uC124\uC815\uC744 \uD45C\uC2DC\uD55C \uD6C4 \uACC4\uC18D\uD569\uB2C8\uB2E4.\n -XshowSettings:properties\n \uBAA8\uB4E0 \uC18D\uC131 \uC124\uC815\uC744 \uD45C\uC2DC\uD55C \uD6C4 \uACC4\uC18D\uD569\uB2C8\uB2E4.\n -XshowSettings:vm \uBAA8\uB4E0 VM \uAD00\uB828 \uC124\uC815\uC744 \uD45C\uC2DC\uD55C \uD6C4 \uACC4\uC18D\uD569\uB2C8\uB2E4.\n -Xss<\uD06C\uAE30> Java \uC2A4\uB808\uB4DC \uC2A4\uD0DD \uD06C\uAE30\uB97C \uC124\uC815\uD569\uB2C8\uB2E4.\n -Xverify \uBC14\uC774\uD2B8\uCF54\uB4DC \uAC80\uC99D\uC790\uC758 \uBAA8\uB4DC\uB97C \uC124\uC815\uD569\uB2C8\uB2E4.\n \
+ --add-reads <\uBAA8\uB4C8>=<\uB300\uC0C1-\uBAA8\uB4C8>(,<\uB300\uC0C1-\uBAA8\uB4C8>)*\n \uBAA8\uB4C8 \uC120\uC5B8\uC5D0 \uAD00\uACC4\uC5C6\uC774 <\uB300\uC0C1-\uBAA8\uB4C8>\uC744 \uC77D\uB3C4\uB85D\n <\uBAA8\uB4C8>\uC744 \uC5C5\uB370\uC774\uD2B8\uD569\uB2C8\uB2E4.\n <\uB300\uC0C1-\uBAA8\uB4C8>\uC740 \uC774\uB984\uC774 \uC9C0\uC815\uB418\uC9C0 \uC54A\uC740 \uBAA8\uB4E0 \uBAA8\uB4C8\uC744 \uC77D\uC744 \uC218 \uC788\uB294\n ALL-UNNAMED\uC77C \uC218 \uC788\uC2B5\uB2C8\uB2E4.\n --add-exports <\uBAA8\uB4C8>/<\uD328\uD0A4\uC9C0>=<\uB300\uC0C1-\uBAA8\uB4C8>(,<\uB300\uC0C1-\uBAA8\uB4C8>)*\n \uBAA8\uB4C8 \uC120\uC5B8\uC5D0 \uAD00\uACC4\uC5C6\uC774 <\uD328\uD0A4\uC9C0>\uB97C <\uB300\uC0C1-\uBAA8\uB4C8>\uB85C \uC775\uC2A4\uD3EC\uD2B8\uD558\uB3C4\uB85D\n <\uBAA8\uB4C8>\uC744 \uC5C5\uB370\uC774\uD2B8\uD569\uB2C8\uB2E4.\n <\uB300\uC0C1-\uBAA8\uB4C8>\uC740 \uC774\uB984\uC774 \uC9C0\uC815\uB418\uC9C0 \uC54A\uC740 \uBAA8\uB4E0 \uBAA8\uB4C8\uB85C \uC775\uC2A4\uD3EC\uD2B8\uD560 \uC218 \uC788\uB294\n ALL-UNNAMED\uC77C \uC218 \uC788\uC2B5\uB2C8\uB2E4.\n --add-opens <\uBAA8\uB4C8>/<\uD328\uD0A4\uC9C0>=<\uB300\uC0C1-\uBAA8\uB4C8>(,<\uB300\uC0C1-\uBAA8\uB4C8>)*\n \uBAA8\uB4C8 \uC120\uC5B8\uC5D0 \uAD00\uACC4\uC5C6\uC774 <\uD328\uD0A4\uC9C0>\uB97C <\uB300\uC0C1-\uBAA8\uB4C8>\uB85C \uC5F4\uB3C4\uB85D\n <\uBAA8\uB4C8>\uC744 \uC5C5\uB370\uC774\uD2B8\uD569\uB2C8\uB2E4.\n --permit-illegal-access\n \uC774\uB984\uC774 \uC9C0\uC815\uB418\uC9C0 \uC54A\uC740 \uBAA8\uB4C8\uC758 \uCF54\uB4DC\uB97C \uC0AC\uC6A9\uD558\uC5EC \uC774\uB984\uC774 \uC9C0\uC815\uB41C\n \uBAA8\uB4C8\uC758 \uC720\uD615 \uBA64\uBC84\uC5D0 \uB300\uD55C \uC798\uBABB\uB41C \uC561\uC138\uC2A4\uB97C \uD5C8\uC6A9\uD569\uB2C8\uB2E4. \uC774 \uD638\uD658\uC131\n \uC635\uC158\uC740 \uB2E4\uC74C \uB9B4\uB9AC\uC2A4\uC5D0\uC11C \uC81C\uAC70\uB429\uB2C8\uB2E4.\n --limit-modules <\uBAA8\uB4C8 \uC774\uB984>[,<\uBAA8\uB4C8 \uC774\uB984>...]\n \uAD00\uCC30 \uAC00\uB2A5\uD55C \uBAA8\uB4C8\uC758 \uACF5\uC6A9\uC744 \uC81C\uD55C\uD569\uB2C8\uB2E4.\n --patch-module <\uBAA8\uB4C8>=<\uD30C\uC77C>({0}<\uD30C\uC77C>)*\n JAR \uD30C\uC77C \uB610\uB294 \uB514\uB809\uD1A0\uB9AC\uC758 \uD074\uB798\uC2A4\uC640 \uB9AC\uC18C\uC2A4\uB85C\n \uBAA8\uB4C8\uC744 \uBB34\uD6A8\uD654\uD558\uAC70\uB098 \uC778\uC218\uD654\uD569\uB2C8\uB2E4.\n --disable-@files \uCD94\uAC00 \uC778\uC218 \uD30C\uC77C \uD655\uC7A5\uC744 \uC0AC\uC6A9 \uC548\uD568\uC73C\uB85C \uC124\uC815\uD569\uB2C8\uB2E4.\n\n\uC774\uB7EC\uD55C \uCD94\uAC00 \uC635\uC158\uC740 \uD1B5\uC9C0 \uC5C6\uC774 \uBCC0\uACBD\uB420 \uC218 \uC788\uC2B5\uB2C8\uB2E4.\n
# Translators please note do not translate the options themselves
java.launcher.X.macosx.usage=\n\uB2E4\uC74C\uC740 Mac OS X\uC5D0 \uD2B9\uC815\uB41C \uC635\uC158\uC785\uB2C8\uB2E4.\n -XstartOnFirstThread\n \uCCAB\uBC88\uC9F8 (AppKit) \uC2A4\uB808\uB4DC\uC5D0 main() \uBA54\uC18C\uB4DC\uB97C \uC2E4\uD589\uD569\uB2C8\uB2E4.\n -Xdock:name=<application name>\n \uACE0\uC815\uC73C\uB85C \uD45C\uC2DC\uB41C \uAE30\uBCF8 \uC560\uD50C\uB9AC\uCF00\uC774\uC158 \uC774\uB984\uC744 \uBB34\uD6A8\uD654\uD569\uB2C8\uB2E4.\n -Xdock:icon=<path to icon file>\n \uACE0\uC815\uC73C\uB85C \uD45C\uC2DC\uB41C \uAE30\uBCF8 \uC544\uC774\uCF58\uC744 \uBB34\uD6A8\uD654\uD569\uB2C8\uB2E4.\n\n
-java.launcher.cls.error1=\uC624\uB958: \uAE30\uBCF8 \uD074\uB798\uC2A4 {0}\uC744(\uB97C) \uCC3E\uAC70\uB098 \uB85C\uB4DC\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
+java.launcher.cls.error1=\uC624\uB958: \uAE30\uBCF8 \uD074\uB798\uC2A4 {0}\uC744(\uB97C) \uCC3E\uAC70\uB098 \uB85C\uB4DC\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.\n\uC6D0\uC778: {1}: {2}
java.launcher.cls.error2=\uC624\uB958: {1} \uD074\uB798\uC2A4\uC5D0\uC11C \uAE30\uBCF8 \uBA54\uC18C\uB4DC\uAC00 {0}\uC774(\uAC00) \uC544\uB2D9\uB2C8\uB2E4. \uB2E4\uC74C \uD615\uC2DD\uC73C\uB85C \uAE30\uBCF8 \uBA54\uC18C\uB4DC\uB97C \uC815\uC758\uD558\uC2ED\uC2DC\uC624.\n public static void main(String[] args)
java.launcher.cls.error3=\uC624\uB958: \uAE30\uBCF8 \uBA54\uC18C\uB4DC\uB294 {0} \uD074\uB798\uC2A4\uC5D0\uC11C void \uC720\uD615\uC758 \uAC12\uC744 \uBC18\uD658\uD574\uC57C \uD569\uB2C8\uB2E4. \n\uB2E4\uC74C \uD615\uC2DD\uC73C\uB85C \uAE30\uBCF8 \uBA54\uC18C\uB4DC\uB97C \uC815\uC758\uD558\uC2ED\uC2DC\uC624.\n public static void main(String[] args)
java.launcher.cls.error4=\uC624\uB958: {0} \uD074\uB798\uC2A4\uC5D0\uC11C \uAE30\uBCF8 \uBA54\uC18C\uB4DC\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uB2E4\uC74C \uD615\uC2DD\uC73C\uB85C \uAE30\uBCF8 \uBA54\uC18C\uB4DC\uB97C \uC815\uC758\uD558\uC2ED\uC2DC\uC624.\r\n public static void main(String[] args)\r\n\uB610\uB294 JavaFX \uC560\uD50C\uB9AC\uCF00\uC774\uC158 \uD074\uB798\uC2A4\uB294 {1}\uC744(\uB97C) \uD655\uC7A5\uD574\uC57C \uD569\uB2C8\uB2E4.
java.launcher.cls.error5=\uC624\uB958: \uC774 \uC560\uD50C\uB9AC\uCF00\uC774\uC158\uC744 \uC2E4\uD589\uD558\uB294 \uB370 \uD544\uC694\uD55C JavaFX \uB7F0\uD0C0\uC784 \uAD6C\uC131 \uC694\uC18C\uAC00 \uB204\uB77D\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
+java.launcher.cls.error6=\uC624\uB958: \uAE30\uBCF8 \uD074\uB798\uC2A4 {0}\uC744(\uB97C) \uB85C\uB4DC\uD558\uB294 \uC911 LinkageError\uAC00 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4.\n\t{1}
java.launcher.jar.error1=\uC624\uB958: {0} \uD30C\uC77C\uC744 \uC5F4\uB824\uACE0 \uC2DC\uB3C4\uD558\uB294 \uC911 \uC608\uC0C1\uCE58 \uC54A\uC740 \uC624\uB958\uAC00 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4.
java.launcher.jar.error2={0}\uC5D0\uC11C Manifest\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
java.launcher.jar.error3={0}\uC5D0 \uAE30\uBCF8 Manifest \uC18D\uC131\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.
+java.launcher.jar.error4={0}\uC5D0\uC11C Java \uC5D0\uC774\uC804\uD2B8\uB97C \uB85C\uB4DC\uD558\uB294 \uC911 \uC624\uB958\uAC00 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4.
java.launcher.init.error=\uCD08\uAE30\uD654 \uC624\uB958
java.launcher.javafx.error1=\uC624\uB958: JavaFX launchApplication \uBA54\uC18C\uB4DC\uC5D0 \uC798\uBABB\uB41C \uC11C\uBA85\uC774 \uC788\uC2B5\uB2C8\uB2E4.\\n\uB530\uB77C\uC11C static\uC73C\uB85C \uC120\uC5B8\uD558\uACE0 void \uC720\uD615\uC758 \uAC12\uC744 \uBC18\uD658\uD574\uC57C \uD569\uB2C8\uB2E4.
java.launcher.module.error1={0} \uBAA8\uB4C8\uC5D0 MainClass \uC18D\uC131\uC774 \uC5C6\uC2B5\uB2C8\uB2E4. -m <module>/<main-class>\uB97C \uC0AC\uC6A9\uD558\uC2ED\uC2DC\uC624.
java.launcher.module.error2=\uC624\uB958: {1} \uBAA8\uB4C8\uC758 \uAE30\uBCF8 \uD074\uB798\uC2A4 {0}\uC744(\uB97C) \uCC3E\uAC70\uB098 \uB85C\uB4DC\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
+java.launcher.module.error3=\uC624\uB958: {1} \uBAA8\uB4C8\uC5D0\uC11C \uAE30\uBCF8 \uD074\uB798\uC2A4 {0}\uC744(\uB97C) \uB85C\uB4DC\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.\n\t{2}
+java.launcher.module.error4={0}\uC744(\uB97C) \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
--- a/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_pt_BR.properties Sat Jun 03 02:44:55 2017 +0000
+++ b/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_pt_BR.properties Sat Jun 03 03:48:03 2017 +0000
@@ -24,31 +24,36 @@
#
# Translators please note do not translate the options themselves
-java.launcher.opt.header = Uso: {0} [options] class [args...]\n (para executar uma classe)\n ou {0} [options] -jar jarfile [args...]\n (para executar um arquivo jar)\n or {0} [options] -p <modulepath> -m <modulename>[/<mainclass>] [args...]\n (para executar a classe principal em um m\u00F3dulo)\nem que as op\u00E7\u00F5es incluem:\n\n
+java.launcher.opt.header = Uso: {0} [options] <mainclass> [args...]\n (para executar uma classe)\n ou {0} [options] -jar <jarfile> [args...]\n (para executar um arquivo jar)\n ou {0} [options] -m <module>[/<mainclass>] [args...]\n {0} [options] --module <module>[/<mainclass>] [args...]\n (para executar a classe principal em um m\u00F3dulo)\n\n Os argumentos ap\u00F3s a classe principal, -jar <jarfile>, -m ou --module\n <module>/<mainclass> s\u00E3o especificados como os argumentos para a classe principal.\n\n em que as op\u00E7\u00F5es incluem:\n\n
java.launcher.opt.datamodel =\ -d{0}\t Obsoleto, ser\u00E1 removido em uma futura release\n
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
# Translators please note do not translate the options themselves
-java.launcher.opt.footer =\ -cp <caminho de pesquisa de classe de diret\u00F3rios e arquivos zip/jar>\n -classpath <caminho de pesquisa de classe de diret\u00F3rios e arquivos zip/jar>\n --class-path <caminho de pesquisa de classe de diret\u00F3rios e arquivos zip/jar>\n Uma lista separada por {0} de diret\u00F3rios, arquivos compactados JAR\n e arquivos ZIP nos quais procurar arquivos de classe.\n -p <caminho de m\u00F3dulo>\n --module-path <caminho de m\u00F3dulo>...\n Uma lista separada por {0} de diret\u00F3rios, cada um sendo um\n diret\u00F3rio de m\u00F3dulos.\n --upgrade-module-path <caminho de m\u00F3dulo>...\n Uma lista separada por {0} de diret\u00F3rios, cada um\n um diret\u00F3rio de m\u00F3dulos que substituem m\u00F3dulos\n atualiz\u00E1veis na imagem de runtime\n -m <module>[/<mainclass>]\n --module <modulename>[/<mainclass>]\n o m\u00F3dulo inicial a ser resolvido e o nome da classe principal\n a ser executada se n\u00E3o especificado pelo m\u00F3dulo\n --add-modules <modulename>[,<modulename>...]\n m\u00F3dulos raiz a serem resolvidos al\u00E9m do m\u00F3dulo inicial.\n <modulename> pode ser tamb\u00E9m ALL-DEFAULT, ALL-SYSTEM,\n ALL-MODULE-PATH.\n --limit-modules <modulename>[,<modulename>...]\n limitar o universo dos m\u00F3dulos observ\u00E1veis\n --list-modules [<modulename>[,<modulename>...]]\n listar os m\u00F3dulos observ\u00E1veis e sair\n --dry-run criar VM, mas n\u00E3o executar o m\u00E9todo principal.\n Esta op\u00E7\u00E3o --dry-run pode ser \u00FAtil para validar as\n op\u00E7\u00F5es de linha de comando, como a configura\u00E7\u00E3o do sistema de m\u00F3dulos.\n -D<name>=<value>\n definir uma propriedade do sistema\n -verbose:[class|gc|jni]\n ativar sa\u00EDda detalhada\n -version imprimir vers\u00E3o do produto no fluxo de erros e sair\n --version imprimir vers\u00E3o do produto no fluxo de sa\u00EDda e sair\n -showversion imprimir vers\u00E3o do produto no fluxo de sa\u00EDda e continuar\n --show-version\n imprimir vers\u00E3o do produto no fluxo de sa\u00EDda e continuar\n -? -h -help\n imprimir esta mensagem de ajuda no fluxo de erros\n --help imprimir esta mensagem de ajuda no fluxo de sa\u00EDda\n -X imprimir ajuda sobre op\u00E7\u00F5es extras no fluxo de erros\n --help-extra imprimir ajuda sobre op\u00E7\u00F5es extras no fluxo de sa\u00EDda\n -ea[:<packagename>...|:<classname>]\n -enableassertions[:<packagename>...|:<classname>]\n ativar asser\u00E7\u00F5es com granularidade especificada\n -da[:<packagename>...|:<classname>]\n -disableassertions[:<packagename>...|:<classname>]\n desativar asser\u00E7\u00F5es com granularidade especificada\n -esa | -enablesystemassertions\n ativar asser\u00E7\u00F5es de sistema\n -dsa | -disablesystemassertions\n desativar asser\u00E7\u00F5es de sistema\n -agentlib:<libname>[=<options>]\n carregar biblioteca de agente nativo <libname>; por exemplo, -agentlib:jdwp\n ver tamb\u00E9m -agentlib:jdwp=help\n -agentpath:<pathname>[=<options>]\n carregar biblioteca de agente nativo por nome do caminho completo\n -javaagent:<jarpath>[=<options>]\n carregar agente de linguagem de programa\u00E7\u00E3o Java; ver java.lang.instrument\n -splash:<imagepath>\n mostrar tela de apresenta\u00E7\u00E3o com imagem especificada\n Imagens em escala HiDPI ser\u00E3o automaticamente suportadas e usadas\n se dispon\u00EDveis. O \
-nome do arquivo de imagem sem escala, por exemplo, image.ext,\n sempre dever\u00E1 ser informado como argumento para a op\u00E7\u00E3o -splash.\n A imagem em escala mais apropriada fornecida ser\u00E1 selecionada\n automaticamente.\n Consulte a documenta\u00E7\u00E3o da API SplashScreen para obter mais informa\u00E7\u00F5es.\n @<filepath> op\u00E7\u00F5es de leitura do arquivo especificado\n\nPara especificar um argumento para uma op\u00E7\u00E3o longa, voc\u00EA pode usar --<name>=<value> ou\n--<name> <value>.\n
+java.launcher.opt.footer = \ -cp <caminho de pesquisa de classe de diret\u00F3rios e arquivos zip/jar>\n -classpath <caminho de pesquisa de classe de diret\u00F3rios e arquivos zip/jar>\n --class-path <caminho de pesquisa de classe de diret\u00F3rios e arquivos zip/jar>\n Uma lista separada por {0} de diret\u00F3rios, arquivos compactados JAR\n e arquivos compactados ZIP para procurar arquivos de classe.\n -p <caminho do m\u00F3dulo>\n --module-path <caminho do m\u00F3dulo>...\n Uma lista separada por {0} de diret\u00F3rios, cada um\n sendo um diret\u00F3rio de m\u00F3dulos.\n --upgrade-module-path <caminho do m\u00F3dulo>...\n Uma lista separada por {0} de diret\u00F3rios, cada um\n sendo um diret\u00F3rio de m\u00F3dulos que substituem m\u00F3dulos\n pass\u00EDveis de upgrade na imagem de runtime\n --add-modules <nome do m\u00F3dulo>[,<nome do m\u00F3dulo>...]\n m\u00F3dulos-raiz a serem resolvidos al\u00E9m do m\u00F3dulo inicial.\n <nome do m\u00F3dulo> tamb\u00E9m pode ser ALL-DEFAULT, ALL-SYSTEM,\n ALL-MODULE-PATH.\n --list-modules\n lista os m\u00F3dulos observ\u00E1veis e sai\n --d <nome do m\u00F3dulo>\n --describe-module <nome do m\u00F3dulo>\n descreve um m\u00F3dulo e sai\n --dry-run cria VM e carrega classe principal, mas n\u00E3o executa o m\u00E9todo principal.\n A op\u00E7\u00E3o --dry-run pode ser \u00FAtil para validar as\n op\u00E7\u00F5es de linha de comando como a configura\u00E7\u00E3o do sistema do m\u00F3dulo.\n --validate-modules\n valida todos os m\u00F3dulos e sai\n A op\u00E7\u00E3o --validate-modules pode ser \u00FAtil para localizar\n conflitos e outros erros com m\u00F3dulos no caminho do m\u00F3dulo.\n -D<name>=<value>\n define uma propriedade de sistema\n -verbose:[class|module|gc|jni]\n ativar sa\u00EDda verbosa\n -version imprime a vers\u00E3o do produto no fluxo de erros e sai\n -version imprime a vers\u00E3o do produto no fluxo de sa\u00EDda e sai\n -showversion imprime a vers\u00E3o do produto no fluxo de erros e continua\n --show-version\n imprime a vers\u00E3o do produto no fluxo de sa\u00EDda e continua\n --show-module-resolution\n mostra a sa\u00EDda da resolu\u00E7\u00E3o do m\u00F3dulo durante a inicializa\u00E7\u00E3o\n -? -h -help\n imprime esta mensagem de ajuda no fluxo de erros\n --help imprime esta mensagem de ajuda no fluxo de sa\u00EDda\n -X imprime ajuda sobre op\u00E7\u00F5es extras no fluxo de erros\n --help-extra imprime ajuda sobre op\u00E7\u00F5es extras no fluxo de sa\u00EDda\n -ea[:<packagename>...|:<classname>]\n -enableassertions[:<packagename>...|:<classname>]\n ativa asser\u00E7\u00F5es com granularidade especificada\n -da[:<packagename>...|:<classname>]\n -disableassertions[:<packagename>...|:<classname>]\n desativa asser\u00E7\u00F5es com granularidade especificada\n -esa | -enablesystemassertions\n ativa asser\u00E7\u00F5es de sistema\n -dsa | -disablesystemassertions\n desativa asser\u00E7\u00F5es de sistema\n -agentlib:<libname>[=<options>]\n carrega biblioteca de agente nativo <libname>, por exemplo, -agentlib:jdwp\n consulte tamb\u00E9m -agentlib:jdwp=help\n -agentpath:<pathname>[=<options>]\n carrega biblioteca de agente nativo por nome do caminho completo\n -javaagent:<jarpath>[=<options>]\n carrega agente de linguagem de programa\u00E7\u00E3o Java, consulte java.lang.instrument\n -splash:<imagepath>\n \
+mostra a tela inicial com a imagem especificada\n Imagens HiDPI dimensionadas s\u00E3o suportadas automaticamente e utilizadas,\n se dispon\u00EDveis. O nome do arquivo de imagem n\u00E3o dimensionada, por exemplo, image.ext,\n deve ser informado sempre como argumento para a op\u00E7\u00E3o -splash.\n A imagem dimensionada mais apropriada fornecida ser\u00E1 selecionada\n automaticamente.\n Consulte a documenta\u00E7\u00E3o da API de Tela Inicial para obter mais informa\u00E7\u00F5es\n @arquivos de argumento\n Um ou mais arquivos de argumentos que cont\u00EAm op\u00E7\u00F5es\n -disable-@files\n impede expans\u00E3o adicional de arquivo de argumentos\nnPara especificar um argumento para uma op\u00E7\u00E3o longa, voc\u00EA pode usar --<name>=<value> ou\n--<name> <value>.\n
# Translators please note do not translate the options themselves
-java.launcher.X.usage=\n -Xbatch desativar compila\u00E7\u00E3o em segundo plano\n -Xbootclasspath/a:<diret\u00F3rios e arquivos zip/jar separados por {0}>\n anexar ao final do caminho de classe de bootstrap\n -Xcheck:jni executar verifica\u00E7\u00F5es adicionais de fun\u00E7\u00F5es JNI\n -Xcomp for\u00E7a a compila\u00E7\u00E3o de m\u00E9todos na primeira chamada\n -Xdebug fornecido para compatibilidade reversa\n -Xdiag mostrar mensagens adicionais de diagn\u00F3stico\n -Xdiag:resolver mostrar mensagens de diagn\u00F3stico do resolvedor\n -Xfuture ativar verifica\u00E7\u00F5es mais estritas, antecipando padr\u00E3o futuro\n -Xint somente execu\u00E7\u00E3o de modo interpretado\n -Xinternalversion\n exibe informa\u00E7\u00F5es mais detalhadas da vers\u00E3o da JVM do que a\n op\u00E7\u00E3o -version\n -Xloggc:<file> registrar status de GC em um arquivo com time-stamps\n -Xmixed execu\u00E7\u00E3o em modo misto (padr\u00E3o)\n -Xmn<size> define o tamanho inicial e m\u00E1ximo (em bytes) do heap\n para a gera\u00E7\u00E3o jovem (infantil)\n -Xms<size> definir tamanho inicial do heap Java\n -Xmx<size> definir tamanho m\u00E1ximo do heap Java\n -Xnoclassgc desativar coleta de lixo de classe\n -Xprof gerar dados de perfil de cpu\n -Xrs reduzir uso de sinais do SO por Java/VM (ver documenta\u00E7\u00E3o)\n -Xshare:auto usar dados de classe compartilhados se poss\u00EDvel (padr\u00E3o)\n -Xshare:off n\u00E3o tentar usar dados de classe compartilhados\n -Xshare:on exigido o uso de dados de classe compartilhados; caso contr\u00E1rio, falhar\u00E1.\n -XshowSettings mostrar todas as defini\u00E7\u00F5es e continuar\n -XshowSettings:all\n mostrar todas as defini\u00E7\u00F5es e continuar\n -XshowSettings:locale\n mostrar todas as defini\u00E7\u00F5es relacionadas a localidade e continuar\n -XshowSettings:properties\n mostrar todas as defini\u00E7\u00F5es de propriedade e continuar\n -XshowSettings:vm mostrar todas as defini\u00E7\u00F5es relacionadas a vm e continuar\n -Xss<size> definir tamanho da pilha de thread java\n -Xverify define o modo do verificador de c\u00F3digo de byte\n --add-reads <module>=<target-module>(,<target-module>)*\n atualiza <module> para ler <target-module>, independentemente\n da declara\u00E7\u00E3o de m\u00F3dulo. \n <target-module> pode ser ALL-UNNAMED para ler todos os m\u00F3dulos\n sem nome.\n --add-exports <module>/<package>=<target-module>(,<target-module>)*\n atualiza <module> para exportar <package> para <target-module>,\n independentemente da declara\u00E7\u00E3o de m\u00F3dulo.\n <target-module> pode ser ALL-UNNAMED para exportar todos os\n m\u00F3dulos sem nome.\n --add-opens <module>/<package>=<target-module>(,<target-module>)*\n atualiza <module> para abrir <package> para\n <target-module>, independentemente da declara\u00E7\u00E3o de m\u00F3dulo.\n --disable-@files desativar expans\u00E3o de arquivo de argumento adicional\n --patch-module <module>=<file>({0}<file>)*\n Substitui ou amplia um m\u00F3dulo com classes e recursos\n em arquivos ou diret\u00F3rios JAR.\n\nEssas op\u00E7\u00F5es extras est\u00E3o sujeitas a altera\u00E7\u00E3o sem aviso.\n
+java.launcher.X.usage=\n -Xbatch desativa compila\u00E7\u00E3o em segundo plano\n -Xbootclasspath/a:<diret\u00F3rios e arquivos zip/jar separados por {0}>\n anexa ao final do caminho de classe de bootstrap\n -Xcheck:jni executa verifica\u00E7\u00F5es adicionais de fun\u00E7\u00F5es JNI\n -Xcomp for\u00E7a a compila\u00E7\u00E3o de m\u00E9todos na primeira chamada\n -Xdebug fornecido para compatibilidade reversa\n -Xdiag mostra mensagens adicionais de diagn\u00F3stico\n -Xfuture ativa verifica\u00E7\u00F5es de n\u00EDvel m\u00E1ximo, antecipando padr\u00E3o futuro\n -Xint somente execu\u00E7\u00E3o de modo interpretado\n -Xinternalversion\n exibe informa\u00E7\u00F5es mais detalhadas da vers\u00E3o da JVM do que a\n op\u00E7\u00E3o -version\n -Xloggc:<file> registra status de GC em um arquivo com timestamps\n -Xmixed execu\u00E7\u00E3o em modo misto (padr\u00E3o)\n -Xmn<size> define o tamanho inicial e m\u00E1ximo (em bytes) do heap\n para a gera\u00E7\u00E3o jovem (infantil)\n -Xms<size> define tamanho inicial do heap Java\n -Xmx<size> define tamanho m\u00E1ximo do heap Java\n -Xnoclassgc desativa coleta de lixo de classe\n -Xprof gera dados de perfil de cpu (obsoleto)\n -Xrs reduz uso de sinais do SO por Java/VM (ver documenta\u00E7\u00E3o)\n -Xshare:auto usa dados de classe compartilhados se poss\u00EDvel (padr\u00E3o)\n -Xshare:off n\u00E3o tenta usar dados de classe compartilhados\n -Xshare:on exige o uso de dados de classe compartilhados; caso contr\u00E1rio, falhar\u00E1.\n -XshowSettings mostra todas as defini\u00E7\u00F5es e continua\n -XshowSettings:all\n mostra todas as defini\u00E7\u00F5es e continua\n -XshowSettings:locale\n mostra todas as defini\u00E7\u00F5es relacionadas \u00E0 configura\u00E7\u00E3o regional e continua\n -XshowSettings:properties\n mostra todas as defini\u00E7\u00F5es de propriedade e continua\n -XshowSettings:vm mostra todas as defini\u00E7\u00F5es relacionadas a vm e continua\n -Xss<size> define o tamanho da pilha de thread java\n -Xverify define o modo do verificador de c\u00F3digo de byte\n --add-reads <module>=<target-module>(,<target-module>)*\n atualiza <module> para ler <target-module>, independentemente\n da declara\u00E7\u00E3o de m\u00F3dulo. \n <target-module> pode ser ALL-UNNAMED para ler todos os m\u00F3dulos\n sem nome.\n --add-exports <module>/<package>=<target-module>(,<target-module>)*\n atualiza <module> para exportar <package> para <target-module>,\n independentemente da declara\u00E7\u00E3o de m\u00F3dulo.\n <target-module> pode ser ALL-UNNAMED para exportar todos os\n m\u00F3dulos sem nome.\n --add-opens <module>/<package>=<target-module>(,<target-module>)*\n atualiza <module> para abrir <package> para\n <target-module>, independentemente da declara\u00E7\u00E3o de m\u00F3dulo.\n --permit-illegal-access\n permite acesso inv\u00E1lido aos membros dos tipos nos m\u00F3dulos com nome\n por c\u00F3digo nos m\u00F3dulos sem nomes. Esta op\u00E7\u00E3o de compatibilidade ser\u00E1\n removida na pr\u00F3xima release.\n --limit-modules <module name>[,<module name>...]\n limita o universo de m\u00F3dulos observ\u00E1veis\n--patch-module <module>=<file>({0}<file>)*\n substitui ou amplia um m\u00F3dulo com classes e recursos\n em arquivos ou \
+diret\u00F3rios JAR.\n\nEssas op\u00E7\u00F5es extras est\u00E3o sujeitas a altera\u00E7\u00E3o 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 do aplicativo>\n substitui o nome do aplicativo 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.error1=Erro: N\u00E3o foi poss\u00EDvel localizar nem carregar a classe principal {0}\nCausada por: {1}: {2}
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)
java.launcher.cls.error3=Erro: o m\u00E9todo main deve retornar um valor do tipo void na classe {0}; \ndefina o m\u00E9todo main como:\n public static void main(String[] args)
java.launcher.cls.error4=Erro: o m\u00E9todo main n\u00E3o foi encontrado na classe {0}; defina o m\u00E9todo main como:\n public static void main(String[] args)\nou uma classe de aplicativo JavaFX deve expandir {1}
java.launcher.cls.error5=Erro: os componentes de runtime do JavaFX n\u00E3o foram encontrados. Eles s\u00E3o obrigat\u00F3rios para executar este aplicativo
+java.launcher.cls.error6=Erro: ocorreu LinkageError ao carregar a classe principal {0}\n\t{1}
java.launcher.jar.error1=Erro: ocorreu um erro inesperado ao tentar abrir o arquivo {0}
java.launcher.jar.error2=manifesto n\u00E3o encontrado em {0}
java.launcher.jar.error3=nenhum atributo de manifesto principal em {0}
+java.launcher.jar.error4=erro ao carregar o agente java em {0}
java.launcher.init.error=erro de inicializa\u00E7\u00E3o
java.launcher.javafx.error1=Erro: O m\u00E9todo launchApplication do JavaFX tem a assinatura errada. Ele\\ndeve ser declarado como est\u00E1tico e retornar um valor do tipo void
java.launcher.module.error1=o m\u00F3dulo {0} n\u00E3o tem um atributo MainClass, use -m <module>/<main-class>
java.launcher.module.error2=Erro: N\u00E3o foi poss\u00EDvel localizar nem carregar a classe principal {0} no m\u00F3dulo {1}
+java.launcher.module.error3=Erro: N\u00E3o \u00E9 poss\u00EDvel carregar a classe principal {0} do m\u00F3dulo {1}\n\t{2}
+java.launcher.module.error4={0} n\u00E3o encontrado.
--- a/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_sv.properties Sat Jun 03 02:44:55 2017 +0000
+++ b/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_sv.properties Sat Jun 03 03:48:03 2017 +0000
@@ -24,31 +24,36 @@
#
# Translators please note do not translate the options themselves
-java.launcher.opt.header = Syntax: {0} [options] class [args...]\n (f\u00F6r att k\u00F6ra en klass)\n eller {0} [options] -jar jarfile [args...]\n (f\u00F6r att k\u00F6ra en jar-fil)\n eller {0} [options] -p <moduls\u00F6kv\u00E4g> -m <modulnamn>[/<huvudklass>] [args...]\n (f\u00F6r att k\u00F6ra huvudklassen i en modul)\nmed alternativen:\n\n
+java.launcher.opt.header = Syntax: {0} [options] <huvudklass>[args...]\n (f\u00F6r att k\u00F6ra en klass)\n eller {0} [options] -jar <jar-fil> [args...]\n (f\u00F6r att k\u00F6ra en jar-fil)\n eller {0} [options] -m <modul>[/<huvudklass>] [args...]\n {0} [options] --module <modul>[/<huvudklass>] [args...]\n (f\u00F6r att k\u00F6ra huvudklassen i en modul)\n\n Argument som kommer efter huvudklassen, -jar <jar-fil>, -m eller --module\n <modul>/<huvudklass> \u00F6verf\u00F6rs som argument till huvudklassen.\n\n med alternativen:\n\n
java.launcher.opt.datamodel =\ -d{0}\t Inaktuellt, tas bort i en framtida utg\u00E5va\n
java.launcher.opt.vmselect =\ {0}\t f\u00F6r att v\u00E4lja "{1}" VM\n
java.launcher.opt.hotspot =\ {0}\t \u00E4r en synonym f\u00F6r "{1}" VM [inaktuell]\n
# Translators please note do not translate the options themselves
-java.launcher.opt.footer =\ -cp <klass\u00F6kv\u00E4g till kataloger och zip-/jar-filer>\n -classpath <klass\u00F6kv\u00E4g till kataloger och zip-/jar-filer>\n --class-path <klass\u00F6kv\u00E4g till kataloger och zip-/jar-filer>\n En lista \u00F6ver kataloger, JAR-arkiv och ZIP-arkiv att\n s\u00F6ka efter klassfiler i, avgr\u00E4nsad med {0}.\n -p <moduls\u00F6kv\u00E4g>\n --module-path <moduls\u00F6kv\u00E4g>...\n En lista \u00F6ver kataloger, d\u00E4r varje katalog \u00E4r en katalog\n med moduler, avgr\u00E4nsad med {0}.\n --upgrade-module-path <moduls\u00F6kv\u00E4g>...\n En lista \u00F6ver kataloger, d\u00E4r varje katalog \u00E4r en katalog\n med moduler som ers\u00E4tter uppgraderingsbara moduler\n i exekveringsavbilden, avgr\u00E4nsad med {0} \n -m <modul>[/<huvudklass>]\n --module <modulnamn>[/<huvudklass>]\n den ursprungliga modulen att l\u00F6sa och namnet p\u00E5 huvudklassen\n att k\u00F6ra, om den inte anges av modulen\n --add-modules <modulnamn>[,<modulnamn>...]\n rotmoduler att l\u00F6sa f\u00F6rutom den ursprungliga modulen.\n <modulnamn> kan \u00E4ven vara ALL-DEFAULT, ALL-SYSTEM och\n ALL-MODULE-PATH.\n --limit-modules <modulnamn>[,<modulnamn>...]\n begr\u00E4nsa universumet med observerbara moduler\n --list-modules [<modulnamn>[,<modulnamn>...]]\n lista de observerbara modulerna och avsluta\n --dry-run skapa VM:en men k\u00F6r inte huvudmetoden.\n Det h\u00E4r alternativet kan vara anv\u00E4ndbart f\u00F6r att validera\n kommandoradsalternativen, som modulsystemkonfigurationen.\n -D<namn>=<v\u00E4rde>\n ange en systemegenskap\n -verbose:[class|gc|jni]\n aktivera utf\u00F6rliga utdata\n -version skriv ut produktversion till felstr\u00F6mmen och avsluta\n --version skriv ut produktversion till utdatastr\u00F6mmen och avsluta\n -showversion skriv ut produktversion till felstr\u00F6mmen och forts\u00E4tt\n --show-version\n skriv ut produktversion till utdatastr\u00F6mmen och forts\u00E4tt\n -? -h -help\n skriv ut det h\u00E4r hj\u00E4lpmeddelandet till felstr\u00F6mmen\n --help skriv ut det h\u00E4r hj\u00E4lpmeddelandet till utdatastr\u00F6mmen\n -X skriv ut hj\u00E4lp f\u00F6r icke-standardalternativ till felstr\u00F6mmen\n --help-extra skriv ut hj\u00E4lp f\u00F6r icke-standardalternativ till utdatastr\u00F6mmen\n -ea[:<paketnamn>...|:<klassnamn>]\n -enableassertions[:<paketnamn>...|:<klassnamn>]\n aktivera verifieringar med den angivna detaljgraden\n -da[:<paketnamn>...|:<klassnamn>]\n -disableassertions[:<paketnamn>...|:<klassnamn>]\n avaktivera verifieringar med den angivna detaljgraden\n -esa | -enablesystemassertions\n aktivera systemverifieringar\n -dsa | -disablesystemassertions\n avaktivera systemverifieringar\n -agentlib:<biblioteksnamn>[=<alternativ>]\n ladda det ursprungliga agentbiblioteket <biblioteksnamn>, exempel: -agentlib:jdwp\n se \u00E4ven -agentlib:jdwp=help\n -agentpath:<s\u00F6kv\u00E4gsnamn>[=<alternativ>]\n ladda det ursprungliga agentbiblioteket med fullst\u00E4ndigt s\u00F6kv\u00E4gsnamn\n -javaagent:<jar-s\u00F6kv\u00E4g>[=<alternativ>]\n ladda agenten f\u00F6r programmeringsspr\u00E5ket Java, se java.lang.instrument\n -splash:<bilds\u00F6kv\u00E4g>\n visa v\u00E4lkomstsk\u00E4rmen med den angivna bilden\n HiDPI-skal\u00E4ndrade bilder st\u00F6ds automatiskt och anv\u00E4nds om de \u00E4r\n tillg\u00E4ngliga. Filnamnet p\u00E5 den \
-oskal\u00E4ndrade bilden, t.ex.\n bild.filtill\u00E4gg, ska alltid \u00F6verf\u00F6ras som argument till\n alternativet -splash.\n Den l\u00E4mpligaste skal\u00E4ndrade bilden v\u00E4ljs automatiskt.\n Mer information finns i dokumentationen f\u00F6r API:t SplashScreen.\n @<fils\u00F6kv\u00E4g> l\u00E4s alternativ fr\u00E5n den angivna filen\n\nOm du vill ange ett argument f\u00F6r ett l\u00E5ngt alternativ kan du anv\u00E4nda --<namn>=<v\u00E4rde>\neller --<namn> <v\u00E4rde>.
+java.launcher.opt.footer = \ -cp <klass\u00F6kv\u00E4g till kataloger och zip-/jar-filer>\n -classpath <klass\u00F6kv\u00E4g till kataloger och zip-/jar-filer>\n --class-path <klass\u00F6kv\u00E4g till kataloger och zip-/jar-filer>\n En {0}-avgr\u00E4nsad lista \u00F6ver kataloger, JAR-arkiv\n och ZIP-arkiv att s\u00F6ka efter klassfiler i.\n -p <moduls\u00F6kv\u00E4g>\n --module-path <moduls\u00F6kv\u00E4g>...\n En {0}-avgr\u00E4nsad lista \u00F6ver kataloger, d\u00E4r varje katalog\n \u00E4r en katalog \u00F6ver moduler.\n --upgrade-module-path <moduls\u00F6kv\u00E4g>...\n En {0}-avgr\u00E4nsad lista \u00F6ver kataloger, d\u00E4r varje katalog\n \u00E4r en katalog \u00F6ver moduler som ers\u00E4tter uppgraderingsbara\n moduler i exekveringsavbilden\n --add-modules <modulnamn>[,<modulnamn>...]\n rotmoduler att l\u00F6sa f\u00F6rutom den ursprungliga modulen.\n <modulnamn> kan \u00E4ven vara ALL-DEFAULT, ALL-SYSTEM,\n ALL-MODULE-PATH.\n --list-modules\n visa observerbara moduler och avsluta\n --d <modulnamn>\n --describe-module <modulnamn>\n beskriv en modul och avsluta\n --dry-run skapa VM och ladda huvudklassen men k\u00F6r inte huvudmetoden.\n Alternativet --dry-run kan vara anv\u00E4ndbart f\u00F6r att validera\n kommandoradsalternativ, som modulsystemkonfigurationen.\n --validate-modules\n validera alla moduler och avsluta\n Alternativet --validate-modules kan vara anv\u00E4ndbart f\u00F6r att hitta\n konflikter och andra fel i modulerna p\u00E5 moduls\u00F6kv\u00E4gen.\n -D<namn>=<v\u00E4rde>\n ange en systemegenskap\n -verbose:[class|module|gc|jni]\n aktivera utf\u00F6rliga utdata\n -version skriv ut produktversion till felstr\u00F6mmen och avsluta\n --version skriv ut produktversion till utdatastr\u00F6mmen och avsluta\n -showversion skriv ut produktversion till felstr\u00F6mmen och forts\u00E4tt\n --show-version\n skriv ut produktversion till utdatastr\u00F6mmen och forts\u00E4tt\n --show-module-resolution\n visa modull\u00F6sningsutdata vid start\n -? -h -help\n skriv ut det h\u00E4r hj\u00E4lpmeddelandet till felstr\u00F6mmen\n --help skriv ut det h\u00E4r hj\u00E4lpmeddelandet till utdatastr\u00F6mmen\n -X skriv ut hj\u00E4lp f\u00F6r extraalternativ till felstr\u00F6mmen\n --help-extra skriv ut hj\u00E4lp f\u00F6r extraalternativ till utdatastr\u00F6mmen\n -ea[:<paketnamn>...|:<klassnamn>]\n -enableassertions[:<paketnamn>...|:<klassnamn>]\n aktivera verifieringar med den angivna detaljgraden\n -da[:<paketnamn>...|:<klassnamn>]\n -disableassertions[:<paketnamn>...|:<klassnamn>]\n avaktivera verifieringar med den angivna detaljgraden\n -esa | -enablesystemassertions\n aktivera systemverifieringar\n -dsa | -disablesystemassertions\n avaktivera systemverifieringar\n -agentlib:<biblioteksnamn>[=<alternativ>]\n ladda det ursprungliga agentbiblioteket <biblioteksnamn>, t.ex. -agentlib:jdwp\n se \u00E4ven -agentlib:jdwp=help\n -agentpath:<s\u00F6kv\u00E4gsnamn>[=<alternativ>]\n ladda det ursprungliga agentbiblioteket med fullst\u00E4ndigt s\u00F6kv\u00E4gsnamn\n -javaagent:<jar-s\u00F6kv\u00E4g>[=<alternativ>]\n ladda Java-programmeringsspr\u00E5ksagenten, se java.lang.instrument\n -splash:<bilds\u00F6kv\u00E4g>\n visa v\u00E4lkomstsk\u00E4rmen med den angivna bilden\n HiDPI-skal\u00E4ndrade bilder st\u00F6ds automatiskt och anv\u00E4nds om de \u00E4r\n \
+ tillg\u00E4ngliga. Filnamnet p\u00E5 den oskal\u00E4ndrade bilden, t.ex. image.ext,\n ska alltid \u00F6verf\u00F6ras som argument till alternativet -splash.\n Den l\u00E4mpligaste skal\u00E4ndrade bilden v\u00E4ljs\n automatiskt.\n Mer information finns i dokumentationen f\u00F6r API:t SplashScreen\n @argument filer\n en eller flera argumentfiler som inneh\u00E5ller alternativ\n -disable-@files\n f\u00F6rhindra ytterligare ut\u00F6kning av argumentfiler\nOm du vill ange ett argument f\u00F6r ett l\u00E5ngt alternativ kan du anv\u00E4nda --<namn>=<v\u00E4rde> eller\n--<namn> <v\u00E4rde>.\n
# Translators please note do not translate the options themselves
-java.launcher.X.usage=\n -Xbatch avaktivera bakgrundskompilering\n -Xbootclasspath/a:<kataloger och zip-/jar-filer avgr\u00E4nsade med {0}>\n l\u00E4gg till sist i klass\u00F6kv\u00E4gen f\u00F6r programladdning\n -Xcheck:jni utf\u00F6r fler kontroller f\u00F6r JNI-funktioner\n -Xcomp tvingar kompilering av metoder vid det f\u00F6rsta anropet\n -Xdebug tillhandah\u00E5lls f\u00F6r bak\u00E5tkompatibilitet\n -Xdiag visa fler diagnostiska meddelanden\n -Xdiag:resolver visa diagnostiska meddelanden f\u00F6r matchning\n -Xfuture aktivera str\u00E4ngaste kontroller, f\u00F6rv\u00E4ntad framtida standard\n -Xint endast exekvering i tolkat l\u00E4ge\n -Xinternalversion\n visar mer detaljerad information om JVM-version \u00E4n\n alternativet -version\n -Xloggc:<fil> logga GC-status till en fil med tidsst\u00E4mplar\n -Xmixed exekvering i blandat l\u00E4ge (standard)\n -Xmn<storlek> anger ursprunglig och maximal storlek (i byte) f\u00F6r h\u00F6gen f\u00F6r\n generationen med nyare objekt (h\u00F6gen f\u00F6r tilldelning av nya objekt)\n -Xms<storlek> ange ursprunglig storlek f\u00F6r Java-heap-utrymmet\n -Xmx<storlek> ange st\u00F6rsta storlek f\u00F6r Java-heap-utrymmet\n -Xnoclassgc avaktivera klasskr\u00E4pinsamling\n -Xprof utdata f\u00F6r processorprofilering\n -Xrs minska operativsystemssignalanv\u00E4ndning f\u00F6r Java/VM (se dokumentationen)\n -Xshare:auto anv\u00E4nd delade klassdata om m\u00F6jligt (standard)\n -Xshare:off f\u00F6rs\u00F6k inte anv\u00E4nda delade klassdata\n -Xshare:on kr\u00E4v anv\u00E4ndning av delade klassdata, utf\u00F6r inte i annat fall.\n -XshowSettings visa alla inst\u00E4llningar och forts\u00E4tt\n -XshowSettings:all\n visa alla inst\u00E4llningar och forts\u00E4tt\n -XshowSettings:locale\n visa alla spr\u00E5kkonventionsrelaterade inst\u00E4llningar och forts\u00E4tt\n -XshowSettings:properties\n visa alla egenskapsinst\u00E4llningar och forts\u00E4tt\n -XshowSettings:vm visa alla vm-relaterade inst\u00E4llningar och forts\u00E4tt\n -Xss<storlek> ange storlek f\u00F6r java-tr\u00E5dsstacken\n -Xverify anger l\u00E4ge f\u00F6r bytekodverifieraren\n --add-reads <modul>=<m\u00E5lmodul>(,<m\u00E5lmodul>)*\n uppdaterar <modul> f\u00F6r att l\u00E4sa <m\u00E5lmodul>, oavsett\n moduldeklarationen. \n <m\u00E5lmodul> kan vara ALL-UNNAMED f\u00F6r att l\u00E4sa alla\n ej namngivna moduler.\n --add-exports <modul>/<paket>=<m\u00E5lmodul>(,<m\u00E5lmodul>)*\n uppdaterar <modul> f\u00F6r att exportera <paket> till <m\u00E5lmodul>,\n oavsett moduldeklarationen.\n <m\u00E5lmodul> kan vara ALL-UNNAMED f\u00F6r att exportera till alla\n ej namngivna moduler.\n --add-opens <modul>/<paket>=<m\u00E5lmodul>(,<m\u00E5lmodul>)*\n uppdaterar <modul> f\u00F6r att \u00F6ppna <paket> till\n <m\u00E5lmodul>, oavsett moduldeklarationen.\n --disable-@files avaktivera ytterligare argumentfilsut\u00F6kning\n --patch-module <modul>=<fil>({0}<fil>)*\n \u00C5sidos\u00E4tt eller ut\u00F6ka en modul med klasser och resurser\n i JAR-filer eller kataloger.\n\nDe h\u00E4r extra alternativen kan \u00E4ndras utan f\u00F6reg\u00E5ende meddelande.
+java.launcher.X.usage=\n -Xbatch avaktivera bakgrundskompilering\n -Xbootclasspath/a:<kataloger och zip-/jar-filer avgr\u00E4nsade med {0}>\n l\u00E4gg till sist i klass\u00F6kv\u00E4gen f\u00F6r programladdning\n -Xcheck:jni utf\u00F6r fler kontroller f\u00F6r JNI-funktioner\n -Xcomp tvingar kompilering av metoder vid det f\u00F6rsta anropet\n -Xdebug tillhandah\u00E5lls f\u00F6r bak\u00E5tkompatibilitet\n -Xdiag visa fler diagnostiska meddelanden\n -Xfuture aktivera str\u00E4ngaste kontroller, f\u00F6rv\u00E4ntad framtida standard\n -Xint endast exekvering i tolkat l\u00E4ge\n -Xinternalversion\n visar mer detaljerad information om JVM-version \u00E4n\n alternativet -version\n -Xloggc:<fil> logga GC-status till en fil med tidsst\u00E4mplar\n -Xmixed exekvering i blandat l\u00E4ge (standard)\n -Xmn<storlek> anger ursprunglig och maximal storlek (i byte) f\u00F6r h\u00F6gen f\u00F6r\n generationen med nyare objekt (h\u00F6gen f\u00F6r tilldelning av nya objekt)\n -Xms<storlek> ange ursprunglig storlek f\u00F6r Java-heap-utrymmet\n -Xmx<storlek> ange st\u00F6rsta storlek f\u00F6r Java-heap-utrymmet\n -Xnoclassgc avaktivera klasskr\u00E4pinsamling\n -Xprof utdata f\u00F6r processorprofilering (inaktuellt)\n -Xrs minska operativsystemssignalanv\u00E4ndning f\u00F6r Java/VM (se dokumentationen)\n -Xshare:auto anv\u00E4nd delade klassdata om m\u00F6jligt (standard)\n -Xshare:off f\u00F6rs\u00F6k inte anv\u00E4nda delade klassdata\n -Xshare:on kr\u00E4v anv\u00E4ndning av delade klassdata, utf\u00F6r inte i annat fall.\n -XshowSettings visa alla inst\u00E4llningar och forts\u00E4tt\n -XshowSettings:all\n visa alla inst\u00E4llningar och forts\u00E4tt\n -XshowSettings:locale\n visa alla spr\u00E5kkonventionsrelaterade inst\u00E4llningar och forts\u00E4tt\n -XshowSettings:properties\n visa alla egenskapsinst\u00E4llningar och forts\u00E4tt\n -XshowSettings:vm visa alla vm-relaterade inst\u00E4llningar och forts\u00E4tt\n -Xss<storlek> ange storlek f\u00F6r java-tr\u00E5dsstacken\n -Xverify anger l\u00E4ge f\u00F6r bytekodverifieraren\n --add-reads <modul>=<m\u00E5lmodul>(,<m\u00E5lmodul>)*\n uppdaterar <modul> f\u00F6r att l\u00E4sa <m\u00E5lmodul>, oavsett\n moduldeklarationen. \n <m\u00E5lmodul> kan vara ALL-UNNAMED f\u00F6r att l\u00E4sa alla\n ej namngivna moduler.\n --add-exports <modul>/<paket>=<m\u00E5lmodul>(,<m\u00E5lmodul>)*\n uppdaterar <modul> f\u00F6r att exportera <paket> till <m\u00E5lmodul>,\n oavsett moduldeklarationen.\n <m\u00E5lmodul> kan vara ALL-UNNAMED f\u00F6r att exportera till alla\n ej namngivna moduler.\n --add-opens <modul>/<paket>=<m\u00E5lmodul>(,<m\u00E5lmodul>)*\n uppdaterar <modul> f\u00F6r att \u00F6ppna <paket> till\n <m\u00E5lmodul>, oavsett moduldeklarationen.\n --permit-illegal-access\n till\u00E5t otill\u00E5ten \u00E5tkomst till medlemmar av typer i namngivna\n moduler av kod i ej namngivna moduler. Det h\u00E4r \n kompatibilitetsalternativet tas bort i n\u00E4sta utg\u00E5va.\n --limit-modules <modulnamn>[,<modulnamn>...]\n begr\u00E4nsar universumet med observerbara moduler\n --patch-module <modul>=<fil>({0}<fil>)*\n \u00E5sidos\u00E4tt eller ut\u00F6ka en modul med klasser och resurser\n i JAR-filer eller kataloger.\n --disable-@files avaktivera ytterligare \
+argumentfilsut\u00F6kning\n\nDe h\u00E4r extraalternativen kan \u00E4ndras utan f\u00F6reg\u00E5ende meddelande.\n
# Translators please note do not translate the options themselves
java.launcher.X.macosx.usage=\nF\u00F6ljande alternativ \u00E4r Mac OS X-specifika:\n -XstartOnFirstThread\n k\u00F6r main()-metoden p\u00E5 den f\u00F6rsta (AppKit)-tr\u00E5den\n -Xdock:name=<applikationsnamn>\n \u00E5sidos\u00E4tt det standardapplikationsnamn som visas i dockan\n -Xdock:icon=<s\u00F6kv\u00E4g till ikonfil>\n \u00E5sidos\u00E4tt den standardikon som visas i dockan\n\n
-java.launcher.cls.error1=Fel: Kan inte hitta eller kan inte ladda huvudklassen {0}
+java.launcher.cls.error1=Fel: kunde inte hitta eller ladda huvudklassen {0}\nOrsakades av: {1}: {2}
java.launcher.cls.error2=Fel: Huvudmetoden \u00E4r inte {0} i klassen {1}, definiera huvudmetoden som:\n public static void main(String[] args)
java.launcher.cls.error3=Fel: Huvudmetoden m\u00E5ste returnera ett v\u00E4rde av typen void i klassen {0}, \ndefiniera huvudmetoden som:\n public static void main(String[] args)
java.launcher.cls.error4=Fel: Huvudmetoden finns inte i klassen {0}, definiera huvudmetoden som:\n public static void main(String[] args)\neller s\u00E5 m\u00E5ste en JavaFX-applikationsklass ut\u00F6ka {1}
java.launcher.cls.error5=Fel: JavaFX-exekveringskomponenter saknas, och de kr\u00E4vs f\u00F6r att kunna k\u00F6ra den h\u00E4r applikationen
+java.launcher.cls.error6=Fel: LinkageError intr\u00E4ffade vid laddning av huvudklassen {0}\n\t{1}
java.launcher.jar.error1=Fel: Ett ov\u00E4ntat fel intr\u00E4ffade n\u00E4r filen {0} skulle \u00F6ppnas
java.launcher.jar.error2=manifest finns inte i {0}
java.launcher.jar.error3=inget huvudmanifestattribut i {0}
+java.launcher.jar.error4=fel vid laddning av java-agenten i {0}
java.launcher.init.error=initieringsfel
java.launcher.javafx.error1=Fel: JavaFX launchApplication-metoden har fel signatur, den \nm\u00E5ste ha deklarerats som statisk och returnera ett v\u00E4rde av typen void
java.launcher.module.error1=modulen {0} har inget MainClass-attribut, anv\u00E4nd -m <module>/<main-class>
java.launcher.module.error2=Fel: kunde inte hitta eller ladda huvudklassen {0} i modulen {1}
+java.launcher.module.error3=Fel: kan inte ladda huvudklassen {0} fr\u00E5n modulen {1}\n\t{2}
+java.launcher.module.error4={0} hittades inte
--- a/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_zh_CN.properties Sat Jun 03 02:44:55 2017 +0000
+++ b/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_zh_CN.properties Sat Jun 03 03:48:03 2017 +0000
@@ -24,32 +24,36 @@
#
# Translators please note do not translate the options themselves
-java.launcher.opt.header = \u7528\u6CD5: {0} [options] class [args...]\n (\u6267\u884C\u7C7B)\n \u6216 {0} [options] -jar jarfile [args...]\n (\u6267\u884C jar \u6587\u4EF6)\n \u6216 {0} [options] -p <\u6A21\u5757\u8DEF\u5F84> -m <\u6A21\u5757\u540D\u79F0>[/<\u6A21\u5757\u7C7B>] [args...]\n (\u6267\u884C\u6A21\u5757\u4E2D\u7684\u4E3B\u7C7B)\n\u5176\u4E2D\u9009\u9879\u5305\u62EC:\n\n
+java.launcher.opt.header = \u7528\u6CD5: {0} [options] <\u4E3B\u7C7B> [args...]\n (\u6267\u884C\u7C7B)\n \u6216 {0} [options] -jar <jar \u6587\u4EF6> [args...]\n (\u6267\u884C jar \u6587\u4EF6)\n \u6216 {0} [options] -m <\u6A21\u5757>[/<\u4E3B\u7C7B>] [args...]\n {0} [options] --module <\u6A21\u5757>[/<\u4E3B\u7C7B>] [args...]\n (\u6267\u884C\u6A21\u5757\u4E2D\u7684\u4E3B\u7C7B)\n\n \u5C06\u4E3B\u7C7B, -jar <jar \u6587\u4EF6>, -m \u6216 --module\n <\u6A21\u5757>/<\u4E3B\u7C7B> \u540E\u7684\u53C2\u6570\u4F5C\u4E3A\u53C2\u6570\u4F20\u9012\u5230\u4E3B\u7C7B\u3002\n\n \u5176\u4E2D, \u9009\u9879\u5305\u62EC:\n\n
java.launcher.opt.datamodel =\ -d{0}\t \u5DF2\u8FC7\u65F6, \u5728\u4EE5\u540E\u7684\u53D1\u884C\u7248\u4E2D\u5C06\u88AB\u5220\u9664\n
java.launcher.opt.vmselect =\ {0}\t \u9009\u62E9 "{1}" VM\n
java.launcher.opt.hotspot =\ {0}\t \u662F "{1}" VM \u7684\u540C\u4E49\u8BCD [\u5DF2\u8FC7\u65F6]\n
# Translators please note do not translate the options themselves
-java.launcher.opt.footer =\ -cp <\u76EE\u5F55\u548C zip/jar \u6587\u4EF6\u7684\u7C7B\u641C\u7D22\u8DEF\u5F84>\n -classpath <\u76EE\u5F55\u548C zip/jar \u6587\u4EF6\u7684\u7C7B\u641C\u7D22\u8DEF\u5F84>\n --class-path <\u76EE\u5F55\u548C zip/jar \u6587\u4EF6\u7684\u7C7B\u641C\u7D22\u8DEF\u5F84>\n \u7528\u4E8E\u641C\u7D22\u7C7B\u6587\u4EF6\u7684\u76EE\u5F55, JAR \u6863\u6848\n \u548C ZIP \u6863\u6848\u7684\u5217\u8868, \u4F7F\u7528 {0} \u5206\u9694\u3002\n -p <\u6A21\u5757\u8DEF\u5F84>\n --module-path <\u6A21\u5757\u8DEF\u5F84>...\n \u7528 {0} \u5206\u9694\u7684\u76EE\u5F55\u5217\u8868, \u6BCF\u4E2A\u76EE\u5F55\n \u90FD\u662F\u4E00\u4E2A\u5305\u542B\u6A21\u5757\u7684\u76EE\u5F55\u3002\n --upgrade-module-path <\u6A21\u5757\u8DEF\u5F84>...\n \u7528 {0} \u5206\u9694\u7684\u76EE\u5F55\u5217\u8868, \u6BCF\u4E2A\u76EE\u5F55\n \u90FD\u662F\u4E00\u4E2A\u5305\u542B\u6A21\u5757\u7684\u76EE\u5F55, \u8FD9\u4E9B\u6A21\u5757\n \u7528\u4E8E\u66FF\u6362\u8FD0\u884C\u65F6\u6620\u50CF\u4E2D\u7684\u53EF\u5347\u7EA7\u6A21\u5757\n -m <\u6A21\u5757>[/<\u4E3B\u7C7B>]\n --module <\u6A21\u5757\u540D\u79F0>[/<\u4E3B\u7C7B>]\n \u8981\u89E3\u6790\u7684\u521D\u59CB\u6A21\u5757, \u4EE5\u53CA\u5728\u672A\u7531\u6A21\u5757\u6307\u5B9A\u65F6\n \u8981\u6267\u884C\u7684\u4E3B\u7C7B\u540D\u79F0\n --add-modules <\u6A21\u5757\u540D\u79F0>[,<\u6A21\u5757\u540D\u79F0>...]\n \u9664\u4E86\u521D\u59CB\u6A21\u5757\u4E4B\u5916\u8981\u89E3\u6790\u7684\u6839\u6A21\u5757\u3002\n <\u6A21\u5757\u540D\u79F0> \u8FD8\u53EF\u4EE5\u4E3A ALL-DEFAULT, ALL-SYSTEM,\n ALL-MODULE-PATH\u3002\n --limit-modules <\u6A21\u5757\u540D\u79F0>[,<\u6A21\u5757\u540D\u79F0>...]\n \u9650\u5236\u53EF\u89C2\u5BDF\u6A21\u5757\u7684\u9886\u57DF\n --list-modules [<\u6A21\u5757\u540D\u79F0>[,<\u6A21\u5757\u540D\u79F0>...]]\n \u5217\u51FA\u53EF\u89C2\u5BDF\u6A21\u5757\u5E76\u9000\u51FA\n --dry-run \u521B\u5EFA VM \u4F46\u4E0D\u6267\u884C main \u65B9\u6CD5\u3002\n \u6B64 --dry-run \u9009\u9879\u5BF9\u4E8E\u9A8C\u8BC1\u8BF8\u5982\n \u6A21\u5757\u7CFB\u7EDF\u914D\u7F6E\u8FD9\u6837\u7684\u547D\u4EE4\u884C\u9009\u9879\u53EF\u80FD\u662F\u975E\u5E38\u6709\u7528\u7684\u3002\n -D<\u540D\u79F0>=<\u503C>\n \u8BBE\u7F6E\u7CFB\u7EDF\u5C5E\u6027\n -verbose:[class|gc|jni]\n \u542F\u7528\u8BE6\u7EC6\u8F93\u51FA\n -version \u5C06\u4EA7\u54C1\u7248\u672C\u8F93\u51FA\u5230\u9519\u8BEF\u6D41\u5E76\u9000\u51FA\n --version \u5C06\u4EA7\u54C1\u7248\u672C\u8F93\u51FA\u5230\u8F93\u51FA\u6D41\u5E76\u9000\u51FA\n -showversion \u5C06\u4EA7\u54C1\u7248\u672C\u8F93\u51FA\u5230\u9519\u8BEF\u6D41\u5E76\u7EE7\u7EED\n --show-version\n \u5C06\u4EA7\u54C1\u7248\u672C\u8F93\u51FA\u5230\u8F93\u51FA\u6D41\u5E76\u7EE7\u7EED\n -? -h -help\n \u5C06\u6B64\u5E2E\u52A9\u6D88\u606F\u8F93\u51FA\u5230\u9519\u8BEF\u6D41\n --help \u5C06\u6B64\u5E2E\u52A9\u6D88\u606F\u8F93\u51FA\u5230\u8F93\u51FA\u6D41\n -X \u5C06\u989D\u5916\u9009\u9879\u7684\u5E2E\u52A9\u8F93\u51FA\u5230\u9519\u8BEF\u6D41\n --help-extra \u5C06\u989D\u5916\u9009\u9879\u7684\u5E2E\u52A9\u8F93\u51FA\u5230\u8F93\u51FA\u6D41\n -ea[:<\u7A0B\u5E8F\u5305\u540D\u79F0>...|:<\u7C7B\u540D>]\n -enableassertions[:<\u7A0B\u5E8F\u5305\u540D\u79F0>...|:<\u7C7B\u540D>]\n \u6309\u6307\u5B9A\u7684\u7C92\u5EA6\u542F\u7528\u65AD\u8A00\n -da[:<\u7A0B\u5E8F\u5305\u540D\u79F0>...|:<\u7C7B\u540D>]\n -disableassertions[:<\u7A0B\u5E8F\u5305\u540D\u79F0>...|:<\u7C7B\u540D>]\n \u6309\u6307\u5B9A\u7684\u7C92\u5EA6\u7981\u7528\u65AD\u8A00\n -esa | -enablesystemassertions\n \u542F\u7528\u7CFB\u7EDF\u65AD\u8A00\n -dsa | \
--disablesystemassertions\n \u7981\u7528\u7CFB\u7EDF\u65AD\u8A00\n -agentlib:<\u5E93\u540D>[=<\u9009\u9879>]\n \u52A0\u8F7D\u672C\u673A\u4EE3\u7406\u5E93 <\u5E93\u540D>, \u4F8B\u5982 -agentlib:jdwp\n \u53E6\u8BF7\u53C2\u9605 -agentlib:jdwp=help\n -agentpath:<\u8DEF\u5F84\u540D>[=<\u9009\u9879>]\n \u6309\u5B8C\u6574\u8DEF\u5F84\u540D\u52A0\u8F7D\u672C\u673A\u4EE3\u7406\u5E93\n -javaagent:<jar \u8DEF\u5F84>[=<\u9009\u9879>]\n \u52A0\u8F7D Java \u7F16\u7A0B\u8BED\u8A00\u4EE3\u7406, \u8BF7\u53C2\u9605 java.lang.instrument\n -splash:<\u56FE\u50CF\u8DEF\u5F84>\n \u4F7F\u7528\u6307\u5B9A\u7684\u56FE\u50CF\u663E\u793A\u542F\u52A8\u5C4F\u5E55\n \u81EA\u52A8\u652F\u6301\u548C\u4F7F\u7528 HiDPI \u7F29\u653E\u56FE\u50CF\n (\u5982\u679C\u53EF\u7528)\u3002\u672A\u7F29\u653E\u7684\u56FE\u50CF\u6587\u4EF6\u540D (\u4F8B\u5982, image.ext)\n \u5E94\u59CB\u7EC8\u4F5C\u4E3A\u53C2\u6570\u4F20\u9012\u7ED9 -splash \u9009\u9879\u3002\n \u5C06\u81EA\u52A8\u9009\u53D6\u63D0\u4F9B\u7684\u6700\u9002\u5F53\u7684\u7F29\u653E\n \u56FE\u50CF\u3002\n \u6709\u5173\u8BE6\u7EC6\u4FE1\u606F, \u8BF7\u53C2\u9605 SplashScreen API \u6587\u6863\u3002\n @<\u6587\u4EF6\u8DEF\u5F84> \u4ECE\u6307\u5B9A\u6587\u4EF6\u4E2D\u8BFB\u53D6\u9009\u9879\n\n\u8981\u4E3A\u957F\u9009\u9879\u6307\u5B9A\u53C2\u6570, \u53EF\u4EE5\u4F7F\u7528 --<\u540D\u79F0>=<\u503C> \u6216\n--<\u540D\u79F0> <\u503C>\u3002\n
+java.launcher.opt.footer = \ -cp <\u76EE\u5F55\u548C zip/jar \u6587\u4EF6\u7684\u7C7B\u641C\u7D22\u8DEF\u5F84>\n -classpath <\u76EE\u5F55\u548C zip/jar \u6587\u4EF6\u7684\u7C7B\u641C\u7D22\u8DEF\u5F84>\n --class-path <\u76EE\u5F55\u548C zip/jar \u6587\u4EF6\u7684\u7C7B\u641C\u7D22\u8DEF\u5F84>\n \u4F7F\u7528 {0} \u5206\u9694\u7684, \u7528\u4E8E\u641C\u7D22\u7C7B\u6587\u4EF6\u7684\u76EE\u5F55, JAR \u6863\u6848\n \u548C ZIP \u6863\u6848\u5217\u8868\u3002\n -p <\u6A21\u5757\u8DEF\u5F84>\n --module-path <\u6A21\u5757\u8DEF\u5F84>...\n \u7528 {0} \u5206\u9694\u7684\u76EE\u5F55\u5217\u8868, \u6BCF\u4E2A\u76EE\u5F55\n \u90FD\u662F\u4E00\u4E2A\u5305\u542B\u6A21\u5757\u7684\u76EE\u5F55\u3002\n --upgrade-module-path <\u6A21\u5757\u8DEF\u5F84>...\n \u7528 {0} \u5206\u9694\u7684\u76EE\u5F55\u5217\u8868, \u6BCF\u4E2A\u76EE\u5F55\n \u90FD\u662F\u4E00\u4E2A\u5305\u542B\u6A21\u5757\u7684\u76EE\u5F55, \u8FD9\u4E9B\u6A21\u5757\n \u7528\u4E8E\u66FF\u6362\u8FD0\u884C\u65F6\u6620\u50CF\u4E2D\u7684\u53EF\u5347\u7EA7\u6A21\u5757\n --add-modules <\u6A21\u5757\u540D\u79F0>[,<\u6A21\u5757\u540D\u79F0>...]\n \u9664\u4E86\u521D\u59CB\u6A21\u5757\u4E4B\u5916\u8981\u89E3\u6790\u7684\u6839\u6A21\u5757\u3002\n <\u6A21\u5757\u540D\u79F0> \u8FD8\u53EF\u4EE5\u4E3A ALL-DEFAULT, ALL-SYSTEM,\n ALL-MODULE-PATH.\n --list-modules\n \u5217\u51FA\u53EF\u89C2\u5BDF\u6A21\u5757\u5E76\u9000\u51FA\n --d <\u6A21\u5757\u540D\u79F0>\n --describe-module <\u6A21\u5757\u540D\u79F0>\n \u63CF\u8FF0\u6A21\u5757\u5E76\u9000\u51FA\n --dry-run \u521B\u5EFA VM \u5E76\u52A0\u8F7D\u4E3B\u7C7B, \u4F46\u4E0D\u6267\u884C main \u65B9\u6CD5\u3002\n \u6B64 --dry-run \u9009\u9879\u5BF9\u4E8E\u9A8C\u8BC1\u8BF8\u5982\n \u6A21\u5757\u7CFB\u7EDF\u914D\u7F6E\u8FD9\u6837\u7684\u547D\u4EE4\u884C\u9009\u9879\u53EF\u80FD\u975E\u5E38\u6709\u7528\u3002\n --validate-modules\n \u9A8C\u8BC1\u6240\u6709\u6A21\u5757\u5E76\u9000\u51FA\n --validate-modules \u9009\u9879\u5BF9\u4E8E\u67E5\u627E\n \u6A21\u5757\u8DEF\u5F84\u4E2D\u6A21\u5757\u7684\u51B2\u7A81\u53CA\u5176\u4ED6\u9519\u8BEF\u53EF\u80FD\u975E\u5E38\u6709\u7528\u3002\n -D<\u540D\u79F0>=<\u503C>\n \u8BBE\u7F6E\u7CFB\u7EDF\u5C5E\u6027\n -verbose:[class|module|gc|jni]\n \u542F\u7528\u8BE6\u7EC6\u8F93\u51FA\n -version \u5C06\u4EA7\u54C1\u7248\u672C\u8F93\u51FA\u5230\u9519\u8BEF\u6D41\u5E76\u9000\u51FA\n --version \u5C06\u4EA7\u54C1\u7248\u672C\u8F93\u51FA\u5230\u8F93\u51FA\u6D41\u5E76\u9000\u51FA\n -showversion \u5C06\u4EA7\u54C1\u7248\u672C\u8F93\u51FA\u5230\u9519\u8BEF\u6D41\u5E76\u7EE7\u7EED\n --show-version\n \u5C06\u4EA7\u54C1\u7248\u672C\u8F93\u51FA\u5230\u8F93\u51FA\u6D41\u5E76\u7EE7\u7EED\n --show-module-resolution\n \u5728\u542F\u52A8\u8FC7\u7A0B\u4E2D\u663E\u793A\u6A21\u5757\u89E3\u6790\u8F93\u51FA\n -? -h -help\n \u5C06\u6B64\u5E2E\u52A9\u6D88\u606F\u8F93\u51FA\u5230\u9519\u8BEF\u6D41\n --help \u5C06\u6B64\u5E2E\u52A9\u6D88\u606F\u8F93\u51FA\u5230\u8F93\u51FA\u6D41\n -X \u5C06\u989D\u5916\u9009\u9879\u7684\u5E2E\u52A9\u8F93\u51FA\u5230\u9519\u8BEF\u6D41\n --help-extra \u5C06\u989D\u5916\u9009\u9879\u7684\u5E2E\u52A9\u8F93\u51FA\u5230\u8F93\u51FA\u6D41\n -ea[:<\u7A0B\u5E8F\u5305\u540D\u79F0>...|:<\u7C7B\u540D>]\n -enableassertions[:<\u7A0B\u5E8F\u5305\u540D\u79F0>...|:<\u7C7B\u540D>]\n \u6309\u6307\u5B9A\u7684\u7C92\u5EA6\u542F\u7528\u65AD\u8A00\n -da[:<\u7A0B\u5E8F\u5305\u540D\u79F0>...|:<\u7C7B\u540D>]\n -disableassertions[:<\u7A0B\u5E8F\u5305\u540D\u79F0>...|:<\u7C7B\u540D>]\n \
+\u6309\u6307\u5B9A\u7684\u7C92\u5EA6\u7981\u7528\u65AD\u8A00\n -esa | -enablesystemassertions\n \u542F\u7528\u7CFB\u7EDF\u65AD\u8A00\n -dsa | -disablesystemassertions\n \u7981\u7528\u7CFB\u7EDF\u65AD\u8A00\n -agentlib:<\u5E93\u540D>[=<\u9009\u9879>]\n \u52A0\u8F7D\u672C\u673A\u4EE3\u7406\u5E93 <\u5E93\u540D>, \u4F8B\u5982 -agentlib:jdwp\n \u53E6\u8BF7\u53C2\u9605 -agentlib:jdwp=help\n -agentpath:<\u8DEF\u5F84\u540D>[=<\u9009\u9879>]\n \u6309\u5B8C\u6574\u8DEF\u5F84\u540D\u52A0\u8F7D\u672C\u673A\u4EE3\u7406\u5E93\n -javaagent:<jar \u8DEF\u5F84>[=<\u9009\u9879>]\n \u52A0\u8F7D Java \u7F16\u7A0B\u8BED\u8A00\u4EE3\u7406, \u8BF7\u53C2\u9605 java.lang.instrument\n -splash:<\u56FE\u50CF\u8DEF\u5F84>\n \u4F7F\u7528\u6307\u5B9A\u7684\u56FE\u50CF\u663E\u793A\u542F\u52A8\u5C4F\u5E55\n \u81EA\u52A8\u652F\u6301\u548C\u4F7F\u7528 HiDPI \u7F29\u653E\u56FE\u50CF\n (\u5982\u679C\u53EF\u7528)\u3002\u5E94\u59CB\u7EC8\u5C06\u672A\u7F29\u653E\u7684\u56FE\u50CF\u6587\u4EF6\u540D (\u4F8B\u5982, image.ext)\n \u4F5C\u4E3A\u53C2\u6570\u4F20\u9012\u7ED9 -splash \u9009\u9879\u3002\n \u5C06\u81EA\u52A8\u9009\u53D6\u63D0\u4F9B\u7684\u6700\u5408\u9002\u7684\u7F29\u653E\n \u56FE\u50CF\u3002\n \u6709\u5173\u8BE6\u7EC6\u4FE1\u606F, \u8BF7\u53C2\u9605 SplashScreen API \u6587\u6863\n @argument \u6587\u4EF6\n \u4E00\u4E2A\u6216\u591A\u4E2A\u5305\u542B\u9009\u9879\u7684\u53C2\u6570\u6587\u4EF6\n -disable-@files\n \u963B\u6B62\u8FDB\u4E00\u6B65\u6269\u5C55\u53C2\u6570\u6587\u4EF6\n\u8981\u4E3A\u957F\u9009\u9879\u6307\u5B9A\u53C2\u6570, \u53EF\u4EE5\u4F7F\u7528 --<\u540D\u79F0>=<\u503C> \u6216\n--<\u540D\u79F0> <\u503C>\u3002\n
# Translators please note do not translate the options themselves
-java.launcher.X.usage=\n -Xbatch \u7981\u7528\u540E\u53F0\u7F16\u8BD1\n -Xbootclasspath/a:<\u7528 {0} \u5206\u9694\u7684\u76EE\u5F55\u548C zip/jar \u6587\u4EF6>\n \u9644\u52A0\u5728\u5F15\u5BFC\u7C7B\u8DEF\u5F84\u672B\u5C3E\n -Xcheck:jni \u5BF9 JNI \u51FD\u6570\u6267\u884C\u5176\u4ED6\u68C0\u67E5\n -Xcomp \u5728\u9996\u6B21\u8C03\u7528\u65F6\u5F3A\u5236\u7F16\u8BD1\u65B9\u6CD5\n -Xdebug \u4E3A\u5B9E\u73B0\u5411\u540E\u517C\u5BB9\u800C\u63D0\u4F9B\n -Xdiag \u663E\u793A\u9644\u52A0\u8BCA\u65AD\u6D88\u606F\n -Xdiag:resolver \u663E\u793A\u89E3\u6790\u5668\u8BCA\u65AD\u6D88\u606F\n -Xfuture \u542F\u7528\u6700\u4E25\u683C\u7684\u68C0\u67E5, \u9884\u671F\u5C06\u6765\u7684\u9ED8\u8BA4\u503C\n -Xint \u4EC5\u89E3\u91CA\u6A21\u5F0F\u6267\u884C\n -Xinternalversion\n \u663E\u793A\u6BD4 -version \u9009\u9879\u66F4\u8BE6\u7EC6\u7684 JVM\n \u7248\u672C\u4FE1\u606F\n -Xloggc:<\u6587\u4EF6> \u5C06 GC \u72B6\u6001\u8BB0\u5F55\u5728\u6587\u4EF6\u4E2D (\u5E26\u65F6\u95F4\u6233)\n -Xmixed \u6DF7\u5408\u6A21\u5F0F\u6267\u884C (\u9ED8\u8BA4\u503C)\n -Xmn<\u5927\u5C0F> \u4E3A\u5E74\u8F7B\u4EE3 (\u65B0\u751F\u4EE3) \u8BBE\u7F6E\u521D\u59CB\u548C\u6700\u5927\u5806\u5927\u5C0F\n (\u4EE5\u5B57\u8282\u4E3A\u5355\u4F4D)\n -Xms<\u5927\u5C0F> \u8BBE\u7F6E\u521D\u59CB Java \u5806\u5927\u5C0F\n -Xmx<\u5927\u5C0F> \u8BBE\u7F6E\u6700\u5927 Java \u5806\u5927\u5C0F\n -Xnoclassgc \u7981\u7528\u7C7B\u5783\u573E\u6536\u96C6\n -Xprof \u8F93\u51FA cpu \u5206\u6790\u6570\u636E\n -Xrs \u51CF\u5C11 Java/VM \u5BF9\u64CD\u4F5C\u7CFB\u7EDF\u4FE1\u53F7\u7684\u4F7F\u7528 (\u8BF7\u53C2\u9605\u6587\u6863)\n -Xshare:auto \u5728\u53EF\u80FD\u7684\u60C5\u51B5\u4E0B\u4F7F\u7528\u5171\u4EAB\u7C7B\u6570\u636E (\u9ED8\u8BA4\u503C)\n -Xshare:off \u4E0D\u5C1D\u8BD5\u4F7F\u7528\u5171\u4EAB\u7C7B\u6570\u636E\n -Xshare:on \u8981\u6C42\u4F7F\u7528\u5171\u4EAB\u7C7B\u6570\u636E, \u5426\u5219\u5C06\u5931\u8D25\u3002\n -XshowSettings \u663E\u793A\u6240\u6709\u8BBE\u7F6E\u5E76\u7EE7\u7EED\n -XshowSettings:all\n \u663E\u793A\u6240\u6709\u8BBE\u7F6E\u5E76\u7EE7\u7EED\n -XshowSettings:locale\n \u663E\u793A\u6240\u6709\u4E0E\u533A\u57DF\u8BBE\u7F6E\u76F8\u5173\u7684\u8BBE\u7F6E\u5E76\u7EE7\u7EEDe\n -XshowSettings:properties\n \u663E\u793A\u6240\u6709\u5C5E\u6027\u8BBE\u7F6E\u5E76\u7EE7\u7EED\n -XshowSettings:vm \u663E\u793A\u6240\u6709\u4E0E vm \u76F8\u5173\u7684\u8BBE\u7F6E\u5E76\u7EE7\u7EED\n -Xss<\u5927\u5C0F> \u8BBE\u7F6E Java \u7EBF\u7A0B\u5806\u6808\u5927\u5C0F\n -Xverify \u8BBE\u7F6E\u5B57\u8282\u7801\u9A8C\u8BC1\u5668\u7684\u6A21\u5F0F\n --add-reads <\u6A21\u5757>=<\u76EE\u6807\u6A21\u5757>(,<\u76EE\u6807\u6A21\u5757>)*\n \u66F4\u65B0 <\u6A21\u5757> \u4EE5\u8BFB\u53D6 <\u76EE\u6807\u6A21\u5757>,\n \u800C\u65E0\u8BBA\u6A21\u5757\u58F0\u660E\u5982\u4F55\u3002\n <\u76EE\u6807\u6A21\u5757> \u53EF\u4EE5\u662F ALL-UNNAMED \u4EE5\u8BFB\u53D6\u6240\u6709\u672A\u547D\u540D\n \u6A21\u5757\u3002\n --add-exports <\u6A21\u5757>/<\u7A0B\u5E8F\u5305>=<\u76EE\u6807\u6A21\u5757>(,<\u76EE\u6807\u6A21\u5757>)*\n \u66F4\u65B0 <\u6A21\u5757> \u4EE5\u5C06 <\u7A0B\u5E8F\u5305> \u5BFC\u51FA\u5230 <\u76EE\u6807\u6A21\u5757>,\n \u800C\u65E0\u8BBA\u6A21\u5757\u58F0\u660E\u5982\u4F55\u3002\n <\u76EE\u6807\u6A21\u5757> \u53EF\u4EE5\u662F ALL-UNNAMED \u4EE5\u5BFC\u51FA\u6240\u6709\n \u672A\u547D\u540D\u6A21\u5757\u3002\n --add-opens \
-<\u6A21\u5757>/<\u7A0B\u5E8F\u5305>=<\u76EE\u6807\u6A21\u5757>(,<\u76EE\u6807\u6A21\u5757>)*\n \u66F4\u65B0 <\u6A21\u5757> \u4EE5\u5728 <\u76EE\u6807\u6A21\u5757> \u4E2D\n \u6253\u5F00 <\u7A0B\u5E8F\u5305>, \u800C\u65E0\u8BBA\u6A21\u5757\u58F0\u660E\u5982\u4F55\u3002\n --disable-@files \u7981\u6B62\u8FDB\u4E00\u6B65\u6269\u5C55\u53C2\u6570\u6587\u4EF6\n --patch-module <\u6A21\u5757>=<\u6587\u4EF6>({0}<\u6587\u4EF6>)*\n \u4F7F\u7528 JAR \u6587\u4EF6\u6216\u76EE\u5F55\u4E2D\u7684\u7C7B\u548C\u8D44\u6E90\n \u8986\u76D6\u6216\u589E\u5F3A\u6A21\u5757\u3002\n\n\u8FD9\u4E9B\u989D\u5916\u9009\u9879\u5982\u6709\u66F4\u6539, \u6055\u4E0D\u53E6\u884C\u901A\u77E5\u3002\n
+java.launcher.X.usage=\n -Xbatch \u7981\u7528\u540E\u53F0\u7F16\u8BD1\n -Xbootclasspath/a:<\u7528 {0} \u5206\u9694\u7684\u76EE\u5F55\u548C zip/jar \u6587\u4EF6>\n \u9644\u52A0\u5728\u5F15\u5BFC\u7C7B\u8DEF\u5F84\u672B\u5C3E\n -Xcheck:jni \u5BF9 JNI \u51FD\u6570\u6267\u884C\u5176\u4ED6\u68C0\u67E5\n -Xcomp \u5728\u9996\u6B21\u8C03\u7528\u65F6\u5F3A\u5236\u4F7F\u7528\u7684\u7F16\u8BD1\u65B9\u6CD5\n -Xdebug \u4E3A\u5B9E\u73B0\u5411\u540E\u517C\u5BB9\u800C\u63D0\u4F9B\n -Xdiag \u663E\u793A\u9644\u52A0\u8BCA\u65AD\u6D88\u606F\n -Xfuture \u542F\u7528\u6700\u4E25\u683C\u7684\u68C0\u67E5, \u9884\u671F\u5C06\u6765\u7684\u9ED8\u8BA4\u503C\n -Xint \u4EC5\u89E3\u91CA\u6A21\u5F0F\u6267\u884C\n -Xinternalversion\n \u663E\u793A\u6BD4 -version \u9009\u9879\u66F4\u8BE6\u7EC6\u7684 JVM\n \u7248\u672C\u4FE1\u606F\n -Xloggc:<\u6587\u4EF6> \u5C06 GC \u72B6\u6001\u8BB0\u5F55\u5728\u6587\u4EF6\u4E2D (\u5E26\u65F6\u95F4\u6233)\n -Xmixed \u6DF7\u5408\u6A21\u5F0F\u6267\u884C (\u9ED8\u8BA4\u503C)\n -Xmn<\u5927\u5C0F> \u4E3A\u5E74\u8F7B\u4EE3 (\u65B0\u751F\u4EE3) \u8BBE\u7F6E\u521D\u59CB\u548C\u6700\u5927\u5806\u5927\u5C0F\n (\u4EE5\u5B57\u8282\u4E3A\u5355\u4F4D)\n -Xms<\u5927\u5C0F> \u8BBE\u7F6E\u521D\u59CB Java \u5806\u5927\u5C0F\n -Xmx<\u5927\u5C0F> \u8BBE\u7F6E\u6700\u5927 Java \u5806\u5927\u5C0F\n -Xnoclassgc \u7981\u7528\u7C7B\u5783\u573E\u6536\u96C6\n -Xprof \u8F93\u51FA cpu \u5206\u6790\u6570\u636E (\u5DF2\u8FC7\u65F6)\n -Xrs \u51CF\u5C11 Java/VM \u5BF9\u64CD\u4F5C\u7CFB\u7EDF\u4FE1\u53F7\u7684\u4F7F\u7528 (\u8BF7\u53C2\u9605\u6587\u6863)\n -Xshare:auto \u5728\u53EF\u80FD\u7684\u60C5\u51B5\u4E0B\u4F7F\u7528\u5171\u4EAB\u7C7B\u6570\u636E (\u9ED8\u8BA4\u503C)\n -Xshare:off \u4E0D\u5C1D\u8BD5\u4F7F\u7528\u5171\u4EAB\u7C7B\u6570\u636E\n -Xshare:on \u8981\u6C42\u4F7F\u7528\u5171\u4EAB\u7C7B\u6570\u636E, \u5426\u5219\u5C06\u5931\u8D25\u3002\n -XshowSettings \u663E\u793A\u6240\u6709\u8BBE\u7F6E\u5E76\u7EE7\u7EED\n -XshowSettings:all\n \u663E\u793A\u6240\u6709\u8BBE\u7F6E\u5E76\u7EE7\u7EED\n -XshowSettings:locale\n \u663E\u793A\u6240\u6709\u4E0E\u533A\u57DF\u8BBE\u7F6E\u76F8\u5173\u7684\u8BBE\u7F6E\u5E76\u7EE7\u7EEDe\n -XshowSettings:properties\n \u663E\u793A\u6240\u6709\u5C5E\u6027\u8BBE\u7F6E\u5E76\u7EE7\u7EED\n -XshowSettings:vm \u663E\u793A\u6240\u6709\u4E0E vm \u76F8\u5173\u7684\u8BBE\u7F6E\u5E76\u7EE7\u7EED\n -Xss<\u5927\u5C0F> \u8BBE\u7F6E Java \u7EBF\u7A0B\u5806\u6808\u5927\u5C0F\n -Xverify \u8BBE\u7F6E\u5B57\u8282\u7801\u9A8C\u8BC1\u5668\u7684\u6A21\u5F0F\n --add-reads <\u6A21\u5757>=<\u76EE\u6807\u6A21\u5757>(,<\u76EE\u6807\u6A21\u5757>)*\n \u66F4\u65B0 <\u6A21\u5757> \u4EE5\u8BFB\u53D6 <\u76EE\u6807\u6A21\u5757>,\n \u800C\u65E0\u8BBA\u6A21\u5757\u58F0\u660E\u5982\u4F55\u3002\n <\u76EE\u6807\u6A21\u5757> \u53EF\u4EE5\u662F ALL-UNNAMED \u4EE5\u8BFB\u53D6\u6240\u6709\u672A\u547D\u540D\n \u6A21\u5757\u3002\n --add-exports <\u6A21\u5757>/<\u7A0B\u5E8F\u5305>=<\u76EE\u6807\u6A21\u5757>(,<\u76EE\u6807\u6A21\u5757>)*\n \u66F4\u65B0 <\u6A21\u5757> \u4EE5\u5C06 <\u7A0B\u5E8F\u5305> \u5BFC\u51FA\u5230 <\u76EE\u6807\u6A21\u5757>,\n \u800C\u65E0\u8BBA\u6A21\u5757\u58F0\u660E\u5982\u4F55\u3002\n <\u76EE\u6807\u6A21\u5757> \u53EF\u4EE5\u662F ALL-UNNAMED \u4EE5\u5BFC\u51FA\u5230\u6240\u6709\n \u672A\u547D\u540D\u6A21\u5757\u3002\n --add-opens <\u6A21\u5757>/<\u7A0B\u5E8F\u5305>=<\u76EE\u6807\u6A21\u5757>(,<\u76EE\u6807\u6A21\u5757>)*\n \u66F4\u65B0 <\u6A21\u5757> \
+\u4EE5\u5728 <\u76EE\u6807\u6A21\u5757> \u4E2D\n \u6253\u5F00 <\u7A0B\u5E8F\u5305>, \u800C\u65E0\u8BBA\u6A21\u5757\u58F0\u660E\u5982\u4F55\u3002\n --permit-illegal-access\n \u5141\u8BB8\u901A\u8FC7\u672A\u547D\u540D\u6A21\u5757\u4E2D\u7684\u4EE3\u7801\u5BF9\u547D\u540D\u6A21\u5757\u4E2D\u7684\n \u7C7B\u578B\u6210\u5458\u8FDB\u884C\u975E\u6CD5\u8BBF\u95EE\u3002\u5C06\u5728\u4E0B\u4E00\u4E2A\u53D1\u884C\u7248\u4E2D\n \u5220\u9664\u6B64\u517C\u5BB9\u6027\u9009\u9879\u3002\n --limit-modules <\u6A21\u5757\u540D\u79F0>[,<\u6A21\u5757\u540D\u79F0>...]\n \u9650\u5236\u53EF\u89C2\u5BDF\u6A21\u5757\u7684\u9886\u57DF\n --patch-module <\u6A21\u5757>=<\u6587\u4EF6>({0}<\u6587\u4EF6>)*\n \u4F7F\u7528 JAR \u6587\u4EF6\u6216\u76EE\u5F55\u4E2D\u7684\u7C7B\u548C\u8D44\u6E90\n \u8986\u76D6\u6216\u589E\u5F3A\u6A21\u5757\u3002\n --disable-@files \u7981\u6B62\u8FDB\u4E00\u6B65\u6269\u5C55\u53C2\u6570\u6587\u4EF6\n\n\u8FD9\u4E9B\u989D\u5916\u9009\u9879\u5982\u6709\u66F4\u6539, \u6055\u4E0D\u53E6\u884C\u901A\u77E5\u3002\n
# Translators please note do not translate the options themselves
java.launcher.X.macosx.usage=\n\u4EE5\u4E0B\u9009\u9879\u4E3A Mac OS X \u7279\u5B9A\u7684\u9009\u9879:\n -XstartOnFirstThread\n \u5728\u7B2C\u4E00\u4E2A (AppKit) \u7EBF\u7A0B\u4E0A\u8FD0\u884C main() \u65B9\u6CD5\n -Xdock:name=<\u5E94\u7528\u7A0B\u5E8F\u540D\u79F0>\n \u8986\u76D6\u505C\u9760\u680F\u4E2D\u663E\u793A\u7684\u9ED8\u8BA4\u5E94\u7528\u7A0B\u5E8F\u540D\u79F0\n -Xdock:icon=<\u56FE\u6807\u6587\u4EF6\u7684\u8DEF\u5F84>\n \u8986\u76D6\u505C\u9760\u680F\u4E2D\u663E\u793A\u7684\u9ED8\u8BA4\u56FE\u6807\n\n
-java.launcher.cls.error1=\u9519\u8BEF: \u627E\u4E0D\u5230\u6216\u65E0\u6CD5\u52A0\u8F7D\u4E3B\u7C7B {0}
+java.launcher.cls.error1=\u9519\u8BEF: \u627E\u4E0D\u5230\u6216\u65E0\u6CD5\u52A0\u8F7D\u4E3B\u7C7B {0}\n\u539F\u56E0: {1}: {2}
java.launcher.cls.error2=\u9519\u8BEF: main \u65B9\u6CD5\u4E0D\u662F\u7C7B {1} \u4E2D\u7684{0}, \u8BF7\u5C06 main \u65B9\u6CD5\u5B9A\u4E49\u4E3A:\n public static void main(String[] args)
java.launcher.cls.error3=\u9519\u8BEF: main \u65B9\u6CD5\u5FC5\u987B\u8FD4\u56DE\u7C7B {0} \u4E2D\u7684\u7A7A\u7C7B\u578B\u503C, \u8BF7\n\u5C06 main \u65B9\u6CD5\u5B9A\u4E49\u4E3A:\n public static void main(String[] args)
java.launcher.cls.error4=\u9519\u8BEF: \u5728\u7C7B {0} \u4E2D\u627E\u4E0D\u5230 main \u65B9\u6CD5, \u8BF7\u5C06 main \u65B9\u6CD5\u5B9A\u4E49\u4E3A:\n public static void main(String[] args)\n\u5426\u5219 JavaFX \u5E94\u7528\u7A0B\u5E8F\u7C7B\u5FC5\u987B\u6269\u5C55{1}
java.launcher.cls.error5=\u9519\u8BEF: \u7F3A\u5C11 JavaFX \u8FD0\u884C\u65F6\u7EC4\u4EF6, \u9700\u8981\u4F7F\u7528\u8BE5\u7EC4\u4EF6\u6765\u8FD0\u884C\u6B64\u5E94\u7528\u7A0B\u5E8F
+java.launcher.cls.error6=\u9519\u8BEF: \u52A0\u8F7D\u4E3B\u7C7B {0} \u65F6\u51FA\u73B0 LinkageError\n\t{1}
java.launcher.jar.error1=\u9519\u8BEF: \u5C1D\u8BD5\u6253\u5F00\u6587\u4EF6{0}\u65F6\u51FA\u73B0\u610F\u5916\u9519\u8BEF
java.launcher.jar.error2=\u5728{0}\u4E2D\u627E\u4E0D\u5230\u6E05\u5355
java.launcher.jar.error3={0}\u4E2D\u6CA1\u6709\u4E3B\u6E05\u5355\u5C5E\u6027
+java.launcher.jar.error4=\u5728 {0} \u4E2D\u52A0\u8F7D Java \u4EE3\u7406\u65F6\u51FA\u9519
java.launcher.init.error=\u521D\u59CB\u5316\u9519\u8BEF
java.launcher.javafx.error1=\u9519\u8BEF: JavaFX launchApplication \u65B9\u6CD5\u5177\u6709\u9519\u8BEF\u7684\u7B7E\u540D, \u5FC5\u987B\n\u5C06\u65B9\u6CD5\u58F0\u660E\u4E3A\u9759\u6001\u65B9\u6CD5\u5E76\u8FD4\u56DE\u7A7A\u7C7B\u578B\u7684\u503C
java.launcher.module.error1=\u6A21\u5757 {0} \u4E0D\u5177\u6709 MainClass \u5C5E\u6027, \u8BF7\u4F7F\u7528 -m <module>/<main-class>
java.launcher.module.error2=\u9519\u8BEF: \u5728\u6A21\u5757 {1} \u4E2D\u627E\u4E0D\u5230\u6216\u65E0\u6CD5\u52A0\u8F7D\u4E3B\u7C7B {0}
+java.launcher.module.error3=\u9519\u8BEF: \u65E0\u6CD5\u4ECE\u6A21\u5757 {1} \u52A0\u8F7D\u4E3B\u7C7B {0}\n\t{2}
+java.launcher.module.error4=\u627E\u4E0D\u5230{0}
--- a/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_zh_TW.properties Sat Jun 03 02:44:55 2017 +0000
+++ b/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_zh_TW.properties Sat Jun 03 03:48:03 2017 +0000
@@ -24,32 +24,36 @@
#
# Translators please note do not translate the options themselves
-java.launcher.opt.header = \u7528\u6CD5: {0} [options] class [args...]\n (\u7528\u65BC\u57F7\u884C\u985E\u5225)\n \u6216 {0} [options] -jar jarfile [args...]\n (\u7528\u65BC\u57F7\u884C jar \u6A94\u6848)\n \u6216 {0} [options] -p <modulepath> -m <modulename>[/<mainclass>] [args...]\n (\u7528\u65BC\u57F7\u884C\u6A21\u7D44\u4E2D\u7684\u4E3B\u8981\u985E\u5225)\n\u5176\u4E2D\u7684\u9078\u9805\u5305\u62EC:\n\n
+java.launcher.opt.header = \u7528\u6CD5: {0} [options] <mainclass> [args...]\n (\u7528\u65BC\u57F7\u884C\u985E\u5225)\n \u6216\u8005 {0} [options] -jar <jarfile> [args...]\n (\u7528\u65BC\u57F7\u884C jar \u6A94\u6848)\n \u6216\u8005 {0} [options] -m <module>[/<mainclass>] [args...]\n {0} [options] --module <module>[/<mainclass>] [args...]\n (\u7528\u65BC\u57F7\u884C\u6A21\u7D44\u4E2D\u7684\u4E3B\u8981\u985E\u5225)\n\n \u4E3B\u8981\u985E\u5225\u3001-jar <jarfile>\u3001-m \u6216 --module <module>/<mainclass>\n \u4E4B\u5F8C\u7684\u5F15\u6578\u6703\u7576\u6210\u5F15\u6578\u50B3\u9001\u81F3\u4E3B\u8981\u985E\u5225\u3002\n\n \u5176\u4E2D\u9078\u9805\u5305\u62EC:\n\n
java.launcher.opt.datamodel =\ -d{0}\t \u5DF2\u4E0D\u518D\u4F7F\u7528\uFF0C\u5C07\u65BC\u672A\u4F86\u7248\u672C\u4E2D\u79FB\u9664\n
java.launcher.opt.vmselect =\ {0}\t \u9078\u53D6 "{1}" VM\n
java.launcher.opt.hotspot =\ {0}\t \u662F "{1}" VM \u7684\u540C\u7FA9\u5B57 [\u5DF2\u4E0D\u518D\u4F7F\u7528]\n
# Translators please note do not translate the options themselves
-java.launcher.opt.footer =\ -cp <class search path of directories and zip/jar files>\n -classpath <class search path of directories and zip/jar files>\n --class-path <class search path of directories and zip/jar files>\n \u4EE5 {0} \u5340\u9694\u7684\u76EE\u9304\u3001JAR \u5B58\u6A94\u4EE5\u53CA\n ZIP \u5B58\u6A94\u6E05\u55AE\uFF0C\u5C07\u5728\u5176\u4E2D\u641C\u5C0B\u985E\u5225\u6A94\u6848\u3002\n -p <module path>\n --module-path <module path>...\n \u4EE5 {0} \u5340\u9694\u7684\u76EE\u9304\u6E05\u55AE\uFF0C\u6BCF\u500B\u76EE\u9304\n \u90FD\u662F\u4E00\u500B\u6A21\u7D44\u76EE\u9304\u3002\n --upgrade-module-path <module path>...\n \u4EE5 {0} \u5340\u9694\u7684\u76EE\u9304\u6E05\u55AE\uFF0C\u6BCF\u500B\u76EE\u9304\n \u90FD\u662F\u4E00\u500B\u6A21\u7D44\u76EE\u9304\uFF0C \u7576\u4E2D\u7684\u6A21\u7D44\u53EF\u53D6\u4EE3\n \u7A0B\u5F0F\u5BE6\u969B\u57F7\u884C\u5F71\u50CF\u4E2D\u7684\u53EF\u5347\u7D1A\u6A21\u7D44\n -m <module>[/<mainclass>]\n --module <modulename>[/<mainclass>]\n \u8981\u89E3\u6790\u7684\u8D77\u59CB\u6A21\u7D44\uFF0C\u4EE5\u53CA\u8981\u57F7\u884C\u4E4B\u4E3B\u8981\u985E\u5225\n \u7684\u540D\u7A31 (\u82E5\u6A21\u7D44\u672A\u6307\u5B9A\u7684\u8A71)\n --add-modules <modulename>[,<modulename>...]\n \u9664\u4E86\u8D77\u59CB\u6A21\u7D44\u5916\uFF0C\u8981\u89E3\u6790\u7684\u6839\u6A21\u7D44\u3002\n <modulename> \u4E5F\u53EF\u4EE5\u662F ALL-DEFAULT\u3001ALL-SYSTEM\u3001\n ALL-MODULE-PATH\u3002\n --limit-modules <modulename>[,<modulename>...]\n \u9650\u5236\u53EF\u76E3\u6E2C\u6A21\u7D44\u7684\u7BC4\u570D\n --list-modules [<modulename>[,<modulename>...]]\n \u5217\u51FA\u53EF\u76E3\u6E2C\u6A21\u7D44\u4E26\u7D50\u675F\n --dry-run \u5EFA\u7ACB VM \u4F46\u4E0D\u57F7\u884C\u4E3B\u8981\u65B9\u6CD5\u3002\n \u6B64 --dry-run \u9078\u9805\u5C0D\u65BC\u9A57\u8B49\u547D\u4EE4\u884C\u9078\u9805\n (\u4F8B\u5982\u6A21\u7D44\u7CFB\u7D71\u7D44\u614B) \u5F88\u6709\u7528\u3002\n -D<name>=<value>\n \u8A2D\u5B9A\u7CFB\u7D71\u5C6C\u6027\n -verbose:[class|gc|jni]\n \u555F\u7528\u8A73\u7D30\u8CC7\u8A0A\u8F38\u51FA\n -version \u5728\u932F\u8AA4\u4E32\u6D41\u5370\u51FA\u7522\u54C1\u7248\u672C\u4E26\u7D50\u675F\n --version \u5728\u8F38\u51FA\u4E32\u6D41\u5370\u51FA\u7522\u54C1\u7248\u672C\u4E26\u7D50\u675F\n -showversion \u5728\u932F\u8AA4\u4E32\u6D41\u5370\u51FA\u7522\u54C1\u7248\u672C\u4E26\u7E7C\u7E8C\n --show-version\n \u5728\u8F38\u51FA\u4E32\u6D41\u5370\u51FA\u7522\u54C1\u7248\u672C\u4E26\u7E7C\u7E8C\n -? -h -help\n \u5728\u932F\u8AA4\u4E32\u6D41\u5370\u51FA\u6B64\u8AAA\u660E\u8A0A\u606F\n --help \u5728\u8F38\u51FA\u4E32\u6D41\u5370\u51FA\u6B64\u8AAA\u660E\u8A0A\u606F\n -X \u5728\u932F\u8AA4\u4E32\u6D41\u5370\u51FA\u984D\u5916\u9078\u9805\u7684\u8AAA\u660E\n --help-extra \u5728\u8F38\u51FA\u4E32\u6D41\u5370\u51FA\u984D\u5916\u9078\u9805\u7684\u8AAA\u660E\n -ea[:<packagename>...|:<classname>]\n -enableassertions[:<packagename>...|:<classname>]\n \u555F\u7528\u6307\u5B9A\u4E4B\u8A73\u7D30\u7A0B\u5EA6\u7684\u5BA3\u544A\n -da[:<packagename>...|:<classname>]\n -disableassertions[:<packagename>...|:<classname>]\n \u505C\u7528\u6307\u5B9A\u4E4B\u8A73\u7D30\u7A0B\u5EA6\u7684\u5BA3\u544A\n -esa | -enablesystemassertions\n \u555F\u7528\u7CFB\u7D71\u5BA3\u544A\n -dsa | -disablesystemassertions\n \u505C\u7528\u7CFB\u7D71\u5BA3\u544A\n -agentlib:<libname>[=<options>]\n \u8F09\u5165\u539F\u751F\u4EE3\u7406\u7A0B\u5F0F\u7A0B\u5F0F\u5EAB <libname>\uFF0C\u4F8B\u5982 -agentlib:jdwp\n \u53E6\u8ACB\u53C3\u95B1 \
--agentlib:jdwp=help\n -agentpath:<pathname>[=<options>]\n \u4F9D\u5B8C\u6574\u8DEF\u5F91\u540D\u7A31\u8F09\u5165\u539F\u751F\u4EE3\u7406\u7A0B\u5F0F\u7A0B\u5F0F\u5EAB\n -javaagent:<jarpath>[=<options>]\n \u8F09\u5165 Java \u7A0B\u5F0F\u8A9E\u8A00\u4EE3\u7406\u7A0B\u5F0F\uFF0C\u8ACB\u53C3\u95B1 java.lang.instrument\n -splash:<imagepath>\n \u986F\u793A\u542B\u6307\u5B9A\u5F71\u50CF\u7684\u8EDF\u9AD4\u8CC7\u8A0A\u756B\u9762\n \u7CFB\u7D71\u6703\u81EA\u52D5\u652F\u63F4\u4E26\u4F7F\u7528 HiDPI \u5DF2\u7E2E\u653E\u5F71\u50CF\n (\u5982\u679C\u53EF\u7528\u7684\u8A71)\u3002\u672A\u7E2E\u653E\u5F71\u50CF\u6A94\u6848\u540D\u7A31 (\u4F8B\u5982 image.ext)\n \u61C9\u4E00\u5F8B\u4EE5\u5F15\u6578\u7684\u5F62\u5F0F\u50B3\u9001\u5230 -splash \u9078\u9805\u3002\n \u7CFB\u7D71\u6703\u81EA\u52D5\u5F9E\u63D0\u4F9B\u7684\u5DF2\u7E2E\u653E\u5F71\u50CF\u4E2D\u9078\u64C7\u6700\u9069\u5408\u7684\n \u5DF2\u7E2E\u653E\u5F71\u50CF\u3002\n \u8ACB\u53C3\u95B1 SplashScreen API \u6587\u4EF6\uFF0C\u4EE5\u77AD\u89E3\u8A73\u7D30\u8CC7\u8A0A\u3002\n @<filepath> \u5F9E\u6307\u5B9A\u7684\u6A94\u6848\u8B80\u53D6\u9078\u9805\n\n\u82E5\u8981\u6307\u5B9A\u9577\u9078\u9805\u7684\u5F15\u6578\uFF0C\u53EF\u4EE5\u4F7F\u7528 --<name>=<value> \u6216\n--<name> <value>\u3002\n
+java.launcher.opt.footer = \ -cp <\u76EE\u9304\u548C zip/jar \u6A94\u6848\u7684\u985E\u5225\u641C\u5C0B\u8DEF\u5F91>\n -classpath <\u76EE\u9304\u548C zip/jar \u6A94\u6848\u7684\u985E\u5225\u641C\u5C0B\u8DEF\u5F91>\n --class-path <\u76EE\u9304\u548C zip/jar \u6A94\u6848\u7684\u985E\u5225\u641C\u5C0B\u8DEF\u5F91>\n \u4EE5 {0} \u5340\u9694\u7684\u76EE\u9304\u3001JAR \u5B58\u6A94\n \u4EE5\u53CA ZIP \u5B58\u6A94\u6E05\u55AE (\u5C07\u65BC\u5176\u4E2D\u641C\u5C0B\u985E\u5225\u6A94\u6848)\u3002\n -p <\u6A21\u7D44\u8DEF\u5F91>\n --module-path <\u6A21\u7D44\u8DEF\u5F91>...\n \u4EE5 {0} \u5340\u9694\u7684\u76EE\u9304\u6E05\u55AE\uFF0C\u6BCF\u500B\u76EE\u9304\n \u90FD\u662F\u4E00\u500B\u6A21\u7D44\u76EE\u9304\u3002\n --upgrade-module-path <\u6A21\u7D44\u8DEF\u5F91>...\n \u4EE5 {0} \u5340\u9694\u7684\u76EE\u9304\u6E05\u55AE\uFF0C\u6BCF\u500B\u76EE\u9304\n \u90FD\u662F\u4E00\u500B\u6A21\u7D44\u76EE\u9304\uFF0C\u7576\u4E2D\u7684\u6A21\u7D44\u53EF\u53D6\u4EE3\u53EF\u5347\u7D1A\n \u6A21\u7D44 (\u5728\u7A0B\u5F0F\u5BE6\u969B\u57F7\u884C\u5F71\u50CF\u4E2D)\n --add-modules <module name>[,<module name>...]\n \u9664\u4E86\u8D77\u59CB\u6A21\u7D44\u4E4B\u5916\uFF0C\u8981\u89E3\u6790\u7684\u6839\u6A21\u7D44\u3002\n <module name> \u4E5F\u53EF\u4EE5\u662F ALL-DEFAULT\u3001ALL-SYSTEM\u3001\n ALL-MODULE-PATH.\n --list-modules\n \u5217\u51FA\u53EF\u76E3\u6E2C\u7684\u6A21\u7D44\u4E26\u7D50\u675F\n --d <\u6A21\u7D44\u540D\u7A31>\n --describe-module <\u6A21\u7D44\u540D\u7A31>\n \u63CF\u8FF0\u6A21\u7D44\u4E26\u7D50\u675F\n --dry-run \u5EFA\u7ACB VM \u4E26\u8F09\u5165\u4E3B\u8981\u985E\u5225\uFF0C\u4F46\u4E0D\u57F7\u884C\u4E3B\u8981\u65B9\u6CD5\u3002\n --dry-run \u9078\u9805\u9069\u5408\u7528\u5728\u9A57\u8B49\n \u50CF\u6A21\u7D44\u7CFB\u7D71\u7D44\u614B\u7684\u547D\u4EE4\u884C\u9078\u9805\u3002\n --validate-modules\n \u9A57\u8B49\u6240\u6709\u6A21\u7D44\u4E26\u7D50\u675F\n --validate-modules \u9078\u9805\u9069\u5408\u7528\u5728\u5C0B\u627E\n \u6A21\u7D44\u8DEF\u5F91\u4E0A\u4E4B\u6A21\u7D44\u7684\u885D\u7A81\u548C\u5176\u4ED6\u932F\u8AA4\u3002\n -D<name>=<value>\n \u8A2D\u5B9A\u7CFB\u7D71\u7279\u6027\n -verbose:[class|module|gc|jni]\n \u555F\u7528\u8A73\u7D30\u8CC7\u8A0A\u8F38\u51FA\n -version \u5728\u932F\u8AA4\u4E32\u6D41\u5370\u51FA\u7522\u54C1\u7248\u672C\u4E26\u7D50\u675F\n --version \u5728\u8F38\u51FA\u4E32\u6D41\u5370\u51FA\u7522\u54C1\u7248\u672C\u4E26\u7D50\u675F\n -showversion \u5728\u932F\u8AA4\u4E32\u6D41\u5370\u51FA\u7522\u54C1\u7248\u672C\u4E26\u7E7C\u7E8C\u9032\u884C\u4F5C\u696D\n --show-version\n \u5728\u8F38\u51FA\u4E32\u6D41\u5370\u51FA\u7522\u54C1\u7248\u672C\u4E26\u7E7C\u7E8C\u9032\u884C\u4F5C\u696D\n --show-module-resolution\n \u5728\u555F\u52D5\u6642\u986F\u793A\u6A21\u7D44\u89E3\u6790\u8F38\u51FA\n -? -h -help\n \u5728\u932F\u8AA4\u4E32\u6D41\u5370\u51FA\u6B64\u8AAA\u660E\u8A0A\u606F\n --help \u5728\u8F38\u51FA\u4E32\u6D41\u5370\u51FA\u6B64\u8AAA\u660E\u8A0A\u606F\n -X \u5728\u932F\u8AA4\u4E32\u6D41\u5370\u51FA\u984D\u5916\u9078\u9805\u7684\u8AAA\u660E\n --help-extra \u5728\u8F38\u51FA\u4E32\u6D41\u5370\u51FA\u984D\u5916\u9078\u9805\u7684\u8AAA\u660E\n -ea[:<packagename>...|:<classname>]\n -enableassertions[:<packagename>...|:<classname>]\n \u555F\u7528\u6307\u5B9A\u4E4B\u8A73\u7D30\u7A0B\u5EA6\u7684\u5BA3\u544A\n -da[:<packagename>...|:<classname>]\n -disableassertions[:<packagename>...|:<classname>]\n \u505C\u7528\u6307\u5B9A\u4E4B\u8A73\u7D30\u7A0B\u5EA6\u7684\u5BA3\u544A\n -esa | -enablesystemassertions\n \
+ \u555F\u7528\u7CFB\u7D71\u5BA3\u544A\n -dsa | -disablesystemassertions\n \u505C\u7528\u7CFB\u7D71\u5BA3\u544A\n -agentlib:<libname>[=<options>]\n \u8F09\u5165\u539F\u751F\u4EE3\u7406\u7A0B\u5F0F\u7A0B\u5F0F\u5EAB <libname>\uFF0C\u4F8B\u5982 -agentlib:jdwp\n \u53E6\u8ACB\u53C3\u95B1 -agentlib:jdwp=help\n -agentpath:<pathname>[=<options>]\n \u4F9D\u5B8C\u6574\u8DEF\u5F91\u540D\u7A31\u8F09\u5165\u539F\u751F\u4EE3\u7406\u7A0B\u5F0F\u7A0B\u5F0F\u5EAB\n -javaagent:<jarpath>[=<options>]\n \u8F09\u5165 Java \u7A0B\u5F0F\u8A9E\u8A00\u4EE3\u7406\u7A0B\u5F0F\uFF0C\u8ACB\u53C3\u95B1 java.lang.instrument\n -splash:<imagepath>\n \u986F\u793A\u542B\u6307\u5B9A\u5F71\u50CF\u7684\u8EDF\u9AD4\u8CC7\u8A0A\u756B\u9762\n \u7CFB\u7D71\u6703\u81EA\u52D5\u652F\u63F4\u4E26\u4F7F\u7528 HiDPI \u7E2E\u653E\u7684\u5F71\u50CF\n (\u82E5\u6709\u7684\u8A71)\u3002\u672A\u7E2E\u653E\u5F71\u50CF\u6A94\u6848\u540D\u7A31 (\u4F8B\u5982 image.ext)\n \u61C9\u4E00\u5F8B\u4EE5\u5F15\u6578\u7684\u5F62\u5F0F\u50B3\u9001\u7D66 -splash \u9078\u9805\u3002\n \u7CFB\u7D71\u5C07\u6703\u81EA\u52D5\u9078\u64C7\u4F7F\u7528\u6700\u9069\u5408\u7684\u7E2E\u653E\u5F71\u50CF\n \u3002\n \u8ACB\u53C3\u95B1 SplashScreen API \u6587\u4EF6\u77AD\u89E3\u8A73\u7D30\u8CC7\u8A0A\u3002\n @argument files\n \u4E00\u6216\u591A\u500B\u5305\u542B\u9078\u9805\u7684\u5F15\u6578\u6A94\u6848\n -disable-@files\n \u505C\u7528\u9032\u4E00\u6B65\u7684\u5F15\u6578\u6A94\u6848\u64F4\u5145\n\u82E5\u8981\u6307\u5B9A\u9577\u9078\u9805\u7684\u5F15\u6578\uFF0C\u53EF\u4EE5\u4F7F\u7528 --<name>=<value> \u6216\n--<name> <value>\u3002\n
# Translators please note do not translate the options themselves
-java.launcher.X.usage=\n -Xbatch \u505C\u7528\u80CC\u666F\u7DE8\u8B6F\n -Xbootclasspath/a:<directories and zip/jar files separated by {0}>\n \u9644\u52A0\u81F3\u555F\u52D5\u5B89\u88DD\u985E\u5225\u8DEF\u5F91\u7684\u7D50\u5C3E\n -Xcheck:jni \u57F7\u884C\u5176\u4ED6\u7684 JNI \u51FD\u6578\u6AA2\u67E5\n -Xcomp \u5F37\u5236\u7DE8\u8B6F\u7B2C\u4E00\u500B\u547C\u53EB\u7684\u65B9\u6CD5\n -Xdebug \u91DD\u5C0D\u56DE\u6EAF\u76F8\u5BB9\u6027\u63D0\u4F9B\n -Xdiag \u986F\u793A\u5176\u4ED6\u8A3A\u65B7\u8A0A\u606F\n -Xdiag:resolver \u986F\u793A\u89E3\u6790\u5668\u8A3A\u65B7\u8A0A\u606F\n -Xfuture \u555F\u7528\u6700\u56B4\u683C\u7684\u6AA2\u67E5\uFF0C\u9810\u5148\u4F5C\u70BA\u5C07\u4F86\u7684\u9810\u8A2D\n -Xint \u50C5\u9650\u89E3\u8B6F\u6A21\u5F0F\u57F7\u884C\n -Xinternalversion\n \u986F\u793A\u6BD4 -version \u9078\u9805\u66F4\u70BA\u8A73\u7D30\u7684\n JVM \u7248\u672C\u8CC7\u8A0A\n -Xloggc:<file> \u5C07 GC \u72C0\u614B\u8A18\u9304\u81F3\u6A94\u6848\u4E14\u9023\u540C\u6642\u6233\n -Xmixed \u6DF7\u5408\u6A21\u5F0F\u57F7\u884C (\u9810\u8A2D)\n -Xmn<size> \u8A2D\u5B9A\u65B0\u751F\u4EE3 (\u990A\u6210\u5340) \u4E4B\u5806\u96C6\u7684\u8D77\u59CB\u5927\u5C0F\u548C\n \u5927\u5C0F\u4E0A\u9650 (\u4F4D\u5143\u7D44)\n -Xms<size> \u8A2D\u5B9A\u8D77\u59CB Java \u5806\u96C6\u5927\u5C0F\n -Xmx<size> \u8A2D\u5B9A Java \u5806\u96C6\u5927\u5C0F\u4E0A\u9650\n -Xnoclassgc \u505C\u7528\u985E\u5225\u8CC7\u6E90\u56DE\u6536\n -Xprof \u8F38\u51FA cpu \u5206\u6790\u8CC7\u6599\n -Xrs \u6E1B\u5C11 Java/VM \u4F7F\u7528\u4F5C\u696D\u7CFB\u7D71\u4FE1\u865F (\u8ACB\u53C3\u95B1\u6587\u4EF6)\n -Xshare:auto \u5728\u53EF\u80FD\u7684\u60C5\u6CC1\u4E0B\u4F7F\u7528\u5171\u7528\u985E\u5225\u8CC7\u6599 (\u9810\u8A2D)\n -Xshare:off \u4E0D\u5617\u8A66\u4F7F\u7528\u5171\u7528\u985E\u5225\u8CC7\u6599\n -Xshare:on \u9700\u8981\u4F7F\u7528\u5171\u7528\u985E\u5225\u8CC7\u6599\uFF0C\u5426\u5247\u6703\u5931\u6557\u3002\n -XshowSettings \u986F\u793A\u6240\u6709\u8A2D\u5B9A\u503C\u4E26\u7E7C\u7E8C\n -XshowSettings:all\n \u986F\u793A\u6240\u6709\u8A2D\u5B9A\u503C\u4E26\u7E7C\u7E8C\n -XshowSettings:locale\n \u986F\u793A\u6240\u6709\u5730\u5340\u8A2D\u5B9A\u76F8\u95DC\u8A2D\u5B9A\u503C\u4E26\u7E7C\u7E8C\n -XshowSettings:properties\n \u986F\u793A\u6240\u6709\u5C6C\u6027\u8A2D\u5B9A\u503C\u4E26\u7E7C\u7E8C\n -XshowSettings:vm \u986F\u793A\u6240\u6709 VM \u76F8\u95DC\u8A2D\u5B9A\u503C\u4E26\u7E7C\u7E8C\n -Xss<size> \u8A2D\u5B9A Java \u57F7\u884C\u7DD2\u5806\u758A\u5927\u5C0F\n -Xverify \u8A2D\u5B9A Bytecode \u9A57\u8B49\u7A0B\u5F0F\u7684\u6A21\u5F0F\n --add-reads <module>=<target-module>(,<target-module>)*\n \u66F4\u65B0 <module> \u4EE5\u8B80\u53D6 <target-module>\uFF0C\u7121\u8AD6\n \u6A21\u7D44\u5BA3\u544A\u70BA\u4F55\u3002 \n \u53EF\u5C07 <target-module> \u8A2D\u70BA ALL-UNNAMED \u4EE5\u8B80\u53D6\u6240\u6709\u672A\u547D\u540D\u7684\n \u6A21\u7D44\u3002\n --add-exports <module>/<package>=<target-module>(,<target-module>)*\n \u66F4\u65B0 <module> \u4EE5\u4FBF\u5C07 <package> \u532F\u51FA\u81F3 <target-module>\uFF0C\n \u7121\u8AD6\u6A21\u7D44\u5BA3\u544A\u70BA\u4F55\u3002\n \u53EF\u5C07 <target-module> \u8A2D\u70BA ALL-UNNAMED \u4EE5\u532F\u51FA\u81F3\u6240\u6709\n \u672A\u547D\u540D\u7684\u6A21\u7D44\u3002\n --add-opens <module>/<package>=<target-module>(,<target-module>)*\n \u66F4\u65B0 <module> \
-\u4EE5\u4FBF\u5C07 <package> \u958B\u555F\u81F3\n <target-module>\uFF0C\u7121\u8AD6\u6A21\u7D44\u5BA3\u544A\u70BA\u4F55\u3002\n --disable-@files \u505C\u7528\u9032\u4E00\u6B65\u7684\u5F15\u6578\u6A94\u6848\u64F4\u5145\n --patch-module <module>=<file>({0}<file>)*\n \u8986\u5BEB\u6216\u52A0\u5F37\u542B\u6709 JAR \u6A94\u6848\u6216\u76EE\u9304\u4E2D\n \u985E\u5225\u548C\u8CC7\u6E90\u7684\u6A21\u7D44\u3002\n\n\u4E0A\u8FF0\u7684\u984D\u5916\u9078\u9805\u82E5\u6709\u8B8A\u66F4\u4E0D\u53E6\u884C\u901A\u77E5\u3002\n
+java.launcher.X.usage=\n -Xbatch \u505C\u7528\u80CC\u666F\u7DE8\u8B6F\n -Xbootclasspath/a:<\u4EE5 {0} \u5340\u9694\u7684\u76EE\u9304\u548C zip/jar \u6A94\u6848>\n \u9644\u52A0\u81F3\u555F\u52D5\u5B89\u88DD\u985E\u5225\u8DEF\u5F91\u7684\u7D50\u5C3E\n -Xcheck:jni \u57F7\u884C\u984D\u5916\u7684 JNI \u51FD\u6578\u6AA2\u67E5\n -Xcomp \u5F37\u5236\u7DE8\u8B6F\u7B2C\u4E00\u500B\u547C\u53EB\u7684\u65B9\u6CD5\n -Xdebug \u91DD\u5C0D\u56DE\u6EAF\u76F8\u5BB9\u6027\u63D0\u4F9B\n -Xdiag \u986F\u793A\u984D\u5916\u7684\u8A3A\u65B7\u8A0A\u606F\n -Xfuture \u555F\u7528\u6700\u56B4\u683C\u7684\u6AA2\u67E5\uFF0C\u9810\u5148\u4F5C\u70BA\u5C07\u4F86\u7684\u9810\u8A2D\n -Xint \u50C5\u9650\u89E3\u8B6F\u6A21\u5F0F\u57F7\u884C\n -Xinternalversion\n \u986F\u793A\u6BD4 -version \u9078\u9805\u66F4\u70BA\u8A73\u7D30\u7684\n JVM \u7248\u672C\u8CC7\u8A0A\n -Xloggc:<file> \u5C07 GC \u72C0\u614B\u8A18\u9304\u81F3\u6A94\u6848\u4E14\u9023\u540C\u6642\u6233\n -Xmixed \u6DF7\u5408\u6A21\u5F0F\u57F7\u884C (\u9810\u8A2D)\n -Xmn<size> \u8A2D\u5B9A\u65B0\u751F\u4EE3 (\u990A\u6210\u5340) \u4E4B\u5806\u96C6\u7684\u8D77\u59CB\u5927\u5C0F\u548C\n \u5927\u5C0F\u4E0A\u9650 (\u4F4D\u5143\u7D44)\n -Xms<size> \u8A2D\u5B9A\u8D77\u59CB Java \u5806\u96C6\u5927\u5C0F\n -Xmx<size> \u8A2D\u5B9A Java \u5806\u96C6\u5927\u5C0F\u4E0A\u9650\n -Xnoclassgc \u505C\u7528\u985E\u5225\u8CC7\u6E90\u56DE\u6536\n -Xprof \u8F38\u51FA cpu \u5206\u6790\u8CC7\u6599 (\u5DF2\u4E0D\u518D\u4F7F\u7528)\n -Xrs \u6E1B\u5C11 Java/VM \u4F7F\u7528\u7684\u4F5C\u696D\u7CFB\u7D71\u4FE1\u865F (\u8ACB\u53C3\u95B1\u6587\u4EF6)\n -Xshare:auto \u5728\u53EF\u80FD\u7684\u60C5\u6CC1\u4E0B\u4F7F\u7528\u5171\u7528\u985E\u5225\u8CC7\u6599 (\u9810\u8A2D)\n -Xshare:off \u4E0D\u5617\u8A66\u4F7F\u7528\u5171\u7528\u985E\u5225\u8CC7\u6599\n -Xshare:on \u9700\u8981\u4F7F\u7528\u5171\u7528\u985E\u5225\u8CC7\u6599\uFF0C\u5426\u5247\u6703\u5931\u6557\u3002\n -XshowSettings \u986F\u793A\u6240\u6709\u8A2D\u5B9A\u503C\u4E26\u7E7C\u7E8C\u9032\u884C\u4F5C\u696D\n -XshowSettings:all\n \u986F\u793A\u6240\u6709\u8A2D\u5B9A\u503C\u4E26\u7E7C\u7E8C\u9032\u884C\u4F5C\u696D\n -XshowSettings:locale\n \u986F\u793A\u6240\u6709\u5730\u5340\u8A2D\u5B9A\u76F8\u95DC\u8A2D\u5B9A\u503C\u4E26\u7E7C\u7E8C\u9032\u884C\u4F5C\u696D\n -XshowSettings:properties\n \u986F\u793A\u6240\u6709\u5C6C\u6027\u8A2D\u5B9A\u503C\u4E26\u7E7C\u7E8C\u9032\u884C\u4F5C\u696D\n -XshowSettings:vm \u986F\u793A\u6240\u6709 VM \u76F8\u95DC\u8A2D\u5B9A\u503C\u4E26\u7E7C\u7E8C\u9032\u884C\u4F5C\u696D\n -Xss<size> \u8A2D\u5B9A Java \u57F7\u884C\u7DD2\u5806\u758A\u5927\u5C0F\n -Xverify \u8A2D\u5B9A Bytecode \u9A57\u8B49\u7A0B\u5F0F\u7684\u6A21\u5F0F\n --add-reads <module>=<target-module>(,<target-module>)*\n \u66F4\u65B0 <module> \u4EE5\u8B80\u53D6 <target-module>\uFF0C\u4E0D\u8AD6\n \u6A21\u7D44\u5BA3\u544A\u70BA\u4F55\u3002\n \u53EF\u5C07 <target-module> \u8A2D\u70BA ALL-UNNAMED \u4EE5\u8B80\u53D6\u6240\u6709\u672A\u547D\u540D\u7684\n \u6A21\u7D44\u3002\n --add-exports <module>/<package>=<target-module>(,<target-module>)*\n \u66F4\u65B0 <module> \u4EE5\u4FBF\u5C07 <package> \u532F\u51FA\u81F3 <target-module>\uFF0C\n \u4E0D\u8AD6\u6A21\u7D44\u5BA3\u544A\u70BA\u4F55\u3002\n \u53EF\u5C07 <target-module> \u8A2D\u70BA ALL-UNNAMED \u4EE5\u532F\u51FA\u81F3\u6240\u6709\n \u672A\u547D\u540D\u7684\u6A21\u7D44\u3002\n --add-opens <module>/<package>=<target-module>(,<target-module>)*\n \u66F4\u65B0 <module> \
+\u4EE5\u4FBF\u5C07 <package> \u958B\u555F\u81F3\n <target-module>\uFF0C\u4E0D\u8AD6\u6A21\u7D44\u5BA3\u544A\u70BA\u4F55\u3002\n --permit-illegal-access\n \u5141\u8A31\u672A\u547D\u540D\u6A21\u7D44\u4E2D\u7684\u7A0B\u5F0F\u78BC\u5C0D\u5DF2\u547D\u540D\u6A21\u7D44\u4E2D\u7684\n \u985E\u578B\u6210\u54E1\u9032\u884C\u975E\u6CD5\u5B58\u53D6\u3002\u6B64\u76F8\u5BB9\u6027\u9078\u9805\u5C07\u5728\n \u4E0B\u4E00\u500B\u7248\u672C\u4E2D\u79FB\u9664\u3002\n --limit-modules <module name>[,<module name>...]\n \u9650\u5236\u53EF\u76E3\u6E2C\u6A21\u7D44\u7684\u7BC4\u570D\n --patch-module <module>=<file>({0}<file>)*\n \u8986\u5BEB\u6216\u52A0\u5F37\u542B\u6709 JAR \u6A94\u6848\u6216\u76EE\u9304\u4E2D\n \u985E\u5225\u548C\u8CC7\u6E90\u7684\u6A21\u7D44\u3002\n --disable-@files \u505C\u7528\u9032\u4E00\u6B65\u7684\u5F15\u6578\u6A94\u6848\u64F4\u5145\n\n\u4E0A\u8FF0\u7684\u984D\u5916\u9078\u9805\u82E5\u6709\u8B8A\u66F4\u4E0D\u53E6\u884C\u901A\u77E5\u3002\n
# Translators please note do not translate the options themselves
java.launcher.X.macosx.usage=\n\u4E0B\u5217\u662F Mac OS X \u7279\u5B9A\u9078\u9805:\n -XstartOnFirstThread\n \u5728\u7B2C\u4E00\u500B (AppKit) \u57F7\u884C\u7DD2\u57F7\u884C main() \u65B9\u6CD5\n -Xdock:name=<application name>\n \u8986\u5BEB\u7D50\u5408\u8AAA\u660E\u756B\u9762\u4E2D\u986F\u793A\u7684\u9810\u8A2D\u61C9\u7528\u7A0B\u5F0F\u540D\u7A31\n -Xdock:icon=<path to icon file>\n \u8986\u5BEB\u7D50\u5408\u8AAA\u660E\u756B\u9762\u4E2D\u986F\u793A\u7684\u9810\u8A2D\u5716\u793A\n\n
-java.launcher.cls.error1=\u932F\u8AA4: \u627E\u4E0D\u5230\u6216\u7121\u6CD5\u8F09\u5165\u4E3B\u8981\u985E\u5225 {0}
+java.launcher.cls.error1=\u932F\u8AA4: \u627E\u4E0D\u5230\u6216\u7121\u6CD5\u8F09\u5165\u4E3B\u8981\u985E\u5225 {0}\n\u539F\u56E0: {1}: {2}
java.launcher.cls.error2=\u932F\u8AA4: \u4E3B\u8981\u65B9\u6CD5\u4E0D\u662F\u985E\u5225 {1} \u4E2D\u7684 {0}\uFF0C\u8ACB\u5B9A\u7FA9\u4E3B\u8981\u65B9\u6CD5\u70BA:\n public static void main(String[] args)
java.launcher.cls.error3=\u932F\u8AA4: \u4E3B\u8981\u65B9\u6CD5\u5FC5\u9808\u50B3\u56DE\u985E\u5225 {0} \u4E2D void \u985E\u578B\u7684\u503C\uFF0C\n\u8ACB\u5B9A\u7FA9\u4E3B\u8981\u65B9\u6CD5\u70BA:\n public static void main(String[] args)
java.launcher.cls.error4=\u932F\u8AA4: \u5728\u985E\u5225 {0} \u4E2D\u627E\u4E0D\u5230\u4E3B\u8981\u65B9\u6CD5\uFF0C\u8ACB\u5B9A\u7FA9\u4E3B\u8981\u65B9\u6CD5\u70BA:\n public static void main(String[] args)\n\u6216\u8005 JavaFX \u61C9\u7528\u7A0B\u5F0F\u985E\u5225\u5FC5\u9808\u64F4\u5145 {1}
java.launcher.cls.error5=\u932F\u8AA4: \u907A\u6F0F\u57F7\u884C\u6B64\u61C9\u7528\u7A0B\u5F0F\u6240\u9700\u7684 JavaFX \u7A0B\u5F0F\u5BE6\u969B\u57F7\u884C\u5143\u4EF6
+java.launcher.cls.error6=\u932F\u8AA4: \u8F09\u5165\u4E3B\u8981\u985E\u5225 {0} \u6642\u767C\u751F LinkageError\n\t{1}
java.launcher.jar.error1=\u932F\u8AA4: \u5617\u8A66\u958B\u555F\u6A94\u6848 {0} \u6642\u767C\u751F\u672A\u9810\u671F\u7684\u932F\u8AA4
java.launcher.jar.error2=\u5728 {0} \u4E2D\u627E\u4E0D\u5230\u8CC7\u8A0A\u6E05\u55AE
java.launcher.jar.error3={0} \u4E2D\u6C92\u6709\u4E3B\u8981\u8CC7\u8A0A\u6E05\u55AE\u5C6C\u6027
+java.launcher.jar.error4=\u8F09\u5165 {0} \u4E2D\u7684 Java \u4EE3\u7406\u7A0B\u5F0F\u6642\u767C\u751F\u932F\u8AA4
java.launcher.init.error=\u521D\u59CB\u5316\u932F\u8AA4
java.launcher.javafx.error1=\u932F\u8AA4: JavaFX launchApplication \u65B9\u6CD5\u7684\u7C3D\u7AE0\u932F\u8AA4\uFF0C\u5B83\n\u5FC5\u9808\u5BA3\u544A\u70BA\u975C\u614B\u4E26\u50B3\u56DE void \u985E\u578B\u7684\u503C
java.launcher.module.error1=\u6A21\u7D44 {0} \u4E0D\u542B MainClass \u5C6C\u6027\uFF0C\u8ACB\u4F7F\u7528 -m <module>/<main-class>
java.launcher.module.error2=\u932F\u8AA4: \u627E\u4E0D\u5230\u6216\u7121\u6CD5\u8F09\u5165\u6A21\u7D44 {1} \u4E2D\u7684\u4E3B\u8981\u985E\u5225 {0}
+java.launcher.module.error3=\u932F\u8AA4: \u7121\u6CD5\u5F9E\u6A21\u7D44 {1} \u8F09\u5165\u4E3B\u8981\u985E\u5225 {0}\n\t{2}
+java.launcher.module.error4=\u627E\u4E0D\u5230 {0}
--- a/jdk/src/java.base/share/classes/sun/reflect/annotation/TypeAnnotationParser.java Sat Jun 03 02:44:55 2017 +0000
+++ b/jdk/src/java.base/share/classes/sun/reflect/annotation/TypeAnnotationParser.java Sat Jun 03 03:48:03 2017 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2017, 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
@@ -123,9 +123,30 @@
tmp.add(t);
}
}
+ // If a constructor has a mandated outer this, that parameter
+ // has no annotations and the annotations to parameter mapping
+ // should be offset by 1.
+ boolean offset = false;
+ if (decl instanceof Constructor) {
+ Constructor<?> ctor = (Constructor<?>) decl;
+ Class<?> declaringClass = ctor.getDeclaringClass();
+ if (!declaringClass.isEnum() &&
+ (declaringClass.isMemberClass() &&
+ (declaringClass.getModifiers() & Modifier.STATIC) == 0) ) {
+ offset = true;
+ }
+ }
for (int i = 0; i < size; i++) {
- @SuppressWarnings("unchecked")
- ArrayList<TypeAnnotation> list = l[i];
+ ArrayList<TypeAnnotation> list;
+ if (offset) {
+ @SuppressWarnings("unchecked")
+ ArrayList<TypeAnnotation> tmp = (i == 0) ? null : l[i - 1];
+ list = tmp;
+ } else {
+ @SuppressWarnings("unchecked")
+ ArrayList<TypeAnnotation> tmp = l[i];
+ list = tmp;
+ }
TypeAnnotation[] typeAnnotations;
if (list != null) {
typeAnnotations = list.toArray(new TypeAnnotation[list.size()]);
--- a/jdk/src/java.base/share/classes/sun/security/tools/keytool/Resources_de.java Sat Jun 03 02:44:55 2017 +0000
+++ b/jdk/src/java.base/share/classes/sun/security/tools/keytool/Resources_de.java Sat Jun 03 03:48:03 2017 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2017, 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
@@ -357,8 +357,6 @@
{"Enter.alias.name.", "Aliasnamen eingeben: "},
{".RETURN.if.same.as.for.otherAlias.",
"\t(RETURN, wenn identisch mit <{0}>)"},
- {".PATTERN.printX509Cert",
- "Eigent\u00FCmer: {0}\nAussteller: {1}\nSeriennummer: {2}\nG\u00FCltig von: {3} bis: {4}\nZertifikatfingerprints:\n\t SHA1: {5}\n\t SHA256: {6}\nSignaturalgorithmusname: {7}\nAlgorithmus des Public Key von Betreff: {8} ({9,number,#})\nVersion: {10}"},
{"What.is.your.first.and.last.name.",
"Wie lautet Ihr Vor- und Nachname?"},
{"What.is.the.name.of.your.organizational.unit.",
@@ -421,15 +419,12 @@
{"Please.provide.keysize.for.secret.key.generation",
"Geben Sie -keysize zum Erstellen eines Secret Keys an"},
- {"verified.by.s.in.s", "Gepr\u00FCft von %s in %s"},
{"warning.not.verified.make.sure.keystore.is.correct",
"WARNUNG: Nicht gepr\u00FCft. Stellen Sie sicher, dass -keystore korrekt ist."},
{"Extensions.", "Erweiterungen: "},
{".Empty.value.", "(Leerer Wert)"},
{"Extension.Request.", "Erweiterungsanforderung:"},
- {"PKCS.10.Certificate.Request.Version.1.0.Subject.s.Public.Key.s.format.s.key.",
- "PKCS #10-Zertifikatanforderung (Version 1.0)\nSubjekt: %s\nPublic Key: %s Format %s Schl\u00FCssel\n"},
{"Unknown.keyUsage.type.", "Unbekannter keyUsage-Typ: "},
{"Unknown.extendedkeyUsage.type.", "Unbekannter extendedkeyUsage-Typ: "},
{"Unknown.AccessDescription.type.", "Unbekannter AccessDescription-Typ: "},
@@ -438,7 +433,33 @@
"Erweiterung kann nicht als \"Kritisch\" markiert werden. "},
{"Odd.number.of.hex.digits.found.", "Ungerade Anzahl hexadezimaler Ziffern gefunden: "},
{"Unknown.extension.type.", "Unbekannter Erweiterungstyp: "},
- {"command.{0}.is.ambiguous.", "Befehl {0} ist mehrdeutig:"}
+ {"command.{0}.is.ambiguous.", "Befehl {0} ist mehrdeutig:"},
+
+ // 8171319: keytool should print out warnings when reading or
+ // generating cert/cert req using weak algorithms
+ {"the.certificate.request", "Die Zertifikatsanforderung"},
+ {"the.issuer", "Der Aussteller"},
+ {"the.generated.certificate", "Das generierte Zertifikat"},
+ {"the.generated.crl", "Die generierte CRL"},
+ {"the.generated.certificate.request", "Die generierte Zertifikatsanforderung"},
+ {"the.certificate", "Das Zertifikat"},
+ {"the.crl", "Die CRL"},
+ {"the.tsa.certificate", "Das TSA-Zertifikat"},
+ {"the.input", "Die Eingabe"},
+ {"reply", "Antwort"},
+ {"one.in.many", "%s #%d von %d"},
+ {"alias.in.cacerts", "Aussteller <%s> in cacerts"},
+ {"alias.in.keystore", "Aussteller <%s>"},
+ {"with.weak", "%s (schwach)"},
+ {"key.bit", "%d-Bit-%s-Schl\u00FCssel"},
+ {"key.bit.weak", "%d-Bit-%s-Schl\u00FCssel (schwach)"},
+ {".PATTERN.printX509Cert.with.weak",
+ "Eigent\u00FCmer: {0}\nAussteller: {1}\nSeriennummer: {2}\nG\u00FCltig von: {3} bis: {4}\nZertifikatsfingerprints:\n\t SHA1: {5}\n\t SHA256: {6}\nSignaturalgorithmusname: {7}\nPublic Key-Algorithmus von Subject: {8}\nVersion: {9}"},
+ {"PKCS.10.with.weak",
+ "PKCS #10-Zertifikatsanforderung (Version 1.0)\nSubject: %s\nFormat: %s\nPublic Key: %s\nSignaturalgorithmus: %s\n"},
+ {"verified.by.s.in.s.weak", "Von %s in %s mit %s verifiziert"},
+ {"whose.sigalg.risk", "%s verwendet den Signaturalgorithmus %s. Dies gilt als Sicherheitsrisiko."},
+ {"whose.key.risk", "%s verwendet %s. Dies gilt als Sicherheitsrisiko."},
};
--- a/jdk/src/java.base/share/classes/sun/security/tools/keytool/Resources_es.java Sat Jun 03 02:44:55 2017 +0000
+++ b/jdk/src/java.base/share/classes/sun/security/tools/keytool/Resources_es.java Sat Jun 03 03:48:03 2017 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2017, 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
@@ -357,8 +357,6 @@
{"Enter.alias.name.", "Introduzca el nombre de alias: "},
{".RETURN.if.same.as.for.otherAlias.",
"\t(INTRO si es el mismo que para <{0}>)"},
- {".PATTERN.printX509Cert",
- "Propietario: {0}\nEmisor: {1}\nN\u00FAmero de serie: {2}\nV\u00E1lido desde: {3} hasta: {4}\nHuellas digitales del certificado:\n\t SHA1: {5}\n\t SHA256: {6}\nNombre del algoritmo de firma: {7}\nAlgoritmo de clave p\u00FAblica de asunto: {8} ({9,number,#})\nVersi\u00F3n: {10}"},
{"What.is.your.first.and.last.name.",
"\u00BFCu\u00E1les son su nombre y su apellido?"},
{"What.is.the.name.of.your.organizational.unit.",
@@ -421,15 +419,12 @@
{"Please.provide.keysize.for.secret.key.generation",
"Proporcione el valor de -keysize para la generaci\u00F3n de claves secretas"},
- {"verified.by.s.in.s", "Verificado por %s en %s"},
{"warning.not.verified.make.sure.keystore.is.correct",
"ADVERTENCIA: no se ha verificado. Aseg\u00FArese de que el valor de -keystore es correcto."},
{"Extensions.", "Extensiones: "},
{".Empty.value.", "(Valor vac\u00EDo)"},
{"Extension.Request.", "Solicitud de Extensi\u00F3n:"},
- {"PKCS.10.Certificate.Request.Version.1.0.Subject.s.Public.Key.s.format.s.key.",
- "Solicitud de Certificado PKCS #10 (Versi\u00F3n 1.0)\nAsunto: %s\nClave P\u00FAblica: %s formato %s clave\n"},
{"Unknown.keyUsage.type.", "Tipo de uso de clave desconocido: "},
{"Unknown.extendedkeyUsage.type.", "Tipo de uso de clave extendida desconocido: "},
{"Unknown.AccessDescription.type.", "Tipo de descripci\u00F3n de acceso desconocido: "},
@@ -438,7 +433,33 @@
"Esta extensi\u00F3n no se puede marcar como cr\u00EDtica. "},
{"Odd.number.of.hex.digits.found.", "Se ha encontrado un n\u00FAmero impar de d\u00EDgitos hexadecimales: "},
{"Unknown.extension.type.", "Tipo de extensi\u00F3n desconocida: "},
- {"command.{0}.is.ambiguous.", "El comando {0} es ambiguo:"}
+ {"command.{0}.is.ambiguous.", "El comando {0} es ambiguo:"},
+
+ // 8171319: keytool should print out warnings when reading or
+ // generating cert/cert req using weak algorithms
+ {"the.certificate.request", "La solicitud de certificado"},
+ {"the.issuer", "El emisor"},
+ {"the.generated.certificate", "El certificado generado"},
+ {"the.generated.crl", "La CRL generada"},
+ {"the.generated.certificate.request", "La solicitud de certificado generada"},
+ {"the.certificate", "El certificado"},
+ {"the.crl", "La CRL"},
+ {"the.tsa.certificate", "El certificado de TSA"},
+ {"the.input", "La entrada"},
+ {"reply", "Responder"},
+ {"one.in.many", "%s #%d de %d"},
+ {"alias.in.cacerts", "Emisor <%s> en cacerts"},
+ {"alias.in.keystore", "Emisor <%s>"},
+ {"with.weak", "%s (d\u00E9bil)"},
+ {"key.bit", "Clave %s de %d bits"},
+ {"key.bit.weak", "Clave %s de %d bits (d\u00E9bil)"},
+ {".PATTERN.printX509Cert.with.weak",
+ "Propietario: {0}\nEmisor: {1}\nN\u00FAmero de serie: {2}\nV\u00E1lido desde: {3} hasta: {4}\nHuellas digitales del certificado:\n\t SHA1: {5}\n\t SHA256: {6}\nNombre del algoritmo de firma: {7}\nAlgoritmo de clave p\u00FAblica de asunto: {8}\nVersi\u00F3n: {9}"},
+ {"PKCS.10.with.weak",
+ "Solicitud de certificado PKCS #10 (Versi\u00F3n 1.0)\nAsunto: %s\nFormato: %s\nClave p\u00FAblica:%s\nAlgoritmo de firma: %s\n"},
+ {"verified.by.s.in.s.weak", "Verificado por %s en %s con %s"},
+ {"whose.sigalg.risk", "%s usa el algoritmo de firma %s, lo que se considera un riesgo de seguridad."},
+ {"whose.key.risk", "%s usa %s, lo que se considera un riesgo de seguridad."},
};
--- a/jdk/src/java.base/share/classes/sun/security/tools/keytool/Resources_fr.java Sat Jun 03 02:44:55 2017 +0000
+++ b/jdk/src/java.base/share/classes/sun/security/tools/keytool/Resources_fr.java Sat Jun 03 03:48:03 2017 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2017, 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
@@ -357,8 +357,6 @@
{"Enter.alias.name.", "Indiquez le nom d'alias : "},
{".RETURN.if.same.as.for.otherAlias.",
"\t(appuyez sur Entr\u00E9e si le r\u00E9sultat est identique \u00E0 <{0}>)"},
- {".PATTERN.printX509Cert",
- "Propri\u00E9taire : {0}\nEmetteur : {1}\nNum\u00E9ro de s\u00E9rie : {2}\nValide du : {3} au : {4}\nEmpreintes du certificat :\n\t SHA1 : {5}\n\t SHA256 : {6}\nNom de l''algorithme de signature : {7}\nAlgorithme de cl\u00E9 publique du sujet : {8} ({9,number,#})\nVersion : {10}"},
{"What.is.your.first.and.last.name.",
"Quels sont vos nom et pr\u00E9nom ?"},
{"What.is.the.name.of.your.organizational.unit.",
@@ -421,15 +419,12 @@
{"Please.provide.keysize.for.secret.key.generation",
"Indiquez -keysize pour la g\u00E9n\u00E9ration de la cl\u00E9 secr\u00E8te"},
- {"verified.by.s.in.s", "V\u00E9rifi\u00E9 par %s dans %s"},
{"warning.not.verified.make.sure.keystore.is.correct",
"AVERTISSEMENT : non v\u00E9rifi\u00E9. Assurez-vous que -keystore est correct."},
{"Extensions.", "Extensions\u00A0: "},
{".Empty.value.", "(Valeur vide)"},
{"Extension.Request.", "Demande d'extension :"},
- {"PKCS.10.Certificate.Request.Version.1.0.Subject.s.Public.Key.s.format.s.key.",
- "Demande de certificat PKCS #10 (version 1.0)\nSujet : %s\nCl\u00E9 publique : format %s pour la cl\u00E9 %s\n"},
{"Unknown.keyUsage.type.", "Type keyUsage inconnu : "},
{"Unknown.extendedkeyUsage.type.", "Type extendedkeyUsage inconnu : "},
{"Unknown.AccessDescription.type.", "Type AccessDescription inconnu : "},
@@ -438,7 +433,33 @@
"Cette extension ne peut pas \u00EAtre marqu\u00E9e comme critique. "},
{"Odd.number.of.hex.digits.found.", "Nombre impair de chiffres hexad\u00E9cimaux trouv\u00E9 : "},
{"Unknown.extension.type.", "Type d'extension inconnu : "},
- {"command.{0}.is.ambiguous.", "commande {0} ambigu\u00EB :"}
+ {"command.{0}.is.ambiguous.", "commande {0} ambigu\u00EB :"},
+
+ // 8171319: keytool should print out warnings when reading or
+ // generating cert/cert req using weak algorithms
+ {"the.certificate.request", "Demande de certificat"},
+ {"the.issuer", "Emetteur"},
+ {"the.generated.certificate", "Certificat g\u00E9n\u00E9r\u00E9"},
+ {"the.generated.crl", "Liste des certificats r\u00E9voqu\u00E9s g\u00E9n\u00E9r\u00E9e"},
+ {"the.generated.certificate.request", "Demande de certificat g\u00E9n\u00E9r\u00E9"},
+ {"the.certificate", "Certificat"},
+ {"the.crl", "Liste de certificats r\u00E9voqu\u00E9s"},
+ {"the.tsa.certificate", "Certificat TSA"},
+ {"the.input", "Entr\u00E9e"},
+ {"reply", "R\u00E9pondre"},
+ {"one.in.many", "%s #%d sur %d"},
+ {"alias.in.cacerts", "Emetteur <%s> dans les certificats CA"},
+ {"alias.in.keystore", "Emetteur <%s>"},
+ {"with.weak", "%s (faible)"},
+ {"key.bit", "Cl\u00E9 %s %d bits"},
+ {"key.bit.weak", "Cl\u00E9 %s %d bits (faible)"},
+ {".PATTERN.printX509Cert.with.weak",
+ "Propri\u00E9taire : {0}\nEmetteur : {1}\nNum\u00E9ro de s\u00E9rie : {2}\nValide du {3} au {4}\nEmpreintes du certificat :\n\t SHA 1: {5}\n\t SHA 256: {6}\nNom de l''algorithme de signature : {7}\nAlgorithme de cl\u00E9 publique du sujet : {8}\nVersion : {9}"},
+ {"PKCS.10.with.weak",
+ "Demande de certificat PKCS #10 (version 1.0)\nSujet : %s\nFormat : %s\nCl\u00E9 publique : %s\nAlgorithme de signature : %s\n"},
+ {"verified.by.s.in.s.weak", "V\u00E9rifi\u00E9 par %s dans %s avec un \u00E9l\u00E9ment %s"},
+ {"whose.sigalg.risk", "%s utilise l'algorithme de signature %s, qui repr\u00E9sente un risque pour la s\u00E9curit\u00E9."},
+ {"whose.key.risk", "%s utilise un \u00E9l\u00E9ment %s, qui repr\u00E9sente un risque pour la s\u00E9curit\u00E9."},
};
--- a/jdk/src/java.base/share/classes/sun/security/tools/keytool/Resources_it.java Sat Jun 03 02:44:55 2017 +0000
+++ b/jdk/src/java.base/share/classes/sun/security/tools/keytool/Resources_it.java Sat Jun 03 03:48:03 2017 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2017, 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
@@ -357,8 +357,6 @@
{"Enter.alias.name.", "Immettere nome alias: "},
{".RETURN.if.same.as.for.otherAlias.",
"\t(INVIO se corrisponde al nome di <{0}>)"},
- {".PATTERN.printX509Cert",
- "Proprietario: {0}\nEmittente: {1}\nNumero di serie: {2}\nValido da: {3} a: {4}\nCopie di certificato:\n\t SHA1: {5}\n\t SHA256: {6}\nNome algoritmo firma: {7}\nAlgoritmo di chiave pubblica oggetto: {8} ({9,number,#})\nVersione: {10}"},
{"What.is.your.first.and.last.name.",
"Specificare nome e cognome"},
{"What.is.the.name.of.your.organizational.unit.",
@@ -421,15 +419,12 @@
{"Please.provide.keysize.for.secret.key.generation",
"Specificare il valore -keysize per la generazione della chiave segreta"},
- {"verified.by.s.in.s", "Verificato da %s in %s"},
{"warning.not.verified.make.sure.keystore.is.correct",
"AVVERTENZA: non verificato. Assicurarsi che -keystore sia corretto."},
{"Extensions.", "Estensioni: "},
{".Empty.value.", "(valore vuoto)"},
{"Extension.Request.", "Richiesta di estensione:"},
- {"PKCS.10.Certificate.Request.Version.1.0.Subject.s.Public.Key.s.format.s.key.",
- "Richiesta di certificato PKCS #10 (versione 1.0)\nOggetto: %s\nChiave pubblica: %s formato %s chiave\n"},
{"Unknown.keyUsage.type.", "Tipo keyUsage sconosciuto: "},
{"Unknown.extendedkeyUsage.type.", "Tipo extendedkeyUsage sconosciuto: "},
{"Unknown.AccessDescription.type.", "Tipo AccessDescription sconosciuto: "},
@@ -438,7 +433,33 @@
"Impossibile contrassegnare questa estensione come critica. "},
{"Odd.number.of.hex.digits.found.", "\u00C8 stato trovato un numero dispari di cifre esadecimali: "},
{"Unknown.extension.type.", "Tipo di estensione sconosciuto: "},
- {"command.{0}.is.ambiguous.", "il comando {0} \u00E8 ambiguo:"}
+ {"command.{0}.is.ambiguous.", "il comando {0} \u00E8 ambiguo:"},
+
+ // 8171319: keytool should print out warnings when reading or
+ // generating cert/cert req using weak algorithms
+ {"the.certificate.request", "La richiesta di certificato"},
+ {"the.issuer", "L'emittente"},
+ {"the.generated.certificate", "Il certificato generato"},
+ {"the.generated.crl", "La CRL generata"},
+ {"the.generated.certificate.request", "La richiesta di certificato generata"},
+ {"the.certificate", "Il certificato"},
+ {"the.crl", "La CRL"},
+ {"the.tsa.certificate", "Il certificato TSA"},
+ {"the.input", "L'input"},
+ {"reply", "Rispondi"},
+ {"one.in.many", "%s #%d di %d"},
+ {"alias.in.cacerts", "Emittente <%s> in cacerts"},
+ {"alias.in.keystore", "Emittente <%s>"},
+ {"with.weak", "%s (debole)"},
+ {"key.bit", "Chiave %s a %d bit"},
+ {"key.bit.weak", "Chiave %s a %d bit (debole)"},
+ {".PATTERN.printX509Cert.with.weak",
+ "Proprietario: {0}\nEmittente: {1}\nNumero di serie: {2}\nValido da: {3} a: {4}\nImpronte digitali certificato:\n\t SHA1: {5}\n\t SHA256: {6}\nNome algoritmo firma: {7}\nAlgoritmo di chiave pubblica oggetto: {8}\nVersione: {9}"},
+ {"PKCS.10.with.weak",
+ "Richiesta di certificato PKCS #10 (versione 1.0)\nOggetto: %s\nFormato: %s\nChiave pubblica: %s\nAlgoritmo firma: %s\n"},
+ {"verified.by.s.in.s.weak", "Verificato da %s in %s con un %s"},
+ {"whose.sigalg.risk", "%s utilizza l'algoritmo firma %s che \u00E8 considerato un rischio per la sicurezza."},
+ {"whose.key.risk", "%s utilizza un %s che \u00E8 considerato un rischio per la sicurezza."},
};
--- a/jdk/src/java.base/share/classes/sun/security/tools/keytool/Resources_ja.java Sat Jun 03 02:44:55 2017 +0000
+++ b/jdk/src/java.base/share/classes/sun/security/tools/keytool/Resources_ja.java Sat Jun 03 03:48:03 2017 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2017, 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
@@ -357,8 +357,6 @@
{"Enter.alias.name.", "\u5225\u540D\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044: "},
{".RETURN.if.same.as.for.otherAlias.",
"\t(<{0}>\u3068\u540C\u3058\u5834\u5408\u306FRETURN\u3092\u62BC\u3057\u3066\u304F\u3060\u3055\u3044)"},
- {".PATTERN.printX509Cert",
- "\u6240\u6709\u8005: {0}\n\u767A\u884C\u8005: {1}\n\u30B7\u30EA\u30A2\u30EB\u756A\u53F7: {2}\n\u6709\u52B9\u671F\u9593\u306E\u958B\u59CB\u65E5: {3}\u7D42\u4E86\u65E5: {4}\n\u8A3C\u660E\u66F8\u306E\u30D5\u30A3\u30F3\u30AC\u30D7\u30EA\u30F3\u30C8:\n\t SHA1: {5}\n\t SHA256: {6}\n\u7F72\u540D\u30A2\u30EB\u30B4\u30EA\u30BA\u30E0\u540D: {7}\n\u30B5\u30D6\u30B8\u30A7\u30AF\u30C8\u516C\u958B\u9375\u30A2\u30EB\u30B4\u30EA\u30BA\u30E0: {8} ({9,number,#})\n\u30D0\u30FC\u30B8\u30E7\u30F3: {10}"},
{"What.is.your.first.and.last.name.",
"\u59D3\u540D\u306F\u4F55\u3067\u3059\u304B\u3002"},
{"What.is.the.name.of.your.organizational.unit.",
@@ -421,15 +419,12 @@
{"Please.provide.keysize.for.secret.key.generation",
"\u79D8\u5BC6\u9375\u306E\u751F\u6210\u6642\u306B\u306F -keysize\u3092\u6307\u5B9A\u3057\u3066\u304F\u3060\u3055\u3044"},
- {"verified.by.s.in.s", "%s(%s\u5185)\u306B\u3088\u308A\u691C\u8A3C\u3055\u308C\u307E\u3057\u305F"},
{"warning.not.verified.make.sure.keystore.is.correct",
"\u8B66\u544A: \u691C\u8A3C\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002-keystore\u304C\u6B63\u3057\u3044\u3053\u3068\u3092\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044\u3002"},
{"Extensions.", "\u62E1\u5F35: "},
{".Empty.value.", "(\u7A7A\u306E\u5024)"},
{"Extension.Request.", "\u62E1\u5F35\u30EA\u30AF\u30A8\u30B9\u30C8:"},
- {"PKCS.10.Certificate.Request.Version.1.0.Subject.s.Public.Key.s.format.s.key.",
- "PKCS #10\u8A3C\u660E\u66F8\u30EA\u30AF\u30A8\u30B9\u30C8(\u30D0\u30FC\u30B8\u30E7\u30F31.0)\n\u30B5\u30D6\u30B8\u30A7\u30AF\u30C8: %s\n\u516C\u958B\u9375: %s \u30D5\u30A9\u30FC\u30DE\u30C3\u30C8 %s \u30AD\u30FC\n"},
{"Unknown.keyUsage.type.", "\u4E0D\u660E\u306AkeyUsage\u30BF\u30A4\u30D7: "},
{"Unknown.extendedkeyUsage.type.", "\u4E0D\u660E\u306AextendedkeyUsage\u30BF\u30A4\u30D7: "},
{"Unknown.AccessDescription.type.", "\u4E0D\u660E\u306AAccessDescription\u30BF\u30A4\u30D7: "},
@@ -438,7 +433,33 @@
"\u3053\u306E\u62E1\u5F35\u306F\u30AF\u30EA\u30C6\u30A3\u30AB\u30EB\u3068\u3057\u3066\u30DE\u30FC\u30AF\u4ED8\u3051\u3067\u304D\u307E\u305B\u3093\u3002 "},
{"Odd.number.of.hex.digits.found.", "\u5947\u6570\u306E16\u9032\u6570\u304C\u898B\u3064\u304B\u308A\u307E\u3057\u305F: "},
{"Unknown.extension.type.", "\u4E0D\u660E\u306A\u62E1\u5F35\u30BF\u30A4\u30D7: "},
- {"command.{0}.is.ambiguous.", "\u30B3\u30DE\u30F3\u30C9{0}\u306F\u3042\u3044\u307E\u3044\u3067\u3059:"}
+ {"command.{0}.is.ambiguous.", "\u30B3\u30DE\u30F3\u30C9{0}\u306F\u3042\u3044\u307E\u3044\u3067\u3059:"},
+
+ // 8171319: keytool should print out warnings when reading or
+ // generating cert/cert req using weak algorithms
+ {"the.certificate.request", "\u8A3C\u660E\u66F8\u30EA\u30AF\u30A8\u30B9\u30C8"},
+ {"the.issuer", "\u767A\u884C\u8005"},
+ {"the.generated.certificate", "\u751F\u6210\u3055\u308C\u305F\u8A3C\u660E\u66F8"},
+ {"the.generated.crl", "\u751F\u6210\u3055\u308C\u305FCRL"},
+ {"the.generated.certificate.request", "\u751F\u6210\u3055\u308C\u305F\u8A3C\u660E\u66F8\u30EA\u30AF\u30A8\u30B9\u30C8"},
+ {"the.certificate", "\u8A3C\u660E\u66F8"},
+ {"the.crl", "CRL"},
+ {"the.tsa.certificate", "TSA\u8A3C\u660E\u66F8"},
+ {"the.input", "\u5165\u529B"},
+ {"reply", "\u5FDC\u7B54"},
+ {"one.in.many", "%s #%d / %d"},
+ {"alias.in.cacerts", "cacerts\u5185\u306E\u767A\u884C\u8005<%s>"},
+ {"alias.in.keystore", "\u767A\u884C\u8005<%s>"},
+ {"with.weak", "%s (\u5F31)"},
+ {"key.bit", "%d\u30D3\u30C3\u30C8%s\u9375"},
+ {"key.bit.weak", "%d\u30D3\u30C3\u30C8%s\u9375(\u5F31)"},
+ {".PATTERN.printX509Cert.with.weak",
+ "\u6240\u6709\u8005: {0}\n\u767A\u884C\u8005: {1}\n\u30B7\u30EA\u30A2\u30EB\u756A\u53F7: {2}\n\u6709\u52B9\u671F\u9593\u306E\u958B\u59CB\u65E5: {3}\u7D42\u4E86\u65E5: {4}\n\u8A3C\u660E\u66F8\u306E\u30D5\u30A3\u30F3\u30AC\u30D7\u30EA\u30F3\u30C8:\n\t SHA1: {5}\n\t SHA256: {6}\n\u7F72\u540D\u30A2\u30EB\u30B4\u30EA\u30BA\u30E0\u540D: {7}\n\u30B5\u30D6\u30B8\u30A7\u30AF\u30C8\u516C\u958B\u9375\u30A2\u30EB\u30B4\u30EA\u30BA\u30E0: {8}\n\u30D0\u30FC\u30B8\u30E7\u30F3: {9}"},
+ {"PKCS.10.with.weak",
+ "PKCS #10\u8A3C\u660E\u66F8\u30EA\u30AF\u30A8\u30B9\u30C8(\u30D0\u30FC\u30B8\u30E7\u30F31.0)\n\u30B5\u30D6\u30B8\u30A7\u30AF\u30C8: %s\n\u30D5\u30A9\u30FC\u30DE\u30C3\u30C8 %s\n\u516C\u958B\u9375: %s\n\u7F72\u540D\u30A2\u30EB\u30B4\u30EA\u30BA\u30E0: %s\n"},
+ {"verified.by.s.in.s.weak", "%s(%s\u5185)\u306B\u3088\u308A%s\u3067\u691C\u8A3C\u3055\u308C\u307E\u3057\u305F"},
+ {"whose.sigalg.risk", "%s\u306F\u30BB\u30AD\u30E5\u30EA\u30C6\u30A3\u30FB\u30EA\u30B9\u30AF\u3068\u307F\u306A\u3055\u308C\u308B%s\u7F72\u540D\u30A2\u30EB\u30B4\u30EA\u30BA\u30E0\u3092\u4F7F\u7528\u3057\u3066\u3044\u307E\u3059\u3002"},
+ {"whose.key.risk", "%s\u306F\u30BB\u30AD\u30E5\u30EA\u30C6\u30A3\u30FB\u30EA\u30B9\u30AF\u3068\u307F\u306A\u3055\u308C\u308B%s\u3092\u4F7F\u7528\u3057\u3066\u3044\u307E\u3059\u3002"},
};
--- a/jdk/src/java.base/share/classes/sun/security/tools/keytool/Resources_ko.java Sat Jun 03 02:44:55 2017 +0000
+++ b/jdk/src/java.base/share/classes/sun/security/tools/keytool/Resources_ko.java Sat Jun 03 03:48:03 2017 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2017, 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
@@ -325,7 +325,7 @@
"\uD0A4 \uC800\uC7A5\uC18C\uC5D0 {0,number,integer}\uAC1C\uC758 \uD56D\uBAA9\uC774 \uD3EC\uD568\uB418\uC5B4 \uC788\uC2B5\uB2C8\uB2E4."},
{"Your.keystore.contains.keyStore.size.entries",
"\uD0A4 \uC800\uC7A5\uC18C\uC5D0 {0,number,integer}\uAC1C\uC758 \uD56D\uBAA9\uC774 \uD3EC\uD568\uB418\uC5B4 \uC788\uC2B5\uB2C8\uB2E4."},
- {"Failed.to.parse.input", "\uC785\uB825\uAC12\uC758 \uAD6C\uBB38 \uBD84\uC11D\uC744 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4."},
+ {"Failed.to.parse.input", "\uC785\uB825\uAC12\uC758 \uAD6C\uBB38\uBD84\uC11D\uC744 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4."},
{"Empty.input", "\uC785\uB825\uAC12\uC774 \uBE44\uC5B4 \uC788\uC2B5\uB2C8\uB2E4."},
{"Not.X.509.certificate", "X.509 \uC778\uC99D\uC11C\uAC00 \uC544\uB2D9\uB2C8\uB2E4."},
{"alias.has.no.public.key", "{0}\uC5D0 \uACF5\uC6A9 \uD0A4\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."},
@@ -357,8 +357,6 @@
{"Enter.alias.name.", "\uBCC4\uCE6D \uC774\uB984 \uC785\uB825: "},
{".RETURN.if.same.as.for.otherAlias.",
"\t(<{0}>\uACFC(\uC640) \uB3D9\uC77C\uD55C \uACBD\uC6B0 Enter \uD0A4\uB97C \uB204\uB984)"},
- {".PATTERN.printX509Cert",
- "\uC18C\uC720\uC790: {0}\n\uBC1C\uD589\uC790: {1}\n\uC77C\uB828 \uBC88\uD638: {2}\n\uC801\uD569\uD55C \uC2DC\uC791 \uB0A0\uC9DC: {3} \uC885\uB8CC \uB0A0\uC9DC: {4}\n\uC778\uC99D\uC11C \uC9C0\uBB38:\n\t SHA1: {5}\n\t SHA256: {6}\n\uC11C\uBA85 \uC54C\uACE0\uB9AC\uC998 \uC774\uB984: {7}\n\uC8FC\uCCB4 \uACF5\uC6A9 \uD0A4 \uC54C\uACE0\uB9AC\uC998: {8} ({9,number,#})\n\uBC84\uC804: {10}"},
{"What.is.your.first.and.last.name.",
"\uC774\uB984\uACFC \uC131\uC744 \uC785\uB825\uD558\uC2ED\uC2DC\uC624."},
{"What.is.the.name.of.your.organizational.unit.",
@@ -421,15 +419,12 @@
{"Please.provide.keysize.for.secret.key.generation",
"\uBCF4\uC548 \uD0A4\uB97C \uC0DD\uC131\uD558\uB824\uBA74 -keysize\uB97C \uC81C\uACF5\uD558\uC2ED\uC2DC\uC624."},
- {"verified.by.s.in.s", "%s(%s)\uC5D0 \uC758\uD574 \uD655\uC778\uB428"},
{"warning.not.verified.make.sure.keystore.is.correct",
"\uACBD\uACE0: \uD655\uC778\uB418\uC9C0 \uC54A\uC74C. -keystore\uAC00 \uC62C\uBC14\uB978\uC9C0 \uD655\uC778\uD558\uC2ED\uC2DC\uC624."},
{"Extensions.", "\uD655\uC7A5: "},
{".Empty.value.", "(\uBE44\uC5B4 \uC788\uB294 \uAC12)"},
{"Extension.Request.", "\uD655\uC7A5 \uC694\uCCAD:"},
- {"PKCS.10.Certificate.Request.Version.1.0.Subject.s.Public.Key.s.format.s.key.",
- "PKCS #10 \uC778\uC99D\uC11C \uC694\uCCAD(1.0 \uBC84\uC804)\n\uC81C\uBAA9: %s\n\uACF5\uC6A9 \uD0A4: %s \uD615\uC2DD %s \uD0A4\n"},
{"Unknown.keyUsage.type.", "\uC54C \uC218 \uC5C6\uB294 keyUsage \uC720\uD615: "},
{"Unknown.extendedkeyUsage.type.", "\uC54C \uC218 \uC5C6\uB294 extendedkeyUsage \uC720\uD615: "},
{"Unknown.AccessDescription.type.", "\uC54C \uC218 \uC5C6\uB294 AccessDescription \uC720\uD615: "},
@@ -438,7 +433,33 @@
"\uC774 \uD655\uC7A5\uC740 \uC911\uC694\uD55C \uAC83\uC73C\uB85C \uD45C\uC2DC\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. "},
{"Odd.number.of.hex.digits.found.", "\uD640\uC218 \uAC1C\uC758 16\uC9C4\uC218\uAC00 \uBC1C\uACAC\uB428: "},
{"Unknown.extension.type.", "\uC54C \uC218 \uC5C6\uB294 \uD655\uC7A5 \uC720\uD615: "},
- {"command.{0}.is.ambiguous.", "{0} \uBA85\uB839\uC774 \uBAA8\uD638\uD568:"}
+ {"command.{0}.is.ambiguous.", "{0} \uBA85\uB839\uC774 \uBAA8\uD638\uD568:"},
+
+ // 8171319: keytool should print out warnings when reading or
+ // generating cert/cert req using weak algorithms
+ {"the.certificate.request", "\uC778\uC99D\uC11C \uC694\uCCAD"},
+ {"the.issuer", "\uBC1C\uD589\uC790"},
+ {"the.generated.certificate", "\uC0DD\uC131\uB41C \uC778\uC99D\uC11C"},
+ {"the.generated.crl", "\uC0DD\uC131\uB41C CRL"},
+ {"the.generated.certificate.request", "\uC0DD\uC131\uB41C \uC778\uC99D\uC11C \uC694\uCCAD"},
+ {"the.certificate", "\uC778\uC99D\uC11C"},
+ {"the.crl", "CRL"},
+ {"the.tsa.certificate", "TSA \uC778\uC99D\uC11C"},
+ {"the.input", "\uC785\uB825"},
+ {"reply", "\uD68C\uC2E0"},
+ {"one.in.many", "%s #%d/%d"},
+ {"alias.in.cacerts", "cacerts\uC758 <%s> \uBC1C\uD589\uC790"},
+ {"alias.in.keystore", "<%s> \uBC1C\uD589\uC790"},
+ {"with.weak", "%s(\uC57D\uD568)"},
+ {"key.bit", "%d\uBE44\uD2B8 %s \uD0A4"},
+ {"key.bit.weak", "%d\uBE44\uD2B8 %s \uD0A4(\uC57D\uD568)"},
+ {".PATTERN.printX509Cert.with.weak",
+ "\uC18C\uC720\uC790: {0}\n\uBC1C\uD589\uC790: {1}\n\uC77C\uB828 \uBC88\uD638: {2}\n\uC801\uD569\uD55C \uC2DC\uC791 \uB0A0\uC9DC: {3} \uC885\uB8CC \uB0A0\uC9DC: {4}\n\uC778\uC99D\uC11C \uC9C0\uBB38:\n\t SHA1: {5}\n\t SHA256: {6}\n\uC11C\uBA85 \uC54C\uACE0\uB9AC\uC998 \uC774\uB984: {7}\n\uC8FC\uCCB4 \uACF5\uC6A9 \uD0A4 \uC54C\uACE0\uB9AC\uC998: {8}\n\uBC84\uC804: {9}"},
+ {"PKCS.10.with.weak",
+ "PKCS #10 \uC778\uC99D\uC11C \uC694\uCCAD(1.0 \uBC84\uC804)\n\uC81C\uBAA9: %s\n\uD615\uC2DD: %s\n\uACF5\uC6A9 \uD0A4: %s\n\uC11C\uBA85 \uC54C\uACE0\uB9AC\uC998: %s\n"},
+ {"verified.by.s.in.s.weak", "%s\uC774(\uAC00) %s\uC5D0\uC11C %s\uC744(\uB97C) \uC0AC\uC6A9\uD558\uC5EC \uD655\uC778"},
+ {"whose.sigalg.risk", "%s\uC774(\uAC00) \uBCF4\uC548 \uC704\uD5D8\uC73C\uB85C \uAC04\uC8FC\uB418\uB294 %s \uC11C\uBA85 \uC54C\uACE0\uB9AC\uC998\uC744 \uC0AC\uC6A9\uD569\uB2C8\uB2E4."},
+ {"whose.key.risk", "%s\uC774(\uAC00) \uBCF4\uC548 \uC704\uD5D8\uC73C\uB85C \uAC04\uC8FC\uB418\uB294 %s\uC744(\uB97C) \uC0AC\uC6A9\uD569\uB2C8\uB2E4."},
};
--- a/jdk/src/java.base/share/classes/sun/security/tools/keytool/Resources_pt_BR.java Sat Jun 03 02:44:55 2017 +0000
+++ b/jdk/src/java.base/share/classes/sun/security/tools/keytool/Resources_pt_BR.java Sat Jun 03 03:48:03 2017 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2017, 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
@@ -357,8 +357,6 @@
{"Enter.alias.name.", "Informe o nome do alias: "},
{".RETURN.if.same.as.for.otherAlias.",
"\t(RETURN se for igual ao de <{0}>)"},
- {".PATTERN.printX509Cert",
- "Propriet\u00E1rio: {0}\nEmissor: {1}\nN\u00FAmero de s\u00E9rie: {2}\nV\u00E1lido de {3} at\u00E9 {4}\nFingerprints do certificado:\n\t SHA1: {5}\n\t SHA256: {6}\nNome do algoritmo de assinatura: {7}\nAlgoritmo de Chave P\u00FAblica do Assunto: {8} ({9,number,#})\nVers\u00E3o: {10}"},
{"What.is.your.first.and.last.name.",
"Qual \u00E9 o seu nome e o seu sobrenome?"},
{"What.is.the.name.of.your.organizational.unit.",
@@ -421,15 +419,12 @@
{"Please.provide.keysize.for.secret.key.generation",
"Forne\u00E7a o -keysize para a gera\u00E7\u00E3o da chave secreta"},
- {"verified.by.s.in.s", "Verificado por %s em %s"},
{"warning.not.verified.make.sure.keystore.is.correct",
"ADVERT\u00CANCIA: n\u00E3o verificado. Certifique-se que -keystore esteja correto."},
{"Extensions.", "Extens\u00F5es: "},
{".Empty.value.", "(Valor vazio)"},
{"Extension.Request.", "Solicita\u00E7\u00E3o de Extens\u00E3o:"},
- {"PKCS.10.Certificate.Request.Version.1.0.Subject.s.Public.Key.s.format.s.key.",
- "Solicita\u00E7\u00E3o do Certificado PKCS #10 (Vers\u00E3o 1.0)\nAssunto: %s\nChave P\u00FAblica: %s formato %s chave\n"},
{"Unknown.keyUsage.type.", "Tipo de keyUsage desconhecido: "},
{"Unknown.extendedkeyUsage.type.", "Tipo de extendedkeyUsage desconhecido: "},
{"Unknown.AccessDescription.type.", "Tipo de AccessDescription desconhecido: "},
@@ -438,7 +433,33 @@
"Esta extens\u00E3o n\u00E3o pode ser marcada como cr\u00EDtica. "},
{"Odd.number.of.hex.digits.found.", "Encontrado n\u00FAmero \u00EDmpar de seis d\u00EDgitos: "},
{"Unknown.extension.type.", "Tipo de extens\u00E3o desconhecido: "},
- {"command.{0}.is.ambiguous.", "o comando {0} \u00E9 amb\u00EDguo:"}
+ {"command.{0}.is.ambiguous.", "o comando {0} \u00E9 amb\u00EDguo:"},
+
+ // 8171319: keytool should print out warnings when reading or
+ // generating cert/cert req using weak algorithms
+ {"the.certificate.request", "A solicita\u00E7\u00E3o do certificado"},
+ {"the.issuer", "O emissor"},
+ {"the.generated.certificate", "O certificado gerado"},
+ {"the.generated.crl", "A CRL gerada"},
+ {"the.generated.certificate.request", "A solicita\u00E7\u00E3o do certificado gerada"},
+ {"the.certificate", "O certificado"},
+ {"the.crl", "A CRL"},
+ {"the.tsa.certificate", "O certificado TSA"},
+ {"the.input", "A entrada"},
+ {"reply", "Resposta"},
+ {"one.in.many", "%s #%d de %d"},
+ {"alias.in.cacerts", "Emissor <%s> no cacerts"},
+ {"alias.in.keystore", "Emissor <%s>"},
+ {"with.weak", "%s (fraca)"},
+ {"key.bit", "Chave %s de %d bits"},
+ {"key.bit.weak", "Chave %s de %d bits (fraca)"},
+ {".PATTERN.printX509Cert.with.weak",
+ "Propriet\u00E1rio: {0}\nEmissor: {1}\nN\u00FAmero de s\u00E9rie: {2}\nV\u00E1lido de: {3} at\u00E9: {4}\nFingerprints do certificado:\n\t SHA1: {5}\n\t SHA256: {6}\nNome do algoritmo de assinatura: {7}\nAlgoritmo de Chave P\u00FAblica do Assunto: {8}\nVers\u00E3o: {9}"},
+ {"PKCS.10.with.weak",
+ "Solicita\u00E7\u00E3o do Certificado PKCS #10 (Vers\u00E3o 1.0)\nAssunto: %s\nFormato: %s\nChave P\u00FAblica: %s\nAlgoritmo de assinatura: %s\n"},
+ {"verified.by.s.in.s.weak", "Verificado por %s em %s com um %s"},
+ {"whose.sigalg.risk", "%s usa o algoritmo de assinatura %s que \u00E9 considerado um risco \u00E0 seguran\u00E7a."},
+ {"whose.key.risk", "%s usa um %s que \u00E9 considerado um risco \u00E0 seguran\u00E7a."},
};
--- a/jdk/src/java.base/share/classes/sun/security/tools/keytool/Resources_sv.java Sat Jun 03 02:44:55 2017 +0000
+++ b/jdk/src/java.base/share/classes/sun/security/tools/keytool/Resources_sv.java Sat Jun 03 03:48:03 2017 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2017, 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
@@ -55,7 +55,7 @@
{"Changes.an.entry.s.alias",
"\u00C4ndrar postalias"}, //-changealias
{"Deletes.an.entry",
- "Tar bort post"}, //-delete
+ "Tar bort en post"}, //-delete
{"Exports.certificate",
"Exporterar certifikat"}, //-exportcert
{"Generates.a.key.pair",
@@ -183,7 +183,7 @@
{"validity.number.of.days",
"antal dagar f\u00F6r giltighet"}, //-validity
{"Serial.ID.of.cert.to.revoke",
- "Seriellt id f\u00F6r certifikat som ska \u00E5terkallas"}, //-id
+ "Serienummer p\u00E5 certifikat som ska \u00E5terkallas"}, //-id
// keytool: Running part
{"keytool.error.", "nyckelverktygsfel: "},
{"Illegal.option.", "Otill\u00E5tet alternativ: "},
@@ -278,7 +278,7 @@
"Certifikatet har inte lagts till i nyckellagret"},
{".Storing.ksfname.", "[Lagrar {0}]"},
{"alias.has.no.public.key.certificate.",
- "{0} saknar offentlig nyckel (certifikat)"},
+ "{0} saknar \u00F6ppen nyckel (certifikat)"},
{"Cannot.derive.signature.algorithm",
"Kan inte h\u00E4rleda signaturalgoritm"},
{"Alias.alias.does.not.exist",
@@ -328,7 +328,7 @@
{"Failed.to.parse.input", "Kunde inte tolka indata"},
{"Empty.input", "Inga indata"},
{"Not.X.509.certificate", "Inte ett X.509-certifikat"},
- {"alias.has.no.public.key", "{0} saknar offentlig nyckel"},
+ {"alias.has.no.public.key", "{0} saknar \u00F6ppen nyckel"},
{"alias.has.no.X.509.certificate", "{0} saknar X.509-certifikat"},
{"New.certificate.self.signed.", "Nytt certifikat (sj\u00E4lvsignerat):"},
{"Reply.has.no.certificates", "Svaret saknar certifikat"},
@@ -357,8 +357,6 @@
{"Enter.alias.name.", "Ange aliasnamn: "},
{".RETURN.if.same.as.for.otherAlias.",
"\t(RETURN om det \u00E4r det samma som f\u00F6r <{0}>)"},
- {".PATTERN.printX509Cert",
- "\u00C4gare: {0}\nUtf\u00E4rdare: {1}\nSerienummer: {2}\nGiltigt fr\u00E5n: {3}, till: {4}\nCertifikatfingeravtryck:\n\t SHA1: {5}\n\t SHA256: {6}\nSignaturalgoritmnamn: {7}\n\u00C4mne f\u00F6r algoritm f\u00F6r \u00F6ppen nyckel: {8} ({9,number,#})\nVersion: {10}"},
{"What.is.your.first.and.last.name.",
"Vad heter du i f\u00F6r- och efternamn?"},
{"What.is.the.name.of.your.organizational.unit.",
@@ -383,7 +381,7 @@
{".WARNING.WARNING.WARNING.",
"***************** WARNING WARNING WARNING *****************"},
- {"Signer.d.", "Signerare #%d:"},
+ {"Signer.d.", "Undertecknare %d:"},
{"Timestamp.", "Tidsst\u00E4mpel:"},
{"Signature.", "Signatur:"},
{"CRLs.", "CRL:er:"},
@@ -398,7 +396,7 @@
"* Integriteten f\u00F6r den information som lagras i srckeystore*\n* har INTE verifierats! Om du vill verifiera dess integritet *\n* m\u00E5ste du ange l\u00F6senordet f\u00F6r srckeystore. *"},
{"Certificate.reply.does.not.contain.public.key.for.alias.",
- "Certifikatsvaret inneh\u00E5ller inte n\u00E5gon offentlig nyckel f\u00F6r <{0}>"},
+ "Certifikatsvaret inneh\u00E5ller inte n\u00E5gon \u00F6ppen nyckel f\u00F6r <{0}>"},
{"Incomplete.certificate.chain.in.reply",
"Ofullst\u00E4ndig certifikatskedja i svaret"},
{"Certificate.chain.in.reply.does.not.verify.",
@@ -421,15 +419,12 @@
{"Please.provide.keysize.for.secret.key.generation",
"Ange -keysize f\u00F6r att skapa hemlig nyckel"},
- {"verified.by.s.in.s", "Verifierad av %s i %s"},
{"warning.not.verified.make.sure.keystore.is.correct",
"VARNING: ej verifierad. Se till att -nyckellager \u00E4r korrekt."},
{"Extensions.", "Till\u00E4gg: "},
{".Empty.value.", "(Tomt v\u00E4rde)"},
{"Extension.Request.", "Till\u00E4ggsbeg\u00E4ran:"},
- {"PKCS.10.Certificate.Request.Version.1.0.Subject.s.Public.Key.s.format.s.key.",
- "PKCS #10 certifikatbeg\u00E4ran (version 1.0)\n\u00C4mne: %s\nAllm\u00E4n nyckel: %s-format %s-nyckel\n"},
{"Unknown.keyUsage.type.", "Ok\u00E4nd keyUsage-typ: "},
{"Unknown.extendedkeyUsage.type.", "Ok\u00E4nd extendedkeyUsage-typ: "},
{"Unknown.AccessDescription.type.", "Ok\u00E4nd AccessDescription-typ: "},
@@ -438,7 +433,33 @@
"Detta till\u00E4gg kan inte markeras som kritiskt. "},
{"Odd.number.of.hex.digits.found.", "Udda antal hex-siffror p\u00E5tr\u00E4ffades: "},
{"Unknown.extension.type.", "Ok\u00E4nd till\u00E4ggstyp: "},
- {"command.{0}.is.ambiguous.", "kommandot {0} \u00E4r tvetydigt:"}
+ {"command.{0}.is.ambiguous.", "kommandot {0} \u00E4r tvetydigt:"},
+
+ // 8171319: keytool should print out warnings when reading or
+ // generating cert/cert req using weak algorithms
+ {"the.certificate.request", "Certifikatbeg\u00E4ran"},
+ {"the.issuer", "Utf\u00E4rdaren"},
+ {"the.generated.certificate", "Det genererade certifikatet"},
+ {"the.generated.crl", "Den genererade listan \u00F6ver \u00E5terkallade certifikat"},
+ {"the.generated.certificate.request", "Den genererade certifikatbeg\u00E4ran"},
+ {"the.certificate", "Certifikatet"},
+ {"the.crl", "Listan \u00F6ver \u00E5terkallade certifikat"},
+ {"the.tsa.certificate", "TSA-certifikatet"},
+ {"the.input", "Indata"},
+ {"reply", "Svar"},
+ {"one.in.many", "%s %d av %d"},
+ {"alias.in.cacerts", "Utf\u00E4rdaren <%s> i cacerts"},
+ {"alias.in.keystore", "Utf\u00E4rdaren <%s>"},
+ {"with.weak", "%s (svag)"},
+ {"key.bit", "%d-bitars %s-nyckel"},
+ {"key.bit.weak", "%d-bitars %s-nyckel (svag)"},
+ {".PATTERN.printX509Cert.with.weak",
+ "\u00C4gare: {0}\nUtf\u00E4rdare: {1}\nSerienummer: {2}\nGiltigt fr\u00E5n: {3}, till: {4}\nCertifikatfingeravtryck:\n\t SHA1: {5}\n\t SHA256: {6}\nSignaturalgoritmnamn: {7}\nAlgoritm f\u00F6r \u00F6ppen nyckel f\u00F6r \u00E4mne: {8}\nVersion: {9}"},
+ {"PKCS.10.with.weak",
+ "PKCS #10-certifikatbeg\u00E4ran (version 1.0)\n\u00C4mne: %s\nFormat: %s\n\u00D6ppen nyckel: %s\nSignaturalgoritm: %s\n"},
+ {"verified.by.s.in.s.weak", "Verifierades av %s i %s med en %s"},
+ {"whose.sigalg.risk", "%s anv\u00E4nder signaturalgoritmen %s, vilket anses utg\u00F6ra en s\u00E4kerhetsrisk."},
+ {"whose.key.risk", "%s anv\u00E4nder en %s, vilket anses utg\u00F6ra en s\u00E4kerhetsrisk."},
};
--- a/jdk/src/java.base/share/classes/sun/security/tools/keytool/Resources_zh_CN.java Sat Jun 03 02:44:55 2017 +0000
+++ b/jdk/src/java.base/share/classes/sun/security/tools/keytool/Resources_zh_CN.java Sat Jun 03 03:48:03 2017 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2017, 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
@@ -357,8 +357,6 @@
{"Enter.alias.name.", "\u8F93\u5165\u522B\u540D: "},
{".RETURN.if.same.as.for.otherAlias.",
"\t(\u5982\u679C\u548C <{0}> \u76F8\u540C, \u5219\u6309\u56DE\u8F66)"},
- {".PATTERN.printX509Cert",
- "\u6240\u6709\u8005: {0}\n\u53D1\u5E03\u8005: {1}\n\u5E8F\u5217\u53F7: {2}\n\u751F\u6548\u65F6\u95F4: {3}, \u5931\u6548\u65F6\u95F4: {4}\n\u8BC1\u4E66\u6307\u7EB9:\n\t SHA1: {5}\n\t SHA256: {6}\n\u7B7E\u540D\u7B97\u6CD5\u540D\u79F0: {7}\n\u4E3B\u4F53\u516C\u5171\u5BC6\u94A5\u7B97\u6CD5: {8} ({9,number,#})\n\u7248\u672C: {10}"},
{"What.is.your.first.and.last.name.",
"\u60A8\u7684\u540D\u5B57\u4E0E\u59D3\u6C0F\u662F\u4EC0\u4E48?"},
{"What.is.the.name.of.your.organizational.unit.",
@@ -421,15 +419,12 @@
{"Please.provide.keysize.for.secret.key.generation",
"\u8BF7\u63D0\u4F9B -keysize \u4EE5\u751F\u6210\u5BC6\u94A5"},
- {"verified.by.s.in.s", "\u7531 %s \u9A8C\u8BC1(\u5728 %s \u4E2D)"},
{"warning.not.verified.make.sure.keystore.is.correct",
"\u8B66\u544A: \u672A\u9A8C\u8BC1\u3002\u8BF7\u786E\u4FDD\u5BC6\u94A5\u5E93\u662F\u6B63\u786E\u7684\u3002"},
{"Extensions.", "\u6269\u5C55: "},
{".Empty.value.", "(\u7A7A\u503C)"},
{"Extension.Request.", "\u6269\u5C55\u8BF7\u6C42:"},
- {"PKCS.10.Certificate.Request.Version.1.0.Subject.s.Public.Key.s.format.s.key.",
- "PKCS #10 \u8BC1\u4E66\u8BF7\u6C42 (\u7248\u672C 1.0)\n\u4E3B\u9898: %s\n\u516C\u5171\u5BC6\u94A5: %s \u683C\u5F0F %s \u5BC6\u94A5\n"},
{"Unknown.keyUsage.type.", "\u672A\u77E5 keyUsage \u7C7B\u578B: "},
{"Unknown.extendedkeyUsage.type.", "\u672A\u77E5 extendedkeyUsage \u7C7B\u578B: "},
{"Unknown.AccessDescription.type.", "\u672A\u77E5 AccessDescription \u7C7B\u578B: "},
@@ -438,7 +433,33 @@
"\u65E0\u6CD5\u5C06\u6B64\u6269\u5C55\u6807\u8BB0\u4E3A\u201C\u4E25\u91CD\u201D\u3002"},
{"Odd.number.of.hex.digits.found.", "\u627E\u5230\u5947\u6570\u4E2A\u5341\u516D\u8FDB\u5236\u6570\u5B57: "},
{"Unknown.extension.type.", "\u672A\u77E5\u6269\u5C55\u7C7B\u578B: "},
- {"command.{0}.is.ambiguous.", "\u547D\u4EE4{0}\u4E0D\u660E\u786E:"}
+ {"command.{0}.is.ambiguous.", "\u547D\u4EE4{0}\u4E0D\u660E\u786E:"},
+
+ // 8171319: keytool should print out warnings when reading or
+ // generating cert/cert req using weak algorithms
+ {"the.certificate.request", "\u8BC1\u4E66\u8BF7\u6C42"},
+ {"the.issuer", "\u53D1\u5E03\u8005"},
+ {"the.generated.certificate", "\u751F\u6210\u7684\u8BC1\u4E66"},
+ {"the.generated.crl", "\u751F\u6210\u7684 CRL"},
+ {"the.generated.certificate.request", "\u751F\u6210\u7684\u8BC1\u4E66\u8BF7\u6C42"},
+ {"the.certificate", "\u8BC1\u4E66"},
+ {"the.crl", "CRL"},
+ {"the.tsa.certificate", "TSA \u8BC1\u4E66"},
+ {"the.input", "\u8F93\u5165"},
+ {"reply", "\u56DE\u590D"},
+ {"one.in.many", "%s #%d/%d"},
+ {"alias.in.cacerts", "cacerts \u4E2D\u7684\u53D1\u5E03\u8005 <%s>"},
+ {"alias.in.keystore", "\u53D1\u5E03\u8005 <%s>"},
+ {"with.weak", "%s (\u5F31)"},
+ {"key.bit", "%d \u4F4D %s \u5BC6\u94A5"},
+ {"key.bit.weak", "%d \u4F4D %s \u5BC6\u94A5 (\u5F31)"},
+ {".PATTERN.printX509Cert.with.weak",
+ "\u6240\u6709\u8005: {0}\n\u53D1\u5E03\u8005: {1}\n\u5E8F\u5217\u53F7: {2}\n\u751F\u6548\u65F6\u95F4: {3}, \u5931\u6548\u65F6\u95F4: {4}\n\u8BC1\u4E66\u6307\u7EB9:\n\t SHA1: {5}\n\t SHA256: {6}\n\u7B7E\u540D\u7B97\u6CD5\u540D\u79F0: {7}\n\u4E3B\u4F53\u516C\u5171\u5BC6\u94A5\u7B97\u6CD5: {8}\n\u7248\u672C: {9}"},
+ {"PKCS.10.with.weak",
+ "PKCS #10 \u8BC1\u4E66\u8BF7\u6C42 (\u7248\u672C 1.0)\n\u4E3B\u4F53: %s\n\u683C\u5F0F: %s\n\u516C\u5171\u5BC6\u94A5: %s\n\u7B7E\u540D\u7B97\u6CD5: %s\n"},
+ {"verified.by.s.in.s.weak", "\u7531 %2$s \u4E2D\u7684 %1$s \u4EE5 %3$s \u9A8C\u8BC1"},
+ {"whose.sigalg.risk", "%s \u4F7F\u7528\u7684 %s \u7B7E\u540D\u7B97\u6CD5\u5B58\u5728\u5B89\u5168\u98CE\u9669\u3002"},
+ {"whose.key.risk", "%s \u4F7F\u7528\u7684 %s \u5B58\u5728\u5B89\u5168\u98CE\u9669\u3002"},
};
--- a/jdk/src/java.base/share/classes/sun/security/tools/keytool/Resources_zh_TW.java Sat Jun 03 02:44:55 2017 +0000
+++ b/jdk/src/java.base/share/classes/sun/security/tools/keytool/Resources_zh_TW.java Sat Jun 03 03:48:03 2017 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2017, 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
@@ -357,8 +357,6 @@
{"Enter.alias.name.", "\u8F38\u5165\u5225\u540D\u540D\u7A31: "},
{".RETURN.if.same.as.for.otherAlias.",
"\t(RETURN \u5982\u679C\u548C <{0}> \u7684\u76F8\u540C)"},
- {".PATTERN.printX509Cert",
- "\u64C1\u6709\u8005: {0}\n\u767C\u51FA\u8005: {1}\n\u5E8F\u865F: {2}\n\u6709\u6548\u671F\u81EA: {3} \u5230: {4}\n\u6191\u8B49\u6307\u7D0B:\n\t SHA1: {5}\n\t SHA256: {6}\n\u7C3D\u7AE0\u6F14\u7B97\u6CD5\u540D\u7A31: {7}\n\u4E3B\u9AD4\u516C\u958B\u91D1\u9470\u6F14\u7B97\u6CD5: {8} ({9,number,#})\n\u7248\u672C: {10}"},
{"What.is.your.first.and.last.name.",
"\u60A8\u7684\u540D\u5B57\u8207\u59D3\u6C0F\u70BA\u4F55\uFF1F"},
{"What.is.the.name.of.your.organizational.unit.",
@@ -421,15 +419,12 @@
{"Please.provide.keysize.for.secret.key.generation",
"\u8ACB\u63D0\u4F9B -keysize \u4EE5\u7522\u751F\u79D8\u5BC6\u91D1\u9470"},
- {"verified.by.s.in.s", "\u7531 %s \u9A57\u8B49 (\u5728 %s \u4E2D)"},
{"warning.not.verified.make.sure.keystore.is.correct",
"\u8B66\u544A: \u672A\u9A57\u8B49\u3002\u8ACB\u78BA\u5B9A -keystore \u6B63\u78BA\u3002"},
{"Extensions.", "\u64F4\u5145\u5957\u4EF6: "},
{".Empty.value.", "(\u7A7A\u767D\u503C)"},
{"Extension.Request.", "\u64F4\u5145\u5957\u4EF6\u8981\u6C42:"},
- {"PKCS.10.Certificate.Request.Version.1.0.Subject.s.Public.Key.s.format.s.key.",
- "PKCS #10 \u6191\u8B49\u8981\u6C42 (\u7248\u672C 1.0)\n\u4E3B\u9AD4: %s\n\u516C\u7528\u91D1\u9470: %s \u683C\u5F0F %s \u91D1\u9470\n"},
{"Unknown.keyUsage.type.", "\u4E0D\u660E\u7684 keyUsage \u985E\u578B: "},
{"Unknown.extendedkeyUsage.type.", "\u4E0D\u660E\u7684 extendedkeyUsage \u985E\u578B: "},
{"Unknown.AccessDescription.type.", "\u4E0D\u660E\u7684 AccessDescription \u985E\u578B: "},
@@ -438,7 +433,33 @@
"\u6B64\u64F4\u5145\u5957\u4EF6\u7121\u6CD5\u6A19\u793A\u70BA\u95DC\u9375\u3002"},
{"Odd.number.of.hex.digits.found.", "\u627E\u5230\u5341\u516D\u9032\u4F4D\u6578\u5B57\u7684\u5947\u6578: "},
{"Unknown.extension.type.", "\u4E0D\u660E\u7684\u64F4\u5145\u5957\u4EF6\u985E\u578B: "},
- {"command.{0}.is.ambiguous.", "\u547D\u4EE4 {0} \u4E0D\u660E\u78BA:"}
+ {"command.{0}.is.ambiguous.", "\u547D\u4EE4 {0} \u4E0D\u660E\u78BA:"},
+
+ // 8171319: keytool should print out warnings when reading or
+ // generating cert/cert req using weak algorithms
+ {"the.certificate.request", "\u6191\u8B49\u8981\u6C42"},
+ {"the.issuer", "\u767C\u884C\u4EBA"},
+ {"the.generated.certificate", "\u7522\u751F\u7684\u6191\u8B49"},
+ {"the.generated.crl", "\u7522\u751F\u7684 CRL"},
+ {"the.generated.certificate.request", "\u7522\u751F\u7684\u6191\u8B49\u8981\u6C42"},
+ {"the.certificate", "\u6191\u8B49"},
+ {"the.crl", "CRL"},
+ {"the.tsa.certificate", "TSA \u6191\u8B49"},
+ {"the.input", "\u8F38\u5165"},
+ {"reply", "\u56DE\u8986"},
+ {"one.in.many", "%s #%d / %d"},
+ {"alias.in.cacerts", "cacerts \u4E2D\u7684\u767C\u884C\u4EBA <%s>"},
+ {"alias.in.keystore", "\u767C\u884C\u4EBA <%s>"},
+ {"with.weak", "%s (\u4F4E\u5F37\u5EA6)"},
+ {"key.bit", "%d \u4F4D\u5143\u7684 %s \u91D1\u9470"},
+ {"key.bit.weak", "%d \u4F4D\u5143\u7684 %s \u91D1\u9470 (\u4F4E\u5F37\u5EA6)"},
+ {".PATTERN.printX509Cert.with.weak",
+ "\u64C1\u6709\u8005: {0}\n\u767C\u884C\u4EBA: {1}\n\u5E8F\u865F: {2}\n\u6709\u6548\u671F\u81EA: {3} \u5230: {4}\n\u6191\u8B49\u6307\u7D0B:\n\t SHA1: {5}\n\t SHA256: {6}\n\u7C3D\u7AE0\u6F14\u7B97\u6CD5\u540D\u7A31: {7}\n\u4E3B\u9AD4\u516C\u958B\u91D1\u9470\u6F14\u7B97\u6CD5: {8}\n\u7248\u672C: {9}"},
+ {"PKCS.10.with.weak",
+ "PKCS #10 \u6191\u8B49\u8981\u6C42 (\u7248\u672C 1.0)\n\u4E3B\u9AD4: %s\n\u683C\u5F0F: %s\n\u516C\u7528\u91D1\u9470: %s\n\u7C3D\u7AE0\u6F14\u7B97\u6CD5: %s\n"},
+ {"verified.by.s.in.s.weak", "\u7531 %2$s \u4E2D\u7684 %1$s \u4EE5 %3$s \u9A57\u8B49"},
+ {"whose.sigalg.risk", "%s \u4F7F\u7528\u7684 %s \u7C3D\u7AE0\u6F14\u7B97\u6CD5\u5B58\u5728\u5B89\u5168\u98A8\u96AA\u3002"},
+ {"whose.key.risk", "%s \u4F7F\u7528\u7684 %s \u5B58\u5728\u5B89\u5168\u98A8\u96AA\u3002"},
};
--- a/jdk/src/java.base/share/classes/sun/security/util/AuthResources_ko.java Sat Jun 03 02:44:55 2017 +0000
+++ b/jdk/src/java.base/share/classes/sun/security/util/AuthResources_ko.java Sat Jun 03 03:48:03 2017 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2017, 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
@@ -99,7 +99,7 @@
/*** EVERYTHING BELOW IS DEPRECATED ***/
// com.sun.security.auth.PolicyFile
- {".error.parsing.", ": \uAD6C\uBB38 \uBD84\uC11D \uC624\uB958 "},
+ {".error.parsing.", ": \uAD6C\uBB38\uBD84\uC11D \uC624\uB958 "},
{"COLON", ": "},
{".error.adding.Permission.", ": \uAD8C\uD55C \uCD94\uAC00 \uC624\uB958 "},
{"SPACE", " "},
--- a/jdk/src/java.base/share/classes/sun/security/util/AuthResources_sv.java Sat Jun 03 02:44:55 2017 +0000
+++ b/jdk/src/java.base/share/classes/sun/security/util/AuthResources_sv.java Sat Jun 03 03:48:03 2017 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2017, 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
@@ -137,7 +137,7 @@
// provided.null.name is the NullPointerException message when a
// developer incorrectly passes a null name to the constructor of
// subclasses of java.security.Principal
- {"provided.null.name", "angav null-namn"}
+ {"provided.null.name", "null-namn angavs"}
};
--- a/jdk/src/java.base/share/classes/sun/security/util/Resources_sv.java Sat Jun 03 02:44:55 2017 +0000
+++ b/jdk/src/java.base/share/classes/sun/security/util/Resources_sv.java Sat Jun 03 03:48:03 2017 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2017, 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
@@ -53,9 +53,9 @@
"CredOwner:\n\tIdentitetshavareklass = {0}\n\tIdentitetshavarenamn = {1}"},
// javax.security.auth.x500
- {"provided.null.name", "angav null-namn"},
- {"provided.null.keyword.map", "nullnyckelordsmappning tillhandah\u00F6lls"},
- {"provided.null.OID.map", "null-OID-mappning tillhandah\u00F6lls"},
+ {"provided.null.name", "null-namn angavs"},
+ {"provided.null.keyword.map", "nullnyckelordsmappning angavs"},
+ {"provided.null.OID.map", "null-OID-mappning angavs"},
// javax.security.auth.Subject
{"NEWLINE", "\n"},
@@ -63,7 +63,7 @@
"ogiltigt null-AccessControlContext"},
{"invalid.null.action.provided", "ogiltig null-funktion"},
{"invalid.null.Class.provided", "ogiltig null-klass"},
- {"Subject.", "Innehavare:\n"},
+ {"Subject.", "Subjekt:\n"},
{".Principal.", "\tIdentitetshavare: "},
{".Public.Credential.", "\tOffentlig inloggning: "},
{".Private.Credentials.inaccessible.",
@@ -71,9 +71,9 @@
{".Private.Credential.", "\tPrivat inloggning: "},
{".Private.Credential.inaccessible.",
"\tPrivat inloggning \u00E4r inte tillg\u00E4nglig\n"},
- {"Subject.is.read.only", "Innehavare \u00E4r skrivskyddad"},
+ {"Subject.is.read.only", "Subjektet \u00E4r skrivskyddad"},
{"attempting.to.add.an.object.which.is.not.an.instance.of.java.security.Principal.to.a.Subject.s.Principal.Set",
- "f\u00F6rs\u00F6k att l\u00E4gga till ett objekt som inte \u00E4r en f\u00F6rekomst av java.security.Principal till en upps\u00E4ttning av identitetshavare"},
+ "f\u00F6rs\u00F6k att l\u00E4gga till ett objekt som inte \u00E4r en instans av java.security.Principal till ett subjekts upps\u00E4ttning av identitetshavare"},
{"attempting.to.add.an.object.which.is.not.an.instance.of.class",
"f\u00F6rs\u00F6ker l\u00E4gga till ett objekt som inte \u00E4r en instans av {0}"},
@@ -84,11 +84,11 @@
{"Invalid.null.input.name", "Ogiltiga null-indata: namn"},
{"No.LoginModules.configured.for.name",
"Inga inloggningsmoduler har konfigurerats f\u00F6r {0}"},
- {"invalid.null.Subject.provided", "ogiltig null-innehavare"},
+ {"invalid.null.Subject.provided", "ogiltig null-subjekt"},
{"invalid.null.CallbackHandler.provided",
"ogiltig null-CallbackHandler"},
{"null.subject.logout.called.before.login",
- "null-innehavare - utloggning anropades f\u00F6re inloggning"},
+ "null-subjekt - utloggning anropades f\u00F6re inloggning"},
{"unable.to.instantiate.LoginModule.module.because.it.does.not.provide.a.no.argument.constructor",
"kan inte instansiera LoginModule, {0}, eftersom den inte tillhandah\u00E5ller n\u00E5gon icke-argumentskonstruktor"},
{"unable.to.instantiate.LoginModule",
@@ -148,12 +148,12 @@
// sun.security.pkcs11.SunPKCS11
{"PKCS11.Token.providerName.Password.",
- "PKCS11-tecken [{0}] L\u00F6senord: "},
+ "L\u00F6senord f\u00F6r PKCS11-token [{0}]: "},
/* --- DEPRECATED --- */
// javax.security.auth.Policy
{"unable.to.instantiate.Subject.based.policy",
- "den innehavarbaserade policyn kan inte skapas"}
+ "kan inte instansiera subjektbaserad policy"}
};
--- a/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CPlatformWindow.java Sat Jun 03 02:44:55 2017 +0000
+++ b/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CPlatformWindow.java Sat Jun 03 03:48:03 2017 +0000
@@ -274,13 +274,18 @@
}
AtomicLong ref = new AtomicLong();
contentView.execute(viewPtr -> {
+ boolean hasOwnerPtr = false;
+
if (owner != null) {
- owner.execute(ownerPtr -> {
+ hasOwnerPtr = 0L != owner.executeGet(ownerPtr -> {
ref.set(nativeCreateNSWindow(viewPtr, ownerPtr, styleBits,
- bounds.x, bounds.y,
- bounds.width, bounds.height));
+ bounds.x, bounds.y,
+ bounds.width, bounds.height));
+ return 1;
});
- } else {
+ }
+
+ if (!hasOwnerPtr) {
ref.set(nativeCreateNSWindow(viewPtr, 0,
styleBits, bounds.x, bounds.y,
bounds.width, bounds.height));
--- a/jdk/src/java.desktop/share/classes/com/sun/accessibility/internal/resources/accessibility_sv.properties Sat Jun 03 02:44:55 2017 +0000
+++ b/jdk/src/java.desktop/share/classes/com/sun/accessibility/internal/resources/accessibility_sv.properties Sat Jun 03 03:48:03 2017 +0000
@@ -93,7 +93,7 @@
resizable=storleks\u00E4ndringsbar
selectable=valbar
selected=vald
-showing=visas
+showing=visar
singleline=en rad
transient=tillf\u00E4llig
visible=synlig
--- a/jdk/src/java.desktop/share/classes/java/awt/event/KeyEvent.java Sat Jun 03 02:44:55 2017 +0000
+++ b/jdk/src/java.desktop/share/classes/java/awt/event/KeyEvent.java Sat Jun 03 03:48:03 2017 +0000
@@ -1110,6 +1110,8 @@
*
* Event source can be changed during processing, but in some cases
* we need to be able to obtain original source.
+ *
+ * @since 1.8
*/
private Component originalSource;
--- a/jdk/src/java.desktop/share/classes/java/awt/image/RescaleOp.java Sat Jun 03 02:44:55 2017 +0000
+++ b/jdk/src/java.desktop/share/classes/java/awt/image/RescaleOp.java Sat Jun 03 03:48:03 2017 +0000
@@ -27,6 +27,8 @@
import java.awt.color.ColorSpace;
import java.awt.geom.Rectangle2D;
+import java.awt.AlphaComposite;
+import java.awt.Graphics2D;
import java.awt.Rectangle;
import java.awt.geom.Point2D;
import java.awt.RenderingHints;
@@ -193,9 +195,10 @@
int nBands,
int nElems) {
- byte[][] lutData = new byte[scale.length][nElems];
+ byte[][] lutData = new byte[nBands][nElems];
+ int band;
- for (int band=0; band<scale.length; band++) {
+ for (band=0; band<scale.length; band++) {
float bandScale = scale[band];
float bandOff = off[band];
byte[] bandLutData = lutData[band];
@@ -212,6 +215,17 @@
}
}
+ int maxToCopy = (nBands == 4 && scale.length == 4) ? 4 : 3;
+ while (band < lutData.length && band < maxToCopy) {
+ System.arraycopy(lutData[band-1], 0, lutData[band], 0, nElems);
+ band++;
+ }
+ if (nBands == 4 && band < nBands) {
+ byte[] bandLutData = lutData[band];
+ for (int i=0; i<nElems; i++) {
+ bandLutData[i] = (byte)i;
+ }
+ }
return new ByteLookupTable(0, lutData);
}
@@ -228,9 +242,10 @@
int nBands,
int nElems) {
- short[][] lutData = new short[scale.length][nElems];
+ short[][] lutData = new short[nBands][nElems];
+ int band = 0;
- for (int band=0; band<scale.length; band++) {
+ for (band=0; band<scale.length; band++) {
float bandScale = scale[band];
float bandOff = off[band];
short[] bandLutData = lutData[band];
@@ -246,6 +261,17 @@
bandLutData[i] = (short)val;
}
}
+ int maxToCopy = (nBands == 4 && scale.length == 4) ? 4 : 3;
+ while (band < lutData.length && band < maxToCopy) {
+ System.arraycopy(lutData[band-1], 0, lutData[band], 0, nElems);
+ band++;
+ }
+ if (nBands == 4 && band < nBands) {
+ short[] bandLutData = lutData[band];
+ for (int i=0; i<nElems; i++) {
+ bandLutData[i] = (short)i;
+ }
+ }
return new ShortLookupTable(0, lutData);
}
@@ -300,6 +326,19 @@
}
}
+ if (dstSM instanceof ComponentSampleModel) {
+ ComponentSampleModel dsm = (ComponentSampleModel)dstSM;
+ if (dsm.getPixelStride() != dst.getNumBands()) {
+ return false;
+ }
+ }
+ if (srcSM instanceof ComponentSampleModel) {
+ ComponentSampleModel csm = (ComponentSampleModel)srcSM;
+ if (csm.getPixelStride() != src.getNumBands()) {
+ return false;
+ }
+ }
+
return true;
}
@@ -344,6 +383,7 @@
}
boolean needToConvert = false;
+ boolean needToDraw = false;
// Include alpha
if (scaleConst > numSrcColorComp && srcCM.hasAlpha()) {
@@ -374,102 +414,41 @@
dstCM = dst.getColorModel();
if(srcCM.getColorSpace().getType() !=
- dstCM.getColorSpace().getType()) {
+ dstCM.getColorSpace().getType()) {
needToConvert = true;
dst = createCompatibleDestImage(src, null);
}
}
- boolean scaleAlpha = true;
-
- //
- // The number of sets of scaling constants may be one,
- // in which case the same constants are applied to all color
- // (but NOT alpha) components. Otherwise, the number of sets
- // of scaling constants may equal the number of Source color
- // components, in which case NO rescaling of the alpha component
- // (if present) is performed.
- //
- if (numSrcColorComp == scaleConst || scaleConst == 1) {
- scaleAlpha = false;
- }
-
//
// Try to use a native BI rescale operation first
//
if (ImagingLib.filter(this, src, dst) == null) {
+ if (src.getRaster().getNumBands() !=
+ dst.getRaster().getNumBands()) {
+ needToDraw = true;
+ dst = createCompatibleDestImage(src, null);
+ }
+
//
// Native BI rescale failed - convert to rasters
//
WritableRaster srcRaster = src.getRaster();
WritableRaster dstRaster = dst.getRaster();
- if (!scaleAlpha) {
- if (srcCM.hasAlpha()) {
- // Do not rescale Alpha component
- int minx = srcRaster.getMinX();
- int miny = srcRaster.getMinY();
- int[] bands = new int[numSrcColorComp];
- for (int i=0; i < numSrcColorComp; i++) {
- bands[i] = i;
- }
- srcRaster =
- srcRaster.createWritableChild(minx, miny,
- srcRaster.getWidth(),
- srcRaster.getHeight(),
- minx, miny,
- bands);
- }
- if (dstCM.hasAlpha()) {
- int minx = dstRaster.getMinX();
- int miny = dstRaster.getMinY();
- int[] bands = new int[numSrcColorComp];
- for (int i=0; i < numSrcColorComp; i++) {
- bands[i] = i;
- }
- dstRaster =
- dstRaster.createWritableChild(minx, miny,
- dstRaster.getWidth(),
- dstRaster.getHeight(),
- minx, miny,
- bands);
- }
- }
-
//
// Call the raster filter method
//
- filterRasterImpl(srcRaster, dstRaster, scaleConst);
-
- //
- // here copy the unscaled src alpha to destination alpha channel
- //
- if (!scaleAlpha) {
- Raster srcAlphaRaster = null;
- WritableRaster dstAlphaRaster = null;
-
- if (srcCM.hasAlpha()) {
- srcAlphaRaster = src.getAlphaRaster();
- }
- if (dstCM.hasAlpha()) {
- dstAlphaRaster = dst.getAlphaRaster();
- if (srcAlphaRaster != null) {
- dstAlphaRaster.setRect(srcAlphaRaster);
- } else {
- int alpha = 0xff << 24;
- for (int cy=0; cy < dst.getHeight(); cy++) {
- for (int cx=0; cx < dst.getWidth(); cx++) {
- int color = dst.getRGB(cx, cy);
-
- dst.setRGB(cx, cy, color | alpha);
- }
- }
- }
- }
- }
+ filterRasterImpl(srcRaster, dstRaster, scaleConst, false);
}
+ if (needToDraw) {
+ Graphics2D g = origDst.createGraphics();
+ g.setComposite(AlphaComposite.Src);
+ g.drawImage(dst, 0, 0, width, height, null);
+ g.dispose();
+ }
if (needToConvert) {
// ColorModels are not the same
ColorConvertOp ccop = new ColorConvertOp(hints);
@@ -497,10 +476,11 @@
* stated in the class comments.
*/
public final WritableRaster filter (Raster src, WritableRaster dst) {
- return filterRasterImpl(src, dst, length);
+ return filterRasterImpl(src, dst, length, true);
}
- private WritableRaster filterRasterImpl(Raster src, WritableRaster dst, int scaleConst) {
+ private WritableRaster filterRasterImpl(Raster src, WritableRaster dst,
+ int scaleConst, boolean sCheck) {
int numBands = src.getNumBands();
int width = src.getWidth();
int height = src.getHeight();
@@ -527,7 +507,7 @@
// Make sure that the arrays match
// Make sure that the low/high/constant arrays match
- if (scaleConst != 1 && scaleConst != src.getNumBands()) {
+ if (sCheck && scaleConst != 1 && scaleConst != src.getNumBands()) {
throw new IllegalArgumentException("Number of scaling constants "+
"does not equal the number of"+
" of bands in the src raster");
@@ -598,8 +578,14 @@
srcPix = src.getPixel(sX, sY, srcPix);
tidx = 0;
for (int z=0; z<numBands; z++, tidx += step) {
- val = (int)(srcPix[z]*scaleFactors[tidx]
- + offsets[tidx]);
+ if ((scaleConst == 1 || scaleConst == 3) &&
+ (z == 3) && (numBands == 4)) {
+ val = srcPix[z];
+ } else {
+ val = (int)(srcPix[z]*scaleFactors[tidx]
+ + offsets[tidx]);
+
+ }
// Clamp
if ((val & dstMask[z]) != 0) {
if (val < 0) {
--- a/jdk/src/java.desktop/share/classes/sun/applet/resources/MsgAppletViewer_ko.java Sat Jun 03 02:44:55 2017 +0000
+++ b/jdk/src/java.desktop/share/classes/sun/applet/resources/MsgAppletViewer_ko.java Sat Jun 03 03:48:03 2017 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1996, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2017, 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
@@ -138,7 +138,7 @@
{"appletpanel.fileexception", "\uB85C\uB4DC \uC911 {0} \uC608\uC678\uC0AC\uD56D \uBC1C\uC0DD: {1}"},
{"appletpanel.filedeath", "\uB85C\uB4DC \uC911 {0}\uC774(\uAC00) \uC885\uB8CC\uB428: {1}"},
{"appletpanel.fileerror", "\uB85C\uB4DC \uC911 {0} \uC624\uB958 \uBC1C\uC0DD: {1}"},
- {"appletpanel.badattribute.exception", "HTML \uAD6C\uBB38 \uBD84\uC11D \uC911: width/height \uC18D\uC131\uC5D0 \uB300\uD55C \uAC12\uC774 \uC62C\uBC14\uB974\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."},
+ {"appletpanel.badattribute.exception", "HTML \uAD6C\uBB38\uBD84\uC11D \uC911: width/height \uC18D\uC131\uC5D0 \uB300\uD55C \uAC12\uC774 \uC62C\uBC14\uB974\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."},
{"appletillegalargumentexception.objectinputstream", "AppletObjectInputStream\uC5D0 \uB110\uC774 \uC544\uB2CC \uB85C\uB354\uAC00 \uD544\uC694\uD569\uB2C8\uB2E4."},
{"appletprops.title", "AppletViewer \uC18D\uC131"},
{"appletprops.label.http.server", "HTTP \uD504\uB85D\uC2DC \uC11C\uBC84:"},
--- a/jdk/src/java.desktop/share/classes/sun/awt/resources/awt_sv.properties Sat Jun 03 02:44:55 2017 +0000
+++ b/jdk/src/java.desktop/share/classes/sun/awt/resources/awt_sv.properties Sat Jun 03 03:48:03 2017 +0000
@@ -71,7 +71,7 @@
AWT.f22=F22
AWT.f23=F23
AWT.f24=F24
-AWT.printScreen=Print Screen
+AWT.printScreen=Sk\u00E4rmutskrift
AWT.insert=Insert
AWT.help=Hj\u00E4lp
AWT.windows=Windows
--- a/jdk/src/java.desktop/windows/classes/sun/awt/windows/WInputMethod.java Sat Jun 03 02:44:55 2017 +0000
+++ b/jdk/src/java.desktop/windows/classes/sun/awt/windows/WInputMethod.java Sat Jun 03 03:48:03 2017 +0000
@@ -589,6 +589,9 @@
Component client = getClientComponent();
if (client != null) {
+ if (!client.isShowing()) {
+ return;
+ }
if (haveActiveClient()) {
Rectangle rc = inputContext.getTextLocation(TextHitInfo.leading(0));
x = rc.x;
--- a/jdk/src/java.desktop/windows/native/libawt/windows/ShellFolder2.cpp Sat Jun 03 02:44:55 2017 +0000
+++ b/jdk/src/java.desktop/windows/native/libawt/windows/ShellFolder2.cpp Sat Jun 03 03:48:03 2017 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2017, 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
@@ -205,14 +205,19 @@
static jstring jstringFromSTRRET(JNIEnv* env, LPITEMIDLIST pidl, STRRET* pStrret) {
switch (pStrret->uType) {
case STRRET_CSTR :
- return JNU_NewStringPlatform(env, reinterpret_cast<const char*>(pStrret->cStr));
+ if (pStrret->cStr != NULL) {
+ return JNU_NewStringPlatform(env, reinterpret_cast<const char*>(pStrret->cStr));
+ }
+ break;
case STRRET_OFFSET :
// Note : this may need to be WCHAR instead
return JNU_NewStringPlatform(env,
(CHAR*)pidl + pStrret->uOffset);
case STRRET_WSTR :
- return env->NewString(reinterpret_cast<const jchar*>(pStrret->pOleStr),
- static_cast<jsize>(wcslen(pStrret->pOleStr)));
+ if (pStrret->pOleStr != NULL) {
+ return env->NewString(reinterpret_cast<const jchar*>(pStrret->pOleStr),
+ static_cast<jsize>(wcslen(pStrret->pOleStr)));
+ }
}
return NULL;
}
--- a/jdk/src/java.desktop/windows/native/libawt/windows/awt_Component.cpp Sat Jun 03 02:44:55 2017 +0000
+++ b/jdk/src/java.desktop/windows/native/libawt/windows/awt_Component.cpp Sat Jun 03 03:48:03 2017 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1996, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2017, 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
@@ -3811,6 +3811,9 @@
UINT bits = 1;
POINT p = {0, 0}; // upper left corner of the client area
HWND hWnd = GetHWnd();
+ if (!::IsWindowVisible(hWnd)) {
+ return;
+ }
HWND hTop = GetTopLevelParentForWindow(hWnd);
::ClientToScreen(hTop, &p);
if (!m_bitsCandType) {
@@ -4083,6 +4086,9 @@
//
void AwtComponent::InquireCandidatePosition()
{
+ if (!::IsWindowVisible(GetHWnd())) {
+ return;
+ }
JNIEnv *env = (JNIEnv *)JNU_GetEnv(jvm, JNI_VERSION_1_2);
// get global reference of WInputMethod class (run only once)
--- a/jdk/src/java.rmi/share/classes/sun/rmi/transport/tcp/TCPChannel.java Sat Jun 03 02:44:55 2017 +0000
+++ b/jdk/src/java.rmi/share/classes/sun/rmi/transport/tcp/TCPChannel.java Sat Jun 03 03:48:03 2017 +0000
@@ -296,11 +296,15 @@
out.flush();
}
} catch (IOException e) {
- if (e instanceof RemoteException)
+ try {
+ conn.close();
+ } catch (Exception ex) {}
+ if (e instanceof RemoteException) {
throw (RemoteException) e;
- else
+ } else {
throw new ConnectIOException(
"error during JRMP connection establishment", e);
+ }
}
} else {
try {
--- a/jdk/src/java.sql.rowset/share/classes/com/sun/rowset/RowSetResourceBundle_ko.properties Sat Jun 03 02:44:55 2017 +0000
+++ b/jdk/src/java.sql.rowset/share/classes/com/sun/rowset/RowSetResourceBundle_ko.properties Sat Jun 03 03:48:03 2017 +0000
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2005, 2017, 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
@@ -140,7 +140,7 @@
#WebRowSetXmlReader exception
wrsxmlreader.invalidcp = RowSet\uC758 \uB05D\uC5D0 \uB3C4\uB2EC\uD588\uC2B5\uB2C8\uB2E4. \uCEE4\uC11C \uC704\uCE58\uAC00 \uBD80\uC801\uD569\uD569\uB2C8\uB2E4.
wrsxmlreader.readxml = readXML: {0}
-wrsxmlreader.parseerr = ** \uAD6C\uBB38 \uBD84\uC11D \uC624\uB958: {0}, \uD589: {1}, URI: {2}
+wrsxmlreader.parseerr = ** \uAD6C\uBB38\uBD84\uC11D \uC624\uB958: {0}, \uD589: {1}, URI: {2}
#WebRowSetXmlWriter exceptions
wrsxmlwriter.ioex = IOException : {0}
--- a/jdk/src/java.sql.rowset/share/classes/com/sun/rowset/RowSetResourceBundle_sv.properties Sat Jun 03 02:44:55 2017 +0000
+++ b/jdk/src/java.sql.rowset/share/classes/com/sun/rowset/RowSetResourceBundle_sv.properties Sat Jun 03 03:48:03 2017 +0000
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -41,7 +41,7 @@
cachedrowsetimpl.longfail = getLong utf\u00F6rdes inte f\u00F6r v\u00E4rdet ({0}) i kolumnen {1}
cachedrowsetimpl.floatfail = getFloat utf\u00F6rdes inte f\u00F6r v\u00E4rdet ({0}) i kolumnen {1}
cachedrowsetimpl.doublefail = getDouble utf\u00F6rdes inte f\u00F6r v\u00E4rdet ({0}) i kolumnen {1}
-cachedrowsetimpl.dtypemismt = Inkompatibel datatyp
+cachedrowsetimpl.dtypemismt = Felmatchad datatyp
cachedrowsetimpl.datefail = getDate utf\u00F6rdes inte f\u00F6r v\u00E4rdet ({0}) i kolumnen {1}, ingen konvertering tillg\u00E4nglig
cachedrowsetimpl.timefail = getTime utf\u00F6rdes inte f\u00F6r v\u00E4rdet ({0}) i kolumnen {1}, ingen konvertering tillg\u00E4nglig
cachedrowsetimpl.posupdate = Det finns inte st\u00F6d f\u00F6r positionerad uppdatering
--- a/jdk/src/java.sql/share/classes/java/sql/DatabaseMetaData.java Sat Jun 03 02:44:55 2017 +0000
+++ b/jdk/src/java.sql/share/classes/java/sql/DatabaseMetaData.java Sat Jun 03 03:48:03 2017 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1996, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2017, 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
@@ -3199,22 +3199,10 @@
//------------------------- JDBC 4.0 -----------------------------------
/**
- * Indicates whether or not this data source supports the SQL <code>ROWID</code> type,
- * and if so the lifetime for which a <code>RowId</code> object remains valid.
- * <p>
- * The returned int values have the following relationship:
- * <pre>{@code
- * ROWID_UNSUPPORTED < ROWID_VALID_OTHER < ROWID_VALID_TRANSACTION
- * < ROWID_VALID_SESSION < ROWID_VALID_FOREVER
- * }</pre>
- * so conditional logic such as
- * <pre>{@code
- * if (metadata.getRowIdLifetime() > DatabaseMetaData.ROWID_VALID_TRANSACTION)
- * }</pre>
- * can be used. Valid Forever means valid across all Sessions, and valid for
- * a Session means valid across all its contained Transactions.
+ * Indicates whether this data source supports the SQL {@code ROWID} type,
+ * and the lifetime for which a {@link RowId} object remains valid.
*
- * @return the status indicating the lifetime of a <code>RowId</code>
+ * @return the status indicating the lifetime of a {@code RowId}
* @throws SQLException if a database access error occurs
* @since 1.6
*/
--- a/jdk/src/jdk.accessibility/windows/classes/com/sun/java/accessibility/internal/AccessBridge.java Sat Jun 03 02:44:55 2017 +0000
+++ b/jdk/src/jdk.accessibility/windows/classes/com/sun/java/accessibility/internal/AccessBridge.java Sat Jun 03 03:48:03 2017 +0000
@@ -702,7 +702,7 @@
}
if (false == bExtendedSearch) {
- debugString ("bk -- getVirtualAccessibleNameFromContext will not use the extended name search algorithm. role = " + role.toDisplayString (Locale.US) );
+ debugString ("bk -- getVirtualAccessibleNameFromContext will not use the extended name search algorithm. role = " + ( role != null ? role.toDisplayString(Locale.US) : "null") );
/*
Step 3:
=======
--- a/jdk/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_de.properties Sat Jun 03 02:44:55 2017 +0000
+++ b/jdk/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_de.properties Sat Jun 03 03:48:03 2017 +0000
@@ -29,11 +29,11 @@
error.unrecognized.option=Unbekannte Option: {0}
error.missing.arg=F\u00FCr die Option {0} ist ein Argument erforderlich
error.bad.file.arg=Fehler beim Parsen der Dateiargumente
-error.bad.option=Eine der Optionen -{ctxu} muss angegeben werden.
+error.bad.option=Eine der Optionen -{ctxuid} muss angegeben werden.
error.bad.cflag=Kennzeichen "c" erfordert Angabe von Manifest oder Eingabedateien.
error.bad.uflag=Kennzeichen "u" erfordert Angabe von Manifest, Kennzeichen "e" oder Eingabedateien.
error.bad.eflag=Kennzeichen "e" und Manifest mit dem Attribut "Main-Class" k\u00F6nnen nicht zusammen angegeben\nwerden.
-error.bad.dflag=F\u00FCr die Option "-d, --print-module-descriptor" muss bzw. m\u00FCssen keine Eingabedatei(en) angegeben werden: {0}
+error.bad.dflag=F\u00FCr die Option "-d, --describe-module" m\u00FCssen keine Eingabedateien angegeben werden
error.bad.reason=Schlechter Grund: {0}, Grund muss entweder "deprecated", "deprecated-for-removal" oder "incubating" sein
error.nosuch.fileordir={0}: Datei oder Verzeichnis nicht vorhanden
error.write.file=Fehler beim Schreiben in vorhandener JAR-Datei
@@ -42,16 +42,11 @@
error.create.tempfile=Es konnte keine tempor\u00E4re Datei erstellt werden
error.hash.dep=Abh\u00E4ngigkeiten bei Hashing-Modul {0}. Modul {1} kann nicht im Modulpfad gefunden werden
error.module.options.without.info=--module-version oder --hash-modules ohne module-info.class
+error.no.operative.descriptor=Kein operativer Deskriptor f\u00FCr Release: {0}
+error.no.root.descriptor=Kein Root-Moduldeskriptor. Geben Sie "--release" an
+error.unable.derive.automodule=Moduldeskriptor kann nicht abgeleitet werden f\u00FCr: {0}
error.unexpected.module-info=Unerwarteter Moduldeskriptor {0}
error.module.descriptor.not.found=Moduldeskriptor nicht gefunden
-error.validator.info.without.root=module-info.class in einem versionierten Verzeichnis gefunden, in der Root ist module-info.class jedoch nicht vorhanden
-error.validator.info.name.notequal=module-info.class in einem versionierten Verzeichnis enth\u00E4lt falschen Namen
-error.validator.info.requires.transitive=module-info.class in einem versionierten Verzeichnis enth\u00E4lt zus\u00E4tzlichen "requires transitive"
-error.validator.info.requires.added=module-info.class in einem versionierten Verzeichnis enth\u00E4lt zus\u00E4tzlichen "requires"
-error.validator.info.requires.dropped=module-info.class in einem versionierten Verzeichnis enth\u00E4lt fehlenden "requires"
-error.validator.info.exports.notequal=module-info.class in einem versionierten Verzeichnis enth\u00E4lt unterschiedliche "exports"
-error.validator.info.opens.notequal=module-info.class in einem versionierten Verzeichnis enth\u00E4lt unterschiedliche "opens"
-error.validator.info.provides.notequal=module-info.class in einem versionierten Verzeichnis enth\u00E4lt unterschiedliche "provides"
error.invalid.versioned.module.attribute=Ung\u00FCltiges Moduldeskriptorattribut {0}
error.missing.provider=Serviceprovider nicht gefunden: {0}
error.release.value.notnumber=Release {0} nicht g\u00FCltig
@@ -67,11 +62,22 @@
error.validator.incompatible.class.version=Eintrag {0} weist eine Klassenversion auf, die mit einer fr\u00FCheren Version inkompatibel ist
error.validator.different.api=Eintrag {0} enth\u00E4lt eine Klasse mit einer anderen API als in der fr\u00FCheren Version
error.validator.names.mismatch=Eintrag {0} enth\u00E4lt eine Klasse mit dem internen Namen {1}, Namen stimmen nicht \u00FCberein
+error.validator.info.name.notequal=module-info.class in einem versionierten Verzeichnis enth\u00E4lt falschen Namen
+error.validator.info.requires.transitive=module-info.class in einem versionierten Verzeichnis enth\u00E4lt zus\u00E4tzlichen "requires transitive"
+error.validator.info.requires.added=module-info.class in einem versionierten Verzeichnis enth\u00E4lt zus\u00E4tzlichen "requires"
+error.validator.info.requires.dropped=module-info.class in einem versionierten Verzeichnis enth\u00E4lt fehlenden "requires"
+error.validator.info.exports.notequal=module-info.class in einem versionierten Verzeichnis enth\u00E4lt unterschiedliche "exports"
+error.validator.info.opens.notequal=module-info.class in einem versionierten Verzeichnis enth\u00E4lt unterschiedliche "opens"
+error.validator.info.provides.notequal=module-info.class in einem versionierten Verzeichnis enth\u00E4lt unterschiedliche "provides"
+error.validator.info.version.notequal={0}: module-info.class in einem versionierten Verzeichnis enth\u00E4lt unterschiedlichen "version"-Wert
+error.validator.info.manclass.notequal={0}: module-info.class in einem versionierten Verzeichnis enth\u00E4lt unterschiedlichen "main-class"-Wert
warn.validator.identical.entry=Warnung: Eintrag {0} enth\u00E4lt eine Klasse, die mit\neinem bereits in der JAR-Datei enthaltenen Eintrag identisch ist
warn.validator.resources.with.same.name=Warnung: Eintrag {0}, mehrere Ressourcen mit demselben Namen
warn.validator.concealed.public.class=Warnung: Eintrag {0} ist eine \u00F6ffentliche Klasse\nin einem verdeckten Package. Wenn Sie diese JAR-Datei in den Classpath einf\u00FCgen, kommt es\nzu nicht kompatiblen \u00F6ffentlichen Schnittstellen
+warn.release.unexpected.versioned.entry=Unerwarteter versionierter Eintrag {0}
out.added.manifest=Manifest wurde hinzugef\u00FCgt
out.added.module-info=module-info hinzugef\u00FCgt: {0}
+out.automodule=Kein Moduldeskriptor gefunden. Automatisches Modul wurde abgeleitet.
out.update.manifest=Manifest wurde aktualisiert
out.update.module-info=module-info aktualisiert: {0}
out.ignore.entry=Eintrag {0} wird ignoriert
@@ -88,17 +94,19 @@
main.usage.summary=Verwendung: jar [OPTION...] [ [--release VERSION] [-C dir] Dateien] ...
main.usage.summary.try=Verwenden Sie "jar --help", um weitere Informationen anzuzeigen.
-main.help.preopt=Verwendung: jar [OPTION...] [ [--release VERSION] [-C dir] Dateien] ...\njar erstellt ein Archiv f\u00FCr Klassen und Ressourcen und kann individuelle\nKlassen oder Ressourcen aus einem Archiv bearbeiten oder wiederherstellen.\n\n Beispiele:\n # Ein Archiv namens classes.jar mit zwei Klassendateien erstellen:\n jar --create --file classes.jar Foo.class Bar.class\n # Ein Archiv mit einem vorhandenen Manifest mit allen Dateien in foo/ erstellen:\n jar --create --file classes.jar --manifest mymanifest -C foo/ .\n # Ein modulares JAR-Archiv erstellen, dessen Moduldeskriptor sich in\n # classes/module-info.class befindet:\n jar --create --file foo.jar --main-class com.foo.Main --module-version 1.0\n -C foo/ classes resources\n # Ein vorhandenes nicht modulares JAR-Archiv in ein modulares JAR-Archiv aktualisieren:\n jar --update --file foo.jar --main-class com.foo.Main --module-version 1.0\n -C foo/ module-info.class\n # Multi-Release-JAR-Datei erstellen, wobei einige Dateien in das Verzeichnis META-INF/versions/9 gespeichert werden:\n jar --create --file mr.jar -C foo classes --release 9 -C foo9 classes
+main.help.preopt=Verwendung: jar [OPTION...] [ [--release VERSION] [-C dir] files] ...\njar erstellt ein Archiv f\u00FCr Klassen und Ressourcen und kann individuelle\nKlassen oder Ressourcen aus einem Archiv bearbeiten oder wiederherstellen.\n\n Beispiele:\n # Ein Archiv namens classes.jar mit zwei Klassendateien erstellen:\n jar --create --file classes.jar Foo.class Bar.class\n # Ein Archiv mit einem vorhandenen Manifest mit allen Dateien in foo/ erstellen:\n jar --create --file classes.jar --manifest mymanifest -C foo/ .\n # Ein modulares JAR-Archiv erstellen, dessen Moduldeskriptor sich in\n # classes/module-info.class befindet:\n jar --create --file foo.jar --main-class com.foo.Main --module-version 1.0\n -C foo/ classes resources\n # Ein vorhandenes nicht modulares JAR-Archiv in ein modulares JAR-Archiv aktualisieren:\n jar --update --file foo.jar --main-class com.foo.Main --module-version 1.0\n -C foo/ module-info.class\n # Multi-Release-JAR-Datei erstellen, wobei einige Dateien im Verzeichnis META-INF/versions/9 gespeichert werden:\n jar --create --file mr.jar -C foo classes --release 9 -C foo9 classes\n\nUm den "jar"-Befehl zu k\u00FCrzen oder zu vereinfachen, k\u00F6nnen Sie Argumente in einer separaten\nTextdatei angeben und diese mit dem @-Zeichen als Pr\u00E4fix an den "jar"-Befehl \u00FCbergeben.\n\n Beispiele:\n # Zus\u00E4tzliche Optionen und Liste der Klassendateien aus der Datei classes.list lesen\n jar --create --file my.jar @classes.list\n
main.help.opt.main=\ Hauptvorgangsmodus:\n
main.help.opt.main.create=\ -c, --create Archiv erstellen
main.help.opt.main.generate-index=\ -i, --generate-index=FILE Indexinformationen f\u00FCr die angegebenen JAR-\n Archive generieren
main.help.opt.main.list=\ -t, --list Das Inhaltsverzeichnis f\u00FCr das Archiv auflisten
main.help.opt.main.update=\ -u, --update Ein vorhandenes JAR-Archiv aktualisieren
main.help.opt.main.extract=\ -x, --extract Benannte (oder alle) Dateien aus dem Archiv extrahieren
-main.help.opt.main.print-module-descriptor=\ -d, --print-module-descriptor Moduldeskriptor drucken
+main.help.opt.main.describe-module=\ -d, --describe-module Gibt den Moduldeskriptor oder automatischen Modulnamen aus
main.help.opt.any=\ In jedem Modus g\u00FCltige Vorgangsmodifikatoren:\n\n -C DIR Zum angegebenen Verzeichnis wechseln und die folgende\n Datei aufnehmen
-main.help.opt.any.file=-f, --file=FILE Der Name der Archivdatei\n --release VERSION Die folgenden Dateien werden in ein versioniertes Verzeichnis\n der JAR-Datei gespeichert (d.h. META-INF/versions/VERSION/)
+main.help.opt.any.file=\ -f, --file=FILE Der Name der Archivdatei. Wenn Sie dies lauslassen, wird entweder stdin oder\n stdout verwendet, je nach Vorgang\n --release VERSION Speichert alle der folgenden Dateien in einem versionierten Verzeichnis\n der JAR-Datei (d.h. META-INF/versions/VERSION/)
main.help.opt.any.verbose=\ -v, --verbose Verbose-Ausgabe bei Standardausgabe generieren
+main.help.opt.create=\ Vorgangsmodifikatoren, die nur im Erstellungsmodus g\u00FCltig sind:\n
+main.help.opt.create.normalize=\ -n, --normalize Normalisiert Informationen im neuen JAR-Archiv\n nach der Erstellung
main.help.opt.create.update=\ Vorgangsmodifikatoren, die nur im Erstellungs- und Aktualisierungsmodus g\u00FCltig sind:\n
main.help.opt.create.update.main-class=\ -e, --main-class=CLASSNAME Der Anwendungseinstiegspunkt f\u00FCr Standalone-\n Anwendungen, die in einem modularen oder ausf\u00FChrbaren\n JAR-Archiv geb\u00FCndelt sind
main.help.opt.create.update.manifest=\ -m, --manifest=FILE Die Manifestinformationen aus der angegebenen\n Manifestdatei aufnehmen
@@ -111,7 +119,7 @@
main.help.opt.create.update.index=\ Vorgangsmodifikatoren, die nur im Erstellungs-, Aktualisierungs- und Indexgenerierungsmodus g\u00FCltig sind:\n
main.help.opt.create.update.index.no-compress=\ -0, --no-compress Nur speichern, keine ZIP-Komprimierung verwenden
main.help.opt.other=\ Weitere Optionen:\n
-main.help.opt.other.help=\ -?, --help[:compat] Diese Meldung oder optional die Kompatibilit\u00E4t, Hilfe angeben
+main.help.opt.other.help=\ -h, --help[:compat] Gibt diese Meldung oder optional die Kompatibilit\u00E4t, Hilfe an
main.help.opt.other.help-extra=\ --help-extra Hilfe zu zus\u00E4tzlichen Optionen
main.help.opt.other.version=\ --version Programmversion ausgeben
main.help.postopt=\ Ein Archiv ist ein modulares JAR-Archiv, wenn der Moduldeskriptor "module-info.class"\n in der Root der angegebenen Verzeichnisse oder in der Root des JAR-Archivs selbst\n vorhanden ist. Die folgenden Vorg\u00E4nge sind nur g\u00FCltig, wenn Sie ein modulares JAR-Archiv\n erstellen oder ein vorhandenes nicht modulares JAR-Archiv aktualisieren: "--module-version",\n "--hash-modules" und "--modulepath".\n\n Obligatorische oder optionale Argumente zu langen Optionen sind auch f\u00FCr die jeweils\n zugeh\u00F6rigen kurzen Optionen obligatorisch oder optional.
--- a/jdk/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_es.properties Sat Jun 03 02:44:55 2017 +0000
+++ b/jdk/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_es.properties Sat Jun 03 03:48:03 2017 +0000
@@ -29,11 +29,11 @@
error.unrecognized.option=opci\u00F3n no reconocida: {0}
error.missing.arg=la opci\u00F3n {0} necesita un argumento
error.bad.file.arg=Error al analizar los argumentos de archivo
-error.bad.option=Se debe especificar una de las opciones -{ctxu}.
+error.bad.option=Se debe especificar una de las opciones -{ctxuid}.
error.bad.cflag=El indicador 'c' necesita la especificaci\u00F3n de archivos de manifiesto o de entrada.
error.bad.uflag=El indicador 'u' necesita la especificaci\u00F3n de archivos de manifiesto, de entrada o indicador 'e'.
error.bad.eflag=El indicador 'e' y el manifiesto con el atributo 'Main-Class' no pueden especificarse \na la vez.
-error.bad.dflag=La opci\u00F3n ''-d, --print-module-descriptor'' no requiere especificar archivos de entrada: {0}
+error.bad.dflag=La opci\u00F3n '-d, --describe-module' no requiere especificar archivos de entrada
error.bad.reason=Motivo err\u00F3neo: {0}, debe ser anticuado, anticuado para eliminaci\u00F3n o incubando
error.nosuch.fileordir={0} : no existe tal archivo o directorio
error.write.file=Error al escribir un archivo jar existente
@@ -42,16 +42,11 @@
error.create.tempfile=No se ha podido crear el archivo temporal
error.hash.dep=Aplicando hash a las dependencias del m\u00F3dulo {0}, no se ha encontrado el m\u00F3dulo {1} en la ruta del m\u00F3dulo
error.module.options.without.info=Uno de --module-version o -hash-modules sin module-info.class
+error.no.operative.descriptor=No hay ning\u00FAn descriptor operativo para la versi\u00F3n: {0}
+error.no.root.descriptor=No hay ning\u00FAn descriptor de m\u00F3dulo de ra\u00EDz, especifique --release
+error.unable.derive.automodule=No se ha podido derivar el descriptor de m\u00F3dulo para: {0}
error.unexpected.module-info=Descriptor de m\u00F3dulo inesperado {0}
error.module.descriptor.not.found=No se ha encontrado el descriptor de m\u00F3dulo
-error.validator.info.without.root=Se ha encontrado module-info.class en un directorio con versi\u00F3n sin module-info.class en la ra\u00EDz
-error.validator.info.name.notequal=module-info.class en un directorio con versi\u00F3n contiene un nombre incorrecto
-error.validator.info.requires.transitive=module-info.class en un directorio con versiones contiene "requisitos transitivos" adicionales
-error.validator.info.requires.added=module-info.class en un directorio con versi\u00F3n contiene "requires" adicionales
-error.validator.info.requires.dropped=module-info.class en un directorio con versiones contiene "requires" que faltan
-error.validator.info.exports.notequal=module-info.class en un directorio con versiones contiene "exports" diferentes
-error.validator.info.opens.notequal=module-info.class en un directorio con versiones contiene "aportaciones" diferentes
-error.validator.info.provides.notequal=module-info.class en un directorio con versiones contiene "provides" diferentes
error.invalid.versioned.module.attribute=Atributo de descriptor de m\u00F3dulo no v\u00E1lido {0}
error.missing.provider=No se ha encontrado el proveedor de servicios: {0}
error.release.value.notnumber=versi\u00F3n {0} no v\u00E1lida
@@ -67,11 +62,22 @@
error.validator.incompatible.class.version=la entrada {0} tiene una versi\u00F3n de clase no compatible con una versi\u00F3n anterior
error.validator.different.api=la entrada {0} contiene una clase con una api diferente de la versi\u00F3n anterior
error.validator.names.mismatch=la entrada {0} contiene una clase con un nombre interno {1}, los nombres no coinciden
+error.validator.info.name.notequal=module-info.class en un directorio con versi\u00F3n contiene un nombre incorrecto
+error.validator.info.requires.transitive=module-info.class en un directorio con versiones contiene "requires transitive" adicionales
+error.validator.info.requires.added=module-info.class en un directorio con versi\u00F3n contiene "requires" adicionales
+error.validator.info.requires.dropped=module-info.class en un directorio con versiones contiene "requires" que faltan
+error.validator.info.exports.notequal=module-info.class en un directorio con versiones contiene "exports" diferentes
+error.validator.info.opens.notequal=module-info.class en un directorio con versiones contiene "opens" diferentes
+error.validator.info.provides.notequal=module-info.class en un directorio con versiones contiene "provides" diferentes
+error.validator.info.version.notequal={0}: module-info.class en un directorio con versiones contiene una "version" diferente
+error.validator.info.manclass.notequal={0}: module-info.class en un directorio con versiones contiene una "main-class" diferente
warn.validator.identical.entry=Advertencia: la entrada {0} contiene una clase id\u00E9ntica a una entrada que ya est\u00E1 en el archivo jar
warn.validator.resources.with.same.name=Advertencia: la entrada {0} tiene varios recursos con el mismo nombre
warn.validator.concealed.public.class=Advertencia: la entrada {0} es una clase p\u00FAblica\nen un paquete oculto. Colocar este archivo jar en la ruta de clase tendr\u00E1 como resultado\ninterfaces p\u00FAblicas no compatibles
+warn.release.unexpected.versioned.entry=entrada versionada inesperada {0}
out.added.manifest=manifiesto agregado
out.added.module-info=module-info agregado: {0}
+out.automodule=No se ha encontrado ning\u00FAn descriptor de m\u00F3dulo. M\u00F3dulo autom\u00E1tico derivado.
out.update.manifest=manifiesto actualizado
out.update.module-info=module-info actualizado: {0}
out.ignore.entry=ignorando entrada {0}
@@ -88,17 +94,19 @@
main.usage.summary=Sintaxis: jar [OPTION...] [ [--release VERSION] [-C dir] archivos] ...
main.usage.summary.try=Intente `jar --help' para obtener m\u00E1s informaci\u00F3n.
-main.help.preopt=Sintaxis: jar [OPTION...] [ [--release VERSION] [-C dir] files] ...\njar crea un archivo para las clases y recursos y puede manipular o\nrestaurar clases individuales o recursos de un archivo.\n\n Ejemplos:\n # Crear un archivo denominado classes.jar con dos archivos de clase:\n jar --create --file classes.jar Foo.class Bar.class\n # Crear un archivo con un manifiesto existente, con todos los archivos en foo/:\n jar --create --file classes.jar --manifest mymanifest -C foo/ .\n # Crear un archivo jar modular, donde el descriptor de m\u00F3dulo est\u00E1 en\n # classes/module-info.class:\n jar --create --file foo.jar --main-class com.foo.Main --module-version 1.0\n -C foo/ classes resources\n # Actualizar un jar no modular en un jar modular:\n jar --update --file foo.jar --main-class com.foo.Main --module-version 1.0\n -C foo/ module-info.class\n # Crear un archivo jar de varias versiones y colocar algunos archivos en el directorio META-INF/versions/9:\n jar --create --file mr.jar -C foo classes --release 9 -C foo9 classes
+main.help.preopt=Sintaxis: jar [OPTION...] [ [--release VERSION] [-C dir] files] ...\njar crea un archivo para las clases y recursos, y puede manipular o\nrestaurar clases individuales o recursos de un archivo.\n\n Ejemplos:\n # Crear un archivo denominado classes.jar con dos archivos de clase:\n jar --create --file classes.jar Foo.class Bar.class\n # Crear un archivo con un manifiesto existente, con todos los archivos en foo/:\n jar --create --file classes.jar --manifest mymanifest -C foo/ .\n # Crear un archivo jar modular, donde el descriptor de m\u00F3dulo est\u00E1 en\n # classes/module-info.class:\n jar --create --file foo.jar --main-class com.foo.Main --module-version 1.0\n -C foo/ classes resources\n # Actualizar un jar no modular existente en un jar modular:\n jar --update --file foo.jar --main-class com.foo.Main --module-version 1.0\n -C foo/ module-info.class\n # Crear un archivo jar de varias versiones y colocar algunos archivos en el directorio META-INF/versions/9:\n jar --create --file mr.jar -C foo classes --release 9 -C foo9 classes\n\nPara acortar o simplificar el comando jar, puede especificar argumentos en un archivo\nde texto separado y transmitirlos al comando jar con el s\u00EDmbolo de arroba (@) como prefijo.\n\n Ejemplos:\n # Leer opciones adicionales y mostrar los archivos de clases del archivo classes.list\n jar --create --file my.jar @classes.list\n
main.help.opt.main=\ Modo de operaci\u00F3n principal:\n
main.help.opt.main.create=\ -c, --create Crear el archivo
main.help.opt.main.generate-index=\ -i, --generate-index=FILE Generar informaci\u00F3n de \u00EDndice para los archivos jar\n especificados
main.help.opt.main.list=\ -t, --list Mostrar la tabla de contenido del archivo
main.help.opt.main.update=\ -u, --update Actualizar un archivo jar existente
main.help.opt.main.extract=\ -x, --extract Extraer determinados (o todos) los archivos del archivo
-main.help.opt.main.print-module-descriptor=\ -d, --print-module-descriptor Imprimir el descriptor de m\u00F3dulo
+main.help.opt.main.describe-module=\ -d, --describe-module Imprimir el descriptor de m\u00F3dulo, o un nombre de m\u00F3dulo autom\u00E1tico
main.help.opt.any=\ Modificadores de operaci\u00F3n v\u00E1lidos en cualquier modo:\n\n -C DIR Cambiar al directorio especificado e incluir el\n siguiente archivo
-main.help.opt.any.file=\ -f, --file=FILE Nombre del archivo\n --release VERSION Se colocan todos los archivos siguientes en un directorio con versi\u00F3n\n del archivo jar (es decir, META-INF/versions/VERSION/)
+main.help.opt.any.file=\ -f, --file=FILE El nombre del archivo. Si se omite, se usa stdin o\n stdout en funci\u00F3n de la operaci\u00F3n\n --release VERSION Se colocan todos los archivos siguientes en un directorio con versi\u00F3n\n del archivo jar (es decir, META-INF/versions/VERSION/)
main.help.opt.any.verbose=\ -v, --verbose Generar salida verbose en salida est\u00E1ndar
+main.help.opt.create=\ Modificadores de operaci\u00F3n v\u00E1lidos solo en el modo de creaci\u00F3n:\n
+main.help.opt.create.normalize=\ -n, --normalize Normalizar informaci\u00F3n en el nuevo archivo jar\n despu\u00E9s de la creaci\u00F3n
main.help.opt.create.update=\ Modificadores de operaci\u00F3n v\u00E1lidos solo en el modo de creaci\u00F3n y de actualizaci\u00F3n:\n
main.help.opt.create.update.main-class=\ -e, --main-class=CLASSNAME Punto de entrada de la aplicaci\u00F3n para aplicaciones\n aut\u00F3nomas agrupadas en un archivo jar modular o\n ejecutable
main.help.opt.create.update.manifest=\ -m, --manifest=FILE Incluir la informaci\u00F3n de manifiesto del archivo\n de manifiesto proporcionado
@@ -111,7 +119,7 @@
main.help.opt.create.update.index=\ Modificadores de operaci\u00F3n v\u00E1lidos solo en el modo de creaci\u00F3n, actualizaci\u00F3n y generaci\u00F3n de \u00EDndice:\n
main.help.opt.create.update.index.no-compress=\ -0, --no-compress Solo almacenar; no usar compresi\u00F3n ZIP
main.help.opt.other=\ Otras opciones:\n
-main.help.opt.other.help=\ -?, --help[:compat] Utilice este valor, u opcionalmente la compatibilidad, ayuda
+main.help.opt.other.help=\ -h, --help[:compat] Utilice este valor, u opcionalmente la compatibilidad, ayuda
main.help.opt.other.help-extra=\ --help-extra Prestar ayuda en las opciones adicionales
main.help.opt.other.version=\ --version Imprimir versi\u00F3n del programa
main.help.postopt=\ Un archivo es un jar modular si el descriptor de m\u00F3dulo, 'module-info.class', est\u00E1\n en la ra\u00EDz de los directorios proporcionados o en la ra\u00EDz del archivo jar.\n Las siguientes operaciones solo son v\u00E1lidas si se va a crear un archivo jar modular\n o se va a actualizar un jar existente no modular: '--module-version',\n '--hash-modules' y '--module-path'.\n\n Los argumentos obligatorios u opcionales en las opciones largas tambi\u00E9n son obligatorios u opcionales\n en cualquiera de las opciones cortas.
--- a/jdk/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_fr.properties Sat Jun 03 02:44:55 2017 +0000
+++ b/jdk/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_fr.properties Sat Jun 03 03:48:03 2017 +0000
@@ -29,11 +29,11 @@
error.unrecognized.option=option non reconnue : {0}
error.missing.arg=l''option {0} exige un argument
error.bad.file.arg=Erreur lors de l'analyse des arguments de fichier
-error.bad.option=Une des options -{ctxu} doit \u00EAtre sp\u00E9cifi\u00E9e.
+error.bad.option=Une des options -{ctxuid} doit \u00EAtre sp\u00E9cifi\u00E9e.
error.bad.cflag=L'indicateur c requiert la sp\u00E9cification d'un fichier manifeste ou d'un fichier d'entr\u00E9e.
error.bad.uflag=L'indicateur u requiert la sp\u00E9cification d'un fichier manifeste, d'un fichier d'entr\u00E9e ou d'un indicateur e.
error.bad.eflag=L'indicateur e et le fichier manifeste portant l'attribut Main-Class ne peuvent pas \u00EAtre sp\u00E9cifi\u00E9s \nensemble.
-error.bad.dflag=L''option ''-d, --print-module-descriptor'' ne requiert la sp\u00E9cification d''aucun fichier d''entr\u00E9e : {0}
+error.bad.dflag=L'option '-d, --describe-module' ne requiert la sp\u00E9cification d'aucun fichier d'entr\u00E9e
error.bad.reason=raison incorrecte : {0}, la valeur doit \u00EAtre deprecated, deprecated-for-removal ou incubating
error.nosuch.fileordir={0} : fichier ou r\u00E9pertoire introuvable
error.write.file=Erreur lors de l'\u00E9criture d'un fichier JAR existant
@@ -42,16 +42,11 @@
error.create.tempfile=Impossible de cr\u00E9er un fichier temporaire
error.hash.dep=Hachage des d\u00E9pendances du module {0}, module {1} introuvable sur le chemin de module
error.module.options.without.info=Une des options --module-version ou --hash-modules sans module-info.class
+error.no.operative.descriptor=Aucun descripteur op\u00E9rationnel pour la version : {0}
+error.no.root.descriptor=Aucun descripteur de module racine, indiquer --release
+error.unable.derive.automodule=Impossible de d\u00E9river le descripteur de module pour : {0}
error.unexpected.module-info=Descripteur de module {0} inattendu
error.module.descriptor.not.found=Descripteur de module introuvable
-error.validator.info.without.root=module-info.class a \u00E9t\u00E9 d\u00E9tect\u00E9 dans un r\u00E9pertoire avec num\u00E9ro de version sans module-info.class dans la racine
-error.validator.info.name.notequal=module-info.class dans un r\u00E9pertoire avec num\u00E9ro de version contient un nom incorrect
-error.validator.info.requires.transitive=module-info.class dans un r\u00E9pertoire avec num\u00E9ro de version contient des "exigences transitives" suppl\u00E9mentaires
-error.validator.info.requires.added=module-info.class dans un r\u00E9pertoire avec num\u00E9ro de version contient des mots-cl\u00E9s "requires" suppl\u00E9mentaires
-error.validator.info.requires.dropped=module-info.class dans un r\u00E9pertoire avec num\u00E9ro de version contient des mots-cl\u00E9s "requires" manquants
-error.validator.info.exports.notequal=module-info.class dans un r\u00E9pertoire avec num\u00E9ro de version contient des mots-cl\u00E9s "exports" diff\u00E9rents
-error.validator.info.opens.notequal=module-info.class dans un r\u00E9pertoire avec num\u00E9ro de version contient des "ouvertures" diff\u00E9rentes
-error.validator.info.provides.notequal=module-info.class dans un r\u00E9pertoire avec num\u00E9ro de version contient des mots-cl\u00E9s "provides" diff\u00E9rents
error.invalid.versioned.module.attribute=Attribut de descripteur de module non valide {0}
error.missing.provider=Fournisseur de services introuvable : {0}
error.release.value.notnumber=version {0} non valide
@@ -67,11 +62,22 @@
error.validator.incompatible.class.version=l''entr\u00E9e : {0} a une version de classe non compatible avec une version ant\u00E9rieure
error.validator.different.api=l''entr\u00E9e : {0} contient une classe avec une API diff\u00E9rente de la version ant\u00E9rieure
error.validator.names.mismatch=l''entr\u00E9e : {0} contient une classe avec le nom interne {1}, les noms ne concordent pas
+error.validator.info.name.notequal=module-info.class dans un r\u00E9pertoire avec num\u00E9ro de version contient un nom incorrect
+error.validator.info.requires.transitive=module-info.class dans un r\u00E9pertoire avec num\u00E9ro de version contient un mot-cl\u00E9 "requires transitive" suppl\u00E9mentaire
+error.validator.info.requires.added=module-info.class dans un r\u00E9pertoire avec num\u00E9ro de version contient des mots-cl\u00E9s "requires" suppl\u00E9mentaires
+error.validator.info.requires.dropped=module-info.class dans un r\u00E9pertoire avec num\u00E9ro de version contient des mots-cl\u00E9s "requires" manquants
+error.validator.info.exports.notequal=module-info.class dans un r\u00E9pertoire avec num\u00E9ro de version contient des mots-cl\u00E9s "exports" diff\u00E9rents
+error.validator.info.opens.notequal=module-info.class dans un r\u00E9pertoire avec num\u00E9ro de version contient des mots-cl\u00E9s "opens" diff\u00E9rents
+error.validator.info.provides.notequal=module-info.class dans un r\u00E9pertoire avec num\u00E9ro de version contient des mots-cl\u00E9s "provides" diff\u00E9rents
+error.validator.info.version.notequal={0} : module-info.class dans un r\u00E9pertoire avec num\u00E9ro de version contient des mots-cl\u00E9s "version" diff\u00E9rents
+error.validator.info.manclass.notequal={0} : module-info.class dans un r\u00E9pertoire avec num\u00E9ro de version contient des mots-cl\u00E9s "main-class" diff\u00E9rents
warn.validator.identical.entry=Avertissement : l''entr\u00E9e {0} contient une classe\nidentique \u00E0 une entr\u00E9e qui se trouve d\u00E9j\u00E0 dans le fichier JAR
warn.validator.resources.with.same.name=Avertissement : entr\u00E9e {0}, plusieurs ressources du m\u00EAme nom
warn.validator.concealed.public.class=Avertissement : l''entr\u00E9e {0} est une classe publique\ndans un package dissimul\u00E9, le placement de ce fichier JAR sur le\nchemin de classe g\u00E9n\u00E9rera des interfaces publiques incompatibles
+warn.release.unexpected.versioned.entry=entr\u00E9e avec num\u00E9ro de version {0} inattendue
out.added.manifest=manifeste ajout\u00E9
out.added.module-info=module-info ajout\u00E9 : {0}
+out.automodule=Descripteur de module introuvable. Module automatique d\u00E9riv\u00E9.
out.update.manifest=manifeste mis \u00E0 jour
out.update.module-info=module-info mis \u00E0 jour : {0}
out.ignore.entry=entr\u00E9e {0} ignor\u00E9e
@@ -88,17 +94,19 @@
main.usage.summary=Syntaxe : jar [OPTION...] [ [--release VERSION] [-C dir] files] ...
main.usage.summary.try=Pour plus d'informations, essayez 'jar --help'.
-main.help.preopt=Syntaxe : jar [OPTION...] [ [--release VERSION] [-C dir] files] ...\njar cr\u00E9e une archive pour les classes et les ressources, et peut manipuler ou\nrestaurer les classes ou ressources individuelles \u00E0 partir d'une archive.\n\n Exemples :\n # Cr\u00E9ation d'une archive nomm\u00E9e classes.jar compos\u00E9e de deux fichiers de classe :\n jar --create --file classes.jar Foo.class Bar.class\n # Cr\u00E9ation d'une archive \u00E0 l'aide d'un manifeste existant, avec tous les fichiers dans foo/ :\n jar --create --file classes.jar --manifest mymanifest -C foo/ .\n # Cr\u00E9ation d'une archive JAR modulaire, o\u00F9 le descripteur de module est situ\u00E9 dans\n # classes/module-info.class :\n jar --create --file foo.jar --main-class com.foo.Main --module-version 1.0\n -C foo/ classes resources\n # Mise \u00E0 jour d'un fichier JAR non modulaire existant vers un fichier JAR modulaire :\n jar --update --file foo.jar --main-class com.foo.Main --module-version 1.0\n -C foo/ module-info.class\n # Cr\u00E9e un fichier JAR multiversion en pla\u00E7ant certains fichiers dans le r\u00E9pertoire META-INF/versions/9 :\n jar --create --file mr.jar -C foo classes --release 9 -C foo9 classes
+main.help.preopt=Syntaxe : jar [OPTION...] [ [--release VERSION] [-C dir] files] ...\njar cr\u00E9e une archive pour les classes et les ressources, et peut manipuler ou\nrestaurer les classes ou ressources individuelles \u00E0 partir d'une archive.\n\n Exemples :\n # Cr\u00E9ation d'une archive nomm\u00E9e classes.jar compos\u00E9e de deux fichiers de classe :\n jar --create --file classes.jar Foo.class Bar.class\n # Cr\u00E9ation d'une archive \u00E0 l'aide d'un manifeste existant, avec tous les fichiers dans foo/ :\n jar --create --file classes.jar --manifest mymanifest -C foo/ .\n # Cr\u00E9ation d'une archive JAR modulaire, o\u00F9 le descripteur de module est situ\u00E9 dans\n # classes/module-info.class :\n jar --create --file foo.jar --main-class com.foo.Main --module-version 1.0\n -C foo/ classes resources\n # Mise \u00E0 jour d'un fichier JAR non modulaire existant vers un fichier JAR modulaire :\n jar --update --file foo.jar --main-class com.foo.Main --module-version 1.0\n -C foo/ module-info.class\n # Cr\u00E9e un fichier JAR multiversion en pla\u00E7ant certains fichiers dans le r\u00E9pertoire META-INF/versions/9 :\n jar --create --file mr.jar -C foo classes --release 9 -C foo9 classes\n\nPour raccourcir ou simplifier la commande JAR, vous pouvez sp\u00E9cifier des arguments dans un\nfichier texte distinct et le transmettre \u00E0 la commande JAR avec le signe arobase (@) en tant que pr\u00E9fixe.\n\n Exemples :\n # Options de lecture suppl\u00E9mentaires et liste des fichiers de classe \u00E0 partir du fichier classes.list\n jar --create --file my.jar @classes.list\n
main.help.opt.main=\ Mode d'exploitation principal :\n
main.help.opt.main.create=\ -c, --create Cr\u00E9e l'archive
main.help.opt.main.generate-index=\ -i, --generate-index=FILE G\u00E9n\u00E8re des informations d'index pour les archives JAR\n indiqu\u00E9es
main.help.opt.main.list=\ -t, --list Affiche la table des mati\u00E8res de l'archive
main.help.opt.main.update=\ -u, --update Met \u00E0 jour une archive JAR existante
main.help.opt.main.extract=\ -x, --extract Extrait des fichiers nomm\u00E9s (ou tous les fichiers) de l'archive
-main.help.opt.main.print-module-descriptor=\ -d, --print-module-descriptor Imprime le descripteur de module
+main.help.opt.main.describe-module=\ -d, --describe-module afficher le descripteur de module ou le nom de module automatique
main.help.opt.any=\ Modificateurs d'op\u00E9ration valides pour tous les modes :\n\n -C DIR Passe au r\u00E9pertoire sp\u00E9cifi\u00E9 et inclut le\n fichier suivant
-main.help.opt.any.file=\ -f, --file=FILE Nom de fichier d'archive\n --release VERSION Place tous les fichiers suivants dans un r\u00E9pertoire avec num\u00E9ro de version\n du fichier JAR (par exemple, META-INF/versions/VERSION/)
+main.help.opt.any.file=\ -f, --file=FILE Nom du fichier d'archive. Lorsqu'il est omis, stdin ou\n stdout est utilis\u00E9 en fonction de l'op\u00E9ration\n --release VERSION Place tous les fichiers suivants dans un r\u00E9pertoire avec num\u00E9ro de version\n du fichier JAR (\u00E0 savoir META-INF/versions/VERSION/)
main.help.opt.any.verbose=\ -v, --verbose G\u00E9n\u00E8re une sortie en mode verbose d'une sortie standard
+main.help.opt.create=\ Modificateurs d'op\u00E9ration valides uniquement en mode create :\n
+main.help.opt.create.normalize=\ -n, --normalize Normaliser des informations dans la nouvelle archive JAR\n apr\u00E8s la cr\u00E9ation
main.help.opt.create.update=\ Modificateurs d'op\u00E9ration valides uniquement en modes create et update :\n
main.help.opt.create.update.main-class=\ -e, --main-class=CLASSNAME Point d'entr\u00E9e d'une application en mode autonome\n int\u00E9gr\u00E9e \u00E0 une archive JAR modulaire\n ou ex\u00E9cutable
main.help.opt.create.update.manifest=\ -m, --manifest=FILE Inclut les informations de manifeste du fichier\n manifeste donn\u00E9
@@ -111,7 +119,7 @@
main.help.opt.create.update.index=\ Modificateurs d'op\u00E9ration valides uniquement en modes create, update et generate-index :\n
main.help.opt.create.update.index.no-compress=\ -0, --no-compress Stocke uniquement ; n'utilise pas de compression ZIP
main.help.opt.other=\ Autres options :\n
-main.help.opt.other.help=\ -?, --help[:compat] Affiche l'aide ou \u00E9ventuellement la compatibilit\u00E9
+main.help.opt.other.help=\ -h, --help[:compat] Affiche l'aide ou \u00E9ventuellement la compatibilit\u00E9
main.help.opt.other.help-extra=\ --help-extra Affiche l'aide sur les options suppl\u00E9mentaires
main.help.opt.other.version=\ --version Imprime la version de programme
main.help.postopt=\ Une archive est un fichier JAR modulaire si un descripteur de module, 'module-info.class', se\n trouve dans la racine des r\u00E9pertoires donn\u00E9s ou dans la racine de l'archive JAR\n elle-m\u00EAme. Les op\u00E9rations suivantes sont valides uniquement lors de la cr\u00E9ation d'un fichier JAR modulaire\n ou de la mise \u00E0 jour d'un fichier JAR non modulaire existant : '--module-version',\n '--hash-modules' et '--module-path'.\n\n Les arguments obligatoires ou facultatifs pour les options longues sont \u00E9galement obligatoires ou facultatifs\n pour toute option courte correspondante.
--- a/jdk/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_it.properties Sat Jun 03 02:44:55 2017 +0000
+++ b/jdk/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_it.properties Sat Jun 03 03:48:03 2017 +0000
@@ -29,11 +29,11 @@
error.unrecognized.option=opzione non riconosciuta: {0}
error.missing.arg=l''opzione {0} richiede un argomento
error.bad.file.arg=Errore durante l'analisi degli argomenti del file
-error.bad.option=\u00C8 necessario specificare una delle opzioni -{ctxu}.
+error.bad.option=\u00C8 necessario specificare una delle opzioni -{ctxuid}.
error.bad.cflag=Per il flag 'c' \u00E8 necessario specificare file manifest o di input.
error.bad.uflag=Per il flag 'u' \u00E8 necessario specificare il flag 'e' oppure file manifest o di input.
error.bad.eflag=Il flag 'e' e il manifest con l'attributo 'Main-Class' non possono essere specificati\ninsieme.
-error.bad.dflag=Per l''opzione ''-d, --print-module-descriptor'' non \u00E8 necessario specificare alcun file di input: {0}
+error.bad.dflag=Per l'opzione '-d, --describe-module' non \u00E8 necessario specificare alcun file di input
error.bad.reason=Motivo non valido: {0}. Deve essere deprecated, deprecated-for-removal o incubating
error.nosuch.fileordir={0} : file o directory inesistente
error.write.file=Errore durante la scrittura del file jar esistente
@@ -42,16 +42,11 @@
error.create.tempfile=Impossibile creare il file temporaneo.
error.hash.dep={0} dipendenze del modulo di hashing. Impossibile trovare il modulo {1} nel percorso del modulo
error.module.options.without.info=Una delle opzioni --module-version o --hash-modules non contiene module-info.class
+error.no.operative.descriptor=Nessun descrittore operativo per la release: {0}
+error.no.root.descriptor=Nessun descrittore di modulo radice, specificare --release
+error.unable.derive.automodule=Impossibile derivare il descrittore di modulo per: {0}
error.unexpected.module-info=Descrittore di modulo {0} imprevisto
error.module.descriptor.not.found=Descrittore di modulo non trovato
-error.validator.info.without.root=module-info.class trovato in una directory con controllo delle versioni senza module-info.class nella radice
-error.validator.info.name.notequal=module-info.class in una directory con controllo delle versioni contiene un nome errato
-error.validator.info.requires.transitive=module-info.class in una directory con controllo delle versioni contiene valori "requires transitive" aggiuntivi
-error.validator.info.requires.added=module-info.class in una directory con controllo delle versioni contiene valori "requires" aggiuntivi
-error.validator.info.requires.dropped=module-info.class in una directory con controllo delle versioni contiene valori "requires" mancanti
-error.validator.info.exports.notequal=module-info.class in una directory con controllo delle versioni contiene "exports" differenti
-error.validator.info.opens.notequal=module-info.class in una directory con controllo delle versioni contiene valori "opens" differenti
-error.validator.info.provides.notequal=module-info.class in una directory con controllo delle versioni contiene valori "provides" differenti
error.invalid.versioned.module.attribute=Attributo descrittore del modulo {0} non valido.
error.missing.provider=Provider di servizi non trovato: {0}
error.release.value.notnumber=release {0} non valida
@@ -67,11 +62,22 @@
error.validator.incompatible.class.version=la voce {0} ha una versione incompatibile con una versione precedente
error.validator.different.api=la voce {0} contiene una classe con un''API diversa dalla versione precedente
error.validator.names.mismatch=la voce {0} contiene una classe con nome interno {1}. I nomi non corrispondono
+error.validator.info.name.notequal=module-info.class in una directory con controllo delle versioni contiene un nome errato
+error.validator.info.requires.transitive=module-info.class in una directory con controllo delle versioni contiene valori "requires transitive" aggiuntivi
+error.validator.info.requires.added=module-info.class in una directory con controllo delle versioni contiene valori "requires" aggiuntivi
+error.validator.info.requires.dropped=module-info.class in una directory con controllo delle versioni contiene valori "requires" mancanti
+error.validator.info.exports.notequal=module-info.class in una directory con controllo delle versioni contiene "exports" differenti
+error.validator.info.opens.notequal=module-info.class in una directory con controllo delle versioni contiene valori "opens" differenti
+error.validator.info.provides.notequal=module-info.class in una directory con controllo delle versioni contiene valori "provides" differenti
+error.validator.info.version.notequal={0}: module-info.class in una directory con controllo delle versioni contiene valori "version" differenti
+error.validator.info.manclass.notequal={0}: module-info.class in una directory con controllo delle versioni contiene valori "main-class" differenti
warn.validator.identical.entry=Avvertenza: la voce {0} contiene una classe\nidentica a una voce gi\u00E0 presente nel file jar
warn.validator.resources.with.same.name=Avvertenza: voce {0}. Pi\u00F9 risorse con lo stesso nome
warn.validator.concealed.public.class=Avvertenza: la voce {0} \u00E8 una classe pubblica\nin un package nascosto. Il posizionamento di questo file jar nel classpath\ngenerer\u00E0 interfacce pubbliche incompatibili
+warn.release.unexpected.versioned.entry=voce con controllo delle versioni non prevista {0}
out.added.manifest=aggiunto manifest
out.added.module-info=aggiunto module-info: {0}
+out.automodule=Nessun descrittore di modulo trovato. Derivato modulo automatico.
out.update.manifest=aggiornato manifest
out.update.module-info=aggiornato module-info: {0}
out.ignore.entry=la voce {0} sar\u00E0 ignorata
@@ -88,17 +94,19 @@
main.usage.summary=Uso: jar [OPTION...] [ [--release VERSION] [-C dir] file] ...
main.usage.summary.try=Utilizzare 'jar --help' per ulteriori informazioni.
-main.help.preopt=Uso: jar [OPTION...] [ [--release VERSION] [-C dir] file] ...\nIl file jar crea un archivio per le classi e le risorse e pu\u00F2 manipolare o\nripristinare le singole classi o risorse da un archivio.\n\n Esempi:\n # Crea un archivio denominato classes.jar con due file di classe:\n jar --create --file classes.jar Foo.class Bar.class\n # Crea un archivio mediante un file manifest esistente, con tutti i file in foo/:\n jar --create --file classes.jar --manifest mymanifest -C foo/ .\n # Crea un archivio jar modulare, in cui il descrittore di modulo si trova in\n # classes/module-info.class:\n jar --create --file foo.jar --main-class com.foo.Main --module-version 1.0\n -C foo/ classes resources\n # Aggiorna un file jar non modulare esistente in un file jar modulare:\n jar --update --file foo.jar --main-class com.foo.Main --module-version 1.0\n -C foo/ module-info.class\n # Crea un file jar per pi\u00F9 release, posizionando alcuni file nella directory META-INF/versions/9:\n jar --create --file mr.jar -C foo classes --release 9 -C foo9 classes
+main.help.preopt=Uso: jar [OPTION...] [ [--release VERSION] [-C dir] file] ...\nIl file jar crea un archivio per le classi e le risorse e pu\u00F2 manipolare o\nripristinare le singole classi o risorse da un archivio.\n\n Esempi:\n # Crea un archivio denominato classes.jar con due file di classe:\n jar --create --file classes.jar Foo.class Bar.class\n # Crea un archivio mediante un file manifest esistente, con tutti i file in foo/:\n jar --create --file classes.jar --manifest mymanifest -C foo/ .\n # Crea un archivio jar modulare, in cui il descrittore di modulo si trova in\n # classes/module-info.class:\n jar --create --file foo.jar --main-class com.foo.Main --module-version 1.0\n -C foo/ classes resources\n # Aggiorna un file jar non modulare esistente in un file jar modulare:\n jar --update --file foo.jar --main-class com.foo.Main --module-version 1.0\n -C foo/ module-info.class\n # Crea un file jar per pi\u00F9 release, posizionando alcuni file nella directory META-INF/versions/9:\n jar --create --file mr.jar -C foo classes --release 9 -C foo9 classes\n\nPer abbreviare o semplificare il comando jar, \u00E8 possibile specificare gli argomenti in un file\ndi testo distinto e passarlo al comando jar con il segno @ come prefisso.\n\n Esempi:\n # Legge le opzioni aggiuntive e la lista di file di classe dal file classes.list\n jar --create --file my.jar @classes.list\n
main.help.opt.main=\ Modalit\u00E0 di funzionamento principale:\n
main.help.opt.main.create=\ -c, --create Crea l'archivio
main.help.opt.main.generate-index=\ -i, --generate-index=FILE Genera le informazioni sull'indice per gli archivi\n jar specificati
main.help.opt.main.list=\ -t, --list Visualizza l'indice dell'archivio
main.help.opt.main.update=\ -u, --update Aggiorna un archivio jar esistente
main.help.opt.main.extract=\ -x, --extract Estrae i file con nome (o tutti i file) dall'archivio
-main.help.opt.main.print-module-descriptor=\ -d, --print-module-descriptor Stampa il descrittore del modulo
+main.help.opt.main.describe-module=\ -d, --describe-module Visualizza il descrittore di modulo o il nome modulo automatico
main.help.opt.any=\ Modificatori di funzionamento validi in qualsiasi modalit\u00E0:\n\n -C DIR Passa alla directory specificata e include il\n file seguente
-main.help.opt.any.file=\ -f, --file=FILE Il nome file dell'archivio.\n --release VERSION Inserisce tutti i file riportati di seguito in una directory con\n controllo delle versioni del file JAR (ovvero META-INF/versions/VERSION/).
+main.help.opt.any.file=\ -f, --file=FILE Il nome file dell'archivio. Se omesso, viene usato stdin o\n stdout in base all'operazione\n --release VERSION Posiziona tutti i file successivi in una directory con controllo delle versioni\n del file jar (ad esempio, META-INF/versions/VERSION/)
main.help.opt.any.verbose=\ -v, --verbose Genera l'output descrittivo nell'output standard
+main.help.opt.create=\ Modificatori di funzionamento validi solo nella modalit\u00E0 di creazione:\n
+main.help.opt.create.normalize=\ -n, --normalize Normalizza le informazioni nel nuovo archivio jar\n dopo la creazione
main.help.opt.create.update=\ Modificatori di funzionamento validi solo nella modalit\u00E0 di creazione e aggiornamento:\n
main.help.opt.create.update.main-class=\ -e, --main-class=CLASSNAME Punto di ingresso per le applicazioni\n stand-alone incluse nell'archivio jar modulare o\n eseguibile
main.help.opt.create.update.manifest=\ -m, --manifest=FILE Include le informazioni sul file manifest dal file\n manifest specificato
@@ -111,7 +119,7 @@
main.help.opt.create.update.index=\ Modificatori di funzionamento validi solo nella modalit\u00E0 di creazione, aggiornamento e di generazione dell'indice:\n
main.help.opt.create.update.index.no-compress=\ -0, --no-compress Solo per la memorizzazione. Non utilizza alcuna compressione ZIP
main.help.opt.other=\ Altre opzioni:\n
-main.help.opt.other.help=\ -?, --help[:compat] Fornisce questa Guida o facoltativamente la Guida sulla compatibilit\u00E0
+main.help.opt.other.help=\ -h, --help[:compat] Fornisce questa Guida o facoltativamente la Guida sulla compatibilit\u00E0
main.help.opt.other.help-extra=\ --help-extra Fornisce la Guida per le opzioni non standard
main.help.opt.other.version=\ --version Stampa la versione del programma
main.help.postopt=\ Un archivio \u00E8 un file jar modulare se un descrittore di modulo, 'module-info.class', si trova\n nella directory radice delle directory specificate o nella radice dell'archivio jar\n stesso. Le operazioni seguenti sono valide solo durante la creazione di un file jar modulare\n o l'aggiornamento di un file jar non modulare esistente: '--module-version',\n '--hash-modules' e '--module-path'.\n\n Gli argomenti obbligatori o facoltativi per le opzioni lunghe sono obbligatori\n o facoltativi anche per le opzioni brevi corrispondenti.
--- a/jdk/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_ja.properties Sat Jun 03 02:44:55 2017 +0000
+++ b/jdk/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_ja.properties Sat Jun 03 03:48:03 2017 +0000
@@ -29,11 +29,11 @@
error.unrecognized.option=\u8A8D\u8B58\u3055\u308C\u306A\u3044\u30AA\u30D7\u30B7\u30E7\u30F3: {0}
error.missing.arg=\u30AA\u30D7\u30B7\u30E7\u30F3{0}\u306B\u306F\u5F15\u6570\u304C\u5FC5\u8981\u3067\u3059\u3002
error.bad.file.arg=\u30D5\u30A1\u30A4\u30EB\u5F15\u6570\u306E\u89E3\u6790\u4E2D\u306B\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F
-error.bad.option=\u30AA\u30D7\u30B7\u30E7\u30F3-{ctxu}\u306E\u3046\u3061\u306E1\u3064\u3092\u6307\u5B9A\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
+error.bad.option=\u30AA\u30D7\u30B7\u30E7\u30F3-{ctxuid}\u306E\u3046\u3061\u306E1\u3064\u3092\u6307\u5B9A\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
error.bad.cflag=\u30D5\u30E9\u30B0'c'\u3067\u306F\u30DE\u30CB\u30D5\u30A7\u30B9\u30C8\u307E\u305F\u306F\u5165\u529B\u30D5\u30A1\u30A4\u30EB\u306E\u6307\u5B9A\u304C\u5FC5\u8981\u3067\u3059\u3002
error.bad.uflag=\u30D5\u30E9\u30B0'u'\u3067\u306F\u30DE\u30CB\u30D5\u30A7\u30B9\u30C8\u304B'e'\u30D5\u30E9\u30B0\u3001\u307E\u305F\u306F\u5165\u529B\u30D5\u30A1\u30A4\u30EB\u306E\u6307\u5B9A\u304C\u5FC5\u8981\u3067\u3059\u3002
error.bad.eflag='e'\u30D5\u30E9\u30B0\u3068'Main-Class'\u5C5E\u6027\u3092\u6301\u3064\u30DE\u30CB\u30D5\u30A7\u30B9\u30C8\u306F\u540C\u6642\u306B\n\u6307\u5B9A\u3067\u304D\u307E\u305B\u3093\u3002
-error.bad.dflag=''-d, --print-module-descriptor''\u30AA\u30D7\u30B7\u30E7\u30F3\u3067\u306F\u5165\u529B\u30D5\u30A1\u30A4\u30EB\u306E\u6307\u5B9A\u306F\u4E0D\u8981\u3067\u3059: {0}
+error.bad.dflag='-d, --describe-module'\u30AA\u30D7\u30B7\u30E7\u30F3\u3067\u306F\u5165\u529B\u30D5\u30A1\u30A4\u30EB\u306E\u6307\u5B9A\u306F\u4E0D\u8981\u3067\u3059
error.bad.reason=\u4E0D\u6B63\u306A\u7406\u7531: {0}\u3001\u975E\u63A8\u5968\u3001\u524A\u9664\u4E88\u5B9A\u306E\u975E\u63A8\u5968\u307E\u305F\u306F\u5B9F\u9A13\u7684\u306E\u3044\u305A\u308C\u304B\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059
error.nosuch.fileordir={0}\u3068\u3044\u3046\u30D5\u30A1\u30A4\u30EB\u307E\u305F\u306F\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306F\u3042\u308A\u307E\u305B\u3093
error.write.file=\u65E2\u5B58jar\u30D5\u30A1\u30A4\u30EB\u306E\u66F8\u8FBC\u307F\u4E2D\u306B\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F
@@ -42,16 +42,11 @@
error.create.tempfile=\u4E00\u6642\u30D5\u30A1\u30A4\u30EB\u3092\u4F5C\u6210\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F
error.hash.dep=\u30E2\u30B8\u30E5\u30FC\u30EB{0}\u4F9D\u5B58\u6027\u306E\u30CF\u30C3\u30B7\u30E5\u3067\u30E2\u30B8\u30E5\u30FC\u30EB{1}\u304C\u30E2\u30B8\u30E5\u30FC\u30EB\u30FB\u30D1\u30B9\u306B\u898B\u3064\u304B\u308A\u307E\u305B\u3093
error.module.options.without.info=--module-version\u307E\u305F\u306F--hash-modules\u306E\u3044\u305A\u308C\u304B\u3067module-info.class\u304C\u3042\u308A\u307E\u305B\u3093
+error.no.operative.descriptor=\u30EA\u30EA\u30FC\u30B9\u306E\u64CD\u4F5C\u30C7\u30A3\u30B9\u30AF\u30EA\u30D7\u30BF\u306F\u3042\u308A\u307E\u305B\u3093: {0}
+error.no.root.descriptor=\u30EB\u30FC\u30C8\u30FB\u30E2\u30B8\u30E5\u30FC\u30EB\u306E\u30C7\u30A3\u30B9\u30AF\u30EA\u30D7\u30BF\u304C\u3042\u308A\u307E\u305B\u3093\u3002--release\u3092\u6307\u5B9A\u3057\u3066\u304F\u3060\u3055\u3044
+error.unable.derive.automodule=\u6B21\u306E\u30E2\u30B8\u30E5\u30FC\u30EB\u30FB\u30C7\u30A3\u30B9\u30AF\u30EA\u30D7\u30BF\u3092\u5C0E\u51FA\u3067\u304D\u307E\u305B\u3093: {0}
error.unexpected.module-info=\u4E88\u671F\u3057\u306A\u3044\u30E2\u30B8\u30E5\u30FC\u30EB\u30FB\u30C7\u30A3\u30B9\u30AF\u30EA\u30D7\u30BF{0}
error.module.descriptor.not.found=\u30E2\u30B8\u30E5\u30FC\u30EB\u30FB\u30C7\u30A3\u30B9\u30AF\u30EA\u30D7\u30BF\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093
-error.validator.info.without.root=module-info.class\u304C\u3001\u30EB\u30FC\u30C8\u306Bmodule-info.class\u306E\u306A\u3044\u30D0\u30FC\u30B8\u30E7\u30CB\u30F3\u30B0\u3055\u308C\u305F\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306B\u898B\u3064\u304B\u308A\u307E\u3057\u305F
-error.validator.info.name.notequal=\u30D0\u30FC\u30B8\u30E7\u30CB\u30F3\u30B0\u3055\u308C\u305F\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306Emodule-info.class\u306B\u6B63\u3057\u304F\u306A\u3044\u540D\u524D\u304C\u542B\u307E\u308C\u3066\u3044\u307E\u3059
-error.validator.info.requires.transitive=\u30D0\u30FC\u30B8\u30E7\u30CB\u30F3\u30B0\u30FB\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306Emodule-info.class\u306B\u8FFD\u52A0\u306E"requires transitive"\u304C\u542B\u307E\u308C\u3066\u3044\u307E\u3059
-error.validator.info.requires.added=\u30D0\u30FC\u30B8\u30E7\u30CB\u30F3\u30B0\u3055\u308C\u305F\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306Emodule-info.class\u306B\u8FFD\u52A0\u306E"requires"\u304C\u542B\u307E\u308C\u3066\u3044\u307E\u3059
-error.validator.info.requires.dropped=\u30D0\u30FC\u30B8\u30E7\u30CB\u30F3\u30B0\u3055\u308C\u305F\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306Emodule-info.class\u306B\u6B20\u843D\u3057\u3066\u3044\u308B"requires"\u304C\u542B\u307E\u308C\u3066\u3044\u307E\u3059
-error.validator.info.exports.notequal=\u30D0\u30FC\u30B8\u30E7\u30CB\u30F3\u30B0\u3055\u308C\u305F\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306Emodule-info.class\u306B\u7570\u306A\u308B"exports"\u304C\u542B\u307E\u308C\u3066\u3044\u307E\u3059
-error.validator.info.opens.notequal=\u30D0\u30FC\u30B8\u30E7\u30CB\u30F3\u30B0\u30FB\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306Emodule-info.class\u306B\u7570\u306A\u308B"opens"\u304C\u542B\u307E\u308C\u3066\u3044\u307E\u3059
-error.validator.info.provides.notequal=\u30D0\u30FC\u30B8\u30E7\u30CB\u30F3\u30B0\u3055\u308C\u305F\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306Emodule-info.class\u306B\u7570\u306A\u308B"provides"\u304C\u542B\u307E\u308C\u3066\u3044\u307E\u3059
error.invalid.versioned.module.attribute=\u30E2\u30B8\u30E5\u30FC\u30EB\u30FB\u30C7\u30A3\u30B9\u30AF\u30EA\u30D7\u30BF\u5C5E\u6027{0}\u304C\u7121\u52B9\u3067\u3059
error.missing.provider=\u30B5\u30FC\u30D3\u30B9\u30FB\u30D7\u30ED\u30D0\u30A4\u30C0\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093: {0}
error.release.value.notnumber=\u30EA\u30EA\u30FC\u30B9{0}\u306F\u6709\u52B9\u3067\u306F\u3042\u308A\u307E\u305B\u3093
@@ -67,11 +62,22 @@
error.validator.incompatible.class.version=\u30A8\u30F3\u30C8\u30EA: {0}\u306B\u306F\u3001\u4EE5\u524D\u306E\u30D0\u30FC\u30B8\u30E7\u30F3\u3068\u4E92\u63DB\u6027\u306E\u306A\u3044\u30AF\u30E9\u30B9\u30FB\u30D0\u30FC\u30B8\u30E7\u30F3\u304C\u542B\u307E\u308C\u307E\u3059
error.validator.different.api=\u30A8\u30F3\u30C8\u30EA: {0}\u306B\u306F\u3001\u4EE5\u524D\u306E\u30D0\u30FC\u30B8\u30E7\u30F3\u3068\u306F\u7570\u306A\u308BAPI\u3092\u6301\u3064\u30AF\u30E9\u30B9\u304C\u542B\u307E\u308C\u307E\u3059
error.validator.names.mismatch=\u30A8\u30F3\u30C8\u30EA: {0}\u306B\u306F\u3001\u5185\u90E8\u540D{1}\u3092\u6301\u3064\u30AF\u30E9\u30B9\u304C\u542B\u307E\u308C\u307E\u3059\u304C\u3001\u540D\u524D\u304C\u4E00\u81F4\u3057\u307E\u305B\u3093
+error.validator.info.name.notequal=\u30D0\u30FC\u30B8\u30E7\u30CB\u30F3\u30B0\u3055\u308C\u305F\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306Emodule-info.class\u306B\u6B63\u3057\u304F\u306A\u3044\u540D\u524D\u304C\u542B\u307E\u308C\u3066\u3044\u307E\u3059
+error.validator.info.requires.transitive=\u30D0\u30FC\u30B8\u30E7\u30CB\u30F3\u30B0\u30FB\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306Emodule-info.class\u306B\u8FFD\u52A0\u306E"requires transitive"\u304C\u542B\u307E\u308C\u3066\u3044\u307E\u3059
+error.validator.info.requires.added=\u30D0\u30FC\u30B8\u30E7\u30CB\u30F3\u30B0\u3055\u308C\u305F\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306Emodule-info.class\u306B\u8FFD\u52A0\u306E"requires"\u304C\u542B\u307E\u308C\u3066\u3044\u307E\u3059
+error.validator.info.requires.dropped=\u30D0\u30FC\u30B8\u30E7\u30CB\u30F3\u30B0\u3055\u308C\u305F\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306Emodule-info.class\u306B\u6B20\u843D\u3057\u3066\u3044\u308B"requires"\u304C\u542B\u307E\u308C\u3066\u3044\u307E\u3059
+error.validator.info.exports.notequal=\u30D0\u30FC\u30B8\u30E7\u30CB\u30F3\u30B0\u3055\u308C\u305F\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306Emodule-info.class\u306B\u7570\u306A\u308B"exports"\u304C\u542B\u307E\u308C\u3066\u3044\u307E\u3059
+error.validator.info.opens.notequal=\u30D0\u30FC\u30B8\u30E7\u30CB\u30F3\u30B0\u30FB\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306Emodule-info.class\u306B\u7570\u306A\u308B"opens"\u304C\u542B\u307E\u308C\u3066\u3044\u307E\u3059
+error.validator.info.provides.notequal=\u30D0\u30FC\u30B8\u30E7\u30CB\u30F3\u30B0\u3055\u308C\u305F\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306Emodule-info.class\u306B\u7570\u306A\u308B"provides"\u304C\u542B\u307E\u308C\u3066\u3044\u307E\u3059
+error.validator.info.version.notequal={0}: \u30D0\u30FC\u30B8\u30E7\u30CB\u30F3\u30B0\u3055\u308C\u305F\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306Emodule-info.class\u306B\u7570\u306A\u308B"version"\u304C\u542B\u307E\u308C\u3066\u3044\u307E\u3059
+error.validator.info.manclass.notequal={0}: \u30D0\u30FC\u30B8\u30E7\u30CB\u30F3\u30B0\u3055\u308C\u305F\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306Emodule-info.class\u306B\u7570\u306A\u308B"main-class"\u304C\u542B\u307E\u308C\u3066\u3044\u307E\u3059
warn.validator.identical.entry=\u8B66\u544A : \u30A8\u30F3\u30C8\u30EA{0}\u306B\u306F\u3001jar\u306B\u3059\u3067\u306B\u5B58\u5728\u3059\u308B\n\u30A8\u30F3\u30C8\u30EA\u3068\u540C\u3058\u30AF\u30E9\u30B9\u304C\u542B\u307E\u308C\u307E\u3059
warn.validator.resources.with.same.name=\u8B66\u544A : \u30A8\u30F3\u30C8\u30EA{0}\u3001\u540C\u3058\u540D\u524D\u3092\u6301\u3064\u8907\u6570\u306E\u30EA\u30BD\u30FC\u30B9
warn.validator.concealed.public.class=\u8B66\u544A : \u30A8\u30F3\u30C8\u30EA{0}\u306F\u3001\u96A0\u3057\u30D1\u30C3\u30B1\u30FC\u30B8\u5185\u306Epublic\u30AF\u30E9\u30B9\u3067\u3059\u3002\n\u30AF\u30E9\u30B9\u30D1\u30B9\u306B\u3053\u306Ejar\u3092\u914D\u7F6E\u3059\u308B\u3068\u3001\u4E92\u63DB\u6027\u306E\u306A\u3044\npublic\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u304C\u751F\u6210\u3055\u308C\u307E\u3059
+warn.release.unexpected.versioned.entry=\u4E88\u671F\u3057\u306A\u3044\u30D0\u30FC\u30B8\u30E7\u30CB\u30F3\u30B0\u6E08\u30A8\u30F3\u30C8\u30EA{0}
out.added.manifest=\u30DE\u30CB\u30D5\u30A7\u30B9\u30C8\u304C\u8FFD\u52A0\u3055\u308C\u307E\u3057\u305F
out.added.module-info=module-info\u304C\u8FFD\u52A0\u3055\u308C\u307E\u3057\u305F: {0}
+out.automodule=\u30E2\u30B8\u30E5\u30FC\u30EB\u30FB\u30C7\u30A3\u30B9\u30AF\u30EA\u30D7\u30BF\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3002\u81EA\u52D5\u30E2\u30B8\u30E5\u30FC\u30EB\u304C\u5C0E\u51FA\u3055\u308C\u307E\u3057\u305F\u3002
out.update.manifest=\u30DE\u30CB\u30D5\u30A7\u30B9\u30C8\u304C\u66F4\u65B0\u3055\u308C\u307E\u3057\u305F
out.update.module-info=module-info\u304C\u66F4\u65B0\u3055\u308C\u307E\u3057\u305F: {0}
out.ignore.entry=\u30A8\u30F3\u30C8\u30EA{0}\u3092\u7121\u8996\u3057\u307E\u3059
@@ -88,17 +94,19 @@
main.usage.summary=\u4F7F\u7528\u65B9\u6CD5: jar [OPTION...] [ [--release VERSION] [-C dir] files] ...
main.usage.summary.try=\u8A73\u7D30\u306F\u3001`jar --help'\u3092\u5B9F\u884C\u3057\u3066\u304F\u3060\u3055\u3044\u3002
-main.help.preopt=\u4F7F\u7528\u65B9\u6CD5: jar [OPTION...] [ [--release VERSION] [-C dir] files] ...\njar\u306F\u30AF\u30E9\u30B9\u304A\u3088\u3073\u30EA\u30BD\u30FC\u30B9\u306E\u30A2\u30FC\u30AB\u30A4\u30D6\u3092\u4F5C\u6210\u3057\u3001\u30A2\u30FC\u30AB\u30A4\u30D6\u304B\u3089\u500B\u3005\u306E\u30AF\u30E9\u30B9\u307E\u305F\u306F\n\u30EA\u30BD\u30FC\u30B9\u3092\u64CD\u4F5C\u307E\u305F\u306F\u5FA9\u5143\u3067\u304D\u307E\u3059\u3002\n\n \u4F8B:\n # 2\u3064\u306E\u30AF\u30E9\u30B9\u30FB\u30D5\u30A1\u30A4\u30EB\u3092\u542B\u3080classes.jar\u3068\u3044\u3046\u30A2\u30FC\u30AB\u30A4\u30D6\u3092\u4F5C\u6210\u3059\u308B:\n jar --create --file classes.jar Foo.class Bar.class\n # foo/\u306E\u3059\u3079\u3066\u306E\u30D5\u30A1\u30A4\u30EB\u3092\u542B\u3080\u3001\u65E2\u5B58\u306E\u30DE\u30CB\u30D5\u30A7\u30B9\u30C8\u3092\u4F7F\u7528\u3057\u305F\u30A2\u30FC\u30AB\u30A4\u30D6\u3092\u4F5C\u6210\u3059\u308B:\n jar --create --file classes.jar --manifest mymanifest -C foo/ .\n # \u30E2\u30B8\u30E5\u30E9jar\u30A2\u30FC\u30AB\u30A4\u30D6\u3092\u4F5C\u6210\u3059\u308B\u3002\u30E2\u30B8\u30E5\u30FC\u30EB\u30FB\u30C7\u30A3\u30B9\u30AF\u30EA\u30D7\u30BF\u306Fclasses/module-info.class\u306B\n # \u3042\u308B:\n jar --create --file foo.jar --main-class com.foo.Main --module-version 1.0\n -C foo/ classes resources\n # \u65E2\u5B58\u306E\u975E\u30E2\u30B8\u30E5\u30E9jar\u3092\u30E2\u30B8\u30E5\u30E9jar\u306B\u66F4\u65B0\u3059\u308B:\n jar --update --file foo.jar --main-class com.foo.Main --module-version 1.0\n -C foo/ module-info.class\n # \u8907\u6570\u30EA\u30EA\u30FC\u30B9jar\u3092\u4F5C\u6210\u3057\u3001\u4E00\u90E8\u306E\u30D5\u30A1\u30A4\u30EB\u3092META-INF/versions/9\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306B\u914D\u7F6E\u3059\u308B:\n jar --create --file mr.jar -C foo classes --release 9 -C foo9 classes
+main.help.preopt=\u4F7F\u7528\u65B9\u6CD5: jar [OPTION...] [ [--release VERSION] [-C dir] files] ...\njar\u306F\u30AF\u30E9\u30B9\u304A\u3088\u3073\u30EA\u30BD\u30FC\u30B9\u306E\u30A2\u30FC\u30AB\u30A4\u30D6\u3092\u4F5C\u6210\u3057\u3001\u30A2\u30FC\u30AB\u30A4\u30D6\u304B\u3089\u500B\u3005\u306E\u30AF\u30E9\u30B9\u307E\u305F\u306F\n\u30EA\u30BD\u30FC\u30B9\u3092\u64CD\u4F5C\u307E\u305F\u306F\u5FA9\u5143\u3067\u304D\u307E\u3059\u3002\n\n \u4F8B:\n # 2\u3064\u306E\u30AF\u30E9\u30B9\u30FB\u30D5\u30A1\u30A4\u30EB\u3092\u542B\u3080classes.jar\u3068\u3044\u3046\u30A2\u30FC\u30AB\u30A4\u30D6\u3092\u4F5C\u6210\u3059\u308B:\n jar --create --file classes.jar Foo.class Bar.class\n # foo/\u306E\u3059\u3079\u3066\u306E\u30D5\u30A1\u30A4\u30EB\u3092\u542B\u3080\u3001\u65E2\u5B58\u306E\u30DE\u30CB\u30D5\u30A7\u30B9\u30C8\u3092\u4F7F\u7528\u3057\u305F\u30A2\u30FC\u30AB\u30A4\u30D6\u3092\u4F5C\u6210\u3059\u308B:\n jar --create --file classes.jar --manifest mymanifest -C foo/ .\n # \u30E2\u30B8\u30E5\u30E9jar\u30A2\u30FC\u30AB\u30A4\u30D6\u3092\u4F5C\u6210\u3059\u308B\u3002\u30E2\u30B8\u30E5\u30FC\u30EB\u30FB\u30C7\u30A3\u30B9\u30AF\u30EA\u30D7\u30BF\u306Fclasses/module-info.class\u306B\n # \u3042\u308B:\n jar --create --file foo.jar --main-class com.foo.Main --module-version 1.0\n -C foo/ classes resources\n # \u65E2\u5B58\u306E\u975E\u30E2\u30B8\u30E5\u30E9jar\u3092\u30E2\u30B8\u30E5\u30E9jar\u306B\u66F4\u65B0\u3059\u308B:\n jar --update --file foo.jar --main-class com.foo.Main --module-version 1.0\n -C foo/ module-info.class\n # \u8907\u6570\u30EA\u30EA\u30FC\u30B9jar\u3092\u4F5C\u6210\u3057\u3001\u4E00\u90E8\u306E\u30D5\u30A1\u30A4\u30EB\u3092META-INF/versions/9\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306B\u914D\u7F6E\u3059\u308B:\n jar --create --file mr.jar -C foo classes --release 9 -C foo9 classes\n\njar\u30B3\u30DE\u30F3\u30C9\u3092\u77ED\u7E2E\u307E\u305F\u306F\u7C21\u7565\u5316\u3059\u308B\u306B\u306F\u3001\u500B\u5225\u306E\u30C6\u30AD\u30B9\u30C8\u30FB\u30D5\u30A1\u30A4\u30EB\u3067\u5F15\u6570\u3092\u6307\u5B9A\u3057\u3001\n\u8A18\u53F7(@)\u3092\u63A5\u982D\u8F9E\u3068\u3057\u3066\u4F7F\u7528\u3057\u3066jar\u30B3\u30DE\u30F3\u30C9\u306B\u6E21\u3057\u307E\u3059\u3002\n\n \u4F8B:\n # \u8FFD\u52A0\u30AA\u30D7\u30B7\u30E7\u30F3\u304A\u3088\u3073\u30AF\u30E9\u30B9\u30FB\u30D5\u30A1\u30A4\u30EB\u306E\u30EA\u30B9\u30C8\u3092\u30D5\u30A1\u30A4\u30EBclasses.list\u304B\u3089\u8AAD\u8FBC\u307F\u307E\u3059\n jar --create --file my.jar @classes.list\n
main.help.opt.main=\ \u30E1\u30A4\u30F3\u64CD\u4F5C\u30E2\u30FC\u30C9:\n
main.help.opt.main.create=\ -c\u3001--create \u30A2\u30FC\u30AB\u30A4\u30D6\u3092\u4F5C\u6210\u3057\u307E\u3059
main.help.opt.main.generate-index=\ -i,\u3001--generate-index=FILE \u6307\u5B9A\u306Ejar\u30A2\u30FC\u30AB\u30A4\u30D6\u306E\u7D22\u5F15\u60C5\u5831\u3092\n \u751F\u6210\u3057\u307E\u3059
main.help.opt.main.list=\ -t\u3001--list \u30A2\u30FC\u30AB\u30A4\u30D6\u306E\u5185\u5BB9\u3092\u4E00\u89A7\u8868\u793A\u3057\u307E\u3059
main.help.opt.main.update=\ -u\u3001--update \u65E2\u5B58\u306Ejar\u30A2\u30FC\u30AB\u30A4\u30D6\u3092\u66F4\u65B0\u3057\u307E\u3059
main.help.opt.main.extract=\ -x\u3001--extract \u6307\u5B9A\u306E(\u307E\u305F\u306F\u3059\u3079\u3066\u306E)\u30D5\u30A1\u30A4\u30EB\u3092\u30A2\u30FC\u30AB\u30A4\u30D6\u304B\u3089\u62BD\u51FA\u3057\u307E\u3059
-main.help.opt.main.print-module-descriptor=\ -d\u3001--print-module-descriptor \u30E2\u30B8\u30E5\u30FC\u30EB\u30FB\u30C7\u30A3\u30B9\u30AF\u30EA\u30D7\u30BF\u3092\u51FA\u529B\u3057\u307E\u3059
+main.help.opt.main.describe-module=\ -d, --describe-module \u30E2\u30B8\u30E5\u30FC\u30EB\u30FB\u30C7\u30A3\u30B9\u30AF\u30EA\u30D7\u30BF\u307E\u305F\u306F\u81EA\u52D5\u30E2\u30B8\u30E5\u30FC\u30EB\u540D\u3092\u51FA\u529B\u3057\u307E\u3059
main.help.opt.any=\ \u3069\u306E\u30E2\u30FC\u30C9\u3067\u3082\u6709\u52B9\u306A\u64CD\u4F5C\u4FEE\u98FE\u5B50:\n\n -C DIR \u6307\u5B9A\u306E\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306B\u5909\u66F4\u3057\u3001\u6B21\u306E\u30D5\u30A1\u30A4\u30EB\u3092\n \u53D6\u308A\u8FBC\u307F\u307E\u3059
-main.help.opt.any.file=\ -f\u3001--file=FILE \u30A2\u30FC\u30AB\u30A4\u30D6\u30FB\u30D5\u30A1\u30A4\u30EB\u540D\n --release VERSION \u6B21\u306E\u3059\u3079\u3066\u306E\u30D5\u30A1\u30A4\u30EB\u3092jar\u306E\u30D0\u30FC\u30B8\u30E7\u30CB\u30F3\u30B0\u3055\u308C\u305F\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\n (\u3064\u307E\u308A\u3001META-INF/versions/VERSION/)\u306B\u914D\u7F6E\u3057\u307E\u3059
+main.help.opt.any.file=\ -f\u3001--file=FILE \u30A2\u30FC\u30AB\u30A4\u30D6\u30FB\u30D5\u30A1\u30A4\u30EB\u540D\u3002\u7701\u7565\u3057\u305F\u5834\u5408\u3001stdin\u307E\u305F\u306F\n stdout\u306E\u3044\u305A\u308C\u304B\u304C\u64CD\u4F5C\u306B\u57FA\u3065\u3044\u3066\u4F7F\u7528\u3055\u308C\u307E\u3059\n --release VERSION \u6B21\u306E\u3059\u3079\u3066\u306E\u30D5\u30A1\u30A4\u30EB\u3092jar\u306E\u30D0\u30FC\u30B8\u30E7\u30CB\u30F3\u30B0\u3055\u308C\u305F\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\n (\u3064\u307E\u308A\u3001META-INF/versions/VERSION/)\u306B\u914D\u7F6E\u3057\u307E\u3059
main.help.opt.any.verbose=\ -v\u3001--verbose \u6A19\u6E96\u51FA\u529B\u306B\u8A73\u7D30\u306A\u51FA\u529B\u3092\u751F\u6210\u3057\u307E\u3059
+main.help.opt.create=\ \u4F5C\u6210\u30E2\u30FC\u30C9\u3067\u306E\u307F\u6709\u52B9\u306A\u64CD\u4F5C\u4FEE\u98FE\u5B50:\n
+main.help.opt.create.normalize=\ -n\u3001--normalize \u65B0\u3057\u3044jar\u30A2\u30FC\u30AB\u30A4\u30D6\u306E\u4F5C\u6210\u5F8C\u3001\u542B\u307E\u308C\u308B\u60C5\u5831\u3092\n \u6B63\u898F\u5316\u3057\u307E\u3059
main.help.opt.create.update=\ \u4F5C\u6210\u307E\u305F\u306F\u66F4\u65B0\u30E2\u30FC\u30C9\u3067\u306E\u307F\u6709\u52B9\u306A\u64CD\u4F5C\u4FEE\u98FE\u5B50:\n
main.help.opt.create.update.main-class=\ -e\u3001--main-class=CLASSNAME \u30E2\u30B8\u30E5\u30E9\u307E\u305F\u306F\u5B9F\u884C\u53EF\u80FD\u306Ajar\u30A2\u30FC\u30AB\u30A4\u30D6\u306B\n \u30D0\u30F3\u30C9\u30EB\u3055\u308C\u305F\u30B9\u30BF\u30F3\u30C9\u30A2\u30ED\u30F3\u30FB\u30A2\u30D7\u30EA\u30B1\u30FC\u30B7\u30E7\u30F3\u306E\n \u30A2\u30D7\u30EA\u30B1\u30FC\u30B7\u30E7\u30F3\u30FB\u30A8\u30F3\u30C8\u30EA\u30FB\u30DD\u30A4\u30F3\u30C8
main.help.opt.create.update.manifest=\ -m\u3001--manifest=FILE \u6307\u5B9A\u306E\u30DE\u30CB\u30D5\u30A7\u30B9\u30C8\u30FB\u30D5\u30A1\u30A4\u30EB\u304B\u3089\u30DE\u30CB\u30D5\u30A7\u30B9\u30C8\u60C5\u5831\u3092\n \u53D6\u308A\u8FBC\u307F\u307E\u3059
@@ -111,7 +119,7 @@
main.help.opt.create.update.index=\ \u4F5C\u6210\u3001\u66F4\u65B0\u304A\u3088\u3073\u7D22\u5F15\u751F\u6210\u30E2\u30FC\u30C9\u3067\u306E\u307F\u6709\u52B9\u306A\u64CD\u4F5C\u4FEE\u98FE\u5B50:\n
main.help.opt.create.update.index.no-compress=\ -0, --no-compress \u683C\u7D0D\u306E\u307F\u3002ZIP\u5727\u7E2E\u3092\u4F7F\u7528\u3057\u307E\u305B\u3093
main.help.opt.other=\ \u305D\u306E\u4ED6\u306E\u30AA\u30D7\u30B7\u30E7\u30F3:\n
-main.help.opt.other.help=\ -?, --help[:compat] \u3053\u308C(\u30AA\u30D7\u30B7\u30E7\u30F3\u3067\u4E92\u63DB\u6027)\u3092help\u306B\u6307\u5B9A\u3057\u307E\u3059
+main.help.opt.other.help=\ -h\u3001--help[:compat] \u3053\u308C(\u30AA\u30D7\u30B7\u30E7\u30F3\u3067\u4E92\u63DB\u6027)\u3092help\u306B\u6307\u5B9A\u3057\u307E\u3059
main.help.opt.other.help-extra=\ --help-extra \u8FFD\u52A0\u30AA\u30D7\u30B7\u30E7\u30F3\u306E\u30D8\u30EB\u30D7\u3092\u63D0\u4F9B\u3057\u307E\u3059
main.help.opt.other.version=\ --version \u30D7\u30ED\u30B0\u30E9\u30E0\u30FB\u30D0\u30FC\u30B8\u30E7\u30F3\u3092\u51FA\u529B\u3057\u307E\u3059
main.help.postopt=\ \u30E2\u30B8\u30E5\u30FC\u30EB\u30FB\u30C7\u30A3\u30B9\u30AF\u30EA\u30D7\u30BF'module-info.class'\u304C\u6307\u5B9A\u306E\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306E\u30EB\u30FC\u30C8\u307E\u305F\u306F\n jar\u30A2\u30FC\u30AB\u30A4\u30D6\u81EA\u4F53\u306E\u30EB\u30FC\u30C8\u306B\u3042\u308B\u5834\u5408\u3001\u30A2\u30FC\u30AB\u30A4\u30D6\u306F\u30E2\u30B8\u30E5\u30E9jar\u3067\u3059\u3002\n \u6B21\u306E\u64CD\u4F5C\u306F\u3001\u30E2\u30B8\u30E5\u30E9jar\u306E\u4F5C\u6210\u6642\u307E\u305F\u306F\u65E2\u5B58\u306E\u975E\u30E2\u30B8\u30E5\u30E9jar\u306E\u66F4\u65B0\u6642\u306B\n \u306E\u307F\u6709\u52B9\u3067\u3059: '--module-version'\u3001\n '--hash-modules'\u304A\u3088\u3073'--module-path'\u3002\n\n \u30ED\u30F3\u30B0\u30FB\u30AA\u30D7\u30B7\u30E7\u30F3\u3078\u306E\u5FC5\u9808\u307E\u305F\u306F\u30AA\u30D7\u30B7\u30E7\u30F3\u306E\u5F15\u6570\u306F\u3001\u5BFE\u5FDC\u3059\u308B\u30B7\u30E7\u30FC\u30C8\u30FB\u30AA\u30D7\u30B7\u30E7\u30F3\n \u306B\u5BFE\u3057\u3066\u3082\u5FC5\u9808\u307E\u305F\u306F\u30AA\u30D7\u30B7\u30E7\u30F3\u306B\u306A\u308A\u307E\u3059\u3002
--- a/jdk/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_ko.properties Sat Jun 03 02:44:55 2017 +0000
+++ b/jdk/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_ko.properties Sat Jun 03 03:48:03 2017 +0000
@@ -29,11 +29,11 @@
error.unrecognized.option=\uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 \uC635\uC158: {0}
error.missing.arg={0} \uC635\uC158\uC5D0 \uC778\uC218\uAC00 \uD544\uC694\uD569\uB2C8\uB2E4.
error.bad.file.arg=\uD30C\uC77C \uC778\uC218 \uAD6C\uBB38\uC744 \uBD84\uC11D\uD558\uB294 \uC911 \uC624\uB958\uAC00 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4.
-error.bad.option=\uC635\uC158 -{ctxu} \uC911 \uD558\uB098\uB97C \uC9C0\uC815\uD574\uC57C \uD569\uB2C8\uB2E4.
+error.bad.option=-{ctxuid} \uC635\uC158 \uC911 \uD558\uB098\uB97C \uC9C0\uC815\uD574\uC57C \uD569\uB2C8\uB2E4.
error.bad.cflag='c' \uD50C\uB798\uADF8\uB97C \uC0AC\uC6A9\uD558\uB824\uBA74 Manifest \uB610\uB294 \uC785\uB825 \uD30C\uC77C\uC744 \uC9C0\uC815\uD574\uC57C \uD569\uB2C8\uB2E4!
error.bad.uflag='u' \uD50C\uB798\uADF8\uB97C \uC0AC\uC6A9\uD558\uB824\uBA74 Manifest, 'e' \uD50C\uB798\uADF8 \uB610\uB294 \uC785\uB825 \uD30C\uC77C\uC744 \uC9C0\uC815\uD574\uC57C \uD569\uB2C8\uB2E4!
error.bad.eflag='e' \uD50C\uB798\uADF8 \uBC0F Manifest\uB97C 'Main-Class' \uC18D\uC131\uACFC \uD568\uAED8 \uC9C0\uC815\uD560 \uC218\n\uC5C6\uC2B5\uB2C8\uB2E4!
-error.bad.dflag=''-d, --print-module-descriptor'' \uC635\uC158\uC5D0\uB294 \uC785\uB825 \uD30C\uC77C\uC744 \uC9C0\uC815\uD560 \uD544\uC694\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4. {0}
+error.bad.dflag='-d, --describe-module' \uC635\uC158\uC5D0\uB294 \uC785\uB825 \uD30C\uC77C\uC744 \uC9C0\uC815\uD560 \uD544\uC694\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.
error.bad.reason=\uC798\uBABB\uB41C \uC6D0\uC778: {0}\uC740(\uB294) deprecated, deprecated-for-removal \uB610\uB294 incubating \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4.
error.nosuch.fileordir={0}: \uD574\uB2F9 \uD30C\uC77C \uB610\uB294 \uB514\uB809\uD1A0\uB9AC\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.
error.write.file=\uAE30\uC874 jar \uD30C\uC77C\uC5D0 \uC4F0\uB294 \uC911 \uC624\uB958\uAC00 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4.
@@ -42,16 +42,11 @@
error.create.tempfile=\uC784\uC2DC \uD30C\uC77C\uC744 \uC0DD\uC131\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
error.hash.dep=\uBAA8\uB4C8 {0} \uC885\uC18D\uC131\uC744 \uD574\uC2DC\uD558\uB294 \uC911 \uBAA8\uB4C8 \uACBD\uB85C\uC5D0\uC11C {1} \uBAA8\uB4C8\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
error.module.options.without.info=module-info.class \uC5C6\uC774 --module-version \uB610\uB294 --hash-modules \uC911 \uD558\uB098
+error.no.operative.descriptor=\uB9B4\uB9AC\uC2A4\uC5D0 \uB300\uD55C \uC791\uB3D9 \uAE30\uC220\uC790 \uC5C6\uC74C: {0}
+error.no.root.descriptor=\uB8E8\uD2B8 \uBAA8\uB4C8 \uAE30\uC220\uC790\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4. --release\uB97C \uC9C0\uC815\uD558\uC2ED\uC2DC\uC624.
+error.unable.derive.automodule=\uBAA8\uB4C8 \uAE30\uC220\uC790\uB97C \uD30C\uC0DD\uD560 \uC218 \uC5C6\uC74C: {0}
error.unexpected.module-info=\uC608\uC0C1\uCE58 \uC54A\uC740 \uBAA8\uB4C8 \uAE30\uC220\uC790 {0}
error.module.descriptor.not.found=\uBAA8\uB4C8 \uAE30\uC220\uC790\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC74C
-error.validator.info.without.root=\uB8E8\uD2B8\uC5D0\uC11C module-info.class \uC5C6\uC774 \uBC84\uC804 \uC9C0\uC815\uB41C \uB514\uB809\uD1A0\uB9AC\uC5D0\uC11C module-info.class\uAC00 \uBC1C\uACAC\uB428
-error.validator.info.name.notequal=\uBC84\uC804 \uC9C0\uC815\uB41C \uB514\uB809\uD1A0\uB9AC\uC758 module-info.class\uC5D0 \uC798\uBABB\uB41C \uC774\uB984\uC774 \uD3EC\uD568\uB428
-error.validator.info.requires.transitive=\uBC84\uC804 \uC9C0\uC815\uB41C \uB514\uB809\uD1A0\uB9AC\uC758 module-info.class\uC5D0 \uCD94\uAC00 "requires transitive" \uD56D\uBAA9\uC774 \uD3EC\uD568\uB428
-error.validator.info.requires.added=\uBC84\uC804 \uC9C0\uC815\uB41C \uB514\uB809\uD1A0\uB9AC\uC758 module-info.class\uC5D0 \uCD94\uAC00 "requires" \uD56D\uBAA9\uC774 \uD3EC\uD568\uB428
-error.validator.info.requires.dropped=\uBC84\uC804 \uC9C0\uC815\uB41C \uB514\uB809\uD1A0\uB9AC\uC758 module-info.class\uC5D0 \uB204\uB77D\uB41C "requires" \uD56D\uBAA9\uC774 \uD3EC\uD568\uB428
-error.validator.info.exports.notequal=\uBC84\uC804 \uC9C0\uC815\uB41C \uB514\uB809\uD1A0\uB9AC\uC758 module-info.class\uC5D0 \uB2E4\uB978 "exports" \uD56D\uBAA9\uC774 \uD3EC\uD568\uB428
-error.validator.info.opens.notequal=\uBC84\uC804 \uC9C0\uC815\uB41C \uB514\uB809\uD1A0\uB9AC\uC758 module-info.class\uC5D0 \uB2E4\uB978 "opens" \uD56D\uBAA9\uC774 \uD3EC\uD568\uB428
-error.validator.info.provides.notequal=\uBC84\uC804 \uC9C0\uC815\uB41C \uB514\uB809\uD1A0\uB9AC\uC758 module-info.class\uC5D0 \uB2E4\uB978 "provides" \uD56D\uBAA9\uC774 \uD3EC\uD568\uB428
error.invalid.versioned.module.attribute=\uBD80\uC801\uD569\uD55C \uBAA8\uB4C8 \uAE30\uC220\uC790 \uC18D\uC131 {0}
error.missing.provider=\uC11C\uBE44\uC2A4 \uC81C\uACF5\uC790\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC74C: {0}
error.release.value.notnumber=\uB9B4\uB9AC\uC2A4 {0}\uC774(\uAC00) \uBD80\uC801\uD569\uD568
@@ -67,11 +62,22 @@
error.validator.incompatible.class.version={0} \uD56D\uBAA9\uC5D0 \uC774\uC804 \uBC84\uC804\uACFC \uD638\uD658\uB418\uC9C0 \uC54A\uB294 \uD074\uB798\uC2A4 \uBC84\uC804\uC774 \uC788\uC2B5\uB2C8\uB2E4.
error.validator.different.api={0} \uD56D\uBAA9\uC5D0 \uC774\uC804 \uBC84\uC804\uACFC \uB2E4\uB978 api\uB97C \uAC00\uC9C4 \uD074\uB798\uC2A4\uAC00 \uC788\uC2B5\uB2C8\uB2E4.
error.validator.names.mismatch={0} \uD56D\uBAA9\uC5D0 \uB0B4\uBD80 \uC774\uB984 {1}\uC744(\uB97C) \uAC00\uC9C4 \uD074\uB798\uC2A4\uAC00 \uC788\uC9C0\uB9CC \uC774\uB984\uC774 \uC77C\uCE58\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
+error.validator.info.name.notequal=\uBC84\uC804 \uC9C0\uC815\uB41C \uB514\uB809\uD1A0\uB9AC\uC758 module-info.class\uC5D0 \uC798\uBABB\uB41C \uC774\uB984\uC774 \uD3EC\uD568\uB428
+error.validator.info.requires.transitive=\uBC84\uC804 \uC9C0\uC815\uB41C \uB514\uB809\uD1A0\uB9AC\uC758 module-info.class\uC5D0 \uCD94\uAC00 "requires transitive" \uD56D\uBAA9\uC774 \uD3EC\uD568\uB428
+error.validator.info.requires.added=\uBC84\uC804 \uC9C0\uC815\uB41C \uB514\uB809\uD1A0\uB9AC\uC758 module-info.class\uC5D0 \uCD94\uAC00 "requires" \uD56D\uBAA9\uC774 \uD3EC\uD568\uB428
+error.validator.info.requires.dropped=\uBC84\uC804 \uC9C0\uC815\uB41C \uB514\uB809\uD1A0\uB9AC\uC758 module-info.class\uC5D0 \uB204\uB77D\uB41C "requires" \uD56D\uBAA9\uC774 \uD3EC\uD568\uB428
+error.validator.info.exports.notequal=\uBC84\uC804 \uC9C0\uC815\uB41C \uB514\uB809\uD1A0\uB9AC\uC758 module-info.class\uC5D0 \uB2E4\uB978 "exports" \uD56D\uBAA9\uC774 \uD3EC\uD568\uB428
+error.validator.info.opens.notequal=\uBC84\uC804 \uC9C0\uC815\uB41C \uB514\uB809\uD1A0\uB9AC\uC758 module-info.class\uC5D0 \uB2E4\uB978 "opens" \uD56D\uBAA9\uC774 \uD3EC\uD568\uB428
+error.validator.info.provides.notequal=\uBC84\uC804 \uC9C0\uC815\uB41C \uB514\uB809\uD1A0\uB9AC\uC758 module-info.class\uC5D0 \uB2E4\uB978 "provides" \uD56D\uBAA9\uC774 \uD3EC\uD568\uB428
+error.validator.info.version.notequal={0}: \uBC84\uC804\uC774 \uC9C0\uC815\uB41C \uB514\uB809\uD1A0\uB9AC\uC758 module-info.class\uC5D0 \uB2E4\uB978 "version" \uD56D\uBAA9\uC774 \uD3EC\uD568\uB428
+error.validator.info.manclass.notequal={0}: \uBC84\uC804\uC774 \uC9C0\uC815\uB41C \uB514\uB809\uD1A0\uB9AC\uC758 module-info.class\uC5D0 \uB2E4\uB978 "main-class" \uD56D\uBAA9\uC774 \uD3EC\uD568\uB428
warn.validator.identical.entry=\uACBD\uACE0: {0} \uD56D\uBAA9\uC5D0 \uC774\uBBF8 jar\uC5D0 \uC788\uB294 \uD56D\uBAA9\uACFC\n\uB3D9\uC77C\uD55C \uD074\uB798\uC2A4\uAC00 \uC788\uC2B5\uB2C8\uB2E4.
warn.validator.resources.with.same.name=\uACBD\uACE0: {0} \uD56D\uBAA9\uC5D0 \uB3D9\uC77C\uD55C \uC774\uB984\uC758 \uC5EC\uB7EC \uB9AC\uC18C\uC2A4\uAC00 \uC788\uC2B5\uB2C8\uB2E4.
warn.validator.concealed.public.class=\uACBD\uACE0: {0} \uD56D\uBAA9\uC740 \uC228\uACA8\uC9C4 \uD328\uD0A4\uC9C0\uC5D0 \uC788\uB294\n\uACF5\uC6A9 \uD074\uB798\uC2A4\uC785\uB2C8\uB2E4. \uC774 jar\uC744 \uD074\uB798\uC2A4 \uACBD\uB85C\uC5D0 \uBC30\uCE58\uD558\uBA74\n\uACF5\uC6A9 \uC778\uD130\uD398\uC774\uC2A4\uAC00 \uD638\uD658\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
+warn.release.unexpected.versioned.entry=\uC608\uC0C1\uCE58 \uC54A\uC740 \uBC84\uC804\uC774 \uC9C0\uC815\uB41C \uD56D\uBAA9 {0}\uC785\uB2C8\uB2E4.
out.added.manifest=Manifest\uB97C \uCD94\uAC00\uD568
out.added.module-info=\uCD94\uAC00\uB41C \uBAA8\uB4C8 \uC815\uBCF4: {0}
+out.automodule=\uBAA8\uB4C8 \uAE30\uC220\uC790\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uC790\uB3D9 \uBAA8\uB4C8\uC744 \uD30C\uC0DD\uD588\uC2B5\uB2C8\uB2E4.
out.update.manifest=Manifest\uB97C \uC5C5\uB370\uC774\uD2B8\uD568
out.update.module-info=\uC5C5\uB370\uC774\uD2B8\uB41C \uBAA8\uB4C8 \uC815\uBCF4: {0}
out.ignore.entry={0} \uD56D\uBAA9\uC744 \uBB34\uC2DC\uD558\uB294 \uC911
@@ -88,17 +94,19 @@
main.usage.summary=\uC0AC\uC6A9\uBC95: jar [OPTION...] [ [--release VERSION] [-C dir] files] ...
main.usage.summary.try=\uC790\uC138\uD55C \uB0B4\uC6A9\uC744 \uBCF4\uB824\uBA74 'jar --help'\uB97C \uC2E4\uD589\uD558\uC2ED\uC2DC\uC624.
-main.help.preopt=\uC0AC\uC6A9\uBC95: jar [OPTION...] [ [--release VERSION] [-C dir] files] ...\njar\uB294 \uD074\uB798\uC2A4 \uBC0F \uB9AC\uC18C\uC2A4\uC5D0 \uB300\uD55C \uC544\uCE74\uC774\uBE0C\uB97C \uC0DD\uC131\uD569\uB2C8\uB2E4. \uC544\uCE74\uC774\uBE0C\uC5D0\uC11C\n\uAC1C\uBCC4 \uD074\uB798\uC2A4\uB098 \uB9AC\uC18C\uC2A4\uB97C \uC870\uC791\uD558\uAC70\uB098 \uBCF5\uC6D0\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.\n\n \uC608\uC81C:\n # \uB450 \uD074\uB798\uC2A4 \uD30C\uC77C\uC744 \uC0AC\uC6A9\uD558\uC5EC classes.jar\uB77C\uB294 \uC544\uCE74\uC774\uBE0C \uC0DD\uC131:\n jar --create --file classes.jar Foo.class Bar.class\n # \uAE30\uC874 Manifest\uB97C \uC0AC\uC6A9\uD558\uC5EC \uBAA8\uB4E0 \uD30C\uC77C\uC774 foo/\uC5D0 \uD3EC\uD568\uB41C \uC544\uCE74\uC774\uBE0C \uC0DD\uC131:\n jar --create --file classes.jar --manifest mymanifest -C foo/ .\n # \uBAA8\uB4C8 \uAE30\uC220\uC790\uAC00 classes/module-info.class\uC5D0 \uC704\uCE58\uD55C\n # \uBAA8\uB4C8\uD615 jar \uC544\uCE74\uC774\uBE0C \uC0DD\uC131:\n jar --create --file foo.jar --main-class com.foo.Main --module-version 1.0\n -C foo/ classes resources\n # \uAE30\uC874 \uBE44\uBAA8\uB4C8 jar\uB97C \uBAA8\uB4C8\uD615 jar\uB85C \uC5C5\uB370\uC774\uD2B8:\n jar --update --file foo.jar --main-class com.foo.Main --module-version 1.0\n -C foo/ module-info.class\n # \uC77C\uBD80 \uD30C\uC77C\uC774 META-INF/versions/9 \uB514\uB809\uD1A0\uB9AC\uC5D0 \uC704\uCE58\uD55C \uB2E4\uC911 \uB9B4\uB9AC\uC2A4 jar \uC0DD\uC131:\n jar --create --file mr.jar -C foo classes --release 9 -C foo9 classes
+main.help.preopt=\uC0AC\uC6A9\uBC95: jar [OPTION...] [ [--release VERSION] [-C dir] \uD30C\uC77C] ...\njar\uB294 \uD074\uB798\uC2A4 \uBC0F \uB9AC\uC18C\uC2A4\uC5D0 \uB300\uD55C \uC544\uCE74\uC774\uBE0C\uB97C \uC0DD\uC131\uD569\uB2C8\uB2E4. \uC544\uCE74\uC774\uBE0C\uC5D0\uC11C\n\uAC1C\uBCC4 \uD074\uB798\uC2A4\uB098 \uB9AC\uC18C\uC2A4\uB97C \uC870\uC791\uD558\uAC70\uB098 \uBCF5\uC6D0\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.\n\n \uC608\uC81C:\n # \uB450 \uD074\uB798\uC2A4 \uD30C\uC77C\uC744 \uC0AC\uC6A9\uD558\uC5EC classes.jar\uB77C\uB294 \uC544\uCE74\uC774\uBE0C \uC0DD\uC131:\n jar --create --file classes.jar Foo.class Bar.class\n # \uAE30\uC874 Manifest\uB97C \uC0AC\uC6A9\uD558\uC5EC \uBAA8\uB4E0 \uD30C\uC77C\uC774 foo/\uC5D0 \uD3EC\uD568\uB41C \uC544\uCE74\uC774\uBE0C \uC0DD\uC131:\n jar --create --file classes.jar --manifest mymanifest -C foo/ .\n # \uBAA8\uB4C8 \uAE30\uC220\uC790\uAC00 classes/module-info.class\uC5D0 \uC704\uCE58\uD55C\n # \uBAA8\uB4C8\uD615 jar \uC544\uCE74\uC774\uBE0C \uC0DD\uC131:\n jar --create --file foo.jar --main-class com.foo.Main --module-version 1.0\n -C foo/ classes resources\n # \uAE30\uC874 \uBE44\uBAA8\uB4C8 jar\uB97C \uBAA8\uB4C8\uD615 jar\uB85C \uC5C5\uB370\uC774\uD2B8:\n jar --update --file foo.jar --main-class com.foo.Main --module-version 1.0\n -C foo/ module-info.class\n # \uC77C\uBD80 \uD30C\uC77C\uC774 META-INF/versions/9 \uB514\uB809\uD1A0\uB9AC\uC5D0 \uC704\uCE58\uD55C \uB2E4\uC911 \uB9B4\uB9AC\uC2A4 jar \uC0DD\uC131:\n jar --create --file mr.jar -C foo classes --release 9 -C foo9 classes\n\njar \uBA85\uB839\uC744 \uC9E7\uAC8C \uB9CC\uB4E4\uAC70\uB098 \uB2E8\uC21C\uD654\uD558\uB824\uBA74 \uBCC4\uB3C4\uC758 \uD14D\uC2A4\uD2B8 \uD30C\uC77C\uC5D0 \uC778\uC218\uB97C \uC9C0\uC815\uD558\uACE0\nat \uAE30\uD638(@)\uB97C \uC811\uB450\uC5B4\uB85C \uC0AC\uC6A9\uD558\uC5EC jar \uBA85\uB839\uC5D0 \uC804\uB2EC\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.\n\n \uC608\uC81C:\n # classes.list \uD30C\uC77C\uC5D0\uC11C \uCD94\uAC00 \uC635\uC158 \uBC0F \uD074\uB798\uC2A4 \uD30C\uC77C \uBAA9\uB85D \uC77D\uAE30\n jar --create --file my.jar @classes.list\n
main.help.opt.main=\ \uAE30\uBCF8 \uC791\uC5C5 \uBAA8\uB4DC:\n
main.help.opt.main.create=\ -c, --create \uC544\uCE74\uC774\uBE0C\uB97C \uC0DD\uC131\uD569\uB2C8\uB2E4.
main.help.opt.main.generate-index=\ -i, --generate-index=FILE \uC9C0\uC815\uB41C jar \uC544\uCE74\uC774\uBE0C\uC5D0 \uB300\uD55C \uC778\uB371\uC2A4 \uC815\uBCF4\uB97C\n \uC0DD\uC131\uD569\uB2C8\uB2E4.
main.help.opt.main.list=\ -t, --list \uC544\uCE74\uC774\uBE0C\uC5D0 \uB300\uD55C \uBAA9\uCC28\uB97C \uB098\uC5F4\uD569\uB2C8\uB2E4.
main.help.opt.main.update=\ -u, --update \uAE30\uC874 jar \uC544\uCE74\uC774\uBE0C\uB97C \uC5C5\uB370\uC774\uD2B8\uD569\uB2C8\uB2E4.
main.help.opt.main.extract=\ -x, --extract \uBA85\uBA85\uB41C(\uB610\uB294 \uBAA8\uB4E0) \uD30C\uC77C\uC744 \uC544\uCE74\uC774\uBE0C\uC5D0\uC11C \uCD94\uCD9C\uD569\uB2C8\uB2E4.
-main.help.opt.main.print-module-descriptor=\ -d, --print-module-descriptor \uBAA8\uB4C8 \uAE30\uC220\uC790\uB97C \uC778\uC1C4\uD569\uB2C8\uB2E4.
+main.help.opt.main.describe-module=\ -d, --describe-module \uBAA8\uB4C8 \uAE30\uC220\uC790 \uB610\uB294 \uC790\uB3D9 \uBAA8\uB4C8 \uC774\uB984\uC744 \uC778\uC1C4\uD569\uB2C8\uB2E4.
main.help.opt.any=\ \uBAA8\uB4E0 \uBAA8\uB4DC\uC5D0\uC11C \uC801\uD569\uD55C \uC791\uC5C5 \uC218\uC815\uC790:\n\n -C DIR \uC9C0\uC815\uB41C \uB514\uB809\uD1A0\uB9AC\uB85C \uBCC0\uACBD\uD558\uACE0 \uB2E4\uC74C \uD30C\uC77C\uC744\n \uD3EC\uD568\uD569\uB2C8\uB2E4.
-main.help.opt.any.file=\ -f, --file=FILE \uC544\uCE74\uC774\uBE0C \uD30C\uC77C \uC774\uB984\uC785\uB2C8\uB2E4.\n --release VERSION \uB2E4\uC74C \uBAA8\uB4E0 \uD30C\uC77C\uC744 \uBC84\uC804 \uC9C0\uC815\uB41C jar \uB514\uB809\uD1A0\uB9AC\n (\uC608: META-INF/versions/VERSION/)\uC5D0 \uBC30\uCE58\uD569\uB2C8\uB2E4.
+main.help.opt.any.file=\ -f, --file=FILE \uC544\uCE74\uC774\uBE0C \uD30C\uC77C \uC774\uB984\uC785\uB2C8\uB2E4. \uC0DD\uB7B5\uD560 \uACBD\uC6B0 \uC791\uC5C5\uC5D0 \uB530\uB77C \n stdin \uB610\uB294 stdout\uC774 \uC0AC\uC6A9\uB429\uB2C8\uB2E4.\n --release VERSION \uB2E4\uC74C \uBAA8\uB4E0 \uD30C\uC77C\uC744 \uBC84\uC804 \uC9C0\uC815\uB41C jar \uB514\uB809\uD1A0\uB9AC\n (\uC608: META-INF/versions/VERSION/)\uC5D0 \uBC30\uCE58\uD569\uB2C8\uB2E4.
main.help.opt.any.verbose=\ -v, --verbose \uD45C\uC900 \uCD9C\uB825\uC5D0 \uC0C1\uC138 \uC815\uBCF4 \uCD9C\uB825\uC744 \uC0DD\uC131\uD569\uB2C8\uB2E4.
+main.help.opt.create=\ \uC0DD\uC131 \uBAA8\uB4DC\uC5D0\uC11C\uB9CC \uC801\uD569\uD55C \uC791\uC5C5 \uC218\uC815\uC790:\n
+main.help.opt.create.normalize=\ -n, --normalize \uC0DD\uC131 \uD6C4 \uC0C8 jar \uC544\uCE74\uC774\uBE0C\uC5D0\uC11C \uC815\uBCF4\uB97C\n \uC815\uADDC\uD654\uD569\uB2C8\uB2E4.
main.help.opt.create.update=\ \uC0DD\uC131 \uBC0F \uC5C5\uB370\uC774\uD2B8 \uBAA8\uB4DC\uC5D0\uC11C\uB9CC \uC801\uD569\uD55C \uC791\uC5C5 \uC218\uC815\uC790:\n
main.help.opt.create.update.main-class=\ -e, --main-class=CLASSNAME \uBAA8\uB4C8\uD615 \uB610\uB294 \uC2E4\uD589\uD615 jar \uC544\uCE74\uC774\uBE0C\uC5D0 \uBC88\uB4E4\uB85C\n \uC81C\uACF5\uB41C \uB3C5\uB9BD\uD615 \uC560\uD50C\uB9AC\uCF00\uC774\uC158\uC758 \uC560\uD50C\uB9AC\uCF00\uC774\uC158\n \uC2DC\uC791 \uC9C0\uC810\uC785\uB2C8\uB2E4.
main.help.opt.create.update.manifest=\ -m, --manifest=FILE \uC9C0\uC815\uB41C Manifest \uD30C\uC77C\uC758 Manifest \uC815\uBCF4\uB97C\n \uD3EC\uD568\uD569\uB2C8\uB2E4.
@@ -111,7 +119,7 @@
main.help.opt.create.update.index=\ \uC0DD\uC131, \uC5C5\uB370\uC774\uD2B8 \uBC0F generate-index \uBAA8\uB4DC\uC5D0\uC11C\uB9CC \uC801\uD569\uD55C \uC791\uC5C5 \uC218\uC815\uC790:\n
main.help.opt.create.update.index.no-compress=\ -0, --no-compress \uC800\uC7A5 \uC804\uC6A9\uC774\uBA70 ZIP \uC555\uCD95\uC744 \uC0AC\uC6A9\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
main.help.opt.other=\ \uAE30\uD0C0 \uC635\uC158:\n
-main.help.opt.other.help=\ -?, --help[:compat] \uC774 \uB3C4\uC6C0\uB9D0(\uB610\uB294 \uC120\uD0DD\uC801\uC73C\uB85C \uD638\uD658\uC131)\uC744 \uC81C\uACF5\uD569\uB2C8\uB2E4.
+main.help.opt.other.help=\ -h, --help[:compat] \uC774 \uB3C4\uC6C0\uB9D0(\uB610\uB294 \uC120\uD0DD\uC801\uC73C\uB85C \uD638\uD658\uC131)\uC744 \uC81C\uACF5\uD569\uB2C8\uB2E4.
main.help.opt.other.help-extra=\ --help-extra \uCD94\uAC00 \uC635\uC158\uC5D0 \uB300\uD55C \uB3C4\uC6C0\uB9D0\uC744 \uC81C\uACF5\uD569\uB2C8\uB2E4.
main.help.opt.other.version=\ --version \uD504\uB85C\uADF8\uB7A8 \uBC84\uC804\uC744 \uC778\uC1C4\uD569\uB2C8\uB2E4.
main.help.postopt=\ \uC544\uCE74\uC774\uBE0C\uB294 \uBAA8\uB4C8 \uAE30\uC220\uC790 'module-info.class'\uAC00 \uC8FC\uC5B4\uC9C4 \uB514\uB809\uD1A0\uB9AC\uC758\n \uB8E8\uD2B8 \uB610\uB294 jar \uC544\uCE74\uC774\uBE0C \uC790\uCCB4\uC758 \uB8E8\uD2B8\uC5D0 \uC704\uCE58\uD55C \uACBD\uC6B0 \uBAA8\uB4C8\uD615 jar\uC785\uB2C8\uB2E4.\n \uB2E4\uC74C \uC791\uC5C5\uC740 \uBAA8\uB4C8\uD615 jar\uB97C \uC0DD\uC131\uD558\uAC70\uB098 \uAE30\uC874 \uBE44\uBAA8\uB4C8 jar\uB97C\n \uC5C5\uB370\uC774\uD2B8\uD560 \uB54C\uB9CC \uC801\uD569\uD569\uB2C8\uB2E4. '--module-version',\n '--hash-modules' \uBC0F '--module-path'.\n\n long \uC635\uC158\uC758 \uD544\uC218 \uB610\uB294 \uC120\uD0DD\uC801 \uC778\uC218\uB294 \uD574\uB2F9\uD558\uB294 short \uC635\uC158\uC5D0 \uB300\uD574\uC11C\uB3C4\n \uD544\uC218 \uB610\uB294 \uC120\uD0DD\uC801\uC785\uB2C8\uB2E4.
--- a/jdk/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_pt_BR.properties Sat Jun 03 02:44:55 2017 +0000
+++ b/jdk/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_pt_BR.properties Sat Jun 03 03:48:03 2017 +0000
@@ -29,11 +29,11 @@
error.unrecognized.option=op\u00E7\u00E3o n\u00E3o reconhecida : {0}
error.missing.arg=a op\u00E7\u00E3o {0} exige um argumento
error.bad.file.arg=Erro ao fazer parsing dos argumentos de arquivo
-error.bad.option=Uma das op\u00E7\u00F5es -{ctxu} deve ser especificada.
+error.bad.option=Uma das op\u00E7\u00F5es -{ctxuid} deve ser especificada.
error.bad.cflag=flag 'c' requer que os arquivos de manifesto ou entrada sejam especificados!
error.bad.uflag=o flag 'u' requer que arquivos de manifesto, o flag 'e' ou arquivos de entrada sejam especificados!
error.bad.eflag=o flag 'e' e manifesto com o atributo 'Main-Class' n\u00E3o podem ser especificados \njuntos!
-error.bad.dflag=A op\u00E7\u00E3o ''-d, --print-module-descriptor'' n\u00E3o exige a especifica\u00E7\u00E3o de arquivo de sa\u00EDda: {0}
+error.bad.dflag=A op\u00E7\u00E3o '-d, --describe-module' n\u00E3o exige a especifica\u00E7\u00E3o de arquivos de entrada
error.bad.reason=motivo incorreto: {0}, deve ser deprecated, deprecated-for-removal ou incubating
error.nosuch.fileordir={0} : n\u00E3o h\u00E1 tal arquivo ou diret\u00F3rio
error.write.file=Erro ao gravar o arquivo jar existente
@@ -42,16 +42,11 @@
error.create.tempfile=N\u00E3o foi poss\u00EDvel criar um arquivo tempor\u00E1rio
error.hash.dep=M\u00F3dulo de hashing com {0} depend\u00EAncias. N\u00E3o \u00E9 poss\u00EDvel localizar o m\u00F3dulo {1} no caminho do m\u00F3dulo
error.module.options.without.info=Um dentre --module-version ou --hash-modules est\u00E1 sem module-info.class
+error.no.operative.descriptor=Nenhum descritor de opera\u00E7\u00E3o para a release: {0}
+error.no.root.descriptor=Nenhum descritor do m\u00F3dulo-raiz, especifique --release
+error.unable.derive.automodule=N\u00E3o \u00E9 poss\u00EDvel obter o descritor do m\u00F3dulo para: {0}
error.unexpected.module-info=Descritor de m\u00F3dulo inesperado {0}
error.module.descriptor.not.found=Descritor de m\u00F3dulo n\u00E3o encontrado
-error.validator.info.without.root=module-info.class encontrado em um diret\u00F3rio com controle de vers\u00E3o sem module-info.class na raiz
-error.validator.info.name.notequal=module-info.class em um diret\u00F3rio com controle de vers\u00E3o cont\u00E9m nome incorreto
-error.validator.info.requires.transitive=module-info.class em um diret\u00F3rio com controle de vers\u00E3o cont\u00E9m "requires transitive" adicional
-error.validator.info.requires.added=module-info.class em um diret\u00F3rio com controle de vers\u00E3o cont\u00E9m "requires" adicional
-error.validator.info.requires.dropped=module-info.class em um diret\u00F3rio com controle de vers\u00E3o falta "requires"
-error.validator.info.exports.notequal=module-info.class em um diret\u00F3rio com controle de vers\u00E3o cont\u00E9m "exports" diferente
-error.validator.info.opens.notequal=module-info.class em um diret\u00F3rio com controle de vers\u00E3o cont\u00E9m "opens" diferente
-error.validator.info.provides.notequal=module-info.class em um diret\u00F3rio com controle de vers\u00E3o cont\u00E9m "provides" diferente
error.invalid.versioned.module.attribute=Atributo {0} de descritor de m\u00F3dulo inv\u00E1lido
error.missing.provider=Prestador de servi\u00E7os n\u00E3o encontrado: {0}
error.release.value.notnumber=release {0} n\u00E3o v\u00E1lida
@@ -67,11 +62,22 @@
error.validator.incompatible.class.version=a entrada {0} tem uma vers\u00E3o de classe incompat\u00EDvel com uma vers\u00E3o anterior
error.validator.different.api=a entrada {0} cont\u00E9m uma classe com api diferente da vers\u00E3o anterior
error.validator.names.mismatch=a entrada {0} cont\u00E9m uma classe com o nome interno {1}; os nomes n\u00E3o correspondem
+error.validator.info.name.notequal=module-info.class em um diret\u00F3rio com controle de vers\u00E3o cont\u00E9m nome incorreto
+error.validator.info.requires.transitive=module-info.class em um diret\u00F3rio com controle de vers\u00E3o cont\u00E9m "requires transitive" adicional
+error.validator.info.requires.added=module-info.class em um diret\u00F3rio com controle de vers\u00E3o cont\u00E9m "requires" adicional
+error.validator.info.requires.dropped=module-info.class em um diret\u00F3rio com controle de vers\u00E3o falta "requires"
+error.validator.info.exports.notequal=module-info.class em um diret\u00F3rio com controle de vers\u00E3o cont\u00E9m "exports" diferente
+error.validator.info.opens.notequal=module-info.class em um diret\u00F3rio com controle de vers\u00E3o cont\u00E9m "opens" diferente
+error.validator.info.provides.notequal=module-info.class em um diret\u00F3rio com controle de vers\u00E3o cont\u00E9m "provides" diferente
+error.validator.info.version.notequal={0}: module-info.class em um diret\u00F3rio com controle de vers\u00E3o cont\u00E9m "version" diferente
+error.validator.info.manclass.notequal={0}: module-info.class em um diret\u00F3rio com controle de vers\u00E3o cont\u00E9m "main-class" diferente
warn.validator.identical.entry=Advert\u00EAncia: a entrada {0} cont\u00E9m uma classe\nid\u00EAntica a uma que j\u00E1 est\u00E1 no jar
warn.validator.resources.with.same.name=Advert\u00EAncia: entrada {0}; diversos recursos com o mesmo nome
warn.validator.concealed.public.class=Advert\u00EAncia: a entrada {0} \u00E9 uma classe p\u00FAblica\nem um pacote oculto; colocar esse jar no caminho de classe resultar\u00E1\nem interfaces p\u00FAblicas incompat\u00EDveis
+warn.release.unexpected.versioned.entry=entrada {0} com controle de vers\u00E3o inesperada
out.added.manifest=manifesto adicionado
out.added.module-info=module-info: {0} adicionado
+out.automodule=Nenhum descritor de m\u00F3dulo encontrado. M\u00F3dulo autom\u00E1tico derivado.
out.update.manifest=manifesto atualizado
out.update.module-info=module-info: {0} atualizado
out.ignore.entry=ignorando entrada {0}
@@ -88,17 +94,19 @@
main.usage.summary=Uso: jar [OPTION...] [ [--release VERSION] [-C dir] files] ...
main.usage.summary.try=Tente `jar --ajuda' para obter mais informa\u00E7\u00F5es.
-main.help.preopt=Uso: jar [OPTION...] [ [--release VERSION] [-C dir] arquivos]...\njar cria um arquivo compactado para classes e recursos, e pode manipular ou\nrestaurar classes ou recursos individuais de um arquivo compactado.\n\n Exemplos:\n # Cria um arquivo compactado chamado classes.jar com dois arquivos de classe:\n jar --create --file classes.jar Foo.class Bar.class\n # Cria um arquivo compactado usando um manifesto existente, com todos os arquivos em foo/:\n jar --create --file classes.jar --manifest mymanifest -C foo/ .\n # Cria um arquivo compactado jar modular, em que o descritor do m\u00F3dulo se localize em\n # classes/module-info.class:\n jar --create --file foo.jar --main-class com.foo.Main --module-version 1.0\n -C foo/ classes resources\n # Atualiza um arquivo jar n\u00E3o modular existente para um jar modular:\n jar --update --file foo.jar --main-class com.foo.Main --module-version 1.0\n -C foo/ module-info.class\n # Cria um arquivo jar de v\u00E1rias releases, colocando alguns arquivos no diret\u00F3rio META-INF/versions/9:\n jar --create --file mr.jar -C foo classes --release 9 -C foo9 classes
+main.help.preopt=Uso: arquivos [OPTION...] [ [--release VERSION] [-C dir] jar]...\njar cria um arquivo compactado para classes e recursos, e pode manipular ou\nrestaurar classes ou recursos individuais de um arquivo compactado.\n\n Exemplos:\n # Cria um arquivo compactado chamado classes.jar com dois arquivos de classe:\n jar --create --file classes.jar Foo.class Bar.class\n # Cria um arquivo compactado usando um manifesto existente, com todos os arquivos em foo/:\n jar --create --file classes.jar --manifest mymanifest -C foo/ .\n # Cria um arquivo compactado jar modular, em que o descritor do m\u00F3dulo se localiza em\n # classes/module-info.class:\n jar --create --file foo.jar --main-class com.foo.Main --module-version 1.0\n -C foo/ classes resources\n # Atualiza um arquivo jar n\u00E3o modular existente para um jar modular:\n jar --update --file foo.jar --main-class com.foo.Main --module-version 1.0\n -C foo/ module-info.class\n # Cria um arquivo jar de v\u00E1rias releases, colocando alguns arquivos no diret\u00F3rio META-INF/versions/9:\n jar --create --file mr.jar -C foo classes --release 9 -C foo9 classes\n\nPara reduzir ou simplificar o comando jar, voc\u00EA pode especificar argumentos em um arquivo de texto separado\ne especific\u00E1-lo no comando jar com o sinal de arroba (@) como um prefixo.\n\n Exemplos:\n # L\u00EA op\u00E7\u00F5es adicionais e lista os arquivos de classe do arquivo classes.list\n jar --create --file my.jar @classes.list\n
main.help.opt.main=\ Modo de opera\u00E7\u00E3o principal:\n
main.help.opt.main.create=\ -c, --create Cria o arquivo compactado
main.help.opt.main.generate-index=\ -i, --generate-index=FILE Gera informa\u00E7\u00F5es de \u00EDndice para os arquivos compactados jar \n especificados
main.help.opt.main.list=\ -t, --list Lista o conte\u00FAdo do arquivo compactado
main.help.opt.main.update=\ -u, --update Atualiza um arquivo compactado jar existente
main.help.opt.main.extract=\ -x, --extract Extrai arquivos nomeados (ou todos) do arquivo compactado
-main.help.opt.main.print-module-descriptor=\ -d, --print-module-descriptor Imprimir o descritor de m\u00F3dulo
+main.help.opt.main.describe-module=\ -d, --describe-module Imprime o descritor do m\u00F3dulo ou nome do m\u00F3dulo autom\u00E1tico
main.help.opt.any=\ Modificadores de opera\u00E7\u00E3o v\u00E1lidos em qualquer modo:\n\n -C DIR Altera para o diret\u00F3rio especificado e inclui o\n seguinte arquivo:
-main.help.opt.any.file=\ -f, --file=FILE O nome do arquivo compactado\n --release VERSION Coloca todos os arquivos a seguir em um diret\u00F3rio com controle de vers\u00E3o\n do arquivo jar (i.e. META-INF/versions/VERSION/)
+main.help.opt.any.file=\ -f, --file=FILE O nome do arquivo compactado. Quando omitido, stdin ou\n stdout ser\u00E1 usado com base na opera\u00E7\u00E3o\n --release VERSION Coloca todos os arquivos a seguir em um diret\u00F3rio com controle de vers\u00E3o\n do arquivo jar (i.e. META-INF/versions/VERSION/)
main.help.opt.any.verbose=\ -v, --verbose Gera sa\u00EDda detalhada na sa\u00EDda padr\u00E3o
+main.help.opt.create=\ Modificadores de opera\u00E7\u00E3o v\u00E1lidos somente no modo de cria\u00E7\u00E3o:\n
+main.help.opt.create.normalize=\ -n, --normalize Normaliza as informa\u00E7\u00F5es no novo arquivo compactado jar\n ap\u00F3s a cria\u00E7\u00E3o
main.help.opt.create.update=\ Modificadores de opera\u00E7\u00E3o v\u00E1lidos somente no modo de cria\u00E7\u00E3o e atualiza\u00E7\u00E3o:\n
main.help.opt.create.update.main-class=\ -e, --main-class=CLASSNAME O ponto de entrada do aplicativo para aplicativos\n stand-alone empacotados em um arquivo compactado jar modular\n ou execut\u00E1vel
main.help.opt.create.update.manifest=\ -m, --manifest=FILE Inclui as informa\u00E7\u00F5es de manifesto provenientes do arquivo de\n manifesto em quest\u00E3o
@@ -111,7 +119,7 @@
main.help.opt.create.update.index=\ Modificadores de opera\u00E7\u00E3o v\u00E1lidos somente no modo de cria\u00E7\u00E3o, atualiza\u00E7\u00E3o e gera\u00E7\u00E3o de \u00EDndice:\n
main.help.opt.create.update.index.no-compress=\ -0, --no-compress Somente armazenamento; n\u00E3o use compacta\u00E7\u00E3o ZIP
main.help.opt.other=\ Outras op\u00E7\u00F5es:\n
-main.help.opt.other.help=\ -?, --help[:compat] Fornece esta ajuda ou, opcionalmente, a ajuda de compatibilidade
+main.help.opt.other.help=\ -h, --help[:compat] Fornece esta ajuda ou, opcionalmente, a ajuda de compatibilidade
main.help.opt.other.help-extra=\ --help-extra Fornecer ajuda sobre op\u00E7\u00F5es extras
main.help.opt.other.version=\ --version Imprime a vers\u00E3o do programa
main.help.postopt=\ Arquivo compactado ser\u00E1 um arquivo jar modular se um descritor de m\u00F3dulo, 'module-info.class', estiver\n localizado na raiz dos diret\u00F3rios em quest\u00E3o ou na raiz do pr\u00F3prio arquivo compactado\n jar. As seguintes opera\u00E7\u00F5es s\u00F3 s\u00E3o v\u00E1lidas ao criar um jar modular\n ou atualizar um jar n\u00E3o modular existente: '--module-version',\n '--hash-modules' e '--module-path'.\n\n Argumentos obrigat\u00F3rios ou opcionais para op\u00E7\u00F5es longas tamb\u00E9m s\u00E3o obrigat\u00F3rios ou opcionais\n para quaisquer op\u00E7\u00F5es curtas correspondentes.
--- a/jdk/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_sv.properties Sat Jun 03 02:44:55 2017 +0000
+++ b/jdk/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_sv.properties Sat Jun 03 03:48:03 2017 +0000
@@ -29,29 +29,24 @@
error.unrecognized.option=ok\u00E4nt alternativ: {0}
error.missing.arg=alternativet {0} kr\u00E4ver ett argument
error.bad.file.arg=Fel vid tolkning av filargument
-error.bad.option=Ett av alternativen -{ctxu} m\u00E5ste anges.
+error.bad.option=Ett av alternativen -{ctxuid} m\u00E5ste anges.
error.bad.cflag=f\u00F6r c-flaggan m\u00E5ste manifest- eller indatafiler anges.
error.bad.uflag=f\u00F6r u-flaggan m\u00E5ste manifest-, e-flagg- eller indatafiler anges.
error.bad.eflag=e-flaggan och manifest med attributet Main-Class kan inte anges \ntillsammans.
-error.bad.dflag=alternativet ''-d, --print-module-descriptor'' kr\u00E4ver att inga indatafiler har angetts: {0}
+error.bad.dflag=alternativet '-d, --describe-module' kr\u00E4ver att ingen indatafil anges
error.bad.reason=ogiltig orsak: {0} m\u00E5ste vara deprecated, deprecated-for-removal eller incubating
error.nosuch.fileordir={0} : det finns ingen s\u00E5dan fil eller katalog
-error.write.file=Det uppstod ett fel vid skrivning till befintlig jar-fil.
+error.write.file=Ett fel intr\u00E4ffade vid skrivning till befintlig jar-fil.
error.create.dir={0} : kunde inte skapa n\u00E5gon katalog
error.incorrect.length=ogiltig l\u00E4ngd vid bearbetning: {0}
error.create.tempfile=Kunde inte skapa en tillf\u00E4llig fil
error.hash.dep={0}-beroenden f\u00F6r hashningsmodulen, kan inte hitta modulen {1} p\u00E5 moduls\u00F6kv\u00E4gen
error.module.options.without.info=--module-version eller --hash-modules utan module-info.class
+error.no.operative.descriptor=Ingen operativ deskriptor f\u00F6r utg\u00E5van: {0}
+error.no.root.descriptor=Ingen rotmoduldeskriptor, ange --release
+error.unable.derive.automodule=Kan inte h\u00E4rleda moduldeskriptor f\u00F6r: {0}
error.unexpected.module-info=Ov\u00E4ntad moduldeskriptor, {0}
error.module.descriptor.not.found=Moduldeskriptorn hittades inte
-error.validator.info.without.root=module-info.class hittades i en versionshanterad katalog utan module-info.class i roten
-error.validator.info.name.notequal=module-info.class i en versionshanterad katalog inneh\u00E5ller ett felaktigt namn
-error.validator.info.requires.transitive=module-info.class i en versionshanterad katalog inneh\u00E5ller fler "requires transitive"
-error.validator.info.requires.added=module-info.class i en versionshanterad katalog inneh\u00E5ller fler "requires"
-error.validator.info.requires.dropped=module-info.class i en versionshanterad katalog inneh\u00E5ller saknade "requires"
-error.validator.info.exports.notequal=module-info.class i en versionshanterad katalog inneh\u00E5ller olika "exports"
-error.validator.info.opens.notequal=module-info.class i en versionshanterad katalog inneh\u00E5ller olika "opens"
-error.validator.info.provides.notequal=module-info.class i en versionshanterad katalog inneh\u00E5ller olika "provides"
error.invalid.versioned.module.attribute=Ogiltigt attribut f\u00F6r moduldeskriptor, {0}
error.missing.provider=Tj\u00E4nsteleverant\u00F6ren hittades inte: {0}
error.release.value.notnumber=utg\u00E5va {0} \u00E4r inte giltig
@@ -67,11 +62,22 @@
error.validator.incompatible.class.version=posten {0} har en klassversion som \u00E4r inkompatibel med en tidigare version
error.validator.different.api=posten {0} inneh\u00E5ller en klass med ett annat api fr\u00E5n en tidigare version
error.validator.names.mismatch=posten {0} inneh\u00E5ller en klass med det interna namnet {1}, namnen matchar inte
+error.validator.info.name.notequal=module-info.class i en versionshanterad katalog inneh\u00E5ller ett felaktigt namn
+error.validator.info.requires.transitive=module-info.class i en versionshanterad katalog inneh\u00E5ller fler "requires transitive"
+error.validator.info.requires.added=module-info.class i en versionshanterad katalog inneh\u00E5ller fler "requires"
+error.validator.info.requires.dropped=module-info.class i en versionshanterad katalog inneh\u00E5ller saknade "requires"
+error.validator.info.exports.notequal=module-info.class i en versionshanterad katalog inneh\u00E5ller olika "exports"
+error.validator.info.opens.notequal=module-info.class i en versionshanterad katalog inneh\u00E5ller olika "opens"
+error.validator.info.provides.notequal=module-info.class i en versionshanterad katalog inneh\u00E5ller olika "provides"
+error.validator.info.version.notequal={0}: module-info.class i en versionshanterad katalog inneh\u00E5ller olika "version"
+error.validator.info.manclass.notequal={0}: module-info.class i en versionshanterad katalog inneh\u00E5ller olika "main-class"
warn.validator.identical.entry=Varning: posten {0} inneh\u00E5ller en klass som\n\u00E4r identisk med en post som redan finns i jar-filen
warn.validator.resources.with.same.name=Varning: posten {0}, flera resurser med samma namn
warn.validator.concealed.public.class=Varning: posten {0} \u00E4r en allm\u00E4n klass\ni ett dolt paket. Om du placerar den h\u00E4r jar-filen p\u00E5 klass\u00F6kv\u00E4gen leder\ndet till inkompatibla allm\u00E4nna gr\u00E4nssnitt
+warn.release.unexpected.versioned.entry=ov\u00E4ntad versionshanterad post, {0}
out.added.manifest=tillagt manifestfil
out.added.module-info=lade till module-info: {0}
+out.automodule=Ingen moduldeskriptor hittades. H\u00E4rledd automatisk modul.
out.update.manifest=uppdaterat manifest
out.update.module-info=uppdaterade module-info: {0}
out.ignore.entry=ignorerar posten {0}
@@ -88,17 +94,19 @@
main.usage.summary=Syntax: jar [OPTION...] [ [--release VERSION] [-C dir] files] ...
main.usage.summary.try=F\u00F6rs\u00F6k med 'jar --help' f\u00F6r mer information.
-main.help.preopt=Syntax: jar [OPTION...] [ [--release VERSION] [-C dir] files] ...\njar skapar ett arkiv f\u00F6r klasser och resurser, och kan \u00E4ndra och \u00E5terst\u00E4lla\nenskilda klasser och resurser fr\u00E5n ett arkiv.\n\n Exempel:\n # Skapa ett arkiv med namnet classes.jar med tv\u00E5 klassfiler:\n jar --create --file classes.jar Foo.class Bar.class\n # Skapa ett arkiv med ett befintligt manifest med alla filerna i 'foo/':\n jar --create --file classes.jar --manifest mymanifest -C foo/ .\n # Skapa ett modul\u00E4rt jar-arkiv, d\u00E4r moduldeskriptorn finns i\n # classes/module-info.class:\n jar --create --file foo.jar --main-class com.foo.Main --module-version 1.0\n -C foo/ classes resources\n # Uppdatera ett befintligt icke-modul\u00E4rt jar-arkiv till ett modul\u00E4rt jar-arkiv:\n jar --update --file foo.jar --main-class com.foo.Main --module-version 1.0\n -C foo/ module-info.class\n # Skapa ett jar-arkiv f\u00F6r flera utg\u00E5vor och placera vissa av filerna i katalogen 'META-INF/versions/9':\n jar --create --file mr.jar -C foo classes --release 9 -C foo9 classes
+main.help.preopt=Syntax: jar [OPTION...] [ [--release VERSION] [-C dir] files] ...\njar skapar ett arkiv f\u00F6r klasser och resurser, och kan \u00E4ndra och \u00E5terst\u00E4lla\nenskilda klasser och resurser fr\u00E5n ett arkiv.\n\n Exempel:\n # Skapa ett arkiv med namnet classes.jar med tv\u00E5 klassfiler:\n jar --create --file classes.jar Foo.class Bar.class\n # Skapa ett arkiv med ett befintligt manifest med alla filerna i 'foo/':\n jar --create --file classes.jar --manifest mymanifest -C foo/ .\n # Skapa ett modul\u00E4rt jar-arkiv, d\u00E4r moduldeskriptorn finns i\n # classes/module-info.class:\n jar --create --file foo.jar --main-class com.foo.Main --module-version 1.0\n -C foo/ classes resources\n # Uppdatera ett befintligt icke-modul\u00E4rt jar-arkiv till ett modul\u00E4rt jar-arkiv:\n jar --update --file foo.jar --main-class com.foo.Main --module-version 1.0\n -C foo/ module-info.class\n # Skapa ett jar-arkiv f\u00F6r flera utg\u00E5vor och placera vissa av filerna i katalogen 'META-INF/versions/9':\n jar --create --file mr.jar -C foo classes --release 9 -C foo9 classes\n\nOm du vill f\u00F6rkorta eller f\u00F6renkla kommandot jar kan du ange argument i en separat\ntextfil och \u00F6verf\u00F6ra den med tecknet '@' som prefix.\n\n Exempel:\n # L\u00E4s ytterligare alternativ och en lista \u00F6ver klassfiler fr\u00E5n filen 'classes.list'\n jar --create --file my.jar @classes.list\n
main.help.opt.main=\ Huvudfunktionsl\u00E4ge:\n
main.help.opt.main.create=\ -c, --create Skapa arkivet
main.help.opt.main.generate-index=\ -i, --generate-index=FILE Generera indexinformation f\u00F6r de angivna jar-\n arkiven
main.help.opt.main.list=\ -t, --list Listar inneh\u00E5llsf\u00F6rteckningen f\u00F6r arkivet
main.help.opt.main.update=\ -u, --update Uppdatera ett befintligt jar-arkiv
main.help.opt.main.extract=\ -x, --extract Extrahera namngivna (eller alla) filer fr\u00E5n arkivet
-main.help.opt.main.print-module-descriptor=\ -d, --print-module-descriptor Skriv ut moduldeskriptorn
+main.help.opt.main.describe-module=\ -d, --describe-module Skriv ut moduldeskriptorn eller det automatiska modulnamnet
main.help.opt.any=\ \u00C5tg\u00E4rdsmodifierare som \u00E4r giltiga i alla l\u00E4gen:\n\n -C DIR \u00C4ndra till den angivna katalogen och inkludera\n f\u00F6ljande fil
-main.help.opt.any.file=\ -f, --file=FILE Namnet p\u00E5 arkivfilen\n --release VERSION Placerar alla f\u00F6ljande filer i en versionshanterad katalog\n i jar-arkivet (exempel: META-INF/versions/VERSION/)
+main.help.opt.any.file=\ -f, --file=FILE Namnet p\u00E5 arkivfilen. N\u00E4r det utel\u00E4mnas anv\u00E4nds stdin eller\n stdout beroende p\u00E5 \u00E5tg\u00E4rden\n --release VERSION Placerar alla f\u00F6ljande filer i en versionshanterad katalog\n i jar-filen (t.ex. META-INF/versions/VERSION/)
main.help.opt.any.verbose=\ -v, --verbose Generera utf\u00F6rliga utdata till standardutdata
+main.help.opt.create=\ \u00C5tg\u00E4rdsmodifierare som endast \u00E4r giltiga i l\u00E4get create:\n
+main.help.opt.create.normalize=\ -n, --normalize Normalisera informationen i det nya jar-arkivet\n n\u00E4r det har skapats
main.help.opt.create.update=\ \u00C5tg\u00E4rdsmodifierare som endast \u00E4r giltiga i l\u00E4gena create och update:\n
main.help.opt.create.update.main-class=\ -e, --main-class=CLASSNAME Applikationsing\u00E5ngspunkten f\u00F6r frist\u00E5ende\n applikationer paketerad i ett modul\u00E4rt, eller k\u00F6rbart,\n jar-arkiv
main.help.opt.create.update.manifest=\ -m, --manifest=FILE Inkludera manifestinformationen fr\u00E5n den angivna\n manifestfilen
@@ -111,7 +119,7 @@
main.help.opt.create.update.index=\ \u00C5tg\u00E4rdsmodifierare som endast \u00E4r giltiga i l\u00E4gena create, update och generate-index:\n
main.help.opt.create.update.index.no-compress=\ -0, --no-compress Endast lagring, anv\u00E4nd ingen ZIP-komprimering
main.help.opt.other=\ \u00D6vriga alternativ:\n
-main.help.opt.other.help=\ -?, --help[:compat] Visa den h\u00E4r hj\u00E4lpen eller kompatibilitetshj\u00E4lpen (valfritt)
+main.help.opt.other.help=\ -h, --help[:compat] Visa den h\u00E4r hj\u00E4lpen eller kompatibilitetshj\u00E4lpen (valfritt)
main.help.opt.other.help-extra=\ --help-extra Visa hj\u00E4lp f\u00F6r extra alternativ
main.help.opt.other.version=\ --version Skriv ut programversion
main.help.postopt=\ Ett arkiv \u00E4r ett modul\u00E4rt jar-arkiv om en moduldeskriptor, 'module-info.class',\n finns i roten av de angivna katalogerna eller det angivna jar-arkivet.\n F\u00F6ljande \u00E5tg\u00E4rder \u00E4r endast giltiga vid skapande av ett modul\u00E4rt jar-arkiv och\n vid uppdatering av ett befintligt icke-modul\u00E4rt jar-arkiv: '--module-version',\n '--hash-modules' och '--module-path'.\n\n Obligatoriska och valfria alternativ f\u00F6r l\u00E5nga alternativ \u00E4r \u00E4ven obligatoriska\n respektive valfria f\u00F6r alla motsvarande korta alternativ.
--- a/jdk/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_zh_CN.properties Sat Jun 03 02:44:55 2017 +0000
+++ b/jdk/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_zh_CN.properties Sat Jun 03 03:48:03 2017 +0000
@@ -29,11 +29,11 @@
error.unrecognized.option=\u65E0\u6CD5\u8BC6\u522B\u7684\u9009\u9879: {0}
error.missing.arg=\u9009\u9879{0}\u9700\u8981\u53C2\u6570
error.bad.file.arg=\u89E3\u6790\u6587\u4EF6\u53C2\u6570\u65F6\u51FA\u9519
-error.bad.option=\u5FC5\u987B\u6307\u5B9A {ctxu} \u4E2D\u7684\u4EFB\u4E00\u9009\u9879\u3002
+error.bad.option=\u5FC5\u987B\u6307\u5B9A {ctxuid} \u4E2D\u7684\u4EFB\u4E00\u9009\u9879\u3002
error.bad.cflag='c' \u6807\u8BB0\u8981\u6C42\u6307\u5B9A\u6E05\u5355\u6216\u8F93\u5165\u6587\u4EF6!
error.bad.uflag='u' \u6807\u8BB0\u8981\u6C42\u6307\u5B9A\u6E05\u5355, 'e' \u6807\u8BB0\u6216\u8F93\u5165\u6587\u4EF6!
error.bad.eflag=\u4E0D\u80FD\u540C\u65F6\u6307\u5B9A 'e' \u6807\u8BB0\u548C\u5177\u6709 'Main-Class' \u5C5E\u6027\u7684\n\u6E05\u5355!
-error.bad.dflag=''-d, --print-module-descriptor'' \u9009\u9879\u4E0D\u9700\u8981\u6307\u5B9A\u4EFB\u4F55\u8F93\u5165\u6587\u4EF6: {0}
+error.bad.dflag='-d, --describe-module' \u9009\u9879\u4E0D\u9700\u8981\u6307\u5B9A\u4EFB\u4F55\u8F93\u5165\u6587\u4EF6
error.bad.reason=\u9519\u8BEF\u7684\u539F\u56E0: {0}, \u5FC5\u987B\u4E3A deprecated, deprecated-for-removal \u6216 incubating \u4E4B\u4E00
error.nosuch.fileordir={0}: \u6CA1\u6709\u8FD9\u4E2A\u6587\u4EF6\u6216\u76EE\u5F55
error.write.file=\u5199\u5165\u73B0\u6709\u7684 jar \u6587\u4EF6\u65F6\u51FA\u9519
@@ -42,16 +42,11 @@
error.create.tempfile=\u65E0\u6CD5\u521B\u5EFA\u4E34\u65F6\u6587\u4EF6
error.hash.dep=\u6B63\u5728\u5BF9\u6A21\u5757 {0} \u7684\u88AB\u4F9D\u8D56\u5BF9\u8C61\u6267\u884C\u6563\u5217\u5904\u7406, \u5728\u6A21\u5757\u8DEF\u5F84\u4E2D\u627E\u4E0D\u5230\u6A21\u5757 {1}
error.module.options.without.info=--module-version \u6216 --hash-modules \u4E4B\u4E00\u6CA1\u6709 module-info.class
+error.no.operative.descriptor=\u6CA1\u6709\u53D1\u884C\u7248\u7684\u6709\u6548\u63CF\u8FF0\u7B26: {0}
+error.no.root.descriptor=\u6CA1\u6709\u6839\u6A21\u5757\u63CF\u8FF0\u7B26, \u8BF7\u6307\u5B9A --release
+error.unable.derive.automodule=\u65E0\u6CD5\u6D3E\u751F {0} \u7684\u6A21\u5757\u63CF\u8FF0\u7B26
error.unexpected.module-info=\u610F\u5916\u7684\u6A21\u5757\u63CF\u8FF0\u7B26 {0}
error.module.descriptor.not.found=\u627E\u4E0D\u5230\u6A21\u5757\u63CF\u8FF0\u7B26
-error.validator.info.without.root=\u5728\u7248\u672C\u5316\u76EE\u5F55\u4E2D\u627E\u5230\u4E86 module-info.class, \u4F46\u6839\u4E2D\u6CA1\u6709 module-info.class
-error.validator.info.name.notequal=\u7248\u672C\u5316\u76EE\u5F55\u4E2D\u7684 module-info.class \u5305\u542B\u4E0D\u6B63\u786E\u7684\u540D\u79F0
-error.validator.info.requires.transitive=\u7248\u672C\u5316\u76EE\u5F55\u4E2D\u7684 module-info.class \u5305\u542B\u989D\u5916\u7684 "requires transitive"
-error.validator.info.requires.added=\u7248\u672C\u5316\u76EE\u5F55\u4E2D\u7684 module-info.class \u5305\u542B\u989D\u5916\u7684 "requires"
-error.validator.info.requires.dropped=\u7248\u672C\u5316\u76EE\u5F55\u4E2D\u7684 module-info.class \u5305\u542B\u7F3A\u5C11\u7684 "requires"
-error.validator.info.exports.notequal=\u7248\u672C\u5316\u76EE\u5F55\u4E2D\u7684 module-info.class \u5305\u542B\u4E0D\u540C\u7684 "exports"
-error.validator.info.opens.notequal=\u7248\u672C\u5316\u76EE\u5F55\u4E2D\u7684 module-info.class \u5305\u542B\u4E0D\u540C\u7684 "opens"
-error.validator.info.provides.notequal=\u7248\u672C\u5316\u76EE\u5F55\u4E2D\u7684 module-info.class \u5305\u542B\u4E0D\u540C\u7684 "provides"
error.invalid.versioned.module.attribute=\u65E0\u6548\u7684\u6A21\u5757\u63CF\u8FF0\u7B26\u5C5E\u6027 {0}
error.missing.provider=\u672A\u627E\u5230\u670D\u52A1\u63D0\u4F9B\u65B9: {0}
error.release.value.notnumber=\u53D1\u884C\u7248 {0} \u65E0\u6548
@@ -67,11 +62,22 @@
error.validator.incompatible.class.version=\u6761\u76EE {0} \u5305\u542B\u4E0E\u8F83\u65E9\u7248\u672C\u4E0D\u517C\u5BB9\u7684\u7C7B\u7248\u672C
error.validator.different.api=\u6761\u76EE {0} \u5305\u542B\u7684\u7C7B\u5177\u6709\u4E0E\u65E9\u671F\u7248\u672C\u4E0D\u540C\u7684 api
error.validator.names.mismatch=\u6761\u76EE {0} \u5305\u542B\u5185\u90E8\u540D\u79F0\u4E3A {1} \u7684\u7C7B, \u540D\u79F0\u4E0D\u5339\u914D
+error.validator.info.name.notequal=\u7248\u672C\u5316\u76EE\u5F55\u4E2D\u7684 module-info.class \u5305\u542B\u4E0D\u6B63\u786E\u7684\u540D\u79F0
+error.validator.info.requires.transitive=\u7248\u672C\u5316\u76EE\u5F55\u4E2D\u7684 module-info.class \u5305\u542B\u989D\u5916\u7684 "requires transitive"
+error.validator.info.requires.added=\u7248\u672C\u5316\u76EE\u5F55\u4E2D\u7684 module-info.class \u5305\u542B\u989D\u5916\u7684 "requires"
+error.validator.info.requires.dropped=\u7248\u672C\u5316\u76EE\u5F55\u4E2D\u7684 module-info.class \u5305\u542B\u7F3A\u5C11\u7684 "requires"
+error.validator.info.exports.notequal=\u7248\u672C\u5316\u76EE\u5F55\u4E2D\u7684 module-info.class \u5305\u542B\u4E0D\u540C\u7684 "exports"
+error.validator.info.opens.notequal=\u7248\u672C\u5316\u76EE\u5F55\u4E2D\u7684 module-info.class \u5305\u542B\u4E0D\u540C\u7684 "opens"
+error.validator.info.provides.notequal=\u7248\u672C\u5316\u76EE\u5F55\u4E2D\u7684 module-info.class \u5305\u542B\u4E0D\u540C\u7684 "provides"
+error.validator.info.version.notequal={0}: \u7248\u672C\u5316\u76EE\u5F55\u4E2D\u7684 module-info.class \u5305\u542B\u4E0D\u540C\u7684 "version"
+error.validator.info.manclass.notequal={0}: \u7248\u672C\u5316\u76EE\u5F55\u4E2D\u7684 module-info.class \u5305\u542B\u4E0D\u540C\u7684 "main-class"
warn.validator.identical.entry=\u8B66\u544A: \u6761\u76EE {0} \u5305\u542B\u4E0E jar \u4E2D\u7684\n\u73B0\u6709\u6761\u76EE\u76F8\u540C\u7684\u7C7B
warn.validator.resources.with.same.name=\u8B66\u544A: \u6761\u76EE {0}, \u591A\u4E2A\u8D44\u6E90\u5177\u6709\u76F8\u540C\u540D\u79F0
warn.validator.concealed.public.class=\u8B66\u544A: \u6761\u76EE {0} \u662F\u5DF2\u9690\u85CF\u7A0B\u5E8F\u5305\u4E2D\u7684\n\u516C\u5171\u7C7B, \u5C06\u6B64 jar \u653E\u7F6E\u5728\u7C7B\u8DEF\u5F84\u4E2D\n\u5C06\u5BFC\u81F4\u516C\u5171\u63A5\u53E3\u4E0D\u517C\u5BB9
+warn.release.unexpected.versioned.entry=\u610F\u5916\u7684\u7248\u672C\u5316\u6761\u76EE {0}
out.added.manifest=\u5DF2\u6DFB\u52A0\u6E05\u5355
out.added.module-info=\u5DF2\u6DFB\u52A0 module-info: {0}
+out.automodule=\u627E\u4E0D\u5230\u6A21\u5757\u63CF\u8FF0\u7B26\u3002\u5DF2\u6D3E\u751F\u81EA\u52A8\u6A21\u5757\u3002
out.update.manifest=\u5DF2\u66F4\u65B0\u6E05\u5355
out.update.module-info=\u5DF2\u66F4\u65B0 module-info: {0}
out.ignore.entry=\u6B63\u5728\u5FFD\u7565\u6761\u76EE{0}
@@ -88,17 +94,19 @@
main.usage.summary=\u7528\u6CD5: jar [OPTION...] [ [--release VERSION] [-C dir] files] ...
main.usage.summary.try=\u5C1D\u8BD5\u4F7F\u7528 `jar --help' \u83B7\u53D6\u8BE6\u7EC6\u4FE1\u606F\u3002
-main.help.preopt=\u7528\u6CD5: jar [OPTION...] [ [--release VERSION] [-C dir] files] ...\njar \u521B\u5EFA\u7C7B\u548C\u8D44\u6E90\u7684\u6863\u6848, \u5E76\u4E14\u53EF\u4EE5\u5904\u7406\u6863\u6848\u4E2D\u7684\n\u5355\u4E2A\u7C7B\u6216\u8D44\u6E90\u6216\u8005\u4ECE\u6863\u6848\u4E2D\u8FD8\u539F\u5355\u4E2A\u7C7B\u6216\u8D44\u6E90\u3002\n\n \u793A\u4F8B:\n # \u521B\u5EFA\u5305\u542B\u4E24\u4E2A\u7C7B\u6587\u4EF6\u7684\u540D\u4E3A classes.jar \u7684\u6863\u6848:\n jar --create --file classes.jar Foo.class Bar.class\n # \u4F7F\u7528\u73B0\u6709\u7684\u6E05\u5355\u521B\u5EFA\u6863\u6848, \u5176\u4E2D\u5305\u542B foo/ \u4E2D\u7684\u6240\u6709\u6587\u4EF6:\n jar --create --file classes.jar --manifest mymanifest -C foo/ .\n # \u521B\u5EFA\u6A21\u5757\u5316 jar \u6863\u6848, \u5176\u4E2D\u6A21\u5757\u63CF\u8FF0\u7B26\u4F4D\u4E8E\n # classes/module-info.class:\n jar --create --file foo.jar --main-class com.foo.Main --module-version 1.0\n -C foo/ classes resources\n # \u5C06\u73B0\u6709\u7684\u975E\u6A21\u5757\u5316 jar \u66F4\u65B0\u4E3A\u6A21\u5757\u5316 jar:\n jar --update --file foo.jar --main-class com.foo.Main --module-version 1.0\n -C foo/ module-info.class\n # \u521B\u5EFA\u5305\u542B\u591A\u4E2A\u53D1\u884C\u7248\u7684 jar, \u5E76\u5C06\u4E00\u4E9B\u6587\u4EF6\u653E\u5728 META-INF/versions/9 \u76EE\u5F55\u4E2D:\n jar --create --file mr.jar -C foo classes --release 9 -C foo9 classes
+main.help.preopt=\u7528\u6CD5: jar [OPTION...] [ [--release VERSION] [-C dir] files] ...\njar \u521B\u5EFA\u7C7B\u548C\u8D44\u6E90\u7684\u6863\u6848, \u5E76\u4E14\u53EF\u4EE5\u5904\u7406\u6863\u6848\u4E2D\u7684\n\u5355\u4E2A\u7C7B\u6216\u8D44\u6E90\u6216\u8005\u4ECE\u6863\u6848\u4E2D\u8FD8\u539F\u5355\u4E2A\u7C7B\u6216\u8D44\u6E90\u3002\n\n \u793A\u4F8B:\n # \u521B\u5EFA\u5305\u542B\u4E24\u4E2A\u7C7B\u6587\u4EF6\u7684\u540D\u4E3A classes.jar \u7684\u6863\u6848:\n jar --create --file classes.jar Foo.class Bar.class\n # \u4F7F\u7528\u73B0\u6709\u7684\u6E05\u5355\u521B\u5EFA\u6863\u6848, \u5176\u4E2D\u5305\u542B foo/ \u4E2D\u7684\u6240\u6709\u6587\u4EF6:\n jar --create --file classes.jar --manifest mymanifest -C foo/ .\n # \u521B\u5EFA\u6A21\u5757\u5316 jar \u6863\u6848, \u5176\u4E2D\u6A21\u5757\u63CF\u8FF0\u7B26\u4F4D\u4E8E\n # classes/module-info.class:\n jar --create --file foo.jar --main-class com.foo.Main --module-version 1.0\n -C foo/ classes resources\n # \u5C06\u73B0\u6709\u7684\u975E\u6A21\u5757\u5316 jar \u66F4\u65B0\u4E3A\u6A21\u5757\u5316 jar:\n jar --update --file foo.jar --main-class com.foo.Main --module-version 1.0\n -C foo/ module-info.class\n # \u521B\u5EFA\u5305\u542B\u591A\u4E2A\u53D1\u884C\u7248\u7684 jar, \u5E76\u5C06\u4E00\u4E9B\u6587\u4EF6\u653E\u5728 META-INF/versions/9 \u76EE\u5F55\u4E2D:\n jar --create --file mr.jar -C foo classes --release 9 -C foo9 classes\n\n\u8981\u7F29\u77ED\u6216\u7B80\u5316 jar \u547D\u4EE4, \u53EF\u4EE5\u5728\u5355\u72EC\u7684\u6587\u672C\u6587\u4EF6\u4E2D\u6307\u5B9A\u53C2\u6570,\n\u5E76\u4F7F\u7528 @ \u7B26\u53F7\u4F5C\u4E3A\u524D\u7F00\u5C06\u6B64\u6587\u4EF6\u4F20\u9012\u7ED9 jar \u547D\u4EE4\u3002\n\n \u793A\u4F8B:\n # \u4ECE\u6587\u4EF6 classes.list \u8BFB\u53D6\u9644\u52A0\u9009\u9879\u548C\u7C7B\u6587\u4EF6\u5217\u8868\n jar --create --file my.jar @classes.list\n
main.help.opt.main=\ \u4E3B\u64CD\u4F5C\u6A21\u5F0F:\n
main.help.opt.main.create=\ -c, --create \u521B\u5EFA\u6863\u6848
main.help.opt.main.generate-index=\ -i, --generate-index=FILE \u4E3A\u6307\u5B9A\u7684 jar \u6863\u6848\u751F\u6210\n \u7D22\u5F15\u4FE1\u606F
main.help.opt.main.list=\ -t, --list \u5217\u51FA\u6863\u6848\u7684\u76EE\u5F55
main.help.opt.main.update=\ -u, --update \u66F4\u65B0\u73B0\u6709 jar \u6863\u6848
main.help.opt.main.extract=\ -x, --extract \u4ECE\u6863\u6848\u4E2D\u63D0\u53D6\u6307\u5B9A\u7684 (\u6216\u5168\u90E8) \u6587\u4EF6
-main.help.opt.main.print-module-descriptor=\ -d, --print-module-descriptor \u8F93\u51FA\u6A21\u5757\u63CF\u8FF0\u7B26
+main.help.opt.main.describe-module=\ -d, --describe-module \u8F93\u51FA\u6A21\u5757\u63CF\u8FF0\u7B26\u6216\u81EA\u52A8\u6A21\u5757\u540D\u79F0
main.help.opt.any=\ \u5728\u4EFB\u610F\u6A21\u5F0F\u4E0B\u6709\u6548\u7684\u64CD\u4F5C\u4FEE\u9970\u7B26:\n\n -C DIR \u66F4\u6539\u4E3A\u6307\u5B9A\u7684\u76EE\u5F55\u5E76\u5305\u542B\n \u4EE5\u4E0B\u6587\u4EF6
-main.help.opt.any.file=\ -f, --file=FILE \u6863\u6848\u6587\u4EF6\u540D\n --release VERSION \u5C06\u4E0B\u9762\u7684\u6240\u6709\u6587\u4EF6\u90FD\u653E\u5728\n jar \u7684\u7248\u672C\u5316\u76EE\u5F55\u4E2D (\u5373 META-INF/versions/VERSION/)
+main.help.opt.any.file=\ -f, --file=FILE \u6863\u6848\u6587\u4EF6\u540D\u3002\u7701\u7565\u65F6, \u57FA\u4E8E\u64CD\u4F5C\n \u4F7F\u7528 stdin \u6216 stdout\n --release VERSION \u5C06\u4E0B\u9762\u7684\u6240\u6709\u6587\u4EF6\u90FD\u653E\u5728\n jar \u7684\u7248\u672C\u5316\u76EE\u5F55\u4E2D (\u5373 META-INF/versions/VERSION/)
main.help.opt.any.verbose=\ -v, --verbose \u5728\u6807\u51C6\u8F93\u51FA\u4E2D\u751F\u6210\u8BE6\u7EC6\u8F93\u51FA
+main.help.opt.create=\ \u4EC5\u5728\u521B\u5EFA\u6A21\u5F0F\u4E0B\u6709\u6548\u7684\u64CD\u4F5C\u4FEE\u9970\u7B26:\n
+main.help.opt.create.normalize=\ -n, --normalize \u521B\u5EFA\u540E\u5728\u65B0\u7684 jar \u6863\u6848\u4E2D\n \u89C4\u8303\u5316\u4FE1\u606F
main.help.opt.create.update=\ \u5728\u521B\u5EFA\u548C\u66F4\u65B0\u6A21\u5F0F\u4E0B\u6709\u6548\u7684\u64CD\u4F5C\u4FEE\u9970\u7B26:\n
main.help.opt.create.update.main-class=\ -e, --main-class=CLASSNAME \u6346\u7ED1\u5230\u6A21\u5757\u5316\u6216\u53EF\u6267\u884C \n jar \u6863\u6848\u7684\u72EC\u7ACB\u5E94\u7528\u7A0B\u5E8F\n \u7684\u5E94\u7528\u7A0B\u5E8F\u5165\u53E3\u70B9
main.help.opt.create.update.manifest=\ -m, --manifest=FILE \u5305\u542B\u6307\u5B9A\u6E05\u5355\u6587\u4EF6\u4E2D\u7684\n \u6E05\u5355\u4FE1\u606F
@@ -111,7 +119,7 @@
main.help.opt.create.update.index=\ \u53EA\u5728\u521B\u5EFA, \u66F4\u65B0\u548C\u751F\u6210\u7D22\u5F15\u6A21\u5F0F\u4E0B\u6709\u6548\u7684\u64CD\u4F5C\u4FEE\u9970\u7B26:\n
main.help.opt.create.update.index.no-compress=\ -0, --no-compress \u4EC5\u5B58\u50A8; \u4E0D\u4F7F\u7528 ZIP \u538B\u7F29
main.help.opt.other=\ \u5176\u4ED6\u9009\u9879:\n
-main.help.opt.other.help=\ -?, --help[:compat] \u63D0\u4F9B\u6B64\u5E2E\u52A9, \u4E5F\u53EF\u4EE5\u9009\u62E9\u6027\u5730\u63D0\u4F9B\u517C\u5BB9\u6027\u5E2E\u52A9
+main.help.opt.other.help=\ -h, --help[:compat] \u63D0\u4F9B\u6B64\u5E2E\u52A9, \u4E5F\u53EF\u4EE5\u9009\u62E9\u6027\u5730\u63D0\u4F9B\u517C\u5BB9\u6027\u5E2E\u52A9
main.help.opt.other.help-extra=\ --help-extra \u63D0\u4F9B\u989D\u5916\u9009\u9879\u7684\u5E2E\u52A9
main.help.opt.other.version=\ --version \u8F93\u51FA\u7A0B\u5E8F\u7248\u672C
main.help.postopt=\ \u5982\u679C\u6A21\u5757\u63CF\u8FF0\u7B26 'module-info.class' \u4F4D\u4E8E\u6307\u5B9A\u76EE\u5F55\u7684\n \u6839\u76EE\u5F55\u4E2D, \u6216\u8005\u4F4D\u4E8E jar \u6863\u6848\u672C\u8EAB\u7684\u6839\u76EE\u5F55\u4E2D, \u5219\n \u8BE5\u6863\u6848\u662F\u4E00\u4E2A\u6A21\u5757\u5316 jar\u3002\u4EE5\u4E0B\u64CD\u4F5C\u53EA\u5728\u521B\u5EFA\u6A21\u5757\u5316 jar,\n \u6216\u66F4\u65B0\u73B0\u6709\u7684\u975E\u6A21\u5757\u5316 jar \u65F6\u6709\u6548: '--module-version',\n '--hash-modules' \u548C '--module-path'\u3002\n\n \u5982\u679C\u4E3A\u957F\u9009\u9879\u63D0\u4F9B\u4E86\u5FC5\u9700\u53C2\u6570\u6216\u53EF\u9009\u53C2\u6570, \u5219\u5B83\u4EEC\u5BF9\u4E8E\n \u4EFB\u4F55\u5BF9\u5E94\u7684\u77ED\u9009\u9879\u4E5F\u662F\u5FC5\u9700\u6216\u53EF\u9009\u7684\u3002
--- a/jdk/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_zh_TW.properties Sat Jun 03 02:44:55 2017 +0000
+++ b/jdk/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_zh_TW.properties Sat Jun 03 03:48:03 2017 +0000
@@ -29,11 +29,11 @@
error.unrecognized.option=\u7121\u6CD5\u8FA8\u8B58\u7684\u9078\u9805 : {0}
error.missing.arg=\u9078\u9805 {0} \u9700\u8981\u4E00\u500B\u5F15\u6578
error.bad.file.arg=\u5256\u6790\u6A94\u6848\u5F15\u6578\u6642\u767C\u751F\u932F\u8AA4
-error.bad.option=\u5176\u4E2D\u4E00\u500B\u9078\u9805 -{ctxu} \u5FC5\u9808\u52A0\u4EE5\u6307\u5B9A\u3002
+error.bad.option=\u5FC5\u9808\u6307\u5B9A -{ctxuid} \u7684\u5176\u4E2D\u4E00\u500B\u9078\u9805\u3002
error.bad.cflag='c' \u65D7\u6A19\u8981\u6C42\u6307\u5B9A\u8CC7\u8A0A\u6E05\u55AE\u6216\u8F38\u5165\u6A94\u6848\uFF01
error.bad.uflag='u' \u65D7\u6A19\u8981\u6C42\u6307\u5B9A\u8CC7\u8A0A\u6E05\u55AE\u3001'e' \u65D7\u6A19\u6216\u8F38\u5165\u6A94\u6848\uFF01
error.bad.eflag=\u7121\u6CD5\u540C\u6642\u6307\u5B9A 'e' \u65D7\u6A19\u548C\u5177\u6709 'Main-Class' \u5C6C\u6027\u7684\n\u8CC7\u8A0A\u6E05\u55AE\uFF01
-error.bad.dflag=''-d, --print-module-descriptor'' \u9078\u9805\u4E0D\u9700\u8981\u6307\u5B9A\u8F38\u5165\u6A94: {0}
+error.bad.dflag='-d, --describe-module' \u9078\u9805\u4E0D\u9700\u8981\u6307\u5B9A\u8F38\u5165\u6A94
error.bad.reason=\u932F\u8AA4\u539F\u56E0: {0}\uFF0C\u5FC5\u9808\u662F deprecated\u3001deprecated-for-removal \u6216 incubating \u5176\u4E2D\u4E4B\u4E00
error.nosuch.fileordir={0} : \u6C92\u6709\u9019\u985E\u6A94\u6848\u6216\u76EE\u9304
error.write.file=\u5BEB\u5165\u73FE\u6709\u7684 jar \u6A94\u6848\u6642\u767C\u751F\u932F\u8AA4
@@ -42,16 +42,11 @@
error.create.tempfile=\u7121\u6CD5\u5EFA\u7ACB\u66AB\u5B58\u6A94\u6848
error.hash.dep=\u96DC\u6E4A\u6A21\u7D44 {0} \u76F8\u4F9D\u6027\uFF0C\u5728\u6A21\u7D44\u8DEF\u5F91\u4E0A\u627E\u4E0D\u5230\u6A21\u7D44 {1}
error.module.options.without.info=--module-version \u6216 --hash-modules \u5176\u4E2D\u4E00\u500B\u6C92\u6709 module-info.class
+error.no.operative.descriptor=\u6C92\u6709\u4EE5\u4E0B\u7248\u672C\u7684\u64CD\u4F5C\u63CF\u8FF0\u5340: {0}
+error.no.root.descriptor=\u6C92\u6709\u6839\u6A21\u7D44\u63CF\u8FF0\u5340\uFF0C\u8ACB\u6307\u5B9A --release
+error.unable.derive.automodule=\u7121\u6CD5\u884D\u751F {0} \u7684\u6A21\u7D44\u63CF\u8FF0\u5340
error.unexpected.module-info=\u672A\u9810\u671F\u7684\u6A21\u7D44\u63CF\u8FF0\u5340 {0}
error.module.descriptor.not.found=\u627E\u4E0D\u5230\u6A21\u7D44\u63CF\u8FF0\u5340
-error.validator.info.without.root=\u5728\u5DF2\u555F\u52D5\u591A\u7248\u672C\u529F\u80FD\u76EE\u9304\u4E2D\u767C\u73FE module-info.class\uFF0C\u4F46\u662F\u6839\u4E2D\u6C92\u6709 module-info.class
-error.validator.info.name.notequal=\u5DF2\u555F\u52D5\u591A\u7248\u672C\u529F\u80FD\u76EE\u9304\u4E2D\u7684 module-info.class \u5305\u542B\u4E0D\u6B63\u78BA\u7684\u540D\u7A31
-error.validator.info.requires.transitive=\u5DF2\u555F\u52D5\u591A\u7248\u672C\u529F\u80FD\u76EE\u9304\u4E2D\u7684 module-info.class \u5305\u542B\u984D\u5916\u7684 "requires transitive"
-error.validator.info.requires.added=\u5DF2\u555F\u52D5\u591A\u7248\u672C\u529F\u80FD\u76EE\u9304\u4E2D\u7684 module-info.class \u5305\u542B\u984D\u5916\u7684 "requires"
-error.validator.info.requires.dropped=\u5DF2\u555F\u52D5\u591A\u7248\u672C\u529F\u80FD\u76EE\u9304\u4E2D\u7684 module-info.class \u5305\u542B\u907A\u6F0F\u7684 "requires"
-error.validator.info.exports.notequal=\u5DF2\u555F\u52D5\u591A\u7248\u672C\u529F\u80FD\u76EE\u9304\u4E2D\u7684 module-info.class \u5305\u542B\u4E0D\u540C\u7684 "exports"
-error.validator.info.opens.notequal=\u5DF2\u555F\u52D5\u591A\u7248\u672C\u529F\u80FD\u76EE\u9304\u4E2D\u7684 module-info.class \u5305\u542B\u4E0D\u540C\u7684 "opens"
-error.validator.info.provides.notequal=\u5DF2\u555F\u52D5\u591A\u7248\u672C\u529F\u80FD\u76EE\u9304\u4E2D\u7684 module-info.class \u5305\u542B\u4E0D\u540C\u7684 "provides"
error.invalid.versioned.module.attribute=\u6A21\u7D44\u63CF\u8FF0\u5340\u5C6C\u6027 {0} \u7121\u6548
error.missing.provider=\u627E\u4E0D\u5230\u670D\u52D9\u63D0\u4F9B\u8005: {0}
error.release.value.notnumber=\u7248\u672C {0} \u7121\u6548
@@ -67,11 +62,22 @@
error.validator.incompatible.class.version=\u9805\u76EE {0} \u7684\u985E\u5225\u7248\u672C\u8207\u8F03\u820A\u7248\u672C\u4E0D\u76F8\u5BB9
error.validator.different.api=\u9805\u76EE {0} \u7684\u67D0\u500B\u985E\u5225\u542B\u6709\u8207\u8F03\u820A\u7248\u672C\u4E0D\u540C\u7684 API
error.validator.names.mismatch=\u9805\u76EE {0} \u542B\u6709\u5167\u90E8\u540D\u7A31\u70BA {1} \u7684\u985E\u5225\uFF0C\u540D\u7A31\u4E0D\u76F8\u7B26
+error.validator.info.name.notequal=\u5DF2\u555F\u52D5\u591A\u7248\u672C\u529F\u80FD\u76EE\u9304\u4E2D\u7684 module-info.class \u5305\u542B\u4E0D\u6B63\u78BA\u7684\u540D\u7A31
+error.validator.info.requires.transitive=\u5DF2\u555F\u52D5\u591A\u7248\u672C\u529F\u80FD\u76EE\u9304\u4E2D\u7684 module-info.class \u5305\u542B\u984D\u5916\u7684 "requires transitive"
+error.validator.info.requires.added=\u5DF2\u555F\u52D5\u591A\u7248\u672C\u529F\u80FD\u76EE\u9304\u4E2D\u7684 module-info.class \u5305\u542B\u984D\u5916\u7684 "requires"
+error.validator.info.requires.dropped=\u5DF2\u555F\u52D5\u591A\u7248\u672C\u529F\u80FD\u76EE\u9304\u4E2D\u7684 module-info.class \u5305\u542B\u907A\u6F0F\u7684 "requires"
+error.validator.info.exports.notequal=\u5DF2\u555F\u52D5\u591A\u7248\u672C\u529F\u80FD\u76EE\u9304\u4E2D\u7684 module-info.class \u5305\u542B\u4E0D\u540C\u7684 "exports"
+error.validator.info.opens.notequal=\u5DF2\u555F\u52D5\u591A\u7248\u672C\u529F\u80FD\u76EE\u9304\u4E2D\u7684 module-info.class \u5305\u542B\u4E0D\u540C\u7684 "opens"
+error.validator.info.provides.notequal=\u5DF2\u555F\u52D5\u591A\u7248\u672C\u529F\u80FD\u76EE\u9304\u4E2D\u7684 module-info.class \u5305\u542B\u4E0D\u540C\u7684 "provides"
+error.validator.info.version.notequal={0}: \u5DF2\u555F\u52D5\u591A\u7248\u672C\u529F\u80FD\u76EE\u9304\u4E2D\u7684 module-info.class \u5305\u542B\u4E0D\u540C\u7684 "version"
+error.validator.info.manclass.notequal={0}: \u5DF2\u555F\u52D5\u591A\u7248\u672C\u529F\u80FD\u76EE\u9304\u4E2D\u7684 module-info.class \u5305\u542B\u4E0D\u540C\u7684 "main-class"
warn.validator.identical.entry=\u8B66\u544A: \u9805\u76EE {0} \u7684\u67D0\u500B\u985E\u5225\n\u8207 jar \u4E2D\u7684\u73FE\u6709\u9805\u76EE\u76F8\u540C
warn.validator.resources.with.same.name=\u8B66\u544A: \u9805\u76EE {0} \u4E2D\u7684\u591A\u500B\u8CC7\u6E90\u540D\u7A31\u76F8\u540C
warn.validator.concealed.public.class=\u8B66\u544A: \u9805\u76EE {0} \u662F\u96B1\u85CF\u5957\u88DD\u7A0B\u5F0F\u4E2D\u7684\n\u516C\u7528\u985E\u5225\uFF0C\u82E5\u5C07\u6B64 jar \u653E\u5728\u985E\u5225\u8DEF\u5F91\u4E0A\n\u6703\u9020\u6210\u516C\u7528\u4ECB\u9762\u4E0D\u76F8\u5BB9
+warn.release.unexpected.versioned.entry=\u672A\u9810\u671F\u7684\u555F\u52D5\u591A\u7248\u672C\u529F\u80FD\u9805\u76EE {0}
out.added.manifest=\u5DF2\u65B0\u589E\u8CC7\u8A0A\u6E05\u55AE
out.added.module-info=\u5DF2\u65B0\u589E module-info: {0}
+out.automodule=\u627E\u4E0D\u5230\u6A21\u7D44\u63CF\u8FF0\u5340\u3002\u5DF2\u81EA\u52D5\u884D\u751F\u6A21\u7D44\u3002
out.update.manifest=\u5DF2\u66F4\u65B0\u8CC7\u8A0A\u6E05\u55AE
out.update.module-info=\u5DF2\u66F4\u65B0 module-info: {0}
out.ignore.entry=\u5FFD\u7565\u9805\u76EE {0}
@@ -88,17 +94,19 @@
main.usage.summary=\u7528\u6CD5: jar [OPTION...] [ [--release VERSION] [-C dir] files] ...
main.usage.summary.try=\u8ACB\u4F7F\u7528 'jar --help' \u4EE5\u53D6\u5F97\u66F4\u591A\u7684\u8CC7\u8A0A\u3002
-main.help.preopt=\u7528\u6CD5: jar [OPTION...] [ [--release VERSION] [-C dir] files] ...\njar \u6703\u5EFA\u7ACB\u985E\u5225\u548C\u8CC7\u6E90\u7684\u5B58\u6A94\uFF0C\u800C\u4E14\u53EF\u64CD\u63A7\u6216\n\u5F9E\u5B58\u6A94\u56DE\u5FA9\u500B\u5225\u985E\u5225\u6216\u8CC7\u6E90\u3002\n\n \u7BC4\u4F8B:\n # \u5EFA\u7ACB\u4E00\u500B\u540D\u70BA classes.jar \u4E14\u542B\u6709\u5169\u500B\u985E\u5225\u6A94\u6848\u7684\u5B58\u6A94:\n jar --create --file classes.jar Foo.class Bar.class\n # \u4F7F\u7528\u73FE\u6709\u7684\u8CC7\u8A0A\u6E05\u55AE\u548C foo/ \u4E2D\u7684\u6240\u6709\u6A94\u6848\u5EFA\u7ACB\u4E00\u500B\u5B58\u6A94:\n jar --create --file classes.jar --manifest mymanifest -C foo/ .\n # \u5EFA\u7ACB\u4E00\u500B\u6A21\u7D44\u5316 jar \u5B58\u6A94\uFF0C\u5176\u4E2D\u7684\u6A21\u7D44\u63CF\u8FF0\u5340\u4F4D\u65BC\n # classes/module-info.class:\n jar --create --file foo.jar --main-class com.foo.Main --module-version 1.0\n -C foo/ classes resources\n # \u5C07\u73FE\u6709\u7684\u975E\u6A21\u7D44\u5316 jar \u66F4\u65B0\u70BA\u6A21\u7D44\u5316 jar:\n jar --update --file foo.jar --main-class com.foo.Main --module-version 1.0\n -C foo/ module-info.class\n # \u5EFA\u7ACB\u591A\u91CD\u7248\u672C\u7684 jar\uFF0C\u5C07\u90E8\u5206\u6A94\u6848\u653E\u7F6E\u5728 META-INF/versions/9 \u76EE\u9304\u4E2D:\n jar --create --file mr.jar -C foo classes --release 9 -C foo9 classes
+main.help.preopt=\u7528\u6CD5: jar [OPTION...] [ [--release VERSION] [-C dir] files] ...\njar \u6703\u5EFA\u7ACB\u4E00\u500B\u985E\u5225\u548C\u8CC7\u6E90\u7684\u5B58\u6A94\uFF0C\u800C\u4E14\u53EF\u64CD\u63A7\u6216\n\u5F9E\u5B58\u6A94\u56DE\u5FA9\u500B\u5225\u985E\u5225\u6216\u8CC7\u6E90\u3002\n\n \u7BC4\u4F8B:\n # \u5EFA\u7ACB\u4E00\u500B\u540D\u70BA classes.jar \u7684\u5B58\u6A94\uFF0C\u5176\u4E2D\u542B\u6709\u5169\u500B\u985E\u5225\u6A94\u6848:\n jar --create --file classes.jar Foo.class Bar.class\n # \u4F7F\u7528\u73FE\u6709\u7684\u8CC7\u8A0A\u6E05\u55AE\u52A0\u4E0A foo/ \u4E2D\u7684\u6240\u6709\u6A94\u6848\u5EFA\u7ACB\u4E00\u500B\u5B58\u6A94:\n jar --create --file classes.jar --manifest mymanifest -C foo/ .\n # \u5EFA\u7ACB\u4E00\u500B\u6A21\u7D44\u5316 jar \u5B58\u6A94\uFF0C\u5176\u4E2D\u7684\u6A21\u7D44\u63CF\u8FF0\u5340\u4F4D\u65BC\n # classes/module-info.class:\n jar --create --file foo.jar --main-class com.foo.Main --module-version 1.0\n -C foo/ classes resources\n # \u5C07\u73FE\u6709\u7684\u975E\u6A21\u7D44\u5316 jar \u66F4\u65B0\u6210\u6A21\u7D44\u5316 jar:\n jar --update --file foo.jar --main-class com.foo.Main --module-version 1.0\n -C foo/ module-info.class\n # \u5EFA\u7ACB\u591A\u91CD\u7248\u672C\u7684 jar\uFF0C\u5C07\u90E8\u5206\u6A94\u6848\u653E\u7F6E\u5728 META-INF/versions/9 \u76EE\u9304\u4E2D:\n jar --create --file mr.jar -C foo classes --release 9 -C foo9 classes\n\n\u82E5\u8981\u7E2E\u77ED\u6216\u7C21\u5316 jar \u547D\u4EE4\uFF0C\u53EF\u4EE5\u5728\u500B\u5225\u6587\u5B57\u6A94\u4E2D\u6307\u5B9A\u5F15\u6578\uFF0C\n\u7136\u5F8C\u4F7F\u7528 at \u7B26\u865F (@) \u4F5C\u70BA\u524D\u7F6E\u78BC\uFF0C\u5C07\u5176\u50B3\u9001\u81F3 jar \u547D\u4EE4\u3002\n\n \u7BC4\u4F8B:\n # \u5F9E classes.list \u6A94\u6848\u8B80\u53D6\u984D\u5916\u7684\u9078\u9805\u548C\u985E\u5225\u6A94\u6848\u6E05\u55AE\n jar --create --file my.jar @classes.list\n
main.help.opt.main=\ \u4E3B\u8981\u4F5C\u696D\u6A21\u5F0F:\n
main.help.opt.main.create=\ -c, --create \u5EFA\u7ACB\u5B58\u6A94
main.help.opt.main.generate-index=\ -i, --generate-index=FILE \u70BA\u6307\u5B9A\u7684 jar \u5B58\u6A94\u7522\u751F\u7D22\u5F15\n \u8CC7\u8A0A
main.help.opt.main.list=\ -t, --list \u5217\u51FA\u5B58\u6A94\u7684\u76EE\u9304
main.help.opt.main.update=\ -u, --update \u66F4\u65B0\u73FE\u6709\u7684 jar \u5B58\u6A94
main.help.opt.main.extract=\ -x, --extract \u5F9E\u5B58\u6A94\u4E2D\u64F7\u53D6\u6307\u5B9A (\u6216\u6240\u6709) \u6A94\u6848
-main.help.opt.main.print-module-descriptor=\ -d, --print-module-descriptor \u5217\u5370\u6A21\u7D44\u63CF\u8FF0\u5340
+main.help.opt.main.describe-module=\ -d, --describe-module \u5217\u5370\u6A21\u7D44\u63CF\u8FF0\u5340\u6216\u81EA\u52D5\u7522\u751F\u7684\u6A21\u7D44\u540D\u7A31
main.help.opt.any=\ \u53EF\u5728\u4EFB\u4F55\u6A21\u5F0F\u4E0B\u4F7F\u7528\u7684\u4F5C\u696D\u4FEE\u98FE\u689D\u4EF6:\n\n -C DIR \u8B8A\u66F4\u70BA\u6307\u5B9A\u76EE\u9304\u4E26\u5305\u542B\n \u4E0B\u5217\u6A94\u6848
-main.help.opt.any.file=\ -f, --file=FILE \u5B58\u6A94\u6A94\u6848\u540D\u7A31\n --release VERSION \u5C07\u6240\u6709\u4E0B\u5217\u6A94\u6848\u653E\u7F6E\u5728 jar \u7684\u5DF2\u555F\u52D5\u591A\u7248\u672C\n \u529F\u80FD\u76EE\u9304\u4E2D (\u4F8B\u5982 META-INF/versions/VERSION/)
+main.help.opt.any.file=\ -f, --file=FILE \u5B58\u6A94\u6A94\u6848\u540D\u7A31\u3002\u5982\u679C\u7701\u7565\uFF0C\u6703\u6839\u64DA\u4F5C\u696D\u4F7F\u7528\n stdin \u6216 stdout\n --release VERSION \u5C07\u6240\u6709\u4E0B\u5217\u6A94\u6848\u653E\u7F6E\u5728 jar \u7684\u555F\u52D5\u591A\u7248\u672C\n \u529F\u80FD\u76EE\u9304\u4E2D (\u4F8B\u5982 META-INF/versions/VERSION/)
main.help.opt.any.verbose=\ -v, --verbose \u5728\u6A19\u6E96\u8F38\u51FA\u4E2D\u7522\u751F\u8A73\u7D30\u8F38\u51FA
+main.help.opt.create=\ \u53EA\u80FD\u5728\u5EFA\u7ACB\u6A21\u5F0F\u4F7F\u7528\u7684\u4F5C\u696D\u4FEE\u98FE\u689D\u4EF6:\n
+main.help.opt.create.normalize=\ -n, --normalize \u5EFA\u7ACB\u65B0\u7684 jar \u5B58\u6A94\u4E4B\u5F8C\uFF0C\u5C07\u5176\u4E2D\u7684\u8CC7\u8A0A\n \u6A19\u6E96\u5316
main.help.opt.create.update=\ \u53EA\u80FD\u5728\u5EFA\u7ACB\u548C\u66F4\u65B0\u6A21\u5F0F\u4E0B\u4F7F\u7528\u7684\u4F5C\u696D\u4FEE\u98FE\u689D\u4EF6:\n
main.help.opt.create.update.main-class=\ -e, --main-class=CLASSNAME \u96A8\u9644\u65BC\u6A21\u7D44\u5316\u6216\u53EF\u57F7\u884C\n jar \u5B58\u6A94\u4E2D\u7368\u7ACB\u61C9\u7528\u7A0B\u5F0F\u7684\n \u61C9\u7528\u7A0B\u5F0F\u9032\u5165\u9EDE
main.help.opt.create.update.manifest=\ -m, --manifest=FILE \u5305\u542B\u6307\u5B9A\u8CC7\u8A0A\u6E05\u55AE\u6A94\u6848\u4E2D\u7684\u8CC7\u8A0A\u6E05\u55AE\n \u8CC7\u8A0A
@@ -111,7 +119,7 @@
main.help.opt.create.update.index=\ \u53EA\u80FD\u5728\u5EFA\u7ACB\u3001\u66F4\u65B0\u53CA\u7522\u751F\u7D22\u5F15\u6A21\u5F0F\u4E0B\u4F7F\u7528\u7684\u4F5C\u696D\u4FEE\u98FE\u689D\u4EF6:\n
main.help.opt.create.update.index.no-compress=\ -0, --no-compress \u50C5\u5132\u5B58; \u4E0D\u4F7F\u7528 ZIP \u58D3\u7E2E\u65B9\u5F0F
main.help.opt.other=\ \u5176\u4ED6\u9078\u9805:\n
-main.help.opt.other.help=\ -?, --help[:compat] \u63D0\u4F9B\u6B64\u8AAA\u660E\u6216\u9078\u64C7\u6027\u986F\u793A\u76F8\u5BB9\u6027\u8AAA\u660E
+main.help.opt.other.help=\ -h, --help[:compat] \u63D0\u4F9B\u6B64\u8AAA\u660E\u6216\u9078\u64C7\u6027\u986F\u793A\u76F8\u5BB9\u6027\u8AAA\u660E
main.help.opt.other.help-extra=\ --help-extra \u63D0\u4F9B\u984D\u5916\u9078\u9805\u7684\u8AAA\u660E
main.help.opt.other.version=\ --version \u5217\u5370\u7A0B\u5F0F\u7248\u672C
main.help.postopt=\ \u5982\u679C\u6A21\u7D44\u63CF\u8FF0\u5340 ('module-info.class') \u4F4D\u65BC\u6307\u5B9A\u76EE\u9304\u7684\u6839\n \u6216 jar \u5B58\u6A94\u672C\u8EAB\u7684\u6839\uFF0C\u5247\u5B58\u6A94\u6703\u662F\n \u6A21\u7D44\u5316\u7684 jar\u3002\u4E0B\u5217\u4F5C\u696D\u53EA\u80FD\u5728\u5EFA\u7ACB\u6A21\u7D44\u5316 jar \u6216\u66F4\u65B0\n \u73FE\u6709\u975E\u6A21\u7D44\u5316 jar \u6642\u9032\u884C: '--module-version'\u3001\n '--hash-modules' \u548C '--module-path'\u3002\n\n \u9577\u9078\u9805\u7684\u5F37\u5236\u6027\u6216\u9078\u64C7\u6027\u5F15\u6578\u4E5F\u6703\u662F\u4EFB\u4F55\u5C0D\u61C9\u77ED\u9078\u9805\u7684\n \u5F37\u5236\u6027\u6216\u9078\u64C7\u6027\u5F15\u6578\u3002
--- a/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/resources/jlink_ja.properties Sat Jun 03 02:44:55 2017 +0000
+++ b/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/resources/jlink_ja.properties Sat Jun 03 03:48:03 2017 +0000
@@ -23,13 +23,9 @@
# questions.
#
-main.usage.summary=\u4F7F\u7528\u65B9\u6CD5: {0} <options> --module-path <modulepath> --add-modules <mods> --output\n<path> \u4F7F\u7528\u53EF\u80FD\u306A\u30AA\u30D7\u30B7\u30E7\u30F3\u306E\u30EA\u30B9\u30C8\u306B\u3064\u3044\u3066\u306F\u3001--help\u3092\u4F7F\u7528\u3057\u307E\u3059
+main.usage.summary=\u4F7F\u7528\u65B9\u6CD5: {0} <options> --module-path <modulepath> --add-modules <module>[,<module>...]\n\u4F7F\u7528\u53EF\u80FD\u306A\u30AA\u30D7\u30B7\u30E7\u30F3\u306E\u30EA\u30B9\u30C8\u306B\u3064\u3044\u3066\u306F\u3001--help\u3092\u4F7F\u7528\u3057\u307E\u3059
-main.usage=\u4F7F\u7528\u65B9\u6CD5: {0} <options> --module-path <modulepath> --add-modules <mods> --output
-\<path> \u4F7F\u7528\u53EF\u80FD\u306A\u30AA\u30D7\u30B7\u30E7\u30F3\u306B\u306F\u6B21\u306E\u3082\u306E\u304C\u3042\u308A\u307E\u3059:
-
-error.prefix=\u30A8\u30E9\u30FC:
-warn.prefix=\u8B66\u544A:
+main.usage=\u4F7F\u7528\u65B9\u6CD5: {0} <options> --module-path <modulepath> --add-modules <module>[,<module>...]\n\u4F7F\u7528\u53EF\u80FD\u306A\u30AA\u30D7\u30B7\u30E7\u30F3\u306B\u306F\u6B21\u306E\u3082\u306E\u304C\u3042\u308A\u307E\u3059:
main.opt.help=\ -h\u3001--help \u3053\u306E\u30D8\u30EB\u30D7\u30FB\u30E1\u30C3\u30BB\u30FC\u30B8\u3092\u51FA\u529B\u3057\u307E\u3059
@@ -43,7 +39,11 @@
main.opt.output=\ --output <path> \u51FA\u529B\u30D1\u30B9\u306E\u5834\u6240
-main.opt.launcher=\ --launcher <command>=<module> \u30E2\u30B8\u30E5\u30FC\u30EB\u306E\u8D77\u52D5\u30C4\u30FC\u30EB\u30FB\u30B3\u30DE\u30F3\u30C9\u540D\n --launcher <command>=<module>/<main>\n \u30E2\u30B8\u30E5\u30FC\u30EB\u3068\u30E1\u30A4\u30F3\u30FB\u30AF\u30E9\u30B9\u306E\u8D77\u52D5\u30C4\u30FC\u30EB\u30FB\u30B3\u30DE\u30F3\u30C9\u540D
+main.opt.launcher=\ --launcher <name>=<module>[/<mainclass>]\n \u30E2\u30B8\u30E5\u30FC\u30EB\u304A\u3088\u3073\u30E1\u30A4\u30F3\u30FB\u30AF\u30E9\u30B9(\u6307\u5B9A\u3057\u305F\u5834\u5408)\u306B\n \u6307\u5B9A\u3055\u308C\u305F\u540D\u524D\u306E\u8D77\u52D5\u30C4\u30FC\u30EB\u30FB\u30B3\u30DE\u30F3\u30C9\u3092\n \u8FFD\u52A0\u3057\u307E\u3059
+
+main.opt.bind-services=\ --bind-services \u30B5\u30FC\u30D3\u30B9\u30FB\u30D7\u30ED\u30D0\u30A4\u30C0\u30FB\u30E2\u30B8\u30E5\u30FC\u30EB\u3068\u305D\u306E\u4F9D\u5B58\u6027\n \u5185\u3067\u30EA\u30F3\u30AF\u3057\u307E\u3059
+
+main.opt.suggest-providers=\ --suggest-providers [<name>,...] \u30E2\u30B8\u30E5\u30FC\u30EB\u30FB\u30D1\u30B9\u304B\u3089\u6307\u5B9A\u306E\u30B5\u30FC\u30D3\u30B9\u30FB\u30BF\u30A4\u30D7\u3092\n \u5B9F\u88C5\u3059\u308B\u30D7\u30ED\u30D0\u30A4\u30C0\u3092\u63A8\u5968\u3057\u307E\u3059
main.command.files=\ @<filename> \u30D5\u30A1\u30A4\u30EB\u304B\u3089\u30AA\u30D7\u30B7\u30E7\u30F3\u3092\u8AAD\u307F\u53D6\u308A\u307E\u3059
@@ -53,12 +53,17 @@
main.opt.ignore-signing-information=\ --ignore-signing-information \u7F72\u540D\u6E08\u30E2\u30B8\u30E5\u30E9JAR\u304C\u30A4\u30E1\u30FC\u30B8\u306B\u30EA\u30F3\u30AF\n \u3055\u308C\u3066\u3044\u308B\u5834\u5408\u3001\u81F4\u547D\u7684\u30A8\u30E9\u30FC\u3092\u6291\u6B62\n \u3057\u307E\u3059\u3002\u7F72\u540D\u6E08\u30E2\u30B8\u30E5\u30E9JAR\u306E\u7F72\u540D\u95A2\u9023\n \u30D5\u30A1\u30A4\u30EB\u306F\u3001\u30E9\u30F3\u30BF\u30A4\u30E0\u30FB\u30A4\u30E1\u30FC\u30B8\u306B\u30B3\u30D4\u30FC\n \u3055\u308C\u307E\u305B\u3093\u3002
+main.opt.verbose=\ -v\u3001--verbose \u8A73\u7D30\u306A\u30C8\u30EC\u30FC\u30B9\u3092\u6709\u52B9\u306B\u3057\u307E\u3059
+
main.msg.bug=jlink\u3067\u4F8B\u5916\u304C\u767A\u751F\u3057\u307E\u3057\u305F\u3002\u30C7\u30FC\u30BF\u30D9\u30FC\u30B9\u3067\u91CD\u8907\u304C\u306A\u3044\u304B\u3092\u3054\u78BA\u8A8D\u306E\u3046\u3048\u3001Java Bug Database (http://bugreport.java.com/bugreport/)\u3067bug\u306E\u767B\u9332\u3092\u304A\u9858\u3044\u3044\u305F\u3057\u307E\u3059\u3002\u30EC\u30DD\u30FC\u30C8\u306B\u306F\u3001\u305D\u306E\u30D7\u30ED\u30B0\u30E9\u30E0\u3068\u6B21\u306E\u8A3A\u65AD\u5185\u5BB9\u3092\u542B\u3081\u3066\u304F\u3060\u3055\u3044\u3002\u3054\u5354\u529B\u3042\u308A\u304C\u3068\u3046\u3054\u3056\u3044\u307E\u3059\u3002
main.extended.help=\u4F7F\u7528\u53EF\u80FD\u306A\u30D7\u30E9\u30B0\u30A4\u30F3\u306E\u30EA\u30B9\u30C8:
main.extended.help.footer=<pattern-list>\u3092\u5FC5\u8981\u3068\u3059\u308B\u30AA\u30D7\u30B7\u30E7\u30F3\u306E\u5834\u5408\u3001\u5024\u306F\u3001\u6B21\u306E\u5F62\u5F0F\u306E\u3044\u305A\u308C\u304B\u3092\u4F7F\u7528\u3059\u308B\u3001\u8981\u7D20\u306E\u30AB\u30F3\u30DE\u533A\u5207\u308A\u30EA\u30B9\u30C8\u306B\u306A\u308A\u307E\u3059:\n <glob-pattern>\n glob:<glob-pattern>\n regex:<regex-pattern>\n @<filename> filename\u306F\u3001\u4F7F\u7528\u3059\u308B\u30D1\u30BF\u30FC\u30F3\u3092\u542B\u3080\u30D5\u30A1\u30A4\u30EB(1\u884C\u3054\u3068\u306B1\u30D1\u30BF\u30FC\u30F3)\u306E\u540D\u524D\u3067\u3059\n\n
+error.prefix=\u30A8\u30E9\u30FC:
+warn.prefix=\u8B66\u544A:
+
err.unknown.byte.order:\u4E0D\u660E\u306A\u30D0\u30A4\u30C8\u9806{0}
err.launcher.main.class.empty:\u8D77\u52D5\u30C4\u30FC\u30EB\u306E\u30E1\u30A4\u30F3\u30FB\u30AF\u30E9\u30B9\u540D\u306F\u7A7A\u306B\u3067\u304D\u307E\u305B\u3093: {0}
err.launcher.module.name.empty:\u8D77\u52D5\u30C4\u30FC\u30EB\u306E\u30E2\u30B8\u30E5\u30FC\u30EB\u540D\u306F\u7A7A\u306B\u3067\u304D\u307E\u305B\u3093: {0}
@@ -75,12 +80,12 @@
err.dir.exists={0}\u306F\u3059\u3067\u306B\u5B58\u5728\u3057\u307E\u3059
err.badpattern=\u4E0D\u6B63\u30D1\u30BF\u30FC\u30F3{0}
err.unknown.option=\u4E0D\u660E\u306A\u30AA\u30D7\u30B7\u30E7\u30F3: {0}
-err.orphan.argument=\u5B64\u7ACB\u3057\u305F\u5F15\u6570: {0}
err.missing.arg={0}\u306B\u5024\u304C\u6307\u5B9A\u3055\u308C\u3066\u3044\u307E\u305B\u3093
err.internal.error=\u5185\u90E8\u30A8\u30E9\u30FC: {0} {1} {2}
err.invalid.arg.for.option=\u30AA\u30D7\u30B7\u30E7\u30F3\u306E\u5F15\u6570\u304C\u7121\u52B9\u3067\u3059: {0}
err.option.after.class=\u30AA\u30D7\u30B7\u30E7\u30F3\u306F\u30AF\u30E9\u30B9\u306E\u524D\u306B\u6307\u5B9A\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059: {0}
err.option.unsupported={0}\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093: {1}
+err.orphan.arguments={0}\u306F\u7121\u52B9\u306A\u5F15\u6570\u3067\u3059
err.config.defaults=\u30D7\u30ED\u30D1\u30C6\u30A3{0}\u304C\u69CB\u6210\u306B\u3042\u308A\u307E\u305B\u3093
err.config.defaults.value=\u30C7\u30D5\u30A9\u30EB\u30C8\u30FB\u30D7\u30ED\u30D1\u30C6\u30A3\u306E\u5024\u304C\u9593\u9055\u3063\u3066\u3044\u307E\u3059: {0}
err.bom.generation=bom\u30D5\u30A1\u30A4\u30EB\u306E\u751F\u6210\u306B\u5931\u6557\u3057\u307E\u3057\u305F: {0}
@@ -89,3 +94,7 @@
warn.signing=\u8B66\u544A: \u7F72\u540D\u6E08\u30E2\u30B8\u30E5\u30E9JAR {0}\u306F\u73FE\u5728\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093
warn.invalid.arg=\u7121\u52B9\u306A\u30AF\u30E9\u30B9\u540D\u307E\u305F\u306F\u30D1\u30B9\u540D\u304C\u5B58\u5728\u3057\u307E\u305B\u3093: {0}
warn.split.package=\u30D1\u30C3\u30B1\u30FC\u30B8{0}\u306F{1} {2}\u3067\u5B9A\u7FA9\u3055\u308C\u3066\u3044\u307E\u3059
+warn.provider.notfound=--suggest-providers\u306B\u6307\u5B9A\u3055\u308C\u305F\u30B5\u30FC\u30D3\u30B9\u306B\u30D7\u30ED\u30D0\u30A4\u30C0\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093: {0}
+no.suggested.providers=--bind-services\u30AA\u30D7\u30B7\u30E7\u30F3\u304C\u6307\u5B9A\u3055\u308C\u3066\u3044\u307E\u3059\u3002\u8FFD\u52A0\u306E\u30D7\u30ED\u30D0\u30A4\u30C0\u306F\u63A8\u5968\u3055\u308C\u307E\u305B\u3093\u3002
+suggested.providers.header=\u63A8\u5968\u30D7\u30ED\u30D0\u30A4\u30C0
+providers.header=\u30D7\u30ED\u30D0\u30A4\u30C0
--- a/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/resources/jlink_zh_CN.properties Sat Jun 03 02:44:55 2017 +0000
+++ b/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/resources/jlink_zh_CN.properties Sat Jun 03 03:48:03 2017 +0000
@@ -23,13 +23,9 @@
# questions.
#
-main.usage.summary=\u7528\u6CD5: {0} <\u9009\u9879> --module-path <\u6A21\u5757\u8DEF\u5F84> --add-modules <\u6A21\u5757> --output\n<\u8DEF\u5F84> \u4F7F\u7528 --help \u53EF\u5217\u51FA\u53EF\u80FD\u7684\u9009\u9879
+main.usage.summary=\u7528\u6CD5: {0} <\u9009\u9879> --module-path <\u6A21\u5757\u8DEF\u5F84> --add-modules <\u6A21\u5757>[,<\u6A21\u5757>...]\n\u4F7F\u7528 --help \u53EF\u5217\u51FA\u53EF\u80FD\u7684\u9009\u9879
-main.usage=\u7528\u6CD5: {0} <\u9009\u9879> --module-path <\u6A21\u5757\u8DEF\u5F84> --add-modules <\u6A21\u5757> --output
-\<path> \u53EF\u80FD\u7684\u9009\u9879\u5305\u62EC:
-
-error.prefix=\u9519\u8BEF:
-warn.prefix=\u8B66\u544A:
+main.usage=\u7528\u6CD5: {0} <\u9009\u9879> --module-path <\u6A21\u5757\u8DEF\u5F84> --add-modules <\u6A21\u5757>[,<\u6A21\u5757>...]\n\u53EF\u80FD\u7684\u9009\u9879\u5305\u62EC:
main.opt.help=\ -h, --help \u8F93\u51FA\u6B64\u5E2E\u52A9\u6D88\u606F
@@ -43,7 +39,11 @@
main.opt.output=\ --output <\u8DEF\u5F84> \u8F93\u51FA\u8DEF\u5F84\u7684\u4F4D\u7F6E
-main.opt.launcher=\ --launcher <\u547D\u4EE4>=<\u6A21\u5757> \u6A21\u5757\u7684\u542F\u52A8\u7A0B\u5E8F\u547D\u4EE4\u540D\u79F0\n --launcher <\u547D\u4EE4>=<\u6A21\u5757>/<\u4E3B\u7C7B>\n \u6A21\u5757\u548C\u4E3B\u7C7B\u7684\u542F\u52A8\u7A0B\u5E8F\u547D\u4EE4\u540D\u79F0
+main.opt.launcher=\ --launcher <\u540D\u79F0>=<\u6A21\u5757>[/<\u4E3B\u7C7B>]\n \u4E3A\u6A21\u5757\u548C\u4E3B\u7C7B\u6DFB\u52A0\u7ED9\u5B9A\n \u540D\u79F0\u7684\u542F\u52A8\u7A0B\u5E8F\u547D\u4EE4\n (\u5982\u679C\u6307\u5B9A)
+
+main.opt.bind-services=\ --bind-services \u94FE\u63A5\u670D\u52A1\u63D0\u4F9B\u65B9\u6A21\u5757\u53CA\u5176\n \u88AB\u4F9D\u8D56\u5BF9\u8C61
+
+main.opt.suggest-providers=\ --suggest-providers [<\u540D\u79F0>,...] \u5EFA\u8BAE\u53EF\u4ECE\u6A21\u5757\u8DEF\u5F84\u4E2D\u5B9E\u73B0\n \u7ED9\u5B9A\u670D\u52A1\u7C7B\u578B\u7684\u63D0\u4F9B\u65B9
main.command.files=\ @<\u6587\u4EF6\u540D> \u4ECE\u6587\u4EF6\u4E2D\u8BFB\u53D6\u9009\u9879
@@ -53,12 +53,17 @@
main.opt.ignore-signing-information=\ --ignore-signing-information \u5728\u6620\u50CF\u4E2D\u94FE\u63A5\u5DF2\u7B7E\u540D\u6A21\u5757\u5316\n JAR \u7684\u60C5\u51B5\u4E0B\u9690\u85CF\u81F4\u547D\u9519\u8BEF\u3002\n \u5DF2\u7B7E\u540D\u6A21\u5757\u5316 JAR \u7684\u7B7E\u540D\n \u76F8\u5173\u6587\u4EF6\u5C06\u4E0D\u4F1A\u590D\u5236\u5230\n \u8FD0\u884C\u65F6\u6620\u50CF\u3002
+main.opt.verbose=\ -v, --verbose \u542F\u7528\u8BE6\u7EC6\u8DDF\u8E2A
+
main.msg.bug=jlink \u4E2D\u51FA\u73B0\u5F02\u5E38\u9519\u8BEF\u3002\u5982\u679C\u5728 Java Bug Database (http://bugreport.java.com/bugreport/) \u4E2D\u6CA1\u6709\u627E\u5230\u8BE5\u9519\u8BEF, \u8BF7\u5728\u8BE5\u6570\u636E\u5E93\u4E2D\u5EFA\u7ACB Bug\u3002\u8BF7\u5728\u62A5\u544A\u4E2D\u9644\u4E0A\u60A8\u7684\u7A0B\u5E8F\u548C\u4EE5\u4E0B\u8BCA\u65AD\u4FE1\u606F\u3002\u8C22\u8C22\u3002
main.extended.help=\u53EF\u7528\u63D2\u4EF6\u5217\u8868:
main.extended.help.footer=\u5BF9\u4E8E\u9700\u8981 <\u6A21\u5F0F\u5217\u8868> \u7684\u9009\u9879, \u503C\u5C06\u4E3A\u9017\u53F7\u5206\u9694\u7684\u5143\u7D20\u5217\u8868, \u6BCF\u4E2A\u5143\u7D20\u4F7F\u7528\u4EE5\u4E0B\u683C\u5F0F\u4E4B\u4E00:\n <glob \u6A21\u5F0F>\n glob:<glob \u6A21\u5F0F>\n regex:<\u6B63\u5219\u8868\u8FBE\u5F0F\u6A21\u5F0F>\n @<\u6587\u4EF6\u540D>, \u5176\u4E2D\u201C\u6587\u4EF6\u540D\u201D\u662F\u5305\u542B\u8981\u4F7F\u7528\u7684\u6A21\u5F0F\u7684\u6587\u4EF6\u540D, \u6BCF\u884C\u4E00\u4E2A\u6A21\u5F0F\n\n
+error.prefix=\u9519\u8BEF:
+warn.prefix=\u8B66\u544A:
+
err.unknown.byte.order:\u672A\u77E5\u7684\u5B57\u8282\u987A\u5E8F {0}
err.launcher.main.class.empty:\u542F\u52A8\u7A0B\u5E8F\u4E3B\u7C7B\u540D\u4E0D\u80FD\u4E3A\u7A7A: {0}
err.launcher.module.name.empty:\u542F\u52A8\u7A0B\u5E8F\u6A21\u5757\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A: {0}
@@ -75,12 +80,12 @@
err.dir.exists={0} \u5DF2\u5B58\u5728
err.badpattern=\u9519\u8BEF\u7684\u6A21\u5F0F {0}
err.unknown.option=\u672A\u77E5\u9009\u9879: {0}
-err.orphan.argument=\u5B64\u7ACB\u7684\u53C2\u6570: {0}
err.missing.arg=\u6CA1\u6709\u4E3A{0}\u6307\u5B9A\u503C
err.internal.error=\u5185\u90E8\u9519\u8BEF: {0} {1} {2}
err.invalid.arg.for.option=\u9009\u9879\u7684\u53C2\u6570\u65E0\u6548: {0}
err.option.after.class=\u5FC5\u987B\u5728\u7C7B\u4E4B\u524D\u6307\u5B9A\u9009\u9879: {0}
err.option.unsupported=\u4E0D\u652F\u6301{0}: {1}
+err.orphan.arguments=\u65E0\u6548\u7684\u53C2\u6570: {0}
err.config.defaults=\u914D\u7F6E\u4E2D\u7F3A\u5C11\u5C5E\u6027 {0}
err.config.defaults.value=\u9ED8\u8BA4\u5C5E\u6027\u4E2D\u7684\u503C\u9519\u8BEF: {0}
err.bom.generation=\u672A\u80FD\u751F\u6210 bom \u6587\u4EF6: {0}
@@ -89,3 +94,7 @@
warn.signing=\u8B66\u544A: \u5F53\u524D\u4E0D\u652F\u6301\u5DF2\u7B7E\u540D\u6A21\u5757\u5316 JAR {0}
warn.invalid.arg=\u7C7B\u540D\u65E0\u6548\u6216\u8DEF\u5F84\u540D\u4E0D\u5B58\u5728: {0}
warn.split.package=\u5DF2\u5728{1} {2}\u4E2D\u5B9A\u4E49\u7A0B\u5E8F\u5305{0}
+warn.provider.notfound=\u627E\u4E0D\u5230\u4E3A --suggest-providers \u6307\u5B9A\u7684\u670D\u52A1\u63D0\u4F9B\u65B9: {0}
+no.suggested.providers=\u6307\u5B9A\u4E86 --bind-services \u9009\u9879\u3002\u672A\u5EFA\u8BAE\u5176\u4ED6\u63D0\u4F9B\u65B9\u3002
+suggested.providers.header=\u5EFA\u8BAE\u7684\u63D0\u4F9B\u65B9
+providers.header=\u63D0\u4F9B\u65B9
--- a/jdk/src/jdk.jlink/share/classes/jdk/tools/jmod/resources/jmod_ja.properties Sat Jun 03 02:44:55 2017 +0000
+++ b/jdk/src/jdk.jlink/share/classes/jdk/tools/jmod/resources/jmod_ja.properties Sat Jun 03 03:48:03 2017 +0000
@@ -52,12 +52,8 @@
main.opt.main-class=\u30E1\u30A4\u30F3\u30FB\u30AF\u30E9\u30B9
main.opt.main-class.arg=class-name
main.opt.man-pages=man\u30DA\u30FC\u30B8\u306E\u5834\u6240
-main.opt.os-name=\u30AA\u30DA\u30EC\u30FC\u30C6\u30A3\u30F3\u30B0\u30FB\u30B7\u30B9\u30C6\u30E0\u540D
-main.opt.os-name.arg=os-name
-main.opt.os-arch=\u30AA\u30DA\u30EC\u30FC\u30C6\u30A3\u30F3\u30B0\u30FB\u30B7\u30B9\u30C6\u30E0\u306E\u30A2\u30FC\u30AD\u30C6\u30AF\u30C1\u30E3
-main.opt.os-arch.arg=os-arch
-main.opt.os-version=\u30AA\u30DA\u30EC\u30FC\u30C6\u30A3\u30F3\u30B0\u30FB\u30B7\u30B9\u30C6\u30E0\u30FB\u30D0\u30FC\u30B8\u30E7\u30F3
-main.opt.os-version.arg=os-version
+main.opt.target-platform=\u30BF\u30FC\u30B2\u30C3\u30C8\u30FB\u30D7\u30E9\u30C3\u30C8\u30D5\u30A9\u30FC\u30E0
+main.opt.target-platform.arg=target-platform
main.opt.module-path=\u30E2\u30B8\u30E5\u30FC\u30EB\u30FB\u30D1\u30B9
main.opt.hash-modules=\u6307\u5B9A\u306E<regex-pattern>\u306B\u4E00\u81F4\u3057\u3001\u76F4\u63A5\u307E\u305F\u306F\u9593\u63A5\u7684\u306B\u4F9D\u5B58\u3057\u3066\u3044\u308B\u30E2\u30B8\u30E5\u30FC\u30EB\u3067\u30D1\u30C3\u30B1\u30FC\u30B8\u30FB\u30E2\u30B8\u30E5\u30FC\u30EB\u3092\u7D50\u5408\u3059\u308B\u30CF\u30C3\u30B7\u30E5\u3092\u8A08\u7B97\u304A\u3088\u3073\u8A18\u9332\u3057\u307E\u3059\u3002\u30CF\u30C3\u30B7\u30E5\u306F\u3001\u4F5C\u6210\u3055\u308C\u3066\u3044\u308BJMOD\u30D5\u30A1\u30A4\u30EB\u3001jmod hash\u30B3\u30DE\u30F3\u30C9\u3067\u6307\u5B9A\u3057\u305F\u30E2\u30B8\u30E5\u30FC\u30EB\u30FB\u30D1\u30B9\u306EJMOD\u30D5\u30A1\u30A4\u30EB\u307E\u305F\u306F\u30E2\u30B8\u30E5\u30E9JAR\u306B\u8A18\u9332\u3055\u308C\u307E\u3059\u3002
main.opt.do-not-resolve-by-default=\u30E2\u30B8\u30E5\u30FC\u30EB\u306E\u30C7\u30D5\u30A9\u30EB\u30C8\u306E\u30EB\u30FC\u30C8\u8A2D\u5B9A\u304B\u3089\u9664\u5916\u3057\u307E\u3059
@@ -91,9 +87,9 @@
err.invalid.dryrun.option=--dry-run\u306F\u30CF\u30C3\u30B7\u30E5\u30FB\u30E2\u30FC\u30C9\u3068\u4E00\u7DD2\u306B\u306E\u307F\u4F7F\u7528\u3067\u304D\u307E\u3059
err.module.descriptor.not.found=\u30E2\u30B8\u30E5\u30FC\u30EB\u30FB\u30C7\u30A3\u30B9\u30AF\u30EA\u30D7\u30BF\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093
err.missing.export.or.open.packages={0}\u306B\u30A8\u30AF\u30B9\u30DD\u30FC\u30C8\u3055\u308C\u305F\u304B\u305D\u3053\u3067\u30AA\u30FC\u30D7\u30F3\u3055\u308C\u3066\u3044\u308B\u30D1\u30C3\u30B1\u30FC\u30B8\u304C\u5B58\u5728\u3057\u307E\u305B\u3093: {1}
+err.module.resolution.fail=\u89E3\u6C7A\u306B\u5931\u6557\u3057\u307E\u3057\u305F: {0}
warn.invalid.arg=\u7121\u52B9\u306A\u30AF\u30E9\u30B9\u540D\u307E\u305F\u306F\u30D1\u30B9\u540D\u304C\u5B58\u5728\u3057\u307E\u305B\u3093: {0}
warn.no.module.hashes=\u30CF\u30C3\u30B7\u30E5\u304C\u8A18\u9332\u3055\u308C\u3066\u3044\u307E\u305B\u3093: {0}\u306B\u4F9D\u5B58\u3059\u308B\u30CF\u30C3\u30B7\u30E5\u306B\u5BFE\u3057\u3066\u30E2\u30B8\u30E5\u30FC\u30EB\u304C\u6307\u5B9A\u3055\u308C\u3066\u3044\u307E\u305B\u3093
-warn.module.resolution.fail=\u30CF\u30C3\u30B7\u30E5\u304C\u8A18\u9332\u3055\u308C\u3066\u3044\u307E\u305B\u3093: {0}
warn.ignore.entry=\u30BB\u30AF\u30B7\u30E7\u30F3{1}\u306E\u30A8\u30F3\u30C8\u30EA{0}\u3092\u7121\u8996\u3057\u307E\u3059
warn.ignore.duplicate.entry=\u30BB\u30AF\u30B7\u30E7\u30F3{1}\u306E\u91CD\u8907\u30A8\u30F3\u30C8\u30EA{0}\u3092\u7121\u8996\u3057\u307E\u3059
--- a/jdk/src/jdk.jlink/share/classes/jdk/tools/jmod/resources/jmod_zh_CN.properties Sat Jun 03 02:44:55 2017 +0000
+++ b/jdk/src/jdk.jlink/share/classes/jdk/tools/jmod/resources/jmod_zh_CN.properties Sat Jun 03 03:48:03 2017 +0000
@@ -52,12 +52,8 @@
main.opt.main-class=\u4E3B\u7C7B
main.opt.main-class.arg=class-name
main.opt.man-pages=\u5E2E\u52A9\u9875\u7684\u4F4D\u7F6E
-main.opt.os-name=\u64CD\u4F5C\u7CFB\u7EDF\u540D\u79F0
-main.opt.os-name.arg=os-name
-main.opt.os-arch=\u64CD\u4F5C\u7CFB\u7EDF\u4F53\u7CFB\u7ED3\u6784
-main.opt.os-arch.arg=os-arch
-main.opt.os-version=\u64CD\u4F5C\u7CFB\u7EDF\u7248\u672C
-main.opt.os-version.arg=os-version
+main.opt.target-platform=\u76EE\u6807\u5E73\u53F0
+main.opt.target-platform.arg=target-platform
main.opt.module-path=\u6A21\u5757\u8DEF\u5F84
main.opt.hash-modules=\u8BA1\u7B97\u548C\u8BB0\u5F55\u6563\u5217, \u4EE5\u5C06\u6253\u5305\u6A21\u5757\u7ED1\u5B9A\u5230\u4E0E\u6307\u5B9A <\u6B63\u5219\u8868\u8FBE\u5F0F\u6A21\u5F0F> \u5339\u914D\u5E76\u76F4\u63A5\u6216\u95F4\u63A5\u4F9D\u8D56\u4E8E\u7684\u6A21\u5757\u3002\u6563\u5217\u8BB0\u5F55\u5728\u6240\u521B\u5EFA\u7684 JMOD \u6587\u4EF6\u4E2D, \u6216\u8005\u8BB0\u5F55\u5728 jmod hash \u547D\u4EE4\u6307\u5B9A\u7684\u6A21\u5757\u8DEF\u5F84\u7684 JMOD \u6587\u4EF6\u6216\u6A21\u5757\u5316 JAR \u4E2D\u3002
main.opt.do-not-resolve-by-default=\u4ECE\u9ED8\u8BA4\u6839\u6A21\u5757\u96C6\u4E2D\u6392\u9664
@@ -91,9 +87,9 @@
err.invalid.dryrun.option=--dry-run \u53EA\u80FD\u7528\u4E8E\u6563\u5217\u6A21\u5F0F
err.module.descriptor.not.found=\u627E\u4E0D\u5230\u6A21\u5757\u63CF\u8FF0\u7B26
err.missing.export.or.open.packages=\u5728 {0} \u4E2D\u5BFC\u51FA\u6216\u6253\u5F00\u7684\u7A0B\u5E8F\u5305\u4E0D\u5B58\u5728: {1}
+err.module.resolution.fail=\u89E3\u6790\u5931\u8D25: {0}
warn.invalid.arg=\u7C7B\u540D\u65E0\u6548\u6216\u8DEF\u5F84\u540D\u4E0D\u5B58\u5728: {0}
warn.no.module.hashes=\u672A\u8BB0\u5F55\u4EFB\u4F55\u6563\u5217: \u6CA1\u6709\u4E3A\u4F9D\u8D56\u4E8E {0} \u7684\u6563\u5217\u5904\u7406\u6307\u5B9A\u6A21\u5757
-warn.module.resolution.fail=\u672A\u8BB0\u5F55\u4EFB\u4F55\u6563\u5217: {0}
warn.ignore.entry=\u6B63\u5728\u5FFD\u7565\u8282 {1} \u4E2D\u7684\u6761\u76EE {0}
warn.ignore.duplicate.entry=\u6B63\u5728\u5FFD\u7565\u8282 {1} \u4E2D\u7684\u91CD\u590D\u6761\u76EE {0}
--- a/jdk/src/jdk.policytool/share/classes/sun/security/tools/policytool/Resources_sv.java Sat Jun 03 02:44:55 2017 +0000
+++ b/jdk/src/jdk.policytool/share/classes/sun/security/tools/policytool/Resources_sv.java Sat Jun 03 03:48:03 2017 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -35,7 +35,7 @@
private static final Object[][] contents = {
{"NEWLINE", "\n"},
{"Warning.A.public.key.for.alias.signers.i.does.not.exist.Make.sure.a.KeyStore.is.properly.configured.",
- "Varning! Det finns ingen offentlig nyckel f\u00F6r aliaset {0}. Kontrollera att det aktuella nyckellagret \u00E4r korrekt konfigurerat."},
+ "Varning! Det finns ingen \u00F6ppen nyckel f\u00F6r aliaset {0}. Kontrollera att det aktuella nyckellagret \u00E4r korrekt konfigurerat."},
{"Warning.Class.not.found.class", "Varning! Klassen hittades inte: {0}"},
{"Warning.Invalid.argument.s.for.constructor.arg",
"Varning! Ogiltiga argument f\u00F6r konstruktor: {0}"},
@@ -59,8 +59,8 @@
{"Warning.File.name.may.include.escaped.backslash.characters.It.is.not.necessary.to.escape.backslash.characters.the.tool.escapes",
"Varning! Filnamnet kan inneh\u00E5lla omv\u00E4nda snedstreck inom citattecken. Citattecken kr\u00E4vs inte f\u00F6r omv\u00E4nda snedstreck (verktyget hanterar detta n\u00E4r policyinneh\u00E5llet skrivs till det best\u00E4ndiga lagret).\n\nKlicka p\u00E5 Beh\u00E5ll f\u00F6r att beh\u00E5lla det angivna namnet, eller klicka p\u00E5 Redigera f\u00F6r att \u00E4ndra det."},
- {"Add.Public.Key.Alias", "L\u00E4gg till offentligt nyckelalias"},
- {"Remove.Public.Key.Alias", "Ta bort offentligt nyckelalias"},
+ {"Add.Public.Key.Alias", "L\u00E4gg till alias till \u00F6ppen nyckel"},
+ {"Remove.Public.Key.Alias", "Ta bort alias f\u00F6r \u00F6ppen nyckel"},
{"File", "&Arkiv"},
{"KeyStore", "&KeyStore"},
{"Policy.File.", "Policyfil:"},
@@ -68,7 +68,7 @@
"Kan inte \u00F6ppna policyfilen: {0}: {1}"},
{"Policy.Tool", "Policyverktyg"},
{"Errors.have.occurred.while.opening.the.policy.configuration.View.the.Warning.Log.for.more.information.",
- "Det uppstod ett fel n\u00E4r policykonfigurationen skulle \u00F6ppnas. Se varningsloggen f\u00F6r mer information."},
+ "Ett fel intr\u00E4ffade n\u00E4r policykonfigurationen skulle \u00F6ppnas. Se varningsloggen f\u00F6r mer information."},
{"Error", "Fel"},
{"OK", "OK"},
{"Status", "Status"},
@@ -80,7 +80,7 @@
{"Target.Name.",
"M\u00E5l: "},
{"Actions.",
- "Funktioner: "},
+ "\u00C5tg\u00E4rder: "},
{"OK.to.overwrite.existing.file.filename.",
"Ska den befintliga filen {0} skrivas \u00F6ver?"},
{"Cancel", "Avbryt"},
@@ -94,10 +94,10 @@
{".Edit.Permission", " Re&digera beh\u00F6righet"},
{"Remove.Permission", "Ta &bort beh\u00F6righet"},
{"Done", "Utf\u00F6rd"},
- {"KeyStore.URL.", "KeyStore-&URL:"},
- {"KeyStore.Type.", "KeyStore-&typ:"},
- {"KeyStore.Provider.", "KeyStore-&leverant\u00F6r:"},
- {"KeyStore.Password.URL.", "KeyStore-l\u00F6sen&ords-URL:"},
+ {"KeyStore.URL.", "Nyckellager-&URL:"},
+ {"KeyStore.Type.", "Nyckellager&typ:"},
+ {"KeyStore.Provider.", "Nyckellager&leverant\u00F6r:"},
+ {"KeyStore.Password.URL.", "L\u00F6sen&ords-URL till nyckellager:"},
{"Principals", "Identitetshavare"},
{".Edit.Principal.", " Redigera identitetshavare:"},
{".Add.New.Principal.", " L\u00E4gg till ny identitetshavare:"},
@@ -136,7 +136,7 @@
{"provider.name", "leverant\u00F6rsnamn"},
{"url", "url"},
{"method.list", "metodlista"},
- {"request.headers.list", "beg\u00E4ranrubriklista"},
+ {"request.headers.list", "lista \u00F6ver beg\u00E4randehuvuden"},
{"Principal.List", "Lista \u00F6ver identitetshavare"},
{"Permission.List", "Beh\u00F6righetslista"},
{"Code.Base", "Kodbas"},
--- a/jdk/test/ProblemList.txt Sat Jun 03 02:44:55 2017 +0000
+++ b/jdk/test/ProblemList.txt Sat Jun 03 03:48:03 2017 +0000
@@ -219,9 +219,13 @@
############################################################################
# jdk_sound
-javax/sound/sampled/DirectAudio/bug6372428.java 8055097 generic-all
-javax/sound/sampled/Clip/bug5070081.java 8055097 generic-all
-javax/sound/sampled/DataLine/LongFramePosition.java 8055097 generic-all
+javax/sound/sampled/AudioInputStream/FrameLengthAfterConversion.java 8178401 windows-all
+
+javax/sound/sampled/Clip/ClipCloseLoss.java 8178403 generic-all
+
+javax/sound/sampled/DirectAudio/bug6372428.java 8055097 generic-all
+javax/sound/sampled/Clip/bug5070081.java 8055097 generic-all
+javax/sound/sampled/DataLine/LongFramePosition.java 8055097 generic-all
javax/sound/sampled/Clip/Drain/ClipDrain.java 7062792 generic-all
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/image/RescaleOp/ImageRescaleOpTest.java Sat Jun 03 03:48:03 2017 +0000
@@ -0,0 +1,131 @@
+/*
+ * Copyright (c) 2017, 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 8177393
+ * @summary Verify RescaleOp applied to BufferedImages.
+ * @run main ImageRescaleOpTest
+ */
+
+import java.awt.Graphics2D;
+import java.awt.image.BufferedImage;
+import static java.awt.image.BufferedImage.*;
+import java.awt.image.RescaleOp;
+import java.awt.Color;
+import java.io.File;
+import java.io.IOException;
+import javax.imageio.ImageIO;
+
+public class ImageRescaleOpTest {
+
+ int w = 10, h = 10;
+ float scaleFactor = 0.5f;
+ float offset = 0.0f;
+ static boolean saveImage = false;
+
+ public static void main(String[] args) throws Exception {
+ saveImage = args.length > 0;
+ ImageRescaleOpTest test = new ImageRescaleOpTest();
+ test.startTest();
+ }
+
+ String getFileName(int s, int d) {
+ return textFor(s)+"_to_"+textFor(d)+".png";
+ }
+
+ String getMsgText(int s, int d) {
+ return textFor(s)+"->"+textFor(d)+": ";
+ }
+
+ String textFor(int t) {
+ switch (t) {
+ case TYPE_INT_ARGB : return "ARGB";
+ case TYPE_INT_RGB : return "RGB";
+ case TYPE_4BYTE_ABGR : return "4BYTEABGR";
+ case TYPE_3BYTE_BGR : return "3BYTEBGR";
+ case TYPE_USHORT_555_RGB : return "USHORT_555_RGB";
+ case TYPE_USHORT_565_RGB : return "USHORT_565_RGB";
+ case TYPE_USHORT_GRAY : return "USHORT_GRAY";
+ default : return "OTHER";
+ }
+ }
+
+ private void startTest() throws Exception {
+
+ int expect = 0xff7f7f7f;
+ runTest(TYPE_INT_RGB, TYPE_INT_RGB, expect);
+ runTest(TYPE_INT_ARGB, TYPE_INT_ARGB, expect);
+ runTest(TYPE_INT_ARGB, TYPE_INT_RGB, expect);
+ runTest(TYPE_INT_RGB, TYPE_INT_ARGB, expect);
+
+ runTest(TYPE_3BYTE_BGR, TYPE_3BYTE_BGR, expect);
+ runTest(TYPE_3BYTE_BGR, TYPE_4BYTE_ABGR, expect);
+ runTest(TYPE_4BYTE_ABGR, TYPE_3BYTE_BGR, expect);
+ runTest(TYPE_4BYTE_ABGR, TYPE_4BYTE_ABGR, expect);
+
+ /* Slightly different values here due to limited precision */
+ runTest(TYPE_USHORT_555_RGB, TYPE_USHORT_555_RGB, 0xff7b7b7b);
+ runTest(TYPE_USHORT_565_RGB, TYPE_USHORT_565_RGB, 0xff7b7d7b);
+
+ /* 565->555 and 555->565 results are wrong as the slow code
+ * path used is not accounting for the difference in the range.
+ */
+ //runTest(TYPE_USHORT_555_RGB, TYPE_USHORT_565_RGB, expect);
+ //runTest(TYPE_USHORT_565_RGB, TYPE_USHORT_555_RGB, expect);
+
+ runTest(TYPE_USHORT_GRAY, TYPE_USHORT_GRAY, 0xffbcbcbc);
+
+ }
+
+ private void check(BufferedImage bi, int expect, String msg) {
+ int argb = bi.getRGB(w-1, h-1);
+ System.out.println(msg + Integer.toHexString(argb));
+ if (argb != expect) {
+ throw new RuntimeException(msg +
+ " expected " + Integer.toHexString(expect) +
+ " but got " + Integer.toHexString(argb));
+ }
+ }
+
+ private void runTest(int sType, int dType, int expect) {
+
+ BufferedImage src = new BufferedImage(w, h, sType);
+ BufferedImage dst = new BufferedImage(w, h, dType);
+ String msg = getMsgText(sType, dType);
+
+ Graphics2D g2d = src.createGraphics();
+ g2d.setColor(Color.WHITE);
+ g2d.fillRect(0, 0, w, h);
+ RescaleOp res = new RescaleOp(scaleFactor, offset, null);
+ res.filter(src, dst);
+ if (saveImage) {
+ try {
+ String fname = getFileName(sType, dType);
+ ImageIO.write(dst, "png", new File(fname));
+ } catch (IOException e) {
+ }
+ }
+ check(dst, expect, msg);
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/io/File/TimeZoneLastModified.java Sat Jun 03 03:48:03 2017 +0000
@@ -0,0 +1,82 @@
+/*
+ * Copyright (c) 2017, 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 6212869
+ * @summary Determine if lastModified() works after TimeZone.setDefault()
+ * @run main/othervm TimeZoneLastModified
+ */
+
+import java.io.File;
+import java.util.Date;
+import java.util.TimeZone;
+import java.text.SimpleDateFormat;
+
+public class TimeZoneLastModified {
+ // Tue, 04 Jun 2002 13:56:50.002 GMT
+ private static final long TIME = 1023199010002L;
+
+ public static void main(String[] args) throws Throwable {
+ int failures = test(null);
+ for (String timeZoneID : TimeZone.getAvailableIDs()) {
+ failures += test(timeZoneID);
+ }
+ if (failures != 0) {
+ throw new RuntimeException("TimeZoneLastModified failed");
+ }
+ System.out.println("TimeZoneLastModified passed");
+ }
+
+ private static int test(String timeZoneID) throws Throwable {
+ File f = new File("test-timezone.txt");
+ int failures = 0;
+ try {
+ f.createNewFile();
+
+ if (timeZoneID != null) {
+ TimeZone.setDefault(TimeZone.getTimeZone(timeZoneID));
+ }
+
+ boolean succeeded = f.setLastModified(TIME);
+ if (!succeeded) {
+ System.err.format
+ ("Setting time to %d failed for time zone %s%n",
+ TIME, timeZoneID);
+ failures++;
+ }
+
+ long time = f.lastModified();
+ if (Math.abs(time - TIME) > 999) { // account for second precision
+ System.err.format
+ ("Wrong modification time (ms): expected %d, obtained %d%n",
+ TIME, time);
+ failures++;
+ }
+ } finally {
+ f.delete();
+ }
+
+ return failures;
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/lang/annotation/TestConstructorParameterAnnotations.java Sat Jun 03 03:48:03 2017 +0000
@@ -0,0 +1,252 @@
+/*
+ * Copyright (c) 2017, 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 8074977
+ * @summary Test consistency of annotations on constructor parameters
+ * @compile TestConstructorParameterAnnotations.java
+ * @run main TestConstructorParameterAnnotations
+ * @compile -parameters TestConstructorParameterAnnotations.java
+ * @run main TestConstructorParameterAnnotations
+ */
+
+import java.lang.annotation.*;
+import java.lang.reflect.*;
+import java.util.*;
+
+/*
+ * Some constructor parameters are <em>mandated</em>; that is, they
+ * are not explicitly present in the source code, but required to be
+ * present by the Java Language Specification. In other cases, some
+ * constructor parameters are not present in the source, but are
+ * synthesized by the compiler as an implementation artifact. There is
+ * not a reliable mechanism to consistently determine whether or not
+ * a parameter is implicit or not.
+ *
+ * (Using the "-parameters" option to javac does emit the information
+ * needed to make a reliably determination, but the information is not
+ * present by default.)
+ *
+ * The lack of such a mechanism causes complications reading parameter
+ * annotations in some cases since annotations for parameters are
+ * written out for the parameters in the source code, but when reading
+ * annotations at runtime all the parameters, including implicit ones,
+ * are present.
+ */
+public class TestConstructorParameterAnnotations {
+ public static void main(String... args) {
+ int errors = 0;
+ Class<?>[] classes = {NestedClass0.class,
+ NestedClass1.class,
+ NestedClass2.class,
+ NestedClass3.class,
+ NestedClass4.class,
+ StaticNestedClass0.class,
+ StaticNestedClass1.class,
+ StaticNestedClass2.class,
+ StaticNestedClass3.class,
+ StaticNestedClass4.class};
+
+ for (Class<?> clazz : classes) {
+ for (Constructor<?> ctor : clazz.getConstructors()) {
+ System.out.println(ctor);
+ errors += checkGetParameterAnnotations(clazz, ctor);
+ errors += checkGetParametersGetAnnotation(clazz, ctor);
+ }
+ }
+
+ if (errors > 0)
+ throw new RuntimeException(errors + " errors.");
+ return;
+ }
+
+ private static int checkGetParameterAnnotations(Class<?> clazz,
+ Constructor<?> ctor) {
+ String annotationString =
+ Arrays.deepToString(ctor.getParameterAnnotations());
+ String expectedString =
+ clazz.getAnnotation(ExpectedGetParameterAnnotations.class).value();
+
+ if (!Objects.equals(annotationString, expectedString)) {
+ System.err.println("Annotation mismatch on " + ctor +
+ "\n\tExpected:" + expectedString +
+ "\n\tActual: " + annotationString);
+ return 1;
+ }
+ return 0;
+ }
+
+ private static int checkGetParametersGetAnnotation(Class<?> clazz,
+ Constructor<?> ctor) {
+ int errors = 0;
+ int i = 0;
+ ExpectedParameterAnnotations epa =
+ clazz.getAnnotation(ExpectedParameterAnnotations.class);
+
+ for (Parameter param : ctor.getParameters() ) {
+ String annotationString =
+ Objects.toString(param.getAnnotation(MarkerAnnotation.class));
+ String expectedString = epa.value()[i];
+
+ if (!Objects.equals(annotationString, expectedString)) {
+ System.err.println("Annotation mismatch on " + ctor +
+ " on param " + param +
+ "\n\tExpected:" + expectedString +
+ "\n\tActual: " + annotationString);
+ errors++;
+ }
+ i++;
+ }
+ return errors;
+ }
+
+ @ExpectedGetParameterAnnotations("[[]]")
+ @ExpectedParameterAnnotations({"null"})
+ public class NestedClass0 {
+ public NestedClass0() {}
+ }
+
+ @ExpectedGetParameterAnnotations(
+ "[[], " +
+ "[@TestConstructorParameterAnnotations$MarkerAnnotation(value=1)]]")
+ @ExpectedParameterAnnotations({
+ "null",
+ "@TestConstructorParameterAnnotations$MarkerAnnotation(value=1)"})
+ public class NestedClass1 {
+ public NestedClass1(@MarkerAnnotation(1) int parameter) {}
+ }
+
+ @ExpectedGetParameterAnnotations(
+ "[[], " +
+ "[@TestConstructorParameterAnnotations$MarkerAnnotation(value=2)], " +
+ "[]]")
+ @ExpectedParameterAnnotations({
+ "null",
+ "@TestConstructorParameterAnnotations$MarkerAnnotation(value=2)",
+ "null"})
+ public class NestedClass2 {
+ public NestedClass2(@MarkerAnnotation(2) int parameter1,
+ int parameter2) {}
+ }
+
+ @ExpectedGetParameterAnnotations(
+ "[[], " +
+ "[@TestConstructorParameterAnnotations$MarkerAnnotation(value=3)], " +
+ "[]]")
+ @ExpectedParameterAnnotations({
+ "null",
+ "@TestConstructorParameterAnnotations$MarkerAnnotation(value=3)",
+ "null"})
+ public class NestedClass3 {
+ public <P> NestedClass3(@MarkerAnnotation(3) P parameter1,
+ int parameter2) {}
+ }
+
+ @ExpectedGetParameterAnnotations(
+ "[[], " +
+ "[@TestConstructorParameterAnnotations$MarkerAnnotation(value=4)], " +
+ "[]]")
+ @ExpectedParameterAnnotations({
+ "null",
+ "@TestConstructorParameterAnnotations$MarkerAnnotation(value=4)",
+ "null"})
+ public class NestedClass4 {
+ public <P, Q> NestedClass4(@MarkerAnnotation(4) P parameter1,
+ Q parameter2) {}
+ }
+
+ @ExpectedGetParameterAnnotations("[]")
+ @ExpectedParameterAnnotations({"null"})
+ public static class StaticNestedClass0 {
+ public StaticNestedClass0() {}
+ }
+
+ @ExpectedGetParameterAnnotations(
+ "[[@TestConstructorParameterAnnotations$MarkerAnnotation(value=1)]]")
+ @ExpectedParameterAnnotations({
+ "@TestConstructorParameterAnnotations$MarkerAnnotation(value=1)"})
+ public static class StaticNestedClass1 {
+ public StaticNestedClass1(@MarkerAnnotation(1) int parameter) {}
+ }
+
+ @ExpectedGetParameterAnnotations(
+ "[[@TestConstructorParameterAnnotations$MarkerAnnotation(value=2)], " +
+ "[]]")
+ @ExpectedParameterAnnotations({
+ "@TestConstructorParameterAnnotations$MarkerAnnotation(value=2)",
+ "null"})
+ public static class StaticNestedClass2 {
+ public StaticNestedClass2(@MarkerAnnotation(2) int parameter1,
+ int parameter2) {}
+ }
+
+ @ExpectedGetParameterAnnotations(
+ "[[@TestConstructorParameterAnnotations$MarkerAnnotation(value=3)], " +
+ "[]]")
+ @ExpectedParameterAnnotations({
+ "@TestConstructorParameterAnnotations$MarkerAnnotation(value=3)",
+ "null"})
+ public static class StaticNestedClass3 {
+ public <P> StaticNestedClass3(@MarkerAnnotation(3) P parameter1,
+ int parameter2) {}
+ }
+
+ @ExpectedGetParameterAnnotations(
+ "[[@TestConstructorParameterAnnotations$MarkerAnnotation(value=4)], " +
+ "[]]")
+ @ExpectedParameterAnnotations({
+ "@TestConstructorParameterAnnotations$MarkerAnnotation(value=4)",
+ "null"})
+ public static class StaticNestedClass4 {
+ public <P, Q> StaticNestedClass4(@MarkerAnnotation(4) P parameter1,
+ Q parameter2) {}
+ }
+
+ @Target(ElementType.PARAMETER)
+ @Retention(RetentionPolicy.RUNTIME)
+ @interface MarkerAnnotation {
+ int value();
+ }
+
+ /**
+ * String form of expected value of calling
+ * getParameterAnnotations on a constructor.
+ */
+ @Target(ElementType.TYPE)
+ @Retention(RetentionPolicy.RUNTIME)
+ @interface ExpectedGetParameterAnnotations {
+ String value();
+ }
+
+ /**
+ * String form of expected value of calling
+ * getAnnotation(MarkerAnnotation.class) on each element of the
+ * result of getParameters() on a constructor.
+ */
+ @Target(ElementType.TYPE)
+ @Retention(RetentionPolicy.RUNTIME)
+ @interface ExpectedParameterAnnotations {
+ String[] value();
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/lang/annotation/typeAnnotations/TestConstructorParameterTypeAnnotations.java Sat Jun 03 03:48:03 2017 +0000
@@ -0,0 +1,232 @@
+/*
+ * Copyright (c) 2017, 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 8074977
+ * @summary Test consistency of annotations on constructor parameters
+ * @compile TestConstructorParameterTypeAnnotations.java
+ * @run main TestConstructorParameterTypeAnnotations
+ * @compile -parameters TestConstructorParameterTypeAnnotations.java
+ * @run main TestConstructorParameterTypeAnnotations
+ */
+
+import java.lang.annotation.*;
+import java.lang.reflect.*;
+import java.util.*;
+
+/*
+ * Some constructor parameters are <em>mandated</em>; that is, they
+ * are not explicitly present in the source code, but required to be
+ * present by the Java Language Specification. In other cases, some
+ * constructor parameters are not present in the source, but are
+ * synthesized by the compiler as an implementation artifact. There is
+ * not a reliable mechanism to consistently determine whether or not
+ * a parameter is implicit or not.
+ *
+ * (Using the "-parameters" option to javac does emit the information
+ * needed to make a reliably determination, but the information is not
+ * present by default.)
+ *
+ * The lack of such a mechanism causes complications reading parameter
+ * annotations in some cases since annotations for parameters are
+ * written out for the parameters in the source code, but when reading
+ * annotations at runtime all the parameters, including implicit ones,
+ * are present.
+ */
+public class TestConstructorParameterTypeAnnotations {
+ public static void main(String... args) {
+ int errors = 0;
+ Class<?>[] classes = {NestedClass0.class,
+ NestedClass1.class,
+ NestedClass2.class,
+ NestedClass3.class,
+ NestedClass4.class,
+ StaticNestedClass0.class,
+ StaticNestedClass1.class,
+ StaticNestedClass2.class };
+
+ for (Class<?> clazz : classes) {
+ for (Constructor<?> ctor : clazz.getConstructors()) {
+ System.out.println(ctor);
+ errors += checkGetParameterAnnotations(clazz, ctor);
+ errors += checkGetAnnotatedParametersGetAnnotation(clazz, ctor);
+ }
+ }
+
+ if (errors > 0)
+ throw new RuntimeException(errors + " errors.");
+ return;
+ }
+
+ private static int checkGetParameterAnnotations(Class<?> clazz,
+ Constructor<?> ctor) {
+ String annotationString =
+ Arrays.deepToString(ctor.getParameterAnnotations());
+ String expectedString =
+ clazz.getAnnotation(ExpectedGetParameterAnnotations.class).value();
+
+ if (!Objects.equals(annotationString, expectedString)) {
+ System.err.println("Annotation mismatch on " + ctor +
+ "\n\tExpected:" + expectedString +
+ "\n\tActual: " + annotationString);
+ return 1;
+ }
+ return 0;
+ }
+
+ private static int checkGetAnnotatedParametersGetAnnotation(Class<?> clazz,
+ Constructor<?> ctor) {
+ int errors = 0;
+ int i = 0;
+ ExpectedParameterTypeAnnotations epa =
+ clazz.getAnnotation(ExpectedParameterTypeAnnotations.class);
+
+ for (AnnotatedType param : ctor.getAnnotatedParameterTypes() ) {
+ String annotationString =
+ Objects.toString(param.getAnnotation(MarkerTypeAnnotation.class));
+ String expectedString = epa.value()[i];
+
+ if (!Objects.equals(annotationString, expectedString)) {
+ System.err.println("Annotation mismatch on " + ctor +
+ " on param " + param +
+ "\n\tExpected:" + expectedString +
+ "\n\tActual: " + annotationString);
+ errors++;
+ }
+ i++;
+ }
+ return errors;
+ }
+
+ @ExpectedGetParameterAnnotations("[[]]")
+ @ExpectedParameterTypeAnnotations({"null"})
+ public class NestedClass0 {
+ public NestedClass0() {}
+ }
+
+ @ExpectedGetParameterAnnotations("[[], []]")
+ @ExpectedParameterTypeAnnotations({
+ "null",
+ "@TestConstructorParameterTypeAnnotations$MarkerTypeAnnotation(value=1)"})
+ public class NestedClass1 {
+ public NestedClass1(@MarkerTypeAnnotation(1) int parameter) {}
+ }
+
+ @ExpectedGetParameterAnnotations("[[], [], []]")
+ @ExpectedParameterTypeAnnotations({
+ "null",
+ "@TestConstructorParameterTypeAnnotations$MarkerTypeAnnotation(value=2)",
+ "null"})
+ public class NestedClass2 {
+ public NestedClass2(@MarkerTypeAnnotation(2) int parameter1,
+ int parameter2) {}
+ }
+
+ @ExpectedGetParameterAnnotations("[[], [], []]")
+ @ExpectedParameterTypeAnnotations({
+ "null",
+ "@TestConstructorParameterTypeAnnotations$MarkerTypeAnnotation(value=3)",
+ "null"})
+ public class NestedClass3 {
+ public <P> NestedClass3(@MarkerTypeAnnotation(3) P parameter1,
+ int parameter2) {}
+ }
+
+ @ExpectedGetParameterAnnotations("[[], [], []]")
+ @ExpectedParameterTypeAnnotations({
+ "null",
+ "@TestConstructorParameterTypeAnnotations$MarkerTypeAnnotation(value=4)",
+ "null"})
+ public class NestedClass4 {
+ public <P, Q> NestedClass4(@MarkerTypeAnnotation(4) P parameter1,
+ Q parameter2) {}
+ }
+
+ @ExpectedGetParameterAnnotations("[]")
+ @ExpectedParameterTypeAnnotations({"null"})
+ public static class StaticNestedClass0 {
+ public StaticNestedClass0() {}
+ }
+
+ @ExpectedGetParameterAnnotations("[[]]")
+ @ExpectedParameterTypeAnnotations({
+ "@TestConstructorParameterTypeAnnotations$MarkerTypeAnnotation(value=1)"})
+ public static class StaticNestedClass1 {
+ public StaticNestedClass1(@MarkerTypeAnnotation(1) int parameter) {}
+ }
+
+ @ExpectedGetParameterAnnotations("[[], []]")
+ @ExpectedParameterTypeAnnotations({
+ "@TestConstructorParameterTypeAnnotations$MarkerTypeAnnotation(value=2)",
+ "null"})
+ public static class StaticNestedClass2 {
+ public StaticNestedClass2(@MarkerTypeAnnotation(2) int parameter1,
+ int parameter2) {}
+ }
+
+ @ExpectedGetParameterAnnotations("[[], []]")
+ @ExpectedParameterTypeAnnotations({
+ "@TestConstructorParameterTypeAnnotations$MarkerTypeAnnotation(value=3)",
+ "null"})
+ public static class StaticNestedClass3 {
+ public <P> StaticNestedClass3(@MarkerTypeAnnotation(3) P parameter1,
+ int parameter2) {}
+ }
+
+ @ExpectedGetParameterAnnotations("[[], []]")
+ @ExpectedParameterTypeAnnotations({
+ "@TestConstructorParameterTypeAnnotations$MarkerTypeAnnotation(value=4)",
+ "null"})
+ public static class StaticNestedClass4 {
+ public <P, Q> StaticNestedClass4(@MarkerTypeAnnotation(4) P parameter1,
+ Q parameter2) {}
+ }
+
+ @Target(ElementType.TYPE_USE)
+ @Retention(RetentionPolicy.RUNTIME)
+ @interface MarkerTypeAnnotation {
+ int value();
+ }
+
+ /**
+ * String form of expected value of calling
+ * getParameterAnnotations on a constructor.
+ */
+ @Target(ElementType.TYPE)
+ @Retention(RetentionPolicy.RUNTIME)
+ @interface ExpectedGetParameterAnnotations {
+ String value();
+ }
+
+ /**
+ * String form of expected value of calling
+ * getAnnotation(MarkerTypeAnnotation.class) on each element of the
+ * result of getParameters() on a constructor.
+ */
+ @Target(ElementType.TYPE)
+ @Retention(RetentionPolicy.RUNTIME)
+ @interface ExpectedParameterTypeAnnotations {
+ String[] value();
+ }
+}
--- a/jdk/test/java/net/httpclient/whitebox/jdk.incubator.httpclient/jdk/incubator/http/RawChannelTest.java Sat Jun 03 02:44:55 2017 +0000
+++ b/jdk/test/java/net/httpclient/whitebox/jdk.incubator.httpclient/jdk/incubator/http/RawChannelTest.java Sat Jun 03 03:48:03 2017 +0000
@@ -62,12 +62,14 @@
* once (socket's send buffer filled up).
*/
private final CountDownLatch writeStall = new CountDownLatch(1);
+ private final CountDownLatch initialWriteStall = new CountDownLatch(1);
/*
* This one works similarly by providing means to ensure a read from the
* channel will stall at least once (no more data available on the socket).
*/
private final CountDownLatch readStall = new CountDownLatch(1);
+ private final CountDownLatch initialReadStall = new CountDownLatch(1);
private final AtomicInteger writeHandles = new AtomicInteger();
private final AtomicInteger readHandles = new AtomicInteger();
@@ -79,7 +81,9 @@
try (ServerSocket server = new ServerSocket(0)) {
int port = server.getLocalPort();
new TestServer(server).start();
+
final RawChannel chan = channelOf(port);
+ initialWriteStall.await();
// It's very important not to forget the initial bytes, possibly
// left from the HTTP thingy
@@ -87,6 +91,12 @@
print("RawChannel has %s initial bytes", initialBytes);
clientRead.addAndGet(initialBytes);
+ // tell the server we have read the initial bytes, so
+ // that it makes sure there is something for us to
+ // read next in case the initialBytes have already drained the
+ // channel dry.
+ initialReadStall.countDown();
+
chan.registerEvent(new RawChannel.RawEvent() {
private final ByteBuffer reusableBuffer = ByteBuffer.allocate(32768);
@@ -162,7 +172,7 @@
total += r;
clientRead.addAndGet(r);
}
- print("OP_READ read %s bytes", total);
+ print("OP_READ read %s bytes (%s total)", total, clientRead.get());
}
});
exit.await(); // All done, we need to compare results:
@@ -234,6 +244,14 @@
throws IOException
{
os.write("HTTP/1.1 200 OK\r\nContent-length: 0\r\n\r\n".getBytes());
+
+ // write some initial bytes
+ byte[] initial = byteArrayOfSize(1024);
+ os.write(initial);
+ os.flush();
+ serverWritten.addAndGet(initial.length);
+ initialWriteStall.countDown();
+
byte[] buf = new byte[1024];
String s = "";
while (true) {
@@ -252,12 +270,25 @@
byte[] first = byteArrayOfSize(1024);
long total = first.length;
os.write(first);
+ os.flush();
+
+ // wait until initial bytes were read
+ initialReadStall.await();
+
+ // make sure there is something to read, otherwise readStall
+ // will never be counted down.
+ first = byteArrayOfSize(1024);
+ os.write(first);
+ os.flush();
+ total += first.length;
+
// Let's wait for the signal from the raw channel that its read has
// stalled, and then continue sending a bit more stuff
readStall.await();
for (int i = 0; i < 32; i++) {
byte[] b = byteArrayOfSize(1024);
os.write(b);
+ os.flush();
total += b.length;
TimeUnit.MILLISECONDS.sleep(1);
}
@@ -265,7 +296,7 @@
}
private long readSlowly(InputStream is) throws Exception {
- // Wait for the raw channel to fill up the its send buffer
+ // Wait for the raw channel to fill up its send buffer
writeStall.await();
long overall = 0;
byte[] array = new byte[1024];
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/AllowSearch.java Sat Jun 03 03:48:03 2017 +0000
@@ -0,0 +1,77 @@
+/*
+ * Copyright (c) 2001, 2017, 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 4420318
+ * @summary Checks that an IllegalStateException is thrown by getNumImages(true)
+ * when seekForwardOnly is true
+ * @modules java.desktop/com.sun.imageio.plugins.gif
+ * java.desktop/com.sun.imageio.plugins.jpeg
+ * java.desktop/com.sun.imageio.plugins.png
+ */
+
+import java.io.File;
+import java.io.IOException;
+
+import javax.imageio.ImageIO;
+import javax.imageio.ImageReader;
+import javax.imageio.stream.ImageInputStream;
+
+import com.sun.imageio.plugins.gif.GIFImageReader;
+import com.sun.imageio.plugins.jpeg.JPEGImageReader;
+import com.sun.imageio.plugins.png.PNGImageReader;
+
+public class AllowSearch {
+
+ private static void test(ImageReader reader, String format)
+ throws IOException {
+ File f = File.createTempFile("imageio", ".tmp");
+ ImageInputStream stream = ImageIO.createImageInputStream(f);
+ reader.setInput(stream, true);
+
+ boolean gotISE = false;
+ try {
+ int numImages = reader.getNumImages(true);
+ } catch (IOException ioe) {
+ gotISE = false;
+ } catch (IllegalStateException ise) {
+ gotISE = true;
+ }
+
+ if (!gotISE) {
+ throw new RuntimeException("Failed to get desired exception for " +
+ format + " reader!");
+ }
+ }
+
+ public static void main(String[] args) throws IOException {
+ ImageReader gifReader = new GIFImageReader(null);
+ ImageReader jpegReader = new JPEGImageReader(null);
+ ImageReader pngReader = new PNGImageReader(null);
+
+ test(gifReader, "GIF");
+ test(jpegReader, "JPEG");
+ test(pngReader, "PNG");
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/AppContextTest.java Sat Jun 03 03:48:03 2017 +0000
@@ -0,0 +1,141 @@
+/*
+ * Copyright (c) 2001, 2017, 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 4421190
+ * @summary Tests that Image I/O statics may be referenced properly from
+ * multiple AppContexts, as would be the case for multiple Applets in a
+ * single VM. Each AppContext should get its own copy of the registry
+ * and the caching parameters in the ImageIO class.
+ * @modules java.desktop/sun.awt
+ */
+
+import java.io.File;
+import java.io.IOException;
+
+import javax.imageio.ImageIO;
+import javax.imageio.spi.IIORegistry;
+
+import sun.awt.SunToolkit;
+
+class TestThread extends Thread {
+
+ IIORegistry registry;
+ boolean useCache;
+ File cacheDirectory;
+ boolean cacheSettingsOK = false;
+ String threadName;
+
+ boolean gotCrosstalk = false;
+
+ public TestThread(ThreadGroup tg,
+ boolean useCache, File cacheDirectory,
+ String threadName) {
+ super(tg, threadName);
+ this.useCache = useCache;
+ this.cacheDirectory = cacheDirectory;
+ this.threadName = threadName;
+ }
+
+ public void run() {
+// System.out.println("Thread " + threadName + " in thread group " +
+// getThreadGroup().getName());
+
+ // Create a new AppContext as though we were an applet
+ SunToolkit.createNewAppContext();
+
+ // Get default registry and store reference
+ this.registry = IIORegistry.getDefaultInstance();
+
+ for (int i = 0; i < 10; i++) {
+// System.out.println(threadName +
+// ": setting cache parameters to " +
+// useCache + ", " + cacheDirectory);
+ ImageIO.setUseCache(useCache);
+ ImageIO.setCacheDirectory(cacheDirectory);
+
+ try {
+ sleep(1000L);
+ } catch (InterruptedException e) {
+ }
+
+// System.out.println(threadName + ": reading cache parameters");
+ boolean newUseCache = ImageIO.getUseCache();
+ File newCacheDirectory = ImageIO.getCacheDirectory();
+ if (newUseCache != useCache ||
+ newCacheDirectory != cacheDirectory) {
+// System.out.println(threadName + ": got " +
+// newUseCache + ", " +
+// newCacheDirectory);
+// System.out.println(threadName + ": crosstalk encountered!");
+ gotCrosstalk = true;
+ }
+ }
+ }
+
+ public IIORegistry getRegistry() {
+ return registry;
+ }
+
+ public boolean gotCrosstalk() {
+ return gotCrosstalk;
+ }
+}
+
+public class AppContextTest {
+
+ public AppContextTest() {
+ ThreadGroup tg0 = new ThreadGroup("ThreadGroup0");
+ ThreadGroup tg1 = new ThreadGroup("ThreadGroup1");
+
+ TestThread t0 =
+ new TestThread(tg0, false, null, "TestThread 0");
+ TestThread t1 =
+ new TestThread(tg1, true, new File("."), "TestThread 1");
+
+ t0.start();
+ t1.start();
+
+ try {
+ t0.join();
+ } catch (InterruptedException ie0) {
+ }
+ try {
+ t1.join();
+ } catch (InterruptedException ie1) {
+ }
+
+ if (t0.gotCrosstalk() || t1.gotCrosstalk()) {
+ throw new RuntimeException("ImageIO methods had crosstalk!");
+ }
+
+ if (t0.getRegistry() == t1.getRegistry()) {
+ throw new RuntimeException("ThreadGroups had same IIORegistry!");
+ }
+ }
+
+ public static void main(String[] args) throws IOException {
+ new AppContextTest();
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/AppletResourceTest.html Sat Jun 03 03:48:03 2017 +0000
@@ -0,0 +1,40 @@
+<!--
+ ~ Copyright (c) 2003, 2017, 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.
+ -->
+
+<html>
+<!--
+ test
+ @bug 4481957
+ @run main AppletResourceTest
+ @run applet RestrictedBundleTest.html
+ @summary Tests that applet-supplied ImageReader, ImageWriter, and
+ IIOMetadataFormat implementations do not throw unexpected exceptions
+ when indirectly attempting to access ResourceBundles.
+ -->
+<head>
+<title> AppletResourceTest </title>
+</head>
+<body>
+<applet code=AppletResourceTest.class width=400 height=400></applet>
+</body>
+</html>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/AppletResourceTest.java Sat Jun 03 03:48:03 2017 +0000
@@ -0,0 +1,439 @@
+/*
+ * Copyright (c) 2003, 2017, 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 4481957
+ * @key headful
+ * @summary Tests that applet-supplied ImageReader, ImageWriter, and
+ * IIOMetadataFormat implementations do not throw unexpected exceptions
+ * when indirectly attempting to access ResourceBundles
+ * @run main AppletResourceTest
+ * @run applet AppletResourceTest.html
+ */
+
+import java.applet.Applet;
+import java.awt.Rectangle;
+import java.awt.image.BufferedImage;
+import java.io.IOException;
+import java.util.Iterator;
+import java.util.ListResourceBundle;
+import java.util.Locale;
+import java.util.MissingResourceException;
+import java.util.Vector;
+
+import javax.imageio.IIOException;
+import javax.imageio.ImageReadParam;
+import javax.imageio.ImageReader;
+import javax.imageio.ImageTypeSpecifier;
+import javax.imageio.event.IIOReadWarningListener;
+import javax.imageio.metadata.IIOInvalidTreeException;
+import javax.imageio.metadata.IIOMetadata;
+import javax.imageio.spi.ImageReaderSpi;
+
+import org.w3c.dom.Node;
+
+public class AppletResourceTest extends Applet {
+
+ public static void main(String[] argv) {
+ new AppletResourceTest().init();
+ }
+
+ public void init() {
+ DummyImageReaderImpl reader;
+ MyReadWarningListener listener = new MyReadWarningListener();
+ Locale[] locales = {new Locale("ru"),
+ new Locale("fr"),
+ new Locale("uk")};
+
+ reader = new DummyImageReaderImpl(new DummyImageReaderSpiImpl());
+ reader.setAvailableLocales(locales);
+ reader.setLocale(new Locale("fr"));
+ reader.addIIOReadWarningListener(listener);
+
+ String baseName = "AppletResourceTest$BugStats";
+ try {
+ reader.processWarningOccurred("WarningMessage");
+ reader.processWarningOccurred(baseName, "water");
+ } catch (MissingResourceException mre) {
+ throw new RuntimeException("Test failed: couldn't load resource");
+ }
+
+
+ }
+
+ private class MyReadWarningListener implements IIOReadWarningListener {
+ public void warningOccurred(ImageReader source,
+ String warning)
+ {
+ System.out.println("warning occurred: " + warning);
+ }
+ }
+
+ public static class BugStats extends ListResourceBundle {
+
+ public Object[][] getContents(){
+ return contents;
+ }
+
+ private Object[][] contents = {
+ {"coffee", new String("coffee from Stats class")},
+ {"tea", new String("tea from Stats class")},
+ {"water", new String("water from Stats class")}
+ };
+ }
+
+
+ public static class DummyImageReaderImpl extends ImageReader {
+
+ public DummyImageReaderImpl(ImageReaderSpi originatingProvider) {
+ super(originatingProvider);
+ }
+
+ public int getNumImages(boolean allowSearch) throws IOException {
+ return 5;
+ }
+
+ public int getWidth(int imageIndex) throws IOException {
+ if (input == null)
+ throw new IllegalStateException();
+ if (imageIndex >= 5 || imageIndex < 0)
+ throw new IndexOutOfBoundsException();
+
+ return 10;
+ }
+
+ public int getHeight(int imageIndex) throws IOException {
+ if (input == null)
+ throw new IllegalStateException();
+ if (imageIndex >= 5 || imageIndex < 0)
+ throw new IndexOutOfBoundsException();
+
+ return 15;
+ }
+
+ public Iterator getImageTypes(int imageIndex) throws IOException {
+ if (input == null)
+ throw new IllegalStateException();
+ if (imageIndex >= 5 || imageIndex < 0)
+ throw new IndexOutOfBoundsException();
+
+ Vector imageTypes = new Vector();
+ imageTypes.add(ImageTypeSpecifier.createFromBufferedImageType
+ (BufferedImage.TYPE_BYTE_GRAY ));
+ return imageTypes.iterator();
+ }
+
+ public IIOMetadata getStreamMetadata() throws IOException {
+ return new DummyIIOMetadataImpl(true, null, null, null, null);
+ }
+
+ public IIOMetadata getImageMetadata(int imageIndex)
+ throws IOException {
+
+ if (input == null)
+ throw new IllegalStateException();
+ if (imageIndex >= 5 || imageIndex < 0)
+ throw new IndexOutOfBoundsException();
+ if (seekForwardOnly) {
+ if (imageIndex < minIndex)
+ throw new IndexOutOfBoundsException();
+ minIndex = imageIndex;
+ }
+ return new DummyIIOMetadataImpl(true, null, null, null, null);
+ }
+
+
+ public BufferedImage read(int imageIndex, ImageReadParam param)
+ throws IOException {
+ if (input == null)
+ throw new IllegalStateException();
+ if (imageIndex >= 5 || imageIndex < 0)
+ throw new IndexOutOfBoundsException();
+ if (seekForwardOnly) {
+ if (imageIndex < minIndex)
+ throw new IndexOutOfBoundsException();
+ minIndex = imageIndex;
+ }
+
+ return getDestination(param, getImageTypes(imageIndex), 10, 15);
+ }
+
+// protected methods - now public
+
+ public boolean abortRequested() {
+ return super.abortRequested();
+ }
+
+ public void clearAbortRequest() {
+ super.clearAbortRequest();
+ }
+
+ public void processImageComplete() {
+ super.processImageComplete();
+ }
+
+ public void processImageProgress(float percentageDone) {
+ super.processImageProgress(percentageDone);
+ }
+
+ public void processImageStarted(int imageIndex) {
+ super.processImageStarted(imageIndex);
+ }
+
+ public void processImageUpdate(BufferedImage theImage,
+ int minX,
+ int minY,
+ int width,
+ int height,
+ int periodX,
+ int periodY,
+ int[] bands) {
+ super.processImageUpdate(theImage,
+ minX,
+ minY,
+ width,
+ height,
+ periodX,
+ periodY,
+ bands);
+ }
+
+ public void processPassComplete(BufferedImage theImage) {
+ super. processPassComplete(theImage);
+ }
+
+ public void processPassStarted(BufferedImage theImage,
+ int pass, int minPass,
+ int maxPass,
+ int minX,
+ int minY,
+ int periodX,
+ int periodY,
+ int[] bands) {
+ super.processPassStarted(theImage,
+ pass,
+ minPass,
+ maxPass,
+ minX,
+ minY,
+ periodX,
+ periodY,
+ bands);
+ }
+
+ public void processReadAborted() {
+ super.processReadAborted();
+ }
+
+ public void processSequenceComplete() {
+ super.processSequenceComplete();
+ }
+
+ public void processSequenceStarted(int minIndex) {
+ super.processSequenceStarted(minIndex);
+ }
+
+ public void processThumbnailComplete() {
+ super.processThumbnailComplete();
+ }
+
+ public void processThumbnailPassComplete(BufferedImage theThumbnail) {
+ super.processThumbnailPassComplete(theThumbnail);
+ }
+
+ public void processThumbnailPassStarted(BufferedImage theThumbnail,
+ int pass,
+ int minPass,
+ int maxPass,
+ int minX,
+ int minY,
+ int periodX,
+ int periodY,
+ int[] bands) {
+ super.processThumbnailPassStarted(theThumbnail,
+ pass,
+ minPass,
+ maxPass,
+ minX,
+ minY,
+ periodX,
+ periodY,
+ bands);
+ }
+
+ public void processThumbnailProgress(float percentageDone) {
+ super.processThumbnailProgress(percentageDone);
+ }
+
+ public void processThumbnailStarted(int imageIndex, int thumbnailIndex) {
+ super.processThumbnailStarted(imageIndex, thumbnailIndex);
+ }
+
+ public void processThumbnailUpdate(BufferedImage theThumbnail,
+ int minX,
+ int minY,
+ int width,
+ int height,
+ int periodX,
+ int periodY,
+ int[] bands) {
+ super.processThumbnailUpdate(theThumbnail,
+ minX,
+ minY,
+ width,
+ height,
+ periodX,
+ periodY,
+ bands);
+ }
+
+ public void processWarningOccurred(String warning) {
+ super.processWarningOccurred(warning);
+ }
+
+
+
+ public static Rectangle getSourceRegion(ImageReadParam param,
+ int srcWidth,
+ int srcHeight) {
+ return ImageReader.getSourceRegion(param, srcWidth, srcHeight);
+ }
+
+ public static void computeRegions(ImageReadParam param,
+ int srcWidth,
+ int srcHeight,
+ BufferedImage image,
+ Rectangle srcRegion,
+ Rectangle destRegion) {
+ ImageReader.computeRegions(param,
+ srcWidth,
+ srcHeight,
+ image,
+ srcRegion,
+ destRegion);
+ }
+
+ public static void checkReadParamBandSettings(ImageReadParam param,
+ int numSrcBands,
+ int numDstBands) {
+ ImageReader.checkReadParamBandSettings( param,
+ numSrcBands,
+ numDstBands);
+ }
+
+ public static BufferedImage getDestination(ImageReadParam param,
+ Iterator imageTypes,
+ int width,
+ int height) throws IIOException {
+ return ImageReader.getDestination(param,
+ imageTypes,
+ width,
+ height);
+ }
+
+ public void setAvailableLocales(Locale[] locales) {
+ if (locales == null || locales.length == 0)
+ availableLocales = null;
+ else
+ availableLocales = (Locale[])locales.clone();
+ }
+
+ public void processWarningOccurred(String baseName, String keyword) {
+ super.processWarningOccurred(baseName, keyword);
+ }
+ }
+
+ public static class DummyIIOMetadataImpl extends IIOMetadata {
+
+ public DummyIIOMetadataImpl() {
+ super();
+ }
+
+ public DummyIIOMetadataImpl(boolean standardMetadataFormatSupported,
+ String nativeMetadataFormatName,
+ String nativeMetadataFormatClassName,
+ String[] extraMetadataFormatNames,
+ String[] extraMetadataFormatClassNames) {
+ super(standardMetadataFormatSupported,
+ nativeMetadataFormatName,
+ nativeMetadataFormatClassName,
+ extraMetadataFormatNames,
+ extraMetadataFormatClassNames);
+ }
+
+ public boolean isReadOnly() {
+ return true;
+ }
+
+ public Node getAsTree(String formatName) {
+ return null;
+ }
+
+ public void mergeTree(String formatName, Node root)
+ throws IIOInvalidTreeException {
+ throw new IllegalStateException();
+ }
+
+ public void reset() {
+ throw new IllegalStateException();
+ }
+ }
+
+ public static class DummyImageReaderSpiImpl extends ImageReaderSpi {
+
+ static final String[] names ={ "myformat" };
+
+ public DummyImageReaderSpiImpl() {
+ super("vendorName",
+ "version",
+ names,
+ null,
+ null,
+ "DummyImageReaderImpl",
+ STANDARD_INPUT_TYPE,
+ null,
+ true,
+ null,
+ null,
+ null,
+ null,
+ true,
+ null,
+ null,
+ null,
+ null);
+ }
+ public boolean canDecodeInput(Object source)
+ throws IOException {
+ return true;
+ }
+ public ImageReader createReaderInstance(Object extension)
+ throws IOException {
+ return new DummyImageReaderImpl(this);
+ }
+ public String getDescription(Locale locale) {
+ return "DummyImageReaderSpiImpl";
+ }
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/GetNumImages.java Sat Jun 03 03:48:03 2017 +0000
@@ -0,0 +1,96 @@
+/*
+ * Copyright (c) 2003, 2017, 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 4892609
+ * @summary Tests that the appropriate IllegalStateException is thrown if
+ * ImageReader.getNumImages() is called with a null source or if
+ * allowSearch is specified at the same time that seekForwardOnly is
+ * true
+ */
+
+import java.io.ByteArrayInputStream;
+import java.util.Iterator;
+
+import javax.imageio.ImageIO;
+import javax.imageio.ImageReader;
+import javax.imageio.spi.IIORegistry;
+import javax.imageio.spi.ImageReaderSpi;
+import javax.imageio.stream.ImageInputStream;
+
+public class GetNumImages {
+
+ public static void main(String[] args) throws Exception {
+ IIORegistry registry = IIORegistry.getDefaultInstance();
+
+ // test ImageReader.getNumImages() for all available ImageReaders,
+ // with no source set
+ Iterator readerspis = registry.getServiceProviders(ImageReaderSpi.class,
+ false);
+ while (readerspis.hasNext()) {
+ boolean caughtEx = false;
+ ImageReaderSpi readerspi = (ImageReaderSpi)readerspis.next();
+ ImageReader reader = readerspi.createReaderInstance();
+ try {
+ reader.getNumImages(false);
+ } catch (IllegalStateException ise) {
+ // caught exception, everything's okay
+ caughtEx = true;
+ }
+
+ if (!caughtEx) {
+ throw new RuntimeException("Test failed: exception was not " +
+ "thrown for null input: " +
+ reader);
+ }
+ }
+
+ // test ImageReader.getNumImages() for all available ImageReaders,
+ // with source set, seekForwardOnly and allowSearch both true
+ readerspis = registry.getServiceProviders(ImageReaderSpi.class,
+ false);
+ while (readerspis.hasNext()) {
+ boolean caughtEx = false;
+ ImageReaderSpi readerspi = (ImageReaderSpi)readerspis.next();
+ ImageReader reader = readerspi.createReaderInstance();
+ byte[] barr = new byte[100];
+ ByteArrayInputStream bais = new ByteArrayInputStream(barr);
+ ImageInputStream iis = ImageIO.createImageInputStream(bais);
+ try {
+ reader.setInput(iis, true);
+ reader.getNumImages(true);
+ } catch (IllegalStateException ise) {
+ // caught exception, everything's okay
+ caughtEx = true;
+ }
+
+ if (!caughtEx) {
+ throw new RuntimeException("Test failed: exception was not " +
+ "thrown when allowSearch and " +
+ "seekForwardOnly are both true: " +
+ reader);
+ }
+ }
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/GetReaderWriterInfo.java Sat Jun 03 03:48:03 2017 +0000
@@ -0,0 +1,113 @@
+/*
+ * Copyright (c) 2006, 2017, 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 4703112
+ * @summary Verifies that ImageIO.getReaderFileSuffixes() and similar methods
+ * return appropriate values
+ */
+
+import java.util.Iterator;
+
+import javax.imageio.ImageIO;
+import javax.imageio.ImageReader;
+import javax.imageio.ImageWriter;
+
+public class GetReaderWriterInfo {
+
+ private static void testGetReaderFormatNames() {
+ String[] names = ImageIO.getReaderFormatNames();
+ for (String n : names) {
+ Iterator<ImageReader> it = ImageIO.getImageReadersByFormatName(n);
+ if (!it.hasNext()) {
+ throw new RuntimeException("getReaderFormatNames returned " +
+ "an unknown name: " + n);
+ }
+ }
+ }
+
+ private static void testGetReaderMIMETypes() {
+ String[] types = ImageIO.getReaderMIMETypes();
+ for (String t : types) {
+ Iterator<ImageReader> it = ImageIO.getImageReadersByMIMEType(t);
+ if (!it.hasNext()) {
+ throw new RuntimeException("getReaderMIMETypes returned " +
+ "an unknown type: " + t);
+ }
+ }
+ }
+
+ private static void testGetReaderFileSuffixes() {
+ String[] suffixes = ImageIO.getReaderFileSuffixes();
+ for (String s : suffixes) {
+ Iterator<ImageReader> it = ImageIO.getImageReadersBySuffix(s);
+ if (!it.hasNext()) {
+ throw new RuntimeException("getReaderFileSuffixes returned " +
+ "an unknown suffix: " + s);
+ }
+ }
+ }
+
+ private static void testGetWriterFormatNames() {
+ String[] names = ImageIO.getWriterFormatNames();
+ for (String n : names) {
+ Iterator<ImageWriter> it = ImageIO.getImageWritersByFormatName(n);
+ if (!it.hasNext()) {
+ throw new RuntimeException("getWriterFormatNames returned " +
+ "an unknown name: " + n);
+ }
+ }
+ }
+
+ private static void testGetWriterMIMETypes() {
+ String[] types = ImageIO.getWriterMIMETypes();
+ for (String t : types) {
+ Iterator<ImageWriter> it = ImageIO.getImageWritersByMIMEType(t);
+ if (!it.hasNext()) {
+ throw new RuntimeException("getWriterMIMETypes returned " +
+ "an unknown type: " + t);
+ }
+ }
+ }
+
+ private static void testGetWriterFileSuffixes() {
+ String[] suffixes = ImageIO.getWriterFileSuffixes();
+ for (String s : suffixes) {
+ Iterator<ImageWriter> it = ImageIO.getImageWritersBySuffix(s);
+ if (!it.hasNext()) {
+ throw new RuntimeException("getWriterFileSuffixes returned " +
+ "an unknown suffix: " + s);
+ }
+ }
+ }
+
+ public static void main(String[] args) {
+ testGetReaderFormatNames();
+ testGetReaderMIMETypes();
+ testGetReaderFileSuffixes();
+ testGetWriterFormatNames();
+ testGetWriterMIMETypes();
+ testGetWriterFileSuffixes();
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/IIOImageConstructor.java Sat Jun 03 03:48:03 2017 +0000
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 2000, 2017, 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 4392024
+ * @summary Checks for IllegalArgumentException in IIOImage constructor
+ */
+
+import java.awt.image.BufferedImage;
+
+import javax.imageio.IIOImage;
+
+public class IIOImageConstructor {
+
+ public static void main(String[] args) {
+ BufferedImage image = new BufferedImage(1, 1,
+ BufferedImage.TYPE_INT_RGB);
+ try {
+ IIOImage iioi = new IIOImage(image, null, null);
+ } catch (IllegalArgumentException iae) {
+ throw new RuntimeException
+ ("IIOImage constructor taking a RenderedImage fails!");
+ }
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/ITSDataType.java Sat Jun 03 03:48:03 2017 +0000
@@ -0,0 +1,79 @@
+/*
+ * Copyright (c) 2002, 2017, 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 4506450
+ * @summary Tests whether ImageTypeSpecifier.createBanded() and
+ * ImageTypeSpecifier.createInterleaved() can accept all supported
+ * DataBuffer types
+ */
+
+import java.awt.color.ColorSpace;
+import java.awt.image.DataBuffer;
+
+import javax.imageio.ImageTypeSpecifier;
+
+public class ITSDataType {
+
+ public static final int[] dataTypes = new int[] {
+ DataBuffer.TYPE_BYTE,
+ DataBuffer.TYPE_SHORT,
+ DataBuffer.TYPE_USHORT,
+ DataBuffer.TYPE_INT,
+ DataBuffer.TYPE_FLOAT,
+ DataBuffer.TYPE_DOUBLE,
+ };
+
+ public static void main(String[] args) {
+ ColorSpace cs = ColorSpace.getInstance(ColorSpace.CS_GRAY);
+ int[] bankIndices = new int[] { 1 };
+ int[] bandOffsets = new int[] { 0 };
+
+ // test createBanded()
+ for (int i = 0; i < dataTypes.length; i++) {
+ int dataType = dataTypes[i];
+
+ try {
+ ImageTypeSpecifier.createBanded(cs, bankIndices, bandOffsets,
+ dataType, false, false);
+ } catch (IllegalArgumentException e) {
+ throw new RuntimeException("createBanded() test failed for " +
+ "dataType = " + dataType);
+ }
+ }
+
+ // test createInterleaved()
+ for (int i = 0; i < dataTypes.length; i++) {
+ int dataType = dataTypes[i];
+
+ try {
+ ImageTypeSpecifier.createInterleaved(cs, bandOffsets,
+ dataType, false, false);
+ } catch (IllegalArgumentException e) {
+ throw new RuntimeException("createInterleaved() test failed " +
+ "for dataType = " + dataType);
+ }
+ }
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/ImageIOGetImageReaders.java Sat Jun 03 03:48:03 2017 +0000
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 2001, 2017, 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 4432107
+ * @summary Checks if ImageIO.getImageReaders(null) throws an IAE
+ */
+
+import javax.imageio.ImageIO;
+
+public class ImageIOGetImageReaders {
+
+ public static void main(String[] args) {
+ boolean gotIAE = false;
+ try {
+ ImageIO.getImageReaders(null);
+ } catch (IllegalArgumentException e) {
+ gotIAE = true;
+ }
+
+ if (!gotIAE) {
+ throw new RuntimeException("Failed to get IAE!");
+ }
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/ImageIOWriteFile.java Sat Jun 03 03:48:03 2017 +0000
@@ -0,0 +1,78 @@
+/*
+ * Copyright (c) 2000, 2017, 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 4393174
+ * @summary Checks that ImageIO.write(..., ..., File) truncates the file
+ */
+
+import java.awt.image.BufferedImage;
+import java.io.File;
+import java.io.FileOutputStream;
+
+import javax.imageio.ImageIO;
+
+public class ImageIOWriteFile {
+
+ public static void main(String[] args) {
+ long length0 = -1L;
+ long length1 = -1L;
+
+ try {
+ BufferedImage bi =
+ new BufferedImage(1, 1, BufferedImage.TYPE_INT_RGB);
+
+ File outFile = File.createTempFile("imageiowritefile", ".tmp");
+
+ // Write image to an empty file
+ outFile.delete();
+ ImageIO.write(bi, "png", outFile);
+ length0 = outFile.length();
+
+ // Write a larger file full of junk
+ outFile.delete();
+ FileOutputStream fos = new FileOutputStream(outFile);
+ for (int i = 0; i < length0*2; i++) {
+ fos.write(1);
+ }
+ fos.close();
+
+ // Write image again
+ ImageIO.write(bi, "png", outFile);
+ length1 = outFile.length();
+
+ outFile.delete();
+ } catch (Exception e) {
+ e.printStackTrace();
+ throw new RuntimeException("Unexpected exception!");
+ }
+
+ if (length0 == 0) {
+ throw new RuntimeException("File length is zero!");
+ }
+ if (length1 != length0) {
+ throw new RuntimeException("File length changed!");
+ }
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/ImageIOWriteNull.java Sat Jun 03 03:48:03 2017 +0000
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) 2001, 2017, 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 4434855
+ * @summary Checks that ImageIO.write(null, null, (File)null) throws an IAE
+ */
+
+import java.io.File;
+
+import javax.imageio.ImageIO;
+
+public class ImageIOWriteNull {
+
+ public static void main(String[] args) {
+ try {
+ ImageIO.write(null, null, (File)null);
+ throw new RuntimeException("Failed to get IAE!");
+ } catch (IllegalArgumentException iae) {
+ } catch (Exception e) {
+ throw new RuntimeException("Unexpected exception: " + e);
+ }
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/ImageReadParamPasses.java Sat Jun 03 03:48:03 2017 +0000
@@ -0,0 +1,101 @@
+/*
+ * Copyright (c) 2001, 2017, 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 4429365
+ * @summary Checks that ImageReadParam.setSourceProgressivePasses handles
+ * overflow correctly
+ */
+
+import javax.imageio.ImageReadParam;
+
+public class ImageReadParamPasses {
+
+ private static final int maxint = Integer.MAX_VALUE;
+
+ private static void expect(int i, int j) {
+ if (i != j) {
+ throw new RuntimeException("Expected " + i + ", got " + j);
+ }
+ }
+
+ private static void checkForIAE(int minPass, int numPasses) {
+ ImageReadParam param = new ImageReadParam();
+
+ boolean gotIAE = false;
+ try {
+ param.setSourceProgressivePasses(minPass, numPasses);
+ } catch (IllegalArgumentException iae) {
+ gotIAE = true;
+ }
+ if (!gotIAE) {
+ throw new RuntimeException("Failed to get IAE for wraparound!");
+ }
+ }
+
+ private static void test(int minPass, int numPasses) {
+ ImageReadParam param = new ImageReadParam();
+
+ param.setSourceProgressivePasses(minPass, numPasses);
+ expect(param.getSourceMinProgressivePass(), minPass);
+ expect(param.getSourceNumProgressivePasses(), numPasses);
+
+ int maxPass = numPasses == maxint ? maxint : minPass + numPasses - 1;
+ expect(param.getSourceMaxProgressivePass(), maxPass);
+ }
+
+ public static void main(String[] args) {
+ // Typical case
+ test(17, 30);
+
+ // Read all passes
+ test(0, maxint);
+
+ // Start at pass 17, continue indefinitely
+ test(17, maxint);
+
+ // Start at pass maxint - 10, continue indefinitely
+ test(maxint - 10, maxint);
+
+ // Start at pass maxint - 10, go up to maxint - 1
+ test(maxint - 10, 10);
+
+ // Start at pass maxint - 10, go up to maxint
+ test(maxint - 10, 11);
+
+ // Start at maxint, continue indefinitely :-)
+ test(maxint, maxint);
+
+ // Start at maxint, go up to maxint
+ test(maxint, 1);
+
+ // Check that an IllegalArgumentException is thrown if
+ // wraparound occurs
+ checkForIAE(maxint, 2);
+ checkForIAE(maxint - 5, 10);
+ checkForIAE(10, maxint - 5);
+ checkForIAE(maxint - 1000, maxint - 1000);
+ checkForIAE(maxint - 1, maxint - 1);
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/ImageReaderGetDestination.java Sat Jun 03 03:48:03 2017 +0000
@@ -0,0 +1,132 @@
+/*
+ * Copyright (c) 2001, 2017, 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 4449211
+ * @summary Checks that ImageReader.getDestination throws correct exceptions
+ */
+
+import java.awt.image.BufferedImage;
+import java.io.IOException;
+import java.util.Iterator;
+import java.util.Vector;
+
+import javax.imageio.IIOException;
+import javax.imageio.ImageReadParam;
+import javax.imageio.ImageReader;
+import javax.imageio.ImageTypeSpecifier;
+import javax.imageio.metadata.IIOMetadata;
+import javax.imageio.spi.ImageReaderSpi;
+
+public class ImageReaderGetDestination {
+
+ public static void main(String argv[]) {
+ Vector imageTypes = new Vector();
+ boolean gotIAE1 = false;
+ boolean gotIAE2 = false;
+ boolean gotIAE3 = false;
+ boolean gotIAE4 = false;
+
+ try {
+ DummyImageReaderImpl.getDestination(null, null, 5, 10);
+ } catch (IllegalArgumentException iae) {
+ gotIAE1 = true;
+ } catch (Throwable ee) {
+ System.out.println("Unexpected exception 1:");
+ ee.printStackTrace();
+ }
+ if (!gotIAE1) {
+ throw new RuntimeException("Failed to get IAE #1!");
+ }
+
+ try {
+ DummyImageReaderImpl.getDestination(null, imageTypes.iterator(),
+ 5, 10);
+ } catch (IllegalArgumentException iae) {
+ gotIAE2 = true;
+ } catch (Throwable ee) {
+ System.out.println("Unexpected exception 2:");
+ ee.printStackTrace();
+ }
+ if (!gotIAE2) {
+ throw new RuntimeException("Failed to get IAE #2!");
+ }
+
+ imageTypes.add("abc");
+ try {
+ DummyImageReaderImpl.getDestination(null, imageTypes.iterator(),
+ 5, 10);
+ } catch (IllegalArgumentException iae) {
+ gotIAE3 = true;
+ } catch (Throwable ee) {
+ System.out.println("Unexpected exception 3:");
+ ee.printStackTrace();
+ }
+ if (!gotIAE3) {
+ throw new RuntimeException("Failed to get IAE #3!");
+ }
+
+ imageTypes.clear();
+ ImageTypeSpecifier its = ImageTypeSpecifier.createFromBufferedImageType
+ (BufferedImage.TYPE_INT_RGB);
+ imageTypes.add(its);
+ try {
+ DummyImageReaderImpl.getDestination(null,
+ imageTypes.iterator(),
+ Integer.MAX_VALUE,
+ Integer.MAX_VALUE);
+ } catch (IllegalArgumentException iae) {
+ gotIAE4 = true;
+ } catch (Throwable ee) {
+ System.out.println("Unexpected exception 4: ");
+ ee.printStackTrace();
+ }
+ if (!gotIAE4) {
+ throw new RuntimeException("Failed to get IAE #4!");
+ }
+ }
+
+ public static class DummyImageReaderImpl extends ImageReader {
+ public DummyImageReaderImpl(ImageReaderSpi originatingProvider) {
+ super(originatingProvider);
+ }
+ public static BufferedImage getDestination(ImageReadParam param,
+ Iterator imageTypes,
+ int width,
+ int height)
+ throws IIOException {
+ return ImageReader.getDestination(param, imageTypes, width, height);
+ }
+ public int getNumImages(boolean allowSearch) throws IOException {return 1;}
+ public int getWidth(int imageIndex) throws IOException {return 1;}
+ public int getHeight(int imageIndex) throws IOException {return 1;}
+ public Iterator getImageTypes(int imageIndex)
+ throws IOException {return null;}
+ public IIOMetadata getStreamMetadata() throws IOException {return null;}
+ public IIOMetadata getImageMetadata(int imageIndex)
+ throws IOException {return null;}
+ public BufferedImage read(int imageIndex, ImageReadParam param)
+ throws IOException {return null;}
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/ImageReaderReadAll.java Sat Jun 03 03:48:03 2017 +0000
@@ -0,0 +1,120 @@
+/*
+ * Copyright (c) 2001, 2017, 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 4450319
+ * @summary Checks that ImageReader.readAll(int, ImageReadParam) makes use of
+ * the ImageReadParam object
+ */
+
+import java.awt.image.BufferedImage;
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.util.Iterator;
+import java.util.Vector;
+
+import javax.imageio.IIOImage;
+import javax.imageio.ImageReadParam;
+import javax.imageio.ImageReader;
+import javax.imageio.ImageTypeSpecifier;
+import javax.imageio.metadata.IIOMetadata;
+import javax.imageio.spi.ImageReaderSpi;
+import javax.imageio.stream.MemoryCacheImageInputStream;
+
+public class ImageReaderReadAll {
+
+ private final static byte[] ba = {};
+
+ public static void main(String argv[]) {
+ ImageReader ireader;
+ ImageReadParam irp;
+ IIOImage image;
+ BufferedImage bi;
+ BufferedImage bi_1;
+ BufferedImage bi_2;
+
+ ireader = new DummyImageReaderImpl(null);
+ MemoryCacheImageInputStream mciis = new MemoryCacheImageInputStream
+ (new ByteArrayInputStream(ba));
+ ireader.setInput(mciis);
+
+ irp = new ImageReadParam();
+ irp.setDestination(new BufferedImage(10, 10,
+ BufferedImage.TYPE_3BYTE_BGR));
+ try {
+ image = ireader.readAll(0, irp);
+ bi_1 = ireader.read(0, irp);
+ bi_2 = ireader.read(0);
+ } catch (java.io.IOException ee) {
+ throw new RuntimeException("Unexpected exception: " + ee);
+ }
+
+ bi = (BufferedImage)image.getRenderedImage();
+ if (bi.getType() != bi_1.getType()) {
+ throw new RuntimeException("Images have different type!");
+ }
+ }
+
+
+ public static class DummyImageReaderImpl extends ImageReader {
+
+ public DummyImageReaderImpl(ImageReaderSpi originatingProvider) {
+ super(originatingProvider);
+ }
+
+ public BufferedImage read(int imageIndex, ImageReadParam param)
+ throws IOException {
+ if (input == null)
+ throw new IllegalStateException();
+ if (imageIndex >= 1 || imageIndex < 0)
+ throw new IndexOutOfBoundsException();
+ if (seekForwardOnly) {
+ if (imageIndex < minIndex)
+ throw new IndexOutOfBoundsException();
+ minIndex = imageIndex;
+ }
+
+ return getDestination(param, getImageTypes(imageIndex), 10, 15);
+ }
+
+ public Iterator getImageTypes(int imageIndex) throws IOException {
+ if (input == null)
+ throw new IllegalStateException();
+ if (imageIndex >= 1 || imageIndex < 0)
+ throw new IndexOutOfBoundsException();
+
+ Vector imageTypes = new Vector();
+ imageTypes.add(ImageTypeSpecifier.createFromBufferedImageType
+ (BufferedImage.TYPE_BYTE_GRAY ));
+ return imageTypes.iterator();
+ }
+
+ public int getNumImages(boolean allowSearch) throws IOException {return 1;}
+ public int getWidth(int imageIndex) throws IOException {return 1;}
+ public int getHeight(int imageIndex) throws IOException {return 1;}
+ public IIOMetadata getStreamMetadata() throws IOException {return null;}
+ public IIOMetadata getImageMetadata(int imageIndex)
+ throws IOException {return null;}
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/ImageStreamFromRAF.java Sat Jun 03 03:48:03 2017 +0000
@@ -0,0 +1,67 @@
+/*
+ * Copyright (c) 2001, 2017, 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 4395378
+ * @summary Checks that ImageIO.createImageInputStream and
+ * createImageOutputStream produce correct output when given a
+ * RandomAccessFile
+ */
+
+import java.io.File;
+import java.io.IOException;
+import java.io.RandomAccessFile;
+
+import javax.imageio.ImageIO;
+import javax.imageio.stream.FileImageInputStream;
+import javax.imageio.stream.FileImageOutputStream;
+import javax.imageio.stream.ImageInputStream;
+import javax.imageio.stream.ImageOutputStream;
+
+public class ImageStreamFromRAF {
+
+ public static void main(String[] args) {
+ try {
+ File f = new File("ImageInputStreamFromRAF.tmp");
+ RandomAccessFile raf = new RandomAccessFile(f, "rw");
+ ImageInputStream istream = ImageIO.createImageInputStream(raf);
+ ImageOutputStream ostream = ImageIO.createImageOutputStream(raf);
+ f.delete();
+ if (istream == null) {
+ throw new RuntimeException("ImageIO.createImageInputStream(RandomAccessFile) returned null!");
+ }
+ if (ostream == null) {
+ throw new RuntimeException("ImageIO.createImageOutputStream(RandomAccessFile) returned null!");
+ }
+ if (!(istream instanceof FileImageInputStream)) {
+ throw new RuntimeException("ImageIO.createImageInputStream(RandomAccessFile) did not return a FileImageInputStream!");
+ }
+ if (!(ostream instanceof FileImageOutputStream)) {
+ throw new RuntimeException("ImageIO.createImageOutputStream(RandomAccessFile) did not return a FileImageOutputStream!");
+ }
+ } catch (IOException ioe) {
+ throw new RuntimeException("Unexpected IOException: " + ioe);
+ }
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/ImageTypeSpecifierBitsPerBand.java Sat Jun 03 03:48:03 2017 +0000
@@ -0,0 +1,60 @@
+/*
+ * Copyright (c) 2000, 2017, 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 4392669
+ * @summary Checks contract of ImageTypeSpecifier.getBitsPerBand
+ */
+
+import java.awt.image.BufferedImage;
+
+import javax.imageio.ImageTypeSpecifier;
+
+public class ImageTypeSpecifierBitsPerBand {
+
+ public static void main(String[] args) {
+ int biType = BufferedImage.TYPE_USHORT_565_RGB;
+ ImageTypeSpecifier type =
+ ImageTypeSpecifier.createFromBufferedImageType(biType);
+
+ int b0 = type.getBitsPerBand(0);
+ int b1 = type.getBitsPerBand(1);
+ int b2 = type.getBitsPerBand(2);
+
+ if (b0 != 5 || b1 != 6 || b2 != 5) {
+ throw new RuntimeException("Got incorrect bits per band value!");
+ }
+
+ boolean gotIAE = false;
+ try {
+ int b3 = type.getBitsPerBand(3);
+ } catch (IllegalArgumentException e) {
+ gotIAE = true;
+ }
+ if (!gotIAE) {
+ throw new RuntimeException
+ ("Failed to get IllegalArgumentException for band == 3!");
+ }
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/ImageTypeSpecifierTest.java Sat Jun 03 03:48:03 2017 +0000
@@ -0,0 +1,310 @@
+/*
+ * Copyright (c) 2001, 2017, 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 4429934 4429950 4430991 4430993
+ * @summary Checks various aspects of ImageTypeSpecifier functionality
+ */
+
+import java.awt.color.ColorSpace;
+import java.awt.image.BufferedImage;
+import java.awt.image.ColorModel;
+import java.awt.image.DataBuffer;
+import java.awt.image.SampleModel;
+
+import javax.imageio.ImageTypeSpecifier;
+
+public class ImageTypeSpecifierTest {
+
+ private static void fail(String message) {
+ throw new RuntimeException(message);
+ }
+
+ private static void test4429934() {
+ try {
+ ImageTypeSpecifier itspecifier =
+ new ImageTypeSpecifier(null, null);
+ fail("Failed to get IAE!");
+ } catch( IllegalArgumentException e ) {
+ }
+
+ try {
+ ImageTypeSpecifier itspecifier = new ImageTypeSpecifier(null);
+ fail("Failed to get IAE!");
+ } catch (IllegalArgumentException e ) {
+ }
+ }
+
+ private static void test4429950() {
+ createPackedTest();
+ createInterleavedTest();
+ createBandedTest();
+ createIndexedTest();
+ }
+
+ public static void createPackedTest() {
+ ColorSpace cs = ColorSpace.getInstance(ColorSpace.CS_sRGB);
+ int rmask = 0x00ff0000;
+ int gmask = 0x0000ff00;
+ int bmask = 0x000000ff;
+ int amask = 0xff000000;
+ try {
+ ImageTypeSpecifier.createPacked(null, rmask, gmask, bmask, amask, 0,
+false);
+ fail("Failed to get IAE!");
+ } catch (IllegalArgumentException e) {
+ }
+
+ ColorSpace cs1 = ColorSpace.getInstance(ColorSpace.CS_GRAY);
+ try {
+ ImageTypeSpecifier.createPacked
+ (cs1, rmask, gmask, bmask, amask, 0, false);
+ fail("Failed to get IAE!");
+ } catch (IllegalArgumentException e) {
+ }
+
+ try {
+ ImageTypeSpecifier.createPacked(cs, 0, 0, 0, 0, 0, false);
+ fail("Failed to get IAE!");
+ } catch (IllegalArgumentException e) {
+ }
+
+ try {
+ ImageTypeSpecifier.createPacked(cs, rmask, gmask, bmask, amask, -1,
+false);
+ fail("Failed to get IAE!");
+ } catch (IllegalArgumentException e) {
+ }
+ }
+
+ public static void createInterleavedTest() {
+ ColorSpace cs = ColorSpace.getInstance(ColorSpace.CS_sRGB);
+ int[] bandOffsets = {0,0,0,0};
+ int dataType = 0;
+ boolean hasAlpha = true;
+ boolean isAlphaPremultiplied = true;
+
+ try {
+ ImageTypeSpecifier.createInterleaved
+ (null, bandOffsets, dataType, hasAlpha, isAlphaPremultiplied);
+ fail("Failed to get IAE!");
+ } catch (IllegalArgumentException e) {
+ }
+
+ try {
+ ImageTypeSpecifier.createInterleaved
+ (cs, null, dataType, hasAlpha, isAlphaPremultiplied);
+ fail("Failed to get IAE!");
+ } catch (IllegalArgumentException e) {
+ }
+
+ int[] bad_bandOffsets = {0,100,1000};
+ try {
+ ImageTypeSpecifier.createInterleaved
+ (cs, bad_bandOffsets, dataType, hasAlpha, isAlphaPremultiplied);
+ fail("Failed to get IAE!");
+ } catch (IllegalArgumentException e) {
+ }
+
+ int[] bad_bandOffsets_1 = {};
+ try {
+ ImageTypeSpecifier.createInterleaved
+ (cs, bad_bandOffsets_1, dataType, hasAlpha, isAlphaPremultiplied);
+ fail("Failed to get IAE!");
+ } catch (IllegalArgumentException e) {
+ }
+ }
+
+ public static void createBandedTest() {
+ ColorSpace cs = ColorSpace.getInstance(ColorSpace.CS_sRGB);
+ int[] bankIndices = {0, 100, 1000, 10000};
+ int[] bandOffsets = {0, 100, 1000, 10000};
+ int dataType = 0;
+ boolean hasAlpha = true;
+ boolean isAlphaPremultiplied = true;
+
+ try {
+ ImageTypeSpecifier.createBanded(null, bankIndices, bandOffsets,
+ dataType, hasAlpha, isAlphaPremultiplied);
+ fail("Failed to get IAE!");
+ } catch (IllegalArgumentException e) {
+ }
+
+ int[] bad_bankIndices = {};
+ int[] bad_bandOffsets = {};
+ try {
+ ImageTypeSpecifier.createBanded(cs, bad_bankIndices, bad_bandOffsets,
+ dataType, hasAlpha, isAlphaPremultiplied);
+ fail("Failed to get IAE!");
+ } catch (IllegalArgumentException e) {
+ }
+
+ try {
+ ImageTypeSpecifier.createBanded(cs, bankIndices, bandOffsets,
+ 99999, hasAlpha, isAlphaPremultiplied);
+ fail("Failed to get IAE!");
+ } catch (IllegalArgumentException e) {
+ }
+ }
+
+ public static void createGrayscaleTest() {
+ int bits = 8;
+ int dataType = DataBuffer.TYPE_BYTE;
+ boolean isSigned = true;
+ // testcase 1
+ try {
+ ImageTypeSpecifier.createGrayscale(100, dataType, isSigned);
+ fail("Failed to get IAE!");
+ } catch (IllegalArgumentException e) {
+ }
+
+ try {
+ ImageTypeSpecifier.createGrayscale(10, dataType, isSigned);
+ fail("Failed to get IAE!");
+ } catch (IllegalArgumentException e) {
+ }
+
+ try {
+ ImageTypeSpecifier.createGrayscale(bits, 100, isSigned);
+ fail("Failed to get IAE!");
+ } catch (IllegalArgumentException e) {
+ }
+ }
+
+ public static void createIndexedTest() {
+ byte[] redLUT = {0};
+ byte[] greenLUT = {0};
+ byte[] blueLUT = {0};
+ byte[] alphaLUT = {0};
+ int bits = 8;
+ int dataType = DataBuffer.TYPE_BYTE;
+
+ try {
+ ImageTypeSpecifier.createIndexed(redLUT, greenLUT,
+ blueLUT, alphaLUT, 0, dataType);
+ fail("Failed to get IAE!");
+ } catch (IllegalArgumentException e) {
+ }
+
+ try {
+ ImageTypeSpecifier.createIndexed(redLUT, greenLUT,
+ blueLUT, alphaLUT, 17, dataType);
+ fail("Failed to get IAE!");
+ } catch (IllegalArgumentException e) {
+ }
+
+ try {
+ ImageTypeSpecifier.createIndexed(redLUT, greenLUT,
+ blueLUT, alphaLUT, 10, dataType);
+ fail("Failed to get IAE!");
+ } catch (IllegalArgumentException e) {
+ }
+
+ byte[] greenLUT_4 = {};
+ try {
+ ImageTypeSpecifier.createIndexed(redLUT, greenLUT_4,
+ blueLUT, alphaLUT, bits, dataType);
+ fail("Failed to get IAE!");
+ } catch (IllegalArgumentException e) {
+ }
+
+ byte[] redLUT_5 = {};
+ try {
+ ImageTypeSpecifier.createIndexed(redLUT_5, greenLUT,
+ blueLUT, alphaLUT, bits, dataType);
+ fail("Failed to get IAE!");
+ } catch (IllegalArgumentException e) {
+ }
+
+ byte[] alphaLUT_6 = {};
+ try {
+ ImageTypeSpecifier.createIndexed(redLUT, greenLUT,
+ blueLUT, alphaLUT_6 , bits, dataType);
+ fail("Failed to get IAE!");
+ } catch (IllegalArgumentException e) {
+ }
+
+ try {
+ ImageTypeSpecifier.createIndexed(redLUT, greenLUT,
+ blueLUT, alphaLUT , bits, 100);
+ fail("Failed to get IAE!");
+ } catch (IllegalArgumentException e) {
+ }
+ }
+
+ private static void test4430991() {
+ ImageTypeSpecifier itspecifier;
+
+ itspecifier = ImageTypeSpecifier.createFromBufferedImageType
+ (BufferedImage.TYPE_INT_RGB);
+
+ try {
+ itspecifier.createBufferedImage(Integer.MAX_VALUE,
+ Integer.MAX_VALUE);
+ fail("Failed to get IAE!");
+ } catch (IllegalArgumentException e) {
+ }
+
+ try {
+ itspecifier.getSampleModel(Integer.MAX_VALUE, Integer.MAX_VALUE);
+ fail("Failed to get IAE!");
+ } catch (IllegalArgumentException e) {
+ }
+ }
+
+ private static void test4430993() {
+ ImageTypeSpecifier itspecifier;
+
+ int bits = 32;
+ int rmask = 0x00ff0000;
+ int gmask = 0x0000ff00;
+ int bmask = 0x000000ff;
+ ColorModel dcm = new java.awt.image.DirectColorModel
+ (bits, rmask, gmask, bmask);
+ int[] bandOffsets = new int[2];
+ bandOffsets[1] = 1;
+ SampleModel sm = new java.awt.image.ComponentSampleModel
+ (DataBuffer.TYPE_SHORT, 1, 1, 2, 2, bandOffsets);
+
+ try {
+ itspecifier = new ImageTypeSpecifier(dcm, sm);
+ fail("Failed to get IAE!");
+ } catch (IllegalArgumentException e) {
+ }
+ }
+
+ public static void main(String[] args) {
+ try {
+ test4429934();
+ test4429950();
+ test4430991();
+ test4430993();
+ } catch (RuntimeException e) {
+ throw e;
+ } catch (Exception e) {
+ e.printStackTrace();
+ System.out.println("Unexpected exception: " + e);
+ }
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/ImageWriteParamMisc.java Sat Jun 03 03:48:03 2017 +0000
@@ -0,0 +1,105 @@
+/*
+ * Copyright (c) 2001, 2017, 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 4434870 4434886 4441315 4446842
+ * @summary Checks that miscellaneous ImageWriteParam methods work properly
+ */
+
+import java.awt.Dimension;
+
+import javax.imageio.ImageWriteParam;
+
+public class ImageWriteParamMisc {
+
+ public static void main(String[] args) {
+ test4434870();
+ test4434886();
+ test4441315();
+ test4446842();
+ }
+
+ public static class ImageWriteParam4434870 extends ImageWriteParam {
+ public ImageWriteParam4434870() {
+ super(null);
+ super.canWriteTiles = true;
+ super.preferredTileSizes =
+ new Dimension[] {new Dimension(1, 2), new Dimension(5, 6)};
+ }
+ }
+
+ private static void test4434870() {
+ ImageWriteParam iwp = new ImageWriteParam4434870();
+ try {
+ Dimension[] dimensions = iwp.getPreferredTileSizes();
+ iwp.setTilingMode(ImageWriteParam.MODE_EXPLICIT);
+ iwp.setTiling(100, 100, 0,0);
+ throw new RuntimeException("Failed to get IAE!");
+ } catch (IllegalArgumentException e) {
+ }
+ }
+
+ public static class ImageWriteParam4434886 extends ImageWriteParam {
+ public ImageWriteParam4434886() {
+ super(null);
+ super.canWriteTiles = true;
+ super.canOffsetTiles = true;
+ }
+ }
+
+ private static void test4434886() {
+ ImageWriteParam iwp = new ImageWriteParam4434886();
+ iwp.setTilingMode(ImageWriteParam.MODE_EXPLICIT);
+ try {
+ iwp.setTiling(-1,-2,-3,-4);
+ throw new RuntimeException("Failed to get IAE!");
+ } catch (IllegalArgumentException e) {
+ }
+ }
+
+ public static class ImageWriteParam4441315 extends ImageWriteParam {
+ public ImageWriteParam4441315() {
+ super(null);
+ super.canWriteProgressive = true;
+ }
+ }
+
+ private static void test4441315() {
+ ImageWriteParam iwp = new ImageWriteParam4441315();
+ try {
+ iwp.setProgressiveMode(ImageWriteParam.MODE_EXPLICIT);
+ throw new RuntimeException("Failed to get IAE!");
+ } catch (IllegalArgumentException e) {
+ }
+ }
+
+ private static void test4446842() {
+ ImageWriteParam iwp = new ImageWriteParam(null);
+ try {
+ iwp.getCompressionTypes();
+ throw new RuntimeException("Failed to get UOE!");
+ } catch (UnsupportedOperationException e) {
+ }
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/NullInputOutput.java Sat Jun 03 03:48:03 2017 +0000
@@ -0,0 +1,73 @@
+/*
+ * Copyright (c) 2003, 2017, 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 4892682 4892698
+ * @summary Tests that the appropriate IllegalStateException is thrown if
+ * ImageReader.read() or ImageWriter.write() is called without having
+ * first set the input/output stream
+ */
+
+import java.awt.image.BufferedImage;
+import java.util.Iterator;
+
+import javax.imageio.ImageReader;
+import javax.imageio.ImageWriter;
+import javax.imageio.spi.IIORegistry;
+import javax.imageio.spi.ImageReaderSpi;
+import javax.imageio.spi.ImageWriterSpi;
+
+public class NullInputOutput {
+
+ public static void main(String[] args) throws Exception {
+ IIORegistry registry = IIORegistry.getDefaultInstance();
+
+ // test ImageReader.read() for all available ImageReaders
+ Iterator readerspis = registry.getServiceProviders(ImageReaderSpi.class,
+ false);
+ while (readerspis.hasNext()) {
+ ImageReaderSpi readerspi = (ImageReaderSpi)readerspis.next();
+ ImageReader reader = readerspi.createReaderInstance();
+ try {
+ reader.read(0);
+ } catch (IllegalStateException ise) {
+ // caught exception, everything's okay
+ }
+ }
+
+ // test ImageWriter.write() for all available ImageWriters
+ BufferedImage bi = new BufferedImage(1, 1, BufferedImage.TYPE_INT_RGB);
+ Iterator writerspis = registry.getServiceProviders(ImageWriterSpi.class,
+ false);
+ while (writerspis.hasNext()) {
+ ImageWriterSpi writerspi = (ImageWriterSpi)writerspis.next();
+ ImageWriter writer = writerspi.createWriterInstance();
+ try {
+ writer.write(bi);
+ } catch (IllegalStateException ise) {
+ // caught exception, everything's okay
+ }
+ }
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/PNGSpiStreamMetadata.java Sat Jun 03 03:48:03 2017 +0000
@@ -0,0 +1,67 @@
+/*
+ * Copyright (c) 2001, 2017, 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 4403355
+ * @summary Checks that PNGImage{Reader,Writer}Spi.getStreamMetadataFormatNames
+ * and getNativeStreamMetadataFormatName return null
+ * @modules java.desktop/com.sun.imageio.plugins.png
+ */
+
+import javax.imageio.spi.ImageReaderSpi;
+import javax.imageio.spi.ImageWriterSpi;
+
+import com.sun.imageio.plugins.png.PNGImageReaderSpi;
+import com.sun.imageio.plugins.png.PNGImageWriterSpi;
+
+public class PNGSpiStreamMetadata {
+
+ private static void fatal() {
+ throw new RuntimeException("Got a non-null stream metadata format!");
+ }
+
+ public static void main(String[] args) {
+ ImageReaderSpi rspi = new PNGImageReaderSpi();
+ if (rspi.getNativeStreamMetadataFormatName() != null) {
+ fatal();
+ }
+ if (rspi.isStandardStreamMetadataFormatSupported() != false) {
+ fatal();
+ }
+ if (rspi.getExtraStreamMetadataFormatNames() != null) {
+ fatal();
+ }
+
+ ImageWriterSpi wspi = new PNGImageWriterSpi();
+ if (wspi.getNativeStreamMetadataFormatName() != null) {
+ fatal();
+ }
+ if (wspi.isStandardStreamMetadataFormatSupported() != false) {
+ fatal();
+ }
+ if (wspi.getExtraStreamMetadataFormatNames() != null) {
+ fatal();
+ }
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/PNGSuffixes.java Sat Jun 03 03:48:03 2017 +0000
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 2000, 2017, 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 4394924
+ * @summary Checks for spurious leading "." in PNG file suffixes
+ * @modules java.desktop/com.sun.imageio.plugins.png
+ */
+
+import com.sun.imageio.plugins.png.PNGImageWriterSpi;
+
+public class PNGSuffixes {
+
+ public static void main(String[] args) {
+ String[] suffixes = new PNGImageWriterSpi().getFileSuffixes();
+ for (int i = 0; i < suffixes.length; i++) {
+ if (suffixes[i].startsWith(".")) {
+ throw new RuntimeException("Found a \".\" in a suffix!");
+ }
+ }
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/ReadBitsTest.java Sat Jun 03 03:48:03 2017 +0000
@@ -0,0 +1,90 @@
+/*
+ * Copyright (c) 2001, 2017, 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 4416800
+ * @summary Checks that ImageInputStreamImpl.readBit and readBits handle the bit
+ * offset correctly
+ */
+
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+
+import javax.imageio.stream.FileCacheImageInputStream;
+import javax.imageio.stream.ImageInputStream;
+
+public class ReadBitsTest {
+ public static void main(String[] args) throws IOException {
+ byte[] buffer = new byte[] {(byte)169, (byte)85}; // 10101001 01010101
+ InputStream ins = new ByteArrayInputStream(buffer);
+ ImageInputStream in = new FileCacheImageInputStream(ins,null);
+
+ if (in.getBitOffset() != 0) {
+ throw new RuntimeException("Initial bit offset != 0!");
+ }
+
+ int bit0 = in.readBit(); // 1
+ if (bit0 != 1) {
+ throw new RuntimeException("First bit != 1");
+ }
+ if (in.getBitOffset() != 1) {
+ throw new RuntimeException("Second bit offset != 1");
+ }
+
+ long bits1 = in.readBits(5); // 01010 = 10
+ if (bits1 != 10) {
+ throw new RuntimeException("Bits 1-5 != 10 (= " + bits1 + ")");
+ }
+ if (in.getBitOffset() != 6) {
+ throw new RuntimeException("Third bit offset != 6");
+ }
+
+ int bit1 = in.readBit(); // 0
+ if (bit1 != 0) {
+ throw new RuntimeException("Bit 6 != 0");
+ }
+ if (in.getBitOffset() != 7) {
+ throw new RuntimeException("Third bit offset != 7");
+ }
+
+ long bits2 = in.readBits(8); // 10101010 = 170
+ if (bits2 != 170) {
+ throw new RuntimeException("Bits 7-14 != 170 (= " + bits2 + ")");
+ }
+ if (in.getBitOffset() != 7) {
+ throw new RuntimeException("Fourth bit offset != 7");
+ }
+
+ int bit2 = in.readBit(); // 1
+ if (bit2 != 1) {
+ throw new RuntimeException("Bit 15 != 1");
+ }
+ if (in.getBitOffset() != 0) {
+ throw new RuntimeException("Fifth bit offset != 0");
+ }
+
+ in.close();
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/SetOutput.java Sat Jun 03 03:48:03 2017 +0000
@@ -0,0 +1,55 @@
+/*
+ * Copyright (c) 2001, 2017, 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 4414455
+ * @summary Checks for NPE from ImageWriter.setOutput when the writer has no
+ * originating service provider
+ * @modules java.desktop/com.sun.imageio.plugins.png
+ */
+
+import java.io.File;
+import java.io.IOException;
+
+import javax.imageio.ImageIO;
+import javax.imageio.ImageWriter;
+import javax.imageio.stream.ImageOutputStream;
+
+import com.sun.imageio.plugins.png.PNGImageWriter;
+
+public class SetOutput {
+
+ public static void main(String[] args) throws IOException {
+ ImageWriter iw = new PNGImageWriter(null);
+ File f = File.createTempFile("imageio", "tmp");
+ ImageOutputStream ios = ImageIO.createImageOutputStream(f);
+ try {
+ iw.setOutput(ios);
+ } catch (NullPointerException npe) {
+ f.delete();
+ throw new RuntimeException("Got NullPointerException!");
+ }
+ f.delete();
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/WriteNullImageTest.java Sat Jun 03 03:48:03 2017 +0000
@@ -0,0 +1,89 @@
+/*
+ * Copyright (c) 2003, 2017, 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 4954545
+ * @summary This test verifies whether the ImageWriter implementations throw
+ * IllegalArgumentException when a null image is passed to the write
+ * method. This is tested for all the image writers available with the
+ * IIORegistry.
+ */
+
+import java.io.FileOutputStream;
+import java.util.Iterator;
+
+import javax.imageio.ImageIO;
+import javax.imageio.ImageWriter;
+import javax.imageio.spi.IIORegistry;
+import javax.imageio.spi.ImageWriterSpi;
+import javax.imageio.stream.ImageOutputStream;
+
+public class WriteNullImageTest {
+
+ public WriteNullImageTest() {
+ boolean testFailed = false;
+ String failMsg = "FAIL: IllegalArgumentException is not thrown by the " +
+ "ImageWriter when the image passed to the write() method is " +
+ "null, for the image formats: ";
+
+ try {
+ IIORegistry reg = IIORegistry.getDefaultInstance();
+ ImageWriter writer = null;
+ Iterator writerSpiIter = reg.getServiceProviders(ImageWriterSpi.class, true);
+
+ while (writerSpiIter.hasNext()) {
+ ImageWriterSpi writerSpi = (ImageWriterSpi) writerSpiIter.next();
+ writer = writerSpi.createWriterInstance();
+ String names[] = writerSpi.getFormatNames();
+
+ FileOutputStream fos = new FileOutputStream("temp");
+ ImageOutputStream ios = ImageIO.createImageOutputStream(fos);
+ writer.setOutput(ios);
+
+ try {
+ writer.write(null, null, null);
+ } catch (IllegalArgumentException iae) {
+ System.out.println("PASS: Expected exception is thrown when null img is passed " +
+ "to the write method, for the image format: " + names[0]);
+ System.out.println("\n");
+ } catch (Exception e) {
+ testFailed = true;
+ failMsg = failMsg + names[0] + ", ";
+ }
+ }
+
+ } catch (Exception e) {
+ testFailed = true;
+ throw new RuntimeException("Test Failed. Exception thrown: " + e.toString());
+ }
+ if (testFailed) {
+ failMsg = failMsg.substring(0, failMsg.lastIndexOf(","));
+ throw new RuntimeException(failMsg);
+ }
+ }
+
+ public static void main(String args[]) {
+ WriteNullImageTest test = new WriteNullImageTest();
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/event/WriteProgressListenerTest.java Sat Jun 03 03:48:03 2017 +0000
@@ -0,0 +1,154 @@
+/*
+ * Copyright (c) 2001, 2017, 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 4420342 4421831
+ * @summary Checks that IIOWriteProgressListener methods are called in proper
+ * sequence for the JPEG and PNG writers
+ */
+
+import java.awt.image.BufferedImage;
+import java.io.File;
+import java.io.IOException;
+import java.util.Iterator;
+import javax.imageio.ImageIO;
+import javax.imageio.ImageWriter;
+import javax.imageio.event.IIOWriteProgressListener;
+import javax.imageio.stream.ImageOutputStream;
+
+public class WriteProgressListenerTest implements IIOWriteProgressListener {
+
+ final static int UNINITIALIZED = 0;
+ final static int IMAGE_STARTED = 1;
+ final static int IMAGE_COMPLETE = 2;
+
+ int state = UNINITIALIZED;
+ float prevPercentageDone = 0.0F;
+ File tempFile = null;
+
+ public WriteProgressListenerTest(String format) throws IOException {
+ ImageWriter writer = null;
+ Iterator witer = ImageIO.getImageWritersByFormatName(format);
+ if (!witer.hasNext()) {
+ error("No writer for format " + format + "!");
+ }
+ writer = (ImageWriter)witer.next();
+
+ System.out.println("Got writer " + writer);
+ writer.addIIOWriteProgressListener(this);
+
+ this.tempFile = File.createTempFile("imageio", ".tmp");
+ tempFile.deleteOnExit();
+ ImageOutputStream stream = ImageIO.createImageOutputStream(tempFile);
+ writer.setOutput(stream);
+
+ BufferedImage im =
+ new BufferedImage(100, 100, BufferedImage.TYPE_3BYTE_BGR);
+
+ this.state = UNINITIALIZED;
+
+ writer.write(im);
+
+ if (this.state == UNINITIALIZED) {
+ error("imageStarted never called!");
+ }
+ if (this.state != IMAGE_COMPLETE) {
+ error("imageComplete not called!");
+ }
+
+ print("Passed!");
+ }
+
+ private void error(String s) {
+ if (tempFile != null) {
+ tempFile.delete();
+ }
+ throw new RuntimeException(s);
+ }
+
+ private void print(String s) {
+ System.out.println(s);
+ }
+
+ public void sequenceStarted(ImageWriter source) {
+ error("Obsolete method sequenceStarted was called!");
+ }
+
+ public void sequenceComplete(ImageWriter source) {
+ error("Obsolete method sequenceComplete was called!");
+ }
+
+ public void imageStarted(ImageWriter source, int imageIndex) {
+ print("imageStarted: imageIndex = " + imageIndex);
+
+ if (state != UNINITIALIZED) {
+ error("imageStarted not called first!");
+ }
+ state = IMAGE_STARTED;
+ prevPercentageDone = 0.0F;
+ }
+
+ public void imageProgress(ImageWriter source,
+ float percentageDone) {
+ print("imageProgress: percentageDone = " + percentageDone);
+
+ if (state != IMAGE_STARTED) {
+ error("imageProgress called without prior imageStarted!");
+ }
+ if (percentageDone < prevPercentageDone) {
+ error("percentageDone did not increase!");
+ }
+ prevPercentageDone = percentageDone;
+ }
+
+ public void imageComplete(ImageWriter source) {
+ print("imageComplete");
+
+ if (state != IMAGE_STARTED) {
+ error("imageComplete called without imageStarted!");
+ }
+ if (prevPercentageDone == 0.0F) {
+ error("percentageDone was never updated!");
+ }
+ state = IMAGE_COMPLETE;
+ }
+
+ public void thumbnailStarted(ImageWriter source,
+ int imageIndex, int thumbnailIndex) {
+ }
+
+ public void thumbnailProgress(ImageWriter source, float percentageDone) {
+ }
+
+ public void thumbnailComplete(ImageWriter source) {
+ }
+
+ public void writeAborted(ImageWriter source) {
+ }
+
+ public static void main(String[] args) throws IOException {
+ new WriteProgressListenerTest("jpeg");
+ new WriteProgressListenerTest("png");
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/plugins/bmp/BMPCompressionTest.java Sat Jun 03 03:48:03 2017 +0000
@@ -0,0 +1,433 @@
+/*
+ * Copyright (c) 2003, 2017, 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 4641872
+ * @summary Tests writing compression modes of BMP plugin
+ * @modules java.desktop/com.sun.imageio.plugins.bmp
+ */
+
+import java.awt.Color;
+import java.awt.Dimension;
+import java.awt.Graphics;
+import java.awt.Graphics2D;
+import java.awt.Transparency;
+import java.awt.color.ColorSpace;
+import java.awt.image.BufferedImage;
+import java.awt.image.ColorModel;
+import java.awt.image.ComponentColorModel;
+import java.awt.image.DataBuffer;
+import java.awt.image.DirectColorModel;
+import java.awt.image.IndexColorModel;
+import java.awt.image.PixelInterleavedSampleModel;
+import java.awt.image.Raster;
+import java.awt.image.SampleModel;
+import java.awt.image.SinglePixelPackedSampleModel;
+import java.awt.image.WritableRaster;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.util.Arrays;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+
+import javax.imageio.IIOImage;
+import javax.imageio.ImageIO;
+import javax.imageio.ImageReader;
+import javax.imageio.ImageTypeSpecifier;
+import javax.imageio.ImageWriteParam;
+import javax.imageio.ImageWriter;
+import javax.imageio.metadata.IIOMetadata;
+import javax.imageio.plugins.bmp.BMPImageWriteParam;
+import javax.imageio.stream.ImageOutputStream;
+import javax.swing.JComponent;
+import javax.swing.JFrame;
+
+import com.sun.imageio.plugins.bmp.BMPMetadata;
+
+public class BMPCompressionTest {
+
+ static final String format = "BMP";
+
+ public static void main(String[] args) {
+
+ ImageWriter iw = null;
+ Iterator writers = ImageIO.getImageWritersByFormatName(format);
+ if (!writers.hasNext()) {
+ throw new RuntimeException("No available Image writer for "+format);
+ }
+ iw = (ImageWriter)writers.next();
+
+
+ Iterator tests = Test.createTestSet(iw);
+
+ while(tests.hasNext()) {
+
+ Test t = (Test)tests.next();
+ System.out.println(t.getDescription());
+ t.doTest();
+ }
+
+ }
+
+
+ static class Test {
+ static ImageWriter iw;
+ private BufferedImage img;
+ private String description;
+ private BMPImageWriteParam param;
+ private IIOMetadata meta;
+
+
+ public static Iterator createTestSet(ImageWriter w) {
+ List l = new LinkedList();
+
+ Test.iw = w;
+
+ // variate compression types
+ BMPImageWriteParam param = (BMPImageWriteParam)iw.getDefaultWriteParam();
+ param.setCompressionMode(ImageWriteParam.MODE_EXPLICIT);
+ param.setCompressionType("BI_RGB");
+ if (param.canWriteCompressed()) {
+ String[] cTypes = param.getCompressionTypes();
+ String[] cDescr = param.getCompressionQualityDescriptions();
+ float[] cValues = param.getCompressionQualityValues();
+
+ if (cDescr == null) {
+ System.out.println("There are no compression quality description!");
+ } else {
+ for(int i=0; i<cDescr.length; i++) {
+ System.out.println("Quality[" + i + "]=\""+cDescr[i]+"\"");
+ }
+ }
+ if (cValues == null) {
+ System.out.println("There are no compression quality values!");
+ } else {
+ for(int i=0; i<cValues.length; i++) {
+ System.out.println("Value["+i+"]=\""+cValues[i]+"\"");
+ }
+ }
+
+ for(int i=0; i<cTypes.length; i++) {
+ String compressionType = cTypes[i];
+ BufferedImage img = null;
+
+ int type = BufferedImage.TYPE_INT_BGR;
+ try {
+ img = createTestImage(type);
+ if (compressionType.equals("BI_RLE8")) {
+ img = createTestImage2(8, DataBuffer.TYPE_BYTE);
+ } else if (compressionType.equals("BI_RLE4")) {
+ img = createTestImage3(4, DataBuffer.TYPE_BYTE);
+ } else if (compressionType.equals("BI_BITFIELDS")) {
+ img = createTestImage4(32);
+ }
+
+ } catch (IOException ex) {
+ throw new RuntimeException("Unable to create test image");
+ }
+ BMPImageWriteParam p = (BMPImageWriteParam)iw.getDefaultWriteParam();
+ System.out.println("Current compression type is \""+cTypes[i]+"\"");
+ p.setCompressionMode(ImageWriteParam.MODE_EXPLICIT);
+ p.setCompressionType(compressionType);
+
+ IIOMetadata md = iw.getDefaultImageMetadata(new ImageTypeSpecifier(img), p);
+
+ l.add( new Test(p, md, img));
+ }
+ }
+ // }
+ return l.iterator();
+
+ }
+
+ private Test(BMPImageWriteParam p, IIOMetadata md, BufferedImage i) {
+ param = p;
+ meta = md;
+ img = i;
+
+
+ description = "Compression type is " + p.getCompressionType();
+ }
+
+ public String getDescription() {
+ return description;
+ }
+
+ public void doTest() {
+ try {
+ System.out.println(this.getDescription());
+ if (param.getCompressionMode() != ImageWriteParam.MODE_EXPLICIT) {
+ System.out.println("Warning: compression mode is not MODE_EXPLICIT");
+ }
+ // change metadata according to ImageWriteParam
+ IIOMetadata new_meta = iw.convertImageMetadata(meta, new ImageTypeSpecifier(img), param);
+
+ IIOImage iio_img = new IIOImage(img, null, new_meta);
+
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+ ImageOutputStream ios = ImageIO.createImageOutputStream(baos);
+ iw.setOutput(ios);
+ System.out.print("write image...");
+ System.out.println("Current compression Type is \""+param.getCompressionType()+"\"");
+ iw.write(new_meta, iio_img, param);
+ //iw.write(iio_img);
+ System.out.println("OK");
+ System.out.print("read image ... ");
+ ios.flush();
+
+ byte[] ba_image = baos.toByteArray();
+
+ System.out.println("Array length=" + ba_image.length);
+ FileOutputStream fos = new FileOutputStream(new File(param.getCompressionType()+".bmp"));
+ fos.write(ba_image);
+ fos.flush();
+ fos = null;
+ ByteArrayInputStream bais = new ByteArrayInputStream(ba_image);
+
+ ImageReader ir = ImageIO.getImageReader(iw);
+ ir.setInput(ImageIO.createImageInputStream(bais));
+
+ BufferedImage res = ir.read(0);
+ System.out.println("OK");
+
+ if (!param.getCompressionType().equals("BI_JPEG")) {
+ System.out.print("compare images ... ");
+ boolean r = compare(img,res);
+ System.out.println(r?"OK":"FAILED");
+ if (!r) {
+ throw new RuntimeException("Compared images are not equals. Test failed.");
+ }
+ }
+
+
+ BMPMetadata mdata = (BMPMetadata)ir.getImageMetadata(0);
+
+ if (!param.getCompressionType().equals(param.getCompressionTypes()[mdata.compression])) {
+ throw new RuntimeException("Different compression value");
+ }
+
+ } catch (Exception ex) {
+ ex.printStackTrace();
+ throw new RuntimeException("Unexpected exception: " + ex);
+ }
+
+ }
+
+ private boolean compare(final BufferedImage in, final BufferedImage out) {
+
+ final int width = in.getWidth();
+ int height = in.getHeight();
+ if (out.getWidth() != width || out.getHeight() != height) {
+ throw new RuntimeException("Dimensions changed!");
+ }
+
+ Raster oldras = in.getRaster();
+ ColorModel oldcm = in.getColorModel();
+ Raster newras = out.getRaster();
+ ColorModel newcm = out.getColorModel();
+
+ for (int j = 0; j < height; j++) {
+ for (int i = 0; i < width; i++) {
+ Object oldpixel = oldras.getDataElements(i, j, null);
+ int oldrgb = oldcm.getRGB(oldpixel);
+ int oldalpha = oldcm.getAlpha(oldpixel);
+
+ Object newpixel = newras.getDataElements(i, j, null);
+ int newrgb = newcm.getRGB(newpixel);
+ int newalpha = newcm.getAlpha(newpixel);
+
+ if (newrgb != oldrgb ||
+ newalpha != oldalpha) {
+ // showDiff(in, out);
+ throw new RuntimeException("Pixels differ at " + i +
+ ", " + j + " new = " + Integer.toHexString(newrgb) + " old = " + Integer.toHexString(oldrgb));
+ }
+ }
+ }
+ return true;
+ }
+
+ private static BufferedImage createTestImage2(int nbits, int transfertype) {
+ final int colorShift = 2;
+ int SIZE = 256;
+ BufferedImage image = null;
+
+ ColorSpace colorSpace =
+ ColorSpace.getInstance(ColorSpace.CS_GRAY);
+ ColorModel colorModel =
+ new ComponentColorModel(colorSpace,
+ new int[] {nbits},
+ false,
+ false,
+ Transparency.OPAQUE,
+ transfertype);
+
+ SampleModel sampleModel =
+ new PixelInterleavedSampleModel(transfertype,
+ SIZE,
+ SIZE,
+ 1,
+ SIZE,
+ new int[] {0});
+
+ image =
+ new BufferedImage(colorModel,
+ Raster.createWritableRaster(sampleModel, null),
+ false, null);
+ WritableRaster raster = image.getWritableTile(0, 0);
+ int[] samples = raster.getSamples(0, 0, SIZE, SIZE, 0, (int[])null);
+ int off = 0;
+ int[] row = new int[SIZE];
+ for(int i = 0; i < SIZE; i++) {
+ Arrays.fill(row, i << colorShift);
+ System.arraycopy(row, 0, samples, off, SIZE);
+ off += SIZE;
+ }
+ raster.setSamples(0, 0, SIZE, SIZE, 0, samples);
+
+ return image;
+ }
+
+
+ private static BufferedImage createTestImage3(int nbits, int transfertype) {
+ final int colorShift = 2;
+ int SIZE = 256;
+ BufferedImage image = null;
+
+ ColorSpace colorSpace =
+ ColorSpace.getInstance(ColorSpace.CS_sRGB);
+ ColorModel colorModel =
+ new IndexColorModel(nbits,
+ 4,
+ new byte[] { (byte)255, 0, 0, (byte)255},
+ new byte[] { 0, (byte)255, 0, (byte)255},
+ new byte[] { 0, 0, (byte)255, (byte)255});
+
+ SampleModel sampleModel =
+ new PixelInterleavedSampleModel(transfertype,
+ SIZE,
+ SIZE,
+ 1,
+ SIZE,
+ new int[] {0});
+
+ image =
+ new BufferedImage(colorModel,
+ Raster.createWritableRaster(sampleModel, null),
+
+ false, null);
+
+ Graphics2D g = image.createGraphics();
+ g.setColor(Color.white);
+ g.fillRect(0,0, SIZE, SIZE);
+ g.setColor(Color.red);
+ g.fillOval(10, 10, SIZE -20, SIZE-20);
+
+ return image;
+ }
+
+ private static BufferedImage createTestImage4(int nbits) {
+ int SIZE = 10;
+
+
+ BufferedImage image = null;
+
+ ColorSpace colorSpace =
+ ColorSpace.getInstance(ColorSpace.CS_sRGB);
+ ColorModel colorModel =
+ new DirectColorModel(colorSpace,
+ nbits, 0xff0000, 0x00ff00, 0x0000ff, 0x000000, false, DataBuffer.TYPE_INT);
+
+ SampleModel sampleModel =
+ new SinglePixelPackedSampleModel(DataBuffer.TYPE_INT,
+ SIZE,
+ SIZE,
+ new int[] { 0xff0000, 0x00ff00, 0x0000ff} );
+
+
+ image =
+ new BufferedImage(colorModel,
+ Raster.createWritableRaster(sampleModel, null),
+
+ false, null);
+
+ Graphics2D g = image.createGraphics();
+ g.setColor(Color.red);
+ g.fillRect(0,0, SIZE, SIZE);
+ g.setColor(Color.green);
+ //g.fillOval(10, 10, SIZE -20, SIZE-20);
+ g.drawLine(7, 0, 7, SIZE);
+ g.setColor(Color.blue);
+ g.drawLine(1, 0, 1, SIZE);
+ g.setColor(Color.white);
+ g.drawLine(3, 0, 3, SIZE);
+ g.setColor(Color.yellow);
+ g.drawLine(5, 0, 5, SIZE);
+ return image;
+ }
+
+ private static BufferedImage createTestImage(int type)
+ throws IOException {
+
+ int w = 200;
+ int h = 200;
+ BufferedImage b = new BufferedImage(w, h, type);
+ Graphics2D g = b.createGraphics();
+ g.setColor(Color.white);
+ g.fillRect(0,0, w, h);
+ g.setColor(Color.black);
+ g.fillOval(10, 10, w -20, h-20);
+
+ return b;
+ }
+
+
+ }
+
+ private static void showDiff(final BufferedImage in,
+ final BufferedImage out) {
+ final int width = in.getWidth();
+ final int height = in.getHeight();
+
+ JFrame f = new JFrame("");
+ f.getContentPane().add( new JComponent() {
+ public Dimension getPreferredSize() {
+ return new Dimension(2*width+2, height);
+ }
+ public void paintComponent(Graphics g) {
+ g.setColor(Color.black);
+ g.drawImage(in, 0,0, null);
+
+ g.drawImage(out, width+2, 0, null);
+ }
+ });
+ f.pack();
+ f.setVisible(true);
+ }
+
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/plugins/bmp/BMPPluginTest.java Sat Jun 03 03:48:03 2017 +0000
@@ -0,0 +1,241 @@
+/*
+ * Copyright (c) 2003, 2017, 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 4641872 4892194
+ * @summary Tests writing and reading abilities of BMP plugin
+ */
+
+import java.awt.Color;
+import java.awt.Graphics2D;
+import java.awt.image.BufferedImage;
+import java.awt.image.ColorModel;
+import java.awt.image.Raster;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.util.Iterator;
+
+import javax.imageio.IIOException;
+import javax.imageio.IIOImage;
+import javax.imageio.ImageIO;
+import javax.imageio.ImageReader;
+import javax.imageio.ImageTypeSpecifier;
+import javax.imageio.ImageWriteParam;
+import javax.imageio.ImageWriter;
+import javax.imageio.metadata.IIOMetadata;
+import javax.imageio.spi.ImageWriterSpi;
+
+public class BMPPluginTest {
+
+ private static final int[] types = {
+ BufferedImage.TYPE_INT_RGB, // = 1;
+ BufferedImage.TYPE_INT_ARGB, // = 2;
+ BufferedImage.TYPE_INT_ARGB_PRE, // = 3;
+ BufferedImage.TYPE_INT_BGR, // = 4;
+ BufferedImage.TYPE_3BYTE_BGR, // = 5;
+ BufferedImage.TYPE_4BYTE_ABGR, // = 6;
+ BufferedImage.TYPE_4BYTE_ABGR_PRE, // 7
+ BufferedImage.TYPE_USHORT_565_RGB, // 8
+ BufferedImage.TYPE_USHORT_555_RGB, // 9
+ BufferedImage.TYPE_BYTE_GRAY, // 10
+ BufferedImage.TYPE_USHORT_GRAY, //11
+ BufferedImage.TYPE_BYTE_BINARY, //12
+ BufferedImage.TYPE_BYTE_INDEXED //13
+ };
+
+ private static String format = "BMP";
+
+ private static ImageReader ir = null;
+ private static ImageWriter iw = null;
+ private BufferedImage img;
+ private ImageWriteParam param;
+ private ByteArrayOutputStream baos;
+
+ private static void init() {
+
+ Iterator i = ImageIO.getImageWritersByFormatName(format);
+ if (!i.hasNext()) {
+ throw new RuntimeException("No available ImageWrites for "+format+" format!");
+ }
+ iw = (ImageWriter)i.next();
+
+ i = ImageIO.getImageReadersByFormatName(format);
+ if (!i.hasNext()) {
+ throw new RuntimeException("No available ImageReaders for " +format+" format!");
+ }
+
+ ir = (ImageReader)i.next();
+ }
+
+ public static void main(String[] args) {
+ if (args.length > 0) {
+ format = args[0];
+ System.out.println("Test format " + format);
+ }
+
+ init();
+ System.out.println("IR="+ir);
+ System.out.println("IW="+iw);
+ ImageIO.setUseCache(false);
+
+ for (int i=0; i<types.length; i++) {
+ boolean bPassed = true;
+ Object reason = null;
+
+ try {
+
+ BufferedImage image = createTestImage(types[i]);
+
+ ImageWriteParam param = iw.getDefaultWriteParam();
+
+ BMPPluginTest t = new BMPPluginTest(image, param);
+ boolean res = false;
+ res = t.test();
+ if (!res) {
+ bPassed = false;
+ reason = new String("Null result");
+ }
+ } catch (IllegalArgumentException ex) {
+ System.out.println("Expected exception type was caught: " + ex);
+
+ } catch (Throwable ex ) {
+ System.out.println("FAILED");
+ ex.printStackTrace();
+ bPassed = false;
+ reason = ex;
+ throw new RuntimeException("Test for type " + types[i] + " FAILED due to exception");
+ }
+/*
+ System.out.println("Type " + types[i] + " result: " +
+ (bPassed ? "PASSED" : "FAILED") +
+ ((reason != null) ? (" Reason: " + reason) : ""));
+*/
+ System.out.println("Test for type " + types[i] + " PASSED");
+ }
+
+ System.out.println("END OF TEST");
+ }
+
+ public BMPPluginTest(BufferedImage img, ImageWriteParam param) {
+
+ this.img = img;
+ this.param = param;
+ baos = new ByteArrayOutputStream();
+ }
+
+ public boolean test() throws IIOException, IOException {
+
+ ir.reset();
+ iw.reset();
+
+ String[] suffixes = iw.getOriginatingProvider().getFileSuffixes();
+
+ IIOMetadata md = iw.getDefaultImageMetadata(new ImageTypeSpecifier(img), param);
+
+ System.out.println("Image type " + img.getType());
+
+ ImageWriterSpi spi = iw.getOriginatingProvider();
+ boolean bCanEncode = spi.canEncodeImage(img);
+
+ System.out.println("Can encode image? " + (bCanEncode ? "YES" : "NO"));
+ if (!bCanEncode) {
+ return true;
+ }
+ IIOImage iio_img = new IIOImage(img, null, md);
+
+ String fname = "test"+img.getType()+"."+suffixes[0];
+
+ iw.setOutput(ImageIO.createImageOutputStream(new FileOutputStream(new File(fname))));
+ System.out.print("write image ... ");
+ iw.write(iio_img);
+ System.out.println("OK");
+ System.out.print("read image ... ");
+
+ byte[] ba_image = baos.toByteArray();
+
+ ByteArrayInputStream bais = new ByteArrayInputStream(ba_image);
+
+ ir.setInput(ImageIO.createImageInputStream(new FileInputStream(new File(fname))));
+
+ BufferedImage res = ir.read(0);
+ System.out.println("OK");
+
+ System.out.print("compare images ... ");
+ boolean r = compare(img,res);
+ System.out.println(r?"OK":"FAILED");
+ return r;
+ }
+
+ private boolean compare(BufferedImage in, BufferedImage out) {
+ int width = in.getWidth();
+ int height = in.getHeight();
+ if (out.getWidth() != width || out.getHeight() != height) {
+ throw new RuntimeException("Dimensions changed!");
+ }
+
+ Raster oldras = in.getRaster();
+ ColorModel oldcm = in.getColorModel();
+ Raster newras = out.getRaster();
+ ColorModel newcm = out.getColorModel();
+
+ for (int j = 0; j < height; j++) {
+ for (int i = 0; i < width; i++) {
+ Object oldpixel = oldras.getDataElements(i, j, null);
+ int oldrgb = oldcm.getRGB(oldpixel);
+ int oldalpha = oldcm.getAlpha(oldpixel);
+
+ Object newpixel = newras.getDataElements(i, j, null);
+ int newrgb = newcm.getRGB(newpixel);
+ int newalpha = newcm.getAlpha(newpixel);
+
+ if (newrgb != oldrgb ||
+ newalpha != oldalpha) {
+ throw new RuntimeException("Pixels differ at " + i +
+ ", " + j);
+ }
+ }
+ }
+ return true;
+ }
+
+
+ private static BufferedImage createTestImage(int type) throws IOException {
+
+ int w = 200;
+ int h = 200;
+ BufferedImage b = new BufferedImage(w, h, type);
+ Graphics2D g = b.createGraphics();
+ g.setColor(Color.white);
+ g.fillRect(0,0, w, h);
+ g.setColor(Color.black);
+ g.fillOval(10, 10, w -20, h-20);
+
+ return b;
+ }
+
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/plugins/bmp/BMPWriteParamTest.java Sat Jun 03 03:48:03 2017 +0000
@@ -0,0 +1,175 @@
+/*
+ * Copyright (c) 2003, 2017, 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 4641872
+ * @summary Tests writing compression modes of BMP plugin
+ */
+
+import java.awt.Color;
+import java.awt.Graphics2D;
+import java.awt.Rectangle;
+import java.awt.image.BufferedImage;
+import java.awt.image.ColorModel;
+import java.awt.image.Raster;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.util.Iterator;
+
+import javax.imageio.IIOImage;
+import javax.imageio.ImageIO;
+import javax.imageio.ImageReader;
+import javax.imageio.ImageTypeSpecifier;
+import javax.imageio.ImageWriteParam;
+import javax.imageio.ImageWriter;
+import javax.imageio.metadata.IIOMetadata;
+import javax.imageio.stream.ImageOutputStream;
+
+public class BMPWriteParamTest {
+
+ static final String format = "BMP";
+
+ public static void main(String[] args) {
+
+ ImageWriter iw = null;
+ Iterator writers = ImageIO.getImageWritersByFormatName(format);
+ if (!writers.hasNext()) {
+ throw new RuntimeException("No available Image writer for "+format);
+ }
+ iw = (ImageWriter)writers.next();
+
+ try {
+ BufferedImage img = createTestImage();
+
+ BufferedImage bmp_res = getWriteResult(img, "BMP");
+ BufferedImage png_res = getWriteResult(img, "PNG");
+
+ compare(bmp_res, png_res);
+ } catch (Exception ex) {
+ ex.printStackTrace();
+ throw new RuntimeException("Unexpected exception: " + ex);
+ }
+ }
+
+ private static BufferedImage getWriteResult(BufferedImage img,
+ String format
+ ) throws IOException {
+ ImageWriter iw = null;
+ Iterator writers = ImageIO.getImageWritersByFormatName(format);
+ while (writers.hasNext()) {
+ iw = (ImageWriter)writers.next();
+ System.out.println(format + " -> " + iw.toString());
+ }
+ if (iw==null) {
+ throw new RuntimeException("No available Image writer for "+format);
+ }
+ ImageWriteParam param = iw.getDefaultWriteParam();
+
+ param.setSourceRegion(new Rectangle(10, 10, 31, 31));
+ param.setSourceSubsampling(3, 3, 0, 0);
+
+ IIOMetadata meta = iw.getDefaultImageMetadata(new ImageTypeSpecifier(img), param);
+
+ IIOImage iio_img = new IIOImage(img, null, meta);
+
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+ ImageOutputStream ios = ImageIO.createImageOutputStream(baos);
+ iw.setOutput(ios);
+ iw.write(meta, iio_img, param);
+ ios.flush();
+
+ byte[] ba_image = baos.toByteArray();
+
+ ByteArrayInputStream bais = new ByteArrayInputStream(ba_image);
+
+ ImageReader ir = null;
+
+ Iterator readers = ImageIO.getImageReadersByFormatName(format);
+ while (readers.hasNext()) {
+ ir = (ImageReader)readers.next();
+ System.out.println(format + " -> " + ir.toString());
+ }
+ if (ir==null) {
+ throw new RuntimeException("No available Image reader for "+format);
+ }
+
+ ir.setInput(ImageIO.createImageInputStream(bais));
+
+ BufferedImage res = ir.read(0);
+ return res;
+ }
+
+ private static BufferedImage createTestImage()
+ throws IOException {
+
+ int w = 50;
+ int h = 50;
+ BufferedImage b = new BufferedImage(w, h, BufferedImage.TYPE_INT_RGB);
+ Graphics2D g = b.createGraphics();
+ g.setColor(Color.red);
+ g.fillRect(0,0, w, h);
+ g.setColor(Color.white);
+ for (int i=10; i<=10+30; i+= 3) {
+ g.drawLine(i, 10, i, 40);
+ g.drawLine(10, i, 40, i);
+ }
+ return b;
+ }
+
+ private static boolean compare(final BufferedImage in,
+ final BufferedImage out)
+ {
+ final int width = in.getWidth();
+ int height = in.getHeight();
+ if (out.getWidth() != width || out.getHeight() != height) {
+ throw new RuntimeException("Dimensions changed!");
+ }
+
+ Raster oldras = in.getRaster();
+ ColorModel oldcm = in.getColorModel();
+ Raster newras = out.getRaster();
+ ColorModel newcm = out.getColorModel();
+
+ for (int j = 0; j < height; j++) {
+ for (int i = 0; i < width; i++) {
+ Object oldpixel = oldras.getDataElements(i, j, null);
+ int oldrgb = oldcm.getRGB(oldpixel);
+ int oldalpha = oldcm.getAlpha(oldpixel);
+
+ Object newpixel = newras.getDataElements(i, j, null);
+ int newrgb = newcm.getRGB(newpixel);
+ int newalpha = newcm.getAlpha(newpixel);
+
+ if (newrgb != oldrgb ||
+ newalpha != oldalpha) {
+ // showDiff(in, out);
+ throw new RuntimeException("Pixels differ at " + i +
+ ", " + j + " new = " + Integer.toHexString(newrgb) + " old = " + Integer.toHexString(oldrgb));
+ }
+ }
+ }
+ return true;
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/plugins/bmp/BmpBigDestinationTest.java Sat Jun 03 03:48:03 2017 +0000
@@ -0,0 +1,106 @@
+/*
+ * Copyright (c) 2003, 2017, 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 4929367
+ * @summary tests what BMP image was decoded correctly if destination buffered
+ * image is bigger than source image
+ */
+
+import java.awt.Color;
+import java.awt.Graphics2D;
+import java.awt.image.BufferedImage;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.util.Iterator;
+
+import javax.imageio.ImageIO;
+import javax.imageio.ImageReadParam;
+import javax.imageio.ImageReader;
+import javax.imageio.ImageTypeSpecifier;
+import javax.imageio.ImageWriter;
+
+public class BmpBigDestinationTest {
+ static String format = "BMP";
+ public static void main(String[] args) {
+ try {
+ BufferedImage src = new BufferedImage(100, 100,
+ BufferedImage.TYPE_INT_RGB);
+ Graphics2D g = src.createGraphics();
+ g.setColor(Color.red);
+ g.fillRect(0,0,100, 100);
+
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+
+ ImageWriter iw =
+ (ImageWriter)ImageIO.getImageWritersByFormatName(format).next();
+ if (iw == null) {
+ throw new RuntimeException("No writer available. Test failed.");
+ }
+
+ iw.setOutput(ImageIO.createImageOutputStream(baos));
+ iw.write(src);
+
+ byte[] data = baos.toByteArray();
+
+ ImageReader ir =
+ (ImageReader)ImageIO.getImageReadersByFormatName(format).next();
+ ir.setInput(
+ ImageIO.createImageInputStream(
+ new ByteArrayInputStream(data)));
+
+ Iterator specifiers = ir.getImageTypes(0);
+ ImageTypeSpecifier typeSpecifier = null;
+
+ if (specifiers.hasNext()) {
+ typeSpecifier = (ImageTypeSpecifier) specifiers.next();
+ }
+ ImageReadParam param = new ImageReadParam();
+ BufferedImage dst = typeSpecifier.createBufferedImage(200, 200);
+ param.setDestination(dst);
+
+ ir.read(0, param);
+
+ checkResults(src,dst);
+
+ } catch (IOException e) {
+ e.printStackTrace();
+ throw new RuntimeException("Unexpected exception. Test failed.");
+ }
+ }
+
+ private static void checkResults(BufferedImage src, BufferedImage dst) {
+ for(int x=0; x<src.getWidth(); x++) {
+ for(int y=0; y<src.getHeight(); y++) {
+ int srcRgb = src.getRGB(x,y);
+ int dstRgb = dst.getRGB(x,y);
+ if (srcRgb != dstRgb) {
+ throw new RuntimeException("Images are different at point ["
+ + x + "," + y + "]");
+ }
+ }
+ }
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/plugins/bmp/BmpDefaultImageMetadataTest.java Sat Jun 03 03:48:03 2017 +0000
@@ -0,0 +1,151 @@
+/*
+ * Copyright (c) 2003, 2017, 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 4895512
+ * @summary Test that default image metadata for BMP image writer is not null
+ */
+
+import java.awt.Color;
+import java.awt.Graphics;
+import java.awt.image.BufferedImage;
+import java.util.Iterator;
+
+import javax.imageio.ImageIO;
+import javax.imageio.ImageTypeSpecifier;
+import javax.imageio.ImageWriteParam;
+import javax.imageio.ImageWriter;
+import javax.imageio.metadata.IIOMetadata;
+
+import org.w3c.dom.NamedNodeMap;
+import org.w3c.dom.Node;
+
+public class BmpDefaultImageMetadataTest {
+ ImageWriter writer = null;
+ IIOMetadata imageData = null;
+ ImageWriteParam writeParam = null;
+ BufferedImage bimg = null;
+
+ public BmpDefaultImageMetadataTest(String format) {
+ try {
+ bimg = new BufferedImage(200, 200, bimg.TYPE_INT_RGB);
+ Graphics gg = bimg.getGraphics();
+ gg.setColor(Color.red);
+ gg.fillRect(50, 50, 100, 100);
+
+ Iterator it = ImageIO.getImageWritersByFormatName(format);
+ if (it.hasNext()) {
+ writer = (ImageWriter) it.next();
+ }
+ if (writer == null) {
+ throw new RuntimeException("No writer available for the given format."
+ + " Test failed.");
+ }
+ writeParam = writer.getDefaultWriteParam();
+
+ System.out.println("Testing Image Metadata for "+format+"\n");
+ imageData = writer.getDefaultImageMetadata(new ImageTypeSpecifier(bimg), writeParam);
+ if (imageData == null) {
+ System.out.println("return value is null. No default image metadata is associated with "+format+" writer");
+ throw new RuntimeException("Default image metadata is null."
+ + " Test failed.");
+ }
+ int j = 0;
+ String imageDataNames[] = null;
+ if(imageData != null) {
+ System.out.println("Is standard metadata format supported (Image) ? "+
+ imageData.isStandardMetadataFormatSupported() );
+ imageDataNames = imageData.getMetadataFormatNames();
+ System.out.println("\nAll supported Metadata Format Names\n");
+ if(imageDataNames!=null){
+ for(j=0; j<imageDataNames.length; j++) {
+ System.out.println("FORMAT NAME: "+imageDataNames[j]);
+ if (imageDataNames[j].equals(imageData.getNativeMetadataFormatName())) {
+ System.out.println("This is a Native Metadata format\n");
+ } else {
+ System.out.println("\n");
+ }
+ System.out.println("");
+ System.out.println("IIOImageMetadata DOM tree for "+imageDataNames[j]);
+ System.out.println("");
+ Node imageNode = imageData.getAsTree(imageDataNames[j]);
+ displayMetadata(imageNode);
+ System.out.println("\n\n");
+ }
+ }
+ }
+ }catch(Exception e){
+ e.printStackTrace();
+ throw new RuntimeException("Exception was thrown."
+ + " Test failed.");
+ }
+ }
+
+ public void displayMetadata(Node root) {
+ displayMetadata(root, 0);
+ }
+
+ void indent(int level) {
+ for (int i = 0; i < level; i++) {
+ System.out.print(" ");
+ }
+ }
+
+ void displayMetadata(Node node, int level) {
+ indent(level); // emit open tag
+ System.out.print("<" + node.getNodeName());
+ NamedNodeMap map = node.getAttributes();
+ if (map != null) { // print attribute values
+ int length = map.getLength();
+ for (int i = 0; i < length; i++) {
+ Node attr = map.item(i);
+ System.out.print(" " + attr.getNodeName() +
+ "=\"" + attr.getNodeValue() + "\"");
+ }
+ }
+ Node child = node.getFirstChild();
+
+ if (node.getNodeValue() != null && !node.getNodeValue().equals("") ) {
+ System.out.println(">");
+ indent(level);
+ System.out.println(node.getNodeValue());
+ indent(level); // emit close tag
+ System.out.println("</" + node.getNodeName() + ">");
+ } else if (child != null) {
+ System.out.println(">"); // close current tag
+ while (child != null) { // emit child tags recursively
+ displayMetadata(child, level + 1);
+ child = child.getNextSibling();
+ }
+ indent(level); // emit close tag
+ System.out.println("</" + node.getNodeName() + ">");
+ } else {
+ System.out.println("/>");
+ }
+ }
+
+ public static void main(String args[]) {
+ BmpDefaultImageMetadataTest test = new BmpDefaultImageMetadataTest("bmp");
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/plugins/bmp/CompressionModeTest.java Sat Jun 03 03:48:03 2017 +0000
@@ -0,0 +1,96 @@
+/*
+ * Copyright (c) 2003, 2017, 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 4893464
+ * @summary Tests bmp writer behavior with different compression modes
+ */
+
+import java.awt.Color;
+import java.awt.Graphics;
+import java.awt.image.BufferedImage;
+import java.io.File;
+
+import javax.imageio.IIOImage;
+import javax.imageio.ImageIO;
+import javax.imageio.ImageTypeSpecifier;
+import javax.imageio.ImageWriteParam;
+import javax.imageio.ImageWriter;
+import javax.imageio.metadata.IIOMetadata;
+import javax.imageio.stream.ImageOutputStream;
+
+public class CompressionModeTest {
+
+ public static void main(String args[]) {
+ int[] iModes = { ImageWriteParam.MODE_DISABLED,
+ ImageWriteParam.MODE_EXPLICIT,
+ ImageWriteParam.MODE_COPY_FROM_METADATA,
+ ImageWriteParam.MODE_DEFAULT };
+
+ String[] strModes = { "ImageWriteParam.MODE_DISABLED",
+ "ImageWriteParam.MODE_EXPLICIT",
+ "ImageWriteParam.MODE_COPY_FROM_METADATA",
+ "ImageWriteParam.MODE_DEFAULT" };
+
+ for(int i=0; i<iModes.length; i++) {
+ System.out.println("Test compression mode "+strModes[i]);
+ doTest(iModes[i]);
+ }
+ }
+
+ private static void doTest(int mode) {
+ String fileFormat = "bmp";
+ try {
+ ImageWriter iw = (ImageWriter)ImageIO.getImageWritersBySuffix(fileFormat).next();
+ if(iw == null) {
+ throw new RuntimeException("No available image writer for "
+ + fileFormat
+ + " Test failed.");
+ }
+
+ File file = new File("image." + fileFormat);
+ ImageOutputStream ios = ImageIO.createImageOutputStream(file);
+ iw.setOutput(ios);
+
+ BufferedImage bimg = new BufferedImage(100,
+ 100, BufferedImage.TYPE_INT_RGB);
+ Graphics g = bimg.getGraphics();
+ g.setColor(Color.green);
+ g.fillRect(0,0,100,100);
+
+ ImageWriteParam param = iw.getDefaultWriteParam();
+
+ param.setCompressionMode(mode);
+
+ IIOMetadata meta = iw.getDefaultImageMetadata(new ImageTypeSpecifier(bimg),
+ param);
+
+ IIOImage iioImg = new IIOImage(bimg, null, meta);
+ iw.write(null, iioImg, param);
+ } catch(Exception e) {
+ e.printStackTrace();
+ throw new RuntimeException("Test failed.");
+ }
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/plugins/bmp/EmbeddedFormatTest.java Sat Jun 03 03:48:03 2017 +0000
@@ -0,0 +1,147 @@
+/*
+ * Copyright (c) 2005, 2017, 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 6294920 6294926
+ * @summary Test verifies that BMP images with compression types BI_JPEG and
+ * BI_PNG are read correctly in case of 1, 8, 16, 24 and 32 bpp
+ */
+
+import java.awt.Color;
+import java.awt.Graphics;
+import java.awt.image.BufferedImage;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+
+import javax.imageio.IIOImage;
+import javax.imageio.ImageIO;
+import javax.imageio.ImageReader;
+import javax.imageio.ImageWriteParam;
+import javax.imageio.ImageWriter;
+import javax.imageio.stream.ImageInputStream;
+import javax.imageio.stream.ImageOutputStream;
+
+public class EmbeddedFormatTest {
+ ImageWriter writer;
+ ImageReader reader;
+
+ static int[] bi_types = {
+ BufferedImage.TYPE_INT_RGB,
+ BufferedImage.TYPE_3BYTE_BGR,
+ BufferedImage.TYPE_USHORT_555_RGB,
+ BufferedImage.TYPE_BYTE_GRAY,
+ BufferedImage.TYPE_BYTE_BINARY
+ };
+
+ public EmbeddedFormatTest() {
+ writer = ImageIO.getImageWritersByFormatName("BMP").next();
+ reader = ImageIO.getImageReadersByFormatName("BMP").next();
+ }
+
+ public void doTest(String compression, int bi_type) throws IOException {
+ System.out.println("Test " + compression + " on " + getImageTypeName(bi_type));
+ BufferedImage src = createTestImage(bi_type);
+ writer.reset();
+
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+ ImageOutputStream ios =
+ ImageIO.createImageOutputStream(baos);
+ writer.setOutput(ios);
+
+ ImageWriteParam wparam = prepareWriteParam(compression);
+ writer.write(null, new IIOImage(src, null, null), wparam);
+ ios.flush();
+ ios.close();
+
+ // read result
+ ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
+ ImageInputStream iis = ImageIO.createImageInputStream(bais);
+ reader.reset();
+ reader.setInput(iis);
+
+ BufferedImage dst = reader.read(0);
+
+ checkResult(dst);
+ }
+
+ protected BufferedImage createTestImage(int type) {
+ BufferedImage img = new BufferedImage(200, 200, type);
+ Graphics g = img.createGraphics();
+ g.setColor(Color.black);
+ g.fillRect(0, 0, 200, 200);
+ g.setColor(Color.white);
+ g.fillRect(50, 50, 100, 100);
+
+ return img;
+ }
+
+ protected void checkResult(BufferedImage img) {
+ int imgBlack = img.getRGB(25, 25);
+ if (imgBlack != 0xff000000) {
+ throw new RuntimeException("Wrong black color: " +
+ Integer.toHexString(imgBlack));
+ }
+
+ int imgWhite = img.getRGB(100, 100);
+ if (imgWhite != 0xffffffff) {
+ throw new RuntimeException("Wrong white color: " +
+ Integer.toHexString(imgWhite));
+ }
+ }
+
+ protected ImageWriteParam prepareWriteParam(String compression) {
+ ImageWriteParam imageWriteParam = writer.getDefaultWriteParam();
+ imageWriteParam.setCompressionMode(ImageWriteParam.MODE_EXPLICIT);
+ imageWriteParam.setCompressionType(compression);
+ return imageWriteParam;
+ }
+
+
+ public static void main(String[] args) throws IOException {
+ EmbeddedFormatTest t = new EmbeddedFormatTest();
+
+ for (int i = 0; i < bi_types.length; i++) {
+ t.doTest("BI_JPEG", bi_types[i]);
+ t.doTest("BI_PNG", bi_types[i]);
+ }
+ }
+
+ static String getImageTypeName(int type) {
+ switch(type) {
+ case BufferedImage.TYPE_INT_RGB:
+ return "TYPE_INT_RGB";
+ case BufferedImage.TYPE_3BYTE_BGR:
+ return "TYPE_3BYTE_BGR";
+ case BufferedImage.TYPE_USHORT_555_RGB:
+ return "TYPE_USHORT_555_RGB";
+ case BufferedImage.TYPE_BYTE_GRAY:
+ return "TYPE_BYTE_GRAY";
+ case BufferedImage.TYPE_BYTE_BINARY:
+ return "TYPE_BYTE_BINARY";
+ default:
+ return "TBD";
+ }
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/plugins/bmp/EmptyInputBmpMetadataTest.java Sat Jun 03 03:48:03 2017 +0000
@@ -0,0 +1,62 @@
+/*
+ * Copyright (c) 2003, 2017, 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 4895483
+ * @summary Test checks that the IllegalStateException was thrown if input was
+ * not set to the BMPImageReader
+ */
+
+import java.io.IOException;
+
+import javax.imageio.ImageIO;
+import javax.imageio.ImageReader;
+import javax.imageio.metadata.IIOMetadata;
+
+public class EmptyInputBmpMetadataTest {
+ private static String fmt = "BMP";
+
+ public static void main(String[] args) {
+ boolean isPassed = false;
+ ImageReader ir = (ImageReader)ImageIO.getImageReadersByFormatName(fmt).next();
+
+ if (ir == null) {
+ throw new RuntimeException("No available reader for " + fmt);
+ }
+ IIOMetadata meta = null;
+ try {
+ meta = ir.getImageMetadata(0);
+ } catch (IllegalStateException e) {
+ System.out.println("Correct exception was thrown. Test passed.");
+ isPassed = true;
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+
+ if (!isPassed) {
+ throw new RuntimeException("The IllegalStateException was not thrown."
+ +"Test failed.");
+ }
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/plugins/bmp/NoExtraBytesTest.java Sat Jun 03 03:48:03 2017 +0000
@@ -0,0 +1,301 @@
+/*
+ * Copyright (c) 2006, 2017, 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 5076878
+ * @summary Test verifies that ImageIO creates BMP images with correct bpp
+ */
+
+import java.awt.Color;
+import java.awt.Graphics;
+import java.awt.Transparency;
+import java.awt.color.ColorSpace;
+import java.awt.image.BufferedImage;
+import java.awt.image.ColorModel;
+import java.awt.image.ComponentColorModel;
+import java.awt.image.DataBuffer;
+import java.awt.image.DirectColorModel;
+import java.awt.image.Raster;
+import java.awt.image.WritableRaster;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.util.Hashtable;
+
+import javax.imageio.IIOImage;
+import javax.imageio.ImageIO;
+import javax.imageio.ImageReader;
+import javax.imageio.metadata.IIOMetadata;
+import javax.imageio.stream.ImageInputStream;
+
+import org.w3c.dom.Node;
+
+public class NoExtraBytesTest {
+
+ private static Hashtable<Integer, Integer> tests = null;
+ private static Color[] usedColors = new Color[] { Color.red, Color.green, Color.blue, Color.yellow, Color.white, Color.black };
+
+ private static final int TYPE_INT_GRB = 0x100;
+ private static final int TYPE_INT_GBR = 0x101;
+ private static final int TYPE_INT_RBG = 0x102;
+ private static final int TYPE_INT_BRG = 0x103;
+ private static final int TYPE_INT_555_GRB = 0x104;
+ private static final int TYPE_3BYTE_RGB = 0x105;
+ private static final int TYPE_3BYTE_GRB = 0x106;
+
+ private static final int w = 300;
+ private static final int h = 200;
+ private static final int dx = w / usedColors.length;
+
+ public static void main(String[] args) throws IOException {
+ initTests();
+
+ for (Integer type : tests.keySet()) {
+ new NoExtraBytesTest(type.intValue(), tests.get(type).intValue()).doTest();
+ }
+ System.out.println("Test passed.");
+ }
+
+ private static void initTests() {
+ tests = new Hashtable<Integer, Integer>();
+
+ tests.put(new Integer(BufferedImage.TYPE_INT_RGB), new Integer(24));
+ tests.put(new Integer(BufferedImage.TYPE_INT_BGR), new Integer(24));
+ tests.put(new Integer(BufferedImage.TYPE_3BYTE_BGR), new Integer(24));
+ tests.put(new Integer(TYPE_INT_GRB), new Integer(24));
+ tests.put(new Integer(TYPE_INT_GBR), new Integer(24));
+ tests.put(new Integer(TYPE_INT_RBG), new Integer(24));
+ tests.put(new Integer(TYPE_INT_BRG), new Integer(24));
+ tests.put(new Integer(BufferedImage.TYPE_USHORT_555_RGB), new Integer(16));
+ tests.put(new Integer(BufferedImage.TYPE_USHORT_565_RGB), new Integer(16));
+ tests.put(new Integer(TYPE_INT_555_GRB), new Integer(16));
+ tests.put(new Integer(TYPE_3BYTE_RGB), new Integer(24));
+ tests.put(new Integer(TYPE_3BYTE_GRB), new Integer(24));
+ }
+
+ private static String getImageTypeName(int t) {
+ switch(t) {
+ case BufferedImage.TYPE_INT_RGB:
+ return "TYPE_INT_RGB";
+ case BufferedImage.TYPE_INT_BGR:
+ return "TYPE_INT_BGR";
+ case BufferedImage.TYPE_3BYTE_BGR:
+ return "TYPE_3BYTE_BGR";
+ case BufferedImage.TYPE_USHORT_555_RGB:
+ return "TYPE_USHORT_555_RGB";
+ case BufferedImage.TYPE_USHORT_565_RGB:
+ return "TYPE_USHORT_565_RGB";
+ case TYPE_INT_GRB:
+ return "TYPE_INT_GRB";
+ case TYPE_INT_GBR:
+ return "TYPE_INT_GBR";
+ case TYPE_INT_RBG:
+ return "TYPE_INT_RBG";
+ case TYPE_INT_BRG:
+ return "TYPE_INT_BRG";
+ case TYPE_INT_555_GRB:
+ return "TYPE_INT_555_GRB";
+ case TYPE_3BYTE_RGB:
+ return "TYPE_3BYTE_RGB";
+ case TYPE_3BYTE_GRB:
+ return "TYPE_3BYTE_GRB";
+ default:
+ throw new IllegalArgumentException("Unknown image type: " + t);
+ }
+ }
+ private static BufferedImage createTestImage(int type) {
+ BufferedImage dst = null;
+ ColorModel colorModel = null;
+ WritableRaster raster = null;
+ ColorSpace cs = null;
+ System.out.println("Create image for " + getImageTypeName(type));
+ switch(type) {
+ case TYPE_INT_GRB:
+ colorModel = new DirectColorModel(24,
+ 0x0000ff00,
+ 0x00ff0000,
+ 0x000000ff);
+ break;
+ case TYPE_INT_GBR:
+ colorModel = new DirectColorModel(24,
+ 0x000000ff,
+ 0x00ff0000,
+ 0x0000ff00);
+ break;
+ case TYPE_INT_RBG:
+ colorModel = new DirectColorModel(24,
+ 0x00ff0000,
+ 0x000000ff,
+ 0x0000ff00);
+ break;
+ case TYPE_INT_BRG:
+ colorModel = new DirectColorModel(24,
+ 0x0000ff00,
+ 0x000000ff,
+ 0x00ff0000);
+ break;
+ case TYPE_INT_555_GRB:
+ colorModel = new DirectColorModel(24,
+ 0x0000001F,
+ 0x000003e0,
+ 0x00007c00);
+ break;
+ case TYPE_3BYTE_RGB:
+ cs = ColorSpace.getInstance(ColorSpace.CS_sRGB);
+ int[] nBits = {8, 8, 8};
+ int[] bOffs = {0, 1, 2};
+ colorModel = new ComponentColorModel(cs, nBits, false, false,
+ Transparency.OPAQUE,
+ DataBuffer.TYPE_BYTE);
+ raster = Raster.createInterleavedRaster(DataBuffer.TYPE_BYTE,
+ w, h,
+ w*3, 3,
+ bOffs, null);
+ break;
+ case TYPE_3BYTE_GRB:
+ cs = ColorSpace.getInstance(ColorSpace.CS_sRGB);
+ //nBits = {8, 8, 8};
+ //bOffs = {0, 1, 2};
+ colorModel = new ComponentColorModel(cs, new int[] { 8, 8, 8 }, false, false,
+ Transparency.OPAQUE,
+ DataBuffer.TYPE_BYTE);
+ raster = Raster.createInterleavedRaster(DataBuffer.TYPE_BYTE,
+ w, h,
+ w*3, 3,
+ new int[] { 1, 0, 2}, null);
+ break;
+ default:
+ dst = new BufferedImage(w, h, type);
+ //colorModel = ImageTypeSpecifier.createFromBufferedImageType(type).getColorModel();
+ }
+
+ if (dst == null) {
+ if (raster == null) {
+ raster = colorModel.createCompatibleWritableRaster(w, h);
+ }
+
+ dst = new BufferedImage(colorModel, raster, false, null);
+ }
+ Graphics g = dst.createGraphics();
+ for (int i = 0; i < usedColors.length; i ++) {
+ g.setColor(usedColors[i]);
+ g.fillRect(i * dx, 0, dx, h);
+ }
+ g.dispose();
+
+ return dst;
+ }
+
+ private BufferedImage src;
+ private int expectedColorDepth;
+ private int type;
+
+ private IIOImage iio_dst;
+
+ public NoExtraBytesTest(int type, int expectedColorDepth) {
+ this.type = type;
+ this.src = createTestImage(type);
+ this.expectedColorDepth = expectedColorDepth;
+ }
+
+ public void doTest() throws IOException {
+ // write src as BMP
+ System.out.println("Test for image: " + getImageTypeName(type));
+ System.out.println("image is " + src);
+
+ File f = File.createTempFile("sizeTest_", ".bmp", new File("."));
+ System.out.println("Use file " + f.getCanonicalPath());
+ ImageIO.write(src, "BMP", f);
+
+ //read it again
+ read(f);
+
+ checkColorDepth();
+
+ checkImageContent();
+ }
+
+ private void read(File f) throws IOException {
+ ImageReader reader = ImageIO.getImageReadersByFormatName("BMP").next();
+
+ ImageInputStream iis =
+ ImageIO.createImageInputStream(new FileInputStream(f));
+
+ reader.setInput(iis);
+
+ iio_dst = reader.readAll(0, reader.getDefaultReadParam());
+ }
+
+ private void checkColorDepth() {
+ IIOMetadata dst = iio_dst.getMetadata();
+
+ Node data = dst.getAsTree("javax_imageio_bmp_1.0");
+
+ Node n = data.getFirstChild();
+
+ while (n != null && !("BitsPerPixel".equals(n.getNodeName()))) {
+ System.out.println("Node " + n.getNodeName());
+ n = n.getNextSibling();
+ }
+ if (n == null) {
+ throw new RuntimeException("No BitsPerSample node!");
+ }
+
+ int bpp = 0;
+ String value = n.getNodeValue();
+ System.out.println("value = " + value);
+ try {
+ bpp = Integer.parseInt(value);
+ } catch (NumberFormatException e) {
+ throw new RuntimeException("Wrong bpp value: " + value, e);
+ }
+
+ if (bpp != this.expectedColorDepth) {
+ throw new RuntimeException("Wrong color depth: " + bpp +
+ " (should be " + this.expectedColorDepth + ")");
+ }
+ }
+
+ private void checkImageContent() {
+ BufferedImage dst =
+ (BufferedImage)iio_dst.getRenderedImage();
+ int y = h / 2;
+ int x = dx / 2;
+
+ for (int i = 0; i < usedColors.length; i++, x += dx) {
+ int srcRgb = src.getRGB(x, y);
+ int dstRgb = dst.getRGB(x, y);
+ int rgb = usedColors[i].getRGB();
+
+ if (dstRgb != srcRgb || dstRgb != rgb) {
+ throw new RuntimeException("Wrong color at [" + x + ", " + y +
+ "] " + Integer.toHexString(dstRgb) +
+ " (srcRgb=" + Integer.toHexString(srcRgb) +
+ ", original color is " + Integer.toHexString(rgb) + ")");
+ }
+
+ }
+ System.out.println("Image colors are OK.");
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/plugins/bmp/RLECompressionTest.java Sat Jun 03 03:48:03 2017 +0000
@@ -0,0 +1,159 @@
+/*
+ * Copyright (c) 2005, 2017, 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 6332480
+ * @summary Test verifies that images encoded as BMP with RLE4 or RLE8
+ * compression type are read correctly
+ */
+
+import java.awt.Color;
+import java.awt.Graphics2D;
+import java.awt.image.BufferedImage;
+import java.awt.image.IndexColorModel;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+
+import javax.imageio.IIOImage;
+import javax.imageio.ImageIO;
+import javax.imageio.ImageWriteParam;
+import javax.imageio.ImageWriter;
+import javax.imageio.stream.ImageOutputStream;
+
+public class RLECompressionTest {
+ public static final int TEST_RLE8 = 0x01;
+ public static final int TEST_RLE4 = 0x02;
+
+ private static Color[] usedColors = new Color[] {
+ Color.black, Color.white, Color.red,
+ Color.green, Color.blue, Color.yellow };
+
+ int w = 100;
+ // NB: problem occurs when image height > width
+ // The problem manifestation is that only first w
+ // lines of image are filled by decoded data,
+ // rest of image (all lines below (w-1)-th line)
+ // is leaved uninitialized (black).
+ // In order to verify that this problem is solved,
+ // we use image with height > width.
+ int h = 2 * w;
+
+ private IndexColorModel getTestColorModel(int type) {
+ IndexColorModel icm = null;
+ int bpp = 8;
+ int size = 256;
+
+ switch(type) {
+ case TEST_RLE8:
+ bpp = 8;
+ size = 256;
+ break;
+ case TEST_RLE4:
+ bpp = 4;
+ size = 16;
+ break;
+ default:
+ throw new IllegalArgumentException("Wrong test type: " + type);
+ }
+
+ byte[] palette = new byte[size * 3];
+ for (int i = 0; i < usedColors.length; i++) {
+ palette[3 * i] = (byte)(0xff & usedColors[i].getRed());
+ palette[3 * i + 1] = (byte)(0xff & usedColors[i].getGreen());
+ palette[3 * i + 2] = (byte)(0xff & usedColors[i].getBlue());
+ }
+ // rest of palette is black
+
+ icm = new IndexColorModel(bpp, size, palette, 0, false);
+ return icm;
+ }
+
+ private BufferedImage getTestImage(int type) {
+ BufferedImage src = null;
+ IndexColorModel icm = getTestColorModel(type);
+ src = new BufferedImage(w, h, BufferedImage.TYPE_BYTE_INDEXED, icm);
+ Graphics2D g = src.createGraphics();
+ g.setColor(Color.white);
+ g.fillRect(0, 0, w, h);
+ g.dispose();
+
+ return src;
+ }
+
+ public void doTest(int type) throws IOException {
+ BufferedImage src = getTestImage(type);
+
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+ ImageOutputStream ios = ImageIO.createImageOutputStream(baos);
+
+ ImageWriter writer = ImageIO.getImageWritersByFormatName("BMP").next();
+ writer.setOutput(ios);
+
+ ImageWriteParam wparam = writer.getDefaultWriteParam();
+ wparam.setCompressionMode(ImageWriteParam.MODE_EXPLICIT);
+ switch(type) {
+ case TEST_RLE8:
+ wparam.setCompressionType("BI_RLE8");
+ break;
+ case TEST_RLE4:
+ wparam.setCompressionType("BI_RLE4");
+ break;
+ default:
+ throw new IllegalArgumentException("Wrong test type: " + type);
+ }
+
+ writer.write(null, new IIOImage(src, null, null), wparam);
+
+ ios.close();
+ baos.close();
+
+ // read result
+ ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
+
+ BufferedImage dst = ImageIO.read(bais);
+
+ checkResult(src, dst);
+ }
+
+ private void checkResult(BufferedImage src, BufferedImage dst) {
+ int x = w / 2;
+ for (int y = 0; y < h; y++) {
+ int srcRgb = src.getRGB(x, y);
+ int dstRgb = dst.getRGB(x, y);
+
+ if (srcRgb != dstRgb) {
+ throw new RuntimeException("Test failed due to color difference: " +
+ Integer.toHexString(dstRgb) + " instead of " + Integer.toHexString(srcRgb) +
+ " at [" + x + ", " + y + "]");
+ }
+ }
+ }
+
+ public static void main(String[] args) throws IOException {
+ RLECompressionTest test = new RLECompressionTest();
+ test.doTest(TEST_RLE8);
+ test.doTest(TEST_RLE4);
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/plugins/bmp/ReaderListenersTest.java Sat Jun 03 03:48:03 2017 +0000
@@ -0,0 +1,257 @@
+/*
+ * Copyright (c) 2003, 2017, 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 4924507
+ * @summary Test that listeners of bmp reader receive correct events in case of
+ * BI_JPEG and BI_PNG compression types
+ */
+
+import java.awt.Color;
+import java.awt.Graphics2D;
+import java.awt.image.BufferedImage;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import javax.imageio.IIOImage;
+import javax.imageio.ImageIO;
+import javax.imageio.ImageReader;
+import javax.imageio.ImageWriteParam;
+import javax.imageio.ImageWriter;
+import javax.imageio.event.IIOReadProgressListener;
+import javax.imageio.event.IIOReadUpdateListener;
+
+public class ReaderListenersTest {
+ public static final String[] compTypes = { "BI_JPEG", "BI_PNG" };
+
+ public static void main(String[] args) {
+ for (int i=0; i< compTypes.length; i++) {
+ doTest(compTypes[i]);
+ }
+ }
+
+ private static void doTest(String compression) {
+ try {
+ BufferedImage img = createTestImage();
+
+ ImageWriter iw = (ImageWriter)
+ ImageIO.getImageWritersByFormatName("bmp").next();
+ if (iw == null) {
+ throw new RuntimeException("No writers for bmp format."
+ + " Test failed.");
+ }
+
+
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+ iw.setOutput(ImageIO.createImageOutputStream(baos));
+ ImageWriteParam param = iw.getDefaultWriteParam();
+ param.setCompressionMode(ImageWriteParam.MODE_EXPLICIT);
+ param.setCompressionType(compression);
+
+ iw.write(null, new IIOImage(img, null, null), param);
+ baos.close();
+
+ ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
+
+ ImageReader ir = (ImageReader)
+ ImageIO.getImageReadersByFormatName("bmp").next();
+ if (ir == null) {
+ throw new RuntimeException("No readers for bmp format."
+ + " Test failed.");
+ }
+
+ IIOReadUpdateAdapter updateAdapter = new IIOReadUpdateAdapter();
+ IIOReadProgressAdapter progressAdapter = new IIOReadProgressAdapter();
+ ir.addIIOReadProgressListener(progressAdapter);
+ ir.addIIOReadUpdateListener(updateAdapter);
+ ir.setInput(ImageIO.createImageInputStream(bais));
+ BufferedImage dst = ir.read(0);
+
+ progressAdapter.checkResults();
+
+ if (!updateAdapter.isImageUpdateUsed) {
+ throw new RuntimeException("imageUpdate was not used."
+ + " Test failed.");
+ }
+ } catch(IOException e) {
+ e.printStackTrace();
+ throw new RuntimeException("Test failed");
+ }
+ }
+
+ protected static BufferedImage createTestImage() {
+ BufferedImage res = new BufferedImage(100, 100,
+ BufferedImage.TYPE_INT_RGB);
+ Graphics2D g = res.createGraphics();
+ g.setColor(Color.red);
+ g.fillRect(0,0, 100,100);
+ return res;
+ }
+
+ static class IIOReadProgressAdapter implements IIOReadProgressListener {
+ List progress = new ArrayList();
+ public boolean isTestPassed = false;
+ private boolean isImageStarted = false;
+ private boolean isImageComplete = false;
+ private boolean isSequenceComplete = false;
+ private boolean isSequenceStarted = false;
+
+ public void imageComplete(ImageReader source) {
+ System.out.println("Image completed");
+ if (!isImageComplete) {
+ isImageComplete = true;
+ } else {
+ throw new RuntimeException("The imageComplete() is called twice."
+ + " Test failed.");
+ }
+ checkProgress();
+ }
+
+ public void imageProgress(ImageReader source, float percentageDone) {
+ System.out.println("Image Progress "+percentageDone);
+ progress.add(new Float(percentageDone));
+ }
+
+ public void imageStarted(ImageReader source, int imageIndex) {
+ System.out.println("Image Started "+imageIndex);
+ if (!isImageStarted) {
+ isImageStarted = true;
+ } else {
+ throw new RuntimeException("The imageStarted() was called twice. "
+ + " Test failed.");
+ }
+ progress.clear();
+ }
+
+ public void thumbnailComplete(ImageReader source) {
+ System.out.println("Thubnail completed");
+ }
+
+ public void thumbnailProgress(ImageReader source,
+ float percentageDone)
+ {
+ System.out.println("Thubnail Progress " + percentageDone);
+ }
+
+ public void thumbnailStarted(ImageReader source,
+ int imageIndex, int thumbnailIndex)
+ {
+ System.out.println("Thubnail started " + imageIndex);
+ }
+
+ public void sequenceComplete(ImageReader source) {
+ if (!isSequenceComplete) {
+ isSequenceComplete = true;
+ } else {
+ throw new RuntimeException("The imageComplete() is called twice."
+ + " Test failed.");
+ }
+ }
+
+ public void sequenceStarted(ImageReader source, int minIndex) {
+ if (!isSequenceStarted) {
+ isSequenceStarted = true;
+ } else {
+ throw new RuntimeException("The imageComplete() is called twice."
+ + " Test failed.");
+ }
+ }
+
+ public void readAborted(ImageReader source) {
+ System.out.println("read Aborted");
+ checkProgress();
+ }
+
+ private void checkProgress() {
+ Iterator i = progress.iterator();
+ if (!i.hasNext()) {
+ throw new RuntimeException("progress values list is empty!");
+ }
+ float val = ((Float)i.next()).floatValue();
+ while(i.hasNext()) {
+ float next = ((Float)i.next()).floatValue();
+ if (val >= next) {
+ throw new RuntimeException("progress values do not increase!");
+ }
+ val = next;
+ }
+ isTestPassed = true;
+ System.out.println("Test passed.");
+ }
+
+ public void checkResults() {
+ if (isImageStarted && !isImageComplete) {
+ throw new RuntimeException("The imageCompleted was not called."
+ + " Test failed.");
+ }
+ }
+ }
+
+ static class IIOReadUpdateAdapter implements IIOReadUpdateListener {
+ boolean isImageUpdateUsed = false;
+ public void imageUpdate(ImageReader source, BufferedImage theImage,
+ int minX, int minY, int width, int height,
+ int periodX, int periodY, int[] bands)
+ {
+ System.out.println("imageUpdate");
+ isImageUpdateUsed = true;
+ }
+ public void passComplete(ImageReader source, BufferedImage theImage) {
+ System.out.println("passComplete");
+ }
+ public void passStarted(ImageReader source, BufferedImage theImage,
+ int pass, int minPass, int maxPass,
+ int minX, int minY, int periodX, int periodY,
+ int[] bands)
+ {
+ System.out.println("passStarted");
+ }
+ public void thumbnailPassComplete(ImageReader source,
+ BufferedImage theThumbnail)
+ {
+ System.out.println("thumbnailPassComplete");
+ }
+ public void thumbnailPassStarted(ImageReader source,
+ BufferedImage theThumbnail,
+ int pass, int minPass, int maxPass,
+ int minX, int minY,
+ int periodX, int periodY,
+ int[] bands)
+ {
+ System.out.println("thumbnailPassStarted");
+ }
+ public void thumbnailUpdate(ImageReader source,
+ BufferedImage theThumbnail,
+ int minX, int minY,
+ int width, int height,
+ int periodX, int periodY, int[] bands)
+ {
+ System.out.println("thumbnailUpdate");
+ }
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/plugins/bmp/RleEncodingTest.java Sat Jun 03 03:48:03 2017 +0000
@@ -0,0 +1,223 @@
+/*
+ * Copyright (c) 2003, 2017, 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 4893446
+ * @summary Tests that we get IOException if we try to encode the incompatible
+ * image with RLE compression
+ */
+
+import java.awt.Color;
+import java.awt.Graphics;
+import java.awt.image.BufferedImage;
+import java.awt.image.IndexColorModel;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+
+import javax.imageio.IIOImage;
+import javax.imageio.ImageIO;
+import javax.imageio.ImageWriteParam;
+import javax.imageio.ImageWriter;
+import javax.imageio.stream.ImageInputStream;
+import javax.imageio.stream.ImageOutputStream;
+
+public class RleEncodingTest {
+
+ private static int testIdx = 1;
+
+ public static void main(String args[]) throws Exception {
+ try {
+ int mode = ImageWriteParam.MODE_EXPLICIT;
+ String type = "BI_RLE4";
+ doTest(type, mode);
+
+ type = "BI_RLE8";
+ doTest(type, mode);
+
+ mode = ImageWriteParam.MODE_DEFAULT;
+ type = "BI_RLE4";
+ doTest(type, mode);
+
+ type = "BI_RLE8";
+ doTest(type, mode);
+
+ System.out.println("Test 4bpp image.");
+ encodeRLE4Test();
+
+ System.out.println("Test 8bpp image.");
+ encodeRLE8Test();
+ } catch (IOException e) {
+ e.printStackTrace();
+ throw new RuntimeException("Unexpected exception. Test failed");
+ }
+ }
+
+ private static void doTest(String compressionType,
+ int compressionMode) throws IOException
+ {
+ BufferedImage bimg = new BufferedImage(100, 100,
+ BufferedImage.TYPE_INT_RGB);
+ Graphics g = bimg.getGraphics();
+ g.setColor(Color.green);
+ g.fillRect(0, 0, 100, 100);
+
+ doTest(bimg, compressionType, compressionMode);
+ }
+
+ private static void encodeRLE4Test() throws IOException {
+ // create 4bpp image
+ byte[] r = new byte[16];
+ r[0] = (byte)0xff;
+ byte[] g = new byte[16];
+ g[1] = (byte)0xff;
+ byte[] b = new byte[16];
+ b[2] = (byte)0xff;
+ IndexColorModel icm = new IndexColorModel(4, 16, r, g, b);
+
+ BufferedImage bimg = new BufferedImage(100, 100,
+ BufferedImage.TYPE_BYTE_BINARY,
+ icm);
+
+ Graphics gr = bimg.getGraphics();
+ gr.setColor(Color.green);
+ gr.fillRect(0, 0, 100, 100);
+
+ doTest(bimg, "BI_RLE4", ImageWriteParam.MODE_EXPLICIT);
+ }
+
+ private static void encodeRLE8Test() throws IOException {
+ // create 8bpp image
+ byte[] r = new byte[256];
+ r[0] = (byte)0xff;
+ byte[] g = new byte[256];
+ g[1] = (byte)0xff;
+ byte[] b = new byte[256];
+ b[2] = (byte)0xff;
+ IndexColorModel icm = new IndexColorModel(8, 256, r, g, b);
+
+ BufferedImage bimg = new BufferedImage(100, 100,
+ BufferedImage.TYPE_BYTE_INDEXED,
+ icm);
+ Graphics gr = bimg.getGraphics();
+ gr.setColor(Color.green);
+ gr.fillRect(0, 0, 100, 100);
+
+ doTest(bimg, "BI_RLE8", ImageWriteParam.MODE_EXPLICIT);
+ }
+
+ private static void doTest(BufferedImage src,
+ String compressionType,
+ int compressionMode) throws IOException
+ {
+
+ ImageWriter iw = (ImageWriter)ImageIO.getImageWritersBySuffix("bmp").next();
+ if (iw == null) {
+ throw new RuntimeException("No available writer. Test failed.");
+ }
+
+ IIOImage iioImg = new IIOImage(src, null, null);
+ ImageWriteParam param = iw.getDefaultWriteParam();
+
+
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+ ImageOutputStream ios = ImageIO.createImageOutputStream(baos);
+ iw.setOutput(ios);
+
+ System.out.println("Compression Type is " + compressionType);
+ System.out.println("Compression Mode is " + compressionMode);
+
+ param.setCompressionMode(ImageWriteParam.MODE_EXPLICIT);
+ param.setCompressionType(compressionType);
+ if (compressionMode != ImageWriteParam.MODE_EXPLICIT) {
+ param.setCompressionMode(compressionMode);
+ }
+ try {
+ iw.write(null, iioImg, param);
+ } catch (IOException e) {
+ int bpp = src.getColorModel().getPixelSize();
+ if (compressionMode == ImageWriteParam.MODE_EXPLICIT) {
+ if ((compressionType.equals("BI_RLE4") && bpp != 4)
+ || (compressionType.equals("BI_RLE8") && bpp != 8))
+ {
+ System.out.println("Can not encode "+ bpp+ "bpp image as"
+ + compressionType);
+ return;
+ } else {
+ throw new RuntimeException("Unable to encode "
+ + bpp + "bpp image as "
+ + compressionType
+ + ". Test failed");
+ }
+ }
+ }
+ baos.close();
+
+ ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
+ ImageInputStream iis = ImageIO.createImageInputStream(bais);
+
+ BufferedImage dst = ImageIO.read(iis);
+
+ int w = src.getWidth();
+ int h = src.getHeight();
+
+ Object dstPixel = dst.getRaster().getDataElements(w/2, h/2, null);
+ Object srcPixel = src.getRaster().getDataElements(w/2, h/2, null);
+
+ if ( (src.getColorModel().getRed(srcPixel)
+ != dst.getColorModel().getRed(dstPixel))
+ || (src.getColorModel().getGreen(srcPixel)
+ != dst.getColorModel().getGreen(dstPixel))
+ || (src.getColorModel().getBlue(srcPixel)
+ != dst.getColorModel().getBlue(dstPixel))
+ || (src.getColorModel().getAlpha(srcPixel)
+ != dst.getColorModel().getAlpha(dstPixel)) ) {
+
+ showPixel(src, w/2, h/2);
+ showPixel(dst, w/2, h/2);
+
+ throw new RuntimeException(
+ "Colors are different: " +
+ Integer.toHexString(src.getColorModel().getRGB(srcPixel))
+ + " and " +
+ Integer.toHexString(dst.getColorModel().getRGB(dstPixel)));
+ }
+
+ }
+
+ private static void showPixel(BufferedImage src, int x, int y) {
+ System.out.println("Img is " + src);
+ Object p = src.getRaster().getDataElements(x, y, null);
+ System.out.println("RGB: " +
+ Integer.toHexString(src.getColorModel().getRGB(p)));
+ System.out.println("Red: " +
+ Integer.toHexString(src.getColorModel().getRed(p)));
+ System.out.println("Green: " +
+ Integer.toHexString(src.getColorModel().getGreen(p)));
+ System.out.println("Blue: " +
+ Integer.toHexString(src.getColorModel().getBlue(p)));
+ System.out.println("Alpha: " +
+ Integer.toHexString(src.getColorModel().getAlpha(p)));
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/plugins/bmp/TestCompressionBI_BITFIELDS.java Sat Jun 03 03:48:03 2017 +0000
@@ -0,0 +1,181 @@
+/*
+ * Copyright (c) 2005, 2017, 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 6297016 6294960 6294965 6294984
+ * @summary Test verifies that buffered images are written correctly if
+ * compression BI_BITFIELDS is used
+ */
+
+import java.awt.Color;
+import java.awt.Graphics;
+import java.awt.Graphics2D;
+import java.awt.color.ColorSpace;
+import java.awt.image.BufferedImage;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+
+import javax.imageio.IIOImage;
+import javax.imageio.ImageIO;
+import javax.imageio.ImageReader;
+import javax.imageio.ImageWriteParam;
+import javax.imageio.ImageWriter;
+
+public class TestCompressionBI_BITFIELDS {
+
+ protected String format = "BMP";
+
+ protected ImageReader reader;
+
+ protected ImageWriter writer;
+
+ protected boolean doSave = true;
+
+ Color[] colors = {
+ Color.red, Color.green, Color.blue,
+ Color.yellow, Color.white, Color.black};
+
+ int dx = 50;
+ int h = 200;
+
+ public TestCompressionBI_BITFIELDS() {
+ this("BMP");
+ }
+
+ public TestCompressionBI_BITFIELDS(String format) {
+ this.format = format;
+ reader = ImageIO.getImageReadersByFormatName(format).next();
+ writer = ImageIO.getImageWritersByFormatName(format).next();
+ }
+
+ protected ImageWriteParam prepareWriteParam(BufferedImage src) {
+ ImageWriteParam wparam = writer.getDefaultWriteParam();
+ wparam.setCompressionMode(ImageWriteParam.MODE_EXPLICIT);
+ wparam.setCompressionType("BI_BITFIELDS");
+
+ return wparam;
+ }
+
+ public BufferedImage writeAndRead(BufferedImage src) throws IOException {
+ writer.reset();
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+ writer.setOutput(ImageIO.createImageOutputStream(baos));
+
+ ImageWriteParam wparam = prepareWriteParam(src);
+
+ IIOImage img = new IIOImage(src, null, null);
+
+ writer.write(null, img, wparam);
+
+ if (doSave) {
+ // save images to file in order to be able to check
+ // that image is well-formed using standard windows tools.
+ File f = File.createTempFile("wr_test_", "." + format, new File("."));
+ System.out.println("Save to file: " + f.getCanonicalPath());
+ FileOutputStream fos = new FileOutputStream(f);
+ fos.write(baos.toByteArray());
+ fos.flush();
+ fos.close();
+ }
+
+ // read result
+ reader.reset();
+ ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
+ reader.setInput(ImageIO.createImageInputStream(bais));
+
+ return reader.read(0);
+ }
+
+ public static void main(String[] args) throws IOException {
+ // buffered image types listed below can be saved as BI_BITFIELDS BMP
+ int[] types = {BufferedImage.TYPE_3BYTE_BGR,
+ BufferedImage.TYPE_USHORT_555_RGB,
+ BufferedImage.TYPE_USHORT_565_RGB,
+ BufferedImage.TYPE_BYTE_GRAY,
+ BufferedImage.TYPE_BYTE_BINARY,
+ BufferedImage.TYPE_BYTE_INDEXED,
+ BufferedImage.TYPE_INT_BGR,
+ BufferedImage.TYPE_INT_RGB};
+
+ for (int i = 0; i < types.length; i++) {
+ System.out.println("Test image " + types[i]);
+ TestCompressionBI_BITFIELDS t = new TestCompressionBI_BITFIELDS();
+
+ BufferedImage src =
+ t.createTestImage(types[i]);
+ System.out.println("Image for test: " + src);
+ System.out.println("SampleModel: " + src.getSampleModel());
+
+ BufferedImage dst = null;
+ try {
+ dst = t.writeAndRead(src);
+ } catch (IOException e) {
+ e.printStackTrace(System.out);
+ }
+
+
+ t.compareImages(src, dst);
+ }
+ }
+
+ protected BufferedImage createTestImage(int type) {
+ BufferedImage bimg = new BufferedImage(dx * colors.length, h, type);
+ Graphics2D g = bimg.createGraphics();
+
+ for (int i = 0; i < colors.length; i++) {
+ g.setColor(colors[i]);
+ g.fillRect(dx * i, 0, dx, h);
+ }
+ return bimg;
+ }
+
+ protected void compareImages(BufferedImage src, BufferedImage dst) {
+ ColorSpace srcCS = src.getColorModel().getColorSpace();
+ ColorSpace dstCS = dst.getColorModel().getColorSpace();
+ if (!srcCS.equals(dstCS) && srcCS.getType() == ColorSpace.TYPE_GRAY) {
+ System.out.println("Workaround color difference with GRAY.");
+ BufferedImage tmp =
+ new BufferedImage(src.getWidth(), src.getHeight(),
+ BufferedImage.TYPE_INT_RGB);
+ Graphics g = tmp.createGraphics();
+ g.drawImage(src, 0, 0, null);
+ src = tmp;
+ }
+ int y = h / 2;
+ for (int i = 0; i < colors.length; i++) {
+ int x = dx * i + dx / 2;
+ int srcRgb = src.getRGB(x, y);
+ int dstRgb = dst.getRGB(x, y);
+
+ if (srcRgb != dstRgb) {
+ throw new RuntimeException("Test failed due to color difference: " +
+ "src_pixel=" + Integer.toHexString(srcRgb) +
+ "dst_pixel=" + Integer.toHexString(dstRgb));
+ }
+ }
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/plugins/bmp/Write3ByteBgrTest.java Sat Jun 03 03:48:03 2017 +0000
@@ -0,0 +1,228 @@
+/*
+ * Copyright (c) 2003, 2017, 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 4892194 8014427
+ * @summary Test checks that we able to encode TYPE_3BYTE_BGR images to bmp
+ * format. Test failed if ArrayIndexOutOfBoundsException will be thrown
+ * or pixel colors will be changed by the writing/reading.
+ */
+
+import java.awt.Color;
+import java.awt.Dimension;
+import java.awt.Graphics;
+import java.awt.Graphics2D;
+import java.awt.color.ColorSpace;
+import java.awt.image.BufferedImage;
+import java.awt.image.ColorModel;
+import java.awt.image.ComponentColorModel;
+import java.awt.image.DataBuffer;
+import java.awt.image.Raster;
+import java.awt.image.WritableRaster;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+
+import javax.imageio.IIOImage;
+import javax.imageio.ImageIO;
+import javax.imageio.ImageWriter;
+import javax.imageio.stream.ImageOutputStream;
+import javax.swing.JComponent;
+import javax.swing.JFrame;
+
+public class Write3ByteBgrTest {
+ private static int width = 100;
+ private static int height = 100;
+ private static Color color = new Color(0x10, 0x20, 0x30);
+
+ static int bufferedImageType[] = {
+ BufferedImage.TYPE_CUSTOM,
+ BufferedImage.TYPE_BYTE_BINARY,
+ BufferedImage.TYPE_3BYTE_BGR
+ };
+
+ static String bufferedImageStringType[] = {
+ "BufferedImage.TYPE_CUSTOM: test for BandedSampleModel",
+ "BufferedImage.TYPE_BYTE_BINARY",
+ "BufferedImage.TYPE_3BYTE_BGR"
+ };
+
+ private static String writingFormat = "BMP";
+ private static ImageWriter writer = (ImageWriter)ImageIO.getImageWritersByFormatName(writingFormat).next();
+ private int type;
+
+ public static void main(String[] args) {
+
+ //int i = 0;
+ for(int i=0; i<bufferedImageType.length; i++) {
+ Write3ByteBgrTest t1 = new Write3ByteBgrTest(bufferedImageType[i]);
+
+ System.out.println("\n\nImage test for type " + bufferedImageStringType[i]);
+ t1.doImageTest();
+ }
+ }
+
+ private Write3ByteBgrTest(int type) {
+ this.type = type;
+ }
+
+ private void doImageTest() {
+ try {
+ BufferedImage src = createTestImage(type);
+ BufferedImage dst = writeImage(src);
+
+ compareImages(src, dst);
+ } catch (ArrayIndexOutOfBoundsException e) {
+ throw new RuntimeException("Test failed: index out of array bounds!");
+ }
+ }
+
+
+ private void compareImages(BufferedImage src, BufferedImage dst) {
+ Object dstPixel = dst.getRaster().getDataElements(width/2, height/2, null);
+ Object srcPixel = src.getRaster().getDataElements(width/2, height/2, null);
+
+ if ( (src.getColorModel().getRed(srcPixel) != dst.getColorModel().getRed(dstPixel)) ||
+ (src.getColorModel().getGreen(srcPixel) != dst.getColorModel().getGreen(dstPixel)) ||
+ (src.getColorModel().getBlue(srcPixel) != dst.getColorModel().getBlue(dstPixel)) ||
+ (src.getColorModel().getAlpha(srcPixel) != dst.getColorModel().getAlpha(dstPixel)) ) {
+
+ showPixel(src, width/2, height/2);
+ showPixel(dst, width/2, height/2);
+
+ showRes(dst, src);
+ throw new RuntimeException(
+ "Colors are different: " +
+ Integer.toHexString(src.getColorModel().getRGB(srcPixel)) + " and " +
+ Integer.toHexString(dst.getColorModel().getRGB(dstPixel)));
+ }
+ }
+
+ private BufferedImage writeImage(BufferedImage src) {
+ try {
+ BufferedImage dst = null;
+ if (!writer.getOriginatingProvider().canEncodeImage(src)) {
+ throw new RuntimeException(writingFormat+" writer does not support the image type "+type);
+ }
+ System.out.println(writingFormat+" writer claims it can encode the image "+type);
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+ ImageOutputStream ios = ImageIO.createImageOutputStream(baos);
+ writer.setOutput(ios);
+ IIOImage img = new IIOImage(src.getRaster(), null, null);
+ writer.write(img);
+ ios.close();
+ baos.close();
+
+ // save to file
+ File f = new File("test"+src.getType()+".bmp");
+ FileOutputStream fos = new FileOutputStream(f);
+ fos.write(baos.toByteArray());
+ fos.close();
+
+
+ ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
+ dst = ImageIO.read(bais);
+ return dst;
+ } catch (IOException e) {
+ e.printStackTrace();
+ throw new RuntimeException(e);
+ }
+ }
+
+ private static void showPixel(BufferedImage src, int x, int y) {
+ System.out.println("Img is " + src);
+ Object p = src.getRaster().getDataElements(x, y, null);
+ System.out.println("RGB: " +
+ Integer.toHexString(src.getColorModel().getRGB(p)));
+ System.out.println("Red: " +
+ Integer.toHexString(src.getColorModel().getRed(p)));
+ System.out.println("Green: " +
+ Integer.toHexString(src.getColorModel().getGreen(p)));
+ System.out.println("Blue: " +
+ Integer.toHexString(src.getColorModel().getBlue(p)));
+ System.out.println("Alpha: " +
+ Integer.toHexString(src.getColorModel().getAlpha(p)));
+ }
+
+ private static BufferedImage createTestImage(int type) {
+ return createTestImage(type, color);
+ }
+
+ private static BufferedImage createTestImage(int type, Color c) {
+ BufferedImage i = null;
+ if (type == BufferedImage.TYPE_CUSTOM) {
+ WritableRaster wr = Raster.createBandedRaster(
+ DataBuffer.TYPE_BYTE,
+ width, height,
+ width, // scanlineStride
+ new int[] { 0, 1, 2},// bankIndices[],
+ new int[] { 1, 2, 0},// bankOffsets[],
+ null);
+
+ ColorSpace cs = ColorSpace.getInstance(ColorSpace.CS_sRGB);
+
+ ColorModel cm = new ComponentColorModel(cs,
+ new int[] { 8, 8, 8},
+ false,
+ false,
+ ColorModel.OPAQUE,
+ DataBuffer.TYPE_BYTE);
+ i = new BufferedImage(cm, wr, false, null);
+ } else {
+ i = new BufferedImage(width, height, type);
+ }
+
+ Graphics2D g = i.createGraphics();
+
+ g.setColor(c);
+ g.fillRect(0, 0, width, height);
+ g.setColor(Color.white);
+ g.drawRect(10,10, width-20, height-20);
+
+ return i;
+ }
+
+ private static void showRes(final BufferedImage src,
+ final BufferedImage dst)
+ {
+ final int w = src.getWidth()+ dst.getWidth();
+ final int h = Math.max(src.getHeight(), dst.getHeight());
+
+ JFrame f = new JFrame("Test results");
+ f.getContentPane().add( new JComponent() {
+ public Dimension getPreferredSize() {
+ return new Dimension(w,h);
+ }
+
+ public void paintComponent(Graphics g) {
+ g.drawImage(src,0,0, null);
+ g.drawImage(dst, src.getWidth(),0, null);
+ }
+ });
+ f.pack();
+ f.setVisible(true);
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/plugins/bmp/WriteProgressListenerTest.java Sat Jun 03 03:48:03 2017 +0000
@@ -0,0 +1,176 @@
+/*
+ * Copyright (c) 2003, 2017, 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 4897067 4920152
+ * @summary Tests that IIOWriteProgressListener receives correct progress
+ * percentage. Also it tests problem described in 4920152: test fails
+ * if imageComplete() or imageStarted() was called twice.
+ */
+
+import java.awt.image.BufferedImage;
+import java.io.ByteArrayOutputStream;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import javax.imageio.IIOImage;
+import javax.imageio.ImageIO;
+import javax.imageio.ImageWriteParam;
+import javax.imageio.ImageWriter;
+import javax.imageio.event.IIOWriteProgressListener;
+import javax.imageio.stream.ImageOutputStream;
+
+public class WriteProgressListenerTest {
+
+
+ protected static String format = "BMP";
+
+ protected String compression_type;
+ protected WriteProgressListener listener;
+
+ public WriteProgressListenerTest(String compression_type) {
+ this.compression_type = compression_type;
+ listener = new WriteProgressListener();
+ }
+
+ public void doTest() {
+ try {
+ System.out.println("Progress test for " + compression_type);
+ BufferedImage bi = new BufferedImage(20, 300, BufferedImage.TYPE_INT_RGB);
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+ ImageOutputStream ios = ImageIO.createImageOutputStream(baos);
+
+ Iterator iter = ImageIO.getImageWritersByFormatName(format);
+ if (!iter.hasNext()) {
+ throw new RuntimeException("No available writer for " + format);
+ }
+ ImageWriter writer = (ImageWriter)iter.next();
+
+ writer.setOutput(ios);
+ writer.addIIOWriteProgressListener(listener);
+
+ IIOImage iio_img = new IIOImage(bi, null, null);
+
+ ImageWriteParam param = writer.getDefaultWriteParam();
+
+ param.setCompressionMode(ImageWriteParam.MODE_EXPLICIT);
+ param.setCompressionType(compression_type);
+
+
+ writer.write(null, iio_img, param);
+
+ if (!listener.isTestPassed) {
+ throw new RuntimeException("Test for " + compression_type + " does not finish correctly!");
+ }
+ } catch (Exception e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ public static void main(String args[]) {
+ String[] compression_types = new String[] { "BI_RGB",
+ "BI_JPEG",
+ "BI_PNG"};
+
+ for(int i=0; i<compression_types.length; i++) {
+ WriteProgressListenerTest test = new
+ WriteProgressListenerTest(compression_types[i]);
+ test.doTest();
+ }
+ }
+
+ static class WriteProgressListener implements IIOWriteProgressListener {
+ List progress;
+ public boolean isTestPassed = false;
+ private boolean isImageStarted = false;
+ private boolean isImageComplete = false;
+
+ public WriteProgressListener() {
+ progress = new ArrayList();
+ }
+
+ public void imageComplete(ImageWriter source) {
+ System.out.println("Image Completed");
+ if (!isImageComplete) {
+ isImageComplete = true;
+ } else {
+ throw new RuntimeException("The imageComplete() was called twice."
+ + " Test failed.");
+ }
+
+ checkProgress();
+ }
+ public void imageProgress(ImageWriter source, float percentageDone) {
+ System.out.println("Image Progress "+percentageDone);
+ progress.add(new Float(percentageDone));
+ }
+
+ public void imageStarted(ImageWriter source, int imageIndex) {
+ System.out.println("Image Started "+imageIndex);
+ if (!isImageStarted) {
+ isImageStarted = true;
+ } else {
+ throw new RuntimeException("The imageStarted() was called twice. "
+ + " Test failed.");
+ }
+ progress.clear();
+ }
+
+ public void thumbnailComplete(ImageWriter source) {
+ System.out.println("Thubnail completed");
+ }
+
+ public void thumbnailProgress(ImageWriter source, float percentageDone) {
+ System.out.println("Thubnail Progress " + percentageDone);
+ }
+
+ public void thumbnailStarted(ImageWriter source, int imageIndex, int thumbnailIndex) {
+ System.out.println("Thubnail started " + imageIndex);
+ }
+
+ public void writeAborted(ImageWriter source) {
+ System.out.println("Writing Aborted");
+ checkProgress();
+ }
+
+ private void checkProgress() {
+ Iterator i = progress.iterator();
+ if (!i.hasNext()) {
+ throw new RuntimeException("progress values list is empty!");
+ }
+ float val = ((Float)i.next()).floatValue();
+ while(i.hasNext()) {
+ float next = ((Float)i.next()).floatValue();
+ if (val >= next) {
+ throw new RuntimeException("progress values do not increase!");
+ }
+ val = next;
+ }
+ isTestPassed = true;
+ System.out.println("Test passed.");
+ }
+ }
+
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/plugins/bmp/WritingColorChangeTest.java Sat Jun 03 03:48:03 2017 +0000
@@ -0,0 +1,194 @@
+/*
+ * Copyright (c) 2003, 2017, 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 4892214
+ * @summary Test checks that colors are not changed by the writing/reading in
+ * the BMP format for TYPE_INT_BGR and TYPE_USHORT_555_RGB buffered
+ * images
+ */
+
+import java.awt.Color;
+import java.awt.Dimension;
+import java.awt.Graphics;
+import java.awt.Graphics2D;
+import java.awt.image.BufferedImage;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+
+import javax.imageio.ImageIO;
+import javax.imageio.ImageWriter;
+import javax.imageio.stream.ImageOutputStream;
+import javax.swing.JComponent;
+import javax.swing.JFrame;
+
+public class WritingColorChangeTest {
+ private static int width = 100;
+ private static int height = 100;
+ private static Color color = new Color(0x10, 0x20, 0x30);
+
+ static int bufferedImageType[] = {
+ BufferedImage.TYPE_USHORT_565_RGB,
+ BufferedImage.TYPE_INT_BGR,
+ BufferedImage.TYPE_INT_RGB,
+ BufferedImage.TYPE_USHORT_555_RGB,
+ };
+
+ static String bufferedImageStringType[] = {
+ "BufferedImage.TYPE_USHORT_565_RGB",
+ "BufferedImage.TYPE_INT_BGR",
+ "BufferedImage.TYPE_INT_RGB",
+ "BufferedImage.TYPE_USHORT_555_RGB",
+ };
+ private static String writingFormat = "BMP";
+ private static ImageWriter writer = (ImageWriter)ImageIO.getImageWritersByFormatName(writingFormat).next();
+ private int type;
+
+ public static void main(String[] args) {
+
+ //int i = 7; //3; //7;
+ for(int i=0; i<bufferedImageType.length; i++) {
+ System.out.println("\n\nTest for type " + bufferedImageStringType[i]);
+
+ WritingColorChangeTest t1 = new WritingColorChangeTest(bufferedImageType[i]);
+ t1.doTest();
+
+ }
+ }
+
+ private WritingColorChangeTest(int type) {
+ this.type = type;
+ }
+
+ private void doTest() {
+ BufferedImage src = createTestImage(type);
+ System.out.println("Sample model is " + src.getSampleModel());
+
+ BufferedImage dst = doModification(src);
+
+ Object dstPixel = dst.getRaster().getDataElements(width/2, height/2, null);
+ Object srcPixel = src.getRaster().getDataElements(width/2, height/2, null);
+
+ if (src.getType() == BufferedImage.TYPE_USHORT_555_RGB ||
+ src.getType() == BufferedImage.TYPE_USHORT_565_RGB ) {
+
+ Color cmpColor = new Color(dst.getColorModel().getRed(dstPixel),
+ dst.getColorModel().getGreen(dstPixel),
+ dst.getColorModel().getBlue(dstPixel));
+ BufferedImage cmp = createTestImage(src.getType(), cmpColor);
+
+ Object cmpPixel = cmp.getRaster().getDataElements(width/2, height/2, null);
+
+ dst = cmp;
+ dstPixel = cmpPixel;
+ }
+
+ if ( (src.getColorModel().getRed(srcPixel) != dst.getColorModel().getRed(dstPixel)) ||
+ (src.getColorModel().getGreen(srcPixel) != dst.getColorModel().getGreen(dstPixel)) ||
+ (src.getColorModel().getBlue(srcPixel) != dst.getColorModel().getBlue(dstPixel)) ||
+ (src.getColorModel().getAlpha(srcPixel) != dst.getColorModel().getAlpha(dstPixel)) ) {
+
+ showPixel(src, width/2, height/2);
+ showPixel(dst, width/2, height/2);
+
+ showRes(dst, src);
+ throw new RuntimeException(
+ "Colors are different: " +
+ Integer.toHexString(src.getColorModel().getRGB(srcPixel)) + " and " +
+ Integer.toHexString(dst.getColorModel().getRGB(dstPixel)));
+ }
+ }
+
+ private BufferedImage doModification(BufferedImage src) {
+ try {
+ BufferedImage dst = null;
+ if (!writer.getOriginatingProvider().canEncodeImage(src)) {
+ throw new RuntimeException(writingFormat+" writer does not support the image type "+type);
+ }
+ System.out.println(writingFormat+" writer claims it can encode the image "+type);
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+ ImageOutputStream ios = ImageIO.createImageOutputStream(baos);
+ writer.setOutput(ios);
+ writer.write(src);
+ ios.close();
+ baos.close();
+
+ ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
+ dst = ImageIO.read(bais);
+ return dst;
+ } catch (IOException e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ private static void showPixel(BufferedImage src, int x, int y) {
+ System.out.println("Img is " + src);
+ Object p = src.getRaster().getDataElements(x, y, null);
+ System.out.println("RGB: " +
+ Integer.toHexString(src.getColorModel().getRGB(p)));
+ System.out.println("Red: " +
+ Integer.toHexString(src.getColorModel().getRed(p)));
+ System.out.println("Green: " +
+ Integer.toHexString(src.getColorModel().getGreen(p)));
+ System.out.println("Blue: " +
+ Integer.toHexString(src.getColorModel().getBlue(p)));
+ System.out.println("Alpha: " +
+ Integer.toHexString(src.getColorModel().getAlpha(p)));
+ }
+
+ private static BufferedImage createTestImage(int type) {
+ return createTestImage(type, color);
+ }
+
+ private static BufferedImage createTestImage(int type, Color c) {
+ BufferedImage i = new BufferedImage(width, height,
+ type);
+ Graphics2D g = i.createGraphics();
+
+ g.setColor(c);
+ g.fillRect(0, 0, width, height);
+
+ return i;
+ }
+
+ private static void showRes(final BufferedImage src, final BufferedImage dst) {
+ final int w = src.getWidth()+ dst.getWidth();
+ final int h = Math.max(src.getHeight(), dst.getHeight());
+
+ JFrame f = new JFrame("Test results");
+ f.getContentPane().add( new JComponent() {
+ public Dimension getPreferredSize() {
+ return new Dimension(w,h);
+ }
+
+ public void paintComponent(Graphics g) {
+ g.drawImage(src,0,0, null);
+ g.drawImage(dst, src.getWidth(),0, null);
+ }
+ });
+ f.pack();
+ f.setVisible(true);
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/plugins/gif/AnimationTest.java Sat Jun 03 03:48:03 2017 +0000
@@ -0,0 +1,168 @@
+/*
+ * Copyright (c) 2005, 2017, 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 4339415
+ * @summary Tests that GIF writer plugin writes image sequences correctly
+ */
+
+import java.awt.Color;
+import java.awt.Graphics;
+import java.awt.image.BufferedImage;
+import java.awt.image.IndexColorModel;
+import java.io.File;
+import java.io.IOException;
+
+import javax.imageio.IIOImage;
+import javax.imageio.ImageIO;
+import javax.imageio.ImageReader;
+import javax.imageio.ImageTypeSpecifier;
+import javax.imageio.ImageWriteParam;
+import javax.imageio.ImageWriter;
+import javax.imageio.metadata.IIOMetadata;
+import javax.imageio.stream.ImageOutputStream;
+
+public class AnimationTest {
+
+ BufferedImage img = null;
+ int x, y;
+ int w, h;
+
+ protected static String fname = "animtest.gif";
+
+ public AnimationTest() {
+ w = h = 100;
+ }
+
+ private void initFrame() {
+ if (img != null) {
+ return;
+ }
+ byte r[] = new byte[256];
+ byte g[] = new byte[256];
+ byte b[] = new byte[256];
+
+ for (int i = 0; i < 256; i++) {
+ r[i] = g[i] = b[i] = (byte)0x00;
+ }
+ r[0] = (byte)0x00; g[0] = (byte)0x00; b[0] = (byte)0x00;
+ r[1] = (byte)0xFF; g[1] = (byte)0xFF; b[1] = (byte)0xFF;
+ r[2] = (byte)0xFF; g[3] = (byte)0xFF; b[4] = (byte)0xFF;
+
+ IndexColorModel icm = new IndexColorModel(8, 256,
+ r, g, b);
+
+ img = new BufferedImage(w, h,
+ BufferedImage.TYPE_BYTE_INDEXED,
+ icm);
+ }
+
+ private BufferedImage createNextFrame() {
+ Graphics g = img.createGraphics();
+ g.setColor(Color.white);
+ g.fillRect(0, 0, w, h);
+
+ g.setColor(Color.red);
+ g.drawLine(x, 0, x, h);
+
+ g.setColor(Color.blue);
+ g.drawLine(0, y, w, y);
+
+ x += 2;
+ y += 2;
+
+ x %= w;
+ y %= h;
+
+ return img;
+ }
+
+ ImageWriter writer = null;
+
+ private ImageWriter initWriter() throws IOException {
+ ImageOutputStream ios =
+ ImageIO.createImageOutputStream(new File(fname));
+ writer = ImageIO.getImageWritersByFormatName("GIF").next();
+
+ writer.setOutput(ios);
+
+ return writer;
+ }
+
+ public static void main(String[] args) {
+ try {
+ AnimationTest t = new AnimationTest();
+ t.initFrame();
+
+ ImageWriter w = t.initWriter();
+
+ ImageWriteParam p = w.getDefaultWriteParam();
+
+ IIOMetadata streamMetadata = w.getDefaultStreamMetadata(p);
+
+ w.prepareWriteSequence(streamMetadata);
+
+ for (int i = 0; i < 50; i++) {
+ BufferedImage f = t.createNextFrame();
+
+ ImageTypeSpecifier type = new ImageTypeSpecifier(f);
+
+ IIOMetadata m = w.getDefaultImageMetadata(type, p);
+
+ w.writeToSequence(new IIOImage(f, null, m), p);
+ }
+ w.endWriteSequence();
+
+ t.checkAnimation();
+ } catch (Exception e) {
+ throw new RuntimeException("Test failed.", e);
+ }
+ }
+
+ protected void checkAnimation() throws IOException {
+ ImageReader r = ImageIO.getImageReadersByFormatName("GIF").next();
+ r.setInput(ImageIO.createImageInputStream(new File(fname)));
+
+ int n = r.getNumImages(true);
+ for (int i = 0; i < n; i++) {
+ BufferedImage f = r.read(i);
+ checkFrame(i, f);
+ }
+ System.out.println("Test passed.");
+ }
+
+ protected void checkFrame(int i, BufferedImage f) {
+ int x = 2 * i + 1;
+ for (int y = 0; y < h; y++) {
+ int argb = f.getRGB(x, y);
+ if (argb != 0xffffffff && !(argb == 0xff0000ff && y == 2 * i)) {
+ throw new RuntimeException("Test failed - bad frame");
+ }
+ argb = f.getRGB(y, x);
+ if (argb != 0xffffffff && !(argb == 0xffff0000 && y == 2 * i)) {
+ throw new RuntimeException("Test failed - bad frame");
+ }
+ }
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/plugins/gif/DisableCompressionTest.java Sat Jun 03 03:48:03 2017 +0000
@@ -0,0 +1,100 @@
+/*
+ * Copyright (c) 2005, 2017, 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 6294683
+ * @summary Test verifies that GIF ImageWriteParam behaves according to spec
+ */
+
+import javax.imageio.ImageIO;
+import javax.imageio.ImageWriteParam;
+import javax.imageio.ImageWriter;
+
+public class DisableCompressionTest {
+
+ public static void main(String[] args) {
+ testFormat("GIF");
+ }
+
+ protected static void testFormat(String format) {
+ ImageWriter writer = ImageIO.getImageWritersByFormatName(format).next();
+ if (writer == null) {
+ throw new RuntimeException("No writer for " + format);
+ }
+
+ ImageWriteParam param = writer.getDefaultWriteParam();
+ int[] supported_modes = new int[] {
+ ImageWriteParam.MODE_COPY_FROM_METADATA,
+ ImageWriteParam.MODE_DEFAULT,
+ ImageWriteParam.MODE_EXPLICIT };
+
+ for (int mode : supported_modes) {
+ String mode_name = getModeName(mode);
+ System.out.println("Test mode " + mode_name + "...");
+ // we know that GIF image writer supports compression
+ // and supports any compression mode form supportd_modes
+ // If exception would be thrown here then test failed.
+ param.setCompressionMode(mode);
+
+ // now we are trying to disable compression.
+ // This operation is not supported because GIF image writer
+ // does not provide uncompressed output.
+ // The expected behaviour is that UnsupportedOperationException
+ // will be thrown here and current compression mode will not be
+ // changed.
+ boolean gotException = false;
+ try {
+ param.setCompressionMode(ImageWriteParam.MODE_DISABLED);
+ } catch (UnsupportedOperationException e) {
+ gotException = true;
+ } catch (Throwable e) {
+ throw new RuntimeException("Test failed due to unexpected exception", e);
+ }
+
+ if (!gotException) {
+ throw new RuntimeException("Test failed.");
+ }
+
+ if (param.getCompressionMode() != mode) {
+ throw new RuntimeException("Param state was changed.");
+ }
+ System.out.println("Test passed.");
+ }
+ }
+
+ private static String getModeName(int mode) {
+ switch(mode) {
+ case ImageWriteParam.MODE_COPY_FROM_METADATA:
+ return "MODE_COPY_FROM_METADATA";
+ case ImageWriteParam.MODE_DEFAULT:
+ return "MODE_DEFAULT";
+ case ImageWriteParam.MODE_DISABLED:
+ return "MODE_DISABLED";
+ case ImageWriteParam.MODE_EXPLICIT:
+ return "MODE_EXPLICIT";
+ default:
+ throw new IllegalArgumentException("Unknown mode: " + mode);
+ }
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/plugins/gif/EndWriteSequenceTest.java Sat Jun 03 03:48:03 2017 +0000
@@ -0,0 +1,90 @@
+/*
+ * Copyright (c) 2005, 2017, 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 6275366 6275369
+ * @summary Verifies that behaviour of GIFImageWriter.endWriteSequence() is
+ * consistent with specification
+ */
+
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+
+import javax.imageio.ImageIO;
+import javax.imageio.ImageWriter;
+import javax.imageio.stream.ImageOutputStream;
+
+public class EndWriteSequenceTest {
+ public static void main(String[] args) throws IOException {
+ ImageWriter w =
+ ImageIO.getImageWritersByFormatName("GIF").next();
+
+ boolean gotCorrectException = false;
+
+ /**
+ * check statement: "Throws: IllegalStateException -
+ * if the output has not been set ...."
+ */
+ try {
+ w.reset(); // to be shure that output is null
+ w.endWriteSequence();
+ } catch (IllegalStateException e) {
+ gotCorrectException = true;
+ } catch (Throwable e) {
+ throw new RuntimeException("Test failed.", e);
+ }
+ if (!gotCorrectException) {
+ throw new RuntimeException("Test failed.");
+ }
+
+ /**
+ * set up output stream
+ */
+ ByteArrayOutputStream baos =
+ new ByteArrayOutputStream();
+
+ ImageOutputStream ios =
+ ImageIO.createImageOutputStream(baos);
+
+ w.setOutput(ios);
+
+ /**
+ * check statement: "Throws: IllegalStateException -
+ * if .... prepareWriteSequence has not been called.
+ */
+ gotCorrectException = false;
+ try {
+ w.endWriteSequence();
+ } catch (IllegalStateException e) {
+ gotCorrectException = true;
+ } catch (Throwable e) {
+ throw new RuntimeException("Test failed.", e);
+ }
+ if (!gotCorrectException) {
+ throw new RuntimeException("Test failed.");
+ }
+
+ System.out.println("Test passed.");
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/plugins/gif/IndexingTest.java Sat Jun 03 03:48:03 2017 +0000
@@ -0,0 +1,134 @@
+/*
+ * Copyright (c) 2005, 2017, 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 4339415
+ * @summary Tests that GIF writer plugin is able to write non-index images
+ */
+
+import java.awt.Color;
+import java.awt.Graphics2D;
+import java.awt.Transparency;
+import java.awt.color.ColorSpace;
+import java.awt.image.BufferedImage;
+import java.awt.image.ComponentColorModel;
+import java.awt.image.DataBuffer;
+import java.awt.image.WritableRaster;
+import java.io.File;
+import java.util.Random;
+
+import javax.imageio.ImageIO;
+import javax.imageio.ImageWriter;
+
+public class IndexingTest {
+
+ protected static final String fname = "itest.gif";
+
+ int w;
+ int h;
+
+ Random rnd;
+
+ public IndexingTest() {
+ w = h = 200;
+ rnd = new Random();
+ }
+
+ public void doTest() {
+ ComponentColorModel ccm = createBitmaskColorModel();
+ BufferedImage img = createComponentImage(w, h, ccm);
+
+ try {
+ ImageWriter w = ImageIO.getImageWritersByFormatName("GIF").next();
+ w.setOutput(ImageIO.createImageOutputStream(new File(fname)));
+ w.write(img);
+ } catch (Exception e) {
+ throw new RuntimeException("Test failed.", e);
+ }
+
+ BufferedImage dst = null;
+ try {
+ dst = ImageIO.read(new File(fname));
+ } catch (Exception e) {
+ throw new RuntimeException("Test failed.", e);
+ }
+
+ compareImages(img, dst);
+
+ System.out.println("Test passed.");
+ }
+
+ protected static ComponentColorModel createBitmaskColorModel() {
+ ComponentColorModel cm =
+ new ComponentColorModel(ColorSpace.getInstance(ColorSpace.CS_sRGB),
+ true, false, Transparency.BITMASK,
+ DataBuffer.TYPE_BYTE);
+ return cm;
+ }
+
+ protected static BufferedImage createComponentImage(int w, int h,
+ ComponentColorModel cm)
+ {
+ WritableRaster wr = cm.createCompatibleWritableRaster(w, h);
+
+ BufferedImage img = new BufferedImage(cm, wr, false, null);
+ Graphics2D g = img.createGraphics();
+ int width = w / 8;
+ Color[] colors = new Color[8];
+ colors[0] = Color.red;
+ colors[1] = Color.green;
+ colors[2] = Color.blue;
+ colors[3] = Color.white;
+ colors[4] = Color.black;
+ colors[5] = new Color(0x80, 0x80, 0x80, 0x00);
+ colors[6] = Color.yellow;
+ colors[7] = Color.cyan;
+
+ for (int i = 0; i < 8; i++) {
+ g.setColor(colors[i]);
+ g.fillRect(i * width, 0, width, h);
+ }
+ return img;
+ }
+
+ protected void compareImages(BufferedImage src, BufferedImage dst) {
+ int n = 10;
+ while (n-- > 0) {
+ int x = rnd.nextInt(w);
+ int y = rnd.nextInt(h);
+
+ int pSrc = src.getRGB(x, y);
+ int pDst = src.getRGB(x, y);
+
+ if (pSrc != pDst) {
+ throw new RuntimeException("Images are different");
+ }
+ }
+ }
+
+ public static void main(String[] args) {
+ IndexingTest t = new IndexingTest();
+ t.doTest();
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/plugins/gif/LogicalScreenDimensionTest.java Sat Jun 03 03:48:03 2017 +0000
@@ -0,0 +1,108 @@
+/*
+ * Copyright (c) 2005, 2017, 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 6307618
+ * @summary Test verifies that GIF image writer updates the dimension of the
+ * logical screen according to image dimension
+ * @modules java.desktop/com.sun.imageio.plugins.gif
+ */
+
+import java.awt.Color;
+import java.awt.Graphics2D;
+import java.awt.image.BufferedImage;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+
+import javax.imageio.IIOImage;
+import javax.imageio.ImageIO;
+import javax.imageio.ImageReader;
+import javax.imageio.ImageTypeSpecifier;
+import javax.imageio.ImageWriteParam;
+import javax.imageio.ImageWriter;
+import javax.imageio.metadata.IIOMetadata;
+import javax.imageio.stream.ImageInputStream;
+import javax.imageio.stream.ImageOutputStream;
+
+import com.sun.imageio.plugins.gif.GIFStreamMetadata;
+
+public class LogicalScreenDimensionTest {
+ public static void main(String[] args) throws IOException {
+ String format = "GIF";
+ ImageWriter writer =
+ ImageIO.getImageWritersByFormatName(format).next();
+ if (writer == null) {
+ throw new RuntimeException("No available writers for " + format);
+ }
+
+ BufferedImage img = createTestImage(100, 100, BufferedImage.TYPE_BYTE_GRAY);
+
+ ImageWriteParam p = writer.getDefaultWriteParam();
+ ImageTypeSpecifier type =
+ ImageTypeSpecifier.createFromRenderedImage(img);
+ IIOMetadata inImageMetadata =
+ writer.getDefaultImageMetadata(type, p);
+
+ IIOMetadata inStreamMetadata = writer.getDefaultStreamMetadata(p);
+
+ // write and read image
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+
+ ImageOutputStream ios = ImageIO.createImageOutputStream(baos);
+ writer.setOutput(ios);
+
+ writer.write(inStreamMetadata, new IIOImage(img, null, inImageMetadata), p);
+
+ ios.flush();
+ ios.close();
+
+ // read result
+ ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
+ ImageInputStream iis = ImageIO.createImageInputStream(bais);
+ ImageReader reader = ImageIO.getImageReader(writer);
+ reader.setInput(iis);
+
+ IIOMetadata outStreamMetadata = reader.getStreamMetadata();
+
+ GIFStreamMetadata gifStreamMetadata = (GIFStreamMetadata)outStreamMetadata;
+
+ if (gifStreamMetadata.logicalScreenWidth != img.getWidth() ||
+ gifStreamMetadata.logicalScreenHeight != img.getHeight()) {
+ throw new RuntimeException("Test failed due to wrong logical screen dimension.");
+ }
+ }
+
+ private static BufferedImage createTestImage(int w, int h, int type) {
+ BufferedImage res = new BufferedImage(w, h, type);
+ Graphics2D g = res.createGraphics();
+ g.setColor(Color.white);
+ g.fillRect(0, 0, w, h);
+ g.setColor(Color.black);
+ g.fillRect(w/4, h/4, w/2, h/2);
+
+
+ return res;
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/plugins/gif/OddPaletteTest.java Sat Jun 03 03:48:03 2017 +0000
@@ -0,0 +1,123 @@
+/*
+ * Copyright (c) 2005, 2017, 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 6275211 6276621
+ * @summary Tests that GIF writer plugin is able to write indexed images if
+ * palette size is not a power of two
+ */
+
+import java.awt.Color;
+import java.awt.Graphics2D;
+import java.awt.image.BufferedImage;
+import java.awt.image.IndexColorModel;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+
+import javax.imageio.ImageIO;
+import javax.imageio.ImageWriter;
+import javax.imageio.stream.ImageOutputStream;
+
+public class OddPaletteTest {
+
+ private static int w = 100;
+ private static int h = 100;
+
+ public static void main(String[] args) {
+ BufferedImage[] srcs = new BufferedImage[2];
+ srcs[0] = createTestImage(7); // bug 6275211
+ srcs[1] = createTestImage(1); // bug 6276621
+
+ for (int i = 0; i < srcs.length; i++) {
+ doTest(srcs[i]);
+ }
+ }
+
+ private static void doTest(BufferedImage src) {
+ ImageWriter w = ImageIO.getImageWritersByFormatName("GIF").next();
+ if (w == null) {
+ throw new RuntimeException("No writer available!");
+ }
+
+ try {
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+ ImageOutputStream ios = ImageIO.createImageOutputStream(baos);
+ w.setOutput(ios);
+ w.write(src);
+ } catch (IOException e) {
+ throw new RuntimeException("Test failed.", e);
+ } catch (IllegalArgumentException e) {
+ throw new RuntimeException("Test failed.", e);
+ }
+ }
+
+ private static BufferedImage createTestImage(int paletteSize) {
+ byte[] r = new byte[paletteSize];
+ byte[] g = new byte[paletteSize];
+ byte[] b = new byte[paletteSize];
+
+ int shift = 256 / paletteSize;
+ for (int i = 0; i < paletteSize; i++) {
+ r[i] = g[i] = b[i] = (byte)(shift * i);
+ }
+
+ int numBits = getNumBits(paletteSize);
+
+ System.out.println("num of bits " + numBits);
+
+ IndexColorModel icm =
+ new IndexColorModel(numBits, paletteSize, r, g, b);
+
+ BufferedImage img = new BufferedImage(w, h,
+ BufferedImage.TYPE_BYTE_INDEXED,
+ icm);
+ Graphics2D g2d = img.createGraphics();
+ g2d.setColor(Color.white);
+ g2d.fillRect(0, 0, w, h);
+ g2d.setColor(Color.black);
+ g2d.drawLine(0, 0, w, h);
+ g2d.drawLine(0, h, w, 0);
+
+ return img;
+ }
+
+ private static int getNumBits(int paletteSize) {
+ if (paletteSize < 0) {
+ throw new IllegalArgumentException("negative palette size: " +
+ paletteSize);
+ }
+ if (paletteSize < 2) {
+ return 1;
+ }
+ int numBits = 0;
+
+ paletteSize--;
+
+ while (paletteSize > 0) {
+ numBits++;
+ paletteSize = paletteSize >> 1;
+ }
+ return numBits;
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/plugins/gif/PrepareWriteSequenceTest.java Sat Jun 03 03:48:03 2017 +0000
@@ -0,0 +1,60 @@
+/*
+ * Copyright (c) 2005, 2017, 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 6284538
+ * @summary Test verifies whether IllegalStateException is thrown if the output
+ * stream have not set to the GIF image writer instance
+ */
+
+import java.io.IOException;
+
+import javax.imageio.ImageIO;
+import javax.imageio.ImageWriteParam;
+import javax.imageio.ImageWriter;
+import javax.imageio.metadata.IIOMetadata;
+
+public class PrepareWriteSequenceTest {
+ public static void main(String[] args) throws IOException {
+ String format = "GIF";
+ ImageWriter writer = ImageIO.getImageWritersByFormatName(format).next();
+
+ ImageWriteParam param = writer.getDefaultWriteParam();
+
+ IIOMetadata streamMetadata = writer.getDefaultStreamMetadata(param);
+
+ boolean gotException = false;
+ try {
+ writer.prepareWriteSequence(streamMetadata);
+ } catch (IllegalStateException e) {
+ gotException = true;
+ System.out.println("Test passed.");
+ e.printStackTrace(System.out);
+ }
+
+ if (!gotException) {
+ throw new RuntimeException("Test failed.");
+ }
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/plugins/gif/RGBAnimationTest.java Sat Jun 03 03:48:03 2017 +0000
@@ -0,0 +1,200 @@
+/*
+ * Copyright (c) 2005, 2017, 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 6324581
+ * @summary Test verifies that RGB images are written to animated GIF image use
+ * local color table if image palette is not equals to the global color
+ * table
+ * @modules java.desktop/com.sun.imageio.plugins.gif
+ */
+
+import java.awt.Color;
+import java.awt.Graphics2D;
+import java.awt.image.BufferedImage;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.util.ArrayList;
+
+import javax.imageio.IIOImage;
+import javax.imageio.ImageIO;
+import javax.imageio.ImageReader;
+import javax.imageio.ImageTypeSpecifier;
+import javax.imageio.ImageWriteParam;
+import javax.imageio.ImageWriter;
+import javax.imageio.metadata.IIOMetadata;
+import javax.imageio.stream.ImageOutputStream;
+
+import com.sun.imageio.plugins.gif.GIFImageMetadata;
+
+public class RGBAnimationTest {
+ protected static String format = "GIF";
+ protected static boolean doSave = true;
+
+ Frame[] frames;
+ ImageWriter writer;
+ ImageReader reader;
+
+ public static void main(String[] args) throws IOException {
+ RGBAnimationTest test = new RGBAnimationTest();
+ test.doTest();
+ }
+ /** Creates a new instance of RGBAnimationTest */
+ public RGBAnimationTest() {
+ frames = new Frame[4];
+
+
+ frames[0] = new Frame(new Color[] {Color.red, Color.green});
+ frames[1] = new Frame(new Color[] {Color.green, Color.cyan});
+ frames[2] = new Frame(new Color[] {Color.cyan, Color.yellow});
+ frames[3] = new Frame(new Color[] {Color.yellow, Color.red});
+
+ writer = ImageIO.getImageWritersByFormatName(format).next();
+ reader = ImageIO.getImageReadersByFormatName(format).next();
+ }
+
+ public void doTest() throws IOException {
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+ writer.reset();
+ ImageOutputStream ios = ImageIO.createImageOutputStream(baos);
+ writer.setOutput(ios);
+
+ ImageWriteParam wparam = prepareWriteParam();
+
+ IIOMetadata streamMetadata = prepareStreamMetadata(wparam);
+
+ writer.prepareWriteSequence(streamMetadata);
+
+ for (int i = 0; i < frames.length; i++) {
+ BufferedImage src = frames[i].getImage();
+ IIOMetadata imageMetadata = prepareImageMetadata(i, src, wparam);
+ IIOImage img = new IIOImage(src, null, imageMetadata);
+
+ writer.writeToSequence(img, wparam);
+ }
+ writer.endWriteSequence();
+ ios.flush();
+ ios.close();
+
+ if (doSave) {
+ File f = File.createTempFile("wr_test_", "." + format, new File("."));
+ System.out.println("Save to file: " + f.getCanonicalPath());
+ FileOutputStream fos = new FileOutputStream(f);
+ fos.write(baos.toByteArray());
+ fos.flush();
+ fos.close();
+ }
+ // read result
+ reader.reset();
+ ByteArrayInputStream bais =
+ new ByteArrayInputStream(baos.toByteArray());
+ reader.setInput(ImageIO.createImageInputStream(bais));
+
+ int minIndex = reader.getMinIndex();
+ int numImages = reader.getNumImages(true);
+
+ for (int i = 0; i < numImages; i++) {
+ BufferedImage dst = reader.read(i + minIndex);
+ frames[i].checkResult(dst);
+ }
+ }
+
+ protected IIOMetadata prepareImageMetadata(int i, BufferedImage img, ImageWriteParam wparam) {
+ GIFImageMetadata idata = (GIFImageMetadata)
+ writer.getDefaultImageMetadata(ImageTypeSpecifier.createFromRenderedImage(img), wparam);
+
+ idata.delayTime = 100;
+ idata.disposalMethod = 0;
+ idata.transparentColorFlag = false;
+
+ if (i == 0) {
+ ArrayList<byte[]> appIDs = new ArrayList<byte[]>();
+ appIDs.add(new String("NETSCAPE").getBytes());
+ ArrayList<byte[]> authCodes = new ArrayList<byte[]>();
+ authCodes.add(new String("2.0").getBytes());
+ ArrayList<byte[]> appData = new ArrayList<byte[]>();
+ byte[] authData = {1, 0, 0};
+ appData.add(authData);
+
+ idata.applicationIDs = appIDs;
+ idata.authenticationCodes = authCodes;
+ idata.applicationData = appData;
+ }
+ return idata;
+ }
+
+ protected ImageWriteParam prepareWriteParam() {
+ return writer.getDefaultWriteParam();
+ }
+
+ protected IIOMetadata prepareStreamMetadata(ImageWriteParam wparam) {
+ return writer.getDefaultStreamMetadata(wparam);
+ }
+
+}
+
+class Frame {
+ protected static int type = BufferedImage.TYPE_INT_RGB;
+ protected static int dx = 100;
+ protected static int h = 100;
+
+ protected Color[] colors;
+ protected BufferedImage img;
+
+ public Frame(Color[] colors) {
+ this.colors = colors;
+ img = null;
+ }
+
+ public BufferedImage getImage() {
+ if (img == null) {
+ img = new BufferedImage(dx * colors.length, h, type);
+ Graphics2D g = img.createGraphics();
+ for (int i = 0; i < colors.length; i++) {
+ g.setColor(colors[i]);
+ g.fillRect(dx * i, 0, dx, h);
+ }
+ }
+ return img;
+ }
+
+ public void checkResult(BufferedImage dst) {
+ int y = h / 2;
+ int x = dx / 2;
+ for (int i = 0; i < colors.length; i++) {
+
+ int srcRgb = img.getRGB(i * dx + x, y);
+ int dstRgb = dst.getRGB(i * dx + x, y);
+
+ if (srcRgb != dstRgb) {
+ throw new RuntimeException("Test failed due to color difference: " +
+ Integer.toHexString(dstRgb) + " instead of " +
+ Integer.toHexString(srcRgb));
+ }
+ }
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/plugins/gif/RGBImageTest.java Sat Jun 03 03:48:03 2017 +0000
@@ -0,0 +1,116 @@
+/*
+ * Copyright (c) 2005, 2017, 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 6286578
+ * @summary Test verifies that RGB images does not convert to gray-scaled if
+ * default image metadata is used
+ */
+
+import java.awt.Color;
+import java.awt.Graphics;
+import java.awt.image.BufferedImage;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+
+import javax.imageio.IIOImage;
+import javax.imageio.ImageIO;
+import javax.imageio.ImageReader;
+import javax.imageio.ImageTypeSpecifier;
+import javax.imageio.ImageWriteParam;
+import javax.imageio.ImageWriter;
+import javax.imageio.metadata.IIOMetadata;
+import javax.imageio.stream.ImageInputStream;
+import javax.imageio.stream.ImageOutputStream;
+
+public class RGBImageTest {
+
+ Color[] usedColors = {
+ Color.red, Color.green, Color.blue, Color.yellow,
+ Color.cyan, Color.magenta, Color.white, Color.black };
+
+ BufferedImage src = null;
+ int dx= 20;
+ int height = 100;
+
+ protected BufferedImage getSrc() {
+ if (src == null) {
+ src = new BufferedImage(dx * usedColors.length, height,
+ BufferedImage.TYPE_INT_RGB);
+ Graphics g = src.createGraphics();
+ for (int i = 0; i < usedColors.length; i++) {
+ g.setColor(usedColors[i]);
+ g.fillRect(dx * i, 0, dx, height);
+ }
+ }
+ return src;
+ }
+
+ protected void doTest() throws IOException {
+ BufferedImage biSrc = getSrc();
+
+ ImageWriter writer = ImageIO.getImageWritersByFormatName("GIF").next();
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+ ImageOutputStream ios = ImageIO.createImageOutputStream(baos);
+ writer.setOutput(ios);
+
+ ImageWriteParam writeParam = writer.getDefaultWriteParam();
+ IIOMetadata imageMetadata =
+ writer.getDefaultImageMetadata(new ImageTypeSpecifier(biSrc), writeParam);
+
+ IIOMetadata streamMetadata = writer.getDefaultStreamMetadata(writeParam);
+
+ IIOImage iioImg = new IIOImage(biSrc, null, imageMetadata);
+ writer.write(streamMetadata, iioImg, writeParam);
+ ios.close();
+
+ ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
+ ImageInputStream iis = ImageIO.createImageInputStream(bais);
+ ImageReader reader = ImageIO.getImageReader(writer);
+ reader.setInput(iis);
+ BufferedImage dst = reader.read(0);
+
+ // do test
+ int x = dx / 2;
+ int y = height / 2;
+
+ for (int i = 0; i < usedColors.length; i++) {
+ int dstRgb = dst.getRGB(x, y);
+ System.out.println("dstColor: " + Integer.toHexString(dstRgb));
+ int srcRgb = usedColors[i].getRGB();
+ System.out.println("srcColor: " + Integer.toHexString(srcRgb));
+ if (dstRgb != srcRgb) {
+ throw new RuntimeException("wrong color " + i + ": " + Integer.toHexString(dstRgb));
+ }
+ x += dx;
+ }
+
+ }
+
+ public static void main(String[] args) throws IOException {
+ RGBImageTest t = new RGBImageTest();
+ t.doTest();
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/plugins/gif/StreamMetadataTest.java Sat Jun 03 03:48:03 2017 +0000
@@ -0,0 +1,78 @@
+/*
+ * Copyright (c) 2005, 2017, 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 6319418
+ * @summary Test verifies that GIF stream metadata could be merged with tree
+ * representation for all supported formats
+ */
+
+import javax.imageio.ImageIO;
+import javax.imageio.ImageWriteParam;
+import javax.imageio.ImageWriter;
+import javax.imageio.metadata.IIOInvalidTreeException;
+import javax.imageio.metadata.IIOMetadata;
+
+import org.w3c.dom.Node;
+
+public class StreamMetadataTest {
+ protected static final String format = "GIF";
+
+ ImageWriter writer = null;
+ IIOMetadata streamData = null;
+ ImageWriteParam wparam = null;
+ boolean doMerge = true;
+
+ public StreamMetadataTest() {
+ writer = ImageIO.getImageWritersByFormatName(format).next();
+ wparam = writer.getDefaultWriteParam();
+ streamData = writer.getDefaultStreamMetadata(wparam);
+ }
+
+ public void doTest() throws IIOInvalidTreeException {
+ if (streamData == null) {
+ throw new RuntimeException("No stream metadata available");
+ }
+
+ String[] formatNames = streamData.getMetadataFormatNames();
+ for(String fname : formatNames) {
+ System.out.println("Format name: " + fname);
+ Node root = streamData.getAsTree(fname);
+ if (streamData.isReadOnly()) {
+ throw new RuntimeException("Stream metadata is readonly!");
+ }
+ streamData.reset();
+ streamData.mergeTree(fname, root);
+ }
+ }
+
+ public static void main(String args[]) {
+ StreamMetadataTest test = new StreamMetadataTest();
+ try {
+ test.doTest();
+ } catch (Exception e) {
+ throw new RuntimeException("Test failed.", e);
+ }
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/plugins/gif/TransparencyTest.java Sat Jun 03 03:48:03 2017 +0000
@@ -0,0 +1,145 @@
+/*
+ * Copyright (c) 2005, 2017, 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 4339415
+ * @summary Tests that GIF writer plugin is able to write images with BITMASK
+ * transparency
+ */
+
+import java.awt.Color;
+import java.awt.Graphics2D;
+import java.awt.image.BufferedImage;
+import java.awt.image.IndexColorModel;
+import java.awt.image.WritableRaster;
+import java.io.File;
+import java.io.IOException;
+
+import javax.imageio.ImageIO;
+import javax.imageio.ImageWriter;
+
+public class TransparencyTest {
+
+ protected static final String fname = "ttest.gif";
+ protected BufferedImage src;
+ protected BufferedImage dst;
+
+ public static void main(String[] args) {
+ System.out.println("Test indexed image...");
+ IndexColorModel icm = createIndexedBitmaskColorModel();
+ BufferedImage img = createIndexedImage(200, 200, icm);
+ TransparencyTest t = new TransparencyTest(img);
+
+ try {
+ t.doTest();
+ } catch (Exception e) {
+ throw new RuntimeException("Test failed!", e);
+ }
+ System.out.println("Test passed.");
+ }
+
+ protected TransparencyTest(BufferedImage src) {
+ this.src = src;
+ }
+
+ protected void doTest() throws IOException {
+ int w = src.getWidth();
+ int h = src.getHeight();
+
+ System.out.println("Write image...");
+ try {
+ ImageWriter writer =
+ ImageIO.getImageWritersByFormatName("GIF").next();
+ writer.setOutput(ImageIO.createImageOutputStream(new File(fname)));
+ writer.write(src);
+ } catch (Exception e) {
+ throw new RuntimeException("Test failed.", e);
+ }
+ System.out.println("Read image....");
+ dst = ImageIO.read(new File(fname));
+
+ BufferedImage tmp = new BufferedImage(w, 2 * h,
+ BufferedImage.TYPE_INT_ARGB);
+ Graphics2D g = tmp.createGraphics();
+ g.setColor(Color.pink);
+ g.fillRect(0, 0, tmp.getWidth(), tmp.getHeight());
+
+ g.drawImage(src, 0, 0, null);
+ g.drawImage(dst, 0, h, null);
+
+ int width = w / 8;
+ int x = 5 * width + width / 2;
+ for (int y = 0; y < h; y++) {
+ int argb = tmp.getRGB(x, y);
+ if (Color.pink.getRGB() != argb) {
+ throw new RuntimeException("Bad color at " + x + "," + y +
+ " - " + Integer.toHexString(argb));
+ }
+ }
+ }
+
+ protected static BufferedImage createIndexedImage(int w, int h,
+ IndexColorModel icm)
+ {
+ BufferedImage img = new BufferedImage(w, h,
+ BufferedImage.TYPE_BYTE_INDEXED,
+ icm);
+
+ int mapSize = icm.getMapSize();
+ int width = w / mapSize;
+
+ WritableRaster wr = img.getRaster();
+ for (int i = 0; i < mapSize; i++) {
+ for (int y = 0; y < h; y++) {
+ for (int x = 0; x < width; x++) {
+ wr.setSample(i * width + x, y, 0, i);
+ }
+ }
+ }
+ return img;
+ }
+
+ protected static IndexColorModel createIndexedBitmaskColorModel() {
+ int paletteSize = 8;
+ byte[] red = new byte[paletteSize];
+ byte[] green = new byte[paletteSize];
+ byte[] blue = new byte[paletteSize];
+
+ red[0] = (byte)0xff; green[0] = (byte)0x00; blue[0] = (byte)0x00;
+ red[1] = (byte)0x00; green[1] = (byte)0xff; blue[1] = (byte)0x00;
+ red[2] = (byte)0x00; green[2] = (byte)0x00; blue[2] = (byte)0xff;
+ red[3] = (byte)0xff; green[3] = (byte)0xff; blue[3] = (byte)0xff;
+ red[4] = (byte)0x00; green[4] = (byte)0x00; blue[4] = (byte)0x00;
+ red[5] = (byte)0x80; green[5] = (byte)0x80; blue[5] = (byte)0x80;
+ red[6] = (byte)0xff; green[6] = (byte)0xff; blue[6] = (byte)0x00;
+ red[7] = (byte)0x00; green[7] = (byte)0xff; blue[7] = (byte)0xff;
+
+ int numBits = 3;
+
+ IndexColorModel icm = new IndexColorModel(numBits, paletteSize,
+ red, green, blue, 5);
+
+ return icm;
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/plugins/gif/UshortOutOfMemoryTest.java Sat Jun 03 03:48:03 2017 +0000
@@ -0,0 +1,77 @@
+/*
+ * Copyright (c) 2005, 2017, 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 6294363
+ * @summary Test verifies that creation of tree representation of the native
+ * image metadata for USHORT_GRAY images does not cause the
+ * OutOfMemoryError
+ * @run main/othervm -Xms32M -Xmx32M UshortOutOfMemoryTest
+ */
+
+import java.awt.image.BufferedImage;
+import java.io.IOException;
+
+import javax.imageio.ImageIO;
+import javax.imageio.ImageTypeSpecifier;
+import javax.imageio.ImageWriteParam;
+import javax.imageio.ImageWriter;
+import javax.imageio.metadata.IIOMetadata;
+
+public class UshortOutOfMemoryTest {
+ private int type;
+ private ImageWriter w;
+
+ public UshortOutOfMemoryTest(int type) {
+ this.type = type;
+ w = ImageIO.getImageWritersByFormatName("GIF").next();
+ }
+
+ public void testGetAsTree() {
+ ImageWriteParam p = w.getDefaultWriteParam();
+ IIOMetadata m =
+ w.getDefaultImageMetadata(ImageTypeSpecifier.createFromBufferedImageType(type), p);
+
+ String format = m.getNativeMetadataFormatName();
+ System.out.println("native format: " + format);
+
+ int count = 0;
+ try {
+ while (count < 100) {
+ System.out.println(" test " + count++);
+ m.getAsTree(format);
+ }
+ } catch (OutOfMemoryError e) {
+ System.gc();
+ throw new RuntimeException("Test failed. Number of performed operations: " + count, e);
+ }
+ }
+
+
+ public static void main(String[] args) throws IOException {
+ UshortOutOfMemoryTest t = new UshortOutOfMemoryTest(
+ BufferedImage.TYPE_USHORT_GRAY);
+ t.testGetAsTree();
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/plugins/gif/WriteMetadataTest.java Sat Jun 03 03:48:03 2017 +0000
@@ -0,0 +1,81 @@
+/*
+ * Copyright (c) 2005, 2017, 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 6287880
+ * @summary Test verifies that default metadata for stream and image returned by
+ * GIFImageWriter can be modified by the tree representation
+ */
+
+import java.awt.image.BufferedImage;
+
+import javax.imageio.ImageIO;
+import javax.imageio.ImageTypeSpecifier;
+import javax.imageio.ImageWriteParam;
+import javax.imageio.ImageWriter;
+import javax.imageio.metadata.IIOInvalidTreeException;
+import javax.imageio.metadata.IIOMetadata;
+import javax.imageio.metadata.IIOMetadataNode;
+
+public class WriteMetadataTest {
+ private static String format = "GIF";
+
+ public static void main(String[] args) {
+ ImageWriter w = ImageIO.getImageWritersByFormatName(format).next();
+ if (w == null) {
+ throw new RuntimeException("No available writers for format " + format);
+ }
+ ImageWriteParam p = w.getDefaultWriteParam();
+
+ ImageTypeSpecifier t =
+ ImageTypeSpecifier.createFromBufferedImageType(BufferedImage.TYPE_INT_RGB);
+
+ IIOMetadata m = w.getDefaultImageMetadata(t, p);
+ System.out.println("Default image metadata is " + m);
+ testWritableMetadata(m);
+
+ IIOMetadata sm = w.getDefaultStreamMetadata(p);
+ System.out.println("Default stream metadata is " + sm);
+ testWritableMetadata(sm);
+ }
+
+ public static void testWritableMetadata(IIOMetadata m) {
+ String nativeFormatName =
+ m.getNativeMetadataFormatName();
+ System.out.println("Format: " + nativeFormatName);
+ IIOMetadataNode root = (IIOMetadataNode)m.getAsTree(nativeFormatName);
+ if (m.isReadOnly()) {
+ throw new RuntimeException("Metadata is read only!");
+ }
+ try {
+ m.setFromTree(nativeFormatName, root);
+ } catch (IIOInvalidTreeException e) {
+ e.printStackTrace();
+ throw new RuntimeException("Test failed!", e);
+ } catch (IllegalStateException e) {
+ throw new RuntimeException("Test failed!", e);
+ }
+ System.out.println("Test passed.\n\n");
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/plugins/gif/WriterResetTest.java Sat Jun 03 03:48:03 2017 +0000
@@ -0,0 +1,79 @@
+/*
+ * Copyright (c) 2005, 2017, 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 6275251
+ * @summary Verifies that GIF image writer throws IllegalStateException if
+ * assigned output stream was cleared by reset() method
+ */
+
+import java.awt.Color;
+import java.awt.Graphics2D;
+import java.awt.image.BufferedImage;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+
+import javax.imageio.ImageIO;
+import javax.imageio.ImageWriter;
+import javax.imageio.stream.ImageOutputStream;
+
+public class WriterResetTest {
+ public static void main(String[] args) throws IOException {
+ ImageWriter w = ImageIO.getImageWritersByFormatName("GIF").next();
+ if (w == null) {
+ throw new RuntimeException("No writers available!");
+ }
+
+ ByteArrayOutputStream baos =
+ new ByteArrayOutputStream();
+
+ ImageOutputStream ios =
+ ImageIO.createImageOutputStream(baos);
+
+ w.setOutput(ios);
+
+ BufferedImage img = createTestImage();
+
+ try {
+ w.reset();
+ w.write(img);
+ } catch (IllegalStateException e) {
+ System.out.println("Test passed");
+ } catch (Throwable e) {
+ throw new RuntimeException("Test failed", e);
+ }
+ }
+
+ private static BufferedImage createTestImage() {
+ BufferedImage img = new BufferedImage(100, 100,
+ BufferedImage.TYPE_INT_RGB);
+ Graphics2D g = img.createGraphics();
+ g.setColor(Color.white);
+ g.fillRect(0, 0, 100, 100);
+ g.setColor(Color.black);
+ g.fillRect(20, 20, 60, 60);
+
+ return img;
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/plugins/gif/WriterReuseTest.java Sat Jun 03 03:48:03 2017 +0000
@@ -0,0 +1,157 @@
+/*
+ * Copyright (c) 2005, 2017, 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 6283089
+ * @summary Test verifies that abort flag is cleared by the next write() call
+ */
+
+import java.awt.Color;
+import java.awt.Graphics;
+import java.awt.image.BufferedImage;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+
+import javax.imageio.IIOImage;
+import javax.imageio.ImageIO;
+import javax.imageio.ImageWriteParam;
+import javax.imageio.ImageWriter;
+import javax.imageio.event.IIOWriteProgressListener;
+import javax.imageio.metadata.IIOMetadata;
+import javax.imageio.stream.ImageOutputStream;
+
+public class WriterReuseTest implements IIOWriteProgressListener {
+
+ boolean isFirst = true;
+ boolean isWritingCompleted = false;
+ boolean isWritingAborted = false;
+
+ public static void main(String[] args) throws IOException {
+ doTest(false);
+ doTest(true);
+ }
+
+ public static void doTest(boolean writeSequence) throws IOException {
+ String format = "GIF";
+ ImageWriter writer =
+ ImageIO.getImageWritersByFormatName(format).next();
+ if (writer == null) {
+ throw new RuntimeException("No writer available for " + format);
+ }
+
+ BufferedImage img = createTestImage();
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+ ImageOutputStream ios = ImageIO.createImageOutputStream(baos);
+ writer.setOutput(ios);
+
+ WriterReuseTest t = new WriterReuseTest();
+ writer.addIIOWriteProgressListener(t);
+
+ ImageWriteParam param = writer.getDefaultWriteParam();
+ IIOMetadata streamMetadata = writer.getDefaultStreamMetadata(param);
+ IIOImage iioImg = new IIOImage(img, null, null);
+ if (writeSequence) {
+ writer.prepareWriteSequence(streamMetadata);
+ writer.writeToSequence(iioImg, param);
+ } else {
+ writer.write(img);
+ }
+
+ if (!t.isWritingAborted || t.isWritingCompleted) {
+ throw new RuntimeException("Test failed.");
+ }
+ t.reset();
+
+ // next attempt after abort
+ ImageOutputStream ios2 =
+ ImageIO.createImageOutputStream(new ByteArrayOutputStream());
+ writer.setOutput(ios2);
+ if (writeSequence) {
+ writer.writeToSequence(iioImg, param);
+ } else {
+ writer.write(img);
+ }
+
+ if (t.isWritingAborted || !t.isWritingCompleted) {
+ throw new RuntimeException("Test failed.");
+ }
+ System.out.println("Test passed.");
+ }
+
+ public static BufferedImage createTestImage() {
+ BufferedImage img = new BufferedImage(100, 100, BufferedImage.TYPE_BYTE_INDEXED);
+ Graphics g = img.createGraphics();
+ g.setColor(Color.black);
+ g.fillRect(0, 0, 100, 100);
+
+ g.setColor(Color.white);
+ g.fillRect(10, 10, 80, 80);
+
+ return img;
+ }
+
+ public WriterReuseTest() {
+ isFirst = true;
+ reset();
+ }
+
+ public void reset() {
+ isWritingAborted = false;
+ isWritingCompleted = false;
+ }
+
+ public void imageComplete(ImageWriter source) {
+ System.out.println("Image Completed");
+ this.isWritingCompleted = true;
+ }
+
+ public void imageProgress(ImageWriter source, float percentageDone) {
+ System.out.println("Image Progress "+percentageDone);
+ if (percentageDone > 50 && isFirst) {
+ isFirst = false;
+ source.abort();
+ }
+ }
+
+ public void imageStarted(ImageWriter source, int imageIndex) {
+ System.out.println("Image Started "+imageIndex);
+ }
+
+ public void thumbnailComplete(ImageWriter source) {
+ System.out.println("Thubnail completed");
+ }
+
+ public void thumbnailProgress(ImageWriter source, float percentageDone) {
+ System.out.println("Thubnail Progress " + percentageDone);
+ }
+
+ public void thumbnailStarted(ImageWriter source, int imageIndex, int thumbnailIndex) {
+ System.out.println("Thubnail started " + imageIndex);
+ }
+
+ public void writeAborted(ImageWriter source) {
+ System.out.println("Writing Aborted");
+ this.isWritingAborted = true;
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/plugins/jpeg/ByteBinaryTest.java Sat Jun 03 03:48:03 2017 +0000
@@ -0,0 +1,93 @@
+/*
+ * Copyright (c) 2002, 2017, 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 4450894
+ * @summary Tests if the JPEG writer properly encodes IndexColorModel images
+ * that contain less than 8-bit indices (such as TYPE_BYTE_BINARY)
+ */
+
+import java.awt.Color;
+import java.awt.Graphics;
+import java.awt.image.BufferedImage;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+
+import javax.imageio.ImageIO;
+
+public class ByteBinaryTest {
+
+ private static final int[] expectedVals =
+ { 0xffffffff, 0xff000000, 0xffffffff };
+
+ public static void main(String[] args) {
+ BufferedImage bi = new BufferedImage(100, 100,
+ BufferedImage.TYPE_BYTE_BINARY);
+
+ Graphics g = bi.createGraphics();
+ g.setColor(Color.white);
+ g.fillRect(0, 0, 100, 100);
+ g.setColor(Color.black);
+ g.fillRect(20, 20, 40, 40);
+ g.setColor(Color.white);
+ g.fillRect(25, 25, 25, 25);
+ g.dispose();
+
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+ boolean success;
+
+ try {
+ success = ImageIO.write(bi, "jpeg", baos);
+ } catch (IOException ioe) {
+ throw new RuntimeException("Could not write JPEG to stream");
+ }
+
+ if (!success) {
+ throw new RuntimeException("Could not find valid JPEG writer...");
+ }
+
+ byte[] bytearr = baos.toByteArray();
+ ByteArrayInputStream bais = new ByteArrayInputStream(bytearr);
+ BufferedImage bi2 = null;
+
+ try {
+ bi2 = ImageIO.read(bais);
+ } catch (IOException ioe) {
+ throw new RuntimeException("Could not read JPEG stream");
+ }
+
+ int[] actualVals = new int[3];
+
+ actualVals[0] = bi2.getRGB(27, 5);
+ actualVals[1] = bi2.getRGB(27, 22);
+ actualVals[2] = bi2.getRGB(35, 35);
+
+ for (int i = 0; i < actualVals.length; i++) {
+ if (actualVals[i] != expectedVals[i]) {
+ throw new RuntimeException("Pixel mismatch at index: " + i);
+ }
+ }
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/plugins/jpeg/CanEncodeIndexed.java Sat Jun 03 03:48:03 2017 +0000
@@ -0,0 +1,55 @@
+/*
+ * Copyright (c) 2002, 2017, 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 4528585
+ * @summary Tests whether the JPEGImageWriterSpi advertises that it is capable
+ * of writing images using an IndexColorModel. The test fails if an
+ * exception is thrown.
+ */
+
+import java.awt.image.BufferedImage;
+import java.util.Iterator;
+
+import javax.imageio.ImageIO;
+import javax.imageio.ImageTypeSpecifier;
+
+public class CanEncodeIndexed {
+
+ public static void main(String[] args) {
+ BufferedImage img = new BufferedImage(32, 32,
+ BufferedImage.TYPE_BYTE_INDEXED);
+
+ ImageTypeSpecifier spec =
+ ImageTypeSpecifier.createFromRenderedImage(img);
+
+ Iterator writers = ImageIO.getImageWriters(spec, "jpeg");
+
+ if (!writers.hasNext()) {
+ throw new RuntimeException("Test failed: " +
+ "no JPEG writer found for " +
+ "image with IndexColorModel");
+ }
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/plugins/jpeg/CompressionBug.java Sat Jun 03 03:48:03 2017 +0000
@@ -0,0 +1,120 @@
+/*
+ * Copyright (c) 2001, 2017, 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 4415068 4622201
+ * @summary Tests if the JPEG writer responds to the compression quality setting
+ */
+
+import java.awt.Color;
+import java.awt.Graphics;
+import java.awt.image.BufferedImage;
+import java.io.File;
+import java.io.IOException;
+import java.util.Iterator;
+import java.util.Random;
+
+import javax.imageio.IIOImage;
+import javax.imageio.ImageIO;
+import javax.imageio.ImageTypeSpecifier;
+import javax.imageio.ImageWriteParam;
+import javax.imageio.ImageWriter;
+import javax.imageio.stream.ImageOutputStream;
+
+public class CompressionBug {
+
+ public CompressionBug() throws IOException {
+ File fileHighComp = File.createTempFile("CompressionHigh", ".jpg");
+ File fileLowComp = File.createTempFile("CompressionLow", ".jpg");
+
+ fileHighComp.deleteOnExit();
+ fileLowComp.deleteOnExit();
+
+ ImageOutputStream iosHighComp =
+ ImageIO.createImageOutputStream(fileHighComp);
+ ImageOutputStream iosLowComp =
+ ImageIO.createImageOutputStream(fileLowComp);
+
+ int width = 100;
+ int height = 100;
+ BufferedImage bi =
+ new BufferedImage(width, height,
+ BufferedImage.TYPE_INT_RGB);
+ Graphics g = bi.createGraphics();
+ Random r = new Random();
+ for (int i = 0; i < 100; i++) {
+ Color c = new Color(r.nextInt(256),
+ r.nextInt(256),
+ r.nextInt(256));
+ int x = r.nextInt(width);
+ int y = r.nextInt(height);
+ int w = r.nextInt(width - x);
+ int h = r.nextInt(height - y);
+ g.setColor(c);
+ g.fillRect(x, y, w, h);
+ }
+
+ ImageTypeSpecifier typeSpecifier =
+ new ImageTypeSpecifier(bi.getColorModel(),
+ bi.getSampleModel());
+
+ ImageWriter writer = null;
+ Iterator iter = ImageIO.getImageWriters(typeSpecifier,"jpeg");
+ while (iter.hasNext()) {
+ writer = (ImageWriter)iter.next();
+ break;
+ }
+
+ IIOImage iioImg = new IIOImage(bi, null, null);
+ ImageWriteParam wParam = writer.getDefaultWriteParam();
+ wParam.setCompressionMode(ImageWriteParam.MODE_EXPLICIT);
+
+ // write the highly compressed image (a compression quality setting of
+ // 0.1f means low visual quality and small file size)
+ wParam.setCompressionQuality(0.1f);
+ writer.setOutput(iosHighComp);
+ writer.write(null, iioImg, wParam);
+
+ // write the somewhat compressed image (a compression quality setting
+ // of 0.9f means high visual quality and large file size)
+ wParam.setCompressionQuality(0.9f);
+ writer.setOutput(iosLowComp);
+ writer.write(null, iioImg, wParam);
+
+ long sizeOfFileLowComp = fileLowComp.length();
+ long sizeOfFileHighComp = fileHighComp.length();
+
+ // the highly compressed image file should have a smaller file size
+ // than the image file with low compression; throw an exception if
+ // this isn't the case
+ if (sizeOfFileLowComp < sizeOfFileHighComp) {
+ throw new RuntimeException("Lower compression quality did not " +
+ "reduce file size!");
+ }
+ }
+
+ public static void main(String args[]) throws IOException {
+ new CompressionBug();
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/plugins/jpeg/CompressionVals.java Sat Jun 03 03:48:03 2017 +0000
@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) 2005, 2017, 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 4972087
+ * @summary Verifies that JPEGImageWriteParam.getCompressionQualityValues()
+ * returns an array that is one longer than the one returned by
+ * getCompressionQualityDescriptions()
+ */
+
+import javax.imageio.ImageWriteParam;
+import javax.imageio.plugins.jpeg.JPEGImageWriteParam;
+
+public class CompressionVals {
+
+ public static void main(String[] args) {
+ ImageWriteParam iwp = new JPEGImageWriteParam(null);
+ iwp.setCompressionMode(ImageWriteParam.MODE_EXPLICIT);
+ float[] vals = iwp.getCompressionQualityValues();
+ String[] descs = iwp.getCompressionQualityDescriptions();
+ if (vals.length != (descs.length + 1)) {
+ throw new RuntimeException("Test failed: Values array is not " +
+ "one larger than descriptions array");
+ }
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/plugins/jpeg/CrashAfterDispose.java Sat Jun 03 03:48:03 2017 +0000
@@ -0,0 +1,135 @@
+/*
+ * Copyright (c) 2002, 2017, 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 4660047
+ * @summary Tests if the JPEG reader/writer crashes the VM if certain methods
+ * are called after a call to dispose()
+ */
+
+import java.awt.image.BufferedImage;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.util.Iterator;
+
+import javax.imageio.ImageIO;
+import javax.imageio.ImageReader;
+import javax.imageio.ImageWriter;
+import javax.imageio.stream.ImageInputStream;
+import javax.imageio.stream.ImageOutputStream;
+
+public class CrashAfterDispose {
+
+ public static void main(String[] args) throws IOException {
+ InputStream bais = new ByteArrayInputStream(new byte[100]);
+ ImageInputStream iis = ImageIO.createImageInputStream(bais);
+
+ // find the JPEG reader
+ ImageReader reader = null;
+ Iterator readers = ImageIO.getImageReadersByFormatName("jpeg");
+ if (readers.hasNext()) {
+ reader = (ImageReader)readers.next();
+ } else {
+ throw new RuntimeException("Unable to find a reader!");
+ }
+
+ // dispose the reader, then poke and prod it... the reader should
+ // throw exceptions (which will be caught by this test), but it
+ // should not crash the VM
+ reader.dispose();
+
+ try {
+ reader.setInput(iis);
+ } catch (IllegalStateException e) {
+ }
+
+ try {
+ reader.read(0);
+ } catch (IllegalStateException e) {
+ }
+
+ try {
+ reader.abort();
+ } catch (IllegalStateException e) {
+ }
+
+ try {
+ reader.reset();
+ } catch (IllegalStateException e) {
+ }
+
+ try {
+ reader.dispose();
+ } catch (IllegalStateException e) {
+ }
+
+ // find the JPEG writer
+ ImageWriter writer = null;
+ Iterator writers = ImageIO.getImageWritersByFormatName("jpeg");
+ if (writers.hasNext()) {
+ writer = (ImageWriter)writers.next();
+ } else {
+ throw new RuntimeException("Unable to find a writer!");
+ }
+
+ // set up output stream
+ OutputStream baos = new ByteArrayOutputStream();
+ ImageOutputStream ios = ImageIO.createImageOutputStream(baos);
+ BufferedImage bi = new BufferedImage(10, 10,
+ BufferedImage.TYPE_INT_RGB);
+
+ // dispose the writer, then poke and prod it... the writer should
+ // throw exceptions (which will be caught by this test), but it
+ // should not crash the VM
+ writer.dispose();
+
+ try {
+ writer.setOutput(ios);
+ } catch (IllegalStateException e) {
+ }
+
+ try {
+ writer.write(bi);
+ } catch (IllegalStateException e) {
+ }
+
+ try {
+ writer.abort();
+ } catch (IllegalStateException e) {
+ }
+
+ try {
+ writer.reset();
+ } catch (IllegalStateException e) {
+ }
+
+ try {
+ writer.dispose();
+ } catch (IllegalStateException e) {
+ }
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/plugins/jpeg/DestTypeTest.java Sat Jun 03 03:48:03 2017 +0000
@@ -0,0 +1,157 @@
+/*
+ * Copyright (c) 2004, 2017, 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 5028259
+ * @summary Verifies that usage of the destination type does not cause the
+ * increase of size of the result jpeg file
+ */
+
+import java.awt.Color;
+import java.awt.Graphics;
+import java.awt.image.BufferedImage;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+
+import javax.imageio.IIOImage;
+import javax.imageio.ImageIO;
+import javax.imageio.ImageReader;
+import javax.imageio.ImageTypeSpecifier;
+import javax.imageio.ImageWriteParam;
+import javax.imageio.ImageWriter;
+import javax.imageio.event.IIOReadWarningListener;
+import javax.imageio.event.IIOWriteWarningListener;
+import javax.imageio.metadata.IIOMetadata;
+import javax.imageio.stream.ImageOutputStream;
+
+public class DestTypeTest implements IIOWriteWarningListener, IIOReadWarningListener {
+
+ ImageWriter w;
+ ImageReader r;
+
+ public static void main(String[] args) throws IOException {
+ BufferedImage bi_rgb = createTestImage(BufferedImage.TYPE_INT_RGB);
+
+ DestTypeTest bug = new DestTypeTest();
+ byte[] rgb_data = bug.writeTest(bi_rgb);
+
+ System.out.println("rgb jpeg data length is " + rgb_data.length);
+
+ BufferedImage bi_argb = createTestImage(BufferedImage.TYPE_INT_ARGB);
+
+ ImageWriteParam p = bug.getWriteParam();
+ IIOMetadata m = bug.getMetadata(p);
+
+ byte[] submeta_data = bug.writeTest(bi_argb, p, m);
+ System.out.println("desttype and metadata jpeg data length is " + submeta_data.length);
+
+ p = bug.getWriteParam();
+ byte[] subbanded_data = bug.writeTest(bi_argb, p);
+ System.out.println("desttype jpeg data length is " + subbanded_data.length);
+
+ if (submeta_data.length > rgb_data.length) {
+ throw new RuntimeException("Too big result jpeg: " + submeta_data.length +
+ "(rgb image size is " + rgb_data.length + ")");
+ }
+ if (subbanded_data.length > rgb_data.length) {
+ throw new RuntimeException("Too big result jpeg: " + subbanded_data.length +
+ "(rgb image size is " + rgb_data.length + ")");
+ }
+ }
+
+ public DestTypeTest() {
+ w = (ImageWriter)
+ ImageIO.getImageWritersByFormatName("jpeg").next();
+ w.addIIOWriteWarningListener(this);
+
+ r = (ImageReader)
+ ImageIO.getImageReadersByFormatName("jpeg").next();
+ r.addIIOReadWarningListener(this);
+ }
+
+ public ImageWriteParam getWriteParam() {
+ ImageWriteParam p = w.getDefaultWriteParam();
+ p.setSourceBands(new int[] {0, 1, 2});
+ ImageTypeSpecifier type =
+ ImageTypeSpecifier.createFromBufferedImageType(BufferedImage.TYPE_INT_RGB);
+ p.setDestinationType(type);
+
+ return p;
+ }
+
+ public IIOMetadata getMetadata(ImageWriteParam p) {
+ return w.getDefaultImageMetadata(p.getDestinationType(), null);
+ }
+
+ public byte[] writeTest(BufferedImage bi) throws IOException {
+ return writeTest(bi, null);
+ }
+
+ public byte[] writeTest(BufferedImage bi,
+ ImageWriteParam p) throws IOException {
+ return writeTest(bi, p, null);
+ }
+ public byte[] writeTest(BufferedImage bi,
+ ImageWriteParam p,
+ IIOMetadata m) throws IOException {
+ ByteArrayOutputStream baos =
+ new ByteArrayOutputStream();
+
+ // write test image as jpeg
+ ImageOutputStream ios =
+ ImageIO.createImageOutputStream(baos);
+ w.setOutput(ios);
+ w.write(null,
+ new IIOImage(bi, null, m),
+ p);
+ ios.close();
+ return baos.toByteArray();
+ }
+
+ public static BufferedImage createTestImage(int type) {
+ int w = 100;
+ int h = 500;
+ BufferedImage bi = new BufferedImage(3*w, h, type);
+ Graphics g = bi.createGraphics();
+ g.setColor(Color.red);
+ g.fillRect(0,0,w,h);
+ g.setColor(Color.green);
+ g.fillRect(w, 0,w,h);
+ g.setColor(Color.blue);
+ g.fillRect(2*w,0,w,h);
+
+ return bi;
+ }
+
+ public void warningOccurred(ImageWriter source,
+ int imageIndex,
+ String warning) {
+ System.out.println("WRITING WARNING: " + warning);
+ }
+
+ public void warningOccurred(ImageReader source,
+ String warning) {
+ System.out.println("READING WARNING: " + warning);
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/plugins/jpeg/JPEGsNotAcceleratedTest.java Sat Jun 03 03:48:03 2017 +0000
@@ -0,0 +1,365 @@
+/*
+ * Copyright (c) 2004, 2017, 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 4994702
+ * @key headful
+ * @summary verifies that no regression were introduced with the fix for this
+ * bug
+ */
+
+import java.awt.AlphaComposite;
+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.ImageCapabilities;
+import java.awt.Rectangle;
+import java.awt.event.MouseAdapter;
+import java.awt.event.MouseEvent;
+import java.awt.image.BufferedImage;
+import java.awt.image.DataBuffer;
+import java.awt.image.VolatileImage;
+import java.awt.image.WritableRaster;
+import java.io.File;
+import java.io.IOException;
+
+import javax.imageio.IIOImage;
+import javax.imageio.ImageIO;
+import javax.imageio.ImageReadParam;
+import javax.imageio.ImageReader;
+import javax.imageio.ImageWriteParam;
+import javax.imageio.ImageWriter;
+import javax.imageio.stream.FileImageInputStream;
+import javax.imageio.stream.ImageOutputStream;
+
+public class JPEGsNotAcceleratedTest {
+
+ public static final int testRGB = Color.red.getRGB();
+ public static final int TEST_W = 100;
+ public static final int TEST_H = 100;
+ public static final Rectangle roi =
+ new Rectangle(TEST_W/4, TEST_H/4, TEST_W/2, TEST_H/2);
+
+ static Frame f;
+ static boolean showRes = false;
+ static int testsFinished = 0;
+ static int testsStarted = 0;
+ static boolean lowCompression = false;
+
+ static boolean failed = false;
+
+ public JPEGsNotAcceleratedTest(String name) {
+ BufferedImage bi = readTestImage(name, null, null);
+ runTestOnImage("no dest image, no region of interest", bi, null);
+
+ BufferedImage destBI = getDestImage();
+ bi = readTestImage(name, destBI, null);
+ runTestOnImage("w/ dest image, no region of interest", bi, null);
+
+ // steal the raster, see if the destination image
+ // gets accelerated
+ destBI = getDestImage();
+ DataBuffer db =
+ ((WritableRaster)destBI.getRaster()).getDataBuffer();
+ bi = readTestImage(name, destBI, null);
+ runTestOnImage("w/ dest image (with stolen raster),"+
+ " no region of interest", bi, null);
+
+ bi = readTestImage(name, null, roi);
+ runTestOnImage("no dest image, region of interest", bi, roi);
+
+ destBI = getDestImage();
+ bi = readTestImage(name, destBI, roi);
+ runTestOnImage("w/ dest image, region of interest", bi, roi);
+
+ // accelerate the destination image first, then load
+ // an image into it. Check that the accelerated copy gets
+ // updated
+ destBI = getDestImage();
+ accelerateImage(destBI);
+ bi = readTestImage(name, destBI, roi);
+ runTestOnImage("w/ accelerated dest image,"+
+ " region of interest", bi, roi);
+
+ synchronized (JPEGsNotAcceleratedTest.class) {
+ testsFinished++;
+ JPEGsNotAcceleratedTest.class.notify();
+ }
+
+ }
+
+ public static BufferedImage readTestImage(String fileName,
+ BufferedImage dest,
+ Rectangle srcROI)
+ {
+ BufferedImage bi = null;
+
+ try {
+ FileImageInputStream is =
+ new FileImageInputStream(new File(fileName));
+ ImageReader reader =
+ (ImageReader)ImageIO.getImageReaders(is).next();
+ ImageReadParam param = reader.getDefaultReadParam();
+ if (dest != null) {
+ param.setDestination(dest);
+ }
+ if (srcROI != null) {
+ param.setSourceRegion(srcROI);
+ }
+ reader.setInput(is);
+ bi = reader.read(0, param);
+ } catch (IOException e) {
+ System.err.println("Error " + e +
+ " when reading file: " + fileName);
+ throw new RuntimeException(e);
+ }
+
+ return bi;
+ }
+
+ public static void writeTestImage(String fileName) {
+ BufferedImage bi =
+ new BufferedImage(TEST_W, TEST_H, BufferedImage.TYPE_INT_RGB);
+ Graphics g = bi.getGraphics();
+ g.setColor(new Color(testRGB));
+ g.fillRect(0, 0, TEST_W, TEST_H);
+ try {
+ System.err.printf("Writing %s\n", fileName);
+ if (lowCompression) {
+ ImageWriter iw = (ImageWriter)ImageIO.getImageWritersBySuffix("jpeg").next();
+ if(iw == null) {
+ throw new RuntimeException("No available image writer for "
+ + "jpeg "
+ + " Test failed.");
+ }
+
+ File file = new File(fileName);
+ ImageOutputStream ios = ImageIO.createImageOutputStream(file);
+ iw.setOutput(ios);
+
+ ImageWriteParam param = iw.getDefaultWriteParam();
+ param.setCompressionMode(ImageWriteParam.MODE_EXPLICIT);
+ param.setCompressionQuality(1);
+
+ IIOImage iioImg = new IIOImage(bi, null, null);
+ iw.write(null, iioImg, param);
+
+ } else {
+ ImageIO.write(bi, "jpeg", new File(fileName));
+ }
+ } catch (IOException e) {
+ System.err.println("Error " + e +
+ " when writing file: " + fileName);
+ throw new RuntimeException(e);
+ }
+ }
+
+ public VolatileImage accelerateImage(BufferedImage bi) {
+ VolatileImage testVI = f.createVolatileImage(TEST_W, TEST_H);
+ do {
+ if (testVI.validate(f.getGraphicsConfiguration()) ==
+ VolatileImage.IMAGE_INCOMPATIBLE)
+ {
+ testVI = f.createVolatileImage(TEST_W, TEST_H);
+ }
+ Graphics2D g = testVI.createGraphics();
+ g.setComposite(AlphaComposite.Src);
+ g.setColor(Color.green);
+ g.fillRect(0, 0, TEST_W, TEST_H);
+
+ g.drawImage(bi, 0, 0, null);
+ g.drawImage(bi, 0, 0, null);
+ g.drawImage(bi, 0, 0, null);
+ g.dispose();
+ } while (testVI.contentsLost());
+
+ return testVI;
+ }
+
+ public BufferedImage getDestImage() {
+ BufferedImage destBI =
+ new BufferedImage(TEST_W, TEST_H, BufferedImage.TYPE_INT_RGB);
+ Graphics2D g = (Graphics2D)destBI.getGraphics();
+ g.setComposite(AlphaComposite.Src);
+ g.setColor(Color.blue);
+ g.fillRect(0, 0, TEST_W, TEST_H);
+ return destBI;
+ }
+
+ public void runTestOnImage(String desc, BufferedImage bi,
+ Rectangle srcROI)
+ {
+
+ if (srcROI == null) {
+ srcROI = new Rectangle(0, 0, TEST_W, TEST_H);
+ }
+
+ VolatileImage testVI = accelerateImage(bi);
+
+ ImageCapabilities ic =
+ bi.getCapabilities(f.getGraphicsConfiguration());
+ boolean accelerated = ic.isAccelerated();
+
+ System.err.println("Testing: " + desc +
+ " -- bi.isAccelerated(): " + accelerated );
+
+ BufferedImage snapshot = testVI.getSnapshot();
+ if (showRes) {
+ showRes(desc, snapshot);
+ }
+
+ for (int y = 0; y < srcROI.height; y++) {
+ for (int x = 0; x < srcROI.width; x++) {
+ int destRGB = snapshot.getRGB(x, y);
+ if (destRGB != testRGB && destRGB != 0xfffe0000) {
+ failed = true;
+ System.err.printf("Test failed at %dx%d pixel=%x\n",
+ x, y, snapshot.getRGB(x, y));
+ if (!showRes) {
+ showRes(desc, snapshot);
+ }
+ break;
+ }
+ }
+ }
+ }
+
+ static int startX = 64, startY = 0;
+ static int frameX = startX, frameY = startY;
+ private static void showRes(String desc, final BufferedImage src) {
+ final int w = src.getWidth();
+ final int h = src.getHeight();
+
+ Frame f = new Frame(desc+": dbl-click to exit");
+ Component c;
+ f.add(c = new Component() {
+ public Dimension getPreferredSize() {
+ return new Dimension(w,h);
+ }
+
+ public void paint(Graphics g) {
+ g.clearRect(0, 0, getWidth(), getHeight());
+ g.drawImage(src, 0,0, null);
+ }
+ });
+ c.addMouseListener(new MouseAdapter() {
+ public void mouseClicked(MouseEvent e) {
+ if (e.getClickCount() > 1) {
+ System.exit(0);
+ }
+ }
+ });
+ f.pack();
+ synchronized (JPEGsNotAcceleratedTest.class) {
+ f.setLocation(frameX, frameY);
+ frameX += f.getWidth();
+ if ((frameX + f.getWidth()) >
+ f.getGraphicsConfiguration().getBounds().width)
+ {
+ frameY += TEST_H;
+ if ((frameY + f.getHeight()) >
+ f.getGraphicsConfiguration().getBounds().height)
+ {
+ startY += 30;
+ startX += 30;
+ frameY = startY;
+ }
+ frameX = startX;
+ }
+ };
+ f.setVisible(true);
+ }
+
+ public static void usage() {
+ System.err.println("Usage: java Test [file name] [-write][-show][-low]");
+ System.exit(0);
+ }
+
+ public static void main(String[] args) {
+ System.setProperty("sun.java2d.pmoffscreen", "true");
+ System.setProperty("sun.java2d.ddforcevram", "true");
+ String name = "red.jpg";
+
+ f = new Frame();
+ f.pack();
+
+ if (f.getGraphicsConfiguration().getColorModel().getPixelSize() < 16) {
+ System.err.println("8-bit display mode detected, dithering issues possible, "+
+ "considering test passed.");
+ f.dispose();
+ return;
+ }
+
+
+ for (String arg : args) {
+ if (arg.equals("-write")) {
+ writeTestImage(name);
+ System.exit(0);
+ } else if (arg.equals("-show")) {
+ showRes = true;
+ } else if (arg.equals("-low")) {
+ lowCompression = true;
+ name ="red_low.jpg";
+ System.err.println("Using low jpeg compression");
+ } else if (arg.equals("-help")) {
+ usage();
+ } else {
+ final String filename = arg;
+ testsStarted++;
+ new Thread(new Runnable() {
+ public void run() {
+ new JPEGsNotAcceleratedTest(filename);
+ }
+ }).start();
+ }
+ }
+
+ if (testsStarted == 0) {
+ writeTestImage(name);
+ testsStarted++;
+ new JPEGsNotAcceleratedTest(name);
+ }
+
+
+ synchronized (JPEGsNotAcceleratedTest.class) {
+ while (testsFinished < testsStarted) {
+ try {
+ JPEGsNotAcceleratedTest.class.wait(100);
+ } catch (InterruptedException e) {
+ failed = true; break;
+ }
+ }
+ }
+
+ f.dispose();
+ if (failed) {
+ throw new RuntimeException("Test failed");
+ }
+
+ System.err.println("Passed.");
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/plugins/jpeg/MergeTreeTest.java Sat Jun 03 03:48:03 2017 +0000
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 2004, 2017, 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 4895547
+ * @summary Test verifies that mergeTree() of JPEGMetadata does not throw the
+ * NPE
+ */
+
+import java.awt.image.BufferedImage;
+import java.io.File;
+import java.io.IOException;
+
+import javax.imageio.ImageIO;
+import javax.imageio.ImageTypeSpecifier;
+import javax.imageio.ImageWriter;
+import javax.imageio.metadata.IIOMetadata;
+import javax.imageio.stream.ImageOutputStream;
+
+import org.w3c.dom.Node;
+
+public class MergeTreeTest {
+ public static void main(String[] args) throws IOException {
+ ImageWriter iw =
+ (ImageWriter)ImageIO.getImageWritersByFormatName("jpeg").next();
+
+ ImageTypeSpecifier type =
+ ImageTypeSpecifier.createFromBufferedImageType(BufferedImage.TYPE_INT_RGB);
+
+ ImageOutputStream ios =
+ ImageIO.createImageOutputStream(new File("MergeTreeTest.jpeg"));
+ iw.setOutput(ios);
+
+ IIOMetadata meta = iw.getDefaultImageMetadata(type, null);
+
+ boolean isFailed = false;
+
+ String[] fmts = meta.getMetadataFormatNames();
+ for (int i=0; i<fmts.length; i++) {
+ System.out.print("Format: " + fmts[i] + " ... ");
+ Node root = meta.getAsTree(fmts[i]);
+ try {
+ meta.mergeTree(fmts[i], root);
+ } catch (NullPointerException e) {
+ throw new RuntimeException("Test failed for format " + fmts[i], e);
+ }
+ System.out.println("PASSED");
+ }
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/plugins/jpeg/RasterWithMinXTest.java Sat Jun 03 03:48:03 2017 +0000
@@ -0,0 +1,112 @@
+/*
+ * Copyright (c) 2003, 2017, 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 4843895
+ * @summary Tests that we handle raster with non-zero minX and minY correctly
+ * @modules java.desktop/com.sun.imageio.plugins.jpeg
+ */
+
+import java.awt.Rectangle;
+import java.awt.image.BufferedImage;
+import java.awt.image.RasterFormatException;
+import java.awt.image.WritableRaster;
+import java.io.ByteArrayOutputStream;
+import java.util.Arrays;
+import java.util.Iterator;
+
+import javax.imageio.IIOImage;
+import javax.imageio.ImageIO;
+import javax.imageio.ImageTypeSpecifier;
+import javax.imageio.ImageWriteParam;
+import javax.imageio.ImageWriter;
+import javax.imageio.metadata.IIOMetadata;
+import javax.imageio.stream.ImageOutputStream;
+import javax.imageio.stream.MemoryCacheImageOutputStream;
+
+public class RasterWithMinXTest {
+
+ public static void main(String[] args) {
+ String format = "jpeg";
+
+ // Set output file.
+ ImageOutputStream output = new MemoryCacheImageOutputStream(new ByteArrayOutputStream());
+
+ // Create image.
+ BufferedImage bi = new BufferedImage(256, 256,
+ BufferedImage.TYPE_3BYTE_BGR);
+
+ // Populate image.
+ int[] rgbArray = new int[256];
+ for(int i = 0; i < 256; i++) {
+ Arrays.fill(rgbArray, i);
+ bi.setRGB(0, i, 256, 1, rgbArray, 0, 256);
+ }
+
+ // create translated raster in order to get non-zero minX and minY
+ WritableRaster r = (WritableRaster)bi.getRaster().createTranslatedChild(64,64);
+
+ Iterator i = ImageIO.getImageWritersByFormatName(format);
+ ImageWriter iw = null;
+ while(i.hasNext() && iw == null) {
+ Object o = i.next();
+ if (o instanceof com.sun.imageio.plugins.jpeg.JPEGImageWriter) {
+ iw = (ImageWriter)o;
+ }
+ }
+ if (iw == null) {
+ throw new RuntimeException("No available image writer");
+ }
+
+ ImageWriteParam iwp = iw.getDefaultWriteParam();
+ IIOMetadata metadata = iw.getDefaultImageMetadata(new ImageTypeSpecifier(bi.getColorModel(), r.getSampleModel()), iwp);
+
+ IIOImage img = new IIOImage(r, null, metadata);
+
+ iw.setOutput(output);
+ try {
+ iw.write(img);
+ } catch (RasterFormatException e) {
+ e.printStackTrace();
+ throw new RuntimeException("RasterException occurs. Test Failed!");
+ } catch (Exception ex) {
+ ex.printStackTrace();
+ throw new RuntimeException("Unexpected Exception");
+ }
+
+ // test case of theImageWriteParam with non-null sourceRegion
+ iwp.setSourceRegion(new Rectangle(32,32,192,192));
+ metadata = iw.getDefaultImageMetadata(new ImageTypeSpecifier(bi.getColorModel(), r.getSampleModel()), iwp);
+ try {
+ iw.write(metadata, img, iwp);
+ } catch (RasterFormatException e) {
+ e.printStackTrace();
+ throw new RuntimeException("SetSourceRegion causes the RasterException. Test Failed!");
+ } catch (Exception ex) {
+ ex.printStackTrace();
+ throw new RuntimeException("Unexpected Exception");
+ }
+
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/plugins/jpeg/ResetOutOfMemory.java Sat Jun 03 03:48:03 2017 +0000
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 2001, 2017, 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 4411955
+ * @summary Checks that the JPEG writer does not throw an OutOfMemoryError from
+ * its reset() method
+ * @modules java.desktop/com.sun.imageio.plugins.jpeg
+ */
+
+import javax.imageio.ImageWriter;
+
+import com.sun.imageio.plugins.jpeg.JPEGImageWriter;
+
+public class ResetOutOfMemory {
+
+ public static void main(String args[]) {
+ ImageWriter writer = new JPEGImageWriter(null);
+ try {
+ writer.reset();
+ } catch (OutOfMemoryError e) {
+ throw new RuntimeException("Got OutOfMemoryError!");
+ }
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/plugins/jpeg/UshortGrayTest.java Sat Jun 03 03:48:03 2017 +0000
@@ -0,0 +1,92 @@
+/*
+ * Copyright (c) 2002, 2017, 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 4450894
+ * @summary Tests if the JPEGImageWriter allows images with > 8-bit samples to
+ * be written. Also tests the JPEGImageWriterSpi.canEncodeImage()
+ * mechanism for this same behavior.
+ */
+
+import java.awt.image.BufferedImage;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.util.Iterator;
+
+import javax.imageio.ImageIO;
+import javax.imageio.ImageTypeSpecifier;
+import javax.imageio.ImageWriter;
+import javax.imageio.stream.ImageOutputStream;
+
+public class UshortGrayTest {
+
+ public static void main(String[] args) {
+ Iterator iter;
+ BufferedImage bi = new BufferedImage(10, 10,
+ BufferedImage.TYPE_USHORT_GRAY);
+
+ // Part 1: ensure that JPEGImageWriter throws an exception if it
+ // encounters an image with 16-bit samples
+ ImageWriter writer = null;
+ iter = ImageIO.getImageWritersByFormatName("jpeg");
+ if (iter.hasNext()) {
+ writer = (ImageWriter)iter.next();
+ } else {
+ throw new RuntimeException("No JPEG reader found");
+ }
+
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+ ImageOutputStream ios = null;
+ boolean exceptionThrown = false;
+
+ try {
+ ios = ImageIO.createImageOutputStream(baos);
+ } catch (IOException ioe) {
+ throw new RuntimeException("Could not create ImageOutputStream");
+ }
+
+ try {
+ writer.setOutput(ios);
+ writer.write(bi);
+ } catch (IOException ioe) {
+ exceptionThrown = true;
+ }
+
+ if (!exceptionThrown) {
+ throw new RuntimeException("JPEG writer should not be able to " +
+ "write USHORT_GRAY images");
+ }
+
+ // Part 2: ensure that JPEGImageWriterSpi.canEncodeImage() returns
+ // false for images with 16-bit samples
+ ImageTypeSpecifier its =
+ ImageTypeSpecifier.createFromRenderedImage(bi);
+
+ iter = ImageIO.getImageWriters(its, "jpeg");
+ if (iter.hasNext()) {
+ throw new RuntimeException("JPEG writer should not be available" +
+ " for USHORT_GRAY images");
+ }
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/plugins/png/CanEncodeShort.java Sat Jun 03 03:48:03 2017 +0000
@@ -0,0 +1,66 @@
+/*
+ * Copyright (c) 2002, 2017, 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 4474819
+ * @summary Tests whether the PNGImageWriterSpi advertises that it is capable of
+ * writing images of TYPE_USHORT_565_RGB and TYPE_USHORT_555_RGB. The
+ * test fails if an exception is thrown.
+ */
+
+import java.awt.image.BufferedImage;
+import java.util.Iterator;
+
+import javax.imageio.ImageIO;
+import javax.imageio.ImageTypeSpecifier;
+
+public class CanEncodeShort {
+
+ private static final int[] types = new int[] {
+ BufferedImage.TYPE_USHORT_565_RGB,
+ BufferedImage.TYPE_USHORT_555_RGB,
+ };
+
+ private static final String[] typeNames = new String[] {
+ "TYPE_USHORT_565_RGB",
+ "TYPE_USHORT_555_RGB",
+ };
+
+ public static void main(String[] args) {
+ for (int i = 0; i < types.length; i++) {
+ BufferedImage img = new BufferedImage(32, 32, types[i]);
+
+ ImageTypeSpecifier spec =
+ ImageTypeSpecifier.createFromRenderedImage(img);
+
+ Iterator writers = ImageIO.getImageWriters(spec, "png");
+
+ if (!writers.hasNext()) {
+ throw new RuntimeException("Test failed: " +
+ "no PNG writer found for type " +
+ typeNames[i]);
+ }
+ }
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/plugins/png/ImageCompare.java Sat Jun 03 03:48:03 2017 +0000
@@ -0,0 +1,62 @@
+/*
+ * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import java.awt.image.BufferedImage;
+import java.awt.image.ColorModel;
+import java.awt.image.Raster;
+
+// Utility to compare two BufferedImages for RGB equality
+public class ImageCompare {
+
+ public static void compare(BufferedImage oldimg,
+ BufferedImage newimg) {
+ int width = oldimg.getWidth();
+ int height = oldimg.getHeight();
+ if (newimg.getWidth() != width || newimg.getHeight() != height) {
+ throw new RuntimeException("Dimensions changed!");
+ }
+
+ Raster oldras = oldimg.getRaster();
+ ColorModel oldcm = oldimg.getColorModel();
+ Raster newras = newimg.getRaster();
+ ColorModel newcm = newimg.getColorModel();
+
+ for (int j = 0; j < height; j++) {
+ for (int i = 0; i < width; i++) {
+ Object oldpixel = oldras.getDataElements(i, j, null);
+ int oldrgb = oldcm.getRGB(oldpixel);
+ int oldalpha = oldcm.getAlpha(oldpixel);
+
+ Object newpixel = newras.getDataElements(i, j, null);
+ int newrgb = newcm.getRGB(newpixel);
+ int newalpha = newcm.getAlpha(newpixel);
+
+ if (newrgb != oldrgb ||
+ newalpha != oldalpha) {
+ throw new RuntimeException("Pixels differ at " + i +
+ ", " + j);
+ }
+ }
+ }
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/plugins/png/PngPremultAlphaTest.java Sat Jun 03 03:48:03 2017 +0000
@@ -0,0 +1,131 @@
+/*
+ * Copyright (c) 2003, 2017, 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 4888478
+ * @summary Test that colors do not distort when buffered image with
+ * premultiplied alpha is encoded to png format
+ */
+
+import java.awt.AlphaComposite;
+import java.awt.Color;
+import java.awt.Graphics2D;
+import java.awt.image.BufferedImage;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+
+import javax.imageio.ImageIO;
+
+public class PngPremultAlphaTest {
+ protected static int width = 100;
+ protected static int height = 100;
+
+ protected static String format = "png";
+
+ protected static int[] iBufferedImageTypes = {
+ BufferedImage.TYPE_INT_RGB,
+ BufferedImage.TYPE_INT_ARGB,
+ BufferedImage.TYPE_4BYTE_ABGR_PRE,
+ BufferedImage.TYPE_INT_ARGB_PRE
+ };
+
+ protected static String[] strBufferedImageTypes = {
+ "TYPE_INT_RGB",
+ "TYPE_INT_ARGB",
+ "BufferedImage.TYPE_4BYTE_ABGR_PRE",
+ "BufferedImage.TYPE_INT_ARGB_PRE"
+ };
+
+ public static void main(String[] arg) {
+ for(int i=0; i<iBufferedImageTypes.length; i++) {
+ System.out.println("Test for " + strBufferedImageTypes[i]);
+ doTest(iBufferedImageTypes[i]);
+ }
+ }
+
+ public static void doTest(int type) {
+ try {
+ BufferedImage src = new BufferedImage(100, 100,
+ type);
+ Graphics2D g = src.createGraphics();
+ g.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC, 0.5f));
+ g.setColor(new Color(0x20, 0x40, 0x60));
+ g.fillRect(0,0,100,100);
+
+ int[] samples = new int[src.getData().getNumBands()];
+ src.getData().getPixels(0,0,1,1,samples);
+ for(int i=0; i<samples.length; i++) {
+ System.out.println("sample["+i+"]="+Integer.toHexString(samples[i]));
+ }
+
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+ ImageIO.write(src, format, baos);
+ baos.close();
+
+
+ ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
+ BufferedImage dst = ImageIO.read(bais);
+
+ isSameColors(src, dst);
+ } catch (Exception e) {
+ e.printStackTrace();
+ throw new RuntimeException("Test failed.");
+ }
+ }
+
+ private static boolean isSameColors(BufferedImage src, BufferedImage dst) {
+ Object dstPixel = dst.getRaster().getDataElements(width/2, height/2, null);
+ Object srcPixel = src.getRaster().getDataElements(width/2, height/2, null);
+
+ // take into account the rounding error
+ if ( Math.abs(src.getColorModel().getRed(srcPixel) - dst.getColorModel().getRed(dstPixel)) > 1
+ || Math.abs(src.getColorModel().getGreen(srcPixel) - dst.getColorModel().getGreen(dstPixel)) > 1
+ || Math.abs(src.getColorModel().getBlue(srcPixel) - dst.getColorModel().getBlue(dstPixel)) > 1) {
+ showPixel(src, width/2, height/2);
+ showPixel(dst, width/2, height/2);
+
+ throw new RuntimeException( "Colors are different: "
+ + Integer.toHexString(src.getColorModel().getRGB(srcPixel))
+ + " and "
+ + Integer.toHexString(dst.getColorModel().getRGB(dstPixel)));
+ }
+ return true;
+ }
+
+ private static void showPixel(BufferedImage src, int x, int y) {
+ System.out.println("Img is " + src);
+ System.out.println("CM is " + src.getColorModel().getClass().getName());
+ Object p = src.getRaster().getDataElements(x, y, null);
+ System.out.println("RGB: " +
+ Integer.toHexString(src.getColorModel().getRGB(p)));
+ System.out.println("Red: " +
+ Integer.toHexString(src.getColorModel().getRed(p)));
+ System.out.println("Green: " +
+ Integer.toHexString(src.getColorModel().getGreen(p)));
+ System.out.println("Blue: " +
+ Integer.toHexString(src.getColorModel().getBlue(p)));
+ System.out.println("Alpha: " +
+ Integer.toHexString(src.getColorModel().getAlpha(p)));
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/plugins/png/ShortPaletteTest.java Sat Jun 03 03:48:03 2017 +0000
@@ -0,0 +1,83 @@
+/*
+ * Copyright (c) 2003, 2017, 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 4826548
+ * @summary Tests for reading PNG images with 5,6,7 and 8 colors in palette
+ */
+
+import java.awt.image.BufferedImage;
+import java.awt.image.IndexColorModel;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+
+import javax.imageio.ImageIO;
+
+public class ShortPaletteTest {
+
+ public static void main(String[] args) {
+
+ for (int numberColors = 2; numberColors <= 16; numberColors++) {
+ try {
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+ BufferedImage image = createImage(numberColors);
+ ImageIO.write(image, "png", baos);
+ baos.close();
+ System.out.println("Number of colors: " + numberColors);
+ byte[] buffer = baos.toByteArray();
+ ByteArrayInputStream bais = new ByteArrayInputStream(buffer);
+ ImageIO.read(bais);
+ System.out.println("OK");
+ } catch (ArrayIndexOutOfBoundsException e) {
+ e.printStackTrace();
+ throw new RuntimeException("Test failed.");
+ } catch (IOException e) {
+ e.printStackTrace();
+ throw new RuntimeException("Unexpected exception was thrown."
+ + " Test failed.");
+ }
+ }
+ }
+
+ private static IndexColorModel createColorModel(int numberColors) {
+
+ byte[] colors = new byte[numberColors*3];
+ int depth = 4;
+ int startIndex = 0;
+
+ return new IndexColorModel(depth,
+ numberColors,
+ colors,
+ startIndex,
+ false);
+ }
+
+ private static BufferedImage createImage(int numberColors) {
+ return new BufferedImage(32,
+ 32,
+ BufferedImage.TYPE_BYTE_BINARY,
+ createColorModel(numberColors));
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/plugins/png/WriteProgressive.java Sat Jun 03 03:48:03 2017 +0000
@@ -0,0 +1,84 @@
+/*
+ * Copyright (c) 2001, 2017, 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 4432615
+ * @summary Tests progressive writing in the PNG encoder
+ * @modules java.desktop/com.sun.imageio.plugins.png
+ */
+
+import java.awt.Color;
+import java.awt.Graphics2D;
+import java.awt.image.BufferedImage;
+import java.io.File;
+import java.io.IOException;
+import java.util.Iterator;
+import java.util.Random;
+
+import javax.imageio.IIOImage;
+import javax.imageio.ImageIO;
+import javax.imageio.ImageWriteParam;
+import javax.imageio.ImageWriter;
+import javax.imageio.stream.ImageOutputStream;
+
+public class WriteProgressive {
+
+ public static void main(String[] args) throws IOException {
+ Iterator witer = ImageIO.getImageWritersByFormatName("png");
+ ImageWriter w = (ImageWriter)witer.next();
+
+ File f = File.createTempFile("WriteProgressive", ".png");
+ ImageOutputStream ios = ImageIO.createImageOutputStream(f);
+ w.setOutput(ios);
+
+ BufferedImage bi = new BufferedImage(100, 100,
+ BufferedImage.TYPE_3BYTE_BGR);
+ Graphics2D g = bi.createGraphics();
+ Random r = new Random(10);
+ for (int i = 0; i < 10000; i++) {
+ Color c =
+ new Color(r.nextInt(256), r.nextInt(256), r.nextInt(256));
+ g.setColor(c);
+ g.fillRect(r.nextInt(100), r.nextInt(100), 1, 1);
+ }
+
+ IIOImage iioimage = new IIOImage(bi, null, null);
+
+ ImageWriteParam param = w.getDefaultWriteParam();
+ param.setProgressiveMode(ImageWriteParam.MODE_DEFAULT);
+
+ try {
+ w.write(null, iioimage, param);
+ } catch (NullPointerException npe) {
+ throw new RuntimeException("Got NPE during write!");
+ }
+
+ ios.close();
+
+ BufferedImage bi2 = ImageIO.read(f);
+ f.delete();
+
+ ImageCompare.compare(bi, bi2);
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/plugins/wbmp/EmptyInputWbmpMetadataTest.java Sat Jun 03 03:48:03 2017 +0000
@@ -0,0 +1,61 @@
+/*
+ * Copyright (c) 2003, 2017, 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 4895483
+ * @summary Test checks that the IllegalStateException was thrown if input was
+ * not set to the WBMPImageReader
+ */
+
+import java.io.IOException;
+
+import javax.imageio.ImageIO;
+import javax.imageio.ImageReader;
+import javax.imageio.metadata.IIOMetadata;
+
+public class EmptyInputWbmpMetadataTest {
+ private static String fmt = "BMP";
+
+ public static void main(String[] args) {
+ boolean isPassed = false;
+ ImageReader ir = (ImageReader)ImageIO.getImageReadersByFormatName(fmt).next();
+
+ if (ir == null) {
+ throw new RuntimeException("No available reader for " + fmt);
+ }
+ IIOMetadata meta = null;
+ try {
+ meta = ir.getImageMetadata(0);
+ } catch (IllegalStateException e) {
+ System.out.println("Correct exception was thrown. Test passed.");
+ isPassed = true;
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ if (!isPassed) {
+ throw new RuntimeException("The IllegalStateException was not thrown."
+ +"Test failed.");
+ }
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/plugins/wbmp/GetImageTypesTest.java Sat Jun 03 03:48:03 2017 +0000
@@ -0,0 +1,68 @@
+/*
+ * Copyright (c) 2003, 2017, 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 4928273
+ * @summary Verifies what IllegalStateException is thrown if image input was not
+ * set
+ */
+
+import java.util.Iterator;
+
+import javax.imageio.ImageIO;
+import javax.imageio.ImageReader;
+
+public class GetImageTypesTest {
+
+ private static final String format = "wbmp";
+
+ public static void main(String[] args) {
+
+ boolean passed = false;
+ ImageReader ir = (ImageReader)ImageIO.getImageReadersByFormatName(format).next();
+
+ if (ir == null) {
+ throw new RuntimeException("No matching reader found. Test Failed");
+ }
+
+ try {
+ Iterator types = ir.getImageTypes(0);
+ } catch (IllegalStateException e) {
+ System.out.println("Test passed.");
+ passed = true;
+ } catch (Exception e) {
+ throw new RuntimeException("Unexpected exception was thrown. "
+ + "Test failed.");
+ }
+
+ if (!passed) {
+ throw new RuntimeException("IllegalStateException is not thrown when "
+ + "calling getImageTypes() without setting "
+ + "the input source for the image format: "
+ + format
+ + ". Test failed");
+ }
+
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/plugins/wbmp/ValidWbmpTest.java Sat Jun 03 03:48:03 2017 +0000
@@ -0,0 +1,93 @@
+/*
+ * Copyright (c) 2003, 2017, 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 4924512
+ * @summary Test that wbmp image reader detects incorrect image format
+ */
+
+import java.awt.Color;
+import java.awt.Graphics;
+import java.awt.image.BufferedImage;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+
+import javax.imageio.IIOException;
+import javax.imageio.ImageIO;
+import javax.imageio.ImageReader;
+import javax.imageio.stream.ImageInputStream;
+
+public class ValidWbmpTest {
+
+ public static void main(String[] args) {
+ try {
+ String[] formats = { "JPEG", "PNG", "BMP" };
+
+ BufferedImage img = new BufferedImage(100, 100,
+ BufferedImage.TYPE_BYTE_GRAY);
+ Graphics g = img.createGraphics();
+ g.setColor(Color.white);
+ g.fillRect(0,0,100,100);
+ g.setColor(Color.black);
+ g.fillRect(10,10,80,80);
+
+ ImageReader ir = (ImageReader)ImageIO.getImageReadersByFormatName("WBMP").next();
+ if (ir==null) {
+ throw new RuntimeException("No readers for WBMP format!");
+ }
+ for(int i=0; i<formats.length; i++) {
+ System.out.println("Test " + formats[i] + " stream...");
+ boolean passed = false;
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+ ImageIO.write(img, formats[i], baos);
+ baos.close();
+ ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
+
+ ImageInputStream iis = null;
+ iis = ImageIO.createImageInputStream(bais);
+ ir.setInput(iis);
+ try {
+ BufferedImage res = ir.read(0);
+ } catch (IIOException e) {
+ StackTraceElement[] stack = e.getStackTrace();
+ if (ir.getClass().getName().equals(stack[0].getClassName())
+ && "readHeader".equals(stack[0].getMethodName()))
+ {
+ passed = true;
+ }
+ } catch (Throwable t) {
+ t.printStackTrace();
+ }
+
+ if (!passed) {
+ throw new RuntimeException("Test failed!");
+ }
+ }
+ } catch (Exception e) {
+ e.printStackTrace();
+ throw new RuntimeException("Unexpected exception. Test failed.");
+ }
+
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/plugins/wbmp/WBMPPluginTest.java Sat Jun 03 03:48:03 2017 +0000
@@ -0,0 +1,230 @@
+/*
+ * Copyright (c) 2003, 2017, 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 4641872
+ * @summary Tests writing and reading abilities of WBMP plugin
+ */
+
+import java.awt.Color;
+import java.awt.Graphics2D;
+import java.awt.image.BufferedImage;
+import java.awt.image.ColorModel;
+import java.awt.image.Raster;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.util.Iterator;
+
+import javax.imageio.IIOException;
+import javax.imageio.IIOImage;
+import javax.imageio.ImageIO;
+import javax.imageio.ImageReader;
+import javax.imageio.ImageTypeSpecifier;
+import javax.imageio.ImageWriteParam;
+import javax.imageio.ImageWriter;
+import javax.imageio.metadata.IIOMetadata;
+
+public class WBMPPluginTest {
+
+ private static final int[] types = {
+ BufferedImage.TYPE_INT_RGB, // = 1;
+ BufferedImage.TYPE_INT_ARGB, // = 2;
+ BufferedImage.TYPE_INT_ARGB_PRE, // = 3;
+ BufferedImage.TYPE_INT_BGR, // = 4;
+ BufferedImage.TYPE_3BYTE_BGR, // = 5;
+ BufferedImage.TYPE_4BYTE_ABGR, // = 6;
+ BufferedImage.TYPE_4BYTE_ABGR_PRE, // 7
+ BufferedImage.TYPE_USHORT_565_RGB, // 8
+ BufferedImage.TYPE_USHORT_555_RGB, // 9
+ BufferedImage.TYPE_BYTE_GRAY, // 10
+ BufferedImage.TYPE_USHORT_GRAY, //11
+ BufferedImage.TYPE_BYTE_BINARY, //12
+ BufferedImage.TYPE_BYTE_INDEXED //13
+ };
+
+ private static String format = "WBMP";
+
+ private static ImageReader ir = null;
+ private static ImageWriter iw = null;
+ private BufferedImage img;
+ private ImageWriteParam param;
+ private ByteArrayOutputStream baos;
+
+ private static void init() {
+
+ Iterator i = ImageIO.getImageWritersByFormatName(format);
+ if (!i.hasNext()) {
+ throw new RuntimeException("No available ImageWrites for "+format+" format!");
+ }
+ iw = (ImageWriter)i.next();
+
+ i = ImageIO.getImageReadersByFormatName(format);
+ if (!i.hasNext()) {
+ throw new RuntimeException("No available ImageReaders for " +format+" format!");
+ }
+
+ ir = (ImageReader)i.next();
+ }
+
+ public static void main(String[] args) {
+ if (args.length > 0) {
+ format = args[0];
+ System.out.println("Test format " + format);
+ }
+
+ init();
+ ImageIO.setUseCache(false);
+
+ for (int i=0; i<types.length; i++) {
+ boolean bPassed = true;
+ Object reason = null;
+
+ try {
+
+ BufferedImage image = createTestImage(types[i]);
+
+ ImageWriteParam param = iw.getDefaultWriteParam();
+
+ WBMPPluginTest t = new WBMPPluginTest(image, param);
+ boolean res = false;
+ res = t.test();
+ if (!res) {
+ bPassed = false;
+ reason = new String("Null result");
+ }
+ } catch (IllegalArgumentException ex) {
+ System.out.println("Expected exception type was caught: " + ex);
+
+ } catch (Throwable ex ) {
+ System.out.println("FAILED");
+ ex.printStackTrace();
+ bPassed = false;
+ reason = ex;
+ throw new RuntimeException("Test for type " + types[i] + " FAILED due to exception");
+ }
+/*
+ System.out.println("Type " + types[i] + " result: " +
+ (bPassed ? "PASSED" : "FAILED") +
+ ((reason != null) ? (" Reason: " + reason) : ""));
+*/
+ System.out.println("Test for type " + types[i] + " PASSED");
+ }
+
+ System.out.println("END OF TEST");
+ }
+
+ public WBMPPluginTest(BufferedImage img, ImageWriteParam param) {
+
+ this.img = img;
+ this.param = param;
+ baos = new ByteArrayOutputStream();
+ }
+
+ public boolean test() throws IIOException, IOException {
+
+ ir.reset();
+ iw.reset();
+
+ String[] suffixes = iw.getOriginatingProvider().getFileSuffixes();
+
+ IIOMetadata md = iw.getDefaultImageMetadata(new ImageTypeSpecifier(img), param);
+ IIOImage iio_img = new IIOImage(img, null, md);
+
+ System.out.println("Image type " + img.getType());
+
+ String fname = "test"+img.getType()+"."+suffixes[0];
+
+ iw.setOutput(ImageIO.createImageOutputStream(new FileOutputStream(new File(fname))));
+ System.out.print("write image ... ");
+ iw.write(iio_img);
+ System.out.println("OK");
+ System.out.print("read image ... ");
+
+ byte[] ba_image = baos.toByteArray();
+
+ ByteArrayInputStream bais = new ByteArrayInputStream(ba_image);
+
+ ir.setInput(ImageIO.createImageInputStream(new FileInputStream(new File(fname))));
+
+ BufferedImage res = ir.read(0);
+ System.out.println("OK");
+
+ System.out.print("compare images ... ");
+ boolean r = compare(img,res);
+ System.out.println(r?"OK":"FAILED");
+ return r;
+ }
+
+ private boolean compare(BufferedImage in, BufferedImage out) {
+ int width = in.getWidth();
+ int height = in.getHeight();
+ if (out.getWidth() != width || out.getHeight() != height) {
+ throw new RuntimeException("Dimensions changed!");
+ }
+
+ Raster oldras = in.getRaster();
+ ColorModel oldcm = in.getColorModel();
+ Raster newras = out.getRaster();
+ ColorModel newcm = out.getColorModel();
+
+ for (int j = 0; j < height; j++) {
+ for (int i = 0; i < width; i++) {
+ Object oldpixel = oldras.getDataElements(i, j, null);
+ int oldrgb = oldcm.getRGB(oldpixel);
+ int oldalpha = oldcm.getAlpha(oldpixel);
+
+ Object newpixel = newras.getDataElements(i, j, null);
+ int newrgb = newcm.getRGB(newpixel);
+ int newalpha = newcm.getAlpha(newpixel);
+
+ if (newrgb != oldrgb ||
+ newalpha != oldalpha) {
+ throw new RuntimeException("Pixels differ at " + i +
+ ", " + j);
+ }
+ }
+ }
+ return true;
+ }
+
+
+ private static BufferedImage createTestImage(int type) throws IOException {
+
+ int w = 200;
+ int h = 200;
+ BufferedImage b = new BufferedImage(w, h, type);
+ Graphics2D g = b.createGraphics();
+ g.setColor(Color.white);
+ g.fillRect(0,0, w, h);
+ g.setColor(Color.black);
+ g.fillOval(10, 10, w -20, h-20);
+
+ return b;
+ }
+
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/plugins/wbmp/WbmpBigDestinationTest.java Sat Jun 03 03:48:03 2017 +0000
@@ -0,0 +1,106 @@
+/*
+ * Copyright (c) 2003, 2017, 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 4929367
+ * @summary tests what BMP image was decoded correctly if destination buffered
+ * image is bigger than source image
+ */
+
+import java.awt.Color;
+import java.awt.Graphics2D;
+import java.awt.image.BufferedImage;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.util.Iterator;
+
+import javax.imageio.ImageIO;
+import javax.imageio.ImageReadParam;
+import javax.imageio.ImageReader;
+import javax.imageio.ImageTypeSpecifier;
+import javax.imageio.ImageWriter;
+
+public class WbmpBigDestinationTest {
+ static String format = "WBMP";
+ public static void main(String[] args) {
+ try {
+ BufferedImage src = new BufferedImage(100, 100,
+ BufferedImage.TYPE_BYTE_BINARY);
+ Graphics2D g = src.createGraphics();
+ g.setColor(Color.white);
+ g.fillRect(0,0,100, 100);
+
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+
+ ImageWriter iw =
+ (ImageWriter)ImageIO.getImageWritersByFormatName(format).next();
+ if (iw == null) {
+ throw new RuntimeException("No writer available. Test failed.");
+ }
+
+ iw.setOutput(ImageIO.createImageOutputStream(baos));
+ iw.write(src);
+
+ byte[] data = baos.toByteArray();
+
+ ImageReader ir =
+ (ImageReader)ImageIO.getImageReadersByFormatName(format).next();
+ ir.setInput(
+ ImageIO.createImageInputStream(
+ new ByteArrayInputStream(data)));
+
+ Iterator specifiers = ir.getImageTypes(0);
+ ImageTypeSpecifier typeSpecifier = null;
+
+ if (specifiers.hasNext()) {
+ typeSpecifier = (ImageTypeSpecifier) specifiers.next();
+ }
+ ImageReadParam param = new ImageReadParam();
+ BufferedImage dst = typeSpecifier.createBufferedImage(200, 200);
+ param.setDestination(dst);
+
+ ir.read(0, param);
+
+ checkResults(src,dst);
+
+ } catch (IOException e) {
+ e.printStackTrace();
+ throw new RuntimeException("Unexpected exception. Test failed.");
+ }
+ }
+
+ private static void checkResults(BufferedImage src, BufferedImage dst) {
+ for(int x=0; x<src.getWidth(); x++) {
+ for(int y=0; y<src.getHeight(); y++) {
+ int srcRgb = src.getRGB(x,y);
+ int dstRgb = dst.getRGB(x,y);
+ if (srcRgb != dstRgb) {
+ throw new RuntimeException("Images are different at point ["
+ + x + "," + y + "]");
+ }
+ }
+ }
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/plugins/wbmp/WbmpDefaultImageMetadataTest.java Sat Jun 03 03:48:03 2017 +0000
@@ -0,0 +1,152 @@
+/*
+ * Copyright (c) 2003, 2017, 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 4895512
+ * @summary Test that WBMPImageWriter return non-null default image metadata
+ */
+
+import java.awt.Color;
+import java.awt.Graphics;
+import java.awt.image.BufferedImage;
+import java.util.Iterator;
+
+import javax.imageio.ImageIO;
+import javax.imageio.ImageTypeSpecifier;
+import javax.imageio.ImageWriteParam;
+import javax.imageio.ImageWriter;
+import javax.imageio.metadata.IIOMetadata;
+
+import org.w3c.dom.NamedNodeMap;
+import org.w3c.dom.Node;
+
+public class WbmpDefaultImageMetadataTest {
+ ImageWriter writer = null;
+ IIOMetadata imageData = null;
+ ImageWriteParam writeParam = null;
+ BufferedImage bimg = null;
+
+ public WbmpDefaultImageMetadataTest(String format) {
+ try {
+ bimg = new BufferedImage(200, 200, bimg.TYPE_INT_RGB);
+ Graphics gg = bimg.getGraphics();
+ gg.setColor(Color.red);
+ gg.fillRect(50, 50, 100, 100);
+
+ Iterator it = ImageIO.getImageWritersByFormatName(format);
+ if (it.hasNext()) {
+ writer = (ImageWriter) it.next();
+ }
+ if (writer == null) {
+ throw new RuntimeException("No writer available for the given format."
+ + " Test failed.");
+ }
+ writeParam = writer.getDefaultWriteParam();
+
+ System.out.println("Testing Image Metadata for "+format+"\n");
+ imageData = writer.getDefaultImageMetadata(new ImageTypeSpecifier(bimg), writeParam);
+ if (imageData == null) {
+ System.out.println("return value is null. No default image metadata is associated with "+format+" writer");
+ throw new RuntimeException("Default image metadata is null."
+ + " Test failed.");
+ }
+ int j = 0;
+ String imageDataNames[] = null;
+ if(imageData != null) {
+ System.out.println("Is standard metadata format supported (Image) ? "+
+ imageData.isStandardMetadataFormatSupported() );
+ imageDataNames = imageData.getMetadataFormatNames();
+ System.out.println("\nAll supported Metadata Format Names\n");
+ if(imageDataNames!=null){
+ for(j=0; j<imageDataNames.length; j++) {
+ System.out.println("FORMAT NAME: "+imageDataNames[j]);
+ if (imageDataNames[j].equals(imageData.getNativeMetadataFormatName())) {
+ System.out.println("This is a Native Metadata format\n");
+ } else {
+ System.out.println("\n");
+ }
+ System.out.println("");
+ System.out.println("IIOImageMetadata DOM tree for "+imageDataNames[j]);
+ System.out.println("");
+ Node imageNode = imageData.getAsTree(imageDataNames[j]);
+ displayMetadata(imageNode);
+ System.out.println("\n\n");
+ }
+ }
+ }
+ }catch(Exception e){
+ e.printStackTrace();
+ throw new RuntimeException("Exception was thrown."
+ + " Test failed.");
+ }
+ }
+
+ public void displayMetadata(Node root) {
+ displayMetadata(root, 0);
+ }
+
+ void indent(int level) {
+ for (int i = 0; i < level; i++) {
+ System.out.print(" ");
+ }
+ }
+
+ void displayMetadata(Node node, int level) {
+ indent(level); // emit open tag
+ System.out.print("<" + node.getNodeName());
+ NamedNodeMap map = node.getAttributes();
+ if (map != null) { // print attribute values
+ int length = map.getLength();
+ for (int i = 0; i < length; i++) {
+ Node attr = map.item(i);
+ System.out.print(" " + attr.getNodeName() +
+ "=\"" + attr.getNodeValue() + "\"");
+ }
+ }
+ Node child = node.getFirstChild();
+
+ if (node.getNodeValue() != null && !node.getNodeValue().equals("") ) {
+ System.out.println(">");
+ indent(level);
+ System.out.println(node.getNodeValue());
+ indent(level); // emit close tag
+ System.out.println("</" + node.getNodeName() + ">");
+ } else if (child != null) {
+ System.out.println(">"); // close current tag
+ while (child != null) { // emit child tags recursively
+ displayMetadata(child, level + 1);
+ child = child.getNextSibling();
+ }
+ indent(level); // emit close tag
+ System.out.println("</" + node.getNodeName() + ">");
+ } else {
+ System.out.println("/>");
+ }
+ }
+
+ public static void main(String args[]) {
+ WbmpDefaultImageMetadataTest test =
+ new WbmpDefaultImageMetadataTest("wbmp");
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/spi/AppletContextTest/BadPluginConfigurationTest.sh Sat Jun 03 03:48:03 2017 +0000
@@ -0,0 +1,272 @@
+#!/bin/ksh -p
+# Copyright (c) 2005, 2017, 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 6342404 7078379 8167503
+#
+# @summary Test verifies that incorrectly configured ImageIO plugin spi
+# does not affect registration of other ImageIO plugin in the
+# applet context.
+#
+#
+# @compile IIOPluginTest.java
+# @compile DummyReaderPluginSpi.java
+# @run shell BadPluginConfigurationTest.sh
+
+# There are several resources which need to be present before many
+# shell scripts can run. Following are examples of how to check for
+# many common ones.
+#
+# Note that the shell used is the Korn Shell, KSH
+#
+# Also note, it is recommended that make files NOT be used. Rather,
+# put the individual commands directly into this file. That way,
+# it is possible to use command line arguments and other shell tech-
+# niques to find the compiler, etc on different systems. For example,
+# a different path could be used depending on whether this were a
+# Solaris or Win32 machine, which is more difficult (if even possible)
+# in a make file.
+
+
+# Beginning of subroutines:
+status=1
+
+#Call this from anywhere to fail the test with an error message
+# usage: fail "reason why the test failed"
+fail()
+ { echo "The test failed :-("
+ echo "$*" 1>&2
+ echo "exit status was $status"
+ exit $status
+ } #end of fail()
+
+#Call this from anywhere to pass the test with a message
+# usage: pass "reason why the test passed if applicable"
+pass()
+ { echo "The test passed!!!"
+ echo "$*" 1>&2
+ exit 0
+ } #end of pass()
+
+# end of subroutines
+
+
+# The beginning of the script proper
+
+# Checking for proper OS
+OS=`uname -s`
+case "$OS" in
+ SunOS | Linux | Darwin )
+ FILESEP="/"
+ PATHSEP=":"
+ TMP=`cd /tmp; pwd -P`
+ ;;
+
+ Windows* )
+ FILESEP="\\"
+ PATHSEP=";"
+ TMP=`cd "${SystemRoot}/Temp"; echo ${PWD}`
+ ;;
+
+ CYGWIN* )
+ FILESEP="/"
+ PATHSEP=";"
+ TMP="/tmp"
+ ;;
+
+ # catch all other OSs
+ * )
+ echo "Unrecognized system! $OS"
+ fail "Unrecognized system! $OS"
+ ;;
+esac
+
+# Want this test to run standalone as well as in the harness, so do the
+# following to copy the test's directory into the harness's scratch directory
+# and set all appropriate variables:
+
+if [ -z "${TESTJAVA}" ] ; then
+ # TESTJAVA is not set, so the test is running stand-alone.
+ # TESTJAVA holds the path to the root directory of the build of the JDK
+ # to be tested. That is, any java files run explicitly in this shell
+ # should use TESTJAVA in the path to the java interpreter.
+ # So, we'll set this to the JDK spec'd on the command line. If none
+ # is given on the command line, tell the user that and use a cheesy
+ # default.
+ # THIS IS THE JDK BEING TESTED.
+ if [ -n "$1" ] ;
+ then TESTJAVA=$1
+ else fail "no JDK specified on command line!"
+ fi
+ TESTSRC=.
+ TESTCLASSES=.
+ STANDALONE=1;
+fi
+echo "JDK under test is: $TESTJAVA"
+
+#Deal with .class files:
+if [ -n "${STANDALONE}" ] ;
+ then
+ #if standalone, remind user to cd to dir. containing test before running it
+ echo "Just a reminder: cd to the dir containing this test when running it"
+ # then compile all .java files (if there are any) into .class files
+ if [ -a *.java ] ;
+ then echo "Reminder, this test should be in its own directory with all"
+ echo "supporting files it needs in the directory with it."
+ ${COMPILEJAVA}/bin/javac ./*.java ;
+ fi
+ # else in harness so copy all the class files from where jtreg put them
+ # over to the scratch directory this test is running in.
+ else cp ${TESTCLASSES}/*.class . ;
+fi
+
+#if in test harness, then copy the entire directory that the test is in over
+# to the scratch directory. This catches any support files needed by the test.
+if [ -z "${STANDALONE}" ] ;
+ then cp ${TESTSRC}/*.java .
+fi
+
+#Just before executing anything, make sure it has executable permission!
+chmod 777 ./*
+
+############### YOUR TEST CODE HERE!!!!!!! #############
+
+#All files required for the test should be in the same directory with
+# this file. If converting a standalone test to run with the harness,
+# as long as all files are in the same directory and it returns 0 for
+# pass, you should be able to cut and paste it into here and it will
+# run with the test harness.
+
+# This is an example of running something -- test
+# The stuff below catches the exit status of test then passes or fails
+# this shell test as appropriate ( 0 status is considered a pass here )
+
+echo
+echo ------ PREPARE TEST PLUGIN ---------
+
+# note that we can not use some subdirectory of the
+# scratch dir as the plugin dst dir because the test
+# app have file read permission for all subdirs of the
+# scratch dir
+
+PLUGINDST_DIR=${TMP}/test_ext
+#PLUGINDST_DIR=${TESTJAVA}/lib/ext
+TEST_PLUGIN=dummy.jar
+
+if [ ! -d ${PLUGINDST_DIR} ] ; then
+ mkdir ${PLUGINDST_DIR}
+fi
+
+# remove old service declaration
+if [ -d META-INF ] ; then
+ rm -rf META-INF
+fi
+
+# generate the service declaration
+if [ ! -d META_INF ] ; then
+ mkdir META-INF
+ mkdir META-INF/services
+fi
+
+# add wrong record to the service configuration
+echo "BadReaderPluginSpi" > META-INF/services/javax.imageio.spi.ImageReaderSpi
+
+echo "DummyReaderPluginSpi" >> META-INF/services/javax.imageio.spi.ImageReaderSpi
+
+
+${TESTJAVA}/bin/jar -cvf ${TEST_PLUGIN} DummyReaderPluginSpi*.class META-INF/services/javax.imageio.spi.ImageReaderSpi
+
+echo ----- TEST PLUGIN IS READY --------
+echo
+echo ----- INSTALL PLUGIN --------
+echo "Install test plugin to ${PLUGINDST_DIR}"
+if [ -f ${PLUGINDST_DIR}/${TEST_PLUGIN} ] ; then
+ echo "Remove old plugin..."
+ rm -f ${PLUGINDST_DIR}/${TEST_PLUGIN}
+fi
+mv -f ${TEST_PLUGIN} ${PLUGINDST_DIR}
+if [ -f ${PLUGINDST_DIR}/${TEST_PLUGIN} ] ; then
+ echo Test plugin is installed.
+else
+ fail "Unable to install test plugin to $PLUGINDST_DIR"
+fi
+echo ----- PLUGIN IS INSTALLED ------
+echo
+echo ----- CLEAN PLUGIN TEMPORARY FILES -----
+rm -rf DummyReaderPluginSpi*.class META-INF
+echo ----- CLEANING IS COMPLETE -------
+echo
+
+
+case "$OS" in
+ CYGWIN* )
+ TEST_CODEBASE=$(cygpath -m ${PWD})
+ TEST_PLUGIN_JAR=$(cygpath -m ${PLUGINDST_DIR}${FILESEP}${TEST_PLUGIN})
+ ;;
+
+ # catch all other OSs
+ * )
+ TEST_CODEBASE=${PWD}
+ TEST_PLUGIN_JAR=${PLUGINDST_DIR}${FILESEP}${TEST_PLUGIN}
+ ;;
+esac
+
+
+# Update policy file to grant read permission
+echo "grant codeBase \"file:${TEST_CODEBASE}\" {" > classpath.policy
+echo " permission java.io.FilePermission \"${TEST_PLUGIN_JAR}\", \"read\";" >> classpath.policy
+echo " permission java.util.PropertyPermission \"test.5076692.property\", \"read\";" >> classpath.policy
+echo "};" >> classpath.policy
+echo "grant codeBase \"file:${TEST_PLUGIN_JAR}\" {" >> classpath.policy
+echo " permission java.util.PropertyPermission \"test.5076692.property\", \"read\";" >> classpath.policy
+echo "};" >> classpath.policy
+
+echo ---------------------
+echo --- Applet policy ---
+echo ---------------------
+cat classpath.policy
+echo ---------------------
+echo
+
+echo -------------------------------
+echo --- Applet Classpath Test ---
+echo -------------------------------
+#
+# please note that we need to use "==" in setup of the java.security.policy
+# property in order to overwrite policies defined in the user policy file
+# For more details see:
+# http://java.sun.com/j2se/1.5.0/docs/guide/security/PolicyFiles.html)
+#
+
+${TESTJAVA}/bin/java ${TESTVMOPTS} -cp ".${PATHSEP}${TEST_PLUGIN_JAR}" \
+ -Djava.security.policy==classpath.policy \
+ -Djava.security.manager IIOPluginTest
+
+status=$?
+
+if [ $status -eq "0" ] ; then
+ pass ""
+else
+ fail "Test failed due to test plugin was not found."
+fi
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/spi/AppletContextTest/DummyReaderPluginSpi.java Sat Jun 03 03:48:03 2017 +0000
@@ -0,0 +1,82 @@
+/*
+ * Copyright (c) 2005, 2017, 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.io.IOException;
+import java.util.Locale;
+
+import javax.imageio.IIOException;
+import javax.imageio.ImageReader;
+import javax.imageio.spi.ImageReaderSpi;
+import javax.imageio.spi.ServiceRegistry;
+
+public class DummyReaderPluginSpi extends ImageReaderSpi {
+
+ private static String [] writerSpiNames =
+ {"DummyWriterPluginSpi"};
+ public static String[] formatNames = {"test_5076692", "TEST_5076692"};
+ public static String[] entensions = {"test_5076692"};
+ public static String[] mimeType = {"image/test_5076692"};
+
+ private boolean registered = false;
+
+ public DummyReaderPluginSpi() {
+ super("Sun Microsystems, Inc.",
+ "1.0",
+ formatNames,
+ entensions,
+ mimeType,
+ "DummyPluginReader",
+ STANDARD_INPUT_TYPE,
+ writerSpiNames,
+ false,
+ null, null, null, null,
+ false,
+ "",
+ "",
+ null, null);
+ }
+
+ public void onRegistration(ServiceRegistry registry,
+ Class<?> category) {
+ if (registered) {
+ return;
+ }
+
+ System.getProperty("test.5076692.property", "not found");
+
+ registered = true;
+ }
+
+ public String getDescription(Locale locale) {
+ return "Standard Dummy Image Reader";
+ }
+
+ public boolean canDecodeInput(Object source) throws IOException {
+ return false;
+ }
+
+ public ImageReader createReaderInstance(Object extension)
+ throws IIOException {
+ return null;
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/spi/AppletContextTest/IIOPluginTest.java Sat Jun 03 03:48:03 2017 +0000
@@ -0,0 +1,62 @@
+/*
+ * Copyright (c) 2005, 2017, 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 javax.imageio.ImageIO;
+
+public class IIOPluginTest {
+
+ public static String[] dummyformatNames = {"test_5076692", "TEST_5076692"};
+ public static String[] dummymimeType = {"image/test_5076692"};
+
+ public static void main(String[] args) {
+ SecurityManager sm = System.getSecurityManager();
+ System.out.println("Sm is " + sm);
+
+ String formatNames[] = ImageIO.getReaderFormatNames();
+ String readerMimeTypes[] = ImageIO.getReaderMIMETypes();
+
+ if (!isPresent(dummyformatNames, formatNames) ||
+ !isPresent(dummymimeType, readerMimeTypes)) {
+ throw new RuntimeException("No test plugin available!");
+ }
+ }
+
+ public static boolean isPresent(String[] t, String[] r) {
+ for (int i=0; i<t.length; i++) {
+ if (!isPresent(t[i], r)) {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ public static boolean isPresent(String s, String[] a) {
+ for (int i=0; i<a.length; i++) {
+ System.out.println(a[i] + " ");
+ if (s.equals(a[i])) {
+ return true;
+ }
+ }
+ return false;
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/spi/CreateMemoryCacheOutputStream.java Sat Jun 03 03:48:03 2017 +0000
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2001, 2017, 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 4415456
+ * @summary Tests the ability to create a MemoryCacheImageOutputStream using the
+ * normal service provider interface mechanisms
+ */
+
+import java.io.ByteArrayOutputStream;
+import java.io.OutputStream;
+
+import javax.imageio.ImageIO;
+import javax.imageio.stream.ImageOutputStream;
+
+public class CreateMemoryCacheOutputStream {
+
+ public static void main(String[] args) {
+ ImageIO.setUseCache(false);
+ OutputStream os = new ByteArrayOutputStream();
+ ImageOutputStream stream = null;
+ try {
+ stream = ImageIO.createImageOutputStream(os);
+ } catch (Exception e) {
+ throw new RuntimeException("Got exception " + e);
+ }
+ if (stream == null) {
+ throw new RuntimeException("Got null stream!");
+ }
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/spi/DeregisterAllSpiTest.java Sat Jun 03 03:48:03 2017 +0000
@@ -0,0 +1,158 @@
+/*
+ * Copyright (c) 2003, 2017, 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 4835841
+ * @summary This test verifies that we will able to register new SPI after
+ * deregistration all previously registered SPIs by using
+ * deregisterAll() method
+ */
+
+import java.io.IOException;
+import java.util.Locale;
+
+import javax.imageio.ImageIO;
+import javax.imageio.ImageReader;
+import javax.imageio.spi.IIORegistry;
+import javax.imageio.spi.ImageReaderSpi;
+import javax.imageio.spi.ServiceRegistry;
+import javax.imageio.stream.ImageInputStream;
+
+public class DeregisterAllSpiTest {
+
+ public DeregisterAllSpiTest() throws Exception {
+ ImageReaderSpi BMPSpi = new BMPImageReaderSPI();
+ IIORegistry.getDefaultInstance().registerServiceProvider(BMPSpi);
+
+ System.out.println("Reader Format Names available in the registry");
+ String formatNames[] = ImageIO.getReaderFormatNames();
+ if( formatNames == null || formatNames.length <= 0) {
+ throw new RuntimeException("No registered ImageReaders!");
+ }
+ for (int x=0; x < formatNames.length; x++) {
+ System.out.println("format "+formatNames[x]);
+ }
+
+ IIORegistry.getDefaultInstance().deregisterAll();
+
+ System.out.println("\nReader Format Names after deregistering all SPIs");
+ formatNames = ImageIO.getReaderFormatNames();
+ if(formatNames.length == 0) {
+ System.out.println("No readers available\n");
+ } else {
+ throw new RuntimeException("Some providers was not deregistered!");
+ }
+
+ IIORegistry.getDefaultInstance().registerServiceProvider(BMPSpi);
+ System.out.println("Reader Format Names after re-register of BMP Plugin");
+ formatNames = ImageIO.getReaderFormatNames();
+ if(formatNames.length == 0) {
+ throw new RuntimeException("Unable to register new SPI after deregisterAll()!");
+ }
+ }
+
+
+ public static void main(String args[]) throws Exception{
+ DeregisterAllSpiTest regis = new DeregisterAllSpiTest();
+ }
+
+
+ public static class BMPImageReaderSPI extends javax.imageio.spi.ImageReaderSpi{
+
+ private static final String vendorName = "Javasoft";
+
+ private static final String version = "2.0";
+
+ private static final String[] names = { "bmp" };
+
+ private static final String[] suffixes = { "bmp" };
+
+ private static final String[] MIMETypes = { "image/x-bmp"};
+
+ private static final String readerClassName =
+ "com.sun.imageio.plugins.png.PNGImageReader";
+
+ private static final String[] writerSpiNames = {
+ "com.sun.imageio.plugins.png.PNGImageWriterSpi"
+ };
+
+ public BMPImageReaderSPI() {
+ super(vendorName,
+ version,
+ names,
+ suffixes,
+ MIMETypes,
+ readerClassName,
+ STANDARD_INPUT_TYPE,
+ writerSpiNames,
+ false,
+ null, null,
+ null, null,
+ true,
+ "BMP Native Metadata",
+ "com.sun.imageio.plugins.png.PNGMetadataFormat",
+ null, null
+ );
+ }
+
+ public String getDescription(Locale locale) {
+ return "Standard BMP image reader";
+ }
+
+ public boolean canDecodeInput(Object input) throws IOException {
+ if (!(input instanceof ImageInputStream)) {
+ return false;
+ }
+
+ ImageInputStream stream = (ImageInputStream)input;
+ byte[] b = new byte[8];
+ stream.mark();
+ stream.readFully(b);
+ stream.reset();
+
+ return (b[0] == (byte)137 &&
+ b[1] == (byte)80 &&
+ b[2] == (byte)78 &&
+ b[3] == (byte)71 &&
+ b[4] == (byte)13 &&
+ b[5] == (byte)10 &&
+ b[6] == (byte)26 &&
+ b[7] == (byte)10);
+ }
+
+ public ImageReader createReaderInstance(Object extension) {
+ //return new PNGImageReader(this);
+ return null;
+ }
+ public void onRegistration(ServiceRegistry sr, Class<?> category) {
+ System.out.println("\nfrom OnRegistration: BMP plugin Registered\n");
+ super.onRegistration(sr, category);
+ }
+
+ public void onDeregistration(ServiceRegistry sr, Class<?> category) {
+ System.out.println("\nfrom OnDeregistration: BMP plugin De-Registered\n");
+ //super.onRegistration(sr, category);
+ }
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/spi/DeregisterOrderedSpiTest.java Sat Jun 03 03:48:03 2017 +0000
@@ -0,0 +1,69 @@
+/*
+ * Copyright (c) 2003, 2017, 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 4936495 8037743
+ * @summary This test verifies whether deregistering an ordered spi object does
+ * not throw any exception
+ * @modules java.desktop/com.sun.imageio.plugins.bmp
+ * java.desktop/com.sun.imageio.plugins.gif
+ * java.desktop/com.sun.imageio.plugins.jpeg
+ * java.desktop/com.sun.imageio.plugins.png
+ */
+
+import javax.imageio.spi.IIORegistry;
+import javax.imageio.spi.ImageReaderSpi;
+import javax.imageio.spi.ServiceRegistry;
+
+public class DeregisterOrderedSpiTest {
+
+ public DeregisterOrderedSpiTest() {
+
+ try {
+
+ ServiceRegistry reg = IIORegistry.getDefaultInstance();
+ ImageReaderSpi gifSpi = (ImageReaderSpi) reg.getServiceProviderByClass(com.sun.imageio.plugins.gif.GIFImageReaderSpi.class);
+ ImageReaderSpi pngSpi = (ImageReaderSpi) reg.getServiceProviderByClass(com.sun.imageio.plugins.png.PNGImageReaderSpi.class);
+ ImageReaderSpi jpgSpi = (ImageReaderSpi) reg.getServiceProviderByClass(com.sun.imageio.plugins.jpeg.JPEGImageReaderSpi.class);
+ ImageReaderSpi bmpSpi = (ImageReaderSpi) reg.getServiceProviderByClass(com.sun.imageio.plugins.bmp.BMPImageReaderSpi.class);
+
+ boolean ordered = reg.setOrdering(ImageReaderSpi.class, pngSpi,
+ gifSpi);
+
+ ordered = reg.setOrdering(ImageReaderSpi.class, gifSpi, jpgSpi);
+ ordered = reg.setOrdering(ImageReaderSpi.class, bmpSpi, gifSpi);
+ reg.deregisterServiceProvider(gifSpi);
+ System.out.println("PASS");
+
+ } catch (Exception e) {
+ System.out.println("FAIL");
+ throw new RuntimeException("Deregistering a spi object involved in some "
+ + "ordering throws the following exception: " + e.toString());
+ }
+ }
+
+ public static void main(String args[]) {
+ DeregisterOrderedSpiTest test = new DeregisterOrderedSpiTest();
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/spi/OrderingTest.java Sat Jun 03 03:48:03 2017 +0000
@@ -0,0 +1,72 @@
+/*
+ * Copyright (c) 2003, 2017, 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 4936445
+ * @summary This test verifies whether setting the order reversely between 2 spi
+ * objects removes the previous ordering that was set between the
+ * same set of spi objects. This is verified by invoking
+ * unsetOrdering() method twice consecutively with respect to the same
+ * spi objects and unsetOrdering() is supposed to return false when
+ * called for the second time.
+ * @modules java.desktop/com.sun.imageio.plugins.gif
+ * java.desktop/com.sun.imageio.plugins.png
+ */
+
+import javax.imageio.spi.IIORegistry;
+import javax.imageio.spi.ImageReaderSpi;
+import javax.imageio.spi.ServiceRegistry;
+
+public class OrderingTest {
+
+ public OrderingTest() {
+
+ ServiceRegistry reg = IIORegistry.getDefaultInstance();
+ ImageReaderSpi gifSpi = (ImageReaderSpi) reg.getServiceProviderByClass(com.sun.imageio.plugins.gif.GIFImageReaderSpi.class);
+ ImageReaderSpi pngSpi = (ImageReaderSpi) reg.getServiceProviderByClass(com.sun.imageio.plugins.png.PNGImageReaderSpi.class);
+
+ boolean ordered = reg.setOrdering(ImageReaderSpi.class, gifSpi, pngSpi);
+
+ ordered = reg.setOrdering(ImageReaderSpi.class, pngSpi, gifSpi);
+
+ boolean unordered = reg.unsetOrdering(ImageReaderSpi.class, gifSpi,
+ pngSpi);
+ boolean unordered1 = reg.unsetOrdering(ImageReaderSpi.class, gifSpi,
+ pngSpi);
+
+ if (unordered1) {
+ throw new RuntimeException("FAIL: Ordering 2 spi objects in the "
+ + "reverse direction does not remove the previous ordering "
+ + "set between the spi objects and hence unsetOrdering() "
+ + "returns true for the same spi objects when called consecutively");
+ } else {
+ System.out.println("PASS");
+ }
+
+ }
+
+ public static void main(String args[]) {
+ OrderingTest test = new OrderingTest();
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/spi/PluginSpiTest.java Sat Jun 03 03:48:03 2017 +0000
@@ -0,0 +1,96 @@
+/*
+ * Copyright (c) 2005, 2017, 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 6275112
+ * @summary Test verifies that imageReaders for base image formats return
+ * meaningful name of service provider interface (SPI) for base image
+ * formats
+ * @modules java.desktop/com.sun.imageio.plugins.gif
+ * java.desktop/com.sun.imageio.plugins.png
+ * java.desktop/com.sun.imageio.plugins.jpeg
+ * java.desktop/com.sun.imageio.plugins.bmp
+ * java.desktop/com.sun.imageio.plugins.wbmp
+ */
+
+import javax.imageio.ImageIO;
+import javax.imageio.ImageReader;
+import javax.imageio.ImageWriter;
+import javax.imageio.spi.ImageReaderSpi;
+
+public class PluginSpiTest {
+
+ public static void main(String[] args) {
+ String format[] = { "GIF", "PNG", "JPEG", "BMP", "WBMP" };
+ for (int i = 0; i < format.length; i++) {
+ System.out.println("\nFormat " + format[i]);
+ testFormat(format[i]);
+ }
+ }
+
+ public static void testFormat(String format) {
+ ImageReader reader =
+ ImageIO.getImageReadersByFormatName(format).next();
+ if (reader == null) {
+ throw new RuntimeException("Failed to get reader for " + format);
+ }
+
+ ImageReaderSpi readerSpi = reader.getOriginatingProvider();
+ System.out.println(format + " Reader SPI: " + readerSpi);
+
+ String writerSpiNames[] = readerSpi.getImageWriterSpiNames();
+ if (writerSpiNames == null || writerSpiNames.length == 0) {
+ throw new RuntimeException("Failed to get writer spi names for " +
+ format);
+ }
+
+ System.out.println("Available writer spi names:");
+ for (int i = 0; i < writerSpiNames.length; i++) {
+ System.out.println(writerSpiNames[i]);
+ try {
+ Class spiClass = Class.forName(writerSpiNames[i]);
+ if (spiClass == null) {
+ throw new RuntimeException("Failed to get spi class " +
+ writerSpiNames[i]);
+ }
+ System.out.println("Got class " + spiClass.getName());
+
+ Object spiObject = spiClass.newInstance();
+ if (spiObject == null) {
+ throw new RuntimeException("Failed to instantiate spi " +
+ writerSpiNames[i]);
+ }
+ System.out.println("Got instance " + spiObject);
+ } catch (Throwable e) {
+ throw new RuntimeException("Failed to test spi " +
+ writerSpiNames[i]);
+ }
+ }
+
+ ImageWriter writer = ImageIO.getImageWriter(reader);
+ if (writer == null) {
+ throw new RuntimeException("Failed to get writer for " + format);
+ }
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/spi/RegisterPluginTwiceTest.java Sat Jun 03 03:48:03 2017 +0000
@@ -0,0 +1,160 @@
+/*
+ * Copyright (c) 2003, 2017, 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 4836432 8037743
+ * @summary This test attempts to register two instances of one ImageReaderSPI.
+ * Expected behavior is that only one instance of ImageReaderSPI will
+ * be registered.
+ */
+
+import java.io.IOException;
+import java.util.Iterator;
+import java.util.Locale;
+
+import javax.imageio.ImageReader;
+import javax.imageio.spi.IIORegistry;
+import javax.imageio.spi.ServiceRegistry;
+import javax.imageio.stream.ImageInputStream;
+
+public class RegisterPluginTwiceTest {
+
+ public RegisterPluginTwiceTest() throws Exception {
+ BMPImageReaderSPI BMPSpi = new BMPImageReaderSPI();
+ BMPImageReaderSPI BMPSpi1 = new BMPImageReaderSPI();
+
+ IIORegistry regis = IIORegistry.getDefaultInstance();
+ boolean res1
+ = regis.registerServiceProvider(BMPSpi,
+ javax.imageio.spi.ImageReaderSpi.class);
+ boolean res2
+ = regis.registerServiceProvider(BMPSpi1,
+ javax.imageio.spi.ImageReaderSpi.class);
+
+ if(!res1 || res2) {
+ throw new RuntimeException("Bad returned values for registerServiceProvider");
+ }
+ Iterator it = regis.getServiceProviders(Class.forName("javax.imageio.spi.ImageReaderSpi"), true);
+ int count = 0;
+ while (it.hasNext()) {
+ Object o = it.next();
+ if(o instanceof BMPImageReaderSPI) {
+ count++;
+ System.out.println("Found next BMPImageReaderSPI, count = " +count);
+ }
+ }
+ if(count > 1) {
+ throw new RuntimeException("Too many instances of the BMPImageReaderSPI was registered!");
+ }
+ }
+
+ public static void main(String args[]) throws Exception{
+ RegisterPluginTwiceTest fnio = new RegisterPluginTwiceTest();
+ }
+
+
+ /**
+ Not a perfect implementation of SPI. This is just a dummy implementation
+ which denotes some arbitrary reader class. The intention is to check how this
+ is getting registered in the registry. Hence some of the values in this class
+ may be inappropriate..
+ */
+ public static class BMPImageReaderSPI extends javax.imageio.spi.ImageReaderSpi{
+
+ private static final String vendorName = "Javasoft";
+
+ private static final String version = "2.0";
+
+ private static final String[] names = { "bmp" };
+
+ private static final String[] suffixes = { "bmp" };
+
+ private static final String[] MIMETypes = { "image/x-bmp"};
+
+ private static final String readerClassName =
+ "com.sun.imageio.plugins.png.PNGImageReader";
+
+ private static final String[] writerSpiNames = {
+ "com.sun.imageio.plugins.png.PNGImageWriterSpi"
+ };
+
+ public BMPImageReaderSPI() {
+ super(vendorName,
+ version,
+ names,
+ suffixes,
+ MIMETypes,
+ readerClassName,
+ STANDARD_INPUT_TYPE,
+ writerSpiNames,
+ false,
+ null, null,
+ null, null,
+ true,
+ "BMP Native Metadata",
+ "com.sun.imageio.plugins.png.PNGMetadataFormat",
+ null, null
+ );
+ }
+
+ public String getDescription(Locale locale) {
+ return "Standard BMP image reader";
+ }
+
+ public boolean canDecodeInput(Object input) throws IOException {
+ if (!(input instanceof ImageInputStream)) {
+ return false;
+ }
+
+ ImageInputStream stream = (ImageInputStream)input;
+ byte[] b = new byte[8];
+ stream.mark();
+ stream.readFully(b);
+ stream.reset();
+
+ return (b[0] == (byte)137 &&
+ b[1] == (byte)80 &&
+ b[2] == (byte)78 &&
+ b[3] == (byte)71 &&
+ b[4] == (byte)13 &&
+ b[5] == (byte)10 &&
+ b[6] == (byte)26 &&
+ b[7] == (byte)10);
+ }
+
+ public ImageReader createReaderInstance(Object extension) {
+ //return new PNGImageReader(this);
+ return null;
+ }
+ public void onRegistration(ServiceRegistry sr, Class<?> category) {
+ //System.out.println("Registered "+category);
+ super.onRegistration(sr, category);
+ }
+
+ public void onDeregistration(ServiceRegistry sr, Class<?> category) {
+ //System.out.println("De-Registered "+category);
+ //super.onRegistration(sr, category);
+ }
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/spi/SpiTest.java Sat Jun 03 03:48:03 2017 +0000
@@ -0,0 +1,390 @@
+/*
+ * Copyright (c) 2001, 2017, 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 4395376
+ * @summary Performs various sanity checks on Spi class constructors and get
+ * methods
+ */
+
+import java.util.Iterator;
+import java.util.Locale;
+
+import javax.imageio.ImageReader;
+import javax.imageio.ImageTypeSpecifier;
+import javax.imageio.ImageWriter;
+import javax.imageio.spi.IIORegistry;
+import javax.imageio.spi.IIOServiceProvider;
+import javax.imageio.spi.ImageReaderSpi;
+import javax.imageio.spi.ImageReaderWriterSpi;
+import javax.imageio.spi.ImageWriterSpi;
+import javax.imageio.spi.ServiceRegistry;
+
+public class SpiTest {
+
+ String vendorName = null;
+ String version = null;
+ String[] names = null;
+ String[] suffixes = null;
+ String[] MIMETypes = null;
+ String readerClassName = null;
+ String writerClassName = null;
+ Class[] inputTypes = null;
+ Class[] outputTypes = null;
+ String[] writerSpiNames = null;
+ String[] readerSpiNames = null;
+ String nativeStreamMetadataFormatName = null;
+ String nativeStreamMetadataFormatClassName = null;
+ String[] extraStreamMetadataFormatNames = null;
+ String[] extraStreamMetadataFormatClassNames = null;
+ String nativeImageMetadataFormatName = null;
+ String nativeImageMetadataFormatClassName = null;
+ String[] extraImageMetadataFormatNames = null;
+ String[] extraImageMetadataFormatClassNames = null;
+
+ private void error(String message) {
+ // System.out.println("Error: " + message);
+ throw new RuntimeException(message);
+ }
+
+ private void testSpi(IIOServiceProvider spi) {
+ if (spi.getVendorName() == null) {
+ error(spi + " getVendorName == null!");
+ }
+ if (spi.getVersion() == null) {
+ error(spi + " getVersion == null!");
+ }
+ }
+
+ private void testSpi(ImageReaderWriterSpi spi) {
+ testSpi((IIOServiceProvider)spi);
+ if (spi.getFormatNames() == null) {
+ error("spi.getFormatNames == null!");
+ }
+ String[] suffixes = spi.getFileSuffixes();
+ if (suffixes != null && suffixes.length == 0) {
+ error("suffixes.length == 0!");
+ }
+ String[] MIMETypes = spi.getMIMETypes();
+ if (MIMETypes != null && MIMETypes.length == 0) {
+ error("MIMETypes.length == 0!");
+ }
+ if (spi.getPluginClassName() == null) {
+ error("spi.getPluginClassName == null!");
+ }
+ String[] extraStreamMetadataFormatNames =
+ spi.getExtraStreamMetadataFormatNames();
+ if (extraStreamMetadataFormatNames != null &&
+ extraStreamMetadataFormatNames.length == 0) {
+ error("extraStreamMetadataFormatNames.length == 0!");
+ }
+ String[] extraImageMetadataFormatNames =
+ spi.getExtraImageMetadataFormatNames();
+ if (extraImageMetadataFormatNames != null &&
+ extraImageMetadataFormatNames.length == 0) {
+ error("extraImageMetadataFormatNames.length == 0!");
+ }
+ }
+
+ public void testSpi(ImageReaderSpi spi) {
+ testSpi((ImageReaderWriterSpi)spi);
+ Class[] inputTypes = spi.getInputTypes();
+ if (inputTypes == null) {
+ error("inputTypes == null!");
+ }
+ if (inputTypes.length == 0) {
+ error("inputTypes.length == 0!");
+ }
+ String[] writerSpiNames = spi.getImageWriterSpiNames();
+ if (writerSpiNames != null && writerSpiNames.length == 0) {
+ error("writerSpiNames.length == 0!");
+ }
+ }
+
+ public void testSpi(ImageWriterSpi spi) {
+ testSpi((ImageReaderWriterSpi)spi);
+ Class[] outputTypes = spi.getOutputTypes();
+ if (outputTypes == null) {
+ error("outputTypes == null!");
+ }
+ if (outputTypes.length == 0) {
+ error("outputTypes.length == 0!");
+ }
+ String[] readerSpiNames = spi.getImageReaderSpiNames();
+ if (readerSpiNames != null && readerSpiNames.length == 0) {
+ error("readerSpiNames.length == 0!");
+ }
+ }
+
+ private void resetConstructorArguments() {
+ vendorName = null;
+ version = null;
+ names = null;
+ suffixes = null;
+ MIMETypes = null;
+ readerClassName = null;
+ inputTypes = null;
+ outputTypes = null;
+ writerSpiNames = null;
+ readerSpiNames = null;
+ nativeStreamMetadataFormatName = null;
+ nativeStreamMetadataFormatClassName = null;
+ extraStreamMetadataFormatNames = null;
+ extraStreamMetadataFormatClassNames = null;
+ nativeImageMetadataFormatName = null;
+ nativeImageMetadataFormatClassName = null;
+ extraImageMetadataFormatNames = null;
+ extraImageMetadataFormatClassNames = null;
+ }
+
+ private ImageReaderSpi constructImageReaderSpi() {
+ return new ImageReaderSpi(vendorName,
+ version,
+ names,
+ suffixes,
+ MIMETypes,
+ readerClassName,
+ inputTypes,
+ writerSpiNames,
+ false,
+ nativeStreamMetadataFormatName,
+ nativeStreamMetadataFormatClassName,
+ extraStreamMetadataFormatNames,
+ extraStreamMetadataFormatClassNames,
+ false,
+ nativeImageMetadataFormatName,
+ nativeImageMetadataFormatClassName,
+ extraImageMetadataFormatNames,
+ extraImageMetadataFormatClassNames) {
+
+ public String getDescription(Locale locale) {
+ return null;
+ }
+
+ public boolean canDecodeInput(Object source) {
+ return false;
+ }
+
+ public ImageReader createReaderInstance(Object extension) {
+ return null;
+ }
+ };
+ }
+
+ private ImageWriterSpi constructImageWriterSpi() {
+ return new ImageWriterSpi(vendorName,
+ version,
+ names,
+ suffixes,
+ MIMETypes,
+ writerClassName,
+ outputTypes,
+ readerSpiNames,
+ false,
+ nativeStreamMetadataFormatName,
+ nativeStreamMetadataFormatClassName,
+ extraStreamMetadataFormatNames,
+ extraStreamMetadataFormatClassNames,
+ false,
+ nativeImageMetadataFormatName,
+ nativeImageMetadataFormatClassName,
+ extraImageMetadataFormatNames,
+ extraImageMetadataFormatClassNames) {
+
+ public String getDescription(Locale locale) {
+ return null;
+ }
+
+ public boolean canEncodeImage(ImageTypeSpecifier type) {
+ return false;
+ }
+
+ public ImageWriter createWriterInstance(Object extension) {
+ return null;
+ }
+ };
+ }
+
+ private void checkImageReaderSpiConstructor(boolean shouldFail) {
+ boolean gotIAE = false;
+ try {
+ constructImageReaderSpi();
+ } catch (Exception e) {
+ if (!(e instanceof IllegalArgumentException)) {
+ error("Got exception " + e);
+ } else {
+ gotIAE = true;
+ }
+ }
+ if (gotIAE != shouldFail) {
+ if (gotIAE) {
+ error("ImageReaderSpi constructor threw an IAE!");
+ } else {
+ error("ImageReaderSpi constructor didn't throw an IAE!");
+ }
+ }
+ }
+
+ private void checkImageWriterSpiConstructor(boolean shouldFail) {
+ boolean gotIAE = false;
+ try {
+ constructImageWriterSpi();
+ } catch (Exception e) {
+ if (!(e instanceof IllegalArgumentException)) {
+ error("Got exception " + e);
+ } else {
+ gotIAE = true;
+ }
+ }
+ if (gotIAE != shouldFail) {
+ if (gotIAE) {
+ error("ImageWriterSpi constructor threw an IAE!");
+ } else {
+ error("ImageWriterSpi constructor didn't throw an IAE!");
+ }
+ }
+ }
+
+ public void testImageReaderSpiConstructor() {
+ resetConstructorArguments();
+
+ checkImageReaderSpiConstructor(true);
+ vendorName = "My Vendor";
+ checkImageReaderSpiConstructor(true);
+ version = "My Version";
+ checkImageReaderSpiConstructor(true);
+ names = new String[0];
+ checkImageReaderSpiConstructor(true);
+ names = new String[1];
+ names[0] = "My Format Name";
+ checkImageReaderSpiConstructor(true);
+ readerClassName = "com.mycompany.Reader";
+ checkImageReaderSpiConstructor(true);
+ inputTypes = new Class[0];
+ checkImageReaderSpiConstructor(true);
+ inputTypes = new Class[1];
+ inputTypes[0] = Object.class;
+ // Now it should work
+ checkImageReaderSpiConstructor(false);
+
+ // Test normalization of zero-length arrays
+ suffixes = new String[0];
+ MIMETypes = new String[0];
+ writerSpiNames = new String[0];
+ extraStreamMetadataFormatNames = new String[0];
+ extraImageMetadataFormatNames = new String[0];
+
+ ImageReaderSpi spi = constructImageReaderSpi();
+ if (spi.getFileSuffixes() != null) {
+ error("Failed to normalize suffixes!");
+ }
+ if (spi.getMIMETypes() != null) {
+ error("Failed to normalize MIMETypes!");
+ }
+ if (spi.getImageWriterSpiNames() != null) {
+ error("Failed to normalize writerSpiNames!");
+ }
+ if (spi.getExtraStreamMetadataFormatNames() != null) {
+ error("Failed to normalize extraStreamMetadataFormatNames!");
+ }
+ if (spi.getExtraImageMetadataFormatNames() != null) {
+ error("Failed to normalize extraImageMetadataFormatNames!");
+ }
+ }
+
+ public void testImageWriterSpiConstructor() {
+ resetConstructorArguments();
+
+ checkImageWriterSpiConstructor(true);
+ vendorName = "My Vendor";
+ checkImageWriterSpiConstructor(true);
+ version = "My Version";
+ checkImageWriterSpiConstructor(true);
+ names = new String[0];
+ checkImageWriterSpiConstructor(true);
+ names = new String[1];
+ names[0] = "My Format Name";
+ checkImageWriterSpiConstructor(true);
+ writerClassName = "com.mycompany.Writer";
+ checkImageWriterSpiConstructor(true);
+ outputTypes = new Class[0];
+ checkImageWriterSpiConstructor(true);
+ outputTypes = new Class[1];
+ outputTypes[0] = Object.class;
+ // Now it should work
+ checkImageWriterSpiConstructor(false);
+
+ // Test normalization of zero-length arrays
+ suffixes = new String[0];
+ MIMETypes = new String[0];
+ readerSpiNames = new String[0];
+ extraStreamMetadataFormatNames = new String[0];
+ extraStreamMetadataFormatClassNames = new String[0];
+ extraImageMetadataFormatNames = new String[0];
+ extraImageMetadataFormatClassNames = new String[0];
+
+ ImageWriterSpi spi = constructImageWriterSpi();
+ if (spi.getFileSuffixes() != null) {
+ error("Failed to normalize suffixes!");
+ }
+ if (spi.getMIMETypes() != null) {
+ error("Failed to normalize MIMETypes!");
+ }
+ if (spi.getImageReaderSpiNames() != null) {
+ error("Failed to normalize readerSpiNames!");
+ }
+ if (spi.getExtraStreamMetadataFormatNames() != null) {
+ error("Failed to normalize extraStreamMetadataFormatNames!");
+ }
+ if (spi.getExtraImageMetadataFormatNames() != null) {
+ error("Failed to normalize extraImageMetadataFormatNames!");
+ }
+ }
+
+ public SpiTest() {
+ testImageReaderSpiConstructor();
+ testImageWriterSpiConstructor();
+
+ ServiceRegistry registry = IIORegistry.getDefaultInstance();
+ Iterator readers = registry.getServiceProviders(ImageReaderSpi.class,
+ false);
+ while (readers.hasNext()) {
+ ImageReaderSpi rspi = (ImageReaderSpi)readers.next();
+ System.out.println("*** Testing " + rspi.getClass().getName());
+ testSpi(rspi);
+ }
+
+ Iterator writers = registry.getServiceProviders(ImageWriterSpi.class,
+ false);
+ while (writers.hasNext()) {
+ ImageWriterSpi wspi = (ImageWriterSpi)writers.next();
+ System.out.println("*** Testing " + wspi.getClass().getName());
+ testSpi(wspi);
+ }
+ }
+
+ public static void main(String[] args) {
+ new SpiTest();
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/spi/SpiVersionNumbers.java Sat Jun 03 03:48:03 2017 +0000
@@ -0,0 +1,61 @@
+/*
+ * Copyright (c) 2001, 2017, 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 4415450
+ * @summary Checks the version number for the standard stream Spis
+ * @modules java.desktop/com.sun.imageio.spi
+ */
+
+import javax.imageio.spi.IIOServiceProvider;
+
+import com.sun.imageio.spi.FileImageInputStreamSpi;
+import com.sun.imageio.spi.FileImageOutputStreamSpi;
+import com.sun.imageio.spi.InputStreamImageInputStreamSpi;
+import com.sun.imageio.spi.OutputStreamImageOutputStreamSpi;
+import com.sun.imageio.spi.RAFImageInputStreamSpi;
+import com.sun.imageio.spi.RAFImageOutputStreamSpi;
+
+public class SpiVersionNumbers {
+
+ private static void check(IIOServiceProvider spi) {
+ String version = spi.getVersion();
+ if (!version.equals("1.0")) {
+ throw new RuntimeException("Provider " +
+ spi.getClass().getName() +
+ " has version " + version + "!");
+ }
+ }
+
+ public static void main(String[] args) {
+ check(new FileImageInputStreamSpi());
+ check(new InputStreamImageInputStreamSpi());
+ check(new RAFImageInputStreamSpi());
+
+ check(new FileImageOutputStreamSpi());
+ check(new OutputStreamImageOutputStreamSpi());
+ check(new RAFImageOutputStreamSpi());
+ }
+
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/stream/BitPadding.java Sat Jun 03 03:48:03 2017 +0000
@@ -0,0 +1,58 @@
+/*
+ * Copyright (c) 2001, 2017, 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 4430395
+ * @summary Checks if write(int) properly pads unwritten bits with zeros
+ */
+
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.IOException;
+import java.io.OutputStream;
+
+import javax.imageio.stream.FileCacheImageOutputStream;
+
+public class BitPadding {
+
+ public static void main(String[] args) throws IOException {
+ OutputStream ostream = new ByteArrayOutputStream();
+ File f = null;
+ FileCacheImageOutputStream fcios =
+ new FileCacheImageOutputStream(ostream, f);
+ fcios.writeBit(1);
+ fcios.write(96);
+
+ fcios.seek(0);
+ int r1 = fcios.read();
+ if (r1 != 128 ) {
+ throw new RuntimeException("Failed, first byte is " + r1);
+ }
+
+ int r2 = fcios.read();
+ if (r2 != 96) {
+ throw new RuntimeException("Failed, second byte is " + r2);
+ }
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/stream/DeleteOnExitTest.java Sat Jun 03 03:48:03 2017 +0000
@@ -0,0 +1,75 @@
+/*
+ * Copyright (c) 2005, 2017, 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.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.IOException;
+
+import javax.imageio.ImageIO;
+import javax.imageio.stream.ImageInputStream;
+import javax.imageio.stream.ImageOutputStream;
+
+public class DeleteOnExitTest {
+ public static void main(String[] args) throws IOException {
+ ByteArrayInputStream is =
+ new ByteArrayInputStream(new byte[100]);
+ ByteArrayOutputStream os =
+ new ByteArrayOutputStream();
+
+ String tmp = System.getProperty("java.io.tmpdir", ".");
+ System.out.println("tmp: " + tmp);
+
+ // count number of files before test
+ ImageIO.setUseCache(true);
+ ImageIO.setCacheDirectory(new File(tmp));
+
+ File tmpDir = ImageIO.getCacheDirectory();
+ System.out.println("tmpDir is " + tmpDir);
+ int fnum_before = tmpDir.list().length;
+ System.out.println("Files before test: " + fnum_before);
+
+ ImageInputStream iis =
+ ImageIO.createImageInputStream(is);
+ System.out.println("iis = " + iis);
+
+ ImageInputStream iis2 =
+ ImageIO.createImageInputStream(is);
+
+ ImageOutputStream ios =
+ ImageIO.createImageOutputStream(os);
+ System.out.println("ios = " + ios);
+
+ ImageOutputStream ios2 =
+ ImageIO.createImageOutputStream(os);
+
+ iis2.close();
+ ios2.close();
+ int fnum_after = tmpDir.list().length;
+ System.out.println("Files after test: " + fnum_after);
+
+ if (fnum_before == fnum_after) {
+ throw new RuntimeException("Test failed: cache was not used.");
+ }
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/stream/DeleteOnExitTest.sh Sat Jun 03 03:48:03 2017 +0000
@@ -0,0 +1,69 @@
+# Copyright (c) 2005, 2017, 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 6291034
+# @run shell DeleteOnExitTest.sh
+# @summary Verify that temporary imageio files files are deleted on VM exit.
+
+if [ -z "${TESTSRC}" ]; then
+ echo "TESTSRC undefined: defaulting to ."
+ TESTSRC=.
+fi
+
+if [ -z "${TESTCLASSES}" ]; then
+ echo "TESTCLASSES undefined: defaulting to ."
+ TESTCLASSES=.
+fi
+
+if [ -z "${TESTJAVA}" ]; then
+ echo "TESTJAVA undefined: can't continue."
+ exit 1
+fi
+
+echo "TESTJAVA=${TESTJAVA}"
+echo "TESTSRC=${TESTSRC}"
+echo "TESTCLASSES=${TESTCLASSES}"
+cd ${TESTSRC}
+${COMPILEJAVA}/bin/javac -d ${TESTCLASSES} DeleteOnExitTest.java
+
+cd ${TESTCLASSES}
+
+numfiles0=`ls ${TESTCLASSES} | grep "imageio*.tmp" | wc -l`
+
+${TESTJAVA}/bin/java ${TESTVMOPTS} \
+ -Djava.io.tmpdir=${TESTCLASSES} DeleteOnExitTest
+
+if [ $? -ne 0 ]
+ then
+ echo "Test fails: exception thrown!"
+ exit 1
+fi
+
+numfiles1=`ls ${TESTCLASSES} | grep "imageio*.tmp" | wc -l`
+
+if [ $numfiles0 -ne $numfiles1 ]
+ then
+ echo "Test fails: tmp file exists!"
+ exit 1
+fi
+echo "Test passed."
+exit 0
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/stream/FileCacheImageInputStreamNullTest.java Sat Jun 03 03:48:03 2017 +0000
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2001, 2017, 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 4428802
+ * @summary Checks for IAE from FileCacheImageInputStream constructor with a
+ * null value for 'stream'
+ */
+
+import javax.imageio.stream.FileCacheImageInputStream;
+
+public class FileCacheImageInputStreamNullTest {
+
+ public static void main (String[] args) throws Exception {
+ boolean gotIAE = false;
+ try {
+ FileCacheImageInputStream fciis =
+ new FileCacheImageInputStream(null, null);
+ } catch (IllegalArgumentException e) {
+ gotIAE = true;
+ }
+
+ if (!gotIAE) {
+ throw new RuntimeException
+ ("Failed to get IllegalArgumentException!");
+ }
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/stream/FlushBefore.java Sat Jun 03 03:48:03 2017 +0000
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2001, 2017, 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 4431503
+ * @summary Checks if flushBefore(pos) throws an IndexOutOfBoundsException if
+ * pos lies in the flushed portion of the stream
+ */
+
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.OutputStream;
+
+import javax.imageio.stream.FileCacheImageOutputStream;
+import javax.imageio.stream.ImageOutputStream;
+import javax.imageio.stream.MemoryCacheImageOutputStream;
+
+public class FlushBefore {
+
+ public static void main(String[] args) throws IOException {
+ OutputStream ostream = new ByteArrayOutputStream();
+
+ FileCacheImageOutputStream fcios =
+ new FileCacheImageOutputStream(ostream, null);
+ test(fcios);
+
+ MemoryCacheImageOutputStream mcios =
+ new MemoryCacheImageOutputStream(ostream);
+ test(mcios);
+ }
+
+ private static void test(ImageOutputStream ios) throws IOException {
+ try {
+ ios.write(new byte[10], 0, 10);
+ ios.flushBefore(5);
+ ios.flushBefore(4);
+
+ throw new RuntimeException
+ ("Failed to get IndexOutOfBoundsException!");
+ } catch (IndexOutOfBoundsException e) {
+ }
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/stream/MemoryCacheImageOutputStreamTest.java Sat Jun 03 03:48:03 2017 +0000
@@ -0,0 +1,115 @@
+/*
+ * Copyright (c) 2001, 2017, 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 4417672 4422328
+ * @summary Checks the functionality of MemoryCacheImageOutputStream
+ * particularly with regard to seeking and flushing
+ */
+
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+
+import javax.imageio.stream.ImageOutputStream;
+import javax.imageio.stream.MemoryCacheImageOutputStream;
+
+public class MemoryCacheImageOutputStreamTest {
+
+ public static void main(String[] args) throws IOException {
+ try {
+ MemoryCacheImageOutputStream stream =
+ new MemoryCacheImageOutputStream(new ByteArrayOutputStream());
+ stream.write(0); // or write anything, for that matter
+ stream.flush();
+ } catch (Exception e) {
+ throw new RuntimeException("Error flushing stream: " + e);
+ }
+
+ ByteArrayOutputStream os = new ByteArrayOutputStream();
+ ImageOutputStream ios = new MemoryCacheImageOutputStream(os);
+
+ byte[] b = new byte[30*256];
+ byte byteVal = (byte)0;
+ for (int i = 0; i < b.length; i++) {
+ b[i] = byteVal++;
+ }
+
+ // Write 261,120 bytes
+ for (int i = 0; i < 34; i++) {
+ ios.write(b);
+ }
+ // Scatter 256 values at positions 1000, 2000, ...
+ // Using both write(int) and write(byte[])
+ byte[] buf = new byte[1];
+ for (int i = 0; i < 256; i += 2) {
+ ios.seek(1000*i);
+ ios.write(i);
+
+ ios.seek(1000*(i + 1));
+ buf[0] = (byte)(i + 1);
+ ios.write(buf);
+ }
+
+ // Re-read scattered values
+ for (int i = 0; i < 256; i++) {
+ ios.seek(1000*i);
+ int val = ios.read();
+ if (val != i) {
+ System.out.println("Got bad value (1) at pos = " + (1000*i));
+ }
+ }
+
+ // Discard two buffers and re-read scattered values
+ ios.flushBefore(2*8192);
+
+ for (int i = 0; i < 256; i++) {
+ long pos = 1000*i;
+ if (pos >= 2*8192) {
+ ios.seek(pos);
+ int val = ios.read();
+ if (val != i) {
+ System.out.println("Got bad value (2) at pos = " + (1000*i));
+ }
+ }
+ }
+ ios.close();
+
+ byte[] data = os.toByteArray();
+ for (int i = 0; i < data.length; i++) {
+ byte val = data[i];
+ if ((i < 256000) && (i % 1000) == 0) {
+ if (val != (byte)(i/1000)) {
+ System.out.println("Got bad value (3) at pos = " + i);
+ }
+ } else {
+ byte gval = (byte)((i % (30*256)) % 256);
+ if (val != gval) {
+ System.out.println("Got bad value (4) at pos = " + i +
+ "(got " + (val & 0xff) +
+ " wanted " + (gval & 0xff) +")");
+ }
+ }
+ }
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/stream/ReadBytesIIOByteBuffer.java Sat Jun 03 03:48:03 2017 +0000
@@ -0,0 +1,56 @@
+/*
+ * Copyright (c) 2004, 2017, 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 4446906
+ * @summary Checks if ImageInputStreamImpl.readBytes(IIOByteBuffer) tests for
+ * len < 0
+ */
+
+import java.io.ByteArrayInputStream;
+import java.io.InputStream;
+
+import javax.imageio.stream.IIOByteBuffer;
+import javax.imageio.stream.ImageInputStream;
+import javax.imageio.stream.MemoryCacheImageInputStream;
+
+public class ReadBytesIIOByteBuffer {
+
+ public static void main(String[] argv) {
+ byte[] bar = {1, 1, 1};
+ InputStream is = new ByteArrayInputStream(bar);
+
+ ImageInputStream iis = new MemoryCacheImageInputStream(is);
+ byte[] b = new byte[10];
+ IIOByteBuffer iiob = new IIOByteBuffer(b, 0, b.length);
+ try {
+ iis.readBytes(iiob, -1);
+ } catch (IndexOutOfBoundsException e) {
+ return;
+ } catch (Exception e) {
+ throw new RuntimeException("Unexpected exception: " + e);
+ }
+ throw new RuntimeException("No exception thrown for len < 0!");
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/stream/ReadFullyTest.java Sat Jun 03 03:48:03 2017 +0000
@@ -0,0 +1,146 @@
+/*
+ * Copyright (c) 2001, 2017, 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 4422263
+ * @summary Checks that ImageInputStream.readFully(type[], int int) handles sign
+ * extension and byte ordering correctly
+ */
+
+import java.io.ByteArrayInputStream;
+import java.io.InputStream;
+import java.nio.ByteOrder;
+
+import javax.imageio.stream.ImageInputStream;
+import javax.imageio.stream.MemoryCacheImageInputStream;
+
+public class ReadFullyTest {
+
+ static final ByteOrder bigEndian = ByteOrder.BIG_ENDIAN;
+ static final ByteOrder littleEndian = ByteOrder.LITTLE_ENDIAN;
+
+ private static void expect(long e, long g) {
+ if (e != g) {
+ throw new RuntimeException("Expected " + e + ", got " + g);
+ }
+ }
+
+ public static void main (String args[]) {
+ try {
+ byte[] b = {
+ (byte)0x11, (byte)0x22, // low low
+ (byte)0x44, (byte)0x99, // low high
+ (byte)0xAA, (byte)0x33, // high low
+ (byte)0xBB, (byte)0xCC // high high
+ };
+ InputStream in = new ByteArrayInputStream(b);
+ ImageInputStream iin = new MemoryCacheImageInputStream(in);
+
+ short[] s = new short[b.length/2];
+ char[] c = new char[b.length/2];
+ int[] i = new int[b.length/4];
+ long[] l = new long[b.length/8];
+ float[] f = new float[b.length/4];
+ double[] d = new double[b.length/8];
+
+ iin.seek(0L);
+ iin.setByteOrder(bigEndian);
+ iin.readFully(s, 0, s.length);
+ expect(s[0] & 0xffff, 0x1122);
+ expect(s[1] & 0xffff, 0x4499);
+ expect(s[2] & 0xffff, 0xAA33);
+ expect(s[3] & 0xffff, 0xBBCC);
+
+ iin.seek(0L);
+ iin.setByteOrder(littleEndian);
+ iin.readFully(s, 0, s.length);
+ expect(s[0] & 0xffff, 0x2211);
+ expect(s[1] & 0xffff, 0x9944);
+ expect(s[2] & 0xffff, 0x33AA);
+ expect(s[3] & 0xffff, 0xCCBB);
+
+ iin.seek(0L);
+ iin.setByteOrder(bigEndian);
+ iin.readFully(c, 0, c.length);
+ expect(c[0], 0x1122);
+ expect(c[1], 0x4499);
+ expect(c[2], 0xAA33);
+ expect(c[3], 0xBBCC);
+
+ iin.seek(0L);
+ iin.setByteOrder(littleEndian);
+ iin.readFully(c, 0, c.length);
+ expect(c[0], 0x2211);
+ expect(c[1], 0x9944);
+ expect(c[2], 0x33AA);
+ expect(c[3], 0xCCBB);
+
+ iin.seek(0L);
+ iin.setByteOrder(bigEndian);
+ iin.readFully(i, 0, i.length);
+ expect(i[0] & 0xffffffff, 0x11224499);
+ expect(i[1] & 0xffffffff, 0xAA33BBCC);
+
+ iin.seek(0L);
+ iin.setByteOrder(littleEndian);
+ iin.readFully(i, 0, i.length);
+ expect(i[0] & 0xffffffff, 0x99442211);
+ expect(i[1] & 0xffffffff, 0xCCBB33AA);
+
+ iin.seek(0L);
+ iin.setByteOrder(bigEndian);
+ iin.readFully(f, 0, f.length);
+ expect(Float.floatToIntBits(f[0]) & 0xffffffff, 0x11224499);
+ expect(Float.floatToIntBits(f[1]) & 0xffffffff, 0xAA33BBCC);
+
+ iin.seek(0L);
+ iin.setByteOrder(littleEndian);
+ iin.readFully(f, 0, f.length);
+ expect(Float.floatToIntBits(f[0]) & 0xffffffff, 0x99442211);
+ expect(Float.floatToIntBits(f[1]) & 0xffffffff, 0xCCBB33AA);
+
+ iin.seek(0L);
+ iin.setByteOrder(bigEndian);
+ iin.readFully(l, 0, l.length);
+ expect(l[0], 0x11224499AA33BBCCL);
+
+ iin.seek(0L);
+ iin.setByteOrder(littleEndian);
+ iin.readFully(l, 0, l.length);
+ expect(l[0], 0xCCBB33AA99442211L);
+
+ iin.seek(0L);
+ iin.setByteOrder(bigEndian);
+ iin.readFully(d, 0, d.length);
+ expect(Double.doubleToLongBits(d[0]), 0x11224499AA33BBCCL);
+
+ iin.seek(0L);
+ iin.setByteOrder(littleEndian);
+ iin.readFully(d, 0, d.length);
+ expect(Double.doubleToLongBits(d[0]), 0xCCBB33AA99442211L);
+ } catch (Exception ex) {
+ throw new RuntimeException("Got exception " + ex);
+ }
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/stream/ReadUnsignedIntTest.java Sat Jun 03 03:48:03 2017 +0000
@@ -0,0 +1,62 @@
+/*
+ * Copyright (c) 2003, 2017, 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 4949609
+ * @summary Tests that the readUnsignedInt returns the positive value
+ */
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.DataOutputStream;
+import java.io.IOException;
+
+import javax.imageio.ImageIO;
+import javax.imageio.stream.ImageInputStream;
+
+public class ReadUnsignedIntTest {
+
+ public static void main(String[] args) throws IOException {
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+ DataOutputStream dos = new DataOutputStream(baos);
+
+ dos.writeInt(1);
+ dos.writeInt(0x7fffffff);
+ dos.writeInt(0x8fffffff);
+ dos.writeInt(0xffffffff);
+
+ dos.close();
+
+ ByteArrayInputStream bais =
+ new ByteArrayInputStream(baos.toByteArray());
+ ImageInputStream iis = ImageIO.createImageInputStream(bais);
+ for (int i=0; i<4; i++) {
+ long res = iis.readUnsignedInt();
+ if (res <= 0) {
+ throw new RuntimeException("Negative number was read: "+
+ Long.toString(res, 16));
+ }
+ }
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/stream/StreamFlush.java Sat Jun 03 03:48:03 2017 +0000
@@ -0,0 +1,108 @@
+/*
+ * Copyright (c) 2001, 2017, 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 4414990 4415041
+ * @summary Checks that the output is flushed properly when using various
+ * ImageOutputStreams and writers
+ */
+
+import java.awt.image.BufferedImage;
+import java.io.BufferedOutputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+
+import javax.imageio.ImageIO;
+import javax.imageio.stream.ImageOutputStream;
+
+public class StreamFlush {
+
+ public static void main(String[] args) throws IOException {
+ ImageIO.setUseCache(true);
+
+ // Create a FileImageOutputStream from a FileOutputStream
+ File temp1 = File.createTempFile("imageio", ".tmp");
+ temp1.deleteOnExit();
+ ImageOutputStream fios = ImageIO.createImageOutputStream(temp1);
+
+ // Create a FileCacheImageOutputStream from a BufferedOutputStream
+ File temp2 = File.createTempFile("imageio", ".tmp");
+ temp2.deleteOnExit();
+ FileOutputStream fos2 = new FileOutputStream(temp2);
+ BufferedOutputStream bos = new BufferedOutputStream(fos2);
+ ImageOutputStream fcios1 = ImageIO.createImageOutputStream(bos);
+
+ // Create a FileCacheImageOutputStream from a ByteArrayOutputStream
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+ ImageOutputStream fcios2 = ImageIO.createImageOutputStream(baos);
+
+ BufferedImage bi =
+ new BufferedImage(10, 10, BufferedImage.TYPE_3BYTE_BGR);
+
+ ImageIO.write(bi, "jpg", fios); // No bug, check it anyway
+ ImageIO.write(bi, "png", fcios1); // Bug 4414990
+ ImageIO.write(bi, "jpg", fcios2); // Bug 4415041
+
+ // It should not be necessary to flush any of the streams
+ // If flushing does make a difference, it indicates a bug
+ // in the writer or the stream implementation
+
+ // Get length of temp1 before and after flushing
+ long file1NoFlushLength = temp1.length();
+ fios.flush();
+ long file1FlushLength = temp1.length();
+
+ // Get length of temp2 before and after flushing
+ long file2NoFlushLength = temp2.length();
+ fcios1.flush();
+ bos.flush();
+ long file2FlushLength = temp2.length();
+
+ byte[] b0 = baos.toByteArray();
+ int cacheNoFlushLength = b0.length;
+ fcios2.flush();
+ byte[] b1 = baos.toByteArray();
+ int cacheFlushLength = b1.length;
+
+ if (file1NoFlushLength != file1FlushLength) {
+ // throw new RuntimeException
+ System.out.println
+ ("FileImageOutputStream not flushed!");
+ }
+
+ if (file2NoFlushLength != file2FlushLength) {
+ // throw new RuntimeException
+ System.out.println
+ ("FileCacheImageOutputStream/BufferedOutputStream not flushed!");
+ }
+
+ if (cacheNoFlushLength != cacheFlushLength) {
+ // throw new RuntimeException
+ System.out.println
+ ("FileCacheImageOutputStream/ByteArrayOutputStream not flushed!");
+ }
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/stream/WriteBitsTest.java Sat Jun 03 03:48:03 2017 +0000
@@ -0,0 +1,110 @@
+/*
+ * Copyright (c) 2002, 2017, 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 4507868
+ * @summary Checks that ImageOutputStreamImpl.writeBits() advances the stream
+ * position and bit offset correctly. Also verifies that the
+ * MemoryCacheImageOutputStream.read() variants reset the bitOffset
+ * before the read actually occurs.
+ */
+
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+
+import javax.imageio.stream.ImageOutputStream;
+import javax.imageio.stream.MemoryCacheImageOutputStream;
+
+public class WriteBitsTest {
+
+ private static void verify(ImageOutputStream ios,
+ long expstreampos, int expbitoffset)
+ throws IOException, RuntimeException
+ {
+ long actstreampos = ios.getStreamPosition();
+ int actbitoffset = ios.getBitOffset();
+
+ if ((actstreampos != expstreampos) ||
+ (actbitoffset != expbitoffset))
+ {
+ System.err.println("Expected stream position: " + expstreampos +
+ " Actual: " + actstreampos);
+ System.err.println("Expected bit offset: " + expbitoffset +
+ " Actual: " + actbitoffset);
+ throw new RuntimeException("Test failed.");
+ }
+ }
+
+ public static void main(String argv[]) throws RuntimeException {
+ ByteArrayOutputStream ostream = new ByteArrayOutputStream();
+ MemoryCacheImageOutputStream mcios = new
+ MemoryCacheImageOutputStream(ostream);
+
+ try {
+ // verify correct writeBits() functionality
+ long streampos = 0;
+ int bitoffset = 0;
+
+ mcios.setBitOffset(bitoffset);
+ verify(mcios, streampos, bitoffset);
+
+ bitoffset = 3;
+ mcios.setBitOffset(bitoffset);
+ verify(mcios, streampos, bitoffset);
+
+ for (int incr = 3; incr <= 15; incr += 12) {
+ for (int i = 0; i < 64; i += incr) {
+ mcios.writeBits(10, incr);
+
+ bitoffset += incr;
+
+ if (bitoffset > 7) {
+ int stroffset = bitoffset / 8;
+ bitoffset = bitoffset % 8;
+ streampos += stroffset;
+ }
+
+ verify(mcios, streampos, bitoffset);
+ }
+ }
+
+ // verify correct read(byte[], int, int) functionality
+ byte[] bytearr = new byte[2];
+ mcios.seek(2);
+ mcios.setBitOffset(3);
+ int numread = mcios.read(bytearr, 0, 2);
+ if (numread != 2) {
+ throw new RuntimeException("Error in mcios.read([BII)I");
+ }
+ verify(mcios, 4, 0);
+
+ // verify correct read() functionality
+ mcios.setBitOffset(3);
+ mcios.read();
+ verify(mcios, 5, 0);
+ } catch (IOException e) {
+ throw new RuntimeException("Unexpected IOException: " + e);
+ }
+ }
+}
--- a/jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/Available.java Sat Jun 03 02:44:55 2017 +0000
+++ b/jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/Available.java Sat Jun 03 03:48:03 2017 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,10 +28,11 @@
import java.io.File;
import java.io.FileInputStream;
+import java.nio.file.Files;
+import java.nio.file.Paths;
-import javax.sound.sampled.*;
-
-import com.sun.media.sound.*;
+import com.sun.media.sound.RIFFReader;
+import com.sun.media.sound.RIFFWriter;
public class Available {
@@ -60,8 +61,6 @@
assertEquals(avail - 1,readchunk.available());
fis.close();
reader = null;
-
-
}
finally
{
@@ -69,10 +68,7 @@
writer.close();
if(reader != null)
reader.close();
-
- if(tempfile.exists())
- if(!tempfile.delete())
- tempfile.deleteOnExit();
+ Files.delete(Paths.get(tempfile.getAbsolutePath()));
}
}
}
--- a/jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/Close.java Sat Jun 03 02:44:55 2017 +0000
+++ b/jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/Close.java Sat Jun 03 03:48:03 2017 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,10 +28,11 @@
import java.io.File;
import java.io.FileInputStream;
+import java.nio.file.Files;
+import java.nio.file.Paths;
-import javax.sound.sampled.*;
-
-import com.sun.media.sound.*;
+import com.sun.media.sound.RIFFReader;
+import com.sun.media.sound.RIFFWriter;
public class Close {
@@ -54,8 +55,6 @@
reader = new RIFFReader(fis);
reader.close();
reader = null;
-
-
}
finally
{
@@ -63,10 +62,7 @@
writer.close();
if(reader != null)
reader.close();
-
- if(tempfile.exists())
- if(!tempfile.delete())
- tempfile.deleteOnExit();
+ Files.delete(Paths.get(tempfile.getAbsolutePath()));
}
}
}
--- a/jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/GetFilePointer.java Sat Jun 03 02:44:55 2017 +0000
+++ b/jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/GetFilePointer.java Sat Jun 03 03:48:03 2017 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,10 +28,11 @@
import java.io.File;
import java.io.FileInputStream;
+import java.nio.file.Files;
+import java.nio.file.Paths;
-import javax.sound.sampled.*;
-
-import com.sun.media.sound.*;
+import com.sun.media.sound.RIFFReader;
+import com.sun.media.sound.RIFFWriter;
public class GetFilePointer {
@@ -60,8 +61,6 @@
assertEquals(p+1,readchunk.getFilePointer());
fis.close();
reader = null;
-
-
}
finally
{
@@ -69,10 +68,7 @@
writer.close();
if(reader != null)
reader.close();
-
- if(tempfile.exists())
- if(!tempfile.delete())
- tempfile.deleteOnExit();
+ Files.delete(Paths.get(tempfile.getAbsolutePath()));
}
}
}
--- a/jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/GetSize.java Sat Jun 03 02:44:55 2017 +0000
+++ b/jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/GetSize.java Sat Jun 03 03:48:03 2017 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,10 +28,11 @@
import java.io.File;
import java.io.FileInputStream;
+import java.nio.file.Files;
+import java.nio.file.Paths;
-import javax.sound.sampled.*;
-
-import com.sun.media.sound.*;
+import com.sun.media.sound.RIFFReader;
+import com.sun.media.sound.RIFFWriter;
public class GetSize {
@@ -59,8 +60,6 @@
readchunk.readByte();
fis.close();
reader = null;
-
-
}
finally
{
@@ -68,10 +67,7 @@
writer.close();
if(reader != null)
reader.close();
-
- if(tempfile.exists())
- if(!tempfile.delete())
- tempfile.deleteOnExit();
+ Files.delete(Paths.get(tempfile.getAbsolutePath()));
}
}
}
--- a/jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/HasNextChunk.java Sat Jun 03 02:44:55 2017 +0000
+++ b/jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/HasNextChunk.java Sat Jun 03 03:48:03 2017 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,10 +28,11 @@
import java.io.File;
import java.io.FileInputStream;
+import java.nio.file.Files;
+import java.nio.file.Paths;
-import javax.sound.sampled.*;
-
-import com.sun.media.sound.*;
+import com.sun.media.sound.RIFFReader;
+import com.sun.media.sound.RIFFWriter;
public class HasNextChunk {
@@ -67,8 +68,6 @@
assertTrue(!reader.hasNextChunk());
fis.close();
reader = null;
-
-
}
finally
{
@@ -76,10 +75,7 @@
writer.close();
if(reader != null)
reader.close();
-
- if(tempfile.exists())
- if(!tempfile.delete())
- tempfile.deleteOnExit();
+ Files.delete(Paths.get(tempfile.getAbsolutePath()));
}
}
}
--- a/jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/Read.java Sat Jun 03 02:44:55 2017 +0000
+++ b/jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/Read.java Sat Jun 03 03:48:03 2017 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,10 +28,11 @@
import java.io.File;
import java.io.FileInputStream;
+import java.nio.file.Files;
+import java.nio.file.Paths;
-import javax.sound.sampled.*;
-
-import com.sun.media.sound.*;
+import com.sun.media.sound.RIFFReader;
+import com.sun.media.sound.RIFFWriter;
public class Read {
@@ -62,7 +63,6 @@
assertEquals(readchunk.read(), 33);
fis.close();
reader = null;
-
}
finally
{
@@ -70,10 +70,7 @@
writer.close();
if(reader != null)
reader.close();
-
- if(tempfile.exists())
- if(!tempfile.delete())
- tempfile.deleteOnExit();
+ Files.delete(Paths.get(tempfile.getAbsolutePath()));
}
}
}
--- a/jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/ReadByte.java Sat Jun 03 02:44:55 2017 +0000
+++ b/jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/ReadByte.java Sat Jun 03 03:48:03 2017 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,10 +28,11 @@
import java.io.File;
import java.io.FileInputStream;
+import java.nio.file.Files;
+import java.nio.file.Paths;
-import javax.sound.sampled.*;
-
-import com.sun.media.sound.*;
+import com.sun.media.sound.RIFFReader;
+import com.sun.media.sound.RIFFWriter;
public class ReadByte {
@@ -62,7 +63,6 @@
assertEquals((int)reader.readByte(), 33);
fis.close();
reader = null;
-
}
finally
{
@@ -70,10 +70,7 @@
writer.close();
if(reader != null)
reader.close();
-
- if(tempfile.exists())
- if(!tempfile.delete())
- tempfile.deleteOnExit();
+ Files.delete(Paths.get(tempfile.getAbsolutePath()));
}
}
}
--- a/jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/ReadByteArrayIntInt.java Sat Jun 03 02:44:55 2017 +0000
+++ b/jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/ReadByteArrayIntInt.java Sat Jun 03 03:48:03 2017 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,10 +28,11 @@
import java.io.File;
import java.io.FileInputStream;
+import java.nio.file.Files;
+import java.nio.file.Paths;
-import javax.sound.sampled.*;
-
-import com.sun.media.sound.*;
+import com.sun.media.sound.RIFFReader;
+import com.sun.media.sound.RIFFWriter;
public class ReadByteArrayIntInt {
@@ -63,8 +64,6 @@
assertEquals(readchunk.read(), 3);
fis.close();
reader = null;
-
-
}
finally
{
@@ -72,10 +71,7 @@
writer.close();
if(reader != null)
reader.close();
-
- if(tempfile.exists())
- if(!tempfile.delete())
- tempfile.deleteOnExit();
+ Files.delete(Paths.get(tempfile.getAbsolutePath()));
}
}
}
--- a/jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/ReadInt.java Sat Jun 03 02:44:55 2017 +0000
+++ b/jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/ReadInt.java Sat Jun 03 03:48:03 2017 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,10 +28,11 @@
import java.io.File;
import java.io.FileInputStream;
+import java.nio.file.Files;
+import java.nio.file.Paths;
-import javax.sound.sampled.*;
-
-import com.sun.media.sound.*;
+import com.sun.media.sound.RIFFReader;
+import com.sun.media.sound.RIFFWriter;
public class ReadInt {
@@ -61,8 +62,6 @@
assertEquals(reader.readInt(), 133);
fis.close();
reader = null;
-
-
}
finally
{
@@ -70,10 +69,7 @@
writer.close();
if(reader != null)
reader.close();
-
- if(tempfile.exists())
- if(!tempfile.delete())
- tempfile.deleteOnExit();
+ Files.delete(Paths.get(tempfile.getAbsolutePath()));
}
}
}
--- a/jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/ReadLong.java Sat Jun 03 02:44:55 2017 +0000
+++ b/jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/ReadLong.java Sat Jun 03 03:48:03 2017 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,10 +28,11 @@
import java.io.File;
import java.io.FileInputStream;
+import java.nio.file.Files;
+import java.nio.file.Paths;
-import javax.sound.sampled.*;
-
-import com.sun.media.sound.*;
+import com.sun.media.sound.RIFFReader;
+import com.sun.media.sound.RIFFWriter;
public class ReadLong {
@@ -61,8 +62,6 @@
assertEquals(reader.readLong(), 133L);
fis.close();
reader = null;
-
-
}
finally
{
@@ -70,10 +69,7 @@
writer.close();
if(reader != null)
reader.close();
-
- if(tempfile.exists())
- if(!tempfile.delete())
- tempfile.deleteOnExit();
+ Files.delete(Paths.get(tempfile.getAbsolutePath()));
}
}
}
--- a/jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/ReadShort.java Sat Jun 03 02:44:55 2017 +0000
+++ b/jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/ReadShort.java Sat Jun 03 03:48:03 2017 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,10 +28,11 @@
import java.io.File;
import java.io.FileInputStream;
+import java.nio.file.Files;
+import java.nio.file.Paths;
-import javax.sound.sampled.*;
-
-import com.sun.media.sound.*;
+import com.sun.media.sound.RIFFReader;
+import com.sun.media.sound.RIFFWriter;
public class ReadShort {
@@ -61,8 +62,6 @@
assertEquals(reader.readShort(), (short)133);
fis.close();
reader = null;
-
-
}
finally
{
@@ -70,10 +69,7 @@
writer.close();
if(reader != null)
reader.close();
-
- if(tempfile.exists())
- if(!tempfile.delete())
- tempfile.deleteOnExit();
+ Files.delete(Paths.get(tempfile.getAbsolutePath()));
}
}
}
--- a/jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/ReadString.java Sat Jun 03 02:44:55 2017 +0000
+++ b/jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/ReadString.java Sat Jun 03 03:48:03 2017 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,10 +28,11 @@
import java.io.File;
import java.io.FileInputStream;
+import java.nio.file.Files;
+import java.nio.file.Paths;
-import javax.sound.sampled.*;
-
-import com.sun.media.sound.*;
+import com.sun.media.sound.RIFFReader;
+import com.sun.media.sound.RIFFWriter;
public class ReadString {
@@ -61,8 +62,6 @@
assertEquals(reader.readString(5), "HELLO");
fis.close();
reader = null;
-
-
}
finally
{
@@ -70,10 +69,7 @@
writer.close();
if(reader != null)
reader.close();
-
- if(tempfile.exists())
- if(!tempfile.delete())
- tempfile.deleteOnExit();
+ Files.delete(Paths.get(tempfile.getAbsolutePath()));
}
}
}
--- a/jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/ReadUnsignedByte.java Sat Jun 03 02:44:55 2017 +0000
+++ b/jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/ReadUnsignedByte.java Sat Jun 03 03:48:03 2017 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,10 +28,11 @@
import java.io.File;
import java.io.FileInputStream;
+import java.nio.file.Files;
+import java.nio.file.Paths;
-import javax.sound.sampled.*;
-
-import com.sun.media.sound.*;
+import com.sun.media.sound.RIFFReader;
+import com.sun.media.sound.RIFFWriter;
public class ReadUnsignedByte {
@@ -61,8 +62,6 @@
assertEquals(reader.readUnsignedByte(), 77);
fis.close();
reader = null;
-
-
}
finally
{
@@ -70,10 +69,7 @@
writer.close();
if(reader != null)
reader.close();
-
- if(tempfile.exists())
- if(!tempfile.delete())
- tempfile.deleteOnExit();
+ Files.delete(Paths.get(tempfile.getAbsolutePath()));
}
}
}
--- a/jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/ReadUnsignedInt.java Sat Jun 03 02:44:55 2017 +0000
+++ b/jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/ReadUnsignedInt.java Sat Jun 03 03:48:03 2017 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,10 +28,11 @@
import java.io.File;
import java.io.FileInputStream;
+import java.nio.file.Files;
+import java.nio.file.Paths;
-import javax.sound.sampled.*;
-
-import com.sun.media.sound.*;
+import com.sun.media.sound.RIFFReader;
+import com.sun.media.sound.RIFFWriter;
public class ReadUnsignedInt {
@@ -61,8 +62,6 @@
assertEquals(reader.readUnsignedInt(), 55377L);
fis.close();
reader = null;
-
-
}
finally
{
@@ -70,10 +69,7 @@
writer.close();
if(reader != null)
reader.close();
-
- if(tempfile.exists())
- if(!tempfile.delete())
- tempfile.deleteOnExit();
+ Files.delete(Paths.get(tempfile.getAbsolutePath()));
}
}
}
--- a/jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/ReadUnsignedShort.java Sat Jun 03 02:44:55 2017 +0000
+++ b/jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/ReadUnsignedShort.java Sat Jun 03 03:48:03 2017 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,10 +28,11 @@
import java.io.File;
import java.io.FileInputStream;
+import java.nio.file.Files;
+import java.nio.file.Paths;
-import javax.sound.sampled.*;
-
-import com.sun.media.sound.*;
+import com.sun.media.sound.RIFFReader;
+import com.sun.media.sound.RIFFWriter;
public class ReadUnsignedShort {
@@ -61,8 +62,6 @@
assertEquals(reader.readUnsignedShort(), 377);
fis.close();
reader = null;
-
-
}
finally
{
@@ -70,10 +69,7 @@
writer.close();
if(reader != null)
reader.close();
-
- if(tempfile.exists())
- if(!tempfile.delete())
- tempfile.deleteOnExit();
+ Files.delete(Paths.get(tempfile.getAbsolutePath()));
}
}
}
--- a/jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/Skip.java Sat Jun 03 02:44:55 2017 +0000
+++ b/jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/Skip.java Sat Jun 03 03:48:03 2017 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,8 @@
import java.io.File;
import java.io.FileInputStream;
+import java.nio.file.Files;
+import java.nio.file.Paths;
import com.sun.media.sound.RIFFReader;
import com.sun.media.sound.RIFFWriter;
@@ -74,8 +76,6 @@
assertEquals(readchunk.read(), 44);
fis.close();
reader = null;
-
-
}
finally
{
@@ -83,10 +83,7 @@
writer.close();
if(reader != null)
reader.close();
-
- if(tempfile.exists())
- if(!tempfile.delete())
- tempfile.deleteOnExit();
+ Files.delete(Paths.get(tempfile.getAbsolutePath()));
}
}
}
--- a/jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/WriteOutputStream.java Sat Jun 03 02:44:55 2017 +0000
+++ b/jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/WriteOutputStream.java Sat Jun 03 03:48:03 2017 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -29,10 +29,11 @@
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.File;
+import java.nio.file.Files;
+import java.nio.file.Paths;
-import javax.sound.sampled.*;
-
-import com.sun.media.sound.*;
+import com.sun.media.sound.RIFFReader;
+import com.sun.media.sound.RIFFWriter;
public class WriteOutputStream {
@@ -63,8 +64,6 @@
assertEquals(readchunk.read(), 33);
fis.close();
reader = null;
-
-
}
finally
{
@@ -72,10 +71,7 @@
writer.close();
if(reader != null)
reader.close();
-
- if(tempfile.exists())
- if(!tempfile.delete())
- tempfile.deleteOnExit();
+ Files.delete(Paths.get(tempfile.getAbsolutePath()));
}
}
}
--- a/jdk/test/javax/sound/sampled/AudioInputStream/FrameLengthAfterConversion.java Sat Jun 03 02:44:55 2017 +0000
+++ b/jdk/test/javax/sound/sampled/AudioInputStream/FrameLengthAfterConversion.java Sat Jun 03 03:48:03 2017 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2017, 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
@@ -94,7 +94,7 @@
}
}
- public static void main(final String[] args) {
+ public static void main(final String[] args) throws IOException {
for (final FormatConversionProvider fcp : load(
FormatConversionProvider.class)) {
System.out.println("fcp = " + fcp);
@@ -139,7 +139,8 @@
*/
private static void testAfterSaveToStream(final AudioFileWriter afw,
final AudioFileFormat.Type type,
- final AudioInputStream ais) {
+ final AudioInputStream ais)
+ throws IOException {
try {
final ByteArrayOutputStream out = new ByteArrayOutputStream();
afw.write(ais, type, out);
@@ -147,7 +148,7 @@
out.toByteArray());
validate(AudioSystem.getAudioInputStream(input).getFrameLength());
} catch (IllegalArgumentException | UnsupportedAudioFileException
- | IOException ignored) {
+ ignored) {
}
}
@@ -156,18 +157,19 @@
*/
private static void testAfterSaveToFile(final AudioFileWriter afw,
final AudioFileFormat.Type type,
- AudioInputStream ais) {
+ AudioInputStream ais)
+ throws IOException {
+ final File temp = File.createTempFile("sound", ".tmp");
try {
- final File temp = File.createTempFile("sound", ".tmp");
- temp.deleteOnExit();
afw.write(ais, type, temp);
ais = AudioSystem.getAudioInputStream(temp);
final long frameLength = ais.getFrameLength();
ais.close();
- Files.delete(Paths.get(temp.getAbsolutePath()));
validate(frameLength);
} catch (IllegalArgumentException | UnsupportedAudioFileException
- | IOException ignored) {
+ ignored) {
+ } finally {
+ Files.delete(Paths.get(temp.getAbsolutePath()));
}
}
--- a/jdk/test/javax/sound/sampled/spi/AudioFileReader/ShortHeader.java Sat Jun 03 02:44:55 2017 +0000
+++ b/jdk/test/javax/sound/sampled/spi/AudioFileReader/ShortHeader.java Sat Jun 03 03:48:03 2017 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -30,6 +30,7 @@
import java.io.OutputStream;
import java.net.URL;
import java.nio.file.Files;
+import java.nio.file.Paths;
import java.util.Arrays;
import javax.sound.sampled.AudioSystem;
@@ -51,14 +52,16 @@
public static void main(final String[] args) throws Exception {
final File file = Files.createTempFile("audio", "test").toFile();
- file.deleteOnExit();
- try (final OutputStream fos = new FileOutputStream(file)) {
- fos.write(W);
- }
-
- testAS(file);
- for (final AudioFileReader afr : load(AudioFileReader.class)) {
- testAFR(afr, file);
+ try {
+ try (final OutputStream fos = new FileOutputStream(file)) {
+ fos.write(W);
+ }
+ testAS(file);
+ for (final AudioFileReader afr : load(AudioFileReader.class)) {
+ testAFR(afr, file);
+ }
+ } finally {
+ Files.delete(Paths.get(file.getAbsolutePath()));
}
}
--- a/jdk/test/javax/sound/sampled/spi/AudioFileWriter/WriterCloseInput.java Sat Jun 03 02:44:55 2017 +0000
+++ b/jdk/test/javax/sound/sampled/spi/AudioFileWriter/WriterCloseInput.java Sat Jun 03 03:48:03 2017 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -33,6 +33,9 @@
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
+import java.nio.file.Files;
+import java.nio.file.Paths;
+
import javax.sound.sampled.AudioFileFormat;
import javax.sound.sampled.AudioFormat;
import javax.sound.sampled.AudioInputStream;
@@ -89,7 +92,7 @@
if (isFile) {
File f = File.createTempFile("WriterCloseInput" + testTotal, "tmp");
AudioSystem.write(inStream, fileType, f);
- f.delete();
+ Files.delete(Paths.get(f.getAbsolutePath()));
} else {
OutputStream outStream = new NullOutputStream();
AudioSystem.write(inStream, fileType, outStream);
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/swing/JFileChooser/GodMode/JFileChooserTest.java Sat Jun 03 03:48:03 2017 +0000
@@ -0,0 +1,180 @@
+/*
+ * Copyright (c) 2017, 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 8179014
+ * @requires (os.family == "Windows")
+ * @summary Check if JFileChooser crashes with GodMode Directory.
+ * @run main/manual JFileChooserTest
+ */
+import java.awt.Color;
+import java.awt.GridBagConstraints;
+import java.awt.GridBagLayout;
+import java.util.concurrent.CountDownLatch;
+import javax.swing.JPanel;
+import javax.swing.JTextArea;
+import javax.swing.SwingUtilities;
+import javax.swing.JButton;
+import javax.swing.JFrame;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.util.concurrent.TimeUnit;
+import javax.swing.JFileChooser;
+import javax.swing.UIManager;
+
+public class JFileChooserTest {
+
+ public static void main(String args[]) throws Exception {
+ final CountDownLatch latch = new CountDownLatch(1);
+ TestUI test = new TestUI(latch);
+ SwingUtilities.invokeAndWait(() -> {
+ try {
+ test.createUI();
+ } catch (Exception ex) {
+ throw new RuntimeException("Exception while creating UI");
+ }
+ });
+
+ boolean status = latch.await(5, TimeUnit.MINUTES);
+
+ if (!status) {
+ System.out.println("Test timed out.");
+ }
+
+ SwingUtilities.invokeAndWait(() -> {
+ try {
+ test.disposeUI();
+ } catch (Exception ex) {
+ throw new RuntimeException("Exception while disposing UI");
+ }
+ });
+
+ if (test.testResult == false) {
+ throw new RuntimeException("Test Failed.");
+ }
+ }
+}
+
+class TestUI {
+
+ private static JFrame mainFrame;
+ private static JPanel mainControlPanel;
+
+ private static JTextArea instructionTextArea;
+
+ private static JPanel resultButtonPanel;
+ private static JButton passButton;
+ private static JButton failButton;
+
+ private static GridBagLayout layout;
+ private final CountDownLatch latch;
+ public boolean testResult = false;
+
+ public TestUI(CountDownLatch latch) throws Exception {
+ this.latch = latch;
+ }
+
+ public final void createUI() throws Exception {
+ UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
+ mainFrame = new JFrame("JFileChooserTest");
+
+ layout = new GridBagLayout();
+ mainControlPanel = new JPanel(layout);
+ resultButtonPanel = new JPanel(layout);
+
+ GridBagConstraints gbc = new GridBagConstraints();
+
+ // Create Test instructions
+ String instructions
+ = "INSTRUCTIONS:"
+ + "\n 1. Create a new folder on the desktop."
+ + "\n 2. Rename the folder exactly as given below: "
+ + "\n GodMode.{ED7BA470-8E54-465E-825C-99712043E01C} "
+ + "\n 3. Click on Launch Button. "
+ + "\n Check if JFileChooser is launched successfully. "
+ + "\n If yes, close the JFileChooser and click Pass, "
+ + "\n else Fail. "
+ + "\n 4. Delete the GodMode folder.";
+
+ instructionTextArea = new JTextArea();
+ instructionTextArea.setText(instructions);
+ instructionTextArea.setEnabled(false);
+ instructionTextArea.setDisabledTextColor(Color.black);
+ instructionTextArea.setBackground(Color.white);
+
+ gbc.gridx = 0;
+ gbc.gridy = 0;
+ gbc.fill = GridBagConstraints.HORIZONTAL;
+ mainControlPanel.add(instructionTextArea, gbc);
+ JButton launchButton = new JButton("Launch");
+ launchButton.setActionCommand("Launch");
+ launchButton.addActionListener((ActionEvent e) -> {
+ JFileChooser fileChooser = new JFileChooser();
+ fileChooser.showOpenDialog(null);
+ }
+ );
+
+ gbc.gridx = 0;
+ gbc.gridy = 1;
+ mainControlPanel.add(launchButton, gbc);
+
+ passButton = new JButton("Pass");
+ passButton.setActionCommand("Pass");
+ passButton.addActionListener((ActionEvent e) -> {
+ testResult = true;
+ mainFrame.dispose();
+ latch.countDown();
+
+ });
+ failButton = new JButton("Fail");
+ failButton.setActionCommand("Fail");
+ failButton.addActionListener(new ActionListener() {
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ testResult = false;
+ mainFrame.dispose();
+ latch.countDown();
+ }
+ });
+ gbc.gridx = 0;
+ gbc.gridy = 0;
+ resultButtonPanel.add(passButton, gbc);
+ gbc.gridx = 1;
+ gbc.gridy = 0;
+ resultButtonPanel.add(failButton, gbc);
+
+ gbc.gridx = 0;
+ gbc.gridy = 2;
+ mainControlPanel.add(resultButtonPanel, gbc);
+
+ mainFrame.add(mainControlPanel);
+ mainFrame.pack();
+ mainFrame.setVisible(true);
+ }
+
+ public void disposeUI() {
+ mainFrame.setVisible(false);
+ mainFrame.dispose();
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/swing/JFrame/AlwaysOnTop/AlwaysOnTopImeTest.java Sat Jun 03 03:48:03 2017 +0000
@@ -0,0 +1,60 @@
+/*
+ * Copyright (c) 2017, 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 8179665
+ * @summary [Windows] java.awt.IllegalComponentStateException: component must
+ * be showing on the screen to determine its location
+ * @run main AlwaysOnTopImeTest
+ */
+
+import javax.swing.*;
+import java.awt.*;
+
+public class AlwaysOnTopImeTest {
+
+ private static JDialog d;
+ private static JFrame f;
+
+ public static void main(String[] args) throws Exception {
+ SwingUtilities.invokeLater(() -> {
+ f = new JFrame();
+ f.setVisible(true);
+ d = new JDialog(f);
+ d.add(new JTextField());
+ d.pack();
+ d.setModal(true);
+ f.setAlwaysOnTop(true);
+ d.setVisible(true);
+ f.setAlwaysOnTop(false);
+ });
+ Robot robot = new Robot();
+ robot.waitForIdle();
+ robot.delay(200);
+ SwingUtilities.invokeAndWait(() -> d.setVisible(false));
+ robot.waitForIdle();
+ robot.delay(200);
+ SwingUtilities.invokeLater(f::dispose);
+ }
+}
--- a/jdk/test/javax/swing/plaf/basic/BasicGraphicsUtils/8132119/bug8132119.java Sat Jun 03 02:44:55 2017 +0000
+++ b/jdk/test/javax/swing/plaf/basic/BasicGraphicsUtils/8132119/bug8132119.java Sat Jun 03 03:48:03 2017 +0000
@@ -41,7 +41,7 @@
/**
* @test
- * @bug 8132119 8168992
+ * @bug 8132119 8168992 8169897
* @author Alexandr Scherbatiy
* @summary Provide public API for text related methods in SwingBasicGraphicsUtils2
*/
@@ -158,7 +158,9 @@
}
g2.dispose();
- float xx = (WIDTH - width / 8) / 2;
+ float xx = BasicGraphicsUtils.getStringWidth(comp, fontMetrices, "A") +
+ BasicGraphicsUtils.getStringWidth(comp, fontMetrices, "O")/2;
+
checkImageContainsSymbol(buffImage, (int) xx, underlined ? 3 : 2);
}
@@ -285,7 +287,7 @@
break;
}
}
- return new Font(fontName, Font.PLAIN, 28);
+ return new Font(fontName, Font.PLAIN, 30);
}
private static float getLayoutWidth(String text, Font font, NumericShaper shaper) {
@@ -311,6 +313,7 @@
private static void checkImageContainsSymbol(BufferedImage buffImage,
int x, int intersections) {
+
int background = BACKGROUND_COLOR.getRGB();
boolean isBackground = true;
int backgroundChangesCount = 0;
@@ -321,6 +324,7 @@
backgroundChangesCount++;
}
}
+
if (backgroundChangesCount != intersections * 2) {
throw new RuntimeException("String is not properly drawn!");
}
--- a/jdk/test/tools/launcher/MainClassCantBeLoadedTest.java Sat Jun 03 02:44:55 2017 +0000
+++ b/jdk/test/tools/launcher/MainClassCantBeLoadedTest.java Sat Jun 03 03:48:03 2017 +0000
@@ -23,7 +23,7 @@
/**
* @test
- * @bug 8174694
+ * @bug 8174694 8181033
* @summary improve error message shown when main class can't be loaded
* @compile MainClassCantBeLoadedTest.java
* @run main MainClassCantBeLoadedTest
@@ -85,6 +85,68 @@
System.err.println(trExecution);
}
+ @Test
+ void testFailToInitializeMainClass() throws Exception {
+ if (!isEnglishLocale()) {
+ return;
+ }
+
+ File cwd = new File(".");
+ File srcDir = new File(cwd, "src");
+ if (srcDir.exists()) {
+ recursiveDelete(srcDir);
+ }
+ srcDir.mkdirs();
+
+ /* we want to generate class C that will resolve additional class
+ */
+ ArrayList<String> scratchpad = new ArrayList<>();
+ scratchpad.add("public class C {");
+ scratchpad.add(" public static void main(String... args) {");
+ scratchpad.add(" try {");
+ scratchpad.add(" System.out.println(\"loading of restricted class\");");
+ scratchpad.add(" } catch (Exception e) {");
+ scratchpad.add(" java.security.Provider p = new com.sun.crypto.provider.SunJCE();");
+ scratchpad.add(" p.toString();");
+ scratchpad.add(" }");
+ scratchpad.add(" }");
+ scratchpad.add("}");
+ createFile(new File(srcDir, "C.java"), scratchpad);
+
+
+ // Compile and execute C should succeed
+ TestResult trCompilation = doExec(javacCmd,
+ "--add-exports", "java.base/com.sun.crypto.provider=ALL-UNNAMED",
+ "-d", "out",
+ new File(srcDir, "C.java").toString());
+ if (!trCompilation.isOK()) {
+ System.err.println(trCompilation);
+ throw new RuntimeException("Error: compiling");
+ }
+
+ TestResult trExecution = doExec(javaCmd,
+ "--add-exports", "java.base/com.sun.crypto.provider=ALL-UNNAMED",
+ "-cp", "out", "C");
+ if (!trExecution.isOK()) {
+ System.err.println(trExecution);
+ throw new RuntimeException("Error: executing");
+ }
+
+ // Execute C with security manager will fail with AccessControlException
+ trExecution = doExec(javaCmd,
+ "-Djava.security.manager",
+ "--add-exports", "java.base/com.sun.crypto.provider=ALL-UNNAMED",
+ "-cp", "out", "C");
+
+ // then this error message should be generated
+ trExecution.contains("Error: Unable to initialize main class C");
+ trExecution.contains("Caused by: java.security.AccessControlException: " +
+ "access denied (\"java.lang.RuntimePermission\"" +
+ " \"accessClassInPackage.com.sun.crypto.provider\")");
+ if (!trExecution.testStatus)
+ System.err.println(trExecution);
+ }
+
public static void main(String[] args) throws Exception {
MainClassCantBeLoadedTest a = new MainClassCantBeLoadedTest();
a.run(args);
--- a/jdk/test/tools/launcher/modules/patch/systemmodules/PatchSystemModules.java Sat Jun 03 02:44:55 2017 +0000
+++ b/jdk/test/tools/launcher/modules/patch/systemmodules/PatchSystemModules.java Sat Jun 03 03:48:03 2017 +0000
@@ -51,7 +51,6 @@
private static final String JAVA_HOME = System.getProperty("java.home");
private static final Path TEST_SRC = Paths.get(System.getProperty("test.src"));
- private static final Path PATCH_SRC_DIR = TEST_SRC.resolve("src1");
private static final Path JMODS = Paths.get(JAVA_HOME, "jmods");
private static final Path MODS_DIR = Paths.get("mods");
@@ -66,6 +65,8 @@
@BeforeTest
private void setup() throws Throwable {
Path src = TEST_SRC.resolve("src");
+ Path src1 = TEST_SRC.resolve("src1");
+
for (String name : modules) {
assertTrue(CompilerUtils.compile(src.resolve(name),
MODS_DIR,
@@ -73,11 +74,11 @@
}
// compile patched source
- String patchDir = PATCH_SRC_DIR.resolve(JAVA_BASE).toString();
- assertTrue(CompilerUtils.compile(PATCH_SRC_DIR.resolve(JAVA_BASE),
+ String patchDir = src1.resolve(JAVA_BASE).toString();
+ assertTrue(CompilerUtils.compile(src1.resolve(JAVA_BASE),
PATCH_DIR.resolve(JAVA_BASE),
"--patch-module", "java.base=" + patchDir));
- assertTrue(CompilerUtils.compile(PATCH_SRC_DIR.resolve("m2"),
+ assertTrue(CompilerUtils.compile(src1.resolve("m2"),
PATCH_DIR.resolve("m2")));
createJars();
@@ -88,10 +89,16 @@
createImage();
}
- // create new copy of m1.jar
+ // compile a different version of m1
+ Path tmp = Paths.get("tmp");
+ assertTrue(CompilerUtils.compile(src1.resolve("m1"), tmp,
+ "--module-path", MODS_DIR.toString(),
+ "--module-source-path", src1.toString()));
+
+ // package new_m1.jar
jar("--create",
"--file=" + NEW_M1_JAR.toString(),
- "-C", MODS_DIR.resolve("m1").toString(), ".");
+ "-C", tmp.resolve("m1").toString(), ".");
}
/*
@@ -150,13 +157,13 @@
// Fail to upgrade m1.jar with mismatched hash
runTestWithExitCode(getJava(IMAGE),
"--upgrade-module-path", NEW_M1_JAR.toString(),
- "-m", "m1/p1.Main", "ShouldNeverRun");
+ "-m", "m1/p1.Main");
// test when SystemModules fast path is not enabled, i.e. exploded image
runTestWithExitCode(getJava(IMAGE),
"--patch-module", "java.base=" + PATCH_DIR.resolve(JAVA_BASE),
"--upgrade-module-path", NEW_M1_JAR.toString(),
- "-m", "m1/p1.Main", "ShouldNeverRun");
+ "-m", "m1/p1.Main");
}
/*
@@ -173,14 +180,14 @@
runTestWithExitCode(getJava(IMAGE),
"--patch-module", "m1=.jar",
"--upgrade-module-path", NEW_M1_JAR.toString(),
- "-m", "m1/p1.Main", "ShouldNeverRun");
+ "-m", "m1/p1.Main");
// test when SystemModules fast path is not enabled, i.e. exploded image
runTestWithExitCode(getJava(IMAGE),
"--patch-module", "java.base=" + PATCH_DIR.resolve(JAVA_BASE),
"--patch-module", "m1=.jar",
"--upgrade-module-path", NEW_M1_JAR.toString(),
- "-m", "m1/p1.Main", "ShouldNeverRun");
+ "-m", "m1/p1.Main");
}
private void runTestWithExitCode(String... options) throws Throwable {
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/tools/launcher/modules/patch/systemmodules/src1/m1/module-info.java Sat Jun 03 03:48:03 2017 +0000
@@ -0,0 +1,26 @@
+/**
+ * Copyright (c) 2017, 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.
+ */
+
+module m1 {
+ requires m2;
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/tools/launcher/modules/patch/systemmodules/src1/m1/p1/Main.java Sat Jun 03 03:48:03 2017 +0000
@@ -0,0 +1,30 @@
+/**
+ * Copyright (c) 2017, 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 p1;
+
+public class Main {
+ public static void main(String[] args) throws Exception {
+ throw new RuntimeException("should not reach here");
+ }
+}